@swisspost/design-system-components 9.0.0-next.19 → 9.0.0-next.21

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 (295) hide show
  1. package/dist/cjs/check-non-empty-bd99d236.js +15 -0
  2. package/dist/cjs/check-one-of-75d270b5.js +13 -0
  3. package/dist/cjs/check-type-cdbf6d29.js +21 -0
  4. package/dist/cjs/check-url-220a286c.js +19 -0
  5. package/dist/cjs/{index-d4222dcb.js → index-23e36ff7.js} +12 -6
  6. package/dist/cjs/index.cjs.js +25 -25
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{package-1403e51d.js → package-c6bc9e82.js} +1 -1
  9. package/dist/cjs/{post-accordion-e84c9d23.js → post-accordion-d1345784.js} +4 -4
  10. package/dist/cjs/{post-accordion-item-d1ef00c3.js → post-accordion-item-a796d803.js} +6 -6
  11. package/dist/cjs/post-accordion-item.cjs.entry.js +6 -6
  12. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  13. package/dist/cjs/{post-avatar-7a8860df.js → post-avatar-b4e96354.js} +3 -3
  14. package/dist/cjs/post-avatar.cjs.entry.js +3 -3
  15. package/dist/cjs/{post-back-to-top-6c7057f9.js → post-back-to-top-fc541c6b.js} +12 -12
  16. package/dist/cjs/post-back-to-top.cjs.entry.js +4 -4
  17. package/dist/cjs/{post-banner-ecc46714.js → post-banner-46522b4f.js} +15 -15
  18. package/dist/cjs/post-banner.cjs.entry.js +7 -7
  19. package/dist/cjs/{post-breadcrumb-dbb85db9.js → post-breadcrumb-799d34da.js} +7 -7
  20. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +6 -6
  21. package/dist/cjs/post-breadcrumb.cjs.entry.js +3 -3
  22. package/dist/cjs/{post-card-control-76f6a5b3.js → post-card-control-7bf7d3f2.js} +9 -9
  23. package/dist/cjs/post-card-control.cjs.entry.js +4 -4
  24. package/dist/cjs/post-closebutton_15.cjs.entry.js +7 -7
  25. package/dist/cjs/{post-collapsible-trigger-8b242323.js → post-collapsible-trigger-0568e3ec.js} +8 -8
  26. package/dist/cjs/post-collapsible_2.cjs.entry.js +7 -7
  27. package/dist/cjs/post-components.cjs.js +1 -1
  28. package/dist/cjs/{post-footer-eeec84e0.js → post-footer-f87a556b.js} +19 -18
  29. package/dist/cjs/post-footer.cjs.entry.js +2 -2
  30. package/dist/cjs/{post-linkarea-61dbfe5d.js → post-linkarea-0ccf93fc.js} +1 -1
  31. package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
  32. package/dist/cjs/{post-menu-item-12639f7c.js → post-menu-item-eba24c40.js} +7 -8
  33. package/dist/cjs/{post-popover-9569b144.js → post-popover-35f679f6.js} +1 -1
  34. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  35. package/dist/cjs/{post-rating-5645cae4.js → post-rating-d12fa214.js} +1 -1
  36. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  37. package/dist/cjs/{post-tab-header-82e8ccd0.js → post-tab-header-89dca04b.js} +5 -5
  38. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  39. package/dist/cjs/{post-tab-panel-ef3df53e.js → post-tab-panel-ad1ab180.js} +1 -1
  40. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  41. package/dist/cjs/{post-tabs-8f1e74d9.js → post-tabs-0db75745.js} +1 -1
  42. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  43. package/dist/cjs/{post-tag-c353e30c.js → post-tag-396a46c9.js} +1 -1
  44. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  45. package/dist/cjs/{post-togglebutton-8949d278.js → post-togglebutton-69983699.js} +55 -57
  46. package/dist/cjs/{post-tooltip-cf18ac29.js → post-tooltip-7174ea97.js} +4 -4
  47. package/dist/cjs/post-tooltip.cjs.entry.js +6 -6
  48. package/dist/collection/components/post-accordion/post-accordion.js +2 -2
  49. package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -4
  50. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  51. package/dist/collection/components/post-back-to-top/post-back-to-top.js +10 -10
  52. package/dist/collection/components/post-banner/post-banner.js +11 -11
  53. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +5 -5
  54. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +10 -6
  55. package/dist/collection/components/post-card-control/post-card-control.js +6 -6
  56. package/dist/collection/components/post-collapsible/post-collapsible.js +2 -2
  57. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +2 -2
  58. package/dist/collection/components/post-header/post-header.css +1 -1
  59. package/dist/collection/components/post-icon/post-icon.js +15 -15
  60. package/dist/collection/components/post-language-option/post-language-option.css +1 -1
  61. package/dist/collection/components/post-language-option/post-language-option.js +9 -9
  62. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
  63. package/dist/collection/components/post-language-switch/post-language-switch.js +6 -6
  64. package/dist/collection/components/post-logo/post-logo.js +2 -2
  65. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  66. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  67. package/dist/collection/components/post-megadropdown/post-megadropdown.js +5 -7
  68. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +3 -3
  69. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
  70. package/dist/collection/components/post-tab-header/post-tab-header.js +3 -3
  71. package/dist/collection/components/post-togglebutton/post-togglebutton.js +3 -3
  72. package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
  73. package/dist/collection/utils/breakpoints.js +18 -17
  74. package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
  75. package/dist/collection/utils/property-checkers/check-one-of.js +6 -2
  76. package/dist/collection/utils/property-checkers/check-pattern.js +6 -2
  77. package/dist/collection/utils/property-checkers/check-type.js +8 -3
  78. package/dist/collection/utils/property-checkers/check-url.js +7 -3
  79. package/dist/collection/utils/property-checkers/empty-or.js +3 -1
  80. package/dist/components/check-non-empty.js +6 -2
  81. package/dist/components/check-one-of.js +6 -2
  82. package/dist/components/check-type.js +8 -3
  83. package/dist/components/index2.js +16 -6
  84. package/dist/components/package.js +1 -1
  85. package/dist/components/post-accordion-item2.js +4 -4
  86. package/dist/components/post-accordion2.js +2 -2
  87. package/dist/components/post-avatar2.js +1 -1
  88. package/dist/components/post-back-to-top2.js +9 -9
  89. package/dist/components/post-banner2.js +11 -11
  90. package/dist/components/post-breadcrumb-item2.js +7 -7
  91. package/dist/components/post-breadcrumb2.js +5 -5
  92. package/dist/components/post-card-control2.js +6 -6
  93. package/dist/components/post-collapsible-trigger2.js +2 -2
  94. package/dist/components/post-collapsible2.js +2 -2
  95. package/dist/components/post-footer2.js +18 -17
  96. package/dist/components/post-header2.js +1 -1
  97. package/dist/components/post-icon2.js +15 -15
  98. package/dist/components/post-language-option2.js +10 -10
  99. package/dist/components/post-language-switch2.js +7 -7
  100. package/dist/components/post-logo2.js +2 -2
  101. package/dist/components/post-mainnavigation2.js +1 -1
  102. package/dist/components/post-megadropdown-trigger2.js +3 -3
  103. package/dist/components/post-megadropdown2.js +6 -8
  104. package/dist/components/post-menu-trigger2.js +3 -3
  105. package/dist/components/post-tab-header2.js +3 -3
  106. package/dist/components/post-togglebutton2.js +3 -3
  107. package/dist/components/post-tooltip2.js +2 -2
  108. package/dist/docs.json +1 -1
  109. package/dist/esm/check-non-empty-258a56b3.js +13 -0
  110. package/dist/esm/check-one-of-0bee20f5.js +11 -0
  111. package/dist/esm/check-type-37d5d307.js +19 -0
  112. package/dist/esm/check-url-17962bc8.js +17 -0
  113. package/dist/esm/index-8f8fe5b0.js +32 -0
  114. package/dist/esm/index.js +25 -25
  115. package/dist/esm/loader.js +1 -1
  116. package/dist/esm/package-5614c98b.js +3 -0
  117. package/dist/esm/{post-accordion-db14e23a.js → post-accordion-f6d1834d.js} +4 -4
  118. package/dist/esm/{post-accordion-item-c1f42c05.js → post-accordion-item-7cb93300.js} +6 -6
  119. package/dist/esm/post-accordion-item.entry.js +6 -6
  120. package/dist/esm/post-accordion.entry.js +3 -3
  121. package/dist/esm/{post-avatar-ccda94eb.js → post-avatar-96108967.js} +3 -3
  122. package/dist/esm/post-avatar.entry.js +3 -3
  123. package/dist/esm/{post-back-to-top-f038d599.js → post-back-to-top-7f8a61c8.js} +12 -12
  124. package/dist/esm/post-back-to-top.entry.js +4 -4
  125. package/dist/esm/{post-banner-a24ccf11.js → post-banner-bb69bce8.js} +15 -15
  126. package/dist/esm/post-banner.entry.js +7 -7
  127. package/dist/esm/{post-breadcrumb-e3e4b50c.js → post-breadcrumb-9d9efa4e.js} +7 -7
  128. package/dist/esm/post-breadcrumb-item_2.entry.js +6 -6
  129. package/dist/esm/post-breadcrumb.entry.js +3 -3
  130. package/dist/esm/{post-card-control-0a4497d8.js → post-card-control-fdced7d5.js} +9 -9
  131. package/dist/esm/post-card-control.entry.js +4 -4
  132. package/dist/esm/post-closebutton_15.entry.js +7 -7
  133. package/dist/esm/{post-collapsible-trigger-6b0253d8.js → post-collapsible-trigger-17b2f067.js} +8 -8
  134. package/dist/esm/post-collapsible_2.entry.js +7 -7
  135. package/dist/esm/post-components.js +1 -1
  136. package/dist/esm/{post-footer-fa4a2a32.js → post-footer-2dcd8159.js} +19 -18
  137. package/dist/esm/post-footer.entry.js +2 -2
  138. package/dist/esm/{post-linkarea-1458faa8.js → post-linkarea-06c5144d.js} +1 -1
  139. package/dist/esm/post-linkarea.entry.js +2 -2
  140. package/dist/esm/{post-menu-item-b9af8b46.js → post-menu-item-e917bf99.js} +7 -8
  141. package/dist/esm/{post-popover-425eb5c9.js → post-popover-67a3cbf2.js} +1 -1
  142. package/dist/esm/post-popover.entry.js +2 -2
  143. package/dist/esm/{post-rating-4057a5b5.js → post-rating-9613bee8.js} +1 -1
  144. package/dist/esm/post-rating.entry.js +2 -2
  145. package/dist/esm/{post-tab-header-602eb0cb.js → post-tab-header-dff3a025.js} +5 -5
  146. package/dist/esm/post-tab-header.entry.js +3 -3
  147. package/dist/esm/{post-tab-panel-fccea5b6.js → post-tab-panel-2b3f82a8.js} +1 -1
  148. package/dist/esm/post-tab-panel.entry.js +2 -2
  149. package/dist/esm/{post-tabs-b9f41051.js → post-tabs-46d1165f.js} +1 -1
  150. package/dist/esm/post-tabs.entry.js +2 -2
  151. package/dist/esm/{post-tag-54b70906.js → post-tag-4176268e.js} +1 -1
  152. package/dist/esm/post-tag.entry.js +2 -2
  153. package/dist/esm/{post-togglebutton-f6746062.js → post-togglebutton-5892c5bd.js} +55 -57
  154. package/dist/esm/{post-tooltip-eccf3d93.js → post-tooltip-5a45a569.js} +4 -4
  155. package/dist/esm/post-tooltip.entry.js +6 -6
  156. package/dist/post-components/index.esm.js +1 -1
  157. package/dist/post-components/p-017dc6c7.js +1 -0
  158. package/dist/post-components/p-0227b899.js +1 -0
  159. package/dist/post-components/p-04895a54.js +1 -0
  160. package/dist/post-components/p-04c38bfe.entry.js +1 -0
  161. package/dist/post-components/{p-202156ad.js → p-07a0a626.js} +1 -1
  162. package/dist/post-components/p-12573893.js +1 -0
  163. package/dist/post-components/p-1289b0a7.entry.js +1 -0
  164. package/dist/post-components/p-12a11565.js +1 -0
  165. package/dist/post-components/p-1542a80e.entry.js +1 -0
  166. package/dist/post-components/p-181c73d5.js +1 -0
  167. package/dist/post-components/p-254a9bd2.entry.js +1 -0
  168. package/dist/post-components/p-28500934.entry.js +1 -0
  169. package/dist/post-components/{p-114bb8ba.js → p-2b1281af.js} +1 -1
  170. package/dist/post-components/p-2c69e7f2.entry.js +1 -0
  171. package/dist/post-components/p-30132b19.entry.js +1 -0
  172. package/dist/post-components/{p-d2d2681a.js → p-30af1d48.js} +1 -1
  173. package/dist/post-components/p-3bdeb686.entry.js +1 -0
  174. package/dist/post-components/{p-509fc6e6.js → p-47cb31dd.js} +1 -1
  175. package/dist/post-components/p-4f41f63e.js +1 -0
  176. package/dist/post-components/p-52790b8b.js +1 -0
  177. package/dist/post-components/{p-541c7be9.js → p-59ca0a13.js} +3 -3
  178. package/dist/post-components/p-5aaa5703.entry.js +1 -0
  179. package/dist/post-components/p-67a45f16.js +1 -0
  180. package/dist/post-components/p-6d8ac9bd.entry.js +1 -0
  181. package/dist/post-components/p-7709c14a.js +1 -0
  182. package/dist/post-components/p-77cc2a5e.entry.js +1 -0
  183. package/dist/post-components/p-79c552fb.js +1 -0
  184. package/dist/post-components/p-7dd05e6d.entry.js +1 -0
  185. package/dist/post-components/p-803b7598.js +1 -0
  186. package/dist/post-components/p-85fdc2d3.js +1 -0
  187. package/dist/post-components/p-98fcf90b.entry.js +1 -0
  188. package/dist/post-components/p-994fae4c.entry.js +1 -0
  189. package/dist/post-components/p-a805515a.entry.js +1 -0
  190. package/dist/post-components/p-b5b48f66.entry.js +1 -0
  191. package/dist/post-components/{p-5b1c57d5.js → p-b9bf5a5f.js} +1 -1
  192. package/dist/post-components/{p-b27b7d03.js → p-c6b3a926.js} +1 -1
  193. package/dist/post-components/p-c9dd3cdb.entry.js +1 -0
  194. package/dist/post-components/p-cb5e4a06.js +1 -0
  195. package/dist/post-components/p-d45df336.js +1 -0
  196. package/dist/post-components/{p-7bf39758.entry.js → p-dd4a5c0a.entry.js} +1 -1
  197. package/dist/post-components/p-e585c6fe.js +1 -0
  198. package/dist/post-components/p-e6d54838.entry.js +1 -0
  199. package/dist/post-components/p-f4b0cc7d.js +1 -0
  200. package/dist/post-components/p-fe8c300c.js +1 -0
  201. package/dist/post-components/post-components.esm.js +1 -1
  202. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
  203. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +1 -1
  204. package/dist/types/components/post-banner/post-banner.d.ts +4 -4
  205. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +4 -0
  206. package/dist/types/components/post-card-control/post-card-control.d.ts +2 -2
  207. package/dist/types/components/post-icon/post-icon.d.ts +6 -6
  208. package/dist/types/components/post-language-option/post-language-option.d.ts +4 -4
  209. package/dist/types/components/post-language-switch/post-language-switch.d.ts +3 -3
  210. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +1 -1
  211. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -1
  212. package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
  213. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +1 -1
  214. package/dist/types/utils/breakpoints.d.ts +1 -0
  215. package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
  216. package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
  217. package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
  218. package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
  219. package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
  220. package/dist/types/utils/property-checkers/index.d.ts +12 -4
  221. package/loaders/check-non-empty.js +6 -2
  222. package/loaders/check-one-of.js +6 -2
  223. package/loaders/check-type.js +8 -3
  224. package/loaders/index2.js +16 -6
  225. package/loaders/package.js +1 -1
  226. package/loaders/post-accordion-item2.js +4 -4
  227. package/loaders/post-accordion.js +2 -2
  228. package/loaders/post-avatar.js +1 -1
  229. package/loaders/post-back-to-top.js +9 -9
  230. package/loaders/post-banner.js +11 -11
  231. package/loaders/post-breadcrumb-item2.js +7 -7
  232. package/loaders/post-breadcrumb.js +5 -5
  233. package/loaders/post-card-control.js +6 -6
  234. package/loaders/post-collapsible-trigger2.js +2 -2
  235. package/loaders/post-collapsible2.js +2 -2
  236. package/loaders/post-footer.js +18 -17
  237. package/loaders/post-header.js +1 -1
  238. package/loaders/post-icon2.js +15 -15
  239. package/loaders/post-language-option.js +10 -10
  240. package/loaders/post-language-switch.js +7 -7
  241. package/loaders/post-logo.js +2 -2
  242. package/loaders/post-mainnavigation.js +1 -1
  243. package/loaders/post-megadropdown-trigger.js +3 -3
  244. package/loaders/post-megadropdown.js +6 -8
  245. package/loaders/post-menu-trigger2.js +3 -3
  246. package/loaders/post-tab-header.js +3 -3
  247. package/loaders/post-togglebutton.js +3 -3
  248. package/loaders/post-tooltip.js +2 -2
  249. package/package.json +3 -3
  250. package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
  251. package/dist/cjs/check-one-of-ef931478.js +0 -9
  252. package/dist/cjs/check-type-696d2c51.js +0 -16
  253. package/dist/cjs/check-url-4c524d85.js +0 -15
  254. package/dist/esm/check-non-empty-58bd6b17.js +0 -9
  255. package/dist/esm/check-one-of-0d5858c0.js +0 -7
  256. package/dist/esm/check-type-a6ccc9a3.js +0 -14
  257. package/dist/esm/check-url-f84034b1.js +0 -13
  258. package/dist/esm/index-1b263a63.js +0 -26
  259. package/dist/esm/package-21cb9eb8.js +0 -3
  260. package/dist/post-components/p-0337eb03.entry.js +0 -1
  261. package/dist/post-components/p-0470d5af.entry.js +0 -1
  262. package/dist/post-components/p-07b75b18.entry.js +0 -1
  263. package/dist/post-components/p-0d879e8b.js +0 -1
  264. package/dist/post-components/p-0f6fee8f.js +0 -1
  265. package/dist/post-components/p-18fa847f.js +0 -1
  266. package/dist/post-components/p-1c1a614d.js +0 -1
  267. package/dist/post-components/p-2f5425e2.entry.js +0 -1
  268. package/dist/post-components/p-39586235.js +0 -1
  269. package/dist/post-components/p-3b1c2b8a.entry.js +0 -1
  270. package/dist/post-components/p-46accc5f.js +0 -1
  271. package/dist/post-components/p-470c7464.js +0 -1
  272. package/dist/post-components/p-54c98790.js +0 -1
  273. package/dist/post-components/p-5afa25c7.entry.js +0 -1
  274. package/dist/post-components/p-5cf79fe3.entry.js +0 -1
  275. package/dist/post-components/p-5d9c1fc3.entry.js +0 -1
  276. package/dist/post-components/p-608ba689.entry.js +0 -1
  277. package/dist/post-components/p-64776810.entry.js +0 -1
  278. package/dist/post-components/p-6651164c.js +0 -1
  279. package/dist/post-components/p-7085e0e7.entry.js +0 -1
  280. package/dist/post-components/p-7dc1ccf0.entry.js +0 -1
  281. package/dist/post-components/p-81eac2e5.entry.js +0 -1
  282. package/dist/post-components/p-8562c7dc.js +0 -1
  283. package/dist/post-components/p-8a31b2fc.entry.js +0 -1
  284. package/dist/post-components/p-8e7e9942.entry.js +0 -1
  285. package/dist/post-components/p-a24bf798.js +0 -1
  286. package/dist/post-components/p-a621090d.js +0 -1
  287. package/dist/post-components/p-a926c755.js +0 -1
  288. package/dist/post-components/p-b095519d.js +0 -1
  289. package/dist/post-components/p-b8100b63.js +0 -1
  290. package/dist/post-components/p-bacd3e2c.js +0 -1
  291. package/dist/post-components/p-c48553bd.entry.js +0 -1
  292. package/dist/post-components/p-cb472e20.js +0 -1
  293. package/dist/post-components/p-cea81e00.entry.js +0 -1
  294. package/dist/post-components/p-d8b179fb.js +0 -1
  295. package/dist/post-components/p-f405f29e.entry.js +0 -1
@@ -21,8 +21,8 @@ export class PostMegadropdownTrigger {
21
21
  * Watch for changes to the `for` property to validate its type and ensure it is a string.
22
22
  * @param forValue - The new value of the `for` property.
23
23
  */
24
- validateControlFor(forValue = this.for) {
25
- checkType(forValue, 'string', 'The "for" property is required and should be a string.');
24
+ validateControlFor() {
25
+ checkType(this, 'for', 'string');
26
26
  }
27
27
  get megadropdown() {
28
28
  const ref = document.getElementById(this.for);
@@ -78,7 +78,7 @@ export class PostMegadropdownTrigger {
78
78
  }
79
79
  }
80
80
  render() {
81
- return (h(Host, { key: '108c3703a2abb21bda4e907e3dfbbaf7a572ff0a', "data-version": version, "tab-index": "-1" }, h("button", { key: 'd7ab70fef0db1dcaa908fdc75b8d751e94d04bb9' }, h("slot", { key: 'c2c4c633794da7777849bc1e6380e98a4bf0f1b5' }))));
81
+ return (h(Host, { key: '99849b6b851d061c1365eb5d507cba0e7e6e3ae6', "data-version": version, "tab-index": "-1" }, h("button", { key: 'ddd553c4b893538155263e5bd82c763be68eb3f3' }, h("slot", { key: 'eb006c5b13c69a8e089702f1b46f88bc3d74b045' }))));
82
82
  }
83
83
  static get is() { return "post-megadropdown-trigger"; }
84
84
  static get originalStyleUrls() {
@@ -17,8 +17,8 @@ export class PostMenuTrigger {
17
17
  * Watch for changes to the `for` property to validate its type and ensure it is a string.
18
18
  * @param forValue - The new value of the `for` property.
19
19
  */
20
- validateControlFor(forValue = this.for) {
21
- checkType(forValue, 'string', 'The "for" property is required and should be a string.');
20
+ validateControlFor() {
21
+ checkType(this, 'for', 'string');
22
22
  }
23
23
  get menu() {
24
24
  const ref = this.root.getElementById(this.for);
@@ -73,7 +73,7 @@ export class PostMenuTrigger {
73
73
  }
74
74
  }
75
75
  render() {
76
- return (h(Host, { key: '39bea077fd4d85f442b7b1d56969a203c470a269', "data-version": version, "tab-index": "-1" }, h("slot", { key: '9f7777a4167cdfbf9f1ab2dfe7c3d6e759c8a83b' })));
76
+ return (h(Host, { key: '84316d4a69c4231be636e5ff8971752d5af9bab2', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'd3091adcf7033c4dd25e49fa383ccb9773b2d226' })));
77
77
  }
78
78
  static get is() { return "post-menu-trigger"; }
79
79
  static get originalStyleUrls() {
@@ -11,14 +11,14 @@ export class PostTabHeader {
11
11
  this.panel = undefined;
12
12
  }
13
13
  host;
14
- validateFor(newValue) {
15
- checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
14
+ validateFor() {
15
+ checkNonEmpty(this, 'panel');
16
16
  }
17
17
  componentWillLoad() {
18
18
  this.tabId = `tab-${this.host.id || nanoid(6)}`;
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: '79e7eed336d8867b9741efb96f80c1a3b1910a3f', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '10f7977c4f26a41730d364c8e60b7a15b87bb45c' })));
21
+ return (h(Host, { key: '336824660de90bf5c570e9739947927a32612fbd', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '8bfe0b57fa96044692e2db3fd983ccde427558e7' })));
22
22
  }
23
23
  static get is() { return "post-tab-header"; }
24
24
  static get encapsulation() { return "shadow"; }
@@ -9,8 +9,8 @@ export class PostTogglebutton {
9
9
  this.toggled = false;
10
10
  }
11
11
  host;
12
- validateToggled(value = this.toggled) {
13
- checkType(value, 'boolean', 'The "toggled" property of the post-togglebutton must be a boolean.');
12
+ validateToggled() {
13
+ checkType(this, 'toggled', 'boolean');
14
14
  }
15
15
  componentWillLoad() {
16
16
  this.validateToggled();
@@ -29,7 +29,7 @@ export class PostTogglebutton {
29
29
  }
30
30
  };
31
31
  render() {
32
- return (h(Host, { key: 'b8488abcad38f815ff6ccaef358bebee904512cd', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '6bc5745dca9c408c241ca1993a5d75ff94d3b444' })));
32
+ return (h(Host, { key: '3a1429a9b67b8cfafae184fe0d060ee3a04974e0', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '9ab1537574423740fc335fde732c699698acac25' })));
33
33
  }
34
34
  static get is() { return "post-togglebutton"; }
35
35
  static get encapsulation() { return "shadow"; }
@@ -102,7 +102,7 @@ export class PostTooltip {
102
102
  wasOpenedByFocus = false;
103
103
  host;
104
104
  validateDelayed() {
105
- checkEmptyOrType(this.delayed, 'boolean', 'The post-tooltip "delayed" property should be a boolean.');
105
+ checkEmptyOrType(this, 'delayed', 'boolean');
106
106
  }
107
107
  connectedCallback() {
108
108
  this.validateDelayed();
@@ -216,7 +216,7 @@ export class PostTooltip {
216
216
  }
217
217
  render() {
218
218
  const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
219
- return (h(Host, { key: '170a2b1fe50a5080930fa2603a74ee310fd006dd', "data-version": version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'bd6658b278d53eff9bd93326bcadb467cbb318f4', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'b534b427a0511bc5971574b59e74d847a4b562a2' }))));
219
+ return (h(Host, { key: '89b0e64fd5fde4c21d9c1eb624facff38b287e4a', "data-version": version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '8006874c12a2eebe39682a09db677e8b315dd6bb', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'cf3bd12703885fe886f1703038437b59a4d79fd3' }))));
220
220
  }
221
221
  static get is() { return "post-tooltip"; }
222
222
  static get encapsulation() { return "shadow"; }
@@ -6,36 +6,37 @@ export class Breakpoint {
6
6
  };
7
7
  constructor() {
8
8
  if (!this.breakpointMap) {
9
- const styles = getComputedStyle(document.documentElement);
10
- const keys = styles.getPropertyValue('--post-breakpoint-keys').split(', ');
11
- const names = styles.getPropertyValue('--post-breakpoint-names').split(', ');
12
- this.breakpointMap = styles
13
- .getPropertyValue('--post-breakpoint-widths')
14
- .split(', ')
15
- .map((width, i) => {
16
- return {
17
- minWidth: Number(width),
18
- key: keys[i],
19
- name: names[i],
20
- };
21
- })
9
+ const keys = this.getStyles('--post-breakpoint-keys');
10
+ const names = this.getStyles('--post-breakpoint-names');
11
+ const widths = this.getStyles('--post-breakpoint-widths');
12
+ this.breakpointMap = widths
13
+ .map((width, i) => ({
14
+ minWidth: Number(width),
15
+ key: keys[i],
16
+ name: names[i],
17
+ }))
22
18
  .reverse();
23
19
  window.addEventListener('resize', () => this.updateHandler(), { passive: true });
24
20
  }
25
21
  }
22
+ getStyles(propertyName) {
23
+ const styles = getComputedStyle(document.documentElement);
24
+ return (styles
25
+ .getPropertyValue(propertyName)
26
+ ?.split(',')
27
+ .map(w => w.trim()) ?? []);
28
+ }
26
29
  updateHandler(emitEvents = true) {
27
30
  const calculated = this.breakpointMap.find(({ minWidth }) => innerWidth >= minWidth);
28
31
  if (this.current.key !== calculated.key) {
29
32
  this.current.key = calculated.key;
30
- if (emitEvents) {
33
+ if (emitEvents)
31
34
  this.dispatchEvent('key');
32
- }
33
35
  }
34
36
  if (this.current.name !== calculated.name) {
35
37
  this.current.name = calculated.name;
36
- if (emitEvents) {
38
+ if (emitEvents)
37
39
  this.dispatchEvent('name');
38
- }
39
40
  }
40
41
  }
41
42
  dispatchEvent(type) {
@@ -1,6 +1,10 @@
1
1
  import { EMPTY_VALUES } from "./constants";
2
- export function checkNonEmpty(value, error) {
2
+ export function checkNonEmpty(component, prop, customMessage) {
3
+ const componentName = component.host.localName;
4
+ const value = component[prop];
5
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is required.`;
6
+ const message = customMessage || defaultMessage;
3
7
  if (EMPTY_VALUES.some(v => v === value)) {
4
- throw new Error(error);
8
+ throw new Error(message);
5
9
  }
6
10
  }
@@ -1,5 +1,9 @@
1
- export function checkOneOf(value, possibleValues, error) {
1
+ export function checkOneOf(component, prop, possibleValues, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
4
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
5
+ const message = customMessage || defaultMessage;
2
6
  if (!possibleValues.includes(value)) {
3
- throw new Error(error);
7
+ throw new Error(message);
4
8
  }
5
9
  }
@@ -1,5 +1,9 @@
1
- export function checkPattern(value, pattern, errorMessage) {
1
+ export function checkPattern(component, prop, pattern, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
4
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be follow the format \`${pattern}\`.`;
5
+ const message = customMessage || defaultMessage;
2
6
  if (typeof value !== 'string' || !pattern.test(value)) {
3
- throw new Error(errorMessage);
7
+ throw new Error(message);
4
8
  }
5
9
  }
@@ -1,12 +1,17 @@
1
- export function checkType(value, type, error) {
1
+ export function checkType(component, prop, type, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
2
4
  const typeIsArray = type === 'array';
3
5
  const valueIsArray = Array.isArray(value);
6
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`
7
+ ${type}\`.`;
8
+ const message = customMessage || defaultMessage;
4
9
  if (typeIsArray || valueIsArray) {
5
10
  if (valueIsArray !== typeIsArray) {
6
- throw new Error(error);
11
+ throw new Error(message);
7
12
  }
8
13
  }
9
14
  else if (typeof value !== type) {
10
- throw new Error(error);
15
+ throw new Error(message);
11
16
  }
12
17
  }
@@ -1,11 +1,15 @@
1
- export function checkUrl(value, error) {
1
+ export function checkUrl(component, prop, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
4
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
5
+ const message = customMessage || defaultMessage;
2
6
  if (typeof value !== 'string' && !(value instanceof URL)) {
3
- throw new Error(error);
7
+ throw new Error(message);
4
8
  }
5
9
  try {
6
10
  new URL(value, 'https://www.post.ch');
7
11
  }
8
12
  catch {
9
- throw new Error(error);
13
+ throw new Error(message);
10
14
  }
11
15
  }
@@ -1,7 +1,9 @@
1
1
  import { EMPTY_VALUES } from "./constants";
2
2
  export function emptyOr(check) {
3
3
  return (...args) => {
4
- const value = args[0];
4
+ const component = args[0];
5
+ const prop = args[1];
6
+ const value = component[prop];
5
7
  if (!EMPTY_VALUES.some(v => v === value)) {
6
8
  check(...args);
7
9
  }
@@ -1,8 +1,12 @@
1
1
  import { E as EMPTY_VALUES } from './constants.js';
2
2
 
3
- function checkNonEmpty(value, error) {
3
+ function checkNonEmpty(component, prop, customMessage) {
4
+ const componentName = component.host.localName;
5
+ const value = component[prop];
6
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is required.`;
7
+ const message = customMessage || defaultMessage;
4
8
  if (EMPTY_VALUES.some(v => v === value)) {
5
- throw new Error(error);
9
+ throw new Error(message);
6
10
  }
7
11
  }
8
12
 
@@ -1,6 +1,10 @@
1
- function checkOneOf(value, possibleValues, error) {
1
+ function checkOneOf(component, prop, possibleValues, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
4
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
5
+ const message = customMessage || defaultMessage;
2
6
  if (!possibleValues.includes(value)) {
3
- throw new Error(error);
7
+ throw new Error(message);
4
8
  }
5
9
  }
6
10
 
@@ -1,13 +1,18 @@
1
- function checkType(value, type, error) {
1
+ function checkType(component, prop, type, customMessage) {
2
+ const componentName = component.host.localName;
3
+ const value = component[prop];
2
4
  const typeIsArray = type === 'array';
3
5
  const valueIsArray = Array.isArray(value);
6
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`
7
+ ${type}\`.`;
8
+ const message = customMessage || defaultMessage;
4
9
  if (typeIsArray || valueIsArray) {
5
10
  if (valueIsArray !== typeIsArray) {
6
- throw new Error(error);
11
+ throw new Error(message);
7
12
  }
8
13
  }
9
14
  else if (typeof value !== type) {
10
- throw new Error(error);
15
+ throw new Error(message);
11
16
  }
12
17
  }
13
18
 
@@ -4,28 +4,38 @@ import { c as checkType } from './check-type.js';
4
4
 
5
5
  function emptyOr(check) {
6
6
  return (...args) => {
7
- const value = args[0];
7
+ const component = args[0];
8
+ const prop = args[1];
9
+ const value = component[prop];
8
10
  if (!EMPTY_VALUES.some(v => v === value)) {
9
11
  check(...args);
10
12
  }
11
13
  };
12
14
  }
13
15
 
14
- function checkPattern(value, pattern, errorMessage) {
16
+ function checkPattern(component, prop, pattern, customMessage) {
17
+ const componentName = component.host.localName;
18
+ const value = component[prop];
19
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be follow the format \`${pattern}\`.`;
20
+ const message = customMessage || defaultMessage;
15
21
  if (typeof value !== 'string' || !pattern.test(value)) {
16
- throw new Error(errorMessage);
22
+ throw new Error(message);
17
23
  }
18
24
  }
19
25
 
20
- function checkUrl(value, error) {
26
+ function checkUrl(component, prop, customMessage) {
27
+ const componentName = component.host.localName;
28
+ const value = component[prop];
29
+ const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
30
+ const message = customMessage || defaultMessage;
21
31
  if (typeof value !== 'string' && !(value instanceof URL)) {
22
- throw new Error(error);
32
+ throw new Error(message);
23
33
  }
24
34
  try {
25
35
  new URL(value, 'https://www.post.ch');
26
36
  }
27
37
  catch {
28
- throw new Error(error);
38
+ throw new Error(message);
29
39
  }
30
40
  }
31
41
 
@@ -1,3 +1,3 @@
1
- const version = "9.0.0-next.19";
1
+ const version = "9.0.0-next.21";
2
2
 
3
3
  export { version as v };
@@ -22,8 +22,8 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
22
22
  }
23
23
  collapsible;
24
24
  get host() { return this; }
25
- validateHeadingLevel(newValue = this.headingLevel) {
26
- checkEmptyOrOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
25
+ validateHeadingLevel() {
26
+ checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
27
27
  }
28
28
  componentWillLoad() {
29
29
  this.id = this.host.id || `p${nanoid(6)}`;
@@ -53,10 +53,10 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
53
53
  render() {
54
54
  const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
55
55
  const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
56
- return (h(Host, { key: 'f1275370d7aff41e1fc60285395af35a1ecc90e7', id: this.id, "data-version": version }, h("div", { key: 'd74f762805143939a891e40cfa7a4779ea29921d', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '5ddad810d8b1f8564bdaaf2b09e9e89eee96e007', for: `${this.id}--collapse` }, h(HeadingTag, { key: 'fc6dc947d426bb31de04e83d8c9795a0c826733c', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: 'bd8005bb87e8e00fee57794bd73c5f06cb642a3d', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '89eb0b80e63867e2dcd6b27d95c6519d1e86b10d', class: {
56
+ return (h(Host, { key: '4c4baf7ac22c632de6b0bc332ffc275e50bb4d71', id: this.id, "data-version": version }, h("div", { key: '576529323c3adca347ec685688c071e21a2f3a76', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: 'cc29c396173e55168a3bec963d5e101cb3fb17b2', for: `${this.id}--collapse` }, h(HeadingTag, { key: '76f8eed33f0c84bf6e1a534b04a8ccc0c69c6380', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: 'f56e67ffc94fea0452d1879d3410318b3b12c4bc', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: 'd5f23318d5c498e0cd9dd1f15c13a636e49b7817', class: {
57
57
  'logo-container': true,
58
58
  'has-image': !!this.slottedLogo,
59
- } }, h("slot", { key: '0940530a15ce04b50af007db7f1530ae3c6a456d', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'f06a6b067727be0667b4ea9384e75ee8aa435bfc', name: "header" }), h("post-icon", { key: '460b2c22083cc3049e0c83fc690cb44e3f984db7', name: "2051" })))), h("post-collapsible", { key: '2411f1f93d136ae0bfcbf0da9bb2902d7da0e2a0', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'e648a76e35c28bc1aa5cc57233bf6e8277532294', class: "accordion-body", part: "body" }, h("slot", { key: '7841fff45f2132990d8f1577dfe7d3707d1eb46c' }))))));
59
+ } }, h("slot", { key: '051d48cc4201e2d954f4d4bc25c836ddc8e24d0f', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'e9f687c79fab8bd3bd94e4da022b2aea7e0bba5c', name: "header" }), h("post-icon", { key: 'c1f3486254269ab50a89bd6acf8c714cbbced3b8', name: "2051" })))), h("post-collapsible", { key: '7f3788a90e59cdb4f985fd14c64286cb938a3c23', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'e17ae656614ac27d4f09ebba0a7bb547f88f5728', class: "accordion-body", part: "body" }, h("slot", { key: '0387ebe5ce518bbb8b78c66d919715a78b5ae558' }))))));
60
60
  }
61
61
  static get watchers() { return {
62
62
  "headingLevel": ["validateHeadingLevel"]
@@ -20,7 +20,7 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
20
20
  validateHeadingLevel(newValue = this.headingLevel) {
21
21
  if (!newValue)
22
22
  return;
23
- checkOneOf(newValue, HEADING_LEVELS, 'The `heading-level` property of the `post-accordion` must be a number between 1 and 6.');
23
+ checkOneOf(this, 'headingLevel', HEADING_LEVELS, 'The `heading-level` property of the `post-accordion` must be a number between 1 and 6.');
24
24
  this.accordionItems.forEach(item => {
25
25
  item.setAttribute('heading-level', String(newValue));
26
26
  });
@@ -96,7 +96,7 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
96
96
  });
97
97
  }
98
98
  render() {
99
- return (h(Host, { key: '8c3ff1ccd37541dd906f9f7dddfdad241f9a29ee', "data-version": version }, h("div", { key: '331a8c56a9b2e4497cf6b7e7a7c80f6eb500bf7f', class: "accordion" }, h("slot", { key: 'a59cab01203187c5ed9b0766f5181aef8e1baf63', onSlotchange: () => this.registerAccordionItems() }))));
99
+ return (h(Host, { key: '9ec8ca1ceac6587be68272568f216c958460ac0a', "data-version": version }, h("div", { key: '99887626d105f0e8f86b24e211591e7be820738d', class: "accordion" }, h("slot", { key: '4d8a003377c3a90648818a00144fd5f3a65be084', onSlotchange: () => this.registerAccordionItems() }))));
100
100
  }
101
101
  static get watchers() { return {
102
102
  "headingLevel": ["validateHeadingLevel"]
@@ -35,7 +35,7 @@ const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTM
35
35
  static INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
36
36
  get host() { return this; }
37
37
  validateFirstname() {
38
- checkNonEmpty(this.firstname, 'The `firstname` property of the `post-avatar` is required!');
38
+ checkNonEmpty(this, 'firstname');
39
39
  }
40
40
  async getAvatar() {
41
41
  if (this.slottedImage !== null) {
@@ -16,7 +16,7 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
16
16
  this.label = undefined;
17
17
  this.belowFold = false;
18
18
  }
19
- get el() { return this; }
19
+ get host() { return this; }
20
20
  translateY;
21
21
  isBelowFold() {
22
22
  return window.scrollY > window.innerHeight;
@@ -27,10 +27,10 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
27
27
  // Watch for changes in belowFold
28
28
  watchBelowFold(newValue) {
29
29
  if (newValue) {
30
- slideUp(this.el, this.translateY);
30
+ slideUp(this.host, this.translateY);
31
31
  }
32
32
  else {
33
- slideDown(this.el, this.translateY);
33
+ slideDown(this.host, this.translateY);
34
34
  }
35
35
  }
36
36
  scrollToTop() {
@@ -40,8 +40,8 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
40
40
  }
41
41
  // Validate the label
42
42
  validateLabel() {
43
- checkType(this.label, 'string', 'The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set.');
44
- checkNonEmpty(this.label, 'The label property of the Back to Top component must not be empty. Please provide a proper text for the label');
43
+ checkType(this, 'label', 'string');
44
+ checkNonEmpty(this, 'label');
45
45
  }
46
46
  // Set the initial state
47
47
  componentWillLoad() {
@@ -50,14 +50,14 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
50
50
  componentDidLoad() {
51
51
  window.addEventListener('scroll', this.handleScroll, false);
52
52
  this.translateY = window
53
- .getComputedStyle(this.el)
53
+ .getComputedStyle(this.host)
54
54
  .getPropertyValue('--post-floating-button-translate-y');
55
55
  if (!this.belowFold) {
56
- this.el.style.transform = `translateY(${this.translateY})`;
56
+ this.host.style.transform = `translateY(${this.translateY})`;
57
57
  }
58
58
  // Initial load
59
59
  if (this.belowFold) {
60
- slideUp(this.el, this.translateY);
60
+ slideUp(this.host, this.translateY);
61
61
  }
62
62
  this.validateLabel();
63
63
  }
@@ -65,7 +65,7 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
65
65
  window.removeEventListener('scroll', this.handleScroll);
66
66
  }
67
67
  render() {
68
- return (h(Host, { key: 'c718f2e4cd8ee679cabf72cba7a493770fab2585', "data-version": version }, h("button", { key: '9573fafeb9f4a81b82331f82d42caede5bc8d625', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '7041105b5bb9dbea36999699c9d77d5eca272984', "aria-hidden": "true", name: "3026" }), h("span", { key: 'e8ad9cc2b468d304b01221da24e870b90701cb92', class: "visually-hidden" }, this.label))));
68
+ return (h(Host, { key: '4d8c4e05ebcdd088c924ac0329b2238eb1d3c6ca', "data-version": version }, h("button", { key: 'fc37aff8558d7eb4b27a870f11133fc6984f4e11', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '4b978c44982ec0b02798ce75766b2acdd8497412', "aria-hidden": "true", name: "3026" }), h("span", { key: '4a899be348a6c8721696c634970773cd77f685d9', class: "visually-hidden" }, this.label))));
69
69
  }
70
70
  static get watchers() { return {
71
71
  "belowFold": ["watchBelowFold"],
@@ -29,20 +29,20 @@ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTM
29
29
  this.type = 'neutral';
30
30
  }
31
31
  get host() { return this; }
32
- validateDismissible(isDismissible = this.dismissible) {
33
- checkType(isDismissible, 'boolean', 'The post-banner "dismissible" prop should be a boolean.');
32
+ validateDismissible() {
33
+ checkType(this, 'dismissible', 'boolean');
34
34
  setTimeout(() => this.validateDismissLabel());
35
35
  }
36
- validateDismissLabel(dismissLabel = this.dismissLabel) {
36
+ validateDismissLabel() {
37
37
  if (this.dismissible) {
38
- checkNonEmpty(dismissLabel, 'Dismissible post-banner\'s require a "dismiss-label" prop.');
38
+ checkNonEmpty(this, 'dismissLabel', 'Dismissible post-banner\'s require a "dismiss-label" prop.');
39
39
  }
40
40
  }
41
- validateIcon(icon = this.icon) {
42
- checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digits string.');
41
+ validateIcon() {
42
+ checkEmptyOrPattern(this, 'icon', /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digit string.');
43
43
  }
44
- validateType(type = this.type) {
45
- checkEmptyOrOneOf(type, BANNER_TYPES, `The post-banner requires a type form: ${BANNER_TYPES.join(', ')}`);
44
+ validateType() {
45
+ checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
46
46
  }
47
47
  /**
48
48
  * An event emitted when the banner element is dismissed, after the transition.
@@ -76,14 +76,14 @@ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTM
76
76
  }
77
77
  render() {
78
78
  const defaultBannerContent = [
79
- this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '9886e598c972c8c77c1d25a385edb0c604b47b44', name: "heading" }))),
79
+ this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: 'd4b29e3591f026b880c4b859a47bcbc3e3b11ced', name: "heading" }))),
80
80
  h("slot", { key: `${this.bannerId}-message` }),
81
81
  ];
82
82
  const actionBannerContent = [
83
83
  h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
84
- h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '0463b479e1f6e9f2c287a06109bc9037de4de2e1', name: "actions" })),
84
+ h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '2f1461a2374d736cb3b72641aa150bc611082f56', name: "actions" })),
85
85
  ];
86
- return (h(Host, { key: '43b3385f47d4f7dcd0a150656a79258d045d41ad', "data-version": version }, h("div", { key: 'edb9c07973a4d8b1c0a9efe7f95e9fcf5bcb4b59', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '537ee712114b5095e20e30cd5681fd287da0bd5d', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'a13b1b71e64c7e732487035f2d175c5a041538c0', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
86
+ return (h(Host, { key: 'ec72012fa82e03b0dca2368025449e1942731c21', "data-version": version }, h("div", { key: 'acae7ac34af951ca9176769ab4bcdc388d769931', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '23cc4d77c2825bc76cedcdc321b80b9b0f333e71', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: '2f0753d49fc86f19df743f33a086c14b2a0686f7', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
87
87
  }
88
88
  static get watchers() { return {
89
89
  "dismissible": ["validateDismissible"],
@@ -12,6 +12,7 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
12
12
  this.__registerHost();
13
13
  this.__attachShadow();
14
14
  this.url = undefined;
15
+ this.fullUrl = undefined;
15
16
  }
16
17
  get host() { return this; }
17
18
  validUrl;
@@ -27,11 +28,9 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
27
28
  constructUrl(value) {
28
29
  const hasBaseURL = /^https?:\/\//.test(String(this.url));
29
30
  if (typeof value === 'string') {
30
- const urlString = hasBaseURL
31
- ? value
32
- : `${window.location.origin}${value}`;
33
- checkEmptyOrUrl(urlString, 'The "url" property of the post-breadcrumb-item is invalid');
34
- return urlString;
31
+ this.fullUrl = hasBaseURL ? value : `${window.location.origin}${value}`;
32
+ checkEmptyOrUrl(this, 'fullUrl');
33
+ return this.fullUrl;
35
34
  }
36
35
  return undefined;
37
36
  }
@@ -49,14 +48,15 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
49
48
  }
50
49
  render() {
51
50
  const BreadcrumbTag = this.validUrl ? 'a' : 'span';
52
- return (h(Host, { key: 'ddd9e35e632f29c7854e03ee989527203b65b153', "data-version": version }, h("post-icon", { key: '713d822e2f32b6f7dfec594f9787c190664fb8d6', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '80f211d04535691993caa52b1ee97eb71f7fdbc4', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: (event) => this.handleKeyDown(event) }, h("slot", { key: '850f1212db8da0d356b8e3d10ba95cf2b49e896c' }))));
51
+ return (h(Host, { key: 'd0444118aa031f4cf6f5161d7aa21900e9768348', "data-version": version }, h("post-icon", { key: '719a76e6e86bbb02526c4610acefb3ad253454af', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '3f5ffb9c77567dba35efa7938029cd519de55474', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: 'bb1be29905c1533f2238a47a346fb35d6a7645fd' }))));
53
52
  }
54
53
  static get watchers() { return {
55
54
  "url": ["validateUrl"]
56
55
  }; }
57
56
  static get style() { return PostBreadcrumbItemStyle0; }
58
57
  }, [1, "post-breadcrumb-item", {
59
- "url": [1]
58
+ "url": [1],
59
+ "fullUrl": [32]
60
60
  }, undefined, {
61
61
  "url": ["validateUrl"]
62
62
  }]);
@@ -27,7 +27,7 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
27
27
  breadcrumbNavRef;
28
28
  lastItem;
29
29
  validateUrl() {
30
- checkUrl(this.homeUrl, 'The "url" property of the home-icon is invalid');
30
+ checkUrl(this, 'homeUrl');
31
31
  }
32
32
  componentWillLoad() {
33
33
  this.updateBreadcrumbItems();
@@ -50,7 +50,7 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
50
50
  }, 50);
51
51
  // Updates breadcrumb items and sets the last item
52
52
  updateBreadcrumbItems() {
53
- this.breadcrumbItems = Array.from(this.host.querySelectorAll('post-breadcrumb-item')).map((item) => ({
53
+ this.breadcrumbItems = Array.from(this.host.querySelectorAll('post-breadcrumb-item')).map(item => ({
54
54
  text: item.textContent || '',
55
55
  url: item.getAttribute('url') || '',
56
56
  }));
@@ -96,18 +96,18 @@ const PostBreadcrumb = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb ext
96
96
  }
97
97
  render() {
98
98
  const visibleItems = this.breadcrumbItems.slice(0, -1);
99
- return (h(Host, { key: 'd24a602e1c84ec7227c44a02ac0bebcfe0358b89', "data-version": version }, h("nav", { key: '7ba77ead7ee58f141da4b3e38b11372312ddccf0', "aria-label": "Breadcrumb", class: "breadcrumbs-nav", ref: (el) => (this.breadcrumbNavRef = el) }, h("ol", { key: '210f747196e7450c25f088b258868adc4809e587', class: "no-list breadcrumbs-list" }, h("li", { key: '66627682df3f2a9879d037c1f1f0ed3633267590' }, h("a", { key: 'eb3f05c7badfb40f91aa8d961b4a3cca15946c6e', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: 'd4295523999fe7b0192d7d110e84f939b93be1a9', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'd77ed3f3b22acefd7675dbe94023a9763e7afac9', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("div", { class: "menu-trigger-wrapper", "aria-label": "More breadcrumbs", onKeyDown: (e) => {
99
+ return (h(Host, { key: 'd2fd5b6f8319124fa17649c8c5e479e727fc069a', "data-version": version }, h("nav", { key: 'a5f9b38fa054ad46d8972c28d175f864bed3c365', "aria-label": "Breadcrumb", class: "breadcrumbs-nav", ref: el => (this.breadcrumbNavRef = el) }, h("ol", { key: 'ac7ca9a80315ce6ba70e1aaaae6202fbb1a6933e', class: "no-list breadcrumbs-list" }, h("li", { key: '9927b293673f16bbe837419baf7d4a8f97885bc0' }, h("a", { key: '2b2de9924472a3da00f843c7b569358b60d43539', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: '540a16d9673e9c423493597468a3db00b7d75cef', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '73fad27cd72f18bb5ea281c88ff2c184d7d8187d', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("div", { class: "menu-trigger-wrapper", "aria-label": "More breadcrumbs", onKeyDown: e => {
100
100
  if (e.key === 'Enter' || e.key === ' ') {
101
101
  e.preventDefault();
102
102
  this.handleBreadcrumbItemClick();
103
103
  }
104
- } }, h("post-icon", { name: "2111", class: "breadcrumb-item-icon" }), h("div", { class: "actual-menu" }, h("post-menu-trigger", { for: "breadcrumb-menu", tabIndex: 0 }, h("button", { class: "btn test", tabIndex: -1 }, "...")), h("post-menu", { id: "breadcrumb-menu" }, visibleItems.map((item) => (h("post-menu-item", { key: item.url || item.text, class: "breadcrumb-item", onKeyDown: (e) => {
104
+ } }, h("post-icon", { name: "2111", class: "breadcrumb-item-icon" }), h("div", { class: "actual-menu" }, h("post-menu-trigger", { for: "breadcrumb-menu", tabIndex: 0 }, h("button", { class: "btn test", tabIndex: -1 }, "...")), h("post-menu", { id: "breadcrumb-menu" }, visibleItems.map(item => (h("post-menu-item", { key: item.url || item.text, class: "breadcrumb-item", onKeyDown: e => {
105
105
  if (e.key === 'Enter' || e.key === ' ') {
106
106
  const linkElement = e.currentTarget.querySelector('a');
107
107
  linkElement?.click();
108
108
  e.preventDefault();
109
109
  }
110
- } }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '602d2071f6077fa61782f87970c8e8756ad8c20d', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: 'e00662dad1d308e9791140acd85dbe34084adf34', class: "hidden-items" }, h("a", { key: '8d71359ec18220eaa83095750a1e0fb82e716238', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: 'c5231a0e4d392627bbc8df44016bd8336438a1fd', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '449f27766fb18df99f70cba07de7d5e861a25da6', name: "home", class: "home-icon" })), this.breadcrumbItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
110
+ } }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '31d86d933720b5f6f6928ccfd251443261e9479e', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: '3248d32aa6a73c97c3071be85174fb8634d4e722', class: "hidden-items" }, h("a", { key: '05b0231d3a5793588aa9ede628a7b1e6d2e2faf0', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: '15a63a894124717cfb2be61779c3971772c38397', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '6c893c56b6a34f311fa66d71c4cb523b00535458', name: "home", class: "home-icon" })), this.breadcrumbItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
111
111
  }
112
112
  static get watchers() { return {
113
113
  "homeUrl": ["validateUrl"]