@synergy-design-system/components 2.7.2 → 2.8.0

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.SMEJK7NT.js → chunk.22WZ3KTN.js} +2 -2
  2. package/dist/chunks/{chunk.NWOSSWAW.js → chunk.2QWDET3J.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.3ZUDKBQK.js → chunk.3CQH2TK3.js} +2 -2
  6. package/dist/chunks/{chunk.EOLGNCUC.js → chunk.3LUKWB2Y.js} +2 -2
  7. package/dist/chunks/{chunk.4I7CE6RD.js → chunk.3Y2ITSKK.js} +4 -4
  8. package/dist/chunks/{chunk.F6PVKPYY.js → chunk.4GDZUNCT.js} +4 -4
  9. package/dist/chunks/{chunk.UCZBUOMP.js → chunk.4LEMK6UT.js} +6 -6
  10. package/dist/chunks/{chunk.PRZAM6IM.js → chunk.5UE4VCYJ.js} +2 -2
  11. package/dist/chunks/{chunk.4S7NKDNV.js → chunk.6MWKKTIU.js} +2 -2
  12. package/dist/chunks/{chunk.VB7GJ3MY.js → chunk.6OTRHD3A.js} +2 -2
  13. package/dist/chunks/{chunk.L22JFB4C.js → chunk.76JBEIAN.js} +2 -2
  14. package/dist/chunks/{chunk.2JOJ5DXB.js → chunk.7BM4VUXJ.js} +2 -2
  15. package/dist/chunks/{chunk.3TTHE2E2.js → chunk.7DJJKSBC.js} +2 -2
  16. package/dist/chunks/{chunk.2YNEZUSJ.js → chunk.A7OHUHZZ.js} +5 -5
  17. package/dist/chunks/{chunk.TML7CRDT.js → chunk.ACX2NW5E.js} +5 -5
  18. package/dist/chunks/{chunk.W3CHFVDU.js → chunk.ARYNXWAR.js} +9 -9
  19. package/dist/chunks/{chunk.EVVB7HNI.js → chunk.AT4CHLQA.js} +2 -2
  20. package/dist/chunks/{chunk.5QMV33SE.js → chunk.BCWJRPY4.js} +2 -2
  21. package/dist/chunks/{chunk.ECXD7QA3.js → chunk.BJHKNFEP.js} +3 -3
  22. package/dist/chunks/{chunk.EVFCQPYL.js → chunk.CLKC2CTK.js} +2 -2
  23. package/dist/chunks/{chunk.OZXJIT53.js → chunk.CR6UX3ZW.js} +6 -6
  24. package/dist/chunks/{chunk.7GT66DPZ.js → chunk.DHXICRB4.js} +3 -3
  25. package/dist/chunks/chunk.DPCIJLV4.js +39 -0
  26. package/dist/chunks/chunk.DPCIJLV4.js.map +7 -0
  27. package/dist/chunks/{chunk.32A6BZ5Z.js → chunk.E5ZEKA67.js} +2 -2
  28. package/dist/chunks/{chunk.VYZD5UJF.js → chunk.EL5GLFG3.js} +2 -2
  29. package/dist/chunks/{chunk.T2CMPPUH.js → chunk.ENN6ERQ7.js} +2 -2
  30. package/dist/chunks/{chunk.ODMONLLS.js → chunk.EOQMWXRF.js} +2 -2
  31. package/dist/chunks/{chunk.UQHEJBPF.js → chunk.EUT6KB7O.js} +2 -2
  32. package/dist/chunks/{chunk.CIGZW7VL.js → chunk.F5BU5WA3.js} +2 -2
  33. package/dist/chunks/{chunk.CIGZW7VL.js.map → chunk.F5BU5WA3.js.map} +1 -1
  34. package/dist/chunks/{chunk.QOVKWUF3.js → chunk.FBI3AXPU.js} +2 -2
  35. package/dist/chunks/{chunk.JHCK3ZC7.js → chunk.FQFEV6J3.js} +6 -6
  36. package/dist/chunks/{chunk.ASAVDGKQ.js → chunk.FRKUACBE.js} +6 -6
  37. package/dist/chunks/{chunk.J6D3SEZG.js → chunk.GLRUOAIO.js} +3 -3
  38. package/dist/chunks/{chunk.VI56NOIB.js → chunk.H45AUWZL.js} +4 -4
  39. package/dist/chunks/{chunk.RGGRLPFB.js → chunk.HGJ3LHZD.js} +2 -2
  40. package/dist/chunks/{chunk.AXCA62X3.js → chunk.IELSPNXQ.js} +6 -6
  41. package/dist/chunks/{chunk.DCQPPRJI.js → chunk.ISSIKISN.js} +3 -3
  42. package/dist/chunks/chunk.J2OXSQAK.js +345 -0
  43. package/dist/chunks/chunk.J2OXSQAK.js.map +7 -0
  44. package/dist/chunks/chunk.JPOUFILE.js +816 -0
  45. package/dist/chunks/chunk.JPOUFILE.js.map +7 -0
  46. package/dist/chunks/{chunk.DW7SIOTD.js → chunk.JVFYWEFE.js} +2 -2
  47. package/dist/chunks/{chunk.FCGFJWEG.js → chunk.LOEPSD6X.js} +2 -2
  48. package/dist/chunks/{chunk.EEXD4O5P.js → chunk.MJOLZRXS.js} +2 -2
  49. package/dist/chunks/{chunk.BDQMYBQR.js → chunk.N2AA2S7P.js} +2 -2
  50. package/dist/chunks/{chunk.T4AP74QA.js → chunk.N32UXGW2.js} +2 -2
  51. package/dist/chunks/{chunk.62KJ2JTT.js → chunk.NEXM2DVJ.js} +3 -3
  52. package/dist/chunks/{chunk.3N6C32KL.js → chunk.NOXYYO6T.js} +2 -2
  53. package/dist/chunks/{chunk.GPN65Q5K.js → chunk.ONQ5K2CX.js} +3 -3
  54. package/dist/chunks/{chunk.SHT6ORJG.js → chunk.OTR75HQ3.js} +2 -2
  55. package/dist/chunks/{chunk.BNXSGB3Q.js → chunk.OTZXB23V.js} +2 -2
  56. package/dist/chunks/{chunk.RA52TQDZ.js → chunk.P4UDCUFQ.js} +5 -5
  57. package/dist/chunks/{chunk.HFCHPII4.js → chunk.PAHUFFDC.js} +6 -6
  58. package/dist/chunks/{chunk.A4IY53UV.js → chunk.PDUKIFQK.js} +2 -2
  59. package/dist/chunks/{chunk.6PYEC4JS.js → chunk.QWONMYTW.js} +2 -2
  60. package/dist/chunks/{chunk.HEDEL5KY.js → chunk.QXPI4QQZ.js} +2 -2
  61. package/dist/chunks/{chunk.XA4MV7QR.js → chunk.QYFZACOM.js} +6 -6
  62. package/dist/chunks/{chunk.DREJ33DS.js → chunk.R4JCFAYH.js} +2 -2
  63. package/dist/chunks/{chunk.77IGTP3T.js → chunk.R77KU4ND.js} +2 -2
  64. package/dist/chunks/{chunk.ZNYANJHZ.js → chunk.RESONJ6D.js} +2 -2
  65. package/dist/chunks/{chunk.MWEUGF4Q.js → chunk.RHCWPZ57.js} +6 -6
  66. package/dist/chunks/{chunk.RSIYQFLM.js → chunk.RSS3K3BH.js} +5 -5
  67. package/dist/chunks/{chunk.MKA2R2GM.js → chunk.RZFPM6T5.js} +5 -5
  68. package/dist/chunks/{chunk.6J2GXSHX.js → chunk.S3NEBYK7.js} +2 -2
  69. package/dist/chunks/{chunk.HIA3ZSNY.js → chunk.SOLWFL5A.js} +2 -2
  70. package/dist/chunks/chunk.SRH6ZOHT.js +24 -0
  71. package/dist/chunks/chunk.SRH6ZOHT.js.map +7 -0
  72. package/dist/chunks/{chunk.GZGX7AN2.js → chunk.SYE5KL6D.js} +2 -2
  73. package/dist/chunks/{chunk.AAJBHY2M.js → chunk.TN3QBFAN.js} +2 -2
  74. package/dist/chunks/{chunk.VWBCU6HU.js → chunk.TXLOLSPA.js} +3 -3
  75. package/dist/chunks/{chunk.SBXB7ZQ4.js → chunk.U6U77OWH.js} +2 -2
  76. package/dist/chunks/{chunk.VJWKT6KK.js → chunk.UFBPOYW3.js} +2 -2
  77. package/dist/chunks/{chunk.OMK6YFKU.js → chunk.UK7QG54R.js} +2 -2
  78. package/dist/chunks/{chunk.FZOUXRYE.js → chunk.UNJZNYYC.js} +2 -2
  79. package/dist/chunks/{chunk.DBMX4Q2N.js → chunk.UPUBWGWC.js} +2 -2
  80. package/dist/chunks/{chunk.LX2CFFXJ.js → chunk.UTHNXU3J.js} +2 -2
  81. package/dist/chunks/{chunk.5BY5MVLA.js → chunk.UZC7C7LR.js} +2 -2
  82. package/dist/chunks/{chunk.PQKQPPXC.js → chunk.UZNKPDF5.js} +2 -2
  83. package/dist/chunks/{chunk.NBMQMWS3.js → chunk.V6WPXGJH.js} +6 -6
  84. package/dist/chunks/chunk.VFOO7K4S.js +12 -0
  85. package/dist/chunks/chunk.VFOO7K4S.js.map +7 -0
  86. package/dist/chunks/{chunk.SC6DZBJ7.js → chunk.VXNQA3QC.js} +9 -9
  87. package/dist/chunks/{chunk.EUGRPKE5.js → chunk.WABD4T2A.js} +2 -2
  88. package/dist/chunks/{chunk.SWHTRL6B.js → chunk.WBTSVLAC.js} +2 -2
  89. package/dist/chunks/{chunk.UMFLVSON.js → chunk.X2YVATJQ.js} +9 -9
  90. package/dist/chunks/{chunk.WDE57ZEB.js → chunk.X4CA7AWS.js} +9 -9
  91. package/dist/chunks/{chunk.TC3V2EL3.js → chunk.X6EZ6IDB.js} +2 -2
  92. package/dist/chunks/{chunk.GMAKLSVB.js → chunk.XH75XGUS.js} +5 -5
  93. package/dist/chunks/{chunk.MBIS5CMS.js → chunk.XPNSW7EJ.js} +2 -2
  94. package/dist/chunks/{chunk.TJ25Z5RP.js → chunk.XQ3L5FZI.js} +2 -2
  95. package/dist/chunks/{chunk.D3HW7PL3.js → chunk.XWBZYZL2.js} +2 -2
  96. package/dist/chunks/{chunk.NTPAY2C2.js → chunk.XY727PA7.js} +2 -2
  97. package/dist/chunks/{chunk.ADXO3V5E.js → chunk.XYCN2A3U.js} +2 -2
  98. package/dist/chunks/{chunk.PJBX6PDL.js → chunk.Y2UPTDJA.js} +2 -2
  99. package/dist/chunks/{chunk.3EORMLPX.js → chunk.YPISLR6M.js} +2 -2
  100. package/dist/chunks/{chunk.SPYTNIYH.js → chunk.Z6OPO6DQ.js} +3 -3
  101. package/dist/chunks/{chunk.DKVAGG2G.js → chunk.Z76WUR73.js} +2 -2
  102. package/dist/chunks/{chunk.HG2DOYSY.js → chunk.ZNPXQE4Y.js} +2 -2
  103. package/dist/chunks/{chunk.72HIKLQG.js → chunk.ZO4VONAT.js} +2 -2
  104. package/dist/chunks/{chunk.72HIKLQG.js.map → chunk.ZO4VONAT.js.map} +1 -1
  105. package/dist/components/accordion/accordion.component.js +3 -3
  106. package/dist/components/accordion/accordion.js +4 -4
  107. package/dist/components/alert/alert.component.js +6 -6
  108. package/dist/components/alert/alert.js +7 -7
  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 +1041 -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 +155 -141
  217. package/dist/vscode.html-custom-data.json +117 -23
  218. package/package.json +4 -5
  219. /package/dist/chunks/{chunk.SMEJK7NT.js.map → chunk.22WZ3KTN.js.map} +0 -0
  220. /package/dist/chunks/{chunk.NWOSSWAW.js.map → chunk.2QWDET3J.js.map} +0 -0
  221. /package/dist/chunks/{chunk.3ZUDKBQK.js.map → chunk.3CQH2TK3.js.map} +0 -0
  222. /package/dist/chunks/{chunk.EOLGNCUC.js.map → chunk.3LUKWB2Y.js.map} +0 -0
  223. /package/dist/chunks/{chunk.4I7CE6RD.js.map → chunk.3Y2ITSKK.js.map} +0 -0
  224. /package/dist/chunks/{chunk.F6PVKPYY.js.map → chunk.4GDZUNCT.js.map} +0 -0
  225. /package/dist/chunks/{chunk.UCZBUOMP.js.map → chunk.4LEMK6UT.js.map} +0 -0
  226. /package/dist/chunks/{chunk.PRZAM6IM.js.map → chunk.5UE4VCYJ.js.map} +0 -0
  227. /package/dist/chunks/{chunk.4S7NKDNV.js.map → chunk.6MWKKTIU.js.map} +0 -0
  228. /package/dist/chunks/{chunk.VB7GJ3MY.js.map → chunk.6OTRHD3A.js.map} +0 -0
  229. /package/dist/chunks/{chunk.L22JFB4C.js.map → chunk.76JBEIAN.js.map} +0 -0
  230. /package/dist/chunks/{chunk.2JOJ5DXB.js.map → chunk.7BM4VUXJ.js.map} +0 -0
  231. /package/dist/chunks/{chunk.3TTHE2E2.js.map → chunk.7DJJKSBC.js.map} +0 -0
  232. /package/dist/chunks/{chunk.2YNEZUSJ.js.map → chunk.A7OHUHZZ.js.map} +0 -0
  233. /package/dist/chunks/{chunk.TML7CRDT.js.map → chunk.ACX2NW5E.js.map} +0 -0
  234. /package/dist/chunks/{chunk.W3CHFVDU.js.map → chunk.ARYNXWAR.js.map} +0 -0
  235. /package/dist/chunks/{chunk.EVVB7HNI.js.map → chunk.AT4CHLQA.js.map} +0 -0
  236. /package/dist/chunks/{chunk.5QMV33SE.js.map → chunk.BCWJRPY4.js.map} +0 -0
  237. /package/dist/chunks/{chunk.ECXD7QA3.js.map → chunk.BJHKNFEP.js.map} +0 -0
  238. /package/dist/chunks/{chunk.EVFCQPYL.js.map → chunk.CLKC2CTK.js.map} +0 -0
  239. /package/dist/chunks/{chunk.OZXJIT53.js.map → chunk.CR6UX3ZW.js.map} +0 -0
  240. /package/dist/chunks/{chunk.7GT66DPZ.js.map → chunk.DHXICRB4.js.map} +0 -0
  241. /package/dist/chunks/{chunk.32A6BZ5Z.js.map → chunk.E5ZEKA67.js.map} +0 -0
  242. /package/dist/chunks/{chunk.VYZD5UJF.js.map → chunk.EL5GLFG3.js.map} +0 -0
  243. /package/dist/chunks/{chunk.T2CMPPUH.js.map → chunk.ENN6ERQ7.js.map} +0 -0
  244. /package/dist/chunks/{chunk.ODMONLLS.js.map → chunk.EOQMWXRF.js.map} +0 -0
  245. /package/dist/chunks/{chunk.UQHEJBPF.js.map → chunk.EUT6KB7O.js.map} +0 -0
  246. /package/dist/chunks/{chunk.QOVKWUF3.js.map → chunk.FBI3AXPU.js.map} +0 -0
  247. /package/dist/chunks/{chunk.JHCK3ZC7.js.map → chunk.FQFEV6J3.js.map} +0 -0
  248. /package/dist/chunks/{chunk.ASAVDGKQ.js.map → chunk.FRKUACBE.js.map} +0 -0
  249. /package/dist/chunks/{chunk.J6D3SEZG.js.map → chunk.GLRUOAIO.js.map} +0 -0
  250. /package/dist/chunks/{chunk.VI56NOIB.js.map → chunk.H45AUWZL.js.map} +0 -0
  251. /package/dist/chunks/{chunk.RGGRLPFB.js.map → chunk.HGJ3LHZD.js.map} +0 -0
  252. /package/dist/chunks/{chunk.AXCA62X3.js.map → chunk.IELSPNXQ.js.map} +0 -0
  253. /package/dist/chunks/{chunk.DCQPPRJI.js.map → chunk.ISSIKISN.js.map} +0 -0
  254. /package/dist/chunks/{chunk.DW7SIOTD.js.map → chunk.JVFYWEFE.js.map} +0 -0
  255. /package/dist/chunks/{chunk.FCGFJWEG.js.map → chunk.LOEPSD6X.js.map} +0 -0
  256. /package/dist/chunks/{chunk.EEXD4O5P.js.map → chunk.MJOLZRXS.js.map} +0 -0
  257. /package/dist/chunks/{chunk.BDQMYBQR.js.map → chunk.N2AA2S7P.js.map} +0 -0
  258. /package/dist/chunks/{chunk.T4AP74QA.js.map → chunk.N32UXGW2.js.map} +0 -0
  259. /package/dist/chunks/{chunk.62KJ2JTT.js.map → chunk.NEXM2DVJ.js.map} +0 -0
  260. /package/dist/chunks/{chunk.3N6C32KL.js.map → chunk.NOXYYO6T.js.map} +0 -0
  261. /package/dist/chunks/{chunk.GPN65Q5K.js.map → chunk.ONQ5K2CX.js.map} +0 -0
  262. /package/dist/chunks/{chunk.SHT6ORJG.js.map → chunk.OTR75HQ3.js.map} +0 -0
  263. /package/dist/chunks/{chunk.BNXSGB3Q.js.map → chunk.OTZXB23V.js.map} +0 -0
  264. /package/dist/chunks/{chunk.RA52TQDZ.js.map → chunk.P4UDCUFQ.js.map} +0 -0
  265. /package/dist/chunks/{chunk.HFCHPII4.js.map → chunk.PAHUFFDC.js.map} +0 -0
  266. /package/dist/chunks/{chunk.A4IY53UV.js.map → chunk.PDUKIFQK.js.map} +0 -0
  267. /package/dist/chunks/{chunk.6PYEC4JS.js.map → chunk.QWONMYTW.js.map} +0 -0
  268. /package/dist/chunks/{chunk.HEDEL5KY.js.map → chunk.QXPI4QQZ.js.map} +0 -0
  269. /package/dist/chunks/{chunk.XA4MV7QR.js.map → chunk.QYFZACOM.js.map} +0 -0
  270. /package/dist/chunks/{chunk.DREJ33DS.js.map → chunk.R4JCFAYH.js.map} +0 -0
  271. /package/dist/chunks/{chunk.77IGTP3T.js.map → chunk.R77KU4ND.js.map} +0 -0
  272. /package/dist/chunks/{chunk.ZNYANJHZ.js.map → chunk.RESONJ6D.js.map} +0 -0
  273. /package/dist/chunks/{chunk.MWEUGF4Q.js.map → chunk.RHCWPZ57.js.map} +0 -0
  274. /package/dist/chunks/{chunk.RSIYQFLM.js.map → chunk.RSS3K3BH.js.map} +0 -0
  275. /package/dist/chunks/{chunk.MKA2R2GM.js.map → chunk.RZFPM6T5.js.map} +0 -0
  276. /package/dist/chunks/{chunk.6J2GXSHX.js.map → chunk.S3NEBYK7.js.map} +0 -0
  277. /package/dist/chunks/{chunk.HIA3ZSNY.js.map → chunk.SOLWFL5A.js.map} +0 -0
  278. /package/dist/chunks/{chunk.GZGX7AN2.js.map → chunk.SYE5KL6D.js.map} +0 -0
  279. /package/dist/chunks/{chunk.AAJBHY2M.js.map → chunk.TN3QBFAN.js.map} +0 -0
  280. /package/dist/chunks/{chunk.VWBCU6HU.js.map → chunk.TXLOLSPA.js.map} +0 -0
  281. /package/dist/chunks/{chunk.SBXB7ZQ4.js.map → chunk.U6U77OWH.js.map} +0 -0
  282. /package/dist/chunks/{chunk.VJWKT6KK.js.map → chunk.UFBPOYW3.js.map} +0 -0
  283. /package/dist/chunks/{chunk.OMK6YFKU.js.map → chunk.UK7QG54R.js.map} +0 -0
  284. /package/dist/chunks/{chunk.FZOUXRYE.js.map → chunk.UNJZNYYC.js.map} +0 -0
  285. /package/dist/chunks/{chunk.DBMX4Q2N.js.map → chunk.UPUBWGWC.js.map} +0 -0
  286. /package/dist/chunks/{chunk.LX2CFFXJ.js.map → chunk.UTHNXU3J.js.map} +0 -0
  287. /package/dist/chunks/{chunk.5BY5MVLA.js.map → chunk.UZC7C7LR.js.map} +0 -0
  288. /package/dist/chunks/{chunk.PQKQPPXC.js.map → chunk.UZNKPDF5.js.map} +0 -0
  289. /package/dist/chunks/{chunk.NBMQMWS3.js.map → chunk.V6WPXGJH.js.map} +0 -0
  290. /package/dist/chunks/{chunk.SC6DZBJ7.js.map → chunk.VXNQA3QC.js.map} +0 -0
  291. /package/dist/chunks/{chunk.EUGRPKE5.js.map → chunk.WABD4T2A.js.map} +0 -0
  292. /package/dist/chunks/{chunk.SWHTRL6B.js.map → chunk.WBTSVLAC.js.map} +0 -0
  293. /package/dist/chunks/{chunk.UMFLVSON.js.map → chunk.X2YVATJQ.js.map} +0 -0
  294. /package/dist/chunks/{chunk.WDE57ZEB.js.map → chunk.X4CA7AWS.js.map} +0 -0
  295. /package/dist/chunks/{chunk.TC3V2EL3.js.map → chunk.X6EZ6IDB.js.map} +0 -0
  296. /package/dist/chunks/{chunk.GMAKLSVB.js.map → chunk.XH75XGUS.js.map} +0 -0
  297. /package/dist/chunks/{chunk.MBIS5CMS.js.map → chunk.XPNSW7EJ.js.map} +0 -0
  298. /package/dist/chunks/{chunk.TJ25Z5RP.js.map → chunk.XQ3L5FZI.js.map} +0 -0
  299. /package/dist/chunks/{chunk.D3HW7PL3.js.map → chunk.XWBZYZL2.js.map} +0 -0
  300. /package/dist/chunks/{chunk.NTPAY2C2.js.map → chunk.XY727PA7.js.map} +0 -0
  301. /package/dist/chunks/{chunk.ADXO3V5E.js.map → chunk.XYCN2A3U.js.map} +0 -0
  302. /package/dist/chunks/{chunk.PJBX6PDL.js.map → chunk.Y2UPTDJA.js.map} +0 -0
  303. /package/dist/chunks/{chunk.3EORMLPX.js.map → chunk.YPISLR6M.js.map} +0 -0
  304. /package/dist/chunks/{chunk.SPYTNIYH.js.map → chunk.Z6OPO6DQ.js.map} +0 -0
  305. /package/dist/chunks/{chunk.DKVAGG2G.js.map → chunk.Z76WUR73.js.map} +0 -0
  306. /package/dist/chunks/{chunk.HG2DOYSY.js.map → chunk.ZNPXQE4Y.js.map} +0 -0
@@ -0,0 +1,816 @@
1
+ import {
2
+ SynPopup
3
+ } from "./chunk.UK7QG54R.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.RZFPM6T5.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.F5BU5WA3.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 hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
127
+ if (!this.open && !hasModifier) {
128
+ setTimeout(() => {
129
+ if (!event.defaultPrevented) {
130
+ this.formControlController.submit();
131
+ }
132
+ });
133
+ return;
134
+ }
135
+ if (!this.open || this.currentOption && this.currentOption.disabled) {
136
+ return;
137
+ }
138
+ if (this.currentOption) {
139
+ const oldValue = this.lastOptionValue;
140
+ this.setSelectedOption(this.currentOption);
141
+ if (this.value !== oldValue) {
142
+ this.updateComplete.then(() => {
143
+ this.emit("syn-input");
144
+ this.emit("syn-change");
145
+ });
146
+ }
147
+ }
148
+ this.hide();
149
+ this.displayInput.focus({ preventScroll: true });
150
+ return;
151
+ }
152
+ if (["ArrowUp", "ArrowDown"].includes(event.key)) {
153
+ event.preventDefault();
154
+ event.stopPropagation();
155
+ if (!this.open) {
156
+ this.show();
157
+ }
158
+ this.selectNextOption(event.key === "ArrowDown");
159
+ }
160
+ if (["Home", "End"].includes(event.key)) {
161
+ event.preventDefault();
162
+ event.stopPropagation();
163
+ if (event.key === "Home") {
164
+ this.displayInput.setSelectionRange(0, 0);
165
+ } else if (event.key === "End") {
166
+ this.displayInput.setSelectionRange(
167
+ this.displayInput.value.length,
168
+ this.displayInput.value.length
169
+ );
170
+ }
171
+ }
172
+ };
173
+ /* eslint-enable @typescript-eslint/no-floating-promises */
174
+ this.handleDocumentMouseDown = (event) => {
175
+ const path = event.composedPath();
176
+ if (this && !path.includes(this)) {
177
+ this.hide();
178
+ }
179
+ };
180
+ }
181
+ /** Gets the validity state object */
182
+ get validity() {
183
+ return this.valueInput.validity;
184
+ }
185
+ /** Gets the validation message */
186
+ get validationMessage() {
187
+ return this.valueInput.validationMessage;
188
+ }
189
+ connectedCallback() {
190
+ super.connectedCallback();
191
+ this.open = false;
192
+ }
193
+ firstUpdated() {
194
+ this.displayLabel = this.value;
195
+ this.formControlController.updateValidity();
196
+ }
197
+ get options() {
198
+ return this.filteredOptions.map((item) => {
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
+ if (item.tagName.toLowerCase() === "syn-optgroup") {
205
+ Array.from(item.children).forEach((option) => {
206
+ if (option.tagName.toLowerCase() === "syn-option") {
207
+ renderOption(option);
208
+ }
209
+ });
210
+ return item;
211
+ }
212
+ return renderOption(item);
213
+ });
214
+ }
215
+ addOpenListeners() {
216
+ var _a;
217
+ document.addEventListener("focusin", this.handleDocumentFocusIn);
218
+ document.addEventListener("keydown", this.handleDocumentKeyDown);
219
+ document.addEventListener("mousedown", this.handleDocumentMouseDown);
220
+ if (this.getRootNode() !== document) {
221
+ this.getRootNode().addEventListener("focusin", this.handleDocumentFocusIn);
222
+ }
223
+ if ("CloseWatcher" in window) {
224
+ (_a = this.closeWatcher) == null ? void 0 : _a.destroy();
225
+ this.closeWatcher = new CloseWatcher();
226
+ this.closeWatcher.onclose = () => {
227
+ if (this.open) {
228
+ this.hide();
229
+ this.displayInput.focus({ preventScroll: true });
230
+ }
231
+ };
232
+ }
233
+ }
234
+ removeOpenListeners() {
235
+ var _a;
236
+ document.removeEventListener("focusin", this.handleDocumentFocusIn);
237
+ document.removeEventListener("keydown", this.handleDocumentKeyDown);
238
+ document.removeEventListener("mousedown", this.handleDocumentMouseDown);
239
+ if (this.getRootNode() !== document) {
240
+ this.getRootNode().removeEventListener("focusin", this.handleDocumentFocusIn);
241
+ }
242
+ (_a = this.closeWatcher) == null ? void 0 : _a.destroy();
243
+ }
244
+ handleFocus() {
245
+ this.hasFocus = true;
246
+ this.emit("syn-focus");
247
+ }
248
+ handleBlur() {
249
+ this.hasFocus = false;
250
+ this.emit("syn-blur");
251
+ }
252
+ handleLabelClick() {
253
+ this.displayInput.focus();
254
+ }
255
+ handleComboboxMouseDown() {
256
+ if (this.disabled) {
257
+ return;
258
+ }
259
+ const toggleListboxOpen = () => this.open ? this.hide() : this.show();
260
+ toggleListboxOpen().then(() => {
261
+ setTimeout(() => this.displayInput.focus({ preventScroll: true }));
262
+ });
263
+ }
264
+ handleComboboxKeyDown(event) {
265
+ if (event.key === "Tab") {
266
+ return;
267
+ }
268
+ this.handleDocumentKeyDown(event);
269
+ }
270
+ handleClearClick(event) {
271
+ event.stopPropagation();
272
+ this.clearCombobox();
273
+ }
274
+ clearCombobox() {
275
+ if (this.value !== "") {
276
+ this.value = "";
277
+ this.displayInput.value = "";
278
+ this.lastOptionValue = "";
279
+ this.setSelectedOption(void 0);
280
+ this.displayInput.focus({ preventScroll: true });
281
+ this.updateComplete.then(() => {
282
+ this.emit("syn-clear");
283
+ this.emit("syn-input");
284
+ this.emit("syn-change");
285
+ });
286
+ }
287
+ }
288
+ // eslint-disable-next-line class-methods-use-this
289
+ preventLoosingFocus(event) {
290
+ event.stopPropagation();
291
+ event.preventDefault();
292
+ }
293
+ /* eslint-disable @typescript-eslint/no-floating-promises */
294
+ handleOptionClick(event) {
295
+ const target = event.target;
296
+ const option = target.closest("syn-option");
297
+ const oldValue = this.lastOptionValue;
298
+ if (option && !option.disabled) {
299
+ this.setSelectedOption(option);
300
+ this.updateComplete.then(() => this.displayInput.focus({ preventScroll: true }));
301
+ if (this.value !== oldValue) {
302
+ this.updateComplete.then(() => {
303
+ this.emit("syn-input");
304
+ this.emit("syn-change");
305
+ });
306
+ }
307
+ this.hide();
308
+ this.displayInput.focus({ preventScroll: true });
309
+ }
310
+ }
311
+ /* eslint-enable @typescript-eslint/no-floating-promises */
312
+ /**
313
+ * Selects the following or previous option.
314
+ *
315
+ * @param isNext - A boolean indicating whether to select the following option (true)
316
+ * or the previous option (false).
317
+ */
318
+ selectNextOption(isNext) {
319
+ const filteredOptions = this.getAllFilteredOptions();
320
+ if (filteredOptions.length === 0) {
321
+ return;
322
+ }
323
+ const currentIndex = filteredOptions.indexOf(this.currentOption);
324
+ let newIndex = Math.max(0, currentIndex);
325
+ if (isNext) {
326
+ const nextIndex = currentIndex + 1;
327
+ newIndex = nextIndex > filteredOptions.length - 1 ? 0 : nextIndex;
328
+ } else {
329
+ const previousIndex = currentIndex - 1;
330
+ newIndex = previousIndex < 0 ? filteredOptions.length - 1 : previousIndex;
331
+ }
332
+ this.setCurrentOption(filteredOptions[newIndex]);
333
+ scrollIntoView(this.currentOption, this.listbox, "vertical", "auto");
334
+ }
335
+ getAllFilteredOptions() {
336
+ return [...this.filteredWrapper.querySelectorAll("syn-option")];
337
+ }
338
+ // Sets the current option, which is the option the user is currently interacting with
339
+ // (e.g. via keyboard). Only one option may be "current" at a time.
340
+ setCurrentOption(option) {
341
+ const allOptions = this.getAllFilteredOptions();
342
+ this.displayInput.removeAttribute("aria-activedescendant");
343
+ allOptions.forEach((el) => {
344
+ el.current = false;
345
+ el.setAttribute("aria-selected", "false");
346
+ });
347
+ if (option) {
348
+ this.currentOption = option;
349
+ option.current = true;
350
+ option.setAttribute("aria-selected", "true");
351
+ this.displayInput.setAttribute("aria-activedescendant", option.id);
352
+ } else {
353
+ this.currentOption = void 0;
354
+ }
355
+ }
356
+ /**
357
+ * Updates the selected options cache, the current value, and the display value
358
+ */
359
+ setSelectedOption(option) {
360
+ var _a, _b;
361
+ this.selectedOption = option;
362
+ const optionValue = ((_a = this.selectedOption) == null ? void 0 : _a.value) || ((_b = this.selectedOption) == null ? void 0 : _b.getTextLabel());
363
+ if (option) {
364
+ this.lastOptionValue = optionValue || "";
365
+ }
366
+ this.value = optionValue != null ? optionValue : this.displayInput.value;
367
+ this.updateComplete.then(() => {
368
+ var _a2, _b2;
369
+ this.displayLabel = (_b2 = (_a2 = this.selectedOption) == null ? void 0 : _a2.getTextLabel()) != null ? _b2 : this.displayInput.value;
370
+ this.formControlController.updateValidity();
371
+ });
372
+ }
373
+ handleInvalid(event) {
374
+ this.formControlController.setValidity(false);
375
+ this.formControlController.emitInvalidEvent(event);
376
+ }
377
+ handleFilterChange() {
378
+ this.createComboboxOptionsFromQuery(this.value);
379
+ }
380
+ handleDisabledChange() {
381
+ this.formControlController.setValidity(this.disabled);
382
+ if (this.disabled) {
383
+ this.open = false;
384
+ this.handleOpenChange();
385
+ }
386
+ }
387
+ handleValueChange() {
388
+ this.displayLabel = this.value;
389
+ this.createComboboxOptionsFromQuery(this.value);
390
+ this.setCurrentOption(null);
391
+ }
392
+ async handleOpenChange() {
393
+ if (this.open && !this.disabled) {
394
+ if (this.filteredOptions.length === 0) {
395
+ this.open = false;
396
+ this.emit("syn-error");
397
+ return;
398
+ }
399
+ this.emit("syn-show");
400
+ this.addOpenListeners();
401
+ await stopAnimations(this);
402
+ this.listbox.hidden = false;
403
+ this.popup.active = true;
404
+ const { keyframes: keyframes2, options: options2 } = getAnimation(this, "combobox.show", { dir: this.localize.dir() });
405
+ await animateTo(this.popup.popup, keyframes2, options2);
406
+ this.emit("syn-after-show");
407
+ return;
408
+ }
409
+ this.setCurrentOption(null);
410
+ this.displayInput.removeAttribute("aria-activedescendant");
411
+ this.emit("syn-hide");
412
+ this.removeOpenListeners();
413
+ await stopAnimations(this);
414
+ const { keyframes, options } = getAnimation(this, "combobox.hide", { dir: this.localize.dir() });
415
+ await animateTo(this.popup.popup, keyframes, options);
416
+ this.listbox.hidden = true;
417
+ this.popup.active = false;
418
+ this.emit("syn-after-hide");
419
+ }
420
+ /**
421
+ * Shows the listbox. If it is not possible to open the listbox, because there are no
422
+ * appropriate filtered options, a syn-error is emitted and the listbox stays closed.
423
+ */
424
+ async show() {
425
+ if (this.open || this.disabled) {
426
+ this.open = false;
427
+ return void 0;
428
+ }
429
+ this.open = true;
430
+ return Promise.race([waitForEvent(this, "syn-after-show"), waitForEvent(this, "syn-error")]);
431
+ }
432
+ /** Hides the listbox. */
433
+ async hide() {
434
+ if (!this.open || this.disabled) {
435
+ this.open = false;
436
+ return void 0;
437
+ }
438
+ this.open = false;
439
+ return waitForEvent(this, "syn-after-hide");
440
+ }
441
+ /**
442
+ * Checks for validity but does not show a validation message.
443
+ * Returns `true` when valid and `false` when invalid.
444
+ */
445
+ checkValidity() {
446
+ return this.valueInput.checkValidity();
447
+ }
448
+ /** Gets the associated form, if one exists. */
449
+ getForm() {
450
+ return this.formControlController.getForm();
451
+ }
452
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
453
+ reportValidity() {
454
+ return this.valueInput.reportValidity();
455
+ }
456
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
457
+ setCustomValidity(message) {
458
+ this.valueInput.setCustomValidity(message);
459
+ this.formControlController.updateValidity();
460
+ }
461
+ /** Sets focus on the control. */
462
+ focus(options) {
463
+ this.displayInput.focus(options);
464
+ }
465
+ /** Removes focus from the control. */
466
+ blur() {
467
+ this.displayInput.blur();
468
+ }
469
+ createComboboxOptionsFromQuery(queryString) {
470
+ const optgroups = [];
471
+ this.filteredOptions = this.getSlottedOptions().filter((option) => this.filter(option, queryString) || queryString === "").map((option) => {
472
+ var _a;
473
+ const clonedOption = option.cloneNode(true);
474
+ const hasOptgroup = ((_a = option.parentElement) == null ? void 0 : _a.tagName.toLowerCase()) === "syn-optgroup";
475
+ if (!hasOptgroup) {
476
+ return clonedOption;
477
+ }
478
+ const optgroup = option.parentElement;
479
+ const filteredOptgroup = optgroups.find((el) => el.id === optgroup.id);
480
+ if (filteredOptgroup) {
481
+ filteredOptgroup == null ? void 0 : filteredOptgroup.appendChild(clonedOption);
482
+ return void 0;
483
+ }
484
+ const clonedOptgroup = optgroup.cloneNode();
485
+ clonedOptgroup.appendChild(clonedOption);
486
+ optgroups.push(clonedOptgroup);
487
+ return clonedOptgroup;
488
+ }).filter(Boolean);
489
+ }
490
+ async handleInput() {
491
+ const inputValue = this.displayInput.value;
492
+ this.value = inputValue;
493
+ await this.updateComplete;
494
+ this.open = this.filteredWrapper.children.length > 0;
495
+ this.setSelectedOption(void 0);
496
+ this.formControlController.updateValidity();
497
+ this.emit("syn-input");
498
+ }
499
+ handleChange() {
500
+ if (!this.selectedOption) {
501
+ this.value = this.displayInput.value;
502
+ this.updateComplete.then(() => {
503
+ this.formControlController.updateValidity();
504
+ });
505
+ this.emit("syn-change");
506
+ }
507
+ }
508
+ getSlottedOptions() {
509
+ return getAllOptions(getAssignedElementsForSlot(this.defaultSlot)).flat();
510
+ }
511
+ getSlottedOptGroups() {
512
+ return filterOnlyOptgroups(getAssignedElementsForSlot(this.defaultSlot));
513
+ }
514
+ /* eslint-disable no-param-reassign, @typescript-eslint/no-floating-promises */
515
+ handleDefaultSlotChange() {
516
+ if (!customElements.get("syn-option")) {
517
+ customElements.whenDefined("syn-option").then(() => this.handleDefaultSlotChange());
518
+ return;
519
+ }
520
+ const slottedOptions = this.getSlottedOptions();
521
+ const slottedOptgroups = this.getSlottedOptGroups();
522
+ slottedOptions.forEach((option, index) => {
523
+ option.id = option.id || `syn-combobox-option-${index}`;
524
+ });
525
+ slottedOptgroups.forEach((optgroup, index) => {
526
+ optgroup.id = optgroup.id || `syn-combobox-optgroup-${index}`;
527
+ });
528
+ this.createComboboxOptionsFromQuery(this.value);
529
+ if (this.hasFocus && this.value.length > 0 && !this.open) {
530
+ this.show();
531
+ }
532
+ }
533
+ /* eslint-enable no-param-reassign, @typescript-eslint/no-floating-promises */
534
+ /* eslint-disable @typescript-eslint/unbound-method */
535
+ // eslint-disable-next-line complexity
536
+ render() {
537
+ const hasLabelSlot = this.hasSlotController.test("label");
538
+ const hasHelpTextSlot = this.hasSlotController.test("help-text");
539
+ const hasLabel = this.label ? true : !!hasLabelSlot;
540
+ const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
541
+ const hasClearIcon = this.clearable && !this.disabled && this.value.length > 0;
542
+ const isPlaceholderVisible = this.placeholder && this.value.length === 0;
543
+ return html`
544
+ <div
545
+ part="form-control"
546
+ class=${classMap({
547
+ "form-control": true,
548
+ "form-control--has-help-text": hasHelpText,
549
+ "form-control--has-label": hasLabel,
550
+ "form-control--large": this.size === "large",
551
+ "form-control--medium": this.size === "medium",
552
+ "form-control--small": this.size === "small"
553
+ })}
554
+ >
555
+ <label
556
+ id="label"
557
+ part="form-control-label"
558
+ class="form-control__label"
559
+ aria-hidden=${hasLabel ? "false" : "true"}
560
+ @click=${this.handleLabelClick}
561
+ >
562
+ <slot name="label">${this.label}</slot>
563
+ </label>
564
+
565
+ <div part="form-control-input" class="form-control-input">
566
+ <syn-popup
567
+ class=${classMap({
568
+ combobox: true,
569
+ "combobox--bottom": this.placement === "bottom",
570
+ "combobox--disabled": this.disabled,
571
+ "combobox--focused": this.hasFocus,
572
+ "combobox--large": this.size === "large",
573
+ "combobox--medium": this.size === "medium",
574
+ "combobox--open": this.open,
575
+ "combobox--placeholder-visible": isPlaceholderVisible,
576
+ "combobox--small": this.size === "small",
577
+ "combobox--standard": true,
578
+ "combobox--top": this.placement === "top"
579
+ })}
580
+ placement=${this.placement}
581
+ strategy=${this.hoist ? "fixed" : "absolute"}
582
+ flip
583
+ shift
584
+ sync="width"
585
+ auto-size="vertical"
586
+ auto-size-padding="10"
587
+ >
588
+ <div
589
+ part="combobox"
590
+ class="combobox__inputs"
591
+ slot="anchor"
592
+ @keydown=${this.handleComboboxKeyDown}
593
+ @mousedown=${this.handleComboboxMouseDown}
594
+ >
595
+ <slot part="prefix" name="prefix" class="combobox__prefix"></slot>
596
+
597
+ <input
598
+ part="display-input"
599
+ class="combobox__display-input"
600
+ type="text"
601
+ placeholder=${this.placeholder}
602
+ .disabled=${this.disabled}
603
+ .value=${this.displayLabel}
604
+ autocomplete="off"
605
+ spellcheck="false"
606
+ autocapitalize="off"
607
+ aria-controls="listbox"
608
+ aria-expanded=${this.open ? "true" : "false"}
609
+ aria-haspopup="listbox"
610
+ aria-labelledby="label"
611
+ aria-disabled=${this.disabled ? "true" : "false"}
612
+ aria-describedby="help-text"
613
+ role="combobox"
614
+ tabindex="0"
615
+ @focus=${this.handleFocus}
616
+ @blur=${this.handleBlur}
617
+
618
+ aria-autocomplete="list"
619
+ aria-owns="listbox"
620
+ @input=${this.handleInput}
621
+ @change=${this.handleChange}
622
+ />
623
+
624
+ <input
625
+ class="combobox__value-input"
626
+ type="text"
627
+ ?disabled=${this.disabled}
628
+ ?required=${this.required}
629
+ .value=${this.value}
630
+ tabindex="-1"
631
+ aria-hidden="true"
632
+ @focus=${() => this.focus()}
633
+ @invalid=${this.handleInvalid}
634
+ />
635
+
636
+ ${hasClearIcon ? html`
637
+ <button
638
+ part="clear-button"
639
+ class="combobox__clear"
640
+ type="button"
641
+ aria-label=${this.localize.term("clearEntry")}
642
+ @mousedown=${this.preventLoosingFocus}
643
+ @click=${this.handleClearClick}
644
+ tabindex="-1"
645
+ >
646
+ <slot name="clear-icon">
647
+ <syn-icon name="x-circle-fill" library="system"></syn-icon>
648
+ </slot>
649
+ </button>
650
+ ` : ""}
651
+
652
+ <slot name="suffix" part="suffix" class="combobox__suffix"></slot>
653
+
654
+ <slot name="expand-icon" part="expand-icon" class="combobox__expand-icon">
655
+ <syn-icon library="system" name="chevron-down"></syn-icon>
656
+ </slot>
657
+ </div>
658
+
659
+ <div
660
+ id="listbox"
661
+ role="listbox"
662
+ aria-expanded=${this.open ? "true" : "false"}
663
+ aria-labelledby="label"
664
+ part="listbox"
665
+ class="combobox__listbox"
666
+ tabindex="-1"
667
+ @mousedown=${this.preventLoosingFocus}
668
+ @mouseup=${this.handleOptionClick}
669
+ >
670
+ <div class="listbox__options" part="filtered-listbox">
671
+ ${this.options}
672
+ </div>
673
+ <slot @slotchange=${this.handleDefaultSlotChange}></slot>
674
+ </div>
675
+ </syn-popup>
676
+ </div>
677
+
678
+ <div
679
+ part="form-control-help-text"
680
+ id="help-text"
681
+ class="form-control__help-text"
682
+ aria-hidden=${hasHelpText ? "false" : "true"}
683
+ >
684
+ <slot name="help-text">${this.helpText}</slot>
685
+ </div>
686
+ </div>
687
+ `;
688
+ }
689
+ /* eslint-enable @typescript-eslint/unbound-method */
690
+ };
691
+ SynCombobox.styles = [
692
+ component_styles_default,
693
+ form_control_styles_default,
694
+ combobox_styles_default,
695
+ form_control_custom_styles_default,
696
+ combobox_custom_styles_default
697
+ ];
698
+ SynCombobox.dependencies = {
699
+ "syn-icon": SynIcon,
700
+ "syn-popup": SynPopup
701
+ };
702
+ __decorateClass([
703
+ query(".combobox")
704
+ ], SynCombobox.prototype, "popup", 2);
705
+ __decorateClass([
706
+ query(".combobox__inputs")
707
+ ], SynCombobox.prototype, "combobox", 2);
708
+ __decorateClass([
709
+ query(".combobox__display-input")
710
+ ], SynCombobox.prototype, "displayInput", 2);
711
+ __decorateClass([
712
+ query(".combobox__value-input")
713
+ ], SynCombobox.prototype, "valueInput", 2);
714
+ __decorateClass([
715
+ query(".combobox__listbox")
716
+ ], SynCombobox.prototype, "listbox", 2);
717
+ __decorateClass([
718
+ query(".listbox__options")
719
+ ], SynCombobox.prototype, "filteredWrapper", 2);
720
+ __decorateClass([
721
+ query("slot:not([name])")
722
+ ], SynCombobox.prototype, "defaultSlot", 2);
723
+ __decorateClass([
724
+ state()
725
+ ], SynCombobox.prototype, "hasFocus", 2);
726
+ __decorateClass([
727
+ state()
728
+ ], SynCombobox.prototype, "displayLabel", 2);
729
+ __decorateClass([
730
+ state()
731
+ ], SynCombobox.prototype, "currentOption", 2);
732
+ __decorateClass([
733
+ state()
734
+ ], SynCombobox.prototype, "selectedOption", 2);
735
+ __decorateClass([
736
+ state()
737
+ ], SynCombobox.prototype, "filteredOptions", 2);
738
+ __decorateClass([
739
+ property()
740
+ ], SynCombobox.prototype, "name", 2);
741
+ __decorateClass([
742
+ property()
743
+ ], SynCombobox.prototype, "value", 2);
744
+ __decorateClass([
745
+ defaultValue()
746
+ ], SynCombobox.prototype, "defaultValue", 2);
747
+ __decorateClass([
748
+ property({ reflect: true })
749
+ ], SynCombobox.prototype, "size", 2);
750
+ __decorateClass([
751
+ property()
752
+ ], SynCombobox.prototype, "placeholder", 2);
753
+ __decorateClass([
754
+ property({ reflect: true, type: Boolean })
755
+ ], SynCombobox.prototype, "disabled", 2);
756
+ __decorateClass([
757
+ property({ type: Boolean })
758
+ ], SynCombobox.prototype, "clearable", 2);
759
+ __decorateClass([
760
+ property({ reflect: true, type: Boolean })
761
+ ], SynCombobox.prototype, "open", 2);
762
+ __decorateClass([
763
+ property({ type: Boolean })
764
+ ], SynCombobox.prototype, "hoist", 2);
765
+ __decorateClass([
766
+ property()
767
+ ], SynCombobox.prototype, "label", 2);
768
+ __decorateClass([
769
+ property({ reflect: true })
770
+ ], SynCombobox.prototype, "placement", 2);
771
+ __decorateClass([
772
+ property({ attribute: "help-text" })
773
+ ], SynCombobox.prototype, "helpText", 2);
774
+ __decorateClass([
775
+ property({ reflect: true })
776
+ ], SynCombobox.prototype, "form", 2);
777
+ __decorateClass([
778
+ property({ reflect: true, type: Boolean })
779
+ ], SynCombobox.prototype, "required", 2);
780
+ __decorateClass([
781
+ property()
782
+ ], SynCombobox.prototype, "getOption", 2);
783
+ __decorateClass([
784
+ property()
785
+ ], SynCombobox.prototype, "filter", 2);
786
+ __decorateClass([
787
+ watch("filter", { waitUntilFirstUpdate: true })
788
+ ], SynCombobox.prototype, "handleFilterChange", 1);
789
+ __decorateClass([
790
+ watch("disabled", { waitUntilFirstUpdate: true })
791
+ ], SynCombobox.prototype, "handleDisabledChange", 1);
792
+ __decorateClass([
793
+ watch("value", { waitUntilFirstUpdate: true })
794
+ ], SynCombobox.prototype, "handleValueChange", 1);
795
+ __decorateClass([
796
+ watch("open", { waitUntilFirstUpdate: true })
797
+ ], SynCombobox.prototype, "handleOpenChange", 1);
798
+ setDefaultAnimation("combobox.show", {
799
+ keyframes: [
800
+ { opacity: 0, scale: 0.9 },
801
+ { opacity: 1, scale: 1 }
802
+ ],
803
+ options: { duration: 100, easing: "ease" }
804
+ });
805
+ setDefaultAnimation("combobox.hide", {
806
+ keyframes: [
807
+ { opacity: 1, scale: 1 },
808
+ { opacity: 0, scale: 0.9 }
809
+ ],
810
+ options: { duration: 100, easing: "ease" }
811
+ });
812
+
813
+ export {
814
+ SynCombobox
815
+ };
816
+ //# sourceMappingURL=chunk.JPOUFILE.js.map