@adyen/bento-vue3 1.89.2 → 1.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +403 -298
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-time.css +1 -0
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/secondary-nav.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +1 -1
  23. package/dist/card.js +1 -1
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.js +1 -1
  26. package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
  27. package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
  28. package/dist/chunks/action-bar.Pe_hvtja.js +336 -0
  29. package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.Pe_hvtja.js.map} +1 -1
  30. package/dist/chunks/ai-tag.BSlc78DU.js +137 -0
  31. package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.BSlc78DU.js.map} +1 -1
  32. package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
  33. package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
  34. package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
  35. package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
  36. package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BjjDrx0z.js} +132 -125
  37. package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BjjDrx0z.js.map} +1 -1
  38. package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.DvkS16ur.js} +2 -2
  39. package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.DvkS16ur.js.map} +1 -1
  40. package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.Bh_PZ_fV.js} +202 -188
  41. package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.Bh_PZ_fV.js.map} +1 -1
  42. package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.CH-1Vgeb.js} +343 -329
  43. package/dist/chunks/{calendar.DcCqkSNJ.js.map → calendar.CH-1Vgeb.js.map} +1 -1
  44. package/dist/chunks/card.BzCGCCzH.js +223 -0
  45. package/dist/chunks/{card.CoxQ_L0w.js.map → card.BzCGCCzH.js.map} +1 -1
  46. package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.D_fN6Glu.js} +4 -4
  47. package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.D_fN6Glu.js.map} +1 -1
  48. package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BlAhQl9N.js} +78 -71
  49. package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BlAhQl9N.js.map} +1 -1
  50. package/dist/chunks/chip.DFldnqfz.js +72 -0
  51. package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
  52. package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BePxxR3q.js} +113 -106
  53. package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BePxxR3q.js.map} +1 -1
  54. package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.Cxk-0fCy.js} +2 -2
  55. package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.Cxk-0fCy.js.map} +1 -1
  56. package/dist/chunks/copy.CL893i9-.js +114 -0
  57. package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
  58. package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
  59. package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
  60. package/dist/chunks/country.types.6a7xxZIR.js +26 -0
  61. package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
  62. package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.CiNDItU2.js} +3 -3
  63. package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.CiNDItU2.js.map} +1 -1
  64. package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.CwdpUz76.js} +3 -3
  65. package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.CwdpUz76.js.map} +1 -1
  66. package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.nXn1dLCw.js} +4 -4
  67. package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.nXn1dLCw.js.map} +1 -1
  68. package/dist/chunks/data-grid.CXWaoqzi.js +4242 -0
  69. package/dist/chunks/data-grid.CXWaoqzi.js.map +1 -0
  70. package/dist/chunks/date-picker.DPjCROIP.js +238 -0
  71. package/dist/chunks/{date-picker.dlzZ_-5f.js.map → date-picker.DPjCROIP.js.map} +1 -1
  72. package/dist/chunks/date-range-picker.fyrfFd04.js +998 -0
  73. package/dist/chunks/date-range-picker.fyrfFd04.js.map +1 -0
  74. package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
  75. package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
  76. package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js → dropdown-default-textbox.aYsTZDZ7.js} +69 -62
  77. package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js.map → dropdown-default-textbox.aYsTZDZ7.js.map} +1 -1
  78. package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.B7OA_Yv9.js} +5 -5
  79. package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.B7OA_Yv9.js.map} +1 -1
  80. package/dist/chunks/{dropdown.MhmX1P9o.js → dropdown.Do-mZiI6.js} +285 -271
  81. package/dist/chunks/{dropdown.MhmX1P9o.js.map → dropdown.Do-mZiI6.js.map} +1 -1
  82. package/dist/chunks/error-message.849uzpkq.js +157 -0
  83. package/dist/chunks/{error-message.DCgo8q20.js.map → error-message.849uzpkq.js.map} +1 -1
  84. package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.BUvDU_cn.js} +604 -583
  85. package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.BUvDU_cn.js.map} +1 -1
  86. package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.fowl40RS.js} +998 -928
  87. package/dist/chunks/{filter-bar.CkAjLQol.js.map → filter-bar.fowl40RS.js.map} +1 -1
  88. package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
  89. package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
  90. package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.uoNbOGAQ.js} +2 -2
  91. package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.uoNbOGAQ.js.map} +1 -1
  92. package/dist/chunks/form-layout-title.Cr3wdpK_.js +239 -0
  93. package/dist/chunks/{form-layout-title.DW5Kg1rh.js.map → form-layout-title.Cr3wdpK_.js.map} +1 -1
  94. package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.CmH6SnjE.js} +98 -84
  95. package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.CmH6SnjE.js.map} +1 -1
  96. package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.B2pPBcTf.js} +1091 -1070
  97. package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.B2pPBcTf.js.map} +1 -1
  98. package/dist/chunks/{header.o-7SyHtU.js → header.BVM8Usdi.js} +3 -3
  99. package/dist/chunks/{header.o-7SyHtU.js.map → header.BVM8Usdi.js.map} +1 -1
  100. package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
  101. package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
  102. package/dist/chunks/input-field-password.CHb2Ros_.js +353 -0
  103. package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.CHb2Ros_.js.map} +1 -1
  104. package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.DM2rmZkQ.js} +12 -5
  105. package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.DM2rmZkQ.js.map} +1 -1
  106. package/dist/chunks/{input-field.CfU0ZKtL.js → input-field.DnYjM6yy.js} +118 -111
  107. package/dist/chunks/{input-field.CfU0ZKtL.js.map → input-field.DnYjM6yy.js.map} +1 -1
  108. package/dist/chunks/input-time.DeJ8lDio.js +103 -0
  109. package/dist/chunks/input-time.DeJ8lDio.js.map +1 -0
  110. package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
  111. package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
  112. package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
  113. package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
  114. package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
  115. package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
  116. package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.9CSTqFQc.js} +54 -47
  117. package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.9CSTqFQc.js.map} +1 -1
  118. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js} +48 -41
  119. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js.map} +1 -1
  120. package/dist/chunks/pagination.DL-h8OLF.js +413 -0
  121. package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.DL-h8OLF.js.map} +1 -1
  122. package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
  123. package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
  124. package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.DzhQgXv9.js} +4 -4
  125. package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.DzhQgXv9.js.map} +1 -1
  126. package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Ij2t4pyI.js} +418 -411
  127. package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Ij2t4pyI.js.map} +1 -1
  128. package/dist/chunks/search-bar.DfNwnjes.js +114 -0
  129. package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.DfNwnjes.js.map} +1 -1
  130. package/dist/chunks/secondary-nav.CvipTDRh.js +285 -0
  131. package/dist/chunks/secondary-nav.CvipTDRh.js.map +1 -0
  132. package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
  133. package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
  134. package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.CcOWQAUC.js} +11 -11
  135. package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.CcOWQAUC.js.map} +1 -1
  136. package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.BObSv8UU.js} +56 -49
  137. package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.BObSv8UU.js.map} +1 -1
  138. package/dist/chunks/step.AsX2jAeL.js +268 -0
  139. package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
  140. package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
  141. package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
  142. package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.DKPhtHw3.js} +5 -5
  143. package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.DKPhtHw3.js.map} +1 -1
  144. package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
  145. package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
  146. package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
  147. package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
  148. package/dist/chunks/textarea.C-sBemuo.js +256 -0
  149. package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.C-sBemuo.js.map} +1 -1
  150. package/dist/chunks/timeline-item.CHk8wXeT.js +433 -0
  151. package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.CHk8wXeT.js.map} +1 -1
  152. package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
  153. package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
  154. package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
  155. package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
  156. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js} +120 -113
  157. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js.map} +1 -1
  158. package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.DIbfa5F1.js} +381 -360
  159. package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js.map → use-cached-selected-values.DIbfa5F1.js.map} +1 -1
  160. package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
  161. package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
  162. package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
  163. package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
  164. package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BiIraXZZ.js} +2 -2
  165. package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BiIraXZZ.js.map} +1 -1
  166. package/dist/code-snippet.js +1 -1
  167. package/dist/country.js +3 -3
  168. package/dist/dashboard-template.js +1 -1
  169. package/dist/dashed-underline.js +1 -1
  170. package/dist/data-grid-template.js +1 -1
  171. package/dist/data-grid.js +1 -1
  172. package/dist/date-picker.js +2 -2
  173. package/dist/date-range-picker.js +2 -2
  174. package/dist/draggable-handle.js +51 -44
  175. package/dist/draggable-handle.js.map +1 -1
  176. package/dist/dropdown.js +4 -4
  177. package/dist/file-uploader.js +1 -1
  178. package/dist/filter-bar.js +1 -1
  179. package/dist/form-layout.js +1 -1
  180. package/dist/header-with-views.js +1 -1
  181. package/dist/header.js +1 -1
  182. package/dist/index.js +205 -203
  183. package/dist/index.js.map +1 -1
  184. package/dist/info-icon.js +1 -1
  185. package/dist/input-field-password.js +1 -1
  186. package/dist/input-field-phone-number.js +1 -1
  187. package/dist/input-field.js +1 -1
  188. package/dist/input-time.js +5 -0
  189. package/dist/input-time.js.map +1 -0
  190. package/dist/inspector.js +1 -1
  191. package/dist/internal.js +12 -12
  192. package/dist/list.js +1 -1
  193. package/dist/menu.js +1 -1
  194. package/dist/modal-fullscreen.js +1 -1
  195. package/dist/modal.js +2 -2
  196. package/dist/pagination.js +1 -1
  197. package/dist/popover.js +1 -1
  198. package/dist/promo-banner.js +1 -1
  199. package/dist/radio-group.js +1 -1
  200. package/dist/rich-text-editor.js +1 -1
  201. package/dist/search-bar.js +2 -2
  202. package/dist/secondary-nav.js +1 -1
  203. package/dist/segmented-control.js +1 -1
  204. package/dist/selection-card.js +1 -1
  205. package/dist/sidepanel.js +1 -1
  206. package/dist/stepper.js +1 -1
  207. package/dist/structured-list.js +1 -1
  208. package/dist/summary-grid.js +1 -1
  209. package/dist/tabs.js +1 -1
  210. package/dist/tag.js +1 -1
  211. package/dist/textarea.js +1 -1
  212. package/dist/timeline.js +1 -1
  213. package/dist/toast.js +1 -1
  214. package/dist/tutorial.js +1 -1
  215. package/dist/web-types.json +1 -1
  216. package/package.json +4 -4
  217. package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
  218. package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
  219. package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
  220. package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
  221. package/dist/chunks/card.CoxQ_L0w.js +0 -216
  222. package/dist/chunks/chip.CdgpQyXN.js +0 -65
  223. package/dist/chunks/copy.C2kQ1PbI.js +0 -107
  224. package/dist/chunks/country.types.DjpMGz7a.js +0 -19
  225. package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
  226. package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
  227. package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
  228. package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
  229. package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
  230. package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
  231. package/dist/chunks/error-message.DCgo8q20.js +0 -143
  232. package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
  233. package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
  234. package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
  235. package/dist/chunks/pagination.dpVc6Yt0.js +0 -401
  236. package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
  237. package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
  238. package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
  239. package/dist/chunks/step.BlwoLfdw.js +0 -259
  240. package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
  241. package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
  242. package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
  243. package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, useAttrs as ne, useSlots as Q, ref as X, computed as i, watch as se, nextTick as H, openBlock as l, createElementBlock as d, withKeys as h, normalizeClass as K, createVNode as E, unref as o, withCtx as M, mergeProps as f, Fragment as P, renderSlot as x, normalizeProps as U, createTextVNode as R, toDisplayString as C, renderList as Z, createElementVNode as ee, createCommentVNode as F, withModifiers as j, createBlock as W, toHandlers as de, createSlots as re, withDirectives as J, vShow as G, guardReactiveProps as ie } from "vue";
1
+ import { defineComponent as k, useAttrs as ne, useSlots as X, ref as Q, computed as i, watch as se, nextTick as H, openBlock as l, createElementBlock as r, withKeys as g, normalizeClass as K, createVNode as E, unref as o, withCtx as M, mergeProps as f, Fragment as P, renderSlot as x, normalizeProps as U, createTextVNode as R, toDisplayString as C, renderList as Z, createElementVNode as ee, createCommentVNode as F, withModifiers as j, createBlock as W, toHandlers as re, createSlots as de, withDirectives as G, vShow as J, guardReactiveProps as ie } from "vue";
2
2
  import { g as ue } from "./generate-uid.DBWe4g6T.js";
3
3
  import { u as ce } from "./index.B875RXHM.js";
4
4
  import { u as pe } from "./use-has-slot.CyMiImRQ.js";
@@ -10,18 +10,25 @@ import { s as q } from "./events.BQOQSSb7.js";
10
10
  import { C as me } from "./chevron-down.XeE-LBV_.js";
11
11
  import { C as ve } from "./chevron-up.Cmgl2a3x.js";
12
12
  import "../assets/dropdown-default-textbox.css";
13
- var ae = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(ae || {}), b = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(b || {}), r = /* @__PURE__ */ ((e) => (e.OPEN = "dropdown-base-open", e.KEYDOWN = "dropdown-base-keydown", e.CLOSE = "dropdown-base-close", e.INPUT = "dropdown-base-input", e.CLEAR = "dropdown-base-clear", e))(r || {});
13
+ var ae = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(ae || {}), b = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(b || {}), d = /* @__PURE__ */ ((e) => (e.OPEN = "dropdown-base-open", e.KEYDOWN = "dropdown-base-keydown", e.CLOSE = "dropdown-base-close", e.INPUT = "dropdown-base-input", e.CLEAR = "dropdown-base-clear", e))(d || {});
14
14
  const le = {
15
+ "de-DE": { clearSearch: "Suche löschen" },
16
+ "en-GB": { clearSearch: "Clear search" },
15
17
  "en-US": { clearSearch: "Clear search" },
18
+ "es-ES": { clearSearch: "Borrar búsqueda" },
19
+ "es-MX": { clearSearch: "Borrar búsqueda" },
20
+ "fr-FR": { clearSearch: "Effacer la recherche" },
21
+ "it-IT": { clearSearch: "Cancella ricerca" },
16
22
  "ja-JP": { clearSearch: "検索をクリア" },
17
- "pt-BR": { clearSearch: "Limpar busca" }
18
- }, xe = ["id", "value", "disabled", "readonly", "required"], we = ["id", "aria-readonly", "tabindex"], Se = {
23
+ "pt-BR": { clearSearch: "Limpar busca" },
24
+ "zh-CN": { clearSearch: "清除搜索" }
25
+ }, xe = ["id", "value", "disabled", "readonly", "required"], Se = ["id", "aria-readonly", "tabindex"], he = {
19
26
  key: 1,
20
27
  class: "b-dropdown-base-textbox__input-multiple-selected"
21
- }, Ie = { class: "b-dropdown-base-textbox__input-selected-element" }, ge = {
28
+ }, we = { class: "b-dropdown-base-textbox__input-selected-element" }, Ie = {
22
29
  key: 2,
23
30
  class: "b-dropdown-base-textbox__additional-items"
24
- }, he = {
31
+ }, ge = {
25
32
  key: 3,
26
33
  class: "b-dropdown-base-textbox__icon",
27
34
  "aria-hidden": "true"
@@ -115,15 +122,15 @@ const le = {
115
122
  }
116
123
  },
117
124
  setup(e, { expose: D, emit: L }) {
118
- const { t: c } = ce({ messages: le }), y = ne(), n = Q(), m = pe(n), t = e, p = L, u = X(null), w = ue("textbox"), N = i(() => ({
125
+ const { t: c } = ce({ messages: le }), y = ne(), n = X(), m = pe(n), t = e, p = L, u = Q(null), S = ue("textbox"), N = i(() => ({
119
126
  [`b-dropdown-base-textbox--${b.DISABLED}`]: t.disabled,
120
127
  [`b-dropdown-base-textbox--${b.READONLY}`]: t.readonly,
121
128
  [`b-dropdown-base-textbox--${b.HAS_ITEMS}`]: !!t.additionalItemsSelected
122
- })), _ = i(
129
+ })), B = i(
123
130
  () => v.value && y["aria-required"] ? "true" : null
124
- ), A = i(() => ({
131
+ ), _ = i(() => ({
125
132
  "b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
126
- })), S = i(() => t.dynamicFiltering && !!t.value && t.open), B = i(
133
+ })), h = i(() => t.dynamicFiltering && !!t.value && t.open), A = i(
127
134
  () => ({
128
135
  "aria-haspopup": "listbox",
129
136
  "aria-controls": t.ariaControls,
@@ -137,7 +144,7 @@ const le = {
137
144
  })
138
145
  ), a = i(
139
146
  () => t.multiple ? t.selectedValueItem : []
140
- ), v = i(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), T = i(() => t.selectedValueItem && !t.multiple), I = i(
147
+ ), v = i(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), T = i(() => t.selectedValueItem && !t.multiple), w = i(
141
148
  () => t.multiple && t.selectedValueItem && a.value.length > 0 && t.showSlotContentInMultiple
142
149
  );
143
150
  se(
@@ -149,23 +156,23 @@ const le = {
149
156
  }
150
157
  );
151
158
  const O = async () => {
152
- !t.disabled && !t.readonly && (p(r.OPEN), await H(), u.value.focus());
159
+ !t.disabled && !t.readonly && (p(d.OPEN), await H(), u.value.focus());
153
160
  }, Y = () => {
154
- t.open && (u.value.focus(), p(r.CLOSE));
161
+ t.open && (u.value.focus(), p(d.CLOSE));
155
162
  }, z = (s) => t.open && s.target.tagName === "INPUT" ? null : t.open ? Y() : O(), V = () => {
156
- p(r.CLEAR), p(r.INPUT, ""), u.value.focus();
163
+ p(d.CLEAR), p(d.INPUT, ""), u.value.focus();
157
164
  }, oe = (s) => {
158
- !t.readonly && !t.disabled ? p(r.INPUT, s.target.value) : (s.preventDefault(), s.stopPropagation());
165
+ !t.readonly && !t.disabled ? p(d.INPUT, s.target.value) : (s.preventDefault(), s.stopPropagation());
159
166
  };
160
167
  return D({
161
168
  focus: () => {
162
169
  u.value.focus();
163
170
  }
164
- }), (s, $) => (l(), d("div", {
171
+ }), (s, $) => (l(), r("div", {
165
172
  class: K(s.$attrs.class),
166
173
  "data-testid": "textbox-wrapper",
167
174
  onClick: z,
168
- onKeydown: h(Y, ["escape"])
175
+ onKeydown: g(Y, ["escape"])
169
176
  }, [
170
177
  E(o(be), {
171
178
  class: K(["b-dropdown-base-textbox", N.value]),
@@ -173,8 +180,8 @@ const le = {
173
180
  "data-testid": "base-textbox"
174
181
  }, {
175
182
  default: M(() => [
176
- v.value ? (l(), d("input", f({ key: 0 }, B.value, {
177
- id: o(w),
183
+ v.value ? (l(), r("input", f({ key: 0 }, A.value, {
184
+ id: o(S),
178
185
  ref_key: "textbox",
179
186
  ref: u,
180
187
  class: "b-dropdown-base-textbox__input",
@@ -185,53 +192,53 @@ const le = {
185
192
  value: e.open ? e.value : e.displayValue,
186
193
  disabled: e.disabled ? !0 : null,
187
194
  readonly: e.readonly,
188
- required: _.value,
195
+ required: B.value,
189
196
  onKeydown: [
190
- $[0] || ($[0] = (g) => s.$emit(o(r).KEYDOWN, g)),
191
- h(z, ["enter"])
197
+ $[0] || ($[0] = (I) => s.$emit(o(d).KEYDOWN, I)),
198
+ g(z, ["enter"])
192
199
  ],
193
200
  onInput: oe
194
- }), null, 16, xe)) : (l(), d("div", f({
201
+ }), null, 16, xe)) : (l(), r("div", f({
195
202
  key: 1,
196
- id: o(w)
197
- }, B.value, {
203
+ id: o(S)
204
+ }, A.value, {
198
205
  ref_key: "textbox",
199
206
  ref: u,
200
- class: ["b-dropdown-base-textbox__input", A.value],
207
+ class: ["b-dropdown-base-textbox__input", _.value],
201
208
  "aria-readonly": e.readonly ? "true" : null,
202
209
  role: "combobox",
203
210
  tabindex: e.disabled ? -1 : 0
204
211
  }), [
205
- T.value ? (l(), d(P, { key: 0 }, [
212
+ T.value ? (l(), r(P, { key: 0 }, [
206
213
  o(m)("display-value") ? x(s.$slots, "display-value", U(f({ key: 0 }, e.selectedValueItem)), void 0, !0) : x(s.$slots, "default", U(f({ key: 1 }, e.selectedValueItem)), () => [
207
214
  R(C(e.displayValue), 1)
208
215
  ], !0)
209
- ], 64)) : I.value ? (l(), d("div", Se, [
210
- (l(!0), d(P, null, Z(a.value, (g) => (l(), d("div", {
211
- key: g.value
216
+ ], 64)) : w.value ? (l(), r("div", he, [
217
+ (l(!0), r(P, null, Z(a.value, (I) => (l(), r("div", {
218
+ key: I.value
212
219
  }, [
213
- ee("div", Ie, [
214
- x(s.$slots, "default", f({ ref_for: !0 }, g), () => [
220
+ ee("div", we, [
221
+ x(s.$slots, "default", f({ ref_for: !0 }, I), () => [
215
222
  R(C(e.displayValue), 1)
216
223
  ], !0)
217
224
  ])
218
225
  ]))), 128))
219
- ])) : (l(), d(P, { key: 2 }, [
226
+ ])) : (l(), r(P, { key: 2 }, [
220
227
  R(C(e.displayValue), 1)
221
228
  ], 64))
222
- ], 16, we)),
223
- e.additionalItemsSelected ? (l(), d("span", ge, C(e.additionalItemsSelected), 1)) : F("", !0),
224
- o(m)("icon") && !S.value ? (l(), d("span", he, [
229
+ ], 16, Se)),
230
+ e.additionalItemsSelected ? (l(), r("span", Ie, C(e.additionalItemsSelected), 1)) : F("", !0),
231
+ o(m)("icon") && !h.value ? (l(), r("span", ge, [
225
232
  x(s.$slots, "icon", {}, void 0, !0)
226
233
  ])) : F("", !0),
227
- S.value ? (l(), d("span", {
234
+ h.value ? (l(), r("span", {
228
235
  key: 4,
229
236
  class: "b-dropdown-base-textbox__clear-search",
230
237
  tabindex: e.disabled ? -1 : 0,
231
238
  "data-testid": "clear-search-button",
232
239
  onClick: j(V, ["stop"]),
233
- onKeydown: h(j(V, ["stop"]), ["enter"]),
234
- onKeyup: h(V, ["space"])
240
+ onKeydown: g(j(V, ["stop"]), ["enter"]),
241
+ onKeyup: g(V, ["space"])
235
242
  }, [
236
243
  e.size === o(ae).SMALL ? (l(), W(o(ye), {
237
244
  key: 0,
@@ -249,7 +256,7 @@ const le = {
249
256
  }), De = /* @__PURE__ */ te(ke, [["__scopeId", "data-v-c9de8fe1"]]), Le = { class: "b-dropdown-default-textbox__chevron" }, Ne = k({
250
257
  name: "dropdown-default-textbox",
251
258
  inheritAttrs: !1
252
- }), _e = /* @__PURE__ */ k({
259
+ }), Be = /* @__PURE__ */ k({
253
260
  ...Ne,
254
261
  props: {
255
262
  /**
@@ -338,7 +345,7 @@ const le = {
338
345
  },
339
346
  emits: ["clear", "close", "input", "keydown", "open"],
340
347
  setup(e, { expose: D, emit: L }) {
341
- const c = L, y = Q(), n = e, m = X(null), t = i(() => ({
348
+ const c = L, y = X(), n = e, m = Q(null), t = i(() => ({
342
349
  [`b-dropdown-default-textbox--${b.ERROR}`]: !n.disabled && !n.readonly && n.isInvalid,
343
350
  [`b-dropdown-default-textbox--${b.DISABLED}`]: n.disabled,
344
351
  [`b-dropdown-default-textbox--${b.READONLY}`]: n.readonly,
@@ -346,26 +353,26 @@ const le = {
346
353
  "b-dropdown-default-textbox--condensed": n.condensed
347
354
  })), p = i(() => n.open && !n.disabled && !n.readonly), u = (a) => {
348
355
  c("input", a);
349
- }, w = (a) => {
356
+ }, S = (a) => {
350
357
  c("keydown", a);
351
358
  }, N = (a) => {
352
359
  q(a), c("open");
353
- }, _ = (a) => {
360
+ }, B = (a) => {
354
361
  q(a), c("close");
355
- }, A = (a) => {
362
+ }, _ = (a) => {
356
363
  q(a), c("clear");
357
- }, S = {
358
- [r.INPUT]: u,
359
- [r.OPEN]: N,
360
- [r.CLOSE]: _,
361
- [r.CLEAR]: A,
362
- [r.KEYDOWN]: w
364
+ }, h = {
365
+ [d.INPUT]: u,
366
+ [d.OPEN]: N,
367
+ [d.CLOSE]: B,
368
+ [d.CLEAR]: _,
369
+ [d.KEYDOWN]: S
363
370
  };
364
371
  return D({
365
372
  focus: () => {
366
373
  m.value.focus();
367
374
  }
368
- }), (a, v) => (l(), d("div", {
375
+ }), (a, v) => (l(), r("div", {
369
376
  class: K(["b-dropdown-default-textbox", t.value]),
370
377
  "data-testid": "default-textbox"
371
378
  }, [
@@ -375,34 +382,34 @@ const le = {
375
382
  }, { ...a.$attrs, ...a.$props }, {
376
383
  class: "b-dropdown-default-textbox__textbox",
377
384
  value: e.value
378
- }, de(S)), re({
385
+ }, re(h)), de({
379
386
  icon: M(() => [
380
387
  ee("div", Le, [
381
- J(E(o(ve), { "svg-title": "opened" }, null, 512), [
382
- [G, p.value]
388
+ G(E(o(ve), { "svg-title": "opened" }, null, 512), [
389
+ [J, p.value]
383
390
  ]),
384
- J(E(o(me), { "svg-title": "closed" }, null, 512), [
385
- [G, !p.value]
391
+ G(E(o(me), { "svg-title": "closed" }, null, 512), [
392
+ [J, !p.value]
386
393
  ])
387
394
  ])
388
395
  ]),
389
396
  _: 2
390
397
  }, [
391
- Z(o(y), (T, I) => ({
392
- name: I,
398
+ Z(o(y), (T, w) => ({
399
+ name: w,
393
400
  fn: M((O) => [
394
- x(a.$slots, I, U(ie(O ?? {})), void 0, !0)
401
+ x(a.$slots, w, U(ie(O ?? {})), void 0, !0)
395
402
  ])
396
403
  }))
397
404
  ]), 1040, ["value"])
398
405
  ], 2));
399
406
  }
400
- }), Te = /* @__PURE__ */ te(_e, [["__scopeId", "data-v-c3e3ce21"]]);
407
+ }), Te = /* @__PURE__ */ te(Be, [["__scopeId", "data-v-c3e3ce21"]]);
401
408
  export {
402
409
  ae as B,
403
410
  Te as D,
404
411
  b as a,
405
- r as b,
412
+ d as b,
406
413
  De as c
407
414
  };
408
- //# sourceMappingURL=dropdown-default-textbox.bq9AlGzJ.js.map
415
+ //# sourceMappingURL=dropdown-default-textbox.aYsTZDZ7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.bq9AlGzJ.js","sources":["../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits<{\n /**\n * Emitted on clearing the input.\n */\n (e: 'clear');\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: 'close');\n\n /**\n * Emitted on input event.\n */\n (e: 'input', newInput: string);\n\n /**\n * Emitted on keydown event.\n */\n (e: 'keydown', keydownEvent: KeyboardEvent);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: 'open');\n }>();\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","textbox","ref","textboxId","generateUid","conditionalClasses","computed","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","ariaAttributes","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","__expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;AA8HO,IAAAA,KAAA,kBAAAC,OACHA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,MAAA,CAAA,CAAA,GCpDLE,IAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;mCC0QRE,KAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,GAAA;AAAA,EACV,MAAA;AAAA,EACX,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5PA,UAAA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,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AN,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAE,EAAA,MAAA,MAAA;AAAA,MAAwB;AAAA,IAIxB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.aYsTZDZ7.js","sources":["../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits<{\n /**\n * Emitted on clearing the input.\n */\n (e: 'clear');\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: 'close');\n\n /**\n * Emitted on input event.\n */\n (e: 'input', newInput: string);\n\n /**\n * Emitted on keydown event.\n */\n (e: 'keydown', keydownEvent: KeyboardEvent);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: 'open');\n }>();\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","textbox","ref","textboxId","generateUid","conditionalClasses","computed","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","ariaAttributes","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","__expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;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AAA,QAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEA8B,IAAA,CAAAC,MAAA;AACI,MAAA7B,EAAA,SAAA6B,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAA/B,EAAA,WAAA+B,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACA/B,EAAA,MAAA;AAAA,IAAW,GAEfkC,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACA/B,EAAA,OAAA;AAAA,IAAY,GAEhBmC,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACA/B,EAAA,OAAA;AAAA,IAAY,GAGhBoC,IAAA;AAAA,MAAkB,CAAAnD,EAAA,KAAA,GAAA2C;AAAA,MACoB,CAAA3C,EAAA,IAAA,GAAA+C;AAAA,MACD,CAAA/C,EAAA,KAAA,GAAAiD;AAAA,MACC,CAAAjD,EAAA,KAAA,GAAAkD;AAAA,MACA,CAAAlD,EAAA,OAAA,GAAA6C;AAAA,IACE;AAOxC,WAAAN,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAE,EAAA,MAAA,MAAA;AAAA,MAAwB;AAAA,IAIxB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as u, computed as C, openBlock as w, createElementBlock as $, createVNode as l, mergeProps as b, withCtx as f, unref as d, toRefs as I, createTextVNode as g, toDisplayString as U, ref as V, watch as x, createBlock as O, createElementVNode as k, createCommentVNode as E } from "vue";
2
2
  import { B as P } from "./avatar.Caeba-pw.js";
3
- import { B as m, u as R } from "./dropdown.MhmX1P9o.js";
3
+ import { B as m, u as R } from "./dropdown.Do-mZiI6.js";
4
4
  import { u as B } from "./form-field.D_2g7vaP.js";
5
5
  import { d as _, B as D } from "./typography.B3J6_tYk.js";
6
- import { u as N } from "./use-country-items.D_3LBe2I.js";
7
- import { a as M } from "./country.types.DjpMGz7a.js";
8
- import { L as S } from "./listbox-option-tag.Cvplth7d.js";
6
+ import { u as N } from "./use-country-items.Dp7X1r2e.js";
7
+ import { a as M } from "./country.types.6a7xxZIR.js";
8
+ import { L as S } from "./listbox-option-tag.CVxaZqbc.js";
9
9
  import { B as T } from "./payment-method.AeKHZlAO.js";
10
10
  import { _ as A } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
11
  import "../assets/dropdown-tag.css";
@@ -294,4 +294,4 @@ export {
294
294
  de as c,
295
295
  le as d
296
296
  };
297
- //# sourceMappingURL=dropdown-tag.Ysrac5GN.js.map
297
+ //# sourceMappingURL=dropdown-tag.B7OA_Yv9.js.map