@adyen/bento-vue2 2.0.1 → 2.1.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.
- package/README.md +2 -2
- package/dist/@types/index.d.ts +114 -82
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chip.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.B7lteJBu.js → accordion-item.C158YxId.js} +5 -5
- package/dist/chunks/{accordion-item.B7lteJBu.js.map → accordion-item.C158YxId.js.map} +1 -1
- package/dist/chunks/{action-bar.BsXW7BI2.js → action-bar.D29UQHoA.js} +15 -15
- package/dist/chunks/{action-bar.BsXW7BI2.js.map → action-bar.D29UQHoA.js.map} +1 -1
- package/dist/chunks/{ai-button.BnFk5CzK.js → ai-button.qEaHYybv.js} +3 -3
- package/dist/chunks/{ai-button.BnFk5CzK.js.map → ai-button.qEaHYybv.js.map} +1 -1
- package/dist/chunks/{ai-tag.D2Q0xhFK.js → ai-tag.BLi-Xoh_.js} +3 -3
- package/dist/chunks/{ai-tag.D2Q0xhFK.js.map → ai-tag.BLi-Xoh_.js.map} +1 -1
- package/dist/chunks/{alert.DJDHwVeR.js → alert.BddJPWMN.js} +3 -3
- package/dist/chunks/{alert.DJDHwVeR.js.map → alert.BddJPWMN.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.BbvghQxZ.js → anchor-scroller.Clb_9RNz.js} +5 -5
- package/dist/chunks/{anchor-scroller.BbvghQxZ.js.map → anchor-scroller.Clb_9RNz.js.map} +1 -1
- package/dist/chunks/{avatar.CxPKc8Gy.js → avatar.BN4MI-42.js} +2 -2
- package/dist/chunks/{avatar.CxPKc8Gy.js.map → avatar.BN4MI-42.js.map} +1 -1
- package/dist/chunks/{base-button.DOhHyU7x.js → base-button.DYroENBg.js} +3 -3
- package/dist/chunks/{base-button.DOhHyU7x.js.map → base-button.DYroENBg.js.map} +1 -1
- package/dist/chunks/{base-modal.CcmoTJdc.js → base-modal._-Cc6jfi.js} +6 -6
- package/dist/chunks/{base-modal.CcmoTJdc.js.map → base-modal._-Cc6jfi.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BY394ars.js → button-actions-with-menu.1vZJWN1K.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BY394ars.js.map → button-actions-with-menu.1vZJWN1K.js.map} +1 -1
- package/dist/chunks/{button-actions.bkcLUE1G.js → button-actions.CdetBz3J.js} +8 -8
- package/dist/chunks/button-actions.CdetBz3J.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.DII5Ifwa.js → button.tsTeQRcP.js} +3 -3
- package/dist/chunks/{button.DII5Ifwa.js.map → button.tsTeQRcP.js.map} +1 -1
- package/dist/chunks/{calendar.CXdLEeN4.js → calendar.BalfhApP.js} +293 -290
- package/dist/chunks/calendar.BalfhApP.js.map +1 -0
- package/dist/chunks/{card.BmpB0VbL.js → card.BhhC01dV.js} +7 -7
- package/dist/chunks/{card.BmpB0VbL.js.map → card.BhhC01dV.js.map} +1 -1
- package/dist/chunks/{checkbox-group.D1uyc3z3.js → checkbox-group.C-1v4X3c.js} +4 -4
- package/dist/chunks/{checkbox-group.D1uyc3z3.js.map → checkbox-group.C-1v4X3c.js.map} +1 -1
- package/dist/chunks/{checkbox.D5xZ5Nnh.js → checkbox.CnuIUi4-.js} +6 -6
- package/dist/chunks/{checkbox.D5xZ5Nnh.js.map → checkbox.CnuIUi4-.js.map} +1 -1
- package/dist/chunks/{chip.DRsJylWl.js → chip.Cc4f2vws.js} +14 -12
- package/dist/chunks/{chip.DRsJylWl.js.map → chip.Cc4f2vws.js.map} +1 -1
- package/dist/chunks/{code-snippet.CnThWqVb.js → code-snippet.Bkd8R0vf.js} +6 -6
- package/dist/chunks/{code-snippet.CnThWqVb.js.map → code-snippet.Bkd8R0vf.js.map} +1 -1
- package/dist/chunks/{controls-group.fdGc6epa.js → controls-group.Bku83Fm_.js} +3 -3
- package/dist/chunks/{controls-group.fdGc6epa.js.map → controls-group.Bku83Fm_.js.map} +1 -1
- package/dist/chunks/{copy.CSk1rCRo.js → copy.B12-P_8A.js} +3 -3
- package/dist/chunks/{copy.CSk1rCRo.js.map → copy.B12-P_8A.js.map} +1 -1
- package/dist/chunks/{country.UZbwr635.js → country._NpkT-91.js} +2 -2
- package/dist/chunks/{country.UZbwr635.js.map → country._NpkT-91.js.map} +1 -1
- package/dist/chunks/country.types.BCOrkmVK.js.map +1 -1
- package/dist/chunks/{currency.POwX-Trj.js → currency.BXsSGoWa.js} +4 -4
- package/dist/chunks/{currency.POwX-Trj.js.map → currency.BXsSGoWa.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CYEoNH9Q.js → dashboard-section.yS2FNoIV.js} +3 -3
- package/dist/chunks/{dashboard-section.CYEoNH9Q.js.map → dashboard-section.yS2FNoIV.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CzKc-fJW.js → dashed-underline.RcRbre03.js} +4 -4
- package/dist/chunks/{dashed-underline.CzKc-fJW.js.map → dashed-underline.RcRbre03.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DCwzh2G7.js → data-grid-template.B5A9whlD.js} +4 -4
- package/dist/chunks/{data-grid-template.DCwzh2G7.js.map → data-grid-template.B5A9whlD.js.map} +1 -1
- package/dist/chunks/{data-grid.CMxQpfrY.js → data-grid.Pg5iM8CJ.js} +25 -25
- package/dist/chunks/{data-grid.CMxQpfrY.js.map → data-grid.Pg5iM8CJ.js.map} +1 -1
- package/dist/chunks/{date-picker.gDsw8bn1.js → date-picker.RFus1MVJ.js} +9 -9
- package/dist/chunks/{date-picker.gDsw8bn1.js.map → date-picker.RFus1MVJ.js.map} +1 -1
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date-range-picker.CqixIJxG.js → date-range-picker.B2B4hO6R.js} +411 -370
- package/dist/chunks/date-range-picker.B2B4hO6R.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date-time-picker.Bktntun4.js → date-time-picker.DJxDa81N.js} +6 -6
- package/dist/chunks/{date-time-picker.Bktntun4.js.map → date-time-picker.DJxDa81N.js.map} +1 -1
- package/dist/chunks/{date.CPo8t1n9.js → date.P3Xx7JdV.js} +2 -2
- package/dist/chunks/{date.CPo8t1n9.js.map → date.P3Xx7JdV.js.map} +1 -1
- package/dist/chunks/{dialog-page.Bct3zOQO.js → dialog-page.DORdXmEm.js} +3 -3
- package/dist/chunks/{dialog-page.Bct3zOQO.js.map → dialog-page.DORdXmEm.js.map} +1 -1
- package/dist/chunks/{draggable-handle.DgVdGC1V.js → draggable-handle.BM07OVdH.js} +2 -2
- package/dist/chunks/{draggable-handle.DgVdGC1V.js.map → draggable-handle.BM07OVdH.js.map} +1 -1
- package/dist/chunks/{draggable.DYKdXdbj.js → draggable.BczXedk7.js} +59 -56
- package/dist/chunks/draggable.BczXedk7.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Dk7SooVv.js → dropdown-tag.BmUNKoNw.js} +7 -7
- package/dist/chunks/{dropdown-tag.Dk7SooVv.js.map → dropdown-tag.BmUNKoNw.js.map} +1 -1
- package/dist/chunks/{dropdown.Bnq4kP7k.js → dropdown.CpZQYisR.js} +9 -9
- package/dist/chunks/{dropdown.Bnq4kP7k.js.map → dropdown.CpZQYisR.js.map} +1 -1
- package/dist/chunks/{empty-state.C2wjdE3y.js → empty-state.L3DTfiY7.js} +4 -4
- package/dist/chunks/{empty-state.C2wjdE3y.js.map → empty-state.L3DTfiY7.js.map} +1 -1
- package/dist/chunks/{error-message.DKnoUezI.js → error-message.B-n8wzFo.js} +2 -2
- package/dist/chunks/{error-message.DKnoUezI.js.map → error-message.B-n8wzFo.js.map} +1 -1
- package/dist/chunks/es6.yPcTMnSH.js.map +1 -1
- package/dist/chunks/{field-label.C7BCsofY.js → field-label.BQaDr37D.js} +3 -3
- package/dist/chunks/{field-label.C7BCsofY.js.map → field-label.BQaDr37D.js.map} +1 -1
- package/dist/chunks/{file-uploader.DllKBmP8.js → file-uploader.Bo17jWtf.js} +11 -11
- package/dist/chunks/{file-uploader.DllKBmP8.js.map → file-uploader.Bo17jWtf.js.map} +1 -1
- package/dist/chunks/{filter-bar.D7Lk7wlq.js → filter-bar.Bio9nf9V.js} +28 -27
- package/dist/chunks/filter-bar.Bio9nf9V.js.map +1 -0
- package/dist/chunks/{fixed-scroller.YC4bZifw.js → fixed-scroller.CHmrgoTQ.js} +2 -2
- package/dist/chunks/{fixed-scroller.YC4bZifw.js.map → fixed-scroller.CHmrgoTQ.js.map} +1 -1
- package/dist/chunks/{footer-actions.C9STwwcv.js → footer-actions.B8f-gEQV.js} +4 -4
- package/dist/chunks/{footer-actions.C9STwwcv.js.map → footer-actions.B8f-gEQV.js.map} +1 -1
- package/dist/chunks/{form-layout-group.D4T0Z5xk.js → form-layout-group.BSC2esG8.js} +2 -2
- package/dist/chunks/{form-layout-group.D4T0Z5xk.js.map → form-layout-group.BSC2esG8.js.map} +1 -1
- package/dist/chunks/{form-layout-title.C0lwzPZz.js → form-layout-title.b2BMYjnl.js} +3 -3
- package/dist/chunks/{form-layout-title.C0lwzPZz.js.map → form-layout-title.b2BMYjnl.js.map} +1 -1
- package/dist/chunks/{header-with-views.BqobE7IF.js → header-with-views.BJCjvhem.js} +16 -16
- package/dist/chunks/{header-with-views.BqobE7IF.js.map → header-with-views.BJCjvhem.js.map} +1 -1
- package/dist/chunks/{header.CmyqVXuG.js → header.CDiold9n.js} +5 -5
- package/dist/chunks/{header.CmyqVXuG.js.map → header.CDiold9n.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.BvYyGm4D.js → info-icon-with-popover.BzGVcMqy.js} +3 -3
- package/dist/chunks/{info-icon-with-popover.BvYyGm4D.js.map → info-icon-with-popover.BzGVcMqy.js.map} +1 -1
- package/dist/chunks/{info-icon.B-FAeceD.js → info-icon.D11usblr.js} +2 -2
- package/dist/chunks/{info-icon.B-FAeceD.js.map → info-icon.D11usblr.js.map} +1 -1
- package/dist/chunks/{input-field-password.9bWhLud0.js → input-field-password.D4Jn2yCi.js} +6 -6
- package/dist/chunks/{input-field-password.9bWhLud0.js.map → input-field-password.D4Jn2yCi.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CCn1N9St.js → input-field-phone-number.lV7yePoJ.js} +3 -3
- package/dist/chunks/{input-field-phone-number.CCn1N9St.js.map → input-field-phone-number.lV7yePoJ.js.map} +1 -1
- package/dist/chunks/{input-field.D912rZS_.js → input-field.90DWNO1a.js} +7 -7
- package/dist/chunks/{input-field.D912rZS_.js.map → input-field.90DWNO1a.js.map} +1 -1
- package/dist/chunks/input-time.D7IsprlH.js +157 -0
- package/dist/chunks/input-time.D7IsprlH.js.map +1 -0
- package/dist/chunks/{inspector-page.BRC_7uro.js → inspector-page.IoC9naSV.js} +4 -4
- package/dist/chunks/{inspector-page.BRC_7uro.js.map → inspector-page.IoC9naSV.js.map} +1 -1
- package/dist/chunks/{inspector.IOtNex1r.js → inspector.BwtV4rE9.js} +5 -5
- package/dist/chunks/{inspector.IOtNex1r.js.map → inspector.BwtV4rE9.js.map} +1 -1
- package/dist/chunks/{layout-row.LBn6aJv4.js → layout-row.DYx7F4cb.js} +2 -2
- package/dist/chunks/{layout-row.LBn6aJv4.js.map → layout-row.DYx7F4cb.js.map} +1 -1
- package/dist/chunks/{link.Cls8XShm.js → link.iNnolG9W.js} +2 -2
- package/dist/chunks/{link.Cls8XShm.js.map → link.iNnolG9W.js.map} +1 -1
- package/dist/chunks/{list-item.HjabBEb8.js → list-item.ByyA5h1d.js} +5 -5
- package/dist/chunks/{list-item.HjabBEb8.js.map → list-item.ByyA5h1d.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DhNxvqRO.js → listbox-option-tag.Cp_W_p4z.js} +3 -3
- package/dist/chunks/{listbox-option-tag.DhNxvqRO.js.map → listbox-option-tag.Cp_W_p4z.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Bi1bQs4Z.js → modal-fullscreen.DG8Q-jHL.js} +9 -9
- package/dist/chunks/modal-fullscreen.DG8Q-jHL.js.map +1 -0
- package/dist/chunks/{modal.B3-pmL5s.js → modal.UkzON4bz.js} +7 -7
- package/dist/chunks/{modal.B3-pmL5s.js.map → modal.UkzON4bz.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.BnHdXODQ.js → navigation-menu-group.BzKRuhrd.js} +8 -8
- package/dist/chunks/navigation-menu-group.BzKRuhrd.js.map +1 -0
- package/dist/chunks/{pagination.cI_pc6oE.js → pagination.DZEVT-CA.js} +8 -7
- package/dist/chunks/{pagination.cI_pc6oE.js.map → pagination.DZEVT-CA.js.map} +1 -1
- package/dist/chunks/{payment-method.DcAITDcK.js → payment-method.meF6XN_X.js} +2 -2
- package/dist/chunks/{payment-method.DcAITDcK.js.map → payment-method.meF6XN_X.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/popover.types.DvIwSAAp.js.map +1 -1
- package/dist/chunks/popper-container.Cj3AWXSd.js.map +1 -1
- package/dist/chunks/{progress-bar.RlF3a0Gb.js → progress-bar.CaurNYsc.js} +4 -4
- package/dist/chunks/{progress-bar.RlF3a0Gb.js.map → progress-bar.CaurNYsc.js.map} +1 -1
- package/dist/chunks/{promo-banner.B5szTysj.js → promo-banner.CcYpFY9b.js} +3 -3
- package/dist/chunks/{promo-banner.B5szTysj.js.map → promo-banner.CcYpFY9b.js.map} +1 -1
- package/dist/chunks/{radio-group.CvsQDlHi.js → radio-group.CLbYlzD7.js} +5 -5
- package/dist/chunks/{radio-group.CvsQDlHi.js.map → radio-group.CLbYlzD7.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.rXoS7KGY.js → rich-text-editor.5SMm2BbC.js} +11 -11
- package/dist/chunks/{rich-text-editor.rXoS7KGY.js.map → rich-text-editor.5SMm2BbC.js.map} +1 -1
- package/dist/chunks/{scroll-to-section.DhW8SFy0.js → scroll-to-section.CzeBpNj4.js} +2 -2
- package/dist/chunks/{scroll-to-section.DhW8SFy0.js.map → scroll-to-section.CzeBpNj4.js.map} +1 -1
- package/dist/chunks/{search-bar.--4KVNkf.js → search-bar.DrIwlAQj.js} +8 -8
- package/dist/chunks/{search-bar.--4KVNkf.js.map → search-bar.DrIwlAQj.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CgdV0QwZ.js → secondary-nav.DRs5yAve.js} +16 -16
- package/dist/chunks/{secondary-nav.CgdV0QwZ.js.map → secondary-nav.DRs5yAve.js.map} +1 -1
- package/dist/chunks/{segmented-control.nYpRQTGc.js → segmented-control.CcQoBTfT.js} +3 -3
- package/dist/chunks/{segmented-control.nYpRQTGc.js.map → segmented-control.CcQoBTfT.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.CmDuj1c7.js → selection-card-group.BYBAG8ig.js} +49 -48
- package/dist/chunks/{selection-card-group.CmDuj1c7.js.map → selection-card-group.BYBAG8ig.js.map} +1 -1
- package/dist/chunks/{sidepanel.CntIcmx-.js → sidepanel.CLbVkH7v.js} +14 -14
- package/dist/chunks/{sidepanel.CntIcmx-.js.map → sidepanel.CLbVkH7v.js.map} +1 -1
- package/dist/chunks/{status.DJ1Dfh5s.js → status.BdWYs5MK.js} +2 -2
- package/dist/chunks/{status.DJ1Dfh5s.js.map → status.BdWYs5MK.js.map} +1 -1
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
- package/dist/chunks/{step.BCa9IOWB.js → step.SkRHgSxN.js} +5 -5
- package/dist/chunks/step.SkRHgSxN.js.map +1 -0
- package/dist/chunks/{structured-list-item.Bhe0CH1M.js → structured-list-item.BgcR0XlO.js} +10 -9
- package/dist/chunks/structured-list-item.BgcR0XlO.js.map +1 -0
- package/dist/chunks/{summary-grid.types.C70ED6WD.js → summary-grid.types.Do2PZQGm.js} +6 -6
- package/dist/chunks/{summary-grid.types.C70ED6WD.js.map → summary-grid.types.Do2PZQGm.js.map} +1 -1
- package/dist/chunks/{tab.BK1sIJAJ.js → tab.zeRxc-3T.js} +49 -48
- package/dist/chunks/tab.zeRxc-3T.js.map +1 -0
- package/dist/chunks/{table-of-contents.BTy95Rrs.js → table-of-contents.D4sF13f8.js} +3 -3
- package/dist/chunks/{table-of-contents.BTy95Rrs.js.map → table-of-contents.D4sF13f8.js.map} +1 -1
- package/dist/chunks/{tag.Dz1FQSZb.js → tag.CgsX8v2m.js} +3 -3
- package/dist/chunks/{tag.Dz1FQSZb.js.map → tag.CgsX8v2m.js.map} +1 -1
- package/dist/chunks/{textarea.CcV9U3I7.js → textarea.DMBnJaB1.js} +7 -7
- package/dist/chunks/textarea.DMBnJaB1.js.map +1 -0
- package/dist/chunks/{timeline-item.BG2by0xf.js → timeline-item.CS7TCdoU.js} +10 -10
- package/dist/chunks/{timeline-item.BG2by0xf.js.map → timeline-item.CS7TCdoU.js.map} +1 -1
- package/dist/chunks/{title-details.ChwPP7C5.js → title-details.BhR2nis-.js} +4 -4
- package/dist/chunks/{title-details.ChwPP7C5.js.map → title-details.BhR2nis-.js.map} +1 -1
- package/dist/chunks/{toast.CO6ByH3n.js → toast.CjDkuh2x.js} +4 -4
- package/dist/chunks/{toast.CO6ByH3n.js.map → toast.CjDkuh2x.js.map} +1 -1
- package/dist/chunks/{toggle.Dgh7aw1D.js → toggle.BL_w2xUm.js} +4 -4
- package/dist/chunks/{toggle.Dgh7aw1D.js.map → toggle.BL_w2xUm.js.map} +1 -1
- package/dist/chunks/{tooltip.DFYc5NKM.js → tooltip.BOe7LOfD.js} +2 -2
- package/dist/chunks/{tooltip.DFYc5NKM.js.map → tooltip.BOe7LOfD.js.map} +1 -1
- package/dist/chunks/{tutorial.K0aOQWIg.js → tutorial.DSbBx_2h.js} +3 -3
- package/dist/chunks/{tutorial.K0aOQWIg.js.map → tutorial.DSbBx_2h.js.map} +1 -1
- package/dist/chunks/{typography.D1OZJbEa.js → typography.Cd386LC_.js} +5 -5
- package/dist/chunks/{typography.D1OZJbEa.js.map → typography.Cd386LC_.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.A5xraVqa.js → use-bento-toast-controller.DMA9d_oD.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.A5xraVqa.js.map → use-bento-toast-controller.DMA9d_oD.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.MgbFwUqJ.js → use-date-input-formatter.CouOE5tF.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.MgbFwUqJ.js.map → use-date-input-formatter.CouOE5tF.js.map} +1 -1
- package/dist/chunks/{use-dynamic-date-fns-locale.Bpb2DeYR.js → use-dynamic-date-fns-locale.DGqfz_nF.js} +2 -2
- package/dist/chunks/{use-dynamic-date-fns-locale.Bpb2DeYR.js.map → use-dynamic-date-fns-locale.DGqfz_nF.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +1 -1
- package/dist/date.js +1 -1
- package/dist/draggable.js +2 -2
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +177 -152
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/inspector.js +2 -2
- package/dist/internal.js +14 -14
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/progress-bar.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +3 -0
- package/dist/styles/bento-light.css +3 -0
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/styles/utility.css +9 -0
- package/dist/summary-grid.js +1 -1
- package/dist/table-of-contents.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1278 -46
- package/package.json +9 -9
- package/dist/chunks/button-actions.bkcLUE1G.js.map +0 -1
- package/dist/chunks/calendar.CXdLEeN4.js.map +0 -1
- package/dist/chunks/date-range-picker.CqixIJxG.js.map +0 -1
- package/dist/chunks/draggable.DYKdXdbj.js.map +0 -1
- package/dist/chunks/filter-bar.D7Lk7wlq.js.map +0 -1
- package/dist/chunks/input-time.CXMuvF9N.js +0 -105
- package/dist/chunks/input-time.CXMuvF9N.js.map +0 -1
- package/dist/chunks/modal-fullscreen.Bi1bQs4Z.js.map +0 -1
- package/dist/chunks/navigation-menu-group.BnHdXODQ.js.map +0 -1
- package/dist/chunks/step.BCa9IOWB.js.map +0 -1
- package/dist/chunks/structured-list-item.Bhe0CH1M.js.map +0 -1
- package/dist/chunks/tab.BK1sIJAJ.js.map +0 -1
- package/dist/chunks/textarea.CcV9U3I7.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.Bnq4kP7k.js","sources":["../../src/composables/use-checkbox-select-all/use-checkbox-select-all.ts","../../src/composables/use-virtual-list/use-virtual-list.ts","../../src/types/listbox.ts","../../src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue","../../src/components/internal/listbox/components/listbox-option/listbox-option.vue","../../../ui-assets/icons-16/dist/vue/checkmark.vue","../../src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue","../../src/components/internal/listbox/composables/useListboxKeyboardNavigation.ts","../../src/components/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options.ts","../../src/utils/ts/get-listbox-option-id/get-listbox-option-id.ts","../../src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue","../../../ui-assets/icons-16/dist/vue/double-checkmark-small.vue","../../src/components/internal/decorative-checkbox/decorative-checkbox.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.ts","../../src/components/internal/listbox/components/listbox-lazy-load/listbox-lazy-load.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-nested-lazy-load/listbox-multi-select-nested-lazy-load.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue","../../src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.ts","../../src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue","../../src/utils/ts/debounce/debounce.ts","../../src/components/internal/listbox/listbox.vue","../../src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.ts","../../src/components/dropdown/dropdown.internal.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.internal.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/dropdown.keys.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.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/dropdown/dropdown.vue"],"sourcesContent":["import { computed } from 'vue';\nimport type { ComputedRef } from 'vue';\nimport type { Fn } from '@/types/functions';\nimport type { BentoListboxOptions } from '@/types/listbox';\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback selectAllCallback\n */\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback unselectAllCallback\n */\n\n/**\n * @typedef {Object} UseCheckboxSelectAll\n * @property {Ref<boolean>} isAllSelected - Indicates if all values are selected. Pass this to the :value property.\n * @property {Ref<boolean>} isIndeterminate - Indicates if it is in an indeterminated state (not all values are selected nor unselected). Pass this to the :indeterminate property.\n * @property {(selectedValue: boolean) => void} toggleSelectAll - Handles the select all flow, selects or unselects all and nullifies the indeterminated state. Pass this to the @input method.\n */\n\n/**\n * Composable to handle a 3 way checkbox state that allows to manage\n * a \"select all\", \"unselect all\" and an intermediate state where\n * not all are selected.\n *\n * @example\n * const checkboxVModelRef = ref<number[]>([]);\n *\n * const { isAllSelected, isIndeterminate, toggleSelectAll, updateIndeterminate } = useCheckboxSelectAll(\n * checkboxVModelRef,\n * () => { checkboxVModelRef.value = [...] // select all logic },\n * () => { checkboxVModelRef.value = [] // unselect all logic },\n * );\n * toggleSelectAll(true|false); // Hook this to the @input method\n * updateIndeterminate(totalOfAvailableItems);\n *\n *\n * @param {ComputedRef<BentoListboxMultiSelectValue>} selectedItemsList - Reference to the list of selected values\n * @param {ComputedRef<BentoListboxOptions>} items - Reference to the list of all available items in the dropdown\n * @param {selectAllCallback} selectAll - Callback function that alllows to select all the items when called\n * @param {unselectAllCallback} unselectAll - Callback function that alllows to select all the items when called\n * @returns {UseCheckboxSelectAll} Values to be set to the bento-checkbox value and indeterminate props, as well as functions to update them accordingly\n *\n */\nexport const useCheckboxSelectAll = (\n selectedItemsList: ComputedRef<BentoListboxOptions>,\n items: ComputedRef<BentoListboxOptions>,\n selectAll: Fn,\n unselectAll: Fn\n) => {\n const isAllSelected = computed(\n () => !!selectedItemsList.value?.length && selectedItemsList.value?.length === items.value.length\n );\n const isIndeterminate = computed(() => {\n // eslint-disable-next-line eqeqeq\n if (selectedItemsList.value == undefined || selectedItemsList.value.length === 0) {\n return false;\n }\n\n return selectedItemsList.value?.length !== items.value.length;\n });\n\n const toggleSelectAll = (selectedValue: boolean) => {\n if (selectedValue) {\n selectAll();\n } else {\n unselectAll();\n }\n };\n\n return {\n isAllSelected,\n isIndeterminate,\n\n toggleSelectAll,\n };\n};\n","import { computed, onMounted, onUnmounted, type Ref, ref, type UnwrapRef, watch } from 'vue';\nimport type {\n UseVirtualListContainerProps,\n UseVirtualListOptions,\n UseVirtualListWrapperProps,\n} from './use-virtual-list.types';\nimport { observeSizeOfElement } from '../../utils/ts/resize';\n\n/**\n * Sets up a virtual scrolling functionality on a container element and a list of items to virtually scroll over.\n * This composables returns the containerProps and wrapperProps objects that should be v-binded onto the container and wrapper elements\n * of the list you wish to virtually scroll.\n *\n * This will return a filtered down list object the user can render based on how much the user has scrolled on the container.\n *\n * @usage\n * <template>\n * <div v-bind=\"containerProps\" @scroll=\"onScroll\">\n * <ul v-bind=\"wrapperProps\">\n * <li v-for=\"item in list\" :key=\"item.index\" style=\"height: 22px\">\n * {{ item.label }}\n * </li>\n * </ul>\n * </div>\n * </template>\n *\n * <script setup lang=\"ts\"\n * import { useVirtualList } from '@adyen/bento-vue2';\n *\n * const DEFAULT_OPTIONS: { label: string }[] = new Array(100)\n * .fill(0)\n * .map((_, index) => ({ label: `Option ${index + 1}` }));\n * const ITEMS = ref(DEFAULT_OPTIONS);\n * const ITEM_HEIGHT = 30;\n *\n * const { containerProps, wrapperProps, list, onScroll } = useVirtualList(ITEMS, { itemHeight: ITEM_HEIGHT });\n * </script>\n *\n *\n * @param items - a reference to a list of items to virtually scroll over.\n * @param options - customizes how the Virtual scroller list functions.\n * @param options.itemHeight - the height in pixel or a function that returns the height in pixels for each item.\n * @param options.overscan - number of pre-rendered DOM nodes. Prevents whitespace between items if you scroll very quickly.\n * @param options.prefixHeight - the prefix height of elements present the scrollable area but not present in the items property.\n * @param options.disabled - if set to true, disables the virtual scrolling functionality.\n */\nexport function useVirtualList<T>(\n items: Ref<Array<T>>,\n { disabled, itemHeight, overscan = 5, prefixHeight }: UseVirtualListOptions\n) {\n const containerRef: Ref<UnwrapRef<HTMLElement | null>> = ref<HTMLElement | null>(null);\n const list = ref<Array<T>>([]) as Ref<Array<T>>;\n const startIndex = ref(0);\n const endIndex = ref(0);\n const containerHeight = ref(0);\n let listObserver;\n\n const wrapperProps = computed<UseVirtualListWrapperProps>(() => {\n const totalHeight =\n typeof itemHeight === 'number'\n ? items.value.length * itemHeight\n : items.value.reduce((sum, _, index) => sum + itemHeight(index), 0);\n\n const offSetTop =\n typeof itemHeight === 'number'\n ? startIndex.value * itemHeight\n : items.value.slice(0, startIndex.value).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n return {\n style: {\n marginTop: `${offSetTop}px`,\n height: `${totalHeight - offSetTop}px`,\n },\n };\n });\n\n /**\n * Gets the offset for the first item to show within the visible area.\n * @returns offset number.\n */\n const getOffset = () => {\n const prefixHeightIfSet = prefixHeight?.value ?? 0;\n const scrollTop = Math.max(containerRef.value.scrollTop - prefixHeightIfSet, 0);\n if (typeof itemHeight === 'number') {\n return Math.floor(scrollTop / itemHeight);\n }\n\n let sum = 0;\n let offset = 0;\n\n for (let i = 0; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n if (sum >= scrollTop) {\n offset = i;\n break;\n }\n }\n return offset;\n };\n\n /**\n * Gets the visible number of items based on the container size and item heights.\n * @returns visible number of items.\n */\n const getVisibileNumberOfItems = () => {\n containerHeight.value = containerRef.value.clientHeight;\n if (typeof itemHeight === 'number') {\n return Math.ceil(containerHeight.value / itemHeight);\n }\n\n const start = startIndex.value ?? 0;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n capacity = i;\n if (sum > containerHeight.value) {\n break;\n }\n }\n return capacity - start;\n };\n\n const updateVisibleItems = () => {\n if (containerRef.value) {\n const visibleCount = getVisibileNumberOfItems();\n startIndex.value = getOffset();\n endIndex.value = Math.min(startIndex.value + visibleCount + overscan, items.value.length);\n list.value = items.value.slice(startIndex.value, endIndex.value);\n }\n };\n\n const onScroll = () => {\n updateVisibleItems();\n };\n\n if (!disabled) {\n onMounted(() => {\n if (containerRef.value) {\n containerHeight.value = containerRef.value.clientHeight;\n // When the listbox opens we need to update the height\n listObserver = observeSizeOfElement(containerRef.value, ({ clientHeight }) => {\n containerHeight.value = clientHeight;\n updateVisibleItems();\n });\n updateVisibleItems();\n }\n });\n\n onUnmounted(() => {\n listObserver?.disconnect();\n });\n\n watch(\n () => items.value,\n () => {\n updateVisibleItems();\n }\n );\n }\n\n const containerProps: UseVirtualListContainerProps = {\n ref: containerRef,\n style: { overflowY: 'auto' },\n };\n\n /**\n * Scrolls the container to ensure the item at the given index is visible.\n * Uses a scroll-into-view approach: only scrolls if the item is outside the current viewport.\n */\n const scrollToIndex = (index: number) => {\n if (!containerRef.value) {\n return;\n }\n\n const itemTop =\n typeof itemHeight === 'number'\n ? index * itemHeight\n : items.value.slice(0, index).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n const currentHeight = typeof itemHeight === 'number' ? itemHeight : itemHeight(index);\n const itemBottom = itemTop + currentHeight;\n\n const { scrollTop, clientHeight: viewportHeight } = containerRef.value;\n const viewportBottom = scrollTop + viewportHeight;\n\n if (itemBottom > viewportBottom) {\n containerRef.value.scrollTop = viewportHeight > 0 ? itemBottom - viewportHeight : itemTop;\n } else if (itemTop < scrollTop) {\n containerRef.value.scrollTop = itemTop;\n }\n\n updateVisibleItems();\n };\n\n if (disabled) {\n return {\n containerRef,\n containerProps,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onScroll: () => {},\n list: items,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n scrollToIndex: () => {},\n startIndex: ref(0),\n };\n }\n\n return {\n containerRef,\n containerProps,\n onScroll,\n list,\n wrapperProps,\n scrollToIndex,\n startIndex,\n };\n}\n","import { type BentoSearchBarItem } from '@/components/search-bar/search-bar.types';\nimport { type BentoEmptyStateProps } from '@/components/empty-state/empty-state.types';\nimport { type OmitStrict } from '@/types/omit-strict';\nimport { type BentoButtonActionObject } from '@/components/button/components/button-actions/button-actions.types';\nimport { type UseVirtualListItemHeight } from '@/composables/use-virtual-list/use-virtual-list.types';\n\nexport type BentoListboxValue = string | number;\n\nexport type BentoListboxMultiSelectValue = Array<BentoListboxValue>;\n\n/**\n * Event triggered to load more items lazily.\n */\nexport type BentoListboxLazyLoadEvent = ({\n value,\n index,\n}: {\n /**\n * Index of the option that triggered the lazy load event\n */\n index: number;\n\n /**\n * Value of the option that triggered the lazy load event\n */\n value: BentoListboxValue;\n}) => Promise<void>;\n\nexport interface BentoListboxOptionItem extends BentoSearchBarItem {\n data?: unknown;\n description?: string;\n value: BentoListboxValue;\n displayValue?: string;\n /**\n * Adds Lazy load functionality to the Nested multi-select options.\n * Only works when `items` is set.\n */\n lazyLoad?: {\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: boolean;\n\n /**\n * The event that triggers upon clicking the \"show more\" button\n * or by scrolling the listbox nested item group.\n */\n lazyLoadEvent: BentoListboxLazyLoadEvent;\n };\n items?: Array<BentoListboxOptionItem>; // Reference itself for multi-level options\n}\n\nexport interface BentoListboxSelectedValueLabelPair {\n value: BentoListboxOptionItem['value'];\n label: BentoListboxOptionItem['label'];\n}\n\nexport type BentoListboxSelectedValue =\n | BentoListboxValue\n | BentoListboxMultiSelectValue\n | BentoListboxSelectedValueLabelPair\n | Array<BentoListboxSelectedValueLabelPair>;\n\nexport type BentoListboxOptions = Array<BentoListboxOptionItem>;\n\nexport type BentoListboxIsOptionDisabled = undefined | ((optionValue: BentoListboxOptionItem) => boolean);\n\nexport enum BentoListboxEvent {\n SELECT = 'select',\n SHOW_MORE = 'show-more',\n ESCAPE = 'escape-pressed',\n CLICK = 'click',\n ENTER = 'enter-pressed',\n SPACE = 'space-pressed',\n TAB = 'tab-pressed',\n CLOSE_DROPDOWN = 'close-dropdown',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoListboxLazyLoadType {\n AUTOMATIC = 'automatic',\n BUTTON = 'button',\n NONE = 'none',\n}\n\nexport interface BentoListboxSearchOptions {\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * The event that triggers upon user filtering the listbox items.\n */\n searchEvent: (searchValue: string) => void;\n}\n\nexport type BentoListboxEmptyStateProps = { action: { icon?: any } & BentoButtonActionObject } & OmitStrict<\n BentoEmptyStateProps,\n 'variant' | 'image' | 'description'\n>;\n\nexport type BentoListboxVirtulisationOptions = boolean | { itemHeight: UseVirtualListItemHeight };\n\nexport type BentoListboxItemRole = 'treeitem' | 'option';\n","<template>\n <div class=\"b-listbox-single-select-category\" role=\"group\" :aria-label=\"categoryLabel\">\n <bento-typography\n variant=\"caption\"\n el=\"span\"\n class=\"b-listbox-single-select-category__label-text\"\n aria-hidden=\"true\"\n >\n {{ categoryLabel }}\n </bento-typography>\n <div>\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { BentoTypography } from '@/components/typography';\n\n export default defineComponent({\n name: 'bento-listbox-static-category',\n components: {\n BentoTypography,\n },\n props: {\n /**\n * Category label text\n */\n categoryLabel: {\n type: String,\n required: true,\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-category.scss\" />\n","<template>\n <div\n class=\"b-listbox-option\"\n role=\"option\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n @click=\"onClick\"\n @keydown.enter=\"onOptionSelected(BentoListboxEvent.ENTER, $event)\"\n @keydown.space=\"onOptionSelected(BentoListboxEvent.SPACE, $event)\"\n @keydown.tab=\"onOptionSelected(BentoListboxEvent.TAB, $event)\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoListboxEvent } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n /**\n * listbox option wrapper.\n * Contains only styles and allows the Multi-Select and Single-Select DRY the styles.\n *\n * Options and Attributes are inherited (`inheritAttrs: true`)\n *\n * @example\n * <bento-listbox-option\n * ...props\n * ...attrs\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-option',\n props: {\n /**\n * Indicates if the option is active.\n */\n active: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.CLICK, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-listbox-option--active': props.active,\n 'b-listbox-option--disabled': props.disabled,\n 'b-listbox-option--selected': props.selected,\n }));\n\n const onClick = (e: Event) => {\n emit(BentoListboxEvent.CLICK, e);\n };\n\n const onOptionSelected = (eventName, e: Event) => {\n emit(eventName, e);\n };\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Values\n conditionalClasses,\n\n // Events\n onClick,\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-option.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=\"M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <bento-listbox-option\n class=\"b-listbox-single-select-option\"\n :active=\"active\"\n :disabled=\"disabled\"\n :selected=\"selected\"\n :aria-selected=\"ariaSelected\"\n :aria-disabled=\"ariaDisabled\"\n :tabindex=\"tabIndex\"\n @click=\"onOptionSelected(BentoListboxEvent.SELECT)\"\n @enter-pressed=\"onOptionSelected(BentoListboxEvent.ENTER)\"\n @space-pressed.prevent=\"onOptionSelected(BentoListboxEvent.SPACE)\"\n @tab-pressed=\"onOptionSelected(BentoListboxEvent.TAB)\"\n >\n <slot v-bind=\"option\">\n <span class=\"b-listbox-single-select-option__text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"option.description\"\n class=\"b-listbox-single-select-option__description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n <span class=\"b-listbox-single-select-option__check-icon\">\n <checkmark-icon v-show=\"selected\" svg-title=\"selected\" />\n </span>\n </bento-listbox-option>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoListboxEvent, type BentoListboxOptionItem } from '@/types/listbox';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n\n /**\n * Listbox option element.\n *\n * @example\n * <bento-listbox-single-select-option\n * v-for=\"option in options\"\n * :key=\"option.value\"\n * :option=\"option\"\n * :selected=\"option.selected\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-single-select-option',\n components: {\n BentoListboxOption,\n BentoTypography,\n CheckmarkIcon,\n },\n props: {\n /**\n * Indicates if the option is active.\n */\n active: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.ENTER, BentoListboxEvent.SELECT, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const onOptionSelected = eventName => {\n if (props.disabled) {\n return;\n }\n\n /**\n * Trigerred when an option is clicked or selected via keyboard navigation.\n * Indicates which option was selected.\n *\n * @event {string} - The corresponding event\n * @property {number} selectedValue - Selected option's value\n */\n emit(eventName, props.option);\n };\n\n const ariaDisabled = computed(() => (props.disabled ? true : null));\n const ariaSelected = computed(() => (props.selected ? true : null));\n const tabIndex = computed(() => (props.disabled ? -1 : 0));\n\n return {\n // Values\n ariaDisabled,\n ariaSelected,\n tabIndex,\n\n // Enums\n BentoListboxEvent,\n\n // Events\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-option.scss\" />\n","import { computed, type Ref, ref } from 'vue';\n\nconst enum ListboxKeyboardNavigationMutationDirection {\n INCREASE = 'increase',\n DECREASE = 'decrease',\n}\n\nexport const useListboxKeyboardNavigation = (\n { items, totalItemCount }: { items: Ref<Array<HTMLElement>>; totalItemCount?: Ref<number> },\n focusItem: (index: number) => void\n) => {\n const lastItemIndex = computed(() => (totalItemCount?.value ? totalItemCount.value - 1 : items.value.length - 1));\n const focusedIndex = ref(0);\n\n const mutateFocusedIndex = (direction: ListboxKeyboardNavigationMutationDirection) => {\n switch (direction) {\n case ListboxKeyboardNavigationMutationDirection.INCREASE:\n focusedIndex.value += 1;\n break;\n case ListboxKeyboardNavigationMutationDirection.DECREASE:\n focusedIndex.value -= 1;\n break;\n default:\n break;\n }\n };\n\n const calculateFocusedIndex = ({ edgeCaseItem }, direction) => {\n const isEdgeCaseItem = focusedIndex.value === edgeCaseItem;\n if (isEdgeCaseItem) {\n return;\n }\n mutateFocusedIndex(direction);\n focusItem(focusedIndex.value);\n };\n\n const moveToNextElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow down to scroll down the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: lastItemIndex.value,\n },\n ListboxKeyboardNavigationMutationDirection.INCREASE\n );\n };\n\n const moveToPreviousElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow up to scroll up the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: 0,\n },\n ListboxKeyboardNavigationMutationDirection.DECREASE\n );\n };\n\n const moveToFirstElement = (event?: CustomEvent<KeyboardEvent>) => {\n preventDefault(event);\n focusedIndex.value = 0;\n focusItem(focusedIndex.value);\n };\n\n const moveToLastElement = (event?: CustomEvent<KeyboardEvent>) => {\n preventDefault(event);\n focusedIndex.value = lastItemIndex.value;\n focusItem(focusedIndex.value);\n };\n\n const setListboxFocusedIndex = (index: number) => {\n focusedIndex.value = index;\n };\n\n const preventDefault = (event?: CustomEvent<KeyboardEvent>) => {\n event?.detail?.preventDefault();\n event?.detail?.stopPropagation();\n };\n\n return {\n moveToFirstElement,\n moveToLastElement,\n moveToNextElement,\n moveToPreviousElement,\n setListboxFocusedIndex,\n preventDefault,\n focusedIndex,\n };\n};\n","import { type BentoListboxItemRole, type BentoListboxOptions } from '@/types/listbox';\nimport { nextTick, ref, type Ref, watch } from 'vue';\n\n/**\n * Composable that provides a reactive list of visible DOM options within a container.\n * It queries for all elements with `role=\"option\"` inside the container and filters\n * them based on their visibility. This is useful for components with virtual scrolling\n * or complex layouts where not all options are visible at once. It automatically\n * updates the list of visible options whenever the `items` array changes.\n *\n * @param containerRef A ref to the HTML container element that holds the options.\n * @param items The list of items for the listbox. The watcher on this parameter triggers the update.\n * @param role The role of the option elements to query for. Defaults to 'option'.\n * @param checkVisibility If true, it will only return visible options. Defaults to true.\n * @returns An object containing:\n * - `visibleDomOptions`: A reactive list of visible option elements.\n * - `updateVisibleDomOptions`: A function to manually trigger an update of the visible options.\n */\nexport const useVisibleDomOptions = (\n containerRef: Ref<Element | undefined>,\n items: Ref<BentoListboxOptions>,\n role: Ref<BentoListboxItemRole> = ref('option'),\n checkVisibility: boolean = true\n) => {\n const visibleDomOptions = ref<Array<HTMLDivElement>>([]);\n\n const updateVisibleDomOptions = async () => {\n if (!containerRef.value || containerRef.value.nodeType === Node.COMMENT_NODE) {\n return;\n }\n\n const options = Array.from(containerRef.value.querySelectorAll<HTMLDivElement>(`[role=\"${role.value}\"]`));\n\n visibleDomOptions.value = checkVisibility\n ? options.filter((option: HTMLDivElement) => option.checkVisibility())\n : options;\n };\n\n watch(\n items,\n () => {\n nextTick(() => {\n updateVisibleDomOptions();\n });\n },\n { immediate: true, deep: true }\n );\n\n return {\n visibleDomOptions,\n updateVisibleDomOptions,\n };\n};\n","import type { BentoListboxValue } from '@/types/listbox';\n\n/**\n * Builds the DOM id used to link a listbox option with `aria-activedescendant`.\n * Option values are encoded so values with spaces or special characters remain safe to use in ids.\n */\nexport const getListboxOptionId = (listboxId: string, optionValue: BentoListboxValue) =>\n `${listboxId}-option-${encodeURIComponent(String(optionValue))}`;\n","<template>\n <div\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n v-bind=\"ariaAttributes\"\n role=\"listbox\"\n v-on=\"listboxListeners\"\n @focusin=\"handleVirtualScrollingFocus\"\n >\n <template v-if=\"hasCategories && staticCategories\">\n <template v-for=\"item in items\">\n <bento-listbox-single-select-category\n v-if=\"item.items && item.items.length > 0\"\n :key=\"`category-${item.value}`\"\n :category-label=\"item.label\"\n >\n <bento-listbox-single-select-option\n v-for=\"option in item.items\"\n :id=\"getOptionId(option)\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(option)\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </bento-listbox-single-select-category>\n\n <bento-listbox-single-select-option\n v-else\n :id=\"getOptionId(item)\"\n :key=\"`option-${item.value}`\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(item)\"\n :option=\"item\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(item) : null\"\n :selected=\"item.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </template>\n <template v-else>\n <bento-listbox-single-select-option\n v-for=\"option in items\"\n :id=\"getOptionId(option)\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(option)\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type HTMLAttributes, nextTick, type PropType, ref, toRef } from 'vue';\n import { BentoListboxSingleSelectCategory } from './components/listbox-single-select-category';\n import { BentoListboxSingleSelectOption } from '../listbox-single-select-option';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import {\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type Booleanish } from '@/types/prop-types';\n import { getListboxOptionId } from '@/utils/ts/get-listbox-option-id';\n\n import { BentoKeyboardNavigationDirective } from '@/directives';\n\n /**\n * Listbox single-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-listbox-single-select',\n components: {\n BentoListboxSingleSelectCategory,\n BentoListboxSingleSelectOption,\n },\n directives: { BentoKeyboardNavigationDirective },\n inheritAttrs: false,\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { type: String, default: null },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\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 * Prefix used to generate stable option IDs.\n */\n optionIdBase: { type: String, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: undefined,\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Total number of items in the full list (used for virtual scroll keyboard navigation).\n * When greater than 0, virtual scroll keyboard navigation is enabled.\n */\n totalItemCount: { type: Number, default: 0 },\n\n /**\n * Function to scroll the virtual list container to a given item index.\n */\n scrollToIndex: { type: Function as PropType<(index: number) => void>, default: undefined },\n\n /**\n * The start index of the currently rendered virtual scroll slice.\n */\n virtualScrollStartIndex: { type: Number, default: 0 },\n },\n emits: [BentoListboxEvent.SELECT, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit, expose, slots, attrs }) {\n const listboxRef = ref<HTMLElement>();\n const listboxItemRef = ref([]);\n const selectedItem = computed(() => !!props.selectedValue?.length && props.selectedValue.at(0));\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n }) as HTMLAttributes\n );\n\n /**\n * Finds out if items have sub items\n */\n const hasCategories = computed(() => !!props.items.some(({ items }) => !!items));\n\n const onOptionSelected = eventName => (selectedOption: BentoListboxOptions) => {\n emit(eventName, [selectedOption]);\n };\n\n const getOptionId = (option: BentoListboxOptionItem) =>\n getListboxOptionId(props.optionIdBase, option.value);\n\n // Keyboard navigation\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n ref('option'),\n false\n );\n\n const isVirtualScrollEnabled = computed(() => props.totalItemCount > 0);\n\n // When virtual scroll re-renders items (e.g. on mouse wheel scroll), the\n // browser may auto-focus an option. Sync the keyboard navigation index to\n // match the focused element so subsequent arrow key presses navigate from\n // the correct position.\n const handleVirtualScrollingFocus = (event: FocusEvent) => {\n if (!isVirtualScrollEnabled.value) {\n return;\n }\n\n const target = event.target as HTMLElement;\n if (target === listboxRef.value || target?.getAttribute('role') !== 'option') {\n return;\n }\n\n const localIndex = visibleDomOptions.value.indexOf(target as HTMLDivElement);\n if (localIndex !== -1) {\n const globalIndex = localIndex + props.virtualScrollStartIndex;\n setListboxFocusedIndex(globalIndex);\n }\n };\n\n const focusItem = async (globalIndex: number) => {\n if (isVirtualScrollEnabled.value && props.scrollToIndex) {\n props.scrollToIndex(globalIndex);\n await nextTick();\n await updateVisibleDomOptions();\n const newDomIndex = globalIndex - props.virtualScrollStartIndex;\n visibleDomOptions.value[newDomIndex]?.focus();\n } else {\n visibleDomOptions.value[globalIndex]?.focus();\n }\n };\n\n const navigateToItem = async (globalIndex: number) => {\n setListboxFocusedIndex(globalIndex);\n await focusItem(globalIndex);\n };\n\n const scrollIntoContainer = (listboxItemElement?: HTMLElement, listboxElement?: HTMLElement) => {\n if (!listboxItemElement || !listboxElement) {\n return;\n }\n\n const elementRect = listboxItemElement.getBoundingClientRect();\n const scrollableContainer = listboxElement;\n const containerRect = scrollableContainer.getBoundingClientRect();\n\n if (elementRect.top < containerRect.top) {\n scrollableContainer.scrollTop -= containerRect.top - elementRect.top;\n } else if (elementRect.bottom > containerRect.bottom) {\n scrollableContainer.scrollTop += elementRect.bottom - containerRect.bottom;\n }\n };\n\n const scrollToItem = async (globalIndex: number, listboxElement?: HTMLElement) => {\n await updateVisibleDomOptions();\n\n if (isVirtualScrollEnabled.value && props.scrollToIndex) {\n props.scrollToIndex(globalIndex);\n } else {\n scrollIntoContainer(visibleDomOptions.value[globalIndex], listboxElement);\n }\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n totalItemCount: toRef(props, 'totalItemCount'),\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n const listboxOptionListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n expose({\n /**\n * Reference for a single listbox item.\n * Required for keyboard navigation in dropdown as $children is removed in vue@3\n */\n listboxItemRef,\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n /**\n * Navigates to an item by global index, handling virtual scroll if enabled.\n * Scrolls the virtual list and focuses the item.\n */\n navigateToItem,\n /**\n * Scrolls to an item by global index without changing focus.\n * Used when the dropdown opens via click to bring the selected option into view.\n */\n scrollToItem,\n });\n\n return {\n // Enums\n BentoListboxEvent,\n\n // Values\n listboxRef,\n listboxItemRef,\n selectedItem,\n slots,\n ariaAttributes,\n getOptionId,\n\n // Computed\n hasCategories,\n\n // Methods\n onOptionSelected,\n\n // Keyboard navigation\n listboxListeners,\n listboxOptionListeners,\n\n // Virtual scroll focus management\n handleVirtualScrollingFocus,\n };\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=\"M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z\"/><path fill=\"#001222\" d=\"M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <div class=\"b-checkbox-input\" :class=\"conditionalClasses\" role=\"presentation\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <double-checkmark-small-icon\n v-else-if=\"allSelected\"\n class=\"b-checkbox-input__icon\"\n svg-title=\"\"\n aria-hidden=\"true\"\n data-testid=\"decorative-checkbox-double-checkmark-icon\"\n />\n <checkmark-small-icon v-else-if=\"checked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <div class=\"b-checkbox-input__outline\" :class=\"outlineConditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoCheckboxState } from '@/types/checkbox';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import DoubleCheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/double-checkmark-small';\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n indeterminate: { type: Boolean, default: false },\n checked: { type: Boolean, default: false },\n allSelected: { type: Boolean, default: false }\n});\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${BentoCheckboxState.DISABLED}`]: props.disabled,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${BentoCheckboxState.UNCHECKED}`]:\n !props.checked && !props.indeterminate && !props.allSelected,\n [`b-checkbox-input__outline--${BentoCheckboxState.CHECKED}`]:\n (props.checked || props.allSelected) && !props.indeterminate,\n [`b-checkbox-input__outline--${BentoCheckboxState.INDETERMINATE}`]: props.indeterminate,\n }));\n</script>\n\n<script lang=\"ts\">\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"@/internal/checkbox-input/checkbox-input.scss\" />\n","export enum ListboxMultiSelectCategoryClass {\n DISABLED = 'disabled',\n STATIC_CATEGORY = 'static-category',\n}\n\nexport enum ListboxMultiSelectCategoryEvent {\n SELECT_CATEGORY = 'select-category',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div v-if=\"shouldDisplayShowMoreButton || loading\" class=\"b-listbox-lazy-load\">\n <bento-loading-button\n v-if=\"shouldDisplayShowMoreButton\"\n :state=\"loadingButtonState\"\n :tabindex=\"tabindex\"\n :condensed=\"condensed\"\n variant=\"secondary\"\n @click.capture=\"$emit('show-more', $event)\"\n >\n {{ showMoreButtonText }}\n </bento-loading-button>\n <bento-loading-indicator v-else-if=\"loading\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoListboxLazyLoadType } from '@/types/listbox';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoLoadingButton, BentoLoadingButtonState } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import { type BentoLazyLoadProps } from './listbox-lazy-load.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n defineEmits([\"show-more\"]);\n\n const props = defineProps({\n condensed: { type: Boolean, default: false },\n hasMoreItems: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n tabindex: { default: undefined },\n type: null\n});\n\n const shouldDisplayShowMoreButton = computed(\n () => props.type === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed<BentoLoadingButtonState>(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const showMoreButtonText = computed(() => (props.loading ? t('loading') : t('showMore')));\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'listbox-lazy-load',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-lazy-load.scss\" />\n","<template>\n <div role=\"treeitem\" :tabindex=\"0\" @keydown.enter.prevent=\"showMore\" @keydown.space.prevent=\"showMore\">\n <bento-empty-state\n v-if=\"failedAndRetry\"\n variant=\"basic\"\n class=\"b-listbox-multi-select-nested-lazy-load__error-message\"\n >\n {{ t('thereWasAnErrorLoadingNewItems') }}\n </bento-empty-state>\n <bento-listbox-lazy-load\n type=\"button\"\n :tabindex=\"-1\"\n condensed\n :has-more-items=\"option.lazyLoad?.hasMoreItems\"\n :loading=\"loading\"\n @show-more=\"showMore\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoEmptyState } from '@/components/empty-state';\n import { BentoListboxLazyLoad } from '@/internal/listbox/components/listbox-lazy-load';\n import { useI18n } from '@/utils/ts/i18n';\n import type { ListboxMultiSelectNestedLazyLoadProps } from './listbox-multi-select-nested-lazy-load.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const loading = ref(false);\n const failedAndRetry = ref(false);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const props = defineProps({\n index: null,\n option: null\n});\n\n async function showMore(event: Event) {\n event.stopImmediatePropagation();\n if (loading.value) {\n return;\n }\n\n failedAndRetry.value = false;\n loading.value = true;\n\n try {\n await props.option.lazyLoad?.lazyLoadEvent({\n value: props.option.value,\n index: props.index,\n });\n } catch {\n failedAndRetry.value = true;\n }\n\n loading.value = false;\n }\n\n defineExpose({\n /**\n * Trigger the lazy load event programmatically.\n */\n showMore,\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'listbox-multi-select-nested-lazy-load',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-nested-lazy-load.scss\" />\n","<template>\n <div>\n <bento-listbox-option\n v-if=\"!isStaticCategory\"\n class=\"b-listbox-multi-select-category__option\"\n :class=\"conditionalClass\"\n :tabindex=\"tabindex\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :aria-disabled=\"hasAllPropsDisabled\"\n :aria-expanded=\"`${isOpen}`\"\n role=\"treeitem\"\n :aria-owns=\"categoryGroupId\"\n :aria-labelledby=\"categoryNameId\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n @keydown.arrow-left.native=\"toggleOpen($event, false)\"\n @keydown.arrow-right.native=\"toggleOpen($event, true)\"\n >\n <decorative-checkbox\n :indeterminate=\"isIndeterminate\"\n :disabled=\"hasAllPropsDisabled\"\n :checked=\"isAllSelected\"\n />\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography :id=\"categoryNameId\" el=\"span\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n <div\n aria-hidden=\"true\"\n class=\"b-listbox-multi-select-category__label-chevron\"\n data-testid=\"toggle-listbox\"\n @click.capture.stop=\"toggleOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" :svg-title=\"chevronTitle\" />\n <chevron-down-icon v-else :svg-title=\"chevronTitle\" />\n </div>\n </span>\n </bento-listbox-option>\n\n <div\n v-else\n class=\"b-listbox-multi-select-category b-listbox-multi-select-category--static-category\"\n aria-hidden=\"true\"\n >\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography el=\"span\" variant=\"caption\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n </span>\n </div>\n\n <!-- Nested options -->\n <div v-show=\"showItemChildren\" :id=\"categoryGroupId\" role=\"group\" :aria-label=\"category.label\">\n <slot />\n\n <!-- Nested items Lazy load -->\n <template v-if=\"category.lazyLoad?.hasMoreItems\">\n <bento-listbox-multi-select-nested-lazy-load\n ref=\"lazyLoadRef\"\n :option=\"category\"\n :index=\"optionIndex\"\n />\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../../../../../listbox-option';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n type BentoListboxIsOptionDisabled,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { useCheckboxSelectAll } from '@/composables';\n import {\n ListboxMultiSelectCategoryClass,\n ListboxMultiSelectCategoryEvent,\n } from './listbox-multi-select-category.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { BentoListboxMultiSelectNestedLazyLoad } from '../listbox-multi-select-nested-lazy-load';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox multi-select category list.\n * Allows the rendering of nested lists\n *\n * @example\n * import { ListboxMultiSelectCategory } from '@/internal/listbox';\n *\n * export default {\n * components: { BentoListboxMultiSelectCategory },\n * template: `\n * <listbox-multi-select-category\n * :category=\"option\"\n * :is-option-disabled=\"true\"\n * :selected-items-list=\"['option-1']\"\n * @select-category=\"$emit('select-category', option)\"\n * @unselect-category=\"$emit('unselect-category', option)\"\n * >\n * <listbox-multi-select-options\n * category-items\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :is-multi-level=\"true\"\n * :selected-items-list=\"['option-']\"\n * :searching=\"false\"\n * @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n * />\n * </listbox-multi-select-category>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select-category',\n components: {\n BentoTypography,\n BentoListboxOption,\n BentoListboxMultiSelectNestedLazyLoad,\n ChevronDownIcon,\n ChevronUpIcon,\n DecorativeCheckbox,\n },\n props: {\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n * @property {BentoListboxOptionItem} value.items - Category items list\n */\n category: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * Option's index within the Listbox `item` array.\n */\n optionIndex: {\n type: Number,\n default: null,\n },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Category's tabindex\n */\n tabindex: { type: Number, default: -1 },\n },\n emits: [\n ListboxMultiSelectCategoryEvent.SELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const isOpen = ref(false);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const categoryGroupId = generateUid('category-group');\n const categoryNameId = generateUid('category-name');\n const lazyLoadRef = ref(null);\n\n // This method should be used to determine if an option is disabled as it works for both vue 2 & 3.\n const vue2Vue3FixedisOptionDisabled = option =>\n props.isOptionDisabled ? props.isOptionDisabled(option) : false;\n\n const hasAllPropsDisabled = computed(() => {\n // Do not disable empty categories if they are lazy loaded\n if (props.category.lazyLoad && props.category.items?.length === 0) {\n return false;\n }\n return props.category.items.every(option => vue2Vue3FixedisOptionDisabled(option));\n });\n\n const isStaticCategory = toRef(props, 'staticCategories');\n\n // Display item children if is open state or if static categories is enabled\n const showItemChildren = computed(() => isOpen.value || props.staticCategories);\n\n const conditionalClass = computed(() => ({\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.DISABLED}`]:\n hasAllPropsDisabled.value,\n }));\n\n const toggleOpen = (event: Event, open?: boolean) => {\n event.preventDefault();\n\n // Load lazy categories if the items list is empty (0 items) when category is opened\n if (props.category.lazyLoad && props.category.items?.length === 0) {\n lazyLoadRef.value.showMore(event);\n }\n\n isOpen.value = open !== undefined ? open : !isOpen.value;\n emit(ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY, props.category.value);\n };\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = vue2Vue3FixedisOptionDisabled(option);\n const isPreSelected =\n (props.selectedItemsList as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n const enabledItems = computed(() =>\n props.category.items.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed<BentoListboxOptions>(() =>\n enabledItems.value?.filter(({ value }) => props.selectedItemsList?.includes(value))\n );\n\n const chevronTitle = computed(() => {\n const messageName = isOpen.value ? 'categoryOpened' : 'categoryClosed';\n return t(messageName, { category: props.category.label }) as string;\n });\n\n const selectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.SELECT_CATEGORY);\n };\n const unselectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY);\n };\n\n const isLazySelectedByValue = computed(\n () => !!props.category.lazyLoad && props.selectedItemsList.includes(props.category.value)\n );\n\n const {\n isAllSelected: isAllChildrenSelected,\n isIndeterminate: isChildrenIndeterminate,\n toggleSelectAll,\n } = useCheckboxSelectAll(visibleSelectedList, enabledItems, selectAll, unselectAll);\n\n const isAllSelected = computed(() => isLazySelectedByValue.value || isAllChildrenSelected.value);\n const isIndeterminate = computed(() => !isLazySelectedByValue.value && isChildrenIndeterminate.value);\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n return {\n // Refs\n lazyLoadRef,\n\n // Values\n chevronTitle,\n conditionalClass,\n hasAllPropsDisabled,\n isOpen,\n isAllSelected,\n isIndeterminate,\n isStaticCategory,\n categoryGroupId,\n categoryNameId,\n\n // Computed\n showItemChildren,\n ariaCheckedComputed,\n\n // Methods\n handleSelectAll,\n toggleOpen,\n toggleSelectAll,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-category.scss\" />\n","export enum ListboxMultiSelectOptionsEvent {\n SELECT_CATEGORY = 'select-category',\n TOGGLE_CHECKBOX_SELECTION = 'toggle-checkbox-selection',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div>\n <div v-for=\"option in items\" :key=\"`selected-${option.value}`\">\n <template v-if=\"searching && isMultiLevel\">\n <bento-listbox-option\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleSearchOption(option)\"\n @enter-pressed=\"toggleSearchOption(option)\"\n @space-pressed.prevent=\"toggleSearchOption(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n\n <template v-else>\n <!-- Category -->\n <template v-if=\"option.items\">\n <listbox-multi-select-category\n :category=\"option\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n :selected-items-list=\"selectedItemsList\"\n :option-index=\"itemsIndex[option.value]\"\n :tabindex=\"computedTabindex(option.value)\"\n @select-category=\"$emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\"\n @unselect-category=\"$emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option)\"\n @toggle-category-visibility=\"\n $emit(ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, $event)\n \"\n >\n <listbox-multi-select-options\n category-items\n :items=\"option.items\"\n :is-option-disabled=\"isOptionDisabled\"\n :items-index=\"itemsIndex\"\n :focused-index=\"focusedIndex\"\n :is-multi-level=\"isMultiLevel\"\n :static-categories=\"staticCategories\"\n :selected-items-list=\"selectedItemsList\"\n :searching=\"searching\"\n :parent-category=\"option\"\n :role=\"$attrs['role'] || 'option'\"\n @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n />\n </listbox-multi-select-category>\n </template>\n\n <!-- Option -->\n <bento-listbox-option\n v-else\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleCheckboxSelection(option)\"\n @enter-pressed=\"toggleCheckboxSelection(option)\"\n @space-pressed.prevent=\"toggleCheckboxSelection(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoListboxOption } from '../../../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { ListboxMultiSelectCategory } from './components/listbox-multi-select-category';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { ListboxMultiSelectOptionsEvent } from './listbox-multi-select-options.types';\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n *\n * export default {\n * components: { ListboxMultiSelect },\n * template: `\n * <listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'listbox-multi-select-options',\n components: {\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectCategory,\n DecorativeCheckbox,\n },\n inheritAttrs: false,\n props: {\n /**\n * Indicates if the items listed are inside a category\n * so they can be padded to right by one level in recursion.\n * Items of categories are automatically defined as \"categoryItems\"\n */\n categoryItems: { type: Boolean, default: false },\n\n /**\n * Current focused option index\n */\n focusedIndex: { type: Number, default: 0 },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\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 * Indicates if the elements options are inside a multi-level category\n */\n isMultiLevel: { type: Boolean, default: false },\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: { type: Boolean, default: false },\n\n /**\n * List of selected items.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Object with the index of each item.\n */\n itemsIndex: {\n type: Object as PropType<Record<string, number>>,\n default: () => ({}),\n },\n\n /**\n * The parent category of the items.\n */\n parentCategory: {\n type: Object as PropType<BentoListboxOptionItem>,\n default: null,\n },\n },\n emits: [\n ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION,\n ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const toggleCheckboxSelection = (option: BentoListboxOptionItem) => {\n if (props.isOptionDisabled(option)) {\n return;\n }\n emit(ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION, option);\n };\n\n const isCategory = (option: BentoListboxOptionItem) => !!option.items;\n const shouldShowDescription = (option: BentoListboxOptionItem) => {\n const isSearchingMultiLevel = props.isMultiLevel && props.searching;\n\n return option.description && (!props.isMultiLevel || isSearchingMultiLevel);\n };\n\n const isOptionSelected = option => {\n const isParentLazySelected =\n !!props.parentCategory?.lazyLoad && props.selectedItemsList.includes(props.parentCategory.value);\n\n if (option.items) {\n const isLazyCategorySelected = !!option.lazyLoad && props.selectedItemsList.includes(option.value);\n return (\n isParentLazySelected ||\n isLazyCategorySelected ||\n !!option.items.find(item => props.selectedItemsList.includes(item.value))\n );\n }\n return isParentLazySelected || props.selectedItemsList.includes(option.value);\n };\n\n const toggleSearchOption = option => {\n if (isCategory(option)) {\n const event = isOptionSelected(option)\n ? ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY\n : ListboxMultiSelectOptionsEvent.SELECT_CATEGORY;\n emit(event, option);\n } else {\n toggleCheckboxSelection(option);\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-listbox-multi-select-options__static-category-option': props.staticCategories,\n 'b-listbox-multi-select-options__category-option': props.categoryItems,\n }));\n\n const computedTabindex = value => (props.itemsIndex[value] === props.focusedIndex ? 0 : -1);\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n isOptionSelected,\n shouldShowDescription,\n toggleCheckboxSelection,\n toggleSearchOption,\n computedTabindex,\n\n // Enums\n BentoListboxEvent,\n ListboxMultiSelectOptionsEvent,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-options.scss\" />\n","import { type BentoListboxOptions } from '@/types/listbox';\nimport { computed, type Ref } from 'vue';\n\n/**\n * Checks if items array is flat or has multi levels and converts items into a flat array if needed\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoListboxOptions>} itemsList - ref of the list of items for the listbox\n * @returns {ComputedRef<boolean>} isMultiLevelSelect - Indicates if items array is multi level\n * @returns {ComputedRef<any[]>} flattenedItemsList - list of items computed into a flat array\n */\nexport const useMultiLevelItems = (itemsList: Ref<BentoListboxOptions>) => {\n const isMultiLevelSelect = computed(() => !!itemsList.value?.find(({ items }) => !!items));\n\n const flattenedItemsList = computed(() => {\n if (isMultiLevelSelect.value) {\n return itemsList.value?.reduce((acc, val) => {\n if (val.items) {\n acc.push(...val.items.flat());\n } else {\n acc.push(val);\n }\n return acc;\n }, []);\n }\n\n return itemsList.value;\n });\n\n return {\n isMultiLevelSelect,\n flattenedItemsList,\n };\n};\n","<template>\n <div ref=\"listboxRef\" class=\"b-listbox-multi-select\">\n <!-- Selected options -->\n <div v-if=\"showSelectedItems\">\n <ul\n v-bento-keyboard-navigation-directive\n class=\"b-listbox-multi-select__chips\"\n v-on=\"chipsSectionListeners\"\n >\n <li v-for=\"item in selectedOptions\" :key=\"item.value\">\n <bento-chip\n ref=\"selectedListboxItemsRef\"\n :disabled=\"isOptionDisabled(item)\"\n :label=\"item.label\"\n condensed\n @click=\"item.items ? unselectAllCategory(item) : toggleCheckboxSelection('select', item)\"\n />\n </li>\n </ul>\n\n <hr class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n </div>\n\n <div v-bento-keyboard-navigation-directive v-bind=\"ariaAttributes\" :role=\"computedRole\" v-on=\"listboxListeners\">\n <!-- Select all -->\n <bento-listbox-option\n v-if=\"showSelectAllCheckbox\"\n ref=\"selectAllListboxItemsRef\"\n class=\"b-listbox-multi-select__option\"\n :tabindex=\"focusedIndex === 0 ? 0 : -1\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :role=\"computedOptionRole\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n >\n <decorative-checkbox :checked=\"isAllSelected\" :indeterminate=\"isIndeterminate\" />\n <bento-typography el=\"span\">\n {{ selectAllCheckboxText }}\n </bento-typography>\n </bento-listbox-option>\n <hr v-if=\"showSelectAllCheckbox\" class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n\n <!-- Available options -->\n <listbox-multi-select-options\n ref=\"listboxItemsRef\"\n :items=\"items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :static-categories=\"staticCategories\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n :focused-index=\"focusedIndex\"\n :items-index=\"computedItemsIndex\"\n :role=\"computedOptionRole\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection('select', $event)\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @toggle-category-visibility=\"toggleCategoryVisibility\"\n @space-pressed=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @tab-pressed=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @enter-pressed=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, nextTick, ref, toRef, useAttrs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n import { BentoTypography } from '@/components/typography';\n import { BentoChip } from '@/components/chip';\n import { BentoListboxOption } from '../listbox-option';\n import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n\n import { useCheckboxSelectAll } from '@/composables';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useMultiLevelItems } from '../../composables/use-multi-level-items/use-multi-level-items';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import {\n BentoListboxEvent,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { type Booleanish } from '@/types/prop-types';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type ListboxMultiSelectProps } from './listbox-multi-select.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { default: isVue2 ? () => () => false : () => false },\n items: null,\n lazyLoadType: { default: 'none' },\n searching: { type: Boolean, default: false },\n selectedValues: null,\n staticCategories: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"select\"]);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n 'aria-multiselectable': true,\n }) as HTMLAttributes\n );\n const listboxRef = ref(null);\n const selectAllListboxItemsRef = ref(null);\n const selectedListboxItemsRef = ref(null);\n const listboxItemsRef = ref(null);\n\n const selectedItemsList = computed<Array<BentoListboxValue>>(() => props.selectedValues.map(({ value }) => value));\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(toRef(props, 'items'));\n\n const hasLazyLoadCategory = computed(() => props.items.some(item => item.items && item.lazyLoad));\n\n const lazyLoadAwareFlattenedItems = computed(() => {\n if (!isMultiLevelSelect.value) {\n return props.items;\n }\n return props.items.reduce<BentoListboxOptions>((acc, item) => {\n if (item.items) {\n if (item.lazyLoad) {\n acc.push(item);\n } else {\n acc.push(...item.items);\n }\n } else {\n acc.push(item);\n }\n return acc;\n }, []);\n });\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedRole = computed(() => (isTreePattern.value ? 'tree' : 'listbox'));\n const computedOptionRole = computed(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = props.isOptionDisabled(option);\n const isPreSelected =\n (selectedItemsList.value as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n // Items that are not disabled and pre-selected disabled items\n const enabledItems = computed(() => {\n if (props.searching && isMultiLevelSelect) {\n return props.items;\n }\n\n const fullItemsList = lazyLoadAwareFlattenedItems.value.filter(option => {\n if (option.lazyLoad) {\n return true;\n }\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n });\n\n props.selectedValues.forEach(selectedValue => {\n if (!fullItemsList.find(item => item.value === selectedValue.value)) {\n fullItemsList.push(selectedValue);\n }\n });\n\n return fullItemsList;\n });\n\n const visibleSelectedList = computed<BentoListboxOptions>(() =>\n enabledItems.value?.filter(option => {\n return selectedItemsList.value?.includes(option.value); // Check for category\n })\n );\n\n const calculateTotalItems = () => {\n if (isMultiLevelSelect.value && !props.searching) {\n return flattenedItemsList.value.length;\n }\n\n return props.items.length;\n };\n\n const selectAllCheckboxText = computed(() => {\n const possibleSelections = enabledItems.value.length;\n const total = calculateTotalItems();\n const amountSelectedValues = visibleSelectedList.value?.length || 0;\n\n if (amountSelectedValues === 0) {\n return t('selectAll', { total: n(possibleSelections) });\n }\n\n if (amountSelectedValues === total) {\n return t('allSelected', { total: n(total) });\n }\n\n return amountSelectedValues <= total\n ? t('numberOfTotalSelected', { number: n(amountSelectedValues), total: n(total) })\n : t('numbersSelected', { number: n(amountSelectedValues) });\n });\n\n const selectAll = (selectableItems: BentoListboxOptions) => {\n const filterOutDisabledAndNotPreselectedOptions = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n };\n\n // Adding or removing this list of values\n const addOrRemoveList = selectableItems\n .filter(filterOutDisabledAndNotPreselectedOptions)\n .filter(item => !selectedItemsList.value.includes(item.value)); // MAKE SURE NOT TO ADD DUPLICATES\n\n emit('select', [...props.selectedValues, ...addOrRemoveList]);\n };\n\n const unselectAll = (selectableItems: BentoListboxOptions) => {\n const findEnabledUnselectedItems = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return !(isDisabled && isPreSelected);\n };\n\n const unselectedItemsList = selectableItems.filter(findEnabledUnselectedItems).map(({ value }) => value);\n const newSelectedList = props.selectedValues.filter(item => !unselectedItemsList?.includes(item.value));\n emit('select', newSelectedList);\n };\n\n const selectAllItems = () => {\n selectAll(flattenedItemsList.value);\n };\n\n const unselectAllItems = () => {\n unselectAll(flattenedItemsList.value);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAllItems,\n unselectAllItems\n );\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n const selectAllCategory = (category: BentoListboxOptionItem) => {\n if (category.lazyLoad) {\n const childValues = (category.items ?? []).map(({ value }) => value);\n const withoutChildren = props.selectedValues.filter(({ value }) => !childValues.includes(value));\n emit('select', [...withoutChildren, category]);\n } else {\n selectAll(category.items);\n }\n };\n\n const unselectAllCategory = (category: BentoListboxOptionItem) => {\n if (category.lazyLoad) {\n emit(\n 'select',\n props.selectedValues.filter(({ value }) => value !== category.value)\n );\n } else {\n unselectAll(category.items);\n }\n };\n\n const toggleCheckboxSelection = (eventName, selectedOption: BentoListboxOptionItem) => {\n let exists = false;\n let newSelectedList = props.selectedValues.filter(({ value }) => {\n if (selectedOption.value === value) {\n exists = true;\n return false;\n }\n\n return true;\n });\n\n if (exists) {\n emit(eventName, newSelectedList);\n return;\n }\n\n // Check if the item's parent lazy category is selected\n const parentLazyCategory = props.items.find(\n item =>\n item.items?.some(subItem => subItem.value === selectedOption.value) &&\n item.lazyLoad &&\n selectedItemsList.value.includes(item.value)\n );\n\n if (parentLazyCategory) {\n // Remove parent category\n newSelectedList = newSelectedList.filter(({ value }) => value !== parentLazyCategory.value);\n // Add other loaded children\n const otherLoadedChildren = parentLazyCategory.items.filter(\n subItem => subItem.value !== selectedOption.value\n );\n newSelectedList.push(...otherLoadedChildren);\n } else {\n newSelectedList.push(selectedOption);\n }\n\n emit(eventName, newSelectedList);\n };\n\n const selectedOptions = computed(() => {\n if (!isMultiLevelSelect.value) {\n return props.selectedValues;\n }\n\n const isOptionSelected = (option: BentoListboxOptionItem): boolean =>\n (selectedItemsList.value as unknown as Array<string | number>).includes(option.value);\n\n const categoryOptionsSelected = (category: BentoListboxOptionItem): boolean => {\n if (category.lazyLoad && isOptionSelected(category)) {\n return true;\n }\n return (\n !props.staticCategories &&\n category.items.length > 0 &&\n category.items.every(option => isOptionSelected(option))\n );\n };\n\n const optionsFlat = props.items.flatMap(option =>\n option.items && !categoryOptionsSelected(option) ? option.items : option\n );\n\n const options = optionsFlat.filter(option => {\n if (option.items) {\n return true;\n }\n return isOptionSelected(option);\n });\n\n const knownValues = new Set<BentoListboxValue>();\n optionsFlat.forEach(option => {\n knownValues.add(option.value);\n option.items?.forEach(sub => knownValues.add(sub.value));\n });\n const unfetchedSelected = props.selectedValues.filter(sv => !knownValues.has(sv.value));\n\n return [...options, ...unfetchedSelected];\n });\n\n const showSelectedItems = computed(() => {\n if (!selectedOptions.value?.length) {\n return false;\n }\n\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n const hasAllItemsSelected =\n props.selectedValues?.length > 0 && visibleSelectedList.value?.length !== enabledItems.value?.length;\n\n if (isLazyLoad && props.hasMoreItems) {\n return !!props.selectedValues?.length;\n }\n\n return hasAllItemsSelected;\n });\n\n const showSelectAllCheckbox = computed(() => {\n if (hasLazyLoadCategory.value) {\n return false;\n }\n\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n\n if (!isLazyLoad) {\n return true;\n }\n\n return !props.hasMoreItems;\n });\n\n // Keyboard navigation\n const expandedCategories = ref([]);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n computedOptionRole\n );\n\n const toggleCategoryVisibility = category => {\n if (expandedCategories.value.includes(category)) {\n expandedCategories.value = expandedCategories.value.filter(item => item !== category);\n } else {\n expandedCategories.value.push(category);\n }\n\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const focusItem = (nextFocusedItemIndex: number) => {\n visibleDomOptions.value[nextFocusedItemIndex]?.focus();\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n preventDefault,\n focusedIndex,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: (event: CustomEvent<KeyboardEvent>) =>\n moveToPreviousElement(event),\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: (event: CustomEvent<KeyboardEvent>) =>\n moveToNextElement(event),\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n defineExpose({\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n });\n\n const chipsSectionListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: preventDefault,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: preventDefault,\n };\n\n const computedItemsIndex = computed(() => {\n let itemIndex = showSelectAllCheckbox.value ? 1 : 0;\n const indexMap = {};\n\n props.items.forEach(item => {\n let subItemsVisible = expandedCategories.value.includes(item.value);\n\n if (item.items) {\n if (props.staticCategories) {\n subItemsVisible = true;\n } else {\n indexMap[item.value] = itemIndex++;\n }\n\n if (subItemsVisible) {\n item.items.forEach(subItem => (indexMap[subItem.value] = itemIndex++));\n }\n } else {\n indexMap[item.value] = itemIndex++;\n }\n });\n return indexMap;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select.scss\" />\n","/**\n * The debounce() method is used to create a debounced function which\n * delays the given callback function until after the stated wait time\n * in milliseconds have passed since the last time this debounced function was called.\n *\n * @param {Function} callback - The function to debounce.\n * @param debounceTime - The number of milliseconds to delay.\n * @returns {Function} - Returns the new debounced function.\n */\nexport const debounce = <T extends (...args: Array<any>) => any>(callback: T, debounceTime = 300) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n const callable = (...args: any) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => callback(...args), debounceTime);\n };\n return <T>(<any>callable);\n};\n","<template>\n <div\n :id=\"id\"\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n class=\"b-listbox\"\n tabindex=\"-1\"\n v-bind=\"listboxContainerAttributes\"\n :style=\"containerProps?.style\"\n data-testid=\"listbox-container\"\n @scroll=\"onListboxContainerScroll\"\n >\n <div v-bind=\"wrapperProps\">\n <!-- Loading filtered items loading -->\n <div v-if=\"componentLoading\" class=\"b-listbox__loading-filtered-items\">\n <bento-loading-indicator />\n </div>\n <!-- Empty search message -->\n <div v-else-if=\"isSearchResultEmpty\" class=\"b-listbox__empty-search-message\">\n <bento-empty-state v-if=\"emptyState\" v-bind=\"limitedEmptyStateProps\" />\n <bento-typography v-else el=\"span\">{{ noResultsMessage }}</bento-typography>\n </div>\n\n <template v-else>\n <!-- Multi select -->\n <template v-if=\"multiple\">\n <bento-listbox-multi-select\n ref=\"listboxItemRef\"\n :has-more-items=\"hasMoreItems\"\n v-bind=\"ariaAttributes\"\n :items=\"items\"\n :lazy-load-type=\"lazyLoadType\"\n :static-categories=\"staticCategories\"\n :selected-values=\"selectedValue\"\n :searching=\"searching\"\n :is-option-disabled=\"isOptionDisabled\"\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-listbox-multi-select>\n </template>\n\n <!-- Single select -->\n <template v-else>\n <bento-listbox-single-select\n ref=\"listboxItemRef\"\n :active-descendant-id=\"activeDescendantId\"\n :items=\"virtualisedItems\"\n :option-id-base=\"id\"\n :total-item-count=\"totalItemCount\"\n :scroll-to-index=\"scrollToIndex\"\n :virtual-scroll-start-index=\"virtualScrollStartIndex\"\n v-bind=\"ariaAttributes\"\n :selected-value=\"selectedValue\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\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-listbox-single-select>\n </template>\n\n <!-- Lazy Loading -->\n <bento-listbox-lazy-load\n v-if=\"lazyLoadType !== 'none'\"\n :has-more-items=\"hasMoreItems\"\n :loading=\"loading\"\n :type=\"lazyLoadType\"\n @show-more=\"emitShowMore\"\n />\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef } from 'vue';\n import {\n type BentoListboxEmptyStateProps,\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxVirtulisationOptions,\n } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { BentoListboxSingleSelect } from './components/listbox-single-select';\n import { BentoListboxMultiSelect } from './components/listbox-multi-select';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoListboxLazyLoad } from './components/listbox-lazy-load';\n import { BentoLoadingButtonState } from '@/components/button';\n import { BentoEmptyState } from '@/components/empty-state';\n import { debounce } from '@/utils/ts/debounce';\n import { useVirtualList } from '@/composables/use-virtual-list';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n\n const DEFAULT_DROPDOWN_ITEM_HEIGHT = 36;\n\n /**\n * Listbox container.\n * It lists all the available options.\n *\n * @example\n * <bento-listbox\n * v-slot=\"{label, value}\"\n * :id=\"listboxOptionsContainerId\"\n * :aria-label=\"ariaLabel\"\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 * </bento-listbox>\n */\n export default defineComponent({\n name: 'bento-listbox',\n components: {\n BentoEmptyState,\n BentoListboxSingleSelect,\n BentoListboxMultiSelect,\n BentoTypography,\n BentoLoadingIndicator,\n BentoListboxLazyLoad,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { type: String, default: null },\n\n /**\n * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoListboxEmptyStateProps>,\n default: undefined,\n },\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 {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Listbox 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 listbox with.\n * It must be an array of {@see BentoListboxOptionItem }\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 * Indicates if new options are lazy loading.\n */\n loading: { type: Boolean, default: false },\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<BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`>,\n default: BentoListboxLazyLoadType.NONE,\n validator: (value: BentoListboxLazyLoadType) => Object.values(BentoListboxLazyLoadType).includes(value),\n },\n\n /**\n * Indicates the listbox is loading filtered items.\n */\n componentLoading: { 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 * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Messaged displayed when no items are listed in the listbox\n */\n noResultsMessage: { type: String, required: true },\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: BentoListboxMultiSelect.props.searching,\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: () => [],\n },\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<BentoListboxVirtulisationOptions>,\n default: false,\n },\n },\n emits: [\n BentoListboxEvent.SELECT,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.SHOW_MORE,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots, expose }) {\n const listboxItemRef = ref([]);\n const items = toRef(props, 'items');\n const isLazyLoadListbox = computed(() => props.lazyLoadType !== BentoListboxLazyLoadType.AUTOMATIC);\n const hasAutomaticLazyLoader = computed(() => props.lazyLoadType === BentoListboxLazyLoadType.AUTOMATIC);\n\n // Virtual scrolling\n const virtualScrollItemHeight = () => {\n if (typeof props?.virtualScroll === 'object' && props?.virtualScroll?.itemHeight) {\n return props.virtualScroll.itemHeight;\n }\n return DEFAULT_DROPDOWN_ITEM_HEIGHT;\n };\n const isVirtualScrollEnabled =\n !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none';\n\n const {\n containerRef: listboxRef,\n containerProps,\n onScroll: onContainerScroll,\n list: virtualisedItems,\n wrapperProps,\n scrollToIndex,\n startIndex: virtualScrollStartIndex,\n } = useVirtualList<BentoListboxOptionItem>(items, {\n itemHeight: virtualScrollItemHeight(),\n // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select\n disabled: !isVirtualScrollEnabled,\n });\n\n const totalItemCount = computed(() => (isVirtualScrollEnabled ? items.value.length : 0));\n\n // Aria a11y\n const ariaAtomic = computed<HTMLAttributes['aria-atomic']>(() =>\n props.componentLoading !== undefined || isLazyLoadListbox.value ? 'true' : undefined\n );\n const ariaBusy = computed<HTMLAttributes['aria-busy']>(() =>\n (isLazyLoadListbox.value && props.loading) || props.componentLoading ? 'true' : 'false'\n );\n const ariaLive = computed<HTMLAttributes['aria-live']>(() =>\n isLazyLoadListbox.value || props.componentLoading !== undefined ? 'polite' : undefined\n );\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': props.ariaLabel,\n 'aria-busy': ariaBusy.value,\n 'aria-atomic': ariaAtomic.value,\n 'aria-live': ariaLive.value,\n }) as HTMLAttributes\n );\n\n const listboxContainerAttributes = computed(\n () =>\n (props.componentLoading\n ? {\n ...ariaAttributes.value,\n role: 'alert',\n }\n : {}) as HTMLAttributes\n );\n\n const onOptionSelected = eventName => (selectedItem: BentoListboxOptions) => {\n emit(eventName, selectedItem);\n };\n\n const emitShowMore = () => {\n emit(BentoListboxEvent.SHOW_MORE);\n };\n\n const emitShowMoreOnScrollEnd = debounce(() => {\n const container = listboxRef.value;\n\n if (!container) {\n return;\n }\n\n const isAtBottom = Math.round(container.scrollTop) + container.clientHeight >= container.scrollHeight;\n\n if (props.hasMoreItems && isAtBottom && !props.loading) {\n emitShowMore();\n }\n });\n\n const onListboxContainerScroll = () => {\n if (hasAutomaticLazyLoader.value) {\n emitShowMoreOnScrollEnd();\n } else {\n onContainerScroll();\n }\n };\n\n const isSearchResultEmpty = computed(() => props.items?.length === 0);\n\n const shouldDisplayShowMoreButton = computed(\n () => props.lazyLoadType === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const limitedEmptyStateProps = computed<InstanceType<typeof BentoEmptyState>['$props']>(() => ({\n ...props.emptyState,\n variant: 'condensed',\n }));\n\n const listboxListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n expose({ listboxRef, listboxItemRef });\n\n return {\n // Refs\n listboxRef,\n listboxItemRef,\n\n // a11y\n ariaAttributes,\n listboxContainerAttributes,\n\n // Values\n containerProps,\n isSearchResultEmpty,\n limitedEmptyStateProps,\n loadingButtonState,\n slots,\n shouldDisplayShowMoreButton,\n virtualisedItems,\n wrapperProps,\n\n // Virtual scroll\n totalItemCount,\n scrollToIndex,\n virtualScrollStartIndex,\n\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Methods\n onListboxContainerScroll,\n onOptionSelected,\n emitShowMore,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox.scss\" />\n","import {\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n type BentoListboxValue,\n} from '@/types/listbox';\nimport { ref, type Ref, watch } from 'vue';\n\n/**\n * Extracts an item's label from the items in the list of options\n * displayed in the Listbox.\n *\n * Searches through all items and their sub-items (categories).\n *\n * @param items List of options displayed in the Listbox\n * @param value Selected value that needs to be found in the list\n * @returns Label found\n */\nconst findItem = (items: BentoListboxOptions, value: BentoListboxValue): BentoListboxOptionItem => {\n for (const item of items) {\n if (item.value === value) {\n return item;\n }\n\n if (item.items) {\n // recursively look for the value and continue to the next item if value is not found\n const label = findItem(item.items, value);\n\n if (label) {\n return label;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Type guard to check if a value is of type BentoListboxSelectedValueLabelPair.\n * @param value The value to check.\n * @returns True if the value is BentoListboxSelectedValueLabelPair, false otherwise.\n */\nconst isBentoListboxSelectedValueLabelPair = (\n value: BentoListboxSelectedValue\n): value is BentoListboxSelectedValueLabelPair => {\n return typeof value === 'object' && value !== null && 'value' in value && 'label' in value;\n};\n\n/**\n * Creates two lists (one with value/label pairs and one simply with values) that are\n * used to cache the internal option selections to preserve the `label` in case the\n * value is loaded from external sources and might not be found in the list of `items`\n * later on.\n *\n * This helps with external searches and lazy loaded lists.\n *\n * @param items List of options displayed in the Listbox\n * @param selectedValues Selected list of values\n * @param multiple Indicates if the Listbox is multi-select (true) or single-select (false)\n * @param enableValueLabelPair Indicates if the Listbox should emit value/label pairs.\n * @returns Two lists of cached items. One list with label/value pairs and one with only the values stored.\n */\nexport const useCachedSelectedValues = (\n items: Ref<BentoListboxOptions>,\n selectedValues: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n enableValueLabelPair?: Ref<boolean>\n) => {\n const cachedSelectedListboxOptions = ref<BentoListboxOptions>([]);\n const cachedListboxSelectedValues = ref<BentoListboxSelectedValue>();\n\n /**\n * Sets the cached selected values based on a simple value (string or number).\n * It handles both single and multi-select modes.\n * @param newSelectedValues The new list of selected options.\n */\n const setSimpleSelectedValues = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value }) => value);\n } else {\n cachedListboxSelectedValues.value = newSelectedValues.length > 0 ? newSelectedValues[0].value : null;\n }\n };\n\n const setValueLabelPair = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value, label }) => ({ value, label }));\n } else {\n cachedListboxSelectedValues.value =\n newSelectedValues.length > 0\n ? { value: newSelectedValues[0].value, label: newSelectedValues[0].label }\n : null;\n }\n };\n\n const setCachedValues = (newSelectedValues: BentoListboxOptions) => {\n cachedSelectedListboxOptions.value = newSelectedValues;\n if (enableValueLabelPair?.value) {\n setValueLabelPair(newSelectedValues);\n } else {\n setSimpleSelectedValues(newSelectedValues);\n }\n };\n\n const resetCache = () => {\n cachedSelectedListboxOptions.value = [];\n cachedListboxSelectedValues.value = null;\n };\n\n watch(\n () => selectedValues.value,\n () => {\n if (!selectedValues.value && selectedValues.value !== 0) {\n resetCache();\n return;\n }\n\n const isSingleSelect = !Array.isArray(selectedValues.value);\n // Make a copy of cache\n const cachedCopy = [...cachedSelectedListboxOptions.value];\n // Clear cache\n resetCache();\n\n const addValue = (value: BentoListboxSelectedValue) => {\n // When it's a value/label pair, add it immediately\n // Otherwise search if the value is available in the list\n // and create a value/label pair to be added to the list\n if (isBentoListboxSelectedValueLabelPair(value)) {\n cachedSelectedListboxOptions.value.push(value);\n } else {\n // Search label by value in \"items\"\n let selectedItem = findItem(items.value, value as BentoListboxValue);\n\n // Search in previous cache\n if (!selectedItem) {\n selectedItem = findItem(cachedCopy, value as BentoListboxValue);\n }\n\n // Transform value to label if not found anywhere\n if (!selectedItem) {\n selectedItem = { value: value as BentoListboxValue, label: value.toString() };\n }\n\n cachedSelectedListboxOptions.value.push(selectedItem);\n }\n };\n\n if (isSingleSelect) {\n const value = selectedValues.value as BentoListboxValue;\n\n addValue(value);\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n return;\n }\n\n // Multi-select\n (selectedValues.value as BentoListboxMultiSelectValue).forEach(addValue);\n // Add each selected value in the cache\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n },\n { immediate: true }\n );\n\n return {\n // Values\n cachedSelectedListboxOptions,\n cachedListboxSelectedValues,\n // Methods\n resetCache,\n setCachedValues,\n };\n};\n","export enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n","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.stop @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :active-descendant-id=\"activeDescendantId\"\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/listbox';\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 '@/utils/ts/generate-uid';\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 * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { 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 dropdownOptionsListboxRef,\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","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","export enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n","export const DROPDOWN_SMALL_SIZE_INJECTION_KEY = Symbol('dropdown small size injection key');\nexport const DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY = Symbol('dropdown underline style injection key');\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n :variant=\"isUnderlineStyle ? 'title' : 'body'\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <span\n v-if=\"shouldShowAutocompleteSuggestion(hasSlot('autocomplete-suggestion'))\"\n class=\"b-dropdown-base-textbox__autocomplete-suggestion\"\n aria-hidden=\"true\"\n data-testid=\"autocomplete-suggestion\"\n >\n <slot name=\"autocomplete-suggestion\"></slot>\n </span>\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n :aria-autocomplete=\"\n shouldShowAutocompleteSuggestion(hasSlot('autocomplete-suggestion')) ? 'both' : 'list'\n \"\n size=\"1\"\n :value=\"inputValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onTextboxEnterKey\"\n @focus=\"onTextboxFocus\"\n @blur=\"onTextboxBlur\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n @focus=\"onTextboxFocus\"\n @mousedown=\"onClosedComboboxMouseDown\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import { stopEventPropagation } from '@/utils/ts/events';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent } from './dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.internal.types';\n import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: { 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 * Indicates whether the dropdown currently has a selected value.\n */\n hasSelectedValue: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n const isTextboxFocused = ref(false);\n const localInputValue = ref(props.value);\n\n // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n 'b-dropdown-base-textbox--underline': isUnderlineStyle,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const shouldShowAutocompleteSuggestion = (hasAutocompleteSuggestionSlot: boolean) =>\n shouldShowInput.value && !props.multiple && !!props.value && hasAutocompleteSuggestionSlot;\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-activedescendant': props.ariaActiveDescendant,\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldUseDynamicFilteringInputMode = computed(\n () => props.dynamicFiltering && !props.multiple && !props.alwaysComboboxIsInput\n );\n const shouldShowSearchValue = computed(\n () =>\n props.open ||\n props.alwaysComboboxIsInput ||\n (shouldUseDynamicFilteringInputMode.value && isTextboxFocused.value)\n );\n const shouldShowInput = computed(() => props.dynamicFiltering && shouldShowSearchValue.value);\n const getInitialInputValue = () => {\n if (!props.value && props.hasSelectedValue && shouldUseDynamicFilteringInputMode.value) {\n return props.displayValue ?? '';\n }\n\n return props.value;\n };\n const inputValue = computed(() => {\n if (!shouldShowSearchValue.value || (props.alwaysComboboxIsInput && !props.open)) {\n return props.displayValue;\n }\n\n if (shouldUseDynamicFilteringInputMode.value) {\n return localInputValue.value;\n }\n\n return props.value;\n });\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n (shouldShowInput, wasShowingInput) => {\n if (!shouldShowInput) {\n localInputValue.value = props.value;\n } else if (!wasShowingInput && shouldUseDynamicFilteringInputMode.value) {\n localInputValue.value = getInitialInputValue();\n }\n\n if (shouldShowInput && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value?.focus();\n textbox.value?.select();\n });\n }\n }\n );\n watch(\n () => props.value,\n newValue => {\n if (!shouldUseDynamicFilteringInputMode.value || newValue !== localInputValue.value) {\n localInputValue.value = newValue;\n }\n }\n );\n watch(\n () => props.displayValue,\n () => {\n if (shouldUseDynamicFilteringInputMode.value && props.hasSelectedValue) {\n localInputValue.value = getInitialInputValue();\n }\n }\n );\n watch(\n () => props.open,\n open => {\n if (!open) {\n isTextboxFocused.value = false;\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = (event?: Event) => {\n if (props.open) {\n if (event) {\n stopEventPropagation(event);\n }\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onTextboxEnterKey = (event: KeyboardEvent) => {\n if (props.dynamicFiltering) {\n return null;\n }\n\n return onToggleDropdown(event);\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n\n const onTextboxFocus = () => {\n isTextboxFocused.value = true;\n };\n const onTextboxBlur = () => {\n isTextboxFocused.value = false;\n };\n\n const onClosedComboboxMouseDown = (event: MouseEvent) => {\n if (!shouldUseDynamicFilteringInputMode.value || props.open || props.readonly || props.disabled) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n if (shouldUseDynamicFilteringInputMode.value) {\n localInputValue.value = (event.target as HTMLInputElement).value;\n }\n\n if (props.dynamicFiltering && !props.open) {\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n nextTick(() => {\n if (shouldShowInput.value) {\n textbox.value?.focus();\n }\n });\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import { DropdownBaseTextboxEvent } from '../dropdown-base-textbox/dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: {\n type: String,\n default: null,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n","\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 setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\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 setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\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 v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\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, inject, type PropType, ref, useSlots } from 'vue';\n import { DropdownBaseTextboxEvent } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.internal.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 import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: { type: String, default: null },\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 // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\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 'b-dropdown-small-textbox--underline': isUnderlineStyle,\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, type BentoListboxValue } 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 // Track matched selection values to avoid double-processing and to identify external pre-selected values\n const matchedValues = new Set<BentoListboxValue>();\n const selectedValuesSet = new Set(selectedValues.value.map(option => option.value));\n\n const newItems = items.value.reduce((acc, option) => {\n // Category items\n if (option.items) {\n // Check if the lazy category itself is selected directly by its own value\n const isCategorySelectedByValue = selectedValuesSet.has(option.value);\n\n if (isCategorySelectedByValue) {\n // Category itself is selected directly by value (e.g. lazy-loaded category)\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n // Mark all loaded child items as matched so they are not treated as external selected values\n option.items.forEach(child => matchedValues.add(child.value));\n } else {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValuesSet.has(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected =\n selectedCategoryOptions.length > 0 && selectedCategoryOptions.length === option.items.length;\n\n if (isCategoryFullySelected) {\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n // Mark all child items as matched to prevent double-processing as individual options\n option.items.forEach(child => matchedValues.add(child.value));\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue, value }) => {\n acc.push(displayValue ?? label);\n matchedValues.add(value);\n });\n }\n }\n } else {\n // Non-category option\n if (selectedValuesSet.has(option.value)) {\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n }\n }\n\n return acc;\n }, []);\n\n // Add any external selected values that were not matched by any item in items.value\n // (This is common with pre-selected values and lazy loaded lists)\n selectedValues.value.forEach(selectedOption => {\n if (!matchedValues.has(selectedOption.value)) {\n newItems.push(selectedOption.displayValue ?? selectedOption.label);\n }\n });\n\n return newItems.join(', ');\n};\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 isSearching,\n activeDescendantIndex,\n selectFirstMatchedOption,\n totalItemCount,\n isVirtualScroll,\n removeActiveDescendant,\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 navigateToItem = async (index: number) => {\n await optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(index);\n };\n\n /**\n * Navigates to an option by index using different strategies depending on scrolling mode.\n * When virtual scrolling is enabled, `navigateToItem` scrolls the virtual list to render\n * the target item before focusing it. Otherwise, the item is already in the DOM so we\n * directly update the focused index and move focus.\n */\n const navigateToOption = (index: number) => {\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n removeActiveDescendant?.();\n\n if (index < 0) {\n return;\n }\n\n nextTick(() => {\n if (isVirtualScroll) {\n navigateToItem(index);\n } else {\n setListboxFocusedIndex(index);\n focusOnOption(index);\n }\n });\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n navigateToOption(0);\n };\n\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n const skipToNextOptionFromActiveDescendant = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n const lastItemIndex = isVirtualScroll ? totalItemCount.value - 1 : items.value.length - 1;\n const nextIndex = Math.min((activeDescendantIndex?.value ?? -1) + 1, lastItemIndex);\n navigateToOption(nextIndex);\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n navigateToOption(isVirtualScroll ? totalItemCount.value - 1 : items.value.length - 1);\n });\n };\n\n /**\n * Stops the keyboard event from bubbling up events.\n * @param event - keyboard event to stop\n */\n const stopKeyboardEvent = (event: KeyboardEvent) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n const onArrowDown = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n if (activeDescendantIndex?.value !== undefined && activeDescendantIndex.value >= 0) {\n skipToNextOptionFromActiveDescendant();\n return;\n }\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToLastOption();\n };\n\n const onHomeKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToFirstOption();\n };\n\n const onEndKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple.value) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onEnterKey = async ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n if (isDynamicFltering.value && !isMultiple.value) {\n if (isDropdownOpen.value && isSearching.value) {\n const isFirstMatchedOptionSelected = await selectFirstMatchedOption();\n\n if (isFirstMatchedOptionSelected) {\n return;\n }\n }\n\n return;\n }\n\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple.value) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onTab = ({ detail: event }) => {\n event.stopPropagation();\n\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = ({ detail: event }) => {\n event.stopPropagation();\n\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 ...(!isDynamicFltering.value ? { [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","<!-- 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\n v-bento-click-outside-directive=\"clickOutsideDropdownOptions\"\n v-bind=\"getRootAttributes($attrs)\"\n class=\"b-dropdown\"\n :class=\"conditionalClasses\"\n >\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 :aria-active-descendant=\"activeDescendantId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"$attrs['aria-label'] ?? label ?? computedAriaLabelFallbackMessage\"\n :aria-readonly=\"isReadOnly\"\n :aria-required=\"required\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :has-selected-value=\"cachedSelectedListboxOptions.length > 0\"\n :is-invalid=\"!!errorMessage\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"onSearchTermInput\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template #autocomplete-suggestion>\n <template v-if=\"autocompleteSuggestionSuffix\">\n <span class=\"b-dropdown__autocomplete-hidden-prefix\">{{ searchTerm }}</span\n >{{ autocompleteSuggestionSuffix }}\n </template>\n </template>\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-teleport v-if=\"inputContainerRef\" :disabled=\"teleport?.disabled\" :to=\"teleport?.to\">\n <bento-dropdown-options-container\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"$attrs['aria-label'] ?? label ?? computedAriaLabelFallbackMessage\"\n :active-descendant-id=\"activeDescendantId\"\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 </bento-teleport>\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 { computed, defineComponent, inject, nextTick, type Ref, ref, toRef, useAttrs, useSlots, watch } 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, useCachedSelectedValues, useMultiLevelItems } from '@/internal/listbox';\n import { ErrorMessage } from '@/internal/error-message';\n import { FieldLabel } from '@/internal/field-label';\n import { BentoTeleport } from '@/internal/teleport';\n\n // Utils\n import { generateUid } from '@/utils/ts/generate-uid';\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 import { useHasSlot } from '@/composables';\n import { getListboxOptionId } from '@/utils/ts/get-listbox-option-id';\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 } from './dropdown.types';\n import { BentoDropdownSize } from './dropdown.internal.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types/listbox';\n import { DROPDOWN_SMALL_SIZE_INJECTION_KEY } from './dropdown.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const getRootAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => !key.startsWith('aria-')));\n\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 condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n dynamicFiltering: { 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 staticCategories: { type: Boolean, default: false },\n teleport: { default: () => ({ disabled: true }) },\n modelValue: { default: null },\n virtualScroll: { type: Boolean, default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"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 shouldShowActiveDescendant = 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);\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 ariaDescribedByAttribute = ref(attrs['aria-describedby']);\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\n // Inject input field component key to change the dropdown size\n const isInputComponent = inject(DROPDOWN_SMALL_SIZE_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(({ value }) =>\n (dropdownValue.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\n // Find the specific item within the category\n const selectedCategoryItem = category\n ? category.items.find(item => item.value === dropdownValue.value)\n : props.items.find(({ value }) => value === dropdownValue.value);\n\n return selectedCategoryItem ?? null;\n }\n\n return props.items.find(({ value }) => value === dropdownValue.value);\n });\n\n const selectedValueIndex = computed(() => {\n const searchList = isMultiLevelSelect.value ? flattenedItemsList.value : filteredItems.value;\n const index = searchList.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 const firstEnabledFilteredItem = computed(() =>\n filteredItems.value.find((item: BentoListboxOptionItem) => !props.isOptionDisabled?.(item))\n );\n\n const autocompleteSuggestion = computed(() => {\n if (props.multiple || !isSearching.value || !shouldShowActiveDescendant.value) {\n return '';\n }\n\n return firstEnabledFilteredItem.value?.label ?? '';\n });\n\n const autocompleteSuggestionSuffix = computed(() => {\n if (!autocompleteSuggestion.value.toLocaleLowerCase().startsWith(searchTerm.value.toLocaleLowerCase())) {\n return '';\n }\n\n return autocompleteSuggestion.value.slice(searchTerm.value.length);\n });\n\n const activeDescendantId = computed(() =>\n !props.multiple &&\n isDropdownOpen.value &&\n isSearching.value &&\n shouldShowActiveDescendant.value &&\n firstEnabledFilteredItem.value\n ? getListboxOptionId(dropdownOptionsContainerId, firstEnabledFilteredItem.value.value)\n : null\n );\n const activeDescendantIndex = computed(() =>\n activeDescendantId.value\n ? filteredItems.value.findIndex(({ value }) => value === firstEnabledFilteredItem.value?.value)\n : -1\n );\n\n const onSearchTermInput = (newSearchTerm: string) => {\n searchTerm.value = newSearchTerm;\n shouldShowActiveDescendant.value = true;\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(() => {\n const dropdownListboxRef = optionsContainerRef.value?.dropdownOptionsListboxRef;\n // Vue 3 exposes the ref object, while Vue 2 exposes the unwrapped DOM element.\n return (dropdownListboxRef?.listboxRef?.value ?? dropdownListboxRef?.listboxRef) as HTMLDivElement;\n });\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 clickOutsideDropdownOptions = computed(() => [\n clickOutsideDropdown,\n {\n ignore: [listboxRef],\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 selectFirstMatchedOption = async () => {\n if (!firstEnabledFilteredItem.value) {\n return false;\n }\n\n await onOptionSelected([firstEnabledFilteredItem.value]);\n return true;\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: toRef(props, 'multiple'),\n isSearching,\n activeDescendantIndex,\n selectFirstMatchedOption,\n totalItemCount: computed(() => filteredItems.value.length),\n isVirtualScroll: !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none',\n removeActiveDescendant: () => {\n // TODO: this solution is temporary. when we target dynamicFiltering accessibility, the component should use aria-activedescendant to navigate the options instead of focus\n shouldShowActiveDescendant.value = false;\n },\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 const focus = () => {\n inputContainerRef.value?.focus();\n };\n\n const scrollToSelectedOption = async () => {\n await nextTick();\n\n if (!isDropdownOpen.value || props.multiple || !optionsContainerRef.value) {\n return;\n }\n\n const index = selectedValueIndex.value;\n if (index <= 0) {\n return;\n }\n\n const dropdownOptionsListboxRef = optionsContainerRef.value.dropdownOptionsListboxRef;\n const listbox = dropdownOptionsListboxRef?.listboxRef;\n const listboxSingleSelect = dropdownOptionsListboxRef?.listboxItemRef;\n\n listboxSingleSelect?.scrollToItem?.(index, listbox);\n };\n\n watch(\n () => isDropdownOpen.value,\n (isOpen: boolean) => {\n if (isOpen) {\n emit('open');\n scrollToSelectedOption();\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 inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useCheckboxSelectAll","selectedItemsList","items","selectAll","unselectAll","isAllSelected","computed","isIndeterminate","selectedValue","useVirtualList","disabled","itemHeight","overscan","prefixHeight","containerRef","ref","list","startIndex","endIndex","containerHeight","listObserver","wrapperProps","totalHeight","sum","_","index","offSetTop","i","getOffset","prefixHeightIfSet","scrollTop","offset","size","getVisibileNumberOfItems","start","capacity","updateVisibleItems","visibleCount","onScroll","onMounted","observeSizeOfElement","clientHeight","onUnmounted","watch","containerProps","scrollToIndex","itemTop","currentHeight","itemBottom","viewportHeight","viewportBottom","BentoListboxEvent","BentoListboxEvent2","BentoListboxLazyLoadType","BentoListboxLazyLoadType2","_sfc_main$j","defineComponent","BentoTypography","_sfc_main$i","props","emit","conditionalClasses","BentoKeyboardNavigationKeyDownEvent","e","eventName","instance","getCurrentInstance","uuid","_sfc_main$g","BentoListboxOption","CheckmarkIcon","onOptionSelected","ariaDisabled","ariaSelected","tabIndex","useListboxKeyboardNavigation$1","totalItemCount","focusItem","lastItemIndex","focusedIndex","mutateFocusedIndex","direction","calculateFocusedIndex","edgeCaseItem","moveToNextElement","event","preventDefault","moveToPreviousElement","moveToFirstElement","moveToLastElement","setListboxFocusedIndex","useVisibleDomOptions","role","checkVisibility","visibleDomOptions","updateVisibleDomOptions","options","option","nextTick","getListboxOptionId","listboxId","optionValue","_sfc_main$f","BentoListboxSingleSelectCategory","BentoListboxSingleSelectOption","BentoKeyboardNavigationDirective","expose","slots","attrs","listboxRef","listboxItemRef","selectedItem","ariaAttributes","hasCategories","selectedOption","getOptionId","toRef","isVirtualScrollEnabled","handleVirtualScrollingFocus","target","localIndex","globalIndex","newDomIndex","navigateToItem","scrollIntoContainer","listboxItemElement","listboxElement","elementRect","scrollableContainer","containerRect","scrollToItem","listboxListeners","listboxOptionListeners","__default__$8","BentoCheckboxState","outlineConditionalClasses","ListboxMultiSelectCategoryClass","ListboxMultiSelectCategoryClass2","ListboxMultiSelectCategoryEvent","ListboxMultiSelectCategoryEvent2","__default__$7","messages$6","t","useI18n","shouldDisplayShowMoreButton","loadingButtonState","BentoLoadingButtonState","showMoreButtonText","__default__$6","messages$5","loading","failedAndRetry","showMore","_sfc_main$a","messages$4","BentoListboxMultiSelectNestedLazyLoad","ChevronDownIcon","ChevronUpIcon","DecorativeCheckbox","isOpen","categoryGroupId","generateUid","categoryNameId","lazyLoadRef","vue2Vue3FixedisOptionDisabled","hasAllPropsDisabled","isStaticCategory","showItemChildren","conditionalClass","toggleOpen","open","optionStates","isDisabled","isPreSelected","enabledItems","visibleSelectedList","value","chevronTitle","messageName","isLazySelectedByValue","isAllChildrenSelected","isChildrenIndeterminate","toggleSelectAll","ariaCheckedComputed","isSelectAllOn","handleSelectAll","ListboxMultiSelectOptionsEvent","ListboxMultiSelectOptionsEvent2","_sfc_main$9","ListboxMultiSelectCategory","toggleCheckboxSelection","isCategory","shouldShowDescription","isSearchingMultiLevel","isOptionSelected","isParentLazySelected","isLazyCategorySelected","item","toggleSearchOption","useMultiLevelItems","itemsList","isMultiLevelSelect","flattenedItemsList","acc","val","__default__$5","messages$3","n","useSlots","useAttrs","selectAllListboxItemsRef","selectedListboxItemsRef","listboxItemsRef","hasLazyLoadCategory","lazyLoadAwareFlattenedItems","isTreePattern","computedRole","computedOptionRole","fullItemsList","calculateTotalItems","selectAllCheckboxText","possibleSelections","total","amountSelectedValues","selectableItems","filterOutDisabledAndNotPreselectedOptions","addOrRemoveList","findEnabledUnselectedItems","unselectedItemsList","newSelectedList","selectAllItems","unselectAllItems","selectAllCategory","category","childValues","withoutChildren","unselectAllCategory","exists","parentLazyCategory","subItem","otherLoadedChildren","selectedOptions","categoryOptionsSelected","optionsFlat","knownValues","sub","unfetchedSelected","sv","showSelectedItems","isLazyLoad","hasAllItemsSelected","showSelectAllCheckbox","expandedCategories","toggleCategoryVisibility","nextFocusedItemIndex","chipsSectionListeners","computedItemsIndex","itemIndex","indexMap","subItemsVisible","debounce","callback","debounceTime","timeoutId","args","DEFAULT_DROPDOWN_ITEM_HEIGHT","_sfc_main$7","BentoEmptyState","BentoListboxSingleSelect","BentoListboxMultiSelect","BentoLoadingIndicator","BentoListboxLazyLoad","isLazyLoadListbox","hasAutomaticLazyLoader","virtualScrollItemHeight","onContainerScroll","virtualisedItems","virtualScrollStartIndex","ariaAtomic","ariaBusy","ariaLive","listboxContainerAttributes","emitShowMore","emitShowMoreOnScrollEnd","container","isAtBottom","onListboxContainerScroll","isSearchResultEmpty","limitedEmptyStateProps","findItem","label","isBentoListboxSelectedValueLabelPair","useCachedSelectedValues","selectedValues","multiple","enableValueLabelPair","cachedSelectedListboxOptions","cachedListboxSelectedValues","setSimpleSelectedValues","newSelectedValues","setValueLabelPair","setCachedValues","resetCache","isSingleSelect","cachedCopy","addValue","BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","internalSelectedValue","isApplyButtonDisabled","onApplyClick","onCancelClick","onOutsideDropdownClick","actions","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$4","messages$2","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DROPDOWN_SMALL_SIZE_INJECTION_KEY","DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY","__default__$3","messages$1","hasSlot","useHasSlot","textbox","textboxId","isTextboxFocused","localInputValue","isUnderlineStyle","inject","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","shouldShowAutocompleteSuggestion","hasAutocompleteSuggestionSlot","selectedValueItems","shouldUseDynamicFilteringInputMode","shouldShowSearchValue","getInitialInputValue","inputValue","shouldShowSingleSelectSlot","shouldShowMultipleSlot","shouldShowInput2","wasShowingInput","newValue","onOpenDropdown","onCloseDropdown","stopEventPropagation","onToggleDropdown","onTextboxEnterKey","onClearSearch","onTextboxFocus","onTextboxBlur","onClosedComboboxMouseDown","onInputEvent","focus","__default__$2","baseTextbox","onInput","newInput","onKeyDown","openDropdown","closeDropdown","clearValue","__default__$1","categoryMultiSelect","matchedValues","selectedValuesSet","newItems","child","selectedCategoryOptions","categoryOption","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","isSearching","activeDescendantIndex","selectFirstMatchedOption","isVirtualScroll","removeActiveDescendant","toggleDropdown","focusOnOption","focusOnChip","chips","selectedIndex","navigateToOption","skipToFirstOption","skipToNextOptionFromActiveDescendant","nextIndex","skipToLastOption","stopKeyboardEvent","onArrowDown","onArrowUp","onHomeKey","onEndKey","onTab","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","searchTermRef","dataRef","findHits","searchTermLowerCased","debouncedSearchEvent","__default__","messages","DropdownInputDefault","DropdownInputSmall","getRootAttributes","attributes","key","emitValue","useFormFieldEmits","inputContainerRefWrapper","shouldShowActiveDescendant","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","dropdownValue","ariaDescribedByAttribute","computedAriaLabelFallbackMessage","isInputComponent","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","selectedValueItem","categoryItem","additionalItemsSelected","selectedItemsCount","firstEnabledFilteredItem","autocompleteSuggestion","autocompleteSuggestionSuffix","activeDescendantId","onSearchTermInput","newSearchTerm","ariaDescribedBy","dropdownListboxRef","clickOutsideDropdown","clickOutsideDropdownOptions","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","scrollToSelectedOption","listbox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAAA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC;AAAA,IAAsB,MAAA,CAAA,CAAAL,EAAA,OAAA,UAAAA,EAAA,OAAA,WAAAC,EAAA,MAAA;AAAA,EACyE,GAE/FK,IAAAD,EAAA,MAEIL,EAAA,SAAA,QAAAA,EAAA,MAAA,WAAA,IACI,KAGJA,EAAA,OAAA,WAAAC,EAAA,MAAA,MAAuD;AAW3D,SAAA;AAAA,IAAO,eAAAG;AAAA,IACH,iBAAAE;AAAA,IACA,iBAVJ,CAAAC,MAAA;AACI,MAAAA,IACIL,EAAA,IAEAC,EAAA;AAAA,IACJ;AAAA,EAOA;AAER;AChCO,SAAAK,GAAAP,GAAA,EAAA,UAAAQ,GAAA,YAAAC,GAAA,UAAAC,IAAA,GAAA,cAAAC,EAAA,GAAA;AAIH,QAAAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,GACAG,IAAAH,EAAA,CAAA,GACAI,IAAAJ,EAAA,CAAA;AACA,MAAAK;AAEA,QAAAC,IAAAf,EAAA,MAAA;AACI,UAAAgB,IAAA,OAAAX,KAAA,WAAAT,EAAA,MAAA,SAAAS,IAAAT,EAAA,MAAA,OAAA,CAAAqB,G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,QACyD,iBAAA,CAAApZ,GAAA,YAAAA,GAAA,kBAAA,MAAAA,GAAA,iBAAA;AAAA,QACsC,wBAAA,MAAA;AAG3F,UAAAsY,EAAA,QAAA;AAAA,QAAmC;AAAA,MACvC;AAAA,MACJtC;AAAA,MACA7B;AAAA,MACAC;AAAA,IACA,GAGJgG,IAAApD;AAAA,MAA2C;AAAA,QACvC,mBAAA1B;AAAA,QACI,gBAAA3E;AAAA,MACA;AAAA,MACJyD;AAAA,IACA,GAGJ5P,IAAA;AAAA,MAAyB,CAAAhF,EAAA,cAAA,GAAA4U;AAAA,MACe,CAAA5U,EAAA,MAAA,GAAAoB;AAAA,MACR,CAAApB,EAAA,SAAA,GAAA6Q;AAAA,MACG,GAAA+J;AAAA,IAC5B,GAGPvG,KAAA,MAAA;AACI,MAAAyB,EAAA,OAAA,MAAA;AAAA,IAA+B,GAGnC+E,KAAA,YAAA;AAGI,UAFA,MAAA9X,EAAA,GAEA,CAAAoO,EAAA,SAAA3Q,EAAA,YAAA,CAAAuV,EAAA;AACI;AAGJ,YAAAzX,IAAA0X,EAAA;AACA,UAAA1X,KAAA;AACI;AAGJ,YAAA4S,KAAA6E,EAAA,MAAA,2BACA+E,KAAA5J,IAAA;AAGA,MAFAA,IAAA,gBAEA,eAAA5S,GAAAwc,EAAA;AAAA,IAAkD;AAGtD,WAAAtb;AAAA,MAAA,MAAA2R,EAAA;AAAA,MACyB,CAAAvK,MAAA;AAEjB,QAAAA,MACInG,EAAA,MAAA,GACAoa,GAAA;AAAA,MACJ;AAAA,IACJ,GAGJtX,EAAA;AAAA,MAAa,OAAA8Q;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown.CpZQYisR.js","sources":["../../src/composables/use-checkbox-select-all/use-checkbox-select-all.ts","../../src/composables/use-virtual-list/use-virtual-list.ts","../../src/types/listbox.ts","../../src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue","../../src/components/internal/listbox/components/listbox-option/listbox-option.vue","../../../ui-assets/icons-16/dist/vue/checkmark.vue","../../src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue","../../src/components/internal/listbox/composables/useListboxKeyboardNavigation.ts","../../src/components/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options.ts","../../src/utils/ts/get-listbox-option-id/get-listbox-option-id.ts","../../src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue","../../../ui-assets/icons-16/dist/vue/double-checkmark-small.vue","../../src/components/internal/decorative-checkbox/decorative-checkbox.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.ts","../../src/components/internal/listbox/components/listbox-lazy-load/listbox-lazy-load.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-nested-lazy-load/listbox-multi-select-nested-lazy-load.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue","../../src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.ts","../../src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue","../../src/utils/ts/debounce/debounce.ts","../../src/components/internal/listbox/listbox.vue","../../src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.ts","../../src/components/dropdown/dropdown.internal.types.ts","../../src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.ts","../../src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.internal.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/dropdown.keys.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.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/dropdown/dropdown.vue"],"sourcesContent":["import { computed } from 'vue';\nimport type { ComputedRef } from 'vue';\nimport type { Fn } from '@/types/functions';\nimport type { BentoListboxOptions } from '@/types/listbox';\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback selectAllCallback\n */\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback unselectAllCallback\n */\n\n/**\n * @typedef {Object} UseCheckboxSelectAll\n * @property {Ref<boolean>} isAllSelected - Indicates if all values are selected. Pass this to the :value property.\n * @property {Ref<boolean>} isIndeterminate - Indicates if it is in an indeterminated state (not all values are selected nor unselected). Pass this to the :indeterminate property.\n * @property {(selectedValue: boolean) => void} toggleSelectAll - Handles the select all flow, selects or unselects all and nullifies the indeterminated state. Pass this to the @input method.\n */\n\n/**\n * Composable to handle a 3 way checkbox state that allows to manage\n * a \"select all\", \"unselect all\" and an intermediate state where\n * not all are selected.\n *\n * @example\n * const checkboxVModelRef = ref<number[]>([]);\n *\n * const { isAllSelected, isIndeterminate, toggleSelectAll, updateIndeterminate } = useCheckboxSelectAll(\n * checkboxVModelRef,\n * () => { checkboxVModelRef.value = [...] // select all logic },\n * () => { checkboxVModelRef.value = [] // unselect all logic },\n * );\n * toggleSelectAll(true|false); // Hook this to the @input method\n * updateIndeterminate(totalOfAvailableItems);\n *\n *\n * @param {ComputedRef<BentoListboxMultiSelectValue>} selectedItemsList - Reference to the list of selected values\n * @param {ComputedRef<BentoListboxOptions>} items - Reference to the list of all available items in the dropdown\n * @param {selectAllCallback} selectAll - Callback function that alllows to select all the items when called\n * @param {unselectAllCallback} unselectAll - Callback function that alllows to select all the items when called\n * @returns {UseCheckboxSelectAll} Values to be set to the bento-checkbox value and indeterminate props, as well as functions to update them accordingly\n *\n */\nexport const useCheckboxSelectAll = (\n selectedItemsList: ComputedRef<BentoListboxOptions>,\n items: ComputedRef<BentoListboxOptions>,\n selectAll: Fn,\n unselectAll: Fn\n) => {\n const isAllSelected = computed(\n () => !!selectedItemsList.value?.length && selectedItemsList.value?.length === items.value.length\n );\n const isIndeterminate = computed(() => {\n // eslint-disable-next-line eqeqeq\n if (selectedItemsList.value == undefined || selectedItemsList.value.length === 0) {\n return false;\n }\n\n return selectedItemsList.value?.length !== items.value.length;\n });\n\n const toggleSelectAll = (selectedValue: boolean) => {\n if (selectedValue) {\n selectAll();\n } else {\n unselectAll();\n }\n };\n\n return {\n isAllSelected,\n isIndeterminate,\n\n toggleSelectAll,\n };\n};\n","import { computed, onMounted, onUnmounted, type Ref, ref, type UnwrapRef, watch } from 'vue';\nimport type {\n UseVirtualListContainerProps,\n UseVirtualListOptions,\n UseVirtualListWrapperProps,\n} from './use-virtual-list.types';\nimport { observeSizeOfElement } from '../../utils/ts/resize';\n\n/**\n * Sets up a virtual scrolling functionality on a container element and a list of items to virtually scroll over.\n * This composables returns the containerProps and wrapperProps objects that should be v-binded onto the container and wrapper elements\n * of the list you wish to virtually scroll.\n *\n * This will return a filtered down list object the user can render based on how much the user has scrolled on the container.\n *\n * @usage\n * <template>\n * <div v-bind=\"containerProps\" @scroll=\"onScroll\">\n * <ul v-bind=\"wrapperProps\">\n * <li v-for=\"item in list\" :key=\"item.index\" style=\"height: 22px\">\n * {{ item.label }}\n * </li>\n * </ul>\n * </div>\n * </template>\n *\n * <script setup lang=\"ts\"\n * import { useVirtualList } from '@adyen/bento-vue2';\n *\n * const DEFAULT_OPTIONS: { label: string }[] = new Array(100)\n * .fill(0)\n * .map((_, index) => ({ label: `Option ${index + 1}` }));\n * const ITEMS = ref(DEFAULT_OPTIONS);\n * const ITEM_HEIGHT = 30;\n *\n * const { containerProps, wrapperProps, list, onScroll } = useVirtualList(ITEMS, { itemHeight: ITEM_HEIGHT });\n * </script>\n *\n *\n * @param items - a reference to a list of items to virtually scroll over.\n * @param options - customizes how the Virtual scroller list functions.\n * @param options.itemHeight - the height in pixel or a function that returns the height in pixels for each item.\n * @param options.overscan - number of pre-rendered DOM nodes. Prevents whitespace between items if you scroll very quickly.\n * @param options.prefixHeight - the prefix height of elements present the scrollable area but not present in the items property.\n * @param options.disabled - if set to true, disables the virtual scrolling functionality.\n */\nexport function useVirtualList<T>(\n items: Ref<Array<T>>,\n { disabled, itemHeight, overscan = 5, prefixHeight }: UseVirtualListOptions\n) {\n const containerRef: Ref<UnwrapRef<HTMLElement | null>> = ref<HTMLElement | null>(null);\n const list = ref<Array<T>>([]) as Ref<Array<T>>;\n const startIndex = ref(0);\n const endIndex = ref(0);\n const containerHeight = ref(0);\n let listObserver;\n\n const wrapperProps = computed<UseVirtualListWrapperProps>(() => {\n const totalHeight =\n typeof itemHeight === 'number'\n ? items.value.length * itemHeight\n : items.value.reduce((sum, _, index) => sum + itemHeight(index), 0);\n\n const offSetTop =\n typeof itemHeight === 'number'\n ? startIndex.value * itemHeight\n : items.value.slice(0, startIndex.value).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n return {\n style: {\n marginTop: `${offSetTop}px`,\n height: `${totalHeight - offSetTop}px`,\n },\n };\n });\n\n /**\n * Gets the offset for the first item to show within the visible area.\n * @returns offset number.\n */\n const getOffset = () => {\n const prefixHeightIfSet = prefixHeight?.value ?? 0;\n const scrollTop = Math.max(containerRef.value.scrollTop - prefixHeightIfSet, 0);\n if (typeof itemHeight === 'number') {\n return Math.floor(scrollTop / itemHeight);\n }\n\n let sum = 0;\n let offset = 0;\n\n for (let i = 0; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n if (sum >= scrollTop) {\n offset = i;\n break;\n }\n }\n return offset;\n };\n\n /**\n * Gets the visible number of items based on the container size and item heights.\n * @returns visible number of items.\n */\n const getVisibileNumberOfItems = () => {\n containerHeight.value = containerRef.value.clientHeight;\n if (typeof itemHeight === 'number') {\n return Math.ceil(containerHeight.value / itemHeight);\n }\n\n const start = startIndex.value ?? 0;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n capacity = i;\n if (sum > containerHeight.value) {\n break;\n }\n }\n return capacity - start;\n };\n\n const updateVisibleItems = () => {\n if (containerRef.value) {\n const visibleCount = getVisibileNumberOfItems();\n startIndex.value = getOffset();\n endIndex.value = Math.min(startIndex.value + visibleCount + overscan, items.value.length);\n list.value = items.value.slice(startIndex.value, endIndex.value);\n }\n };\n\n const onScroll = () => {\n updateVisibleItems();\n };\n\n if (!disabled) {\n onMounted(() => {\n if (containerRef.value) {\n containerHeight.value = containerRef.value.clientHeight;\n // When the listbox opens we need to update the height\n listObserver = observeSizeOfElement(containerRef.value, ({ clientHeight }) => {\n containerHeight.value = clientHeight;\n updateVisibleItems();\n });\n updateVisibleItems();\n }\n });\n\n onUnmounted(() => {\n listObserver?.disconnect();\n });\n\n watch(\n () => items.value,\n () => {\n updateVisibleItems();\n }\n );\n }\n\n const containerProps: UseVirtualListContainerProps = {\n ref: containerRef,\n style: { overflowY: 'auto' },\n };\n\n /**\n * Scrolls the container to ensure the item at the given index is visible.\n * Uses a scroll-into-view approach: only scrolls if the item is outside the current viewport.\n */\n const scrollToIndex = (index: number) => {\n if (!containerRef.value) {\n return;\n }\n\n const itemTop =\n typeof itemHeight === 'number'\n ? index * itemHeight\n : items.value.slice(0, index).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n const currentHeight = typeof itemHeight === 'number' ? itemHeight : itemHeight(index);\n const itemBottom = itemTop + currentHeight;\n\n const { scrollTop, clientHeight: viewportHeight } = containerRef.value;\n const viewportBottom = scrollTop + viewportHeight;\n\n if (itemBottom > viewportBottom) {\n containerRef.value.scrollTop = viewportHeight > 0 ? itemBottom - viewportHeight : itemTop;\n } else if (itemTop < scrollTop) {\n containerRef.value.scrollTop = itemTop;\n }\n\n updateVisibleItems();\n };\n\n if (disabled) {\n return {\n containerRef,\n containerProps,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onScroll: () => {},\n list: items,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n scrollToIndex: () => {},\n startIndex: ref(0),\n };\n }\n\n return {\n containerRef,\n containerProps,\n onScroll,\n list,\n wrapperProps,\n scrollToIndex,\n startIndex,\n };\n}\n","import { type BentoSearchBarItem } from '@/components/search-bar/search-bar.types';\nimport { type BentoEmptyStateProps } from '@/components/empty-state/empty-state.types';\nimport { type OmitStrict } from '@/types/omit-strict';\nimport { type BentoButtonActionObject } from '@/components/button/components/button-actions/button-actions.types';\nimport { type UseVirtualListItemHeight } from '@/composables/use-virtual-list/use-virtual-list.types';\n\nexport type BentoListboxValue = string | number;\n\nexport type BentoListboxMultiSelectValue = Array<BentoListboxValue>;\n\n/**\n * Event triggered to load more items lazily.\n */\nexport type BentoListboxLazyLoadEvent = ({\n value,\n index,\n}: {\n /**\n * Index of the option that triggered the lazy load event\n */\n index: number;\n\n /**\n * Value of the option that triggered the lazy load event\n */\n value: BentoListboxValue;\n}) => Promise<void>;\n\nexport interface BentoListboxOptionItem extends BentoSearchBarItem {\n data?: unknown;\n description?: string;\n value: BentoListboxValue;\n displayValue?: string;\n /**\n * Adds Lazy load functionality to the Nested multi-select options.\n * Only works when `items` is set.\n */\n lazyLoad?: {\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: boolean;\n\n /**\n * The event that triggers upon clicking the \"show more\" button\n * or by scrolling the listbox nested item group.\n */\n lazyLoadEvent: BentoListboxLazyLoadEvent;\n };\n items?: Array<BentoListboxOptionItem>; // Reference itself for multi-level options\n}\n\nexport interface BentoListboxSelectedValueLabelPair {\n value: BentoListboxOptionItem['value'];\n label: BentoListboxOptionItem['label'];\n}\n\nexport type BentoListboxSelectedValue =\n | BentoListboxValue\n | BentoListboxMultiSelectValue\n | BentoListboxSelectedValueLabelPair\n | Array<BentoListboxSelectedValueLabelPair>;\n\nexport type BentoListboxOptions = Array<BentoListboxOptionItem>;\n\nexport type BentoListboxIsOptionDisabled = undefined | ((optionValue: BentoListboxOptionItem) => boolean);\n\nexport enum BentoListboxEvent {\n SELECT = 'select',\n SHOW_MORE = 'show-more',\n ESCAPE = 'escape-pressed',\n CLICK = 'click',\n ENTER = 'enter-pressed',\n SPACE = 'space-pressed',\n TAB = 'tab-pressed',\n CLOSE_DROPDOWN = 'close-dropdown',\n}\n\n/**\n * @deprecated Since v3.0.0. Use string literal instead.\n */\nexport enum BentoListboxLazyLoadType {\n AUTOMATIC = 'automatic',\n BUTTON = 'button',\n NONE = 'none',\n}\n\nexport interface BentoListboxSearchOptions {\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * The event that triggers upon user filtering the listbox items.\n */\n searchEvent: (searchValue: string) => void;\n}\n\nexport type BentoListboxEmptyStateProps = { action: { icon?: any } & BentoButtonActionObject } & OmitStrict<\n BentoEmptyStateProps,\n 'variant' | 'image' | 'description'\n>;\n\nexport type BentoListboxVirtulisationOptions = boolean | { itemHeight: UseVirtualListItemHeight };\n\nexport type BentoListboxItemRole = 'treeitem' | 'option';\n","<template>\n <div class=\"b-listbox-single-select-category\" role=\"group\" :aria-label=\"categoryLabel\">\n <bento-typography\n variant=\"caption\"\n el=\"span\"\n class=\"b-listbox-single-select-category__label-text\"\n aria-hidden=\"true\"\n >\n {{ categoryLabel }}\n </bento-typography>\n <div>\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { BentoTypography } from '@/components/typography';\n\n export default defineComponent({\n name: 'bento-listbox-static-category',\n components: {\n BentoTypography,\n },\n props: {\n /**\n * Category label text\n */\n categoryLabel: {\n type: String,\n required: true,\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-category.scss\" />\n","<template>\n <div\n class=\"b-listbox-option\"\n role=\"option\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n @click=\"onClick\"\n @keydown.enter=\"onOptionSelected(BentoListboxEvent.ENTER, $event)\"\n @keydown.space=\"onOptionSelected(BentoListboxEvent.SPACE, $event)\"\n @keydown.tab=\"onOptionSelected(BentoListboxEvent.TAB, $event)\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoListboxEvent } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n /**\n * listbox option wrapper.\n * Contains only styles and allows the Multi-Select and Single-Select DRY the styles.\n *\n * Options and Attributes are inherited (`inheritAttrs: true`)\n *\n * @example\n * <bento-listbox-option\n * ...props\n * ...attrs\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-option',\n props: {\n /**\n * Indicates if the option is active.\n */\n active: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.CLICK, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-listbox-option--active': props.active,\n 'b-listbox-option--disabled': props.disabled,\n 'b-listbox-option--selected': props.selected,\n }));\n\n const onClick = (e: Event) => {\n emit(BentoListboxEvent.CLICK, e);\n };\n\n const onOptionSelected = (eventName, e: Event) => {\n emit(eventName, e);\n };\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Values\n conditionalClasses,\n\n // Events\n onClick,\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-option.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=\"M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <bento-listbox-option\n class=\"b-listbox-single-select-option\"\n :active=\"active\"\n :disabled=\"disabled\"\n :selected=\"selected\"\n :aria-selected=\"ariaSelected\"\n :aria-disabled=\"ariaDisabled\"\n :tabindex=\"tabIndex\"\n @click=\"onOptionSelected(BentoListboxEvent.SELECT)\"\n @enter-pressed=\"onOptionSelected(BentoListboxEvent.ENTER)\"\n @space-pressed.prevent=\"onOptionSelected(BentoListboxEvent.SPACE)\"\n @tab-pressed=\"onOptionSelected(BentoListboxEvent.TAB)\"\n >\n <slot v-bind=\"option\">\n <span class=\"b-listbox-single-select-option__text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"option.description\"\n class=\"b-listbox-single-select-option__description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n <span class=\"b-listbox-single-select-option__check-icon\">\n <checkmark-icon v-show=\"selected\" svg-title=\"selected\" />\n </span>\n </bento-listbox-option>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoListboxEvent, type BentoListboxOptionItem } from '@/types/listbox';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n\n /**\n * Listbox option element.\n *\n * @example\n * <bento-listbox-single-select-option\n * v-for=\"option in options\"\n * :key=\"option.value\"\n * :option=\"option\"\n * :selected=\"option.selected\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-single-select-option',\n components: {\n BentoListboxOption,\n BentoTypography,\n CheckmarkIcon,\n },\n props: {\n /**\n * Indicates if the option is active.\n */\n active: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.ENTER, BentoListboxEvent.SELECT, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const onOptionSelected = eventName => {\n if (props.disabled) {\n return;\n }\n\n /**\n * Trigerred when an option is clicked or selected via keyboard navigation.\n * Indicates which option was selected.\n *\n * @event {string} - The corresponding event\n * @property {number} selectedValue - Selected option's value\n */\n emit(eventName, props.option);\n };\n\n const ariaDisabled = computed(() => (props.disabled ? true : null));\n const ariaSelected = computed(() => (props.selected ? true : null));\n const tabIndex = computed(() => (props.disabled ? -1 : 0));\n\n return {\n // Values\n ariaDisabled,\n ariaSelected,\n tabIndex,\n\n // Enums\n BentoListboxEvent,\n\n // Events\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-option.scss\" />\n","import { computed, type Ref, ref } from 'vue';\n\nconst enum ListboxKeyboardNavigationMutationDirection {\n INCREASE = 'increase',\n DECREASE = 'decrease',\n}\n\nexport const useListboxKeyboardNavigation = (\n { items, totalItemCount }: { items: Ref<Array<HTMLElement>>; totalItemCount?: Ref<number> },\n focusItem: (index: number) => void\n) => {\n const lastItemIndex = computed(() => (totalItemCount?.value ? totalItemCount.value - 1 : items.value.length - 1));\n const focusedIndex = ref(0);\n\n const mutateFocusedIndex = (direction: ListboxKeyboardNavigationMutationDirection) => {\n switch (direction) {\n case ListboxKeyboardNavigationMutationDirection.INCREASE:\n focusedIndex.value += 1;\n break;\n case ListboxKeyboardNavigationMutationDirection.DECREASE:\n focusedIndex.value -= 1;\n break;\n default:\n break;\n }\n };\n\n const calculateFocusedIndex = ({ edgeCaseItem }, direction) => {\n const isEdgeCaseItem = focusedIndex.value === edgeCaseItem;\n if (isEdgeCaseItem) {\n return;\n }\n mutateFocusedIndex(direction);\n focusItem(focusedIndex.value);\n };\n\n const moveToNextElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow down to scroll down the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: lastItemIndex.value,\n },\n ListboxKeyboardNavigationMutationDirection.INCREASE\n );\n };\n\n const moveToPreviousElement = (event?: CustomEvent<KeyboardEvent>) => {\n // prevent arrow up to scroll up the container\n preventDefault(event);\n calculateFocusedIndex(\n {\n edgeCaseItem: 0,\n },\n ListboxKeyboardNavigationMutationDirection.DECREASE\n );\n };\n\n const moveToFirstElement = (event?: CustomEvent<KeyboardEvent>) => {\n preventDefault(event);\n focusedIndex.value = 0;\n focusItem(focusedIndex.value);\n };\n\n const moveToLastElement = (event?: CustomEvent<KeyboardEvent>) => {\n preventDefault(event);\n focusedIndex.value = lastItemIndex.value;\n focusItem(focusedIndex.value);\n };\n\n const setListboxFocusedIndex = (index: number) => {\n focusedIndex.value = index;\n };\n\n const preventDefault = (event?: CustomEvent<KeyboardEvent>) => {\n event?.detail?.preventDefault();\n event?.detail?.stopPropagation();\n };\n\n return {\n moveToFirstElement,\n moveToLastElement,\n moveToNextElement,\n moveToPreviousElement,\n setListboxFocusedIndex,\n preventDefault,\n focusedIndex,\n };\n};\n","import { type BentoListboxItemRole, type BentoListboxOptions } from '@/types/listbox';\nimport { nextTick, ref, type Ref, watch } from 'vue';\n\n/**\n * Composable that provides a reactive list of visible DOM options within a container.\n * It queries for all elements with `role=\"option\"` inside the container and filters\n * them based on their visibility. This is useful for components with virtual scrolling\n * or complex layouts where not all options are visible at once. It automatically\n * updates the list of visible options whenever the `items` array changes.\n *\n * @param containerRef A ref to the HTML container element that holds the options.\n * @param items The list of items for the listbox. The watcher on this parameter triggers the update.\n * @param role The role of the option elements to query for. Defaults to 'option'.\n * @param checkVisibility If true, it will only return visible options. Defaults to true.\n * @returns An object containing:\n * - `visibleDomOptions`: A reactive list of visible option elements.\n * - `updateVisibleDomOptions`: A function to manually trigger an update of the visible options.\n */\nexport const useVisibleDomOptions = (\n containerRef: Ref<Element | undefined>,\n items: Ref<BentoListboxOptions>,\n role: Ref<BentoListboxItemRole> = ref('option'),\n checkVisibility: boolean = true\n) => {\n const visibleDomOptions = ref<Array<HTMLDivElement>>([]);\n\n const updateVisibleDomOptions = async () => {\n if (!containerRef.value || containerRef.value.nodeType === Node.COMMENT_NODE) {\n return;\n }\n\n const options = Array.from(containerRef.value.querySelectorAll<HTMLDivElement>(`[role=\"${role.value}\"]`));\n\n visibleDomOptions.value = checkVisibility\n ? options.filter((option: HTMLDivElement) => option.checkVisibility())\n : options;\n };\n\n watch(\n items,\n () => {\n nextTick(() => {\n updateVisibleDomOptions();\n });\n },\n { immediate: true, deep: true }\n );\n\n return {\n visibleDomOptions,\n updateVisibleDomOptions,\n };\n};\n","import type { BentoListboxValue } from '@/types/listbox';\n\n/**\n * Builds the DOM id used to link a listbox option with `aria-activedescendant`.\n * Option values are encoded so values with spaces or special characters remain safe to use in ids.\n */\nexport const getListboxOptionId = (listboxId: string, optionValue: BentoListboxValue) =>\n `${listboxId}-option-${encodeURIComponent(String(optionValue))}`;\n","<template>\n <div\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n v-bind=\"ariaAttributes\"\n role=\"listbox\"\n v-on=\"listboxListeners\"\n @focusin=\"handleVirtualScrollingFocus\"\n >\n <template v-if=\"hasCategories && staticCategories\">\n <template v-for=\"item in items\">\n <bento-listbox-single-select-category\n v-if=\"item.items && item.items.length > 0\"\n :key=\"`category-${item.value}`\"\n :category-label=\"item.label\"\n >\n <bento-listbox-single-select-option\n v-for=\"option in item.items\"\n :id=\"getOptionId(option)\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(option)\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </bento-listbox-single-select-category>\n\n <bento-listbox-single-select-option\n v-else\n :id=\"getOptionId(item)\"\n :key=\"`option-${item.value}`\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(item)\"\n :option=\"item\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(item) : null\"\n :selected=\"item.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </template>\n <template v-else>\n <bento-listbox-single-select-option\n v-for=\"option in items\"\n :id=\"getOptionId(option)\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :active=\"activeDescendantId === getOptionId(option)\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedItem.value\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type HTMLAttributes, nextTick, type PropType, ref, toRef } from 'vue';\n import { BentoListboxSingleSelectCategory } from './components/listbox-single-select-category';\n import { BentoListboxSingleSelectOption } from '../listbox-single-select-option';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n import {\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type Booleanish } from '@/types/prop-types';\n import { getListboxOptionId } from '@/utils/ts/get-listbox-option-id';\n\n import { BentoKeyboardNavigationDirective } from '@/directives';\n\n /**\n * Listbox single-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-listbox-single-select',\n components: {\n BentoListboxSingleSelectCategory,\n BentoListboxSingleSelectOption,\n },\n directives: { BentoKeyboardNavigationDirective },\n inheritAttrs: false,\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { type: String, default: null },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\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 * Prefix used to generate stable option IDs.\n */\n optionIdBase: { type: String, required: true },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected\n */\n selectedValue: {\n type: Array as PropType<BentoListboxOptions>,\n default: undefined,\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Total number of items in the full list (used for virtual scroll keyboard navigation).\n * When greater than 0, virtual scroll keyboard navigation is enabled.\n */\n totalItemCount: { type: Number, default: 0 },\n\n /**\n * Function to scroll the virtual list container to a given item index.\n */\n scrollToIndex: { type: Function as PropType<(index: number) => void>, default: undefined },\n\n /**\n * The start index of the currently rendered virtual scroll slice.\n */\n virtualScrollStartIndex: { type: Number, default: 0 },\n },\n emits: [BentoListboxEvent.SELECT, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit, expose, slots, attrs }) {\n const listboxRef = ref<HTMLElement>();\n const listboxItemRef = ref([]);\n const selectedItem = computed(() => !!props.selectedValue?.length && props.selectedValue.at(0));\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n }) as HTMLAttributes\n );\n\n /**\n * Finds out if items have sub items\n */\n const hasCategories = computed(() => !!props.items.some(({ items }) => !!items));\n\n const onOptionSelected = eventName => (selectedOption: BentoListboxOptions) => {\n emit(eventName, [selectedOption]);\n };\n\n const getOptionId = (option: BentoListboxOptionItem) =>\n getListboxOptionId(props.optionIdBase, option.value);\n\n // Keyboard navigation\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n ref('option'),\n false\n );\n\n const isVirtualScrollEnabled = computed(() => props.totalItemCount > 0);\n\n // When virtual scroll re-renders items (e.g. on mouse wheel scroll), the\n // browser may auto-focus an option. Sync the keyboard navigation index to\n // match the focused element so subsequent arrow key presses navigate from\n // the correct position.\n const handleVirtualScrollingFocus = (event: FocusEvent) => {\n if (!isVirtualScrollEnabled.value) {\n return;\n }\n\n const target = event.target as HTMLElement;\n if (target === listboxRef.value || target?.getAttribute('role') !== 'option') {\n return;\n }\n\n const localIndex = visibleDomOptions.value.indexOf(target as HTMLDivElement);\n if (localIndex !== -1) {\n const globalIndex = localIndex + props.virtualScrollStartIndex;\n setListboxFocusedIndex(globalIndex);\n }\n };\n\n const focusItem = async (globalIndex: number) => {\n if (isVirtualScrollEnabled.value && props.scrollToIndex) {\n props.scrollToIndex(globalIndex);\n await nextTick();\n await updateVisibleDomOptions();\n const newDomIndex = globalIndex - props.virtualScrollStartIndex;\n visibleDomOptions.value[newDomIndex]?.focus();\n } else {\n visibleDomOptions.value[globalIndex]?.focus();\n }\n };\n\n const navigateToItem = async (globalIndex: number) => {\n setListboxFocusedIndex(globalIndex);\n await focusItem(globalIndex);\n };\n\n const scrollIntoContainer = (listboxItemElement?: HTMLElement, listboxElement?: HTMLElement) => {\n if (!listboxItemElement || !listboxElement) {\n return;\n }\n\n const elementRect = listboxItemElement.getBoundingClientRect();\n const scrollableContainer = listboxElement;\n const containerRect = scrollableContainer.getBoundingClientRect();\n\n if (elementRect.top < containerRect.top) {\n scrollableContainer.scrollTop -= containerRect.top - elementRect.top;\n } else if (elementRect.bottom > containerRect.bottom) {\n scrollableContainer.scrollTop += elementRect.bottom - containerRect.bottom;\n }\n };\n\n const scrollToItem = async (globalIndex: number, listboxElement?: HTMLElement) => {\n await updateVisibleDomOptions();\n\n if (isVirtualScrollEnabled.value && props.scrollToIndex) {\n props.scrollToIndex(globalIndex);\n } else {\n scrollIntoContainer(visibleDomOptions.value[globalIndex], listboxElement);\n }\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n totalItemCount: toRef(props, 'totalItemCount'),\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n const listboxOptionListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n expose({\n /**\n * Reference for a single listbox item.\n * Required for keyboard navigation in dropdown as $children is removed in vue@3\n */\n listboxItemRef,\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n /**\n * Navigates to an item by global index, handling virtual scroll if enabled.\n * Scrolls the virtual list and focuses the item.\n */\n navigateToItem,\n /**\n * Scrolls to an item by global index without changing focus.\n * Used when the dropdown opens via click to bring the selected option into view.\n */\n scrollToItem,\n });\n\n return {\n // Enums\n BentoListboxEvent,\n\n // Values\n listboxRef,\n listboxItemRef,\n selectedItem,\n slots,\n ariaAttributes,\n getOptionId,\n\n // Computed\n hasCategories,\n\n // Methods\n onOptionSelected,\n\n // Keyboard navigation\n listboxListeners,\n listboxOptionListeners,\n\n // Virtual scroll focus management\n handleVirtualScrollingFocus,\n };\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=\"M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z\"/><path fill=\"#001222\" d=\"M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <div class=\"b-checkbox-input\" :class=\"conditionalClasses\" role=\"presentation\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <double-checkmark-small-icon\n v-else-if=\"allSelected\"\n class=\"b-checkbox-input__icon\"\n svg-title=\"\"\n aria-hidden=\"true\"\n data-testid=\"decorative-checkbox-double-checkmark-icon\"\n />\n <checkmark-small-icon v-else-if=\"checked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <div class=\"b-checkbox-input__outline\" :class=\"outlineConditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoCheckboxState } from '@/types/checkbox';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import DoubleCheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/double-checkmark-small';\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n indeterminate: { type: Boolean, default: false },\n checked: { type: Boolean, default: false },\n allSelected: { type: Boolean, default: false }\n});\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${BentoCheckboxState.DISABLED}`]: props.disabled,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${BentoCheckboxState.UNCHECKED}`]:\n !props.checked && !props.indeterminate && !props.allSelected,\n [`b-checkbox-input__outline--${BentoCheckboxState.CHECKED}`]:\n (props.checked || props.allSelected) && !props.indeterminate,\n [`b-checkbox-input__outline--${BentoCheckboxState.INDETERMINATE}`]: props.indeterminate,\n }));\n</script>\n\n<script lang=\"ts\">\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"@/internal/checkbox-input/checkbox-input.scss\" />\n","export enum ListboxMultiSelectCategoryClass {\n DISABLED = 'disabled',\n STATIC_CATEGORY = 'static-category',\n}\n\nexport enum ListboxMultiSelectCategoryEvent {\n SELECT_CATEGORY = 'select-category',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div v-if=\"shouldDisplayShowMoreButton || loading\" class=\"b-listbox-lazy-load\">\n <bento-loading-button\n v-if=\"shouldDisplayShowMoreButton\"\n :state=\"loadingButtonState\"\n :tabindex=\"tabindex\"\n :condensed=\"condensed\"\n variant=\"secondary\"\n @click.capture=\"$emit('show-more', $event)\"\n >\n {{ showMoreButtonText }}\n </bento-loading-button>\n <bento-loading-indicator v-else-if=\"loading\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoListboxLazyLoadType } from '@/types/listbox';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoLoadingButton, BentoLoadingButtonState } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import { type BentoLazyLoadProps } from './listbox-lazy-load.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n defineEmits([\"show-more\"]);\n\n const props = defineProps({\n condensed: { type: Boolean, default: false },\n hasMoreItems: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n tabindex: { default: undefined },\n type: null\n});\n\n const shouldDisplayShowMoreButton = computed(\n () => props.type === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed<BentoLoadingButtonState>(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const showMoreButtonText = computed(() => (props.loading ? t('loading') : t('showMore')));\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'listbox-lazy-load',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-lazy-load.scss\" />\n","<template>\n <div role=\"treeitem\" :tabindex=\"0\" @keydown.enter.prevent=\"showMore\" @keydown.space.prevent=\"showMore\">\n <bento-empty-state\n v-if=\"failedAndRetry\"\n variant=\"basic\"\n class=\"b-listbox-multi-select-nested-lazy-load__error-message\"\n >\n {{ t('thereWasAnErrorLoadingNewItems') }}\n </bento-empty-state>\n <bento-listbox-lazy-load\n type=\"button\"\n :tabindex=\"-1\"\n condensed\n :has-more-items=\"option.lazyLoad?.hasMoreItems\"\n :loading=\"loading\"\n @show-more=\"showMore\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoEmptyState } from '@/components/empty-state';\n import { BentoListboxLazyLoad } from '@/internal/listbox/components/listbox-lazy-load';\n import { useI18n } from '@/utils/ts/i18n';\n import type { ListboxMultiSelectNestedLazyLoadProps } from './listbox-multi-select-nested-lazy-load.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const loading = ref(false);\n const failedAndRetry = ref(false);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const props = defineProps({\n index: null,\n option: null\n});\n\n async function showMore(event: Event) {\n event.stopImmediatePropagation();\n if (loading.value) {\n return;\n }\n\n failedAndRetry.value = false;\n loading.value = true;\n\n try {\n await props.option.lazyLoad?.lazyLoadEvent({\n value: props.option.value,\n index: props.index,\n });\n } catch {\n failedAndRetry.value = true;\n }\n\n loading.value = false;\n }\n\n defineExpose({\n /**\n * Trigger the lazy load event programmatically.\n */\n showMore,\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'listbox-multi-select-nested-lazy-load',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-nested-lazy-load.scss\" />\n","<template>\n <div>\n <bento-listbox-option\n v-if=\"!isStaticCategory\"\n class=\"b-listbox-multi-select-category__option\"\n :class=\"conditionalClass\"\n :tabindex=\"tabindex\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :aria-disabled=\"hasAllPropsDisabled\"\n :aria-expanded=\"`${isOpen}`\"\n role=\"treeitem\"\n :aria-owns=\"categoryGroupId\"\n :aria-labelledby=\"categoryNameId\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n @keydown.arrow-left.native=\"toggleOpen($event, false)\"\n @keydown.arrow-right.native=\"toggleOpen($event, true)\"\n >\n <decorative-checkbox\n :indeterminate=\"isIndeterminate\"\n :disabled=\"hasAllPropsDisabled\"\n :checked=\"isAllSelected\"\n />\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography :id=\"categoryNameId\" el=\"span\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n <div\n aria-hidden=\"true\"\n class=\"b-listbox-multi-select-category__label-chevron\"\n data-testid=\"toggle-listbox\"\n @click.capture.stop=\"toggleOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" :svg-title=\"chevronTitle\" />\n <chevron-down-icon v-else :svg-title=\"chevronTitle\" />\n </div>\n </span>\n </bento-listbox-option>\n\n <div\n v-else\n class=\"b-listbox-multi-select-category b-listbox-multi-select-category--static-category\"\n aria-hidden=\"true\"\n >\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography el=\"span\" variant=\"caption\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n </span>\n </div>\n\n <!-- Nested options -->\n <div v-show=\"showItemChildren\" :id=\"categoryGroupId\" role=\"group\" :aria-label=\"category.label\">\n <slot />\n\n <!-- Nested items Lazy load -->\n <template v-if=\"category.lazyLoad?.hasMoreItems\">\n <bento-listbox-multi-select-nested-lazy-load\n ref=\"lazyLoadRef\"\n :option=\"category\"\n :index=\"optionIndex\"\n />\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../../../../../listbox-option';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n type BentoListboxIsOptionDisabled,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { useCheckboxSelectAll } from '@/composables';\n import {\n ListboxMultiSelectCategoryClass,\n ListboxMultiSelectCategoryEvent,\n } from './listbox-multi-select-category.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { BentoListboxMultiSelectNestedLazyLoad } from '../listbox-multi-select-nested-lazy-load';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox multi-select category list.\n * Allows the rendering of nested lists\n *\n * @example\n * import { ListboxMultiSelectCategory } from '@/internal/listbox';\n *\n * export default {\n * components: { BentoListboxMultiSelectCategory },\n * template: `\n * <listbox-multi-select-category\n * :category=\"option\"\n * :is-option-disabled=\"true\"\n * :selected-items-list=\"['option-1']\"\n * @select-category=\"$emit('select-category', option)\"\n * @unselect-category=\"$emit('unselect-category', option)\"\n * >\n * <listbox-multi-select-options\n * category-items\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :is-multi-level=\"true\"\n * :selected-items-list=\"['option-']\"\n * :searching=\"false\"\n * @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n * />\n * </listbox-multi-select-category>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select-category',\n components: {\n BentoTypography,\n BentoListboxOption,\n BentoListboxMultiSelectNestedLazyLoad,\n ChevronDownIcon,\n ChevronUpIcon,\n DecorativeCheckbox,\n },\n props: {\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n * @property {BentoListboxOptionItem} value.items - Category items list\n */\n category: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * Option's index within the Listbox `item` array.\n */\n optionIndex: {\n type: Number,\n default: null,\n },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Category's tabindex\n */\n tabindex: { type: Number, default: -1 },\n },\n emits: [\n ListboxMultiSelectCategoryEvent.SELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const isOpen = ref(false);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const categoryGroupId = generateUid('category-group');\n const categoryNameId = generateUid('category-name');\n const lazyLoadRef = ref(null);\n\n // This method should be used to determine if an option is disabled as it works for both vue 2 & 3.\n const vue2Vue3FixedisOptionDisabled = option =>\n props.isOptionDisabled ? props.isOptionDisabled(option) : false;\n\n const hasAllPropsDisabled = computed(() => {\n // Do not disable empty categories if they are lazy loaded\n if (props.category.lazyLoad && props.category.items?.length === 0) {\n return false;\n }\n return props.category.items.every(option => vue2Vue3FixedisOptionDisabled(option));\n });\n\n const isStaticCategory = toRef(props, 'staticCategories');\n\n // Display item children if is open state or if static categories is enabled\n const showItemChildren = computed(() => isOpen.value || props.staticCategories);\n\n const conditionalClass = computed(() => ({\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.DISABLED}`]:\n hasAllPropsDisabled.value,\n }));\n\n const toggleOpen = (event: Event, open?: boolean) => {\n event.preventDefault();\n\n // Load lazy categories if the items list is empty (0 items) when category is opened\n if (props.category.lazyLoad && props.category.items?.length === 0) {\n lazyLoadRef.value.showMore(event);\n }\n\n isOpen.value = open !== undefined ? open : !isOpen.value;\n emit(ListboxMultiSelectCategoryEvent.TOGGLE_CATEGORY_VISIBILITY, props.category.value);\n };\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = vue2Vue3FixedisOptionDisabled(option);\n const isPreSelected =\n (props.selectedItemsList as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n const enabledItems = computed(() =>\n props.category.items.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed<BentoListboxOptions>(() =>\n enabledItems.value?.filter(({ value }) => props.selectedItemsList?.includes(value))\n );\n\n const chevronTitle = computed(() => {\n const messageName = isOpen.value ? 'categoryOpened' : 'categoryClosed';\n return t(messageName, { category: props.category.label }) as string;\n });\n\n const selectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.SELECT_CATEGORY);\n };\n const unselectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY);\n };\n\n const isLazySelectedByValue = computed(\n () => !!props.category.lazyLoad && props.selectedItemsList.includes(props.category.value)\n );\n\n const {\n isAllSelected: isAllChildrenSelected,\n isIndeterminate: isChildrenIndeterminate,\n toggleSelectAll,\n } = useCheckboxSelectAll(visibleSelectedList, enabledItems, selectAll, unselectAll);\n\n const isAllSelected = computed(() => isLazySelectedByValue.value || isAllChildrenSelected.value);\n const isIndeterminate = computed(() => !isLazySelectedByValue.value && isChildrenIndeterminate.value);\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n return {\n // Refs\n lazyLoadRef,\n\n // Values\n chevronTitle,\n conditionalClass,\n hasAllPropsDisabled,\n isOpen,\n isAllSelected,\n isIndeterminate,\n isStaticCategory,\n categoryGroupId,\n categoryNameId,\n\n // Computed\n showItemChildren,\n ariaCheckedComputed,\n\n // Methods\n handleSelectAll,\n toggleOpen,\n toggleSelectAll,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-category.scss\" />\n","export enum ListboxMultiSelectOptionsEvent {\n SELECT_CATEGORY = 'select-category',\n TOGGLE_CHECKBOX_SELECTION = 'toggle-checkbox-selection',\n UNSELECT_CATEGORY = 'unselect-category',\n TOGGLE_CATEGORY_VISIBILITY = 'toggle-category-visibility',\n}\n","<template>\n <div>\n <div v-for=\"option in items\" :key=\"`selected-${option.value}`\">\n <template v-if=\"searching && isMultiLevel\">\n <bento-listbox-option\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleSearchOption(option)\"\n @enter-pressed=\"toggleSearchOption(option)\"\n @space-pressed.prevent=\"toggleSearchOption(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n\n <template v-else>\n <!-- Category -->\n <template v-if=\"option.items\">\n <listbox-multi-select-category\n :category=\"option\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n :selected-items-list=\"selectedItemsList\"\n :option-index=\"itemsIndex[option.value]\"\n :tabindex=\"computedTabindex(option.value)\"\n @select-category=\"$emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\"\n @unselect-category=\"$emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option)\"\n @toggle-category-visibility=\"\n $emit(ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, $event)\n \"\n >\n <listbox-multi-select-options\n category-items\n :items=\"option.items\"\n :is-option-disabled=\"isOptionDisabled\"\n :items-index=\"itemsIndex\"\n :focused-index=\"focusedIndex\"\n :is-multi-level=\"isMultiLevel\"\n :static-categories=\"staticCategories\"\n :selected-items-list=\"selectedItemsList\"\n :searching=\"searching\"\n :parent-category=\"option\"\n :role=\"$attrs['role'] || 'option'\"\n @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n />\n </listbox-multi-select-category>\n </template>\n\n <!-- Option -->\n <bento-listbox-option\n v-else\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :tabindex=\"computedTabindex(option.value)\"\n :aria-selected=\"`${isOptionSelected(option)}`\"\n :aria-checked=\"`${isOptionSelected(option)}`\"\n :aria-disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :role=\"$attrs['role'] || 'option'\"\n @click=\"toggleCheckboxSelection(option)\"\n @enter-pressed=\"toggleCheckboxSelection(option)\"\n @space-pressed.prevent=\"toggleCheckboxSelection(option)\"\n >\n <decorative-checkbox\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :checked=\"isOptionSelected(option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { BentoListboxOption } from '../../../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { ListboxMultiSelectCategory } from './components/listbox-multi-select-category';\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n\n import {\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { ListboxMultiSelectOptionsEvent } from './listbox-multi-select-options.types';\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n *\n * export default {\n * components: { ListboxMultiSelect },\n * template: `\n * <listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'listbox-multi-select-options',\n components: {\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectCategory,\n DecorativeCheckbox,\n },\n inheritAttrs: false,\n props: {\n /**\n * Indicates if the items listed are inside a category\n * so they can be padded to right by one level in recursion.\n * Items of categories are automatically defined as \"categoryItems\"\n */\n categoryItems: { type: Boolean, default: false },\n\n /**\n * Current focused option index\n */\n focusedIndex: { type: Number, default: 0 },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox 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: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\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 * Indicates if the elements options are inside a multi-level category\n */\n isMultiLevel: { type: Boolean, default: false },\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: { type: Boolean, default: false },\n\n /**\n * List of selected items.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<Array<BentoListboxValue>>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Object with the index of each item.\n */\n itemsIndex: {\n type: Object as PropType<Record<string, number>>,\n default: () => ({}),\n },\n\n /**\n * The parent category of the items.\n */\n parentCategory: {\n type: Object as PropType<BentoListboxOptionItem>,\n default: null,\n },\n },\n emits: [\n ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION,\n ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY,\n ],\n setup(props, { emit }) {\n const toggleCheckboxSelection = (option: BentoListboxOptionItem) => {\n if (props.isOptionDisabled(option)) {\n return;\n }\n emit(ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION, option);\n };\n\n const isCategory = (option: BentoListboxOptionItem) => !!option.items;\n const shouldShowDescription = (option: BentoListboxOptionItem) => {\n const isSearchingMultiLevel = props.isMultiLevel && props.searching;\n\n return option.description && (!props.isMultiLevel || isSearchingMultiLevel);\n };\n\n const isOptionSelected = option => {\n const isParentLazySelected =\n !!props.parentCategory?.lazyLoad && props.selectedItemsList.includes(props.parentCategory.value);\n\n if (option.items) {\n const isLazyCategorySelected = !!option.lazyLoad && props.selectedItemsList.includes(option.value);\n return (\n isParentLazySelected ||\n isLazyCategorySelected ||\n !!option.items.find(item => props.selectedItemsList.includes(item.value))\n );\n }\n return isParentLazySelected || props.selectedItemsList.includes(option.value);\n };\n\n const toggleSearchOption = option => {\n if (isCategory(option)) {\n const event = isOptionSelected(option)\n ? ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY\n : ListboxMultiSelectOptionsEvent.SELECT_CATEGORY;\n emit(event, option);\n } else {\n toggleCheckboxSelection(option);\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-listbox-multi-select-options__static-category-option': props.staticCategories,\n 'b-listbox-multi-select-options__category-option': props.categoryItems,\n }));\n\n const computedTabindex = value => (props.itemsIndex[value] === props.focusedIndex ? 0 : -1);\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n isOptionSelected,\n shouldShowDescription,\n toggleCheckboxSelection,\n toggleSearchOption,\n computedTabindex,\n\n // Enums\n BentoListboxEvent,\n ListboxMultiSelectOptionsEvent,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-options.scss\" />\n","import { type BentoListboxOptions } from '@/types/listbox';\nimport { computed, type Ref } from 'vue';\n\n/**\n * Checks if items array is flat or has multi levels and converts items into a flat array if needed\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoListboxOptions>} itemsList - ref of the list of items for the listbox\n * @returns {ComputedRef<boolean>} isMultiLevelSelect - Indicates if items array is multi level\n * @returns {ComputedRef<any[]>} flattenedItemsList - list of items computed into a flat array\n */\nexport const useMultiLevelItems = (itemsList: Ref<BentoListboxOptions>) => {\n const isMultiLevelSelect = computed(() => !!itemsList.value?.find(({ items }) => !!items));\n\n const flattenedItemsList = computed(() => {\n if (isMultiLevelSelect.value) {\n return itemsList.value?.reduce((acc, val) => {\n if (val.items) {\n acc.push(...val.items.flat());\n } else {\n acc.push(val);\n }\n return acc;\n }, []);\n }\n\n return itemsList.value;\n });\n\n return {\n isMultiLevelSelect,\n flattenedItemsList,\n };\n};\n","<template>\n <div ref=\"listboxRef\" class=\"b-listbox-multi-select\">\n <!-- Selected options -->\n <div v-if=\"showSelectedItems\">\n <ul\n v-bento-keyboard-navigation-directive\n class=\"b-listbox-multi-select__chips\"\n v-on=\"chipsSectionListeners\"\n >\n <li v-for=\"item in selectedOptions\" :key=\"item.value\">\n <bento-chip\n ref=\"selectedListboxItemsRef\"\n :disabled=\"isOptionDisabled(item)\"\n :label=\"item.label\"\n condensed\n @click=\"item.items ? unselectAllCategory(item) : toggleCheckboxSelection('select', item)\"\n />\n </li>\n </ul>\n\n <hr class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n </div>\n\n <div v-bento-keyboard-navigation-directive v-bind=\"ariaAttributes\" :role=\"computedRole\" v-on=\"listboxListeners\">\n <!-- Select all -->\n <bento-listbox-option\n v-if=\"showSelectAllCheckbox\"\n ref=\"selectAllListboxItemsRef\"\n class=\"b-listbox-multi-select__option\"\n :tabindex=\"focusedIndex === 0 ? 0 : -1\"\n :aria-selected=\"ariaCheckedComputed !== 'false'\"\n :aria-checked=\"ariaCheckedComputed\"\n :role=\"computedOptionRole\"\n @click=\"handleSelectAll\"\n @enter-pressed=\"handleSelectAll\"\n @space-pressed.prevent=\"handleSelectAll\"\n >\n <decorative-checkbox :checked=\"isAllSelected\" :indeterminate=\"isIndeterminate\" />\n <bento-typography el=\"span\">\n {{ selectAllCheckboxText }}\n </bento-typography>\n </bento-listbox-option>\n <hr v-if=\"showSelectAllCheckbox\" class=\"b-listbox-multi-select__divider\" aria-hidden=\"true\" />\n\n <!-- Available options -->\n <listbox-multi-select-options\n ref=\"listboxItemsRef\"\n :items=\"items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :static-categories=\"staticCategories\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n :focused-index=\"focusedIndex\"\n :items-index=\"computedItemsIndex\"\n :role=\"computedOptionRole\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection('select', $event)\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @toggle-category-visibility=\"toggleCategoryVisibility\"\n @space-pressed=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @tab-pressed=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @enter-pressed=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, nextTick, ref, toRef, useAttrs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { DecorativeCheckbox } from '@/internal/decorative-checkbox';\n import { BentoTypography } from '@/components/typography';\n import { BentoChip } from '@/components/chip';\n import { BentoListboxOption } from '../listbox-option';\n import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n\n import { useCheckboxSelectAll } from '@/composables';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useMultiLevelItems } from '../../composables/use-multi-level-items/use-multi-level-items';\n import { useVisibleDomOptions } from '@/internal/listbox/composables/use-visible-dom-options/use-visible-dom-options';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import {\n BentoListboxEvent,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { type Booleanish } from '@/types/prop-types';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { type ListboxMultiSelectProps } from './listbox-multi-select.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n hasMoreItems: { type: Boolean, default: false },\n isOptionDisabled: { default: isVue2 ? () => () => false : () => false },\n items: null,\n lazyLoadType: { default: 'none' },\n searching: { type: Boolean, default: false },\n selectedValues: null,\n staticCategories: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"select\"]);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': attrs['aria-label']?.toString() as string,\n 'aria-busy': attrs['aria-busy']?.toString() as Booleanish,\n 'aria-atomic': attrs['aria-atomic']?.toString() as Booleanish,\n 'aria-live': attrs['aria-live']?.toString() as string,\n 'aria-multiselectable': true,\n }) as HTMLAttributes\n );\n const listboxRef = ref(null);\n const selectAllListboxItemsRef = ref(null);\n const selectedListboxItemsRef = ref(null);\n const listboxItemsRef = ref(null);\n\n const selectedItemsList = computed<Array<BentoListboxValue>>(() => props.selectedValues.map(({ value }) => value));\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(toRef(props, 'items'));\n\n const hasLazyLoadCategory = computed(() => props.items.some(item => item.items && item.lazyLoad));\n\n const lazyLoadAwareFlattenedItems = computed(() => {\n if (!isMultiLevelSelect.value) {\n return props.items;\n }\n return props.items.reduce<BentoListboxOptions>((acc, item) => {\n if (item.items) {\n if (item.lazyLoad) {\n acc.push(item);\n } else {\n acc.push(...item.items);\n }\n } else {\n acc.push(item);\n }\n return acc;\n }, []);\n });\n\n const isTreePattern = computed(() => isMultiLevelSelect.value && !props.staticCategories);\n\n const computedRole = computed(() => (isTreePattern.value ? 'tree' : 'listbox'));\n const computedOptionRole = computed(() => (isTreePattern.value ? 'treeitem' : 'option'));\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = props.isOptionDisabled(option);\n const isPreSelected =\n (selectedItemsList.value as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n // Items that are not disabled and pre-selected disabled items\n const enabledItems = computed(() => {\n if (props.searching && isMultiLevelSelect) {\n return props.items;\n }\n\n const fullItemsList = lazyLoadAwareFlattenedItems.value.filter(option => {\n if (option.lazyLoad) {\n return true;\n }\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n });\n\n props.selectedValues.forEach(selectedValue => {\n if (!fullItemsList.find(item => item.value === selectedValue.value)) {\n fullItemsList.push(selectedValue);\n }\n });\n\n return fullItemsList;\n });\n\n const visibleSelectedList = computed<BentoListboxOptions>(() =>\n enabledItems.value?.filter(option => {\n return selectedItemsList.value?.includes(option.value); // Check for category\n })\n );\n\n const calculateTotalItems = () => {\n if (isMultiLevelSelect.value && !props.searching) {\n return flattenedItemsList.value.length;\n }\n\n return props.items.length;\n };\n\n const selectAllCheckboxText = computed(() => {\n const possibleSelections = enabledItems.value.length;\n const total = calculateTotalItems();\n const amountSelectedValues = visibleSelectedList.value?.length || 0;\n\n if (amountSelectedValues === 0) {\n return t('selectAll', { total: n(possibleSelections) });\n }\n\n if (amountSelectedValues === total) {\n return t('allSelected', { total: n(total) });\n }\n\n return amountSelectedValues <= total\n ? t('numberOfTotalSelected', { number: n(amountSelectedValues), total: n(total) })\n : t('numbersSelected', { number: n(amountSelectedValues) });\n });\n\n const selectAll = (selectableItems: BentoListboxOptions) => {\n const filterOutDisabledAndNotPreselectedOptions = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n };\n\n // Adding or removing this list of values\n const addOrRemoveList = selectableItems\n .filter(filterOutDisabledAndNotPreselectedOptions)\n .filter(item => !selectedItemsList.value.includes(item.value)); // MAKE SURE NOT TO ADD DUPLICATES\n\n emit('select', [...props.selectedValues, ...addOrRemoveList]);\n };\n\n const unselectAll = (selectableItems: BentoListboxOptions) => {\n const findEnabledUnselectedItems = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return !(isDisabled && isPreSelected);\n };\n\n const unselectedItemsList = selectableItems.filter(findEnabledUnselectedItems).map(({ value }) => value);\n const newSelectedList = props.selectedValues.filter(item => !unselectedItemsList?.includes(item.value));\n emit('select', newSelectedList);\n };\n\n const selectAllItems = () => {\n selectAll(flattenedItemsList.value);\n };\n\n const unselectAllItems = () => {\n unselectAll(flattenedItemsList.value);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAllItems,\n unselectAllItems\n );\n\n const ariaCheckedComputed = computed(() => {\n if (isIndeterminate.value) {\n return 'mixed';\n }\n\n return `${isAllSelected.value}`;\n });\n\n const isSelectAllOn = ref(isAllSelected.value);\n\n const handleSelectAll = () => {\n isSelectAllOn.value = !isSelectAllOn.value;\n toggleSelectAll(isSelectAllOn.value);\n };\n\n watch(isAllSelected, () => {\n isSelectAllOn.value = isAllSelected.value;\n });\n\n const selectAllCategory = (category: BentoListboxOptionItem) => {\n if (category.lazyLoad) {\n const childValues = (category.items ?? []).map(({ value }) => value);\n const withoutChildren = props.selectedValues.filter(({ value }) => !childValues.includes(value));\n emit('select', [...withoutChildren, category]);\n } else {\n selectAll(category.items);\n }\n };\n\n const unselectAllCategory = (category: BentoListboxOptionItem) => {\n if (category.lazyLoad) {\n emit(\n 'select',\n props.selectedValues.filter(({ value }) => value !== category.value)\n );\n } else {\n unselectAll(category.items);\n }\n };\n\n const toggleCheckboxSelection = (eventName, selectedOption: BentoListboxOptionItem) => {\n let exists = false;\n let newSelectedList = props.selectedValues.filter(({ value }) => {\n if (selectedOption.value === value) {\n exists = true;\n return false;\n }\n\n return true;\n });\n\n if (exists) {\n emit(eventName, newSelectedList);\n return;\n }\n\n // Check if the item's parent lazy category is selected\n const parentLazyCategory = props.items.find(\n item =>\n item.items?.some(subItem => subItem.value === selectedOption.value) &&\n item.lazyLoad &&\n selectedItemsList.value.includes(item.value)\n );\n\n if (parentLazyCategory) {\n // Remove parent category\n newSelectedList = newSelectedList.filter(({ value }) => value !== parentLazyCategory.value);\n // Add other loaded children\n const otherLoadedChildren = parentLazyCategory.items.filter(\n subItem => subItem.value !== selectedOption.value\n );\n newSelectedList.push(...otherLoadedChildren);\n } else {\n newSelectedList.push(selectedOption);\n }\n\n emit(eventName, newSelectedList);\n };\n\n const selectedOptions = computed(() => {\n if (!isMultiLevelSelect.value) {\n return props.selectedValues;\n }\n\n const isOptionSelected = (option: BentoListboxOptionItem): boolean =>\n (selectedItemsList.value as unknown as Array<string | number>).includes(option.value);\n\n const categoryOptionsSelected = (category: BentoListboxOptionItem): boolean => {\n if (category.lazyLoad && isOptionSelected(category)) {\n return true;\n }\n return (\n !props.staticCategories &&\n category.items.length > 0 &&\n category.items.every(option => isOptionSelected(option))\n );\n };\n\n const optionsFlat = props.items.flatMap(option =>\n option.items && !categoryOptionsSelected(option) ? option.items : option\n );\n\n const options = optionsFlat.filter(option => {\n if (option.items) {\n return true;\n }\n return isOptionSelected(option);\n });\n\n const knownValues = new Set<BentoListboxValue>();\n optionsFlat.forEach(option => {\n knownValues.add(option.value);\n option.items?.forEach(sub => knownValues.add(sub.value));\n });\n const unfetchedSelected = props.selectedValues.filter(sv => !knownValues.has(sv.value));\n\n return [...options, ...unfetchedSelected];\n });\n\n const showSelectedItems = computed(() => {\n if (!selectedOptions.value?.length) {\n return false;\n }\n\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n const hasAllItemsSelected =\n props.selectedValues?.length > 0 && visibleSelectedList.value?.length !== enabledItems.value?.length;\n\n if (isLazyLoad && props.hasMoreItems) {\n return !!props.selectedValues?.length;\n }\n\n return hasAllItemsSelected;\n });\n\n const showSelectAllCheckbox = computed(() => {\n if (hasLazyLoadCategory.value) {\n return false;\n }\n\n const isLazyLoad = ['automatic', 'button'].includes(props.lazyLoadType);\n\n if (!isLazyLoad) {\n return true;\n }\n\n return !props.hasMoreItems;\n });\n\n // Keyboard navigation\n const expandedCategories = ref([]);\n\n const { visibleDomOptions, updateVisibleDomOptions } = useVisibleDomOptions(\n listboxRef,\n toRef(props, 'items'),\n computedOptionRole\n );\n\n const toggleCategoryVisibility = category => {\n if (expandedCategories.value.includes(category)) {\n expandedCategories.value = expandedCategories.value.filter(item => item !== category);\n } else {\n expandedCategories.value.push(category);\n }\n\n nextTick(() => {\n updateVisibleDomOptions();\n });\n };\n\n const focusItem = (nextFocusedItemIndex: number) => {\n visibleDomOptions.value[nextFocusedItemIndex]?.focus();\n };\n\n const {\n moveToNextElement,\n moveToPreviousElement,\n moveToFirstElement,\n moveToLastElement,\n preventDefault,\n focusedIndex,\n setListboxFocusedIndex,\n } = useListboxKeyboardNavigation(\n {\n items: visibleDomOptions,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: (event: CustomEvent<KeyboardEvent>) =>\n moveToPreviousElement(event),\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: (event: CustomEvent<KeyboardEvent>) =>\n moveToNextElement(event),\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n defineExpose({\n /**\n * Method to set the index of the item to be focused on\n * Used for focus management to be kept in-sync with parent e.g. dropdowns\n */\n setListboxFocusedIndex,\n });\n\n const chipsSectionListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: preventDefault,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: preventDefault,\n };\n\n const computedItemsIndex = computed(() => {\n let itemIndex = showSelectAllCheckbox.value ? 1 : 0;\n const indexMap = {};\n\n props.items.forEach(item => {\n let subItemsVisible = expandedCategories.value.includes(item.value);\n\n if (item.items) {\n if (props.staticCategories) {\n subItemsVisible = true;\n } else {\n indexMap[item.value] = itemIndex++;\n }\n\n if (subItemsVisible) {\n item.items.forEach(subItem => (indexMap[subItem.value] = itemIndex++));\n }\n } else {\n indexMap[item.value] = itemIndex++;\n }\n });\n return indexMap;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select.scss\" />\n","/**\n * The debounce() method is used to create a debounced function which\n * delays the given callback function until after the stated wait time\n * in milliseconds have passed since the last time this debounced function was called.\n *\n * @param {Function} callback - The function to debounce.\n * @param debounceTime - The number of milliseconds to delay.\n * @returns {Function} - Returns the new debounced function.\n */\nexport const debounce = <T extends (...args: Array<any>) => any>(callback: T, debounceTime = 300) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n const callable = (...args: any) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => callback(...args), debounceTime);\n };\n return <T>(<any>callable);\n};\n","<template>\n <div\n :id=\"id\"\n ref=\"listboxRef\"\n v-bento-keyboard-navigation-directive\n class=\"b-listbox\"\n tabindex=\"-1\"\n v-bind=\"listboxContainerAttributes\"\n :style=\"containerProps?.style\"\n data-testid=\"listbox-container\"\n @scroll=\"onListboxContainerScroll\"\n >\n <div v-bind=\"wrapperProps\">\n <!-- Loading filtered items loading -->\n <div v-if=\"componentLoading\" class=\"b-listbox__loading-filtered-items\">\n <bento-loading-indicator />\n </div>\n <!-- Empty search message -->\n <div v-else-if=\"isSearchResultEmpty\" class=\"b-listbox__empty-search-message\">\n <bento-empty-state v-if=\"emptyState\" v-bind=\"limitedEmptyStateProps\" />\n <bento-typography v-else el=\"span\">{{ noResultsMessage }}</bento-typography>\n </div>\n\n <template v-else>\n <!-- Multi select -->\n <template v-if=\"multiple\">\n <bento-listbox-multi-select\n ref=\"listboxItemRef\"\n :has-more-items=\"hasMoreItems\"\n v-bind=\"ariaAttributes\"\n :items=\"items\"\n :lazy-load-type=\"lazyLoadType\"\n :static-categories=\"staticCategories\"\n :selected-values=\"selectedValue\"\n :searching=\"searching\"\n :is-option-disabled=\"isOptionDisabled\"\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-listbox-multi-select>\n </template>\n\n <!-- Single select -->\n <template v-else>\n <bento-listbox-single-select\n ref=\"listboxItemRef\"\n :active-descendant-id=\"activeDescendantId\"\n :items=\"virtualisedItems\"\n :option-id-base=\"id\"\n :total-item-count=\"totalItemCount\"\n :scroll-to-index=\"scrollToIndex\"\n :virtual-scroll-start-index=\"virtualScrollStartIndex\"\n v-bind=\"ariaAttributes\"\n :selected-value=\"selectedValue\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\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-listbox-single-select>\n </template>\n\n <!-- Lazy Loading -->\n <bento-listbox-lazy-load\n v-if=\"lazyLoadType !== 'none'\"\n :has-more-items=\"hasMoreItems\"\n :loading=\"loading\"\n :type=\"lazyLoadType\"\n @show-more=\"emitShowMore\"\n />\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef } from 'vue';\n import {\n type BentoListboxEmptyStateProps,\n BentoListboxEvent,\n type BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxVirtulisationOptions,\n } from '@/types/listbox';\n import { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { BentoListboxSingleSelect } from './components/listbox-single-select';\n import { BentoListboxMultiSelect } from './components/listbox-multi-select';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoListboxLazyLoad } from './components/listbox-lazy-load';\n import { BentoLoadingButtonState } from '@/components/button';\n import { BentoEmptyState } from '@/components/empty-state';\n import { debounce } from '@/utils/ts/debounce';\n import { useVirtualList } from '@/composables/use-virtual-list';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n\n const DEFAULT_DROPDOWN_ITEM_HEIGHT = 36;\n\n /**\n * Listbox container.\n * It lists all the available options.\n *\n * @example\n * <bento-listbox\n * v-slot=\"{label, value}\"\n * :id=\"listboxOptionsContainerId\"\n * :aria-label=\"ariaLabel\"\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 * </bento-listbox>\n */\n export default defineComponent({\n name: 'bento-listbox',\n components: {\n BentoEmptyState,\n BentoListboxSingleSelect,\n BentoListboxMultiSelect,\n BentoTypography,\n BentoLoadingIndicator,\n BentoListboxLazyLoad,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { type: String, default: null },\n\n /**\n * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoListboxEmptyStateProps>,\n default: undefined,\n },\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 {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Listbox 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 listbox with.\n * It must be an array of {@see BentoListboxOptionItem }\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 * Indicates if new options are lazy loading.\n */\n loading: { type: Boolean, default: false },\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<BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`>,\n default: BentoListboxLazyLoadType.NONE,\n validator: (value: BentoListboxLazyLoadType) => Object.values(BentoListboxLazyLoadType).includes(value),\n },\n\n /**\n * Indicates the listbox is loading filtered items.\n */\n componentLoading: { 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 * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Messaged displayed when no items are listed in the listbox\n */\n noResultsMessage: { type: String, required: true },\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: BentoListboxMultiSelect.props.searching,\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: () => [],\n },\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<BentoListboxVirtulisationOptions>,\n default: false,\n },\n },\n emits: [\n BentoListboxEvent.SELECT,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.SHOW_MORE,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots, expose }) {\n const listboxItemRef = ref([]);\n const items = toRef(props, 'items');\n const isLazyLoadListbox = computed(() => props.lazyLoadType !== BentoListboxLazyLoadType.AUTOMATIC);\n const hasAutomaticLazyLoader = computed(() => props.lazyLoadType === BentoListboxLazyLoadType.AUTOMATIC);\n\n // Virtual scrolling\n const virtualScrollItemHeight = () => {\n if (typeof props?.virtualScroll === 'object' && props?.virtualScroll?.itemHeight) {\n return props.virtualScroll.itemHeight;\n }\n return DEFAULT_DROPDOWN_ITEM_HEIGHT;\n };\n const isVirtualScrollEnabled =\n !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none';\n\n const {\n containerRef: listboxRef,\n containerProps,\n onScroll: onContainerScroll,\n list: virtualisedItems,\n wrapperProps,\n scrollToIndex,\n startIndex: virtualScrollStartIndex,\n } = useVirtualList<BentoListboxOptionItem>(items, {\n itemHeight: virtualScrollItemHeight(),\n // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select\n disabled: !isVirtualScrollEnabled,\n });\n\n const totalItemCount = computed(() => (isVirtualScrollEnabled ? items.value.length : 0));\n\n // Aria a11y\n const ariaAtomic = computed<HTMLAttributes['aria-atomic']>(() =>\n props.componentLoading !== undefined || isLazyLoadListbox.value ? 'true' : undefined\n );\n const ariaBusy = computed<HTMLAttributes['aria-busy']>(() =>\n (isLazyLoadListbox.value && props.loading) || props.componentLoading ? 'true' : 'false'\n );\n const ariaLive = computed<HTMLAttributes['aria-live']>(() =>\n isLazyLoadListbox.value || props.componentLoading !== undefined ? 'polite' : undefined\n );\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-label': props.ariaLabel,\n 'aria-busy': ariaBusy.value,\n 'aria-atomic': ariaAtomic.value,\n 'aria-live': ariaLive.value,\n }) as HTMLAttributes\n );\n\n const listboxContainerAttributes = computed(\n () =>\n (props.componentLoading\n ? {\n ...ariaAttributes.value,\n role: 'alert',\n }\n : {}) as HTMLAttributes\n );\n\n const onOptionSelected = eventName => (selectedItem: BentoListboxOptions) => {\n emit(eventName, selectedItem);\n };\n\n const emitShowMore = () => {\n emit(BentoListboxEvent.SHOW_MORE);\n };\n\n const emitShowMoreOnScrollEnd = debounce(() => {\n const container = listboxRef.value;\n\n if (!container) {\n return;\n }\n\n const isAtBottom = Math.round(container.scrollTop) + container.clientHeight >= container.scrollHeight;\n\n if (props.hasMoreItems && isAtBottom && !props.loading) {\n emitShowMore();\n }\n });\n\n const onListboxContainerScroll = () => {\n if (hasAutomaticLazyLoader.value) {\n emitShowMoreOnScrollEnd();\n } else {\n onContainerScroll();\n }\n };\n\n const isSearchResultEmpty = computed(() => props.items?.length === 0);\n\n const shouldDisplayShowMoreButton = computed(\n () => props.lazyLoadType === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const limitedEmptyStateProps = computed<InstanceType<typeof BentoEmptyState>['$props']>(() => ({\n ...props.emptyState,\n variant: 'condensed',\n }));\n\n const listboxListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n expose({ listboxRef, listboxItemRef });\n\n return {\n // Refs\n listboxRef,\n listboxItemRef,\n\n // a11y\n ariaAttributes,\n listboxContainerAttributes,\n\n // Values\n containerProps,\n isSearchResultEmpty,\n limitedEmptyStateProps,\n loadingButtonState,\n slots,\n shouldDisplayShowMoreButton,\n virtualisedItems,\n wrapperProps,\n\n // Virtual scroll\n totalItemCount,\n scrollToIndex,\n virtualScrollStartIndex,\n\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Methods\n onListboxContainerScroll,\n onOptionSelected,\n emitShowMore,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox.scss\" />\n","import {\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n type BentoListboxValue,\n} from '@/types/listbox';\nimport { ref, type Ref, watch } from 'vue';\n\n/**\n * Extracts an item's label from the items in the list of options\n * displayed in the Listbox.\n *\n * Searches through all items and their sub-items (categories).\n *\n * @param items List of options displayed in the Listbox\n * @param value Selected value that needs to be found in the list\n * @returns Label found\n */\nconst findItem = (items: BentoListboxOptions, value: BentoListboxValue): BentoListboxOptionItem => {\n for (const item of items) {\n if (item.value === value) {\n return item;\n }\n\n if (item.items) {\n // recursively look for the value and continue to the next item if value is not found\n const label = findItem(item.items, value);\n\n if (label) {\n return label;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Type guard to check if a value is of type BentoListboxSelectedValueLabelPair.\n * @param value The value to check.\n * @returns True if the value is BentoListboxSelectedValueLabelPair, false otherwise.\n */\nconst isBentoListboxSelectedValueLabelPair = (\n value: BentoListboxSelectedValue\n): value is BentoListboxSelectedValueLabelPair => {\n return typeof value === 'object' && value !== null && 'value' in value && 'label' in value;\n};\n\n/**\n * Creates two lists (one with value/label pairs and one simply with values) that are\n * used to cache the internal option selections to preserve the `label` in case the\n * value is loaded from external sources and might not be found in the list of `items`\n * later on.\n *\n * This helps with external searches and lazy loaded lists.\n *\n * @param items List of options displayed in the Listbox\n * @param selectedValues Selected list of values\n * @param multiple Indicates if the Listbox is multi-select (true) or single-select (false)\n * @param enableValueLabelPair Indicates if the Listbox should emit value/label pairs.\n * @returns Two lists of cached items. One list with label/value pairs and one with only the values stored.\n */\nexport const useCachedSelectedValues = (\n items: Ref<BentoListboxOptions>,\n selectedValues: Ref<BentoListboxSelectedValue>,\n multiple: Ref<boolean>,\n enableValueLabelPair?: Ref<boolean>\n) => {\n const cachedSelectedListboxOptions = ref<BentoListboxOptions>([]);\n const cachedListboxSelectedValues = ref<BentoListboxSelectedValue>();\n\n /**\n * Sets the cached selected values based on a simple value (string or number).\n * It handles both single and multi-select modes.\n * @param newSelectedValues The new list of selected options.\n */\n const setSimpleSelectedValues = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value }) => value);\n } else {\n cachedListboxSelectedValues.value = newSelectedValues.length > 0 ? newSelectedValues[0].value : null;\n }\n };\n\n const setValueLabelPair = (newSelectedValues: BentoListboxOptions) => {\n if (multiple.value) {\n cachedListboxSelectedValues.value = newSelectedValues.map(({ value, label }) => ({ value, label }));\n } else {\n cachedListboxSelectedValues.value =\n newSelectedValues.length > 0\n ? { value: newSelectedValues[0].value, label: newSelectedValues[0].label }\n : null;\n }\n };\n\n const setCachedValues = (newSelectedValues: BentoListboxOptions) => {\n cachedSelectedListboxOptions.value = newSelectedValues;\n if (enableValueLabelPair?.value) {\n setValueLabelPair(newSelectedValues);\n } else {\n setSimpleSelectedValues(newSelectedValues);\n }\n };\n\n const resetCache = () => {\n cachedSelectedListboxOptions.value = [];\n cachedListboxSelectedValues.value = null;\n };\n\n watch(\n () => selectedValues.value,\n () => {\n if (!selectedValues.value && selectedValues.value !== 0) {\n resetCache();\n return;\n }\n\n const isSingleSelect = !Array.isArray(selectedValues.value);\n // Make a copy of cache\n const cachedCopy = [...cachedSelectedListboxOptions.value];\n // Clear cache\n resetCache();\n\n const addValue = (value: BentoListboxSelectedValue) => {\n // When it's a value/label pair, add it immediately\n // Otherwise search if the value is available in the list\n // and create a value/label pair to be added to the list\n if (isBentoListboxSelectedValueLabelPair(value)) {\n cachedSelectedListboxOptions.value.push(value);\n } else {\n // Search label by value in \"items\"\n let selectedItem = findItem(items.value, value as BentoListboxValue);\n\n // Search in previous cache\n if (!selectedItem) {\n selectedItem = findItem(cachedCopy, value as BentoListboxValue);\n }\n\n // Transform value to label if not found anywhere\n if (!selectedItem) {\n selectedItem = { value: value as BentoListboxValue, label: value.toString() };\n }\n\n cachedSelectedListboxOptions.value.push(selectedItem);\n }\n };\n\n if (isSingleSelect) {\n const value = selectedValues.value as BentoListboxValue;\n\n addValue(value);\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n return;\n }\n\n // Multi-select\n (selectedValues.value as BentoListboxMultiSelectValue).forEach(addValue);\n // Add each selected value in the cache\n if (enableValueLabelPair?.value) {\n setValueLabelPair(cachedSelectedListboxOptions.value);\n } else {\n setSimpleSelectedValues(cachedSelectedListboxOptions.value);\n }\n },\n { immediate: true }\n );\n\n return {\n // Values\n cachedSelectedListboxOptions,\n cachedListboxSelectedValues,\n // Methods\n resetCache,\n setCachedValues,\n };\n};\n","export enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n","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.stop @keydown.esc=\"onEscapeKey\">\n <bento-listbox\n :id=\"id\"\n ref=\"dropdownOptionsListboxRef\"\n :active-descendant-id=\"activeDescendantId\"\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/listbox';\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 '@/utils/ts/generate-uid';\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 * Identifies the currently active option in the listbox.\n */\n activeDescendantId: { 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 dropdownOptionsListboxRef,\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","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","export enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n","export const DROPDOWN_SMALL_SIZE_INJECTION_KEY = Symbol('dropdown small size injection key');\nexport const DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY = Symbol('dropdown underline style injection key');\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n :variant=\"isUnderlineStyle ? 'title' : 'body'\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <span\n v-if=\"shouldShowAutocompleteSuggestion(hasSlot('autocomplete-suggestion'))\"\n class=\"b-dropdown-base-textbox__autocomplete-suggestion\"\n aria-hidden=\"true\"\n data-testid=\"autocomplete-suggestion\"\n >\n <slot name=\"autocomplete-suggestion\"></slot>\n </span>\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n :aria-autocomplete=\"\n shouldShowAutocompleteSuggestion(hasSlot('autocomplete-suggestion')) ? 'both' : 'list'\n \"\n size=\"1\"\n :value=\"inputValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"showRequiredAttribute\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onTextboxEnterKey\"\n @focus=\"onTextboxFocus\"\n @blur=\"onTextboxBlur\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n @focus=\"onTextboxFocus\"\n @mousedown=\"onClosedComboboxMouseDown\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import { stopEventPropagation } from '@/utils/ts/events';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent } from './dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.internal.types';\n import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: { 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 * Indicates whether the dropdown currently has a selected value.\n */\n hasSelectedValue: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n const isTextboxFocused = ref(false);\n const localInputValue = ref(props.value);\n\n // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n 'b-dropdown-base-textbox--underline': isUnderlineStyle,\n }));\n\n const showRequiredAttribute = computed(() =>\n shouldShowInput.value && attrs['aria-required'] ? ('true' as Booleanish) : null\n );\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const shouldShowAutocompleteSuggestion = (hasAutocompleteSuggestionSlot: boolean) =>\n shouldShowInput.value && !props.multiple && !!props.value && hasAutocompleteSuggestionSlot;\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-activedescendant': props.ariaActiveDescendant,\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': attrs['aria-required'] as Booleanish,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldUseDynamicFilteringInputMode = computed(\n () => props.dynamicFiltering && !props.multiple && !props.alwaysComboboxIsInput\n );\n const shouldShowSearchValue = computed(\n () =>\n props.open ||\n props.alwaysComboboxIsInput ||\n (shouldUseDynamicFilteringInputMode.value && isTextboxFocused.value)\n );\n const shouldShowInput = computed(() => props.dynamicFiltering && shouldShowSearchValue.value);\n const getInitialInputValue = () => {\n if (!props.value && props.hasSelectedValue && shouldUseDynamicFilteringInputMode.value) {\n return props.displayValue ?? '';\n }\n\n return props.value;\n };\n const inputValue = computed(() => {\n if (!shouldShowSearchValue.value || (props.alwaysComboboxIsInput && !props.open)) {\n return props.displayValue;\n }\n\n if (shouldUseDynamicFilteringInputMode.value) {\n return localInputValue.value;\n }\n\n return props.value;\n });\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n (shouldShowInput, wasShowingInput) => {\n if (!shouldShowInput) {\n localInputValue.value = props.value;\n } else if (!wasShowingInput && shouldUseDynamicFilteringInputMode.value) {\n localInputValue.value = getInitialInputValue();\n }\n\n if (shouldShowInput && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value?.focus();\n textbox.value?.select();\n });\n }\n }\n );\n watch(\n () => props.value,\n newValue => {\n if (!shouldUseDynamicFilteringInputMode.value || newValue !== localInputValue.value) {\n localInputValue.value = newValue;\n }\n }\n );\n watch(\n () => props.displayValue,\n () => {\n if (shouldUseDynamicFilteringInputMode.value && props.hasSelectedValue) {\n localInputValue.value = getInitialInputValue();\n }\n }\n );\n watch(\n () => props.open,\n open => {\n if (!open) {\n isTextboxFocused.value = false;\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = (event?: Event) => {\n if (props.open) {\n if (event) {\n stopEventPropagation(event);\n }\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onTextboxEnterKey = (event: KeyboardEvent) => {\n if (props.dynamicFiltering) {\n return null;\n }\n\n return onToggleDropdown(event);\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n\n const onTextboxFocus = () => {\n isTextboxFocused.value = true;\n };\n const onTextboxBlur = () => {\n isTextboxFocused.value = false;\n };\n\n const onClosedComboboxMouseDown = (event: MouseEvent) => {\n if (!shouldUseDynamicFilteringInputMode.value || props.open || props.readonly || props.disabled) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n const onInputEvent = (event: Event) => {\n if (!props.readonly && !props.disabled) {\n if (shouldUseDynamicFilteringInputMode.value) {\n localInputValue.value = (event.target as HTMLInputElement).value;\n }\n\n if (props.dynamicFiltering && !props.open) {\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n nextTick(() => {\n if (shouldShowInput.value) {\n textbox.value?.focus();\n }\n });\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import { DropdownBaseTextboxEvent } from '../dropdown-base-textbox/dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: {\n type: String,\n default: null,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n","\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 setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\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 setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\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 v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\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, inject, type PropType, ref, useSlots } from 'vue';\n import { DropdownBaseTextboxEvent } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.internal.types';\n import { DropdownBaseTextboxState } from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.internal.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 import { DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY } from '../../dropdown.keys';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Identifies the currently active option in the listbox.\n */\n ariaActiveDescendant: { type: String, default: null },\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 // Inject underline style key to change the dropdown layout\n const isUnderlineStyle = inject(DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY, false);\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 'b-dropdown-small-textbox--underline': isUnderlineStyle,\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, type BentoListboxValue } 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 // Track matched selection values to avoid double-processing and to identify external pre-selected values\n const matchedValues = new Set<BentoListboxValue>();\n const selectedValuesSet = new Set(selectedValues.value.map(option => option.value));\n\n const newItems = items.value.reduce((acc, option) => {\n // Category items\n if (option.items) {\n // Check if the lazy category itself is selected directly by its own value\n const isCategorySelectedByValue = selectedValuesSet.has(option.value);\n\n if (isCategorySelectedByValue) {\n // Category itself is selected directly by value (e.g. lazy-loaded category)\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n // Mark all loaded child items as matched so they are not treated as external selected values\n option.items.forEach(child => matchedValues.add(child.value));\n } else {\n const selectedCategoryOptions = option.items.filter(categoryOption =>\n selectedValuesSet.has(categoryOption.value)\n );\n\n // If the category is fully selected add the category name\n const isCategoryFullySelected =\n selectedCategoryOptions.length > 0 && selectedCategoryOptions.length === option.items.length;\n\n if (isCategoryFullySelected) {\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n // Mark all child items as matched to prevent double-processing as individual options\n option.items.forEach(child => matchedValues.add(child.value));\n } else {\n // If category is partially selected add each selected option and category\n selectedCategoryOptions.forEach(({ label, displayValue, value }) => {\n acc.push(displayValue ?? label);\n matchedValues.add(value);\n });\n }\n }\n } else {\n // Non-category option\n if (selectedValuesSet.has(option.value)) {\n acc.push(option.displayValue ?? option.label);\n matchedValues.add(option.value);\n }\n }\n\n return acc;\n }, []);\n\n // Add any external selected values that were not matched by any item in items.value\n // (This is common with pre-selected values and lazy loaded lists)\n selectedValues.value.forEach(selectedOption => {\n if (!matchedValues.has(selectedOption.value)) {\n newItems.push(selectedOption.displayValue ?? selectedOption.label);\n }\n });\n\n return newItems.join(', ');\n};\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 isSearching,\n activeDescendantIndex,\n selectFirstMatchedOption,\n totalItemCount,\n isVirtualScroll,\n removeActiveDescendant,\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 navigateToItem = async (index: number) => {\n await optionsContainerRef.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(index);\n };\n\n /**\n * Navigates to an option by index using different strategies depending on scrolling mode.\n * When virtual scrolling is enabled, `navigateToItem` scrolls the virtual list to render\n * the target item before focusing it. Otherwise, the item is already in the DOM so we\n * directly update the focused index and move focus.\n */\n const navigateToOption = (index: number) => {\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n removeActiveDescendant?.();\n\n if (index < 0) {\n return;\n }\n\n nextTick(() => {\n if (isVirtualScroll) {\n navigateToItem(index);\n } else {\n setListboxFocusedIndex(index);\n focusOnOption(index);\n }\n });\n };\n\n const skipToFirstOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n navigateToOption(0);\n };\n\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n const skipToNextOptionFromActiveDescendant = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n const lastItemIndex = isVirtualScroll ? totalItemCount.value - 1 : items.value.length - 1;\n const nextIndex = Math.min((activeDescendantIndex?.value ?? -1) + 1, lastItemIndex);\n navigateToOption(nextIndex);\n };\n\n const skipToLastOption = () => {\n if (!isDropdownOpen.value) {\n openDropdown();\n }\n\n nextTick(() => {\n navigateToOption(isVirtualScroll ? totalItemCount.value - 1 : items.value.length - 1);\n });\n };\n\n /**\n * Stops the keyboard event from bubbling up events.\n * @param event - keyboard event to stop\n */\n const stopKeyboardEvent = (event: KeyboardEvent) => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n const onArrowDown = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n // Temporary solution until we fully implement active-descendant navigation with dynamicFiltering instead of moving the real focus between options\n if (activeDescendantIndex?.value !== undefined && activeDescendantIndex.value >= 0) {\n skipToNextOptionFromActiveDescendant();\n return;\n }\n\n skipToFirstOption();\n };\n\n const onArrowUp = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToLastOption();\n };\n\n const onHomeKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToFirstOption();\n };\n\n const onEndKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n skipToLastOption();\n };\n\n const onSpaceKey = ({ detail: event }) => {\n stopKeyboardEvent(event);\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple.value) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onEnterKey = async ({ detail: event }) => {\n stopKeyboardEvent(event);\n\n if (isDynamicFltering.value && !isMultiple.value) {\n if (isDropdownOpen.value && isSearching.value) {\n const isFirstMatchedOptionSelected = await selectFirstMatchedOption();\n\n if (isFirstMatchedOptionSelected) {\n return;\n }\n }\n\n return;\n }\n\n toggleDropdown();\n if (isDropdownOpen.value) {\n if (isMultiple.value) {\n focusOnChip(0);\n } else {\n navigateToOption(selectedValueIndex.value);\n }\n }\n };\n\n const onTab = ({ detail: event }) => {\n event.stopPropagation();\n\n // tab should not navigate through a combobox\n if (isDropdownOpen.value) {\n closeDropdown();\n }\n };\n\n const onEscapeKey = ({ detail: event }) => {\n event.stopPropagation();\n\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 ...(!isDynamicFltering.value ? { [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","<!-- 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\n v-bento-click-outside-directive=\"clickOutsideDropdownOptions\"\n v-bind=\"getRootAttributes($attrs)\"\n class=\"b-dropdown\"\n :class=\"conditionalClasses\"\n >\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 :aria-active-descendant=\"activeDescendantId\"\n :ariaExpanded=\"isDropdownOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-label=\"$attrs['aria-label'] ?? label ?? computedAriaLabelFallbackMessage\"\n :aria-readonly=\"isReadOnly\"\n :aria-required=\"required\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :display-value=\"displayValue\"\n :dynamic-filtering=\"dynamicFiltering\"\n :has-selected-value=\"cachedSelectedListboxOptions.length > 0\"\n :is-invalid=\"!!errorMessage\"\n :multiple=\"multiple\"\n :open=\"isDropdownOpen\"\n :selected-value-item=\"!isInputComponent ? selectedValueItem : undefined\"\n :show-slot-content-in-multiple=\"showSlotContentInMultiple\"\n @input=\"onSearchTermInput\"\n @open=\"toggleDropdown\"\n @close=\"toggleDropdown\"\n >\n <template #autocomplete-suggestion>\n <template v-if=\"autocompleteSuggestionSuffix\">\n <span class=\"b-dropdown__autocomplete-hidden-prefix\">{{ searchTerm }}</span\n >{{ autocompleteSuggestionSuffix }}\n </template>\n </template>\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </component>\n </div>\n <bento-teleport v-if=\"inputContainerRef\" :disabled=\"teleport?.disabled\" :to=\"teleport?.to\">\n <bento-dropdown-options-container\n :id=\"dropdownOptionsContainerId\"\n ref=\"optionsContainerRef\"\n :aria-label=\"$attrs['aria-label'] ?? label ?? computedAriaLabelFallbackMessage\"\n :active-descendant-id=\"activeDescendantId\"\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 </bento-teleport>\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 { computed, defineComponent, inject, nextTick, type Ref, ref, toRef, useAttrs, useSlots, watch } 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, useCachedSelectedValues, useMultiLevelItems } from '@/internal/listbox';\n import { ErrorMessage } from '@/internal/error-message';\n import { FieldLabel } from '@/internal/field-label';\n import { BentoTeleport } from '@/internal/teleport';\n\n // Utils\n import { generateUid } from '@/utils/ts/generate-uid';\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 import { useHasSlot } from '@/composables';\n import { getListboxOptionId } from '@/utils/ts/get-listbox-option-id';\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 } from './dropdown.types';\n import { BentoDropdownSize } from './dropdown.internal.types';\n import {\n BentoListboxEvent,\n type BentoListboxItemRole,\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n } from '@/types/listbox';\n import { DROPDOWN_SMALL_SIZE_INJECTION_KEY } from './dropdown.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const getRootAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => !key.startsWith('aria-')));\n\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 condensed: { type: Boolean, default: false },\n emptyState: { default: undefined },\n dynamicFiltering: { 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 staticCategories: { type: Boolean, default: false },\n teleport: { default: () => ({ disabled: true }) },\n modelValue: { default: null },\n virtualScroll: { type: Boolean, default: false },\n enableValueLabelPair: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"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 shouldShowActiveDescendant = 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);\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 ariaDescribedByAttribute = ref(attrs['aria-describedby']);\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\n // Inject input field component key to change the dropdown size\n const isInputComponent = inject(DROPDOWN_SMALL_SIZE_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(({ value }) =>\n (dropdownValue.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\n // Find the specific item within the category\n const selectedCategoryItem = category\n ? category.items.find(item => item.value === dropdownValue.value)\n : props.items.find(({ value }) => value === dropdownValue.value);\n\n return selectedCategoryItem ?? null;\n }\n\n return props.items.find(({ value }) => value === dropdownValue.value);\n });\n\n const selectedValueIndex = computed(() => {\n const searchList = isMultiLevelSelect.value ? flattenedItemsList.value : filteredItems.value;\n const index = searchList.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 const firstEnabledFilteredItem = computed(() =>\n filteredItems.value.find((item: BentoListboxOptionItem) => !props.isOptionDisabled?.(item))\n );\n\n const autocompleteSuggestion = computed(() => {\n if (props.multiple || !isSearching.value || !shouldShowActiveDescendant.value) {\n return '';\n }\n\n return firstEnabledFilteredItem.value?.label ?? '';\n });\n\n const autocompleteSuggestionSuffix = computed(() => {\n if (!autocompleteSuggestion.value.toLocaleLowerCase().startsWith(searchTerm.value.toLocaleLowerCase())) {\n return '';\n }\n\n return autocompleteSuggestion.value.slice(searchTerm.value.length);\n });\n\n const activeDescendantId = computed(() =>\n !props.multiple &&\n isDropdownOpen.value &&\n isSearching.value &&\n shouldShowActiveDescendant.value &&\n firstEnabledFilteredItem.value\n ? getListboxOptionId(dropdownOptionsContainerId, firstEnabledFilteredItem.value.value)\n : null\n );\n const activeDescendantIndex = computed(() =>\n activeDescendantId.value\n ? filteredItems.value.findIndex(({ value }) => value === firstEnabledFilteredItem.value?.value)\n : -1\n );\n\n const onSearchTermInput = (newSearchTerm: string) => {\n searchTerm.value = newSearchTerm;\n shouldShowActiveDescendant.value = true;\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(() => {\n const dropdownListboxRef = optionsContainerRef.value?.dropdownOptionsListboxRef;\n // Vue 3 exposes the ref object, while Vue 2 exposes the unwrapped DOM element.\n return (dropdownListboxRef?.listboxRef?.value ?? dropdownListboxRef?.listboxRef) as HTMLDivElement;\n });\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 clickOutsideDropdownOptions = computed(() => [\n clickOutsideDropdown,\n {\n ignore: [listboxRef],\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 selectFirstMatchedOption = async () => {\n if (!firstEnabledFilteredItem.value) {\n return false;\n }\n\n await onOptionSelected([firstEnabledFilteredItem.value]);\n return true;\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: toRef(props, 'multiple'),\n isSearching,\n activeDescendantIndex,\n selectFirstMatchedOption,\n totalItemCount: computed(() => filteredItems.value.length),\n isVirtualScroll: !props?.multiple && props?.virtualScroll !== false && props?.lazyLoadType === 'none',\n removeActiveDescendant: () => {\n // TODO: this solution is temporary. when we target dynamicFiltering accessibility, the component should use aria-activedescendant to navigate the options instead of focus\n shouldShowActiveDescendant.value = false;\n },\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 const focus = () => {\n inputContainerRef.value?.focus();\n };\n\n const scrollToSelectedOption = async () => {\n await nextTick();\n\n if (!isDropdownOpen.value || props.multiple || !optionsContainerRef.value) {\n return;\n }\n\n const index = selectedValueIndex.value;\n if (index <= 0) {\n return;\n }\n\n const dropdownOptionsListboxRef = optionsContainerRef.value.dropdownOptionsListboxRef;\n const listbox = dropdownOptionsListboxRef?.listboxRef;\n const listboxSingleSelect = dropdownOptionsListboxRef?.listboxItemRef;\n\n listboxSingleSelect?.scrollToItem?.(index, listbox);\n };\n\n watch(\n () => isDropdownOpen.value,\n (isOpen: boolean) => {\n if (isOpen) {\n emit('open');\n scrollToSelectedOption();\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: 'bento-dropdown',\n components: {\n DropdownInputDefault,\n DropdownInputSmall,\n },\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown.scss\" />\n"],"names":["useCheckboxSelectAll","selectedItemsList","items","selectAll","unselectAll","isAllSelected","computed","isIndeterminate","selectedValue","useVirtualList","disabled","itemHeight","overscan","prefixHeight","containerRef","ref","list","startIndex","endIndex","containerHeight","listObserver","wrapperProps","totalHeight","sum","_","index","offSetTop","i","getOffset","prefixHeightIfSet","scrollTop","offset","size","getVisibileNumberOfItems","start","capacity","updateVisibleItems","visibleCount","onScroll","onMounted","observeSizeOfElement","clientHeight","onUnmounted","watch","containerProps","scrollToIndex","itemTop","currentHeight","itemBottom","viewportHeight","viewportBottom","BentoListboxEvent","BentoListboxEvent2","BentoListboxLazyLoadType","BentoListboxLazyLoadType2","_sfc_main$j","defineComponent","BentoTypography","_sfc_main$i","props","emit","conditionalClasses","BentoKeyboardNavigationKeyDownEvent","e","eventName","instance","getCurrentInstance","uuid","_sfc_main$g","BentoListboxOption","CheckmarkIcon","onOptionSelected","ariaDisabled","ariaSelected","tabIndex","useListboxKeyboardNavigation$1","totalItemCount","focusItem","lastItemIndex","focusedIndex","mutateFocusedIndex","direction","calculateFocusedIndex","edgeCaseItem","moveToNextElement","event","preventDefault","moveToPreviousElement","moveToFirstElement","moveToLastElement","setListboxFocusedIndex","useVisibleDomOptions","role","checkVisibility","visibleDomOptions","updateVisibleDomOptions","options","option","nextTick","getListboxOptionId","listboxId","optionValue","_sfc_main$f","BentoListboxSingleSelectCategory","BentoListboxSingleSelectOption","BentoKeyboardNavigationDirective","expose","slots","attrs","listboxRef","listboxItemRef","selectedItem","ariaAttributes","hasCategories","selectedOption","getOptionId","toRef","isVirtualScrollEnabled","handleVirtualScrollingFocus","target","localIndex","globalIndex","newDomIndex","navigateToItem","scrollIntoContainer","listboxItemElement","listboxElement","elementRect","scrollableContainer","containerRect","scrollToItem","listboxListeners","listboxOptionListeners","__default__$8","BentoCheckboxState","outlineConditionalClasses","ListboxMultiSelectCategoryClass","ListboxMultiSelectCategoryClass2","ListboxMultiSelectCategoryEvent","ListboxMultiSelectCategoryEvent2","__default__$7","messages$6","t","useI18n","shouldDisplayShowMoreButton","loadingButtonState","BentoLoadingButtonState","showMoreButtonText","__default__$6","messages$5","loading","failedAndRetry","showMore","_sfc_main$a","messages$4","BentoListboxMultiSelectNestedLazyLoad","ChevronDownIcon","ChevronUpIcon","DecorativeCheckbox","isOpen","categoryGroupId","generateUid","categoryNameId","lazyLoadRef","vue2Vue3FixedisOptionDisabled","hasAllPropsDisabled","isStaticCategory","showItemChildren","conditionalClass","toggleOpen","open","optionStates","isDisabled","isPreSelected","enabledItems","visibleSelectedList","value","chevronTitle","messageName","isLazySelectedByValue","isAllChildrenSelected","isChildrenIndeterminate","toggleSelectAll","ariaCheckedComputed","isSelectAllOn","handleSelectAll","ListboxMultiSelectOptionsEvent","ListboxMultiSelectOptionsEvent2","_sfc_main$9","ListboxMultiSelectCategory","toggleCheckboxSelection","isCategory","shouldShowDescription","isSearchingMultiLevel","isOptionSelected","isParentLazySelected","isLazyCategorySelected","item","toggleSearchOption","useMultiLevelItems","itemsList","isMultiLevelSelect","flattenedItemsList","acc","val","__default__$5","messages$3","n","useSlots","useAttrs","selectAllListboxItemsRef","selectedListboxItemsRef","listboxItemsRef","hasLazyLoadCategory","lazyLoadAwareFlattenedItems","isTreePattern","computedRole","computedOptionRole","fullItemsList","calculateTotalItems","selectAllCheckboxText","possibleSelections","total","amountSelectedValues","selectableItems","filterOutDisabledAndNotPreselectedOptions","addOrRemoveList","findEnabledUnselectedItems","unselectedItemsList","newSelectedList","selectAllItems","unselectAllItems","selectAllCategory","category","childValues","withoutChildren","unselectAllCategory","exists","parentLazyCategory","subItem","otherLoadedChildren","selectedOptions","categoryOptionsSelected","optionsFlat","knownValues","sub","unfetchedSelected","sv","showSelectedItems","isLazyLoad","hasAllItemsSelected","showSelectAllCheckbox","expandedCategories","toggleCategoryVisibility","nextFocusedItemIndex","chipsSectionListeners","computedItemsIndex","itemIndex","indexMap","subItemsVisible","debounce","callback","debounceTime","timeoutId","args","DEFAULT_DROPDOWN_ITEM_HEIGHT","_sfc_main$7","BentoEmptyState","BentoListboxSingleSelect","BentoListboxMultiSelect","BentoLoadingIndicator","BentoListboxLazyLoad","isLazyLoadListbox","hasAutomaticLazyLoader","virtualScrollItemHeight","onContainerScroll","virtualisedItems","virtualScrollStartIndex","ariaAtomic","ariaBusy","ariaLive","listboxContainerAttributes","emitShowMore","emitShowMoreOnScrollEnd","container","isAtBottom","onListboxContainerScroll","isSearchResultEmpty","limitedEmptyStateProps","findItem","label","isBentoListboxSelectedValueLabelPair","useCachedSelectedValues","selectedValues","multiple","enableValueLabelPair","cachedSelectedListboxOptions","cachedListboxSelectedValues","setSimpleSelectedValues","newSelectedValues","setValueLabelPair","setCachedValues","resetCache","isSingleSelect","cachedCopy","addValue","BentoDropdownSize","BentoDropdownSize2","useDropdownOptionsListbox","internalSelectedValue","isApplyButtonDisabled","onApplyClick","onCancelClick","onOutsideDropdownClick","actions","newSelectedValue","onTabKey","onEnterKey","onSpaceKey","onEscapeKey","emitShowMoreEvent","listeners","__default__$4","messages$2","toRefs","dropdownOptionsListboxRef","isDropdownOpen","noResultsMessage","conditionalListboxClasses","popperContainerOrPopoverComponent","BentoPopover","PopperContainer","popperContainerOrPopoverProps","containerMinAndMaxWidth","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DROPDOWN_SMALL_SIZE_INJECTION_KEY","DROPDOWN_UNDERLINE_STYLE_INJECTION_KEY","__default__$3","messages$1","hasSlot","useHasSlot","textbox","textboxId","isTextboxFocused","localInputValue","isUnderlineStyle","inject","showRequiredAttribute","shouldShowInput","comboboxConditionalClasses","isFiltering","shouldShowAutocompleteSuggestion","hasAutocompleteSuggestionSlot","selectedValueItems","shouldUseDynamicFilteringInputMode","shouldShowSearchValue","getInitialInputValue","inputValue","shouldShowSingleSelectSlot","shouldShowMultipleSlot","shouldShowInput2","wasShowingInput","newValue","onOpenDropdown","onCloseDropdown","stopEventPropagation","onToggleDropdown","onTextboxEnterKey","onClearSearch","onTextboxFocus","onTextboxBlur","onClosedComboboxMouseDown","onInputEvent","focus","__default__$2","baseTextbox","onInput","newInput","onKeyDown","openDropdown","closeDropdown","clearValue","__default__$1","categoryMultiSelect","matchedValues","selectedValuesSet","newItems","child","selectedCategoryOptions","categoryOption","displayValue","useDisplayValue","placeholder","isMultiSelect","isCategoryMultilevel","focusOnTextbox","elementToFocusOn","useTextboxKeyboardNavigation","inputContainerRef","optionsContainerRef","selectedValueIndex","isDynamicFltering","isMultiple","isSearching","activeDescendantIndex","selectFirstMatchedOption","isVirtualScroll","removeActiveDescendant","toggleDropdown","focusOnOption","focusOnChip","chips","selectedIndex","navigateToOption","skipToFirstOption","skipToNextOptionFromActiveDescendant","nextIndex","skipToLastOption","stopKeyboardEvent","onArrowDown","onArrowUp","onHomeKey","onEndKey","onTab","useListboxKeyboardNavigation","closeDropdownAndFocusOnTextbox","useSearchBarFilter","searchTerm","data","searchEvent","ignoreGroups","searchTermRef","dataRef","findHits","searchTermLowerCased","debouncedSearchEvent","__default__","messages","DropdownInputDefault","DropdownInputSmall","getRootAttributes","attributes","key","emitValue","useFormFieldEmits","inputContainerRefWrapper","shouldShowActiveDescendant","dropdownOptionsContainerId","labelId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","dropdownValue","ariaDescribedByAttribute","computedAriaLabelFallbackMessage","isInputComponent","computedSize","descriptionConditionalClasses","staticCategories","filteredItems","selectedValueItem","categoryItem","additionalItemsSelected","selectedItemsCount","firstEnabledFilteredItem","autocompleteSuggestion","autocompleteSuggestionSuffix","activeDescendantId","onSearchTermInput","newSearchTerm","ariaDescribedBy","dropdownListboxRef","clickOutsideDropdown","clickOutsideDropdownOptions","textboxKeyboardNavigationListeners","listboxKeyboardNavigationListeners","scrollToSelectedOption","listbox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAAA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC;AAAA,IAAsB,MAAA,CAAA,CAAAL,EAAA,OAAA,UAAAA,EAAA,OAAA,WAAAC,EAAA,MAAA;AAAA,EACyE,GAE/FK,IAAAD,EAAA,MAEIL,EAAA,SAAA,QAAAA,EAAA,MAAA,WAAA,IACI,KAGJA,EAAA,OAAA,WAAAC,EAAA,MAAA,MAAuD;AAW3D,SAAA;AAAA,IAAO,eAAAG;AAAA,IACH,iBAAAE;AAAA,IACA,iBAVJ,CAAAC,MAAA;AACI,MAAAA,IACIL,EAAA,IAEAC,EAAA;AAAA,IACJ;AAAA,EAOA;AAER;AChCO,SAAAK,GAAAP,GAAA,EAAA,UAAAQ,GAAA,YAAAC,GAAA,UAAAC,IAAA,GAAA,cAAAC,EAAA,GAAA;AAIH,QAAAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,GACAG,IAAAH,EAAA,CAAA,GACAI,IAAAJ,EAAA,CAAA;AACA,MAAAK;AAEA,QAAAC,IAAAf,EAAA,MAAA;AACI,UAAAgB,IAAA,OAAAX,KAAA,WAAAT,EAAA,MAAA,SAAAS,IAAAT,EAAA,MAAA,OAAA,CAAAqB,GAAAC,GAAAC,MAAAF,IAAAZ,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