@solid-design-system/components 4.0.0-next.5 → 4.0.0-next.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. package/cdn/chunks/chunk.5FM4F3Y4.js +1 -0
  2. package/cdn/chunks/chunk.BUUMCPDC.js +11 -0
  3. package/cdn/chunks/chunk.WHEYQDOD.js +11 -0
  4. package/cdn/components/combobox/combobox.d.ts +1 -0
  5. package/cdn/components/combobox/combobox.js +1 -1
  6. package/cdn/components/flipcard/flipcard.d.ts +1 -0
  7. package/cdn/components/flipcard/flipcard.js +1 -1
  8. package/cdn/components/select/select.d.ts +1 -0
  9. package/cdn/components/select/select.js +1 -1
  10. package/cdn/custom-elements.json +37 -1
  11. package/cdn/solid-components.bundle.js +14 -14
  12. package/cdn/solid-components.iife.js +14 -14
  13. package/cdn/solid-components.js +1 -1
  14. package/cdn/vscode.html-custom-data.json +11 -1
  15. package/cdn/web-types.json +21 -2
  16. package/cdn-versioned/_components/menu/menu.js +1 -1
  17. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  18. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  19. package/cdn-versioned/chunks/chunk.24SF73MY.js +1 -1
  20. package/cdn-versioned/chunks/chunk.2IZXJHH7.js +1 -1
  21. package/cdn-versioned/chunks/chunk.36Z2VDHI.js +1 -1
  22. package/cdn-versioned/chunks/chunk.3ATYVOO4.js +1 -1
  23. package/cdn-versioned/chunks/chunk.4HIKTDIM.js +3 -3
  24. package/cdn-versioned/chunks/chunk.4W3WLVGR.js +1 -1
  25. package/cdn-versioned/chunks/chunk.5FM4F3Y4.js +1 -0
  26. package/cdn-versioned/chunks/chunk.5ZDWEJDB.js +1 -1
  27. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  28. package/cdn-versioned/chunks/chunk.6JBTCFHE.js +2 -2
  29. package/cdn-versioned/chunks/chunk.7M7VCE7R.js +1 -1
  30. package/cdn-versioned/chunks/chunk.7RJ3O2FV.js +1 -1
  31. package/cdn-versioned/chunks/chunk.APMDRZQD.js +1 -1
  32. package/cdn-versioned/chunks/chunk.BUUMCPDC.js +11 -0
  33. package/cdn-versioned/chunks/chunk.C2PA7CKF.js +1 -1
  34. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  35. package/cdn-versioned/chunks/chunk.DMLGBWCL.js +1 -1
  36. package/cdn-versioned/chunks/chunk.DVHKKAVM.js +1 -1
  37. package/cdn-versioned/chunks/chunk.EWWGLHC5.js +1 -1
  38. package/cdn-versioned/chunks/chunk.F7J6HN76.js +1 -1
  39. package/cdn-versioned/chunks/chunk.FD54463O.js +1 -1
  40. package/cdn-versioned/chunks/chunk.FFNTXFC3.js +1 -1
  41. package/cdn-versioned/chunks/chunk.FX3ED655.js +1 -1
  42. package/cdn-versioned/chunks/chunk.GOVNZSCO.js +1 -1
  43. package/cdn-versioned/chunks/chunk.GQSLHWQC.js +1 -1
  44. package/cdn-versioned/chunks/chunk.ISEQUO4U.js +1 -1
  45. package/cdn-versioned/chunks/chunk.ITRQVXFY.js +1 -1
  46. package/cdn-versioned/chunks/chunk.IZKUI5WK.js +1 -1
  47. package/cdn-versioned/chunks/chunk.KMLMMBY4.js +1 -1
  48. package/cdn-versioned/chunks/chunk.LLXTYJXF.js +1 -1
  49. package/cdn-versioned/chunks/chunk.LZEFLOSA.js +1 -1
  50. package/cdn-versioned/chunks/chunk.MPP7HYX7.js +1 -1
  51. package/cdn-versioned/chunks/chunk.MX22EZXK.js +1 -1
  52. package/cdn-versioned/chunks/chunk.ND7BT52X.js +1 -1
  53. package/cdn-versioned/chunks/chunk.NUB5WHGD.js +1 -1
  54. package/cdn-versioned/chunks/chunk.O4UXOQEI.js +1 -1
  55. package/cdn-versioned/chunks/chunk.OVV7TNT2.js +1 -1
  56. package/cdn-versioned/chunks/chunk.PBPFKJKV.js +1 -1
  57. package/cdn-versioned/chunks/chunk.QFNCQQ6S.js +1 -1
  58. package/cdn-versioned/chunks/chunk.QNZWJACC.js +2 -2
  59. package/cdn-versioned/chunks/chunk.R354E6ZD.js +1 -1
  60. package/cdn-versioned/chunks/chunk.TA7CZCP3.js +1 -1
  61. package/cdn-versioned/chunks/chunk.U443X4TI.js +1 -1
  62. package/cdn-versioned/chunks/chunk.UBFU6D5B.js +1 -1
  63. package/cdn-versioned/chunks/chunk.URB2K7JQ.js +1 -1
  64. package/cdn-versioned/chunks/chunk.VNKUGTKM.js +1 -1
  65. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  66. package/cdn-versioned/chunks/chunk.WENTMXB2.js +1 -1
  67. package/cdn-versioned/chunks/chunk.WHEYQDOD.js +11 -0
  68. package/cdn-versioned/chunks/chunk.WQAPHFVM.js +1 -1
  69. package/cdn-versioned/chunks/chunk.YF5WEC4R.js +2 -2
  70. package/cdn-versioned/chunks/chunk.ZFA2VPUT.js +1 -1
  71. package/cdn-versioned/chunks/chunk.ZRIABVVM.js +1 -1
  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/button/button.d.ts +1 -1
  79. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  80. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  81. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  82. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  83. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  84. package/cdn-versioned/components/combobox/combobox.d.ts +5 -4
  85. package/cdn-versioned/components/combobox/combobox.js +1 -1
  86. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  87. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  88. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  89. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  90. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  91. package/cdn-versioned/components/flipcard/flipcard.d.ts +2 -1
  92. package/cdn-versioned/components/flipcard/flipcard.js +1 -1
  93. package/cdn-versioned/components/header/header.d.ts +1 -1
  94. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  95. package/cdn-versioned/components/include/include.d.ts +1 -1
  96. package/cdn-versioned/components/input/input.d.ts +1 -1
  97. package/cdn-versioned/components/link/link.d.ts +1 -1
  98. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  99. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  100. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  101. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  102. package/cdn-versioned/components/option/option.d.ts +1 -1
  103. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  104. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  105. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  106. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  107. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  108. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  109. package/cdn-versioned/components/select/select.d.ts +5 -4
  110. package/cdn-versioned/components/select/select.js +1 -1
  111. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  112. package/cdn-versioned/components/step/step.d.ts +1 -1
  113. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  114. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  115. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  116. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  117. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  118. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  119. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  120. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  121. package/cdn-versioned/components/video/video.d.ts +1 -1
  122. package/cdn-versioned/custom-elements.json +238 -202
  123. package/cdn-versioned/internal/form.js +3 -3
  124. package/cdn-versioned/solid-components.bundle.js +18 -18
  125. package/cdn-versioned/solid-components.css +2 -2
  126. package/cdn-versioned/solid-components.iife.js +18 -18
  127. package/cdn-versioned/solid-components.js +1 -1
  128. package/cdn-versioned/vscode.html-custom-data.json +90 -80
  129. package/cdn-versioned/web-types.json +156 -137
  130. package/dist/chunks/{chunk.I3PY3VYP.js → chunk.B44AE4VW.js} +14 -4
  131. package/dist/chunks/{chunk.WWS3CQ2Z.js → chunk.KTJRTRDJ.js} +16 -5
  132. package/dist/chunks/{chunk.EFEBQQHC.js → chunk.PPBZXQVJ.js} +28 -17
  133. package/dist/components/combobox/combobox.d.ts +1 -0
  134. package/dist/components/combobox/combobox.js +1 -1
  135. package/dist/components/flipcard/flipcard.d.ts +1 -0
  136. package/dist/components/flipcard/flipcard.js +1 -1
  137. package/dist/components/select/select.d.ts +1 -0
  138. package/dist/components/select/select.js +1 -1
  139. package/dist/custom-elements.json +37 -1
  140. package/dist/solid-components.js +3 -3
  141. package/dist/vscode.html-custom-data.json +11 -1
  142. package/dist/web-types.json +21 -2
  143. package/dist-versioned/_components/menu/menu.js +1 -1
  144. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  145. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  146. package/dist-versioned/chunks/chunk.2IBVAXOX.js +1 -1
  147. package/dist-versioned/chunks/chunk.3IT4HBTI.js +1 -1
  148. package/dist-versioned/chunks/chunk.3LGDUVS4.js +2 -2
  149. package/dist-versioned/chunks/chunk.4JZQQD4L.js +3 -3
  150. package/dist-versioned/chunks/chunk.4QKRGAOL.js +4 -4
  151. package/dist-versioned/chunks/chunk.4RGGPCD5.js +2 -2
  152. package/dist-versioned/chunks/chunk.65BWRJEA.js +5 -5
  153. package/dist-versioned/chunks/chunk.6CUAQSFA.js +2 -2
  154. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  155. package/dist-versioned/chunks/chunk.727ERQ4F.js +2 -2
  156. package/dist-versioned/chunks/chunk.743FPQRN.js +2 -2
  157. package/dist-versioned/chunks/chunk.76ZNNLGN.js +1 -1
  158. package/dist-versioned/chunks/chunk.7OHSCBBX.js +1 -1
  159. package/dist-versioned/chunks/{chunk.I3PY3VYP.js → chunk.B44AE4VW.js} +40 -30
  160. package/dist-versioned/chunks/chunk.BG3M5FUP.js +13 -13
  161. package/dist-versioned/chunks/chunk.BVC5FY4L.js +13 -13
  162. package/dist-versioned/chunks/chunk.BXB5WF23.js +5 -5
  163. package/dist-versioned/chunks/chunk.D6JZ4IKM.js +1 -1
  164. package/dist-versioned/chunks/chunk.DQPVSTUQ.js +3 -3
  165. package/dist-versioned/chunks/chunk.EKFRFDTB.js +5 -5
  166. package/dist-versioned/chunks/chunk.H655M7FD.js +1 -1
  167. package/dist-versioned/chunks/chunk.HPR3PWAE.js +3 -3
  168. package/dist-versioned/chunks/chunk.IN3GJ5QL.js +3 -3
  169. package/dist-versioned/chunks/chunk.J2XBUIBC.js +2 -2
  170. package/dist-versioned/chunks/chunk.J7MMF6WJ.js +2 -2
  171. package/dist-versioned/chunks/{chunk.WWS3CQ2Z.js → chunk.KTJRTRDJ.js} +20 -9
  172. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  173. package/dist-versioned/chunks/chunk.MTSAWJLV.js +2 -2
  174. package/dist-versioned/chunks/chunk.NM6QP6RJ.js +2 -2
  175. package/dist-versioned/chunks/chunk.PDRECIYA.js +1 -1
  176. package/dist-versioned/chunks/chunk.PGZ5AWZ2.js +9 -9
  177. package/dist-versioned/chunks/chunk.PIR4YJUS.js +2 -2
  178. package/dist-versioned/chunks/{chunk.EFEBQQHC.js → chunk.PPBZXQVJ.js} +52 -41
  179. package/dist-versioned/chunks/chunk.QAZYUCBK.js +6 -6
  180. package/dist-versioned/chunks/chunk.QCICV36Z.js +6 -6
  181. package/dist-versioned/chunks/chunk.QP3SM2LZ.js +3 -3
  182. package/dist-versioned/chunks/chunk.R4BETATX.js +1 -1
  183. package/dist-versioned/chunks/chunk.RNSJAVQE.js +1 -1
  184. package/dist-versioned/chunks/chunk.RZRTIYXA.js +1 -1
  185. package/dist-versioned/chunks/chunk.SPBPHTSS.js +2 -2
  186. package/dist-versioned/chunks/chunk.SSH6ATRK.js +2 -2
  187. package/dist-versioned/chunks/chunk.TWXYFPBS.js +2 -2
  188. package/dist-versioned/chunks/chunk.U5NFPAOX.js +2 -2
  189. package/dist-versioned/chunks/chunk.U6RY25TF.js +2 -2
  190. package/dist-versioned/chunks/chunk.UC5E3AEF.js +1 -1
  191. package/dist-versioned/chunks/chunk.UDZYWRPT.js +1 -1
  192. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  193. package/dist-versioned/chunks/chunk.V7TQ6VJU.js +1 -1
  194. package/dist-versioned/chunks/chunk.VHGHICFG.js +2 -2
  195. package/dist-versioned/chunks/chunk.XVFJS7VS.js +5 -5
  196. package/dist-versioned/chunks/chunk.Z2UY62T2.js +1 -1
  197. package/dist-versioned/chunks/chunk.ZGPGFEVP.js +5 -5
  198. package/dist-versioned/chunks/chunk.ZWJI7SLE.js +11 -11
  199. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  200. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  201. package/dist-versioned/components/animation/animation.d.ts +1 -1
  202. package/dist-versioned/components/audio/audio.d.ts +1 -1
  203. package/dist-versioned/components/badge/badge.d.ts +1 -1
  204. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  205. package/dist-versioned/components/button/button.d.ts +1 -1
  206. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  207. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  208. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  209. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  210. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  211. package/dist-versioned/components/combobox/combobox.d.ts +5 -4
  212. package/dist-versioned/components/combobox/combobox.js +1 -1
  213. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  214. package/dist-versioned/components/divider/divider.d.ts +1 -1
  215. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  216. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  217. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  218. package/dist-versioned/components/flipcard/flipcard.d.ts +2 -1
  219. package/dist-versioned/components/flipcard/flipcard.js +1 -1
  220. package/dist-versioned/components/header/header.d.ts +1 -1
  221. package/dist-versioned/components/icon/icon.d.ts +1 -1
  222. package/dist-versioned/components/include/include.d.ts +1 -1
  223. package/dist-versioned/components/input/input.d.ts +1 -1
  224. package/dist-versioned/components/link/link.d.ts +1 -1
  225. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  226. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  227. package/dist-versioned/components/notification/notification.d.ts +1 -1
  228. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  229. package/dist-versioned/components/option/option.d.ts +1 -1
  230. package/dist-versioned/components/popup/popup.d.ts +1 -1
  231. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  232. package/dist-versioned/components/radio/radio.d.ts +1 -1
  233. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  234. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  235. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  236. package/dist-versioned/components/select/select.d.ts +5 -4
  237. package/dist-versioned/components/select/select.js +1 -1
  238. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  239. package/dist-versioned/components/step/step.d.ts +1 -1
  240. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  241. package/dist-versioned/components/switch/switch.d.ts +1 -1
  242. package/dist-versioned/components/tab/tab.d.ts +1 -1
  243. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  244. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  245. package/dist-versioned/components/tag/tag.d.ts +1 -1
  246. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  247. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  248. package/dist-versioned/components/video/video.d.ts +1 -1
  249. package/dist-versioned/custom-elements.json +238 -202
  250. package/dist-versioned/internal/form.js +3 -3
  251. package/dist-versioned/solid-components.css +2 -2
  252. package/dist-versioned/solid-components.js +3 -3
  253. package/dist-versioned/vscode.html-custom-data.json +90 -80
  254. package/dist-versioned/web-types.json +156 -137
  255. package/package.json +2 -2
  256. package/cdn/chunks/chunk.DEX5VJGX.js +0 -11
  257. package/cdn/chunks/chunk.ROBLMI7Q.js +0 -11
  258. package/cdn/chunks/chunk.SNUMAAEG.js +0 -1
  259. package/cdn-versioned/chunks/chunk.DEX5VJGX.js +0 -11
  260. package/cdn-versioned/chunks/chunk.ROBLMI7Q.js +0 -11
  261. package/cdn-versioned/chunks/chunk.SNUMAAEG.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk.HE2LNCWW.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.APMDRZQD.js";import{b as l,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(a){a.code==="Enter"&&this.front===a.target&&this.flipFront()}handleBackKeydown(a){a.code==="Enter"&&this.back===a.target&&this.flipBack()}render(){return d`<div part="base" class="${r("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${r("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${r("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${r("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${r("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.frontVariant])}"></div><sd-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${r("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="system" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${s(this.activeSide==="front"||void 0)}" class="${r("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${r("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${r("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-b from-primary-800/75 to-primary-800/60":"bg-gradient-to-t from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${r("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-40% mb-auto":"bg-gradient-to-t from-white/60 to-40% mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-40% mt-auto":"bg-gradient-to-b from-primary-800/60 to-40% mb-auto"}[this.backVariant])}"></div><sd-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${r("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="system" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};t.styles=[...n.styles,l`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],i([o('[part="front"]')],t.prototype,"front",2),i([o('[part="back"]')],t.prototype,"back",2),i([e({reflect:!0,attribute:"flip-direction"})],t.prototype,"flipDirection",2),i([e({reflect:!0})],t.prototype,"placement",2),i([e({type:String,reflect:!0,attribute:"front-variant"})],t.prototype,"frontVariant",2),i([e({type:String,reflect:!0,attribute:"back-variant"})],t.prototype,"backVariant",2),i([m()],t.prototype,"activeSide",2),t=i([c("sd-flipcard")],t);export{t as a};
@@ -0,0 +1,11 @@
1
+ import{a as U}from"./chunk.3ATYVOO4.js";import{a as K}from"./chunk.VNKUGTKM.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as 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.24SF73MY.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.APMDRZQD.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.localize.term("comboboxDefaultPlaceholder");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}" .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};
@@ -0,0 +1,11 @@
1
+ import{a as F}from"./chunk.3ATYVOO4.js";import{a as z}from"./chunk.VNKUGTKM.js";import{a as M}from"./chunk.D7TMPF3D.js";import{c as A}from"./chunk.3L472FD4.js";import{b as L}from"./chunk.65NSSTJE.js";import{a as x,c as O}from"./chunk.A3DKF5BY.js";import{a as E,b as k}from"./chunk.24SF73MY.js";import{a as g,d as y}from"./chunk.RQYP7MH5.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as I}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as T,b as n,c as u,d as m,g as $,h as v}from"./chunk.APMDRZQD.js";import{b as C,e as d}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var s=class extends v{constructor(){super(...arguments);this.formControlController=new L(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new I(this);this.typeToSelectString="";this.hasHover=!1;this.displayLabel="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder=this.localize.term("selectDefaultPlaceholder");this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=e=>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="${t=>this.handleTagKeyDown(t,e)}" @sd-remove="${t=>this.handleTagRemove(t,e)}">${e.getTextLabel()}</sd-tag>`;this.handleDocumentFocusIn=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()};this.handleDocumentKeyDown=e=>{let t=e.target,l=t.closest(".select__clear")!==null,a=t.closest("sd-icon-button")!==null;if(!(l||a)){if(e.key==="Escape"&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let h=this.getAllOptions(),o=h.indexOf(this.currentOption),r=Math.max(0,o);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(r=o+1,r>h.length-1&&(r=0)):e.key==="ArrowUp"?(r=o-1,r<0&&(r=h.length-1)):e.key==="Home"?r=0:e.key==="End"&&(r=h.length-1),this.setCurrentOption(h[r])}if(e.key.length===1||e.key==="Backspace"){let h=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(let o of h)if(o.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(o);break}}}};this.handleDocumentMouseDown=e=>{let t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(e,t){var l,a,h;if(e.key==="Backspace"&&this.multiple){e.preventDefault(),e.stopPropagation();let o=(l=e.currentTarget)==null?void 0:l.parentElement,r=(a=o==null?void 0:o.previousElementSibling)==null?void 0:a.querySelector("sd-tag"),c=(h=o==null?void 0:o.nextElementSibling)==null?void 0:h.querySelector("sd-tag");this.handleTagRemove(new CustomEvent("sd-remove"),t),this.updateComplete.then(()=>{c?c.focus():r?r.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(e){e.key==="Backspace"&&this.multiple&&(e.preventDefault(),e.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var l;let t=(l=this.shadowRoot)==null?void 0:l.querySelectorAll("sd-tag");t&&t.length>0?t==null||t[(t==null?void 0:t.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){let l=e.composedPath().some(a=>a instanceof HTMLSlotElement&&a.name==="removable-indicator");this.disabled||l||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){let l=e.target.closest("sd-option"),a=this.value;l&&!l.disabled&&(this.multiple?this.toggleOptionSelection(l):this.setSelectedOptions(l),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],l=[];customElements.get("sd-option")?(e.forEach(a=>{this.multiple&&(a.checkbox=!0),l.push(a.value)}),this.setSelectedOptions(e.filter(a=>t.includes(a.value)))):customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(e,t){e.stopPropagation(),t||this.clearSelect(),t&&!this.disabled&&(this.toggleOptionSelection(t,!1),this.deletedTagLabel=this.localize.term("removed",t.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){let t=this.getAllOptions(),l=Array.isArray(e)?e:[e];t.forEach(a=>a.selected=!1),l.length&&l.forEach(a=>a.selected=!0),Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,Array.isArray(e)?this.selectionChanged():this.selectionChanged(e)}selectionChanged(e){var t,l,a,h;e&&this.multiple?this.selectedOptions.find(o=>o.value===e.value)?this.selectedOptions=this.selectedOptions.filter(o=>o.value!==e.value):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=this.getAllOptions().filter(o=>o.selected),this.multiple?(this.value=this.selectedOptions.map(o=>o.value),this.useTags||this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(l=(t=this.selectedOptions[0])==null?void 0:t.value)!=null?l:"",this.displayLabel=(h=(a=this.selectedOptions[0])==null?void 0:a.getTextLabel())!=null?h:""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){let l=this.getTag(e,t);return d`<div @sd-remove="${a=>this.handleTagRemove(a,e)}">${typeof l=="string"?E(l):l}</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="${e=>this.handleTagMaxOptionsKeyDown(e)}" @sd-remove="${e=>this.handleTagRemove(e)}">${this.selectedOptions.length} ${this.maxOptionsTagLabel}</sd-tag>`]}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(e){let t=e.detail;t&&(this.currentPlacement=t)}handleUseTagsChange(){let e=this.getAllOptions();customElements.get("sd-option")&&e.forEach(t=>{t.checkbox=this.multiple})}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await y(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:e,options:t}=O(this,"select.show",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await y(this);let{keyframes:e,options:t}=O(this,"select.hide",{dir:this.localize.dir()});await g(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(e=>{e.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(l=>t.includes(l.value)))}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,w(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,w(this,"sd-after-hide")}checkValidity(){var e;return(e=this.valueInput)==null?void 0:e.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){let e={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text")},t=this.label?!0:!!e.label,l=this.helpText?!0:!!e.helpText,a=this.clearable&&!this.disabled,h=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",o=this.disabled?"cursor-not-allowed":"cursor-pointer",r={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${p("relative text-left",o,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" role="alert" aria-live="assertive">${this.deletedTagLabel}</span><div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${t&&"inline-block"}" aria-hidden="${t?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="${p("relative w-full bg-white",h==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${p("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"}[h],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="${p("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="${p("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}"><input name="${this.name}" form="${this.form}" part="display-input" class="${p("appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",o,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?d`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<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="${p("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",o)}" 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}"> ${a?d`<button part="clear-button" class="${p("select__clear flex justify-center",r,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${p("text-icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-icon part="invalid-icon" class="${p(r,c,"text-error")}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-icon part="valid-icon" class="${p("flex-shrink-0 text-success",r,c)}" library="system" name="status-check"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${p("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",this.disabled?"text-neutral-500":"text-primary",c)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${p("bg-white px-2 py-3 relative border-primary overflow-y-scroll",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" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${l?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-icon":k,"sd-popup":z,"sd-tag":F},s.styles=[...v.styles,C`: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))}`],i([$({selector:"sd-option"})],s.prototype,"_optionsInDefaultSlot",2),i([m("sd-popup")],s.prototype,"popup",2),i([m('[part="combobox"]')],s.prototype,"combobox",2),i([m('[part="display-input"]')],s.prototype,"displayInput",2),i([m(".value-input")],s.prototype,"valueInput",2),i([m('[part="listbox"]')],s.prototype,"listbox",2),i([m("#invalid-message")],s.prototype,"invalidMessage",2),i([u()],s.prototype,"hasHover",2),i([u()],s.prototype,"displayLabel",2),i([u()],s.prototype,"deletedTagLabel",2),i([u()],s.prototype,"hasFocus",2),i([u()],s.prototype,"currentOption",2),i([u()],s.prototype,"selectedOptions",2),i([u()],s.prototype,"showValidStyle",2),i([u()],s.prototype,"showInvalidStyle",2),i([M()],s.prototype,"defaultValue",2),i([n({type:Boolean,reflect:!0})],s.prototype,"open",2),i([n({reflect:!0})],s.prototype,"size",2),i([n({reflect:!0})],s.prototype,"placement",2),i([n()],s.prototype,"label",2),i([n()],s.prototype,"placeholder",2),i([n({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),i([n({type:Boolean,reflect:!0})],s.prototype,"disabled",2),i([n({attribute:"help-text"})],s.prototype,"helpText",2),i([u()],s.prototype,"currentPlacement",2),i([n({type:Boolean})],s.prototype,"clearable",2),i([n({type:Boolean,reflect:!0})],s.prototype,"multiple",2),i([n({type:Boolean,reflect:!0})],s.prototype,"useTags",2),i([n({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),i([n({reflect:!0})],s.prototype,"form",2),i([n()],s.prototype,"name",2),i([n({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],s.prototype,"value",2),i([n({type:Boolean,reflect:!0})],s.prototype,"required",2),i([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),i([n({type:Boolean})],s.prototype,"hoist",2),i([n()],s.prototype,"getTag",2),i([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),i([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),i([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),i([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),i([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),s=i([T("sd-select")],s);x("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});x("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
@@ -40,6 +40,7 @@ export default class SdCombobox extends SolidElement implements SolidFormControl
40
40
  defaultValue: string;
41
41
  size: 'lg' | 'md' | 'sm';
42
42
  placeholder: string;
43
+ maxOptionsTagLabel: string;
43
44
  disabled: boolean;
44
45
  clearable: boolean;
45
46
  open: boolean;
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.ROBLMI7Q.js";import"../../chunks/chunk.UH4KE6MR.js";import"../../chunks/chunk.3ATYVOO4.js";import"../../chunks/chunk.VNKUGTKM.js";import"../../chunks/chunk.D7TMPF3D.js";import"../../chunks/chunk.X2GM34WQ.js";import"../../chunks/chunk.W7A3TU2Z.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.BUUMCPDC.js";import"../../chunks/chunk.UH4KE6MR.js";import"../../chunks/chunk.3ATYVOO4.js";import"../../chunks/chunk.VNKUGTKM.js";import"../../chunks/chunk.D7TMPF3D.js";import"../../chunks/chunk.X2GM34WQ.js";import"../../chunks/chunk.W7A3TU2Z.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -8,6 +8,7 @@ export default class SdFlipcard extends SolidElement {
8
8
  placement: 'top' | 'bottom';
9
9
  frontVariant: 'primary' | 'primary-100' | 'gradient-light' | 'gradient-dark';
10
10
  backVariant: 'primary' | 'primary-100' | 'gradient-light' | 'gradient-dark';
11
+ activeSide: 'front' | 'back';
11
12
  connectedCallback(): void;
12
13
  private flipFront;
13
14
  private flipBack;
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.SNUMAAEG.js";import"../../chunks/chunk.ZRIABVVM.js";import"../../chunks/chunk.LZEFLOSA.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.5FM4F3Y4.js";import"../../chunks/chunk.ZRIABVVM.js";import"../../chunks/chunk.LZEFLOSA.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -38,6 +38,7 @@ export default class SdSelect extends SolidElement implements SolidFormControl {
38
38
  placement: 'top' | 'bottom';
39
39
  label: string;
40
40
  placeholder: string;
41
+ maxOptionsTagLabel: string;
41
42
  disabled: boolean;
42
43
  helpText: string;
43
44
  currentPlacement: "top" | "bottom";
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.DEX5VJGX.js";import"../../chunks/chunk.UH4KE6MR.js";import"../../chunks/chunk.3ATYVOO4.js";import"../../chunks/chunk.VNKUGTKM.js";import"../../chunks/chunk.D7TMPF3D.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.WHEYQDOD.js";import"../../chunks/chunk.UH4KE6MR.js";import"../../chunks/chunk.3ATYVOO4.js";import"../../chunks/chunk.VNKUGTKM.js";import"../../chunks/chunk.D7TMPF3D.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.24SF73MY.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.APMDRZQD.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -3933,6 +3933,12 @@
3933
3933
  "description": "Placeholder text to show as a hint when the combobox is empty.",
3934
3934
  "attribute": "placeholder"
3935
3935
  },
3936
+ {
3937
+ "kind": "field",
3938
+ "name": "maxOptionsTagLabel",
3939
+ "description": "Label text shown on tag if max-options-visible is reached.",
3940
+ "attribute": "max-options-tag-label"
3941
+ },
3936
3942
  {
3937
3943
  "kind": "field",
3938
3944
  "name": "disabled",
@@ -4304,6 +4310,11 @@
4304
4310
  "description": "Placeholder text to show as a hint when the combobox is empty.",
4305
4311
  "fieldName": "placeholder"
4306
4312
  },
4313
+ {
4314
+ "name": "max-options-tag-label",
4315
+ "description": "Label text shown on tag if max-options-visible is reached.",
4316
+ "fieldName": "maxOptionsTagLabel"
4317
+ },
4307
4318
  {
4308
4319
  "name": "disabled",
4309
4320
  "type": {
@@ -6350,6 +6361,14 @@
6350
6361
  "attribute": "back-variant",
6351
6362
  "reflects": true
6352
6363
  },
6364
+ {
6365
+ "kind": "field",
6366
+ "name": "activeSide",
6367
+ "type": {
6368
+ "text": "'front' | 'back'"
6369
+ },
6370
+ "default": "'front'"
6371
+ },
6353
6372
  {
6354
6373
  "kind": "field",
6355
6374
  "name": "dir",
@@ -12148,6 +12167,12 @@
12148
12167
  "kind": "class",
12149
12168
  "description": "",
12150
12169
  "name": "SdSelect",
12170
+ "cssProperties": [
12171
+ {
12172
+ "description": "Set the maximum width of the tags and to show an ellipsis. Defaults to \"15ch\"",
12173
+ "name": "--tag-max-width"
12174
+ }
12175
+ ],
12151
12176
  "cssParts": [
12152
12177
  {
12153
12178
  "description": "The form control that wraps the label, input, and help text.",
@@ -12320,6 +12345,12 @@
12320
12345
  "description": "Placeholder text to show as a hint when the select is empty.",
12321
12346
  "attribute": "placeholder"
12322
12347
  },
12348
+ {
12349
+ "kind": "field",
12350
+ "name": "maxOptionsTagLabel",
12351
+ "description": "Label text shown on tag if max-options-visible is reached.",
12352
+ "attribute": "max-options-tag-label"
12353
+ },
12323
12354
  {
12324
12355
  "kind": "field",
12325
12356
  "name": "disabled",
@@ -12655,6 +12686,11 @@
12655
12686
  "description": "Placeholder text to show as a hint when the select is empty.",
12656
12687
  "fieldName": "placeholder"
12657
12688
  },
12689
+ {
12690
+ "name": "max-options-tag-label",
12691
+ "description": "Label text shown on tag if max-options-visible is reached.",
12692
+ "fieldName": "maxOptionsTagLabel"
12693
+ },
12658
12694
  {
12659
12695
  "name": "disabled",
12660
12696
  "type": {
@@ -16660,7 +16696,7 @@
16660
16696
  "package": {
16661
16697
  "name": "@solid-design-system/components",
16662
16698
  "description": "Solid Design System: Components",
16663
- "version": "4.0.0-next.5",
16699
+ "version": "4.0.0-next.7",
16664
16700
  "author": "Union Investment",
16665
16701
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
16666
16702
  "license": "MIT"