@swisspost/design-system-components 10.0.0-next.69 → 10.0.0-next.71

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 (342) hide show
  1. package/dist/cjs/breakpoints-B0Olgvgc.js +206 -0
  2. package/dist/cjs/component-on-ready-CifOTqw1.js +24 -0
  3. package/dist/cjs/{focusable-ZqET_zrB.js → focusable-COT2uiEV.js} +25 -4
  4. package/dist/cjs/{index-DPdHkdGf.js → index-CCteMCnR.js} +13 -13
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/nanoid-CmjyF1Cm.js +20 -0
  7. package/dist/cjs/{package-CzSn3NmD.js → package-CscM89A7.js} +1 -1
  8. package/dist/cjs/post-accordion_2.cjs.entry.js +7 -7
  9. package/dist/cjs/post-autocomplete.cjs.entry.js +3 -3
  10. package/dist/cjs/post-avatar.cjs.entry.js +6 -24
  11. package/dist/cjs/post-back-to-top.cjs.entry.js +3 -3
  12. package/dist/cjs/post-banner.cjs.entry.js +3 -3
  13. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +30 -33
  14. package/dist/cjs/post-breadcrumbs.cjs.entry.js +82 -80
  15. package/dist/cjs/post-closebutton_14.cjs.entry.js +36 -33
  16. package/dist/cjs/post-collapsible_2.cjs.entry.js +5 -5
  17. package/dist/cjs/post-components.cjs.js +2 -2
  18. package/dist/cjs/post-date-picker.cjs.entry.js +31 -23
  19. package/dist/cjs/post-footer.cjs.entry.js +6 -6
  20. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  21. package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
  22. package/dist/cjs/post-listbox.cjs.entry.js +4 -4
  23. package/dist/cjs/post-login-widget.cjs.entry.js +36 -3
  24. package/dist/cjs/post-number-input.cjs.entry.js +6 -6
  25. package/dist/cjs/post-pagination.cjs.entry.js +5 -5
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
  27. package/dist/cjs/post-popover.cjs.entry.js +4 -4
  28. package/dist/cjs/post-rating.cjs.entry.js +4 -4
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
  30. package/dist/cjs/post-stepper.cjs.entry.js +4 -4
  31. package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
  33. package/dist/cjs/post-tabs.cjs.entry.js +7 -27
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +16 -12
  35. package/dist/cjs/post-tooltip.cjs.entry.js +4 -4
  36. package/dist/collection/components/post-accordion-item/post-accordion-item.js +3 -4
  37. package/dist/collection/components/post-avatar/avatar-utils.js +2 -2
  38. package/dist/collection/components/post-avatar/post-avatar.js +3 -40
  39. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  40. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +79 -39
  41. package/dist/collection/components/post-breadcrumb-item/variants.js +1 -0
  42. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  43. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +84 -83
  44. package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
  45. package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
  46. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
  47. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  48. package/dist/collection/components/post-date-picker/post-date-picker.js +2 -2
  49. package/dist/collection/components/post-footer/post-footer.css +1 -1
  50. package/dist/collection/components/post-footer/post-footer.js +2 -1
  51. package/dist/collection/components/post-header/post-header.js +4 -4
  52. package/dist/collection/components/post-icon/post-icon.js +3 -2
  53. package/dist/collection/components/post-language-menu/post-language-menu.js +2 -3
  54. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  55. package/dist/collection/components/post-listbox/post-listbox.js +1 -1
  56. package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
  57. package/dist/collection/components/post-login-widget/post-login-widget.css +1 -0
  58. package/dist/collection/components/post-login-widget/post-login-widget.js +106 -4
  59. package/dist/collection/components/post-logo/post-logo.js +1 -1
  60. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  61. package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
  62. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
  63. package/dist/collection/components/post-menu/post-menu.js +5 -2
  64. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  65. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
  66. package/dist/collection/components/post-number-input/post-number-input.js +2 -2
  67. package/dist/collection/components/post-pagination/post-pagination.js +1 -2
  68. package/dist/collection/components/post-popover/post-popover.js +1 -1
  69. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
  70. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  71. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +5 -6
  72. package/dist/collection/components/post-rating/post-rating.js +1 -1
  73. package/dist/collection/components/post-stepper/post-stepper.js +1 -1
  74. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  75. package/dist/collection/components/post-tab-item/post-tab-item.js +2 -3
  76. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -3
  77. package/dist/collection/components/post-tabs/post-tabs.js +2 -2
  78. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  79. package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
  80. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +15 -9
  81. package/dist/collection/hydrate-stub/index.stub.js +5 -0
  82. package/dist/collection/test-setup.js +7 -0
  83. package/dist/collection/utils/index.js +2 -0
  84. package/dist/collection/utils/locales.js +9 -2
  85. package/dist/collection/utils/nanoid.js +16 -0
  86. package/dist/collection/utils/property-decorators/array-of.js +22 -0
  87. package/dist/collection/utils/property-decorators/create-validator-decorator.js +187 -0
  88. package/dist/collection/utils/property-decorators/date.js +21 -0
  89. package/dist/collection/utils/property-decorators/index.js +9 -0
  90. package/dist/collection/utils/property-decorators/iso-date.js +21 -0
  91. package/dist/collection/utils/property-decorators/one-of.js +22 -0
  92. package/dist/collection/utils/property-decorators/pattern.js +22 -0
  93. package/dist/collection/utils/property-decorators/required.js +24 -0
  94. package/dist/collection/utils/property-decorators/type.js +25 -0
  95. package/dist/collection/utils/property-decorators/url.js +29 -0
  96. package/dist/components/breakpoints.js +1 -0
  97. package/dist/components/component-on-ready.js +1 -0
  98. package/dist/components/focusable.js +1 -1
  99. package/dist/components/index2.js +1 -1
  100. package/dist/components/nanoid.js +1 -0
  101. package/dist/components/package.js +1 -1
  102. package/dist/components/post-accordion-item2.js +1 -1
  103. package/dist/components/post-accordion2.js +1 -1
  104. package/dist/components/post-autocomplete.js +1 -1
  105. package/dist/components/post-avatar.js +1 -1
  106. package/dist/components/post-avatar2.js +1 -0
  107. package/dist/components/post-back-to-top.js +1 -1
  108. package/dist/components/post-banner.js +1 -1
  109. package/dist/components/post-breadcrumb-item.js +1 -1
  110. package/dist/components/post-breadcrumbs.js +1 -1
  111. package/dist/components/post-closebutton2.js +1 -1
  112. package/dist/components/post-collapsible-trigger2.js +1 -1
  113. package/dist/components/post-collapsible2.js +1 -1
  114. package/dist/components/post-date-picker.js +1 -1
  115. package/dist/components/post-footer.js +1 -1
  116. package/dist/components/post-header.js +1 -1
  117. package/dist/components/post-icon2.js +1 -1
  118. package/dist/components/post-language-menu-item.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-login-widget.js +1 -1
  124. package/dist/components/post-logo.js +1 -1
  125. package/dist/components/post-mainnavigation.js +1 -1
  126. package/dist/components/post-megadropdown-trigger.js +1 -1
  127. package/dist/components/post-megadropdown.js +1 -1
  128. package/dist/components/post-menu-item2.js +1 -1
  129. package/dist/components/post-menu-trigger2.js +1 -1
  130. package/dist/components/post-menu2.js +1 -1
  131. package/dist/components/post-number-input.js +1 -1
  132. package/dist/components/post-pagination.js +1 -1
  133. package/dist/components/post-popover-trigger.js +1 -1
  134. package/dist/components/post-popover.js +1 -1
  135. package/dist/components/post-popovercontainer2.js +1 -1
  136. package/dist/components/post-rating.js +1 -1
  137. package/dist/components/post-stepper-item.js +1 -1
  138. package/dist/components/post-stepper.js +1 -1
  139. package/dist/components/post-tab-item.js +1 -1
  140. package/dist/components/post-tab-panel.js +1 -1
  141. package/dist/components/post-tabs.js +1 -1
  142. package/dist/components/post-togglebutton2.js +1 -1
  143. package/dist/components/post-tooltip-trigger.js +1 -1
  144. package/dist/components/post-tooltip.js +1 -1
  145. package/dist/components/react/index.js +1 -1
  146. package/dist/components/react/p-8LXe8Zt_.js +1 -0
  147. package/dist/components/react/p-BC0-M_SK.js +1 -0
  148. package/dist/components/react/p-BQ3HlJPr.js +1 -0
  149. package/dist/components/react/p-BrY4VWTQ.js +1 -0
  150. package/dist/components/react/p-C7s9oglQ.js +1 -0
  151. package/dist/components/react/{p-Bj33xnuq.js → p-CTgZ8DGr.js} +1 -1
  152. package/dist/components/react/{p-DwJ5SwpN.js → p-CVtlwDsT.js} +1 -1
  153. package/dist/components/react/p-CaLwTf3T.js +1 -0
  154. package/dist/components/react/p-ClJyTIVM.js +1 -0
  155. package/dist/components/react/{p-B2BDAeHI.js → p-DGr-hfLq.js} +1 -1
  156. package/dist/components/react/{p-BYfHrHCb.js → p-DJxdj9pa.js} +1 -1
  157. package/dist/components/react/p-DKDEtjQe.js +1 -0
  158. package/dist/components/react/p-DPKR_4uI.js +1 -0
  159. package/dist/components/react/p-DcEDGaFs.js +1 -0
  160. package/dist/components/react/{p-DRtzK3cr.js → p-DipfA69b.js} +1 -1
  161. package/dist/components/react/{p-BbOp03Tv.js → p-DwZxAC2u.js} +1 -1
  162. package/dist/components/react/p-lpWRZjJp.js +1 -0
  163. package/dist/components/react/p-x3kxyWSZ.js +1 -0
  164. package/dist/components/react/post-accordion-item.js +1 -1
  165. package/dist/components/react/post-accordion.js +1 -1
  166. package/dist/components/react/post-autocomplete.js +1 -1
  167. package/dist/components/react/post-avatar.js +1 -1
  168. package/dist/components/react/post-back-to-top.js +1 -1
  169. package/dist/components/react/post-banner.js +1 -1
  170. package/dist/components/react/post-breadcrumb-item.js +1 -1
  171. package/dist/components/react/post-breadcrumbs.js +1 -1
  172. package/dist/components/react/post-closebutton.js +1 -1
  173. package/dist/components/react/post-collapsible-trigger.js +1 -1
  174. package/dist/components/react/post-collapsible.js +1 -1
  175. package/dist/components/react/post-date-picker.js +1 -1
  176. package/dist/components/react/post-footer.js +1 -1
  177. package/dist/components/react/post-header.js +1 -1
  178. package/dist/components/react/post-icon.js +1 -1
  179. package/dist/components/react/post-language-menu-item.js +1 -1
  180. package/dist/components/react/post-language-menu.js +1 -1
  181. package/dist/components/react/post-linkarea.js +1 -1
  182. package/dist/components/react/post-listbox-option.js +1 -1
  183. package/dist/components/react/post-listbox.js +1 -1
  184. package/dist/components/react/post-login-widget.js +1 -1
  185. package/dist/components/react/post-logo.js +1 -1
  186. package/dist/components/react/post-mainnavigation.js +1 -1
  187. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  188. package/dist/components/react/post-megadropdown.js +1 -1
  189. package/dist/components/react/post-menu-item.js +1 -1
  190. package/dist/components/react/post-menu-trigger.js +1 -1
  191. package/dist/components/react/post-menu.js +1 -1
  192. package/dist/components/react/post-number-input.js +1 -1
  193. package/dist/components/react/post-pagination.js +1 -1
  194. package/dist/components/react/post-popover-trigger.js +1 -1
  195. package/dist/components/react/post-popover.js +1 -1
  196. package/dist/components/react/post-popovercontainer.js +1 -1
  197. package/dist/components/react/post-rating.js +1 -1
  198. package/dist/components/react/post-stepper-item.js +1 -1
  199. package/dist/components/react/post-stepper.js +1 -1
  200. package/dist/components/react/post-tab-item.js +1 -1
  201. package/dist/components/react/post-tab-panel.js +1 -1
  202. package/dist/components/react/post-tabs.js +1 -1
  203. package/dist/components/react/post-togglebutton.js +1 -1
  204. package/dist/components/react/post-tooltip-trigger.js +1 -1
  205. package/dist/components/react/post-tooltip.js +1 -1
  206. package/dist/docs.json +210 -69
  207. package/dist/esm/breakpoints-BQ3HlJPr.js +202 -0
  208. package/dist/esm/component-on-ready-lpWRZjJp.js +22 -0
  209. package/dist/esm/{focusable-BD_WT2MO.js → focusable-C7afHKmo.js} +25 -5
  210. package/dist/esm/{index-DmAi35UF.js → index-DmBWUef5.js} +13 -13
  211. package/dist/esm/loader.js +3 -3
  212. package/dist/esm/nanoid-8LXe8Zt_.js +18 -0
  213. package/dist/esm/package-x3kxyWSZ.js +3 -0
  214. package/dist/esm/post-accordion_2.entry.js +6 -6
  215. package/dist/esm/post-autocomplete.entry.js +3 -3
  216. package/dist/esm/post-avatar.entry.js +6 -24
  217. package/dist/esm/post-back-to-top.entry.js +3 -3
  218. package/dist/esm/post-banner.entry.js +3 -3
  219. package/dist/esm/post-breadcrumb-item.entry.js +31 -34
  220. package/dist/esm/post-breadcrumbs.entry.js +82 -80
  221. package/dist/esm/post-closebutton_14.entry.js +31 -28
  222. package/dist/esm/post-collapsible_2.entry.js +5 -5
  223. package/dist/esm/post-components.js +3 -3
  224. package/dist/esm/post-date-picker.entry.js +15 -7
  225. package/dist/esm/post-footer.entry.js +5 -5
  226. package/dist/esm/post-linkarea.entry.js +3 -3
  227. package/dist/esm/post-listbox-option.entry.js +4 -4
  228. package/dist/esm/post-listbox.entry.js +4 -4
  229. package/dist/esm/post-login-widget.entry.js +36 -3
  230. package/dist/esm/post-number-input.entry.js +5 -5
  231. package/dist/esm/post-pagination.entry.js +4 -4
  232. package/dist/esm/post-popover-trigger.entry.js +5 -5
  233. package/dist/esm/post-popover.entry.js +4 -4
  234. package/dist/esm/post-rating.entry.js +4 -4
  235. package/dist/esm/post-stepper-item.entry.js +3 -3
  236. package/dist/esm/post-stepper.entry.js +4 -4
  237. package/dist/esm/post-tab-item.entry.js +5 -5
  238. package/dist/esm/post-tab-panel.entry.js +5 -5
  239. package/dist/esm/post-tabs.entry.js +6 -26
  240. package/dist/esm/post-tooltip-trigger.entry.js +16 -12
  241. package/dist/esm/post-tooltip.entry.js +4 -4
  242. package/dist/post-components/p-08a0e8e9.entry.js +1 -0
  243. package/dist/post-components/{p-9fab1847.entry.js → p-1583817b.entry.js} +1 -1
  244. package/dist/post-components/{p-6644e626.entry.js → p-203d9abd.entry.js} +1 -1
  245. package/dist/post-components/{p-5ade4255.entry.js → p-2c68af27.entry.js} +1 -1
  246. package/dist/post-components/{p-f88a161a.entry.js → p-39143e19.entry.js} +1 -1
  247. package/dist/post-components/p-46dd9e7e.entry.js +1 -0
  248. package/dist/post-components/{p-c95fcb40.entry.js → p-4b445a35.entry.js} +1 -1
  249. package/dist/post-components/p-53a8cce5.entry.js +1 -0
  250. package/dist/post-components/p-72bff1fc.entry.js +1 -0
  251. package/dist/post-components/{p-8b68164f.entry.js → p-75045028.entry.js} +1 -1
  252. package/dist/post-components/p-768b4516.entry.js +1 -0
  253. package/dist/post-components/{p-95df4d4e.entry.js → p-7e072450.entry.js} +1 -1
  254. package/dist/post-components/{p-0992cba9.entry.js → p-83cb6424.entry.js} +1 -1
  255. package/dist/post-components/p-8LXe8Zt_.js +1 -0
  256. package/dist/post-components/{p-d57462a3.entry.js → p-94f4da57.entry.js} +1 -1
  257. package/dist/post-components/{p-0c249c71.entry.js → p-9dace750.entry.js} +1 -1
  258. package/dist/post-components/{p-220d0eab.entry.js → p-9ea7e46f.entry.js} +1 -1
  259. package/dist/post-components/p-BQ3HlJPr.js +1 -0
  260. package/dist/post-components/p-BrY4VWTQ.js +1 -0
  261. package/dist/post-components/p-DmBWUef5.js +2 -0
  262. package/dist/post-components/{p-52f85cba.entry.js → p-a0ac814c.entry.js} +1 -1
  263. package/dist/post-components/p-a0d12ca8.entry.js +1 -0
  264. package/dist/post-components/{p-5664d5b5.entry.js → p-bab0f27f.entry.js} +1 -1
  265. package/dist/post-components/p-cb039d66.entry.js +1 -0
  266. package/dist/post-components/p-e8cda4e1.entry.js +1 -0
  267. package/dist/post-components/{p-500a3fc7.entry.js → p-e8e50d5c.entry.js} +1 -1
  268. package/dist/post-components/p-eb64ec1d.entry.js +1 -0
  269. package/dist/post-components/p-f0746a9e.entry.js +1 -0
  270. package/dist/post-components/p-f5e33714.entry.js +1 -0
  271. package/dist/post-components/{p-cca0cf23.entry.js → p-f93ce33d.entry.js} +1 -1
  272. package/dist/post-components/{p-272de102.entry.js → p-fd0446b2.entry.js} +1 -1
  273. package/dist/post-components/p-lpWRZjJp.js +1 -0
  274. package/dist/post-components/p-x3kxyWSZ.js +1 -0
  275. package/dist/post-components/post-components.css +1 -1
  276. package/dist/post-components/post-components.esm.js +1 -1
  277. package/dist/types/components/post-avatar/avatar-utils.d.ts +1 -1
  278. package/dist/types/components/post-avatar/post-avatar.d.ts +0 -8
  279. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +14 -11
  280. package/dist/types/components/post-breadcrumb-item/variants.d.ts +2 -0
  281. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +23 -25
  282. package/dist/types/components/post-footer/post-footer.d.ts +1 -0
  283. package/dist/types/components/post-login-widget/post-login-widget.d.ts +21 -2
  284. package/dist/types/components/post-menu/post-menu.d.ts +1 -1
  285. package/dist/types/components/post-popover/post-popover.d.ts +1 -1
  286. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -1
  287. package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +1 -0
  288. package/dist/types/components.d.ts +68 -24
  289. package/dist/types/modules.d.ts +2 -0
  290. package/dist/types/utils/index.d.ts +2 -0
  291. package/dist/types/utils/nanoid.d.ts +8 -0
  292. package/dist/types/utils/property-decorators/array-of.d.ts +9 -0
  293. package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +43 -0
  294. package/dist/types/utils/property-decorators/date.d.ts +6 -0
  295. package/dist/types/utils/property-decorators/index.d.ts +9 -0
  296. package/dist/types/utils/property-decorators/iso-date.d.ts +6 -0
  297. package/dist/types/utils/property-decorators/one-of.d.ts +8 -0
  298. package/dist/types/utils/property-decorators/pattern.d.ts +8 -0
  299. package/dist/types/utils/property-decorators/required.d.ts +8 -0
  300. package/dist/types/utils/property-decorators/type.d.ts +9 -0
  301. package/dist/types/utils/property-decorators/url.d.ts +6 -0
  302. package/hydrate/index.js +419 -114735
  303. package/hydrate/index.mjs +419 -114735
  304. package/hydrate/index.stub.js +5 -0
  305. package/package.json +28 -18
  306. package/dist/cjs/index-YBj3gUJp.js +0 -114540
  307. package/dist/cjs/index.browser-BVb9l9T_.js +0 -16
  308. package/dist/components/index.browser.js +0 -1
  309. package/dist/components/index3.js +0 -6
  310. package/dist/components/post-breadcrumb-item2.js +0 -1
  311. package/dist/components/react/p-B4l5EAoq.js +0 -1
  312. package/dist/components/react/p-B4tq6hiA.js +0 -1
  313. package/dist/components/react/p-CJcRbvrI.js +0 -6
  314. package/dist/components/react/p-CfQqdIV2.js +0 -1
  315. package/dist/components/react/p-D1KBbwmi.js +0 -1
  316. package/dist/components/react/p-DAIxJysJ.js +0 -1
  317. package/dist/components/react/p-De_QjSNJ.js +0 -1
  318. package/dist/components/react/p-HNUXY1z7.js +0 -1
  319. package/dist/components/react/p-PuHMz_9_.js +0 -1
  320. package/dist/components/react/p-UY924tHr.js +0 -1
  321. package/dist/components/react/p-nA1BKco0.js +0 -1
  322. package/dist/esm/index-CJcRbvrI.js +0 -114535
  323. package/dist/esm/index.browser-nA1BKco0.js +0 -14
  324. package/dist/esm/package-B4l5EAoq.js +0 -3
  325. package/dist/post-components/p-1e28d279.entry.js +0 -1
  326. package/dist/post-components/p-30e5bc99.entry.js +0 -1
  327. package/dist/post-components/p-694e76be.entry.js +0 -1
  328. package/dist/post-components/p-906b669b.entry.js +0 -1
  329. package/dist/post-components/p-92e4a7f7.entry.js +0 -1
  330. package/dist/post-components/p-B4l5EAoq.js +0 -1
  331. package/dist/post-components/p-CJcRbvrI.js +0 -6
  332. package/dist/post-components/p-DmAi35UF.js +0 -2
  333. package/dist/post-components/p-PuHMz_9_.js +0 -1
  334. package/dist/post-components/p-c70cad6e.entry.js +0 -1
  335. package/dist/post-components/p-cd6684e1.entry.js +0 -1
  336. package/dist/post-components/p-d99bdef2.entry.js +0 -1
  337. package/dist/post-components/p-dfe811cc.entry.js +0 -1
  338. package/dist/post-components/p-f14ca918.entry.js +0 -1
  339. package/dist/post-components/p-fc2882a8.entry.js +0 -1
  340. package/dist/post-components/p-nA1BKco0.js +0 -1
  341. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/language-tags.d.ts +0 -1
  342. /package/dist/types/{language-tags.js → test-setup.d.ts} +0 -0
@@ -1,13 +1,29 @@
1
1
  import { Build, Host, h, } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
+ import { checkRequiredAndType } from "../../utils/index";
3
4
  const SESSION_URL = 'https://n.account.post.ch/v1/session/subscribe';
4
5
  /**
5
- * @slot authenticated - Content rendered when the user is authenticated (e.g. user menu).
6
- * @slot unauthenticated - Content rendered when the user is not authenticated (e.g. login link).
6
+ * @slot user-links - Links to show in the user menu when the user is authenticated.
7
+ * @slot login-link - Content rendered when the user is not authenticated.
7
8
  */
8
9
  export class PostLoginWidget {
9
10
  constructor() {
10
11
  this.authenticated = null;
12
+ this.user = null;
13
+ }
14
+ validateTextCurrentUser() {
15
+ checkRequiredAndType(this, 'textCurrentUser', 'string');
16
+ }
17
+ validateTextUserMenu() {
18
+ checkRequiredAndType(this, 'textUserMenu', 'string');
19
+ }
20
+ validateTextUserMenuTrigger() {
21
+ checkRequiredAndType(this, 'textUserMenuTrigger', 'string');
22
+ }
23
+ componentDidLoad() {
24
+ this.validateTextCurrentUser();
25
+ this.validateTextUserMenuTrigger();
26
+ this.validateTextUserMenu();
11
27
  }
12
28
  async componentWillLoad() {
13
29
  if (Build.isBrowser) {
@@ -39,6 +55,7 @@ export class PostLoginWidget {
39
55
  }
40
56
  const json = await response.json();
41
57
  const isAuthenticated = json?.data?.email !== undefined;
58
+ this.user = json?.data;
42
59
  this.setAuthState(isAuthenticated);
43
60
  }
44
61
  catch {
@@ -52,13 +69,85 @@ export class PostLoginWidget {
52
69
  this.postChange.emit({ authenticated: next });
53
70
  }
54
71
  render() {
55
- return (h(Host, { key: '16530e100336956fb7cebd5fc3d72e4bcc0b0a52', "data-version": version }, this.authenticated === true ? h("slot", { name: "authenticated" }) : h("slot", { name: "unauthenticated" })));
72
+ return (h(Host, { key: '1d26f4edfaa623ac4f9a9c71bef89413ef3109c0', "data-version": version }, this.authenticated === true ? (h("div", null, h("post-menu-trigger", { for: "user-menu-default" }, h("button", { class: "btn btn-link", type: "button" }, h("post-avatar", { firstname: this.user.name, lastname: this.user.surname, description: this.textCurrentUser.replace('{user}', `${this.user.name} ${this.user.surname}`) }), h("span", { class: "visually-hidden" }, this.textUserMenuTrigger))), h("post-menu", { label: this.textUserMenu, id: "user-menu-default" }, h("div", { slot: "header" }, h("post-avatar", { firstname: this.user.name, lastname: this.user.surname, email: this.user.email, "aria-hidden": "true" }), this.user.name, " ", this.user.surname), h("slot", { name: "user-links" })))) : (h("div", null, h("slot", { name: "login-link" })))));
56
73
  }
57
74
  static get is() { return "post-login-widget"; }
58
75
  static get encapsulation() { return "shadow"; }
76
+ static get originalStyleUrls() {
77
+ return {
78
+ "$": ["post-login-widget.scss"]
79
+ };
80
+ }
81
+ static get styleUrls() {
82
+ return {
83
+ "$": ["post-login-widget.css"]
84
+ };
85
+ }
86
+ static get properties() {
87
+ return {
88
+ "textCurrentUser": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": true,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": "Label for the \"Current user is {user}\" accessibility description.\nUse `{user}` as a placeholder \u2014 it will be replaced with the current user's name at runtime."
101
+ },
102
+ "getter": false,
103
+ "setter": false,
104
+ "reflect": true,
105
+ "attribute": "text-current-user"
106
+ },
107
+ "textUserMenu": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "string",
112
+ "resolved": "string",
113
+ "references": {}
114
+ },
115
+ "required": true,
116
+ "optional": false,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": "Accessible label for the dropdown menu"
120
+ },
121
+ "getter": false,
122
+ "setter": false,
123
+ "reflect": true,
124
+ "attribute": "text-user-menu"
125
+ },
126
+ "textUserMenuTrigger": {
127
+ "type": "string",
128
+ "mutable": false,
129
+ "complexType": {
130
+ "original": "string",
131
+ "resolved": "string",
132
+ "references": {}
133
+ },
134
+ "required": true,
135
+ "optional": false,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": "Hidden label for the user menu trigger button, for accessibility purposes. It should describe the purpose of the button (e.g. \"Access user links\")."
139
+ },
140
+ "getter": false,
141
+ "setter": false,
142
+ "reflect": true,
143
+ "attribute": "text-user-menu-trigger"
144
+ }
145
+ };
146
+ }
59
147
  static get states() {
60
148
  return {
61
- "authenticated": {}
149
+ "authenticated": {},
150
+ "user": {}
62
151
  };
63
152
  }
64
153
  static get events() {
@@ -117,4 +206,17 @@ export class PostLoginWidget {
117
206
  }
118
207
  };
119
208
  }
209
+ static get elementRef() { return "host"; }
210
+ static get watchers() {
211
+ return [{
212
+ "propName": "textCurrentUser",
213
+ "methodName": "validateTextCurrentUser"
214
+ }, {
215
+ "propName": "textUserMenu",
216
+ "methodName": "validateTextUserMenu"
217
+ }, {
218
+ "propName": "textUserMenuTrigger",
219
+ "methodName": "validateTextUserMenuTrigger"
220
+ }];
221
+ }
120
222
  }
@@ -20,7 +20,7 @@ export class PostLogo {
20
20
  render() {
21
21
  const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
22
22
  const LogoTag = logoLink ? 'a' : 'span';
23
- return (h(Host, { key: '4c2a5854fc2499198b289181136cbd0a2fd9c1e1', "data-version": version }, h(LogoTag, { key: '4696e7329e8821e010f8cf0de367551f9fec448c', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, h("span", { key: 'd4bec68539d393a5eced24f0b0ab521f40b13b4b', class: "description" }, h("slot", { key: '43b6f18561aec0b83cde540b4a6370fda2717cc2', onSlotchange: () => this.checkDescription() })), h("svg", { key: '9ee91a5dc0e1553bd54eb90bce0036f59f7ee62a', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '6accd8ec83c793b4b5ae0412b21ea97c4db1a05f', id: "Logo" }, h("rect", { key: '5eee4130c5c766f46769b3fe00bab45f2c4a0a51', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: '4f33978c01fe70f6b4b9ede345624378ec488b25', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { key: 'c680032facb04b9869778712dcb50b0bb166922c', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
23
+ return (h(Host, { key: 'f00832f2069ab28ce56369ed8a6649657b1d3668', "data-version": version }, h(LogoTag, { key: 'f8998a0e1e6af06860c6aa19dfec3c62178c370e', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, h("span", { key: '3a1a45de5963ec2d9e40b77178e781237e09dd05', class: "description" }, h("slot", { key: '0ee9bfa56bcea5bc77a6b5d76179a5292fd12337', onSlotchange: () => this.checkDescription() })), h("svg", { key: '971626b0c1c55e9c6e0eb2ee3160287b7fb38963', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '197bbe6025bb47e998dfeb03f0a05de9718e5d65', id: "Logo" }, h("rect", { key: '5c60147c473550ecdce1de55a7c51b710310c7a9', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: 'c09469285fb2ee599e92aabaa02a8529dfa3e086', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { key: '830aab1cfddf2be961c3866bda044ebce2b8cd3b', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
24
24
  }
25
25
  static get is() { return "post-logo"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -123,7 +123,7 @@ export class PostMainnavigation {
123
123
  }, NAVBAR_DISABLE_DURATION);
124
124
  }
125
125
  render() {
126
- return (h(Host, { key: '7bdd80e16b223324417ffbacdcadcb842c559d26', version: version, class: this.canScroll ? 'scrollable' : '' }, h("div", { key: '087cfbe84c8970ab26b394b6e96298cbc0df71ec', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, h("post-icon", { key: '6d4cbd054346c8ac28ad54ad00887d042e41f78d', "aria-hidden": "true", name: "chevronleft" })), h("nav", { key: 'db4cb2f45e19d458cede13f9b62dbcb5836f6127', ref: el => (this.navbar = el), "aria-label": this.textMain }, h("slot", { key: '00fbab4d3e498a0943c9298801dd9629e34a0eea' })), h("div", { key: '678872aef2d26f52f8b838e47ef7a631e71cb7a6', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, h("post-icon", { key: '233bebc886e69c27651ebaf2a678fa6d64f1f7cf', "aria-hidden": "true", name: "chevronright" }))));
126
+ return (h(Host, { key: '4bde4476fd50bef26253dd2d3853f2eb0b2f5ebb', version: version, class: this.canScroll ? 'scrollable' : '' }, h("div", { key: '07db530eb50feade70f4b1a4d39d7ea760d322be', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, h("post-icon", { key: '8a0c6f7713bc3731e937a16542b0d6aca1cad444', "aria-hidden": "true", name: "chevronleft" })), h("nav", { key: '2919c6be730d64d7ca901a2ffa066c6aa0b6da0b', ref: el => (this.navbar = el), "aria-label": this.textMain }, h("slot", { key: '87481c7880f72774fb2c9d3847db171bf6ea9b69' })), h("div", { key: '768c2476e98aa163a23c8717f44ffa4dfd397bcc', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, h("post-icon", { key: '286b02ce9e3e8f3920251f3420c4e07288b306cc', "aria-hidden": "true", name: "chevronright" }))));
127
127
  }
128
128
  static get is() { return "post-mainnavigation"; }
129
129
  static get encapsulation() { return "shadow"; }
@@ -293,7 +293,7 @@ export class PostMegadropdown {
293
293
  }
294
294
  render() {
295
295
  const containerStyle = this.isVisible ? {} : { display: 'none' };
296
- return (h(Host, { key: 'f3794c85cf7972c3a30145726e07675d88875ad8', version: version }, h("div", { key: '078a4489e17db573136caa9212a0bf1010c328ef', ref: el => (this.animatedContainer = el), class: "megadropdown", style: containerStyle }, h("div", { key: 'fb51ea5e7a38a546ac54d73e7a0804c9e2f3db79', class: "section" }, this.device !== 'desktop' && this.megadropdownTitle && (h("p", { key: 'cdc95d1af137074d8f117b7ab44ae58c20804d31', class: "megadropdown-title" }, this.megadropdownTitle)), h("div", { key: '4f205271deab921c732c10f59f951e0d1559cafb', class: "megadropdown-content" }, h("slot", { key: '218f174cfefef460dcd2f4a4be35107e0a5cd95e' })), this.device === 'desktop' ? (h("post-closebutton", { onClick: () => this.hide(true), class: "close-button", size: "small", placement: "manual" }, this.textClose)) : (h("button", { onClick: () => this.hide(true), class: "back-button" }, h("post-icon", { name: "arrowleft" }), this.textBack))))));
296
+ return (h(Host, { key: '78ca1dd237507aa79ab27e14b799be6b557527e4', version: version }, h("div", { key: '98b9d8ad4591f629555cecf3aaac9066bd80d3e3', ref: el => (this.animatedContainer = el), class: "megadropdown", style: containerStyle }, h("div", { key: 'fd93c498a754ba4c01df5551d27980b943efcd16', class: "section" }, this.device !== 'desktop' && this.megadropdownTitle && (h("p", { key: 'bd053626c0faae37625d8cc593d3920986fe6266', class: "megadropdown-title" }, this.megadropdownTitle)), h("div", { key: '0f93113c12833d7161000e56ea08b26b4ebf8552', class: "megadropdown-content" }, h("slot", { key: '09ddced0de6ea2922e97726dff1ee84d8135f755' })), this.device === 'desktop' ? (h("post-closebutton", { onClick: () => this.hide(true), class: "close-button", size: "small", placement: "manual" }, this.textClose)) : (h("button", { onClick: () => this.hide(true), class: "back-button" }, h("post-icon", { name: "arrowleft" }), this.textBack))))));
297
297
  }
298
298
  static get is() { return "post-megadropdown"; }
299
299
  static get encapsulation() { return "shadow"; }
@@ -77,7 +77,7 @@ export class PostMegadropdownTrigger {
77
77
  this.megadropdown.toggle();
78
78
  }
79
79
  render() {
80
- return (h(Host, { key: '3ff98d284d7ffcf3605e9fbfa44dda294ae02eb9', "data-version": version }, h("button", { key: 'e87d23a68473518e41199a253b3aa23dfc5fe6ca', ref: el => (this.interactiveButton = el), type: "button", "aria-haspopup": "menu", "aria-expanded": this.isMegadropdownExpanded.toString(), onClick: this.onClick.bind(this), onKeyDown: this.onKeyDown.bind(this), class: { active: this.active } }, h("span", { key: 'b0c478e81171df7534255dcfedcc2c1401d59d7e' }, h("span", { key: 'aa226c2f92b49aeefcf61ab8ce75b72a1a731850', innerHTML: this.slottedContent }), h("span", { key: '2e30aff042547cecc77c34d3f78a58fb0ca2e2bb', "aria-hidden": "true" }, h("slot", { key: 'b285e45d776f2cbf17e2f01f400a01d3bbb6f588' }))), h("post-icon", { key: 'f65a12ebf1e5261633a7cd83f3273f157bcdc6ef', name: "chevrondown" }))));
80
+ return (h(Host, { key: 'f974aa3ce0dc011784b1d64d8b3e8e165ef8608b', "data-version": version }, h("button", { key: 'c24a29b41b3eb6a67c32b7433cd138b492c29c7a', ref: el => (this.interactiveButton = el), type: "button", "aria-haspopup": "menu", "aria-expanded": this.isMegadropdownExpanded.toString(), onClick: this.onClick.bind(this), onKeyDown: this.onKeyDown.bind(this), class: { active: this.active } }, h("span", { key: 'eaa781138c99d5da1f176bfdefa89bed84468bfe' }, h("span", { key: '7164eedf63eda5fbbb69c557f186db1cf4d049f9', innerHTML: this.slottedContent }), h("span", { key: '05681cba35d42b159409230d7535662f87f495f3', "aria-hidden": "true" }, h("slot", { key: '6732bbedae6ed09806e145c417100a94b14357f0' }))), h("post-icon", { key: '32e38c328b482a2405f89afd9b6feb9346e02d2b', name: "chevrondown" }))));
81
81
  }
82
82
  static get is() { return "post-megadropdown-trigger"; }
83
83
  static get encapsulation() { return "shadow"; }
@@ -189,10 +189,13 @@ export class PostMenu {
189
189
  // If the element is a slot, get the assigned elements
190
190
  .flatMap(el => (el instanceof HTMLSlotElement ? el.assignedElements() : el))
191
191
  // For each menu item, get any focusable children (e.g., buttons, links)
192
- .flatMap(el => Array.from(getFocusableChildren(el))));
192
+ .flatMap(el => [
193
+ ...getFocusableChildren(el),
194
+ ...(el.shadowRoot ? getFocusableChildren(el.shadowRoot) : []),
195
+ ]));
193
196
  }
194
197
  render() {
195
- return (h(Host, { key: 'f4dbf7b48d82859af77b7a966def9e33c4821060', "data-version": version }, h("post-popovercontainer", { key: '36b33dc0993791f81b6ab14a11c3d304fd25556c', onPostShow: this.handlePostShown.bind(this), onPostBeforeToggle: this.handlePostBeforeToggle.bind(this), placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '866c88398e5436d13cbf6335c31298dd134c1356', part: "post-menu" }, h("slot", { key: '20c812c4449b6781e7ddb90904685d8643e6ae27', name: "header" }), h("slot", { key: '2fee5397128492a282b92d2d33747347cb982759' })))));
198
+ return (h(Host, { key: '6931365341e8a5476c27e5a35d84823162d3a904', "data-version": version }, h("post-popovercontainer", { key: '441654449ad9708c5eba02a383567771cab7a848', onPostShow: this.handlePostShown.bind(this), onPostBeforeToggle: this.handlePostBeforeToggle.bind(this), placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '6436553c2b7c35901a84b3a50798b561dfbb008c', part: "post-menu" }, h("slot", { key: 'af2a5159f3b8e039d00fc6cb1734740eede78121', name: "header" }), h("slot", { key: '01e671b55c02342936efe703dac97096f38b131c' })))));
196
199
  }
197
200
  static get is() { return "post-menu"; }
198
201
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- post-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}
1
+ post-menu-item button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{width:100%;position:relative;display:flex;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}
@@ -59,7 +59,7 @@ export class PostMenuTrigger {
59
59
  return null;
60
60
  }
61
61
  render() {
62
- return (h(Host, { key: '46dbe700998f60d9b6e85c09a2992aa702c1af52', "data-version": version }, h("slot", { key: '339ecc1a3ba354199d9f3c0ff84fd2f8b2f1b4a4' })));
62
+ return (h(Host, { key: '574ff0ab723270c5a2614e8a34951febc51221ed', "data-version": version }, h("slot", { key: 'cf223c3e85d9ad8b49ba209fa165a27605b9fd09' })));
63
63
  }
64
64
  static get is() { return "post-menu-trigger"; }
65
65
  static get encapsulation() { return "shadow"; }
@@ -88,10 +88,10 @@ export class PostNumberInput {
88
88
  }
89
89
  render() {
90
90
  const areButtonsShown = !!this.input;
91
- return (h(Host, { key: '84866a46bf2fdf8602213582e71fbc624fb3a7a6', "data-version": version, class: {
91
+ return (h(Host, { key: 'c8ef21f14edba7dcaf82dc66d7735f3ab3022e4f', "data-version": version, class: {
92
92
  'number-input-sm': this.small,
93
93
  'disabled': this.isDisabled,
94
- } }, areButtonsShown && (h("div", { key: '33ed7af27e07a32d4063474889e15c568a140776', "aria-hidden": "true", onPointerDown: () => this.step('down'), class: { 'step-button': true, 'disabled': this.isDecrementDisabled } }, h("post-icon", { key: 'bf88349e2e442d4db77329cdd33332b5249e745a', name: "minus" }))), h("div", { key: '9e7cd209f45ef55f1e91dc5b9842fb9e56513f4b', class: "input-container" }, h("slot", { key: 'c3da29d4836c913f9ba466835afbd9219a6dc980', onSlotchange: () => this.setupInput() })), areButtonsShown && (h("div", { key: '4fe40703c338a8ec8b1efa9922bcd7b96b72aa30', "aria-hidden": "true", onPointerDown: () => this.step('up'), class: { 'step-button': true, 'disabled': this.isIncrementDisabled } }, h("post-icon", { key: 'da54f7441c60c4732cc671022a33ebb8cfae4472', name: "plus" })))));
94
+ } }, areButtonsShown && (h("div", { key: '585049836ec48c09bcf49019375d798d58b1d56b', "aria-hidden": "true", onPointerDown: () => this.step('down'), class: { 'step-button': true, 'disabled': this.isDecrementDisabled } }, h("post-icon", { key: '1891fc6f71f9251e32b254d6a2da72560c86d3f2', name: "minus" }))), h("div", { key: '8cffde72970f70573f7d9afacd023bc87b9d9bae', class: "input-container" }, h("slot", { key: '69cdc0bef28f380690ce4d4887a3bec3a1dc30b9', onSlotchange: () => this.setupInput() })), areButtonsShown && (h("div", { key: '85cc8b04413b1a50ec493b45638f451fc2b5e0fd', "aria-hidden": "true", onPointerDown: () => this.step('up'), class: { 'step-button': true, 'disabled': this.isIncrementDisabled } }, h("post-icon", { key: '00b3a503d183042a406618aaad9a0e3f512e13e7', name: "plus" })))));
95
95
  }
96
96
  static get is() { return "post-number-input"; }
97
97
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,6 @@
1
1
  import { Host, h, } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
- import { nanoid } from "nanoid";
4
- import { checkEmptyOrType, checkRequiredAndType, debounce } from "../../utils/index";
3
+ import { checkEmptyOrType, checkRequiredAndType, debounce, nanoid } from "../../utils/index";
5
4
  const ELLIPSIS = '...';
6
5
  const MEASUREMENT_DEBOUNCE_MS = 50;
7
6
  const RESIZE_DEBOUNCE_MS = 150;
@@ -62,7 +62,7 @@ export class PostPopover {
62
62
  }
63
63
  }
64
64
  render() {
65
- return (h(Host, { key: '859812ad40c54e61ea90625d0170cc0336d5eba3', "data-version": version }, h("post-popovercontainer", { key: '47cdd1e48d4bf937d74c90fbb7f8d7ab73af1593', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'ec5e72c7d463de0a92220d9a4e7be7fd6f6669a7', class: "popover-container" }, h("div", { key: '4934817369aa06236011af0e34763bd890ac3b4b', class: "popover-content" }, h("slot", { key: 'b3f56b3c9e5642cc210b18bd5a5abc4b4daf36e0' })), h("post-closebutton", { key: '354e2d16c3e4ba475a0cd030539da4a915950b1c', onClick: () => this.hide() }, this.textClose)))));
65
+ return (h(Host, { key: 'ebbd011aecf3ec0537ae6f27565ae89c4de23520', "data-version": version }, h("post-popovercontainer", { key: 'ed7fe6aa0355ca55e53aa4ae460ea1a40b3f7d82', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '10743a794d6aa31f0847f994800108ebab7c0f34', class: "popover-container" }, h("div", { key: 'dba753e2d2d45989b98ec91a79fe7425f9c9acb6', class: "popover-content" }, h("slot", { key: '2cce9dbfc1bdeda0bb64807dcf5d1cf95255b299' })), h("post-closebutton", { key: 'dd3303403d326eb2fe43f6d3f44b7c5684c8747e', onClick: () => this.hide() }, this.textClose)))));
66
66
  }
67
67
  static get is() { return "post-popover"; }
68
68
  static get encapsulation() { return "shadow"; }
@@ -105,7 +105,7 @@ export class PostPopoverTrigger {
105
105
  this.popover?.removeEventListener('postToggle', this.boundHandlePostToggle);
106
106
  }
107
107
  render() {
108
- return (h(Host, { key: '52d004cbdcb7be0b7df6c10f70f5b3bdbeb89a27', "data-version": version }, h("slot", { key: '5eabc986947a00ed1fad3ce3f8103e615f709d9f', onSlotchange: () => this.setupTrigger() })));
108
+ return (h(Host, { key: 'b439e93193ac8e1e7cdceb5b0dcd59de6659400c', "data-version": version }, h("slot", { key: '3a4e192ec9656f2a4b4c69f8d9c8589d770f50b8', onSlotchange: () => this.setupTrigger() })));
109
109
  }
110
110
  static get is() { return "post-popover-trigger"; }
111
111
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- @layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}
1
+ @layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host .popover-scroll{max-height:var(--post-popovercontainer-available-height, none);overflow-y:auto}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}
@@ -269,10 +269,9 @@ export class PostPopovercontainer {
269
269
  // flip should come before shift. For non-aligned, shift before flip.
270
270
  ...(isAligned ? [flipMiddleware, shiftMiddleware] : [shiftMiddleware, flipMiddleware]),
271
271
  size({
272
- apply({ availableWidth, elements }) {
273
- Object.assign(elements.floating.style, {
274
- maxWidth: `${availableWidth - gap * 2}px`,
275
- });
272
+ apply({ availableWidth, availableHeight, elements }) {
273
+ elements.floating.style.maxWidth = `${availableWidth - gap * 2}px`;
274
+ elements.floating.style.setProperty('--post-popovercontainer-available-height', `${availableHeight - gap * 2}px`);
276
275
  },
277
276
  }),
278
277
  ];
@@ -346,9 +345,9 @@ export class PostPopovercontainer {
346
345
  }
347
346
  }
348
347
  render() {
349
- return (h(Host, { key: '796c61380fcfc0fffb4a135eef8686eb4f0a218f', "data-version": version, popover: "auto" }, h("div", { key: 'f7d4f69a528487406c5969165aea8970e76750c2', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: '89b8f6036d958aae6e835f449f04f2c6086ab548', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
348
+ return (h(Host, { key: 'f3d2037a35648aef9031ecb96db8f1755cb06fc9', "data-version": version, popover: "auto" }, h("div", { key: '19a5300eb1388eb51764eae39fc0911864336282', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: 'e7c67a359968faa9001c4be657db7d6930fe6075', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
350
349
  this.arrowRef = el;
351
- } })), h("span", { key: '3a9804b70a612faaf7d7709a48b16bf9f3cdbf0e', part: "post-popovercontainer-border-mask" }), h("slot", { key: 'b7e29480db2d1a8220080981f1b82d6f7994f150' }))));
350
+ } })), h("span", { key: 'b7477bc2e03c196c5983f6b933cedc20b2ed59f8', part: "post-popovercontainer-border-mask" }), h("div", { key: '7c1c50cbd766f6f901e9f3579c6e609da4cf3e37', class: "popover-scroll" }, h("slot", { key: '56c646c3bec1437e394ce0b76cea0f6bc4c6637f' })))));
352
351
  }
353
352
  static get is() { return "post-popovercontainer"; }
354
353
  static get encapsulation() { return "shadow"; }
@@ -87,7 +87,7 @@ export class PostRating {
87
87
  }
88
88
  }
89
89
  render() {
90
- return (h(Host, { key: 'a78438daf5ca5a5aba08717eebaeb207a2e0893b', "data-version": version }, h("div", { key: '3f153cf57e7003ae379a7f7f2b641a577bcbba2b', 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((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
90
+ return (h(Host, { key: 'bd452616dc47e25ae0f97eb77869e558eb0e199c', "data-version": version }, h("div", { key: 'a2d59f6007b337d906af31f7ebc4cc57022b0e67', 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((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
91
91
  'star': true,
92
92
  'before-hover': i < this.hoveredIndex,
93
93
  'active': i < Math.round(this.currentRating),
@@ -107,7 +107,7 @@ export class PostStepper {
107
107
  }
108
108
  }
109
109
  render() {
110
- return (h(Host, { key: 'f8f513d23199842eae3ceb797f4095c41ff5a93a', "data-version": version }, h("ol", { key: '66c92375a36df75b7fcc63ae07489f9ac7f1afeb' }, h("slot", { key: 'fd4de4f5ab0753515485a03f6c8c14561c7151e7', onSlotchange: () => this.updateSteps() })), h("div", { key: 'e155529119929bee34b15fc6085a69a99756766a', class: "active-step", "aria-hidden": "true" }, h("span", { key: '61ea3968a0210582dae79ee8be325b347876ca06', class: "active-step-label" }, this.mobileActiveStepLabel), h("span", { key: 'bd84fbdde9aa9c2796a9b99977f00272b77124b3', innerHTML: this.mobileActiveStepName }))));
110
+ return (h(Host, { key: 'eb916a1b9169dc3a461e6307bce1d548d3e49890', "data-version": version }, h("ol", { key: '4e9460bdae8f3ab56789a60e925a3229cb0140ec' }, h("slot", { key: '6da9d8e162d901fdb5cb5edeaf7e394948cca663', onSlotchange: () => this.updateSteps() })), h("div", { key: '546c1da3029799c97fcd5d6146933ee1dd7f7ade', class: "active-step", "aria-hidden": "true" }, h("span", { key: '581c306bd6d7b840c7f74d96199e0197b550e9e0', class: "active-step-label" }, this.mobileActiveStepLabel), h("span", { key: 'c794108854a153e4005b8a3bb4a609fb6441f966', innerHTML: this.mobileActiveStepName }))));
111
111
  }
112
112
  static get is() { return "post-stepper"; }
113
113
  static get encapsulation() { return "shadow"; }
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
3
  export class PostStepperItem {
4
4
  render() {
5
- return (h(Host, { key: '0919891d67f961e1ee2c8a7fb556d232ed34ed94', "data-version": version, role: "listitem" }, h("span", { key: '862705599a537267080fbf054e06353c65888bba', class: "stepper-item-content" }, h("span", { key: '96c62cc07fd460402d4e49a36fad70c80eb52f78', class: "step-hidden-label visually-hidden" }), h("span", { key: '6cce8bef3684d50f8dbb72f48b1ca3b0bbcd57ca', class: "label" }, h("slot", { key: '9ec06d2716870180309bbfde83a04953e7abb011' })))));
5
+ return (h(Host, { key: '7f3df658eb7640f582e438f218e3ec62fbb4edee', "data-version": version, role: "listitem" }, h("span", { key: 'bb7b02a3cca04d16626f66c52eb08085a8e9cb26', class: "stepper-item-content" }, h("span", { key: '78ca87ae8956838bc7fffec8e6d9121aa4aa14da', class: "step-hidden-label visually-hidden" }), h("span", { key: '6beecc79f02ed51046e6b7cc5006c305c821f9bc', class: "label" }, h("slot", { key: '5701a12b73a29bd629fa361bcd838c9a7ec88869' })))));
6
6
  }
7
7
  static get is() { return "post-stepper-item"; }
8
8
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
- import { checkRequiredAndType } from "../../utils/index";
4
- import { nanoid } from "nanoid";
3
+ import { checkRequiredAndType, nanoid } from "../../utils/index";
5
4
  /**
6
5
  * @slot default - Slot for the content of the tab item. Can contain text or an <a> element for navigation mode.
7
6
  */
@@ -33,7 +32,7 @@ export class PostTabItem {
33
32
  this.isNavigationMode = hasAnchor;
34
33
  }
35
34
  render() {
36
- return (h(Host, { key: '9b84cb5ecacec33119cff40c9012659997716991', id: this.tabId, role: !this.isNavigationMode ? 'tab' : undefined, "data-version": version, "data-navigation-mode": this.isNavigationMode.toString(), "aria-selected": !this.isNavigationMode ? 'false' : undefined, tabindex: !this.isNavigationMode ? '-1' : undefined, class: !this.isNavigationMode ? 'tab-title' : 'nav-item' }, h("slot", { key: 'e10db265b7bfd406f074f6144240eda593d4f6d2' })));
35
+ return (h(Host, { key: '9b37b37c161a3a67d30443c5115cc08b90322e34', id: this.tabId, role: !this.isNavigationMode ? 'tab' : undefined, "data-version": version, "data-navigation-mode": this.isNavigationMode.toString(), "aria-selected": !this.isNavigationMode ? 'false' : undefined, tabindex: !this.isNavigationMode ? '-1' : undefined, class: !this.isNavigationMode ? 'tab-title' : 'nav-item' }, h("slot", { key: '63472a86d5d0dfa8e6d1b39677244781205f0c70' })));
37
36
  }
38
37
  static get is() { return "post-tab-item"; }
39
38
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
- import { nanoid } from "nanoid";
4
- import { checkRequiredAndType } from "../../utils/index";
3
+ import { checkRequiredAndType, nanoid } from "../../utils/index";
5
4
  /**
6
5
  * @slot default - Slot for placing the content of the tab panel.
7
6
  */
@@ -15,7 +14,7 @@ export class PostTabPanel {
15
14
  this.panelId = `panel-${this.host.id || nanoid(6)}`;
16
15
  }
17
16
  render() {
18
- return (h(Host, { key: '54aa43b74f51d8e68423a5fd268ce02652f4d85a', "data-version": version, id: this.panelId, role: "tabpanel", slot: "panels" }, h("slot", { key: 'ac6c05d411546d8aa226a969b1b0e5bcce664b62' })));
17
+ return (h(Host, { key: 'f6e981cdce4b09ddc60c4fd2cf56af26db9ea7ee', "data-version": version, id: this.panelId, role: "tabpanel", slot: "panels" }, h("slot", { key: '79f2c065cb364b1c15717f349e57e832e06ef054' })));
19
18
  }
20
19
  static get is() { return "post-tab-panel"; }
21
20
  static get encapsulation() { return "shadow"; }
@@ -291,10 +291,10 @@ export class PostTabs {
291
291
  }
292
292
  render() {
293
293
  const TabsContainer = this.isNavigationMode ? 'nav' : 'div';
294
- return (h(Host, { key: '383093508d7c7ff8871ded0bcbe5fb88f8211ffa', "data-version": version }, h("div", { key: 'e54724f5c4427c1ee76bc29bcf24bc26e9589898', class: "tabs-wrapper", part: "post-tabs" }, h(TabsContainer, { key: 'f053c146995de984d42844e0f3e2159e77ef5ec4', class: "tabs", role: this.isNavigationMode ? undefined : 'tablist', "aria-label": this.isNavigationMode ? this.label : undefined }, h("slot", { key: '6f5165c9e3109a0e04b5e0717cc29770490de49b', onSlotchange: () => {
294
+ return (h(Host, { key: 'edb1e06b1b1cdd23db32e42ff77dbc64a44905f0', "data-version": version }, h("div", { key: 'd86eb9bb592aff23c38c92b12dfd72623d67f194', class: "tabs-wrapper", part: "post-tabs" }, h(TabsContainer, { key: '6646284be80e647c96065b3c791f34c4b64627f3', class: "tabs", role: this.isNavigationMode ? undefined : 'tablist', "aria-label": this.isNavigationMode ? this.label : undefined }, h("slot", { key: 'c71ddf4391144b7cb71671e8f564e723c408e723', onSlotchange: () => {
295
295
  this.moveMisplacedTabs();
296
296
  this.enableTabs();
297
- } }))), !this.isNavigationMode && (h("div", { key: '9f49ba439d84a56b5c71004e361eb856d2fb9476', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: '837899fd44e5e36c782fb1f3242e4765a1301f71', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
297
+ } }))), !this.isNavigationMode && (h("div", { key: '625d5b7d8ab2e8cfacce0c2ac6fa94d6f6fc2953', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: '1ddaf37e585d3e9fbb9722e09829956e28dc7fd6', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
298
298
  }
299
299
  static get is() { return "post-tabs"; }
300
300
  static get encapsulation() { return "shadow"; }
@@ -27,7 +27,7 @@ export class PostTogglebutton {
27
27
  this.host.addEventListener('keydown', (e) => this.handleKeydown(e), { capture: true });
28
28
  }
29
29
  render() {
30
- return (h(Host, { key: 'ffa7896c75f75f3af2e521191aba92b13ce9c9b2', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '3072532907626e56c55ec1d42322588e0604bfda' })));
30
+ return (h(Host, { key: '828f375bfd28dd8f46c2c233cef90abe6c27c488', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '35325c8481638cf30593cda05a67ee74b38bb40c' })));
31
31
  }
32
32
  static get is() { return "post-togglebutton"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -64,7 +64,7 @@ export class PostTooltip {
64
64
  }
65
65
  render() {
66
66
  const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
67
- return (h(Host, { key: '7bc70df782aa0edfe3e8b61b0f860ffd556c5c8a', "data-version": version }, h("post-popovercontainer", { key: 'd53b74cd387df90c194eaf698e6c1db49e805ca0', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'dede2265988174a1947a8d27d4be42bfc7be818a' }))));
67
+ return (h(Host, { key: 'd2927c8847a39198bc0f8ecc62071534a35959d4', "data-version": version }, h("post-popovercontainer", { key: '691d408109cc976d8a46ffeafa6af7ce343fc9da', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '85eb8a3ca3e0359044ddc4b24562f0a43d459dc9' }))));
68
68
  }
69
69
  static get is() { return "post-tooltip"; }
70
70
  static get encapsulation() { return "shadow"; }
@@ -1,13 +1,8 @@
1
1
  import { h, Host, Build } from "@stencil/core";
2
- import { checkEmptyOrType } from "../../utils/index";
2
+ import { checkEmptyOrType } from "../../utils/property-checkers/index";
3
3
  import { version } from "../../../../package";
4
- import isFocusable from "ally.js/is/focusable";
5
4
  const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout', 'long-press'];
6
- if (Build.isBrowser) {
7
- (async () => {
8
- await import('long-press-event');
9
- })();
10
- }
5
+ let isFocusable;
11
6
  /**
12
7
  * @slot default - Content to trigger the tooltip. Can contain any focusable element or will be made focusable automatically.
13
8
  */
@@ -37,6 +32,17 @@ export class PostTooltipTrigger {
37
32
  const ref = document.getElementById(this.for);
38
33
  return ref?.localName === 'post-tooltip' ? ref : null;
39
34
  }
35
+ componentWillLoad() {
36
+ if (Build.isBrowser) {
37
+ // Fire-and-forget: long-press-event registers a global event listener on import.
38
+ import('long-press-event');
39
+ // Load ally.js lazily; setupTrigger uses optional chaining to handle the
40
+ // case where it hasn't loaded yet (falls back to adding tabindex="0").
41
+ import('ally.js/is/focusable').then(m => {
42
+ isFocusable ?? (isFocusable = m.default);
43
+ });
44
+ }
45
+ }
40
46
  componentDidLoad() {
41
47
  this.setupTrigger();
42
48
  this.attachListeners();
@@ -76,7 +82,7 @@ export class PostTooltipTrigger {
76
82
  setupTrigger() {
77
83
  this.trigger = this.host.querySelector('*');
78
84
  if (this.trigger) {
79
- if (!isFocusable(this.trigger)) {
85
+ if (!isFocusable?.(this.trigger)) {
80
86
  this.trigger.setAttribute('tabindex', '0');
81
87
  }
82
88
  const describedBy = this.trigger.getAttribute('aria-describedby') || '';
@@ -169,7 +175,7 @@ export class PostTooltipTrigger {
169
175
  this.tooltip?.hide();
170
176
  }
171
177
  render() {
172
- return (h(Host, { key: '98dbfc68d831d6be2ab130ab6e944ad63568bf0a', "data-version": version }, h("slot", { key: '07d8aa731160e32dfdaccc078504112c0c4a8195', onSlotchange: () => this.handleSlotChange() })));
178
+ return (h(Host, { key: '33feebd0dace3160a539e4dc809b0b31e7d7d40b', "data-version": version }, h("slot", { key: '8994560a784d203ad40face20a60ac5bc631507f', onSlotchange: () => this.handleSlotChange() })));
173
179
  }
174
180
  static get is() { return "post-tooltip-trigger"; }
175
181
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,5 @@
1
+ /* eslint-disable unicorn/no-empty-file */
2
+ /**
3
+ * This is a stub file for stencils hydrate app (helps generating declarative shadow DOM (DSD) during server-side rendering).
4
+ * Whenever the hydrate app is imported in a non-nodejs environment, this stub file will be returned instead.
5
+ */
@@ -0,0 +1,7 @@
1
+ jest.mock('@stencil/core', () => {
2
+ const actual = jest.requireActual('@stencil/core');
3
+ return {
4
+ ...actual,
5
+ getElement: (ref) => ref.host ?? document.createElement('post-test'),
6
+ };
7
+ });
@@ -1,4 +1,5 @@
1
1
  export * from './property-checkers';
2
+ export * from './property-decorators';
2
3
  export * from './attribute-observer';
3
4
  export * from './breakpoints';
4
5
  export * from './component-on-ready';
@@ -14,3 +15,4 @@ export * from './sass-export';
14
15
  export * from './timeout';
15
16
  export * from './is-iso-date';
16
17
  export * from './locales';
18
+ export * from './nanoid';
@@ -1,4 +1,3 @@
1
- import { check } from "language-tags";
2
1
  export const FALLBACK_LANGUAGE_CODE = 'en';
3
2
  export const FALLBACK_LOCALE_CODE = 'en-GB';
4
3
  export const BUDDHIST_CALENDAR_YEAR_OFFSET = 543;
@@ -13,5 +12,13 @@ export function getLocaleTextDirection(locale) {
13
12
  return new Date().toLocaleDateString(locale).includes(UNICODE_BIDI.rtl) ? 'rtl' : 'ltr';
14
13
  }
15
14
  export function isValidLocale(locale) {
16
- return locale !== undefined && check(locale);
15
+ if (!locale)
16
+ return false;
17
+ try {
18
+ return Intl.DateTimeFormat.supportedLocalesOf(locale).length > 0;
19
+ }
20
+ catch (err) {
21
+ console.log(err);
22
+ return false;
23
+ }
17
24
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Initially copy'n'pasted from https://github.com/ai/nanoid/blob/main/non-secure/index.js, then adopted to our needs.
3
+ *
4
+ * Our custom implementation generates unique IDs for DOM elements efficiently without requiring cryptographic security (as nanoid).
5
+ * It eliminates the nanoid package dependency (as well as the transistive `node:crypto` dependency in node environments), meeting all our requirements.
6
+ * This approach optimizes performance and minimizes the codebase footprint.
7
+ */
8
+ const ALPHABET = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
9
+ export function nanoid(size = 21) {
10
+ const bytes = crypto.getRandomValues(new Uint8Array(size));
11
+ let id = '';
12
+ for (let i = 0; i < size; i++) {
13
+ id += ALPHABET[bytes[i] & 63];
14
+ }
15
+ return id;
16
+ }
@@ -0,0 +1,22 @@
1
+ import { createValidatorDecorator, getValidationContext } from "./create-validator-decorator";
2
+ /**
3
+ * Property decorator that validates the property value is an array of the specified type.
4
+ *
5
+ * Validation runs on `componentDidLoad` and whenever the property value changes.
6
+ *
7
+ * @param type - The expected type of each array element ('boolean', 'number', 'string').
8
+ */
9
+ export function ArrayOf(type) {
10
+ return createValidatorDecorator({
11
+ priority: 1,
12
+ blocking: false,
13
+ run(component, property) {
14
+ const { value, showError } = getValidationContext(component, property);
15
+ if (!Array.isArray(value) || value.some(val => typeof val !== type)) {
16
+ showError(`must be a "${type}" array`);
17
+ return false;
18
+ }
19
+ return true;
20
+ },
21
+ });
22
+ }