@adyen/bento-vue2 1.78.2 → 1.79.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 (263) hide show
  1. package/dist/@types/index.d.ts +77 -28
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/ai-button.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/button.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/checkbox-group.css +1 -1
  13. package/dist/assets/dashboard-section.css +1 -1
  14. package/dist/assets/data-grid.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/dialog-page.css +1 -1
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/form-layout-title.css +1 -1
  20. package/dist/assets/header-with-views.css +1 -1
  21. package/dist/assets/index.css +1 -1
  22. package/dist/assets/input-field-password.css +1 -1
  23. package/dist/assets/input-field-phone-number.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/inspector.css +1 -1
  26. package/dist/assets/layout-row.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/search-bar.css +1 -1
  29. package/dist/assets/secondary-nav.css +1 -1
  30. package/dist/assets/sidepanel.css +1 -1
  31. package/dist/assets/step.css +1 -1
  32. package/dist/assets/structured-list-item.css +1 -1
  33. package/dist/assets/summary-grid.css +1 -1
  34. package/dist/assets/tab.css +1 -1
  35. package/dist/assets/teleport.css +1 -0
  36. package/dist/assets/toast.css +1 -1
  37. package/dist/assets/tooltip.css +1 -1
  38. package/dist/assets/tutorial.css +1 -1
  39. package/dist/assets/use-cached-selected-values.css +1 -1
  40. package/dist/button.js +1 -1
  41. package/dist/card.js +1 -1
  42. package/dist/checkbox.js +2 -2
  43. package/dist/chunks/{accordion-item.nQhXD2tV.js → accordion-item.G1q4zgBG.js} +2 -2
  44. package/dist/chunks/{accordion-item.nQhXD2tV.js.map → accordion-item.G1q4zgBG.js.map} +1 -1
  45. package/dist/chunks/{action-bar.MXZTIUNk.js → action-bar.DOaFj-A2.js} +3 -3
  46. package/dist/chunks/{action-bar.MXZTIUNk.js.map → action-bar.DOaFj-A2.js.map} +1 -1
  47. package/dist/chunks/{base-modal.BMdlCSd0.js → base-modal.BJ6315kP.js} +13 -13
  48. package/dist/chunks/{base-modal.BMdlCSd0.js.map → base-modal.BJ6315kP.js.map} +1 -1
  49. package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js → button-actions-with-menu.DPKvfKJY.js} +2 -2
  50. package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js.map → button-actions-with-menu.DPKvfKJY.js.map} +1 -1
  51. package/dist/chunks/{button-actions.B81vY51z.js → button-actions.C3cP-anb.js} +228 -347
  52. package/dist/chunks/button-actions.C3cP-anb.js.map +1 -0
  53. package/dist/chunks/{calendar.Fm_dfQC5.js → calendar.Bhj58zR3.js} +4 -43
  54. package/dist/chunks/{calendar.Fm_dfQC5.js.map → calendar.Bhj58zR3.js.map} +1 -1
  55. package/dist/chunks/{card.VOCKI7Ad.js → card.XfRuWGfC.js} +2 -2
  56. package/dist/chunks/{card.VOCKI7Ad.js.map → card.XfRuWGfC.js.map} +1 -1
  57. package/dist/chunks/{checkbox-group.tm9zLXkK.js → checkbox-group.CGxWh-no.js} +35 -34
  58. package/dist/chunks/checkbox-group.CGxWh-no.js.map +1 -0
  59. package/dist/chunks/{checkbox.itbBlXev.js → checkbox.C6NSiW_I.js} +18 -18
  60. package/dist/chunks/{checkbox.itbBlXev.js.map → checkbox.C6NSiW_I.js.map} +1 -1
  61. package/dist/chunks/{code-snippet.trioWquF.js → code-snippet.bzFOFUj4.js} +5 -5
  62. package/dist/chunks/{code-snippet.trioWquF.js.map → code-snippet.bzFOFUj4.js.map} +1 -1
  63. package/dist/chunks/{codemirror.Zv80n3Z2.js → codemirror.Cy7iSLbd.js} +12 -12
  64. package/dist/chunks/{codemirror.Zv80n3Z2.js.map → codemirror.Cy7iSLbd.js.map} +1 -1
  65. package/dist/chunks/constructNow.BhymNmy5.js +8 -0
  66. package/dist/chunks/{constructNow.CHWWeLPc.js.map → constructNow.BhymNmy5.js.map} +1 -1
  67. package/dist/chunks/{controls-group.82mB_GDw.js → controls-group.D62vSDSk.js} +2 -2
  68. package/dist/chunks/{controls-group.82mB_GDw.js.map → controls-group.D62vSDSk.js.map} +1 -1
  69. package/dist/chunks/{copy.WQDLcs_T.js → copy.Hu3DFJwv.js} +2 -2
  70. package/dist/chunks/{copy.WQDLcs_T.js.map → copy.Hu3DFJwv.js.map} +1 -1
  71. package/dist/chunks/{country.CGn5WjFx.js → country.B3z3-QRY.js} +2 -2
  72. package/dist/chunks/{country.CGn5WjFx.js.map → country.B3z3-QRY.js.map} +1 -1
  73. package/dist/chunks/{dashboard-section.D1l7wDX3.js → dashboard-section.BvGMr9Vl.js} +4 -4
  74. package/dist/chunks/{dashboard-section.D1l7wDX3.js.map → dashboard-section.BvGMr9Vl.js.map} +1 -1
  75. package/dist/chunks/{dashed-underline.K-l-7bDq.js → dashed-underline.D107w00E.js} +13 -12
  76. package/dist/chunks/{dashed-underline.K-l-7bDq.js.map → dashed-underline.D107w00E.js.map} +1 -1
  77. package/dist/chunks/{data-grid-template.DGUDqzjj.js → data-grid-template.DShJunDa.js} +4 -4
  78. package/dist/chunks/{data-grid-template.DGUDqzjj.js.map → data-grid-template.DShJunDa.js.map} +1 -1
  79. package/dist/chunks/data-grid-template.keys.VezYtHtM.js +5 -0
  80. package/dist/chunks/{data-grid-template.keys.2_AkxuNT.js.map → data-grid-template.keys.VezYtHtM.js.map} +1 -1
  81. package/dist/chunks/{data-grid.CS7Q8EWs.js → data-grid.BzHb4GUA.js} +18 -18
  82. package/dist/chunks/{data-grid.CS7Q8EWs.js.map → data-grid.BzHb4GUA.js.map} +1 -1
  83. package/dist/chunks/{date-picker.DK-ndVN9.js → date-picker.Dvx50znw.js} +7 -7
  84. package/dist/chunks/{date-picker.DK-ndVN9.js.map → date-picker.Dvx50znw.js.map} +1 -1
  85. package/dist/chunks/{date-range-picker.BkZBhOfu.js → date-range-picker.DYYyE_e2.js} +313 -305
  86. package/dist/chunks/date-range-picker.DYYyE_e2.js.map +1 -0
  87. package/dist/chunks/{dialog-page.D23qNwKW.js → dialog-page.krM2wQpm.js} +2 -2
  88. package/dist/chunks/{dialog-page.D23qNwKW.js.map → dialog-page.krM2wQpm.js.map} +1 -1
  89. package/dist/chunks/{differenceInMonths.C8FyCrav.js → differenceInMonths.Cab3nOsb.js} +2 -2
  90. package/dist/chunks/{differenceInMonths.C8FyCrav.js.map → differenceInMonths.Cab3nOsb.js.map} +1 -1
  91. package/dist/chunks/{divider.CFbtmKeQ.js → divider.DX5gwN7p.js} +2 -2
  92. package/dist/chunks/{divider.CFbtmKeQ.js.map → divider.DX5gwN7p.js.map} +1 -1
  93. package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js → dropdown-default-textbox.uWZMxeI7.js} +2 -2
  94. package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js.map → dropdown-default-textbox.uWZMxeI7.js.map} +1 -1
  95. package/dist/chunks/{dropdown-tag.DUP4wYAW.js → dropdown-tag.Ctn5KMFU.js} +4 -4
  96. package/dist/chunks/{dropdown-tag.DUP4wYAW.js.map → dropdown-tag.Ctn5KMFU.js.map} +1 -1
  97. package/dist/chunks/{dropdown.BiA1YOYJ.js → dropdown.BpT6ct8O.js} +28 -28
  98. package/dist/chunks/{dropdown.BiA1YOYJ.js.map → dropdown.BpT6ct8O.js.map} +1 -1
  99. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  100. package/dist/chunks/{events.CMzGybJJ.js → events.BQOQSSb7.js} +2 -5
  101. package/dist/chunks/{events.CMzGybJJ.js.map → events.BQOQSSb7.js.map} +1 -1
  102. package/dist/chunks/{field-label.Auq-Pzho.js → field-label.C3h8Q8Xd.js} +2 -2
  103. package/dist/chunks/{field-label.Auq-Pzho.js.map → field-label.C3h8Q8Xd.js.map} +1 -1
  104. package/dist/chunks/{file-uploader.DsvADlNb.js → file-uploader.CK6dhx8T.js} +109 -106
  105. package/dist/chunks/file-uploader.CK6dhx8T.js.map +1 -0
  106. package/dist/chunks/{filter-bar.F5drAPol.js → filter-bar.DpjD5bZe.js} +111 -115
  107. package/dist/chunks/filter-bar.DpjD5bZe.js.map +1 -0
  108. package/dist/chunks/{footer-actions.CLq_kBwY.js → footer-actions.DPjWGWhJ.js} +2 -2
  109. package/dist/chunks/{footer-actions.CLq_kBwY.js.map → footer-actions.DPjWGWhJ.js.map} +1 -1
  110. package/dist/chunks/{form-layout-title.DoF6ovPB.js → form-layout-title.B_oVSX5b.js} +2 -2
  111. package/dist/chunks/{form-layout-title.DoF6ovPB.js.map → form-layout-title.B_oVSX5b.js.map} +1 -1
  112. package/dist/chunks/form-layout.types.bZW9iR6_.js +5 -0
  113. package/dist/chunks/{form-layout.types.D3EKzbE7.js.map → form-layout.types.bZW9iR6_.js.map} +1 -1
  114. package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -1
  115. package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js → getTimezoneOffsetInMilliseconds.B7sxiukN.js} +2 -2
  116. package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map → getTimezoneOffsetInMilliseconds.B7sxiukN.js.map} +1 -1
  117. package/dist/chunks/{header-meta.D-6dL1Vg.js → header-meta.qT3_T35I.js} +5 -5
  118. package/dist/chunks/{header-meta.D-6dL1Vg.js.map → header-meta.qT3_T35I.js.map} +1 -1
  119. package/dist/chunks/{header-with-views.CG5FKoC1.js → header-with-views.BSYbvDyP.js} +13 -13
  120. package/dist/chunks/{header-with-views.CG5FKoC1.js.map → header-with-views.BSYbvDyP.js.map} +1 -1
  121. package/dist/chunks/{header.DoWKsA15.js → header.CLDtv3Ir.js} +3 -3
  122. package/dist/chunks/{header.DoWKsA15.js.map → header.CLDtv3Ir.js.map} +1 -1
  123. package/dist/chunks/{info-icon.Bhka3oGh.js → info-icon.DGrrXpIY.js} +2 -2
  124. package/dist/chunks/{info-icon.Bhka3oGh.js.map → info-icon.DGrrXpIY.js.map} +1 -1
  125. package/dist/chunks/{input-field-password.FvLueqmb.js → input-field-password.uhQuUzyj.js} +103 -95
  126. package/dist/chunks/input-field-password.uhQuUzyj.js.map +1 -0
  127. package/dist/chunks/{input-field-phone-number.B-dlJc27.js → input-field-phone-number.BdbaTJwH.js} +1170 -1168
  128. package/dist/chunks/{input-field-phone-number.B-dlJc27.js.map → input-field-phone-number.BdbaTJwH.js.map} +1 -1
  129. package/dist/chunks/{input-field.B1MHu987.js → input-field.C4XJ53Cn.js} +87 -79
  130. package/dist/chunks/input-field.C4XJ53Cn.js.map +1 -0
  131. package/dist/chunks/{keyboard-navigation.pB8weElW.js → keyboard-navigation.DWmhelVv.js} +2 -2
  132. package/dist/chunks/{keyboard-navigation.pB8weElW.js.map → keyboard-navigation.DWmhelVv.js.map} +1 -1
  133. package/dist/chunks/{layout-row.BP3lZAOh.js → layout-row.DwdZbpVG.js} +2 -2
  134. package/dist/chunks/{layout-row.BP3lZAOh.js.map → layout-row.DwdZbpVG.js.map} +1 -1
  135. package/dist/chunks/{listbox-option-tag.DkPz3wPc.js → listbox-option-tag.B94BtpSU.js} +2 -2
  136. package/dist/chunks/{listbox-option-tag.DkPz3wPc.js.map → listbox-option-tag.B94BtpSU.js.map} +1 -1
  137. package/dist/chunks/{modal-fullscreen.BSKm6yn_.js → modal-fullscreen.B3Xx-Hoc.js} +33 -32
  138. package/dist/chunks/modal-fullscreen.B3Xx-Hoc.js.map +1 -0
  139. package/dist/chunks/{modal.Bp5twyjz.js → modal.D3OSxMF6.js} +4 -4
  140. package/dist/chunks/{modal.Bp5twyjz.js.map → modal.D3OSxMF6.js.map} +1 -1
  141. package/dist/chunks/{pagination.D1C0cURM.js → pagination.Bvhpu21H.js} +2 -2
  142. package/dist/chunks/{pagination.D1C0cURM.js.map → pagination.Bvhpu21H.js.map} +1 -1
  143. package/dist/chunks/{payment-method.CcASYR3B.js → payment-method.C8Ie97qE.js} +2 -2
  144. package/dist/chunks/{payment-method.CcASYR3B.js.map → payment-method.C8Ie97qE.js.map} +1 -1
  145. package/dist/chunks/promo-banner.DikQcQU2.js.map +1 -1
  146. package/dist/chunks/{radio-group.DmKiTjS8.js → radio-group.BTu23ZgN.js} +5 -5
  147. package/dist/chunks/{radio-group.DmKiTjS8.js.map → radio-group.BTu23ZgN.js.map} +1 -1
  148. package/dist/chunks/{rich-text-editor.DzH-Z5oi.js → rich-text-editor.BtcSjFpF.js} +12 -12
  149. package/dist/chunks/{rich-text-editor.DzH-Z5oi.js.map → rich-text-editor.BtcSjFpF.js.map} +1 -1
  150. package/dist/chunks/{search-bar.Cvw_nY5M.js → search-bar.BcHoTrjP.js} +11 -11
  151. package/dist/chunks/search-bar.BcHoTrjP.js.map +1 -0
  152. package/dist/chunks/{secondary-nav.CUF6QWjI.js → secondary-nav.DEThy9WH.js} +3 -3
  153. package/dist/chunks/{secondary-nav.CUF6QWjI.js.map → secondary-nav.DEThy9WH.js.map} +1 -1
  154. package/dist/chunks/{segmented-control.Cma_nu0G.js → segmented-control.Dj_ZKhmU.js} +2 -2
  155. package/dist/chunks/{segmented-control.Cma_nu0G.js.map → segmented-control.Dj_ZKhmU.js.map} +1 -1
  156. package/dist/chunks/{selection-card-group.Ddli4Llk.js → selection-card-group.Rz_rTBRp.js} +11 -11
  157. package/dist/chunks/{selection-card-group.Ddli4Llk.js.map → selection-card-group.Rz_rTBRp.js.map} +1 -1
  158. package/dist/chunks/{sidepanel.A9yG4FP_.js → sidepanel.ClG3dhHf.js} +4 -4
  159. package/dist/chunks/{sidepanel.A9yG4FP_.js.map → sidepanel.ClG3dhHf.js.map} +1 -1
  160. package/dist/chunks/{step.TzzZSA9f.js → step.Cnqr8i4V.js} +3 -3
  161. package/dist/chunks/{step.TzzZSA9f.js.map → step.Cnqr8i4V.js.map} +1 -1
  162. package/dist/chunks/{structured-list-item.CMsVwwA6.js → structured-list-item.zoY-ATTu.js} +5 -5
  163. package/dist/chunks/{structured-list-item.CMsVwwA6.js.map → structured-list-item.zoY-ATTu.js.map} +1 -1
  164. package/dist/chunks/summary-grid.keys.Xx-W5a2w.js +6 -0
  165. package/dist/chunks/{summary-grid.keys.CxTf_FOc.js.map → summary-grid.keys.Xx-W5a2w.js.map} +1 -1
  166. package/dist/chunks/{summary-grid.types.CaYrtyVO.js → summary-grid.types.BA0XCVKK.js} +21 -21
  167. package/dist/chunks/summary-grid.types.BA0XCVKK.js.map +1 -0
  168. package/dist/chunks/{tab.CTui3j3e.js → tab.DXE68qVf.js} +2 -2
  169. package/dist/chunks/{tab.CTui3j3e.js.map → tab.DXE68qVf.js.map} +1 -1
  170. package/dist/chunks/tabs.keys.B4qGhjp2.js +7 -0
  171. package/dist/chunks/{tabs.keys.Cb4Vw5Jh.js.map → tabs.keys.B4qGhjp2.js.map} +1 -1
  172. package/dist/chunks/{tag.BltIbSh3.js → tag.BdCP2CN_.js} +2 -2
  173. package/dist/chunks/{tag.BltIbSh3.js.map → tag.BdCP2CN_.js.map} +1 -1
  174. package/dist/chunks/teleport.dQFcCuAw.js +128 -0
  175. package/dist/chunks/teleport.dQFcCuAw.js.map +1 -0
  176. package/dist/chunks/{textarea.CLWZRnAt.js → textarea.DaNiOOJ7.js} +3 -3
  177. package/dist/chunks/{textarea.CLWZRnAt.js.map → textarea.DaNiOOJ7.js.map} +1 -1
  178. package/dist/chunks/{timeline-item.HbtUj1j_.js → timeline-item.D2HsuNh-.js} +7 -7
  179. package/dist/chunks/{timeline-item.HbtUj1j_.js.map → timeline-item.D2HsuNh-.js.map} +1 -1
  180. package/dist/chunks/toast.CA5H8vr9.js +174 -0
  181. package/dist/chunks/toast.CA5H8vr9.js.map +1 -0
  182. package/dist/chunks/{tooltip.D3SDcRef.js → tooltip.Dt87KVh2.js} +2 -2
  183. package/dist/chunks/{tooltip.D3SDcRef.js.map → tooltip.Dt87KVh2.js.map} +1 -1
  184. package/dist/chunks/{tutorial.B32GMtIj.js → tutorial.C-q4mxUb.js} +4 -4
  185. package/dist/chunks/{tutorial.B32GMtIj.js.map → tutorial.C-q4mxUb.js.map} +1 -1
  186. package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js → use-bento-toast-controller.BhtohoS1.js} +2 -2
  187. package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js.map → use-bento-toast-controller.BhtohoS1.js.map} +1 -1
  188. package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js → use-cached-selected-values.FoXcm49J.js} +3 -3
  189. package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js.map → use-cached-selected-values.FoXcm49J.js.map} +1 -1
  190. package/dist/chunks/{use-form-layout-loading.D3lALhtC.js → use-form-layout-loading.CWbjZiwP.js} +2 -2
  191. package/dist/chunks/{use-form-layout-loading.D3lALhtC.js.map → use-form-layout-loading.CWbjZiwP.js.map} +1 -1
  192. package/dist/code-snippet.js +1 -1
  193. package/dist/country.js +1 -1
  194. package/dist/dashboard-template.js +1 -1
  195. package/dist/dashed-underline.js +1 -1
  196. package/dist/data-grid-template.js +1 -1
  197. package/dist/data-grid.js +1 -1
  198. package/dist/date-picker.js +2 -2
  199. package/dist/date-range-picker.js +2 -2
  200. package/dist/divider.js +1 -1
  201. package/dist/dropdown.js +4 -4
  202. package/dist/file-uploader.js +1 -1
  203. package/dist/filter-bar.js +1 -1
  204. package/dist/form-layout.js +1 -1
  205. package/dist/header-with-views.js +1 -1
  206. package/dist/header.js +1 -1
  207. package/dist/index.js +289 -288
  208. package/dist/index.js.map +1 -1
  209. package/dist/info-icon.js +1 -1
  210. package/dist/input-field-password.js +1 -1
  211. package/dist/input-field-phone-number.js +1 -1
  212. package/dist/input-field.js +1 -1
  213. package/dist/internal.js +27 -26
  214. package/dist/internal.js.map +1 -1
  215. package/dist/layout.js +1 -1
  216. package/dist/menu.js +1 -1
  217. package/dist/modal-fullscreen.js +1 -1
  218. package/dist/modal.js +2 -2
  219. package/dist/pagination.js +1 -1
  220. package/dist/payment-method.js +1 -1
  221. package/dist/popover.js +1 -1
  222. package/dist/radio-group.js +1 -1
  223. package/dist/rich-text-editor.js +1 -1
  224. package/dist/search-bar.js +2 -2
  225. package/dist/secondary-nav.js +1 -1
  226. package/dist/segmented-control.js +1 -1
  227. package/dist/selection-card.js +1 -1
  228. package/dist/sidepanel.js +1 -1
  229. package/dist/stepper.js +1 -1
  230. package/dist/structured-list.js +1 -1
  231. package/dist/styles/bento-dark.css +4 -1
  232. package/dist/styles/bento-light.css +4 -1
  233. package/dist/styles/bento.css +4 -1
  234. package/dist/styles/legacy.css +4 -1
  235. package/dist/styles/styleguide.css +4 -1
  236. package/dist/summary-grid.js +1 -1
  237. package/dist/tabs.js +1 -1
  238. package/dist/tag.js +1 -1
  239. package/dist/textarea.js +1 -1
  240. package/dist/timeline.js +1 -1
  241. package/dist/toast.js +1 -1
  242. package/dist/tutorial.js +1 -1
  243. package/dist/use-form-v4.js +8 -8
  244. package/dist/use-form-v4.js.map +1 -1
  245. package/dist/web-types.json +105 -5
  246. package/package.json +8 -7
  247. package/dist/chunks/button-actions.B81vY51z.js.map +0 -1
  248. package/dist/chunks/checkbox-group.tm9zLXkK.js.map +0 -1
  249. package/dist/chunks/constructNow.CHWWeLPc.js +0 -8
  250. package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +0 -5
  251. package/dist/chunks/date-range-picker.BkZBhOfu.js.map +0 -1
  252. package/dist/chunks/file-uploader.DsvADlNb.js.map +0 -1
  253. package/dist/chunks/filter-bar.F5drAPol.js.map +0 -1
  254. package/dist/chunks/form-layout.types.D3EKzbE7.js +0 -5
  255. package/dist/chunks/input-field-password.FvLueqmb.js.map +0 -1
  256. package/dist/chunks/input-field.B1MHu987.js.map +0 -1
  257. package/dist/chunks/modal-fullscreen.BSKm6yn_.js.map +0 -1
  258. package/dist/chunks/search-bar.Cvw_nY5M.js.map +0 -1
  259. package/dist/chunks/summary-grid.keys.CxTf_FOc.js +0 -6
  260. package/dist/chunks/summary-grid.types.CaYrtyVO.js.map +0 -1
  261. package/dist/chunks/tabs.keys.Cb4Vw5Jh.js +0 -7
  262. package/dist/chunks/toast.B4J4V6n-.js +0 -171
  263. package/dist/chunks/toast.B4J4V6n-.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.BCOVaw-a.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=\"isRequired\"\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 { debounce } from '@/utils/ts/debounce';\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 * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\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 isRequired = computed(() => attrs['required'] as Booleanish);\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': shouldShowInput.value ? null : isRequired.value,\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 = debounce<(event: Event) => void>((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 }, props.debounceTime);\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 * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\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","isRequired","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;;AA8HY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBAC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OAAA;AAAA,IAAY,GAGhBoB,IAAA;AAAA,MAAkB,CAAApD,EAAA,KAAA,GAAA4C;AAAA,MACoB,CAAA5C,EAAA,IAAA,GAAAgD;AAAA,MACD,CAAAhD,EAAA,KAAA,GAAAkD;AAAA,MACC,CAAAlD,EAAA,KAAA,GAAAmD;AAAA,MACA,CAAAnD,EAAA,OAAA,GAAA8C;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.uWZMxeI7.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=\"isRequired\"\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 { debounce } from '@/utils/ts/debounce';\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 * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\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 isRequired = computed(() => attrs['required'] as Booleanish);\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': shouldShowInput.value ? null : isRequired.value,\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 = debounce<(event: Event) => void>((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 }, props.debounceTime);\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 * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\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","isRequired","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;;AA8HY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GA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B,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAGhBoB,IAAA;AAAA,MAAkB,CAAApD,EAAA,KAAA,GAAA4C;AAAA,MACoB,CAAA5C,EAAA,IAAA,GAAAgD;AAAA,MACD,CAAAhD,EAAA,KAAA,GAAAkD;AAAA,MACC,CAAAlD,EAAA,KAAA,GAAAmD;AAAA,MACA,CAAAnD,EAAA,OAAA,GAAA8C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
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.CeDqq2Z-.js";
3
- import { B as p, u as C } from "./dropdown.BiA1YOYJ.js";
3
+ import { B as p, u as C } from "./dropdown.BpT6ct8O.js";
4
4
  import { u as _ } from "./form-field.D_2g7vaP.js";
5
5
  import { d as i, B as b } from "./typography.hlOAxsEn.js";
6
6
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
7
  import { u as M } from "./use-country-items.B3Cd3Tdo.js";
8
8
  import { B as h } from "./country.types.C0Q_hhgJ.js";
9
- import { L as $ } from "./listbox-option-tag.DkPz3wPc.js";
10
- import { B as T } from "./payment-method.CcASYR3B.js";
9
+ import { L as $ } from "./listbox-option-tag.B94BtpSU.js";
10
+ import { B as T } from "./payment-method.C8Ie97qE.js";
11
11
  import "../assets/dropdown-tag.css";
12
12
  const U = u({
13
13
  name: "bento-dropdown-avatar",
@@ -291,4 +291,4 @@ export {
291
291
  le as d,
292
292
  _e as e
293
293
  };
294
- //# sourceMappingURL=dropdown-tag.DUP4wYAW.js.map
294
+ //# sourceMappingURL=dropdown-tag.Ctn5KMFU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-tag.DUP4wYAW.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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;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-tag.Ctn5KMFU.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,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;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,21 +1,21 @@
1
- import { ref as h, watch as G, computed as r, defineComponent as R, useSlots as he, toRefs as we, nextTick as x, useAttrs as Ae, toRef as L, inject as Me } from "vue";
1
+ import { ref as w, watch as G, computed as r, defineComponent as R, useSlots as we, toRefs as he, nextTick as x, useAttrs as Ae, toRef as L, inject as Me } from "vue";
2
2
  import { d as Y, B as Pe } from "./typography.hlOAxsEn.js";
3
3
  import { g as $ } from "./generate-uid.NJ8tVoha.js";
4
4
  import { u as $e } from "./aria-label.CaUURpnB.js";
5
5
  import { u as ee } from "./index.B6WW_F-J.js";
6
6
  import { u as ke } from "./form-field.D_2g7vaP.js";
7
- import { a as p, b as X, B as be, c as Fe, u as Ke, d as ze } from "./use-cached-selected-values.BZd3CTeP.js";
8
- import { u as Ve } from "./use-form-layout-loading.D3lALhtC.js";
9
- import { a as Z, b as P, c as We, B as V, D as Ue } from "./dropdown-default-textbox.BCOVaw-a.js";
7
+ import { a as p, b as X, B as be, c as Fe, u as Ke, d as ze } from "./use-cached-selected-values.FoXcm49J.js";
8
+ import { u as Ve } from "./use-form-layout-loading.CWbjZiwP.js";
9
+ import { a as Z, b as P, c as We, B as V, D as Ue } from "./dropdown-default-textbox.uWZMxeI7.js";
10
10
  import { u as je } from "./use-has-slot.C9lQZ6nz.js";
11
- import { B as E, a as qe } from "./keyboard-navigation.pB8weElW.js";
11
+ import { B as E, a as qe } from "./keyboard-navigation.DWmhelVv.js";
12
12
  import { B as He } from "./directive.Cbdox5VL.js";
13
- import { F as Je, E as Ye } from "./field-label.Auq-Pzho.js";
13
+ import { F as Je, E as Ye } from "./field-label.C3h8Q8Xd.js";
14
14
  import { P as ye } from "./popper-container.agLYtGwv.js";
15
- import { h as Ze } from "./button-actions.B81vY51z.js";
15
+ import { g as Ze } from "./button-actions.C3cP-anb.js";
16
16
  import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
17
17
  /* empty css */
18
- import { s as Q } from "./events.CMzGybJJ.js";
18
+ import { s as Q } from "./events.BQOQSSb7.js";
19
19
  import "../assets/dropdown.css";
20
20
  const Qe = {
21
21
  "en-US": {
@@ -32,7 +32,7 @@ const Qe = {
32
32
  cancel: "Cancelar"
33
33
  }
34
34
  }, Xe = (n, t, o, e) => {
35
- const a = h(n.value), { t: s } = ee();
35
+ const a = w(n.value), { t: s } = ee();
36
36
  G(n, () => {
37
37
  a.value = n.value;
38
38
  });
@@ -197,7 +197,7 @@ const Qe = {
197
197
  },
198
198
  emits: [],
199
199
  setup(n, { expose: t, emit: o }) {
200
- const e = n, a = he(), { selectedValue: s, multiple: l } = we(e), i = h(null), { t: f } = ee(), m = r(() => e.open && !e.disabled), u = r(() => f("noOptionsMatchThisSearch")), y = r(() => ({
200
+ const e = n, a = we(), { selectedValue: s, multiple: l } = he(e), i = w(null), { t: f } = ee(), m = r(() => e.open && !e.disabled), u = r(() => f("noOptionsMatchThisSearch")), y = r(() => ({
201
201
  "b-dropdown-options-container--single": !(e != null && e.multiple)
202
202
  })), c = r(() => ({
203
203
  "b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
@@ -355,7 +355,7 @@ const vt = ft.exports, mt = R({
355
355
  },
356
356
  emits: ["clear", "close", "input", "keydown", "open"],
357
357
  setup(n, { expose: t, emit: o }) {
358
- const e = n, a = h(null), s = r(() => ({
358
+ const e = n, a = w(null), s = r(() => ({
359
359
  [`b-dropdown-small-textbox--${Z.DISABLED}`]: e.disabled,
360
360
  [`b-dropdown-small-textbox--${Z.READONLY}`]: e.readonly,
361
361
  [`b-dropdown-small-textbox--${Z.OPENED}`]: e.open
@@ -396,7 +396,7 @@ var yt = function() {
396
396
  null,
397
397
  "2e5cb799"
398
398
  );
399
- const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
399
+ const wt = gt.exports, ht = (n, t) => t.value.reduce((o, e) => {
400
400
  if (e.items) {
401
401
  const a = e.items.filter(
402
402
  (l) => n.value.find((i) => i.value === l.value)
@@ -411,7 +411,7 @@ const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
411
411
  return (i = l.items) == null ? void 0 : i.length;
412
412
  })
413
413
  );
414
- return r(() => o.value.length ? a.value ? wt(o, n) : o.value.map(({ label: l, displayValue: i }) => i ?? l).join(", ") : t.value || null);
414
+ return r(() => o.value.length ? a.value ? ht(o, n) : o.value.map(({ label: l, displayValue: i }) => i ?? l).join(", ") : t.value || null);
415
415
  }, Ce = (n) => {
416
416
  var t;
417
417
  (t = n.value.$children) == null || t[0].$refs.textbox.focus();
@@ -425,18 +425,18 @@ const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
425
425
  isMultiple: l
426
426
  }, i, f, m) => {
427
427
  const u = async (_) => {
428
- var w;
429
- a.value && await x(), (w = s.value[_]) == null || w.focus();
428
+ var h;
429
+ a.value && await x(), (h = s.value[_]) == null || h.focus();
430
430
  }, y = async (_) => {
431
431
  var A, K;
432
432
  a.value && await x();
433
- const w = (A = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : A.$el.querySelectorAll(
433
+ const h = (A = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : A.$el.querySelectorAll(
434
434
  "button"
435
435
  );
436
- w.length ? (K = w[_]) == null || K.focus() : u(_);
436
+ h.length ? (K = h[_]) == null || K.focus() : u(_);
437
437
  }, c = (_) => {
438
- var w;
439
- return (w = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : w.setListboxFocusedIndex(
438
+ var h;
439
+ return (h = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : h.setListboxFocusedIndex(
440
440
  _
441
441
  );
442
442
  }, g = () => {
@@ -492,7 +492,7 @@ const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
492
492
  };
493
493
  };
494
494
  function St(n, t, o, e) {
495
- const a = h(n), s = h(t), l = (f, m = []) => m.flatMap((u) => u.label.toLocaleLowerCase().includes(f) ? e != null && e.value && u.items ? [...l(f, u.items)] : [u, ...l(f, u.items)] : u.items ? [...l(f, u.items)] : []);
495
+ const a = w(n), s = w(t), l = (f, m = []) => m.flatMap((u) => u.label.toLocaleLowerCase().includes(f) ? e != null && e.value && u.items ? [...l(f, u.items)] : [u, ...l(f, u.items)] : u.items ? [...l(f, u.items)] : []);
496
496
  return G(a, () => {
497
497
  o !== void 0 && o(a.value);
498
498
  }), r(() => {
@@ -516,12 +516,12 @@ const Ot = {
516
516
  all: "Todos",
517
517
  clearFilter: "Limpar filtro"
518
518
  }
519
- }, Et = Symbol("input field component injection key"), Qt = Symbol("input field hint injection key"), Xt = Symbol("input field parent component injection key"), Dt = R({
519
+ }, Et = /* @__PURE__ */ Symbol("input field component injection key"), Qt = /* @__PURE__ */ Symbol("input field hint injection key"), Xt = /* @__PURE__ */ Symbol("input field parent component injection key"), Dt = R({
520
520
  i18n: { messages: Ot },
521
521
  name: "b-dropdown",
522
522
  components: {
523
523
  DropdownInputDefault: Ue,
524
- DropdownInputSmall: ht
524
+ DropdownInputSmall: wt
525
525
  },
526
526
  model: { prop: "modelValue" }
527
527
  }), Bt = /* @__PURE__ */ R({
@@ -560,21 +560,21 @@ const Ot = {
560
560
  emits: ["input", "update:model-value", "show-more", "open"],
561
561
  setup(n, { expose: t, emit: o }) {
562
562
  var me;
563
- const e = n, a = Ae(), s = he(), l = je(s), { t: i } = ee(), { emitValue: f } = ke(o), m = h(null), u = h(null), y = h(null), c = h(!1), g = $("bento-dropdown-options-container"), b = $("dropdown-label"), S = $("dropdown-description"), O = $("dropdown-error"), { isReadOnly: C } = Ve(L(e, "readonly")), d = r(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B } = Fe(
563
+ const e = n, a = Ae(), s = we(), l = je(s), { t: i } = ee(), { emitValue: f } = ke(o), m = w(null), u = w(null), y = w(null), c = w(!1), g = $("bento-dropdown-options-container"), b = $("dropdown-label"), S = $("dropdown-description"), O = $("dropdown-error"), { isReadOnly: C } = Ve(L(e, "readonly")), d = r(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B } = Fe(
564
564
  L(e, "items"),
565
565
  d,
566
566
  L(e, "multiple"),
567
567
  L(e, "enableValueLabelPair")
568
- ), F = h(a["aria-label"]), W = h(a["aria-describedby"]), { ariaLabel: _, label: w } = we(e), A = r(() => i("ariaLabelFallback")), K = $e({
568
+ ), F = w(a["aria-label"]), W = w(a["aria-describedby"]), { ariaLabel: _, label: h } = he(e), A = r(() => i("ariaLabelFallback")), K = $e({
569
569
  // TODO: take ariaLabel ref away when aria-label prop is removed
570
570
  ariaLabel: _.value || F,
571
- label: w,
571
+ label: h,
572
572
  defaultFallback: A
573
573
  }), te = e.size === V.SMALL || Me(Et, !1), Le = r(() => te ? V.SMALL : V.DEFAULT), xe = r(() => ({
574
574
  "b-dropdown--condensed": e.condensed
575
575
  })), Se = r(() => ({
576
576
  "b-dropdown__description--error": !!e.errorMessage
577
- })), T = h(""), M = L(e, "items"), oe = L(e, "staticCategories"), U = St(T, M, (me = e == null ? void 0 : e.search) == null ? void 0 : me.searchEvent, oe), j = r(() => e.dynamicFiltering && !!T.value), Oe = Ct({
577
+ })), T = w(""), M = L(e, "items"), oe = L(e, "staticCategories"), U = St(T, M, (me = e == null ? void 0 : e.search) == null ? void 0 : me.searchEvent, oe), j = r(() => e.dynamicFiltering && !!T.value), Oe = Ct({
578
578
  items: M,
579
579
  placeholder: L(e, "placeholder"),
580
580
  isMultiSelect: L(e, "multiple"),
@@ -676,7 +676,7 @@ const Ot = {
676
676
  }
677
677
  ), t({
678
678
  focus: ve
679
- }), { __sfc: !0, attrs: a, slots: s, hasSlot: l, props: e, emit: o, t: i, emitValue: f, inputContainerRef: m, inputContainerRefWrapper: u, optionsContainerRef: y, isDropdownOpen: c, dropdownOptionsContainerId: g, labelId: b, descriptionId: S, errorId: O, isReadOnly: C, dropdownValue: d, cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B, ariaLabelAttribute: F, ariaDescribedByAttribute: W, ariaLabel: _, label: w, computedAriaLabelFallbackMessage: A, computedAriaLabel: K, isInputComponent: te, computedSize: Le, conditionalClasses: xe, descriptionConditionalClasses: Se, searchTerm: T, items: M, staticCategories: oe, filteredItems: U, isSearching: j, displayValue: Oe, selectedValueItem: Ee, selectedValueIndex: ae, isMultiLevelSelect: q, flattenedItemsList: ne, isTreePattern: le, computedOptionRole: se, additionalItemsSelected: De, ariaDescribedBy: Be, listboxRef: ie, visibleDomOptions: re, updateVisibleDomOptions: H, openDropdown: de, closeDropdown: z, toggleDropdown: ue, clickOutsideDropdown: Ie, onOptionSelected: ce, emitShowMoreEvent: pe, textboxKeyboardNavigationListeners: Te, listboxKeyboardNavigationListeners: fe, listboxListeners: Ne, focus: ve, BentoDropdownOptionsContainer: nt, BentoTypography: Pe, ErrorMessage: Ye, FieldLabel: Je, vBentoClickOutsideDirective: He, vBentoKeyboardNavigationDirective: qe };
679
+ }), { __sfc: !0, attrs: a, slots: s, hasSlot: l, props: e, emit: o, t: i, emitValue: f, inputContainerRef: m, inputContainerRefWrapper: u, optionsContainerRef: y, isDropdownOpen: c, dropdownOptionsContainerId: g, labelId: b, descriptionId: S, errorId: O, isReadOnly: C, dropdownValue: d, cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B, ariaLabelAttribute: F, ariaDescribedByAttribute: W, ariaLabel: _, label: h, computedAriaLabelFallbackMessage: A, computedAriaLabel: K, isInputComponent: te, computedSize: Le, conditionalClasses: xe, descriptionConditionalClasses: Se, searchTerm: T, items: M, staticCategories: oe, filteredItems: U, isSearching: j, displayValue: Oe, selectedValueItem: Ee, selectedValueIndex: ae, isMultiLevelSelect: q, flattenedItemsList: ne, isTreePattern: le, computedOptionRole: se, additionalItemsSelected: De, ariaDescribedBy: Be, listboxRef: ie, visibleDomOptions: re, updateVisibleDomOptions: H, openDropdown: de, closeDropdown: z, toggleDropdown: ue, clickOutsideDropdown: Ie, onOptionSelected: ce, emitShowMoreEvent: pe, textboxKeyboardNavigationListeners: Te, listboxKeyboardNavigationListeners: fe, listboxListeners: Ne, focus: ve, BentoDropdownOptionsContainer: nt, BentoTypography: Pe, ErrorMessage: Ye, FieldLabel: Je, vBentoClickOutsideDirective: He, vBentoKeyboardNavigationDirective: qe };
680
680
  }
681
681
  });
682
682
  var It = function() {
@@ -711,4 +711,4 @@ export {
711
711
  Xt as b,
712
712
  St as u
713
713
  };
714
- //# sourceMappingURL=dropdown.BiA1YOYJ.js.map
714
+ //# sourceMappingURL=dropdown.BpT6ct8O.js.map