@adyen/bento-vue3 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/dist/@types/bento-translation-keys.generated.d.ts +908 -0
- package/dist/@types/index.d.ts +136 -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.BMxeTYDy.js → accordion-item.BbMoC7Rn.js} +6 -6
- package/dist/chunks/{accordion-item.BMxeTYDy.js.map → accordion-item.BbMoC7Rn.js.map} +1 -1
- package/dist/chunks/{action-bar.CWjLoeOU.js → action-bar.C6XFuiE0.js} +20 -20
- package/dist/chunks/{action-bar.CWjLoeOU.js.map → action-bar.C6XFuiE0.js.map} +1 -1
- package/dist/chunks/{ai-button.CYaCMWFk.js → ai-button.M2xaszNl.js} +3 -3
- package/dist/chunks/{ai-button.CYaCMWFk.js.map → ai-button.M2xaszNl.js.map} +1 -1
- package/dist/chunks/{ai-tag.CjrOE5yl.js → ai-tag.BLDTP7fs.js} +4 -4
- package/dist/chunks/{ai-tag.CjrOE5yl.js.map → ai-tag.BLDTP7fs.js.map} +1 -1
- package/dist/chunks/{alert.C8Pe1-OO.js → alert.BYmn1ewo.js} +4 -4
- package/dist/chunks/{alert.C8Pe1-OO.js.map → alert.BYmn1ewo.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.C3zkcfPH.js → anchor-scroller.B35-JMuH.js} +6 -6
- package/dist/chunks/{anchor-scroller.C3zkcfPH.js.map → anchor-scroller.B35-JMuH.js.map} +1 -1
- package/dist/chunks/{avatar.DcXyOCS4.js → avatar.Bes5Qw12.js} +2 -2
- package/dist/chunks/{avatar.DcXyOCS4.js.map → avatar.Bes5Qw12.js.map} +1 -1
- package/dist/chunks/{base-button.Bi5JR_6k.js → base-button.Dg_u0f2_.js} +3 -3
- package/dist/chunks/{base-button.Bi5JR_6k.js.map → base-button.Dg_u0f2_.js.map} +1 -1
- package/dist/chunks/{base-modal.Bn4ZXwv6.js → base-modal.CulokESn.js} +7 -7
- package/dist/chunks/{base-modal.Bn4ZXwv6.js.map → base-modal.CulokESn.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CrbF2BSQ.js → button-actions-with-menu.BsCmJeKU.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.CrbF2BSQ.js.map → button-actions-with-menu.BsCmJeKU.js.map} +1 -1
- package/dist/chunks/{button-actions.uIjzze43.js → button-actions.DvuGEQxM.js} +9 -9
- package/dist/chunks/button-actions.DvuGEQxM.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.Ciflfide.js → button.DAcwNdtP.js} +3 -3
- package/dist/chunks/{button.Ciflfide.js.map → button.DAcwNdtP.js.map} +1 -1
- package/dist/chunks/{calendar.Dtba7fcs.js → calendar.EuBZ9HoM.js} +325 -322
- package/dist/chunks/calendar.EuBZ9HoM.js.map +1 -0
- package/dist/chunks/{card.a8QL14dy.js → card.OErI_R47.js} +8 -8
- package/dist/chunks/{card.a8QL14dy.js.map → card.OErI_R47.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BCzNXT1-.js → checkbox-group.Deb5pHjj.js} +4 -4
- package/dist/chunks/{checkbox-group.BCzNXT1-.js.map → checkbox-group.Deb5pHjj.js.map} +1 -1
- package/dist/chunks/{checkbox.0RmIkniU.js → checkbox.YBhv3GCJ.js} +17 -17
- package/dist/chunks/{checkbox.0RmIkniU.js.map → checkbox.YBhv3GCJ.js.map} +1 -1
- package/dist/chunks/{chip.Bv6IGch0.js → chip.D4OozULC.js} +13 -11
- package/dist/chunks/{chip.Bv6IGch0.js.map → chip.D4OozULC.js.map} +1 -1
- package/dist/chunks/{code-snippet.BbswO6TU.js → code-snippet.DNDXr7t6.js} +7 -7
- package/dist/chunks/{code-snippet.BbswO6TU.js.map → code-snippet.DNDXr7t6.js.map} +1 -1
- package/dist/chunks/{controls-group.KarFHKUT.js → controls-group.CC3yZiTT.js} +3 -3
- package/dist/chunks/{controls-group.KarFHKUT.js.map → controls-group.CC3yZiTT.js.map} +1 -1
- package/dist/chunks/{copy.C92qFRaR.js → copy.YBeE8V9S.js} +4 -4
- package/dist/chunks/{copy.C92qFRaR.js.map → copy.YBeE8V9S.js.map} +1 -1
- package/dist/chunks/{country.BN34hLpN.js → country.PHJgPzKU.js} +7 -7
- package/dist/chunks/{country.BN34hLpN.js.map → country.PHJgPzKU.js.map} +1 -1
- package/dist/chunks/country.types.BCOrkmVK.js.map +1 -1
- package/dist/chunks/{currency.DS4-apvT.js → currency.Y6BqUzYE.js} +5 -5
- package/dist/chunks/{currency.DS4-apvT.js.map → currency.Y6BqUzYE.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Bv-SveGN.js → dashboard-section.CjC3fVU6.js} +3 -3
- package/dist/chunks/{dashboard-section.Bv-SveGN.js.map → dashboard-section.CjC3fVU6.js.map} +1 -1
- package/dist/chunks/{dashed-underline.C3lSC1_R.js → dashed-underline.DAtZOaad.js} +4 -4
- package/dist/chunks/{dashed-underline.C3lSC1_R.js.map → dashed-underline.DAtZOaad.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DqZmPeze.js → data-grid-template.bPjGSga2.js} +4 -4
- package/dist/chunks/{data-grid-template.DqZmPeze.js.map → data-grid-template.bPjGSga2.js.map} +1 -1
- package/dist/chunks/{data-grid.vBDlLHOW.js → data-grid.o5MQdWnJ.js} +26 -26
- package/dist/chunks/{data-grid.vBDlLHOW.js.map → data-grid.o5MQdWnJ.js.map} +1 -1
- package/dist/chunks/{date-picker.Dnr2HuxA.js → date-picker.DyB8XkiY.js} +10 -10
- package/dist/chunks/{date-picker.Dnr2HuxA.js.map → date-picker.DyB8XkiY.js.map} +1 -1
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date-range-picker.CuBygd3O.js → date-range-picker.BcQUUVcW.js} +567 -525
- package/dist/chunks/date-range-picker.BcQUUVcW.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date.ojGAujAt.js → date.SUOSxkTe.js} +4 -4
- package/dist/chunks/{date.ojGAujAt.js.map → date.SUOSxkTe.js.map} +1 -1
- package/dist/chunks/{dialog-page.D60pjDsQ.js → dialog-page.CHpFuDd9.js} +4 -4
- package/dist/chunks/{dialog-page.D60pjDsQ.js.map → dialog-page.CHpFuDd9.js.map} +1 -1
- package/dist/chunks/{draggable-handle.Cvc8gHzx.js → draggable-handle.CKkSJP0K.js} +3 -3
- package/dist/chunks/{draggable-handle.Cvc8gHzx.js.map → draggable-handle.CKkSJP0K.js.map} +1 -1
- package/dist/chunks/{draggable.BZsgR26I.js → draggable.jzTSFcM7.js} +38 -35
- package/dist/chunks/draggable.jzTSFcM7.js.map +1 -0
- package/dist/chunks/{drawer.D3j-d3q5.js → drawer.De-jDVb2.js} +2 -2
- package/dist/chunks/{drawer.D3j-d3q5.js.map → drawer.De-jDVb2.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Bn5FPeEL.js → dropdown-tag.BvXqllkv.js} +8 -8
- package/dist/chunks/{dropdown-tag.Bn5FPeEL.js.map → dropdown-tag.BvXqllkv.js.map} +1 -1
- package/dist/chunks/{dropdown.D_jkFrMd.js → dropdown.BoSI-Rre.js} +20 -20
- package/dist/chunks/{dropdown.D_jkFrMd.js.map → dropdown.BoSI-Rre.js.map} +1 -1
- package/dist/chunks/{empty-state.DpUC-3wv.js → empty-state.BuK12EGe.js} +4 -4
- package/dist/chunks/{empty-state.DpUC-3wv.js.map → empty-state.BuK12EGe.js.map} +1 -1
- package/dist/chunks/{error-message.Bt0CznQM.js → error-message.DJ5l0EUH.js} +3 -3
- package/dist/chunks/{error-message.Bt0CznQM.js.map → error-message.DJ5l0EUH.js.map} +1 -1
- package/dist/chunks/es6.yPcTMnSH.js.map +1 -1
- package/dist/chunks/{field-label.Cz11fn_F.js → field-label.vrUwhoOg.js} +4 -4
- package/dist/chunks/{field-label.Cz11fn_F.js.map → field-label.vrUwhoOg.js.map} +1 -1
- package/dist/chunks/{file-uploader.BglImnqw.js → file-uploader.Cv8sm0Jd.js} +12 -12
- package/dist/chunks/{file-uploader.BglImnqw.js.map → file-uploader.Cv8sm0Jd.js.map} +1 -1
- package/dist/chunks/{filter-bar.DG4GTi8L.js → filter-bar.6ElVHgFA.js} +34 -31
- package/dist/chunks/filter-bar.6ElVHgFA.js.map +1 -0
- package/dist/chunks/{fixed-scroller.DoOR83iH.js → fixed-scroller.C0nVzRBU.js} +3 -3
- package/dist/chunks/{fixed-scroller.DoOR83iH.js.map → fixed-scroller.C0nVzRBU.js.map} +1 -1
- package/dist/chunks/{footer-actions.Dl20Q1WX.js → footer-actions.BJif4sIk.js} +4 -4
- package/dist/chunks/{footer-actions.Dl20Q1WX.js.map → footer-actions.BJif4sIk.js.map} +1 -1
- package/dist/chunks/{form-layout-group.iAwbiI_S.js → form-layout-group.B9Kzae5F.js} +2 -2
- package/dist/chunks/{form-layout-group.iAwbiI_S.js.map → form-layout-group.B9Kzae5F.js.map} +1 -1
- package/dist/chunks/{form-layout-title.BZFh_nGD.js → form-layout-title.C7f1ByNh.js} +4 -4
- package/dist/chunks/{form-layout-title.BZFh_nGD.js.map → form-layout-title.C7f1ByNh.js.map} +1 -1
- package/dist/chunks/{header-with-views.WJlXgGI5.js → header-with-views.Dl6bfk_7.js} +17 -17
- package/dist/chunks/{header-with-views.WJlXgGI5.js.map → header-with-views.Dl6bfk_7.js.map} +1 -1
- package/dist/chunks/{header.Bi3MPZKE.js → header.E-KFjIG7.js} +5 -5
- package/dist/chunks/{header.Bi3MPZKE.js.map → header.E-KFjIG7.js.map} +1 -1
- package/dist/chunks/index.CGBfMQdv.js +38 -0
- package/dist/chunks/index.CGBfMQdv.js.map +1 -0
- package/dist/chunks/{info-icon-with-popover.uSr6-jzR.js → info-icon-with-popover.DqnQnwMI.js} +4 -4
- package/dist/chunks/{info-icon-with-popover.uSr6-jzR.js.map → info-icon-with-popover.DqnQnwMI.js.map} +1 -1
- package/dist/chunks/{info-icon.Zlg6Sgz0.js → info-icon.D_zu5SYT.js} +2 -2
- package/dist/chunks/{info-icon.Zlg6Sgz0.js.map → info-icon.D_zu5SYT.js.map} +1 -1
- package/dist/chunks/{input-field-password.CJZxudne.js → input-field-password.BXptrVTT.js} +7 -7
- package/dist/chunks/{input-field-password.CJZxudne.js.map → input-field-password.BXptrVTT.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.OJ4MG9Gf.js → input-field-phone-number.Crxi8Wm7.js} +4 -4
- package/dist/chunks/{input-field-phone-number.OJ4MG9Gf.js.map → input-field-phone-number.Crxi8Wm7.js.map} +1 -1
- package/dist/chunks/{input-field.IyNujUZt.js → input-field._keU91LW.js} +24 -24
- package/dist/chunks/{input-field.IyNujUZt.js.map → input-field._keU91LW.js.map} +1 -1
- package/dist/chunks/input-time.D7UW_ww_.js +193 -0
- package/dist/chunks/input-time.D7UW_ww_.js.map +1 -0
- package/dist/chunks/{inspector-page.D42_PXHM.js → inspector-page.DNsc0lK1.js} +4 -4
- package/dist/chunks/{inspector-page.D42_PXHM.js.map → inspector-page.DNsc0lK1.js.map} +1 -1
- package/dist/chunks/{inspector.BBgrupfO.js → inspector.BLAqbhmV.js} +6 -6
- package/dist/chunks/{inspector.BBgrupfO.js.map → inspector.BLAqbhmV.js.map} +1 -1
- package/dist/chunks/{layout-row.DijjweVX.js → layout-row.X6mPrUu8.js} +2 -2
- package/dist/chunks/{layout-row.DijjweVX.js.map → layout-row.X6mPrUu8.js.map} +1 -1
- package/dist/chunks/{link.types.BGj7apK3.js → link.types.BZ1u_6CS.js} +2 -2
- package/dist/chunks/{link.types.BGj7apK3.js.map → link.types.BZ1u_6CS.js.map} +1 -1
- package/dist/chunks/{list-item.CT7dyMQH.js → list-item.RuGQ8Y4T.js} +6 -6
- package/dist/chunks/{list-item.CT7dyMQH.js.map → list-item.RuGQ8Y4T.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.CwrFdsY1.js → listbox-option-tag.71rmQvG8.js} +3 -3
- package/dist/chunks/{listbox-option-tag.CwrFdsY1.js.map → listbox-option-tag.71rmQvG8.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.I5bjqzfd.js → modal-fullscreen.jXJnaueu.js} +10 -10
- package/dist/chunks/modal-fullscreen.jXJnaueu.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CrsIyU7A.js → modal.vue_vue_type_script_setup_true_lang.BwmYlzFm.js} +8 -8
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CrsIyU7A.js.map → modal.vue_vue_type_script_setup_true_lang.BwmYlzFm.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.BJ9ZsXEn.js → navigation-menu-group.BnS0isK8.js} +32 -32
- package/dist/chunks/navigation-menu-group.BnS0isK8.js.map +1 -0
- package/dist/chunks/{pagination.C5gZxtZY.js → pagination.C-kvJ-XK.js} +9 -8
- package/dist/chunks/{pagination.C5gZxtZY.js.map → pagination.C-kvJ-XK.js.map} +1 -1
- package/dist/chunks/{payment-method.q2yow5VR.js → payment-method.B69Mu88z.js} +2 -2
- package/dist/chunks/{payment-method.q2yow5VR.js.map → payment-method.B69Mu88z.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/popover.types.dhllh3NP.js.map +1 -1
- package/dist/chunks/popper-container.Rfj8UdMD.js.map +1 -1
- package/dist/chunks/{promo-banner.kE1-WkzI.js → promo-banner.3d1DHWas.js} +4 -4
- package/dist/chunks/{promo-banner.kE1-WkzI.js.map → promo-banner.3d1DHWas.js.map} +1 -1
- package/dist/chunks/{radio-group.XmRPh03c.js → radio-group.BTI_2U11.js} +5 -5
- package/dist/chunks/{radio-group.XmRPh03c.js.map → radio-group.BTI_2U11.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Cv_Vwt-6.js → rich-text-editor.ClUU1zPM.js} +12 -12
- package/dist/chunks/{rich-text-editor.Cv_Vwt-6.js.map → rich-text-editor.ClUU1zPM.js.map} +1 -1
- package/dist/chunks/{scroll-to-section.CJorrxQT.js → scroll-to-section.BRr4Vwi7.js} +2 -2
- package/dist/chunks/{scroll-to-section.CJorrxQT.js.map → scroll-to-section.BRr4Vwi7.js.map} +1 -1
- package/dist/chunks/{search-bar.5tObtLfW.js → search-bar.D1Jz7hdd.js} +13 -13
- package/dist/chunks/{search-bar.5tObtLfW.js.map → search-bar.D1Jz7hdd.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DApIImQ0.js → secondary-nav.D32VFDTi.js} +26 -26
- package/dist/chunks/{secondary-nav.DApIImQ0.js.map → secondary-nav.D32VFDTi.js.map} +1 -1
- package/dist/chunks/{segmented-control.CEt2dz4n.js → segmented-control.CarI0i3p.js} +3 -3
- package/dist/chunks/{segmented-control.CEt2dz4n.js.map → segmented-control.CarI0i3p.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.DHXtJpoB.js → selection-card-group.CQsS8-H9.js} +109 -108
- package/dist/chunks/{selection-card-group.DHXtJpoB.js.map → selection-card-group.CQsS8-H9.js.map} +1 -1
- package/dist/chunks/{sidepanel._30g8POM.js → sidepanel.CYWPV9dE.js} +13 -13
- package/dist/chunks/{sidepanel._30g8POM.js.map → sidepanel.CYWPV9dE.js.map} +1 -1
- package/dist/chunks/{status.Nss4P5OU.js → status.BJ48Isyh.js} +2 -2
- package/dist/chunks/{status.Nss4P5OU.js.map → status.BJ48Isyh.js.map} +1 -1
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
- package/dist/chunks/{step.5_ZukVqJ.js → step.CRVu8HPR.js} +6 -6
- package/dist/chunks/step.CRVu8HPR.js.map +1 -0
- package/dist/chunks/{structured-list-item.CBzznwcF.js → structured-list-item.C6SAUS9a.js} +11 -10
- package/dist/chunks/structured-list-item.C6SAUS9a.js.map +1 -0
- package/dist/chunks/{summary-grid.types.BR_EGvRg.js → summary-grid.types.FTWeUNFh.js} +7 -7
- package/dist/chunks/{summary-grid.types.BR_EGvRg.js.map → summary-grid.types.FTWeUNFh.js.map} +1 -1
- package/dist/chunks/{tab.D_k5AVHk.js → tab.CwXAsp9E.js} +44 -43
- package/dist/chunks/tab.CwXAsp9E.js.map +1 -0
- package/dist/chunks/{table-of-contents.CJ2yMbAG.js → table-of-contents.Bnyua5hb.js} +4 -4
- package/dist/chunks/{table-of-contents.CJ2yMbAG.js.map → table-of-contents.Bnyua5hb.js.map} +1 -1
- package/dist/chunks/{tag.BE1j0Oid.js → tag.BYxa556o.js} +3 -3
- package/dist/chunks/{tag.BE1j0Oid.js.map → tag.BYxa556o.js.map} +1 -1
- package/dist/chunks/{textarea.BYshPd98.js → textarea.D4aMdmDx.js} +8 -8
- package/dist/chunks/textarea.D4aMdmDx.js.map +1 -0
- package/dist/chunks/{timeline-item.Sy_DSw6p.js → timeline-item.De8HCoYw.js} +11 -11
- package/dist/chunks/{timeline-item.Sy_DSw6p.js.map → timeline-item.De8HCoYw.js.map} +1 -1
- package/dist/chunks/{title-details.C4ZvxPMu.js → title-details.8cyCeaLf.js} +5 -5
- package/dist/chunks/{title-details.C4ZvxPMu.js.map → title-details.8cyCeaLf.js.map} +1 -1
- package/dist/chunks/{toast.u5Y_CGe_.js → toast.BI2PD8Oj.js} +5 -5
- package/dist/chunks/{toast.u5Y_CGe_.js.map → toast.BI2PD8Oj.js.map} +1 -1
- package/dist/chunks/{toggle.BW8ww0Ih.js → toggle.BbCqV953.js} +4 -4
- package/dist/chunks/{toggle.BW8ww0Ih.js.map → toggle.BbCqV953.js.map} +1 -1
- package/dist/chunks/{tooltip.TFOGHOO0.js → tooltip.0QqJo2sa.js} +2 -2
- package/dist/chunks/{tooltip.TFOGHOO0.js.map → tooltip.0QqJo2sa.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BIP-heAH.js → tutorial.vue_vue_type_script_setup_true_lang.Dn4toWHY.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BIP-heAH.js.map → tutorial.vue_vue_type_script_setup_true_lang.Dn4toWHY.js.map} +1 -1
- package/dist/chunks/{typography.wIM07Hbl.js → typography.B6elnWpr.js} +35 -35
- package/dist/chunks/{typography.wIM07Hbl.js.map → typography.B6elnWpr.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BAoPbtq7.js → use-bento-toast-controller.CkpBtweL.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.BAoPbtq7.js.map → use-bento-toast-controller.CkpBtweL.js.map} +1 -1
- package/dist/chunks/{use-country-items.CYnYzs7x.js → use-country-items.CAYJt6XS.js} +3 -3
- package/dist/chunks/{use-country-items.CYnYzs7x.js.map → use-country-items.CAYJt6XS.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter._ik1DYYV.js → use-date-input-formatter.BIVkaB1k.js} +2 -2
- package/dist/chunks/{use-date-input-formatter._ik1DYYV.js.map → use-date-input-formatter.BIVkaB1k.js.map} +1 -1
- package/dist/chunks/{use-dynamic-date-fns-locale.BMO9rsEh.js → use-dynamic-date-fns-locale._EtEeU3i.js} +2 -2
- package/dist/chunks/{use-dynamic-date-fns-locale.BMO9rsEh.js.map → use-dynamic-date-fns-locale._EtEeU3i.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 +6 -6
- package/dist/date.js +1 -1
- package/dist/draggable.js +2 -2
- package/dist/drawer.js +1 -1
- 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 +382 -353
- 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 +4 -4
- 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 +1 -1
- package/package.json +9 -5
- package/dist/chunks/button-actions.uIjzze43.js.map +0 -1
- package/dist/chunks/calendar.Dtba7fcs.js.map +0 -1
- package/dist/chunks/date-range-picker.CuBygd3O.js.map +0 -1
- package/dist/chunks/draggable.BZsgR26I.js.map +0 -1
- package/dist/chunks/filter-bar.DG4GTi8L.js.map +0 -1
- package/dist/chunks/index.B875RXHM.js +0 -15
- package/dist/chunks/index.B875RXHM.js.map +0 -1
- package/dist/chunks/input-time.BJ6YqkFi.js +0 -122
- package/dist/chunks/input-time.BJ6YqkFi.js.map +0 -1
- package/dist/chunks/modal-fullscreen.I5bjqzfd.js.map +0 -1
- package/dist/chunks/navigation-menu-group.BJ9ZsXEn.js.map +0 -1
- package/dist/chunks/step.5_ZukVqJ.js.map +0 -1
- package/dist/chunks/structured-list-item.CBzznwcF.js.map +0 -1
- package/dist/chunks/tab.D_k5AVHk.js.map +0 -1
- package/dist/chunks/textarea.BYshPd98.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as l, defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { e as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { ref as l, defineComponent as C, computed as A, watch as U, openBlock as b, createBlock as N, resolveDynamicComponent as z, withCtx as K, createElementBlock as V, Fragment as G, renderList as X, renderSlot as Y, createElementVNode as j, toDisplayString as q, unref as J, nextTick as P } from "vue";
|
|
2
|
+
import { u as $, a as Q } from "./draggable-handle.CKkSJP0K.js";
|
|
3
|
+
import { u as W } from "./index.CGBfMQdv.js";
|
|
4
|
+
import { e as Z, f as d } from "./index.DCpihRYV.js";
|
|
5
|
+
import { _ as ee } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import "../assets/draggable.css";
|
|
7
|
-
const
|
|
7
|
+
const oe = Z(() => {
|
|
8
8
|
const s = l(!1);
|
|
9
9
|
return typeof window < "u" && (d(
|
|
10
10
|
window,
|
|
@@ -30,7 +30,7 @@ const ee = W(() => {
|
|
|
30
30
|
), d(window, "blur", () => {
|
|
31
31
|
s.value = !1;
|
|
32
32
|
})), { isKeyboardUser: s };
|
|
33
|
-
}),
|
|
33
|
+
}), T = {
|
|
34
34
|
"de-DE": { youHaveMovedFromPositionToPosition: "Sie haben {itemLabel} von Position {indexOrigin} an Position {indexTarget} von {total} verschoben." },
|
|
35
35
|
"en-GB": { youHaveMovedFromPositionToPosition: "You have moved {itemLabel} from position {indexOrigin} to position {indexTarget} of {total}." },
|
|
36
36
|
"en-US": { youHaveMovedFromPositionToPosition: "You have moved {itemLabel} from position {indexOrigin} to position {indexTarget} of {total}." },
|
|
@@ -42,16 +42,16 @@ const ee = W(() => {
|
|
|
42
42
|
"ja-JP": { youHaveMovedFromPositionToPosition: "{itemLabel} を {indexOrigin} の位置から {total} の {indexTarget} の位置に移動しました。" },
|
|
43
43
|
"pt-BR": { youHaveMovedFromPositionToPosition: "Você moveu {itemLabel} da posição {indexOrigin} para a posição {indexTarget} de {total}." },
|
|
44
44
|
"zh-CN": { youHaveMovedFromPositionToPosition: "您已将 {itemLabel} 从 {indexOrigin} 位置移动到 {indexTarget} 位置(共 {total} 个位置)。" }
|
|
45
|
-
},
|
|
45
|
+
}, te = {
|
|
46
46
|
class: "b-draggable__announcement",
|
|
47
47
|
role: "status",
|
|
48
48
|
"aria-live": "polite"
|
|
49
|
-
},
|
|
49
|
+
}, ne = {
|
|
50
50
|
name: "bento-draggable",
|
|
51
51
|
model: { prop: "items", event: "update:items" },
|
|
52
|
-
i18n: { messages:
|
|
53
|
-
},
|
|
54
|
-
...
|
|
52
|
+
i18n: { messages: T }
|
|
53
|
+
}, ie = /* @__PURE__ */ C({
|
|
54
|
+
...ne,
|
|
55
55
|
props: {
|
|
56
56
|
announcement: { default: "" },
|
|
57
57
|
disableAutoSort: { type: Boolean, default: !1 },
|
|
@@ -61,7 +61,7 @@ const ee = W(() => {
|
|
|
61
61
|
},
|
|
62
62
|
emits: ["update:items"],
|
|
63
63
|
setup(s, { expose: c, emit: y }) {
|
|
64
|
-
const h = ">:not(.b-draggable__announcement)", o = s, _ = y, r = l(null), v = l(!1), m = l([]), u = l(null), E =
|
|
64
|
+
const h = ">:not(.b-draggable__announcement)", o = s, _ = y, r = l(null), v = l(!1), m = l([]), u = l(null), E = A(() => r.value ? {
|
|
65
65
|
...o.options,
|
|
66
66
|
draggable: o.options?.draggable ?? h,
|
|
67
67
|
onStart: (e) => {
|
|
@@ -79,27 +79,30 @@ const ee = W(() => {
|
|
|
79
79
|
}
|
|
80
80
|
if (!o.disableAutoSort) {
|
|
81
81
|
const { oldIndex: t, newIndex: i, from: n, to: f } = e;
|
|
82
|
-
n === f && n === r.value && t !== void 0 && i !== void 0 && a(t, i);
|
|
82
|
+
n === f && n === r.value && t !== void 0 && i !== void 0 && (M(e), a(t, i));
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
} : {}), { announcementMessage: L, announce: g } =
|
|
86
|
-
|
|
85
|
+
} : {}), { announcementMessage: L, announce: g } = $(), { t: w } = W({ messages: T }), { draggableElement: I } = Q(r, E), M = (e) => {
|
|
86
|
+
const { from: t, item: i, oldIndex: n } = e;
|
|
87
|
+
!i || n === void 0 || (i.remove(), t.insertBefore(i, t.children[n] ?? null));
|
|
88
|
+
}, { isKeyboardUser: H } = oe(), p = async (e) => {
|
|
89
|
+
if (await P(), e !== -1 && r.value) {
|
|
87
90
|
const i = r.value.children[e]?.querySelector(".b-draggable-handle button");
|
|
88
|
-
await
|
|
91
|
+
await P(), i?.focus();
|
|
89
92
|
}
|
|
90
93
|
}, a = async (e, t) => {
|
|
91
94
|
if (e < 0 || t < 0 || e >= o.items.length || t >= o.items.length || e === t)
|
|
92
95
|
return;
|
|
93
96
|
const i = Array.from(o.items), [n] = i.splice(e, 1);
|
|
94
97
|
i.splice(t, 0, n), u.value = n, _("update:items", i.filter(Boolean));
|
|
95
|
-
const f = n.label,
|
|
98
|
+
const f = n.label, k = o?.announcement || w("youHaveMovedFromPositionToPosition", {
|
|
96
99
|
itemLabel: f,
|
|
97
100
|
indexOrigin: e + 1,
|
|
98
101
|
indexTarget: t + 1,
|
|
99
102
|
total: o.items.length
|
|
100
103
|
});
|
|
101
|
-
o.announcement !== "disabled" && g(
|
|
102
|
-
}, S = (e) => a(e, e - 1),
|
|
104
|
+
o.announcement !== "disabled" && g(k);
|
|
105
|
+
}, S = (e) => a(e, e - 1), F = (e) => a(e, e + 1), x = (e) => a(e, e - 1), B = (e) => a(e, e + 1), D = (e) => a(e, 0), O = (e) => a(e, o.items.length - 1), R = (e) => ({
|
|
103
106
|
up: e === 0,
|
|
104
107
|
top: e === 0,
|
|
105
108
|
down: e === o.items.length - 1,
|
|
@@ -107,7 +110,7 @@ const ee = W(() => {
|
|
|
107
110
|
left: !0,
|
|
108
111
|
right: !0
|
|
109
112
|
});
|
|
110
|
-
return
|
|
113
|
+
return U(
|
|
111
114
|
() => o.items,
|
|
112
115
|
async (e) => {
|
|
113
116
|
if (e) {
|
|
@@ -132,7 +135,7 @@ const ee = W(() => {
|
|
|
132
135
|
/**
|
|
133
136
|
* The underlying SortableJS instance, which provides methods like `toArray()`, `sort()`, and `destroy()`.
|
|
134
137
|
*/
|
|
135
|
-
draggableElement:
|
|
138
|
+
draggableElement: I,
|
|
136
139
|
/**
|
|
137
140
|
* A boolean ref that is `true` when an item is being dragged.
|
|
138
141
|
*/
|
|
@@ -149,29 +152,29 @@ const ee = W(() => {
|
|
|
149
152
|
* Programmatically focuses the draggable handle button at the given index.
|
|
150
153
|
*/
|
|
151
154
|
focus: p
|
|
152
|
-
}), (e, t) => (b(),
|
|
155
|
+
}), (e, t) => (b(), N(z(e.el), {
|
|
153
156
|
ref_key: "containerRef",
|
|
154
157
|
ref: r
|
|
155
158
|
}, {
|
|
156
|
-
default:
|
|
157
|
-
(b(!0),
|
|
159
|
+
default: K(() => [
|
|
160
|
+
(b(!0), V(G, null, X(e.items, (i, n) => Y(e.$slots, "default", {
|
|
158
161
|
item: i,
|
|
159
162
|
index: n,
|
|
160
163
|
moveUp: () => S(n),
|
|
161
|
-
moveRight: () =>
|
|
162
|
-
moveDown: () =>
|
|
163
|
-
moveLeft: () =>
|
|
164
|
-
moveTop: () =>
|
|
165
|
-
moveBottom: () =>
|
|
166
|
-
disabledMenus:
|
|
164
|
+
moveRight: () => B(n),
|
|
165
|
+
moveDown: () => F(n),
|
|
166
|
+
moveLeft: () => x(n),
|
|
167
|
+
moveTop: () => D(n),
|
|
168
|
+
moveBottom: () => O(n),
|
|
169
|
+
disabledMenus: R(n)
|
|
167
170
|
}, void 0, !0)), 256)),
|
|
168
|
-
|
|
171
|
+
j("div", te, q(J(L)), 1)
|
|
169
172
|
]),
|
|
170
173
|
_: 3
|
|
171
174
|
}, 512));
|
|
172
175
|
}
|
|
173
|
-
}),
|
|
176
|
+
}), ue = /* @__PURE__ */ ee(ie, [["__scopeId", "data-v-8e20b522"]]);
|
|
174
177
|
export {
|
|
175
|
-
|
|
178
|
+
ue as d
|
|
176
179
|
};
|
|
177
|
-
//# sourceMappingURL=draggable.
|
|
180
|
+
//# sourceMappingURL=draggable.jzTSFcM7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draggable.jzTSFcM7.js","sources":["../../../vue2/src/components/draggable/composables/use-track-keyboard-user/use-track-keyboard-user.ts","../../../vue2/src/components/draggable/draggable.vue"],"sourcesContent":["import { createGlobalState, useEventListener } from '@vueuse/core';\nimport { ref } from 'vue';\n\nexport const useTrackKeyboardUser = createGlobalState(() => {\n // 1. Define this OUTSIDE the setup function so it acts as a global singleton\n const isKeyboardUser = ref(false);\n\n if (typeof window !== 'undefined') {\n // Switch to keyboard mode on Tab\n useEventListener(\n window,\n 'keydown',\n e => {\n if (e.key === 'Tab') {\n isKeyboardUser.value = true;\n }\n },\n { capture: true }\n );\n\n // Switch back to mouse mode on click/touch\n useEventListener(\n window,\n 'mousedown',\n () => {\n isKeyboardUser.value = false;\n },\n { capture: true }\n );\n\n useEventListener(\n window,\n 'touchstart',\n () => {\n isKeyboardUser.value = false;\n },\n { capture: true, passive: true }\n );\n\n useEventListener(window, 'blur', () => {\n isKeyboardUser.value = false;\n });\n }\n\n return { isKeyboardUser };\n});\n","<template>\n <component :is=\"el\" ref=\"containerRef\">\n <slot\n v-for=\"(item, index) of items\"\n :item=\"item\"\n :index=\"index\"\n :move-up=\"() => moveItemUp(index)\"\n :move-right=\"() => moveItemRight(index)\"\n :move-down=\"() => moveItemDown(index)\"\n :move-left=\"() => moveItemLeft(index)\"\n :move-top=\"() => moveItemTop(index)\"\n :move-bottom=\"() => moveItemBottom(index)\"\n :disabled-menus=\"disabledMenuItems(index)\"\n name=\"default\"\n ></slot>\n <div class=\"b-draggable__announcement\" role=\"status\" aria-live=\"polite\">\n {{ announcementMessage }}\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import type {\n BentoDraggableEmits,\n BentoDraggableItems,\n BentoDraggableOptions,\n BentoDraggableProps,\n BentoDraggableSortableEvent,\n } from './draggable.types';\n import { useBentoDraggable } from './composables/use-bento-draggable/use-bento-draggable';\n import { useDraggableAnnouncement } from './composables/use-draggable-announcement';\n import { useTrackKeyboardUser } from './composables/use-track-keyboard-user';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const ALL_CHILDREN_EXCEPT_SCREEN_READER_ELEMENTS = '>:not(.b-draggable__announcement)';\n\n const props = withDefaults(defineProps<BentoDraggableProps>(), {\n el: 'div',\n items: () => [],\n options: () => ({}),\n announcement: '',\n disableAutoSort: false,\n });\n\n const emit = defineEmits<BentoDraggableEmits>();\n\n /**\n * Reference to the container of the draggable elements.\n */\n const containerRef = ref<HTMLElement | null>(null);\n /**\n * Indicates if there is an element being dragged inside the container.\n */\n const isDragging = ref<boolean>(false);\n\n /**\n * Internal copy of items used to track position changes for focus restoration.\n */\n const internalItems = ref<BentoDraggableItems>([]);\n\n /**\n * Tracks the item being moved via keyboard so focus can be restored to the correct element.\n */\n const lastMovedItem = ref<BentoDraggableItems[number] | null>(null);\n\n const computedOptions = computed<BentoDraggableOptions>(() => {\n if (!containerRef.value) {\n return {};\n }\n\n return {\n ...props.options,\n draggable: props.options?.draggable ?? ALL_CHILDREN_EXCEPT_SCREEN_READER_ELEMENTS,\n onStart: (event: BentoDraggableSortableEvent) => {\n isDragging.value = true;\n\n if (props.options?.onStart) {\n props.options?.onStart(event);\n }\n },\n onEnd: (event: BentoDraggableSortableEvent) => {\n // This is a hack to move the event to the end of the event queue.\n // cf this issue: https://github.com/SortableJS/Sortable/issues/1184\n setTimeout(() => {\n isDragging.value = false;\n\n if (props.options?.onEnd) {\n props.options?.onEnd(event);\n }\n });\n },\n onSort: (event: BentoDraggableSortableEvent) => {\n // Always execute the user's custom onSort callback if provided\n if (props.options?.onSort) {\n props.options.onSort(event);\n return;\n }\n\n // Automatically sync the v-model unless the user explicitly disabled it\n if (!props.disableAutoSort) {\n const { oldIndex, newIndex, from, to } = event;\n\n if (\n from === to &&\n from === containerRef.value &&\n oldIndex !== undefined &&\n newIndex !== undefined\n ) {\n restoreItemDomPosition(event);\n moveItem(oldIndex, newIndex);\n }\n }\n },\n };\n });\n\n /**\n * Handle reordering announcements for screen readers.\n */\n const { announcementMessage, announce } = useDraggableAnnouncement();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { draggableElement } = useBentoDraggable(containerRef, computedOptions);\n\n /**\n * Restores the item that SortableJS moved directly in the DOM before updating the reactive items.\n * This keeps Vue responsible for rendering the final order and prevents the move from being applied twice.\n *\n * @param event SortableJS event containing the moved item and its original index.\n */\n const restoreItemDomPosition = (event: BentoDraggableSortableEvent) => {\n const { from, item, oldIndex } = event;\n\n if (!item || oldIndex === undefined) {\n return;\n }\n\n item.remove();\n from.insertBefore(item, from.children[oldIndex] ?? null);\n };\n\n // When moving items between sibling `bento-draggable`, the item may be removed, causing the DOM to be destroyed and temporarily lose focus\n // This is an alternative to query element `:focus-within` as the `:focus-within` will be gone until the other `bento-draggable` adds it into the list\n const { isKeyboardUser } = useTrackKeyboardUser();\n\n /**\n * Focuses the draggable handle button at the given index.\n * Waits for the next tick to ensure the DOM has been updated before focusing.\n *\n * @param index - The index of the item whose handle should receive focus.\n */\n const focus = async (index: number) => {\n await nextTick();\n\n if (index !== -1 && containerRef.value) {\n const itemElement = containerRef.value.children[index] as HTMLElement;\n const button = itemElement?.querySelector<HTMLButtonElement>('.b-draggable-handle button');\n await nextTick();\n button?.focus();\n }\n };\n\n /**\n * Moves an item from one position to another within the list,\n * emits the updated list, and announces the change for screen readers.\n *\n * @param indexOrigin - The current index of the item to move.\n * @param indexTarget - The desired index to move the item to.\n */\n const moveItem = async (indexOrigin: number, indexTarget: number) => {\n if (\n indexOrigin < 0 ||\n indexTarget < 0 ||\n indexOrigin >= props.items.length ||\n indexTarget >= props.items.length ||\n indexOrigin === indexTarget\n ) {\n return;\n }\n\n const newList = Array.from(props.items as BentoDraggableItems);\n const [removed] = newList.splice(indexOrigin, 1);\n newList.splice(indexTarget, 0, removed);\n\n lastMovedItem.value = removed;\n\n // Occasionally, there may be race conditions where the index is out-of-date due to the fast drag-and-drop or\n // other async operations like onEnd > setTimeout.\n // Filtering out null/undefined values ensures the list remains valid.\n emit('update:items', newList.filter(Boolean));\n\n const itemLabel = removed.label;\n\n const message =\n props?.announcement ||\n t('youHaveMovedFromPositionToPosition', {\n itemLabel,\n indexOrigin: indexOrigin + 1,\n indexTarget: indexTarget + 1,\n total: props.items.length,\n });\n\n if (props.announcement !== 'disabled') {\n announce(message);\n }\n };\n\n const moveItemUp = (index: number) => moveItem(index, index - 1);\n\n const moveItemDown = (index: number) => moveItem(index, index + 1);\n\n const moveItemLeft = (index: number) => moveItem(index, index - 1);\n\n const moveItemRight = (index: number) => moveItem(index, index + 1);\n\n const moveItemTop = (index: number) => moveItem(index, 0);\n\n const moveItemBottom = (index: number) => moveItem(index, props.items.length - 1);\n\n /**\n * Returns a pre-calculated disabled menus object for the current item.\n */\n const disabledMenuItems = (index: number) => {\n return {\n up: index === 0,\n top: index === 0,\n down: index === props.items.length - 1,\n bottom: index === props.items.length - 1,\n left: true,\n right: true,\n };\n };\n\n /**\n * Watch for items changes and restore focus automatically\n */\n watch(\n () => props.items,\n async newItems => {\n if (!newItems) {\n return;\n }\n\n if (isKeyboardUser.value && newItems.length > 0 && internalItems.value.length > 0) {\n if (lastMovedItem.value) {\n // Within-list reorder: focus the moved item at its new position\n const movedItemIndex = newItems.indexOf(lastMovedItem.value);\n\n if (movedItemIndex !== -1) {\n await focus(movedItemIndex);\n }\n\n lastMovedItem.value = null;\n } else if (newItems.length > internalItems.value.length) {\n // Cross-list addition: focus the newly added item\n const newItemIndex = newItems.findIndex(item => !internalItems.value.includes(item));\n\n if (newItemIndex !== -1) {\n await focus(newItemIndex);\n }\n }\n }\n\n internalItems.value = [...newItems];\n },\n { deep: true, immediate: true }\n );\n\n defineExpose({\n /**\n * A ref to the container DOM element.\n */\n containerRef,\n /**\n * The underlying SortableJS instance, which provides methods like `toArray()`, `sort()`, and `destroy()`.\n */\n draggableElement,\n /**\n * A boolean ref that is `true` when an item is being dragged.\n */\n isDragging,\n /**\n * Announces a message to screen reader users via the live region.\n */\n announce,\n /**\n * Moves an item from one index to another and emits the updated list.\n */\n moveItem,\n /**\n * Programmatically focuses the draggable handle button at the given index.\n */\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Drag and drop container that transforms a list of items into draggable elements.\n * The library is based on SortableJS.\n * @see {@link https://github.com/SortableJS/Sortable#readme | SortableJS documentation}\n *\n * @example\n * import { BentoDraggable, BentoDraggableHandle, type BentoDraggableEvents } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDraggable, BentoDraggableHandle },\n * template: `\n * <bento-draggable\n * v-model=\"items\"\n * condensed\n * :options=\"{\n * group: 'nested',\n * animation: 150\n * }\"\n * >\n * <template #default=\"{ item, index, moveUp, moveDown }\">\n * <div :key=\"item.id\">\n * <bento-draggable-handle\n * :label=\"item.label\"\n * @move-up=\"moveUp\"\n * @move-down=\"moveDown\"\n * />\n * </div>\n * </template>\n * </bento-draggable>\n * `,\n * setup () {\n * const items = ref([\n * { id: '1', label: 'Item 1' },\n * { id: '2', label: 'Item 2' }\n * ]);\n * return {\n * items,\n * }\n * }\n * }\n */\n\n export default {\n name: 'bento-draggable',\n model: { prop: 'items', event: 'update:items' },\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./draggable.scss\" />\n"],"names":["useTrackKeyboardUser","createGlobalState","isKeyboardUser","ref","useEventListener","e","__default__","messages","ALL_CHILDREN_EXCEPT_SCREEN_READER_ELEMENTS","props","__props","emit","__emit","containerRef","isDragging","internalItems","lastMovedItem","computedOptions","computed","event","oldIndex","newIndex","from","to","restoreItemDomPosition","moveItem","announcementMessage","announce","useDraggableAnnouncement","t","useI18n","draggableElement","useBentoDraggable","item","focus","index","nextTick","button","indexOrigin","indexTarget","newList","removed","itemLabel","message","moveItemUp","moveItemDown","moveItemLeft","moveItemRight","moveItemTop","moveItemBottom","disabledMenuItems","watch","newItems","movedItemIndex","newItemIndex","__expose"],"mappings":";;;;;;AAGO,MAAAA,KAAAC,EAAA,MAAA;AAEH,QAAAC,IAAAC,EAAA,EAAA;AAEA,SAAA,OAAA,SAAA,QAEIC;AAAA,IAAA;AAAA,IACI;AAAA,IACA,CAAAC,MAAA;AAEI,MAAAA,EAAA,QAAA,UACIH,EAAA,QAAA;AAAA,IACJ;AAAA,IACJ,EAAA,SAAA,GAAA;AAAA,EACgB,GAIpBE;AAAA,IAAA;AAAA,IACI;AAAA,IACA,MAAA;AAEI,MAAAF,EAAA,QAAA;AAAA,IAAuB;AAAA,IAC3B,EAAA,SAAA,GAAA;AAAA,EACgB,GAGpBE;AAAA,IAAA;AAAA,IACI;AAAA,IACA,MAAA;AAEI,MAAAF,EAAA,QAAA;AAAA,IAAuB;AAAA,IAC3B,EAAA,SAAA,IAAA,SAAA,GAAA;AAAA,EAC+B,GAGnCE,EAAA,QAAA,QAAA,MAAA;AACI,IAAAF,EAAA,QAAA;AAAA,EAAuB,CAAA,IAI/B,EAAA,gBAAAA,EAAA;AACJ,CAAA;;;;;;;;;;;;;;;;GC2SII,KAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,SAAA,OAAA,eAAA;AAAA,EACwC,MAAA,EAAA,UAAAC,EAAA;AAElD;;;;;;;;;;;AAtTA,UAAAC,IAAA,qCAEAC,IAAAC,GAQAC,IAAAC,GAKAC,IAAAV,EAAA,IAAA,GAIAW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Af,OACI;AAAA,MAAO,IAAAA,MAAA;AAAA,MACW,KAAAA,MAAA;AAAA,MACC,MAAAA,MAAA1B,EAAA,MAAA,SAAA;AAAA,MACsB,QAAA0B,MAAA1B,EAAA,MAAA,SAAA;AAAA,MACE,MAAA;AAAA,MACjC,OAAA;AAAA,IACC;AAOf,WAAA0C;AAAA,MAAA,MAAA1C,EAAA;AAAA,MACgB,OAAA2C,MAAA;AAER,YAAAA,GAIA;AAAA,cAAAlD,EAAA,SAAAkD,EAAA,SAAA,KAAArC,EAAA,MAAA,SAAA;AACI,gBAAAC,EAAA,OAAA;AAEI,oBAAAqC,IAAAD,EAAA,QAAApC,EAAA,KAAA;AAEA,cAAAqC,MAAA,MACI,MAAAnB,EAAAmB,CAAA,GAGJrC,EAAA,QAAA;AAAA,YAAsB,WAAAoC,EAAA,SAAArC,EAAA,MAAA,QAAA;AAGtB,oBAAAuC,IAAAF,EAAA,UAAA,CAAAnB,MAAA,CAAAlB,EAAA,MAAA,SAAAkB,CAAA,CAAA;AAEA,cAAAqB,MAAA,MACI,MAAApB,EAAAoB,CAAA;AAAA,YACJ;AAAA;AAIR,UAAAvC,EAAA,QAAA,CAAA,GAAAqC,CAAA;AAAA;AAAA,MAAkC;AAAA,MACtC,EAAA,MAAA,IAAA,WAAA,GAAA;AAAA,IAC8B,GAGlCG,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,cAAA1C;AAAA;AAAA;AAAA;AAAA,MAIT,kBAAAkB;AAAA;AAAA;AAAA;AAAA,MAIA,YAAAjB;AAAA;AAAA;AAAA;AAAA,MAIA,UAAAa;AAAA;AAAA;AAAA;AAAA,MAIA,UAAAF;AAAA;AAAA;AAAA;AAAA,MAIA,OAAAS;AAAA,IAIA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as _, computed as s, openBlock as p, createElementBlock as w, createVNode as b, Transition as v, withCtx as M, withDirectives as f, createElementVNode as e, normalizeClass as h, renderSlot as t, vShow as B } from "vue";
|
|
2
2
|
import { B as D, a as E } from "./es6.yPcTMnSH.js";
|
|
3
3
|
import { d as S } from "./index.DCpihRYV.js";
|
|
4
|
-
import { u as C } from "./index.
|
|
4
|
+
import { u as C } from "./index.CGBfMQdv.js";
|
|
5
5
|
import { _ as I } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import "../assets/drawer.css";
|
|
7
7
|
const o = {
|
|
@@ -62,4 +62,4 @@ const o = {
|
|
|
62
62
|
export {
|
|
63
63
|
$ as d
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=drawer.
|
|
65
|
+
//# sourceMappingURL=drawer.De-jDVb2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.
|
|
1
|
+
{"version":3,"file":"drawer.De-jDVb2.js","sources":["../../../vue2/src/components/drawer/drawer.vue"],"sourcesContent":["<template>\n <div class=\"b-drawer\">\n <Transition name=\"b-drawer__animation\">\n <aside\n v-show=\"isDrawerOpen\"\n :id=\"props.drawerId\"\n class=\"b-drawer__drawer\"\n :class=\"conditionalDrawerClass\"\n :aria-label=\"computedDrawerLabel\"\n >\n <div class=\"b-drawer__drawer-content\">\n <slot name=\"drawer\" />\n </div>\n </aside>\n </Transition>\n\n <div class=\"b-drawer__page\">\n <div class=\"b-drawer__page-content\">\n <slot name=\"page\" />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import messages from './messages.json';\n import { type BentoDrawerProps } from './drawer.types';\n import { BMediaQueryMMax, BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n import { useBreakpoints } from '@vueuse/core';\n import { useI18n } from '@adyen/bento-vue-i18n-demi';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(defineProps<BentoDrawerProps>(), {\n isDrawerOpen: false,\n drawerLabel: '',\n });\n\n const breakpoints = useBreakpoints({\n s: BMediaQuerySMax,\n m: BMediaQueryMMax,\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isSmallDevice = breakpoints.smallerOrEqual('m');\n const isMobileDevice = breakpoints.smallerOrEqual('s');\n\n const computedDrawerLabel = computed(() => {\n return props.drawerLabel || t('menu');\n });\n\n const conditionalDrawerClass = computed(() => ({\n 'b-drawer__drawer--overlay-content': isSmallDevice.value,\n 'b-drawer__drawer--full-width': isMobileDevice.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * The `bento-drawer` component provides a responsive drawer-based navigation system.\n *\n * @usage\n * <bento-drawer\n * drawer-id=\"main-drawer\"\n * drawer-label=\"Main drawer\"\n * :is-drawer-open=\"true\"\n * >\n * <template #menu>Drawer menu items</template>\n * <template #page>Main page content</template>\n * </bento-drawer>\n */\n export default {\n name: 'bento-drawer',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./drawer.scss\" />\n"],"names":["__default__","messages","props","__props","breakpoints","useBreakpoints","BMediaQuerySMax","BMediaQueryMMax","t","useI18n","isSmallDevice","isMobileDevice","computedDrawerLabel","computed","conditionalDrawerClass"],"mappings":";;;;;;;;;;;;;;;;;;6KAyEIA,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,MAAA,EAAA,UAAAC,EAAA;AAEV;;;;;;;;AA1CA,UAAAC,IAAAC,GAKAC,IAAAC,EAAA;AAAA,MAAmC,GAAAC;AAAA,MAC5B,GAAAC;AAAA,IACA,CAAA,GAGP,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAR,EAAA,CAAA,GAEAS,IAAAN,EAAA,eAAA,GAAA,GACAO,IAAAP,EAAA,eAAA,GAAA,GAEAQ,IAAAC,EAAA,MACIX,EAAA,eAAAM,EAAA,MAAA,CAAoC,GAGxCM,IAAAD,EAAA,OAAA;AAAA,MAA+C,qCAAAH,EAAA;AAAA,MACQ,gCAAAC,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as d, computed as P, openBlock as h, createElementBlock as O, normalizeProps as B, guardReactiveProps as M, createVNode as p, mergeProps as L, withCtx as y, unref as i, toRefs as C, createTextVNode as V, toDisplayString as g, ref as A, watch as R, createBlock as U, createElementVNode as T, createCommentVNode as F } from "vue";
|
|
2
|
-
import { B as z } from "./avatar.
|
|
3
|
-
import { B as m, f as D } from "./dropdown.
|
|
2
|
+
import { B as z } from "./avatar.Bes5Qw12.js";
|
|
3
|
+
import { B as m, f as D } from "./dropdown.BoSI-Rre.js";
|
|
4
4
|
import { u as _ } from "./form-field.B60VsF8d.js";
|
|
5
|
-
import { B as j } from "./typography.
|
|
6
|
-
import { u as q } from "./use-country-items.
|
|
5
|
+
import { B as j } from "./typography.B6elnWpr.js";
|
|
6
|
+
import { u as q } from "./use-country-items.CAYJt6XS.js";
|
|
7
7
|
import { a as E } from "./country.types.BCOrkmVK.js";
|
|
8
|
-
import { L as I } from "./listbox-option-tag.
|
|
9
|
-
import { B as N } from "./payment-method.
|
|
8
|
+
import { L as I } from "./listbox-option-tag.71rmQvG8.js";
|
|
9
|
+
import { B as N } from "./payment-method.B69Mu88z.js";
|
|
10
10
|
import { _ as S } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
11
|
import "../assets/dropdown-tag.css";
|
|
12
12
|
const G = d({
|
|
@@ -61,7 +61,7 @@ const G = d({
|
|
|
61
61
|
/**
|
|
62
62
|
* The option elements to populate the country dropdown with.
|
|
63
63
|
* It must be an array of {@see BentoCountryListboxOptions }
|
|
64
|
-
* @deprecated Since
|
|
64
|
+
* @deprecated Since v3.0.0. Use `BentoDropdown` instead.
|
|
65
65
|
* @property {BentoCountryCode | string} value.value - Country code of the option
|
|
66
66
|
*/
|
|
67
67
|
items: {
|
|
@@ -275,4 +275,4 @@ export {
|
|
|
275
275
|
ue as c,
|
|
276
276
|
de as d
|
|
277
277
|
};
|
|
278
|
-
//# sourceMappingURL=dropdown-tag.
|
|
278
|
+
//# sourceMappingURL=dropdown-tag.BvXqllkv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.Bn5FPeEL.js","sources":["../../../vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * @deprecated Since v2.0.0. Use `BentoDropdown` instead.\n * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.NAME,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { value: BentoCountryCode.NL },\n * { value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"{ ...getNonAriaLabelAttributes($attrs), ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"{ ...getNonAriaLabelAttributes($attrs), ...$props, ariaLabel: undefined }\"\n class=\"b-dropdown-tag\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","emitValue","useFormFieldEmits","getAriaLabel","attributes","getNonAriaLabelAttributes","key","onUpdateModelValue","selectedValue","dropdownItems","computed","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","item","normalizedResults","useSearchBarFilter","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;;AA2GI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAAA,EACQ,OAAA,EAAA,MAAA,cAAA,OAAA,qBAAA;AAElB,CAAA;;;;;;;;;;;;;;;;;;AAtFA,UAAAC,IAAAC,GAoBAC,IAAAC,GAmBA,EAAA,WAAAC,EAAA,IAAAC,EAAAH,CAAA,GAEAI,IAAA,CAAAC,MAAA,OAAA,UAAA,eAAA,KAAAA,GAAA,YAAA,IAAAA,EAAA,YAAA,IAAAA,EAAA,aAAAP,EAAA,WAIAQ,IAAA,CAAAD,MAAA,OAAA,YAAA,OAAA,QAAAA,CAAA,EAAA,OAAA,CAAA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,YAAA,IAAAA,EAAA,aAAAP,EAAA,WAIAQ,IAAA,CAAAD,MAAA,OAAA,YAAA,OAAA,QAAAA,CAAA,EAAA,OAAA,CAAA,CAAAE,CAAA,MAAAA,MAAA,gBAAAA,MAAA,WAAA,CAAA,GAGAC,IAAA,CAAAC,MAAAP,EAAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mECkBAwB,IAAApC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAAA,EACQ,OAAA,EAAA,MAAA,cAAA,OAAA,qBAAA;AAElB,CAAA;;;;;;;;;;;;;;;;;;AApFA,UAAAC,IAAAC,GAoBAC,IAAAC,GAmBA,EAAA,WAAAC,EAAA,IAAAC,EAAAH,CAAA,GAEAI,IAAA,CAAAC,MAAA,OAAA,UAAA,eAAA,KAAAA,GAAA,YAAA,IAAAA,EAAA,YAAA,IAAAA,EAAA,aAAAP,EAAA,WAIAQ,IAAA,CAAAD,MAAA,OAAA,YAAA,OAAA,QAAAA,CAAA,EAAA,OAAA,CAAA,CAAAE,CAAA,MAAAA,MAAA,gBAAAA,MAAA,WAAA,CAAA,GAGAC,IAAA,CAAAC,MAAAP,EAAAO,CAAA,GAEAyB,IAAAvB,EAAA,MAAAb,EAAA,OAAA,IAAA,CAAA,EAAA,OAAAe,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-tag.BvXqllkv.js","sources":["../../../vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * @deprecated Since v3.0.0. Use `BentoDropdown` instead.\n * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.NAME,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { value: BentoCountryCode.NL },\n * { value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"{ ...getNonAriaLabelAttributes($attrs), ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n","<template>\n <div v-bind=\"getNonAriaLabelAttributes($attrs)\">\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"{ ...$props, ariaLabel: undefined }\"\n :aria-label=\"getAriaLabel($attrs)\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"{ ...getNonAriaLabelAttributes($attrs), ...$props, ariaLabel: undefined }\"\n class=\"b-dropdown-tag\"\n :aria-label=\"getAriaLabel($attrs)\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { isVue2 } from 'vue-demi';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * @deprecated Since v3.0.0. Use `aria-label` instead.\n * Defines a string value that labels an interactive element.\n */\n ...(isVue2 ? { ariaLabel: { type: String, default: null } } : {}),\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model.\n */\n (e: 'update:model-value', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n Object.prototype.hasOwnProperty.call(attributes, 'aria-label')\n ? attributes['aria-label']\n : (attributes.ariaLabel ?? props.ariaLabel);\n const getNonAriaLabelAttributes = (attributes: Record<string, unknown>) =>\n Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== 'aria-label' && key !== 'ariaLabel'));\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","props","__props","emit","__emit","emitValue","useFormFieldEmits","getAriaLabel","attributes","getNonAriaLabelAttributes","key","onUpdateModelValue","selectedValue","dropdownItems","computed","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","item","normalizedResults","useSearchBarFilter","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;;AA2GI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAAA,EACQ,OAAA,EAAA,MAAA,cAAA,OAAA,qBAAA;AAElB,CAAA;;;;;;;;;;;;;;;;;;AAtFA,UAAAC,IAAAC,GAoBAC,IAAAC,GAmBA,EAAA,WAAAC,EAAA,IAAAC,EAAAH,CAAA,GAEAI,IAAA,CAAAC,MAAA,OAAA,UAAA,eAAA,KAAAA,GAAA,YAAA,IAAAA,EAAA,YAAA,IAAAA,EAAA,aAAAP,EAAA,WAIAQ,IAAA,CAAAD,MAAA,OAAA,YAAA,OAAA,QAAAA,CAAA,EAAA,OAAA,CAAA,CAAAE,CAAA,MAAAA,MAAA,gBAAAA,MAAA,WAAA,CAAA,GAGAC,IAAA,CAAAC,MAAAP,EAAAO,CAAA,GAEAC,IAAAC,EAAA,MAAAb,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAc,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;IC4CAC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAAA,EACQ,OAAA,EAAA,MAAA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ElB,CAAA;;;;;;;;;;;;;;;;;;AApFA,UAAAC,IAAAC,GAoBAC,IAAAC,GAmBA,EAAA,WAAAC,EAAA,IAAAC,EAAAH,CAAA,GAEAI,IAAA,CAAAC,MAAA,OAAA,UAAA,eAAA,KAAAA,GAAA,YAAA,IAAAA,EAAA,YAAA,IAAAA,EAAA,aAAAP,EAAA,WAIAQ,IAAA,CAAAD,MAAA,OAAA,YAAA,OAAA,QAAAA,CAAA,EAAA,OAAA,CAAA,CAAAE,CAAA,MAAAA,MAAA,gBAAAA,MAAA,WAAA,CAAA,GAGAC,IAAA,CAAAC,MAAAP,EAAAO,CAAA,GAEAyB,IAAAvB,EAAA,MAAAb,EAAA,OAAA,IAAA,CAAA,EAAA,OAAAe,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as r, ref as A, onMounted as Wt, onUnmounted as qt, watch as he, defineComponent as Q, resolveComponent as H, openBlock as p, createElementBlock as I, createVNode as q, withCtx as R, createTextVNode as ne, toDisplayString as j, createElementVNode as Z, renderSlot as J, mergeProps as V, withKeys as Se, getCurrentInstance as at, createCommentVNode as Y, createBlock as F, withModifiers as Oe, normalizeProps as ve, guardReactiveProps as Ae, withDirectives as Le, vShow as ze, nextTick as be, toRef as de, resolveDirective as Lt, toHandlers as fe, Fragment as Ce, renderList as re, createSlots as Ee, normalizeClass as we, unref as v, useSlots as Ge, useAttrs as vt, toRefs as Yt, resolveDynamicComponent as It, inject as ft } from "vue";
|
|
2
|
-
import { B as Be } from "./typography.
|
|
2
|
+
import { B as Be } from "./typography.B6elnWpr.js";
|
|
3
3
|
import { g as De } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
-
import { u as Re } from "./index.
|
|
4
|
+
import { u as Re } from "./index.CGBfMQdv.js";
|
|
5
5
|
import { s as Fe } from "./events.BQOQSSb7.js";
|
|
6
6
|
import { u as Et } from "./use-has-slot.CyMiImRQ.js";
|
|
7
7
|
import { _ as jt } from "./cross-circle-fill.DJbpTaVE.js";
|
|
@@ -15,15 +15,15 @@ import { u as Xt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
|
15
15
|
import { B as Zt } from "./directive.D1-d-C2K.js";
|
|
16
16
|
import { B as le, a as je } from "./keyboard-navigation.DWmhelVv.js";
|
|
17
17
|
import { B as At } from "./loading-indicator.BPol9I84.js";
|
|
18
|
-
import { B as wt } from "./empty-state.
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { F as nl } from "./field-label.
|
|
18
|
+
import { B as wt } from "./empty-state.BuK12EGe.js";
|
|
19
|
+
import { B as tt, _ as Qt } from "./minus-small.DBR64xRS.js";
|
|
20
|
+
import { _ as el } from "./checkmark-small.DJcd8Sd7.js";
|
|
21
|
+
import { B as tl } from "./chip.D4OozULC.js";
|
|
22
|
+
import { b as lt, a as ll, h as al, e as ol } from "./button-actions.DvuGEQxM.js";
|
|
23
|
+
import { o as sl } from "./resize.Bqks3WUm.js";
|
|
24
|
+
import { F as nl } from "./field-label.vrUwhoOg.js";
|
|
25
25
|
import { P as ht } from "./popper-container.Rfj8UdMD.js";
|
|
26
|
-
import { E as il } from "./error-message.
|
|
26
|
+
import { E as il } from "./error-message.DJ5l0EUH.js";
|
|
27
27
|
import "../assets/dropdown.css";
|
|
28
28
|
const _t = (e, a, o, l) => {
|
|
29
29
|
const i = r(
|
|
@@ -81,7 +81,7 @@ function rl(e, { disabled: a, itemHeight: o, overscan: l = 5, prefixHeight: i })
|
|
|
81
81
|
h();
|
|
82
82
|
};
|
|
83
83
|
a || (Wt(() => {
|
|
84
|
-
s.value && (u.value = s.value.clientHeight, c =
|
|
84
|
+
s.value && (u.value = s.value.clientHeight, c = sl(s.value, ({ clientHeight: T }) => {
|
|
85
85
|
u.value = T, h();
|
|
86
86
|
}), h());
|
|
87
87
|
}), qt(() => {
|
|
@@ -680,7 +680,7 @@ const El = /* @__PURE__ */ ue(Ll, [["render", Il]]), Ol = { key: 0 }, Tl = {
|
|
|
680
680
|
class: we(["b-checkbox-input", o.value]),
|
|
681
681
|
role: "presentation"
|
|
682
682
|
}, [
|
|
683
|
-
i.indeterminate ? (p(), F(v(
|
|
683
|
+
i.indeterminate ? (p(), F(v(Qt), {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "b-checkbox-input__icon",
|
|
686
686
|
"svg-title": "",
|
|
@@ -691,7 +691,7 @@ const El = /* @__PURE__ */ ue(Ll, [["render", Il]]), Ol = { key: 0 }, Tl = {
|
|
|
691
691
|
"svg-title": "",
|
|
692
692
|
"aria-hidden": "true",
|
|
693
693
|
"data-testid": "decorative-checkbox-double-checkmark-icon"
|
|
694
|
-
})) : i.checked ? (p(), F(v(
|
|
694
|
+
})) : i.checked ? (p(), F(v(el), {
|
|
695
695
|
key: 2,
|
|
696
696
|
class: "b-checkbox-input__icon",
|
|
697
697
|
"svg-title": "",
|
|
@@ -739,7 +739,7 @@ const Dt = {
|
|
|
739
739
|
() => o.loading ? lt.LOADING : lt.START
|
|
740
740
|
), s = r(() => o.loading ? a("loading") : a("showMore"));
|
|
741
741
|
return (n, t) => l.value || n.loading ? (p(), I("div", _l, [
|
|
742
|
-
l.value ? (p(), F(v(
|
|
742
|
+
l.value ? (p(), F(v(ll), {
|
|
743
743
|
key: 0,
|
|
744
744
|
state: i.value,
|
|
745
745
|
tabindex: n.tabindex,
|
|
@@ -1490,7 +1490,7 @@ const Yl = /* @__PURE__ */ ue(Kl, [["render", ql], ["__scopeId", "data-v-dba55b0
|
|
|
1490
1490
|
(p(!0), I(Ce, null, re(Te.value, (E) => (p(), I("li", {
|
|
1491
1491
|
key: E.value
|
|
1492
1492
|
}, [
|
|
1493
|
-
q(v(
|
|
1493
|
+
q(v(tl), {
|
|
1494
1494
|
ref_for: !0,
|
|
1495
1495
|
ref_key: "selectedListboxItemsRef",
|
|
1496
1496
|
ref: b,
|
|
@@ -2108,7 +2108,7 @@ const gt = {
|
|
|
2108
2108
|
"b-dropdown-options-container--single": !s?.multiple
|
|
2109
2109
|
})), S = r(() => ({
|
|
2110
2110
|
"b-dropdown-options-container__listbox--single": !s?.multiple
|
|
2111
|
-
})), { actions: h, internalSelectedValue: N, listeners: w, onEscapeKey: $, onOutsideDropdownClick: T } = ia(n, t, c, i), M = r(() => s?.multiple ?
|
|
2111
|
+
})), { actions: h, internalSelectedValue: N, listeners: w, onEscapeKey: $, onOutsideDropdownClick: T } = ia(n, t, c, i), M = r(() => s?.multiple ? al : ht), _ = r(() => {
|
|
2112
2112
|
const L = {
|
|
2113
2113
|
"min-width": `${s?.targetElement?.clientWidth}px`,
|
|
2114
2114
|
"max-width": "min(500px, 95%)"
|
|
@@ -2942,7 +2942,7 @@ const Kt = {
|
|
|
2942
2942
|
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
2943
2943
|
}, Fa = { class: "b-dropdown__autocomplete-hidden-prefix" }, Va = Q({
|
|
2944
2944
|
i18n: { messages: Kt },
|
|
2945
|
-
name: "
|
|
2945
|
+
name: "bento-dropdown",
|
|
2946
2946
|
components: {
|
|
2947
2947
|
DropdownInputDefault: Oa,
|
|
2948
2948
|
DropdownInputSmall: Da
|
|
@@ -3176,7 +3176,7 @@ const Kt = {
|
|
|
3176
3176
|
], 16)), [
|
|
3177
3177
|
[v(je)]
|
|
3178
3178
|
]),
|
|
3179
|
-
d.value ? (p(), F(v(
|
|
3179
|
+
d.value ? (p(), F(v(ol), {
|
|
3180
3180
|
key: 1,
|
|
3181
3181
|
disabled: m.teleport?.disabled,
|
|
3182
3182
|
to: m.teleport?.to
|
|
@@ -3237,7 +3237,7 @@ const Kt = {
|
|
|
3237
3237
|
[v(Zt), g.value]
|
|
3238
3238
|
]);
|
|
3239
3239
|
}
|
|
3240
|
-
}), fo = /* @__PURE__ */ ue(za, [["__scopeId", "data-v-
|
|
3240
|
+
}), fo = /* @__PURE__ */ ue(za, [["__scopeId", "data-v-1ca3a8a7"]]);
|
|
3241
3241
|
export {
|
|
3242
3242
|
fo as B,
|
|
3243
3243
|
Oa as D,
|
|
@@ -3254,4 +3254,4 @@ export {
|
|
|
3254
3254
|
yt as j,
|
|
3255
3255
|
na as u
|
|
3256
3256
|
};
|
|
3257
|
-
//# sourceMappingURL=dropdown.
|
|
3257
|
+
//# sourceMappingURL=dropdown.BoSI-Rre.js.map
|