@solid-design-system/components 6.12.0 → 6.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/cdn/chunks/{chunk.NOXJ72G5.js → chunk.DSVAD7WA.js} +2 -2
  2. package/cdn/components/combobox/combobox.js +1 -1
  3. package/cdn/custom-elements.json +1 -1
  4. package/cdn/solid-components.bundle.js +1 -1
  5. package/cdn/solid-components.iife.js +1 -1
  6. package/cdn/solid-components.js +1 -1
  7. package/cdn/web-types.json +1 -1
  8. package/cdn-versioned/chunks/chunk.2OSCB6XW.js +2 -2
  9. package/cdn-versioned/chunks/chunk.2XY2M6QX.js +2 -2
  10. package/cdn-versioned/chunks/chunk.3RO5EKVU.js +1 -1
  11. package/cdn-versioned/chunks/chunk.4275NGRN.js +2 -2
  12. package/cdn-versioned/chunks/chunk.4RPUAIQK.js +2 -2
  13. package/cdn-versioned/chunks/chunk.5DNOSYG7.js +1 -1
  14. package/cdn-versioned/chunks/chunk.5FYGQOXL.js +2 -2
  15. package/cdn-versioned/chunks/chunk.5X4GK4PS.js +1 -1
  16. package/cdn-versioned/chunks/chunk.5YHGT34K.js +2 -2
  17. package/cdn-versioned/chunks/chunk.6AEASXXL.js +2 -2
  18. package/cdn-versioned/chunks/chunk.AMWHBFTM.js +2 -2
  19. package/cdn-versioned/chunks/chunk.B46EHYIM.js +3 -3
  20. package/cdn-versioned/chunks/chunk.BAY7BKUC.js +1 -1
  21. package/cdn-versioned/chunks/chunk.BOVFUPAB.js +2 -2
  22. package/cdn-versioned/chunks/chunk.C7XYQGPF.js +2 -2
  23. package/cdn-versioned/chunks/chunk.DS2YD552.js +2 -2
  24. package/cdn-versioned/chunks/{chunk.NOXJ72G5.js → chunk.DSVAD7WA.js} +5 -5
  25. package/cdn-versioned/chunks/chunk.EMB5EOVL.js +2 -2
  26. package/cdn-versioned/chunks/chunk.ENQH3ZMT.js +2 -2
  27. package/cdn-versioned/chunks/chunk.ETAZT232.js +2 -2
  28. package/cdn-versioned/chunks/chunk.F6Z7C6GC.js +2 -2
  29. package/cdn-versioned/chunks/chunk.FC5OZ6LQ.js +2 -2
  30. package/cdn-versioned/chunks/chunk.FIUQMO6Q.js +2 -2
  31. package/cdn-versioned/chunks/chunk.FJ4YRN4X.js +2 -2
  32. package/cdn-versioned/chunks/chunk.FTCO66N2.js +2 -2
  33. package/cdn-versioned/chunks/chunk.G5PT3ZUT.js +2 -2
  34. package/cdn-versioned/chunks/chunk.H76VWBAF.js +1 -1
  35. package/cdn-versioned/chunks/chunk.HL52A333.js +2 -2
  36. package/cdn-versioned/chunks/chunk.HR5FZLRC.js +2 -2
  37. package/cdn-versioned/chunks/chunk.HUYURJ76.js +2 -2
  38. package/cdn-versioned/chunks/chunk.HWUUJJP3.js +1 -1
  39. package/cdn-versioned/chunks/chunk.INALKJVG.js +5 -5
  40. package/cdn-versioned/chunks/chunk.IXPIV7FA.js +2 -2
  41. package/cdn-versioned/chunks/chunk.JMZGGLJF.js +1 -1
  42. package/cdn-versioned/chunks/chunk.JZVRJWMV.js +2 -2
  43. package/cdn-versioned/chunks/chunk.KS4OSR2A.js +3 -3
  44. package/cdn-versioned/chunks/chunk.R3BQNXHR.js +2 -2
  45. package/cdn-versioned/chunks/chunk.RAP66B6O.js +1 -1
  46. package/cdn-versioned/chunks/chunk.REOCLYOU.js +2 -2
  47. package/cdn-versioned/chunks/chunk.SIVZ2S6B.js +1 -1
  48. package/cdn-versioned/chunks/chunk.TPSMY4DZ.js +1 -1
  49. package/cdn-versioned/chunks/chunk.TWQLXQ5K.js +2 -2
  50. package/cdn-versioned/chunks/chunk.TYKWEXBI.js +1 -1
  51. package/cdn-versioned/chunks/chunk.UYDZYQM5.js +2 -2
  52. package/cdn-versioned/chunks/chunk.V3TGYVID.js +2 -2
  53. package/cdn-versioned/chunks/chunk.V4BUIKPF.js +2 -2
  54. package/cdn-versioned/chunks/chunk.VNKXLA5X.js +2 -2
  55. package/cdn-versioned/chunks/chunk.VR5GAI7K.js +2 -2
  56. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  57. package/cdn-versioned/chunks/chunk.WBIJL62F.js +2 -2
  58. package/cdn-versioned/chunks/chunk.WNJTMU6J.js +1 -1
  59. package/cdn-versioned/chunks/chunk.WTZQJFYM.js +2 -2
  60. package/cdn-versioned/chunks/chunk.WZAWV2ED.js +2 -2
  61. package/cdn-versioned/chunks/chunk.XG7G63I4.js +2 -2
  62. package/cdn-versioned/chunks/chunk.XKUWNSWT.js +2 -2
  63. package/cdn-versioned/chunks/chunk.Y3LTN4CF.js +2 -2
  64. package/cdn-versioned/chunks/chunk.Y4QI2OPY.js +2 -2
  65. package/cdn-versioned/chunks/chunk.YF6TETRU.js +2 -2
  66. package/cdn-versioned/chunks/chunk.YPTZDABK.js +1 -1
  67. package/cdn-versioned/chunks/chunk.YQOLB2PJ.js +9 -9
  68. package/cdn-versioned/chunks/chunk.YWOD5MYX.js +2 -2
  69. package/cdn-versioned/chunks/chunk.ZIVWE443.js +1 -1
  70. package/cdn-versioned/chunks/chunk.ZRNSYCFR.js +2 -2
  71. package/cdn-versioned/chunks/chunk.ZSAXC4EQ.js +2 -2
  72. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  73. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  74. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  75. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  76. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  77. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  78. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  79. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  80. package/cdn-versioned/components/button/button.d.ts +1 -1
  81. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  82. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  83. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  84. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  85. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  86. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  87. package/cdn-versioned/components/combobox/combobox.js +1 -1
  88. package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
  89. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  90. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  91. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  92. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  93. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  94. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  95. package/cdn-versioned/components/header/header.d.ts +1 -1
  96. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  97. package/cdn-versioned/components/include/include.d.ts +1 -1
  98. package/cdn-versioned/components/input/input.d.ts +1 -1
  99. package/cdn-versioned/components/link/link.d.ts +1 -1
  100. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  101. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  102. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  103. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  104. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  105. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  106. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  107. package/cdn-versioned/components/option/option.d.ts +1 -1
  108. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  109. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  110. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  111. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  112. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  113. package/cdn-versioned/components/range/range.d.ts +1 -1
  114. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  115. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  116. package/cdn-versioned/components/select/select.d.ts +1 -1
  117. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  118. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  119. package/cdn-versioned/components/step/step.d.ts +1 -1
  120. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  121. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  122. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  123. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  124. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  125. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  126. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  127. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  128. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  129. package/cdn-versioned/components/video/video.d.ts +1 -1
  130. package/cdn-versioned/custom-elements.json +246 -246
  131. package/cdn-versioned/internal/form.js +2 -2
  132. package/cdn-versioned/solid-components.bundle.js +80 -80
  133. package/cdn-versioned/solid-components.css +2 -2
  134. package/cdn-versioned/solid-components.iife.js +80 -80
  135. package/cdn-versioned/solid-components.js +1 -1
  136. package/cdn-versioned/vscode.html-custom-data.json +107 -107
  137. package/cdn-versioned/web-types.json +157 -157
  138. package/dist/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +2 -0
  139. package/dist/components/combobox/combobox.js +1 -1
  140. package/dist/custom-elements.json +1 -1
  141. package/dist/solid-components.js +1 -1
  142. package/dist/web-types.json +1 -1
  143. package/dist-versioned/chunks/chunk.2CU6QOL7.js +4 -4
  144. package/dist-versioned/chunks/chunk.35EQJ5SV.js +8 -8
  145. package/dist-versioned/chunks/chunk.4C33XKR5.js +4 -4
  146. package/dist-versioned/chunks/chunk.4GXGCVAT.js +4 -4
  147. package/dist-versioned/chunks/chunk.4TOOTTT7.js +3 -3
  148. package/dist-versioned/chunks/chunk.5IGIZXCC.js +12 -12
  149. package/dist-versioned/chunks/chunk.5V4ZLM46.js +2 -2
  150. package/dist-versioned/chunks/chunk.6ZTH3QOK.js +5 -5
  151. package/dist-versioned/chunks/chunk.77QMG2JK.js +1 -1
  152. package/dist-versioned/chunks/chunk.7NPVZGYG.js +10 -10
  153. package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
  154. package/dist-versioned/chunks/chunk.CGHNKRSG.js +2 -2
  155. package/dist-versioned/chunks/chunk.CPEBS32D.js +1 -1
  156. package/dist-versioned/chunks/chunk.CQPHP72G.js +5 -5
  157. package/dist-versioned/chunks/chunk.DVHTNKCQ.js +3 -3
  158. package/dist-versioned/chunks/chunk.DXOZDLN3.js +5 -5
  159. package/dist-versioned/chunks/chunk.EORDFUN5.js +8 -8
  160. package/dist-versioned/chunks/chunk.F733OTL5.js +2 -2
  161. package/dist-versioned/chunks/chunk.FN3QPQKW.js +6 -6
  162. package/dist-versioned/chunks/chunk.GUPU7Y4R.js +2 -2
  163. package/dist-versioned/chunks/chunk.HDB5VQ6T.js +3 -3
  164. package/dist-versioned/chunks/chunk.HMYRJJSA.js +1 -1
  165. package/dist-versioned/chunks/chunk.HSLR5EL7.js +2 -2
  166. package/dist-versioned/chunks/chunk.HWSQMDBV.js +2 -2
  167. package/dist-versioned/chunks/chunk.IYIDHG44.js +2 -2
  168. package/dist-versioned/chunks/chunk.J7P25XPS.js +1 -1
  169. package/dist-versioned/chunks/chunk.JBLVT4GJ.js +4 -4
  170. package/dist-versioned/chunks/chunk.JSHWJIQJ.js +5 -5
  171. package/dist-versioned/chunks/chunk.JVFY4KAV.js +4 -4
  172. package/dist-versioned/chunks/chunk.JZ4LAYZZ.js +1 -1
  173. package/dist-versioned/chunks/chunk.K33P42FK.js +1 -1
  174. package/dist-versioned/chunks/chunk.K5MFIQWD.js +12 -12
  175. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  176. package/dist-versioned/chunks/chunk.KH2LWYO6.js +1 -1
  177. package/dist-versioned/chunks/chunk.KMMZFIBW.js +3 -3
  178. package/dist-versioned/chunks/chunk.KNFZPKTF.js +3 -3
  179. package/dist-versioned/chunks/chunk.LRKBZ2PI.js +5 -5
  180. package/dist-versioned/chunks/chunk.MAECKDRE.js +9 -9
  181. package/dist-versioned/chunks/chunk.MJU6BUDN.js +4 -4
  182. package/dist-versioned/chunks/chunk.NDY2F6JA.js +14 -14
  183. package/dist-versioned/chunks/chunk.OA6QSAEX.js +28 -28
  184. package/dist-versioned/chunks/chunk.OYSZH2PZ.js +25 -25
  185. package/dist-versioned/chunks/chunk.P4H32F7J.js +8 -8
  186. package/dist-versioned/chunks/chunk.PU6VCTT2.js +3 -3
  187. package/dist-versioned/chunks/chunk.PZZI7LIX.js +3 -3
  188. package/dist-versioned/chunks/chunk.Q2YJAMQO.js +6 -6
  189. package/dist-versioned/chunks/chunk.QMQD2SCQ.js +7 -7
  190. package/dist-versioned/chunks/chunk.REYEB3D7.js +11 -11
  191. package/dist-versioned/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +25 -23
  192. package/dist-versioned/chunks/chunk.SQKCQFZY.js +2 -2
  193. package/dist-versioned/chunks/chunk.TAR64H3A.js +4 -4
  194. package/dist-versioned/chunks/chunk.TEHZN5K4.js +1 -1
  195. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  196. package/dist-versioned/chunks/chunk.URTSQLC4.js +3 -3
  197. package/dist-versioned/chunks/chunk.UZPDIPPZ.js +2 -2
  198. package/dist-versioned/chunks/chunk.V5VJQQ73.js +2 -2
  199. package/dist-versioned/chunks/chunk.VFLTCSUA.js +5 -5
  200. package/dist-versioned/chunks/chunk.VJNVCYUG.js +4 -4
  201. package/dist-versioned/chunks/chunk.WIXKV24T.js +1 -1
  202. package/dist-versioned/chunks/chunk.XVLJVMWL.js +5 -5
  203. package/dist-versioned/chunks/chunk.Y3THGL6Z.js +3 -3
  204. package/dist-versioned/chunks/chunk.Z5DZQTVN.js +1 -1
  205. package/dist-versioned/chunks/chunk.ZRHUI65H.js +5 -5
  206. package/dist-versioned/chunks/chunk.ZXKZDONO.js +5 -5
  207. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  208. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  209. package/dist-versioned/components/animation/animation.d.ts +1 -1
  210. package/dist-versioned/components/audio/audio.d.ts +1 -1
  211. package/dist-versioned/components/badge/badge.d.ts +1 -1
  212. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  213. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  214. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  215. package/dist-versioned/components/button/button.d.ts +1 -1
  216. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  217. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  218. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  219. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  220. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  221. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  222. package/dist-versioned/components/combobox/combobox.js +1 -1
  223. package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
  224. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  225. package/dist-versioned/components/divider/divider.d.ts +1 -1
  226. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  227. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  228. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  229. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  230. package/dist-versioned/components/header/header.d.ts +1 -1
  231. package/dist-versioned/components/icon/icon.d.ts +1 -1
  232. package/dist-versioned/components/include/include.d.ts +1 -1
  233. package/dist-versioned/components/input/input.d.ts +1 -1
  234. package/dist-versioned/components/link/link.d.ts +1 -1
  235. package/dist-versioned/components/loader/loader.d.ts +1 -1
  236. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  237. package/dist-versioned/components/menu/menu.d.ts +1 -1
  238. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  239. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  240. package/dist-versioned/components/notification/notification.d.ts +1 -1
  241. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  242. package/dist-versioned/components/option/option.d.ts +1 -1
  243. package/dist-versioned/components/popup/popup.d.ts +1 -1
  244. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  245. package/dist-versioned/components/radio/radio.d.ts +1 -1
  246. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  247. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  248. package/dist-versioned/components/range/range.d.ts +1 -1
  249. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  250. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  251. package/dist-versioned/components/select/select.d.ts +1 -1
  252. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  253. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  254. package/dist-versioned/components/step/step.d.ts +1 -1
  255. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  256. package/dist-versioned/components/switch/switch.d.ts +1 -1
  257. package/dist-versioned/components/tab/tab.d.ts +1 -1
  258. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  259. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  260. package/dist-versioned/components/tag/tag.d.ts +1 -1
  261. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  262. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  263. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  264. package/dist-versioned/components/video/video.d.ts +1 -1
  265. package/dist-versioned/custom-elements.json +246 -246
  266. package/dist-versioned/internal/form.js +2 -2
  267. package/dist-versioned/solid-components.css +2 -2
  268. package/dist-versioned/solid-components.js +1 -1
  269. package/dist-versioned/vscode.html-custom-data.json +107 -107
  270. package/dist-versioned/web-types.json +157 -157
  271. package/package.json +1 -1
@@ -6,7 +6,7 @@ import{a as R}from"./chunk.W4EADN3G.js";import{a as K}from"./chunk.X2GM34WQ.js";
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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}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-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.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 o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}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 O,v,x;let a=i.cloneNode(!0);if(a.current=a.value===((O=this.lastOption)==null?void 0:O.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((v=i.parentElement)==null?void 0:v.tagName.toLowerCase())==="sd-optgroup"))return a;let o=i.parentElement,g=(x=o.querySelector('[slot="label"]'))==null?void 0:x.cloneNode(!0),c=e.find(b=>b.id===o.id);if(c){c==null||c.appendChild(a),g&&(c==null||c.appendChild(g));return}let h=o.cloneNode();return h.appendChild(a),g&&h.appendChild(g),e.push(h),h}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=k(this,"combobox.show",{dir:this.localize.dir()});await S(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 T(this);let{keyframes:t,options:e}=k(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([w(this,"sd-after-show"),w(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,w(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 _(D(this.defaultSlot)).flat()}getSlottedOptGroups(){return U(D(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}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,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,g=t.left,c=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&a&&(this.hasFocus||c),O=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",v=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",x=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],z={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],N=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${d("relative text-left",v,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${a&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${a&&"inline-block form-control-color-text"}" aria-hidden="${a?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${a&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${d("absolute left-4 z-20 pointer-events-none transition-all duration-200",g?q:"left-4",h?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",h&&"mt-1")}" for="input"><span class="${d("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[O],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}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){if(t.key==="Tab"){this.displayInputValue="",this.displayInput.value="";return}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-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.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 o=a+1;n=o>e.length-1?0:o}else{let o=a-1;n=o<0?e.length-1:o}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let i=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),i.forEach(a=>{a.current=!1,a.setAttribute("aria-selected","false"),a.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}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 O,v,x;let a=i.cloneNode(!0);if(a.current=a.value===((O=this.lastOption)==null?void 0:O.value),a.selected=i.selected,a.checkbox=i.checkbox,a.size=i.size,!(((v=i.parentElement)==null?void 0:v.tagName.toLowerCase())==="sd-optgroup"))return a;let o=i.parentElement,g=(x=o.querySelector('[slot="label"]'))==null?void 0:x.cloneNode(!0),c=e.find(y=>y.id===o.id);if(c){c==null||c.appendChild(a),g&&(c==null||c.appendChild(g));return}let h=o.cloneNode();return h.appendChild(a),g&&h.appendChild(g),e.push(h),h}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=k(this,"combobox.show",{dir:this.localize.dir()});await S(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 T(this);let{keyframes:t,options:e}=k(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([w(this,"sd-after-show"),w(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,w(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 _(D(this.defaultSlot)).flat()}getSlottedOptGroups(){return U(D(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((a,n)=>{this.multiple&&(a.checkbox=!0),a.id=a.id||`sd-combobox-option-${n}`}),e.forEach((a,n)=>{a.id=a.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}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,o=this.clearable&&!this.disabled&&!this.visuallyDisabled,g=t.left,c=this.value!==null&&String(this.value).length>0,h=this.floatingLabel&&a&&(this.hasFocus||c),O=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",v=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",x=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],z={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],b={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],N=this.size==="lg"?this.floatingLabel?h?"py-3":"py-4":"py-2":this.floatingLabel?h?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${d("relative text-left",v,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${a&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${a&&"inline-block form-control-color-text"}" aria-hidden="${a?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${a&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${d("absolute left-4 z-20 pointer-events-none transition-all duration-200",g?q:"left-4",h?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",h&&"mt-1")}" for="input"><span class="${d("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",h&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${d("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[O],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${d("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="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(O)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],N)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",z,x,y)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",z,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",v,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||h?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .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||this.visuallyDisabled}" 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(L=>L==null?void 0:L.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",v)}" 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}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",b,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${d("text-neutral-700",y)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${d(b,y,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${d("flex-shrink-0 text-success",b,y)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y)}">${this.type!=="search"?p`<sd-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",b)}" type="button"><sd-icon class="${d(x,y)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${H(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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">${this.filteredOptions.length===0?p`<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-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${d("text-sm text-neutral-700 mt-1",n?"block":"hidden")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};s.styles=[...E.styles,V`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
11
+ "><div part="combobox" class="${d("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(O)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],N)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${d("inline-flex",z,x,b)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${d("flex items-center gap-1",z,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${d("appearance-none outline-none bg-transparent flex-auto min-w-0",v,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?h?"h-4":"h-6":h?"h-6":"h-8",h&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||h?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .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||this.visuallyDisabled}" 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(L=>L==null?void 0:L.getTextLabel()).join(", ")}</div><input class="${d("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",v)}" 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}"> ${o?p`<button part="clear-button" class="${d("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${d("text-neutral-700",b)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${d(y,b,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${d("flex-shrink-0 text-success",y,b)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${d("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b)}">${this.type!=="search"?p`<sd-icon class="${d("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${d("flex items-center sd-interactive",y)}" type="button"><sd-icon class="${d(x,b)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${H(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${d("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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">${this.filteredOptions.length===0?p`<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-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${d("text-sm text-neutral-700 mt-1",n?"block":"hidden")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};s.styles=[...E.styles,V`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
12
12
  :host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],l([m("sd-popup")],s.prototype,"popup",2),l([m('[part="combobox"]')],s.prototype,"combobox",2),l([m('[part="display-input"]')],s.prototype,"displayInput",2),l([m(".value-input")],s.prototype,"valueInput",2),l([m('[part="listbox"]')],s.prototype,"listbox",2),l([m('[part="tags"]')],s.prototype,"tagWrapper",2),l([m('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([m("slot:not([name])")],s.prototype,"defaultSlot",2),l([m("#invalid-message")],s.prototype,"invalidMessage",2),l([u()],s.prototype,"hasFocus",2),l([u()],s.prototype,"displayInputValue",2),l([u()],s.prototype,"selectedTextLabel",2),l([u()],s.prototype,"selectedOptions",2),l([u()],s.prototype,"filteredOptions",2),l([u()],s.prototype,"allOptions",2),l([u()],s.prototype,"lastOption",2),l([u()],s.prototype,"showValidStyle",2),l([u()],s.prototype,"showInvalidStyle",2),l([u()],s.prototype,"deletedTagLabel",2),l([r({reflect:!0})],s.prototype,"name",2),l([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([R()],s.prototype,"defaultValue",2),l([r({type:String,reflect:!0})],s.prototype,"size",2),l([r({type:String,reflect:!0})],s.prototype,"placeholder",2),l([r({type:String,attribute:"max-options-tag-label",reflect:!0})],s.prototype,"maxOptionsTagLabel",2),l([r({type:Boolean,reflect:!0})],s.prototype,"disabled",2),l([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],s.prototype,"visuallyDisabled",2),l([r({type:Boolean,reflect:!0})],s.prototype,"clearable",2),l([r({type:Boolean,reflect:!0})],s.prototype,"open",2),l([r({type:Boolean,reflect:!0})],s.prototype,"hoist",2),l([r({type:String,reflect:!0})],s.prototype,"label",2),l([r({type:String,reflect:!0})],s.prototype,"placement",2),l([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),l([r({type:String,reflect:!0})],s.prototype,"form",2),l([r({type:Boolean,reflect:!0})],s.prototype,"required",2),l([r({attribute:"floating-label",type:Boolean,reflect:!0})],s.prototype,"floatingLabel",2),l([r({type:String,reflect:!0})],s.prototype,"type",2),l([u()],s.prototype,"currentPlacement",2),l([r()],s.prototype,"getOption",2),l([r({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([r({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([r({type:Number,reflect:!0,attribute:"max-options-visible"})],s.prototype,"maxOptionsVisible",2),l([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([r()],s.prototype,"filter",2),l([r()],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","visually-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),l([f(["size","floatingLabel"])],s.prototype,"handleSizeChange",1),s=l([F("sd-combobox")],s);C("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{s as a};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.NOXJ72G5.js";import"../../chunks/chunk.G2DTGYNF.js";import"../../chunks/chunk.WBIJL62F.js";import"../../chunks/chunk.W4EADN3G.js";import"../../chunks/chunk.X2GM34WQ.js";import"../../chunks/chunk.W7A3TU2Z.js";import"../../chunks/chunk.SIVZ2S6B.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.RAP66B6O.js";import"../../chunks/chunk.SLXPE3UU.js";import"../../chunks/chunk.CGQ2BPPZ.js";import"../../chunks/chunk.B2NUKX6G.js";import"../../chunks/chunk.SV6DES3E.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.YWOD5MYX.js";import"../../chunks/chunk.HLDWO3HP.js";import"../../chunks/chunk.BSPQBW7U.js";import"../../chunks/chunk.54UVKIZB.js";import"../../chunks/chunk.3FMN7C5N.js";import"../../chunks/chunk.MB7SWCJ2.js";import"../../chunks/chunk.PYHYYOBE.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.IQPMMUES.js";import"../../chunks/chunk.B3QUTUIL.js";import"../../chunks/chunk.3TJM745S.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.3XPSGHFS.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.JMZGGLJF.js";import"../../chunks/chunk.UOAG5PNU.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.DSVAD7WA.js";import"../../chunks/chunk.G2DTGYNF.js";import"../../chunks/chunk.WBIJL62F.js";import"../../chunks/chunk.W4EADN3G.js";import"../../chunks/chunk.X2GM34WQ.js";import"../../chunks/chunk.W7A3TU2Z.js";import"../../chunks/chunk.SIVZ2S6B.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.RAP66B6O.js";import"../../chunks/chunk.SLXPE3UU.js";import"../../chunks/chunk.CGQ2BPPZ.js";import"../../chunks/chunk.B2NUKX6G.js";import"../../chunks/chunk.SV6DES3E.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.YWOD5MYX.js";import"../../chunks/chunk.HLDWO3HP.js";import"../../chunks/chunk.BSPQBW7U.js";import"../../chunks/chunk.54UVKIZB.js";import"../../chunks/chunk.3FMN7C5N.js";import"../../chunks/chunk.MB7SWCJ2.js";import"../../chunks/chunk.PYHYYOBE.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.IQPMMUES.js";import"../../chunks/chunk.B3QUTUIL.js";import"../../chunks/chunk.3TJM745S.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.3XPSGHFS.js";import"../../chunks/chunk.NYKJXI3Q.js";import"../../chunks/chunk.JMZGGLJF.js";import"../../chunks/chunk.UOAG5PNU.js";import"../../chunks/chunk.W4QBFD6E.js";import"../../chunks/chunk.6EV4YU6C.js";export{a as default};
@@ -22563,7 +22563,7 @@
22563
22563
  "package": {
22564
22564
  "name": "@solid-design-system/components",
22565
22565
  "description": "Solid Design System: Components",
22566
- "version": "6.12.0",
22566
+ "version": "6.12.1",
22567
22567
  "author": "Union Investment",
22568
22568
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
22569
22569
  "license": "MIT"
@@ -205,7 +205,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
205
205
  base:tag__base,
206
206
  content:tag__content,
207
207
  removable-indicator:tag__removable-indicator,
208
- " 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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)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 r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(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 r=this.getCurrentOption(),o=e.indexOf(r),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ee(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.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(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,o;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)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var g,w,b;let o=r.cloneNode(!0);if(o.current=o.value===((g=this.lastOption)==null?void 0:g.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((w=r.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=r.parentElement,c=(b=l.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),c&&(u==null||u.appendChild(c));return}let m=l.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await X(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=j(this,"combobox.show",{dir:this.localize.dir()});await W(this.popup.popup,r,o),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 X(this);let{keyframes:t,options:e}=j(this,"combobox.hide",{dir:this.localize.dir()});await W(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([Z(this,"sd-after-show"),Z(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,Z(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 bo(Es(this.defaultSlot)).flat()}getSlottedOptGroups(){return vo(Es(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],$={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],S=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",_={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${h("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${o&&"inline-block form-control-color-text"}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",c?_:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",m&&"mt-1")}" for="input"><span class="${h("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("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="
208
+ " 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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){if(t.key==="Tab"){this.displayInputValue="",this.displayInput.value="";return}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 r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(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 r=this.getCurrentOption(),o=e.indexOf(r),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),ee(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.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(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,o;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)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var g,w,b;let o=r.cloneNode(!0);if(o.current=o.value===((g=this.lastOption)==null?void 0:g.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((w=r.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=r.parentElement,c=(b=l.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),c&&(u==null||u.appendChild(c));return}let m=l.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await X(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=j(this,"combobox.show",{dir:this.localize.dir()});await W(this.popup.popup,r,o),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 X(this);let{keyframes:t,options:e}=j(this,"combobox.hide",{dir:this.localize.dir()});await W(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([Z(this,"sd-after-show"),Z(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,Z(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 bo(Es(this.defaultSlot)).flat()}getSlottedOptGroups(){return vo(Es(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],$={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],S=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",_={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${h("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${o&&"inline-block form-control-color-text"}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",c?_:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",m&&"mt-1")}" for="input"><span class="${h("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("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="
209
209
  popup:popup__content,
210
210
  "><div part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(g)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],S)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${h("inline-flex",$,b,z)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${h("flex items-center gap-1",$,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${h("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8",m&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .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||this.visuallyDisabled}" 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(D=>D==null?void 0:D.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" 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}"> ${l?p`<button part="clear-button" class="${h("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${h("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${h(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${h("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",z)}">${this.type!=="search"?p`<sd-icon class="${h("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${h("flex items-center sd-interactive",y)}" type="button"><sd-icon class="${h(b,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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">${this.filteredOptions.length===0?p`<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-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",n?"block":"hidden")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};M.styles=[...f.styles,x`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
211
211
  :host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],a([v("sd-popup")],M.prototype,"popup",2),a([v('[part="combobox"]')],M.prototype,"combobox",2),a([v('[part="display-input"]')],M.prototype,"displayInput",2),a([v(".value-input")],M.prototype,"valueInput",2),a([v('[part="listbox"]')],M.prototype,"listbox",2),a([v('[part="tags"]')],M.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],M.prototype,"filteredWrapper",2),a([v("slot:not([name])")],M.prototype,"defaultSlot",2),a([v("#invalid-message")],M.prototype,"invalidMessage",2),a([L()],M.prototype,"hasFocus",2),a([L()],M.prototype,"displayInputValue",2),a([L()],M.prototype,"selectedTextLabel",2),a([L()],M.prototype,"selectedOptions",2),a([L()],M.prototype,"filteredOptions",2),a([L()],M.prototype,"allOptions",2),a([L()],M.prototype,"lastOption",2),a([L()],M.prototype,"showValidStyle",2),a([L()],M.prototype,"showInvalidStyle",2),a([L()],M.prototype,"deletedTagLabel",2),a([d({reflect:!0})],M.prototype,"name",2),a([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],M.prototype,"value",2),a([Bt()],M.prototype,"defaultValue",2),a([d({type:String,reflect:!0})],M.prototype,"size",2),a([d({type:String,reflect:!0})],M.prototype,"placeholder",2),a([d({type:String,attribute:"max-options-tag-label",reflect:!0})],M.prototype,"maxOptionsTagLabel",2),a([d({type:Boolean,reflect:!0})],M.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],M.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],M.prototype,"clearable",2),a([d({type:Boolean,reflect:!0})],M.prototype,"open",2),a([d({type:Boolean,reflect:!0})],M.prototype,"hoist",2),a([d({type:String,reflect:!0})],M.prototype,"label",2),a([d({type:String,reflect:!0})],M.prototype,"placement",2),a([d({type:String,attribute:"help-text",reflect:!0})],M.prototype,"helpText",2),a([d({type:String,reflect:!0})],M.prototype,"form",2),a([d({type:Boolean,reflect:!0})],M.prototype,"required",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],M.prototype,"floatingLabel",2),a([d({type:String,reflect:!0})],M.prototype,"type",2),a([L()],M.prototype,"currentPlacement",2),a([d()],M.prototype,"getOption",2),a([d({type:Boolean,reflect:!0})],M.prototype,"multiple",2),a([d({type:Boolean,reflect:!0})],M.prototype,"useTags",2),a([d({type:Number,reflect:!0,attribute:"max-options-visible"})],M.prototype,"maxOptionsVisible",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],M.prototype,"styleOnValid",2),a([d()],M.prototype,"filter",2),a([d()],M.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],M.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],M.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],M.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],M.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],M.prototype,"handleOpenChange",1),a([C(["size","floatingLabel"])],M.prototype,"handleSizeChange",1),M=a([k("sd-combobox")],M);F("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});F("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Le=class extends f{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return p`<hr part="main" aria-orientation="${this.orientation}" class="${h(this.inverted?"sd-divider--inverted-color-border":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};Le.styles=[...f.styles,x`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
@@ -205,7 +205,7 @@ sd-button::part(base){display:flex;height:var(--sd-spacing-12);width:var(--sd-sp
205
205
  base:tag__base,
206
206
  content:tag__content,
207
207
  removable-indicator:tag__removable-indicator,
208
- " 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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)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 r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(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 r=this.getCurrentOption(),o=e.indexOf(r),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),se(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.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(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,o;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)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var g,w,b;let o=r.cloneNode(!0);if(o.current=o.value===((g=this.lastOption)==null?void 0:g.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((w=r.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=r.parentElement,c=(b=l.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),c&&(u==null||u.appendChild(c));return}let m=l.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await X(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=j(this,"combobox.show",{dir:this.localize.dir()});await W(this.popup.popup,r,o),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 X(this);let{keyframes:t,options:e}=j(this,"combobox.hide",{dir:this.localize.dir()});await W(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(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 wo(Ts(this.defaultSlot)).flat()}getSlottedOptGroups(){return xo(Ts(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],$={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",_={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${h("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${o&&"inline-block form-control-color-text"}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",c?_:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",m&&"mt-1")}" for="input"><span class="${h("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("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="
208
+ " 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-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"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){if(t.key==="Tab"){this.displayInputValue="",this.displayInput.value="";return}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 r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(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 r=this.getCurrentOption(),o=e.indexOf(r),n=Math.max(0,o);if(t){let l=o+1;n=l>e.length-1?0:l}else{let l=o-1;n=l<0?e.length-1:l}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),se(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.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(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,o;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)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var g,w,b;let o=r.cloneNode(!0);if(o.current=o.value===((g=this.lastOption)==null?void 0:g.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((w=r.parentElement)==null?void 0:w.tagName.toLowerCase())==="sd-optgroup"))return o;let l=r.parentElement,c=(b=l.querySelector('[slot="label"]'))==null?void 0:b.cloneNode(!0),u=e.find(y=>y.id===l.id);if(u){u==null||u.appendChild(o),c&&(u==null||u.appendChild(c));return}let m=l.cloneNode();return m.appendChild(o),c&&m.appendChild(c),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-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.visuallyDisabled)&&(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.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await X(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=j(this,"combobox.show",{dir:this.localize.dir()});await W(this.popup.popup,r,o),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 X(this);let{keyframes:t,options:e}=j(this,"combobox.hide",{dir:this.localize.dir()});await W(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([J(this,"sd-after-show"),J(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,J(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 wo(Ts(this.defaultSlot)).flat()}getSlottedOptGroups(){return xo(Ts(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,l=this.clearable&&!this.disabled&&!this.visuallyDisabled,c=t.left,u=this.value!==null&&String(this.value).length>0,m=this.floatingLabel&&o&&(this.hasFocus||u),g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",w=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",b=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],$={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],z={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],M=this.size==="lg"?this.floatingLabel?m?"py-3":"py-4":"py-2":this.floatingLabel?m?"py-2":"py-3":"py-1",_={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return p`<div part="form-control" class="${h("relative text-left",w,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}">${o&&!this.floatingLabel?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${o&&"inline-block form-control-color-text"}" aria-hidden="${o?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label></div>`:null} <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black">${o&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",c?_:"left-4",m?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",m&&"mt-1")}" for="input"><span class="${h("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",m&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("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="
209
209
  popup:popup__content,
210
210
  "><div part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",["invalid","activeInvalid"].includes(g)&&"form-control--invalid-color-background",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size],M)}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?p`<slot part="left" name="left" class="${h("inline-flex",$,b,z)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?p`<div part="tags" class="${h("flex items-center gap-1",$,this.floatingLabel&&"mt-4")}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${h("appearance-none outline-none bg-transparent flex-auto min-w-0",w,this.selectedTextLabel&&!this.multiple?"placeholder:form-control-color-text":"placeholder:text-neutral-700",this.size==="sm"?m?"h-4":"h-6":m?"h-6":"h-8",m&&"leading-none mt-4")}" type="text" placeholder="${!this.floatingLabel||m?this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder"):""}" .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||this.visuallyDisabled}" 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(D=>D==null?void 0:D.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",w)}" 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}"> ${l?p`<button part="clear-button" class="${h("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${h("text-neutral-700",z)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-icon part="invalid-icon" class="${h(y,z,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-icon part="valid-icon" class="${h("flex-shrink-0 text-success",y,z)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${h("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",z)}">${this.type!=="search"?p`<sd-icon class="${h("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?p`<button class="${h("flex items-center sd-interactive",y)}" type="button"><sd-icon class="${h(b,z)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:p`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${E(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",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">${this.filteredOptions.length===0?p`<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-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${h("text-sm text-neutral-700 mt-1",n?"block":"hidden")}" aria-hidden="${!n}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};S.styles=[...f.styles,x`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
211
211
  :host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{right:var(--sd-spacing-4);height:var(--sd-spacing-4);width:var(--sd-spacing-4)}:host([size=md]) .combobox-button{right:.85rem;height:var(--sd-spacing-6);width:var(--sd-spacing-6)}:host([size=lg]) .combobox-button{right:var(--sd-spacing-3);height:var(--sd-spacing-8);width:var(--sd-spacing-8)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;--tw-font-weight:var(--sd-font-weight-bold);font-weight:var(--sd-font-weight-bold);color:inherit}@property --tw-font-weight{syntax:"*";inherits:false}`],a([v("sd-popup")],S.prototype,"popup",2),a([v('[part="combobox"]')],S.prototype,"combobox",2),a([v('[part="display-input"]')],S.prototype,"displayInput",2),a([v(".value-input")],S.prototype,"valueInput",2),a([v('[part="listbox"]')],S.prototype,"listbox",2),a([v('[part="tags"]')],S.prototype,"tagWrapper",2),a([v('[part="filtered-listbox"]')],S.prototype,"filteredWrapper",2),a([v("slot:not([name])")],S.prototype,"defaultSlot",2),a([v("#invalid-message")],S.prototype,"invalidMessage",2),a([L()],S.prototype,"hasFocus",2),a([L()],S.prototype,"displayInputValue",2),a([L()],S.prototype,"selectedTextLabel",2),a([L()],S.prototype,"selectedOptions",2),a([L()],S.prototype,"filteredOptions",2),a([L()],S.prototype,"allOptions",2),a([L()],S.prototype,"lastOption",2),a([L()],S.prototype,"showValidStyle",2),a([L()],S.prototype,"showInvalidStyle",2),a([L()],S.prototype,"deletedTagLabel",2),a([d({reflect:!0})],S.prototype,"name",2),a([d({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],S.prototype,"value",2),a([qt()],S.prototype,"defaultValue",2),a([d({type:String,reflect:!0})],S.prototype,"size",2),a([d({type:String,reflect:!0})],S.prototype,"placeholder",2),a([d({type:String,attribute:"max-options-tag-label",reflect:!0})],S.prototype,"maxOptionsTagLabel",2),a([d({type:Boolean,reflect:!0})],S.prototype,"disabled",2),a([d({type:Boolean,reflect:!0,attribute:"visually-disabled"})],S.prototype,"visuallyDisabled",2),a([d({type:Boolean,reflect:!0})],S.prototype,"clearable",2),a([d({type:Boolean,reflect:!0})],S.prototype,"open",2),a([d({type:Boolean,reflect:!0})],S.prototype,"hoist",2),a([d({type:String,reflect:!0})],S.prototype,"label",2),a([d({type:String,reflect:!0})],S.prototype,"placement",2),a([d({type:String,attribute:"help-text",reflect:!0})],S.prototype,"helpText",2),a([d({type:String,reflect:!0})],S.prototype,"form",2),a([d({type:Boolean,reflect:!0})],S.prototype,"required",2),a([d({attribute:"floating-label",type:Boolean,reflect:!0})],S.prototype,"floatingLabel",2),a([d({type:String,reflect:!0})],S.prototype,"type",2),a([L()],S.prototype,"currentPlacement",2),a([d()],S.prototype,"getOption",2),a([d({type:Boolean,reflect:!0})],S.prototype,"multiple",2),a([d({type:Boolean,reflect:!0})],S.prototype,"useTags",2),a([d({type:Number,reflect:!0,attribute:"max-options-visible"})],S.prototype,"maxOptionsVisible",2),a([d({type:Boolean,reflect:!0,attribute:"style-on-valid"})],S.prototype,"styleOnValid",2),a([d()],S.prototype,"filter",2),a([d()],S.prototype,"getTag",2),a([C("filter",{waitUntilFirstUpdate:!0})],S.prototype,"handleFilterChange",1),a([C("useTags",{waitUntilFirstUpdate:!0})],S.prototype,"handleUseTagsChange",1),a([C("size",{waitUntilFirstUpdate:!0})],S.prototype,"applySizeToOptions",1),a([C(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],S.prototype,"handleDisabledChange",1),a([C("value",{waitUntilFirstUpdate:!0})],S.prototype,"handleValueChange",1),a([C("displayInputValue",{waitUntilFirstUpdate:!0})],S.prototype,"handleDisplayInputValueChange",1),a([C("open",{waitUntilFirstUpdate:!0})],S.prototype,"handleOpenChange",1),a([C(["size","floatingLabel"])],S.prototype,"handleSizeChange",1),S=a([k("sd-combobox")],S);F("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});F("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var ye=class extends f{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return p`<hr part="main" aria-orientation="${this.orientation}" class="${h(this.inverted?"sd-divider--inverted-color-border":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};ye.styles=[...f.styles,x`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
@@ -1 +1 @@
1
- import{a as pe}from"./chunks/chunk.VNKXLA5X.js";import"./chunks/chunk.HAL7R4WT.js";import{a as oe}from"./chunks/chunk.WTZQJFYM.js";import{a as re}from"./chunks/chunk.5DNOSYG7.js";import{a as ae}from"./chunks/chunk.FIUQMO6Q.js";import{a as W}from"./chunks/chunk.XKUWNSWT.js";import{a as X}from"./chunks/chunk.YF6TETRU.js";import{a as Y}from"./chunks/chunk.Y4QI2OPY.js";import{a as Z}from"./chunks/chunk.BOVFUPAB.js";import{a as _}from"./chunks/chunk.IXPIV7FA.js";import{a as $}from"./chunks/chunk.VR5GAI7K.js";import{a as ee}from"./chunks/chunk.HUYURJ76.js";import{a as j}from"./chunks/chunk.F6Z7C6GC.js";import{a as V}from"./chunks/chunk.B46EHYIM.js";import"./chunks/chunk.IVHEBGOY.js";import{a as q}from"./chunks/chunk.JZVRJWMV.js";import{a as y}from"./chunks/chunk.TWQLXQ5K.js";import{a as z}from"./chunks/chunk.INALKJVG.js";import{a as J}from"./chunks/chunk.HWUUJJP3.js";import{a as K}from"./chunks/chunk.TYKWEXBI.js";import{a as U}from"./chunks/chunk.R3BQNXHR.js";import{a as N}from"./chunks/chunk.V3TGYVID.js";import{a as O}from"./chunks/chunk.6AEASXXL.js";import{a as P}from"./chunks/chunk.5FYGQOXL.js";import{a as E}from"./chunks/chunk.ETAZT232.js";import{a as H}from"./chunks/chunk.ENQH3ZMT.js";import{a as Q}from"./chunks/chunk.ZSAXC4EQ.js";import{a as F}from"./chunks/chunk.HR5FZLRC.js";import{a as R}from"./chunks/chunk.FC5OZ6LQ.js";import{a as A}from"./chunks/chunk.2XY2M6QX.js";import{a as w}from"./chunks/chunk.4275NGRN.js";import{a as L}from"./chunks/chunk.C7XYQGPF.js";import"./chunks/chunk.YPTZDABK.js";import"./chunks/chunk.RMXFJHN6.js";import{a as v}from"./chunks/chunk.AMWHBFTM.js";import{a as M}from"./chunks/chunk.5X4GK4PS.js";import{a as B}from"./chunks/chunk.G5PT3ZUT.js";import"./chunks/chunk.3MADQ6HK.js";import{a as h}from"./chunks/chunk.ZRNSYCFR.js";import{a as I}from"./chunks/chunk.V4BUIKPF.js";import{a as C}from"./chunks/chunk.5YHGT34K.js";import{a as D}from"./chunks/chunk.HL52A333.js";import{a as G}from"./chunks/chunk.XG7G63I4.js";import{a as b}from"./chunks/chunk.FJ4YRN4X.js";import"./chunks/chunk.YQH4KNT6.js";import"./chunks/chunk.GO7NGR4Q.js";import{a as T}from"./chunks/chunk.REOCLYOU.js";import{a as g}from"./chunks/chunk.NOXJ72G5.js";import"./chunks/chunk.G2DTGYNF.js";import{a as k}from"./chunks/chunk.WBIJL62F.js";import"./chunks/chunk.W4EADN3G.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as u}from"./chunks/chunk.4RPUAIQK.js";import{a as l}from"./chunks/chunk.BAY7BKUC.js";import{a as S}from"./chunks/chunk.DS2YD552.js";import{a as x}from"./chunks/chunk.KS4OSR2A.js";import{a as m}from"./chunks/chunk.SIVZ2S6B.js";import{a as i}from"./chunks/chunk.2OSCB6XW.js";import{a as s}from"./chunks/chunk.WNJTMU6J.js";import"./chunks/chunk.FTCO66N2.js";import{a as c}from"./chunks/chunk.EMB5EOVL.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as n}from"./chunks/chunk.3RO5EKVU.js";import"./chunks/chunk.CBQWVOOS.js";import{a}from"./chunks/chunk.ZIVWE443.js";import{a as o}from"./chunks/chunk.Y3LTN4CF.js";import{a as r}from"./chunks/chunk.TPSMY4DZ.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as p}from"./chunks/chunk.WZAWV2ED.js";import{a as f}from"./chunks/chunk.UYDZYQM5.js";import"./chunks/chunk.I2H6CZK5.js";import"./chunks/chunk.2AQOPKKH.js";import"./chunks/chunk.G7HKVXLR.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.YQOLB2PJ.js";import{a as t}from"./chunks/chunk.H76VWBAF.js";import"./chunks/chunk.RAP66B6O.js";import"./chunks/chunk.SLXPE3UU.js";import"./chunks/chunk.CGQ2BPPZ.js";import"./chunks/chunk.B2NUKX6G.js";import"./chunks/chunk.SV6DES3E.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as e}from"./chunks/chunk.YWOD5MYX.js";import"./chunks/chunk.HLDWO3HP.js";import"./chunks/chunk.BSPQBW7U.js";import{d as te,e as de}from"./chunks/chunk.54UVKIZB.js";import"./chunks/chunk.3FMN7C5N.js";import"./chunks/chunk.MB7SWCJ2.js";import"./chunks/chunk.PYHYYOBE.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import{a as fe}from"./chunks/chunk.IQPMMUES.js";import"./chunks/chunk.B3QUTUIL.js";import"./chunks/chunk.3TJM745S.js";import"./chunks/chunk.HJGLYEWV.js";import"./chunks/chunk.3XPSGHFS.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.JMZGGLJF.js";import"./chunks/chunk.UOAG5PNU.js";import"./chunks/chunk.W4QBFD6E.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.6EV4YU6C.js";export{fe as LocalizeController,o as SdAccordion,a as SdAccordionGroup,r as SdAnimation,p as SdAudio,u as SdBadge,l as SdBrandshape,S as SdBreadcrumb,i as SdBreadcrumbItem,d as SdButton,c as SdCarousel,n as SdCarouselItem,b as SdCheckbox,T as SdCheckboxGroup,g as SdCombobox,B as SdDatepicker,h as SdDialog,I as SdDivider,f as SdDrawer,x as SdDropdown,C as SdExpandable,D as SdFlipcard,G as SdHeader,e as SdIcon,M as SdInclude,R as SdInput,s as SdLink,t as SdLoader,A as SdMapMarker,w as SdMenu,L as SdMenuItem,v as SdNavigationItem,N as SdNotification,O as SdOptgroup,P as SdOption,m as SdPopup,E as SdQuickfact,F as SdRadio,H as SdRadioButton,Q as SdRadioGroup,j as SdRange,q as SdRangeTick,y as SdScrollable,z as SdSelect,J as SdSkeleton,K as SdSpinner,U as SdStep,W as SdStepGroup,X as SdSwitch,Y as SdTab,Z as SdTabGroup,_ as SdTabPanel,k as SdTag,$ as SdTeaser,ee as SdTeaserMedia,oe as SdTextarea,re as SdThemeListener,V as SdTooltip,ae as SdVideo,te as registerIconLibrary,pe as setupAutocomplete,de as unregisterIconLibrary};
1
+ import{a as pe}from"./chunks/chunk.VNKXLA5X.js";import"./chunks/chunk.HAL7R4WT.js";import{a as oe}from"./chunks/chunk.WTZQJFYM.js";import{a as re}from"./chunks/chunk.5DNOSYG7.js";import{a as ae}from"./chunks/chunk.FIUQMO6Q.js";import{a as W}from"./chunks/chunk.XKUWNSWT.js";import{a as X}from"./chunks/chunk.YF6TETRU.js";import{a as Y}from"./chunks/chunk.Y4QI2OPY.js";import{a as Z}from"./chunks/chunk.BOVFUPAB.js";import{a as _}from"./chunks/chunk.IXPIV7FA.js";import{a as $}from"./chunks/chunk.VR5GAI7K.js";import{a as ee}from"./chunks/chunk.HUYURJ76.js";import{a as j}from"./chunks/chunk.F6Z7C6GC.js";import{a as V}from"./chunks/chunk.B46EHYIM.js";import"./chunks/chunk.IVHEBGOY.js";import{a as q}from"./chunks/chunk.JZVRJWMV.js";import{a as y}from"./chunks/chunk.TWQLXQ5K.js";import{a as z}from"./chunks/chunk.INALKJVG.js";import{a as J}from"./chunks/chunk.HWUUJJP3.js";import{a as K}from"./chunks/chunk.TYKWEXBI.js";import{a as U}from"./chunks/chunk.R3BQNXHR.js";import{a as N}from"./chunks/chunk.V3TGYVID.js";import{a as O}from"./chunks/chunk.6AEASXXL.js";import{a as P}from"./chunks/chunk.5FYGQOXL.js";import{a as E}from"./chunks/chunk.ETAZT232.js";import{a as H}from"./chunks/chunk.ENQH3ZMT.js";import{a as Q}from"./chunks/chunk.ZSAXC4EQ.js";import{a as F}from"./chunks/chunk.HR5FZLRC.js";import{a as R}from"./chunks/chunk.FC5OZ6LQ.js";import{a as A}from"./chunks/chunk.2XY2M6QX.js";import{a as w}from"./chunks/chunk.4275NGRN.js";import{a as L}from"./chunks/chunk.C7XYQGPF.js";import"./chunks/chunk.YPTZDABK.js";import"./chunks/chunk.RMXFJHN6.js";import{a as v}from"./chunks/chunk.AMWHBFTM.js";import{a as M}from"./chunks/chunk.5X4GK4PS.js";import{a as B}from"./chunks/chunk.G5PT3ZUT.js";import"./chunks/chunk.3MADQ6HK.js";import{a as h}from"./chunks/chunk.ZRNSYCFR.js";import{a as I}from"./chunks/chunk.V4BUIKPF.js";import{a as C}from"./chunks/chunk.5YHGT34K.js";import{a as D}from"./chunks/chunk.HL52A333.js";import{a as G}from"./chunks/chunk.XG7G63I4.js";import{a as b}from"./chunks/chunk.FJ4YRN4X.js";import"./chunks/chunk.YQH4KNT6.js";import"./chunks/chunk.GO7NGR4Q.js";import{a as T}from"./chunks/chunk.REOCLYOU.js";import{a as g}from"./chunks/chunk.DSVAD7WA.js";import"./chunks/chunk.G2DTGYNF.js";import{a as k}from"./chunks/chunk.WBIJL62F.js";import"./chunks/chunk.W4EADN3G.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as u}from"./chunks/chunk.4RPUAIQK.js";import{a as l}from"./chunks/chunk.BAY7BKUC.js";import{a as S}from"./chunks/chunk.DS2YD552.js";import{a as x}from"./chunks/chunk.KS4OSR2A.js";import{a as m}from"./chunks/chunk.SIVZ2S6B.js";import{a as i}from"./chunks/chunk.2OSCB6XW.js";import{a as s}from"./chunks/chunk.WNJTMU6J.js";import"./chunks/chunk.FTCO66N2.js";import{a as c}from"./chunks/chunk.EMB5EOVL.js";import"./chunks/chunk.BJBQEPZV.js";import"./chunks/chunk.EOXYPQZI.js";import"./chunks/chunk.MHWW3RZB.js";import{a as n}from"./chunks/chunk.3RO5EKVU.js";import"./chunks/chunk.CBQWVOOS.js";import{a}from"./chunks/chunk.ZIVWE443.js";import{a as o}from"./chunks/chunk.Y3LTN4CF.js";import{a as r}from"./chunks/chunk.TPSMY4DZ.js";import"./chunks/chunk.D4E5ZIRW.js";import{a as p}from"./chunks/chunk.WZAWV2ED.js";import{a as f}from"./chunks/chunk.UYDZYQM5.js";import"./chunks/chunk.I2H6CZK5.js";import"./chunks/chunk.2AQOPKKH.js";import"./chunks/chunk.G7HKVXLR.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.YQOLB2PJ.js";import{a as t}from"./chunks/chunk.H76VWBAF.js";import"./chunks/chunk.RAP66B6O.js";import"./chunks/chunk.SLXPE3UU.js";import"./chunks/chunk.CGQ2BPPZ.js";import"./chunks/chunk.B2NUKX6G.js";import"./chunks/chunk.SV6DES3E.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as e}from"./chunks/chunk.YWOD5MYX.js";import"./chunks/chunk.HLDWO3HP.js";import"./chunks/chunk.BSPQBW7U.js";import{d as te,e as de}from"./chunks/chunk.54UVKIZB.js";import"./chunks/chunk.3FMN7C5N.js";import"./chunks/chunk.MB7SWCJ2.js";import"./chunks/chunk.PYHYYOBE.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import{a as fe}from"./chunks/chunk.IQPMMUES.js";import"./chunks/chunk.B3QUTUIL.js";import"./chunks/chunk.3TJM745S.js";import"./chunks/chunk.HJGLYEWV.js";import"./chunks/chunk.3XPSGHFS.js";import"./chunks/chunk.NYKJXI3Q.js";import"./chunks/chunk.JMZGGLJF.js";import"./chunks/chunk.UOAG5PNU.js";import"./chunks/chunk.W4QBFD6E.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.6EV4YU6C.js";export{fe as LocalizeController,o as SdAccordion,a as SdAccordionGroup,r as SdAnimation,p as SdAudio,u as SdBadge,l as SdBrandshape,S as SdBreadcrumb,i as SdBreadcrumbItem,d as SdButton,c as SdCarousel,n as SdCarouselItem,b as SdCheckbox,T as SdCheckboxGroup,g as SdCombobox,B as SdDatepicker,h as SdDialog,I as SdDivider,f as SdDrawer,x as SdDropdown,C as SdExpandable,D as SdFlipcard,G as SdHeader,e as SdIcon,M as SdInclude,R as SdInput,s as SdLink,t as SdLoader,A as SdMapMarker,w as SdMenu,L as SdMenuItem,v as SdNavigationItem,N as SdNotification,O as SdOptgroup,P as SdOption,m as SdPopup,E as SdQuickfact,F as SdRadio,H as SdRadioButton,Q as SdRadioGroup,j as SdRange,q as SdRangeTick,y as SdScrollable,z as SdSelect,J as SdSkeleton,K as SdSpinner,U as SdStep,W as SdStepGroup,X as SdSwitch,Y as SdTab,Z as SdTabGroup,_ as SdTabPanel,k as SdTag,$ as SdTeaser,ee as SdTeaserMedia,oe as SdTextarea,re as SdThemeListener,V as SdTooltip,ae as SdVideo,te as registerIconLibrary,pe as setupAutocomplete,de as unregisterIconLibrary};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@solid-design-system/components",
4
- "version": "6.12.0",
4
+ "version": "6.12.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk.SLXPE3UU.js";import{a as h}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.JMZGGLJF.js";import{b as l,e as a}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-6-12-0-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-6-12-0-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-flex;align-items:center}sd-6-12-0-link::part(base){align-items:center}sd-6-12-0-link::part(icon-left){margin-right:calc(var(--sd-spacing-1) * 0);display:inline-flex}:host([current]) sd-6-12-0-link::part(base){color:rgba(var(--sd-color-text-neutral-700))}:host([current]) sd-6-12-0-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-6-12-0-breadcrumb-item")],t);export{t as a};
1
+ import{a as f}from"./chunk.SLXPE3UU.js";import{a as h}from"./chunk.IQPMMUES.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.JMZGGLJF.js";import{b as l,e as a}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-6-12-1-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-6-12-1-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{display:inline-flex;align-items:center}sd-6-12-1-link::part(base){align-items:center}sd-6-12-1-link::part(icon-left){margin-right:calc(var(--sd-spacing-1) * 0);display:inline-flex}:host([current]) sd-6-12-1-link::part(base){color:rgba(var(--sd-color-text-neutral-700))}:host([current]) sd-6-12-1-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-6-12-1-breadcrumb-item")],t);export{t as a};
@@ -7,5 +7,5 @@ import{a as s}from"./chunk.SLXPE3UU.js";import{a as n,b as l}from"./chunk.SV6DES
7
7
  </svg> `,place:`
8
8
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
9
9
  <path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
10
- </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,d=h(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 sd-6-12-0-map-marker-cluster--hovered-color-icon-fill",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-6-12-0-map-marker-cluster-color-icon-fill",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${c}>`}};t.styles=[...o.styles,v`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
11
- :host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker-cluster--hovered-color-icon-fill))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([m("sd-6-12-0-map-marker")],t);export{t as a};
10
+ </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,d=h(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 sd-6-12-1-map-marker-cluster--hovered-color-icon-fill",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-6-12-1-map-marker-cluster-color-icon-fill",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${c}>`}};t.styles=[...o.styles,v`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
11
+ :host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker-cluster--hovered-color-icon-fill))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([m("sd-6-12-1-map-marker")],t);export{t as a};
@@ -1,2 +1,2 @@
1
1
  import{a as c,h as e}from"./chunk.JMZGGLJF.js";import{b as l,e as o}from"./chunk.UOAG5PNU.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends e{static isCarouselItem(s){return s instanceof Element&&s.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return o`<slot></slot>`}};t.styles=[...e.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],t=i([c("sd-6-12-0-carousel-item")],t);export{t as a};
2
+ :host{aspect-ratio:var(--aspect-ratio);scroll-snap-align:start;scroll-snap-stop:always;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}::slotted(img){height:100%;width:100%;-o-object-fit:cover;object-fit:cover}`],t=i([c("sd-6-12-1-carousel-item")],t);export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk.IQPMMUES.js";import{a as p,d as f,h as m}from"./chunk.JMZGGLJF.js";import{b as u,e as h}from"./chunk.UOAG5PNU.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-6-12-0-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};a.styles=[...m.styles,u`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-6-12-0-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],c([f("slot")],a.prototype,"defaultSlot",2),a=c([p("sd-6-12-0-menu")],a);export{a};
1
+ import{a as w}from"./chunk.IQPMMUES.js";import{a as p,d as f,h as m}from"./chunk.JMZGGLJF.js";import{b as u,e as h}from"./chunk.UOAG5PNU.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-6-12-1-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};a.styles=[...m.styles,u`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-6-12-1-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],c([f("slot")],a.prototype,"defaultSlot",2),a=c([p("sd-6-12-1-menu")],a);export{a};
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk.3XPSGHFS.js";import{a,b as r,h as s}from"./chunk.JMZGGLJF.js";import{b as n,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-6-12-0-badge--blue--inverted-color-text sd-6-12-0-badge--blue--inverted-color-background sd-6-12-0-badge--inverted-color-border":"text-white bg-primary-500 border-white",green:this.inverted?"sd-6-12-0-badge--green-color--inverted-text sd-6-12-0-badge--green-color--inverted-background sd-6-12-0-badge--inverted-color-border":"text-white sd-6-12-0-badge--green-color-background border-white",red:this.inverted?"sd-6-12-0-badge--red--inverted-text sd-6-12-0-badge--red--inverted-background sd-6-12-0-badge--inverted-color-border":"text-white sd-6-12-0-badge--red-color-background border-white"}[this.variant])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4);min-width:var(--sd-spacing-4);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1) * 5);min-width:calc(var(--sd-spacing-1) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2);min-width:var(--sd-spacing-2)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-6-12-0-badge")],e);export{e as a};
1
+ import{a as i}from"./chunk.3XPSGHFS.js";import{a,b as r,h as s}from"./chunk.JMZGGLJF.js";import{b as n,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return d`<span part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"sd-6-12-1-badge--blue--inverted-color-text sd-6-12-1-badge--blue--inverted-color-background sd-6-12-1-badge--inverted-color-border":"text-white bg-primary-500 border-white",green:this.inverted?"sd-6-12-1-badge--green-color--inverted-text sd-6-12-1-badge--green-color--inverted-background sd-6-12-1-badge--inverted-color-border":"text-white sd-6-12-1-badge--green-color-background border-white",red:this.inverted?"sd-6-12-1-badge--red--inverted-text sd-6-12-1-badge--red--inverted-background sd-6-12-1-badge--inverted-color-border":"text-white sd-6-12-1-badge--red-color-background border-white"}[this.variant])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{display:inline-flex;align-items:center;justify-content:center}:host([size=md]){height:var(--sd-spacing-4);min-width:var(--sd-spacing-4);font-size:.625rem}:host([size=lg]){height:calc(var(--sd-spacing-1) * 5);min-width:calc(var(--sd-spacing-1) * 5);font-size:.75rem}:host([size=sm])::part(base){height:var(--sd-spacing-2);min-width:var(--sd-spacing-2)}:host([size=md])::part(base){padding-inline:var(--sd-spacing-1)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([a("sd-6-12-1-badge")],e);export{e as a};
@@ -10,4 +10,4 @@ import{a as M,h as V}from"./chunk.JMZGGLJF.js";import{b as j}from"./chunk.UOAG5P
10
10
  color: transparent;
11
11
  }
12
12
  `),i.shadowRoot.adoptedStyleSheets.push(e);let s=e.cssRules[0].style;s.setProperty("--style-observer-adopted-style-sheet-bug","1");let r=getComputedStyle(i),t=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");s.removeProperty("--style-observer-adopted-style-sheet-bug"),r=getComputedStyle(i);let n=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");return i.remove(),t===n}});var E=class extends WeakMap{has(e,s){if(arguments.length===1)return super.has(e);let r=super.get(e);return(r==null?void 0:r.has(s))||!1}add(e,s){var t;let r=(t=super.get(e))!=null?t:new Set;r.add(s),super.set(e,r)}delete(e,...s){let r=super.get(e);if(r){for(let t of s)r.delete(t);r.size===0&&super.delete(e)}}};function f(i){return i==null?[]:Array.isArray(i)?i:typeof i!="string"&&typeof i[Symbol.iterator]=="function"?Array.from(i):[i]}function H(i){return i?new Promise(e=>setTimeout(e,i)):new Promise(e=>requestAnimationFrame(e))}var N;function Q(i){N!=null||(N=document.createElement("div"));let e=N.style;e[i]="inherit";let s=[...e];return s.length===0&&(s=[i]),e.cssText="",s}function X(i){let e=i.matchAll(/(?:^|\s)([+-]?(?:\d+|\d*\.\d+))\s*(ms|s)?(?=\s|$)/g),s=[];for(let r of e){let[,t,n]=r;t=parseFloat(t),n==="s"&&(t*=1e3),s.push(t)}return s}function W(i,e){e=Z(e);let s;if(i==="all")s=/\b\w+\b/g;else{let m=[...new Set([...Q(i),i,"all"])];s=RegExp(`(?:^|\\s)(${m.join("|")})\\b`)}let r=e.findLast(m=>s.test(m)),t=r?X(r):[0,0];t.length===0?t=[0,0]:t.length===1&&t.push(0);let[n,o]=t;return{duration:n,delay:o}}function Z(i){let e=[],s=0,r=[];for(let t of i.matchAll(/[,()]/g)){let n=t[0];if(n===","){if(r.length===0){let o=i.slice(s,t.index);e.push(o.trim()),s=t.index+1}}else n==="("?r.push("("):n===")"&&r.pop()}if(s<i.length){let t=i.slice(s);e.push(t.trim())}return e}var y,T,P=class{constructor(e){d(this,y,new Set);d(this,T,new WeakMap);this.callback=e}observe(e){if(l(this,y).has(e))return;let s=e.ownerDocument,r=l(this,T).get(s);r||(r=new IntersectionObserver(t=>{this.callback(t.map(({target:n})=>({target:n})))},{root:s.documentElement}),l(this,T).set(s,r)),l(this,y).add(e),r.observe(e)}unobserve(e){if(!e){for(let t of l(this,y))this.unobserve(t);return}let s=e.ownerDocument,r=l(this,T).get(s);r==null||r.unobserve(e),l(this,y).delete(e)}};y=new WeakMap,T=new WeakMap;var R,q,ee=(q=(R=globalThis.CSS)==null?void 0:R.supports)!=null&&q.call(R,"transition-behavior","allow-discrete")?" allow-discrete":"";globalThis.document&&(S("--style-observer-transition",{inherits:!1}),a.detectAll());var x,_,G,O,c=class{constructor(e,s,r={}){d(this,_);h(this,"properties");h(this,"target");h(this,"callback");h(this,"options");d(this,x,!1);d(this,O);h(this,"_shadowSheet");h(this,"_styles",{});this.constructor.all.add(e,this),this.properties=new Map,this.target=e,this.callback=s,this.options=I({properties:[]},r);let t=f(r.properties);this.renderedObserver=new P(n=>{this.propertyNames.length>0&&this.handleEvent()}),t.length>0&&this.observe(t)}get propertyNames(){return[...this.properties.keys()]}resolveOptions(e){return Object.assign(k(e),this.options)}async handleEvent(e){if(e&&!this.properties.has(e.propertyName))return;if(a.TRANSITIONRUN_EVENT_LOOP&&(e==null?void 0:e.type)==="transitionrun"||this.options.throttle>0){let t=a.TRANSITIONRUN_EVENT_LOOP?"transitionrun":"transitionstart",n=Math.max(this.options.throttle,50);if(a.TRANSITIONRUN_EVENT_LOOP){let o=W(e.propertyName,getComputedStyle(this.target).transition);n=Math.max(n,o.duration+o.delay+16)}this.target.removeEventListener(t,this),await H(n),this.target.addEventListener(t,this)}let s=getComputedStyle(this.target),r=[];for(let t of this.propertyNames){let n=s.getPropertyValue(t),o=this.properties.get(t);n!==o&&(r.push({target:this.target,property:t,value:n,oldValue:o}),this.properties.set(t,n))}r.length>0&&this.callback(r)}observe(e){var r;if(e=f(e),e=e.filter(t=>!this.properties.has(t)),e.length===0)return;$(this,_,G).call(this);let s=getComputedStyle(this.target);for(let t of e){a.UNREGISTERED_TRANSITION&&!this.constructor.properties.has(t)&&(S(t,void 0,this.target.ownerDocument),this.constructor.properties.add(t));let n=s.getPropertyValue(t);this.properties.set(t,n)}a.TRANSITIONRUN_EVENT_LOOP&&(this.target.addEventListener("transitionrun",this),(r=a.all.TRANSITIONRUN_EVENT_LOOP.valuePending)==null||r.then(t=>{t||this.target.removeEventListener("transitionrun",this)})),this.target.addEventListener("transitionstart",this),this.target.addEventListener("transitionend",this),this.updateTransitionProperties(),this.renderedObserver.observe(this.target)}updateTransitionProperties(){this.setProperty("--style-observer-transition","");let e=new Set(getComputedStyle(this.target).transitionProperty.split(", ")),s=[];for(let t of this.constructor.all.get(this.target))s.push(...t.propertyNames);s=[...new Set(s)];let r=s.filter(t=>!e.has(t)).map(t=>`${t} 1ms step-start${ee}`).join(", ");this.setProperty("--style-observer-transition",r)}updateTransition({firstTime:e}={}){let s="var(--style-observer-transition, --style-observer-noop)",r=this.getProperty("transition"),t;(e?r:!r.includes(s))&&(t=g(this,O,r)),t===void 0&&(e||!l(this,O))&&(r.includes(s)&&this.setProperty("transition",""),t=getComputedStyle(this.target).transition),t==="all"?t="":t=t.replace(/^none\b/,"");let n=t?t+", ":"";this.setProperty("transition",n+s),this.updateTransitionProperties()}get _isHost(){return this.target.shadowRoot&&!a.ADOPTED_STYLE_SHEET&&!Object.isFrozen(this.target.shadowRoot.adoptedStyleSheets)}setProperty(e,s,r){let t=this.target.style,n=t;if(this._isHost){if(!this._shadowSheet&&(this._shadowSheet=new CSSStyleSheet,this._shadowSheet.insertRule(":host { }"),this.target.shadowRoot.adoptedStyleSheets.push(this._shadowSheet),Object.keys(this._styles).length>0))for(let o in this._styles){let m=this._styles[o];this.setProperty(o,m),t.getPropertyValue(o)===m&&t.removeProperty(o)}n=this._shadowSheet.cssRules[0].style}n.setProperty(e,s,r),this._styles[e]=this.getProperty(e)}getProperty(e){var r,t,n;return((n=(t=(r=this._shadowSheet)==null?void 0:r.cssRules[0])==null?void 0:t.style)!=null?n:this.target.style).getPropertyValue(e)}unobserve(e){e=f(e),e=e.filter(s=>this.properties.has(s));for(let s of e)this.properties.delete(s);this.properties.size===0&&(this.target.removeEventListener("transitionrun",this),this.target.removeEventListener("transitionstart",this),this.target.removeEventListener("transitionend",this),this.renderedObserver.unobserve(this.target)),this.updateTransitionProperties()}};x=new WeakMap,_=new WeakSet,G=function(){if(l(this,x))return;let e=this.constructor.all.get(this.target).size===1;this.updateTransition({firstTime:e}),g(this,x,!0)},O=new WeakMap,h(c,"properties",new Set),h(c,"all",new E);function k(i){return i?(typeof i=="string"||Array.isArray(i)?i={properties:f(i)}:typeof i=="object"&&(i=I({properties:[]},i)),i):{}}var b=class{constructor(e,s){h(this,"elementObservers",new WeakMap);var r;this.callback=e,s=k(s),(r=s.targets)!=null||(s.targets=[]),s.target&&s.targets.push(s.target),this.options=s,this.options.targets.length>0&&this.options.properties.length>0&&this.observe(this.options.targets,this.options.properties)}changed(e){this.callback(e)}observe(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0)for(let t of s){let n=this.elementObservers.get(t);n||(n=new c(t,o=>this.changed(o),this.options),this.elementObservers.set(t,n)),n.observe(r)}}unobserve(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0){r.length===0&&(r=this.options.properties);for(let t of s){let n=this.elementObservers.get(t);n&&n.unobserve(r)}}}updateTransition(e){for(let s of f(e)){let r=this.elementObservers.get(s);r&&r.updateTransition()}}};function Y(i,e){let s=[...f(i),...f(e)];i=[],e=[];for(let r of s)(typeof r=="string"||r instanceof String?e:i).push(r);return{targets:i,properties:e}}var A=class{constructor(e,s){this.host=e,this.callback=s}connect(){this.observer=new b(e=>{var r,t;let s=(t=(r=e==null?void 0:e[0])==null?void 0:r.value)==null?void 0:t.replaceAll("'","");s&&this.callback(s)}),this.observer.observe(this.host,"--sd-theme")}disconnect(){var e;(e=this.observer)==null||e.unobserve(this.host)}};var w=class extends V{handleThemeChange(e){this.emit("sd-theme-change",{detail:{theme:e},bubbles:!0})}connectedCallback(){super.connectedCallback(),this.themeObserver=new A(this,this.handleThemeChange.bind(this)),this.themeObserver.connect()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.themeObserver)==null||e.disconnect()}};w.styles=[...V.styles,j`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
13
- :host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-6-12-0-theme-listener")],w);export{w as a};
13
+ :host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-6-12-1-theme-listener")],w);export{w as a};