@synergy-design-system/components 2.7.3 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/chunks/{chunk.EY2Y3YRB.js → chunk.2QZJVYXZ.js} +2 -2
  2. package/dist/chunks/{chunk.HYHMM5YY.js → chunk.2VGUDLNP.js} +2 -2
  3. package/dist/chunks/chunk.2Y33P22F.js +19 -0
  4. package/dist/chunks/chunk.2Y33P22F.js.map +7 -0
  5. package/dist/chunks/{chunk.ALLHYPJO.js → chunk.3MI2YYYP.js} +5 -5
  6. package/dist/chunks/{chunk.HPSPKQLI.js → chunk.3PECQYUM.js} +6 -6
  7. package/dist/chunks/{chunk.4WIQUVMN.js → chunk.3PMJXCGF.js} +2 -2
  8. package/dist/chunks/{chunk.3JNRTS6S.js → chunk.4OSD25EN.js} +2 -2
  9. package/dist/chunks/{chunk.2MSXUGA3.js → chunk.4PTV2G5L.js} +2 -2
  10. package/dist/chunks/{chunk.UPND3GC3.js → chunk.52JYIPPF.js} +6 -6
  11. package/dist/chunks/{chunk.JBOBJZS2.js → chunk.576XTTSC.js} +3 -3
  12. package/dist/chunks/{chunk.B7O5Z3R6.js → chunk.57O66K77.js} +2 -2
  13. package/dist/chunks/{chunk.XRXMHJTJ.js → chunk.5IBMJU5B.js} +2 -2
  14. package/dist/chunks/{chunk.HXNRNBJJ.js → chunk.5LY7AGHD.js} +2 -2
  15. package/dist/chunks/{chunk.4G2ABYSY.js → chunk.5P7T4EJW.js} +2 -2
  16. package/dist/chunks/{chunk.QEF2QGUA.js → chunk.76SYNITQ.js} +4 -4
  17. package/dist/chunks/{chunk.2G33IFLB.js → chunk.7L5M45GY.js} +2 -2
  18. package/dist/chunks/{chunk.OTAHBVCK.js → chunk.A2JGI7YK.js} +2 -2
  19. package/dist/chunks/{chunk.FCJAOZAO.js → chunk.AAFLJTCI.js} +2 -2
  20. package/dist/chunks/{chunk.MK6YKHLR.js → chunk.ACEU7Q65.js} +2 -2
  21. package/dist/chunks/{chunk.EZ7I56KK.js → chunk.AFGSWIVU.js} +2 -2
  22. package/dist/chunks/{chunk.VG4DMEAL.js → chunk.AO7D6MGZ.js} +6 -6
  23. package/dist/chunks/{chunk.HPZNNV2N.js → chunk.B7G5PMM3.js} +2 -2
  24. package/dist/chunks/{chunk.ECDY5TKE.js → chunk.BADCMLNU.js} +2 -2
  25. package/dist/chunks/{chunk.44FNGHON.js → chunk.BAU2TJA6.js} +6 -6
  26. package/dist/chunks/{chunk.2KZ6JLJO.js → chunk.BGIPS7RY.js} +2 -2
  27. package/dist/chunks/{chunk.PRFM7LHM.js → chunk.BJ2F6ARR.js} +2 -2
  28. package/dist/chunks/{chunk.NDG2QRC6.js → chunk.BS6RCJAA.js} +4 -4
  29. package/dist/chunks/{chunk.U7R56RK2.js → chunk.BWIAZH7P.js} +2 -2
  30. package/dist/chunks/{chunk.5BCFFU3J.js → chunk.C2U4OMNI.js} +2 -2
  31. package/dist/chunks/{chunk.XL6QVKUJ.js → chunk.CKE7C643.js} +3 -3
  32. package/dist/chunks/{chunk.NIPOPIJP.js → chunk.CUCUCDH2.js} +5 -5
  33. package/dist/chunks/{chunk.6ZK3DZXC.js → chunk.CW4MHF2R.js} +2 -2
  34. package/dist/chunks/{chunk.I6M5U7WI.js → chunk.D6HHUC7H.js} +5 -5
  35. package/dist/chunks/{chunk.RLLRACFX.js → chunk.DORQF2IR.js} +2 -2
  36. package/dist/chunks/chunk.DPCIJLV4.js +39 -0
  37. package/dist/chunks/chunk.DPCIJLV4.js.map +7 -0
  38. package/dist/chunks/{chunk.ORZP7K64.js → chunk.DYYUQIA2.js} +6 -6
  39. package/dist/chunks/{chunk.Z2UVOZS7.js → chunk.E3QPS5XK.js} +2 -2
  40. package/dist/chunks/{chunk.GFGLP2XV.js → chunk.EAPQXMZ2.js} +2 -2
  41. package/dist/chunks/{chunk.5GMJIKGV.js → chunk.EG2IMMFQ.js} +3 -3
  42. package/dist/chunks/{chunk.BCAVTKWB.js → chunk.EM53DV44.js} +3 -3
  43. package/dist/chunks/{chunk.QNJIEARD.js → chunk.EN7WGVFV.js} +2 -2
  44. package/dist/chunks/{chunk.7JO5GM6Q.js → chunk.EZNNJFB7.js} +2 -2
  45. package/dist/chunks/{chunk.NXCWYPDM.js → chunk.FHB2H5R2.js} +2 -2
  46. package/dist/chunks/{chunk.YSJVZKXR.js → chunk.FIZMTZML.js} +3 -3
  47. package/dist/chunks/chunk.FV5CR37F.js +12 -0
  48. package/dist/chunks/chunk.FV5CR37F.js.map +7 -0
  49. package/dist/chunks/{chunk.KEA5422Y.js → chunk.FWGBAOEO.js} +2 -2
  50. package/dist/chunks/{chunk.UAGD75LH.js → chunk.GWH3EUTB.js} +9 -9
  51. package/dist/chunks/{chunk.DT36GYSH.js → chunk.HHBOU4HL.js} +2 -2
  52. package/dist/chunks/{chunk.6H325Y64.js → chunk.HHRJTCUN.js} +6 -6
  53. package/dist/chunks/{chunk.O7D5YLTT.js → chunk.HJN2PJLO.js} +2 -2
  54. package/dist/chunks/{chunk.5EJ2YM4D.js → chunk.HM57BJF5.js} +5 -5
  55. package/dist/chunks/{chunk.A3FSHIF2.js → chunk.ISY76A43.js} +4 -4
  56. package/dist/chunks/chunk.J2OXSQAK.js +345 -0
  57. package/dist/chunks/chunk.J2OXSQAK.js.map +7 -0
  58. package/dist/chunks/{chunk.SEJ765XO.js → chunk.J44JFQKE.js} +6 -6
  59. package/dist/chunks/{chunk.O5FATZG2.js → chunk.JI7DN44F.js} +2 -2
  60. package/dist/chunks/{chunk.RD3OMAT5.js → chunk.KQTEJUZC.js} +2 -2
  61. package/dist/chunks/{chunk.GIBJ6FPQ.js → chunk.KTALTT2Z.js} +2 -2
  62. package/dist/chunks/{chunk.6ZGBHIAN.js → chunk.MSPUCOOE.js} +6 -6
  63. package/dist/chunks/{chunk.JEUDRPFA.js → chunk.NB7DQIH4.js} +2 -2
  64. package/dist/chunks/{chunk.ASZAVTMB.js → chunk.NC25624J.js} +2 -2
  65. package/dist/chunks/{chunk.27IBSVKG.js → chunk.OCZ6SNNW.js} +2 -2
  66. package/dist/chunks/{chunk.4TRRPM7T.js → chunk.OMUEASJV.js} +6 -6
  67. package/dist/chunks/{chunk.BZ4XKZIO.js → chunk.OOSXOXEW.js} +9 -9
  68. package/dist/chunks/{chunk.346JZFRN.js → chunk.P7BBVH4J.js} +9 -9
  69. package/dist/chunks/{chunk.GTWZJL5P.js → chunk.P7HCXUSU.js} +2 -2
  70. package/dist/chunks/{chunk.HQSCOWEI.js → chunk.POA3IDNG.js} +2 -2
  71. package/dist/chunks/{chunk.HQSCOWEI.js.map → chunk.POA3IDNG.js.map} +1 -1
  72. package/dist/chunks/{chunk.Q2LDKDXO.js → chunk.PTFQMAJK.js} +2 -2
  73. package/dist/chunks/{chunk.5TZ32OW5.js → chunk.Q4VDUQXB.js} +2 -2
  74. package/dist/chunks/{chunk.PSO4P4GI.js → chunk.QA7ENF6T.js} +2 -2
  75. package/dist/chunks/{chunk.27VOTCNN.js → chunk.QEE6QHNL.js} +2 -2
  76. package/dist/chunks/{chunk.25BLXBE3.js → chunk.QENGAJI2.js} +2 -2
  77. package/dist/chunks/{chunk.D6S3UBQR.js → chunk.QHRX5Z2F.js} +2 -2
  78. package/dist/chunks/{chunk.JAE3UEX3.js → chunk.QI7ZFRLW.js} +3 -3
  79. package/dist/chunks/{chunk.ZAPJHYAZ.js → chunk.QILAGLSO.js} +2 -2
  80. package/dist/chunks/{chunk.4GSWQCRZ.js → chunk.QOFFSNC7.js} +2 -2
  81. package/dist/chunks/{chunk.2VUT3BL6.js → chunk.RC5BEOPA.js} +2 -2
  82. package/dist/chunks/{chunk.X66YHPJA.js → chunk.RHR4U6OW.js} +2 -2
  83. package/dist/chunks/{chunk.PMZH2LSC.js → chunk.RTMHCZ2X.js} +2 -2
  84. package/dist/chunks/{chunk.N67W7UCV.js → chunk.RUYJJAFE.js} +2 -2
  85. package/dist/chunks/chunk.SRH6ZOHT.js +24 -0
  86. package/dist/chunks/chunk.SRH6ZOHT.js.map +7 -0
  87. package/dist/chunks/{chunk.URLTXPUD.js → chunk.SYY26NKV.js} +3 -3
  88. package/dist/chunks/{chunk.XA7VQOLP.js → chunk.SZWESO3L.js} +2 -2
  89. package/dist/chunks/{chunk.6TC2LPMR.js → chunk.UJ2YRD74.js} +2 -2
  90. package/dist/chunks/{chunk.47QPSOZS.js → chunk.UQ4AQCDW.js} +2 -2
  91. package/dist/chunks/{chunk.G7HAFDVT.js → chunk.UQ6SGBIE.js} +2 -2
  92. package/dist/chunks/{chunk.K4MYBKIV.js → chunk.UUDEWIY2.js} +5 -5
  93. package/dist/chunks/{chunk.HQ4HY5BJ.js → chunk.VJ34GMBJ.js} +3 -3
  94. package/dist/chunks/{chunk.LHLRPAQ2.js → chunk.VKYAP6J3.js} +2 -2
  95. package/dist/chunks/{chunk.PBKQU2MD.js → chunk.W6DMUOGD.js} +3 -3
  96. package/dist/chunks/{chunk.YYWAJRPZ.js → chunk.WNHTRLHT.js} +2 -2
  97. package/dist/chunks/{chunk.LZD6FGSA.js → chunk.WRCWSEE7.js} +2 -2
  98. package/dist/chunks/{chunk.JGBBFBPJ.js → chunk.X3UWO4AP.js} +2 -2
  99. package/dist/chunks/{chunk.EGA4WZHP.js → chunk.Y2EMVYXM.js} +2 -2
  100. package/dist/chunks/{chunk.5D3ZJ7E6.js → chunk.ZNLBIUIN.js} +2 -2
  101. package/dist/chunks/{chunk.72HIKLQG.js → chunk.ZO4VONAT.js} +2 -2
  102. package/dist/chunks/{chunk.72HIKLQG.js.map → chunk.ZO4VONAT.js.map} +1 -1
  103. package/dist/chunks/chunk.ZWBQZ3TF.js +815 -0
  104. package/dist/chunks/chunk.ZWBQZ3TF.js.map +7 -0
  105. package/dist/components/accordion/accordion.component.js +2 -2
  106. package/dist/components/accordion/accordion.js +3 -3
  107. package/dist/components/alert/alert.component.js +5 -5
  108. package/dist/components/alert/alert.js +6 -6
  109. package/dist/components/badge/badge.component.js +2 -2
  110. package/dist/components/badge/badge.js +3 -3
  111. package/dist/components/breadcrumb/breadcrumb.component.js +4 -4
  112. package/dist/components/breadcrumb/breadcrumb.js +5 -5
  113. package/dist/components/breadcrumb-item/breadcrumb-item.component.js +2 -2
  114. package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
  115. package/dist/components/button/button.component.js +5 -5
  116. package/dist/components/button/button.js +6 -6
  117. package/dist/components/button-group/button-group.component.js +2 -2
  118. package/dist/components/button-group/button-group.js +3 -3
  119. package/dist/components/card/card.component.js +2 -2
  120. package/dist/components/card/card.js +3 -3
  121. package/dist/components/checkbox/checkbox.component.js +6 -6
  122. package/dist/components/checkbox/checkbox.js +7 -7
  123. package/dist/components/combobox/combobox.component.d.ts +214 -0
  124. package/dist/components/combobox/combobox.component.js +33 -0
  125. package/dist/components/combobox/combobox.component.js.map +7 -0
  126. package/dist/components/combobox/combobox.custom.styles.d.ts +2 -0
  127. package/dist/components/combobox/combobox.custom.styles.js +8 -0
  128. package/dist/components/combobox/combobox.custom.styles.js.map +7 -0
  129. package/dist/components/combobox/combobox.d.ts +8 -0
  130. package/dist/components/combobox/combobox.js +34 -0
  131. package/dist/components/combobox/combobox.js.map +7 -0
  132. package/dist/components/combobox/combobox.styles.d.ts +8 -0
  133. package/dist/components/combobox/combobox.styles.js +8 -0
  134. package/dist/components/combobox/combobox.styles.js.map +7 -0
  135. package/dist/components/combobox/option-renderer.d.ts +18 -0
  136. package/dist/components/combobox/option-renderer.js +10 -0
  137. package/dist/components/combobox/option-renderer.js.map +7 -0
  138. package/dist/components/combobox/utils.d.ts +39 -0
  139. package/dist/components/combobox/utils.js +18 -0
  140. package/dist/components/combobox/utils.js.map +7 -0
  141. package/dist/components/details/details.component.js +4 -4
  142. package/dist/components/details/details.js +5 -5
  143. package/dist/components/dialog/dialog.component.js +7 -7
  144. package/dist/components/dialog/dialog.js +8 -8
  145. package/dist/components/divider/divider.component.js +2 -2
  146. package/dist/components/divider/divider.js +3 -3
  147. package/dist/components/drawer/drawer.component.js +7 -7
  148. package/dist/components/drawer/drawer.js +8 -8
  149. package/dist/components/dropdown/dropdown.component.js +4 -4
  150. package/dist/components/dropdown/dropdown.js +5 -5
  151. package/dist/components/file/file.component.js +6 -6
  152. package/dist/components/file/file.js +7 -7
  153. package/dist/components/header/header.component.js +5 -5
  154. package/dist/components/header/header.js +6 -6
  155. package/dist/components/icon/icon.component.js +3 -3
  156. package/dist/components/icon/icon.js +4 -4
  157. package/dist/components/icon-button/icon-button.component.js +4 -4
  158. package/dist/components/icon-button/icon-button.js +5 -5
  159. package/dist/components/input/input.component.js +5 -5
  160. package/dist/components/input/input.js +6 -6
  161. package/dist/components/menu/menu.component.js +2 -2
  162. package/dist/components/menu/menu.js +3 -3
  163. package/dist/components/menu-item/menu-item.component.js +6 -6
  164. package/dist/components/menu-item/menu-item.js +7 -7
  165. package/dist/components/menu-label/menu-label.component.js +4 -4
  166. package/dist/components/menu-label/menu-label.js +5 -5
  167. package/dist/components/nav-item/nav-item.component.js +3 -3
  168. package/dist/components/nav-item/nav-item.js +4 -4
  169. package/dist/components/optgroup/optgroup.component.js +3 -3
  170. package/dist/components/optgroup/optgroup.js +4 -4
  171. package/dist/components/option/option.component.js +5 -5
  172. package/dist/components/option/option.js +6 -6
  173. package/dist/components/popup/popup.component.js +2 -2
  174. package/dist/components/popup/popup.js +3 -3
  175. package/dist/components/prio-nav/prio-nav.component.js +12 -12
  176. package/dist/components/prio-nav/prio-nav.js +13 -13
  177. package/dist/components/progress-bar/progress-bar.component.js +2 -2
  178. package/dist/components/progress-bar/progress-bar.js +3 -3
  179. package/dist/components/progress-ring/progress-ring.component.js +2 -2
  180. package/dist/components/progress-ring/progress-ring.js +3 -3
  181. package/dist/components/radio/radio.component.js +4 -4
  182. package/dist/components/radio/radio.js +5 -5
  183. package/dist/components/radio-button/radio-button.component.js +2 -2
  184. package/dist/components/radio-button/radio-button.js +3 -3
  185. package/dist/components/radio-group/radio-group.component.js +3 -3
  186. package/dist/components/radio-group/radio-group.js +4 -4
  187. package/dist/components/range/range.component.js +6 -6
  188. package/dist/components/range/range.js +7 -7
  189. package/dist/components/range-tick/range-tick.component.js +2 -2
  190. package/dist/components/range-tick/range-tick.js +3 -3
  191. package/dist/components/select/select.component.js +9 -9
  192. package/dist/components/select/select.custom.styles.js +1 -1
  193. package/dist/components/select/select.js +10 -10
  194. package/dist/components/side-nav/side-nav.component.js +11 -11
  195. package/dist/components/side-nav/side-nav.js +12 -12
  196. package/dist/components/spinner/spinner.component.js +2 -2
  197. package/dist/components/spinner/spinner.js +3 -3
  198. package/dist/components/switch/switch.component.js +3 -3
  199. package/dist/components/switch/switch.js +4 -4
  200. package/dist/components/tab/tab.component.js +5 -5
  201. package/dist/components/tab/tab.js +6 -6
  202. package/dist/components/tab-group/tab-group.component.js +6 -6
  203. package/dist/components/tab-group/tab-group.js +7 -7
  204. package/dist/components/tab-panel/tab-panel.component.js +2 -2
  205. package/dist/components/tab-panel/tab-panel.js +3 -3
  206. package/dist/components/tag/tag.component.js +6 -6
  207. package/dist/components/tag/tag.js +7 -7
  208. package/dist/components/textarea/textarea.component.js +2 -2
  209. package/dist/components/textarea/textarea.js +3 -3
  210. package/dist/components/tooltip/tooltip.component.js +4 -4
  211. package/dist/components/tooltip/tooltip.js +5 -5
  212. package/dist/custom-elements.json +1039 -77
  213. package/dist/styles/fouc.css +1 -0
  214. package/dist/styles/index.css +2 -1
  215. package/dist/synergy.d.ts +2 -0
  216. package/dist/synergy.js +151 -137
  217. package/dist/vscode.html-custom-data.json +117 -23
  218. package/package.json +4 -4
  219. /package/dist/chunks/{chunk.EY2Y3YRB.js.map → chunk.2QZJVYXZ.js.map} +0 -0
  220. /package/dist/chunks/{chunk.HYHMM5YY.js.map → chunk.2VGUDLNP.js.map} +0 -0
  221. /package/dist/chunks/{chunk.ALLHYPJO.js.map → chunk.3MI2YYYP.js.map} +0 -0
  222. /package/dist/chunks/{chunk.HPSPKQLI.js.map → chunk.3PECQYUM.js.map} +0 -0
  223. /package/dist/chunks/{chunk.4WIQUVMN.js.map → chunk.3PMJXCGF.js.map} +0 -0
  224. /package/dist/chunks/{chunk.3JNRTS6S.js.map → chunk.4OSD25EN.js.map} +0 -0
  225. /package/dist/chunks/{chunk.2MSXUGA3.js.map → chunk.4PTV2G5L.js.map} +0 -0
  226. /package/dist/chunks/{chunk.UPND3GC3.js.map → chunk.52JYIPPF.js.map} +0 -0
  227. /package/dist/chunks/{chunk.JBOBJZS2.js.map → chunk.576XTTSC.js.map} +0 -0
  228. /package/dist/chunks/{chunk.B7O5Z3R6.js.map → chunk.57O66K77.js.map} +0 -0
  229. /package/dist/chunks/{chunk.XRXMHJTJ.js.map → chunk.5IBMJU5B.js.map} +0 -0
  230. /package/dist/chunks/{chunk.HXNRNBJJ.js.map → chunk.5LY7AGHD.js.map} +0 -0
  231. /package/dist/chunks/{chunk.4G2ABYSY.js.map → chunk.5P7T4EJW.js.map} +0 -0
  232. /package/dist/chunks/{chunk.QEF2QGUA.js.map → chunk.76SYNITQ.js.map} +0 -0
  233. /package/dist/chunks/{chunk.2G33IFLB.js.map → chunk.7L5M45GY.js.map} +0 -0
  234. /package/dist/chunks/{chunk.OTAHBVCK.js.map → chunk.A2JGI7YK.js.map} +0 -0
  235. /package/dist/chunks/{chunk.FCJAOZAO.js.map → chunk.AAFLJTCI.js.map} +0 -0
  236. /package/dist/chunks/{chunk.MK6YKHLR.js.map → chunk.ACEU7Q65.js.map} +0 -0
  237. /package/dist/chunks/{chunk.EZ7I56KK.js.map → chunk.AFGSWIVU.js.map} +0 -0
  238. /package/dist/chunks/{chunk.VG4DMEAL.js.map → chunk.AO7D6MGZ.js.map} +0 -0
  239. /package/dist/chunks/{chunk.HPZNNV2N.js.map → chunk.B7G5PMM3.js.map} +0 -0
  240. /package/dist/chunks/{chunk.ECDY5TKE.js.map → chunk.BADCMLNU.js.map} +0 -0
  241. /package/dist/chunks/{chunk.44FNGHON.js.map → chunk.BAU2TJA6.js.map} +0 -0
  242. /package/dist/chunks/{chunk.2KZ6JLJO.js.map → chunk.BGIPS7RY.js.map} +0 -0
  243. /package/dist/chunks/{chunk.PRFM7LHM.js.map → chunk.BJ2F6ARR.js.map} +0 -0
  244. /package/dist/chunks/{chunk.NDG2QRC6.js.map → chunk.BS6RCJAA.js.map} +0 -0
  245. /package/dist/chunks/{chunk.U7R56RK2.js.map → chunk.BWIAZH7P.js.map} +0 -0
  246. /package/dist/chunks/{chunk.5BCFFU3J.js.map → chunk.C2U4OMNI.js.map} +0 -0
  247. /package/dist/chunks/{chunk.XL6QVKUJ.js.map → chunk.CKE7C643.js.map} +0 -0
  248. /package/dist/chunks/{chunk.NIPOPIJP.js.map → chunk.CUCUCDH2.js.map} +0 -0
  249. /package/dist/chunks/{chunk.6ZK3DZXC.js.map → chunk.CW4MHF2R.js.map} +0 -0
  250. /package/dist/chunks/{chunk.I6M5U7WI.js.map → chunk.D6HHUC7H.js.map} +0 -0
  251. /package/dist/chunks/{chunk.RLLRACFX.js.map → chunk.DORQF2IR.js.map} +0 -0
  252. /package/dist/chunks/{chunk.ORZP7K64.js.map → chunk.DYYUQIA2.js.map} +0 -0
  253. /package/dist/chunks/{chunk.Z2UVOZS7.js.map → chunk.E3QPS5XK.js.map} +0 -0
  254. /package/dist/chunks/{chunk.GFGLP2XV.js.map → chunk.EAPQXMZ2.js.map} +0 -0
  255. /package/dist/chunks/{chunk.5GMJIKGV.js.map → chunk.EG2IMMFQ.js.map} +0 -0
  256. /package/dist/chunks/{chunk.BCAVTKWB.js.map → chunk.EM53DV44.js.map} +0 -0
  257. /package/dist/chunks/{chunk.QNJIEARD.js.map → chunk.EN7WGVFV.js.map} +0 -0
  258. /package/dist/chunks/{chunk.7JO5GM6Q.js.map → chunk.EZNNJFB7.js.map} +0 -0
  259. /package/dist/chunks/{chunk.NXCWYPDM.js.map → chunk.FHB2H5R2.js.map} +0 -0
  260. /package/dist/chunks/{chunk.YSJVZKXR.js.map → chunk.FIZMTZML.js.map} +0 -0
  261. /package/dist/chunks/{chunk.KEA5422Y.js.map → chunk.FWGBAOEO.js.map} +0 -0
  262. /package/dist/chunks/{chunk.UAGD75LH.js.map → chunk.GWH3EUTB.js.map} +0 -0
  263. /package/dist/chunks/{chunk.DT36GYSH.js.map → chunk.HHBOU4HL.js.map} +0 -0
  264. /package/dist/chunks/{chunk.6H325Y64.js.map → chunk.HHRJTCUN.js.map} +0 -0
  265. /package/dist/chunks/{chunk.O7D5YLTT.js.map → chunk.HJN2PJLO.js.map} +0 -0
  266. /package/dist/chunks/{chunk.5EJ2YM4D.js.map → chunk.HM57BJF5.js.map} +0 -0
  267. /package/dist/chunks/{chunk.A3FSHIF2.js.map → chunk.ISY76A43.js.map} +0 -0
  268. /package/dist/chunks/{chunk.SEJ765XO.js.map → chunk.J44JFQKE.js.map} +0 -0
  269. /package/dist/chunks/{chunk.O5FATZG2.js.map → chunk.JI7DN44F.js.map} +0 -0
  270. /package/dist/chunks/{chunk.RD3OMAT5.js.map → chunk.KQTEJUZC.js.map} +0 -0
  271. /package/dist/chunks/{chunk.GIBJ6FPQ.js.map → chunk.KTALTT2Z.js.map} +0 -0
  272. /package/dist/chunks/{chunk.6ZGBHIAN.js.map → chunk.MSPUCOOE.js.map} +0 -0
  273. /package/dist/chunks/{chunk.JEUDRPFA.js.map → chunk.NB7DQIH4.js.map} +0 -0
  274. /package/dist/chunks/{chunk.ASZAVTMB.js.map → chunk.NC25624J.js.map} +0 -0
  275. /package/dist/chunks/{chunk.27IBSVKG.js.map → chunk.OCZ6SNNW.js.map} +0 -0
  276. /package/dist/chunks/{chunk.4TRRPM7T.js.map → chunk.OMUEASJV.js.map} +0 -0
  277. /package/dist/chunks/{chunk.BZ4XKZIO.js.map → chunk.OOSXOXEW.js.map} +0 -0
  278. /package/dist/chunks/{chunk.346JZFRN.js.map → chunk.P7BBVH4J.js.map} +0 -0
  279. /package/dist/chunks/{chunk.GTWZJL5P.js.map → chunk.P7HCXUSU.js.map} +0 -0
  280. /package/dist/chunks/{chunk.Q2LDKDXO.js.map → chunk.PTFQMAJK.js.map} +0 -0
  281. /package/dist/chunks/{chunk.5TZ32OW5.js.map → chunk.Q4VDUQXB.js.map} +0 -0
  282. /package/dist/chunks/{chunk.PSO4P4GI.js.map → chunk.QA7ENF6T.js.map} +0 -0
  283. /package/dist/chunks/{chunk.27VOTCNN.js.map → chunk.QEE6QHNL.js.map} +0 -0
  284. /package/dist/chunks/{chunk.25BLXBE3.js.map → chunk.QENGAJI2.js.map} +0 -0
  285. /package/dist/chunks/{chunk.D6S3UBQR.js.map → chunk.QHRX5Z2F.js.map} +0 -0
  286. /package/dist/chunks/{chunk.JAE3UEX3.js.map → chunk.QI7ZFRLW.js.map} +0 -0
  287. /package/dist/chunks/{chunk.ZAPJHYAZ.js.map → chunk.QILAGLSO.js.map} +0 -0
  288. /package/dist/chunks/{chunk.4GSWQCRZ.js.map → chunk.QOFFSNC7.js.map} +0 -0
  289. /package/dist/chunks/{chunk.2VUT3BL6.js.map → chunk.RC5BEOPA.js.map} +0 -0
  290. /package/dist/chunks/{chunk.X66YHPJA.js.map → chunk.RHR4U6OW.js.map} +0 -0
  291. /package/dist/chunks/{chunk.PMZH2LSC.js.map → chunk.RTMHCZ2X.js.map} +0 -0
  292. /package/dist/chunks/{chunk.N67W7UCV.js.map → chunk.RUYJJAFE.js.map} +0 -0
  293. /package/dist/chunks/{chunk.URLTXPUD.js.map → chunk.SYY26NKV.js.map} +0 -0
  294. /package/dist/chunks/{chunk.XA7VQOLP.js.map → chunk.SZWESO3L.js.map} +0 -0
  295. /package/dist/chunks/{chunk.6TC2LPMR.js.map → chunk.UJ2YRD74.js.map} +0 -0
  296. /package/dist/chunks/{chunk.47QPSOZS.js.map → chunk.UQ4AQCDW.js.map} +0 -0
  297. /package/dist/chunks/{chunk.G7HAFDVT.js.map → chunk.UQ6SGBIE.js.map} +0 -0
  298. /package/dist/chunks/{chunk.K4MYBKIV.js.map → chunk.UUDEWIY2.js.map} +0 -0
  299. /package/dist/chunks/{chunk.HQ4HY5BJ.js.map → chunk.VJ34GMBJ.js.map} +0 -0
  300. /package/dist/chunks/{chunk.LHLRPAQ2.js.map → chunk.VKYAP6J3.js.map} +0 -0
  301. /package/dist/chunks/{chunk.PBKQU2MD.js.map → chunk.W6DMUOGD.js.map} +0 -0
  302. /package/dist/chunks/{chunk.YYWAJRPZ.js.map → chunk.WNHTRLHT.js.map} +0 -0
  303. /package/dist/chunks/{chunk.LZD6FGSA.js.map → chunk.WRCWSEE7.js.map} +0 -0
  304. /package/dist/chunks/{chunk.JGBBFBPJ.js.map → chunk.X3UWO4AP.js.map} +0 -0
  305. /package/dist/chunks/{chunk.EGA4WZHP.js.map → chunk.Y2EMVYXM.js.map} +0 -0
  306. /package/dist/chunks/{chunk.5D3ZJ7E6.js.map → chunk.ZNLBIUIN.js.map} +0 -0
@@ -0,0 +1,815 @@
1
+ import {
2
+ SynPopup
3
+ } from "./chunk.A2JGI7YK.js";
4
+ import {
5
+ defaultOptionRenderer
6
+ } from "./chunk.SRH6ZOHT.js";
7
+ import {
8
+ filterOnlyOptgroups,
9
+ getAllOptions,
10
+ getAssignedElementsForSlot,
11
+ normalizeString
12
+ } from "./chunk.2Y33P22F.js";
13
+ import {
14
+ scrollIntoView
15
+ } from "./chunk.5732DMBC.js";
16
+ import {
17
+ defaultValue
18
+ } from "./chunk.RBG37CD4.js";
19
+ import {
20
+ form_control_custom_styles_default,
21
+ form_control_styles_default
22
+ } from "./chunk.FKKJBKYL.js";
23
+ import {
24
+ combobox_custom_styles_default
25
+ } from "./chunk.DPCIJLV4.js";
26
+ import {
27
+ combobox_styles_default
28
+ } from "./chunk.J2OXSQAK.js";
29
+ import {
30
+ FormControlController
31
+ } from "./chunk.BBNQVEPD.js";
32
+ import {
33
+ waitForEvent
34
+ } from "./chunk.C2ENQBPM.js";
35
+ import {
36
+ animateTo,
37
+ stopAnimations
38
+ } from "./chunk.A3OYJILJ.js";
39
+ import {
40
+ getAnimation,
41
+ setDefaultAnimation
42
+ } from "./chunk.HQ6QUSK7.js";
43
+ import {
44
+ HasSlotController
45
+ } from "./chunk.WVVQK5TE.js";
46
+ import {
47
+ SynIcon
48
+ } from "./chunk.HM57BJF5.js";
49
+ import {
50
+ LocalizeController
51
+ } from "./chunk.ESQAXAFE.js";
52
+ import {
53
+ watch
54
+ } from "./chunk.74IOULXM.js";
55
+ import {
56
+ SynergyElement,
57
+ component_styles_default
58
+ } from "./chunk.POA3IDNG.js";
59
+ import {
60
+ __decorateClass
61
+ } from "./chunk.2GFK6XTO.js";
62
+
63
+ // src/components/combobox/combobox.component.ts
64
+ import { classMap } from "lit/directives/class-map.js";
65
+ import { html } from "lit";
66
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
67
+ import { property, query, state } from "lit/decorators.js";
68
+ var SynCombobox = class extends SynergyElement {
69
+ constructor() {
70
+ super(...arguments);
71
+ this.formControlController = new FormControlController(this, {
72
+ assumeInteractionOn: ["syn-blur", "syn-input"]
73
+ });
74
+ this.hasSlotController = new HasSlotController(this, "help-text", "label");
75
+ this.localize = new LocalizeController(this);
76
+ /** The last value of a syn-option, that was selected by click or via keyboard navigation */
77
+ this.lastOptionValue = "";
78
+ this.hasFocus = false;
79
+ this.displayLabel = "";
80
+ this.filteredOptions = [];
81
+ this.name = "";
82
+ this.value = "";
83
+ this.defaultValue = "";
84
+ this.size = "medium";
85
+ this.placeholder = "";
86
+ this.disabled = false;
87
+ this.clearable = false;
88
+ this.open = false;
89
+ this.hoist = false;
90
+ this.label = "";
91
+ this.placement = "bottom";
92
+ this.helpText = "";
93
+ this.form = "";
94
+ this.required = false;
95
+ this.getOption = defaultOptionRenderer;
96
+ this.filter = (option, queryStr) => {
97
+ const normalizedOption = normalizeString(option.getTextLabel());
98
+ const normalizedQuery = normalizeString(queryStr);
99
+ return normalizedOption.includes(normalizedQuery);
100
+ };
101
+ this.handleDocumentFocusIn = (event) => {
102
+ const path = event.composedPath();
103
+ if (this && !path.includes(this)) {
104
+ this.hide();
105
+ }
106
+ };
107
+ /* eslint-disable @typescript-eslint/no-floating-promises */
108
+ // eslint-disable-next-line complexity
109
+ this.handleDocumentKeyDown = (event) => {
110
+ const target = event.target;
111
+ const isClearButton = target.closest(".combobox__clear") !== null;
112
+ if (isClearButton) {
113
+ return;
114
+ }
115
+ if (event.key === "Escape") {
116
+ if (this.open && !this.closeWatcher) {
117
+ event.preventDefault();
118
+ event.stopPropagation();
119
+ this.hide();
120
+ this.displayInput.focus({ preventScroll: true });
121
+ } else if (!this.open) {
122
+ this.clearCombobox();
123
+ }
124
+ }
125
+ if (event.key === "Enter") {
126
+ const currentOption = this.getCurrentOption();
127
+ const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
128
+ if (!this.open && !hasModifier) {
129
+ setTimeout(() => {
130
+ if (!event.defaultPrevented) {
131
+ this.formControlController.submit();
132
+ }
133
+ });
134
+ return;
135
+ }
136
+ if (!this.open || currentOption && currentOption.disabled) {
137
+ return;
138
+ }
139
+ if (currentOption) {
140
+ const oldValue = this.lastOptionValue;
141
+ this.setSelectedOption(currentOption);
142
+ if (this.value !== oldValue) {
143
+ this.updateComplete.then(() => {
144
+ this.emit("syn-input");
145
+ this.emit("syn-change");
146
+ });
147
+ }
148
+ }
149
+ this.hide();
150
+ this.displayInput.focus({ preventScroll: true });
151
+ return;
152
+ }
153
+ if (["ArrowUp", "ArrowDown"].includes(event.key)) {
154
+ event.preventDefault();
155
+ event.stopPropagation();
156
+ if (!this.open) {
157
+ this.show();
158
+ }
159
+ this.selectNextOption(event.key === "ArrowDown");
160
+ }
161
+ if (["Home", "End"].includes(event.key)) {
162
+ event.preventDefault();
163
+ event.stopPropagation();
164
+ if (event.key === "Home") {
165
+ this.displayInput.setSelectionRange(0, 0);
166
+ } else if (event.key === "End") {
167
+ this.displayInput.setSelectionRange(
168
+ this.displayInput.value.length,
169
+ this.displayInput.value.length
170
+ );
171
+ }
172
+ }
173
+ };
174
+ /* eslint-enable @typescript-eslint/no-floating-promises */
175
+ this.handleDocumentMouseDown = (event) => {
176
+ const path = event.composedPath();
177
+ if (this && !path.includes(this)) {
178
+ this.hide();
179
+ }
180
+ };
181
+ }
182
+ /** Gets the validity state object */
183
+ get validity() {
184
+ return this.valueInput.validity;
185
+ }
186
+ /** Gets the validation message */
187
+ get validationMessage() {
188
+ return this.valueInput.validationMessage;
189
+ }
190
+ connectedCallback() {
191
+ super.connectedCallback();
192
+ this.open = false;
193
+ }
194
+ firstUpdated() {
195
+ this.displayLabel = this.value;
196
+ this.formControlController.updateValidity();
197
+ }
198
+ get options() {
199
+ const renderOption = (option) => {
200
+ const queryString = this.displayInput.value;
201
+ const optionHtml = this.getOption(option, queryString);
202
+ return html`${typeof optionHtml === "string" ? unsafeHTML(optionHtml) : optionHtml}`;
203
+ };
204
+ return this.filteredOptions.map((item) => {
205
+ if (item.tagName.toLowerCase() === "syn-optgroup") {
206
+ Array.from(item.children).forEach((option) => {
207
+ if (option.tagName.toLowerCase() === "syn-option") {
208
+ renderOption(option);
209
+ }
210
+ });
211
+ return item;
212
+ }
213
+ return renderOption(item);
214
+ });
215
+ }
216
+ addOpenListeners() {
217
+ var _a;
218
+ document.addEventListener("focusin", this.handleDocumentFocusIn);
219
+ document.addEventListener("keydown", this.handleDocumentKeyDown);
220
+ document.addEventListener("mousedown", this.handleDocumentMouseDown);
221
+ if (this.getRootNode() !== document) {
222
+ this.getRootNode().addEventListener("focusin", this.handleDocumentFocusIn);
223
+ }
224
+ if ("CloseWatcher" in window) {
225
+ (_a = this.closeWatcher) == null ? void 0 : _a.destroy();
226
+ this.closeWatcher = new CloseWatcher();
227
+ this.closeWatcher.onclose = () => {
228
+ if (this.open) {
229
+ this.hide();
230
+ this.displayInput.focus({ preventScroll: true });
231
+ }
232
+ };
233
+ }
234
+ }
235
+ removeOpenListeners() {
236
+ var _a;
237
+ document.removeEventListener("focusin", this.handleDocumentFocusIn);
238
+ document.removeEventListener("keydown", this.handleDocumentKeyDown);
239
+ document.removeEventListener("mousedown", this.handleDocumentMouseDown);
240
+ if (this.getRootNode() !== document) {
241
+ this.getRootNode().removeEventListener("focusin", this.handleDocumentFocusIn);
242
+ }
243
+ (_a = this.closeWatcher) == null ? void 0 : _a.destroy();
244
+ }
245
+ handleFocus() {
246
+ this.hasFocus = true;
247
+ this.emit("syn-focus");
248
+ }
249
+ handleBlur() {
250
+ this.hasFocus = false;
251
+ this.emit("syn-blur");
252
+ }
253
+ handleLabelClick() {
254
+ this.displayInput.focus();
255
+ }
256
+ handleComboboxMouseDown() {
257
+ if (this.disabled) {
258
+ return;
259
+ }
260
+ const toggleListboxOpen = () => this.open ? this.hide() : this.show();
261
+ toggleListboxOpen().then(() => {
262
+ setTimeout(() => this.displayInput.focus({ preventScroll: true }));
263
+ });
264
+ }
265
+ handleComboboxKeyDown(event) {
266
+ if (event.key === "Tab") {
267
+ return;
268
+ }
269
+ this.handleDocumentKeyDown(event);
270
+ }
271
+ handleClearClick(event) {
272
+ event.stopPropagation();
273
+ this.clearCombobox();
274
+ }
275
+ clearCombobox() {
276
+ if (this.value !== "") {
277
+ this.value = "";
278
+ this.displayInput.value = "";
279
+ this.lastOptionValue = "";
280
+ this.setSelectedOption(void 0);
281
+ this.displayInput.focus({ preventScroll: true });
282
+ this.updateComplete.then(() => {
283
+ this.emit("syn-clear");
284
+ this.emit("syn-input");
285
+ this.emit("syn-change");
286
+ });
287
+ }
288
+ }
289
+ // eslint-disable-next-line class-methods-use-this
290
+ preventLoosingFocus(event) {
291
+ event.stopPropagation();
292
+ event.preventDefault();
293
+ }
294
+ /* eslint-disable @typescript-eslint/no-floating-promises */
295
+ handleOptionClick(event) {
296
+ const target = event.target;
297
+ const option = target.closest("syn-option");
298
+ const oldValue = this.lastOptionValue;
299
+ if (option && !option.disabled) {
300
+ this.setSelectedOption(option);
301
+ this.updateComplete.then(() => this.displayInput.focus({ preventScroll: true }));
302
+ if (this.value !== oldValue) {
303
+ this.updateComplete.then(() => {
304
+ this.emit("syn-input");
305
+ this.emit("syn-change");
306
+ });
307
+ }
308
+ this.hide();
309
+ this.displayInput.focus({ preventScroll: true });
310
+ }
311
+ }
312
+ /* eslint-enable @typescript-eslint/no-floating-promises */
313
+ /**
314
+ * Selects the following or previous option.
315
+ *
316
+ * @param isNext - A boolean indicating whether to select the following option (true)
317
+ * or the previous option (false).
318
+ */
319
+ selectNextOption(isNext) {
320
+ const filteredOptions = this.getAllFilteredOptions();
321
+ if (filteredOptions.length === 0) {
322
+ return;
323
+ }
324
+ const currentOption = this.getCurrentOption();
325
+ const currentIndex = filteredOptions.indexOf(currentOption);
326
+ let newIndex = Math.max(0, currentIndex);
327
+ if (isNext) {
328
+ const nextIndex = currentIndex + 1;
329
+ newIndex = nextIndex > filteredOptions.length - 1 ? 0 : nextIndex;
330
+ } else {
331
+ const previousIndex = currentIndex - 1;
332
+ newIndex = previousIndex < 0 ? filteredOptions.length - 1 : previousIndex;
333
+ }
334
+ this.setCurrentOption(filteredOptions[newIndex]);
335
+ scrollIntoView(this.getCurrentOption(), this.listbox, "vertical", "auto");
336
+ }
337
+ getAllFilteredOptions() {
338
+ return [...this.filteredWrapper.querySelectorAll("syn-option")];
339
+ }
340
+ getCurrentOption() {
341
+ return this.getAllFilteredOptions().find((option) => option.current);
342
+ }
343
+ // Sets the current option, which is the option the user is currently interacting with
344
+ // (e.g. via keyboard). Only one option may be "current" at a time.
345
+ setCurrentOption(option) {
346
+ const allOptions = this.getAllFilteredOptions();
347
+ this.displayInput.removeAttribute("aria-activedescendant");
348
+ allOptions.forEach((el) => {
349
+ el.current = false;
350
+ el.setAttribute("aria-selected", "false");
351
+ });
352
+ if (option) {
353
+ option.current = true;
354
+ option.setAttribute("aria-selected", "true");
355
+ this.displayInput.setAttribute("aria-activedescendant", option.id);
356
+ }
357
+ }
358
+ /**
359
+ * Updates the selected options cache, the current value, and the display value
360
+ */
361
+ setSelectedOption(option) {
362
+ var _a, _b;
363
+ this.selectedOption = option;
364
+ const optionValue = ((_a = this.selectedOption) == null ? void 0 : _a.value) || ((_b = this.selectedOption) == null ? void 0 : _b.getTextLabel());
365
+ if (option) {
366
+ this.lastOptionValue = optionValue || "";
367
+ }
368
+ this.value = optionValue != null ? optionValue : this.displayInput.value;
369
+ this.updateComplete.then(() => {
370
+ var _a2, _b2;
371
+ this.displayLabel = (_b2 = (_a2 = this.selectedOption) == null ? void 0 : _a2.getTextLabel()) != null ? _b2 : this.displayInput.value;
372
+ this.formControlController.updateValidity();
373
+ });
374
+ }
375
+ handleInvalid(event) {
376
+ this.formControlController.setValidity(false);
377
+ this.formControlController.emitInvalidEvent(event);
378
+ }
379
+ handleFilterChange() {
380
+ this.createComboboxOptionsFromQuery(this.value);
381
+ }
382
+ handleDisabledChange() {
383
+ this.formControlController.setValidity(this.disabled);
384
+ if (this.disabled) {
385
+ this.open = false;
386
+ this.handleOpenChange();
387
+ }
388
+ }
389
+ handleValueChange() {
390
+ this.displayLabel = this.value;
391
+ this.createComboboxOptionsFromQuery(this.value);
392
+ this.setCurrentOption(null);
393
+ }
394
+ async handleOpenChange() {
395
+ if (this.open && !this.disabled) {
396
+ if (this.filteredOptions.length === 0) {
397
+ this.open = false;
398
+ this.emit("syn-error");
399
+ return;
400
+ }
401
+ this.emit("syn-show");
402
+ this.addOpenListeners();
403
+ await stopAnimations(this);
404
+ this.listbox.hidden = false;
405
+ this.popup.active = true;
406
+ const { keyframes: keyframes2, options: options2 } = getAnimation(this, "combobox.show", { dir: this.localize.dir() });
407
+ await animateTo(this.popup.popup, keyframes2, options2);
408
+ this.emit("syn-after-show");
409
+ return;
410
+ }
411
+ this.setCurrentOption(null);
412
+ this.displayInput.removeAttribute("aria-activedescendant");
413
+ this.emit("syn-hide");
414
+ this.removeOpenListeners();
415
+ await stopAnimations(this);
416
+ const { keyframes, options } = getAnimation(this, "combobox.hide", { dir: this.localize.dir() });
417
+ await animateTo(this.popup.popup, keyframes, options);
418
+ this.listbox.hidden = true;
419
+ this.popup.active = false;
420
+ this.emit("syn-after-hide");
421
+ }
422
+ /**
423
+ * Shows the listbox. If it is not possible to open the listbox, because there are no
424
+ * appropriate filtered options, a syn-error is emitted and the listbox stays closed.
425
+ */
426
+ async show() {
427
+ if (this.open || this.disabled) {
428
+ this.open = false;
429
+ return void 0;
430
+ }
431
+ this.open = true;
432
+ return Promise.race([waitForEvent(this, "syn-after-show"), waitForEvent(this, "syn-error")]);
433
+ }
434
+ /** Hides the listbox. */
435
+ async hide() {
436
+ if (!this.open || this.disabled) {
437
+ this.open = false;
438
+ return void 0;
439
+ }
440
+ this.open = false;
441
+ return waitForEvent(this, "syn-after-hide");
442
+ }
443
+ /**
444
+ * Checks for validity but does not show a validation message.
445
+ * Returns `true` when valid and `false` when invalid.
446
+ */
447
+ checkValidity() {
448
+ return this.valueInput.checkValidity();
449
+ }
450
+ /** Gets the associated form, if one exists. */
451
+ getForm() {
452
+ return this.formControlController.getForm();
453
+ }
454
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
455
+ reportValidity() {
456
+ return this.valueInput.reportValidity();
457
+ }
458
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
459
+ setCustomValidity(message) {
460
+ this.valueInput.setCustomValidity(message);
461
+ this.formControlController.updateValidity();
462
+ }
463
+ /** Sets focus on the control. */
464
+ focus(options) {
465
+ this.displayInput.focus(options);
466
+ }
467
+ /** Removes focus from the control. */
468
+ blur() {
469
+ this.displayInput.blur();
470
+ }
471
+ createComboboxOptionsFromQuery(queryString) {
472
+ const optgroups = [];
473
+ this.filteredOptions = this.getSlottedOptions().filter((option) => this.filter(option, queryString) || queryString === "").map((option) => {
474
+ var _a;
475
+ const clonedOption = option.cloneNode(true);
476
+ const hasOptgroup = ((_a = option.parentElement) == null ? void 0 : _a.tagName.toLowerCase()) === "syn-optgroup";
477
+ if (!hasOptgroup) {
478
+ return clonedOption;
479
+ }
480
+ const optgroup = option.parentElement;
481
+ const filteredOptgroup = optgroups.find((el) => el.id === optgroup.id);
482
+ if (filteredOptgroup) {
483
+ filteredOptgroup == null ? void 0 : filteredOptgroup.appendChild(clonedOption);
484
+ return void 0;
485
+ }
486
+ const clonedOptgroup = optgroup.cloneNode();
487
+ clonedOptgroup.appendChild(clonedOption);
488
+ optgroups.push(clonedOptgroup);
489
+ return clonedOptgroup;
490
+ }).filter(Boolean);
491
+ }
492
+ async handleInput() {
493
+ const inputValue = this.displayInput.value;
494
+ this.value = inputValue;
495
+ await this.updateComplete;
496
+ this.open = this.filteredWrapper.children.length > 0;
497
+ this.setSelectedOption(void 0);
498
+ this.formControlController.updateValidity();
499
+ this.emit("syn-input");
500
+ }
501
+ handleChange() {
502
+ if (!this.selectedOption) {
503
+ this.value = this.displayInput.value;
504
+ this.updateComplete.then(() => {
505
+ this.formControlController.updateValidity();
506
+ });
507
+ this.emit("syn-change");
508
+ }
509
+ }
510
+ getSlottedOptions() {
511
+ return getAllOptions(getAssignedElementsForSlot(this.defaultSlot)).flat();
512
+ }
513
+ getSlottedOptGroups() {
514
+ return filterOnlyOptgroups(getAssignedElementsForSlot(this.defaultSlot));
515
+ }
516
+ /* eslint-disable no-param-reassign, @typescript-eslint/no-floating-promises */
517
+ handleDefaultSlotChange() {
518
+ if (!customElements.get("syn-option")) {
519
+ customElements.whenDefined("syn-option").then(() => this.handleDefaultSlotChange());
520
+ return;
521
+ }
522
+ const slottedOptions = this.getSlottedOptions();
523
+ const slottedOptgroups = this.getSlottedOptGroups();
524
+ slottedOptions.forEach((option, index) => {
525
+ option.id = option.id || `syn-combobox-option-${index}`;
526
+ });
527
+ slottedOptgroups.forEach((optgroup, index) => {
528
+ optgroup.id = optgroup.id || `syn-combobox-optgroup-${index}`;
529
+ });
530
+ this.createComboboxOptionsFromQuery(this.value);
531
+ if (this.hasFocus && this.value.length > 0 && !this.open) {
532
+ this.show();
533
+ }
534
+ }
535
+ /* eslint-enable no-param-reassign, @typescript-eslint/no-floating-promises */
536
+ /* eslint-disable @typescript-eslint/unbound-method */
537
+ // eslint-disable-next-line complexity
538
+ render() {
539
+ const hasLabelSlot = this.hasSlotController.test("label");
540
+ const hasHelpTextSlot = this.hasSlotController.test("help-text");
541
+ const hasLabel = this.label ? true : !!hasLabelSlot;
542
+ const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
543
+ const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
544
+ const isPlaceholderVisible = this.placeholder && this.value.length === 0;
545
+ return html`
546
+ <div
547
+ part="form-control"
548
+ class=${classMap({
549
+ "form-control": true,
550
+ "form-control--has-help-text": hasHelpText,
551
+ "form-control--has-label": hasLabel,
552
+ "form-control--large": this.size === "large",
553
+ "form-control--medium": this.size === "medium",
554
+ "form-control--small": this.size === "small"
555
+ })}
556
+ >
557
+ <label
558
+ id="label"
559
+ part="form-control-label"
560
+ class="form-control__label"
561
+ aria-hidden=${hasLabel ? "false" : "true"}
562
+ @click=${this.handleLabelClick}
563
+ >
564
+ <slot name="label">${this.label}</slot>
565
+ </label>
566
+
567
+ <div part="form-control-input" class="form-control-input">
568
+ <syn-popup
569
+ class=${classMap({
570
+ combobox: true,
571
+ "combobox--bottom": this.placement === "bottom",
572
+ "combobox--disabled": this.disabled,
573
+ "combobox--focused": this.hasFocus,
574
+ "combobox--large": this.size === "large",
575
+ "combobox--medium": this.size === "medium",
576
+ "combobox--open": this.open,
577
+ "combobox--placeholder-visible": isPlaceholderVisible,
578
+ "combobox--small": this.size === "small",
579
+ "combobox--standard": true,
580
+ "combobox--top": this.placement === "top"
581
+ })}
582
+ placement=${this.placement}
583
+ strategy=${this.hoist ? "fixed" : "absolute"}
584
+ flip
585
+ shift
586
+ sync="width"
587
+ auto-size="vertical"
588
+ auto-size-padding="10"
589
+ >
590
+ <div
591
+ part="combobox"
592
+ class="combobox__inputs"
593
+ slot="anchor"
594
+ @keydown=${this.handleComboboxKeyDown}
595
+ @mousedown=${this.handleComboboxMouseDown}
596
+ >
597
+ <slot part="prefix" name="prefix" class="combobox__prefix"></slot>
598
+
599
+ <input
600
+ part="display-input"
601
+ class="combobox__display-input"
602
+ type="text"
603
+ placeholder=${this.placeholder}
604
+ .disabled=${this.disabled}
605
+ .value=${this.displayLabel}
606
+ autocomplete="off"
607
+ spellcheck="false"
608
+ autocapitalize="off"
609
+ aria-controls="listbox"
610
+ aria-expanded=${this.open ? "true" : "false"}
611
+ aria-haspopup="listbox"
612
+ aria-labelledby="label"
613
+ aria-disabled=${this.disabled ? "true" : "false"}
614
+ aria-describedby="help-text"
615
+ role="combobox"
616
+ tabindex="0"
617
+ @focus=${this.handleFocus}
618
+ @blur=${this.handleBlur}
619
+
620
+ aria-autocomplete="list"
621
+ aria-owns="listbox"
622
+ @input=${this.handleInput}
623
+ @change=${this.handleChange}
624
+ />
625
+
626
+ <input
627
+ class="combobox__value-input"
628
+ type="text"
629
+ ?disabled=${this.disabled}
630
+ ?required=${this.required}
631
+ .value=${this.value}
632
+ tabindex="-1"
633
+ aria-hidden="true"
634
+ @focus=${() => this.focus()}
635
+ @invalid=${this.handleInvalid}
636
+ />
637
+
638
+ ${hasClearIcon ? html`
639
+ <button
640
+ part="clear-button"
641
+ class="combobox__clear"
642
+ type="button"
643
+ aria-label=${this.localize.term("clearEntry")}
644
+ @mousedown=${this.preventLoosingFocus}
645
+ @click=${this.handleClearClick}
646
+ tabindex="-1"
647
+ >
648
+ <slot name="clear-icon">
649
+ <syn-icon name="x-circle-fill" library="system"></syn-icon>
650
+ </slot>
651
+ </button>
652
+ ` : ""}
653
+
654
+ <slot name="suffix" part="suffix" class="combobox__suffix"></slot>
655
+
656
+ <slot name="expand-icon" part="expand-icon" class="combobox__expand-icon">
657
+ <syn-icon library="system" name="chevron-down"></syn-icon>
658
+ </slot>
659
+ </div>
660
+
661
+ <div
662
+ id="listbox"
663
+ role="listbox"
664
+ aria-expanded=${this.open ? "true" : "false"}
665
+ aria-labelledby="label"
666
+ part="listbox"
667
+ class="combobox__listbox"
668
+ tabindex="-1"
669
+ @mousedown=${this.preventLoosingFocus}
670
+ @mouseup=${this.handleOptionClick}
671
+ >
672
+ <div class="listbox__options" part="filtered-listbox">
673
+ ${this.options}
674
+ </div>
675
+ <slot @slotchange=${this.handleDefaultSlotChange}></slot>
676
+ </div>
677
+ </syn-popup>
678
+ </div>
679
+
680
+ <div
681
+ part="form-control-help-text"
682
+ id="help-text"
683
+ class="form-control__help-text"
684
+ aria-hidden=${hasHelpText ? "false" : "true"}
685
+ >
686
+ <slot name="help-text">${this.helpText}</slot>
687
+ </div>
688
+ </div>
689
+ `;
690
+ }
691
+ /* eslint-enable @typescript-eslint/unbound-method */
692
+ };
693
+ SynCombobox.styles = [
694
+ component_styles_default,
695
+ form_control_styles_default,
696
+ combobox_styles_default,
697
+ form_control_custom_styles_default,
698
+ combobox_custom_styles_default
699
+ ];
700
+ SynCombobox.dependencies = {
701
+ "syn-icon": SynIcon,
702
+ "syn-popup": SynPopup
703
+ };
704
+ __decorateClass([
705
+ query(".combobox")
706
+ ], SynCombobox.prototype, "popup", 2);
707
+ __decorateClass([
708
+ query(".combobox__inputs")
709
+ ], SynCombobox.prototype, "combobox", 2);
710
+ __decorateClass([
711
+ query(".combobox__display-input")
712
+ ], SynCombobox.prototype, "displayInput", 2);
713
+ __decorateClass([
714
+ query(".combobox__value-input")
715
+ ], SynCombobox.prototype, "valueInput", 2);
716
+ __decorateClass([
717
+ query(".combobox__listbox")
718
+ ], SynCombobox.prototype, "listbox", 2);
719
+ __decorateClass([
720
+ query(".listbox__options")
721
+ ], SynCombobox.prototype, "filteredWrapper", 2);
722
+ __decorateClass([
723
+ query("slot:not([name])")
724
+ ], SynCombobox.prototype, "defaultSlot", 2);
725
+ __decorateClass([
726
+ state()
727
+ ], SynCombobox.prototype, "hasFocus", 2);
728
+ __decorateClass([
729
+ state()
730
+ ], SynCombobox.prototype, "displayLabel", 2);
731
+ __decorateClass([
732
+ state()
733
+ ], SynCombobox.prototype, "selectedOption", 2);
734
+ __decorateClass([
735
+ state()
736
+ ], SynCombobox.prototype, "filteredOptions", 2);
737
+ __decorateClass([
738
+ property()
739
+ ], SynCombobox.prototype, "name", 2);
740
+ __decorateClass([
741
+ property()
742
+ ], SynCombobox.prototype, "value", 2);
743
+ __decorateClass([
744
+ defaultValue()
745
+ ], SynCombobox.prototype, "defaultValue", 2);
746
+ __decorateClass([
747
+ property({ reflect: true })
748
+ ], SynCombobox.prototype, "size", 2);
749
+ __decorateClass([
750
+ property()
751
+ ], SynCombobox.prototype, "placeholder", 2);
752
+ __decorateClass([
753
+ property({ reflect: true, type: Boolean })
754
+ ], SynCombobox.prototype, "disabled", 2);
755
+ __decorateClass([
756
+ property({ type: Boolean })
757
+ ], SynCombobox.prototype, "clearable", 2);
758
+ __decorateClass([
759
+ property({ reflect: true, type: Boolean })
760
+ ], SynCombobox.prototype, "open", 2);
761
+ __decorateClass([
762
+ property({ type: Boolean })
763
+ ], SynCombobox.prototype, "hoist", 2);
764
+ __decorateClass([
765
+ property()
766
+ ], SynCombobox.prototype, "label", 2);
767
+ __decorateClass([
768
+ property({ reflect: true })
769
+ ], SynCombobox.prototype, "placement", 2);
770
+ __decorateClass([
771
+ property({ attribute: "help-text" })
772
+ ], SynCombobox.prototype, "helpText", 2);
773
+ __decorateClass([
774
+ property({ reflect: true })
775
+ ], SynCombobox.prototype, "form", 2);
776
+ __decorateClass([
777
+ property({ reflect: true, type: Boolean })
778
+ ], SynCombobox.prototype, "required", 2);
779
+ __decorateClass([
780
+ property()
781
+ ], SynCombobox.prototype, "getOption", 2);
782
+ __decorateClass([
783
+ property()
784
+ ], SynCombobox.prototype, "filter", 2);
785
+ __decorateClass([
786
+ watch("filter", { waitUntilFirstUpdate: true })
787
+ ], SynCombobox.prototype, "handleFilterChange", 1);
788
+ __decorateClass([
789
+ watch("disabled", { waitUntilFirstUpdate: true })
790
+ ], SynCombobox.prototype, "handleDisabledChange", 1);
791
+ __decorateClass([
792
+ watch("value", { waitUntilFirstUpdate: true })
793
+ ], SynCombobox.prototype, "handleValueChange", 1);
794
+ __decorateClass([
795
+ watch("open", { waitUntilFirstUpdate: true })
796
+ ], SynCombobox.prototype, "handleOpenChange", 1);
797
+ setDefaultAnimation("combobox.show", {
798
+ keyframes: [
799
+ { opacity: 0, scale: 0.9 },
800
+ { opacity: 1, scale: 1 }
801
+ ],
802
+ options: { duration: 100, easing: "ease" }
803
+ });
804
+ setDefaultAnimation("combobox.hide", {
805
+ keyframes: [
806
+ { opacity: 1, scale: 1 },
807
+ { opacity: 0, scale: 0.9 }
808
+ ],
809
+ options: { duration: 100, easing: "ease" }
810
+ });
811
+
812
+ export {
813
+ SynCombobox
814
+ };
815
+ //# sourceMappingURL=chunk.ZWBQZ3TF.js.map