@adyen/bento-vue2 1.89.2 → 1.90.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 (255) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +198 -80
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-time.css +1 -0
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/secondary-nav.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +3 -3
  23. package/dist/card.js +1 -1
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.js +1 -1
  26. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  27. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  28. package/dist/chunks/action-bar.B63qIiiH.js +334 -0
  29. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.B63qIiiH.js.map} +1 -1
  30. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  31. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  32. package/dist/chunks/ai-tag.CCJCOdXu.js +110 -0
  33. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.CCJCOdXu.js.map} +1 -1
  34. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  35. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  36. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  37. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  38. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.DpmeDmq-.js} +103 -66
  39. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.DpmeDmq-.js.map} +1 -1
  40. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.ChTUOsZl.js} +2 -2
  41. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.ChTUOsZl.js.map} +1 -1
  42. package/dist/chunks/{button-actions.BLk114As.js → button-actions.BmU1DngD.js} +221 -147
  43. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.BmU1DngD.js.map} +1 -1
  44. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  45. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  46. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.uvIGF_jU.js} +283 -209
  47. package/dist/chunks/{calendar.CXKhBF2f.js.map → calendar.uvIGF_jU.js.map} +1 -1
  48. package/dist/chunks/card.WWUfBkqf.js +165 -0
  49. package/dist/chunks/{card.GjhsXOT0.js.map → card.WWUfBkqf.js.map} +1 -1
  50. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.CI0xDnql.js} +4 -4
  51. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.CI0xDnql.js.map} +1 -1
  52. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.TsWA6O3Z.js} +93 -56
  53. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.TsWA6O3Z.js.map} +1 -1
  54. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  55. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  56. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.4DX9iUV8.js} +133 -76
  57. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.4DX9iUV8.js.map} +1 -1
  58. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.D_KE99mg.js} +2 -2
  59. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.D_KE99mg.js.map} +1 -1
  60. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  61. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  62. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  63. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  64. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  65. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  66. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.TWlLdQHG.js} +3 -3
  67. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.TWlLdQHG.js.map} +1 -1
  68. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.CpDuQ3Fo.js} +3 -3
  69. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.CpDuQ3Fo.js.map} +1 -1
  70. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.DZaE-kOS.js} +4 -4
  71. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.DZaE-kOS.js.map} +1 -1
  72. package/dist/chunks/data-grid.x6cEW0az.js +4069 -0
  73. package/dist/chunks/data-grid.x6cEW0az.js.map +1 -0
  74. package/dist/chunks/date-picker.Dln8ocL4.js +222 -0
  75. package/dist/chunks/{date-picker.CnazYcSX.js.map → date-picker.Dln8ocL4.js.map} +1 -1
  76. package/dist/chunks/date-range-picker.DPGy2h-9.js +1068 -0
  77. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +1 -0
  78. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  79. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  80. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js → dropdown-default-textbox.CjhLIxVq.js} +63 -36
  81. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js.map → dropdown-default-textbox.CjhLIxVq.js.map} +1 -1
  82. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.t3FlJUSy.js} +5 -5
  83. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.t3FlJUSy.js.map} +1 -1
  84. package/dist/chunks/{dropdown.Ct7uhPr6.js → dropdown.CvNI2V33.js} +329 -235
  85. package/dist/chunks/{dropdown.Ct7uhPr6.js.map → dropdown.CvNI2V33.js.map} +1 -1
  86. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  87. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  88. package/dist/chunks/error-message.BUNKRa_w.js +160 -0
  89. package/dist/chunks/{error-message.RxdStT3S.js.map → error-message.BUNKRa_w.js.map} +1 -1
  90. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.Cig5gDXT.js} +749 -468
  91. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.Cig5gDXT.js.map} +1 -1
  92. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.x445KK3y.js} +1301 -761
  93. package/dist/chunks/{filter-bar.zD_ctViU.js.map → filter-bar.x445KK3y.js.map} +1 -1
  94. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  95. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CIkul1OD.js} +3 -3
  97. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CIkul1OD.js.map} +1 -1
  98. package/dist/chunks/{form-layout-title.Bw7VgOO5.js → form-layout-title.DR5M7GP3.js} +77 -48
  99. package/dist/chunks/{form-layout-title.Bw7VgOO5.js.map → form-layout-title.DR5M7GP3.js.map} +1 -1
  100. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.BC5fdpD1.js} +127 -73
  101. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.BC5fdpD1.js.map} +1 -1
  102. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.-cvdi9-L.js} +1120 -679
  103. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.-cvdi9-L.js.map} +1 -1
  104. package/dist/chunks/{header.DkC-KKWa.js → header.DtmZjxiU.js} +3 -3
  105. package/dist/chunks/{header.DkC-KKWa.js.map → header.DtmZjxiU.js.map} +1 -1
  106. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  107. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  108. package/dist/chunks/input-field-password.Bdlw4dzr.js +381 -0
  109. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.Bdlw4dzr.js.map} +1 -1
  110. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.DPuWxBBz.js} +98 -71
  111. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.DPuWxBBz.js.map} +1 -1
  112. package/dist/chunks/input-field.DH25CU_G.js +207 -0
  113. package/dist/chunks/{input-field.m1PMwa4C.js.map → input-field.DH25CU_G.js.map} +1 -1
  114. package/dist/chunks/input-time.6eJ4-QdU.js +92 -0
  115. package/dist/chunks/input-time.6eJ4-QdU.js.map +1 -0
  116. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  117. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  118. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  119. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  120. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  121. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  123. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.CaxuXW-H.js} +63 -36
  125. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.CaxuXW-H.js.map} +1 -1
  126. package/dist/chunks/{modal.o0KddMiG.js → modal.Brif0vAy.js} +63 -36
  127. package/dist/chunks/{modal.o0KddMiG.js.map → modal.Brif0vAy.js.map} +1 -1
  128. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.BmrU_sn_.js} +221 -99
  129. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.BmrU_sn_.js.map} +1 -1
  130. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  131. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  132. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.5oS-AeYN.js} +4 -4
  133. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.5oS-AeYN.js.map} +1 -1
  134. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.DSGTe8Zt.js} +1781 -1731
  135. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.DSGTe8Zt.js.map} +1 -1
  136. package/dist/chunks/search-bar.CNfoeLLt.js +126 -0
  137. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.CNfoeLLt.js.map} +1 -1
  138. package/dist/chunks/secondary-nav.IF5CgeIP.js +226 -0
  139. package/dist/chunks/secondary-nav.IF5CgeIP.js.map +1 -0
  140. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  141. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  142. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.DZjFeQKR.js} +10 -10
  143. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.DZjFeQKR.js.map} +1 -1
  144. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.DZDXuyzg.js} +66 -39
  145. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.DZDXuyzg.js.map} +1 -1
  146. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  147. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  148. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  149. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  150. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.CrPNQbX0.js} +5 -5
  151. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.CrPNQbX0.js.map} +1 -1
  152. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  153. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  154. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  155. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  156. package/dist/chunks/textarea.Bi53QF5Q.js +218 -0
  157. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.Bi53QF5Q.js.map} +1 -1
  158. package/dist/chunks/timeline-item.C6Bi0eam.js +322 -0
  159. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.C6Bi0eam.js.map} +1 -1
  160. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  161. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  162. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  163. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  164. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.BCiZMLJE.js} +190 -103
  165. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.BCiZMLJE.js.map} +1 -1
  166. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.Bn3Y8Iuq.js} +490 -359
  167. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js.map → use-cached-selected-values.Bn3Y8Iuq.js.map} +1 -1
  168. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  169. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  170. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  171. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  172. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.DRMt9yR2.js} +2 -2
  173. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.DRMt9yR2.js.map} +1 -1
  174. package/dist/code-snippet.js +1 -1
  175. package/dist/country.js +3 -3
  176. package/dist/dashboard-template.js +1 -1
  177. package/dist/dashed-underline.js +1 -1
  178. package/dist/data-grid-template.js +1 -1
  179. package/dist/data-grid.js +1 -1
  180. package/dist/date-picker.js +2 -2
  181. package/dist/date-range-picker.js +2 -2
  182. package/dist/draggable-handle.js +160 -73
  183. package/dist/draggable-handle.js.map +1 -1
  184. package/dist/dropdown.js +4 -4
  185. package/dist/empty-state.js +1 -1
  186. package/dist/file-uploader.js +1 -1
  187. package/dist/filter-bar.js +1 -1
  188. package/dist/form-layout.js +1 -1
  189. package/dist/header-with-views.js +1 -1
  190. package/dist/header.js +1 -1
  191. package/dist/index.js +215 -213
  192. package/dist/index.js.map +1 -1
  193. package/dist/info-icon.js +1 -1
  194. package/dist/input-field-password.js +1 -1
  195. package/dist/input-field-phone-number.js +1 -1
  196. package/dist/input-field.js +1 -1
  197. package/dist/input-time.js +5 -0
  198. package/dist/input-time.js.map +1 -0
  199. package/dist/inspector.js +1 -1
  200. package/dist/internal.js +12 -12
  201. package/dist/link.js +1 -1
  202. package/dist/list.js +1 -1
  203. package/dist/menu.js +1 -1
  204. package/dist/modal-fullscreen.js +1 -1
  205. package/dist/modal.js +2 -2
  206. package/dist/pagination.js +1 -1
  207. package/dist/popover.js +1 -1
  208. package/dist/promo-banner.js +1 -1
  209. package/dist/radio-group.js +1 -1
  210. package/dist/rich-text-editor.js +1 -1
  211. package/dist/search-bar.js +2 -2
  212. package/dist/secondary-nav.js +1 -1
  213. package/dist/segmented-control.js +1 -1
  214. package/dist/selection-card.js +1 -1
  215. package/dist/sidepanel.js +1 -1
  216. package/dist/stepper.js +1 -1
  217. package/dist/structured-list.js +1 -1
  218. package/dist/summary-grid.js +1 -1
  219. package/dist/tabs.js +1 -1
  220. package/dist/tag.js +1 -1
  221. package/dist/textarea.js +1 -1
  222. package/dist/timeline.js +1 -1
  223. package/dist/toast.js +1 -1
  224. package/dist/tutorial.js +1 -1
  225. package/dist/web-types.json +198 -1
  226. package/package.json +9 -9
  227. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  228. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  229. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  230. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  231. package/dist/chunks/card.GjhsXOT0.js +0 -128
  232. package/dist/chunks/chip.DTpENaGC.js +0 -57
  233. package/dist/chunks/copy.BVGQcf22.js +0 -86
  234. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  235. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  236. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  237. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  238. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  239. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  240. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  241. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  242. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  243. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  244. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  245. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  246. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  247. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  248. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  249. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  250. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  251. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  252. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  253. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  254. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  255. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
@@ -1,25 +1,52 @@
1
- import { defineComponent as w, useAttrs as R, useSlots as E, ref as k, computed as r, watch as V, nextTick as D } from "vue";
2
- import { g as T } from "./generate-uid.NJ8tVoha.js";
3
- import { u as q } from "./index.B6WW_F-J.js";
4
- import { u as U } from "./use-has-slot.C9lQZ6nz.js";
5
- import { B as M } from "./typography.C8lPlsbD.js";
1
+ import { defineComponent as S, useAttrs as R, useSlots as D, ref as k, computed as r, watch as V, nextTick as E } from "vue";
2
+ import { g as q } from "./generate-uid.NJ8tVoha.js";
3
+ import { u as T } from "./index.B6WW_F-J.js";
4
+ import { u as M } from "./use-has-slot.C9lQZ6nz.js";
5
+ import { B as U } from "./typography.C8lPlsbD.js";
6
6
  import { C as $ } from "./cross-circle-fill.DTDtgLMf.js";
7
7
  import { C as Y } from "./cross-circle-fill-small.DfxDedRr.js";
8
8
  import { n as O } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
9
- import { s as v } from "./events.BQOQSSb7.js";
9
+ import { s as h } from "./events.BQOQSSb7.js";
10
10
  import { C as z } from "./chevron-down.eYtgv5ly.js";
11
11
  import { C as K } from "./chevron-up.d8cwIlA_.js";
12
12
  import "../assets/dropdown-default-textbox.css";
13
13
  var L = /* @__PURE__ */ ((l) => (l.DEFAULT = "DropdownInputDefault", l.SMALL = "DropdownInputSmall", l))(L || {}), p = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.HAS_ITEMS = "has-items", l.OPENED = "opened", l.ERROR = "error", l))(p || {}), s = /* @__PURE__ */ ((l) => (l.OPEN = "dropdown-base-open", l.KEYDOWN = "dropdown-base-keydown", l.CLOSE = "dropdown-base-close", l.INPUT = "dropdown-base-input", l.CLEAR = "dropdown-base-clear", l))(s || {});
14
14
  const j = {
15
- "en-US": { clearSearch: "Clear search" },
16
- "ja-JP": { clearSearch: "検索をクリア" },
17
- "pt-BR": { clearSearch: "Limpar busca" }
18
- }, H = w({
15
+ "de-DE": {
16
+ clearSearch: "Suche löschen"
17
+ },
18
+ "en-GB": {
19
+ clearSearch: "Clear search"
20
+ },
21
+ "en-US": {
22
+ clearSearch: "Clear search"
23
+ },
24
+ "es-ES": {
25
+ clearSearch: "Borrar búsqueda"
26
+ },
27
+ "es-MX": {
28
+ clearSearch: "Borrar búsqueda"
29
+ },
30
+ "fr-FR": {
31
+ clearSearch: "Effacer la recherche"
32
+ },
33
+ "it-IT": {
34
+ clearSearch: "Cancella ricerca"
35
+ },
36
+ "ja-JP": {
37
+ clearSearch: "検索をクリア"
38
+ },
39
+ "pt-BR": {
40
+ clearSearch: "Limpar busca"
41
+ },
42
+ "zh-CN": {
43
+ clearSearch: "清除搜索"
44
+ }
45
+ }, H = S({
19
46
  i18n: { messages: j },
20
47
  name: "dropdown-base-textbox",
21
48
  inheritAttrs: !1
22
- }), W = /* @__PURE__ */ w({
49
+ }), W = /* @__PURE__ */ S({
23
50
  ...H,
24
51
  props: {
25
52
  /**
@@ -106,7 +133,7 @@ const j = {
106
133
  },
107
134
  emits: [],
108
135
  setup(l, { expose: t, emit: a }) {
109
- const e = l, { t: o } = q(), d = R(), c = E(), C = U(c), i = k(null), b = T("textbox"), f = r(() => ({
136
+ const e = l, { t: o } = T(), d = R(), c = D(), w = M(c), i = k(null), b = q("textbox"), f = r(() => ({
110
137
  [`b-dropdown-base-textbox--${p.DISABLED}`]: e.disabled,
111
138
  [`b-dropdown-base-textbox--${p.READONLY}`]: e.readonly,
112
139
  [`b-dropdown-base-textbox--${p.HAS_ITEMS}`]: !!e.additionalItemsSelected
@@ -114,7 +141,7 @@ const j = {
114
141
  () => m.value && d["aria-required"] ? "true" : null
115
142
  ), _ = r(() => ({
116
143
  "b-dropdown-base-textbox__input--dynamic-filtering": e.dynamicFiltering
117
- })), S = r(() => e.dynamicFiltering && !!e.value && e.open), x = r(
144
+ })), C = r(() => e.dynamicFiltering && !!e.value && e.open), x = r(
118
145
  () => {
119
146
  var u;
120
147
  return {
@@ -137,28 +164,28 @@ const j = {
137
164
  V(
138
165
  () => m.value,
139
166
  () => {
140
- m.value && !e.alwaysComboboxIsInput && D(() => {
167
+ m.value && !e.alwaysComboboxIsInput && E(() => {
141
168
  i.value.focus();
142
169
  });
143
170
  }
144
171
  );
145
- const I = async () => {
146
- !e.disabled && !e.readonly && (a(s.OPEN), await D(), i.value.focus());
147
- }, g = () => {
172
+ const v = async () => {
173
+ !e.disabled && !e.readonly && (a(s.OPEN), await E(), i.value.focus());
174
+ }, I = () => {
148
175
  e.open && (i.value.focus(), a(s.CLOSE));
149
- }, N = (u) => e.open && u.target.tagName === "INPUT" ? null : e.open ? g() : I(), P = () => {
176
+ }, N = (u) => e.open && u.target.tagName === "INPUT" ? null : e.open ? I() : v(), F = () => {
150
177
  a(s.CLEAR), a(s.INPUT, ""), i.value.focus();
151
- }, F = (u) => {
178
+ }, P = (u) => {
152
179
  !e.readonly && !e.disabled ? a(s.INPUT, u.target.value) : (u.preventDefault(), u.stopPropagation());
153
- }, h = () => {
180
+ }, g = () => {
154
181
  i.value.focus();
155
182
  };
156
183
  return t({
157
- focus: h
158
- }), { __sfc: !0, t: o, attrs: d, slots: c, hasSlot: C, props: e, emit: a, textbox: i, textboxId: b, conditionalClasses: f, showRequiredAttribute: y, comboboxConditionalClasses: _, isFiltering: S, ariaAttributes: x, selectedValueItems: n, shouldShowInput: m, shouldShowSingleSelectSlot: A, shouldShowMultipleSlot: B, onOpenDropdown: I, onCloseDropdown: g, onToggleDropdown: N, onClearSearch: P, onInputEvent: F, focus: h, BentoTypography: M, DropdownBaseTextboxEvent: s, CrossCircleFillIcon: $, CrossCircleFillSmallIcon: Y, BentoDropdownSize: L };
184
+ focus: g
185
+ }), { __sfc: !0, t: o, attrs: d, slots: c, hasSlot: w, props: e, emit: a, textbox: i, textboxId: b, conditionalClasses: f, showRequiredAttribute: y, comboboxConditionalClasses: _, isFiltering: C, ariaAttributes: x, selectedValueItems: n, shouldShowInput: m, shouldShowSingleSelectSlot: A, shouldShowMultipleSlot: B, onOpenDropdown: v, onCloseDropdown: I, onToggleDropdown: N, onClearSearch: F, onInputEvent: P, focus: g, BentoTypography: U, DropdownBaseTextboxEvent: s, CrossCircleFillIcon: $, CrossCircleFillSmallIcon: Y, BentoDropdownSize: L };
159
186
  }
160
187
  });
161
- var J = function() {
188
+ var G = function() {
162
189
  var t = this, a = t._self._c, e = t._self._setupProxy;
163
190
  return a("div", { class: t.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: e.onToggleDropdown, keydown: function(o) {
164
191
  return !o.type.indexOf("key") && t._k(o.keyCode, "escape", void 0, o.key, void 0) ? null : e.onCloseDropdown.apply(null, arguments);
@@ -179,18 +206,18 @@ var J = function() {
179
206
  }, keyup: function(o) {
180
207
  return !o.type.indexOf("key") && t._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : e.onClearSearch.apply(null, arguments);
181
208
  } } }, [t.size === e.BentoDropdownSize.SMALL ? a(e.CrossCircleFillSmallIcon, { attrs: { "svg-title": e.t("clearSearch") } }) : a(e.CrossCircleFillIcon, { attrs: { "svg-title": e.t("clearSearch") } })], 1) : t._e()])], 1);
182
- }, G = [], Q = /* @__PURE__ */ O(
209
+ }, J = [], X = /* @__PURE__ */ O(
183
210
  W,
184
- J,
185
211
  G,
212
+ J,
186
213
  !1,
187
214
  null,
188
215
  "36875648"
189
216
  );
190
- const X = Q.exports, Z = w({
217
+ const Q = X.exports, Z = S({
191
218
  name: "dropdown-default-textbox",
192
219
  inheritAttrs: !1
193
- }), ee = /* @__PURE__ */ w({
220
+ }), ee = /* @__PURE__ */ S({
194
221
  ...Z,
195
222
  props: {
196
223
  /**
@@ -279,23 +306,23 @@ const X = Q.exports, Z = w({
279
306
  },
280
307
  emits: ["clear", "close", "input", "keydown", "open"],
281
308
  setup(l, { expose: t, emit: a }) {
282
- const e = l, o = E(), d = k(null), c = r(() => ({
309
+ const e = l, o = D(), d = k(null), c = r(() => ({
283
310
  [`b-dropdown-default-textbox--${p.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
284
311
  [`b-dropdown-default-textbox--${p.DISABLED}`]: e.disabled,
285
312
  [`b-dropdown-default-textbox--${p.READONLY}`]: e.readonly,
286
313
  [`b-dropdown-default-textbox--${p.OPENED}`]: e.open,
287
314
  "b-dropdown-default-textbox--condensed": e.condensed
288
- })), C = r(() => e.open && !e.disabled && !e.readonly), i = (n) => {
315
+ })), w = r(() => e.open && !e.disabled && !e.readonly), i = (n) => {
289
316
  a("input", n);
290
317
  }, b = (n) => {
291
318
  a("keydown", n);
292
319
  }, f = (n) => {
293
- v(n), a("open");
320
+ h(n), a("open");
294
321
  }, y = (n) => {
295
- v(n), a("close");
322
+ h(n), a("close");
296
323
  }, _ = (n) => {
297
- v(n), a("clear");
298
- }, S = {
324
+ h(n), a("clear");
325
+ }, C = {
299
326
  [s.INPUT]: i,
300
327
  [s.OPEN]: f,
301
328
  [s.CLOSE]: y,
@@ -306,7 +333,7 @@ const X = Q.exports, Z = w({
306
333
  };
307
334
  return t({
308
335
  focus: x
309
- }), { __sfc: !0, emit: a, slots: o, props: e, baseTextbox: d, conditionalClasses: c, isDropdownOpen: C, onInput: i, onKeyDown: b, openDropdown: f, closeDropdown: y, clearValue: _, listeners: S, focus: x, DropdownBaseTextbox: X, ChevronDownIcon: z, ChevronUpIcon: K };
336
+ }), { __sfc: !0, emit: a, slots: o, props: e, baseTextbox: d, conditionalClasses: c, isDropdownOpen: w, onInput: i, onKeyDown: b, openDropdown: f, closeDropdown: y, clearValue: _, listeners: C, focus: x, DropdownBaseTextbox: Q, ChevronDownIcon: z, ChevronUpIcon: K };
310
337
  }
311
338
  });
312
339
  var te = function() {
@@ -332,6 +359,6 @@ export {
332
359
  _e as D,
333
360
  p as a,
334
361
  s as b,
335
- X as c
362
+ Q as c
336
363
  };
337
- //# sourceMappingURL=dropdown-default-textbox.Dvzg0StF.js.map
364
+ //# sourceMappingURL=dropdown-default-textbox.CjhLIxVq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.Dvzg0StF.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;AA8HO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDLE,IAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;;;;;GCiPRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnOA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAuGAI,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,4BAAApB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACkC,CAAA,4BAAArB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACA,CAAA,4BAAArB,EAAA,SAAA,EAAA,GAAA,CAAA,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AA,MACA,CAAA,+BAAArB,EAAA,MAAA,EAAA,GAAAqB,EAAA;AAAA,MACF,yCAAAA,EAAA;AAAA,IAC3B,EAAA,GAGnDuB,IAAAxB,EAAA,MAAAC,EAAA,QAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEAwB,IAAA,CAAAC,MAAA;AACI,MAAAZ,EAAA,SAAAY,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAd,EAAA,WAAAc,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,MAAA;AAAA,IAAW,GAEfiB,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,OAAA;AAAA,IAAY,GAEhBkB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,OAAA;AAAA,IAAY,GAGhBmB,IAAA;AAAA,MAAkB,CAAAnD,EAAA,KAAA,GAAA2C;AAAA,MACoB,CAAA3C,EAAA,IAAA,GAAA+C;AAAA,MACD,CAAA/C,EAAA,KAAA,GAAAiD;AAAA,MACC,CAAAjD,EAAA,KAAA,GAAAkD;AAAA,MACA,CAAAlD,EAAA,OAAA,GAAA6C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.CjhLIxVq.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;AA8HO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDLE,IAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCiPRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnOA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAuGAI,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,4BAAApB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACkC,CAAA,4BAAArB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACA,CAAA,4BAAArB,EAAA,SAAA,EAAA,GAAA,CAAA,CAAAqB,EAAA;AAAA,IACG,EAAA,GAGhF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AA,GAAAqB,EAAA;AAAA,MACF,yCAAAA,EAAA;AAAA,IAC3B,EAAA,GAGnDuB,IAAAxB,EAAA,MAAAC,EAAA,QAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEAwB,IAAA,CAAAC,MAAA;AACI,MAAAZ,EAAA,SAAAY,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAd,EAAA,WAAAc,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,MAAA;AAAA,IAAW,GAEfiB,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,OAAA;AAAA,IAAY,GAEhBkB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAd,EAAA,OAAA;AAAA,IAAY,GAGhBmB,IAAA;AAAA,MAAkB,CAAAnD,EAAA,KAAA,GAAA2C;AAAA,MACoB,CAAA3C,EAAA,IAAA,GAAA+C;AAAA,MACD,CAAA/C,EAAA,KAAA,GAAAiD;AAAA,MACC,CAAAjD,EAAA,KAAA,GAAAkD;AAAA,MACA,CAAAlD,EAAA,OAAA,GAAA6C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as u, computed as w, toRefs as g, ref as v, watch as V } from "vue";
2
2
  import { B as D } from "./avatar.rwWPYJnt.js";
3
- import { B as p, u as C } from "./dropdown.Ct7uhPr6.js";
3
+ import { B as p, u as C } from "./dropdown.CvNI2V33.js";
4
4
  import { u as _ } from "./form-field.D_2g7vaP.js";
5
5
  import { d as i, B as b } from "./typography.C8lPlsbD.js";
6
6
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
- import { u as M } from "./use-country-items.CI8C7MLU.js";
8
- import { a as h } from "./country.types.DxKjyd0S.js";
9
- import { L as $ } from "./listbox-option-tag.BhPVuAjJ.js";
7
+ import { u as M } from "./use-country-items.B4j8pAvW.js";
8
+ import { a as h } from "./country.types.jjXwaoMl.js";
9
+ import { L as $ } from "./listbox-option-tag.CvbE-EuG.js";
10
10
  import { B as T } from "./payment-method.B3CkgsAY.js";
11
11
  import "../assets/dropdown-tag.css";
12
12
  const U = u({
@@ -291,4 +291,4 @@ export {
291
291
  le as d,
292
292
  _e as e
293
293
  };
294
- //# sourceMappingURL=dropdown-tag.BRB-emd1.js.map
294
+ //# sourceMappingURL=dropdown-tag.t3FlJUSy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-tag.BRB-emd1.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","emitValue","useFormFieldEmits","emit","onUpdateModelValue","selectedValue","dropdownItems","computed","props","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","search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,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MAAA,aAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;iBA9CA,EAAA,WAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAA,CAAAC,MAAAJ,EAAAI,CAAA,GAEA6B,IAAA3B,EAAA,MAAA;;AAAA,cAAAsB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAK,EAAA,OAAA,EAAA,OAAAJ,GAAA,OAAAD,GAAA,MAAAK,EAAA;AAAA,KAAA;AAEA,WAAAN,EAAA,SACII;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-tag.t3FlJUSy.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","emitValue","useFormFieldEmits","emit","onUpdateModelValue","selectedValue","dropdownItems","computed","props","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;;AAsFI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MAAA,aAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;iBAhDA,EAAA,WAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAA,CAAAC,MAAAJ,EAAAI,CAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;AAEA,WAAAH,EAAA,SACII;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;sBCsDRC,IAAAb,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MAAA,aAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzDA,EAAA,WAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAA,CAAAC,MAAAJ,EAAAI,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAR,CAAA,GACAS,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIP;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA,GAIRJ,EAAA,SACII;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;sBC+CRQ,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MAAA,aAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;iBAlFA,EAAA,WAAAC,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