@solid-design-system/components 4.0.0-next.2 → 4.0.0-next.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. package/cdn/chunks/chunk.3ATYVOO4.js +1 -0
  2. package/cdn/chunks/chunk.4HIKTDIM.js +40 -0
  3. package/cdn/chunks/chunk.C2PA7CKF.js +1 -0
  4. package/cdn/chunks/{chunk.IVXFAQNG.js → chunk.DEX5VJGX.js} +1 -1
  5. package/cdn/chunks/{chunk.BTRVMAGL.js → chunk.DMLGBWCL.js} +1 -1
  6. package/cdn/chunks/{chunk.GUOHZTA7.js → chunk.F7J6HN76.js} +1 -1
  7. package/cdn/chunks/chunk.ITRQVXFY.js +1 -0
  8. package/cdn/chunks/{chunk.E7HNNYP6.js → chunk.MX22EZXK.js} +1 -1
  9. package/cdn/chunks/{chunk.5BROLR6V.js → chunk.ROBLMI7Q.js} +1 -1
  10. package/cdn/chunks/{chunk.WMRFVNYU.js → chunk.ZRIABVVM.js} +1 -1
  11. package/cdn/components/accordion/accordion.d.ts +5 -3
  12. package/cdn/components/accordion/accordion.js +1 -1
  13. package/cdn/components/accordion-group/accordion-group.js +1 -1
  14. package/cdn/components/button/button.js +1 -1
  15. package/cdn/components/combobox/combobox.js +1 -1
  16. package/cdn/components/dialog/dialog.js +1 -1
  17. package/cdn/components/drawer/drawer.js +1 -1
  18. package/cdn/components/flipcard/flipcard.js +1 -1
  19. package/cdn/components/map-marker/map-marker.js +1 -1
  20. package/cdn/components/navigation-item/navigation-item.js +1 -1
  21. package/cdn/components/quickfact/quickfact.d.ts +1 -1
  22. package/cdn/components/quickfact/quickfact.js +1 -1
  23. package/cdn/components/select/select.js +1 -1
  24. package/cdn/components/step/step.js +1 -1
  25. package/cdn/components/tab/tab.d.ts +1 -0
  26. package/cdn/components/tab/tab.js +1 -1
  27. package/cdn/components/tag/tag.js +1 -1
  28. package/cdn/custom-elements.json +19 -1
  29. package/cdn/solid-components.bundle.js +52 -13
  30. package/cdn/solid-components.iife.js +52 -13
  31. package/cdn/solid-components.js +1 -1
  32. package/cdn/web-types.json +3 -1
  33. package/cdn-versioned/_components/menu/menu.js +1 -1
  34. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  35. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  36. package/cdn-versioned/chunks/chunk.24SF73MY.js +1 -1
  37. package/cdn-versioned/chunks/chunk.36Z2VDHI.js +1 -1
  38. package/cdn-versioned/chunks/chunk.3ATYVOO4.js +1 -0
  39. package/cdn-versioned/chunks/chunk.4HIKTDIM.js +40 -0
  40. package/cdn-versioned/chunks/chunk.4W3WLVGR.js +1 -1
  41. package/cdn-versioned/chunks/chunk.5ZDWEJDB.js +1 -1
  42. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  43. package/cdn-versioned/chunks/chunk.6JBTCFHE.js +2 -2
  44. package/cdn-versioned/chunks/chunk.7M7VCE7R.js +1 -1
  45. package/cdn-versioned/chunks/chunk.7RJ3O2FV.js +1 -1
  46. package/cdn-versioned/chunks/chunk.APMDRZQD.js +1 -1
  47. package/cdn-versioned/chunks/chunk.C2PA7CKF.js +1 -0
  48. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  49. package/cdn-versioned/chunks/{chunk.IVXFAQNG.js → chunk.DEX5VJGX.js} +4 -4
  50. package/cdn-versioned/chunks/{chunk.BTRVMAGL.js → chunk.DMLGBWCL.js} +1 -1
  51. package/cdn-versioned/chunks/chunk.DVHKKAVM.js +1 -1
  52. package/cdn-versioned/chunks/chunk.EWWGLHC5.js +1 -1
  53. package/cdn-versioned/chunks/{chunk.GUOHZTA7.js → chunk.F7J6HN76.js} +1 -1
  54. package/cdn-versioned/chunks/chunk.FD54463O.js +1 -1
  55. package/cdn-versioned/chunks/chunk.FFNTXFC3.js +1 -1
  56. package/cdn-versioned/chunks/chunk.FX3ED655.js +1 -1
  57. package/cdn-versioned/chunks/chunk.GOVNZSCO.js +1 -1
  58. package/cdn-versioned/chunks/chunk.GQSLHWQC.js +1 -1
  59. package/cdn-versioned/chunks/chunk.ISEQUO4U.js +1 -1
  60. package/cdn-versioned/chunks/chunk.ITRQVXFY.js +1 -0
  61. package/cdn-versioned/chunks/chunk.IZKUI5WK.js +1 -1
  62. package/cdn-versioned/chunks/chunk.KMLMMBY4.js +1 -1
  63. package/cdn-versioned/chunks/chunk.LLXTYJXF.js +1 -1
  64. package/cdn-versioned/chunks/chunk.LZEFLOSA.js +1 -1
  65. package/cdn-versioned/chunks/chunk.MPP7HYX7.js +1 -1
  66. package/cdn-versioned/chunks/{chunk.E7HNNYP6.js → chunk.MX22EZXK.js} +1 -1
  67. package/cdn-versioned/chunks/chunk.ND7BT52X.js +1 -1
  68. package/cdn-versioned/chunks/chunk.NUB5WHGD.js +1 -1
  69. package/cdn-versioned/chunks/chunk.O4UXOQEI.js +1 -1
  70. package/cdn-versioned/chunks/chunk.OVV7TNT2.js +1 -1
  71. package/cdn-versioned/chunks/chunk.PBPFKJKV.js +1 -1
  72. package/cdn-versioned/chunks/chunk.QFNCQQ6S.js +1 -1
  73. package/cdn-versioned/chunks/chunk.QNZWJACC.js +2 -2
  74. package/cdn-versioned/chunks/chunk.R354E6ZD.js +1 -1
  75. package/cdn-versioned/chunks/{chunk.5BROLR6V.js → chunk.ROBLMI7Q.js} +4 -4
  76. package/cdn-versioned/chunks/chunk.SNUMAAEG.js +1 -1
  77. package/cdn-versioned/chunks/chunk.TA7CZCP3.js +1 -1
  78. package/cdn-versioned/chunks/chunk.U443X4TI.js +1 -1
  79. package/cdn-versioned/chunks/chunk.UBFU6D5B.js +1 -1
  80. package/cdn-versioned/chunks/chunk.URB2K7JQ.js +1 -1
  81. package/cdn-versioned/chunks/chunk.VNKUGTKM.js +1 -1
  82. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  83. package/cdn-versioned/chunks/chunk.WENTMXB2.js +1 -1
  84. package/cdn-versioned/chunks/chunk.WGNXYONB.js +1 -1
  85. package/cdn-versioned/chunks/chunk.WQAPHFVM.js +1 -1
  86. package/cdn-versioned/chunks/chunk.YF5WEC4R.js +2 -2
  87. package/cdn-versioned/chunks/chunk.ZFA2VPUT.js +1 -1
  88. package/cdn-versioned/chunks/{chunk.WMRFVNYU.js → chunk.ZRIABVVM.js} +2 -2
  89. package/cdn-versioned/components/accordion/accordion.d.ts +6 -4
  90. package/cdn-versioned/components/accordion/accordion.js +1 -1
  91. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  92. package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
  93. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  94. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  95. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  96. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  97. package/cdn-versioned/components/button/button.d.ts +1 -1
  98. package/cdn-versioned/components/button/button.js +1 -1
  99. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  100. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  101. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  102. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  103. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  104. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  105. package/cdn-versioned/components/combobox/combobox.js +1 -1
  106. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  107. package/cdn-versioned/components/dialog/dialog.js +1 -1
  108. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  109. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  110. package/cdn-versioned/components/drawer/drawer.js +1 -1
  111. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  112. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  113. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  114. package/cdn-versioned/components/flipcard/flipcard.js +1 -1
  115. package/cdn-versioned/components/header/header.d.ts +1 -1
  116. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  117. package/cdn-versioned/components/include/include.d.ts +1 -1
  118. package/cdn-versioned/components/input/input.d.ts +1 -1
  119. package/cdn-versioned/components/link/link.d.ts +1 -1
  120. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  121. package/cdn-versioned/components/map-marker/map-marker.js +1 -1
  122. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  123. package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
  124. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  125. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  126. package/cdn-versioned/components/option/option.d.ts +1 -1
  127. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  128. package/cdn-versioned/components/quickfact/quickfact.d.ts +2 -2
  129. package/cdn-versioned/components/quickfact/quickfact.js +1 -1
  130. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  131. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  132. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  133. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  134. package/cdn-versioned/components/select/select.d.ts +4 -4
  135. package/cdn-versioned/components/select/select.js +1 -1
  136. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  137. package/cdn-versioned/components/step/step.d.ts +1 -1
  138. package/cdn-versioned/components/step/step.js +1 -1
  139. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  140. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  141. package/cdn-versioned/components/tab/tab.d.ts +2 -1
  142. package/cdn-versioned/components/tab/tab.js +1 -1
  143. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  144. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  145. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  146. package/cdn-versioned/components/tag/tag.js +1 -1
  147. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  148. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  149. package/cdn-versioned/components/video/video.d.ts +1 -1
  150. package/cdn-versioned/custom-elements.json +220 -202
  151. package/cdn-versioned/internal/form.js +3 -3
  152. package/cdn-versioned/solid-components.bundle.js +54 -15
  153. package/cdn-versioned/solid-components.css +2 -2
  154. package/cdn-versioned/solid-components.iife.js +54 -15
  155. package/cdn-versioned/solid-components.js +1 -1
  156. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  157. package/cdn-versioned/web-types.json +139 -137
  158. package/dist/chunks/{chunk.6JI7NL3E.js → chunk.4JZQQD4L.js} +48 -6
  159. package/dist/chunks/{chunk.7BEDTYS7.js → chunk.743FPQRN.js} +8 -1
  160. package/dist/chunks/{chunk.DAM3ICHP.js → chunk.TWXYFPBS.js} +31 -5
  161. package/dist/components/accordion/accordion.d.ts +5 -3
  162. package/dist/components/accordion/accordion.js +1 -1
  163. package/dist/components/accordion-group/accordion-group.js +1 -1
  164. package/dist/components/quickfact/quickfact.d.ts +1 -1
  165. package/dist/components/quickfact/quickfact.js +2 -2
  166. package/dist/components/tab/tab.d.ts +1 -0
  167. package/dist/components/tab/tab.js +2 -1
  168. package/dist/custom-elements.json +19 -1
  169. package/dist/solid-components.js +3 -3
  170. package/dist/web-types.json +3 -1
  171. package/dist-versioned/_components/menu/menu.js +1 -1
  172. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  173. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  174. package/dist-versioned/chunks/chunk.2IBVAXOX.js +1 -1
  175. package/dist-versioned/chunks/chunk.3IT4HBTI.js +1 -1
  176. package/dist-versioned/chunks/chunk.3LGDUVS4.js +2 -2
  177. package/dist-versioned/chunks/chunk.4JZQQD4L.js +107 -0
  178. package/dist-versioned/chunks/chunk.4QKRGAOL.js +4 -4
  179. package/dist-versioned/chunks/chunk.4RGGPCD5.js +2 -2
  180. package/dist-versioned/chunks/chunk.56SNEGI4.js +13 -13
  181. package/dist-versioned/chunks/chunk.65BWRJEA.js +5 -5
  182. package/dist-versioned/chunks/chunk.6CUAQSFA.js +2 -2
  183. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  184. package/dist-versioned/chunks/chunk.727ERQ4F.js +2 -2
  185. package/dist-versioned/chunks/{chunk.7BEDTYS7.js → chunk.743FPQRN.js} +10 -3
  186. package/dist-versioned/chunks/chunk.76ZNNLGN.js +1 -1
  187. package/dist-versioned/chunks/chunk.7OHSCBBX.js +1 -1
  188. package/dist-versioned/chunks/chunk.BVC5FY4L.js +13 -13
  189. package/dist-versioned/chunks/chunk.BXB5WF23.js +5 -5
  190. package/dist-versioned/chunks/chunk.D6JZ4IKM.js +1 -1
  191. package/dist-versioned/chunks/chunk.DQPVSTUQ.js +3 -3
  192. package/dist-versioned/chunks/chunk.EFEBQQHC.js +26 -26
  193. package/dist-versioned/chunks/chunk.EKFRFDTB.js +5 -5
  194. package/dist-versioned/chunks/chunk.H655M7FD.js +1 -1
  195. package/dist-versioned/chunks/chunk.HPR3PWAE.js +3 -3
  196. package/dist-versioned/chunks/chunk.I3PY3VYP.js +29 -29
  197. package/dist-versioned/chunks/chunk.IN3GJ5QL.js +3 -3
  198. package/dist-versioned/chunks/chunk.J2XBUIBC.js +2 -2
  199. package/dist-versioned/chunks/chunk.J7MMF6WJ.js +2 -2
  200. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  201. package/dist-versioned/chunks/chunk.MTSAWJLV.js +2 -2
  202. package/dist-versioned/chunks/chunk.NM6QP6RJ.js +2 -2
  203. package/dist-versioned/chunks/chunk.PDRECIYA.js +1 -1
  204. package/dist-versioned/chunks/chunk.PGZ5AWZ2.js +9 -9
  205. package/dist-versioned/chunks/chunk.PIR4YJUS.js +2 -2
  206. package/dist-versioned/chunks/chunk.QAZYUCBK.js +6 -6
  207. package/dist-versioned/chunks/chunk.QCICV36Z.js +6 -6
  208. package/dist-versioned/chunks/chunk.QP3SM2LZ.js +3 -3
  209. package/dist-versioned/chunks/chunk.R4BETATX.js +1 -1
  210. package/dist-versioned/chunks/chunk.RNSJAVQE.js +1 -1
  211. package/dist-versioned/chunks/chunk.RZRTIYXA.js +1 -1
  212. package/dist-versioned/chunks/chunk.SPBPHTSS.js +2 -2
  213. package/dist-versioned/chunks/chunk.SSH6ATRK.js +2 -2
  214. package/dist-versioned/chunks/{chunk.DAM3ICHP.js → chunk.TWXYFPBS.js} +32 -6
  215. package/dist-versioned/chunks/chunk.U5NFPAOX.js +2 -2
  216. package/dist-versioned/chunks/chunk.U6RY25TF.js +2 -2
  217. package/dist-versioned/chunks/chunk.UC5E3AEF.js +1 -1
  218. package/dist-versioned/chunks/chunk.UDZYWRPT.js +1 -1
  219. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  220. package/dist-versioned/chunks/chunk.V7TQ6VJU.js +1 -1
  221. package/dist-versioned/chunks/chunk.VHGHICFG.js +2 -2
  222. package/dist-versioned/chunks/chunk.WWS3CQ2Z.js +5 -5
  223. package/dist-versioned/chunks/chunk.XVFJS7VS.js +5 -5
  224. package/dist-versioned/chunks/chunk.Z2UY62T2.js +1 -1
  225. package/dist-versioned/chunks/chunk.ZGPGFEVP.js +5 -5
  226. package/dist-versioned/chunks/chunk.ZWJI7SLE.js +11 -11
  227. package/dist-versioned/components/accordion/accordion.d.ts +6 -4
  228. package/dist-versioned/components/accordion/accordion.js +1 -1
  229. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  230. package/dist-versioned/components/accordion-group/accordion-group.js +1 -1
  231. package/dist-versioned/components/animation/animation.d.ts +1 -1
  232. package/dist-versioned/components/audio/audio.d.ts +1 -1
  233. package/dist-versioned/components/badge/badge.d.ts +1 -1
  234. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  235. package/dist-versioned/components/button/button.d.ts +1 -1
  236. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  237. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  238. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  239. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  240. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  241. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  242. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  243. package/dist-versioned/components/divider/divider.d.ts +1 -1
  244. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  245. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  246. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  247. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  248. package/dist-versioned/components/header/header.d.ts +1 -1
  249. package/dist-versioned/components/icon/icon.d.ts +1 -1
  250. package/dist-versioned/components/include/include.d.ts +1 -1
  251. package/dist-versioned/components/input/input.d.ts +1 -1
  252. package/dist-versioned/components/link/link.d.ts +1 -1
  253. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  254. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  255. package/dist-versioned/components/notification/notification.d.ts +1 -1
  256. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  257. package/dist-versioned/components/option/option.d.ts +1 -1
  258. package/dist-versioned/components/popup/popup.d.ts +1 -1
  259. package/dist-versioned/components/quickfact/quickfact.d.ts +2 -2
  260. package/dist-versioned/components/quickfact/quickfact.js +2 -2
  261. package/dist-versioned/components/radio/radio.d.ts +1 -1
  262. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  263. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  264. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  265. package/dist-versioned/components/select/select.d.ts +4 -4
  266. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  267. package/dist-versioned/components/step/step.d.ts +1 -1
  268. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  269. package/dist-versioned/components/switch/switch.d.ts +1 -1
  270. package/dist-versioned/components/tab/tab.d.ts +2 -1
  271. package/dist-versioned/components/tab/tab.js +2 -1
  272. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  273. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  274. package/dist-versioned/components/tag/tag.d.ts +1 -1
  275. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  276. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  277. package/dist-versioned/components/video/video.d.ts +1 -1
  278. package/dist-versioned/custom-elements.json +220 -202
  279. package/dist-versioned/internal/form.js +3 -3
  280. package/dist-versioned/solid-components.css +2 -2
  281. package/dist-versioned/solid-components.js +3 -3
  282. package/dist-versioned/vscode.html-custom-data.json +80 -80
  283. package/dist-versioned/web-types.json +139 -137
  284. package/package.json +2 -2
  285. package/cdn/chunks/chunk.2UHPWLJE.js +0 -1
  286. package/cdn/chunks/chunk.FREYGZDJ.js +0 -1
  287. package/cdn/chunks/chunk.KFW32Q4Q.js +0 -1
  288. package/cdn/chunks/chunk.MMRILMYU.js +0 -1
  289. package/cdn-versioned/chunks/chunk.2UHPWLJE.js +0 -1
  290. package/cdn-versioned/chunks/chunk.FREYGZDJ.js +0 -1
  291. package/cdn-versioned/chunks/chunk.KFW32Q4Q.js +0 -1
  292. package/cdn-versioned/chunks/chunk.MMRILMYU.js +0 -1
  293. package/dist-versioned/chunks/chunk.6JI7NL3E.js +0 -65
@@ -1,3 +1,3 @@
1
1
  import{b as f}from"./chunk.5CK64GWQ.js";import{a as m}from"./chunk.D7TMPF3D.js";import{b as c}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as h,b as l,c as u,d as o,h as s}from"./chunk.APMDRZQD.js";import{b as n,e as d}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends s{constructor(){super(...arguments);this.formControlController=new c(this,{value:i=>i.checked?i.value||"on":void 0,defaultValue:i=>i.defaultChecked,setValue:(i,b)=>i.checked=b});this.showInvalidStyle=!1;this.title="";this.name="";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i),this.invalidMessage.textContent=i.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(i){this.input.focus(i)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(i){this.input.setCustomValidity(i),this.formControlController.updateValidity()}render(){return d`<label part="base" class="${r("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${p(this.value)}" .checked="${f(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${r(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
2
2
  peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
3
- peer-focus-visible:outline-primary`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${r("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${r("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...s.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],t([o("input")],e.prototype,"input",2),t([o("#invalid-message")],e.prototype,"invalidMessage",2),t([u()],e.prototype,"showInvalidStyle",2),t([l()],e.prototype,"title",2),t([l()],e.prototype,"name",2),t([l()],e.prototype,"value",2),t([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([l({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([m("checked")],e.prototype,"defaultChecked",2),t([l({reflect:!0})],e.prototype,"form",2),t([l({type:Boolean,reflect:!0})],e.prototype,"required",2),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([a(["checked"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([h("sd-4-0-0-next-2-switch")],e);export{e as a};
3
+ peer-focus-visible:outline-primary`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${r("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${r("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...s.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],t([o("input")],e.prototype,"input",2),t([o("#invalid-message")],e.prototype,"invalidMessage",2),t([u()],e.prototype,"showInvalidStyle",2),t([l()],e.prototype,"title",2),t([l()],e.prototype,"name",2),t([l()],e.prototype,"value",2),t([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([l({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([m("checked")],e.prototype,"defaultChecked",2),t([l({reflect:!0})],e.prototype,"form",2),t([l({type:Boolean,reflect:!0})],e.prototype,"required",2),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([a(["checked"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([h("sd-4-0-0-next-4-switch")],e);export{e as a};
@@ -1,11 +1,11 @@
1
- import{a as U}from"./chunk.FREYGZDJ.js";import{a as B}from"./chunk.VNKUGTKM.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as K}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as E,c as T}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.24SF73MY.js";import{a as C,d as S}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.APMDRZQD.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-2-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder=this.localize.term("comboboxDefaultPlaceholder");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>d`<sd-4-0-0-next-2-tag ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{a as U}from"./chunk.3ATYVOO4.js";import{a as B}from"./chunk.VNKUGTKM.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as K}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as E,c as T}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.24SF73MY.js";import{a as C,d as S}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.APMDRZQD.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-4-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder=this.localize.term("comboboxDefaultPlaceholder");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>d`<sd-4-0-0-next-4-tag ?disabled="${this.disabled}" part="tag" exportparts="
2
2
  base:tag__base,
3
3
  content:tag__content,
4
4
  removable-indicator:tag__removable-indicator,
5
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-4-0-0-next-2-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let a=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||a!=null&&a.disabled)return;if(a&&!a.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(a),this.lastOption=a,this.setOrderedSelectedOptions(a),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(a),this.setSelectedOptions(a)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==p&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity(),this.applySizeToOptions()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return d`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-0-next-2-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-0-next-2-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-0-next-2-tag ?disabled="${this.disabled}" part="tag" exportparts="
5
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-4-0-0-next-4-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let a=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||a!=null&&a.disabled)return;if(a&&!a.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(a),this.lastOption=a,this.setOrderedSelectedOptions(a),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(a),this.setSelectedOptions(a)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==p&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity(),this.applySizeToOptions()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return d`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-0-next-4-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-0-next-4-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-0-next-4-tag ?disabled="${this.disabled}" part="tag" exportparts="
6
6
  base:tag__base,
7
7
  content:tag__content,
8
8
  removable-indicator:tag__removable-indicator,
9
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-2-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-0-next-2-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let p=a+1;n=p>e.length-1?0:p}else{let p=a-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),K(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-0-next-2-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-0-next-2-optgroup"))return a;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(a),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(a),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-0-next-2-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await S(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=T(this,"combobox.show",{dir:this.localize.dir()});await C(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await S(this);let{keyframes:t,options:e}=T(this,"combobox.hide",{dir:this.localize.dir()});await C(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-0-next-2-option")){customElements.whenDefined("sd-4-0-0-next-2-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();t.forEach((i,a)=>{this.multiple&&(i.checkbox=!0),i.id=i.id||`sd-4-0-0-next-2-combobox-option-${a}`}),e.forEach((i,a)=>{i.id=i.id||`sd-4-0-0-next-2-combobox-optgroup-${a}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery(""),this.hasFocus&&this.value.length>0&&!this.open&&await this.show()}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled&&this.value.length>0,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
9
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-4-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-0-next-4-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let p=a+1;n=p>e.length-1?0:p}else{let p=a-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),K(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-0-next-4-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-0-next-4-optgroup"))return a;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(a),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(a),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-0-next-4-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await S(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=T(this,"combobox.show",{dir:this.localize.dir()});await C(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await S(this);let{keyframes:t,options:e}=T(this,"combobox.hide",{dir:this.localize.dir()});await C(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-0-next-4-option")){customElements.whenDefined("sd-4-0-0-next-4-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();t.forEach((i,a)=>{this.multiple&&(i.checkbox=!0),i.id=i.id||`sd-4-0-0-next-4-combobox-option-${a}`}),e.forEach((i,a)=>{i.id=i.id||`sd-4-0-0-next-4-combobox-optgroup-${a}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery(""),this.hasFocus&&this.value.length>0&&!this.open&&await this.show()}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled&&this.value.length>0,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-4-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
10
  popup:popup__content,
11
- "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-2-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-0-next-2-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-2-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-0-next-2-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-2-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-0-next-2-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-0-next-2-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-2-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-0-next-2-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-2-icon":F,"sd-4-0-0-next-2-popup":B,"sd-4-0-0-next-2-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-2-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-2-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-2-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-2-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-2-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-0-next-2-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-4-0-0-next-2-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([h()],s.prototype,"hasHover",2),l([h()],s.prototype,"hasFocus",2),l([h()],s.prototype,"displayInputValue",2),l([h()],s.prototype,"selectedTextLabel",2),l([h()],s.prototype,"selectedOptions",2),l([h()],s.prototype,"filteredOptions",2),l([h()],s.prototype,"allOptions",2),l([h()],s.prototype,"lastOption",2),l([h()],s.prototype,"showValidStyle",2),l([h()],s.prototype,"showInvalidStyle",2),l([o()],s.prototype,"name",2),l([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([A()],s.prototype,"defaultValue",2),l([o({reflect:!0})],s.prototype,"size",2),l([o()],s.prototype,"placeholder",2),l([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),l([o({type:Boolean})],s.prototype,"clearable",2),l([o({reflect:!0,type:Boolean})],s.prototype,"open",2),l([o({type:Boolean})],s.prototype,"hoist",2),l([o()],s.prototype,"label",2),l([o({reflect:!0})],s.prototype,"placement",2),l([o({attribute:"help-text"})],s.prototype,"helpText",2),l([o({reflect:!0})],s.prototype,"form",2),l([o({reflect:!0,type:Boolean})],s.prototype,"required",2),l([h()],s.prototype,"currentPlacement",2),l([o()],s.prototype,"getOption",2),l([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),l([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([o()],s.prototype,"filter",2),l([o()],s.prototype,"getTag",2),l([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-4-0-0-next-2-combobox")],s);E("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});E("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
11
+ "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-4-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-0-next-4-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-4-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-0-next-4-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-4-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-0-next-4-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-0-next-4-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-4-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-0-next-4-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-4-icon":F,"sd-4-0-0-next-4-popup":B,"sd-4-0-0-next-4-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-4-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-4-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-4-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-4-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-4-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-0-next-4-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-4-0-0-next-4-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([h()],s.prototype,"hasHover",2),l([h()],s.prototype,"hasFocus",2),l([h()],s.prototype,"displayInputValue",2),l([h()],s.prototype,"selectedTextLabel",2),l([h()],s.prototype,"selectedOptions",2),l([h()],s.prototype,"filteredOptions",2),l([h()],s.prototype,"allOptions",2),l([h()],s.prototype,"lastOption",2),l([h()],s.prototype,"showValidStyle",2),l([h()],s.prototype,"showInvalidStyle",2),l([o()],s.prototype,"name",2),l([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([A()],s.prototype,"defaultValue",2),l([o({reflect:!0})],s.prototype,"size",2),l([o()],s.prototype,"placeholder",2),l([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),l([o({type:Boolean})],s.prototype,"clearable",2),l([o({reflect:!0,type:Boolean})],s.prototype,"open",2),l([o({type:Boolean})],s.prototype,"hoist",2),l([o()],s.prototype,"label",2),l([o({reflect:!0})],s.prototype,"placement",2),l([o({attribute:"help-text"})],s.prototype,"helpText",2),l([o({reflect:!0})],s.prototype,"form",2),l([o({reflect:!0,type:Boolean})],s.prototype,"required",2),l([h()],s.prototype,"currentPlacement",2),l([o()],s.prototype,"getOption",2),l([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),l([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([o()],s.prototype,"filter",2),l([o()],s.prototype,"getTag",2),l([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-4-0-0-next-4-combobox")],s);E("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});E("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
@@ -1 +1 @@
1
- import{a as t}from"./chunk.DCOFYPWX.js";import{a as d,b as e,d as o,h as n}from"./chunk.APMDRZQD.js";import{b as l,e as s}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary"}connectedCallback(){super.connectedCallback()}flipFront(){this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),this.back.focus()}flipBack(){this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),this.front.focus()}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return s`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.frontVariant])}"></div><sd-4-0-0-next-2-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-4-0-0-next-2-icon library="system" name="reload" label="Flip to Back"></sd-4-0-0-next-2-icon></sd-4-0-0-next-2-button></div><div part="back" tabindex="0" class="${t("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${t("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.backVariant])}"></div><sd-4-0-0-next-2-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-4-0-0-next-2-icon library="system" name="reload" label="Flip to Front"></sd-4-0-0-next-2-icon></sd-4-0-0-next-2-button></div></div>`}};r.styles=[...n.styles,l`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),r=a([d("sd-4-0-0-next-2-flipcard")],r);export{r as a};
1
+ import{a as t}from"./chunk.DCOFYPWX.js";import{a as d,b as e,d as o,h as n}from"./chunk.APMDRZQD.js";import{b as l,e as s}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary"}connectedCallback(){super.connectedCallback()}flipFront(){this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),this.back.focus()}flipBack(){this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),this.front.focus()}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return s`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.frontVariant])}"></div><sd-4-0-0-next-4-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-4-0-0-next-4-icon library="system" name="reload" label="Flip to Back"></sd-4-0-0-next-4-icon></sd-4-0-0-next-4-button></div><div part="back" tabindex="0" class="${t("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${t("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.backVariant])}"></div><sd-4-0-0-next-4-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-4-0-0-next-4-icon library="system" name="reload" label="Flip to Front"></sd-4-0-0-next-4-icon></sd-4-0-0-next-4-button></div></div>`}};r.styles=[...n.styles,l`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),r=a([d("sd-4-0-0-next-4-flipcard")],r);export{r as a};
@@ -1 +1 @@
1
- import{a as n,b as i,g as c,h as o}from"./chunk.APMDRZQD.js";import{b as a,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.closeOthers=!1;this.handleAccordionShow=r=>{this.closeOthers&&this._accordionsInDefaultSlot.forEach(s=>{s!==r.target&&s.parentNode===r.target.parentNode&&s.removeAttribute("open")})}}connectedCallback(){super.connectedCallback(),this.addEventListener("sd-show",this.handleAccordionShow)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sd-show",this.handleAccordionShow)}render(){return l`<div part="base"><slot></slot></div>`}};e.styles=[...o.styles,a`:host{display:block}::slotted(sd-4-0-0-next-2-accordion:not(:first-of-type)){margin-top:-1px}`],t([c({selector:"sd-4-0-0-next-2-accordion"})],e.prototype,"_accordionsInDefaultSlot",2),t([i({attribute:"close-others",type:Boolean})],e.prototype,"closeOthers",2),e=t([n("sd-4-0-0-next-2-accordion-group")],e);export{e as a};
1
+ import{a as n,b as i,g as c,h as o}from"./chunk.APMDRZQD.js";import{b as a,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.closeOthers=!1;this.handleAccordionShow=r=>{this.closeOthers&&this._accordionsInDefaultSlot.forEach(s=>{s!==r.target&&s.parentNode===r.target.parentNode&&s.removeAttribute("open")})}}connectedCallback(){super.connectedCallback(),this.addEventListener("sd-show",this.handleAccordionShow)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sd-show",this.handleAccordionShow)}render(){return l`<div part="base"><slot></slot></div>`}};e.styles=[...o.styles,a`:host{display:block}::slotted(sd-4-0-0-next-4-accordion:not(:first-of-type)){margin-top:-1px}`],t([c({selector:"sd-4-0-0-next-4-accordion"})],e.prototype,"_accordionsInDefaultSlot",2),t([i({attribute:"close-others",type:Boolean})],e.prototype,"closeOthers",2),e=t([n("sd-4-0-0-next-4-accordion-group")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk.DCOFYPWX.js";import{a as l,b as e,h as o}from"./chunk.APMDRZQD.js";import{b as a,e as i}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return i`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,a`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-0-next-2-divider[orientation=horizontal]){display:block}:host(sd-4-0-0-next-2-divider[orientation=vertical]){display:inline-block}`],r([e({reflect:!0})],t.prototype,"orientation",2),r([e({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=r([l("sd-4-0-0-next-2-divider")],t);export{t as a};
1
+ import{a as n}from"./chunk.DCOFYPWX.js";import{a as l,b as e,h as o}from"./chunk.APMDRZQD.js";import{b as a,e as i}from"./chunk.IRWHG2Q4.js";import{e as r}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return i`<hr part="main" aria-orientation="${this.orientation}" class="${n(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};t.styles=[...o.styles,a`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-0-next-4-divider[orientation=horizontal]){display:block}:host(sd-4-0-0-next-4-divider[orientation=vertical]){display:inline-block}`],r([e({reflect:!0})],t.prototype,"orientation",2),r([e({type:Boolean,reflect:!0})],t.prototype,"inverted",2),t=r([l("sd-4-0-0-next-4-divider")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as l}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as h,b as a,d as f,h as n}from"./chunk.APMDRZQD.js";import{b as o,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((i,r)=>{i.index=r+1,i.size=this.size,i.orientation=this.orientation,this.notInteractive?(i.current=!1,i.disabled=!1,i.notInteractive=!0):i.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-4-0-0-next-2-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((i,r)=>{r===t?i.current=!0:r>t?i.disabled=!0:i.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return c`<div role="${this.notInteractive?"group":"navigation"}" class="h-full"><div role="list" part="base" class="${m("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};e.styles=[...n.styles,o`:host{width:-moz-max-content;width:max-content}`],s([f("[part=body]")],e.prototype,"body",2),s([a({reflect:!0})],e.prototype,"size",2),s([a({reflect:!0})],e.prototype,"orientation",2),s([a({type:Number,reflect:!0,attribute:"active-step"})],e.prototype,"activeStep",2),s([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],e.prototype,"notInteractive",2),s([l("size",{waitUntilFirstUpdate:!0})],e.prototype,"updateSize",1),s([l("orientation",{waitUntilFirstUpdate:!0})],e.prototype,"updateOrientation",1),s([l("notInteractive")],e.prototype,"handleInteractivityChange",1),e=s([h("sd-4-0-0-next-2-step-group")],e);export{e as a};
1
+ import{a as l}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.DCOFYPWX.js";import{a as h,b as a,d as f,h as n}from"./chunk.APMDRZQD.js";import{b as o,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((i,r)=>{i.index=r+1,i.size=this.size,i.orientation=this.orientation,this.notInteractive?(i.current=!1,i.disabled=!1,i.notInteractive=!0):i.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-4-0-0-next-4-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((i,r)=>{r===t?i.current=!0:r>t?i.disabled=!0:i.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return c`<div role="${this.notInteractive?"group":"navigation"}" class="h-full"><div role="list" part="base" class="${m("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};e.styles=[...n.styles,o`:host{width:-moz-max-content;width:max-content}`],s([f("[part=body]")],e.prototype,"body",2),s([a({reflect:!0})],e.prototype,"size",2),s([a({reflect:!0})],e.prototype,"orientation",2),s([a({type:Number,reflect:!0,attribute:"active-step"})],e.prototype,"activeStep",2),s([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],e.prototype,"notInteractive",2),s([l("size",{waitUntilFirstUpdate:!0})],e.prototype,"updateSize",1),s([l("orientation",{waitUntilFirstUpdate:!0})],e.prototype,"updateOrientation",1),s([l("notInteractive")],e.prototype,"handleInteractivityChange",1),e=s([h("sd-4-0-0-next-4-step-group")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as l}from"./chunk.KLRPP4NQ.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as d,b as n,d as r,h as a}from"./chunk.APMDRZQD.js";import{b as c,e as o}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new m(this)}updateMaxHeight(){var s;let i=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${i}px`),this.style.setProperty("--max-height",i)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}onOpenChange(){this.open?(this.emit("sd-show"),this.updateComplete.then(()=>{this.emit("sd-after-show")})):(this.emit("sd-hide"),this.updateComplete.then(()=>{this.emit("sd-after-hide")})),this.details.setAttribute("open",this.open.toString())}async show(){if(!this.open)return this.onToggleClick(),l(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),l(this,"sd-after-hide")}render(){return o`<details part="details"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details><button part="toggle" class="${p("sd-interactive sd-interactive--reset !h-full !justify-center !w-full !text-base !flex !items-center !underline !underline-offset-2 !toggle",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}">${this.open?o`<slot name="toggle-open"><sd-4-0-0-next-2-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-4-0-0-next-2-icon>${this.localize.term("showLess")}</slot>`:o`<slot name="toggle-closed"><sd-4-0-0-next-2-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-4-0-0-next-2-icon>${this.localize.term("showMore")}</slot>`}</button>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let i=document.createElement("div");i.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(g=>{let u=g.cloneNode(!0);i.appendChild(u)}),this.appendChild(i)}};e.styles=[...a.styles,c`:host{--gradient-color-start:hsla(0,0%,100%,0);--gradient-color-end:#fff;--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);position:absolute;width:100%}:host([inverted]:not([open])) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`],t([r(".content-preview")],e.prototype,"contentPreview",2),t([r("details")],e.prototype,"details",2),t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([h("open",{waitUntilFirstUpdate:!0})],e.prototype,"onOpenChange",1),e=t([d("sd-4-0-0-next-2-expandable")],e);export{e as a};
1
+ import{a as l}from"./chunk.KLRPP4NQ.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as m}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as d,b as n,d as r,h as a}from"./chunk.APMDRZQD.js";import{b as c,e as o}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new m(this)}updateMaxHeight(){var s;let i=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${i}px`),this.style.setProperty("--max-height",i)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}onOpenChange(){this.open?(this.emit("sd-show"),this.updateComplete.then(()=>{this.emit("sd-after-show")})):(this.emit("sd-hide"),this.updateComplete.then(()=>{this.emit("sd-after-hide")})),this.details.setAttribute("open",this.open.toString())}async show(){if(!this.open)return this.onToggleClick(),l(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),l(this,"sd-after-hide")}render(){return o`<details part="details"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details><button part="toggle" class="${p("sd-interactive sd-interactive--reset !h-full !justify-center !w-full !text-base !flex !items-center !underline !underline-offset-2 !toggle",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}">${this.open?o`<slot name="toggle-open"><sd-4-0-0-next-4-icon class="mr-2 text-xl" library="system" name="chevron-up"></sd-4-0-0-next-4-icon>${this.localize.term("showLess")}</slot>`:o`<slot name="toggle-closed"><sd-4-0-0-next-4-icon class="mr-2 text-xl" library="system" name="chevron-down"></sd-4-0-0-next-4-icon>${this.localize.term("showMore")}</slot>`}</button>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let i=document.createElement("div");i.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(g=>{let u=g.cloneNode(!0);i.appendChild(u)}),this.appendChild(i)}};e.styles=[...a.styles,c`:host{--gradient-color-start:hsla(0,0%,100%,0);--gradient-color-end:#fff;--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start) 0%,var(--gradient-color-end) 80%,var(--gradient-color-end) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content{max-block-size:var(--max-height-pixel,1000vh)}:host(:not([open])) .content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);position:absolute;width:100%}:host([inverted]:not([open])) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,rgba(0,53,142,0) 0,#00358e 80%,#00358e 100%))}`],t([r(".content-preview")],e.prototype,"contentPreview",2),t([r("details")],e.prototype,"details",2),t([n({type:Boolean,reflect:!0})],e.prototype,"open",2),t([n({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([h("open",{waitUntilFirstUpdate:!0})],e.prototype,"onOpenChange",1),e=t([d("sd-4-0-0-next-4-expandable")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as Mt,b as E,d as Et,h as Rt}from"./chunk.APMDRZQD.js";import{b as kt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as R,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,C=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),fe={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function pt(t,e,n){return C(t,V(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function G(t){return["top","bottom"].includes(I(t))?"y":"x"}function wt(t){return Ct(G(t))}function Bt(t,e,n){n===void 0&&(n=!1);let i=Q(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=ct(r)),[r,ct(r)]}function $t(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>ue[e])}function he(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function Ft(t,e,n,i){let o=Q(t),s=he(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function ct(t){return t.replace(/left|right|bottom|top/g,e=>fe[e])}function de(t){return R({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?de(t):{top:t,right:t,bottom:t,left:t}}function Z(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Nt(t,e,n){let{reference:i,floating:o}=t,s=G(e),r=wt(e),l=gt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,h;switch(a){case"top":h={x:f,y:i.y-o.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-o.width,y:u};break;default:h={x:i.x,y:i.y}}switch(Q(e)){case"start":h[r]-=m*(n&&c?-1:1);break;case"end":h[r]+=m*(n&&c?-1:1);break}return h}var Ht=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=Nt(c,i,a),m=i,h={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:v,data:A,reset:O}=await g({x:f,y:u,initialPlacement:i,placement:m,strategy:o,middlewareData:h,rects:c,platform:r,elements:{reference:t,floating:e}});f=y!=null?y:f,u=v!=null?v:u,h=W(R({},h),{[w]:R(R({},h[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:u}=Nt(c,m,a)),p=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:h}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=J(e,t),d=Tt(h),w=l[m?u==="floating"?"reference":"floating":u],g=Z(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=Z(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Wt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=J(t,e)||{};if(c==null)return{};let u=Tt(f),m={x:n,y:i},h=wt(o),d=gt(h),p=await r.getDimensions(c),w=h==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[h]-m[h]-s.floating[d],O=m[h]-s.reference[h],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),k=L?L[v]:0;(!k||!await(r.isElement==null?void 0:r.isElement(L)))&&(k=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=k/2-p[d]/2-1,M=V(u[g],N),X=V(u[y],N),H=M,q=k-p[d]-X,P=k/2-p[d]/2+j,D=pt(H,P,q),it=!a.arrow&&Q(o)!=null&&P!==D&&s.reference[d]/2-(P<H?M:X)-p[d]/2<0,_=it?P<H?P-H:P-q:0;return{[h]:m[h]+_,data:R({[h]:D,centerOffset:P-D-_},it&&{alignmentOffset:_}),reset:it}}});var Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,P=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:$t(l)),L=d!=="none";!m&&L&&O.push(...Ft(l,p,d,A));let k=[l,...O],j=await yt(e,w),N=[],M=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(j[g]),u){let D=Bt(o,r,A);N.push(j[D[0]],j[D[1]])}if(M=[...M,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,it=k[D];if(it)return{data:{index:D,overflows:M},reset:{placement:it}};let _=(H=M.filter(ot=>ot.overflows[0]<=0).sort((ot,U)=>ot.overflows[1]-U.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(h){case"bestFit":{var q;let ot=(q=M.filter(U=>{if(L){let K=G(U.placement);return K===y||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,ae)=>K+ae,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:q[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function me(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Q(n),a=G(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,u=J(e,t),{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof d=="number"&&(h=l==="end"?d*-1:d),a?{x:h*f,y:m*c}:{x:m*c,y:h*f}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await me(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:W(R({},a),{placement:r})}}}},_t=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=J(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}}}=w,a=dt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await yt(e,a),u=G(I(o)),m=Ct(u),h=c[m],d=c[u];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=h+f[g],A=h-f[y];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=pt(v,d,A)}let p=l.fn(W(R({},e),{[m]:h,[u]:d}));return W(R({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[u]:r}}})}}};var It=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,M=J(t,e),{apply:a=()=>{}}=M,c=dt(M,["apply"]),f=await yt(e,c),u=I(o),m=Q(o),h=G(o)==="y",{width:d,height:p}=s.floating,w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");let y=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],y),O=V(d-f[g],v),L=!e.middlewareData.shift,k=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(k=y),L&&!m){let X=C(f.left,0),H=C(f.right,0),q=C(f.top,0),P=C(f.bottom,0);h?j=d-2*(X!==0||H!==0?X+H:C(f.left,f.right)):k=p-2*(q!==0||P!==0?q+P:C(f.top,f.bottom))}await a(W(R({},e),{availableWidth:j,availableHeight:k}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function tt(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function F(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function qt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function vt(t){let e=bt(),n=z(t)?S(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ut(t){let e=Y(t);for(;F(e)&&!et(e);){if(vt(e))return e;if(ut(e))return null;e=Y(e)}return null}function bt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function S(t){return T(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||$(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:F(e)&&st(e)?e:Kt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Kt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=T(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=S(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=F(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=at(n)!==s||at(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!F(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Qt(e),r=(s?at(n.width):n.width)/i,l=(s?at(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var pe=B(0);function Zt(t){let e=T(t);return!bt()||!e.visualViewport?pe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ge(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function nt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ge(s,n,i)?Zt(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,u=o.height/r.y;if(s){let m=T(s),h=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=S(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=T(p),p=At(d)}}return Z({width:f,height:u,x:a,y:c})}function zt(t,e){let n=ht(t).scrollLeft;return e?e.left+n:nt($(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function we(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),u=F(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),F(i))){let h=nt(i);c=lt(i),f.x=h.x+i.clientLeft,f.y=h.y+i.clientTop}let m=r&&!u&&!s?te(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function ye(t){return Array.from(t.getClientRects())}function xe(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=C(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=C(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=C(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ve(t,e){let n=T(t),i=$(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=bt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function be(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=F(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Gt(t,e,n){let i;if(e==="viewport")i=ve(t,n);else if(e==="document")i=xe($(t));else if(z(e))i=be(e,n);else{let o=Zt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(i)}function ee(t,e){let n=Y(t);return n===e||!z(n)||et(n)?!1:S(n).position==="fixed"||ee(n,e)}function Ae(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&tt(l)!=="body"),o=null,s=S(t).position==="fixed",r=s?Y(t):t;for(;z(r)&&!et(r);){let l=S(r),a=vt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ee(t,r))?i=i.filter(f=>f!==r):o=l,r=Y(r)}return e.set(t,i),i}function Oe(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ae(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=C(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=C(u.left,c.left),c},Gt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ee(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Re(t,e,n){let i=F(e),o=$(e),s=n==="fixed",r=nt(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);if(i||!i&&!s)if((tt(e)!=="body"||st(o))&&(l=ht(e)),i){let m=nt(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else o&&(a.x=zt(o));let c=o&&!i&&!s?te(o,l):B(0),f=r.left+l.scrollLeft-a.x-c.x,u=r.top+l.scrollTop-a.y-c.y;return{x:f,y:u,width:r.width,height:r.height}}function Pt(t){return S(t).position==="static"}function Jt(t,e){if(!F(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=T(t);if(ut(t))return n;if(!F(t)){let o=Y(t);for(;o&&!et(o);){if(z(o)&&!Pt(o))return o;o=Y(o)}return n}let i=Jt(t,e);for(;i&&qt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Ce=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Re(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Te(t){return S(t).direction==="rtl"}var Pe={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:$,getClippingRect:Oe,getOffsetParent:ne,getElementRects:Ce,getClientRects:ye,getDimensions:Ee,getScale:lt,isElement:z,isRTL:Te};function Le(t,e){let n=null,i,o=$(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();let{left:c,top:f,width:u,height:m}=t.getBoundingClientRect();if(l||e(),!u||!m)return;let h=ft(f),d=ft(o.clientWidth-(c+u)),p=ft(o.clientHeight-(f+m)),w=ft(c),y={rootMargin:-h+"px "+-d+"px "+-p+"px "+-w+"px",threshold:C(0,V(1,a))||1},v=!0;function A(O){let L=O[0].intersectionRatio;if(L!==a){if(!v)return r();L?r(!1,L):i=setTimeout(()=>{r(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,W(R({},y),{root:o.ownerDocument}))}catch(O){n=new IntersectionObserver(A,y)}n.observe(t)}return r(!0),s}function ie(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Lt(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let u=c&&l?Le(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!a&&h.observe(c),h.observe(e));let d,p=a?nt(t):null;a&&w();function w(){let g=nt(t);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var oe=jt;var re=_t,se=Vt,St=It;var le=Wt;var ce=(t,e,n)=>{let i=new Map,o=R({platform:Pe},n),s=W(R({},o.platform),{_c:i});return Ht(t,e,W(R({},o),{platform:s}))};var x=class extends Rt{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=ie(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[oe({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(St({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(se({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(re({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(St({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(le({element:this.arrowEl,padding:this.arrowPadding})),ce(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,u="",m="",h="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",u=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:u,right:m,bottom:h,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Ot`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Ot`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Rt.styles,kt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Et('[part="popup"]')],x.prototype,"popup",2),b([Et('[part="arrow"]')],x.prototype,"arrowEl",2),b([E()],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({reflect:!0})],x.prototype,"placement",2),b([E({reflect:!0})],x.prototype,"strategy",2),b([E({type:Number})],x.prototype,"distance",2),b([E({type:Number})],x.prototype,"skidding",2),b([E({type:Boolean})],x.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],x.prototype,"arrowPadding",2),b([E({type:Boolean})],x.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Mt("sd-4-0-0-next-2-popup")],x);export{x as a};
1
+ import{a as Dt}from"./chunk.DCOFYPWX.js";import{a as Mt,b as E,d as Et,h as Rt}from"./chunk.APMDRZQD.js";import{b as kt,e as Ot}from"./chunk.IRWHG2Q4.js";import{a as R,b as W,c as dt,e as b}from"./chunk.TJOCV4DC.js";var V=Math.min,C=Math.max,at=Math.round,ft=Math.floor,B=t=>({x:t,y:t}),fe={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function pt(t,e,n){return C(t,V(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function G(t){return["top","bottom"].includes(I(t))?"y":"x"}function wt(t){return Ct(G(t))}function Bt(t,e,n){n===void 0&&(n=!1);let i=Q(t),o=wt(t),s=gt(o),r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=ct(r)),[r,ct(r)]}function $t(t){let e=ct(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>ue[e])}function he(t,e,n){let i=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?s:r;default:return[]}}function Ft(t,e,n,i){let o=Q(t),s=he(I(t),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),e&&(s=s.concat(s.map(mt)))),s}function ct(t){return t.replace(/left|right|bottom|top/g,e=>fe[e])}function de(t){return R({top:0,right:0,bottom:0,left:0},t)}function Tt(t){return typeof t!="number"?de(t):{top:t,right:t,bottom:t,left:t}}function Z(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Nt(t,e,n){let{reference:i,floating:o}=t,s=G(e),r=wt(e),l=gt(r),a=I(e),c=s==="y",f=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,m=i[l]/2-o[l]/2,h;switch(a){case"top":h={x:f,y:i.y-o.height};break;case"bottom":h={x:f,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-o.width,y:u};break;default:h={x:i.x,y:i.y}}switch(Q(e)){case"start":h[r]-=m*(n&&c?-1:1);break;case"end":h[r]+=m*(n&&c?-1:1);break}return h}var Ht=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=Nt(c,i,a),m=i,h={},d=0;for(let p=0;p<l.length;p++){let{name:w,fn:g}=l[p],{x:y,y:v,data:A,reset:O}=await g({x:f,y:u,initialPlacement:i,placement:m,strategy:o,middlewareData:h,rects:c,platform:r,elements:{reference:t,floating:e}});f=y!=null?y:f,u=v!=null?v:u,h=W(R({},h),{[w]:R(R({},h[w]),A)}),O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:o}):O.rects),{x:f,y:u}=Nt(c,m,a)),p=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:h}};async function yt(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=J(e,t),d=Tt(h),w=l[m?u==="floating"?"reference":"floating":u],g=Z(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},O=Z(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-O.top+d.top)/A.y,bottom:(O.bottom-g.bottom+d.bottom)/A.y,left:(g.left-O.left+d.left)/A.x,right:(O.right-g.right+d.right)/A.x}}var Wt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:f=0}=J(t,e)||{};if(c==null)return{};let u=Tt(f),m={x:n,y:i},h=wt(o),d=gt(h),p=await r.getDimensions(c),w=h==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",A=s.reference[d]+s.reference[h]-m[h]-s.floating[d],O=m[h]-s.reference[h],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c)),k=L?L[v]:0;(!k||!await(r.isElement==null?void 0:r.isElement(L)))&&(k=l.floating[v]||s.floating[d]);let j=A/2-O/2,N=k/2-p[d]/2-1,M=V(u[g],N),X=V(u[y],N),H=M,q=k-p[d]-X,P=k/2-p[d]/2+j,D=pt(H,P,q),it=!a.arrow&&Q(o)!=null&&P!==D&&s.reference[d]/2-(P<H?M:X)-p[d]/2<0,_=it?P<H?P-H:P-q:0;return{[h]:m[h]+_,data:R({[h]:D,centerOffset:P-D-_},it&&{alignmentOffset:_}),reset:it}}});var Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:c}=e,P=J(t,e),{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0}=P,w=dt(P,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let g=I(o),y=G(l),v=I(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=m||(v||!p?[ct(l)]:$t(l)),L=d!=="none";!m&&L&&O.push(...Ft(l,p,d,A));let k=[l,...O],j=await yt(e,w),N=[],M=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&N.push(j[g]),u){let D=Bt(o,r,A);N.push(j[D[0]],j[D[1]])}if(M=[...M,{placement:o,overflows:N}],!N.every(D=>D<=0)){var X,H;let D=(((X=s.flip)==null?void 0:X.index)||0)+1,it=k[D];if(it)return{data:{index:D,overflows:M},reset:{placement:it}};let _=(H=M.filter(ot=>ot.overflows[0]<=0).sort((ot,U)=>ot.overflows[1]-U.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(h){case"bestFit":{var q;let ot=(q=M.filter(U=>{if(L){let K=G(U.placement);return K===y||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,ae)=>K+ae,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:q[0];ot&&(_=ot);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function me(t,e){let{placement:n,platform:i,elements:o}=t,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=I(n),l=Q(n),a=G(n)==="y",c=["left","top"].includes(r)?-1:1,f=s&&a?-1:1,u=J(e,t),{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof d=="number"&&(h=l==="end"?d*-1:d),a?{x:h*f,y:m*c}:{x:m*c,y:h*f}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:s,placement:r,middlewareData:l}=e,a=await me(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:W(R({},a),{placement:r})}}}},_t=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o}=e,w=J(t,e),{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}}}=w,a=dt(w,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},f=await yt(e,a),u=G(I(o)),m=Ct(u),h=c[m],d=c[u];if(s){let g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=h+f[g],A=h-f[y];h=pt(v,h,A)}if(r){let g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",v=d+f[g],A=d-f[y];d=pt(v,d,A)}let p=l.fn(W(R({},e),{[m]:h,[u]:d}));return W(R({},p),{data:{x:p.x-n,y:p.y-i,enabled:{[m]:s,[u]:r}}})}}};var It=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:s,platform:r,elements:l}=e,M=J(t,e),{apply:a=()=>{}}=M,c=dt(M,["apply"]),f=await yt(e,c),u=I(o),m=Q(o),h=G(o)==="y",{width:d,height:p}=s.floating,w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");let y=p-f.top-f.bottom,v=d-f.left-f.right,A=V(p-f[w],y),O=V(d-f[g],v),L=!e.middlewareData.shift,k=A,j=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=v),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(k=y),L&&!m){let X=C(f.left,0),H=C(f.right,0),q=C(f.top,0),P=C(f.bottom,0);h?j=d-2*(X!==0||H!==0?X+H:C(f.left,f.right)):k=p-2*(q!==0||P!==0?q+P:C(f.top,f.bottom))}await a(W(R({},e),{availableWidth:j,availableHeight:k}));let N=await r.getDimensions(l.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window!="undefined"}function tt(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return xt()?t instanceof Node||t instanceof T(t).Node:!1}function z(t){return xt()?t instanceof Element||t instanceof T(t).Element:!1}function F(t){return xt()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function Yt(t){return!xt()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function qt(t){return["table","td","th"].includes(tt(t))}function ut(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(n){return!1}})}function vt(t){let e=bt(),n=z(t)?S(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ut(t){let e=Y(t);for(;F(e)&&!et(e);){if(vt(e))return e;if(ut(e))return null;e=Y(e)}return null}function bt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function S(t){return T(t).getComputedStyle(t)}function ht(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||$(t);return Yt(e)?e.host:e}function Kt(t){let e=Y(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:F(e)&&st(e)?e:Kt(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=Kt(t),s=o===((i=t.ownerDocument)==null?void 0:i.body),r=T(o);if(s){let l=At(r);return e.concat(r,r.visualViewport||[],st(o)?o:[],l&&n?rt(l):[])}return e.concat(o,rt(o,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=S(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=F(t),s=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=at(n)!==s||at(i)!==r;return l&&(n=s,i=r),{width:n,height:i,$:l}}function Lt(t){return z(t)?t:t.contextElement}function lt(t){let e=Lt(t);if(!F(e))return B(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:s}=Qt(e),r=(s?at(n.width):n.width)/i,l=(s?at(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}var pe=B(0);function Zt(t){let e=T(t);return!bt()||!e.visualViewport?pe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ge(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function nt(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),s=Lt(t),r=B(1);e&&(i?z(i)&&(r=lt(i)):r=lt(t));let l=ge(s,n,i)?Zt(s):B(0),a=(o.left+l.x)/r.x,c=(o.top+l.y)/r.y,f=o.width/r.x,u=o.height/r.y;if(s){let m=T(s),h=i&&z(i)?T(i):i,d=m,p=At(d);for(;p&&i&&h!==d;){let w=lt(p),g=p.getBoundingClientRect(),y=S(p),v=g.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,A=g.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,f*=w.x,u*=w.y,a+=v,c+=A,d=T(p),p=At(d)}}return Z({width:f,height:u,x:a,y:c})}function zt(t,e){let n=ht(t).scrollLeft;return e?e.left+n:nt($(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:zt(t,i)),s=i.top+e.scrollTop;return{x:o,y:s}}function we(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,s=o==="fixed",r=$(i),l=e?ut(e.floating):!1;if(i===r||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=B(1),f=B(0),u=F(i);if((u||!u&&!s)&&((tt(i)!=="body"||st(r))&&(a=ht(i)),F(i))){let h=nt(i);c=lt(i),f.x=h.x+i.clientLeft,f.y=h.y+i.clientTop}let m=r&&!u&&!s?te(r,a,!0):B(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-a.scrollTop*c.y+f.y+m.y}}function ye(t){return Array.from(t.getClientRects())}function xe(t){let e=$(t),n=ht(t),i=t.ownerDocument.body,o=C(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=C(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-n.scrollLeft+zt(t),l=-n.scrollTop;return S(i).direction==="rtl"&&(r+=C(e.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ve(t,e){let n=T(t),i=$(t),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;let c=bt();(!c||c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function be(t,e){let n=nt(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,s=F(t)?lt(t):B(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=o*s.x,c=i*s.y;return{width:r,height:l,x:a,y:c}}function Gt(t,e,n){let i;if(e==="viewport")i=ve(t,n);else if(e==="document")i=xe($(t));else if(z(e))i=be(e,n);else{let o=Zt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(i)}function ee(t,e){let n=Y(t);return n===e||!z(n)||et(n)?!1:S(n).position==="fixed"||ee(n,e)}function Ae(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(l=>z(l)&&tt(l)!=="body"),o=null,s=S(t).position==="fixed",r=s?Y(t):t;for(;z(r)&&!et(r);){let l=S(r),a=vt(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||st(r)&&!a&&ee(t,r))?i=i.filter(f=>f!==r):o=l,r=Y(r)}return e.set(t,i),i}function Oe(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,r=[...n==="clippingAncestors"?ut(e)?[]:Ae(e,this._c):[].concat(n),i],l=r[0],a=r.reduce((c,f)=>{let u=Gt(e,f,o);return c.top=C(u.top,c.top),c.right=V(u.right,c.right),c.bottom=V(u.bottom,c.bottom),c.left=C(u.left,c.left),c},Gt(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ee(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Re(t,e,n){let i=F(e),o=$(e),s=n==="fixed",r=nt(t,!0,s,e),l={scrollLeft:0,scrollTop:0},a=B(0);if(i||!i&&!s)if((tt(e)!=="body"||st(o))&&(l=ht(e)),i){let m=nt(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else o&&(a.x=zt(o));let c=o&&!i&&!s?te(o,l):B(0),f=r.left+l.scrollLeft-a.x-c.x,u=r.top+l.scrollTop-a.y-c.y;return{x:f,y:u,width:r.width,height:r.height}}function Pt(t){return S(t).position==="static"}function Jt(t,e){if(!F(t)||S(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=T(t);if(ut(t))return n;if(!F(t)){let o=Y(t);for(;o&&!et(o);){if(z(o)&&!Pt(o))return o;o=Y(o)}return n}let i=Jt(t,e);for(;i&&qt(i)&&Pt(i);)i=Jt(i,e);return i&&et(i)&&Pt(i)&&!vt(i)?n:i||Ut(t)||n}var Ce=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,i=await n(t.floating);return{reference:Re(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Te(t){return S(t).direction==="rtl"}var Pe={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:$,getClippingRect:Oe,getOffsetParent:ne,getElementRects:Ce,getClientRects:ye,getDimensions:Ee,getScale:lt,isElement:z,isRTL:Te};function Le(t,e){let n=null,i,o=$(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();let{left:c,top:f,width:u,height:m}=t.getBoundingClientRect();if(l||e(),!u||!m)return;let h=ft(f),d=ft(o.clientWidth-(c+u)),p=ft(o.clientHeight-(f+m)),w=ft(c),y={rootMargin:-h+"px "+-d+"px "+-p+"px "+-w+"px",threshold:C(0,V(1,a))||1},v=!0;function A(O){let L=O[0].intersectionRatio;if(L!==a){if(!v)return r();L?r(!1,L):i=setTimeout(()=>{r(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(A,W(R({},y),{root:o.ownerDocument}))}catch(O){n=new IntersectionObserver(A,y)}n.observe(t)}return r(!0),s}function ie(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Lt(t),f=o||s?[...c?rt(c):[],...rt(e)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});let u=c&&l?Le(c,n):null,m=-1,h=null;r&&(h=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!a&&h.observe(c),h.observe(e));let d,p=a?nt(t):null;a&&w();function w(){let g=nt(t);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,d=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(d)}}var oe=jt;var re=_t,se=Vt,St=It;var le=Wt;var ce=(t,e,n)=>{let i=new Map,o=R({platform:Pe},n),s=W(R({},o.platform),{_c:i});return Ht(t,e,W(R({},o),{platform:s}))};var x=class extends Rt{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(n){super.updated(n),n.has("active")&&(this.active?this.start():this.stop()),n.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(i=>this.handleCurrentPlacementChange(i));let n={attributes:!0};this.mutationObserver.observe(this,n)}handleCurrentPlacementChange(n){return n.forEach(i=>{if(i.attributeName==="data-current-placement"){let o=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:o})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let n=this.getRootNode();this.anchorEl=n.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=ie(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(n=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>n())):n()})}reposition(){if(!this.active||!this.anchorEl)return;let n=[oe({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?n.push(St({apply:({rects:i})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=o?`${i.reference.width}px`:"",this.popup.style.height=s?`${i.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&n.push(se({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&n.push(re({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?n.push(St({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:i,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${i}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&n.push(le({element:this.arrowEl,padding:this.arrowPadding})),ce(this.anchorEl,this.popup,{placement:this.placement,middleware:n,strategy:this.strategy}).then(({x:i,y:o,middlewareData:s,placement:r})=>{let l=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${i}px`,top:`${o}px`}),this.arrow){let c=s.arrow.x,f=s.arrow.y,u="",m="",h="",d="";if(this.arrowPlacement==="start"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m=l?p:"",d=l?"":p}else if(this.arrowPlacement==="end"){let p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=l?"":p,d=l?p:"",h=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(d=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(d=typeof c=="number"?`${c}px`:"",u=typeof f=="number"?`${f}px`:"");Object.assign(this.arrowEl.style,{top:u,right:m,bottom:h,left:d,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return Ot`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${Dt("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?Ot`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};x.styles=[...Rt.styles,kt`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],b([Et('[part="popup"]')],x.prototype,"popup",2),b([Et('[part="arrow"]')],x.prototype,"arrowEl",2),b([E()],x.prototype,"anchor",2),b([E({type:Boolean,reflect:!0})],x.prototype,"active",2),b([E({reflect:!0})],x.prototype,"placement",2),b([E({reflect:!0})],x.prototype,"strategy",2),b([E({type:Number})],x.prototype,"distance",2),b([E({type:Number})],x.prototype,"skidding",2),b([E({type:Boolean})],x.prototype,"arrow",2),b([E({attribute:"arrow-placement"})],x.prototype,"arrowPlacement",2),b([E({attribute:"arrow-padding",type:Number})],x.prototype,"arrowPadding",2),b([E({type:Boolean})],x.prototype,"flip",2),b([E({attribute:"flip-fallback-placements",converter:{fromAttribute:n=>n.split(" ").map(i=>i.trim()).filter(i=>i!==""),toAttribute:n=>n.join(" ")}})],x.prototype,"flipFallbackPlacements",2),b([E({attribute:"flip-fallback-strategy"})],x.prototype,"flipFallbackStrategy",2),b([E({type:Object})],x.prototype,"flipBoundary",2),b([E({attribute:"flip-padding",type:Number})],x.prototype,"flipPadding",2),b([E({type:Boolean})],x.prototype,"shift",2),b([E({type:Object})],x.prototype,"shiftBoundary",2),b([E({attribute:"shift-padding",type:Number})],x.prototype,"shiftPadding",2),b([E({attribute:"auto-size"})],x.prototype,"autoSize",2),b([E()],x.prototype,"sync",2),b([E({type:Object})],x.prototype,"autoSizeBoundary",2),b([E({attribute:"auto-size-padding",type:Number})],x.prototype,"autoSizePadding",2),x=b([Mt("sd-4-0-0-next-4-popup")],x);export{x as a};
@@ -1 +1 @@
1
- var p=t=>Array.from(t.assignedElements({flatten:!0})),o=t=>t.tagName.toLocaleLowerCase()==="sd-4-0-0-next-2-option"?t:Array.from(t.querySelectorAll(":scope > sd-4-0-0-next-2-option")),e=t=>t.tagName.toLocaleLowerCase()==="sd-4-0-0-next-2-optgroup",r=t=>t.map(o),n=t=>t.filter(e),s=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();export{p as a,o as b,e as c,r as d,n as e,s as f};
1
+ var p=t=>Array.from(t.assignedElements({flatten:!0})),o=t=>t.tagName.toLocaleLowerCase()==="sd-4-0-0-next-4-option"?t:Array.from(t.querySelectorAll(":scope > sd-4-0-0-next-4-option")),e=t=>t.tagName.toLocaleLowerCase()==="sd-4-0-0-next-4-optgroup",r=t=>t.map(o),n=t=>t.filter(e),s=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();export{p as a,o as b,e as c,r as d,n as e,s as f};
@@ -1 +1 @@
1
- import{a as k}from"./chunk.X2O263YD.js";import{a as f,b as y}from"./chunk.3L472FD4.js";import{a as l,c as r}from"./chunk.A3DKF5BY.js";import{a,d}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as b,b as h,d as c,h as m}from"./chunk.APMDRZQD.js";import{b as v,e as n}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.hasSlotController=new x(this,"footer");this.localize=new w(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new k(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),f(this))}disconnectedCallback(){super.disconnectedCallback(),y(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let i=r(this,"dialog.denyClose",{dir:this.localize.dir()});a(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),f(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([d(this.dialog),d(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let s=r(this,"dialog.show",{dir:this.localize.dir()}),i=r(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([a(this.panel,s.keyframes,s.options),a(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([d(this.dialog),d(this.overlay)]);let e=r(this,"dialog.hide",{dir:this.localize.dir()}),s=r(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([a(this.overlay,s.keyframes,s.options).then(()=>{this.overlay.hidden=!0}),a(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,y(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&setTimeout(()=>i.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return n`<div part="base" class="${p("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?n`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:n`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":n`<sd-4-0-0-next-2-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${p("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-4-0-0-next-2-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-0-0-next-2-icon></sd-4-0-0-next-2-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};t.styles=[...m.styles,v`:host{--width:662px}[part=panel]{width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],o([c('[part="base"]')],t.prototype,"dialog",2),o([c('[part="panel"]')],t.prototype,"panel",2),o([c('[part="overlay"]')],t.prototype,"overlay",2),o([h({type:Boolean,reflect:!0})],t.prototype,"open",2),o([h({reflect:!0})],t.prototype,"headline",2),o([h({attribute:"no-close-button",type:Boolean,reflect:!0})],t.prototype,"noCloseButton",2),o([g("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=o([b("sd-4-0-0-next-2-dialog")],t);l("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});l("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});l("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});l("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});l("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{t as a};
1
+ import{a as k}from"./chunk.X2O263YD.js";import{a as f,b as y}from"./chunk.3L472FD4.js";import{a as l,c as r}from"./chunk.A3DKF5BY.js";import{a,d}from"./chunk.RQYP7MH5.js";import{a as u}from"./chunk.KLRPP4NQ.js";import{a as g}from"./chunk.E2DRD2OX.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as b,b as h,d as c,h as m}from"./chunk.APMDRZQD.js";import{b as v,e as n}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var t=class extends m{constructor(){super(...arguments);this.hasSlotController=new x(this,"footer");this.localize=new w(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new k(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),f(this))}disconnectedCallback(){super.disconnectedCallback(),y(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let i=r(this,"dialog.denyClose",{dir:this.localize.dir()});a(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),f(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([d(this.dialog),d(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let s=r(this,"dialog.show",{dir:this.localize.dir()}),i=r(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([a(this.panel,s.keyframes,s.options),a(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([d(this.dialog),d(this.overlay)]);let e=r(this,"dialog.hide",{dir:this.localize.dir()}),s=r(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([a(this.overlay,s.keyframes,s.options).then(()=>{this.overlay.hidden=!0}),a(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,y(this);let i=this.originalTrigger;typeof(i==null?void 0:i.focus)=="function"&&setTimeout(()=>i.focus()),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,u(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,u(this,"sd-after-hide")}render(){return n`<div part="base" class="${p("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?n`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:n`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":n`<sd-4-0-0-next-4-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${p("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-4-0-0-next-4-icon label="${this.localize.term("close")}" name="close" library="system" color="currentColor"></sd-4-0-0-next-4-icon></sd-4-0-0-next-4-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};t.styles=[...m.styles,v`:host{--width:662px}[part=panel]{width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],o([c('[part="base"]')],t.prototype,"dialog",2),o([c('[part="panel"]')],t.prototype,"panel",2),o([c('[part="overlay"]')],t.prototype,"overlay",2),o([h({type:Boolean,reflect:!0})],t.prototype,"open",2),o([h({reflect:!0})],t.prototype,"headline",2),o([h({attribute:"no-close-button",type:Boolean,reflect:!0})],t.prototype,"noCloseButton",2),o([g("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=o([b("sd-4-0-0-next-4-dialog")],t);l("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});l("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});l("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});l("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});l("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{t as a};
@@ -1 +1 @@
1
- import{c}from"./chunk.3L472FD4.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as m,b as g,c as d,d as b,h as v}from"./chunk.APMDRZQD.js";import{b as f,e as h}from"./chunk.IRWHG2Q4.js";import{a as p,e as n}from"./chunk.TJOCV4DC.js";var r=class extends v{constructor(){super(...arguments);this.localize=new w(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-4-0-0-next-2-tab"),customElements.whenDefined("sd-4-0-0-next-2-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls()}),this.mutationObserver=new MutationObserver(s=>{s.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this.setAriaLabels()),s.some(e=>e.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then(()=>{new IntersectionObserver((e,l)=>{var a;e[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((a=this.activeTab)!=null?a:this.tabs[0],{emitEvents:!1}),l.unobserve(e[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(e=>t.includeDisabled?e.tagName.toLowerCase()==="sd-4-0-0-next-2-tab":e.tagName.toLowerCase()==="sd-4-0-0-next-2-tab"&&!e.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-4-0-0-next-2-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let e=t.target.closest("sd-4-0-0-next-2-tab");(e==null?void 0:e.closest("sd-4-0-0-next-2-tab-group"))===this&&e!==null&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){let e=t.target.closest("sd-4-0-0-next-2-tab");if((e==null?void 0:e.closest("sd-4-0-0-next-2-tab-group"))===this){if(["Enter"," "].includes(t.key)&&e!==null&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let a=this.tabs.indexOf(this.getActiveTab());e!==null&&c(this.tabs[a+1],this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let a=this.tabs.indexOf(this.getActiveTab());e!==null&&c(this.tabs[a-1],this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let a=this.tabs.find(i=>i.matches(":focus")),u=this.localize.dir()==="rtl";if((a==null?void 0:a.tagName.toLowerCase())==="sd-4-0-0-next-2-tab"){let i=this.tabs.indexOf(a);t.key==="Home"?i=0:t.key==="End"?i=this.tabs.length-1:t.key===(u?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?i--:(t.key===(u?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),c(this.tabs[i],this.nav,"horizontal"),t.preventDefault()}}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,s){if(s=p({emitEvents:!0,scrollBehavior:"auto"},s),t!==this.activeTab&&!t.disabled){let e=this.activeTab;this.activeTab=t,this.tabs.map(l=>l.active=l===this.activeTab),this.panels.map(l=>{var a;return l.active=l.name===((a=this.activeTab)==null?void 0:a.panel)}),c(this.activeTab,this.nav,"horizontal",s.scrollBehavior),s.emitEvents&&(e&&this.emit("sd-tab-hide",{detail:{name:e.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let s=this.panels.find(e=>e.name===t.panel);s&&t.setAttribute("aria-controls",s.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}show(t){let s=this.tabs.find(e=>e.panel===t);s&&this.setActiveTab(s,{scrollBehavior:"smooth"})}render(){let t=this.localize.dir()==="rtl";return h`<div part="base" class="${o("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${o(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?h`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${o("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-4-0-0-next-2-icon library="system" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${o("h-6 w-12 rotate-90 grid place-items-center")}"></sd-4-0-0-next-2-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${o("flex flex-auto relative flex-row")}" role="tablist"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?h`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${o("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-4-0-0-next-2-icon library="system" name="${t?"chevron-down":"chevron-up"}" label="next" class="${o("h-6 w-12 rotate-90 grid place-items-center")}"></sd-4-0-0-next-2-icon></button>`:""}</div><slot part="body" class="${o("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};r.styles=[...v.styles,f`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-4-0-0-next-2-tab-panel){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}::slotted(sd-4-0-0-next-2-tab-panel){--padding:1rem 0}`],n([b("[part=base]")],r.prototype,"tabGroup",2),n([b("[part=body]")],r.prototype,"body",2),n([b("[part=scroll-container]")],r.prototype,"nav",2),n([d()],r.prototype,"hasScrollControls",2),n([d()],r.prototype,"variant",2),n([g()],r.prototype,"activation",2),r=n([m("sd-4-0-0-next-2-tab-group")],r);export{r as a};
1
+ import{c}from"./chunk.3L472FD4.js";import{a as w}from"./chunk.26YUWEYR.js";import{a as o}from"./chunk.DCOFYPWX.js";import{a as m,b as g,c as d,d as b,h as v}from"./chunk.APMDRZQD.js";import{b as f,e as h}from"./chunk.IRWHG2Q4.js";import{a as p,e as n}from"./chunk.TJOCV4DC.js";var r=class extends v{constructor(){super(...arguments);this.localize=new w(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-4-0-0-next-4-tab"),customElements.whenDefined("sd-4-0-0-next-4-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls()}),this.mutationObserver=new MutationObserver(s=>{s.some(e=>!["aria-labelledby","aria-controls"].includes(e.attributeName))&&setTimeout(()=>this.setAriaLabels()),s.some(e=>e.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then(()=>{new IntersectionObserver((e,l)=>{var a;e[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((a=this.activeTab)!=null?a:this.tabs[0],{emitEvents:!1}),l.unobserve(e[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(t={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(e=>t.includeDisabled?e.tagName.toLowerCase()==="sd-4-0-0-next-4-tab":e.tagName.toLowerCase()==="sd-4-0-0-next-4-tab"&&!e.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-4-0-0-next-4-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let e=t.target.closest("sd-4-0-0-next-4-tab");(e==null?void 0:e.closest("sd-4-0-0-next-4-tab-group"))===this&&e!==null&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){let e=t.target.closest("sd-4-0-0-next-4-tab");if((e==null?void 0:e.closest("sd-4-0-0-next-4-tab-group"))===this){if(["Enter"," "].includes(t.key)&&e!==null&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let a=this.tabs.indexOf(this.getActiveTab());e!==null&&c(this.tabs[a+1],this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let a=this.tabs.indexOf(this.getActiveTab());e!==null&&c(this.tabs[a-1],this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let a=this.tabs.find(i=>i.matches(":focus")),u=this.localize.dir()==="rtl";if((a==null?void 0:a.tagName.toLowerCase())==="sd-4-0-0-next-4-tab"){let i=this.tabs.indexOf(a);t.key==="Home"?i=0:t.key==="End"?i=this.tabs.length-1:t.key===(u?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?i--:(t.key===(u?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),c(this.tabs[i],this.nav,"horizontal"),t.preventDefault()}}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,s){if(s=p({emitEvents:!0,scrollBehavior:"auto"},s),t!==this.activeTab&&!t.disabled){let e=this.activeTab;this.activeTab=t,this.tabs.map(l=>l.active=l===this.activeTab),this.panels.map(l=>{var a;return l.active=l.name===((a=this.activeTab)==null?void 0:a.panel)}),c(this.activeTab,this.nav,"horizontal",s.scrollBehavior),s.emitEvents&&(e&&this.emit("sd-tab-hide",{detail:{name:e.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let s=this.panels.find(e=>e.name===t.panel);s&&t.setAttribute("aria-controls",s.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}show(t){let s=this.tabs.find(e=>e.panel===t);s&&this.setActiveTab(s,{scrollBehavior:"smooth"})}render(){let t=this.localize.dir()==="rtl";return h`<div part="base" class="${o("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${o(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?h`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${o("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-4-0-0-next-4-icon library="system" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${o("h-6 w-12 rotate-90 grid place-items-center")}"></sd-4-0-0-next-4-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${o("flex flex-auto relative flex-row")}" role="tablist"><div part="separation" class="w-full border-[0.25px] border-neutral-400 absolute bottom-0"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?h`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" class="${o("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-4-0-0-next-4-icon library="system" name="${t?"chevron-down":"chevron-up"}" label="next" class="${o("h-6 w-12 rotate-90 grid place-items-center")}"></sd-4-0-0-next-4-icon></button>`:""}</div><slot part="body" class="${o("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};r.styles=[...v.styles,f`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}:focus-within::slotted(sd-4-0-0-next-4-tab-panel){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}::slotted(sd-4-0-0-next-4-tab-panel){--padding:1rem 0}`],n([b("[part=base]")],r.prototype,"tabGroup",2),n([b("[part=body]")],r.prototype,"body",2),n([b("[part=scroll-container]")],r.prototype,"nav",2),n([d()],r.prototype,"hasScrollControls",2),n([d()],r.prototype,"variant",2),n([g()],r.prototype,"activation",2),r=n([m("sd-4-0-0-next-4-tab-group")],r);export{r as a};
@@ -1 +1 @@
1
- import{a}from"./chunk.DCOFYPWX.js";import{a as p,b as o,c as d,d as v,h as n}from"./chunk.APMDRZQD.js";import{b as l,e as t}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var r=class extends n{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(e,s){return{0:this.smallSvg(s),414:this.mediumSvg(s),640:this.largeSvg(s)}[e]}largeSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return t`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return t`<div class="${a({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${a("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":t`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return t`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(e){return t`<div class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[e],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return t`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${a(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return t`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let e=this.variant.startsWith("border-")||this.variant==="image";return t`<div class="${a({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${e?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};r.styles=[...n.styles,l`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],i([v("[part=base]")],r.prototype,"containerElem",2),i([o({type:String})],r.prototype,"variant",2),i([o({type:Array})],r.prototype,"shapes",2),i([d()],r.prototype,"componentBreakpoint",2),r=i([p("sd-4-0-0-next-2-brandshape")],r);export{r as a};
1
+ import{a}from"./chunk.DCOFYPWX.js";import{a as p,b as o,c as d,d as v,h as n}from"./chunk.APMDRZQD.js";import{b as l,e as t}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var r=class extends n{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(e,s){return{0:this.smallSvg(s),414:this.mediumSvg(s),640:this.largeSvg(s)}[e]}largeSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(e){return e==="top"?t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:t`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return t`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return t`<div class="${a({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${a("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":t`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return t`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(e){return t`<div class="${a({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[e],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return t`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${a(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return t`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let e=this.variant.startsWith("border-")||this.variant==="image";return t`<div class="${a({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${e?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};r.styles=[...n.styles,l`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],i([v("[part=base]")],r.prototype,"containerElem",2),i([o({type:String})],r.prototype,"variant",2),i([o({type:Array})],r.prototype,"shapes",2),i([d()],r.prototype,"componentBreakpoint",2),r=i([p("sd-4-0-0-next-4-brandshape")],r);export{r as a};
@@ -1,3 +1,3 @@
1
- import{b as d}from"./chunk.5CK64GWQ.js";import{a as f}from"./chunk.D7TMPF3D.js";import{b as m}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as c,b as r,c as u,d as a,h as o}from"./chunk.APMDRZQD.js";import{b as h,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:i=>i.checked?i.value||"on":void 0,defaultValue:i=>i.defaultChecked,setValue:(i,b)=>i.checked=b});this.title="";this.name="";this.size="lg";this.disabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i),this.invalidMessage.textContent=i.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(i){this.input.focus(i)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(i){this.input.setCustomValidity(i),this.formControlController.updateValidity()}render(){let i=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return l`<label part="base" class="${s("sd-4-0-0-next-2-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${s(`relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4
1
+ import{b as d}from"./chunk.5CK64GWQ.js";import{a as f}from"./chunk.D7TMPF3D.js";import{b as m}from"./chunk.65NSSTJE.js";import{a as p}from"./chunk.HE2LNCWW.js";import{a as n}from"./chunk.E2DRD2OX.js";import{a as s}from"./chunk.DCOFYPWX.js";import{a as c,b as r,c as u,d as a,h as o}from"./chunk.APMDRZQD.js";import{b as h,e as l}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.formControlController=new m(this,{value:i=>i.checked?i.value||"on":void 0,defaultValue:i=>i.defaultChecked,setValue:(i,b)=>i.checked=b});this.title="";this.name="";this.size="lg";this.disabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i),this.invalidMessage.textContent=i.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(i){this.input.focus(i)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(i){this.input.setCustomValidity(i),this.formControlController.updateValidity()}render(){let i=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return l`<label part="base" class="${s("sd-4-0-0-next-4-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${p(this.value)}" .indeterminate="${d(this.indeterminate)}" .checked="${d(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${s(`relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4
2
2
  peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
3
- peer-focus-visible:outline-primary`,{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[i])}">${this.checked?l`<sd-4-0-0-next-2-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-4-0-0-next-2-icon>`:""} ${!this.checked&&this.indeterminate?l`<sd-4-0-0-next-2-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-4-0-0-next-2-icon>`:""} </span><span part="label" id="label" class="${s("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...o.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],t([a('input[type="checkbox"]')],e.prototype,"input",2),t([a("#invalid-message")],e.prototype,"invalidMessage",2),t([r()],e.prototype,"title",2),t([r()],e.prototype,"name",2),t([r()],e.prototype,"value",2),t([r({reflect:!0})],e.prototype,"size",2),t([r({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([r({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([r({type:Boolean,reflect:!0})],e.prototype,"indeterminate",2),t([f("checked")],e.prototype,"defaultChecked",2),t([r({reflect:!0})],e.prototype,"form",2),t([r({type:Boolean,reflect:!0})],e.prototype,"required",2),t([u()],e.prototype,"showInvalidStyle",2),t([n("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([n(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([c("sd-4-0-0-next-2-checkbox")],e);export{e as a};
3
+ peer-focus-visible:outline-primary`,{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[i])}">${this.checked?l`<sd-4-0-0-next-4-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-check"></sd-4-0-0-next-4-icon>`:""} ${!this.checked&&this.indeterminate?l`<sd-4-0-0-next-4-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-4-0-0-next-4-icon>`:""} </span><span part="label" id="label" class="${s("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};e.styles=[...o.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],t([a('input[type="checkbox"]')],e.prototype,"input",2),t([a("#invalid-message")],e.prototype,"invalidMessage",2),t([r()],e.prototype,"title",2),t([r()],e.prototype,"name",2),t([r()],e.prototype,"value",2),t([r({reflect:!0})],e.prototype,"size",2),t([r({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([r({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([r({type:Boolean,reflect:!0})],e.prototype,"indeterminate",2),t([f("checked")],e.prototype,"defaultChecked",2),t([r({reflect:!0})],e.prototype,"form",2),t([r({type:Boolean,reflect:!0})],e.prototype,"required",2),t([u()],e.prototype,"showInvalidStyle",2),t([n("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),t([n(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],e.prototype,"handleStateChange",1),e=t([c("sd-4-0-0-next-4-checkbox")],e);export{e as a};