@adyen/bento-vue2 1.89.2 → 1.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +198 -80
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-time.css +1 -0
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/secondary-nav.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +3 -3
  23. package/dist/card.js +1 -1
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.js +1 -1
  26. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  27. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  28. package/dist/chunks/action-bar.B63qIiiH.js +334 -0
  29. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.B63qIiiH.js.map} +1 -1
  30. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  31. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  32. package/dist/chunks/ai-tag.CCJCOdXu.js +110 -0
  33. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.CCJCOdXu.js.map} +1 -1
  34. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  35. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  36. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  37. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  38. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.DpmeDmq-.js} +103 -66
  39. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.DpmeDmq-.js.map} +1 -1
  40. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.ChTUOsZl.js} +2 -2
  41. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.ChTUOsZl.js.map} +1 -1
  42. package/dist/chunks/{button-actions.BLk114As.js → button-actions.BmU1DngD.js} +221 -147
  43. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.BmU1DngD.js.map} +1 -1
  44. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  45. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  46. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.uvIGF_jU.js} +283 -209
  47. package/dist/chunks/{calendar.CXKhBF2f.js.map → calendar.uvIGF_jU.js.map} +1 -1
  48. package/dist/chunks/card.WWUfBkqf.js +165 -0
  49. package/dist/chunks/{card.GjhsXOT0.js.map → card.WWUfBkqf.js.map} +1 -1
  50. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.CI0xDnql.js} +4 -4
  51. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.CI0xDnql.js.map} +1 -1
  52. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.TsWA6O3Z.js} +93 -56
  53. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.TsWA6O3Z.js.map} +1 -1
  54. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  55. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  56. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.4DX9iUV8.js} +133 -76
  57. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.4DX9iUV8.js.map} +1 -1
  58. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.D_KE99mg.js} +2 -2
  59. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.D_KE99mg.js.map} +1 -1
  60. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  61. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  62. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  63. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  64. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  65. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  66. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.TWlLdQHG.js} +3 -3
  67. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.TWlLdQHG.js.map} +1 -1
  68. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.CpDuQ3Fo.js} +3 -3
  69. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.CpDuQ3Fo.js.map} +1 -1
  70. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.DZaE-kOS.js} +4 -4
  71. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.DZaE-kOS.js.map} +1 -1
  72. package/dist/chunks/data-grid.x6cEW0az.js +4069 -0
  73. package/dist/chunks/data-grid.x6cEW0az.js.map +1 -0
  74. package/dist/chunks/date-picker.Dln8ocL4.js +222 -0
  75. package/dist/chunks/{date-picker.CnazYcSX.js.map → date-picker.Dln8ocL4.js.map} +1 -1
  76. package/dist/chunks/date-range-picker.DPGy2h-9.js +1068 -0
  77. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +1 -0
  78. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  79. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  80. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js → dropdown-default-textbox.CjhLIxVq.js} +63 -36
  81. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js.map → dropdown-default-textbox.CjhLIxVq.js.map} +1 -1
  82. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.t3FlJUSy.js} +5 -5
  83. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.t3FlJUSy.js.map} +1 -1
  84. package/dist/chunks/{dropdown.Ct7uhPr6.js → dropdown.CvNI2V33.js} +329 -235
  85. package/dist/chunks/{dropdown.Ct7uhPr6.js.map → dropdown.CvNI2V33.js.map} +1 -1
  86. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  87. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  88. package/dist/chunks/error-message.BUNKRa_w.js +160 -0
  89. package/dist/chunks/{error-message.RxdStT3S.js.map → error-message.BUNKRa_w.js.map} +1 -1
  90. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.Cig5gDXT.js} +749 -468
  91. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.Cig5gDXT.js.map} +1 -1
  92. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.x445KK3y.js} +1301 -761
  93. package/dist/chunks/{filter-bar.zD_ctViU.js.map → filter-bar.x445KK3y.js.map} +1 -1
  94. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  95. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CIkul1OD.js} +3 -3
  97. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CIkul1OD.js.map} +1 -1
  98. package/dist/chunks/{form-layout-title.Bw7VgOO5.js → form-layout-title.DR5M7GP3.js} +77 -48
  99. package/dist/chunks/{form-layout-title.Bw7VgOO5.js.map → form-layout-title.DR5M7GP3.js.map} +1 -1
  100. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.BC5fdpD1.js} +127 -73
  101. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.BC5fdpD1.js.map} +1 -1
  102. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.-cvdi9-L.js} +1120 -679
  103. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.-cvdi9-L.js.map} +1 -1
  104. package/dist/chunks/{header.DkC-KKWa.js → header.DtmZjxiU.js} +3 -3
  105. package/dist/chunks/{header.DkC-KKWa.js.map → header.DtmZjxiU.js.map} +1 -1
  106. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  107. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  108. package/dist/chunks/input-field-password.Bdlw4dzr.js +381 -0
  109. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.Bdlw4dzr.js.map} +1 -1
  110. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.DPuWxBBz.js} +98 -71
  111. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.DPuWxBBz.js.map} +1 -1
  112. package/dist/chunks/input-field.DH25CU_G.js +207 -0
  113. package/dist/chunks/{input-field.m1PMwa4C.js.map → input-field.DH25CU_G.js.map} +1 -1
  114. package/dist/chunks/input-time.6eJ4-QdU.js +92 -0
  115. package/dist/chunks/input-time.6eJ4-QdU.js.map +1 -0
  116. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  117. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  118. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  119. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  120. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  121. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  123. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.CaxuXW-H.js} +63 -36
  125. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.CaxuXW-H.js.map} +1 -1
  126. package/dist/chunks/{modal.o0KddMiG.js → modal.Brif0vAy.js} +63 -36
  127. package/dist/chunks/{modal.o0KddMiG.js.map → modal.Brif0vAy.js.map} +1 -1
  128. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.BmrU_sn_.js} +221 -99
  129. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.BmrU_sn_.js.map} +1 -1
  130. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  131. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  132. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.5oS-AeYN.js} +4 -4
  133. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.5oS-AeYN.js.map} +1 -1
  134. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.DSGTe8Zt.js} +1781 -1731
  135. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.DSGTe8Zt.js.map} +1 -1
  136. package/dist/chunks/search-bar.CNfoeLLt.js +126 -0
  137. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.CNfoeLLt.js.map} +1 -1
  138. package/dist/chunks/secondary-nav.IF5CgeIP.js +226 -0
  139. package/dist/chunks/secondary-nav.IF5CgeIP.js.map +1 -0
  140. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  141. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  142. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.DZjFeQKR.js} +10 -10
  143. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.DZjFeQKR.js.map} +1 -1
  144. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.DZDXuyzg.js} +66 -39
  145. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.DZDXuyzg.js.map} +1 -1
  146. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  147. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  148. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  149. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  150. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.CrPNQbX0.js} +5 -5
  151. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.CrPNQbX0.js.map} +1 -1
  152. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  153. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  154. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  155. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  156. package/dist/chunks/textarea.Bi53QF5Q.js +218 -0
  157. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.Bi53QF5Q.js.map} +1 -1
  158. package/dist/chunks/timeline-item.C6Bi0eam.js +322 -0
  159. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.C6Bi0eam.js.map} +1 -1
  160. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  161. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  162. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  163. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  164. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.BCiZMLJE.js} +190 -103
  165. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.BCiZMLJE.js.map} +1 -1
  166. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.Bn3Y8Iuq.js} +490 -359
  167. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js.map → use-cached-selected-values.Bn3Y8Iuq.js.map} +1 -1
  168. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  169. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  170. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  171. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  172. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.DRMt9yR2.js} +2 -2
  173. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.DRMt9yR2.js.map} +1 -1
  174. package/dist/code-snippet.js +1 -1
  175. package/dist/country.js +3 -3
  176. package/dist/dashboard-template.js +1 -1
  177. package/dist/dashed-underline.js +1 -1
  178. package/dist/data-grid-template.js +1 -1
  179. package/dist/data-grid.js +1 -1
  180. package/dist/date-picker.js +2 -2
  181. package/dist/date-range-picker.js +2 -2
  182. package/dist/draggable-handle.js +160 -73
  183. package/dist/draggable-handle.js.map +1 -1
  184. package/dist/dropdown.js +4 -4
  185. package/dist/empty-state.js +1 -1
  186. package/dist/file-uploader.js +1 -1
  187. package/dist/filter-bar.js +1 -1
  188. package/dist/form-layout.js +1 -1
  189. package/dist/header-with-views.js +1 -1
  190. package/dist/header.js +1 -1
  191. package/dist/index.js +215 -213
  192. package/dist/index.js.map +1 -1
  193. package/dist/info-icon.js +1 -1
  194. package/dist/input-field-password.js +1 -1
  195. package/dist/input-field-phone-number.js +1 -1
  196. package/dist/input-field.js +1 -1
  197. package/dist/input-time.js +5 -0
  198. package/dist/input-time.js.map +1 -0
  199. package/dist/inspector.js +1 -1
  200. package/dist/internal.js +12 -12
  201. package/dist/link.js +1 -1
  202. package/dist/list.js +1 -1
  203. package/dist/menu.js +1 -1
  204. package/dist/modal-fullscreen.js +1 -1
  205. package/dist/modal.js +2 -2
  206. package/dist/pagination.js +1 -1
  207. package/dist/popover.js +1 -1
  208. package/dist/promo-banner.js +1 -1
  209. package/dist/radio-group.js +1 -1
  210. package/dist/rich-text-editor.js +1 -1
  211. package/dist/search-bar.js +2 -2
  212. package/dist/secondary-nav.js +1 -1
  213. package/dist/segmented-control.js +1 -1
  214. package/dist/selection-card.js +1 -1
  215. package/dist/sidepanel.js +1 -1
  216. package/dist/stepper.js +1 -1
  217. package/dist/structured-list.js +1 -1
  218. package/dist/summary-grid.js +1 -1
  219. package/dist/tabs.js +1 -1
  220. package/dist/tag.js +1 -1
  221. package/dist/textarea.js +1 -1
  222. package/dist/timeline.js +1 -1
  223. package/dist/toast.js +1 -1
  224. package/dist/tutorial.js +1 -1
  225. package/dist/web-types.json +198 -1
  226. package/package.json +9 -9
  227. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  228. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  229. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  230. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  231. package/dist/chunks/card.GjhsXOT0.js +0 -128
  232. package/dist/chunks/chip.DTpENaGC.js +0 -57
  233. package/dist/chunks/copy.BVGQcf22.js +0 -86
  234. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  235. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  236. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  237. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  238. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  239. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  240. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  241. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  242. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  243. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  244. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  245. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  246. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  247. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  248. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  249. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  250. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  251. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  252. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  253. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  254. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  255. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.Ct7uhPr6.js","sources":["../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../ui-assets/icons-16/dist/vue/chevron-down-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/input-field/input-field.keys.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["import { computed, ref, type Ref, watch } from 'vue';\nimport { BentoListboxEvent, type BentoListboxOptions } from '@/types/listbox';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue The selectedValue property passed into the dropdown options container component.\n * @param multiple The multiple property passed into the dropdown options container component.\n * @param isOpen The isOpen property passed into the dropdown options container component.\n * @param emit The emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxOptions>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxOptions) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxOptions) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n onOutsideDropdownClick,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n v-if=\"isDropdownOpen\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n type BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptions,\n } from '@/types/listbox';\n import { PopperContainer } from '@/components/popper-container';\n import {\n type BentoDropdownEmptyStateProps,\n type BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n type BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits([]);\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} 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: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\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: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are lazy loading.\n */\n loading: { 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 container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n\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: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return props?.multiple\n ? ({\n actionsLayout: 'space-between',\n ariaLabel: props.ariaLabel,\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props']);\n });\n\n defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n :size=\"BentoDropdownSize.SMALL\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import { type Booleanish } from '@/types/prop-types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n import { stopEventPropagation } from '@/utils/ts/events';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\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: { 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 * 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 const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\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 in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed, type Ref } from 'vue';\nimport { type UseDisplayValueOptions } from './use-display-value.types';\nimport { type BentoListboxOptions } from '@/types/listbox';\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = (selectedValues: Ref<BentoListboxOptions>, items: Ref<BentoListboxOptions>) =>\n items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValues.value.find(selectedOption => selectedOption.value === categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.displayValue ?? option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue }) => acc.push(displayValue ?? label));\n }\n }\n\n // Non-category option\n if (selectedValues.value.find(selectedOption => selectedOption.value === option.value)) {\n acc.push(option.displayValue ?? option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue = ({ items, placeholder, selectedValues, isMultiSelect }: UseDisplayValueOptions) => {\n const isCategoryMultilevel = computed(\n () => isMultiSelect.value && items.value.find(option => option.items?.length)\n );\n\n const computedDisplayValue = computed(() => {\n // If no value selected, return placeholder or nothing\n if (!selectedValues.value.length) {\n return placeholder.value || null;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect(selectedValues, items);\n }\n\n return selectedValues.value.map(({ label, displayValue }) => displayValue ?? label).join(', ');\n });\n\n return computedDisplayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, type Ref } from 'vue';\nimport {\n type UseListboxKeyboardNavigationOptions,\n type UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow Down\n * - Arrow Up\n * - Home key\n * - End key\n * - Space key\n * - Enter key\n * - Tab\n * - Escape key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const focusOnOption = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n items.value[index]?.focus();\n };\n\n const focusOnChip = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n\n const chips =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(\n 'button'\n );\n\n if (chips.length) {\n chips[index]?.focus();\n } else {\n focusOnOption(index);\n }\n };\n\n const setListboxFocusedIndex = (selectedIndex: number) => {\n return optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(\n selectedIndex\n );\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(0);\n focusOnOption(0);\n });\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(items.value.length - 1);\n focusOnOption(items.value.length - 1);\n });\n };\n\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n\n skipToLastOption();\n };\n\n const onHomeKey = () => {\n skipToFirstOption();\n };\n\n const onEndKey = () => {\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onEnterKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onTab = () => {\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.TAB]: onTab,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","import { computed, ref, type Ref, watch } from 'vue';\nimport { type BentoSearchBarItem } from './search-bar.types';\nimport { debounce } from '@/utils/ts/debounce';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @param {Function} searchEvent - Optional search event to trigger on search term change.\n * @param {Ref<Boolean>} ignoreGroups - Boolean that determines if search returns items with subitems\n * @param {Number} debounceTime - Optional debounce time for the search event.\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<Array<T>>,\n searchEvent?: (searchValue: string) => void,\n ignoreGroups?: Ref<boolean>,\n debounceTime?: number\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n if (ignoreGroups?.value && option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n const debouncedSearchEvent =\n searchEvent !== undefined ? debounce(() => searchEvent(searchTermRef.value), debounceTime ?? 300) : undefined;\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (debouncedSearchEvent !== undefined) {\n debouncedSearchEvent();\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\nexport const INPUT_FIELD_HINT_INJECTION_KEY = Symbol('input field hint injection key');\nexport const INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY = Symbol('input field parent component injection key');\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"computedSize\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :aria-controls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :aria-required=\"required\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :disabled=\"disabled\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"cachedSelectedListboxOptions\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n nextTick,\n type Ref,\n ref,\n toRef,\n toRefs,\n useAttrs,\n useSlots,\n watch,\n } from 'vue';\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useCachedSelectedValues, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import { BentoDropdownEvent, type BentoDropdownProps, BentoDropdownSize } from './dropdown.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types/listbox';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n description: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: null },\n condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n dynamicFiltering: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { type: Function, default: undefined },\n items: { default: () => [] },\n loading: { type: Boolean, default: false },\n componentLoading: { type: Boolean, default: false },\n lazyLoadType: { default: BentoListbox.props.lazyLoadType.default },\n multiple: { type: Boolean, default: false },\n search: { default: undefined },\n showSlotContentInMultiple: { type: Boolean, default: false },\n size: { default: null },\n staticCategories: { type: Boolean, default: false },\n value: { default: null },\n modelValue: { default: null },\n virtualScroll: { type: Boolean, default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const dropdownValue = computed(() => props.modelValue ?? props.value);\n\n const { cachedSelectedListboxOptions, cachedListboxSelectedValues, setCachedValues } = useCachedSelectedValues(\n toRef(props, 'items'),\n dropdownValue,\n toRef(props, 'multiple'),\n toRef(props, 'enableValueLabelPair')\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const ariaDescribedByAttribute = ref(attrs['aria-describedby']);\n const { ariaLabel, label } = toRefs(props);\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabel = useAriaLabel({\n // TODO: take ariaLabel ref away when aria-label prop is removed\n ariaLabel: ariaLabel.value || (ariaLabelAttribute as Ref<string>),\n label,\n defaultFallback: computedAriaLabelFallbackMessage,\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const computedSize = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\n }));\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const staticCategories = toRef(props, 'staticCategories');\n const filteredItems = useSearchBarFilter(\n searchTerm,\n items,\n props?.search?.searchEvent,\n staticCategories,\n props?.search?.debounceTime\n );\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n placeholder: toRef(props, 'placeholder'),\n isMultiSelect: toRef(props, 'multiple'),\n selectedValues: cachedSelectedListboxOptions,\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple && Array.isArray(dropdownValue.value)) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === dropdownValue.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category\n ? category.items.find(item => item.value === dropdownValue.value)\n : null;\n\n return selectedCategoryItem;\n }\n\n return props.items.find(({ value }) => value === dropdownValue.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = filteredItems.value.findIndex(({ value }) => {\n return props.enableValueLabelPair\n ? (dropdownValue.value as BentoListboxSelectedValueLabelPair).value === value\n : dropdownValue.value === value;\n });\n return index > -1 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedOptionRole = computed<BentoListboxItemRole>(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItemsCount = Array.isArray(dropdownValue.value) ? dropdownValue.value.length : 0;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n\n if (selectedItemsCount === 0) {\n return null;\n }\n\n // Display count always - show \"all\" only when is not external filtering (hasMoreItems = true)\n if (!props.hasMoreItems && total > 0 && total === selectedItemsCount) {\n return t('all');\n }\n\n return selectedItemsCount;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () =>\n [\n props.description ? descriptionId : null,\n ariaDescribedByAttribute.value,\n props.errorMessage ? errorId : null,\n ]\n .filter(Boolean)\n .join(' ') || null\n );\n\n const listboxRef = computed(() => optionsContainerRef.value?.$el as HTMLDivElement);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n filteredItems,\n computedOptionRole\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\n }\n };\n\n const onOptionSelected = async (selectedValue: BentoListboxOptions) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n setCachedValues(selectedValue);\n\n /**\n * Emit the value/label pair objects if enableValueLabelPair is enabled,\n * otherwise just emit the list of selected values (number or string)\n */\n emitValue(cachedListboxSelectedValues.value);\n\n // Focus the input after selection and dropdown has closed\n if (!props.multiple) {\n await nextTick();\n focus();\n }\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: visibleDomOptions,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdown \"value\" property',\n `The use of \"value\" prop in \"BentoDropdown\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n const focus = () => {\n inputContainerRef.value.focus();\n };\n\n watch(\n () => isDropdownOpen.value,\n (isOpen: boolean) => {\n if (isOpen) {\n emit('open');\n }\n }\n );\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\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(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","messages$1","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","baseTextbox","DropdownBaseTextboxState","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","DropdownBaseTextboxEvent","focus","categoryMultiSelect","selectedValues","items","acc","option","selectedCategoryOptions","categoryOption","selectedOption","label","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","focusOnOption","index","nextTick","focusOnChip","chips","_b","setListboxFocusedIndex","selectedIndex","skipToFirstOption","skipToLastOption","onArrowDown","event","onArrowUp","onHomeKey","onEndKey","onTab","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","debounceTime","searchTermRef","dataRef","findHits","searchTermLowerCased","options","debouncedSearchEvent","debounce","INPUT_FIELD_COMPONENT_INJECTION_KEY","INPUT_FIELD_HINT_INJECTION_KEY","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","emitValue","useFormFieldEmits","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","dropdownValue","cachedSelectedListboxOptions","cachedListboxSelectedValues","setCachedValues","useCachedSelectedValues","ariaLabelAttribute","ariaDescribedByAttribute","ariaLabel","computedAriaLabelFallbackMessage","computedAriaLabel","useAriaLabel","isInputComponent","BentoDropdownSize","inject","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","isSearching","selectedValueItem","value","category","categoryItem","item","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","isTreePattern","computedOptionRole","additionalItemsSelected","selectedItemsCount","total","ariaDescribedBy","listboxRef","visibleDomOptions","updateVisibleDomOptions","useVisibleDomOptions","clickOutsideDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GAkBOA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC,EAAAL,EAAA,KAAA,GACA,EAAA,GAAAM,EAAA,IAAAC,GAAA;AAEA,EAAAC,GAAAR,GAAA,MAAA;AACI,IAAAI,EAAA,QAAAJ,EAAA;AAAA,EAA4C,CAAA;AAIhD,QAAAS,IAAAC;AAAA,IAA8B,MAAA,KAAA,UAAAN,EAAA,KAAA,MAAA,KAAA,UAAAJ,EAAA,KAAA;AAAA,EAC8D,GAG5FW,IAAA,MAAA;AACI,IAAAR,EAAAS,EAAA,QAAAR,EAAA,KAAA,GACAD,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CC,IAAA,MAAA;AACI,IAAAT,EAAA,QAAAJ,EAAA,OACAG,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CE,IAAA,MAAA;AACI,IAAAZ,EAAA,SAAAD,EAAA,UACIG,EAAA,QAAAJ,EAAA;AAAA,EACJ,GAGJe,IAAAL,EAAA,MAAA;AAAA,IAA+B;AAAA,MAC3B,OAAAJ,EAAA,OAAA;AAAA,MACoB,OAAAK;AAAA,MACT,UAAAF,EAAA;AAAA,IACyB;AAAA,IACpC;AAAA,MACA,OAAAH,EAAA,QAAA;AAAA,MACqB,OAAAO;AAAA,IACV;AAAA,EACX,CAAA,GAIJG,IAAA,CAAAC,MAAA;AACI,IAAAb,EAAA,QAAAa,GAC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AAAC;AAAA,QACI,qBAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAhD;AAAA,QACA,mBAAAwG,EAAA1G,GAAA,kBAAA;AAAA,QACkD,OAAA6I;AAAA,QAC3C,YAAA7I,EAAA;AAAA,MACW;AAAA,MACtBqD;AAAA,MACA5B;AAAA,MACAE;AAAA,IACA,GAGJuH,KAAA3E;AAAA,MAA2C;AAAA,QACvC,mBAAAvB;AAAA,QACI,gBAAA9C;AAAA,MACA;AAAA,MACJyB;AAAA,IACA,GAGJwH,KAAA;AAAA,MAAyB,CAAArK,EAAA,cAAA,GAAA6C;AAAA,MACe,CAAA7C,EAAA,MAAA,GAAAI;AAAA,MACR,CAAAJ,EAAA,SAAA,GAAAU;AAAA,MACG,GAAA0J;AAAA,IAC5B;AAGP,IAAAlJ,EAAA,SACIoJ;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRpJ,EAAA,QACIoJ,EAAA,iCAAA,mDAAA,OAAA,GAGJpJ,EAAA,SACIoJ;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;AAIR,UAAAtH,IAAA,MAAA;AACI,MAAAkB,EAAA,MAAA,MAAA;AAAA,IAA8B;AAGlC,WAAAtE;AAAA,MAAA,MAAAwB,EAAA;AAAA,MACyB,CAAA9B,MAAA;AAEjB,QAAAA,KACIC,EAAA,MAAA;AAAA,MACJ;AAAA,IACJ,GAGJwC,EAAA;AAAA,MAAa,OAAAiB;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown.CvNI2V33.js","sources":["../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../../ui-assets/icons-16/dist/vue/chevron-down-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-up-small.vue","../../src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue","../../src/components/dropdown/composables/use-display-value.ts","../../src/components/dropdown/composables/use-keyboard-navigation.ts","../../src/components/search-bar/useSearchBarDataFilter.ts","../../src/components/input-field/input-field.keys.ts","../../src/components/dropdown/dropdown.vue"],"sourcesContent":["import { computed, ref, type Ref, watch } from 'vue';\nimport { BentoListboxEvent, type BentoListboxOptions } from '@/types/listbox';\nimport { BentoDropdownEvent } from '../../../dropdown.types';\nimport { useI18n } from '@/utils/ts/i18n';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * A composable that handles all dropdown options option selecting logic & listeners.\n * If single select dropdown then emits straight up to dropdown.\n * If multi select dropdown then stores selections in internal state and only emits when Apply button is pressed.\n *\n * @param selectedValue The selectedValue property passed into the dropdown options container component.\n * @param multiple The multiple property passed into the dropdown options container component.\n * @param isOpen The isOpen property passed into the dropdown options container component.\n * @param emit The emit function for the dropdown options container component.\n */\nexport const useDropdownOptionsListbox = (\n selectedValue: Ref<BentoListboxOptions>,\n multiple: Ref<boolean>,\n isOpen: Ref<boolean>,\n emit: (event: BentoListboxEvent | BentoDropdownEvent, selectedValue?: BentoListboxOptions) => void\n) => {\n const internalSelectedValue = ref(selectedValue.value);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n watch(selectedValue, () => {\n internalSelectedValue.value = selectedValue.value;\n });\n\n // Multi-select dropdown cancel and apply button logic\n const isApplyButtonDisabled = computed(\n () => JSON.stringify(internalSelectedValue.value) === JSON.stringify(selectedValue.value)\n );\n\n const onApplyClick = () => {\n emit(BentoListboxEvent.SELECT, internalSelectedValue.value);\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onCancelClick = () => {\n internalSelectedValue.value = selectedValue.value;\n emit(BentoDropdownEvent.CLOSE_DROPDOWN);\n };\n\n const onOutsideDropdownClick = () => {\n if (isOpen.value && multiple.value) {\n internalSelectedValue.value = selectedValue.value;\n }\n };\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onApplyClick,\n disabled: isApplyButtonDisabled.value,\n },\n {\n title: t('cancel') as string,\n event: onCancelClick,\n },\n ]);\n\n // Click and keyboard navigation event listners\n const onOptionSelected = (newSelectedValue: BentoListboxOptions) => {\n internalSelectedValue.value = newSelectedValue;\n if (!multiple.value) {\n emit(BentoDropdownEvent.SELECT, newSelectedValue);\n }\n };\n\n const onTabKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.TAB);\n };\n\n const onEnterKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.ENTER);\n };\n\n const onSpaceKey = (newSelectedValue: BentoListboxOptions) => {\n onOptionSelected(newSelectedValue);\n emit(BentoDropdownEvent.SPACE);\n };\n\n const onEscapeKey = () => {\n onCancelClick();\n emit(BentoListboxEvent.ESCAPE);\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const listeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n [BentoListboxEvent.TAB]: onTabKey,\n [BentoListboxEvent.SPACE]: onSpaceKey,\n [BentoListboxEvent.ENTER]: onEnterKey,\n };\n\n return {\n // Values\n actions,\n internalSelectedValue,\n\n // Methods\n listeners,\n onEscapeKey,\n onOutsideDropdownClick,\n };\n};\n","<template>\n <component\n :is=\"popperContainerOrPopoverComponent\"\n v-if=\"isDropdownOpen\"\n class=\"b-dropdown-options-container\"\n :class=\"conditionalClasses\"\n v-bind=\"popperContainerOrPopoverProps\"\n >\n <div @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :aria-label=\"ariaLabel\"\n class=\"b-dropdown-options-container__listbox\"\n :class=\"conditionalListboxClasses\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"items\"\n :selected-value=\"internalSelectedValue\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"searching\"\n :loading=\"loading\"\n :lazy-load-type=\"lazyLoadType\"\n :has-more-items=\"hasMoreItems\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRefs, useSlots } from 'vue';\n import { BentoListbox } from '@/internal';\n import {\n type BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptions,\n } from '@/types/listbox';\n import { PopperContainer } from '@/components/popper-container';\n import {\n type BentoDropdownEmptyStateProps,\n type BentoDropdownEvent,\n BentoDropdownLazyLoadType,\n type BentoDropdownVirtulisationOptions,\n } from '../../dropdown.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoPopover } from '@/components/popover';\n import { useDropdownOptionsListbox } from './composables/use-dropdown-options-listbox';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits([]);\n\n const props = defineProps({\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading: { type: Boolean, default: false },\n\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoDropdownEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Disables dropdown functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoDropdownIsOptionDisabled}\n * @param {BentoDropdownOptionItem} 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: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: undefined,\n },\n\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoDropdownOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\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: {\n type: String as PropType<BentoDropdownLazyLoadType | `${BentoDropdownLazyLoadType}`>,\n default: BentoDropdownLazyLoadType.AUTOMATIC,\n validator: (value: BentoDropdownLazyLoadType) => Object.values(BentoDropdownLazyLoadType).includes(value),\n },\n\n /**\n * Indicates if new options are lazy loading.\n */\n loading: { 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 container can be displayed.\n */\n open: { type: Boolean, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: null,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListbox.props.searching,\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Reference to the DOM element or Vue component for positioning\n * the Dropdown container.\n */\n targetElement: { type: PopperContainer.props.targetElement.type, required: true },\n\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: {\n type: [Boolean, Object] as PropType<BentoDropdownVirtulisationOptions>,\n default: false,\n },\n });\n\n const { selectedValue, multiple } = toRefs(props);\n const dropdownOptionsListboxRef = ref(null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isDropdownOpen = computed(() => props.open && !props.disabled);\n const noResultsMessage = computed(() => t('noOptionsMatchThisSearch') as string);\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown-options-container--single': !props?.multiple,\n }));\n\n const conditionalListboxClasses = computed(() => ({\n 'b-dropdown-options-container__listbox--single': !props?.multiple,\n }));\n\n const { actions, internalSelectedValue, listeners, onEscapeKey, onOutsideDropdownClick } =\n useDropdownOptionsListbox(selectedValue, multiple, isDropdownOpen, emit);\n\n // Use different components depending on if the dropdown is a single or multi-select\n const popperContainerOrPopoverComponent = computed(() => (props?.multiple ? BentoPopover : PopperContainer));\n\n const popperContainerOrPopoverProps = computed(() => {\n const containerMinAndMaxWidth = {\n 'min-width': `${(props?.targetElement as HTMLElement)?.clientWidth}px`,\n 'max-width': 'min(500px, 95%)',\n };\n\n return props?.multiple\n ? ({\n actionsLayout: 'space-between',\n ariaLabel: props.ariaLabel,\n actions: actions.value,\n divider: true,\n fallbackPosition: ['top-start'],\n id: generateUid(`dropdown-options-${props.id}`),\n open: props.open,\n position: 'bottom-start',\n style: {\n width: 'auto',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof BentoPopover>['$props'])\n : ({\n fallbackPosition: ['top-start'],\n offset: [0, 8],\n position: 'bottom-start',\n style: {\n display: isDropdownOpen.value ? 'block' : 'none',\n ...containerMinAndMaxWidth,\n },\n targetElement: props.targetElement,\n } as InstanceType<typeof PopperContainer>['$props']);\n });\n\n defineExpose({\n onOutsideDropdownClick,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dropdown options container.\n * It lists all the available options.\n *\n * @example\n * <bento-dropdown-options-container\n * v-if=\"inputContainerRef\" <!-- Ref to the input to match the width -->\n * :id=\"dropdownOptionsContainerId\"\n * :target-element=\"inputContainerRef\"\n * :aria-label=\"ariaLabel\"\n * :open=\"isDropdownOpen\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-dropdown-options-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-options-container.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-dropdown-small-textbox\" :class=\"conditionalClasses\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-small-textbox__textbox\"\n :size=\"BentoDropdownSize.SMALL\"\n v-on=\"listeners\"\n >\n <template #icon>\n <div class=\"b-dropdown-small-textbox__chevron\">\n <chevron-up-small-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-small-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import { type Booleanish } from '@/types/prop-types';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import ChevronDownSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-down-small';\n import ChevronUpSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-up-small';\n import { stopEventPropagation } from '@/utils/ts/events';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\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: { 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 * 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 const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-small-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\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 in its small variant used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-small-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-small-textbox.scss\" />\n","import { computed, type Ref } from 'vue';\nimport { type UseDisplayValueOptions } from './use-display-value.types';\nimport { type BentoListboxOptions } from '@/types/listbox';\n\n/**\n * Generates the `displayValue` for the Category Multi Select based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * @param options Multi select options\n * @returns The text to be displayed by the dropdown\n */\nconst categoryMultiSelect = (selectedValues: Ref<BentoListboxOptions>, items: Ref<BentoListboxOptions>) =>\n items.value\n .reduce((acc, option) => {\n // Category items\n if (option.items) {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValues.value.find(selectedOption => selectedOption.value === categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected = selectedCategoryOptions.length === option.items.length;\n if (isCategoryFullySelected) {\n acc.push(option.displayValue ?? option.label);\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue }) => acc.push(displayValue ?? label));\n }\n }\n\n // Non-category option\n if (selectedValues.value.find(selectedOption => selectedOption.value === option.value)) {\n acc.push(option.displayValue ?? option.label);\n }\n\n return acc;\n }, [])\n .join(', ');\n\n/**\n * Generates the `displayValue` for the Dropdown based on\n * the selection, the placeholder or it can be empty if there's nothing to show.\n *\n * When there is a selected value but the value is not present in the list, the\n * value is then returned as there is no way to know what the text/label is.\n *\n * @param options Options needed to calculate the display value based on the type of Dropdown (single, multi, category)\n * @returns The text to be displayed by the dropdown\n */\nexport const useDisplayValue = ({ items, placeholder, selectedValues, isMultiSelect }: UseDisplayValueOptions) => {\n const isCategoryMultilevel = computed(\n () => isMultiSelect.value && items.value.find(option => option.items?.length)\n );\n\n const computedDisplayValue = computed(() => {\n // If no value selected, return placeholder or nothing\n if (!selectedValues.value.length) {\n return placeholder.value || null;\n }\n\n // Category multi select\n if (isCategoryMultilevel.value) {\n return categoryMultiSelect(selectedValues, items);\n }\n\n return selectedValues.value.map(({ label, displayValue }) => displayValue ?? label).join(', ');\n });\n\n return computedDisplayValue;\n};\n","import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\nimport { BentoListboxEvent } from '@/types/listbox';\nimport { computed, nextTick, type Ref } from 'vue';\nimport {\n type UseListboxKeyboardNavigationOptions,\n type UseTextboxKeyboardNavigationOptions,\n} from './use-keyboard-navigation.types';\n\n/**\n * Returns the focus to the textbox of the dropdown if it exists\n * when the dropdown is being closed.\n * @param elementToFocusOn Reference to the input container\n */\nconst focusOnTextbox = (elementToFocusOn: Ref) => {\n elementToFocusOn.value.$children?.[0].$refs.textbox.focus();\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's textbox for Single and Multi select.\n * Adds support for the keys:\n *\n * - Arrow Down\n * - Arrow Up\n * - Home key\n * - End key\n * - Space key\n * - Enter key\n * - Tab\n * - Escape key\n *\n * @param options Options from the Dropdown to handle the navigation\n * @param toggleDropdown Function to open/close the Dropdown\n * @param openDropdown Function to open the Dropdown\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's textbox\n */\nexport const useTextboxKeyboardNavigation = (\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering,\n items,\n isMultiple,\n }: UseTextboxKeyboardNavigationOptions,\n toggleDropdown: () => void,\n openDropdown: () => void,\n closeDropdown: () => void\n) => {\n const focusOnOption = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n items.value[index]?.focus();\n };\n\n const focusOnChip = async (index: number) => {\n if (isDynamicFltering.value) {\n await nextTick();\n }\n\n const chips =\n optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(\n 'button'\n );\n\n if (chips.length) {\n chips[index]?.focus();\n } else {\n focusOnOption(index);\n }\n };\n\n const setListboxFocusedIndex = (selectedIndex: number) => {\n return optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(\n selectedIndex\n );\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(0);\n focusOnOption(0);\n });\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n setListboxFocusedIndex(items.value.length - 1);\n focusOnOption(items.value.length - 1);\n });\n };\n\n const onArrowDown = ({ detail: event }) => {\n event.preventDefault();\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n event.preventDefault();\n\n skipToLastOption();\n };\n\n const onHomeKey = () => {\n skipToFirstOption();\n };\n\n const onEndKey = () => {\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onEnterKey = ({ detail: event }) => {\n event.preventDefault();\n toggleDropdown();\n if (isDropdownOpen.value) {\n nextTick(() => {\n if (isMultiple) {\n focusOnChip(0);\n } else {\n setListboxFocusedIndex(selectedValueIndex.value);\n focusOnOption(selectedValueIndex.value);\n }\n });\n }\n };\n\n const onTab = () => {\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n focusOnTextbox(inputContainerRef);\n }\n };\n\n const textboxKeyboardNavigationListeners = computed(() => ({\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: onArrowDown,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: onArrowUp,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: onHomeKey,\n [BentoKeyboardNavigationKeyDownEvent.END]: onEndKey,\n ...(!isDynamicFltering.value ? { [BentoKeyboardNavigationKeyDownEvent.SPACE]: onSpaceKey } : {}),\n [BentoKeyboardNavigationKeyDownEvent.ENTER]: onEnterKey,\n [BentoKeyboardNavigationKeyDownEvent.TAB]: onTab,\n [BentoKeyboardNavigationKeyDownEvent.ESCAPE]: onEscapeKey,\n }));\n\n return textboxKeyboardNavigationListeners;\n};\n\n/**\n * Controls the keyboard navigation inside the Dropdown's listbox container for Single and Multi select.\n * Adds support for the keys:\n *\n * - Escape key\n * - Enter Key\n * - Tab\n * - Space key\n *\n * @param options Options from the Dropdown to handle the navigation inside the listbox\n * @param closeDropdown Function to close the Dropdown\n * @returns List of event listeners available to the Dropdown's listbox container\n */\nexport const useListboxKeyboardNavigation = (\n { inputContainerRef, isDropdownOpen }: UseListboxKeyboardNavigationOptions,\n closeDropdown: () => void\n) => {\n const closeDropdownAndFocusOnTextbox = () => {\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n nextTick(() => {\n focusOnTextbox(inputContainerRef);\n });\n };\n\n const listboxKeyboardNavigationListeners = {\n [BentoListboxEvent.ENTER]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.ESCAPE]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.TAB]: closeDropdownAndFocusOnTextbox,\n [BentoListboxEvent.SPACE]: closeDropdownAndFocusOnTextbox,\n };\n\n return listboxKeyboardNavigationListeners;\n};\n","import { computed, ref, type Ref, watch } from 'vue';\nimport { type BentoSearchBarItem } from './search-bar.types';\nimport { debounce } from '@/utils/ts/debounce';\n\n/**\n * Filters an array {@see BentoSearchBarData} containing elements of type {@see BentoSearchBarItem}\n * by the {@param searchTerm}.\n *\n * @param {Ref<String>} searchTerm - Text that satisfies the search criteria.\n * @param {Ref<BentoSearchBarData>} data - Array to be filtered by {@param searchTerm}\n * @param {Function} searchEvent - Optional search event to trigger on search term change.\n * @param {Ref<Boolean>} ignoreGroups - Boolean that determines if search returns items with subitems\n * @param {Number} debounceTime - Optional debounce time for the search event.\n * @returns {Ref<BentoSearchBarData>} New instance of the array filtered by the {@param searchTerm} text\n */\nexport function useSearchBarFilter<T extends BentoSearchBarItem>(\n searchTerm: Ref<string>,\n data: Ref<Array<T>>,\n searchEvent?: (searchValue: string) => void,\n ignoreGroups?: Ref<boolean>,\n debounceTime?: number\n) {\n const searchTermRef = ref(searchTerm);\n const dataRef = ref(data);\n\n const findHits = (searchTermLowerCased: string, options: Array<BentoSearchBarItem> = []) =>\n options.flatMap(option => {\n if (option.label.toLocaleLowerCase().includes(searchTermLowerCased)) {\n if (ignoreGroups?.value && option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n return [option, ...findHits(searchTermLowerCased, option.items)];\n }\n\n if (option.items) {\n return [...findHits(searchTermLowerCased, option.items)];\n }\n\n return [];\n });\n\n const debouncedSearchEvent =\n searchEvent !== undefined ? debounce(() => searchEvent(searchTermRef.value), debounceTime ?? 300) : undefined;\n\n // If search event exists trigger it on the search term changing\n watch(searchTermRef, () => {\n if (debouncedSearchEvent !== undefined) {\n debouncedSearchEvent();\n }\n });\n\n const filterInputData = computed(() => {\n if (!searchTermRef.value) {\n return dataRef.value;\n }\n // If search event exists, emit the new search value into the event and do not manipulate data.\n if (searchEvent !== undefined) {\n return dataRef.value;\n }\n\n const searchTermLowerCased = searchTermRef.value.toLocaleLowerCase();\n const filtered = findHits(searchTermLowerCased, dataRef.value);\n return filtered;\n });\n\n return filterInputData;\n}\n","export const INPUT_FIELD_COMPONENT_INJECTION_KEY = Symbol('input field component injection key');\nexport const INPUT_FIELD_HINT_INJECTION_KEY = Symbol('input field hint injection key');\nexport const INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY = Symbol('input field parent component injection key');\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"clickOutsideDropdown\" class=\"b-dropdown\" :class=\"conditionalClasses\">\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :condensed=\"condensed\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <div\n ref=\"inputContainerRefWrapper\"\n v-bento-keyboard-navigation-directive\n v-on=\"textboxKeyboardNavigationListeners\"\n >\n <component\n :is=\"computedSize\"\n ref=\"inputContainerRef\"\n :condensed=\"condensed\"\n :value=\"searchTerm\"\n :additional-items-selected=\"additionalItemsSelected\"\n :aria-controls=\"dropdownOptionsContainerId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"computedAriaLabel\"\n :aria-readonly=\"isReadOnly\"\n :aria-required=\"required\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :is-invalid=\"!!errorMessage || error\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"searchTerm = $event\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-dropdown-options-container\n v-if=\"inputContainerRef\"\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"computedAriaLabel\"\n :component-loading=\"componentLoading\"\n :empty-state=\"emptyState\"\n :disabled=\"disabled\"\n :is-option-disabled=\"isOptionDisabled\"\n :items=\"filteredItems\"\n :multiple=\"multiple\"\n :static-categories=\"staticCategories\"\n :open=\"isDropdownOpen\"\n :selected-value=\"cachedSelectedListboxOptions\"\n :searching=\"isSearching\"\n :target-element=\"inputContainerRefWrapper\"\n :loading=\"loading\"\n :has-more-items=\"hasMoreItems\"\n :lazy-load-type=\"lazyLoadType\"\n :virtual-scroll=\"virtualScroll\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown-options-container>\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-dropdown__error-message\"\n />\n <bento-typography\n v-if=\"description || hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-dropdown__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n <slot name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n nextTick,\n type Ref,\n ref,\n toRef,\n toRefs,\n useAttrs,\n useSlots,\n watch,\n } from 'vue';\n // Components\n import { BentoDropdownOptionsContainer } from './components/dropdown-options-container';\n import { BentoTypography } from '@/components/typography';\n import { DropdownInputDefault, DropdownInputSmall } from './components';\n import { BentoListbox, ErrorMessage, FieldLabel, useCachedSelectedValues, useMultiLevelItems } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n // Composables\n import { useDisplayValue, useListboxKeyboardNavigation, useTextboxKeyboardNavigation } from './composables';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n // Types\n import { BentoDropdownEvent, type BentoDropdownProps, BentoDropdownSize } from './dropdown.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types/listbox';\n\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n description: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: null },\n condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n dynamicFiltering: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { type: Function, default: undefined },\n items: { default: () => [] },\n loading: { type: Boolean, default: false },\n componentLoading: { type: Boolean, default: false },\n lazyLoadType: { default: BentoListbox.props.lazyLoadType.default },\n multiple: { type: Boolean, default: false },\n search: { default: undefined },\n showSlotContentInMultiple: { type: Boolean, default: false },\n size: { default: null },\n staticCategories: { type: Boolean, default: false },\n value: { default: null },\n modelValue: { default: null },\n virtualScroll: { type: Boolean, default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const inputContainerRef = ref(null);\n const inputContainerRefWrapper = ref(null);\n const optionsContainerRef: Ref<InstanceType<typeof BentoDropdownOptionsContainer>> = ref(null);\n const isDropdownOpen = ref(false);\n const dropdownOptionsContainerId = generateUid('bento-dropdown-options-container');\n const labelId = generateUid('dropdown-label');\n const descriptionId = generateUid('dropdown-description');\n const errorId = generateUid('dropdown-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const dropdownValue = computed(() => props.modelValue ?? props.value);\n\n const { cachedSelectedListboxOptions, cachedListboxSelectedValues, setCachedValues } = useCachedSelectedValues(\n toRef(props, 'items'),\n dropdownValue,\n toRef(props, 'multiple'),\n toRef(props, 'enableValueLabelPair')\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const ariaDescribedByAttribute = ref(attrs['aria-describedby']);\n const { ariaLabel, label } = toRefs(props);\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabel = useAriaLabel({\n // TODO: take ariaLabel ref away when aria-label prop is removed\n ariaLabel: ariaLabel.value || (ariaLabelAttribute as Ref<string>),\n label,\n defaultFallback: computedAriaLabelFallbackMessage,\n });\n\n // Inject input field component key to change the dropdown size\n const isInputComponent =\n props.size === BentoDropdownSize.SMALL || inject(INPUT_FIELD_COMPONENT_INJECTION_KEY, false);\n const computedSize = computed(() => (isInputComponent ? BentoDropdownSize.SMALL : BentoDropdownSize.DEFAULT));\n\n const conditionalClasses = computed(() => ({\n 'b-dropdown--condensed': props.condensed,\n }));\n\n // Description styles\n const descriptionConditionalClasses = computed(() => ({\n 'b-dropdown__description--error': !!props.errorMessage,\n }));\n\n // Filtering\n const searchTerm = ref('');\n const items = toRef(props, 'items');\n const staticCategories = toRef(props, 'staticCategories');\n const filteredItems = useSearchBarFilter(\n searchTerm,\n items,\n props?.search?.searchEvent,\n staticCategories,\n props?.search?.debounceTime\n );\n const isSearching = computed(() => props.dynamicFiltering && !!searchTerm.value);\n\n const displayValue = useDisplayValue({\n items,\n placeholder: toRef(props, 'placeholder'),\n isMultiSelect: toRef(props, 'multiple'),\n selectedValues: cachedSelectedListboxOptions,\n });\n\n const selectedValueItem = computed(() => {\n if (props?.multiple && Array.isArray(dropdownValue.value)) {\n return props.items.filter(\n ({ value }) => props?.value && (props?.value as BentoListboxMultiSelectValue).includes(value)\n );\n }\n if (!props.multiple && props.staticCategories) {\n // Find the category that holds the selected value\n const category = props.items.find(categoryItem =>\n categoryItem.items.some(item => item.value === dropdownValue.value)\n );\n // Find the specific item within the category\n const selectedCategoryItem = category\n ? category.items.find(item => item.value === dropdownValue.value)\n : null;\n\n return selectedCategoryItem;\n }\n\n return props.items.find(({ value }) => value === dropdownValue.value);\n });\n\n const selectedValueIndex = computed(() => {\n const index = filteredItems.value.findIndex(({ value }) => {\n return props.enableValueLabelPair\n ? (dropdownValue.value as BentoListboxSelectedValueLabelPair).value === value\n : dropdownValue.value === value;\n });\n return index > -1 ? index : 0;\n });\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(items);\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedOptionRole = computed<BentoListboxItemRole>(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const additionalItemsSelected = computed(() => {\n if (props.multiple) {\n const selectedItemsCount = Array.isArray(dropdownValue.value) ? dropdownValue.value.length : 0;\n const total = isMultiLevelSelect.value ? flattenedItemsList.value.length : items.value.length;\n\n if (selectedItemsCount === 0) {\n return null;\n }\n\n // Display count always - show \"all\" only when is not external filtering (hasMoreItems = true)\n if (!props.hasMoreItems && total > 0 && total === selectedItemsCount) {\n return t('all');\n }\n\n return selectedItemsCount;\n }\n\n return null;\n });\n\n // ARIA\n const ariaDescribedBy = computed(\n () =>\n [\n props.description ? descriptionId : null,\n ariaDescribedByAttribute.value,\n props.errorMessage ? errorId : null,\n ]\n .filter(Boolean)\n .join(' ') || null\n );\n\n const listboxRef = computed(() => optionsContainerRef.value?.$el as HTMLDivElement);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n filteredItems,\n computedOptionRole\n );\n\n const openDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = true;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const toggleDropdown = () => {\n if (isReadOnly.value) {\n return;\n }\n isDropdownOpen.value = !isDropdownOpen.value;\n nextTick(() => {\n updateVisibleDomOptions();\n });\n\n // Clear search\n if (isSearching.value) {\n searchTerm.value = '';\n }\n };\n\n const clickOutsideDropdown = () => {\n if (isSearching.value) {\n searchTerm.value = '';\n }\n\n if (isDropdownOpen.value) {\n isDropdownOpen.value = false;\n // Reset the internal dropdown options state\n optionsContainerRef.value.onOutsideDropdownClick();\n }\n };\n\n const onOptionSelected = async (selectedValue: BentoListboxOptions) => {\n // Clear and close the dropdown on single selection\n if (!props.multiple) {\n searchTerm.value = '';\n isDropdownOpen.value = false;\n }\n\n setCachedValues(selectedValue);\n\n /**\n * Emit the value/label pair objects if enableValueLabelPair is enabled,\n * otherwise just emit the list of selected values (number or string)\n */\n emitValue(cachedListboxSelectedValues.value);\n\n // Focus the input after selection and dropdown has closed\n if (!props.multiple) {\n await nextTick();\n focus();\n }\n };\n\n const emitShowMoreEvent = () => {\n emit(BentoDropdownEvent.SHOW_MORE);\n };\n\n const textboxKeyboardNavigationListeners = useTextboxKeyboardNavigation(\n {\n inputContainerRef,\n optionsContainerRef,\n selectedValueIndex,\n isDropdownOpen,\n isDynamicFltering: toRef(props, 'dynamicFiltering'),\n items: visibleDomOptions,\n isMultiple: props.multiple,\n },\n toggleDropdown,\n openDropdown,\n closeDropdown\n );\n\n const listboxKeyboardNavigationListeners = useListboxKeyboardNavigation(\n {\n inputContainerRef,\n isDropdownOpen,\n },\n closeDropdown\n );\n\n const listboxListeners = {\n [BentoListboxEvent.CLOSE_DROPDOWN]: closeDropdown,\n [BentoListboxEvent.SELECT]: onOptionSelected,\n [BentoListboxEvent.SHOW_MORE]: emitShowMoreEvent,\n ...listboxKeyboardNavigationListeners,\n };\n\n if (props.error) {\n deprecate(\n 'BentoDropdown \"error\" property',\n `Use the BentoDropdown \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (props.size) {\n deprecate('BentoDropdown \"size\" property', `Do not use. Only 'default' size should be used.`, '2.0.0');\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdown \"value\" property',\n `The use of \"value\" prop in \"BentoDropdown\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n const focus = () => {\n inputContainerRef.value.focus();\n };\n\n watch(\n () => isDropdownOpen.value,\n (isOpen: boolean) => {\n if (isOpen) {\n emit('open');\n }\n }\n );\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A Dropdown shows a selected option's.\n * Use a dropdown when you want users to select options\n * from a list of pre-defined options.\n *\n * @example\n * import { BentoDropdown } from '@adyen/bento-vue2';\n * import type { BentoDropdownOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown\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(2) // Default value\n * const options: BentoDropdownOptions = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'b-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useDropdownOptionsListbox","selectedValue","multiple","isOpen","emit","internalSelectedValue","ref","t","useI18n","watch","isApplyButtonDisabled","computed","onApplyClick","BentoListboxEvent","onCancelClick","onOutsideDropdownClick","actions","onOptionSelected","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$2","defineComponent","messages$1","slots","useSlots","toRefs","props","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalClasses","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","_a","generateUid","expose","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","baseTextbox","DropdownBaseTextboxState","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","DropdownBaseTextboxEvent","focus","categoryMultiSelect","selectedValues","items","acc","option","selectedCategoryOptions","categoryOption","selectedOption","label","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","toggleDropdown","focusOnOption","index","nextTick","focusOnChip","chips","_b","setListboxFocusedIndex","selectedIndex","skipToFirstOption","skipToLastOption","onArrowDown","event","onArrowUp","onHomeKey","onEndKey","onTab","BentoKeyboardNavigationKeyDownEvent","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","debounceTime","searchTermRef","dataRef","findHits","searchTermLowerCased","options","debouncedSearchEvent","debounce","INPUT_FIELD_COMPONENT_INJECTION_KEY","INPUT_FIELD_HINT_INJECTION_KEY","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","__default__","messages","DropdownInputDefault","DropdownInputSmall","attrs","useAttrs","hasSlot","useHasSlot","emitValue","useFormFieldEmits","inputContainerRefWrapper","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","dropdownValue","cachedSelectedListboxOptions","cachedListboxSelectedValues","setCachedValues","useCachedSelectedValues","ariaLabelAttribute","ariaDescribedByAttribute","ariaLabel","computedAriaLabelFallbackMessage","computedAriaLabel","useAriaLabel","isInputComponent","BentoDropdownSize","inject","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","isSearching","selectedValueItem","value","category","categoryItem","item","isMultiLevelSelect","flattenedItemsList","useMultiLevelItems","isTreePattern","computedOptionRole","additionalItemsSelected","selectedItemsCount","total","ariaDescribedBy","listboxRef","visibleDomOptions","updateVisibleDomOptions","useVisibleDomOptions","clickOutsideDropdown","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","listboxListeners","deprecate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkBOA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC,EAAAL,EAAA,KAAA,GACA,EAAA,GAAAM,EAAA,IAAAC,GAAA;AAEA,EAAAC,GAAAR,GAAA,MAAA;AACI,IAAAI,EAAA,QAAAJ,EAAA;AAAA,EAA4C,CAAA;AAIhD,QAAAS,IAAAC;AAAA,IAA8B,MAAA,KAAA,UAAAN,EAAA,KAAA,MAAA,KAAA,UAAAJ,EAAA,KAAA;AAAA,EAC8D,GAG5FW,IAAA,MAAA;AACI,IAAAR,EAAAS,EAAA,QAAAR,EAAA,KAAA,GACAD,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CC,IAAA,MAAA;AACI,IAAAT,EAAA,QAAAJ,EAAA,OACAG,EAAAS,EAAA,cAAA;AAAA,EAAsC,GAG1CE,IAAA,MAAA;AACI,IAAAZ,EAAA,SAAAD,EAAA,UACIG,EAAA,QAAAJ,EAAA;AAAA,EACJ,GAGJe,IAAAL,EAAA,MAAA;AAAA,IAA+B;AAAA,MAC3B,OAAAJ,EAAA,OAAA;AAAA,MACoB,OAAAK;AAAA,MACT,UAAAF,EAAA;AAAA,IACyB;AAAA,IACpC;AAAA,MACA,OAAAH,EAAA,QAAA;AAAA,MACqB,OAAAO;AAAA,IACV;AAAA,EACX,CAAA,GAIJG,IAAA,CAAAC,MAAA;AACI,IAAAb,EAAA,QAAAa,GACAhB,EAAA,SACIE,EAA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KAAAlG;AAAA,MAA2C;AAAA,QACvC,mBAAAC;AAAA,QACI,qBAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAhD;AAAA,QACA,mBAAAwG,EAAA1G,GAAA,kBAAA;AAAA,QACkD,OAAA6I;AAAA,QAC3C,YAAA7I,EAAA;AAAA,MACW;AAAA,MACtBqD;AAAA,MACA5B;AAAA,MACAE;AAAA,IACA,GAGJuH,KAAA3E;AAAA,MAA2C;AAAA,QACvC,mBAAAvB;AAAA,QACI,gBAAA9C;AAAA,MACA;AAAA,MACJyB;AAAA,IACA,GAGJwH,KAAA;AAAA,MAAyB,CAAArK,EAAA,cAAA,GAAA6C;AAAA,MACe,CAAA7C,EAAA,MAAA,GAAAI;AAAA,MACR,CAAAJ,EAAA,SAAA,GAAAU;AAAA,MACG,GAAA0J;AAAA,IAC5B;AAGP,IAAAlJ,EAAA,SACIoJ;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRpJ,EAAA,QACIoJ,EAAA,iCAAA,mDAAA,OAAA,GAGJpJ,EAAA,SACIoJ;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;AAIR,UAAAtH,IAAA,MAAA;AACI,MAAAkB,EAAA,MAAA,MAAA;AAAA,IAA8B;AAGlC,WAAAtE;AAAA,MAAA,MAAAwB,EAAA;AAAA,MACyB,CAAA9B,MAAA;AAEjB,QAAAA,KACIC,EAAA,MAAA;AAAA,MACJ;AAAA,IACJ,GAGJwC,EAAA;AAAA,MAAa,OAAAiB;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as N, ref as g, computed as i, watch as d } from "vue";
2
- import { B as D } from "./button.DxhJNOtr.js";
2
+ import { B as D } from "./button.C9b2AC9w.js";
3
3
  import { B as L } from "./typography.C8lPlsbD.js";
4
4
  import { o as C } from "./resize.Bqks3WUm.js";
5
5
  import { n as A } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
@@ -103,4 +103,4 @@ export {
103
103
  u as b,
104
104
  t as c
105
105
  };
106
- //# sourceMappingURL=empty-state.D_Ac-XXH.js.map
106
+ //# sourceMappingURL=empty-state.DMV23IZy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.D_Ac-XXH.js","sources":["../../src/components/empty-state/empty-state.types.ts","../../src/components/empty-state/empty-state.vue"],"sourcesContent":["import type { BentoButtonActionObject } from '@/components/button/components/button-actions/button-actions.types';\nimport type { BentoTypographyElement } from '@/components/typography/typography.types';\n\nexport enum BentoEmptyStateVariant {\n FULL_PAGE = 'full-page',\n EMBEDDED = 'embedded',\n BASIC = 'basic',\n CONDENSED = 'condensed',\n}\n\nexport enum BentoEmptyStateImage {\n GENERIC_USE1 = '1-generic-use',\n GENERIC_USE2 = '2-generic-use',\n GENERIC_USE3 = '3-generic-use',\n GENERIC_USE4 = '4-generic-use',\n ADDING_PAYMENT_METHOD = 'adding-payment-methods',\n ADYEN_GIVING = 'adyen-giving',\n DELIGHT = 'delight',\n INTERNAL_ERROR = 'internal-error',\n NO_RESULTS_FOUND = 'no-results-found',\n NOTIFICATIONS_CLEARED = 'notifications-cleared',\n PAGE_NOT_FOUND = 'page-not-found',\n PLANNED_MAINTENANCE = 'planned-maintenance',\n REFERRALS = 'referrals',\n SUCCESS = 'success',\n UPLOAD_FILES = 'upload-files',\n WRONG_ENVIRONMENT = 'wrong-environment',\n}\n\nexport enum BentoEmptyStateImageVariant {\n SMALL = 'small',\n LARGE = 'large',\n NULL = null,\n}\n\nexport interface BentoEmptyStateProps {\n /**\n * Defines the button at the end of the component.\n */\n action?: BentoButtonActionObject;\n\n /**\n * The empty state description.\n * Gives additional details to the issue.\n * This can be used or the default slot\n */\n description?: string;\n\n /**\n * Sets the heading HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n headingEl?: `${BentoTypographyElement}`;\n\n /**\n * Name of the illustration for the empty state.\n */\n image?: `${BentoEmptyStateImage}`;\n\n /**\n * The empty state heading.\n * Should clearly explain the issue.\n */\n title?: string;\n\n /**\n * Types of different empty states\n * @values full-page, embedded, basic, condensed\n */\n variant?: `${BentoEmptyStateVariant}`;\n}\n","<template>\n <div ref=\"rootRef\" class=\"b-empty-state\">\n <!-- illustration -->\n <img\n v-if=\"image && imageVariant\"\n alt=\"\"\n class=\"b-empty-state__image\"\n :class=\"imageConditionalClasses\"\n :src=\"imageSvg\"\n />\n\n <!-- heading -->\n <bento-typography v-bind=\"headingProps\" class=\"b-empty-state__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </bento-typography>\n\n <!-- details -->\n <bento-typography v-if=\"variant !== 'condensed'\" variant=\"body\" class=\"b-empty-state__details\">\n <slot>\n {{ description }}\n </slot>\n </bento-typography>\n\n <!-- action -->\n <bento-button v-if=\"action\" type=\"button\" :variant=\"actionVariant\" @click=\"action.event\">\n <template v-if=\"action.icon\" #iconLeft>\n <component :is=\"action.icon\" :svg-title=\"action.title\"></component>\n </template>\n {{ action.title }}\n </bento-button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n\n import { BentoButton, type BentoButtonVariant } from '@/components/button';\n import { BentoTypography, type BentoTypographyElement, type BentoTypographyVariant } from '@/components/typography';\n\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import {\n BentoEmptyStateImageVariant,\n type BentoEmptyStateProps,\n BentoEmptyStateVariant,\n } from './empty-state.types';\n\n const WIDTH_BREAKPOINT = 740;\n\n const props = defineProps({\n action: { default: null },\n description: { default: null },\n headingEl: { default: null },\n image: { default: null },\n title: { default: '' },\n variant: { default: 'basic' }\n});\n\n const rootRef = ref<HTMLDivElement>(null);\n const containerWidth = ref(0);\n\n const isBelowBreakpoint = computed(() => containerWidth.value < WIDTH_BREAKPOINT);\n\n const imageVariant = computed<BentoEmptyStateImageVariant>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return isBelowBreakpoint.value ? BentoEmptyStateImageVariant.SMALL : BentoEmptyStateImageVariant.LARGE;\n case BentoEmptyStateVariant.EMBEDDED:\n return isBelowBreakpoint.value ? null : BentoEmptyStateImageVariant.SMALL;\n default:\n return null;\n }\n });\n\n const imageSvg = ref('');\n\n watch(\n [() => props.image, imageVariant],\n async () => {\n if (props.image && imageVariant.value) {\n // rollup only supports one variable in a dynamic path\n /* v8 ignore next 4 */\n if (imageVariant.value === 'small') {\n imageSvg.value = (await import(`./assets/small/${props.image}.svg`)).default;\n } else {\n imageSvg.value = (await import(`./assets/large/${props.image}.svg`)).default;\n }\n }\n },\n { immediate: true }\n );\n\n const imageConditionalClasses = computed(() => ({\n 'b-empty-state__image--small': imageVariant.value === 'small',\n 'b-empty-state__image--large': imageVariant.value === 'large',\n }));\n\n const HEADING_ELEMENT_MAP = {\n [BentoEmptyStateVariant.FULL_PAGE]: 'h2',\n [BentoEmptyStateVariant.EMBEDDED]: 'h3',\n [BentoEmptyStateVariant.BASIC]: 'h3',\n [BentoEmptyStateVariant.CONDENSED]: 'div',\n };\n\n const headingElement = computed(\n () => (props.headingEl || HEADING_ELEMENT_MAP[props.variant]) as BentoTypographyElement\n );\n\n const headingProps = computed(() => ({\n el: headingElement.value,\n medium: props.variant !== BentoEmptyStateVariant.CONDENSED,\n strongest: props.variant === BentoEmptyStateVariant.CONDENSED,\n variant: (props.variant === BentoEmptyStateVariant.CONDENSED ? 'body' : 'title') as BentoTypographyVariant,\n }));\n\n const actionVariant = computed<`${BentoButtonVariant}`>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return 'primary';\n case BentoEmptyStateVariant.CONDENSED:\n return 'tertiary';\n default:\n return 'secondary';\n }\n });\n\n // Lifecycle\n watch(rootRef, () => {\n // Use ResizeObserver so that image is only fetched if needed (visible).\n observeSizeOfElement(rootRef.value, () => {\n if (rootRef.value) {\n containerWidth.value = rootRef.value.offsetWidth;\n }\n });\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Empty states are moments in the user experience when there is nothing to display.\n * This component can be used to provide:\n * - Information about system status\n * - Contextual learning cues\n * - Direct pathways for key tasks\n *\n * @example\n * import { BentoEmptyState } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoEmptyState },\n * template: `\n * <bento-empty-state\n * title=\"No results were found\"\n * image=\"no-results-found\"\n * variant=\"full-page\"\n * :action=\"{ title: 'Reset filters', event: () => {} }\"\n * >\n * Try a different term or reset search filters\n * </bento-empty-state>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./empty-state.scss\" />\n"],"names":["BentoEmptyStateVariant","BentoEmptyStateVariant2","BentoEmptyStateImage","BentoEmptyStateImage2","BentoEmptyStateImageVariant","BentoEmptyStateImageVariant2","__default__","WIDTH_BREAKPOINT","rootRef","ref","containerWidth","isBelowBreakpoint","computed","imageVariant","props","imageSvg","watch","__variableDynamicImportRuntimeHelper","imageConditionalClasses","HEADING_ELEMENT_MAP","headingElement","headingProps","actionVariant","observeSizeOfElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,YAAA,aAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,wBAAA,0BACAA,EAAA,eAAA,gBACAA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,mBAAA,oBACAA,EAAA,wBAAA,yBACAA,EAAA,iBAAA,kBACAA,EAAA,sBAAA,uBACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WACAA,EAAA,eAAA,gBACAA,EAAA,oBAAA,qBAhBQA,IAAAD,KAAA,CAAA,CAAA,GAmBLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,QA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AA,YAAA,SAAA;AAAA,IACoB,EAAA,GAG5EsB,IAAAV,EAAA,MAAA;AACI,cAAAE,EAAA,SAAA;AAAA,QAAuB,KAAAd,EAAA;AAEf,iBAAA;AAAA,QAAO,KAAAA,EAAA;AAEP,iBAAA;AAAA,QAAO;AAEP,iBAAA;AAAA,MAAO;AAAA,IACf,CAAA;AAIJ,WAAAgB,EAAAR,GAAA,MAAA;AAEI,MAAAe,EAAAf,EAAA,OAAA,MAAA;AACI,QAAAA,EAAA,UACIE,EAAA,QAAAF,EAAA,MAAA;AAAA,MACJ,CAAA;AAAA,IACH,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"empty-state.DMV23IZy.js","sources":["../../src/components/empty-state/empty-state.types.ts","../../src/components/empty-state/empty-state.vue"],"sourcesContent":["import type { BentoButtonActionObject } from '@/components/button/components/button-actions/button-actions.types';\nimport type { BentoTypographyElement } from '@/components/typography/typography.types';\n\nexport enum BentoEmptyStateVariant {\n FULL_PAGE = 'full-page',\n EMBEDDED = 'embedded',\n BASIC = 'basic',\n CONDENSED = 'condensed',\n}\n\nexport enum BentoEmptyStateImage {\n GENERIC_USE1 = '1-generic-use',\n GENERIC_USE2 = '2-generic-use',\n GENERIC_USE3 = '3-generic-use',\n GENERIC_USE4 = '4-generic-use',\n ADDING_PAYMENT_METHOD = 'adding-payment-methods',\n ADYEN_GIVING = 'adyen-giving',\n DELIGHT = 'delight',\n INTERNAL_ERROR = 'internal-error',\n NO_RESULTS_FOUND = 'no-results-found',\n NOTIFICATIONS_CLEARED = 'notifications-cleared',\n PAGE_NOT_FOUND = 'page-not-found',\n PLANNED_MAINTENANCE = 'planned-maintenance',\n REFERRALS = 'referrals',\n SUCCESS = 'success',\n UPLOAD_FILES = 'upload-files',\n WRONG_ENVIRONMENT = 'wrong-environment',\n}\n\nexport enum BentoEmptyStateImageVariant {\n SMALL = 'small',\n LARGE = 'large',\n NULL = null,\n}\n\nexport interface BentoEmptyStateProps {\n /**\n * Defines the button at the end of the component.\n */\n action?: BentoButtonActionObject;\n\n /**\n * The empty state description.\n * Gives additional details to the issue.\n * This can be used or the default slot\n */\n description?: string;\n\n /**\n * Sets the heading HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n headingEl?: `${BentoTypographyElement}`;\n\n /**\n * Name of the illustration for the empty state.\n */\n image?: `${BentoEmptyStateImage}`;\n\n /**\n * The empty state heading.\n * Should clearly explain the issue.\n */\n title?: string;\n\n /**\n * Types of different empty states\n * @values full-page, embedded, basic, condensed\n */\n variant?: `${BentoEmptyStateVariant}`;\n}\n","<template>\n <div ref=\"rootRef\" class=\"b-empty-state\">\n <!-- illustration -->\n <img\n v-if=\"image && imageVariant\"\n alt=\"\"\n class=\"b-empty-state__image\"\n :class=\"imageConditionalClasses\"\n :src=\"imageSvg\"\n />\n\n <!-- heading -->\n <bento-typography v-bind=\"headingProps\" class=\"b-empty-state__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </bento-typography>\n\n <!-- details -->\n <bento-typography v-if=\"variant !== 'condensed'\" variant=\"body\" class=\"b-empty-state__details\">\n <slot>\n {{ description }}\n </slot>\n </bento-typography>\n\n <!-- action -->\n <bento-button v-if=\"action\" type=\"button\" :variant=\"actionVariant\" @click=\"action.event\">\n <template v-if=\"action.icon\" #iconLeft>\n <component :is=\"action.icon\" :svg-title=\"action.title\"></component>\n </template>\n {{ action.title }}\n </bento-button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n\n import { BentoButton, type BentoButtonVariant } from '@/components/button';\n import { BentoTypography, type BentoTypographyElement, type BentoTypographyVariant } from '@/components/typography';\n\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import {\n BentoEmptyStateImageVariant,\n type BentoEmptyStateProps,\n BentoEmptyStateVariant,\n } from './empty-state.types';\n\n const WIDTH_BREAKPOINT = 740;\n\n const props = defineProps({\n action: { default: null },\n description: { default: null },\n headingEl: { default: null },\n image: { default: null },\n title: { default: '' },\n variant: { default: 'basic' }\n});\n\n const rootRef = ref<HTMLDivElement>(null);\n const containerWidth = ref(0);\n\n const isBelowBreakpoint = computed(() => containerWidth.value < WIDTH_BREAKPOINT);\n\n const imageVariant = computed<BentoEmptyStateImageVariant>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return isBelowBreakpoint.value ? BentoEmptyStateImageVariant.SMALL : BentoEmptyStateImageVariant.LARGE;\n case BentoEmptyStateVariant.EMBEDDED:\n return isBelowBreakpoint.value ? null : BentoEmptyStateImageVariant.SMALL;\n default:\n return null;\n }\n });\n\n const imageSvg = ref('');\n\n watch(\n [() => props.image, imageVariant],\n async () => {\n if (props.image && imageVariant.value) {\n // rollup only supports one variable in a dynamic path\n /* v8 ignore next 4 */\n if (imageVariant.value === 'small') {\n imageSvg.value = (await import(`./assets/small/${props.image}.svg`)).default;\n } else {\n imageSvg.value = (await import(`./assets/large/${props.image}.svg`)).default;\n }\n }\n },\n { immediate: true }\n );\n\n const imageConditionalClasses = computed(() => ({\n 'b-empty-state__image--small': imageVariant.value === 'small',\n 'b-empty-state__image--large': imageVariant.value === 'large',\n }));\n\n const HEADING_ELEMENT_MAP = {\n [BentoEmptyStateVariant.FULL_PAGE]: 'h2',\n [BentoEmptyStateVariant.EMBEDDED]: 'h3',\n [BentoEmptyStateVariant.BASIC]: 'h3',\n [BentoEmptyStateVariant.CONDENSED]: 'div',\n };\n\n const headingElement = computed(\n () => (props.headingEl || HEADING_ELEMENT_MAP[props.variant]) as BentoTypographyElement\n );\n\n const headingProps = computed(() => ({\n el: headingElement.value,\n medium: props.variant !== BentoEmptyStateVariant.CONDENSED,\n strongest: props.variant === BentoEmptyStateVariant.CONDENSED,\n variant: (props.variant === BentoEmptyStateVariant.CONDENSED ? 'body' : 'title') as BentoTypographyVariant,\n }));\n\n const actionVariant = computed<`${BentoButtonVariant}`>(() => {\n switch (props.variant) {\n case BentoEmptyStateVariant.FULL_PAGE:\n return 'primary';\n case BentoEmptyStateVariant.CONDENSED:\n return 'tertiary';\n default:\n return 'secondary';\n }\n });\n\n // Lifecycle\n watch(rootRef, () => {\n // Use ResizeObserver so that image is only fetched if needed (visible).\n observeSizeOfElement(rootRef.value, () => {\n if (rootRef.value) {\n containerWidth.value = rootRef.value.offsetWidth;\n }\n });\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Empty states are moments in the user experience when there is nothing to display.\n * This component can be used to provide:\n * - Information about system status\n * - Contextual learning cues\n * - Direct pathways for key tasks\n *\n * @example\n * import { BentoEmptyState } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoEmptyState },\n * template: `\n * <bento-empty-state\n * title=\"No results were found\"\n * image=\"no-results-found\"\n * variant=\"full-page\"\n * :action=\"{ title: 'Reset filters', event: () => {} }\"\n * >\n * Try a different term or reset search filters\n * </bento-empty-state>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./empty-state.scss\" />\n"],"names":["BentoEmptyStateVariant","BentoEmptyStateVariant2","BentoEmptyStateImage","BentoEmptyStateImage2","BentoEmptyStateImageVariant","BentoEmptyStateImageVariant2","__default__","WIDTH_BREAKPOINT","rootRef","ref","containerWidth","isBelowBreakpoint","computed","imageVariant","props","imageSvg","watch","__variableDynamicImportRuntimeHelper","imageConditionalClasses","HEADING_ELEMENT_MAP","headingElement","headingProps","actionVariant","observeSizeOfElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,YAAA,aAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,wBAAA,0BACAA,EAAA,eAAA,gBACAA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,mBAAA,oBACA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AuB,MAAAE,EAAA,aAAAK,EAAAL,EAAA,OAAA;AAAA,IACwC,GAG/DO,IAAAT,EAAA,OAAA;AAAA,MAAqC,IAAAQ,EAAA;AAAA,MACd,QAAAN,EAAA,YAAAd,EAAA;AAAA,MAC8B,WAAAc,EAAA,YAAAd,EAAA;AAAA,MACG,SAAAc,EAAA,YAAAd,EAAA,YAAA,SAAA;AAAA,IACoB,EAAA,GAG5EsB,IAAAV,EAAA,MAAA;AACI,cAAAE,EAAA,SAAA;AAAA,QAAuB,KAAAd,EAAA;AAEf,iBAAA;AAAA,QAAO,KAAAA,EAAA;AAEP,iBAAA;AAAA,QAAO;AAEP,iBAAA;AAAA,MAAO;AAAA,IACf,CAAA;AAIJ,WAAAgB,EAAAR,GAAA,MAAA;AAEI,MAAAe,EAAAf,EAAA,OAAA,MAAA;AACI,QAAAA,EAAA,UACIE,EAAA,QAAAF,EAAA,MAAA;AAAA,MACJ,CAAA;AAAA,IACH,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,160 @@
1
+ import { defineComponent as s, computed as i } from "vue";
2
+ import { B as p } from "./info-icon.DCR42Kvm.js";
3
+ import { B as a } from "./typography.C8lPlsbD.js";
4
+ import { u as n } from "./index.B6WW_F-J.js";
5
+ import { n as l } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
+ import { C as _ } from "./cross-circle-fill.DTDtgLMf.js";
7
+ import "../assets/error-message.css";
8
+ const c = {
9
+ "de-DE": {
10
+ optional: "optional"
11
+ },
12
+ "en-GB": {
13
+ optional: "optional"
14
+ },
15
+ "en-US": {
16
+ optional: "optional"
17
+ },
18
+ "es-ES": {
19
+ optional: "opcional"
20
+ },
21
+ "es-MX": {
22
+ optional: "opcional"
23
+ },
24
+ "fr-FR": {
25
+ optional: "facultatif"
26
+ },
27
+ "it-IT": {
28
+ optional: "opzionale"
29
+ },
30
+ "ja-JP": {
31
+ optional: "オプション"
32
+ },
33
+ "pt-BR": {
34
+ optional: "opcional"
35
+ },
36
+ "zh-CN": {
37
+ optional: "可选"
38
+ }
39
+ }, f = {
40
+ i18n: { messages: c }
41
+ }, d = /* @__PURE__ */ s({
42
+ ...f,
43
+ __name: "field-label",
44
+ props: {
45
+ /**
46
+ * Renders the dropdown with a condensed style.
47
+ */
48
+ condensed: { type: Boolean, default: !1 },
49
+ /**
50
+ * Field label
51
+ */
52
+ label: {
53
+ type: String,
54
+ default: null
55
+ },
56
+ /**
57
+ * Sets the field as optional
58
+ */
59
+ optional: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ /**
64
+ * Sets the field as required
65
+ */
66
+ required: {
67
+ type: Boolean,
68
+ default: !1
69
+ },
70
+ /**
71
+ * Adds a info icon next to the label to display the passed tooltip message.
72
+ */
73
+ tooltipText: {
74
+ type: String,
75
+ default: null
76
+ }
77
+ },
78
+ setup(t) {
79
+ const e = t, { t: o } = n(), r = i(() => ({ "b-field-label--condensed": e.condensed }));
80
+ return { __sfc: !0, props: e, t: o, conditionalClasses: r, BentoInfoIcon: p, BentoTypography: a };
81
+ }
82
+ });
83
+ var u = function() {
84
+ var e = this, o = e._self._c, r = e._self._setupProxy;
85
+ return o("label", { staticClass: "b-field-label", class: r.conditionalClasses }, [o(r.BentoTypography, { attrs: { el: "span", stronger: "" } }, [e.label ? [e._v(e._s(e.label))] : [e._t("default")]], 2), e.tooltipText ? o(r.BentoTypography, { staticClass: "b-field-label__tooltip-wrapper", attrs: { el: "span" } }, [o(r.BentoInfoIcon, { staticClass: "b-field-label__tooltip", attrs: { "tooltip-text": e.tooltipText } })], 1) : e._e(), e.required ? o(r.BentoTypography, { staticClass: "b-field-label__requirement", attrs: { el: "span" } }, [e._v("*")]) : e.optional ? o(r.BentoTypography, { staticClass: "b-field-label__requirement", attrs: { el: "span" } }, [e._v("(" + e._s(r.t("optional")) + ")")]) : e._e()], 1);
86
+ }, m = [], b = /* @__PURE__ */ l(
87
+ d,
88
+ u,
89
+ m,
90
+ !1,
91
+ null,
92
+ "edb5ff41"
93
+ );
94
+ const $ = b.exports, g = {
95
+ "de-DE": {
96
+ error: "Fehler"
97
+ },
98
+ "en-GB": {
99
+ error: "Error"
100
+ },
101
+ "en-US": {
102
+ error: "Error"
103
+ },
104
+ "es-ES": {
105
+ error: "Error"
106
+ },
107
+ "es-MX": {
108
+ error: "Error"
109
+ },
110
+ "fr-FR": {
111
+ error: "Erreur"
112
+ },
113
+ "it-IT": {
114
+ error: "Errore"
115
+ },
116
+ "ja-JP": {
117
+ error: "エラー"
118
+ },
119
+ "pt-BR": {
120
+ error: "Erro"
121
+ },
122
+ "zh-CN": {
123
+ error: "错误"
124
+ }
125
+ }, y = {
126
+ i18n: { messages: g },
127
+ name: "error-message"
128
+ }, C = /* @__PURE__ */ s({
129
+ ...y,
130
+ props: {
131
+ /**
132
+ * The rendered error message
133
+ */
134
+ errorMessage: {
135
+ type: String,
136
+ required: !0
137
+ }
138
+ },
139
+ setup(t) {
140
+ const { t: e } = n();
141
+ return { __sfc: !0, t: e, BentoTypography: a, CrossCircleIcon: _ };
142
+ }
143
+ });
144
+ var v = function() {
145
+ var e = this, o = e._self._c, r = e._self._setupProxy;
146
+ return o(r.BentoTypography, { staticClass: "b-error-message", attrs: { id: e.$attrs.id, el: "span", "aria-live": "polite" } }, [o("div", { staticClass: "b-error-message__icon" }, [o(r.CrossCircleIcon, { attrs: { "svg-title": r.t("error") } })], 1), e._v(" " + e._s(e.errorMessage) + " ")]);
147
+ }, B = [], E = /* @__PURE__ */ l(
148
+ C,
149
+ v,
150
+ B,
151
+ !1,
152
+ null,
153
+ "2490b85a"
154
+ );
155
+ const R = E.exports;
156
+ export {
157
+ R as E,
158
+ $ as F
159
+ };
160
+ //# sourceMappingURL=error-message.BUNKRa_w.js.map