@solid-design-system/components 4.0.1 → 4.0.3

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 (357) hide show
  1. package/cdn/_components/menu/menu.d.ts +1 -1
  2. package/cdn/_components/menu-item/menu-item.d.ts +1 -1
  3. package/cdn/chunks/chunk.EBZIGJAF.js +11 -0
  4. package/cdn/chunks/{chunk.F3I2ZAJZ.js → chunk.Y2IK2VHT.js} +2 -2
  5. package/cdn/components/accordion/accordion.d.ts +1 -1
  6. package/cdn/components/accordion-group/accordion-group.d.ts +1 -1
  7. package/cdn/components/animation/animation.d.ts +1 -1
  8. package/cdn/components/audio/audio.d.ts +1 -1
  9. package/cdn/components/badge/badge.d.ts +1 -1
  10. package/cdn/components/button/button.d.ts +1 -1
  11. package/cdn/components/button-group/button-group.d.ts +1 -1
  12. package/cdn/components/carousel/carousel.d.ts +1 -1
  13. package/cdn/components/carousel-item/carousel-item.d.ts +1 -1
  14. package/cdn/components/checkbox/checkbox.d.ts +1 -1
  15. package/cdn/components/checkbox-group/checkbox-group.d.ts +1 -1
  16. package/cdn/components/combobox/combobox.js +1 -1
  17. package/cdn/components/dialog/dialog.d.ts +1 -1
  18. package/cdn/components/divider/divider.d.ts +1 -1
  19. package/cdn/components/drawer/drawer.d.ts +1 -1
  20. package/cdn/components/dropdown/dropdown.d.ts +1 -1
  21. package/cdn/components/expandable/expandable.d.ts +1 -1
  22. package/cdn/components/flipcard/flipcard.d.ts +1 -1
  23. package/cdn/components/header/header.d.ts +1 -1
  24. package/cdn/components/icon/icon.d.ts +1 -1
  25. package/cdn/components/include/include.d.ts +1 -1
  26. package/cdn/components/input/input.d.ts +1 -1
  27. package/cdn/components/link/link.d.ts +1 -1
  28. package/cdn/components/map-marker/map-marker.d.ts +1 -1
  29. package/cdn/components/navigation-item/navigation-item.d.ts +1 -1
  30. package/cdn/components/notification/notification.d.ts +1 -1
  31. package/cdn/components/optgroup/optgroup.d.ts +1 -1
  32. package/cdn/components/option/option.d.ts +1 -1
  33. package/cdn/components/popup/popup.d.ts +1 -1
  34. package/cdn/components/quickfact/quickfact.d.ts +1 -1
  35. package/cdn/components/radio/radio.d.ts +1 -1
  36. package/cdn/components/radio-button/radio-button.d.ts +1 -1
  37. package/cdn/components/radio-group/radio-group.d.ts +1 -1
  38. package/cdn/components/scrollable/scrollable.d.ts +1 -1
  39. package/cdn/components/select/select.js +1 -1
  40. package/cdn/components/spinner/spinner.d.ts +1 -1
  41. package/cdn/components/step/step.d.ts +1 -1
  42. package/cdn/components/step-group/step-group.d.ts +1 -1
  43. package/cdn/components/switch/switch.d.ts +1 -1
  44. package/cdn/components/tab/tab.d.ts +1 -1
  45. package/cdn/components/tab-group/tab-group.d.ts +1 -1
  46. package/cdn/components/tab-panel/tab-panel.d.ts +1 -1
  47. package/cdn/components/tag/tag.d.ts +1 -1
  48. package/cdn/components/teaser/teaser.d.ts +1 -1
  49. package/cdn/components/teaser-media/teaser-media.d.ts +1 -1
  50. package/cdn/components/textarea/textarea.d.ts +1 -1
  51. package/cdn/components/tooltip/tooltip.d.ts +1 -1
  52. package/cdn/components/video/video.d.ts +1 -1
  53. package/cdn/custom-elements.json +17 -1
  54. package/cdn/internal/form.d.ts +1 -1
  55. package/cdn/internal/longpress.d.ts +1 -1
  56. package/cdn/solid-components.bundle.js +5 -5
  57. package/cdn/solid-components.iife.js +4 -4
  58. package/cdn/solid-components.js +1 -1
  59. package/cdn/web-types.json +7 -5
  60. package/cdn-versioned/_components/menu/menu.d.ts +1 -1
  61. package/cdn-versioned/_components/menu/menu.js +1 -1
  62. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  63. package/cdn-versioned/_components/menu-item/menu-item.d.ts +1 -1
  64. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  65. package/cdn-versioned/chunks/chunk.2MKIKDQY.js +1 -1
  66. package/cdn-versioned/chunks/chunk.2RKC4PX2.js +1 -1
  67. package/cdn-versioned/chunks/chunk.37AKROZQ.js +1 -1
  68. package/cdn-versioned/chunks/chunk.3CMEDI5Q.js +2 -2
  69. package/cdn-versioned/chunks/chunk.4LW22GLX.js +1 -1
  70. package/cdn-versioned/chunks/chunk.5KCSOAA3.js +1 -1
  71. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  72. package/cdn-versioned/chunks/chunk.6BCGXAUV.js +1 -1
  73. package/cdn-versioned/chunks/chunk.6HMIEKMA.js +1 -1
  74. package/cdn-versioned/chunks/chunk.AQYKEDSK.js +1 -1
  75. package/cdn-versioned/chunks/chunk.BSXRWVFJ.js +1 -1
  76. package/cdn-versioned/chunks/chunk.C7B7IJTF.js +1 -1
  77. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  78. package/cdn-versioned/chunks/chunk.EBZIGJAF.js +11 -0
  79. package/cdn-versioned/chunks/chunk.ENXPYC3I.js +1 -1
  80. package/cdn-versioned/chunks/chunk.ERIS2E6E.js +1 -1
  81. package/cdn-versioned/chunks/chunk.FNE6AWAP.js +1 -1
  82. package/cdn-versioned/chunks/chunk.FPDKP6PN.js +1 -1
  83. package/cdn-versioned/chunks/chunk.FX3IWUZL.js +2 -2
  84. package/cdn-versioned/chunks/chunk.GI6GBMRK.js +1 -1
  85. package/cdn-versioned/chunks/chunk.I6KWEJL5.js +1 -1
  86. package/cdn-versioned/chunks/chunk.JE65MGDL.js +1 -1
  87. package/cdn-versioned/chunks/chunk.KHK74CJA.js +1 -1
  88. package/cdn-versioned/chunks/chunk.KT6CS7MB.js +1 -1
  89. package/cdn-versioned/chunks/chunk.L5LJFTUA.js +1 -1
  90. package/cdn-versioned/chunks/chunk.LFTAVPYP.js +1 -1
  91. package/cdn-versioned/chunks/chunk.LKHCEWG6.js +2 -2
  92. package/cdn-versioned/chunks/chunk.MD77BZE7.js +1 -1
  93. package/cdn-versioned/chunks/chunk.MVMJOYL7.js +1 -1
  94. package/cdn-versioned/chunks/chunk.MX2AOQKK.js +1 -1
  95. package/cdn-versioned/chunks/chunk.N7DREP3X.js +1 -1
  96. package/cdn-versioned/chunks/chunk.NCSRAXCO.js +1 -1
  97. package/cdn-versioned/chunks/chunk.NJPQO7AM.js +1 -1
  98. package/cdn-versioned/chunks/chunk.O657MMFX.js +1 -1
  99. package/cdn-versioned/chunks/chunk.OJILWIHU.js +1 -1
  100. package/cdn-versioned/chunks/chunk.OYVDI4G4.js +3 -3
  101. package/cdn-versioned/chunks/chunk.QK2P72CA.js +1 -1
  102. package/cdn-versioned/chunks/chunk.RNVF7IN5.js +1 -1
  103. package/cdn-versioned/chunks/chunk.RORUJY5E.js +1 -1
  104. package/cdn-versioned/chunks/chunk.RWS4N2NC.js +1 -1
  105. package/cdn-versioned/chunks/chunk.SH5F4YM4.js +1 -1
  106. package/cdn-versioned/chunks/chunk.TTAYTI3M.js +1 -1
  107. package/cdn-versioned/chunks/chunk.UCPHLOPM.js +1 -1
  108. package/cdn-versioned/chunks/chunk.VHSIUWDX.js +1 -1
  109. package/cdn-versioned/chunks/chunk.VVLFNR53.js +1 -1
  110. package/cdn-versioned/chunks/chunk.VWVU4BWU.js +1 -1
  111. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  112. package/cdn-versioned/chunks/chunk.WDX7NMBB.js +1 -1
  113. package/cdn-versioned/chunks/chunk.WRDPMPPA.js +1 -1
  114. package/cdn-versioned/chunks/chunk.XTSUFBWJ.js +1 -1
  115. package/cdn-versioned/chunks/{chunk.F3I2ZAJZ.js → chunk.Y2IK2VHT.js} +4 -4
  116. package/cdn-versioned/chunks/chunk.YHWKY6MV.js +1 -1
  117. package/cdn-versioned/chunks/chunk.ZAYOIELL.js +1 -1
  118. package/cdn-versioned/components/accordion/accordion.d.ts +2 -2
  119. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +2 -2
  120. package/cdn-versioned/components/animation/animation.d.ts +2 -2
  121. package/cdn-versioned/components/audio/audio.d.ts +2 -2
  122. package/cdn-versioned/components/badge/badge.d.ts +2 -2
  123. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  124. package/cdn-versioned/components/button/button.d.ts +2 -2
  125. package/cdn-versioned/components/button-group/button-group.d.ts +2 -2
  126. package/cdn-versioned/components/carousel/carousel.d.ts +2 -2
  127. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +2 -2
  128. package/cdn-versioned/components/checkbox/checkbox.d.ts +2 -2
  129. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +2 -2
  130. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  131. package/cdn-versioned/components/combobox/combobox.js +1 -1
  132. package/cdn-versioned/components/dialog/dialog.d.ts +2 -2
  133. package/cdn-versioned/components/divider/divider.d.ts +2 -2
  134. package/cdn-versioned/components/drawer/drawer.d.ts +2 -2
  135. package/cdn-versioned/components/dropdown/dropdown.d.ts +2 -2
  136. package/cdn-versioned/components/expandable/expandable.d.ts +2 -2
  137. package/cdn-versioned/components/flipcard/flipcard.d.ts +2 -2
  138. package/cdn-versioned/components/header/header.d.ts +2 -2
  139. package/cdn-versioned/components/icon/icon.d.ts +2 -2
  140. package/cdn-versioned/components/include/include.d.ts +2 -2
  141. package/cdn-versioned/components/input/input.d.ts +2 -2
  142. package/cdn-versioned/components/link/link.d.ts +2 -2
  143. package/cdn-versioned/components/map-marker/map-marker.d.ts +2 -2
  144. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +2 -2
  145. package/cdn-versioned/components/notification/notification.d.ts +2 -2
  146. package/cdn-versioned/components/optgroup/optgroup.d.ts +3 -3
  147. package/cdn-versioned/components/option/option.d.ts +2 -2
  148. package/cdn-versioned/components/popup/popup.d.ts +2 -2
  149. package/cdn-versioned/components/quickfact/quickfact.d.ts +2 -2
  150. package/cdn-versioned/components/radio/radio.d.ts +2 -2
  151. package/cdn-versioned/components/radio-button/radio-button.d.ts +2 -2
  152. package/cdn-versioned/components/radio-group/radio-group.d.ts +3 -3
  153. package/cdn-versioned/components/scrollable/scrollable.d.ts +2 -2
  154. package/cdn-versioned/components/select/select.d.ts +4 -4
  155. package/cdn-versioned/components/select/select.js +1 -1
  156. package/cdn-versioned/components/spinner/spinner.d.ts +2 -2
  157. package/cdn-versioned/components/step/step.d.ts +2 -2
  158. package/cdn-versioned/components/step-group/step-group.d.ts +2 -2
  159. package/cdn-versioned/components/switch/switch.d.ts +2 -2
  160. package/cdn-versioned/components/tab/tab.d.ts +2 -2
  161. package/cdn-versioned/components/tab-group/tab-group.d.ts +2 -2
  162. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +2 -2
  163. package/cdn-versioned/components/tag/tag.d.ts +2 -2
  164. package/cdn-versioned/components/teaser/teaser.d.ts +1 -1
  165. package/cdn-versioned/components/teaser-media/teaser-media.d.ts +1 -1
  166. package/cdn-versioned/components/textarea/textarea.d.ts +2 -2
  167. package/cdn-versioned/components/tooltip/tooltip.d.ts +2 -2
  168. package/cdn-versioned/components/video/video.d.ts +2 -2
  169. package/cdn-versioned/custom-elements.json +218 -202
  170. package/cdn-versioned/internal/form.d.ts +1 -1
  171. package/cdn-versioned/internal/form.js +3 -3
  172. package/cdn-versioned/internal/longpress.d.ts +1 -1
  173. package/cdn-versioned/solid-components.bundle.js +17 -17
  174. package/cdn-versioned/solid-components.css +2 -2
  175. package/cdn-versioned/solid-components.iife.js +17 -17
  176. package/cdn-versioned/solid-components.js +1 -1
  177. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  178. package/cdn-versioned/web-types.json +143 -141
  179. package/dist/_components/menu/menu.d.ts +1 -1
  180. package/dist/_components/menu-item/menu-item.d.ts +1 -1
  181. package/dist/chunks/{chunk.XW3H7TX7.js → chunk.BPGRUHFA.js} +3 -3
  182. package/dist/chunks/{chunk.G6LYMXKT.js → chunk.HDX43J5W.js} +3 -3
  183. package/dist/components/accordion/accordion.d.ts +1 -1
  184. package/dist/components/accordion-group/accordion-group.d.ts +1 -1
  185. package/dist/components/animation/animation.d.ts +1 -1
  186. package/dist/components/audio/audio.d.ts +1 -1
  187. package/dist/components/badge/badge.d.ts +1 -1
  188. package/dist/components/button/button.d.ts +1 -1
  189. package/dist/components/button-group/button-group.d.ts +1 -1
  190. package/dist/components/carousel/carousel.d.ts +1 -1
  191. package/dist/components/carousel-item/carousel-item.d.ts +1 -1
  192. package/dist/components/checkbox/checkbox.d.ts +1 -1
  193. package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
  194. package/dist/components/combobox/combobox.js +1 -1
  195. package/dist/components/dialog/dialog.d.ts +1 -1
  196. package/dist/components/divider/divider.d.ts +1 -1
  197. package/dist/components/drawer/drawer.d.ts +1 -1
  198. package/dist/components/dropdown/dropdown.d.ts +1 -1
  199. package/dist/components/expandable/expandable.d.ts +1 -1
  200. package/dist/components/flipcard/flipcard.d.ts +1 -1
  201. package/dist/components/header/header.d.ts +1 -1
  202. package/dist/components/icon/icon.d.ts +1 -1
  203. package/dist/components/include/include.d.ts +1 -1
  204. package/dist/components/input/input.d.ts +1 -1
  205. package/dist/components/link/link.d.ts +1 -1
  206. package/dist/components/map-marker/map-marker.d.ts +1 -1
  207. package/dist/components/navigation-item/navigation-item.d.ts +1 -1
  208. package/dist/components/notification/notification.d.ts +1 -1
  209. package/dist/components/optgroup/optgroup.d.ts +1 -1
  210. package/dist/components/option/option.d.ts +1 -1
  211. package/dist/components/popup/popup.d.ts +1 -1
  212. package/dist/components/quickfact/quickfact.d.ts +1 -1
  213. package/dist/components/radio/radio.d.ts +1 -1
  214. package/dist/components/radio-button/radio-button.d.ts +1 -1
  215. package/dist/components/radio-group/radio-group.d.ts +1 -1
  216. package/dist/components/scrollable/scrollable.d.ts +1 -1
  217. package/dist/components/select/select.js +1 -1
  218. package/dist/components/spinner/spinner.d.ts +1 -1
  219. package/dist/components/step/step.d.ts +1 -1
  220. package/dist/components/step-group/step-group.d.ts +1 -1
  221. package/dist/components/switch/switch.d.ts +1 -1
  222. package/dist/components/tab/tab.d.ts +1 -1
  223. package/dist/components/tab-group/tab-group.d.ts +1 -1
  224. package/dist/components/tab-panel/tab-panel.d.ts +1 -1
  225. package/dist/components/tag/tag.d.ts +1 -1
  226. package/dist/components/teaser/teaser.d.ts +1 -1
  227. package/dist/components/teaser-media/teaser-media.d.ts +1 -1
  228. package/dist/components/textarea/textarea.d.ts +1 -1
  229. package/dist/components/tooltip/tooltip.d.ts +1 -1
  230. package/dist/components/video/video.d.ts +1 -1
  231. package/dist/custom-elements.json +17 -1
  232. package/dist/internal/form.d.ts +1 -1
  233. package/dist/internal/longpress.d.ts +1 -1
  234. package/dist/solid-components.js +5 -5
  235. package/dist/web-types.json +7 -5
  236. package/dist-versioned/_components/menu/menu.d.ts +1 -1
  237. package/dist-versioned/_components/menu/menu.js +1 -1
  238. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  239. package/dist-versioned/_components/menu-item/menu-item.d.ts +1 -1
  240. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  241. package/dist-versioned/chunks/chunk.23WUCVW6.js +1 -1
  242. package/dist-versioned/chunks/chunk.2FWAXOB3.js +13 -13
  243. package/dist-versioned/chunks/chunk.336SOZQ7.js +2 -2
  244. package/dist-versioned/chunks/chunk.3IIJI2YI.js +2 -2
  245. package/dist-versioned/chunks/chunk.47Y6CRA6.js +1 -1
  246. package/dist-versioned/chunks/chunk.4LA6375U.js +5 -5
  247. package/dist-versioned/chunks/chunk.4NORTB4T.js +2 -2
  248. package/dist-versioned/chunks/chunk.5UXE3YAT.js +2 -2
  249. package/dist-versioned/chunks/chunk.5ZWBIPBJ.js +2 -2
  250. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  251. package/dist-versioned/chunks/chunk.6US5BJNM.js +2 -2
  252. package/dist-versioned/chunks/chunk.7JO5FCU4.js +3 -3
  253. package/dist-versioned/chunks/chunk.A7ETNRKR.js +2 -2
  254. package/dist-versioned/chunks/chunk.AFZXA6KB.js +13 -13
  255. package/dist-versioned/chunks/chunk.B2FZCDD2.js +2 -2
  256. package/dist-versioned/chunks/{chunk.XW3H7TX7.js → chunk.BPGRUHFA.js} +31 -31
  257. package/dist-versioned/chunks/chunk.BTN23KPO.js +1 -1
  258. package/dist-versioned/chunks/chunk.BZNIT6S5.js +1 -1
  259. package/dist-versioned/chunks/chunk.DHEEQPKB.js +3 -3
  260. package/dist-versioned/chunks/chunk.DID2HIGU.js +9 -9
  261. package/dist-versioned/chunks/chunk.DQUOULN6.js +2 -2
  262. package/dist-versioned/chunks/chunk.EYDGWH4T.js +1 -1
  263. package/dist-versioned/chunks/chunk.FAMYJDBN.js +2 -2
  264. package/dist-versioned/chunks/chunk.GMOZ5YXA.js +6 -6
  265. package/dist-versioned/chunks/chunk.GSDAOG7M.js +5 -5
  266. package/dist-versioned/chunks/chunk.GWYRJFJU.js +1 -1
  267. package/dist-versioned/chunks/{chunk.G6LYMXKT.js → chunk.HDX43J5W.js} +28 -28
  268. package/dist-versioned/chunks/chunk.KGZ3GBGJ.js +1 -1
  269. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  270. package/dist-versioned/chunks/chunk.LBHA2DC4.js +2 -2
  271. package/dist-versioned/chunks/chunk.MFJDLGGR.js +2 -2
  272. package/dist-versioned/chunks/chunk.NEZVEG7K.js +6 -6
  273. package/dist-versioned/chunks/chunk.NU62KGCW.js +4 -4
  274. package/dist-versioned/chunks/chunk.OZXJCMQU.js +2 -2
  275. package/dist-versioned/chunks/chunk.QDCDOA3O.js +1 -1
  276. package/dist-versioned/chunks/chunk.QEMNNDQN.js +5 -5
  277. package/dist-versioned/chunks/chunk.QZF3GDJ6.js +1 -1
  278. package/dist-versioned/chunks/chunk.R3AKTB5D.js +1 -1
  279. package/dist-versioned/chunks/chunk.REUL4QMO.js +1 -1
  280. package/dist-versioned/chunks/chunk.RGLEFOOR.js +3 -3
  281. package/dist-versioned/chunks/chunk.SWDIWUUU.js +3 -3
  282. package/dist-versioned/chunks/chunk.THY5BDBS.js +1 -1
  283. package/dist-versioned/chunks/chunk.TPF3IUIC.js +1 -1
  284. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  285. package/dist-versioned/chunks/chunk.UJYVSZ25.js +5 -5
  286. package/dist-versioned/chunks/chunk.V3JNM4K3.js +2 -2
  287. package/dist-versioned/chunks/chunk.VBMNECRY.js +5 -5
  288. package/dist-versioned/chunks/chunk.VX3KGPNB.js +2 -2
  289. package/dist-versioned/chunks/chunk.WLPV5EZN.js +11 -11
  290. package/dist-versioned/chunks/chunk.XVR2P4CC.js +3 -3
  291. package/dist-versioned/chunks/chunk.Y3F3Y4DX.js +2 -2
  292. package/dist-versioned/chunks/chunk.YA3KZ3ZS.js +5 -5
  293. package/dist-versioned/chunks/chunk.YFF7OIOH.js +1 -1
  294. package/dist-versioned/components/accordion/accordion.d.ts +2 -2
  295. package/dist-versioned/components/accordion-group/accordion-group.d.ts +2 -2
  296. package/dist-versioned/components/animation/animation.d.ts +2 -2
  297. package/dist-versioned/components/audio/audio.d.ts +2 -2
  298. package/dist-versioned/components/badge/badge.d.ts +2 -2
  299. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  300. package/dist-versioned/components/button/button.d.ts +2 -2
  301. package/dist-versioned/components/button-group/button-group.d.ts +2 -2
  302. package/dist-versioned/components/carousel/carousel.d.ts +2 -2
  303. package/dist-versioned/components/carousel-item/carousel-item.d.ts +2 -2
  304. package/dist-versioned/components/checkbox/checkbox.d.ts +2 -2
  305. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +2 -2
  306. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  307. package/dist-versioned/components/combobox/combobox.js +1 -1
  308. package/dist-versioned/components/dialog/dialog.d.ts +2 -2
  309. package/dist-versioned/components/divider/divider.d.ts +2 -2
  310. package/dist-versioned/components/drawer/drawer.d.ts +2 -2
  311. package/dist-versioned/components/dropdown/dropdown.d.ts +2 -2
  312. package/dist-versioned/components/expandable/expandable.d.ts +2 -2
  313. package/dist-versioned/components/flipcard/flipcard.d.ts +2 -2
  314. package/dist-versioned/components/header/header.d.ts +2 -2
  315. package/dist-versioned/components/icon/icon.d.ts +2 -2
  316. package/dist-versioned/components/include/include.d.ts +2 -2
  317. package/dist-versioned/components/input/input.d.ts +2 -2
  318. package/dist-versioned/components/link/link.d.ts +2 -2
  319. package/dist-versioned/components/map-marker/map-marker.d.ts +2 -2
  320. package/dist-versioned/components/navigation-item/navigation-item.d.ts +2 -2
  321. package/dist-versioned/components/notification/notification.d.ts +2 -2
  322. package/dist-versioned/components/optgroup/optgroup.d.ts +3 -3
  323. package/dist-versioned/components/option/option.d.ts +2 -2
  324. package/dist-versioned/components/popup/popup.d.ts +2 -2
  325. package/dist-versioned/components/quickfact/quickfact.d.ts +2 -2
  326. package/dist-versioned/components/radio/radio.d.ts +2 -2
  327. package/dist-versioned/components/radio-button/radio-button.d.ts +2 -2
  328. package/dist-versioned/components/radio-group/radio-group.d.ts +3 -3
  329. package/dist-versioned/components/scrollable/scrollable.d.ts +2 -2
  330. package/dist-versioned/components/select/select.d.ts +4 -4
  331. package/dist-versioned/components/select/select.js +1 -1
  332. package/dist-versioned/components/spinner/spinner.d.ts +2 -2
  333. package/dist-versioned/components/step/step.d.ts +2 -2
  334. package/dist-versioned/components/step-group/step-group.d.ts +2 -2
  335. package/dist-versioned/components/switch/switch.d.ts +2 -2
  336. package/dist-versioned/components/tab/tab.d.ts +2 -2
  337. package/dist-versioned/components/tab-group/tab-group.d.ts +2 -2
  338. package/dist-versioned/components/tab-panel/tab-panel.d.ts +2 -2
  339. package/dist-versioned/components/tag/tag.d.ts +2 -2
  340. package/dist-versioned/components/teaser/teaser.d.ts +1 -1
  341. package/dist-versioned/components/teaser-media/teaser-media.d.ts +1 -1
  342. package/dist-versioned/components/textarea/textarea.d.ts +2 -2
  343. package/dist-versioned/components/tooltip/tooltip.d.ts +2 -2
  344. package/dist-versioned/components/video/video.d.ts +2 -2
  345. package/dist-versioned/custom-elements.json +218 -202
  346. package/dist-versioned/internal/form.d.ts +1 -1
  347. package/dist-versioned/internal/form.js +3 -3
  348. package/dist-versioned/internal/longpress.d.ts +1 -1
  349. package/dist-versioned/solid-components.css +2 -2
  350. package/dist-versioned/solid-components.js +5 -5
  351. package/dist-versioned/vscode.html-custom-data.json +80 -80
  352. package/dist-versioned/web-types.json +143 -141
  353. package/package.json +2 -1
  354. package/cdn/chunks/chunk.ANSLHQOM.js +0 -11
  355. package/cdn/chunks/chunk.UH4KE6MR.js +0 -0
  356. package/cdn-versioned/chunks/chunk.ANSLHQOM.js +0 -11
  357. package/cdn-versioned/chunks/chunk.UH4KE6MR.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solid-design-system/components",
3
3
  "description": "Solid Design System: Components",
4
- "version": "4.0.1",
4
+ "version": "4.0.3",
5
5
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
6
6
  "author": "Union Investment",
7
7
  "license": "MIT",
@@ -93,6 +93,7 @@
93
93
  "globby": "^14.0.2",
94
94
  "gzip-size": "^7.0.0",
95
95
  "jsonata": "^2.0.6",
96
+ "lit-html": "^3.2.1",
96
97
  "minify-html-literals": "^1.3.5",
97
98
  "ora": "^8.1.1",
98
99
  "playwright": "^1.49.1",
@@ -1,11 +0,0 @@
1
- import{a as U}from"./chunk.6HMIEKMA.js";import{a as K}from"./chunk.MX2AOQKK.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as B}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as C,c as E}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.LFTAVPYP.js";import{a as S,d as T}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.ERIS2E6E.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),l=w(t.getTextLabel()),n=w(e);return i.includes(n)||l.includes(n)};this.getTag=t=>d`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
2
- base:tag__base,
3
- content:tag__content,
4
- removable-indicator:tag__removable-indicator,
5
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let l=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||l!=null&&l.disabled)return;if(l&&!l.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(l),this.lastOption=l,this.setOrderedSelectedOptions(l),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(l),this.setSelectedOptions(l)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==p&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,l=this.getOption(e,i);return d`${typeof l=="string"?$(l):l}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
6
- base:tag__base,
7
- content:tag__content,
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.maxOptionsTagLabel}</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"&&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"&&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.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-option"),l=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!==l&&(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(),l=e.indexOf(i),n=Math.max(0,l);if(t){let p=l+1;n=p>e.length-1?0:p}else{let p=l-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let l=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());l&&(l.selected=e!=null?e:!l.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,l;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=((l=this.selectedOptions[0])==null?void 0:l.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let l=i.cloneNode(!0);if(l.current=l.value===((y=this.lastOption)==null?void 0:y.value),l.selected=i.selected,l.checkbox=i.checkbox,l.size=i.size,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-optgroup"))return l;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(l),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(l),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:l}=E(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,l),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}=E(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")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-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((l,n)=>{this.multiple&&(l.checkbox=!0),l.id=l.id||`sd-combobox-option-${n}`}),e.forEach((l,n)=>{l.id=l.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"),l=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${l&&"inline-block mb-2"}" aria-hidden="${!l}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
- popup:popup__content,
11
- "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||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}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y,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="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-icon":F,"sd-popup":K,"sd-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([c("sd-popup")],s.prototype,"popup",2),a([c('[part="combobox"]')],s.prototype,"combobox",2),a([c('[part="display-input"]')],s.prototype,"displayInput",2),a([c(".value-input")],s.prototype,"valueInput",2),a([c('[part="listbox"]')],s.prototype,"listbox",2),a([c('[part="tags"]')],s.prototype,"tagWrapper",2),a([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),a([c("slot:not([name])")],s.prototype,"defaultSlot",2),a([c("#invalid-message")],s.prototype,"invalidMessage",2),a([h()],s.prototype,"hasHover",2),a([h()],s.prototype,"hasFocus",2),a([h()],s.prototype,"displayInputValue",2),a([h()],s.prototype,"selectedTextLabel",2),a([h()],s.prototype,"selectedOptions",2),a([h()],s.prototype,"filteredOptions",2),a([h()],s.prototype,"allOptions",2),a([h()],s.prototype,"lastOption",2),a([h()],s.prototype,"showValidStyle",2),a([h()],s.prototype,"showInvalidStyle",2),a([o()],s.prototype,"name",2),a([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),a([A()],s.prototype,"defaultValue",2),a([o({reflect:!0})],s.prototype,"size",2),a([o()],s.prototype,"placeholder",2),a([o({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),a([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),a([o({type:Boolean})],s.prototype,"clearable",2),a([o({reflect:!0,type:Boolean})],s.prototype,"open",2),a([o({type:Boolean})],s.prototype,"hoist",2),a([o()],s.prototype,"label",2),a([o({reflect:!0})],s.prototype,"placement",2),a([o({attribute:"help-text"})],s.prototype,"helpText",2),a([o({reflect:!0})],s.prototype,"form",2),a([o({reflect:!0,type:Boolean})],s.prototype,"required",2),a([h()],s.prototype,"currentPlacement",2),a([o()],s.prototype,"getOption",2),a([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),a([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),a([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),a([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),a([o()],s.prototype,"filter",2),a([o()],s.prototype,"getTag",2),a([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),a([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),a([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),a([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),a([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),a([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),a([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=a([k("sd-combobox")],s);C("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});C("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
File without changes
@@ -1,11 +0,0 @@
1
- import{a as U}from"./chunk.6HMIEKMA.js";import{a as K}from"./chunk.MX2AOQKK.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as B}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as C,c as E}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.LFTAVPYP.js";import{a as S,d as T}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.ERIS2E6E.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-1-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),l=w(t.getTextLabel()),n=w(e);return i.includes(n)||l.includes(n)};this.getTag=t=>d`<sd-4-0-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
2
- base:tag__base,
3
- content:tag__content,
4
- removable-indicator:tag__removable-indicator,
5
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-4-0-1-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let l=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||l!=null&&l.disabled)return;if(l&&!l.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(l),this.lastOption=l,this.setOrderedSelectedOptions(l),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(l),this.setSelectedOptions(l)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==p&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,l=this.getOption(e,i);return d`${typeof l=="string"?$(l):l}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-1-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-1-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
6
- base:tag__base,
7
- content:tag__content,
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.maxOptionsTagLabel}</sd-4-0-1-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.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.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-1-option"),l=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!==l&&(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(),l=e.indexOf(i),n=Math.max(0,l);if(t){let p=l+1;n=p>e.length-1?0:p}else{let p=l-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-1-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let l=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());l&&(l.selected=e!=null?e:!l.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,l;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=((l=this.selectedOptions[0])==null?void 0:l.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let l=i.cloneNode(!0);if(l.current=l.value===((y=this.lastOption)==null?void 0:y.value),l.selected=i.selected,l.checkbox=i.checkbox,l.size=i.size,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-1-optgroup"))return l;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(l),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(l),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-1-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:l}=E(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,l),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}=E(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")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-1-option")){customElements.whenDefined("sd-4-0-1-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((l,n)=>{this.multiple&&(l.checkbox=!0),l.id=l.id||`sd-4-0-1-combobox-option-${n}`}),e.forEach((l,n)=>{l.id=l.id||`sd-4-0-1-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"),l=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${l&&"inline-block mb-2"}" aria-hidden="${!l}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
- popup:popup__content,
11
- "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||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}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y,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-4-0-1-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-1-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-1-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-1-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-1-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-1-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-1-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-1-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-1-icon":F,"sd-4-0-1-popup":K,"sd-4-0-1-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-1-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-1-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-1-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-1-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-1-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([c("sd-4-0-1-popup")],s.prototype,"popup",2),a([c('[part="combobox"]')],s.prototype,"combobox",2),a([c('[part="display-input"]')],s.prototype,"displayInput",2),a([c(".value-input")],s.prototype,"valueInput",2),a([c('[part="listbox"]')],s.prototype,"listbox",2),a([c('[part="tags"]')],s.prototype,"tagWrapper",2),a([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),a([c("slot:not([name])")],s.prototype,"defaultSlot",2),a([c("#invalid-message")],s.prototype,"invalidMessage",2),a([h()],s.prototype,"hasHover",2),a([h()],s.prototype,"hasFocus",2),a([h()],s.prototype,"displayInputValue",2),a([h()],s.prototype,"selectedTextLabel",2),a([h()],s.prototype,"selectedOptions",2),a([h()],s.prototype,"filteredOptions",2),a([h()],s.prototype,"allOptions",2),a([h()],s.prototype,"lastOption",2),a([h()],s.prototype,"showValidStyle",2),a([h()],s.prototype,"showInvalidStyle",2),a([o()],s.prototype,"name",2),a([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),a([A()],s.prototype,"defaultValue",2),a([o({reflect:!0})],s.prototype,"size",2),a([o()],s.prototype,"placeholder",2),a([o({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),a([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),a([o({type:Boolean})],s.prototype,"clearable",2),a([o({reflect:!0,type:Boolean})],s.prototype,"open",2),a([o({type:Boolean})],s.prototype,"hoist",2),a([o()],s.prototype,"label",2),a([o({reflect:!0})],s.prototype,"placement",2),a([o({attribute:"help-text"})],s.prototype,"helpText",2),a([o({reflect:!0})],s.prototype,"form",2),a([o({reflect:!0,type:Boolean})],s.prototype,"required",2),a([h()],s.prototype,"currentPlacement",2),a([o()],s.prototype,"getOption",2),a([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),a([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),a([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),a([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),a([o()],s.prototype,"filter",2),a([o()],s.prototype,"getTag",2),a([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),a([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),a([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),a([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),a([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),a([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),a([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=a([k("sd-4-0-1-combobox")],s);C("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});C("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
File without changes