@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,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as y, openBlock as f, createBlock as S, unref as s, createSlots as V, withCtx as n, createElementVNode as h, createVNode as c, renderSlot as T, createTextVNode as x, toDisplayString as J, toRefs as Y, ref as o, computed as I, onMounted as z, onUnmounted as j, watch as H, provide as A, createElementBlock as D, withKeys as X, withModifiers as q, normalizeClass as Q, withDirectives as W, createCommentVNode as Z } from "vue";
|
|
2
|
-
import { B as b, d as ee } from "./typography.
|
|
3
|
-
import { F as te } from "./footer-actions.
|
|
4
|
-
import { D as se } from "./dialog-page.
|
|
2
|
+
import { B as b, d as ee } from "./typography.B6elnWpr.js";
|
|
3
|
+
import { F as te } from "./footer-actions.BJif4sIk.js";
|
|
4
|
+
import { D as se } from "./dialog-page.CHpFuDd9.js";
|
|
5
5
|
import { _ as N } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { B as ae } from "./button.
|
|
6
|
+
import { B as ae } from "./button.DAcwNdtP.js";
|
|
7
7
|
import { B as ie } from "./focus-trap.Co-S6goa.js";
|
|
8
8
|
import { _ as oe } from "./cross.Daa8LxjC.js";
|
|
9
|
-
import { S as ne } from "./button-actions.
|
|
9
|
+
import { S as ne } from "./button-actions.DvuGEQxM.js";
|
|
10
10
|
import { B as le } from "./directive.D1-d-C2K.js";
|
|
11
|
-
import { u as re } from "./index.
|
|
11
|
+
import { u as re } from "./index.CGBfMQdv.js";
|
|
12
12
|
import { g as ce } from "./generate-uid.DBWe4g6T.js";
|
|
13
13
|
import { B as ue, D as de, a as pe } from "./dialog-page.keys.Dym9e6k3.js";
|
|
14
14
|
import "../assets/sidepanel.css";
|
|
@@ -142,10 +142,10 @@ const O = {
|
|
|
142
142
|
key: 0,
|
|
143
143
|
class: "b-sidepanel__close-button"
|
|
144
144
|
}, he = {
|
|
145
|
-
i18n: { messages: O }
|
|
145
|
+
i18n: { messages: O },
|
|
146
|
+
name: "bento-sidepanel"
|
|
146
147
|
}, Ae = /* @__PURE__ */ y({
|
|
147
148
|
...he,
|
|
148
|
-
__name: "sidepanel",
|
|
149
149
|
props: {
|
|
150
150
|
/**
|
|
151
151
|
* The id of the current active page
|
|
@@ -160,7 +160,7 @@ const O = {
|
|
|
160
160
|
* If set to true, it allows the sidepanel to be closed.
|
|
161
161
|
* Shows close button when `true` and hides close button when `false`.
|
|
162
162
|
*
|
|
163
|
-
* _Note: This property will not set the visibility of the close button in
|
|
163
|
+
* _Note: This property will not set the visibility of the close button in v3.0.0_
|
|
164
164
|
*/
|
|
165
165
|
isDismissible: {
|
|
166
166
|
type: Boolean,
|
|
@@ -177,7 +177,7 @@ const O = {
|
|
|
177
177
|
* Controls the visibility of close button on the sidepanel.
|
|
178
178
|
* Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.
|
|
179
179
|
*
|
|
180
|
-
* _Note: This property will be set to `false` by default, independent of `isDismissible` in
|
|
180
|
+
* _Note: This property will be set to `false` by default, independent of `isDismissible` in v3.0.0_
|
|
181
181
|
*/
|
|
182
182
|
hideCloseButton: {
|
|
183
183
|
type: Boolean,
|
|
@@ -220,7 +220,7 @@ const O = {
|
|
|
220
220
|
}), A(pe, M), A(ne, B), !i.isDismissible && i.hideCloseButton === null && ee(
|
|
221
221
|
'BentoSidepanel "isDismissible" property’s behavior',
|
|
222
222
|
'BentoSidepanel "isDismissible" will no longer hide the close button. Use "hideCloseButton=true" instead.',
|
|
223
|
-
"
|
|
223
|
+
"3.0.0"
|
|
224
224
|
), (t, a) => (f(), D("dialog", {
|
|
225
225
|
ref_key: "sidepanel",
|
|
226
226
|
ref: l,
|
|
@@ -251,10 +251,10 @@ const O = {
|
|
|
251
251
|
])
|
|
252
252
|
], 34));
|
|
253
253
|
}
|
|
254
|
-
}), Fe = /* @__PURE__ */ N(Ae, [["__scopeId", "data-v-
|
|
254
|
+
}), Fe = /* @__PURE__ */ N(Ae, [["__scopeId", "data-v-3ed068a6"]]);
|
|
255
255
|
export {
|
|
256
256
|
m as B,
|
|
257
257
|
Le as a,
|
|
258
258
|
Fe as s
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=sidepanel.
|
|
260
|
+
//# sourceMappingURL=sidepanel.CYWPV9dE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel._30g8POM.js","sources":["../../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../../vue2/src/components/sidepanel/sidepanel.types.ts","../../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType } from 'vue';\n\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n const isMounted = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value && sidepanel.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value || !sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, sidepanel],\n ([newIsOpen, newSidepanelValue]) => {\n if (!isMounted.value || !newSidepanelValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newSidepanelValue.open) {\n newSidepanelValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newSidepanelValue.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","props","__props","emit","__emit","activePage","isOpen","toRefs","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","isMounted","conditionalClasses","computed","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","onMounted","onUnmounted","watch","newIsOpen","newSidepanelValue","updatePage","page","unregisterPage","pageIdToRemove","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;;4IA2IIA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IG,IAAAC,IAAA,kBAAAC,OACHA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;GCqQRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;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MACkC,CAAA,CAAAqB,GAAAC,CAAA,MAAA;AAE1B,QAAA,CAAAX,EAAA,SAAA,CAAAW,MAIAD,KACIZ,EAAA,QAAA,IACAa,EAAA,QACIA,EAAA,UAAA,GAEJnB,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAR,EAAA,KAAA,KACJ2B,EAAA,QAEAP,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,IAAA,OAAA,OAAA;AAAA,IACiC;AAIrC,UAAAQ,IAAA,CAAAC,MAAA/B,EAAAN,EAAA,oBAAAqC,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;AACI,MAAAxB,EAAA,QAAAA,EAAA,OAAA,OAAA,CAAAyB,MAAAA,MAAAD,CAAA;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIzB,EAAA,MAAA,KAAAyB,CAAA,GAEA,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAE,EAAAC,IAAA;AAAA,MAAqE,YAAAnC;AAAA,MACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAoB;AAAA,IACA,CAAA,GAEJM,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAAzB,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACI0C;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sidepanel.CYWPV9dE.js","sources":["../../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../../vue2/src/components/sidepanel/sidepanel.types.ts","../../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType } from 'vue';\n\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v3.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v3.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n const isMounted = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value && sidepanel.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value || !sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, sidepanel],\n ([newIsOpen, newSidepanelValue]) => {\n if (!isMounted.value || !newSidepanelValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newSidepanelValue.open) {\n newSidepanelValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newSidepanelValue.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '3.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-sidepanel',\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","props","__props","emit","__emit","activePage","isOpen","toRefs","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","isMounted","conditionalClasses","computed","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","onMounted","onUnmounted","watch","newIsOpen","newSidepanelValue","updatePage","page","unregisterPage","pageIdToRemove","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;;4IA2IIA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IG,IAAAC,IAAA,kBAAAC,OACHA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;GCqQRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzNA,UAAAC,IAAAC,GA0CAC,IAAAC,GAYA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAN,CAAA,GACA,EAAA,GAAAO,EAAA,IAAAC,GAAA,EAAA,UAAAT,EAAA,CAAA,GACAU,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,GAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,GAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GACAU,IAAAV,EAAA,EAAA,GAGAW,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAP,EAAA;AAAA,MACR,0BAAAI,EAAA;AAAA,IACa,EAAA,GAIhDI,IAAA,MAAA;AACI,MAAAR,EAAA,SAAAN,EAAA,UACIA,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAA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ACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAoB;AAAA,IACA,CAAA,GAEJM,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAAzB,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACI0C;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as r, openBlock as c, createElementBlock as i, createElementVNode as t, normalizeClass as l, createVNode as _, unref as p, withCtx as d, renderSlot as u } from "vue";
|
|
2
|
-
import { B as m } from "./typography.
|
|
2
|
+
import { B as m } from "./typography.B6elnWpr.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
4
|
import "../assets/status.css";
|
|
5
5
|
const f = {
|
|
@@ -39,4 +39,4 @@ const f = {
|
|
|
39
39
|
export {
|
|
40
40
|
w as B
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=status.
|
|
42
|
+
//# sourceMappingURL=status.BJ48Isyh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.
|
|
1
|
+
{"version":3,"file":"status.BJ48Isyh.js","sources":["../../../vue2/src/components/status/status.vue"],"sourcesContent":["<template>\n <div class=\"b-status\" role=\"status\">\n <div class=\"b-status__indicator-wrapper\">\n <span class=\"b-status__indicator\" :class=\"conditionalClass\" role=\"presentation\"></span>\n </div>\n <bento-typography class=\"b-status__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { type BentoStatusProps } from './status.types';\n\n const props = defineProps<BentoStatusProps>();\n\n const conditionalClass = computed(() => ({\n [`b-status__indicator--${props.variant}`]: true,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Status component is used to indicate a\n * passage of time or a particular step of a process.\n *\n * @example\n * import { BentoStatus } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStatus },\n * template: `\n * <bento-status variant=\"red\">\n * 1 week ago\n * </bento-status>\n * `\n * }\n */\n export default {\n name: 'bento-status',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./status.scss\" />\n"],"names":["__default__","props","__props","conditionalClass","computed"],"mappings":";;;;;;;iDAwCIA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;AA1BA,UAAAC,IAAAC,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAAyC,CAAA,wBAAAH,EAAA,OAAA,EAAA,GAAA;AAAA,IACM,EAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.types.Dx8MDhEH.js","sources":["../../../vue2/src/components/status/status.types.ts"],"sourcesContent":["/**\n * @deprecated Since
|
|
1
|
+
{"version":3,"file":"status.types.Dx8MDhEH.js","sources":["../../../vue2/src/components/status/status.types.ts"],"sourcesContent":["/**\n * @deprecated Since v3.0.0. Use string literal instead.\n */\nexport enum BentoStatusVariant {\n BLUE = 'blue',\n GREEN = 'green',\n GREY = 'grey',\n ORANGE = 'orange',\n RED = 'red',\n YELLOW = 'yellow',\n}\n\nexport interface BentoStatusProps {\n /**\n * Defines the type and color of the Status\n */\n variant: BentoStatusVariant | `${BentoStatusVariant}`;\n}\n"],"names":["BentoStatusVariant"],"mappings":"AAGO,IAAKA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,SAAS,UANDA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as o, computed as s, watch as T, provide as j, readonly as ne, openBlock as x, createElementBlock as h, withDirectives as G, mergeProps as se, toHandlers as ae, unref as r, renderSlot as w, createVNode as O, withCtx as N, createTextVNode as M, toDisplayString as J, useSlots as oe, inject as re, onMounted as le, onBeforeUnmount as ue, normalizeClass as pe, createBlock as U, Fragment as ie, createElementVNode as ce, vShow as ve } from "vue";
|
|
2
|
-
import { B as H } from "./typography.
|
|
2
|
+
import { B as H } from "./typography.B6elnWpr.js";
|
|
3
3
|
import { B, a as de } from "./keyboard-navigation.DWmhelVv.js";
|
|
4
|
-
import { u as me } from "./index.
|
|
4
|
+
import { u as me } from "./index.CGBfMQdv.js";
|
|
5
5
|
import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { B as be } from "./base-button.
|
|
6
|
+
import { B as be } from "./base-button.Dg_u0f2_.js";
|
|
7
7
|
import { _ as Se } from "./checkmark-small.DJcd8Sd7.js";
|
|
8
8
|
import { _ as fe } from "./dot.BPmlsJv1.js";
|
|
9
9
|
import "../assets/step.css";
|
|
@@ -53,7 +53,7 @@ const Q = {
|
|
|
53
53
|
"zh-CN": { step: "步骤 {currentIndex}/{totalSteps} {content}" }
|
|
54
54
|
}, Ie = { class: "b-stepper" }, ge = {
|
|
55
55
|
i18n: { messages: Q },
|
|
56
|
-
name: "stepper"
|
|
56
|
+
name: "bento-stepper"
|
|
57
57
|
}, ye = /* @__PURE__ */ Z({
|
|
58
58
|
...ge,
|
|
59
59
|
props: {
|
|
@@ -135,7 +135,7 @@ const Q = {
|
|
|
135
135
|
})
|
|
136
136
|
]));
|
|
137
137
|
}
|
|
138
|
-
}), Ve = /* @__PURE__ */ X(ye, [["__scopeId", "data-v-
|
|
138
|
+
}), Ve = /* @__PURE__ */ X(ye, [["__scopeId", "data-v-6d23c292"]]), Ee = {
|
|
139
139
|
ref: "substepList",
|
|
140
140
|
class: "b-step__substep-list"
|
|
141
141
|
}, Ne = {
|
|
@@ -266,4 +266,4 @@ export {
|
|
|
266
266
|
W as b,
|
|
267
267
|
$e as s
|
|
268
268
|
};
|
|
269
|
-
//# sourceMappingURL=step.
|
|
269
|
+
//# sourceMappingURL=step.CRVu8HPR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.CRVu8HPR.js","sources":["../../../vue2/src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../../vue2/src/components/stepper/composables/use-step-register/use-step-register.ts","../../../vue2/src/components/stepper/stepper.keys.ts","../../../vue2/src/components/stepper/stepper.types.ts","../../../vue2/src/components/stepper/stepper.vue","../../../vue2/src/components/stepper/components/step/step.vue"],"sourcesContent":["import { type Ref, type UnwrapRef } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<UnwrapRef<Array<HTMLButtonElement>>>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { Ref, UnwrapRef } from 'vue';\nimport type { BentoStepperStepExposeState } from '../../stepper.types';\n\n/**\n * Gets the position of a `bento-step` element within its `bento-stepper` parent.\n * @param stepState The `bento-step` state.\n * @returns The index of the element.\n */\nconst getStepPosition = (stepState: BentoStepperStepExposeState) => {\n // Button is wrapped by <li> element\n const listItemElement = (stepState.buttonElement as Ref<UnwrapRef<HTMLButtonElement>>).value.parentElement;\n const listElement = listItemElement.parentElement;\n return Array.from(listElement.children).indexOf(listItemElement);\n};\n\n/**\n * Provides methods to register/unregister `bento-step` elements to/from the `bento-stepper` step state.\n * These methods allow for tracking the child step elements, including their position in the DOM tree.\n * @param childrenSteps The `bento-stepper` (or `bento-step` if substeps) step state.\n */\nexport const useStepRegister = (childrenSteps: Ref<Array<BentoStepperStepExposeState>>) => {\n /**\n * Registers a step's HTML element in the stepper state.\n * Should be called by a `bento-step` when it is mounted.\n * @param stepState The `bento-step` state.\n */\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n const position = getStepPosition(stepState);\n childrenSteps.value.splice(position, 0, {\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as Array<BentoStepperStepExposeState>,\n });\n };\n\n /**\n * Unregisters a step's HTML element in the stepper state.\n * Should be called by a `bento-step` before it is unmounted.\n * @param stepState The `bento-step` state.\n */\n const removeStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.splice(\n childrenSteps.value.findIndex(step => step.buttonElement === stepState.buttonElement.value),\n 1\n );\n };\n\n return { registerStep, removeStep };\n};\n","export const STEPPER_STATE = Symbol('stepper state');\n","import type { ComputedRef, Ref, UnwrapRef } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<UnwrapRef<HTMLButtonElement>>;\n substeps: Array<BentoStepperStepExposeState> | Ref<Array<BentoStepperStepExposeState>>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: Array<HTMLElement>;\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n removeStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', {\n currentIndex: n(activeStepIndex + 1),\n totalSteps: n(stepsAmount),\n content: currentStepContent,\n })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, type DeepReadonly, type PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation, useStepRegister } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n type BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<Array<BentoStepperStepExposeState>>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n const { registerStep, removeStep } = useStepRegister(childrenSteps);\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n removeStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide<DeepReadonly<BentoStepperState>>(STEPPER_STATE, readonly(stepperState));\n\n const reset = () => {\n activeStepIndex.value = 0;\n latestActiveStep.value = 0;\n };\n\n defineExpose({\n reset,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'bento-stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","<template>\n <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"caption\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onBeforeUnmount, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { useStepRegister } from '../../composables';\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { type Booleanish } from '@/types/prop-types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<Array<BentoStepperStepExposeState>>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject<BentoStepperState>(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const { registerStep, removeStep } = useStepRegister(substeps);\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep,\n removeStep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n onBeforeUnmount(() => {\n stepper.value.removeStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","props","__props","emit","__emit","t","n","useI18n","ref","activeStepIndex","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","keyboardNavigationListeners","provide","readonly","__expose","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","onMounted","onBeforeUnmount","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;;AAUO,MAAAA,KAAA,CAAAC,MAAA;AAEH,WAAAC,EAAAC,GAAA;AACI,WAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;AACI,MAAAA,EAAA,eAAA;AAEA,YAAAC,IAAAJ,EAAA,MAAA,QAAA,SAAA,aAAA;AACA,MAAAI,IAAA,KAIAJ,EAAA,MAAAI,IAAAF,CAAA,GAAA,MAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAG,IAAAJ,EAAA,EAAA,GACAK,IAAAL,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAM,EAAA,UAAA,GAAAD;AAAA,IAC+C,CAAAC,EAAA,WAAA,GAAAD;AAAA,IACC,CAAAC,EAAA,QAAA,GAAAF;AAAA,IACH,CAAAE,EAAA,UAAA,GAAAF;AAAA,EACE;AAE1D,GC1BAG,KAAA,CAAAC,MAAA;AAEI,QAAAC,IAAAD,EAAA,cAAA,MAAA,eACAE,IAAAD,EAAA;AACA,S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as b, inject as p, computed as o, provide as $, openBlock as r, createElementBlock as B, renderSlot as S, ref as R, normalizeClass as _, createElementVNode as h, normalizeStyle as U, createVNode as f, unref as e, withCtx as y, createTextVNode as g, toDisplayString as A, createBlock as u, createCommentVNode as d, withDirectives as V } from "vue";
|
|
2
2
|
import { _ as v } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
-
import { B as j } from "./button.
|
|
4
|
-
import { B as F } from "./info-icon.
|
|
5
|
-
import { B as O } from "./typography.
|
|
6
|
-
import { C as w } from "./copy.
|
|
3
|
+
import { B as j } from "./button.DAcwNdtP.js";
|
|
4
|
+
import { B as F } from "./info-icon.D_zu5SYT.js";
|
|
5
|
+
import { B as O } from "./typography.B6elnWpr.js";
|
|
6
|
+
import { C as w } from "./copy.YBeE8V9S.js";
|
|
7
7
|
import { _ as z } from "./search.mr5Q3y2z.js";
|
|
8
|
-
import { u as H } from "./index.
|
|
9
|
-
import { b as J } from "./tooltip.
|
|
8
|
+
import { u as H } from "./index.CGBfMQdv.js";
|
|
9
|
+
import { b as J } from "./tooltip.0QqJo2sa.js";
|
|
10
10
|
import "../assets/structured-list-item.css";
|
|
11
|
-
const C = /* @__PURE__ */ Symbol("structured list condensed style injection key"), T = /* @__PURE__ */ Symbol("structured list labels width injection key"), x = ["25-75", "33-66", "42-58", "50-50", "75-25", "66-33", "58-42"], K = { class: "b-structured-list" }, Y = {
|
|
11
|
+
const C = /* @__PURE__ */ Symbol("structured list condensed style injection key"), T = /* @__PURE__ */ Symbol("structured list labels width injection key"), x = ["25-75", "33-66", "42-58", "50-50", "75-25", "66-33", "58-42"], K = { class: "b-structured-list" }, Y = {
|
|
12
|
+
name: "bento-structured-list"
|
|
13
|
+
}, G = /* @__PURE__ */ b({
|
|
12
14
|
...Y,
|
|
13
|
-
__name: "structured-list",
|
|
14
15
|
props: {
|
|
15
16
|
labelsWidth: { default: null },
|
|
16
17
|
layout: { default: "33-66" }
|
|
@@ -23,7 +24,7 @@ const C = /* @__PURE__ */ Symbol("structured list condensed style injection key"
|
|
|
23
24
|
S(c.$slots, "default", {}, void 0, !0)
|
|
24
25
|
]));
|
|
25
26
|
}
|
|
26
|
-
}), ct = /* @__PURE__ */ v(G, [["__scopeId", "data-v-
|
|
27
|
+
}), ct = /* @__PURE__ */ v(G, [["__scopeId", "data-v-aef116bc"]]), I = {
|
|
27
28
|
"de-DE": { search: "Suche" },
|
|
28
29
|
"en-GB": { search: "Search" },
|
|
29
30
|
"en-US": { search: "Search" },
|
|
@@ -110,4 +111,4 @@ export {
|
|
|
110
111
|
C as S,
|
|
111
112
|
lt as a
|
|
112
113
|
};
|
|
113
|
-
//# sourceMappingURL=structured-list-item.
|
|
114
|
+
//# sourceMappingURL=structured-list-item.C6SAUS9a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-list-item.C6SAUS9a.js","sources":["../../../vue2/src/components/structured-list/structured-list.keys.ts","../../../vue2/src/components/structured-list/structured-list.types.ts","../../../vue2/src/components/structured-list/structured-list.vue","../../../vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50' | '75-25' | '66-33' | '58-42';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50', '75-25', '66-33', '58-42'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Width of the labels container, in pixels. Overrides layout prop.\n */\n labelsWidth?: number;\n /**\n * The layout of the label value pair in percentage.\n * If labelsWidth is set, layout will be overriden by the static pixel value.\n *\n * If the value entered is not listed in the example\n * list below '33-66' will be applied\n * @example\n * '25-75'\n * '33-66'\n * '42-58'\n * '50-50'\n * '75-25'\n * '66-33'\n * '58-42'\n */\n layout?: BentoStructuredListLayoutOptions;\n }>(),\n {\n labelsWidth: null,\n layout: '33-66',\n }\n );\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n name: 'bento-structured-list',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" @click=\"emitCopy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, type Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps<{\n /**\n * Label to display for the value\n */\n label: string;\n /**\n * Text to display in info icon tooltip in the label to display for the value\n */\n labelInfo?: string;\n /**\n * Text to copy when the user clicks `Copy` icon\n */\n copy?: string;\n /**\n * Function to trigger when user clicks `Search` icon\n */\n search?: (event: Event) => void;\n /**\n * Text to display when the user hovers over `Search` icon\n */\n searchTooltip?: string;\n /**\n * Truncates the value of the item\n */\n truncate?: boolean;\n }>();\n\n const emit = defineEmits<{\n /**\n * Emits copy event and value when copy button is clicked\n */\n (e: 'copy', value: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const emitCopy = () => {\n emit('copy', props.copy);\n };\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","props","__props","isCondensed","inject","computedLayout","computed","computedLabelsWidth","provide","__default__","messages","emit","__emit","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","emitCopy","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAO,MAAAA,IAAA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
4
|
import { G as x } from "./grid-layout.CCWNscU_.js";
|
|
5
5
|
import { _ as E } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { B as D } from "./typography.
|
|
7
|
-
import { u as ee } from "./index.
|
|
8
|
-
import { B as te } from "./dashed-underline.
|
|
9
|
-
import { B as oe } from "./info-icon.
|
|
10
|
-
import { B as A } from "./tag.
|
|
11
|
-
import { C as ne } from "./copy.
|
|
6
|
+
import { B as D } from "./typography.B6elnWpr.js";
|
|
7
|
+
import { u as ee } from "./index.CGBfMQdv.js";
|
|
8
|
+
import { B as te } from "./dashed-underline.DAtZOaad.js";
|
|
9
|
+
import { B as oe } from "./info-icon.D_zu5SYT.js";
|
|
10
|
+
import { B as A } from "./tag.BYxa556o.js";
|
|
11
|
+
import { C as ne } from "./copy.YBeE8V9S.js";
|
|
12
12
|
import "../assets/summary-grid.css";
|
|
13
13
|
const ie = { class: "b-summary-grid" }, re = {}, le = /* @__PURE__ */ g({
|
|
14
14
|
...re,
|
|
@@ -486,4 +486,4 @@ export {
|
|
|
486
486
|
ge as e,
|
|
487
487
|
we as s
|
|
488
488
|
};
|
|
489
|
-
//# sourceMappingURL=summary-grid.types.
|
|
489
|
+
//# sourceMappingURL=summary-grid.types.FTWeUNFh.js.map
|
package/dist/chunks/{summary-grid.types.BR_EGvRg.js.map → summary-grid.types.FTWeUNFh.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-grid.types.BR_EGvRg.js","sources":["../../../vue2/src/components/summary-grid/summary-grid.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../../vue2/src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal/grid-layout';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = withDefaults(defineProps<BentoSummaryGridProps>(), {\n columnWidth: null,\n slashedZero: false,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline\n v-if=\"withUnderline\"\n :tooltip-text=\"underlineTooltipText\"\n :popover-size=\"underlinePopoverSize\"\n >\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" @click=\"$emit('copy-click', $event)\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n @mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n const props = withDefaults(defineProps<BentoSummaryGridItemProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n itemType: 'custom',\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <bento-typography\n v-if=\"secondaryLabel\"\n variant=\"caption\"\n class=\"b-summary-grid-item-amount__secondary-label\"\n >{{ secondaryLabel }}</bento-typography\n >\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemAmountProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryLabel: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemNumericProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ computedLabelPercentage }}\n <template v-if=\"secondaryMetric\" #secondary> {{ computedSecondaryMetricPercentage }} </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n import type { NumberFormatOptions } from 'vue-i18n';\n\n const { locale } = useI18n();\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n const props = withDefaults(defineProps<BentoSummaryGridItemPercentageProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const percentageArgs: NumberFormatOptions = {\n style: 'percent',\n maximumFractionDigits: 2,\n };\n\n const isNumeric = (value: string | number) => value != null && value !== '' && !isNaN(Number(value));\n const convertToPercentIfNumber = (value: string | number) => {\n if (value && isNumeric(value)) {\n return new Intl.NumberFormat(locale.value, percentageArgs).format(Number(value) / 100);\n }\n return value;\n };\n\n const computedLabelPercentage = computed(() => convertToPercentIfNumber(props.label));\n const computedSecondaryMetricPercentage = computed(() => convertToPercentIfNumber(props.secondaryMetric));\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {\n i18n: {},\n };\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemTextProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemCustomProps>(), {\n copy: undefined,\n infoIconTooltipText: null,\n fitContent: false,\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { type GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","props","__props","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","slotName","onMounted","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","locale","useI18n","percentageArgs","isNumeric","value","convertToPercentIfNumber","computedLabelPercentage","computedSecondaryMetricPercentage","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":";;;;;;;;;;;;wCAgGIA,KAAA,CAAA;;;;;;;;AAxDA,UAAAC,IAAAC,GAKAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;AAEA,QAAAI,IAAA;AACA,QAAAJ,GAAA;AACI,YAAAK,IAAA,OAAA,KAAAL,CAAA,GAAA,OAAA,CAAAM,MAAAA,EAAA,SAAA,OAAA,CAAA,GAAA,IAAA,CAAAA,MAAA,SAAAA,EAAA,MAAA,GAAA,IAAA,CAAA,GAAA,EAAA,CAAA;AAGA,MAAAF,IAAA,KAAA,IAAA,GAAAC,CAAA;AAAA,IAAmC;AAGvC,WAAAE,EAAA,MAAA;AACI,UAAAH,IAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA,GAQJI,EAAAC,GALA,OAEI,EAAA,wBAAA,EAGJ,GACAD,EAAAE,GAAAC,EAAAb,GAAA,aAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uKCkGAc,KAAA,CAAA;;;;;;;;;;;;;;;;;;;AA3EA,UAAAd,IAAAC,GAcA,EAAA,gBAAAc,GAAA,yBAAAC,GAAA,UAAAC,GAAA,MAAAC,EAAA,IAAAC,EAAAnB,CAAA,GACAoB,IAAAC,EAAAT,GAAAU,EAAA,EAAA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;;;;;AAvEA,UAAA,EAAA,QAAAC,EAAA,IAAAC,GAAA,GAcArC,IAAAC,GAcAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAoC,IAAA;AAAA,MAA4C,OAAA;AAAA,MACjC,uBAAA;AAAA,IACgB,GAG3BC,IAAA,CAAAC,MAAAA,KAAA,QAAAA,MAAA,MAAA,CAAA,MAAA,OAAAA,CAAA,CAAA,GACAC,IAAA,CAAAD,MACIA,KAAAD,EAAAC,CAAA,IACI,IAAA,KAAA,aAAAJ,EAAA,OAAAE,CAAA,EAAA,OAAA,OAAAE,CAAA,IAAA,GAAA,IAEJA,GAGJE,IAAAhB,EAAA,MAAAe,EAAAzC,EAAA,KAAA,CAAA,GACA2C,IAAAjB,EAAA,MAAAe,EAAAzC,EAAA,eAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICVA4C,KAAA,CAAA;;;;;;;;;;;;;;AAtBA,UAAA1C,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;ICgBA2C,KAAA,CAAA;;;;;;;;;;;;;AApBA,UAAA3C,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;ACxCG,IAAA4C,KAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,MAAA,CAAA,CAAA,GASLE,KAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,UAAA,WAHQA,IAAAD,MAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"summary-grid.types.FTWeUNFh.js","sources":["../../../vue2/src/components/summary-grid/summary-grid.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../../vue2/src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal/grid-layout';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = withDefaults(defineProps<BentoSummaryGridProps>(), {\n columnWidth: null,\n slashedZero: false,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline\n v-if=\"withUnderline\"\n :tooltip-text=\"underlineTooltipText\"\n :popover-size=\"underlinePopoverSize\"\n >\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" @click=\"$emit('copy-click', $event)\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n @mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n const props = withDefaults(defineProps<BentoSummaryGridItemProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n itemType: 'custom',\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <bento-typography\n v-if=\"secondaryLabel\"\n variant=\"caption\"\n class=\"b-summary-grid-item-amount__secondary-label\"\n >{{ secondaryLabel }}</bento-typography\n >\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemAmountProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryLabel: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemNumericProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ computedLabelPercentage }}\n <template v-if=\"secondaryMetric\" #secondary> {{ computedSecondaryMetricPercentage }} </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n import type { NumberFormatOptions } from 'vue-i18n';\n\n const { locale } = useI18n();\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n const props = withDefaults(defineProps<BentoSummaryGridItemPercentageProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const percentageArgs: NumberFormatOptions = {\n style: 'percent',\n maximumFractionDigits: 2,\n };\n\n const isNumeric = (value: string | number) => value != null && value !== '' && !isNaN(Number(value));\n const convertToPercentIfNumber = (value: string | number) => {\n if (value && isNumeric(value)) {\n return new Intl.NumberFormat(locale.value, percentageArgs).format(Number(value) / 100);\n }\n return value;\n };\n\n const computedLabelPercentage = computed(() => convertToPercentIfNumber(props.label));\n const computedSecondaryMetricPercentage = computed(() => convertToPercentIfNumber(props.secondaryMetric));\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {\n i18n: {},\n };\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemTextProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n @copy-click=\"$emit('copy-click', $event)\"\n @info-icon-mouseenter=\"$emit('info-icon-mouseenter', $event)\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineEmits<{\n /**\n * Emitted when the copy button is clicked.\n */\n (e: 'copy-click', event: MouseEvent): void;\n\n /**\n * Emitted when the mouse pointer enters the info icon component.\n */\n (e: 'info-icon-mouseenter', event: MouseEvent): void;\n }>();\n\n withDefaults(defineProps<BentoSummaryGridItemCustomProps>(), {\n copy: undefined,\n infoIconTooltipText: null,\n fitContent: false,\n underlinePopoverSize: 'fit-content',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { type GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated Since v3.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated Since v3.0.0. Use string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","props","__props","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","slotName","onMounted","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","locale","useI18n","percentageArgs","isNumeric","value","convertToPercentIfNumber","computedLabelPercentage","computedSecondaryMetricPercentage","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":";;;;;;;;;;;;wCAgGIA,KAAA,CAAA;;;;;;;;AAxDA,UAAAC,IAAAC,GAKAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;AAEA,QAAAI,IAAA;AACA,QAAAJ,GAAA;AACI,YAAAK,IAAA,OAAA,KAAAL,CAAA,GAAA,OAAA,CAAAM,MAAAA,EAAA,SAAA,OAAA,CAAA,GAAA,IAAA,CAAAA,MAAA,SAAAA,EAAA,MAAA,GAAA,IAAA,CAAA,GAAA,EAAA,CAAA;AAGA,MAAAF,IAAA,KAAA,IAAA,GAAAC,CAAA;AAAA,IAAmC;AAGvC,WAAAE,EAAA,MAAA;AACI,UAAAH,IAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA,GAQJI,EAAAC,GALA,OAEI,EAAA,wBAAA,EAGJ,GACAD,EAAAE,GAAAC,EAAAb,GAAA,aAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uKCkGAc,KAAA,CAAA;;;;;;;;;;;;;;;;;;;AA3EA,U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