@swisspost/design-system-components 2.0.0 → 2.0.2

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 (343) hide show
  1. package/LICENSE +183 -185
  2. package/dist/cjs/check-non-empty-eeaa8f77.js +0 -2
  3. package/dist/cjs/constants-238701d3.js +0 -2
  4. package/dist/cjs/fade-35a3633a.js +0 -2
  5. package/dist/cjs/index-8c288b1a.js +0 -2
  6. package/dist/cjs/{index-13695f3f.js → index-f243643b.js} +30 -4
  7. package/dist/cjs/index.cjs.js +15 -15
  8. package/dist/cjs/loader.cjs.js +1 -3
  9. package/dist/cjs/package-e8091039.js +5 -0
  10. package/dist/cjs/{post-accordion-9877919c.js → post-accordion-eebf7827.js} +5 -6
  11. package/dist/cjs/post-accordion-item-b2977ca5.js +51 -0
  12. package/dist/cjs/post-accordion-item.cjs.entry.js +5 -47
  13. package/dist/cjs/post-accordion.cjs.entry.js +3 -5
  14. package/dist/cjs/post-alert-af7728e6.js +98 -0
  15. package/dist/cjs/post-alert.cjs.entry.js +3 -5
  16. package/dist/cjs/{post-collapsible-ef0561b4.js → post-collapsible-15f79667.js} +5 -6
  17. package/dist/cjs/post-collapsible.cjs.entry.js +3 -5
  18. package/dist/cjs/post-components.cjs.js +2 -4
  19. package/dist/cjs/{post-icon-e9dcd643.js → post-icon-b80d7e24.js} +6 -7
  20. package/dist/cjs/post-icon.cjs.entry.js +3 -5
  21. package/dist/cjs/{post-popover-e114ebe7.js → post-popover-392b0554.js} +6 -7
  22. package/dist/cjs/post-popover.cjs.entry.js +3 -5
  23. package/dist/cjs/{post-popovercontainer-20fb22ee.js → post-popovercontainer-130193cf.js} +120 -30
  24. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -5
  25. package/dist/cjs/post-tab-header-454cc178.js +32 -0
  26. package/dist/cjs/post-tab-header.cjs.entry.js +3 -5
  27. package/dist/cjs/{post-tab-panel-95cf7092.js → post-tab-panel-fc0bfcbe.js} +5 -6
  28. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -5
  29. package/dist/cjs/{post-tabs-dbe7c341.js → post-tabs-3f909e1c.js} +5 -6
  30. package/dist/cjs/post-tabs.cjs.entry.js +3 -5
  31. package/dist/cjs/{post-tooltip-659af1e3.js → post-tooltip-e5b22230.js} +1863 -393
  32. package/dist/cjs/post-tooltip.cjs.entry.js +3 -5
  33. package/dist/collection/animations/collapse.js +0 -1
  34. package/dist/collection/animations/fade.js +0 -1
  35. package/dist/collection/animations/index.js +0 -1
  36. package/dist/collection/collection-manifest.json +3 -3
  37. package/dist/collection/components/post-accordion/post-accordion.js +4 -2
  38. package/dist/collection/components/post-accordion-item/heading-levels.js +0 -1
  39. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  40. package/dist/collection/components/post-accordion-item/post-accordion-item.js +5 -2
  41. package/dist/collection/components/post-alert/alert-types.js +0 -1
  42. package/dist/collection/components/post-alert/post-alert.css +2 -2
  43. package/dist/collection/components/post-alert/post-alert.js +10 -8
  44. package/dist/collection/components/post-collapsible/post-collapsible.js +4 -2
  45. package/dist/collection/components/post-icon/post-icon.css +1 -1
  46. package/dist/collection/components/post-icon/post-icon.js +1 -2
  47. package/dist/collection/components/post-popover/post-popover.css +1 -1
  48. package/dist/collection/components/post-popover/post-popover.js +5 -3
  49. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  50. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +8 -4
  51. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  52. package/dist/collection/components/post-tab-header/post-tab-header.js +4 -2
  53. package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
  54. package/dist/collection/components/post-tabs/post-tabs.js +5 -2
  55. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  56. package/dist/collection/components/post-tooltip/post-tooltip.js +142 -45
  57. package/dist/collection/components/post-tooltip/types.js +0 -1
  58. package/dist/collection/index.js +1 -1
  59. package/dist/collection/index.spec.js +27 -0
  60. package/dist/collection/utils/index.js +0 -1
  61. package/dist/collection/utils/is-motion-reduced.js +0 -1
  62. package/dist/collection/utils/property-checkers/check-non-empty.js +0 -1
  63. package/dist/collection/utils/property-checkers/check-one-of.js +0 -1
  64. package/dist/collection/utils/property-checkers/check-pattern.js +0 -1
  65. package/dist/collection/utils/property-checkers/check-type.js +0 -1
  66. package/dist/collection/utils/property-checkers/constants.js +0 -1
  67. package/dist/collection/utils/property-checkers/empty-or.js +0 -1
  68. package/dist/collection/utils/property-checkers/index.js +0 -1
  69. package/dist/components/check-non-empty.js +0 -2
  70. package/dist/components/constants.js +0 -2
  71. package/dist/components/fade.js +0 -2
  72. package/dist/components/index.js +1 -2
  73. package/dist/components/index2.js +1 -3
  74. package/dist/components/package.js +1 -3
  75. package/dist/components/post-accordion-item.js +1 -77
  76. package/dist/components/post-accordion-item2.js +78 -0
  77. package/dist/components/post-accordion.js +0 -2
  78. package/dist/components/post-accordion2.js +3 -4
  79. package/dist/components/post-alert.js +0 -2
  80. package/dist/components/post-alert2.js +8 -11
  81. package/dist/components/post-collapsible.js +0 -2
  82. package/dist/components/post-collapsible2.js +3 -4
  83. package/dist/components/post-icon.js +0 -2
  84. package/dist/components/post-icon2.js +5 -6
  85. package/dist/components/post-popover.js +0 -2
  86. package/dist/components/post-popover2.js +4 -5
  87. package/dist/components/post-popovercontainer.js +0 -2
  88. package/dist/components/post-popovercontainer2.js +118 -28
  89. package/dist/components/post-tab-header.js +0 -2
  90. package/dist/components/post-tab-header2.js +4 -5
  91. package/dist/components/post-tab-panel.js +0 -2
  92. package/dist/components/post-tab-panel2.js +3 -4
  93. package/dist/components/post-tabs.js +0 -2
  94. package/dist/components/post-tabs2.js +3 -4
  95. package/dist/components/post-tooltip.js +0 -2
  96. package/dist/components/post-tooltip2.js +1864 -394
  97. package/dist/docs.json +152 -30
  98. package/dist/esm/check-non-empty-58bd6b17.js +0 -2
  99. package/dist/esm/constants-8d548297.js +0 -2
  100. package/dist/esm/fade-7fd71785.js +0 -2
  101. package/dist/esm/{index-74cf5c9d.js → index-1708db56.js} +30 -4
  102. package/dist/esm/{index-1427953c.js → index-b444db27.js} +1 -3
  103. package/dist/esm/index.js +15 -16
  104. package/dist/esm/loader.js +2 -4
  105. package/dist/esm/package-aa903c40.js +3 -0
  106. package/dist/esm/{post-accordion-3b137073.js → post-accordion-82b49f7b.js} +5 -6
  107. package/dist/esm/post-accordion-item-3deff76a.js +49 -0
  108. package/dist/esm/post-accordion-item.entry.js +4 -50
  109. package/dist/esm/post-accordion.entry.js +3 -5
  110. package/dist/esm/post-alert-c88451ba.js +96 -0
  111. package/dist/esm/post-alert.entry.js +4 -6
  112. package/dist/esm/{post-collapsible-a418570f.js → post-collapsible-87ce4e6e.js} +6 -7
  113. package/dist/esm/post-collapsible.entry.js +4 -6
  114. package/dist/esm/post-components.js +3 -5
  115. package/dist/esm/{post-icon-302d1767.js → post-icon-e0536000.js} +7 -8
  116. package/dist/esm/post-icon.entry.js +4 -6
  117. package/dist/esm/{post-popover-5725afc7.js → post-popover-00b006b4.js} +6 -7
  118. package/dist/esm/post-popover.entry.js +3 -5
  119. package/dist/esm/{post-popovercontainer-1c050e83.js → post-popovercontainer-6d1d7f76.js} +120 -30
  120. package/dist/esm/post-popovercontainer.entry.js +3 -5
  121. package/dist/esm/post-tab-header-0f7866f9.js +30 -0
  122. package/dist/esm/post-tab-header.entry.js +3 -5
  123. package/dist/esm/{post-tab-panel-16796ee3.js → post-tab-panel-b41d5d0f.js} +5 -6
  124. package/dist/esm/post-tab-panel.entry.js +3 -5
  125. package/dist/esm/{post-tabs-16f99043.js → post-tabs-97868e9c.js} +5 -6
  126. package/dist/esm/post-tabs.entry.js +3 -5
  127. package/dist/esm/{post-tooltip-03a6d578.js → post-tooltip-531b569d.js} +1863 -393
  128. package/dist/esm/post-tooltip.entry.js +3 -5
  129. package/dist/post-components/index.esm.js +1 -2
  130. package/dist/post-components/p-0ef425cd.entry.js +1 -0
  131. package/dist/post-components/p-10b4cf7a.js +2 -0
  132. package/dist/post-components/p-202a23d3.js +1 -0
  133. package/dist/post-components/p-23d55894.entry.js +1 -0
  134. package/dist/post-components/p-25766de1.js +1 -0
  135. package/dist/post-components/p-2737eaf5.js +1 -2
  136. package/dist/post-components/p-284ca5da.js +1 -0
  137. package/dist/post-components/p-2b5a940c.entry.js +1 -0
  138. package/dist/post-components/p-31c06741.entry.js +1 -0
  139. package/dist/post-components/p-320a90d8.entry.js +1 -0
  140. package/dist/post-components/p-3b8a1f9d.entry.js +1 -0
  141. package/dist/post-components/p-440193f4.js +1 -2
  142. package/dist/post-components/p-61ad6181.entry.js +1 -0
  143. package/dist/post-components/p-71a57911.js +1 -0
  144. package/dist/post-components/p-b095519d.js +1 -2
  145. package/dist/post-components/p-b111a381.js +1 -0
  146. package/dist/post-components/p-ba40e160.js +1 -0
  147. package/dist/post-components/p-be08f39f.entry.js +1 -0
  148. package/dist/post-components/p-bf1293e1.js +1 -0
  149. package/dist/post-components/p-c3dd84af.js +1 -0
  150. package/dist/post-components/p-c9ecada7.entry.js +1 -0
  151. package/dist/post-components/p-cdd7ad0a.js +15 -0
  152. package/dist/post-components/p-d7863a77.js +1 -0
  153. package/dist/post-components/p-d8ac8ae9.js +1 -0
  154. package/dist/post-components/p-dc9ffe1d.js +1 -0
  155. package/dist/post-components/p-f0e82e63.js +1 -0
  156. package/dist/post-components/p-fbf645c4.entry.js +1 -0
  157. package/dist/post-components/p-ff9016ce.entry.js +1 -0
  158. package/dist/post-components/post-components.esm.js +1 -2
  159. package/dist/types/components/post-accordion/post-accordion.d.ts +3 -0
  160. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +4 -0
  161. package/dist/types/components/post-alert/post-alert.d.ts +5 -0
  162. package/dist/types/components/post-collapsible/post-collapsible.d.ts +3 -0
  163. package/dist/types/components/post-popover/post-popover.d.ts +3 -0
  164. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +3 -0
  165. package/dist/types/components/post-tab-header/post-tab-header.d.ts +3 -0
  166. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -0
  167. package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
  168. package/dist/types/components/post-tooltip/post-tooltip.d.ts +14 -6
  169. package/dist/types/index.d.ts +1 -0
  170. package/package.json +13 -14
  171. package/dist/cjs/check-non-empty-eeaa8f77.js.map +0 -1
  172. package/dist/cjs/constants-238701d3.js.map +0 -1
  173. package/dist/cjs/fade-35a3633a.js.map +0 -1
  174. package/dist/cjs/index-13695f3f.js.map +0 -1
  175. package/dist/cjs/index-8c288b1a.js.map +0 -1
  176. package/dist/cjs/index.cjs.js.map +0 -1
  177. package/dist/cjs/loader.cjs.js.map +0 -1
  178. package/dist/cjs/package-8152e25e.js +0 -7
  179. package/dist/cjs/package-8152e25e.js.map +0 -1
  180. package/dist/cjs/post-accordion-9877919c.js.map +0 -1
  181. package/dist/cjs/post-accordion-item.cjs.entry.js.map +0 -1
  182. package/dist/cjs/post-accordion.cjs.entry.js.map +0 -1
  183. package/dist/cjs/post-alert-d87e6132.js +0 -101
  184. package/dist/cjs/post-alert-d87e6132.js.map +0 -1
  185. package/dist/cjs/post-alert.cjs.entry.js.map +0 -1
  186. package/dist/cjs/post-collapsible-ef0561b4.js.map +0 -1
  187. package/dist/cjs/post-collapsible.cjs.entry.js.map +0 -1
  188. package/dist/cjs/post-components.cjs.js.map +0 -1
  189. package/dist/cjs/post-icon-e9dcd643.js.map +0 -1
  190. package/dist/cjs/post-icon.cjs.entry.js.map +0 -1
  191. package/dist/cjs/post-popover-e114ebe7.js.map +0 -1
  192. package/dist/cjs/post-popover.cjs.entry.js.map +0 -1
  193. package/dist/cjs/post-popovercontainer-20fb22ee.js.map +0 -1
  194. package/dist/cjs/post-popovercontainer.cjs.entry.js.map +0 -1
  195. package/dist/cjs/post-tab-header-34c1cc21.js +0 -33
  196. package/dist/cjs/post-tab-header-34c1cc21.js.map +0 -1
  197. package/dist/cjs/post-tab-header.cjs.entry.js.map +0 -1
  198. package/dist/cjs/post-tab-panel-95cf7092.js.map +0 -1
  199. package/dist/cjs/post-tab-panel.cjs.entry.js.map +0 -1
  200. package/dist/cjs/post-tabs-dbe7c341.js.map +0 -1
  201. package/dist/cjs/post-tabs.cjs.entry.js.map +0 -1
  202. package/dist/cjs/post-tooltip-659af1e3.js.map +0 -1
  203. package/dist/cjs/post-tooltip.cjs.entry.js.map +0 -1
  204. package/dist/collection/animations/collapse.js.map +0 -1
  205. package/dist/collection/animations/fade.js.map +0 -1
  206. package/dist/collection/animations/index.js.map +0 -1
  207. package/dist/collection/components/post-accordion/post-accordion.js.map +0 -1
  208. package/dist/collection/components/post-accordion-item/heading-levels.js.map +0 -1
  209. package/dist/collection/components/post-accordion-item/post-accordion-item.js.map +0 -1
  210. package/dist/collection/components/post-alert/alert-types.js.map +0 -1
  211. package/dist/collection/components/post-alert/post-alert.js.map +0 -1
  212. package/dist/collection/components/post-collapsible/post-collapsible.js.map +0 -1
  213. package/dist/collection/components/post-icon/post-icon.js.map +0 -1
  214. package/dist/collection/components/post-popover/post-popover.js.map +0 -1
  215. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +0 -1
  216. package/dist/collection/components/post-tab-header/post-tab-header.js.map +0 -1
  217. package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +0 -1
  218. package/dist/collection/components/post-tabs/post-tabs.js.map +0 -1
  219. package/dist/collection/components/post-tooltip/post-tooltip.js.map +0 -1
  220. package/dist/collection/components/post-tooltip/types.js.map +0 -1
  221. package/dist/collection/index.js.map +0 -1
  222. package/dist/collection/utils/index.js.map +0 -1
  223. package/dist/collection/utils/is-motion-reduced.js.map +0 -1
  224. package/dist/collection/utils/property-checkers/check-non-empty.js.map +0 -1
  225. package/dist/collection/utils/property-checkers/check-one-of.js.map +0 -1
  226. package/dist/collection/utils/property-checkers/check-pattern.js.map +0 -1
  227. package/dist/collection/utils/property-checkers/check-type.js.map +0 -1
  228. package/dist/collection/utils/property-checkers/constants.js.map +0 -1
  229. package/dist/collection/utils/property-checkers/empty-or.js.map +0 -1
  230. package/dist/collection/utils/property-checkers/index.js.map +0 -1
  231. package/dist/components/check-non-empty.js.map +0 -1
  232. package/dist/components/constants.js.map +0 -1
  233. package/dist/components/fade.js.map +0 -1
  234. package/dist/components/index.js.map +0 -1
  235. package/dist/components/index2.js.map +0 -1
  236. package/dist/components/package.js.map +0 -1
  237. package/dist/components/post-accordion-item.js.map +0 -1
  238. package/dist/components/post-accordion.js.map +0 -1
  239. package/dist/components/post-accordion2.js.map +0 -1
  240. package/dist/components/post-alert.js.map +0 -1
  241. package/dist/components/post-alert2.js.map +0 -1
  242. package/dist/components/post-collapsible.js.map +0 -1
  243. package/dist/components/post-collapsible2.js.map +0 -1
  244. package/dist/components/post-icon.js.map +0 -1
  245. package/dist/components/post-icon2.js.map +0 -1
  246. package/dist/components/post-popover.js.map +0 -1
  247. package/dist/components/post-popover2.js.map +0 -1
  248. package/dist/components/post-popovercontainer.js.map +0 -1
  249. package/dist/components/post-popovercontainer2.js.map +0 -1
  250. package/dist/components/post-tab-header.js.map +0 -1
  251. package/dist/components/post-tab-header2.js.map +0 -1
  252. package/dist/components/post-tab-panel.js.map +0 -1
  253. package/dist/components/post-tab-panel2.js.map +0 -1
  254. package/dist/components/post-tabs.js.map +0 -1
  255. package/dist/components/post-tabs2.js.map +0 -1
  256. package/dist/components/post-tooltip.js.map +0 -1
  257. package/dist/components/post-tooltip2.js.map +0 -1
  258. package/dist/esm/check-non-empty-58bd6b17.js.map +0 -1
  259. package/dist/esm/constants-8d548297.js.map +0 -1
  260. package/dist/esm/fade-7fd71785.js.map +0 -1
  261. package/dist/esm/index-1427953c.js.map +0 -1
  262. package/dist/esm/index-74cf5c9d.js.map +0 -1
  263. package/dist/esm/index.js.map +0 -1
  264. package/dist/esm/loader.js.map +0 -1
  265. package/dist/esm/package-af0ef704.js +0 -5
  266. package/dist/esm/package-af0ef704.js.map +0 -1
  267. package/dist/esm/post-accordion-3b137073.js.map +0 -1
  268. package/dist/esm/post-accordion-item.entry.js.map +0 -1
  269. package/dist/esm/post-accordion.entry.js.map +0 -1
  270. package/dist/esm/post-alert-0dcc6ac7.js +0 -99
  271. package/dist/esm/post-alert-0dcc6ac7.js.map +0 -1
  272. package/dist/esm/post-alert.entry.js.map +0 -1
  273. package/dist/esm/post-collapsible-a418570f.js.map +0 -1
  274. package/dist/esm/post-collapsible.entry.js.map +0 -1
  275. package/dist/esm/post-components.js.map +0 -1
  276. package/dist/esm/post-icon-302d1767.js.map +0 -1
  277. package/dist/esm/post-icon.entry.js.map +0 -1
  278. package/dist/esm/post-popover-5725afc7.js.map +0 -1
  279. package/dist/esm/post-popover.entry.js.map +0 -1
  280. package/dist/esm/post-popovercontainer-1c050e83.js.map +0 -1
  281. package/dist/esm/post-popovercontainer.entry.js.map +0 -1
  282. package/dist/esm/post-tab-header-ede9f078.js +0 -31
  283. package/dist/esm/post-tab-header-ede9f078.js.map +0 -1
  284. package/dist/esm/post-tab-header.entry.js.map +0 -1
  285. package/dist/esm/post-tab-panel-16796ee3.js.map +0 -1
  286. package/dist/esm/post-tab-panel.entry.js.map +0 -1
  287. package/dist/esm/post-tabs-16f99043.js.map +0 -1
  288. package/dist/esm/post-tabs.entry.js.map +0 -1
  289. package/dist/esm/post-tooltip-03a6d578.js.map +0 -1
  290. package/dist/esm/post-tooltip.entry.js.map +0 -1
  291. package/dist/post-components/index.esm.js.map +0 -1
  292. package/dist/post-components/p-06566f88.js +0 -2
  293. package/dist/post-components/p-06566f88.js.map +0 -1
  294. package/dist/post-components/p-12a0f4b9.js +0 -2
  295. package/dist/post-components/p-12a0f4b9.js.map +0 -1
  296. package/dist/post-components/p-26dad3c3.js +0 -2
  297. package/dist/post-components/p-26dad3c3.js.map +0 -1
  298. package/dist/post-components/p-2737eaf5.js.map +0 -1
  299. package/dist/post-components/p-299a3e41.entry.js +0 -2
  300. package/dist/post-components/p-299a3e41.entry.js.map +0 -1
  301. package/dist/post-components/p-3241987a.entry.js +0 -2
  302. package/dist/post-components/p-3241987a.entry.js.map +0 -1
  303. package/dist/post-components/p-3fd14a00.js +0 -2
  304. package/dist/post-components/p-3fd14a00.js.map +0 -1
  305. package/dist/post-components/p-440193f4.js.map +0 -1
  306. package/dist/post-components/p-4b950d70.js +0 -2
  307. package/dist/post-components/p-4b950d70.js.map +0 -1
  308. package/dist/post-components/p-503ac49b.entry.js +0 -2
  309. package/dist/post-components/p-503ac49b.entry.js.map +0 -1
  310. package/dist/post-components/p-6391f970.js +0 -2
  311. package/dist/post-components/p-6391f970.js.map +0 -1
  312. package/dist/post-components/p-6d0226cd.entry.js +0 -2
  313. package/dist/post-components/p-6d0226cd.entry.js.map +0 -1
  314. package/dist/post-components/p-775859cc.entry.js +0 -2
  315. package/dist/post-components/p-775859cc.entry.js.map +0 -1
  316. package/dist/post-components/p-78589fac.entry.js +0 -2
  317. package/dist/post-components/p-78589fac.entry.js.map +0 -1
  318. package/dist/post-components/p-803284de.js +0 -9
  319. package/dist/post-components/p-803284de.js.map +0 -1
  320. package/dist/post-components/p-83cedb31.entry.js +0 -2
  321. package/dist/post-components/p-83cedb31.entry.js.map +0 -1
  322. package/dist/post-components/p-88481640.entry.js +0 -2
  323. package/dist/post-components/p-88481640.entry.js.map +0 -1
  324. package/dist/post-components/p-8f37921c.entry.js +0 -2
  325. package/dist/post-components/p-8f37921c.entry.js.map +0 -1
  326. package/dist/post-components/p-91236c61.js +0 -2
  327. package/dist/post-components/p-91236c61.js.map +0 -1
  328. package/dist/post-components/p-91f2291a.js +0 -2
  329. package/dist/post-components/p-91f2291a.js.map +0 -1
  330. package/dist/post-components/p-93ab273b.js +0 -2
  331. package/dist/post-components/p-93ab273b.js.map +0 -1
  332. package/dist/post-components/p-96f4ebc4.js +0 -2
  333. package/dist/post-components/p-96f4ebc4.js.map +0 -1
  334. package/dist/post-components/p-b095519d.js.map +0 -1
  335. package/dist/post-components/p-b4f01350.js +0 -3
  336. package/dist/post-components/p-b4f01350.js.map +0 -1
  337. package/dist/post-components/p-d96fbe33.entry.js +0 -2
  338. package/dist/post-components/p-d96fbe33.entry.js.map +0 -1
  339. package/dist/post-components/p-de4704fc.js +0 -2
  340. package/dist/post-components/p-de4704fc.js.map +0 -1
  341. package/dist/post-components/p-fe7650bc.entry.js +0 -2
  342. package/dist/post-components/p-fe7650bc.entry.js.map +0 -1
  343. package/dist/post-components/post-components.esm.js.map +0 -1
@@ -1 +0,0 @@
1
- {"file":"post-tooltip.entry.js","mappings":";;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,h as e,H as i,g as o}from"./p-b4f01350.js";import{v as n}from"./p-de4704fc.js";import{d as r}from"./p-96f4ebc4.js";function a(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const h=350;const c="ease";const l={height:"0",overflow:"hidden"};const d={duration:h,easing:c,fill:"forwards"};const p=t=>{const s={height:window.getComputedStyle(t).height};return t.animate([s,l],d)};const f=t=>{const s={height:`${t.scrollHeight}px`,offset:1};const e={height:"auto"};return t.animate([l,s,e],d)};const u=":host{display:block}";const g=class{constructor(e){t(this,e);this.collapseChange=s(this,"collapseChange",7);this.isLoaded=false;this.id=undefined;this.isOpen=true;this.collapsed=false}validateCollapsed(t=this.collapsed){r(t,"boolean","The `collapsed` property of the `post-collapsible` must be a boolean.")}connectedCallback(){this.validateCollapsed()}componentWillRender(){this.id=this.host.id||`c${crypto.randomUUID()}`}componentDidLoad(){if(this.collapsed)void this.toggle(false);this.isLoaded=true}async toggle(t=!this.isOpen){if(t===this.isOpen)return t;this.isOpen=!this.isOpen;if(this.isLoaded)this.collapseChange.emit(this.isOpen);const s=t?f(this.collapsible):p(this.collapsible);if(!this.isLoaded||a())s.finish();await s.finished;s.commitStyles();return this.isOpen}render(){return e(i,{id:this.id,"data-version":n},e("div",{class:"collapse",id:`${this.id}--collapse`,ref:t=>this.collapsible=t},e("slot",null)))}get host(){return o(this)}static get watchers(){return{collapsed:["validateCollapsed"]}}};g.style=u;export{g as P};
2
- //# sourceMappingURL=p-06566f88.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isMotionReduced","window","matchMedia","matches","collapseDuration","collapseEasing","collapsedKeyframe","height","overflow","animationOptions","duration","easing","fill","collapse","el","expandedKeyframe","getComputedStyle","animate","expand","scrollHeight","offset","finalKeyframe","postCollapsibleCss","PostCollapsible","this","isLoaded","validateCollapsed","newValue","collapsed","checkEmptyOrType","connectedCallback","componentWillRender","id","host","crypto","randomUUID","componentDidLoad","toggle","open","isOpen","collapseChange","emit","animation","collapsible","finish","finished","commitStyles","render","h","Host","version","class","ref"],"sources":["src/utils/is-motion-reduced.ts","src/animations/collapse.ts","src/components/post-collapsible/post-collapsible.scss?tag=post-collapsible&encapsulation=shadow","src/components/post-collapsible/post-collapsible.tsx"],"sourcesContent":["export function isMotionReduced(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","const collapseDuration = 350;\nconst collapseEasing = 'ease';\nconst collapsedKeyframe: Keyframe = { height: '0', overflow: 'hidden' };\n\nconst animationOptions: KeyframeAnimationOptions = {\n duration: collapseDuration,\n easing: collapseEasing,\n fill: 'forwards',\n};\n\nexport const collapse = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: window.getComputedStyle(el).height };\n\n return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);\n};\n\nexport const expand = (el: HTMLElement): Animation => {\n const expandedKeyframe: Keyframe = { height: `${el.scrollHeight}px`, offset: 1 };\n const finalKeyframe: Keyframe = { height: 'auto' };\n\n return el.animate([collapsedKeyframe, expandedKeyframe, finalKeyframe], animationOptions);\n};\n",":host {\n display: block;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { collapse, expand } from '../../animations/collapse';\nimport { checkEmptyOrType, isMotionReduced } from '../../utils';\n\n@Component({\n tag: 'post-collapsible',\n styleUrl: 'post-collapsible.scss',\n shadow: true,\n})\nexport class PostCollapsible {\n private isLoaded = false;\n private collapsible: HTMLElement;\n\n @Element() host: HTMLPostCollapsibleElement;\n\n @State() id: string;\n @State() isOpen = true;\n\n /**\n * If `true`, the element is initially collapsed otherwise it is displayed.\n */\n @Prop() readonly collapsed?: boolean = false;\n\n @Watch('collapsed')\n validateCollapsed(newValue = this.collapsed) {\n checkEmptyOrType(\n newValue,\n 'boolean',\n 'The `collapsed` property of the `post-collapsible` must be a boolean.',\n );\n }\n\n /**\n * An event emitted when the collapse element is shown or hidden, before the transition.\n *\n * The event payload is a boolean: `true` if the collapsible was opened, `false` if it was closed.\n */\n @Event() collapseChange: EventEmitter<boolean>;\n\n connectedCallback() {\n this.validateCollapsed();\n }\n\n componentWillRender() {\n this.id = this.host.id || `c${crypto.randomUUID()}`;\n }\n\n componentDidLoad() {\n if (this.collapsed) void this.toggle(false);\n this.isLoaded = true;\n }\n\n /**\n * Triggers the collapse programmatically.\n *\n * If there is a collapsing transition running already, it will be reversed.\n */\n @Method()\n async toggle(open = !this.isOpen): Promise<boolean> {\n if (open === this.isOpen) return open;\n\n this.isOpen = !this.isOpen;\n if (this.isLoaded) this.collapseChange.emit(this.isOpen);\n\n const animation = open ? expand(this.collapsible) : collapse(this.collapsible);\n\n if (!this.isLoaded || isMotionReduced()) animation.finish();\n\n await animation.finished;\n\n animation.commitStyles();\n\n return this.isOpen;\n }\n\n render() {\n return (\n <Host id={this.id} data-version={version}>\n <div class=\"collapse\" id={`${this.id}--collapse`} ref={el => (this.collapsible = el)}>\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iJAAgBA,IACd,OAAOC,OAAOC,WAAW,oCAAoCC,OAC/D,CCFA,MAAMC,EAAmB,IACzB,MAAMC,EAAiB,OACvB,MAAMC,EAA8B,CAAEC,OAAQ,IAAKC,SAAU,UAE7D,MAAMC,EAA6C,CACjDC,SAAUN,EACVO,OAAQN,EACRO,KAAM,YAGD,MAAMC,EAAYC,IACvB,MAAMC,EAA6B,CAAER,OAAQN,OAAOe,iBAAiBF,GAAIP,QAEzE,OAAOO,EAAGG,QAAQ,CAACF,EAAkBT,GAAoBG,EAAiB,EAGrE,MAAMS,EAAUJ,IACrB,MAAMC,EAA6B,CAAER,OAAQ,GAAGO,EAAGK,iBAAkBC,OAAQ,GAC7E,MAAMC,EAA0B,CAAEd,OAAQ,QAE1C,OAAOO,EAAGG,QAAQ,CAACX,EAAmBS,EAAkBM,GAAgBZ,EAAiB,ECpB3F,MAAMa,EAAqB,uB,MCqBdC,EAAe,M,wEAClBC,KAAAC,SAAW,M,8BAMD,K,eAKqB,K,CAGvC,iBAAAC,CAAkBC,EAAWH,KAAKI,WAChCC,EACEF,EACA,UACA,wE,CAWJ,iBAAAG,GACEN,KAAKE,mB,CAGP,mBAAAK,GACEP,KAAKQ,GAAKR,KAAKS,KAAKD,IAAM,IAAIE,OAAOC,c,CAGvC,gBAAAC,GACE,GAAIZ,KAAKI,eAAgBJ,KAAKa,OAAO,OACrCb,KAAKC,SAAW,I,CASlB,YAAMY,CAAOC,GAAQd,KAAKe,QACxB,GAAID,IAASd,KAAKe,OAAQ,OAAOD,EAEjCd,KAAKe,QAAUf,KAAKe,OACpB,GAAIf,KAAKC,SAAUD,KAAKgB,eAAeC,KAAKjB,KAAKe,QAEjD,MAAMG,EAAYJ,EAAOpB,EAAOM,KAAKmB,aAAe9B,EAASW,KAAKmB,aAElE,IAAKnB,KAAKC,UAAYzB,IAAmB0C,EAAUE,eAE7CF,EAAUG,SAEhBH,EAAUI,eAEV,OAAOtB,KAAKe,M,CAGd,MAAAQ,GACE,OACEC,EAACC,EAAI,CAACjB,GAAIR,KAAKQ,GAAE,eAAgBkB,GAC/BF,EAAA,OAAKG,MAAM,WAAWnB,GAAI,GAAGR,KAAKQ,eAAgBoB,IAAKtC,GAAOU,KAAKmB,YAAc7B,GAC/EkC,EAAA,c"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as o,h as e,H as r,g as i}from"./p-b4f01350.js";import{v as a}from"./p-de4704fc.js";import{f as s}from"./p-2737eaf5.js";import{c as n,a as l,b as c}from"./p-96f4ebc4.js";import{c as g}from"./p-b095519d.js";const p=["primary","success","danger","warning","info","gray"];const h="/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.alert-primary,.alert-success,.alert-danger,.alert-warning,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-primary:hsl(0, 0%, 20%);--post-white:#fff;--post-black:#000;--post-info:#cce4ee;--post-success:#2c911c;--post-warning:#f49e00;--post-danger:#a51728;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-yellow-rgb:255, 204, 0;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-primary-rgb:51, 51, 51;--post-white-rgb:255, 255, 255;--post-black-rgb:0, 0, 0;--post-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--post-warning-rgb:244, 158, 0;--post-danger-rgb:165, 23, 40;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;background-color:rgba(0,0,0,0) !important;border:2px solid WindowText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn{flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1441px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1440px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 145, 28}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c911c}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M14.667 4h2.667v18.667h-2.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";const d=class{constructor(e){t(this,e);this.dismissed=o(this,"dismissed",7);this.alertId=crypto.randomUUID();this.classes=undefined;this.hasActions=undefined;this.hasHeading=undefined;this.onDismissButtonClick=()=>this.dismiss();this.dismissible=false;this.dismissLabel=undefined;this.fixed=false;this.icon=undefined;this.type="primary"}validateDismissible(t=this.dismissible){n(t,"boolean",'The post-alert "dismissible" prop should be a boolean.');setTimeout((()=>this.validateDismissLabel()))}validateDismissLabel(t=this.dismissLabel){if(this.dismissible){g(t,'Dismissible post-alert\'s require a "dismiss-label" prop.')}}validateFixed(t=this.fixed){n(t,"boolean",'The post-alert "fixed" prop should be a boolean.')}validateIcon(t=this.icon){l(t,/\d{4}|none/,'The post-alert "icon" prop should be a 4-digits string.')}validateType(t=this.type){c(t,p,`The post-alert requires a type form: ${p.join(", ")}`)}connectedCallback(){this.validateDismissible();this.validateFixed();this.validateIcon();this.validateType()}componentWillRender(){var t;this.hasHeading=this.host.querySelectorAll("[slot=heading]").length>0;this.hasActions=this.host.querySelectorAll("[slot=actions]").length>0;this.classes=`alert alert-${(t=this.type)!==null&&t!==void 0?t:"primary"}`;if(this.dismissible)this.classes+=" alert-dismissible";if(this.hasActions)this.classes+=" alert-action";if(this.fixed)this.classes+=" alert-fixed-bottom";if(this.icon==="none")this.classes+=" no-icon"}async dismiss(){const t=s(this.host);await t.finished;this.host.remove();this.dismissed.emit()}render(){const t=[this.hasHeading&&e("div",{key:`${this.alertId}-heading`,class:"alert-heading"},e("slot",{name:"heading"})),e("slot",{key:`${this.alertId}-message`})];const o=[e("div",{key:`${this.alertId}-content`,class:"alert-content"},t),e("div",{key:`${this.alertId}-buttons`,class:"alert-buttons"},e("slot",{name:"actions"}))];return e(r,{"data-version":a},e("div",{role:"alert",class:this.classes},this.dismissible&&e("button",{class:"btn-close",onClick:this.onDismissButtonClick},e("span",{class:"visually-hidden"},this.dismissLabel)),this.icon&&this.icon!=="none"&&e("post-icon",{key:`${this.alertId}-icon`,name:this.icon}),this.hasActions?o:t))}get host(){return i(this)}static get watchers(){return{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}}};d.style=h;export{d as P};
2
- //# sourceMappingURL=p-12a0f4b9.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ALERT_TYPES","postAlertCss","PostAlert","crypto","randomUUID","this","dismiss","validateDismissible","isDismissible","dismissible","checkType","setTimeout","validateDismissLabel","dismissLabel","checkNonEmpty","validateFixed","isFixed","fixed","validateIcon","icon","checkEmptyOrPattern","validateType","type","checkEmptyOrOneOf","join","connectedCallback","componentWillRender","hasHeading","host","querySelectorAll","length","hasActions","classes","_a","dismissal","fadeOut","finished","remove","dismissed","emit","render","defaultAlertContent","h","key","alertId","class","name","actionAlertContent","Host","version","role","onClick","onDismissButtonClick"],"sources":["src/components/post-alert/alert-types.ts","src/components/post-alert/post-alert.scss?tag=post-alert&encapsulation=shadow","src/components/post-alert/post-alert.tsx"],"sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n","@use '@swisspost/design-system-styles/components/alert';\n@use '@swisspost/design-system-styles/components/close';\n@use '@swisspost/design-system-styles/core' as post;\n\n:host {\n display: block;\n\n ::slotted(*) {\n margin: 0 !important;\n }\n}\n\n.visually-hidden {\n @include post.visually-hidden();\n}\n\n@for $i from 1 through 6 {\n .alert-heading > ::slotted(h#{$i}) {\n font-size: inherit !important;\n font-weight: inherit !important;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"8NAAO,MAAMA,EAAc,CAAC,UAAW,UAAW,SAAU,UAAW,OAAQ,QCA/E,MAAMC,EAAe,kznB,MCWRC,EAAS,M,2EAGDC,OAAOC,a,qGAIM,IAAMC,KAAKC,U,iBAKH,M,uCAuBN,M,8BAsBC,S,CA1CnC,mBAAAC,CAAoBC,EAAgBH,KAAKI,aACvCC,EAAUF,EAAe,UAAW,0DACpCG,YAAW,IAAMN,KAAKO,wB,CASxB,oBAAAA,CAAqBC,EAAeR,KAAKQ,cACvC,GAAIR,KAAKI,YAAa,CACpBK,EAAcD,EAAc,4D,EAUhC,aAAAE,CAAcC,EAAUX,KAAKY,OAC3BP,EAAUM,EAAS,UAAW,mD,CAWhC,YAAAE,CAAaC,EAAOd,KAAKc,MACvBC,EAAoBD,EAAM,aAAc,0D,CAS1C,YAAAE,CAAaC,EAAOjB,KAAKiB,MACvBC,EAAkBD,EAAMtB,EAAa,wCAAwCA,EAAYwB,KAAK,Q,CAShG,iBAAAC,GACEpB,KAAKE,sBACLF,KAAKU,gBACLV,KAAKa,eACLb,KAAKgB,c,CAGP,mBAAAK,G,MACErB,KAAKsB,WAAatB,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EACxEzB,KAAK0B,WAAa1B,KAAKuB,KAAKC,iBAAiB,kBAAkBC,OAAS,EAExEzB,KAAK2B,QAAU,gBAAeC,EAAA5B,KAAKiB,QAAI,MAAAW,SAAA,EAAAA,EAAI,YAC3C,GAAI5B,KAAKI,YAAaJ,KAAK2B,SAAW,qBACtC,GAAI3B,KAAK0B,WAAY1B,KAAK2B,SAAW,gBACrC,GAAI3B,KAAKY,MAAOZ,KAAK2B,SAAW,sBAChC,GAAI3B,KAAKc,OAAS,OAAQd,KAAK2B,SAAW,U,CAO5C,aAAM1B,GACJ,MAAM4B,EAAYC,EAAQ9B,KAAKuB,YAEzBM,EAAUE,SAEhB/B,KAAKuB,KAAKS,SACVhC,KAAKiC,UAAUC,M,CAGjB,MAAAC,GACE,MAAMC,EAAsB,CAC1BpC,KAAKsB,YACHe,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,aAGfJ,EAAA,QAAMC,IAAK,GAAGtC,KAAKuC,qBAGrB,MAAMG,EAAqB,CACzBL,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACxCJ,GAEHC,EAAA,OAAKC,IAAK,GAAGtC,KAAKuC,kBAAmBC,MAAM,iBACzCH,EAAA,QAAMI,KAAK,cAIf,OACEJ,EAACM,EAAI,gBAAeC,GAClBP,EAAA,OAAKQ,KAAK,QAAQL,MAAOxC,KAAK2B,SAC3B3B,KAAKI,aACJiC,EAAA,UAAQG,MAAM,YAAYM,QAAS9C,KAAK+C,sBACtCV,EAAA,QAAMG,MAAM,mBAAmBxC,KAAKQ,eAIvCR,KAAKc,MAAQd,KAAKc,OAAS,QAC1BuB,EAAA,aAAWC,IAAK,GAAGtC,KAAKuC,eAAgBE,KAAMzC,KAAKc,OAGpDd,KAAK0B,WACFgB,EACAN,G"}
@@ -1,2 +0,0 @@
1
- import{r,c as t,h as a,H as o,g as s}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";import{f as i,a as b}from"./p-2737eaf5.js";const c='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:#faf9f8}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{margin-block:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-primary .tabs-wrapper{background-color:#333}.bg-white .tabs-wrapper{background-color:#fff}.bg-black .tabs-wrapper{background-color:#000}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success .tabs-wrapper{background-color:#2c911c}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-danger .tabs-wrapper{background-color:#a51728}.bg-nightblue .tabs-wrapper{background-color:#004976}.bg-nightblue-bright .tabs-wrapper{background-color:#0076a8}.bg-petrol .tabs-wrapper{background-color:#006d68}.bg-petrol-bright .tabs-wrapper{background-color:#00968f}.bg-coral .tabs-wrapper{background-color:#9e2a2f}.bg-coral-bright .tabs-wrapper{background-color:#e03c31}.bg-olive .tabs-wrapper{background-color:#716135}.bg-olive-bright .tabs-wrapper{background-color:#aa9d2e}.bg-purple .tabs-wrapper{background-color:#80276c}.bg-purple-bright .tabs-wrapper{background-color:#c5299b}.bg-aubergine .tabs-wrapper{background-color:#523178}.bg-aubergine-bright .tabs-wrapper{background-color:#7566a0}.bg-success-green .tabs-wrapper{background-color:#2c871d}.bg-error-red .tabs-wrapper{background-color:#a51728}.bg-warning-orange .tabs-wrapper{background-color:#f49e00}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-error-background .tabs-wrapper{background-color:#ffdade}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}:host{display:block}';const n=class{constructor(a){r(this,a);this.tabChange=t(this,"tabChange",7);this.isLoaded=false;this.activePanel=undefined}get tabs(){return this.host.querySelectorAll("post-tab-header")}componentDidLoad(){this.moveMisplacedTabs();this.enableTabs();const r=this.activePanel||this.tabs.item(0).panel;void this.show(r);this.isLoaded=true}async show(r){var t;if(r===((t=this.activeTab)===null||t===void 0?void 0:t.panel)){return}const a=this.activeTab;const o=this.host.querySelector(`post-tab-header[panel=${r}]`);this.activateTab(o);if(this.showing){this.showing.effect["target"].style.display="none";this.showing.finish()}if(a&&!this.showing&&!this.hiding){this.hidePanel(a.panel)}if(this.hiding){await this.hiding.finished}this.showSelectedPanel();if(this.showing){await this.showing.finished}this.tabChange.emit(this.activeTab.panel)}moveMisplacedTabs(){if(!this.tabs)return;this.tabs.forEach((r=>{if(r.getAttribute("slot")==="tabs")return;r.setAttribute("slot","tabs")}))}enableTabs(){if(!this.tabs)return;this.tabs.forEach((async r=>{await r.componentOnReady();const t=r.shadowRoot.querySelector(".tab-title");if(t.getAttribute("aria-controls"))return;const a=this.getPanel(r.panel).shadowRoot.querySelector(".tab-pane");t.setAttribute("aria-controls",a.id);a.setAttribute("aria-labelledby",t.id);r.addEventListener("click",(()=>{void this.show(r.panel)}));r.addEventListener("keydown",(({key:t})=>{if(t==="ArrowRight"||t==="ArrowLeft")this.navigateTabs(r,t)}))}));if(this.activeTab&&!this.activeTab.isConnected){void this.show(this.tabs.item(0).panel)}}activateTab(r){if(this.activeTab){const r=this.activeTab.shadowRoot.querySelector(".tab-title");r.setAttribute("aria-selected","false");r.setAttribute("tabindex","-1");r.classList.remove("active")}const t=r.shadowRoot.querySelector(".tab-title");t.setAttribute("aria-selected","true");t.removeAttribute("tabindex");t.classList.add("active");this.activeTab=r}hidePanel(r){const t=this.getPanel(r);if(!t)return;this.hiding=i(t);this.hiding.onfinish=()=>{t.style.display="none";this.hiding=null}}showSelectedPanel(){const r=this.getPanel(this.activeTab.panel);r.style.display="block";if(!this.isLoaded)return;this.showing=b(r);this.showing.onfinish=()=>{this.showing=null}}getPanel(r){return this.host.querySelector(`post-tab-panel[name=${r}]`)}navigateTabs(r,t){const a=Array.from(this.tabs).indexOf(r);let o;if(t==="ArrowRight"){o=this.tabs[a+1]||this.tabs[0]}else{o=this.tabs[a-1]||this.tabs[this.tabs.length-1]}if(!o)return;const s=o.shadowRoot.querySelector(".tab-title");s.focus()}render(){return a(o,{"data-version":e},a("div",{class:"tabs-wrapper"},a("div",{class:"tabs",role:"tablist"},a("slot",{name:"tabs",onSlotchange:()=>this.enableTabs()}))),a("div",{class:"tab-content"},a("slot",{onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return s(this)}};n.style=c;export{n as P};
2
- //# sourceMappingURL=p-26dad3c3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["postTabsCss","PostTabs","this","isLoaded","tabs","host","querySelectorAll","componentDidLoad","moveMisplacedTabs","enableTabs","initiallyActivePanel","activePanel","item","panel","show","panelName","_a","activeTab","previousTab","newTab","querySelector","activateTab","showing","effect","style","display","finish","hiding","hidePanel","finished","showSelectedPanel","tabChange","emit","forEach","tab","getAttribute","setAttribute","async","componentOnReady","tabTitle","shadowRoot","tabPanel","getPanel","id","addEventListener","key","navigateTabs","isConnected","classList","remove","removeAttribute","add","previousPanel","fadeOut","onfinish","fadeIn","name","activeTabIndex","Array","from","indexOf","nextTab","length","nextTabTitle","focus","render","h","Host","version","class","role","onSlotchange"],"sources":["src/components/post-tabs/post-tabs.scss?tag=post-tabs&encapsulation=shadow","src/components/post-tabs/post-tabs.tsx"],"sourcesContent":["@use '@swisspost/design-system-styles/components/tabs/tabs-wrapper';\n\n:host {\n display: block;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeIn, fadeOut } from '../../animations';\n\n@Component({\n tag: 'post-tabs',\n styleUrl: 'post-tabs.scss',\n shadow: true,\n})\nexport class PostTabs {\n private activeTab: HTMLPostTabHeaderElement;\n private showing: Animation;\n private hiding: Animation;\n private isLoaded = false;\n\n private get tabs(): NodeListOf<HTMLPostTabHeaderElement> {\n return this.host.querySelectorAll('post-tab-header');\n }\n\n @Element() host: HTMLPostTabsElement;\n\n /**\n * The name of the panel that is initially shown.\n * If not specified, it defaults to the panel associated with the first tab.\n *\n * **Changing this value after initialization has no effect.**\n */\n @Prop() readonly activePanel: HTMLPostTabPanelElement['name'];\n\n /**\n * An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\n * The payload is the name of the newly shown panel.\n */\n @Event() tabChange: EventEmitter<HTMLPostTabPanelElement['name']>;\n\n componentDidLoad() {\n this.moveMisplacedTabs();\n this.enableTabs();\n\n const initiallyActivePanel = this.activePanel || this.tabs.item(0).panel;\n void this.show(initiallyActivePanel);\n\n this.isLoaded = true;\n }\n\n /**\n * Shows the panel with the given name and selects its associated tab.\n * Any other panel that was previously shown becomes hidden and its associated tab is unselected.\n */\n @Method()\n async show(panelName: string) {\n // do nothing if the tab is already active\n if (panelName === this.activeTab?.panel) {\n return;\n }\n\n const previousTab = this.activeTab;\n const newTab: HTMLPostTabHeaderElement = this.host.querySelector(\n `post-tab-header[panel=${panelName}]`,\n );\n this.activateTab(newTab);\n\n // if a panel is currently being displayed, remove it from the view and complete the associated animation\n if (this.showing) {\n this.showing.effect['target'].style.display = 'none';\n this.showing.finish();\n }\n\n // hide the currently visible panel only if no other animation is running\n if (previousTab && !this.showing && !this.hiding) {\n this.hidePanel(previousTab.panel);\n }\n\n // wait for any hiding animation to complete before showing the selected tab\n if (this.hiding) {\n await this.hiding.finished;\n }\n\n this.showSelectedPanel();\n\n // wait for any display animation to complete for the returned promise to fully resolve\n if (this.showing) {\n await this.showing.finished;\n }\n\n this.tabChange.emit(this.activeTab.panel);\n }\n\n private moveMisplacedTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(tab => {\n if (tab.getAttribute('slot') === 'tabs') return;\n tab.setAttribute('slot', 'tabs');\n });\n }\n\n private enableTabs() {\n if (!this.tabs) return;\n\n this.tabs.forEach(async tab => {\n await tab.componentOnReady();\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n\n // if the tab has an \"aria-controls\" attribute it was already linked to its panel: do nothing\n if (tabTitle.getAttribute('aria-controls')) return;\n\n const tabPanel = this.getPanel(tab.panel).shadowRoot.querySelector('.tab-pane');\n tabTitle.setAttribute('aria-controls', tabPanel.id);\n tabPanel.setAttribute('aria-labelledby', tabTitle.id);\n\n tab.addEventListener('click', () => {\n void this.show(tab.panel);\n });\n\n tab.addEventListener('keydown', ({ key }) => {\n if (key === 'ArrowRight' || key === 'ArrowLeft') this.navigateTabs(tab, key);\n });\n });\n\n // if the currently active tab was removed from the DOM then select the first one\n if (this.activeTab && !this.activeTab.isConnected) {\n void this.show(this.tabs.item(0).panel);\n }\n }\n\n private activateTab(tab: HTMLPostTabHeaderElement) {\n if (this.activeTab) {\n const tabTitle = this.activeTab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'false');\n tabTitle.setAttribute('tabindex', '-1');\n tabTitle.classList.remove('active');\n }\n\n const tabTitle = tab.shadowRoot.querySelector('.tab-title');\n tabTitle.setAttribute('aria-selected', 'true');\n tabTitle.removeAttribute('tabindex');\n tabTitle.classList.add('active');\n\n this.activeTab = tab;\n }\n\n private hidePanel(panelName: HTMLPostTabPanelElement['name']) {\n const previousPanel = this.getPanel(panelName);\n\n if (!previousPanel) return;\n\n this.hiding = fadeOut(previousPanel);\n this.hiding.onfinish = () => {\n previousPanel.style.display = 'none';\n this.hiding = null;\n };\n }\n\n private showSelectedPanel() {\n const panel = this.getPanel(this.activeTab.panel);\n panel.style.display = 'block';\n\n // prevent the initially selected panel from fading in\n if (!this.isLoaded) return;\n\n this.showing = fadeIn(panel);\n this.showing.onfinish = () => {\n this.showing = null;\n };\n }\n\n private getPanel(name: string): HTMLPostTabPanelElement {\n return this.host.querySelector(`post-tab-panel[name=${name}]`);\n }\n\n private navigateTabs(tab: HTMLPostTabHeaderElement, key: 'ArrowRight' | 'ArrowLeft') {\n const activeTabIndex = Array.from(this.tabs).indexOf(tab);\n\n let nextTab: HTMLPostTabHeaderElement;\n if (key === 'ArrowRight') {\n nextTab = this.tabs[activeTabIndex + 1] || this.tabs[0];\n } else {\n nextTab = this.tabs[activeTabIndex - 1] || this.tabs[this.tabs.length - 1];\n }\n\n if (!nextTab) return;\n\n const nextTabTitle = nextTab.shadowRoot.querySelector('.tab-title') as HTMLAnchorElement;\n nextTabTitle.focus();\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div class=\"tabs-wrapper\">\n <div class=\"tabs\" role=\"tablist\">\n <slot name=\"tabs\" onSlotchange={() => this.enableTabs()} />\n </div>\n </div>\n <div class=\"tab-content\">\n <slot onSlotchange={() => this.moveMisplacedTabs()} />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"0IAAA,MAAMA,EAAc,moE,MCSPC,EAAQ,M,8DAIXC,KAAAC,SAAW,M,2BAEnB,QAAYC,GACV,OAAOF,KAAKG,KAAKC,iBAAiB,kB,CAmBpC,gBAAAC,GACEL,KAAKM,oBACLN,KAAKO,aAEL,MAAMC,EAAuBR,KAAKS,aAAeT,KAAKE,KAAKQ,KAAK,GAAGC,WAC9DX,KAAKY,KAAKJ,GAEfR,KAAKC,SAAW,I,CAQlB,UAAMW,CAAKC,G,MAET,GAAIA,MAAcC,EAAAd,KAAKe,aAAS,MAAAD,SAAA,SAAAA,EAAEH,OAAO,CACvC,M,CAGF,MAAMK,EAAchB,KAAKe,UACzB,MAAME,EAAmCjB,KAAKG,KAAKe,cACjD,yBAAyBL,MAE3Bb,KAAKmB,YAAYF,GAGjB,GAAIjB,KAAKoB,QAAS,CAChBpB,KAAKoB,QAAQC,OAAO,UAAUC,MAAMC,QAAU,OAC9CvB,KAAKoB,QAAQI,Q,CAIf,GAAIR,IAAgBhB,KAAKoB,UAAYpB,KAAKyB,OAAQ,CAChDzB,KAAK0B,UAAUV,EAAYL,M,CAI7B,GAAIX,KAAKyB,OAAQ,OACTzB,KAAKyB,OAAOE,Q,CAGpB3B,KAAK4B,oBAGL,GAAI5B,KAAKoB,QAAS,OACVpB,KAAKoB,QAAQO,Q,CAGrB3B,KAAK6B,UAAUC,KAAK9B,KAAKe,UAAUJ,M,CAG7B,iBAAAL,GACN,IAAKN,KAAKE,KAAM,OAEhBF,KAAKE,KAAK6B,SAAQC,IAChB,GAAIA,EAAIC,aAAa,UAAY,OAAQ,OACzCD,EAAIE,aAAa,OAAQ,OAAO,G,CAI5B,UAAA3B,GACN,IAAKP,KAAKE,KAAM,OAEhBF,KAAKE,KAAK6B,SAAQI,MAAMH,UAChBA,EAAII,mBAEV,MAAMC,EAAWL,EAAIM,WAAWpB,cAAc,cAG9C,GAAImB,EAASJ,aAAa,iBAAkB,OAE5C,MAAMM,EAAWvC,KAAKwC,SAASR,EAAIrB,OAAO2B,WAAWpB,cAAc,aACnEmB,EAASH,aAAa,gBAAiBK,EAASE,IAChDF,EAASL,aAAa,kBAAmBG,EAASI,IAElDT,EAAIU,iBAAiB,SAAS,UACvB1C,KAAKY,KAAKoB,EAAIrB,MAAM,IAG3BqB,EAAIU,iBAAiB,WAAW,EAAGC,UACjC,GAAIA,IAAQ,cAAgBA,IAAQ,YAAa3C,KAAK4C,aAAaZ,EAAKW,EAAI,GAC5E,IAIJ,GAAI3C,KAAKe,YAAcf,KAAKe,UAAU8B,YAAa,MAC5C7C,KAAKY,KAAKZ,KAAKE,KAAKQ,KAAK,GAAGC,M,EAI7B,WAAAQ,CAAYa,GAClB,GAAIhC,KAAKe,UAAW,CAClB,MAAMsB,EAAWrC,KAAKe,UAAUuB,WAAWpB,cAAc,cACzDmB,EAASH,aAAa,gBAAiB,SACvCG,EAASH,aAAa,WAAY,MAClCG,EAASS,UAAUC,OAAO,S,CAG5B,MAAMV,EAAWL,EAAIM,WAAWpB,cAAc,cAC9CmB,EAASH,aAAa,gBAAiB,QACvCG,EAASW,gBAAgB,YACzBX,EAASS,UAAUG,IAAI,UAEvBjD,KAAKe,UAAYiB,C,CAGX,SAAAN,CAAUb,GAChB,MAAMqC,EAAgBlD,KAAKwC,SAAS3B,GAEpC,IAAKqC,EAAe,OAEpBlD,KAAKyB,OAAS0B,EAAQD,GACtBlD,KAAKyB,OAAO2B,SAAW,KACrBF,EAAc5B,MAAMC,QAAU,OAC9BvB,KAAKyB,OAAS,IAAI,C,CAId,iBAAAG,GACN,MAAMjB,EAAQX,KAAKwC,SAASxC,KAAKe,UAAUJ,OAC3CA,EAAMW,MAAMC,QAAU,QAGtB,IAAKvB,KAAKC,SAAU,OAEpBD,KAAKoB,QAAUiC,EAAO1C,GACtBX,KAAKoB,QAAQgC,SAAW,KACtBpD,KAAKoB,QAAU,IAAI,C,CAIf,QAAAoB,CAASc,GACf,OAAOtD,KAAKG,KAAKe,cAAc,uBAAuBoC,K,CAGhD,YAAAV,CAAaZ,EAA+BW,GAClD,MAAMY,EAAiBC,MAAMC,KAAKzD,KAAKE,MAAMwD,QAAQ1B,GAErD,IAAI2B,EACJ,GAAIhB,IAAQ,aAAc,CACxBgB,EAAU3D,KAAKE,KAAKqD,EAAiB,IAAMvD,KAAKE,KAAK,E,KAChD,CACLyD,EAAU3D,KAAKE,KAAKqD,EAAiB,IAAMvD,KAAKE,KAAKF,KAAKE,KAAK0D,OAAS,E,CAG1E,IAAKD,EAAS,OAEd,MAAME,EAAeF,EAAQrB,WAAWpB,cAAc,cACtD2C,EAAaC,O,CAGf,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,OAAKG,MAAM,gBACTH,EAAA,OAAKG,MAAM,OAAOC,KAAK,WACrBJ,EAAA,QAAMV,KAAK,OAAOe,aAAc,IAAMrE,KAAKO,iBAG/CyD,EAAA,OAAKG,MAAM,eACTH,EAAA,QAAMK,aAAc,IAAMrE,KAAKM,uB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["fadeDuration","fadedOutKeyframe","opacity","fadedInKeyframe","fadeIn","el","animate","duration","fadeOut"],"sources":["src/animations/fade.ts"],"sourcesContent":["const fadeDuration = 200;\nconst fadedOutKeyframe: Keyframe = {opacity: '0'};\nconst fadedInKeyframe: Keyframe = {opacity: '1'};\n\nexport const fadeIn = (el: Element): Animation => el.animate(\n [ fadedOutKeyframe, fadedInKeyframe ],\n { duration: fadeDuration }\n);\n\nexport const fadeOut = (el: Element): Animation => el.animate(\n [ fadedInKeyframe, fadedOutKeyframe ],\n { duration: fadeDuration }\n);\n"],"mappings":"AAAA,MAAMA,EAAe,IACrB,MAAMC,EAA6B,CAACC,QAAS,KAC7C,MAAMC,EAA4B,CAACD,QAAS,K,MAE/BE,EAAUC,GAA2BA,EAAGC,QACnD,CAAEL,EAAkBE,GACpB,CAAEI,SAAUP,I,MAGDQ,EAAWH,GAA2BA,EAAGC,QACpD,CAAEH,EAAiBF,GACnB,CAAEM,SAAUP,W"}
@@ -1,2 +0,0 @@
1
- export{P as post_accordion}from"./p-3fd14a00.js";import"./p-b4f01350.js";import"./p-de4704fc.js";
2
- //# sourceMappingURL=p-299a3e41.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export{P as post_tab_header}from"./p-91236c61.js";import"./p-b4f01350.js";import"./p-de4704fc.js";import"./p-b095519d.js";import"./p-440193f4.js";
2
- //# sourceMappingURL=p-3241987a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{r as s,h as t,H as i,g as o}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";const r=":host{display:block}";const a=class{constructor(t){s(this,t);this.expandedItems=new Set;this.multiple=false}componentWillLoad(){this.registerAccordionItems()}async toggle(s){const t=this.accordionItems.find((t=>t.id===s));if(!t)throw new Error(`No post-accordion-item found with id #${s}.`);await t.toggle()}collapseChangeHandler(s){s.stopPropagation();const t=s.target;const i=this.expandedItems.has(t);if(i){this.expandedItems.delete(t)}else{this.expandedItems.add(t)}if(this.multiple||i)return;Array.from(this.expandedItems.values()).filter((s=>s!==t)).forEach((s=>{s.toggle(false)}))}async expandAll(){if(this.multiple){await Promise.all(this.accordionItems.map((s=>s.toggle(true))))}else if(!this.expandedItems.size){await this.accordionItems[0].toggle(true)}}async collapseAll(){await Promise.all(this.accordionItems.map((s=>s.toggle(false))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item"));this.accordionItems.filter((s=>!s.collapsed||this.expandedItems.has(s))).forEach(((s,t)=>{if(!this.multiple&&t!==0){s.setAttribute("collapsed","");return}this.expandedItems.add(s)}))}render(){return t(i,{"data-version":e},t("div",{class:"accordion"},t("slot",{onSlotchange:()=>this.registerAccordionItems()})))}get host(){return o(this)}};a.style=r;export{a as P};
2
- //# sourceMappingURL=p-3fd14a00.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["postAccordionCss","PostAccordion","this","expandedItems","Set","componentWillLoad","registerAccordionItems","toggle","id","itemToToggle","accordionItems","find","item","Error","collapseChangeHandler","event","stopPropagation","toggledItem","target","isClosing","has","delete","add","multiple","Array","from","values","filter","forEach","expandAll","Promise","all","map","size","collapseAll","host","querySelectorAll","collapsed","index","setAttribute","render","h","Host","version","class","onSlotchange"],"sources":["src/components/post-accordion/post-accordion.scss?tag=post-accordion&encapsulation=shadow","src/components/post-accordion/post-accordion.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Element, h, Host, Listen, Method, Prop } from '@stencil/core';\nimport { version } from '../../../package.json';\n\n@Component({\n tag: 'post-accordion',\n styleUrl: 'post-accordion.scss',\n shadow: true,\n})\nexport class PostAccordion {\n private accordionItems: HTMLPostAccordionItemElement[];\n private expandedItems = new Set<HTMLPostAccordionItemElement>();\n\n @Element() host: HTMLPostAccordionElement;\n\n /**\n * If `true`, multiple `post-accordion-item` can be open at the same time.\n */\n @Prop() readonly multiple: boolean = false;\n\n componentWillLoad() {\n this.registerAccordionItems();\n }\n\n /**\n * Toggles the `post-accordion-item` with the given id.\n */\n @Method()\n async toggle(id: string) {\n const itemToToggle = this.accordionItems.find(item => item.id === id);\n\n if (!itemToToggle) throw new Error(`No post-accordion-item found with id #${id}.`);\n\n await itemToToggle.toggle();\n }\n\n @Listen('collapseChange')\n collapseChangeHandler(event: CustomEvent<boolean>) {\n event.stopPropagation();\n\n const toggledItem = event.target as HTMLPostAccordionItemElement;\n const isClosing = this.expandedItems.has(toggledItem);\n\n if (isClosing) {\n this.expandedItems.delete(toggledItem);\n } else {\n this.expandedItems.add(toggledItem);\n }\n\n if (this.multiple || isClosing) return;\n\n // close other open accordion items to have only one opened at a time\n Array.from(this.expandedItems.values())\n .filter(item => item !== toggledItem)\n .forEach(item => {\n item.toggle(false);\n });\n }\n\n /**\n * Expands all `post-accordion-item`.\n *\n * If `close-others` is `true` and all items are closed, it will open the first one.\n * Otherwise, it will keep the opened one.\n */\n @Method()\n async expandAll() {\n if (this.multiple) {\n await Promise.all(this.accordionItems.map(item => item.toggle(true)));\n } else if (!this.expandedItems.size) {\n await this.accordionItems[0].toggle(true);\n }\n }\n\n /**\n * Collapses all `post-accordion-item`.\n */\n @Method()\n async collapseAll() {\n await Promise.all(this.accordionItems.map(item => item.toggle(false)));\n }\n\n private registerAccordionItems() {\n this.accordionItems = Array.from(this.host.querySelectorAll('post-accordion-item'));\n\n this.accordionItems\n .filter(item => {\n return !item.collapsed || this.expandedItems.has(item);\n })\n .forEach((item, index) => {\n if (!this.multiple && index !== 0) {\n item.setAttribute('collapsed', '');\n return;\n }\n\n this.expandedItems.add(item);\n });\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div class=\"accordion\">\n <slot onSlotchange={() => this.registerAccordionItems()} />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAmB,uB,MCQZC,EAAa,M,yBAEhBC,KAAAC,cAAgB,IAAIC,I,cAOS,K,CAErC,iBAAAC,GACEH,KAAKI,wB,CAOP,YAAMC,CAAOC,GACX,MAAMC,EAAeP,KAAKQ,eAAeC,MAAKC,GAAQA,EAAKJ,KAAOA,IAElE,IAAKC,EAAc,MAAM,IAAII,MAAM,yCAAyCL,YAEtEC,EAAaF,Q,CAIrB,qBAAAO,CAAsBC,GACpBA,EAAMC,kBAEN,MAAMC,EAAcF,EAAMG,OAC1B,MAAMC,EAAYjB,KAAKC,cAAciB,IAAIH,GAEzC,GAAIE,EAAW,CACbjB,KAAKC,cAAckB,OAAOJ,E,KACrB,CACLf,KAAKC,cAAcmB,IAAIL,E,CAGzB,GAAIf,KAAKqB,UAAYJ,EAAW,OAGhCK,MAAMC,KAAKvB,KAAKC,cAAcuB,UAC3BC,QAAOf,GAAQA,IAASK,IACxBW,SAAQhB,IACPA,EAAKL,OAAO,MAAM,G,CAWxB,eAAMsB,GACJ,GAAI3B,KAAKqB,SAAU,OACXO,QAAQC,IAAI7B,KAAKQ,eAAesB,KAAIpB,GAAQA,EAAKL,OAAO,Q,MACzD,IAAKL,KAAKC,cAAc8B,KAAM,OAC7B/B,KAAKQ,eAAe,GAAGH,OAAO,K,EAQxC,iBAAM2B,SACEJ,QAAQC,IAAI7B,KAAKQ,eAAesB,KAAIpB,GAAQA,EAAKL,OAAO,S,CAGxD,sBAAAD,GACNJ,KAAKQ,eAAiBc,MAAMC,KAAKvB,KAAKiC,KAAKC,iBAAiB,wBAE5DlC,KAAKQ,eACFiB,QAAOf,IACEA,EAAKyB,WAAanC,KAAKC,cAAciB,IAAIR,KAElDgB,SAAQ,CAAChB,EAAM0B,KACd,IAAKpC,KAAKqB,UAAYe,IAAU,EAAG,CACjC1B,EAAK2B,aAAa,YAAa,IAC/B,M,CAGFrC,KAAKC,cAAcmB,IAAIV,EAAK,G,CAIlC,MAAA4B,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,OAAKG,MAAM,aACTH,EAAA,QAAMI,aAAc,IAAM3C,KAAKI,4B"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["EMPTY_VALUES","undefined"],"sources":["src/utils/property-checkers/constants.ts"],"sourcesContent":["export const EMPTY_VALUES = [undefined, null, ''];\n"],"mappings":"MAAaA,EAAe,CAACC,UAAW,KAAM,W"}
@@ -1,2 +0,0 @@
1
- import{r as s,h as t,H as n,g as o}from"./p-b4f01350.js";import{v as e}from"./p-de4704fc.js";const r=":host{display:none}";const a=class{constructor(t){s(this,t);this.panelId=undefined;this.name=undefined}componentWillLoad(){this.panelId=`panel-${this.host.id||crypto.randomUUID()}`}render(){return t(n,{"data-version":e},t("div",{class:"tab-pane",id:this.panelId,role:"tabpanel"},t("slot",null)))}get host(){return o(this)}};a.style=r;export{a as P};
2
- //# sourceMappingURL=p-4b950d70.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["postTabPanelCss","PostTabPanel","componentWillLoad","this","panelId","host","id","crypto","randomUUID","render","h","Host","version","class","role"],"sources":["src/components/post-tab-panel/post-tab-panel.scss?tag=post-tab-panel&encapsulation=shadow","src/components/post-tab-panel/post-tab-panel.tsx"],"sourcesContent":[":host {\n display: none;\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\nimport { version } from '../../../package.json';\n\n@Component({\n tag: 'post-tab-panel',\n styleUrl: 'post-tab-panel.scss',\n shadow: true,\n})\nexport class PostTabPanel {\n @Element() host: HTMLPostTabPanelElement;\n\n @State() panelId: string;\n\n /**\n * The name of the panel, used to associate it with a tab header.\n */\n @Prop() readonly name: string;\n\n componentWillLoad() {\n // get the id set on the host element or use a random id by default\n this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <div\n class=\"tab-pane\"\n id={this.panelId}\n role=\"tabpanel\"\n >\n <slot/>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAkB,sB,MCQXC,EAAY,M,oEAUvB,iBAAAC,GAEEC,KAAKC,QAAU,SAASD,KAAKE,KAAKC,IAAMC,OAAOC,c,CAGjD,MAAAC,GACE,OACEC,EAACC,EAAI,gBAAeC,GAClBF,EAAA,OACEG,MAAM,WACNP,GAAIH,KAAKC,QACTU,KAAK,YAELJ,EAAA,c"}
@@ -1,2 +0,0 @@
1
- export{P as post_icon}from"./p-91f2291a.js";import"./p-b4f01350.js";import"./p-96f4ebc4.js";import"./p-440193f4.js";import"./p-de4704fc.js";import"./p-b095519d.js";
2
- //# sourceMappingURL=p-503ac49b.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{r as t,c as n,h as e,H as o,g as i}from"./p-b4f01350.js";import{v as r}from"./p-de4704fc.js";const s=Math.min;const c=Math.max;const l=Math.round;const a=Math.floor;const f=t=>({x:t,y:t});const u={left:"right",right:"left",bottom:"top",top:"bottom"};const p={start:"end",end:"start"};function d(t,n,e){return c(t,s(n,e))}function h(t,n){return typeof t==="function"?t(n):t}function m(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function v(t){return t==="x"?"y":"x"}function y(t){return t==="y"?"height":"width"}function w(t){return["top","bottom"].includes(m(t))?"y":"x"}function b(t){return v(w(t))}function x(t,n,e){if(e===void 0){e=false}const o=g(t);const i=b(t);const r=y(i);let s=i==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[r]>n.floating[r]){s=M(s)}return[s,M(s)]}function A(t){const n=M(t);return[S(t),n,S(n)]}function S(t){return t.replace(/start|end/g,(t=>p[t]))}function T(t,n,e){const o=["left","right"];const i=["right","left"];const r=["top","bottom"];const s=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?i:o;return n?o:i;case"left":case"right":return n?r:s;default:return[]}}function E(t,n,e,o){const i=g(t);let r=T(m(t),e==="start",o);if(i){r=r.map((t=>t+"-"+i));if(n){r=r.concat(r.map(S))}}return r}function M(t){return t.replace(/left|right|bottom|top/g,(t=>u[t]))}function k(t){return{top:0,right:0,bottom:0,left:0,...t}}function L(t){return typeof t!=="number"?k(t):{top:t,right:t,bottom:t,left:t}}function D(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function H(t,n,e){let{reference:o,floating:i}=t;const r=w(n);const s=b(n);const c=y(s);const l=m(n);const a=r==="y";const f=o.x+o.width/2-i.width/2;const u=o.y+o.height/2-i.height/2;const p=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(g(n)){case"start":d[s]-=p*(e&&a?-1:1);break;case"end":d[s]+=p*(e&&a?-1:1);break}return d}const O=async(t,n,e)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=e;const c=r.filter(Boolean);const l=await(s.isRTL==null?void 0:s.isRTL(n));let a=await s.getElementRects({reference:t,floating:n,strategy:i});let{x:f,y:u}=H(a,o,l);let p=o;let d={};let h=0;for(let e=0;e<c.length;e++){const{name:r,fn:m}=c[e];const{x:g,y:v,data:y,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:n}});f=g!=null?g:f;u=v!=null?v:u;d={...d,[r]:{...d[r],...y}};if(w&&h<=50){h++;if(typeof w==="object"){if(w.placement){p=w.placement}if(w.rects){a=w.rects===true?await s.getElementRects({reference:t,floating:n,strategy:i}):w.rects}({x:f,y:u}=H(a,p,l))}e=-1;continue}}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function F(t,n){var e;if(n===void 0){n={}}const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t;const{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=false,padding:d=0}=h(n,t);const m=L(d);const g=u==="floating"?"reference":"floating";const v=c[p?g:u];const y=D(await r.getClippingRect({element:((e=await(r.isElement==null?void 0:r.isElement(v)))!=null?e:true)?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l}));const w=u==="floating"?{...s.floating,x:o,y:i}:s.reference;const b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating));const x=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1};const A=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-A.top+m.top)/x.y,bottom:(A.bottom-y.bottom+m.bottom)/x.y,left:(y.left-A.left+m.left)/x.x,right:(A.right-y.right+m.right)/x.x}}const R=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:i,rects:r,platform:c,elements:l,middlewareData:a}=n;const{element:f,padding:u=0}=h(t,n)||{};if(f==null){return{}}const p=L(u);const m={x:e,y:o};const v=b(i);const w=y(v);const x=await c.getDimensions(f);const A=v==="y";const S=A?"top":"left";const T=A?"bottom":"right";const E=A?"clientHeight":"clientWidth";const M=r.reference[w]+r.reference[v]-m[v]-r.floating[w];const k=m[v]-r.reference[v];const D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let H=D?D[E]:0;if(!H||!await(c.isElement==null?void 0:c.isElement(D))){H=l.floating[E]||r.floating[w]}const O=M/2-k/2;const F=H/2-x[w]/2-1;const R=s(p[S],F);const z=s(p[T],F);const P=R;const W=H-x[w]-z;const j=H/2-x[w]/2+O;const $=d(P,j,W);const q=!a.arrow&&g(i)!=null&&j!=$&&r.reference[w]/2-(j<P?R:z)-x[w]/2<0;const B=q?j<P?j-P:j-W:0;return{[v]:m[v]+B,data:{[v]:$,centerOffset:j-$-B,...q&&{alignmentOffset:B}},reset:q}}});const z=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=true,...y}=h(t,n);if((e=r.arrow)!=null&&e.alignmentOffset){return{}}const w=m(i);const b=m(c)===c;const S=await(l.isRTL==null?void 0:l.isRTL(a.floating));const T=p||(b||!v?[M(c)]:A(c));if(!p&&g!=="none"){T.push(...E(c,v,g,S))}const k=[c,...T];const L=await F(n,y);const D=[];let H=((o=r.flip)==null?void 0:o.overflows)||[];if(f){D.push(L[w])}if(u){const t=x(i,s,S);D.push(L[t[0]],L[t[1]])}H=[...H,{placement:i,overflows:D}];if(!D.every((t=>t<=0))){var O,R;const t=(((O=r.flip)==null?void 0:O.index)||0)+1;const n=k[t];if(n){return{data:{index:t,overflows:H},reset:{placement:n}}}let e=(R=H.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(d){case"bestFit":{var z;const t=(z=H.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:z[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(i!==e){return{reset:{placement:e}}}}return{}}}};function P(t){const n=s(...t.map((t=>t.left)));const e=s(...t.map((t=>t.top)));const o=c(...t.map((t=>t.right)));const i=c(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:i-e}}function W(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const i=n[t];if(!o||i.y-o.y>o.height/2){e.push([i])}else{e[e.length-1].push(i)}o=i}return e.map((t=>D(P(t))))}const j=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:i,platform:r,strategy:l}=n;const{padding:a=2,x:f,y:u}=h(t,n);const p=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]);const d=W(p);const g=D(P(p));const v=L(a);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&u!=null){return d.find((t=>f>t.left-v.left&&f<t.right+v.right&&u>t.top-v.top&&u<t.bottom+v.bottom))||g}if(d.length>=2){if(w(e)==="y"){const t=d[0];const n=d[d.length-1];const o=m(e)==="top";const i=t.top;const r=n.bottom;const s=o?t.left:n.left;const c=o?t.right:n.right;const l=c-s;const a=r-i;return{top:i,bottom:r,left:s,right:c,width:l,height:a,x:s,y:i}}const t=m(e)==="left";const n=c(...d.map((t=>t.right)));const o=s(...d.map((t=>t.left)));const i=d.filter((e=>t?e.left===o:e.right===n));const r=i[0].top;const l=i[i.length-1].bottom;const a=o;const f=n;const u=f-a;const p=l-r;return{top:r,bottom:l,left:a,right:f,width:u,height:p,x:a,y:r}}return g}const b=await r.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:l});if(i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height){return{reset:{rects:b}}}return{}}}};async function $(t,n){const{placement:e,platform:o,elements:i}=t;const r=await(o.isRTL==null?void 0:o.isRTL(i.floating));const s=m(e);const c=g(e);const l=w(e)==="y";const a=["left","top"].includes(s)?-1:1;const f=r&&l?-1:1;const u=h(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof v==="number"){d=c==="end"?v*-1:v}return l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const q=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:i,y:r,placement:s,middlewareData:c}=n;const l=await $(n,t);if(s===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}};const B=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:i}=n;const{mainAxis:r=true,crossAxis:s=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=h(t,n);const a={x:e,y:o};const f=await F(n,l);const u=w(m(i));const p=v(u);let g=a[p];let y=a[u];if(r){const t=p==="y"?"top":"left";const n=p==="y"?"bottom":"right";const e=g+f[t];const o=g-f[n];g=d(e,g,o)}if(s){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=y+f[t];const o=y-f[n];y=d(e,y,o)}const b=c.fn({...n,[p]:g,[u]:y});return{...b,data:{x:b.x-e,y:b.y-o}}}}};const C=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:i,rects:r,middlewareData:s}=n;const{offset:c=0,mainAxis:l=true,crossAxis:a=true}=h(t,n);const f={x:e,y:o};const u=w(i);const p=v(u);let d=f[p];let g=f[u];const y=h(c,n);const b=typeof y==="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const t=p==="y"?"height":"width";const n=r.reference[p]-r.floating[t]+b.mainAxis;const e=r.reference[p]+r.reference[t]-b.mainAxis;if(d<n){d=n}else if(d>e){d=e}}if(a){var x,A;const t=p==="y"?"width":"height";const n=["top","left"].includes(m(i));const e=r.reference[u]-r.floating[t]+(n?((x=s.offset)==null?void 0:x[u])||0:0)+(n?0:b.crossAxis);const o=r.reference[u]+r.reference[t]+(n?0:((A=s.offset)==null?void 0:A[u])||0)-(n?b.crossAxis:0);if(g<e){g=e}else if(g>o){g=o}}return{[p]:d,[u]:g}}}};const I=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:i,elements:r}=n;const{apply:l=(()=>{}),...a}=h(t,n);const f=await F(n,a);const u=m(e);const p=g(e);const d=w(e)==="y";const{width:v,height:y}=o.floating;let b;let x;if(u==="top"||u==="bottom"){b=u;x=p===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"}else{x=u;b=p==="end"?"top":"bottom"}const A=y-f[b];const S=v-f[x];const T=!n.middlewareData.shift;let E=A;let M=S;if(d){const t=v-f.left-f.right;M=p||T?s(S,t):t}else{const t=y-f.top-f.bottom;E=p||T?s(A,t):t}if(T&&!p){const t=c(f.left,0);const n=c(f.right,0);const e=c(f.top,0);const o=c(f.bottom,0);if(d){M=v-2*(t!==0||n!==0?t+n:c(f.left,f.right))}else{E=y-2*(e!==0||o!==0?e+o:c(f.top,f.bottom))}}await l({...n,availableWidth:M,availableHeight:E});const k=await i.getDimensions(r.floating);if(v!==k.width||y!==k.height){return{reset:{rects:true}}}return{}}}};function N(t){if(X(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function G(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function V(t){var n;return(n=(X(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function X(t){return t instanceof Node||t instanceof G(t).Node}function Y(t){return t instanceof Element||t instanceof G(t).Element}function _(t){return t instanceof HTMLElement||t instanceof G(t).HTMLElement}function J(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof G(t).ShadowRoot}function K(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=et(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(i)}function Q(t){return["table","td","th"].includes(N(t))}function U(t){const n=tt();const e=et(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function Z(t){let n=it(t);while(_(n)&&!nt(n)){if(U(n)){return n}else{n=it(n)}}return null}function tt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function nt(t){return["html","body","#document"].includes(N(t))}function et(t){return G(t).getComputedStyle(t)}function ot(t){if(Y(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function it(t){if(N(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||J(t)&&t.host||V(t);return J(n)?n.host:n}function rt(t){const n=it(t);if(nt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(_(n)&&K(n)){return n}return rt(n)}function st(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const i=rt(t);const r=i===((o=t.ownerDocument)==null?void 0:o.body);const s=G(i);if(r){return n.concat(s,s.visualViewport||[],K(i)?i:[],s.frameElement&&e?st(s.frameElement):[])}return n.concat(i,st(i,[],e))}function ct(t){const n=et(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const i=_(t);const r=i?t.offsetWidth:e;const s=i?t.offsetHeight:o;const c=l(e)!==r||l(o)!==s;if(c){e=r;o=s}return{width:e,height:o,$:c}}function lt(t){return!Y(t)?t.contextElement:t}function at(t){const n=lt(t);if(!_(n)){return f(1)}const e=n.getBoundingClientRect();const{width:o,height:i,$:r}=ct(n);let s=(r?l(e.width):e.width)/o;let c=(r?l(e.height):e.height)/i;if(!s||!Number.isFinite(s)){s=1}if(!c||!Number.isFinite(c)){c=1}return{x:s,y:c}}const ft=f(0);function ut(t){const n=G(t);if(!tt()||!n.visualViewport){return ft}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pt(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==G(t)){return false}return n}function dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const i=t.getBoundingClientRect();const r=lt(t);let s=f(1);if(n){if(o){if(Y(o)){s=at(o)}}else{s=at(t)}}const c=pt(r,e,o)?ut(r):f(0);let l=(i.left+c.x)/s.x;let a=(i.top+c.y)/s.y;let u=i.width/s.x;let p=i.height/s.y;if(r){const t=G(r);const n=o&&Y(o)?G(o):o;let e=t.frameElement;while(e&&o&&n!==t){const t=at(e);const n=e.getBoundingClientRect();const o=et(e);const i=n.left+(e.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(e.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x;a*=t.y;u*=t.x;p*=t.y;l+=i;a+=r;e=G(e).frameElement}}return D({width:u,height:p,x:l,y:a})}function ht(t){let{rect:n,offsetParent:e,strategy:o}=t;const i=_(e);const r=V(e);if(e===r){return n}let s={scrollLeft:0,scrollTop:0};let c=f(1);const l=f(0);if(i||!i&&o!=="fixed"){if(N(e)!=="body"||K(r)){s=ot(e)}if(_(e)){const t=dt(e);c=at(e);l.x=t.x+e.clientLeft;l.y=t.y+e.clientTop}}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function mt(t){return Array.from(t.getClientRects())}function gt(t){return dt(V(t)).left+ot(t).scrollLeft}function vt(t){const n=V(t);const e=ot(t);const o=t.ownerDocument.body;const i=c(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const r=c(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let s=-e.scrollLeft+gt(t);const l=-e.scrollTop;if(et(o).direction==="rtl"){s+=c(n.clientWidth,o.clientWidth)-i}return{width:i,height:r,x:s,y:l}}function yt(t,n){const e=G(t);const o=V(t);const i=e.visualViewport;let r=o.clientWidth;let s=o.clientHeight;let c=0;let l=0;if(i){r=i.width;s=i.height;const t=tt();if(!t||t&&n==="fixed"){c=i.offsetLeft;l=i.offsetTop}}return{width:r,height:s,x:c,y:l}}function wt(t,n){const e=dt(t,true,n==="fixed");const o=e.top+t.clientTop;const i=e.left+t.clientLeft;const r=_(t)?at(t):f(1);const s=t.clientWidth*r.x;const c=t.clientHeight*r.y;const l=i*r.x;const a=o*r.y;return{width:s,height:c,x:l,y:a}}function bt(t,n,e){let o;if(n==="viewport"){o=yt(t,e)}else if(n==="document"){o=vt(V(t))}else if(Y(n)){o=wt(n,e)}else{const e=ut(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return D(o)}function xt(t,n){const e=it(t);if(e===n||!Y(e)||nt(e)){return false}return et(e).position==="fixed"||xt(e,n)}function At(t,n){const e=n.get(t);if(e){return e}let o=st(t,[],false).filter((t=>Y(t)&&N(t)!=="body"));let i=null;const r=et(t).position==="fixed";let s=r?it(t):t;while(Y(s)&&!nt(s)){const n=et(s);const e=U(s);if(!e&&n.position==="fixed"){i=null}const c=r?!e&&!i:!e&&n.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||K(s)&&!e&&xt(t,s);if(c){o=o.filter((t=>t!==s))}else{i=n}s=it(s)}n.set(t,o);return o}function St(t){let{element:n,boundary:e,rootBoundary:o,strategy:i}=t;const r=e==="clippingAncestors"?At(n,this._c):[].concat(e);const l=[...r,o];const a=l[0];const f=l.reduce(((t,e)=>{const o=bt(n,e,i);t.top=c(o.top,t.top);t.right=s(o.right,t.right);t.bottom=s(o.bottom,t.bottom);t.left=c(o.left,t.left);return t}),bt(n,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Tt(t){const{width:n,height:e}=ct(t);return{width:n,height:e}}function Et(t,n,e){const o=_(n);const i=V(n);const r=e==="fixed";const s=dt(t,true,r,n);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(o||!o&&!r){if(N(n)!=="body"||K(i)){c=ot(n)}if(o){const t=dt(n,true,r,n);l.x=t.x+n.clientLeft;l.y=t.y+n.clientTop}else if(i){l.x=gt(i)}}return{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function Mt(t,n){if(!_(t)||et(t).position==="fixed"){return null}if(n){return n(t)}return t.offsetParent}function kt(t,n){const e=G(t);if(!_(t)){return e}let o=Mt(t,n);while(o&&Q(o)&&et(o).position==="static"){o=Mt(o,n)}if(o&&(N(o)==="html"||N(o)==="body"&&et(o).position==="static"&&!U(o))){return e}return o||Z(t)||e}const Lt=async function(t){let{reference:n,floating:e,strategy:o}=t;const i=this.getOffsetParent||kt;const r=this.getDimensions;return{reference:Et(n,await i(e),o),floating:{x:0,y:0,...await r(e)}}};function Dt(t){return et(t).direction==="rtl"}const Ht={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:V,getClippingRect:St,getOffsetParent:kt,getElementRects:Lt,getClientRects:mt,getDimensions:Tt,getScale:at,isElement:Y,isRTL:Dt};function Ot(t,n){let e=null;let o;const i=V(t);function r(){clearTimeout(o);e&&e.disconnect();e=null}function l(f,u){if(f===void 0){f=false}if(u===void 0){u=1}r();const{left:p,top:d,width:h,height:m}=t.getBoundingClientRect();if(!f){n()}if(!h||!m){return}const g=a(d);const v=a(i.clientWidth-(p+h));const y=a(i.clientHeight-(d+m));const w=a(p);const b=-g+"px "+-v+"px "+-y+"px "+-w+"px";const x={rootMargin:b,threshold:c(0,s(1,u))||1};let A=true;function S(t){const n=t[0].intersectionRatio;if(n!==u){if(!A){return l()}if(!n){o=setTimeout((()=>{l(false,1e-7)}),100)}else{l(false,n)}}A=false}try{e=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch(t){e=new IntersectionObserver(S,x)}e.observe(t)}l(true);return r}function Ft(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver==="function",layoutShift:c=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=lt(t);const f=i||r?[...a?st(a):[],...st(n)]:[];f.forEach((t=>{i&&t.addEventListener("scroll",e,{passive:true});r&&t.addEventListener("resize",e)}));const u=a&&c?Ot(a,e):null;let p=-1;let d=null;if(s){d=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&d){d.unobserve(n);cancelAnimationFrame(p);p=requestAnimationFrame((()=>{d&&d.observe(n)}))}e()}));if(a&&!l){d.observe(a)}d.observe(n)}let h;let m=l?dt(t):null;if(l){g()}function g(){const n=dt(t);if(m&&(n.x!==m.x||n.y!==m.y||n.width!==m.width||n.height!==m.height)){e()}m=n;h=requestAnimationFrame(g)}e();return()=>{f.forEach((t=>{i&&t.removeEventListener("scroll",e);r&&t.removeEventListener("resize",e)}));u&&u();d&&d.disconnect();d=null;if(l){cancelAnimationFrame(h)}}}const Rt=B;const zt=z;const Pt=I;const Wt=R;const jt=j;const $t=C;const qt=(t,n,e)=>{const o=new Map;const i={platform:Ht,...e};const r={...i.platform,_c:o};return O(t,n,{...i,platform:r})};(()=>{var t=class extends Event{oldState;newState;constructor(t,{oldState:n="",newState:e="",...o}={}){super(t,o),this.oldState=String(n||""),this.newState=String(e||"")}},n=new WeakMap;function e(e,o,i){n.set(e,setTimeout((()=>{n.has(e)&&e.dispatchEvent(new t("toggle",{cancelable:!1,oldState:o,newState:i}))}),0))}var o=globalThis.ShadowRoot||function(){},i=globalThis.HTMLDialogElement||function(){},r=new WeakMap,s=new WeakMap,c=new WeakMap;function l(t){return c.get(t)||"hidden"}var a=new WeakMap;function f(t){let n=t.popoverTargetElement;if(!n)return;let e=l(n);t.popoverTargetAction==="show"&&e==="showing"||t.popoverTargetAction==="hide"&&e==="hidden"||(e==="showing"?T(n,!0,!0):u(n,!1)&&(a.set(n,t),S(n)))}function u(t,n){return!(t.popover!=="auto"&&t.popover!=="manual"||!t.isConnected||n&&l(t)!=="showing"||!n&&l(t)!=="hidden"||t instanceof i&&t.hasAttribute("open")||document.fullscreenElement===t)}function p(t){return t?Array.from(s.get(t.ownerDocument)||[]).indexOf(t)+1:0}function d(t){let n=g(t),e=v(t);return p(n)>p(e)?n:e}function h(t){let n=s.get(t);for(let t of n||[])if(!t.isConnected)n.delete(t);else return t;return null}function m(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?m(t.parentNode):t}function g(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&c.get(t)==="showing")return t;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function v(t){for(;t;){let n=t.popoverTargetElement;if(n)return n;if(t=t.parentElement||m(t),t instanceof o&&(t=t.host),t instanceof Document)return}}function y(t){let n=new Map,e=0,o=t.ownerDocument;for(let t of s.get(o)||[])n.set(t,e),e+=1;n.set(t,e),e+=1;let i=null;function r(t){let e=g(t);if(e===null)return null;let o=n.get(e);(i===null||n.get(i)<o)&&(i=e)}return r(t?.parentElement),i}function w(t){return t.hidden||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:t.tabIndex!==-1}function b(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let n=t;n.shadowRoot&&(n=n.shadowRoot);let e=n.querySelector("[autofocus]");if(e)return e;let o=t.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=o.currentNode;for(;i;){if(w(i))return i;i=o.nextNode()}}function x(t){b(t)?.focus()}var A=new WeakMap;function S(n){if(!u(n,!1))return;let o=n.ownerDocument;if(!n.dispatchEvent(new t("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!u(n,!1))return;let i=!1;if(n.popover==="auto"){let t=n.getAttribute("popover"),e=y(n)||o;if(M(e,!1,!0),t!==n.getAttribute("popover")||!u(n,!1))return}h(o)||(i=!0),A.delete(n);let l=o.activeElement;n.classList.add(":popover-open"),c.set(n,"showing"),r.has(o)||r.set(o,new Set),r.get(o).add(n),x(n),n.popover==="auto"&&(s.has(o)||s.set(o,new Set),s.get(o).add(n),H(a.get(n),!0)),i&&l&&n.popover==="auto"&&A.set(n,l),e(n,"closed","open")}function T(n,o=!1,i=!1){if(!u(n,!0))return;let l=n.ownerDocument;if(n.popover==="auto"&&(M(n,o,i),!u(n,!0))||(H(a.get(n),!1),a.delete(n),i&&(n.dispatchEvent(new t("beforetoggle",{oldState:"open",newState:"closed"})),!u(n,!0))))return;r.get(l)?.delete(n),s.get(l)?.delete(n),n.classList.remove(":popover-open"),c.set(n,"hidden"),i&&e(n,"open","closed");let f=A.get(n);f&&(A.delete(n),o&&f.focus())}function E(t,n=!1,e=!1){let o=h(t);for(;o;)T(o,n,e),o=h(t)}function M(t,n,e){let o=t.ownerDocument||t;if(t instanceof Document)return E(o,n,e);let i=null,r=!1;for(let n of s.get(o)||[])if(n===t)r=!0;else if(r){i=n;break}if(!r)return E(o,n,e);for(;i&&l(i)==="showing"&&s.get(o)?.size;)T(i,n,e)}var k=new WeakMap;function L(t){if(!t.isTrusted)return;let n=t.composedPath()[0];if(!n)return;let e=n.ownerDocument;if(!h(e))return;let o=d(n);if(o&&t.type==="pointerdown")k.set(e,o);else if(t.type==="pointerup"){let t=k.get(e)===o;k.delete(e),t&&M(o||e,!1,!0)}}var D=new WeakMap;function H(t,n=!1){if(!t)return;D.has(t)||D.set(t,t.getAttribute("aria-expanded"));let e=t.popoverTargetElement;if(e&&e.popover==="auto")t.setAttribute("aria-expanded",String(n));else{let n=D.get(t);n?t.setAttribute("aria-expanded",n):t.removeAttribute("aria-expanded")}}var O=globalThis.ShadowRoot||function(){};function F(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function R(t,n,e){let o=t[n];Object.defineProperty(t,n,{value(t){return o.call(this,e(t))}})}var z=/(^|[^\\]):popover-open\b/g;function P(){window.ToggleEvent=window.ToggleEvent||t;function n(t){return t?.includes(":popover-open")&&(t=t.replace(z,"$1.\\:popover-open")),t}R(Document.prototype,"querySelector",n),R(Document.prototype,"querySelectorAll",n),R(Element.prototype,"querySelector",n),R(Element.prototype,"querySelectorAll",n),R(Element.prototype,"matches",n),R(Element.prototype,"closest",n),R(DocumentFragment.prototype,"querySelectorAll",n),R(DocumentFragment.prototype,"querySelectorAll",n),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let t=(this.getAttribute("popover")||"").toLowerCase();return t===""||t=="auto"?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){S(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){T(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){c.get(this)==="showing"&&t===void 0||t===!1?T(this,!0,!0):(t===void 0||t===!0)&&S(this)}}});let e=new WeakMap;function o(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(t===null)this.removeAttribute("popovertarget"),e.delete(this);else if(t instanceof Element)this.setAttribute("popovertarget",""),e.set(this,t);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;let n=m(this),o=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof O)&&o&&n.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return t==="show"||t==="hide"?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}o(HTMLButtonElement),o(HTMLInputElement);let i=t=>{if(!t.isTrusted)return;let n=t.composedPath()[0];if(!(n instanceof Element)||n?.shadowRoot)return;let e=m(n);if(!(e instanceof O||e instanceof Document))return;let o=n.closest("[popovertargetaction],[popovertarget]");if(o){f(o);return}},r=t=>{let n=t.key,e=t.target;e&&(n==="Escape"||n==="Esc")&&M(e.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",r),t.addEventListener("pointerdown",L),t.addEventListener("pointerup",L)})(document)}F()||P()})();const Bt="@layer polyfill{[popover]{position:fixed;z-index:2147483647;inset:0;padding:.25em;width:fit-content;height:fit-content;border-width:initial;border-color:initial;border-image:initial;border-style:solid;background-color:canvas;color:canvastext;overflow:auto;margin:auto}[popover]:not(.\\:popover-open){display:none}[popover]:is(dialog[open]){display:revert}[anchor].\\:popover-open{inset:auto}@supports selector([popover]:popover-open){[popover]:not(.\\:popover-open,dialog[open]){display:revert}[anchor]:is(:popover-open){inset:auto}}@supports not (background-color: canvas){[popover]{background-color:white;color:black}}@supports(width: -moz-fit-content){[popover]{width:-moz-fit-content;height:-moz-fit-content}}@supports not (inset: 0){[popover]{top:0;left:0;right:0;bottom:0}}}.popover{box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:1px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}.arrow{position:absolute;width:.7071067812rem;height:.7071067812rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1;border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";const Ct={top:"bottom",right:"left",bottom:"top",left:"right"};const It=class{constructor(e){t(this,e);this.postPopoverToggled=n(this,"postPopoverToggled",7);this.placement="top";this.arrow=false}componentDidLoad(){this.popoverRef.setAttribute("popover","");this.popoverRef.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){if(this.popoverRef)this.popoverRef.removeEventListener("beforetoggle",(t=>this.toggle(t.target)));if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}async show(t){this.eventTarget=t;this.popoverRef.showPopover()}async hide(){this.eventTarget=null;this.popoverRef.hidePopover()}async toggle(t,n){this.eventTarget=t;this.popoverRef.togglePopover(n);return this.popoverRef.matches(":popover-open")}handleToggle(t){const n=t.newState==="open";if(n){this.startAutoupdates()}else{if(typeof this.clearAutoUpdate==="function")this.clearAutoUpdate()}this.postPopoverToggled.emit(n)}startAutoupdates(){this.clearAutoUpdate=Ft(this.eventTarget,this.popoverRef,this.calculatePosition.bind(this))}async calculatePosition(){const t=[zt(),jt(),Rt({padding:8,limiter:$t({offset:32})}),Pt({apply({availableWidth:t,elements:n}){Object.assign(n.floating.style,{maxWidth:`${t-16}px`})}}),q(this.arrow?12:8)];if(this.arrow){t.push(Wt({element:this.arrowRef,padding:8}))}const{x:n,y:e,middlewareData:o,placement:i}=await qt(this.eventTarget,this.popoverRef,{placement:this.placement||"top",strategy:"fixed",middleware:t});this.popoverRef.style.left=`${n}px`;this.popoverRef.style.top=`${e}px`;if(this.arrow){const t=i.split("-")[0];const{x:n,y:e}=o.arrow;const r=Ct[t];Object.assign(this.arrowRef.style,{top:e?`${e}px`:"",left:n?`${n}px`:"",[r]:`${-this.arrowRef.offsetWidth/2}px`})}}render(){return e(o,{"data-version":r},e("div",{class:"popover",part:"popover",ref:t=>this.popoverRef=t},this.arrow&&e("span",{class:"arrow",ref:t=>{this.arrowRef=t}}),e("slot",null)))}get host(){return i(this)}};It.style=Bt;export{It as P};
2
- //# sourceMappingURL=p-6391f970.js.map