@swisspost/design-system-components 10.7.0 → 10.9.0

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 (333) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{create-validator-decorator-D7nAb9KJ.js → create-validator-decorator-DVm_SDrR.js} +1 -1
  3. package/dist/cjs/{index-DWIlRT6N.js → index-DY4QxKNv.js} +5 -5
  4. package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{one-of-B8RUgrZk.js → one-of-qu7_EPxf.js} +1 -1
  7. package/dist/cjs/{package-BtKYhTNj.js → package-kgRYEtTJ.js} +1 -1
  8. package/dist/cjs/{pattern-B6VoDk_m.js → pattern-EpwCKMyC.js} +1 -1
  9. package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
  10. package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
  11. package/dist/cjs/post-avatar.cjs.entry.js +85 -61
  12. package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
  13. package/dist/cjs/post-banner.cjs.entry.js +5 -5
  14. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
  15. package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
  16. package/dist/cjs/post-closebutton_14.cjs.entry.js +545 -607
  17. package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
  18. package/dist/cjs/post-components.cjs.js +2 -2
  19. package/dist/cjs/post-date-picker.cjs.entry.js +24 -9
  20. package/dist/cjs/post-footer.cjs.entry.js +6 -6
  21. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  22. package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
  23. package/dist/cjs/post-listbox.cjs.entry.js +4 -4
  24. package/dist/cjs/post-number-input.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +6 -6
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
  27. package/dist/cjs/post-popover.cjs.entry.js +9 -9
  28. package/dist/cjs/post-progressbar.cjs.entry.js +4 -4
  29. package/dist/cjs/post-rating.cjs.entry.js +6 -6
  30. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +6 -6
  31. package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
  32. package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
  33. package/dist/cjs/post-stepper.cjs.entry.js +7 -7
  34. package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
  35. package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
  36. package/dist/cjs/post-tabs.cjs.entry.js +37 -9
  37. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
  38. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  39. package/dist/cjs/{required-bXtlqqaA.js → required-Dgzo-rb5.js} +1 -1
  40. package/dist/cjs/{type-BqLE7Uui.js → type-DBRxpBZI.js} +1 -1
  41. package/dist/cjs/{url-CUy3C3sH.js → url-Dl1JABeP.js} +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  43. package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
  44. package/dist/collection/components/post-avatar/post-avatar.js +77 -59
  45. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  46. package/dist/collection/components/post-banner/post-banner.css +1 -1
  47. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  48. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  49. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  50. package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
  51. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  52. package/dist/collection/components/post-date-picker/post-date-picker.js +18 -3
  53. package/dist/collection/components/post-footer/post-footer.css +1 -1
  54. package/dist/collection/components/post-header/post-header.css +1 -1
  55. package/dist/collection/components/post-header/post-header.js +100 -18
  56. package/dist/collection/components/post-icon/post-icon.css +1 -1
  57. package/dist/collection/components/post-icon/post-icon.js +1 -2
  58. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  59. package/dist/collection/components/post-language-menu/post-language-menu.js +2 -2
  60. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  61. package/dist/collection/components/post-listbox/post-listbox.css +1 -1
  62. package/dist/collection/components/post-listbox/post-listbox.js +1 -1
  63. package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
  64. package/dist/collection/components/post-logo/post-logo.css +1 -1
  65. package/dist/collection/components/post-logo/post-logo.js +1 -1
  66. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  67. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  68. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  69. package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
  70. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  71. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
  72. package/dist/collection/components/post-menu/post-menu.css +1 -1
  73. package/dist/collection/components/post-menu/post-menu.js +3 -14
  74. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  75. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
  76. package/dist/collection/components/post-number-input/post-number-input.css +2 -2
  77. package/dist/collection/components/post-number-input/post-number-input.js +2 -2
  78. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  79. package/dist/collection/components/post-popover/post-popover.css +1 -1
  80. package/dist/collection/components/post-popover/post-popover.js +2 -2
  81. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
  82. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  83. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
  84. package/dist/collection/components/post-progressbar/post-progressbar.js +1 -1
  85. package/dist/collection/components/post-rating/post-rating.js +1 -1
  86. package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
  87. package/dist/collection/components/post-side-navigation/post-side-navigation.js +7 -3
  88. package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
  89. package/dist/collection/components/post-stepper/post-stepper.js +1 -1
  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.js +2 -2
  92. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  93. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  94. package/dist/collection/components/post-tabs/post-tabs.js +31 -3
  95. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  96. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +3 -1
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  99. package/dist/collection/test-setup.js +28 -0
  100. package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
  101. package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
  102. package/dist/collection/utils/floating-ui/util.js +10 -0
  103. package/dist/collection/utils/index.js +1 -0
  104. package/dist/collection/utils/is-focus-visible.js +15 -0
  105. package/dist/components/is-focus-visible.js +1 -0
  106. package/dist/components/package.js +1 -1
  107. package/dist/components/post-accordion-item2.js +1 -1
  108. package/dist/components/post-avatar.js +1 -1
  109. package/dist/components/post-back-to-top.js +1 -1
  110. package/dist/components/post-banner.js +1 -1
  111. package/dist/components/post-breadcrumb-item.js +1 -1
  112. package/dist/components/post-breadcrumbs.js +1 -1
  113. package/dist/components/post-closebutton2.js +1 -1
  114. package/dist/components/post-collapsible2.js +1 -1
  115. package/dist/components/post-date-picker.js +1 -1
  116. package/dist/components/post-footer.js +1 -1
  117. package/dist/components/post-header.js +1 -1
  118. package/dist/components/post-icon2.js +1 -1
  119. package/dist/components/post-language-menu.js +1 -1
  120. package/dist/components/post-linkarea.js +1 -1
  121. package/dist/components/post-listbox-option.js +1 -1
  122. package/dist/components/post-listbox.js +1 -1
  123. package/dist/components/post-logo.js +1 -1
  124. package/dist/components/post-mainnavigation.js +1 -1
  125. package/dist/components/post-megadropdown-trigger.js +1 -1
  126. package/dist/components/post-megadropdown.js +1 -1
  127. package/dist/components/post-menu-item2.js +1 -1
  128. package/dist/components/post-menu-trigger2.js +1 -1
  129. package/dist/components/post-menu2.js +1 -1
  130. package/dist/components/post-number-input.js +1 -1
  131. package/dist/components/post-pagination.js +1 -1
  132. package/dist/components/post-popover-trigger.js +1 -1
  133. package/dist/components/post-popover.js +1 -1
  134. package/dist/components/post-popovercontainer2.js +1 -1
  135. package/dist/components/post-progressbar.js +1 -1
  136. package/dist/components/post-rating.js +1 -1
  137. package/dist/components/post-side-navigation-trigger.js +1 -1
  138. package/dist/components/post-side-navigation.js +1 -1
  139. package/dist/components/post-stepper-item.js +1 -1
  140. package/dist/components/post-stepper.js +1 -1
  141. package/dist/components/post-tab-item.js +1 -1
  142. package/dist/components/post-tab-panel.js +1 -1
  143. package/dist/components/post-tabs.js +1 -1
  144. package/dist/components/post-togglebutton2.js +1 -1
  145. package/dist/components/post-tooltip-trigger.js +1 -1
  146. package/dist/components/post-tooltip.js +1 -1
  147. package/dist/components/react/index.js +1 -1
  148. package/dist/components/react/p-BWwWKRO5.js +1 -0
  149. package/dist/components/react/p-CAL337jJ.js +1 -0
  150. package/dist/components/react/p-CBVthgj-.js +1 -0
  151. package/dist/components/react/{p-DS46v3ju.js → p-CLkb55ud.js} +1 -1
  152. package/dist/components/react/{p-C8_zqgAP.js → p-CYBXVnUJ.js} +1 -1
  153. package/dist/components/react/p-Ci-TsJYj.js +1 -0
  154. package/dist/components/react/p-CtgMQs_Q.js +1 -0
  155. package/dist/components/react/p-D4LBzsbB.js +1 -0
  156. package/dist/components/react/p-D5lqOfVk.js +1 -0
  157. package/dist/components/react/p-DGpWjdFJ.js +1 -0
  158. package/dist/components/react/{p-BBv5JYsW.js → p-DSk0Nq8U.js} +1 -1
  159. package/dist/components/react/{p-1y1rv5Tw.js → p-Db3d6dKF.js} +1 -1
  160. package/dist/components/react/p-DkDIUTRi.js +1 -0
  161. package/dist/components/react/post-accordion-item.js +1 -1
  162. package/dist/components/react/post-accordion.js +1 -1
  163. package/dist/components/react/post-autocomplete.js +1 -1
  164. package/dist/components/react/post-avatar.js +1 -1
  165. package/dist/components/react/post-back-to-top.js +1 -1
  166. package/dist/components/react/post-banner.js +1 -1
  167. package/dist/components/react/post-breadcrumb-item.js +1 -1
  168. package/dist/components/react/post-breadcrumbs.js +1 -1
  169. package/dist/components/react/post-closebutton.js +1 -1
  170. package/dist/components/react/post-collapsible-trigger.js +1 -1
  171. package/dist/components/react/post-collapsible.js +1 -1
  172. package/dist/components/react/post-date-picker.js +1 -1
  173. package/dist/components/react/post-footer.js +1 -1
  174. package/dist/components/react/post-header.js +1 -1
  175. package/dist/components/react/post-icon.js +1 -1
  176. package/dist/components/react/post-language-menu-item.js +1 -1
  177. package/dist/components/react/post-language-menu.js +1 -1
  178. package/dist/components/react/post-linkarea.js +1 -1
  179. package/dist/components/react/post-listbox-option.js +1 -1
  180. package/dist/components/react/post-listbox.js +1 -1
  181. package/dist/components/react/post-logo.js +1 -1
  182. package/dist/components/react/post-mainnavigation.js +1 -1
  183. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  184. package/dist/components/react/post-megadropdown.js +1 -1
  185. package/dist/components/react/post-menu-item.js +1 -1
  186. package/dist/components/react/post-menu-trigger.js +1 -1
  187. package/dist/components/react/post-menu.js +1 -1
  188. package/dist/components/react/post-number-input.js +1 -1
  189. package/dist/components/react/post-pagination.js +1 -1
  190. package/dist/components/react/post-popover-trigger.js +1 -1
  191. package/dist/components/react/post-popover.js +1 -1
  192. package/dist/components/react/post-popovercontainer.js +1 -1
  193. package/dist/components/react/post-progressbar.js +1 -1
  194. package/dist/components/react/post-rating.js +1 -1
  195. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  196. package/dist/components/react/post-side-navigation.js +1 -1
  197. package/dist/components/react/post-stepper-item.js +1 -1
  198. package/dist/components/react/post-stepper.js +1 -1
  199. package/dist/components/react/post-tab-item.js +1 -1
  200. package/dist/components/react/post-tab-panel.js +1 -1
  201. package/dist/components/react/post-tabs.js +1 -1
  202. package/dist/components/react/post-togglebutton.js +1 -1
  203. package/dist/components/react/post-tooltip-trigger.js +1 -1
  204. package/dist/components/react/post-tooltip.js +1 -1
  205. package/dist/docs.json +67 -45
  206. package/dist/esm/{create-validator-decorator-DFpQtJzK.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
  207. package/dist/esm/{index-Bs0zeM5Q.js → index-D0jX3Fts.js} +5 -5
  208. package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
  209. package/dist/esm/loader.js +3 -3
  210. package/dist/esm/{one-of-DQCfaZpw.js → one-of-B9locHPx.js} +1 -1
  211. package/dist/esm/{package-BBz9PVf0.js → package-CAL337jJ.js} +1 -1
  212. package/dist/esm/{pattern-3lnaFlkk.js → pattern-BL3OBU8C.js} +1 -1
  213. package/dist/esm/post-accordion_2.entry.js +6 -6
  214. package/dist/esm/post-autocomplete.entry.js +5 -5
  215. package/dist/esm/post-avatar.entry.js +85 -61
  216. package/dist/esm/post-back-to-top.entry.js +6 -6
  217. package/dist/esm/post-banner.entry.js +5 -5
  218. package/dist/esm/post-breadcrumb-item.entry.js +8 -8
  219. package/dist/esm/post-breadcrumbs.entry.js +7 -7
  220. package/dist/esm/post-closebutton_14.entry.js +545 -607
  221. package/dist/esm/post-collapsible_2.entry.js +13 -7
  222. package/dist/esm/post-components.js +3 -3
  223. package/dist/esm/post-date-picker.entry.js +24 -9
  224. package/dist/esm/post-footer.entry.js +6 -6
  225. package/dist/esm/post-linkarea.entry.js +3 -3
  226. package/dist/esm/post-listbox-option.entry.js +4 -4
  227. package/dist/esm/post-listbox.entry.js +4 -4
  228. package/dist/esm/post-number-input.entry.js +5 -5
  229. package/dist/esm/post-pagination.entry.js +6 -6
  230. package/dist/esm/post-popover-trigger.entry.js +5 -5
  231. package/dist/esm/post-popover.entry.js +9 -9
  232. package/dist/esm/post-progressbar.entry.js +4 -4
  233. package/dist/esm/post-rating.entry.js +6 -6
  234. package/dist/esm/post-side-navigation-trigger.entry.js +6 -6
  235. package/dist/esm/post-side-navigation.entry.js +14 -9
  236. package/dist/esm/post-stepper-item.entry.js +3 -3
  237. package/dist/esm/post-stepper.entry.js +7 -7
  238. package/dist/esm/post-tab-item.entry.js +6 -6
  239. package/dist/esm/post-tab-panel.entry.js +6 -6
  240. package/dist/esm/post-tabs.entry.js +37 -9
  241. package/dist/esm/post-tooltip-trigger.entry.js +6 -6
  242. package/dist/esm/post-tooltip.entry.js +8 -6
  243. package/dist/esm/{required-NuzPg5jZ.js → required-CDaQB1gC.js} +1 -1
  244. package/dist/esm/{type-ChnksJ25.js → type-CQ7XuPCZ.js} +1 -1
  245. package/dist/esm/{url-BCk3ZU-x.js → url-B-86gtTK.js} +1 -1
  246. package/dist/post-components/{p-63e570c4.entry.js → p-077be898.entry.js} +1 -1
  247. package/dist/post-components/{p-6a2f47af.entry.js → p-184bd61c.entry.js} +1 -1
  248. package/dist/post-components/p-1933e4fa.entry.js +1 -0
  249. package/dist/post-components/p-21e6f82a.entry.js +1 -0
  250. package/dist/post-components/{p-c2de3702.entry.js → p-2220db4c.entry.js} +1 -1
  251. package/dist/post-components/p-2aff3873.entry.js +1 -0
  252. package/dist/post-components/p-2b475cd7.entry.js +1 -0
  253. package/dist/post-components/p-33a898ec.entry.js +1 -0
  254. package/dist/post-components/p-405c1fff.entry.js +1 -0
  255. package/dist/post-components/{p-bd128657.entry.js → p-5efaca25.entry.js} +1 -1
  256. package/dist/post-components/p-6a9661d9.entry.js +1 -0
  257. package/dist/post-components/{p-f275b872.entry.js → p-7dd192b3.entry.js} +1 -1
  258. package/dist/post-components/p-8e5052d5.entry.js +1 -0
  259. package/dist/post-components/p-9440738d.entry.js +1 -0
  260. package/dist/post-components/{p-31550a50.entry.js → p-965a02fb.entry.js} +1 -1
  261. package/dist/post-components/{p-61a45246.entry.js → p-9740719e.entry.js} +1 -1
  262. package/dist/post-components/p-9af8f5af.entry.js +1 -0
  263. package/dist/post-components/{p-DeUk3rcv.js → p-BCPv4bcY.js} +1 -1
  264. package/dist/post-components/p-BWwWKRO5.js +1 -0
  265. package/dist/post-components/p-CAL337jJ.js +1 -0
  266. package/dist/post-components/{p-D1s6tESz.js → p-CP3LjuFR.js} +1 -1
  267. package/dist/post-components/p-D0jX3Fts.js +2 -0
  268. package/dist/post-components/{p-Bl-_v3aT.js → p-D6mVqZLg.js} +1 -1
  269. package/dist/post-components/{p-BwhzbRIR.js → p-DSaWK_q-.js} +1 -1
  270. package/dist/post-components/p-VPHnF9fB.js +1 -0
  271. package/dist/post-components/p-a6971c1c.entry.js +1 -0
  272. package/dist/post-components/p-a7d8f328.entry.js +1 -0
  273. package/dist/post-components/{p-f784e149.entry.js → p-bb9a0e1e.entry.js} +1 -1
  274. package/dist/post-components/{p-e6a4146b.entry.js → p-bf8c7dca.entry.js} +1 -1
  275. package/dist/post-components/p-c3351def.entry.js +1 -0
  276. package/dist/post-components/{p-31a97aae.entry.js → p-c87f33f0.entry.js} +1 -1
  277. package/dist/post-components/{p-64480e3a.entry.js → p-e30b534d.entry.js} +1 -1
  278. package/dist/post-components/{p-43240818.entry.js → p-e73eabac.entry.js} +1 -1
  279. package/dist/post-components/{p-f566768e.entry.js → p-e84fe883.entry.js} +1 -1
  280. package/dist/post-components/{p-aa33141b.entry.js → p-eaa28736.entry.js} +1 -1
  281. package/dist/post-components/{p-451ec8ee.entry.js → p-f2cb8ed1.entry.js} +1 -1
  282. package/dist/post-components/{p-58b66607.entry.js → p-ffbf2375.entry.js} +1 -1
  283. package/dist/post-components/p-gv9b-Z15.js +1 -0
  284. package/dist/post-components/post-components.css +2 -2
  285. package/dist/post-components/post-components.esm.js +1 -1
  286. package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
  287. package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
  288. package/dist/types/components/post-date-picker/post-date-picker.d.ts +2 -0
  289. package/dist/types/components/post-header/post-header.d.ts +14 -0
  290. package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
  291. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
  292. package/dist/types/components/post-menu/post-menu.d.ts +0 -1
  293. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
  294. package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
  295. package/dist/types/components.d.ts +39 -26
  296. package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
  297. package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
  298. package/dist/types/utils/floating-ui/util.d.ts +4 -0
  299. package/dist/types/utils/index.d.ts +1 -0
  300. package/dist/types/utils/is-focus-visible.d.ts +5 -0
  301. package/dist/vrt/helpers/header-test-config.js +2 -1
  302. package/hydrate/index.js +659 -634
  303. package/hydrate/index.mjs +659 -634
  304. package/package.json +22 -21
  305. package/dist/components/react/p-BBz9PVf0.js +0 -1
  306. package/dist/components/react/p-BgEY7xhT.js +0 -1
  307. package/dist/components/react/p-C3J7fIWx.js +0 -1
  308. package/dist/components/react/p-C5ibTdH5.js +0 -1
  309. package/dist/components/react/p-CUKzje9q.js +0 -1
  310. package/dist/components/react/p-DTBtJCjk.js +0 -1
  311. package/dist/components/react/p-XUkUhxaz.js +0 -1
  312. package/dist/components/react/p-ialuSSl2.js +0 -1
  313. package/dist/post-components/p-10e430c3.entry.js +0 -1
  314. package/dist/post-components/p-32e1e951.entry.js +0 -1
  315. package/dist/post-components/p-4f08b99b.entry.js +0 -1
  316. package/dist/post-components/p-54432b47.entry.js +0 -1
  317. package/dist/post-components/p-5d7de657.entry.js +0 -1
  318. package/dist/post-components/p-63dd9a76.entry.js +0 -1
  319. package/dist/post-components/p-96d07f2b.entry.js +0 -1
  320. package/dist/post-components/p-9a1e8b1d.entry.js +0 -1
  321. package/dist/post-components/p-BBz9PVf0.js +0 -1
  322. package/dist/post-components/p-Bs0zeM5Q.js +0 -2
  323. package/dist/post-components/p-DH-eJVHZ.js +0 -1
  324. package/dist/post-components/p-Dk-DtPZn.js +0 -1
  325. package/dist/post-components/p-aff180f5.entry.js +0 -1
  326. package/dist/post-components/p-d5327dd1.entry.js +0 -1
  327. package/dist/post-components/p-e1817744.entry.js +0 -1
  328. package/dist/post-components/p-f6da5e69.entry.js +0 -1
  329. package/dist/post-components/p-f917527c.entry.js +0 -1
  330. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
  331. package/dist/vrt/helpers/header-variants.config.js +0 -157
  332. /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
  333. /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as r,Host as o,transformTag as s}from"@stencil/core/internal/client";import{r as i,c as n,g as a}from"./breakpoints.js";import{T as c}from"./type.js";function u(e,t,r){const o=n({priority:1,blocking:!1,run(o,s){const{value:i,showError:n}=a(o,s);if("number"!=typeof i)return!0;const c=function(e,t){const r="string"==typeof t?e[t]:t;return"number"==typeof r?r:null}(o,e);if(null===c){if("string"==typeof e){const t=typeof o[e];if("number"!==t)return n(`references property "${e}" which must be a number but got ${t}`),!1}return!0}const u=t.include??r.includeDefault;return!!r.compare(i,c,u)||(n("must be "+r.formatExpectation("string"==typeof e?c+"":e+"",u)),!1)}});return function(t,r){"string"==typeof e&&i(t,e,r),o(t,r)}}function l(e,t={}){return u(e,{include:t.includeMin},{includeDefault:!1,compare:(e,t,r)=>r?e>=t:e>t,formatExpectation:(e,t)=>t?`greater than or equal to "${e}"`:`greater than "${e}"`})}var p=function(e,t,r,o){var s,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(n=(i<3?s(n):i>3?s(t,r,n):s(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n};const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.min=0,this.max=100}getEffectiveMin(){return Number.isFinite(this.min)?this.min:0}getEffectiveMax(){return Number.isFinite(this.max)&&this.max>this.getEffectiveMin()?this.max:100}getEffectiveValue(e,t){return void 0===this.value||!Number.isFinite(this.value)||this.value<e||this.value>t?e:this.value}render(){const e=this.getEffectiveMin(),t=this.getEffectiveMax(),s=this.getEffectiveValue(e,t);return r(o,{key:"c29b1fa3dca89d999c2a55bd58c9c7450ed767c6",role:"progressbar","aria-valuenow":s,"aria-valuemin":e,"aria-valuemax":t},r("div",{key:"aaff038be7bdaf99de1e94c7479c2b57947195ac",class:"progress-value",style:{"--post-progressbar-value":(s-e)/(t-e)*100+"%"}}))}get host(){return this}static get style(){return":host{display:block;position:relative;height:var(--post-device-sizing-interactive-progressbar-indicator);border-radius:var(--post-device-border-radius-round);box-shadow:0px 0px 0px var(--post-device-border-width-alternative1) var(--post-scheme-color-interactive-primary-enabled-stroke) inset;overflow:hidden}.progress-value{position:absolute;inset-block:0;inset-inline-start:0;width:var(--post-progressbar-value, 0);border-radius:var(--post-device-border-radius-round);background-color:var(--post-progressbar-status-color, var(--post-scheme-color-interactive-primary-enabled-bg2));transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border:1px solid Highlight}.progress-value{background-color:Highlight}}"}},[1,"post-progressbar",{min:[2],max:[2],value:[2]}]);p([c("number")],d.prototype,"min",void 0),p([c("number"),l("min")],d.prototype,"max",void 0),p([c("number"),l("min"),function(e,t={}){return u("max",{include:t.includeMax},{includeDefault:!0,compare:(e,t,r)=>r?e<=t:e<t,formatExpectation:(e,t)=>t?`less than or equal to "${e}"`:`less than "${e}"`})}()],d.prototype,"value",void 0);const b=d,f=function(){"undefined"!=typeof customElements&&["post-progressbar"].forEach((e=>{"post-progressbar"===e&&(customElements.get(s(e))||customElements.define(s(e),d))}))};export{b as PostProgressbar,f as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as r,Host as o,transformTag as s}from"@stencil/core/internal/client";import{r as i,c as n,g as a}from"./breakpoints.js";import{T as c}from"./type.js";function u(e,t,r){const o=n({priority:1,blocking:!1,run(o,s){const{value:i,showError:n}=a(o,s);if("number"!=typeof i)return!0;const c=function(e,t){const r="string"==typeof t?e[t]:t;return"number"==typeof r?r:null}(o,e);if(null===c){if("string"==typeof e){const t=typeof o[e];if("number"!==t)return n(`references property "${e}" which must be a number but got ${t}`),!1}return!0}const u=t.include??r.includeDefault;return!!r.compare(i,c,u)||(n("must be "+r.formatExpectation("string"==typeof e?c+"":e+"",u)),!1)}});return function(t,r){"string"==typeof e&&i(t,e,r),o(t,r)}}function l(e,t={}){return u(e,{include:t.includeMin},{includeDefault:!1,compare:(e,t,r)=>r?e>=t:e>t,formatExpectation:(e,t)=>t?`greater than or equal to "${e}"`:`greater than "${e}"`})}var p=function(e,t,r,o){var s,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(n=(i<3?s(n):i>3?s(t,r,n):s(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n};const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.min=0,this.max=100}getEffectiveMin(){return Number.isFinite(this.min)?this.min:0}getEffectiveMax(){return Number.isFinite(this.max)&&this.max>this.getEffectiveMin()?this.max:100}getEffectiveValue(e,t){return void 0===this.value||!Number.isFinite(this.value)||this.value<e||this.value>t?e:this.value}render(){const e=this.getEffectiveMin(),t=this.getEffectiveMax(),s=this.getEffectiveValue(e,t);return r(o,{key:"26bdbb5219393e8b44e2fe5395d8a4cd8aa7e18a",role:"progressbar","aria-valuenow":s,"aria-valuemin":e,"aria-valuemax":t},r("div",{key:"65b81479fac7aa6024556ef6589064f997f4394e",class:"progress-value",style:{"--post-progressbar-value":(s-e)/(t-e)*100+"%"}}))}get host(){return this}static get style(){return":host{display:block;position:relative;height:var(--post-device-sizing-interactive-progressbar-indicator);border-radius:var(--post-device-border-radius-round);box-shadow:0px 0px 0px var(--post-device-border-width-alternative1) var(--post-scheme-color-interactive-primary-enabled-stroke) inset;overflow:hidden}.progress-value{position:absolute;inset-block:0;inset-inline-start:0;width:var(--post-progressbar-value, 0);border-radius:var(--post-device-border-radius-round);background-color:var(--post-progressbar-status-color, var(--post-scheme-color-interactive-primary-enabled-bg2));transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border:1px solid Highlight}.progress-value{background-color:Highlight}}"}},[1,"post-progressbar",{min:[2],max:[2],value:[2]}]);p([c("number")],b.prototype,"min",void 0),p([c("number"),l("min")],b.prototype,"max",void 0),p([c("number"),l("min"),function(e,t={}){return u("max",{include:t.includeMax},{includeDefault:!0,compare:(e,t,r)=>r?e<=t:e<t,formatExpectation:(e,t)=>t?`less than or equal to "${e}"`:`less than "${e}"`})}()],b.prototype,"value",void 0);const f=b,d=function(){"undefined"!=typeof customElements&&["post-progressbar"].forEach((e=>{"post-progressbar"===e&&(customElements.get(s(e))||customElements.define(s(e),b))}))};export{f as PostProgressbar,d as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as r,h as i,Host as a,transformTag as e}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as o}from"./package.js";import{d as n}from"./post-icon2.js";import{R as l}from"./required.js";import{T as h}from"./type.js";var c=function(t,s,r,i){var a,e=arguments.length,o=e<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,r,i);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(e<3?a(o):e>3?a(s,r,o):a(s,r))||o);return e>3&&o&&Object.defineProperty(s,r,o),o};const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postInput=r(this,"postInput",7),this.postChange=r(this,"postChange",7),this.hasChanged=!1,this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return i(a,{key:"727813875ba5d754ec17f4a2b151c0c6cd4ab5ca","data-version":o},i("div",{key:"1ac7e5db0098568c16551a4850442e4c8f0e686b",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} / ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>i("div",{key:"star-"+t,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},i("post-icon",{name:"favoritestar",class:"stroke"}),i("post-icon",{name:"favoritestar-solid",class:"fill"}))))))}get host(){return this}static get style(){return":host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}"}},[1,"post-rating",{label:[513],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]}]);c([l(),h("string")],p.prototype,"label",void 0),c([l(),h("number")],p.prototype,"stars",void 0),c([l(),h("number")],p.prototype,"currentRating",void 0);const f=p,d=function(){"undefined"!=typeof customElements&&["post-rating","post-icon"].forEach((t=>{switch(t){case"post-rating":customElements.get(e(t))||customElements.define(e(t),p);break;case"post-icon":customElements.get(e(t))||n()}}))};export{f as PostRating,d as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as r,h as i,Host as a,transformTag as e}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as o}from"./package.js";import{d as n}from"./post-icon2.js";import{R as l}from"./required.js";import{T as h}from"./type.js";var c=function(t,s,r,i){var a,e=arguments.length,o=e<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,r,i);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(e<3?a(o):e>3?a(s,r,o):a(s,r))||o);return e>3&&o&&Object.defineProperty(s,r,o),o};const d=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postInput=r(this,"postInput",7),this.postChange=r(this,"postChange",7),this.hasChanged=!1,this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return i(a,{key:"c793abbf5e0d01bb19dc4464ebd75249959a1717","data-version":o},i("div",{key:"357946df40a3d3a85ece2d0ac6ecc761951d9471",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} / ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>i("div",{key:"star-"+t,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},i("post-icon",{name:"favoritestar",class:"stroke"}),i("post-icon",{name:"favoritestar-solid",class:"fill"}))))))}get host(){return this}static get style(){return":host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}"}},[1,"post-rating",{label:[513],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]}]);c([l(),h("string")],d.prototype,"label",void 0),c([l(),h("number")],d.prototype,"stars",void 0),c([l(),h("number")],d.prototype,"currentRating",void 0);const p=d,f=function(){"undefined"!=typeof customElements&&["post-rating","post-icon"].forEach((t=>{switch(t){case"post-rating":customElements.get(e(t))||customElements.define(e(t),d);break;case"post-icon":customElements.get(e(t))||n()}}))};export{p as PostRating,f as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as i,h as s,Host as e,transformTag as o}from"@stencil/core/internal/client";import{v as n}from"./package.js";import"./breakpoints.js";import{E as r}from"./event-from.js";import{g as a}from"./get-root.js";import{R as c}from"./required.js";import{T as h}from"./type.js";var l=function(t,i,s,e){var o,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,s,r):o(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const d=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.observer=new MutationObserver((()=>this.setTrigger())),this.toggleSideNavigation=this.toggleSideNavigation.bind(this),this.handlePostToggle=this.handlePostToggle.bind(this)}connectedCallback(){this.root=a(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-side-navigation-trigger must contain a button.")}disconnectedCallback(){this.observer.disconnect(),this.root.removeEventListener("postToggle",this.handlePostToggle),this.trigger?.removeEventListener("click",this.toggleSideNavigation)}get sideNavigation(){const t=this.root.getElementById(this.for);return t&&"post-side-navigation"===t.localName?t:null}setTrigger(){const t=this.host.querySelector("button");!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger&&this.trigger.removeEventListener("click",this.toggleSideNavigation),this.trigger=t,this.trigger.addEventListener("click",this.toggleSideNavigation),this.updateAriaAttributes())}updateAriaAttributes(){if(!this.trigger)return;const t=this.trigger.getAttribute("aria-controls");t?.includes(this.for)||this.trigger.setAttribute("aria-controls",t?`${t} ${this.for}`:this.for),this.trigger.setAttribute("aria-expanded","false")}handlePostToggle(t){this.trigger?.setAttribute("aria-expanded",""+t.detail)}async update(){this.updateAriaAttributes()}async toggleSideNavigation(){await(this.sideNavigation?.toggle())}render(){return s(e,{key:"1c908083562ec5ca01cd9410c72ac78ae11ce72f","data-version":n},s("slot",{key:"38f63424e8c66b4bf926418b57555dc676d24d45"}))}get host(){return this}static get style(){return":host{display:inline-block}@media screen and (min-width: 1024px){:host{display:none}}"}},[257,"post-side-navigation-trigger",{for:[513],update:[64]}]);l([c(),h("string")],d.prototype,"for",void 0),l([r("post-side-navigation",{ignoreNestedComponents:!1})],d.prototype,"handlePostToggle",null);const g=d,p=function(){"undefined"!=typeof customElements&&["post-side-navigation-trigger"].forEach((t=>{"post-side-navigation-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),d))}))};export{g as PostSideNavigationTrigger,p as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as i,h as s,Host as e,transformTag as o}from"@stencil/core/internal/client";import{v as n}from"./package.js";import"./breakpoints.js";import{E as a}from"./event-from.js";import{g as r}from"./get-root.js";import{R as h}from"./required.js";import{T as c}from"./type.js";var d=function(t,i,s,e){var o,n=arguments.length,a=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(i,s,a):o(i,s))||a);return n>3&&a&&Object.defineProperty(i,s,a),a};const l=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.observer=new MutationObserver((()=>this.setTrigger())),this.toggleSideNavigation=this.toggleSideNavigation.bind(this),this.handlePostToggle=this.handlePostToggle.bind(this)}connectedCallback(){this.root=r(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-side-navigation-trigger must contain a button.")}disconnectedCallback(){this.observer.disconnect(),this.root.removeEventListener("postToggle",this.handlePostToggle),this.trigger?.removeEventListener("click",this.toggleSideNavigation)}get sideNavigation(){const t=this.root.getElementById(this.for);return t&&"post-side-navigation"===t.localName?t:null}setTrigger(){const t=this.host.querySelector("button");!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger&&this.trigger.removeEventListener("click",this.toggleSideNavigation),this.trigger=t,this.trigger.addEventListener("click",this.toggleSideNavigation),this.updateAriaAttributes())}updateAriaAttributes(){if(!this.trigger)return;const t=this.trigger.getAttribute("aria-controls");t?.includes(this.for)||this.trigger.setAttribute("aria-controls",t?`${t} ${this.for}`:this.for),this.trigger.setAttribute("aria-expanded","false")}handlePostToggle(t){this.trigger?.setAttribute("aria-expanded",""+t.detail)}async update(){this.updateAriaAttributes()}async toggleSideNavigation(){await(this.sideNavigation?.toggle())}render(){return s(e,{key:"2822a6c7246da96de537eff3e3fbf5a2db400547","data-version":n},s("slot",{key:"0bb02d90c7916a4dbfe6dd7fc0f4325509939a80"}))}get host(){return this}static get style(){return":host{display:inline-block}@media screen and (min-width: 1024px){:host{display:none}}"}},[257,"post-side-navigation-trigger",{for:[513],update:[64]}]);d([h(),c("string")],l.prototype,"for",void 0),d([a("post-side-navigation",{ignoreNestedComponents:!1})],l.prototype,"handlePostToggle",null);const g=l,p=function(){"undefined"!=typeof customElements&&["post-side-navigation-trigger"].forEach((t=>{"post-side-navigation-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),l))}))};export{g as PostSideNavigationTrigger,p as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as o,Host as i,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{b as a}from"./breakpoints.js";import{g as l}from"./get-focusable-children.js";import{d as c}from"./post-closebutton2.js";import{d as h}from"./post-icon2.js";import{R as d}from"./required.js";import{T as p}from"./type.js";import{O as m}from"./one-of.js";var u=function(t,s,e,o){var i,r=arguments.length,n=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(s,e,n):i(s,e))||n);return r>3&&n&&Object.defineProperty(s,e,n),n};const g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=e(this,"postToggle",7),this.device=a.get("device"),this.size="large",this.breakpointChange=t=>{this.device=t.detail,"desktop"===this.device&&(this.dialog?.open&&this.dialog.close(),this.postToggle.emit(!1))},this.handleKeyDown=t=>{if("Escape"!==t.key)return;const s=this.collapsible;s&&!s.collapsed&&(t.preventDefault(),t.stopPropagation(),s.toggle(!1),this.collapsibleTrigger?.querySelector("button")?.focus())},this.handleDialogClick=t=>{t.composedPath().some((t=>t instanceof HTMLAnchorElement))&&this.dialog.close()}}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange),this.host.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange),this.host.removeEventListener("keydown",this.handleKeyDown)}get dialog(){return this.host.shadowRoot?.querySelector("dialog")}get collapsibleTrigger(){return document.activeElement?.closest("post-collapsible-trigger")??null}get collapsible(){return this.collapsibleTrigger?.querySelector(":scope > post-collapsible")??null}async toggle(){if("desktop"!==this.device)return this.dialog?.open?this.hide():this.show()}async show(){"desktop"!==this.device&&(this.dialog.showModal(),this.postToggle.emit(!0),this.focusNav())}async hide(){"desktop"!==this.device&&this.dialog.close()}focusNav(){const t=this.host.shadowRoot?.querySelector("slot"),s=t?.assignedElements({flatten:!0})[0];if(!s)return;const[e]=l(s);e?.focus()}renderNav(){return o("slot",null)}renderDialog(){return o("dialog",{onClick:this.handleDialogClick,onClose:()=>{this.postToggle.emit(!1)}},o("slot",null),o("post-closebutton",{onClick:()=>this.hide()},this.textClose))}render(){return o(i,{key:"f7d9b4e515e5085d78e452298bdfbfb2325e7422","data-version":n},"desktop"===this.device?this.renderNav():this.renderDialog())}get host(){return this}static get style(){return":host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}"}},[257,"post-side-navigation",{textClose:[513,"text-close"],size:[1],device:[32],toggle:[64],show:[64],hide:[64]}]);u([d(),p("string")],g.prototype,"textClose",void 0),u([m(["large","small"])],g.prototype,"size",void 0);const f=g,b=function(){"undefined"!=typeof customElements&&["post-side-navigation","post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-side-navigation":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-closebutton":customElements.get(r(t))||c();break;case"post-icon":customElements.get(r(t))||h()}}))};export{f as PostSideNavigation,b as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as o,h as e,Host as i,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{b as a}from"./breakpoints.js";import{g as l}from"./get-focusable-children.js";import{i as c}from"./is-focus-visible.js";import{d}from"./post-closebutton2.js";import{d as h}from"./post-icon2.js";import{R as p}from"./required.js";import{T as u}from"./type.js";import{O as m}from"./one-of.js";var f=function(t,s,o,e){var i,r=arguments.length,n=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,o,e);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(s,o,n):i(s,o))||n);return r>3&&n&&Object.defineProperty(s,o,n),n};const g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=o(this,"postToggle",7),this.device=a.get("device"),this.size="large",this.breakpointChange=t=>{this.device=t.detail,"desktop"===this.device&&(this.dialog?.open&&this.dialog.close(),this.postToggle.emit(!1))},this.handleKeyDown=t=>{if("Escape"!==t.key)return;const s=this.collapsible;s&&!s.collapsed&&(t.preventDefault(),t.stopPropagation(),s.toggle(!1),this.collapsibleTrigger?.querySelector("button")?.focus())},this.handleDialogClick=t=>{t.composedPath().some((t=>t instanceof HTMLAnchorElement))&&this.dialog.close()}}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange),this.host.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange),this.host.removeEventListener("keydown",this.handleKeyDown)}get dialog(){return this.host.shadowRoot?.querySelector("dialog")}get collapsibleTrigger(){return document.activeElement?.closest("post-collapsible-trigger")??null}get collapsible(){return this.collapsibleTrigger?.querySelector(":scope > post-collapsible")??null}async toggle(){if("desktop"!==this.device)return this.dialog?.open?this.hide():this.show()}async show(){if("desktop"===this.device)return;const t=c(document.activeElement);this.dialog.showModal(),this.postToggle.emit(!0),t&&this.focusNav()}async hide(){"desktop"!==this.device&&this.dialog.close()}focusNav(){const t=this.host.shadowRoot?.querySelector("slot"),s=t?.assignedElements({flatten:!0})[0];if(!s)return;const[o]=l(s);o?.focus()}renderNav(){return e("slot",null)}renderDialog(){return e("dialog",{onClick:this.handleDialogClick,onClose:()=>{this.postToggle.emit(!1)}},e("slot",null),e("post-closebutton",{onClick:()=>this.hide()},this.textClose))}render(){return e(i,{key:"d323d8990ed9abfb5ca6c15daa70d49dabd496f9","data-version":n},"desktop"===this.device?this.renderNav():this.renderDialog())}get host(){return this}static get style(){return":host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog:focus,:host dialog:focus-visible{outline:none}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}"}},[257,"post-side-navigation",{textClose:[513,"text-close"],size:[1],device:[32],toggle:[64],show:[64],hide:[64]}]);f([p(),u("string")],g.prototype,"textClose",void 0),f([m(["large","small"])],g.prototype,"size",void 0);const b=g,v=function(){"undefined"!=typeof customElements&&["post-side-navigation","post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-side-navigation":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-closebutton":customElements.get(r(t))||d();break;case"post-icon":customElements.get(r(t))||h()}}))};export{b as PostSideNavigation,v as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{v as c}from"./package.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return i(o,{key:"f41ae27d8de89912b3aa34d9c89f5ec69f3df301","data-version":c,role:"listitem"},i("span",{key:"00a0dd2eb3fb020e49c5782245e1f3e72c77e780",class:"stepper-item-content"},i("span",{key:"bc9932083d295b92db24ddd22cb18a755db5ad11",class:"step-hidden-label visually-hidden"}),i("span",{key:"efe2d809c82c1d7de9e0cdf4e52b924943afa0bf",class:"label"},i("slot",{key:"47aceca3fc331ef91da60674dbc2af5ea7e76ec8"}))))}static get style(){return':host{grid-row:1;position:relative;padding-inline-start:0}:host::before,:host::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}:host(:not(:first-of-type)){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}:host(:not(:last-of-type)){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}:host(:not(:first-of-type,:last-of-type))::before{inset-inline-end:50%}:host(:not(:first-of-type,:last-of-type))::after{inset-inline-start:50%}:host(.stepper-item-current:not(:last-of-type))::after,:host(.stepper-item-current:first-of-type)::before,:host(.stepper-item-after-current)::before,:host(.stepper-item-after-current:last-of-type)::after{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::before,:host(.stepper-item-completed)::after{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;overflow-wrap:anywhere;hyphens:auto;line-break:strict;font-size:var(--post-device-font-size-7)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content{margin-inline:auto;text-align:center}:host(:last-of-type)>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}:host(.stepper-item-completed)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-selected)>.stepper-item-content{font-weight:var(--post-device-font-weight-bold)}:host(.stepper-item-selected)>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular)}:host(.stepper-item-current)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{content:var(--step-number, "?");display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-disabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::before{margin-inline:auto}:host(:last-of-type)>.stepper-item-content::before{margin-inline-start:auto}:host(.stepper-item-completed)>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-bg2);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2);z-index:1;mask-image:var(--post-icon-checkmark-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size7);height:var(--post-device-sizing-interactive-icon-size7);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3)}:root,:host{--post-icon-checkmark-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hlY2ttYXJrLXNvbGlkIj48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0ibTcuNDkgMTIuOTktMy42NC0zLjljLS40Ny0uNS0uNDQtMS4zLjA2LTEuNzdzMS4yOS0uNDQgMS43Ny4wNmwxLjQ4IDEuNTggMy4wNS00LjYyYy4zOC0uNTggMS4xNi0uNzQgMS43My0uMzUuNTguMzguNzQgMS4xNi4zNSAxLjczeiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InMyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJtMTEuMTggMTguODgtNS4xNC01LjUxYTEuNSAxLjUgMCAwIDEgLjA3LTIuMTJjLjYtLjU2IDEuNTUtLjUzIDIuMTIuMDdsMi41NCAyLjcyIDQuODQtNy4zM2MuNDYtLjY5IDEuMzktLjg4IDIuMDgtLjQzLjY5LjQ2Ljg4IDEuMzkuNDMgMi4wOGwtNi45NCAxMC41MVoiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTE0Ljg3IDI0LjgxIDguMjMgMTcuN2MtLjY2LS43MS0uNjItMS44MS4wOC0yLjQ3LjcxLS42NiAxLjgxLS42MiAyLjQ3LjA4bDMuNjEgMy44NiA2LjYyLTEwLjA0Yy41My0uODEgMS42Mi0xLjAzIDIuNDItLjUuODEuNTMgMS4wMyAxLjYyLjUgMi40MkwxNC44NiAyNC44WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJtMTguNTYgMzAuNi04LjE0LTguNz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zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZWNrbWFyay1zb2xpZCIvPjwvZz48L3N2Zz4=")}:host(:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size7)/2)}:host(:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(.stepper-item-completed)>.stepper-item-content::after{content:""}:host([aria-current=step])>.stepper-item-content::after{mask-image:var(--post-icon-edit-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:root,:host{--post-icon-edit-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz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([aria-current=step]:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:host([aria-current=step]:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size4)/2)}:host([aria-current=step]:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}@media screen and (max-width: 779.98px){:host{flex-grow:1;margin-inline:0;padding:0 !important}:host::before{content:unset}:host::after{inset-inline-start:0 !important}:host(:last-of-type){flex:0 0 32px}:host(:last-of-type)::after{content:unset}.stepper-item-content{margin-inline:0 !important}.label{display:none}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host::before,:host::after{background-color:CanvasText !important}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after,:host(.stepper-item-completed)::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}:host(.stepper-item-current) .stepper-item-content::before{background-color:Canvas;color:CanvasText}:host(.stepper-item-completed) .stepper-item-content::before,:host(.stepper-item-inactive) .stepper-item-content::before{border-color:Canvas;background-color:CanvasText}:host(.stepper-item-inactive) .stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-stepper-item"]),a=s,n=function(){"undefined"!=typeof customElements&&["post-stepper-item"].forEach((e=>{"post-stepper-item"===e&&(customElements.get(r(e))||customElements.define(r(e),s))}))};export{a as PostStepperItem,n as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{v as c}from"./package.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return i(o,{key:"53b052a2b68a93df9fda7f80f23d602d8a8efc56","data-version":c,role:"listitem"},i("span",{key:"e06841841e7fad42ff9de3e39dadf5fab96b9952",class:"stepper-item-content"},i("span",{key:"f934ef19fbdd65111b7cf561dcc9297122d62595",class:"step-hidden-label visually-hidden"}),i("span",{key:"213db918f5ab854225974678c50176bb565ac2b1",class:"label"},i("slot",{key:"d8e067ea304700e37edb996a4c715d41e209b8d8"}))))}static get style(){return':host{grid-row:1;position:relative;padding-inline-start:0}:host::before,:host::after{content:"";display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - 2px)/2);height:2px;background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);inset-inline:0}:host(:not(:first-of-type)){padding-inline-start:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2)}:host(:not(:last-of-type)){padding-inline-end:calc(var(--post-device-sizing-interactive-stepper-indicator) / 2);grid-column:span 2}:host(:not(:first-of-type,:last-of-type))::before{inset-inline-end:50%}:host(:not(:first-of-type,:last-of-type))::after{inset-inline-start:50%}:host(.stepper-item-current:not(:last-of-type))::after,:host(.stepper-item-current:first-of-type)::before,:host(.stepper-item-after-current)::before,:host(.stepper-item-after-current:last-of-type)::after{background-color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::before,:host(.stepper-item-completed)::after{background-color:var(--post-scheme-color-interactive-primary-selected-bg2);z-index:1}.stepper-item-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:relative;z-index:2;overflow:hidden;text-decoration:none;color:var(--post-scheme-color-interactive-primary-disabled-fg1);width:fit-content;overflow-wrap:anywhere;hyphens:auto;line-break:strict;font-size:var(--post-device-font-size-7)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content{margin-inline:auto;text-align:center}:host(:last-of-type)>.stepper-item-content{margin-inline-start:auto;margin-inline-end:-20px;text-align:end}:host(.stepper-item-completed)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-selected)>.stepper-item-content{font-weight:var(--post-device-font-weight-bold)}:host(.stepper-item-selected)>.stepper-item-content::before{font-weight:var(--post-device-font-weight-regular)}:host(.stepper-item-current)>.stepper-item-content{color:var(--post-scheme-color-interactive-primary-enabled-fg1)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3)}.stepper-item-content::before{content:var(--step-number, "?");display:flex;align-items:center;justify-content:center;z-index:1;height:var(--post-device-sizing-interactive-stepper-indicator);width:var(--post-device-sizing-interactive-stepper-indicator);box-sizing:border-box;margin-block-end:var(--post-device-spacing-gap-1);color:var(--post-scheme-color-interactive-primary-disabled-fg3);background-color:var(--post-scheme-color-interactive-primary-disabled-bg4);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-disabled-stroke3);border-radius:var(--post-device-border-radius-round);text-indent:initial}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::before{margin-inline:auto}:host(:last-of-type)>.stepper-item-content::before{margin-inline-start:auto}:host(.stepper-item-completed)>.stepper-item-content::before{color:rgba(0,0,0,0);background-color:var(--post-scheme-color-interactive-primary-selected-bg2);border-color:var(--post-scheme-color-interactive-primary-selected-stroke3)}:host(.stepper-item-current)>.stepper-item-content::before{color:var(--post-scheme-color-interactive-primary-enabled-fg3);background-color:var(--post-scheme-color-interactive-primary-enabled-bg2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3)}.stepper-item-content::after{display:block;position:absolute;inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2);z-index:1;mask-image:var(--post-icon-checkmark-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size7);height:var(--post-device-sizing-interactive-icon-size7);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3)}:root,:host{--post-icon-checkmark-solid:url("data:image/svg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2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZWNrbWFyay1zb2xpZCIvPjwvZz48L3N2Zz4=")}:host(:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size7)/2)}:host(:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size7))/2)}:host(.stepper-item-completed)>.stepper-item-content::after{content:""}:host([aria-current=step])>.stepper-item-content::after{mask-image:var(--post-icon-edit-solid);background-color:currentColor;width:var(--post-device-sizing-interactive-icon-size4);height:var(--post-device-sizing-interactive-icon-size4);background-color:var(--post-scheme-color-interactive-primary-enabled-fg3);inset-block-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:root,:host{--post-icon-edit-solid:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9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jk3Ljk3LTIuNTUgMC0zLjUzIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWVkaXQtc29saWQiLz48L2c+PC9zdmc+")}:host([aria-current=step]:first-of-type)>.stepper-item-content::after{inset-inline-start:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}:host([aria-current=step]:not(:first-of-type,:last-of-type))>.stepper-item-content::after{inset-inline-start:calc(50% - var(--post-device-sizing-interactive-icon-size4)/2)}:host([aria-current=step]:last-of-type)>.stepper-item-content::after{inset-inline-end:calc((var(--post-device-sizing-interactive-stepper-indicator) - var(--post-device-sizing-interactive-icon-size4))/2)}@media screen and (max-width: 779.98px){:host{flex-grow:1;margin-inline:0;padding:0 !important}:host::before{content:unset}:host::after{inset-inline-start:0 !important}:host(:last-of-type){flex:0 0 32px}:host(:last-of-type)::after{content:unset}.stepper-item-content{margin-inline:0 !important}.label{display:none}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host::before,:host::after{background-color:CanvasText !important}:host(.stepper-item-current:not(:first-of-type))::before,:host(.stepper-item-current:last-of-type)::after,:host(.stepper-item-completed)::after,:host(.stepper-item-completed)::before{background-color:Highlight !important}.stepper-item-content::before{forced-color-adjust:none}:host(.stepper-item-current) .stepper-item-content::before{background-color:Canvas;color:CanvasText}:host(.stepper-item-completed) .stepper-item-content::before,:host(.stepper-item-inactive) .stepper-item-content::before{border-color:Canvas;background-color:CanvasText}:host(.stepper-item-inactive) .stepper-item-content::before{color:Canvas}.stepper-item-content::after{color:Canvas}}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-stepper-item"]),a=s,n=function(){"undefined"!=typeof customElements&&["post-stepper-item"].forEach((e=>{"post-stepper-item"===e&&(customElements.get(r(e))||customElements.define(r(e),s))}))};export{a as PostStepperItem,n as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as d}from"./required.js";import{T as a}from"./type.js";import{P as c}from"./pattern.js";var p=function(e,t,i,s){var n,r=arguments.length,d=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(d=(r<3?n(d):r>3?n(t,i,d):n(t,i))||d);return r>3&&d&&Object.defineProperty(t,i,d),d};const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.currentIndex=-1}validateCurrentIndex(){this.stepItems&&(this.updateSteps(),this.checkIndexes())}validateSelectedIndex(){void 0===this.selectedIndex?this.selectedIndex=this.currentIndex:this.checkIndexes(),this.updateSteps()}updateActiveStepNumber(){this.textStepNumber&&(this.mobileActiveStepLabel=this.textStepNumber.replaceAll("{number}",""+(this.selectedIndex+1)),this.stepItems&&this.updateMobileActiveStepVisibility())}componentDidLoad(){setTimeout((()=>{this.validateCurrentIndex(),this.validateSelectedIndex()}))}checkIndexes(){this.selectedIndex>this.currentIndex&&console.error("The selected-index cannot be higher than the current-index, as only the current and completed steps can be selected.")}updateSteps(){this.stepItems=this.host.querySelectorAll("post-stepper-item"),!this.stepItems||this.stepItems.length<3?console.error("The post-stepper component should have at least three steps."):(this.updateActiveStepNumber(),this.stepItems.forEach(((e,t)=>{e.style.setProperty("--step-number",`"${t+1}"`),this.selectedIndex===t&&(this.mobileActiveStepName=e.innerHTML),e.classList.toggle("stepper-item-completed",this.currentIndex>t),e.classList.toggle("stepper-item-current",this.currentIndex===t),e.classList.toggle("stepper-item-selected",this.selectedIndex===t),e.classList.toggle("stepper-item-inactive",this.currentIndex<t),e.classList.toggle("stepper-item-after-current",t===this.currentIndex+1);const i=e.shadowRoot?.querySelector(".step-hidden-label");if(i){let e="";this.currentIndex>t&&(e=this.textCompletedStep+": "),this.selectedIndex===t&&(e=`${e}${this.textCurrentStep}: `),i.textContent=e}this.selectedIndex===t?(e.setAttribute("aria-current","step"),e.setAttribute("aria-live","polite")):(e.removeAttribute("aria-current"),e.removeAttribute("aria-live"))})),this.updateMobileActiveStepVisibility())}updateMobileActiveStepVisibility(){(this.selectedIndex>=this.stepItems.length||this.selectedIndex<0)&&(this.mobileActiveStepLabel="",this.mobileActiveStepName="")}render(){return i(s,{key:"e6d1f0498cb3de68badef6428cfe8fdff73b879b","data-version":r},i("ol",{key:"4c10c32d36eaeeb19712f7d99dcba7d5337d89a1"},i("slot",{key:"ced502f01025f44c09747299cf60c82ebcd905da",onSlotchange:()=>this.updateSteps()})),i("div",{key:"93cfc9fbd328d4a384c56ccf1f884053643f88e6",class:"active-step","aria-hidden":"true"},i("span",{key:"076fad4efc393852d024157011a0e86d90ecfe99",class:"active-step-label"},this.mobileActiveStepLabel),i("span",{key:"814817862389cd55859aec49205fae255cbbf1d7",innerHTML:this.mobileActiveStepName})))}get host(){return this}static get watchers(){return{currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}],textStepNumber:[{updateActiveStepNumber:0}]}}static get style(){return"ol{margin-block:0;padding-inline-start:0;list-style:none;counter-reset:step-index;display:grid;position:relative;overflow:hidden;grid-template-columns:20px;grid-auto-columns:minmax(0, 1fr);padding-inline-end:20px}@media screen and (max-width: 779.98px){ol{display:flex;padding-inline-end:0}}.active-step{font-size:var(--post-device-font-size-7);font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.active-step .active-step-label:has(+span:empty){visibility:hidden}@media screen and (min-width: 780px){.active-step{display:none}}"}},[257,"post-stepper",{textCurrentStep:[513,"text-current-step"],textCompletedStep:[513,"text-completed-step"],textStepNumber:[513,"text-step-number"],currentIndex:[2,"current-index"],selectedIndex:[2,"selected-index"],mobileActiveStepLabel:[32],mobileActiveStepName:[32]},void 0,{currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}],textStepNumber:[{updateActiveStepNumber:0}]}]);p([d(),a("string")],o.prototype,"textCurrentStep",void 0),p([d(),a("string")],o.prototype,"textCompletedStep",void 0),p([d(),c(/\{number\}/)],o.prototype,"textStepNumber",void 0),p([d(),a("number")],o.prototype,"currentIndex",void 0),p([a("number")],o.prototype,"selectedIndex",void 0);const l=o,h=function(){"undefined"!=typeof customElements&&["post-stepper"].forEach((e=>{"post-stepper"===e&&(customElements.get(n(e))||customElements.define(n(e),o))}))};export{l as PostStepper,h as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as d}from"./required.js";import{T as a}from"./type.js";import{P as c}from"./pattern.js";var p=function(e,t,i,s){var n,r=arguments.length,d=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(d=(r<3?n(d):r>3?n(t,i,d):n(t,i))||d);return r>3&&d&&Object.defineProperty(t,i,d),d};const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.currentIndex=-1}validateCurrentIndex(){this.stepItems&&(this.updateSteps(),this.checkIndexes())}validateSelectedIndex(){void 0===this.selectedIndex?this.selectedIndex=this.currentIndex:this.checkIndexes(),this.updateSteps()}updateActiveStepNumber(){this.textStepNumber&&(this.mobileActiveStepLabel=this.textStepNumber.replaceAll("{number}",""+(this.selectedIndex+1)),this.stepItems&&this.updateMobileActiveStepVisibility())}componentDidLoad(){setTimeout((()=>{this.validateCurrentIndex(),this.validateSelectedIndex()}))}checkIndexes(){this.selectedIndex>this.currentIndex&&console.error("The selected-index cannot be higher than the current-index, as only the current and completed steps can be selected.")}updateSteps(){this.stepItems=this.host.querySelectorAll("post-stepper-item"),!this.stepItems||this.stepItems.length<3?console.error("The post-stepper component should have at least three steps."):(this.updateActiveStepNumber(),this.stepItems.forEach(((e,t)=>{e.style.setProperty("--step-number",`"${t+1}"`),this.selectedIndex===t&&(this.mobileActiveStepName=e.innerHTML),e.classList.toggle("stepper-item-completed",this.currentIndex>t),e.classList.toggle("stepper-item-current",this.currentIndex===t),e.classList.toggle("stepper-item-selected",this.selectedIndex===t),e.classList.toggle("stepper-item-inactive",this.currentIndex<t),e.classList.toggle("stepper-item-after-current",t===this.currentIndex+1);const i=e.shadowRoot?.querySelector(".step-hidden-label");if(i){let e="";this.currentIndex>t&&(e=this.textCompletedStep+": "),this.selectedIndex===t&&(e=`${e}${this.textCurrentStep}: `),i.textContent=e}this.selectedIndex===t?(e.setAttribute("aria-current","step"),e.setAttribute("aria-live","polite")):(e.removeAttribute("aria-current"),e.removeAttribute("aria-live"))})),this.updateMobileActiveStepVisibility())}updateMobileActiveStepVisibility(){(this.selectedIndex>=this.stepItems.length||this.selectedIndex<0)&&(this.mobileActiveStepLabel="",this.mobileActiveStepName="")}render(){return i(s,{key:"52c9943bca4c1d7b1d964d812ce21d8b0eb2d236","data-version":r},i("ol",{key:"ea1f27a214d9cdf14b5f2d07f14a8d54836a32b3"},i("slot",{key:"6f07fe49d55152123dc39645ef17bf5557753005",onSlotchange:()=>this.updateSteps()})),i("div",{key:"ad3af45bc5d1493f9f1084cc28c77c39d27cbd35",class:"active-step","aria-hidden":"true"},i("span",{key:"6e3f5decadc8bcc67812dd67f6efe0afa0613b46",class:"active-step-label"},this.mobileActiveStepLabel),i("span",{key:"4aeb9376181d78007a929c5e8e4ba11c181039bb",innerHTML:this.mobileActiveStepName})))}get host(){return this}static get watchers(){return{currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}],textStepNumber:[{updateActiveStepNumber:0}]}}static get style(){return"ol{margin-block:0;padding-inline-start:0;list-style:none;counter-reset:step-index;display:grid;position:relative;overflow:hidden;grid-template-columns:20px;grid-auto-columns:minmax(0, 1fr);padding-inline-end:20px}@media screen and (max-width: 779.98px){ol{display:flex;padding-inline-end:0}}.active-step{font-size:var(--post-device-font-size-7);font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}.active-step .active-step-label:has(+span:empty){visibility:hidden}@media screen and (min-width: 780px){.active-step{display:none}}"}},[257,"post-stepper",{textCurrentStep:[513,"text-current-step"],textCompletedStep:[513,"text-completed-step"],textStepNumber:[513,"text-step-number"],currentIndex:[2,"current-index"],selectedIndex:[2,"selected-index"],mobileActiveStepLabel:[32],mobileActiveStepName:[32]},void 0,{currentIndex:[{validateCurrentIndex:0}],selectedIndex:[{validateSelectedIndex:0}],textStepNumber:[{updateActiveStepNumber:0}]}]);p([d(),a("string")],o.prototype,"textCurrentStep",void 0),p([d(),a("string")],o.prototype,"textCompletedStep",void 0),p([d(),c(/\{number\}/)],o.prototype,"textStepNumber",void 0),p([d(),a("number")],o.prototype,"currentIndex",void 0),p([a("number")],o.prototype,"selectedIndex",void 0);const l=o,h=function(){"undefined"!=typeof customElements&&["post-stepper"].forEach((e=>{"post-stepper"===e&&(customElements.get(n(e))||customElements.define(n(e),o))}))};export{l as PostStepper,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as s,Host as i,transformTag as a,Build as o}from"@stencil/core/internal/client";import"./breakpoints.js";import{n}from"./nanoid.js";import{v as r}from"./package.js";import{R as c}from"./required.js";import{T as l}from"./type.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.mutationObserver=new MutationObserver(this.checkPagesVariant.bind(this)),this.isPagesVariant=!1,this.disabled=!1}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.tabId="tab-"+(this.host.id||n(6)),this.checkPagesVariant()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkPagesVariant(){const t=null!==this.host.querySelector("a");this.isPagesVariant=t}render(){const t=o.isServer;return s(i,{key:"0c98772d01658e932be9982b6983eb3c1f0c4053",id:this.tabId,role:this.isPagesVariant?void 0:"tab","data-version":r,"data-pages-variant":""+this.isPagesVariant,"aria-selected":this.isPagesVariant?void 0:"false","aria-disabled":this.disabled?"true":void 0,tabindex:this.isPagesVariant?void 0:"-1",class:`${this.isPagesVariant?"nav-item":"tab-title"}${t&&!this.isPagesVariant?" ssr":""}`,style:t&&!this.isPagesVariant?{"--active":`var(--post-tab-item-${this.name}, 0)`}:void 0},s("slot",{key:"fba27566a1226e560161f839df050666763bdce5"}))}get host(){return this}},[257,"post-tab-item",{name:[513],disabled:[516],tabId:[32],isPagesVariant:[32]}]);!function(t,e,s,i){var a,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,s,n):a(e,s))||n);o>3&&n&&Object.defineProperty(e,s,n)}([c(),l("string")],d.prototype,"name",void 0);const h=d,m=function(){"undefined"!=typeof customElements&&["post-tab-item"].forEach((t=>{"post-tab-item"===t&&(customElements.get(a(t))||customElements.define(a(t),d))}))};export{h as PostTabItem,m as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as s,Host as i,transformTag as a,Build as o}from"@stencil/core/internal/client";import"./breakpoints.js";import{n}from"./nanoid.js";import{v as r}from"./package.js";import{R as c}from"./required.js";import{T as d}from"./type.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.mutationObserver=new MutationObserver(this.checkPagesVariant.bind(this)),this.isPagesVariant=!1,this.disabled=!1}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.tabId="tab-"+(this.host.id||n(6)),this.checkPagesVariant()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkPagesVariant(){const t=null!==this.host.querySelector("a");this.isPagesVariant=t}render(){const t=o.isServer;return s(i,{key:"974d9682ef0448cf3adf9481ba472a5c196349b3",id:this.tabId,role:this.isPagesVariant?void 0:"tab","data-version":r,"data-pages-variant":""+this.isPagesVariant,"aria-selected":this.isPagesVariant?void 0:"false","aria-disabled":this.disabled?"true":void 0,tabindex:this.isPagesVariant?void 0:"-1",class:`${this.isPagesVariant?"nav-item":"tab-title"}${t&&!this.isPagesVariant?" ssr":""}`,style:t&&!this.isPagesVariant?{"--active":`var(--post-tab-item-${this.name}, 0)`}:void 0},s("slot",{key:"6a7ed6323892a40ea22e487bc9460af69fda02c6"}))}get host(){return this}},[257,"post-tab-item",{name:[513],disabled:[516],tabId:[32],isPagesVariant:[32]}]);!function(t,e,s,i){var a,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,s,n):a(e,s))||n);o>3&&n&&Object.defineProperty(e,s,n)}([c(),d("string")],l.prototype,"name",void 0);const h=l,m=function(){"undefined"!=typeof customElements&&["post-tab-item"].forEach((t=>{"post-tab-item"===t&&(customElements.get(a(t))||customElements.define(a(t),l))}))};export{h as PostTabItem,m as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as n,Build as a}from"@stencil/core/internal/client";import"./breakpoints.js";import{n as r}from"./nanoid.js";import{v as i}from"./package.js";import{R as l}from"./required.js";import{T as p}from"./type.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}componentWillLoad(){this.panelId="panel-"+(this.host.id||r(6))}render(){return o(s,{key:"2b02063bf2e67f4e826155759f28a1ae47b0c8e0","data-version":i,id:this.panelId,role:"tabpanel",slot:"panels",style:a.isServer?{display:`var(--post-tab-panel-${this.for}, none)`}:void 0},o("slot",{key:"b4c39e035d0f49f5654b030f4aada27fbebb122c"}))}get host(){return this}static get style(){return":host{display:none}"}},[257,"post-tab-panel",{for:[513],panelId:[32]}]);!function(t,e,o,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,s);else for(var i=t.length-1;i>=0;i--)(n=t[i])&&(r=(a<3?n(r):a>3?n(e,o,r):n(e,o))||r);a>3&&r&&Object.defineProperty(e,o,r)}([l(),p("string")],c.prototype,"for",void 0);const f=c,m=function(){"undefined"!=typeof customElements&&["post-tab-panel"].forEach((t=>{"post-tab-panel"===t&&(customElements.get(n(t))||customElements.define(n(t),c))}))};export{f as PostTabPanel,m as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as n,Build as r}from"@stencil/core/internal/client";import"./breakpoints.js";import{n as a}from"./nanoid.js";import{v as i}from"./package.js";import{R as l}from"./required.js";import{T as p}from"./type.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}componentWillLoad(){this.panelId="panel-"+(this.host.id||a(6))}render(){return o(s,{key:"07d93ddaa69253a956ed50cd9ecd6ed039fbc6e2","data-version":i,id:this.panelId,role:"tabpanel",slot:"panels",style:r.isServer?{display:`var(--post-tab-panel-${this.for}, none)`}:void 0},o("slot",{key:"d6887db4e0e4dc22f8f8fdf098d6068ef4bd1a91"}))}get host(){return this}static get style(){return":host{display:none}"}},[257,"post-tab-panel",{for:[513],panelId:[32]}]);!function(t,e,o,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var i=t.length-1;i>=0;i--)(n=t[i])&&(a=(r<3?n(a):r>3?n(e,o,a):n(e,o))||a);r>3&&a&&Object.defineProperty(e,o,a)}([l(),p("string")],c.prototype,"for",void 0);const d=c,f=function(){"undefined"!=typeof customElements&&["post-tab-panel"].forEach((t=>{"post-tab-panel"===t&&(customElements.get(n(t))||customElements.define(n(t),c))}))};export{d as PostTabPanel,f as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as o,transformTag as a,Build as r}from"@stencil/core/internal/client";import{f as n}from"./fade.js";import"./breakpoints.js";import{c}from"./component-on-ready.js";import{v as h}from"./package.js";import{d as l}from"./post-icon2.js";import{O as b}from"./one-of.js";import{T as p}from"./type.js";var d=function(t,s,e,i){var o,a=arguments.length,r=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(s,e,r):o(s,e))||r);return a>3&&r&&Object.defineProperty(s,e,r),r};const v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange",7),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateScrollButtons),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await c(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=n(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=n(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0;this.tabsContainer.scrollBy({left:s*(this.tabsContainer.clientWidth-i-o),behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,a=Number.parseFloat(i.paddingInlineEnd)||0,r=t.offsetLeft,n=r+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-a;r<c?e.scrollTo({left:r-o,behavior:s}):n>h&&e.scrollTo({left:n-e.clientWidth+a,behavior:s})}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.activeTab??this.tabs[0]?.name,s=this.isPagesVariant?"nav":"div";return i(o,{key:"fb65fd2589517dd6d86e86435ec6b3a3b64b093d","data-version":h,style:r.isServer&&!this.isPagesVariant&&t?{["--post-tab-panel-"+t]:"block",["--post-tab-item-"+t]:"1"}:void 0},i("div",{key:"dbcdd791af381ccc23953acb38a8e71527a804ee",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"20ce30515d80b282aa93f20a1f3281a1ef0f6359",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:this.showLeftScrollButton?0:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"9a5402a28656d7a4459b9b848425bd15a45a0fce",name:"chevronleft"})),i(s,{key:"e821db02fd66aef6cf7a9fb5d925b0906571f3b6",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"e3650e43ac269173cb58f1624f02778bf094573c",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"4345a9bc121ce187022cddf019d5c86d875a70e9",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:this.showRightScrollButton?0:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"2df749c1a4e506d9940ce61e077d0f0f330b7342",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"184db29a5826af78d142ed1489be33c45831970b",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"4a984c7de97f2f89e7fd0f829f5bc62e2323f056",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{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;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-44) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .tabs-wrapper button.scroll-btn: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){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .tabs-wrapper button.scroll-btn: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){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .tabs-wrapper .tabs{overflow-x:hidden;background-color:rgba(0,0,0,0) !important;display:flex;flex-wrap:nowrap;align-items:end;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}:host(.page-tabs){overflow:visible !important}:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1*(var(--post-container-offset)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}:host(.page-tabs) .tabs-wrapper button.scroll-btn{color:var(--post-scheme-color-interactive-primary-enabled-fg5);background-color:var(--post-scheme-color-interactive-primary-enabled-bg5);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke);position:absolute;z-index:2;box-shadow:var(--post-device-elevation-200);border-radius:var(--post-device-border-radius-2)}:host(.page-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-primary-hover-fg4);background-color:var(--post-scheme-color-interactive-primary-hover-bg8)}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-left{inset-inline-start:0;border-inline-start:none;border-radius:0 var(--post-device-border-radius-2) var(--post-device-border-radius-2) 0}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-right{inset-inline-end:0;border-inline-end:none;border-radius:var(--post-device-border-radius-2) 0 0 var(--post-device-border-radius-2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn{background-color:Highlight;color:HighlightText}}:host(.page-tabs) .tabs-wrapper::after{content:"";position:absolute;inset-block-end:0;inset-inline-start:0;width:100%;height:var(--post-device-border-width-default);background-color:var(--post-palette-color-nested-tabs-page-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{background-color:LinkText}}:host(.page-tabs) .tabs-wrapper .tabs{padding-inline:calc(var(--post-container-offset));gap:var(--post-device-spacing-gap-inline-5);scrollbar-width:none}:host(.page-tabs) .tabs-wrapper .tabs::-webkit-scrollbar{display:none}:host(.page-tabs:not([size=small])) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.content-tabs) .tabs-wrapper button.scroll-btn{flex-shrink:0;color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{color:HighlightText}}:host(post-tabs:not([size=small])) button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1);border-radius:var(--post-device-border-radius-2)}:host(post-tabs:not([size=small])) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size5);width:var(--post-device-sizing-interactive-icon-size5)}:host(.page-tabs:not([size=small])) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-40)}:host(.page-tabs:not([size=small])) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-40) var(--post-device-spacing-padding-39)}:host([size=small]) button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1);border-radius:var(--post-device-border-radius-2)}:host([size=small]) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}:host(.page-tabs[size=small]) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-43)}:host(.page-tabs[size=small]) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-43) var(--post-device-spacing-padding-42)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);d([b(["small","large"])],v.prototype,"size",void 0),d([p("string")],v.prototype,"label",void 0);const u=v,g=function(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(a(t))||customElements.define(a(t),v);break;case"post-icon":customElements.get(a(t))||l()}}))};export{u as PostTabs,g as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as o,transformTag as a,Build as r}from"@stencil/core/internal/client";import{f as n}from"./fade.js";import"./breakpoints.js";import{c}from"./component-on-ready.js";import{v as h}from"./package.js";import{d as l}from"./post-icon2.js";import{O as b}from"./one-of.js";import{T as p}from"./type.js";var d=function(t,s,e,i){var o,a=arguments.length,r=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(s,e,r):o(s,e))||r);return a>3&&r&&Object.defineProperty(s,e,r),r};const v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange",7),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.handleContainerResize=()=>{this.updateScrollButtons();const t=this.host.clientWidth;t!==this.hostWidth&&(this.hostWidth=t,this.pendingScroll=void 0),this.pendingScroll?.()},this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.hostWidth=this.host.clientWidth,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await c(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=n(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=n(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0,a=this.tabsContainer.clientWidth-i-o;this.pendingScroll=s>0&&this.tabsContainer.scrollLeft+a>=this.tabsContainer.scrollWidth-this.tabsContainer.clientWidth?()=>this.scrollToEnd():void 0,this.tabsContainer.scrollBy({left:s*a,behavior:"smooth"})}scrollToEnd(){const t=this.tabsContainer,s=t.scrollWidth-t.clientWidth;t.scrollLeft>=s?this.pendingScroll=void 0:t.scrollTo({left:s,behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,a=Number.parseFloat(i.paddingInlineEnd)||0,r=t.offsetLeft,n=r+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-a;this.pendingScroll=void 0,r<c?e.scrollTo({left:r-o,behavior:s}):n>h&&(this.pendingScroll=()=>this.scrollTabIntoView(t,s),e.scrollTo({left:n-e.clientWidth+a,behavior:s}))}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.activeTab??this.tabs[0]?.name,s=this.isPagesVariant?"nav":"div";return i(o,{key:"10c247c7c021a4fbbd8f79ce7b82888e0b7c8be2","data-version":h,style:r.isServer&&!this.isPagesVariant&&t?{["--post-tab-panel-"+t]:"block",["--post-tab-item-"+t]:"1"}:void 0},i("div",{key:"5ccae325884c7cff0eec399da23513c0b864dde0",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"dd38a22327801b790f849449055b765d2c1bc3b6",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"461a92ab071472c995d0adad5c73c75c82d982fe",name:"chevronleft"})),i(s,{key:"edecdbfdc681b96539e5a0755330faf1795ecb35",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"6240234a2168b2e889cab92a7688731ca93a63a6",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"a4030c48cbbefb578b03ee9dad35724a1fdd5547",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"d89c831bdd2faf1991793df47e7ca79bf49e5339",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"aba319437ba8bfb9e7a144a44efcc32d82ef6b02",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"e689b5e3a030909c5c77899ac899ded2481f82a6",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{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;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-44) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .tabs-wrapper button.scroll-btn:focus-visible{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:focus-visible{transition:none}:host .tabs-wrapper button.scroll-btn:focus-visible:hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:focus-visible{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn.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){:host .tabs-wrapper button.scroll-btn.pretend-focus{transition:none}:host .tabs-wrapper button.scroll-btn.pretend-focus:hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn.pretend-focus{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn:has(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:has(:focus-visible){transition:none}:host .tabs-wrapper button.scroll-btn:has(:focus-visible):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:has(:focus-visible){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .tabs-wrapper button.scroll-btn: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){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .tabs-wrapper .tabs{overflow-x:hidden;background-color:rgba(0,0,0,0) !important;display:flex;flex-wrap:nowrap;align-items:end;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}:host(.page-tabs){overflow:visible !important}:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1*(var(--post-container-offset)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}:host(.page-tabs) .tabs-wrapper button.scroll-btn{color:var(--post-scheme-color-interactive-primary-enabled-fg5);background-color:var(--post-scheme-color-interactive-primary-enabled-bg5);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke);position:absolute;z-index:2;box-shadow:var(--post-device-elevation-200);border-radius:var(--post-device-border-radius-2)}:host(.page-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-primary-hover-fg4);background-color:var(--post-scheme-color-interactive-primary-hover-bg8)}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-left{inset-inline-start:0;border-inline-start:none;border-radius:0 var(--post-device-border-radius-2) var(--post-device-border-radius-2) 0}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-right{inset-inline-end:0;border-inline-end:none;border-radius:var(--post-device-border-radius-2) 0 0 var(--post-device-border-radius-2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn{background-color:Highlight;color:HighlightText}}:host(.page-tabs) .tabs-wrapper::after{content:"";position:absolute;inset-block-end:0;inset-inline-start:0;width:100%;height:var(--post-device-border-width-default);background-color:var(--post-palette-color-nested-tabs-page-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{background-color:LinkText}}:host(.page-tabs) .tabs-wrapper .tabs{padding-inline:calc(var(--post-container-offset));gap:var(--post-device-spacing-gap-inline-5);scrollbar-width:none}:host(.page-tabs) .tabs-wrapper .tabs::-webkit-scrollbar{display:none}:host(.page-tabs:not([size=small])) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.content-tabs) .tabs-wrapper button.scroll-btn{flex-shrink:0;color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{color:HighlightText}}:host(post-tabs:not([size=small])) button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1);border-radius:var(--post-device-border-radius-2)}:host(post-tabs:not([size=small])) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size5);width:var(--post-device-sizing-interactive-icon-size5)}:host(.page-tabs:not([size=small])) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-40)}:host(.page-tabs:not([size=small])) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-40) var(--post-device-spacing-padding-39)}:host([size=small]) button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1);border-radius:var(--post-device-border-radius-2)}:host([size=small]) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}:host(.page-tabs[size=small]) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-43)}:host(.page-tabs[size=small]) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-43) var(--post-device-spacing-padding-42)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);d([b(["small","large"])],v.prototype,"size",void 0),d([p("string")],v.prototype,"label",void 0);const u=v,g=function(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(a(t))||customElements.define(a(t),v);break;case"post-icon":customElements.get(a(t))||l()}}))};export{u as PostTabs,g as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as r}from"./package.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return o(s,{key:"81fa9d922480059096e4146c10cf2ef72357b482","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},o("slot",{key:"4e8d793e3867ba4c9c8e17d509652309a79f032a"}))}get host(){return this}static get style(){return":host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function a(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((t=>{"post-togglebutton"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}export{n as P,a as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{v as r}from"./package.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return o(s,{key:"6f61a07946f3e67bace0a883b73c424893c4043d","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},o("slot",{key:"fd9b93e45da499dbb790ad675f3db36e248c1960"}))}get host(){return this}static get style(){return":host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function a(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((t=>{"post-togglebutton"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}export{n as P,a as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,Build as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as h}from"./required.js";import{T as a}from"./type.js";const l=["pointerenter","pointerleave","focusin","focusout"];let c;const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){if(i.isServer)return null;const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){i.isBrowser&&import("./focusable.js").then((function(t){return t.f})).then((t=>{c??=t.default}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){c?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){l.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){l.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(o,{key:"55adc12f457aa8a5dd4357ed27876b0e526f7ae3","data-version":r},s("slot",{key:"84da1734ae1c1ac9376caa693108e3ed54bf176f",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]}]);!function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([h(),a("string")],p.prototype,"for",void 0);const u=p,d=function(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{u as PostTooltipTrigger,d as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,Build as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as h}from"./required.js";import{T as l}from"./type.js";const a=["pointerenter","pointerleave","focusin","focusout"];let c;const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){if(i.isServer)return null;const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){i.isBrowser&&import("./focusable.js").then((function(t){return t.f})).then((t=>{c??=t.default}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){c?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){a.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){a.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(o,{key:"7811d666f249ead72768adaf5bdc92e47b447d8a","data-version":r},s("slot",{key:"68e56c43ebec2abffbf049647ac08757dadf22f9",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]}]);!function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([h(),l("string")],p.prototype,"for",void 0);const u=p,d=function(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{u as PostTooltipTrigger,d as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as o,HTMLElement as e,h as t,Host as r,transformTag as s}from"@stencil/core/internal/client";import{d as a,a as i}from"./post-popovercontainer2.js";import"./breakpoints.js";import{v as n}from"./package.js";import{O as p}from"./one-of.js";const c=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(o){this.open||await this.popoverRef.show(o)}async hide(){this.popoverRef.hide()}async toggle(o,e){this.popoverRef.toggle(o,e)}handleBeforeToggle(o){this.open=o.detail.willOpen}render(){return t(r,{key:"62d5983e0ef32f851166d0c1d2c457cac0809fdf","data-version":n},t("post-popovercontainer",{key:"10150540956510724ab4832ecceb421a7013d983",safeSpace:"trapezoid",class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,autoHide:!0,onPostBeforeToggle:o=>this.handleBeforeToggle(o),ref:o=>this.popoverRef=o},t("slot",{key:"cdfaf0e916afa55ec3f1a7f64003101985560e27"})))}get host(){return this}static get style(){return':host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);word-wrap:break-word;white-space:normal}'}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]}]);!function(o,e,t,r){var s,a=arguments.length,i=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(o,e,t,r);else for(var n=o.length-1;n>=0;n--)(s=o[n])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);a>3&&i&&Object.defineProperty(e,t,i)}([p(i)],c.prototype,"placement",void 0);const d=c,l=function(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((o=>{switch(o){case"post-tooltip":customElements.get(s(o))||customElements.define(s(o),c);break;case"post-popovercontainer":customElements.get(s(o))||a()}}))};export{d as PostTooltip,l as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as o,h as t,Host as s,transformTag as r}from"@stencil/core/internal/client";import{d as a,a as i}from"./post-popovercontainer2.js";import"./breakpoints.js";import{v as n}from"./package.js";import{O as c}from"./one-of.js";const p=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(e){this.open||await this.popoverRef.show(e)}async hide(){this.popoverRef.hide()}async toggle(e,o){this.popoverRef.toggle(e,o)}handleBeforeToggle(e){this.host.toggleAttribute("open",e.detail.willOpen),this.open=e.detail.willOpen}render(){return t(s,{key:"083507ae592ce9be50f6b4217a8d13785039478d","data-version":n},t("post-popovercontainer",{key:"e0436489bd955cee95b287f35759c364b019be94",safeSpace:!0,class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,autoHide:!0,onPostBeforeToggle:e=>this.handleBeforeToggle(e),ref:e=>this.popoverRef=e},t("div",{key:"8e6417485a89f56c18e731351de0e9f5db2cdd9a",class:"tooltip-content"},t("slot",{key:"e4c9fed0c8a8454c20f504e38557abd8ea253a1b"}))))}get host(){return this}static get style(){return":host{display:none}:host([open]){display:contents}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1)}.tooltip-content{box-sizing:border-box;padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);word-wrap:break-word;white-space:normal;overflow:hidden}"}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]}]);!function(e,o,t,s){var r,a=arguments.length,i=a<3?o:null===s?s=Object.getOwnPropertyDescriptor(o,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,o,t,s);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(i=(a<3?r(i):a>3?r(o,t,i):r(o,t))||i);a>3&&i&&Object.defineProperty(o,t,i)}([c(i)],p.prototype,"placement",void 0);const d=p,l=function(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((e=>{switch(e){case"post-tooltip":customElements.get(r(e))||customElements.define(r(e),p);break;case"post-popovercontainer":customElements.get(r(e))||a()}}))};export{d as PostTooltip,l as defineCustomElement}