@adyen/bento-vue2 1.35.1 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -4
- package/dist/@types/index.d.ts +132 -95
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.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.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/date.css +1 -0
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/empty-state.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/status.css +1 -1
- package/dist/assets/summary-grid-item-custom.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +4 -4
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{accordion-item.BDNSykyK.js → accordion-item.BjXzREaK.js} +6 -6
- package/dist/chunks/accordion-item.BjXzREaK.js.map +1 -0
- package/dist/chunks/{action-bar.CCVKS1xo.js → action-bar.CjdRoIjd.js} +6 -6
- package/dist/chunks/{action-bar.CCVKS1xo.js.map → action-bar.CjdRoIjd.js.map} +1 -1
- package/dist/chunks/{alert.CVsckdGC.js → alert.DHu9891u.js} +3 -3
- package/dist/chunks/{alert.CVsckdGC.js.map → alert.DHu9891u.js.map} +1 -1
- package/dist/chunks/{avatar.qcWk9clF.js → avatar.DXzyWKsI.js} +2 -2
- package/dist/chunks/{avatar.qcWk9clF.js.map → avatar.DXzyWKsI.js.map} +1 -1
- package/dist/chunks/{base-button.qWj0m9-v.js → base-button.4UYC3kp2.js} +2 -2
- package/dist/chunks/{base-button.qWj0m9-v.js.map → base-button.4UYC3kp2.js.map} +1 -1
- package/dist/chunks/{base-modal.BaHkDH5f.js → base-modal.D9nvAFwb.js} +18 -18
- package/dist/chunks/base-modal.D9nvAFwb.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.Bl82u6yP.js → button-actions-with-menu.BraBlJ_T.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.Bl82u6yP.js.map → button-actions-with-menu.BraBlJ_T.js.map} +1 -1
- package/dist/chunks/{button-actions.DN4eIQes.js → button-actions.22PlNl4O.js} +3 -3
- package/dist/chunks/{button-actions.DN4eIQes.js.map → button-actions.22PlNl4O.js.map} +1 -1
- package/dist/chunks/{button.79klAcOK.js → button.PIszagl6.js} +3 -3
- package/dist/chunks/{button.79klAcOK.js.map → button.PIszagl6.js.map} +1 -1
- package/dist/chunks/{calendar.BFrqPClW.js → calendar.DadXSN5E.js} +6 -6
- package/dist/chunks/calendar.DadXSN5E.js.map +1 -0
- package/dist/chunks/{card.lWLgpCWM.js → card.7EiG0W8f.js} +5 -5
- package/dist/chunks/card.7EiG0W8f.js.map +1 -0
- package/dist/chunks/{checkbox-group.C0cqbJWx.js → checkbox-group.BKDaJocG.js} +11 -11
- package/dist/chunks/checkbox-group.BKDaJocG.js.map +1 -0
- package/dist/chunks/{checkbox-input.BH7MGdMj.js → checkbox-input.DgfJgZaI.js} +5 -5
- package/dist/chunks/checkbox-input.DgfJgZaI.js.map +1 -0
- package/dist/chunks/{checkbox.B3u_hzUo.js → checkbox.DNsPAfq5.js} +18 -18
- package/dist/chunks/checkbox.DNsPAfq5.js.map +1 -0
- package/dist/chunks/{code-snippet.BgjvWTHP.js → code-snippet.BPKC0Bxs.js} +7 -7
- package/dist/chunks/{code-snippet.BgjvWTHP.js.map → code-snippet.BPKC0Bxs.js.map} +1 -1
- package/dist/chunks/{controls-group.DLBxlPfl.js → controls-group.Dx66LdfN.js} +3 -3
- package/dist/chunks/{controls-group.DLBxlPfl.js.map → controls-group.Dx66LdfN.js.map} +1 -1
- package/dist/chunks/{copy.CmxcGt77.js → copy.fvajyLGQ.js} +3 -3
- package/dist/chunks/{copy.CmxcGt77.js.map → copy.fvajyLGQ.js.map} +1 -1
- package/dist/chunks/{country.DWQ85WGG.js → country.CM5oZOyZ.js} +2 -2
- package/dist/chunks/{country.DWQ85WGG.js.map → country.CM5oZOyZ.js.map} +1 -1
- package/dist/chunks/{currency.CbZqZrBz.js → currency.CEqsVP2T.js} +2 -2
- package/dist/chunks/{currency.CbZqZrBz.js.map → currency.CEqsVP2T.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BfXtTf6l.js → dashboard-section.CilMYHUI.js} +3 -3
- package/dist/chunks/{dashboard-section.BfXtTf6l.js.map → dashboard-section.CilMYHUI.js.map} +1 -1
- package/dist/chunks/{dashed-underline.xq5j9fGG.js → dashed-underline.3xCL30uf.js} +4 -4
- package/dist/chunks/{dashed-underline.xq5j9fGG.js.map → dashed-underline.3xCL30uf.js.map} +1 -1
- package/dist/chunks/{data-grid-template.C8AR5CxA.js → data-grid-template.DV7r3myJ.js} +3 -3
- package/dist/chunks/{data-grid-template.C8AR5CxA.js.map → data-grid-template.DV7r3myJ.js.map} +1 -1
- package/dist/chunks/{data-grid.BCTcokYm.js → data-grid.CAs5qLq1.js} +376 -374
- package/dist/chunks/data-grid.CAs5qLq1.js.map +1 -0
- package/dist/chunks/{date-picker.CPG0zksD.js → date-picker.Ce5xoP6x.js} +9 -9
- package/dist/chunks/date-picker.Ce5xoP6x.js.map +1 -0
- package/dist/chunks/{date-range-picker.Bt439x32.js → date-range-picker.WFZu39Kj.js} +12 -12
- package/dist/chunks/{date-range-picker.Bt439x32.js.map → date-range-picker.WFZu39Kj.js.map} +1 -1
- package/dist/chunks/{date.C0uwNQjg.js → date.BQ29-2L1.js} +24 -23
- package/dist/chunks/{date.C0uwNQjg.js.map → date.BQ29-2L1.js.map} +1 -1
- package/dist/chunks/{dialog-page.bmDDYmn9.js → dialog-page.Qi9Zc34k.js} +2 -2
- package/dist/chunks/{dialog-page.bmDDYmn9.js.map → dialog-page.Qi9Zc34k.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.kQ3pHsZe.js → dropdown-default-textbox.DPZmj7xJ.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.DPZmj7xJ.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Cd4LGtwl.js → dropdown-tag.Df5CcYQ0.js} +6 -6
- package/dist/chunks/{dropdown-tag.Cd4LGtwl.js.map → dropdown-tag.Df5CcYQ0.js.map} +1 -1
- package/dist/chunks/{dropdown.B4KMM58m.js → dropdown.DpiHAE1l.js} +9 -9
- package/dist/chunks/dropdown.DpiHAE1l.js.map +1 -0
- package/dist/chunks/{empty-state.C2ba_wDp.js → empty-state.c6UY_tmZ.js} +3 -3
- package/dist/chunks/{empty-state.C2ba_wDp.js.map → empty-state.c6UY_tmZ.js.map} +1 -1
- package/dist/chunks/{error-message.GCYDEzGL.js → error-message.Btn_7Igx.js} +3 -3
- package/dist/chunks/{error-message.GCYDEzGL.js.map → error-message.Btn_7Igx.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.Co2YeUUg.js → filter-bar.BSWkjktr.js} +27 -27
- package/dist/chunks/filter-bar.BSWkjktr.js.map +1 -0
- package/dist/chunks/{fixed-scroller.CQWDnydO.js → fixed-scroller.Bv65QAGg.js} +2 -2
- package/dist/chunks/{fixed-scroller.CQWDnydO.js.map → fixed-scroller.Bv65QAGg.js.map} +1 -1
- package/dist/chunks/{footer-actions.CxxS87iQ.js → footer-actions.BL59SNj4.js} +4 -4
- package/dist/chunks/{footer-actions.CxxS87iQ.js.map → footer-actions.BL59SNj4.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DomnJXLE.js → form-layout-title.CTnkin8u.js} +3 -3
- package/dist/chunks/{form-layout-title.DomnJXLE.js.map → form-layout-title.CTnkin8u.js.map} +1 -1
- package/dist/chunks/generate-uid.D-HFI38h.js +32 -0
- package/dist/chunks/generate-uid.D-HFI38h.js.map +1 -0
- package/dist/chunks/{header.zacQVbjn.js → header.DGuyhMle.js} +7 -7
- package/dist/chunks/{header.zacQVbjn.js.map → header.DGuyhMle.js.map} +1 -1
- package/dist/chunks/{info-icon.DNn4oZsB.js → info-icon.BxWBisWG.js} +6 -6
- package/dist/chunks/info-icon.BxWBisWG.js.map +1 -0
- package/dist/chunks/{input-field.DBrzeKBj.js → input-field.CT0_xKvJ.js} +6 -6
- package/dist/chunks/input-field.CT0_xKvJ.js.map +1 -0
- package/dist/chunks/{inspector.types.lu_MoQn5.js → inspector.types.D1HKmbsJ.js} +5 -5
- package/dist/chunks/inspector.types.D1HKmbsJ.js.map +1 -0
- package/dist/chunks/{link.Xce4kDGy.js → link.n62xz4hO.js} +2 -2
- package/dist/chunks/{link.Xce4kDGy.js.map → link.n62xz4hO.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.RVvWMKvz.js → listbox-option-tag.CuHL51H9.js} +3 -3
- package/dist/chunks/{listbox-option-tag.RVvWMKvz.js.map → listbox-option-tag.CuHL51H9.js.map} +1 -1
- package/dist/chunks/{loading-button.DoX2sopf.js → loading-button.CgiFM_c7.js} +2 -2
- package/dist/chunks/{loading-button.DoX2sopf.js.map → loading-button.CgiFM_c7.js.map} +1 -1
- package/dist/chunks/{menu.DHakGFS4.js → menu.DEgYSQA2.js} +7 -7
- package/dist/chunks/{menu.DHakGFS4.js.map → menu.DEgYSQA2.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.mIlp0LnL.js → modal-fullscreen.DsJnp4i6.js} +7 -7
- package/dist/chunks/modal-fullscreen.DsJnp4i6.js.map +1 -0
- package/dist/chunks/{modal.CtTQWN8H.js → modal.B1WqZZpr.js} +6 -6
- package/dist/chunks/{modal.CtTQWN8H.js.map → modal.B1WqZZpr.js.map} +1 -1
- package/dist/chunks/{pagination.By-p9MjL.js → pagination.8BZz-h13.js} +18 -18
- package/dist/chunks/pagination.8BZz-h13.js.map +1 -0
- package/dist/chunks/{payment-method.CyQwoqEe.js → payment-method.CoXB0ZAW.js} +2 -2
- package/dist/chunks/{payment-method.CyQwoqEe.js.map → payment-method.CoXB0ZAW.js.map} +1 -1
- package/dist/chunks/{popover.BDaf6hmW.js → popover.hzeFBXzL.js} +4 -4
- package/dist/chunks/{popover.BDaf6hmW.js.map → popover.hzeFBXzL.js.map} +1 -1
- package/dist/chunks/{radio-group.OaYz1wJf.js → radio-group.CZaVmmUe.js} +8 -8
- package/dist/chunks/radio-group.CZaVmmUe.js.map +1 -0
- package/dist/chunks/{search-bar.eC-crOww.js → search-bar.osJS8Cs-.js} +31 -31
- package/dist/chunks/search-bar.osJS8Cs-.js.map +1 -0
- package/dist/chunks/{secondary-nav.1xw-o8OR.js → secondary-nav.o_1YCWAx.js} +3 -3
- package/dist/chunks/{secondary-nav.1xw-o8OR.js.map → secondary-nav.o_1YCWAx.js.map} +1 -1
- package/dist/chunks/{segmented-control.BZm0u0wJ.js → segmented-control.uVH5ahVY.js} +13 -13
- package/dist/chunks/segmented-control.uVH5ahVY.js.map +1 -0
- package/dist/chunks/{selection-card-group.BLPaJy5U.js → selection-card-group.BRFV5iQl.js} +13 -13
- package/dist/chunks/selection-card-group.BRFV5iQl.js.map +1 -0
- package/dist/chunks/{sidepanel.ZYT_vzbj.js → sidepanel.GSooM2yT.js} +7 -7
- package/dist/chunks/sidepanel.GSooM2yT.js.map +1 -0
- package/dist/chunks/{status.types.dPBUkNia.js → status.types.UkYKuQHH.js} +2 -2
- package/dist/chunks/{status.types.dPBUkNia.js.map → status.types.UkYKuQHH.js.map} +1 -1
- package/dist/chunks/{step.CjJtlBk6.js → step.D3-7YL7-.js} +3 -3
- package/dist/chunks/{step.CjJtlBk6.js.map → step.D3-7YL7-.js.map} +1 -1
- package/dist/chunks/{structured-list-item.D7D8VpQY.js → structured-list-item.JDICCHjN.js} +6 -6
- package/dist/chunks/{structured-list-item.D7D8VpQY.js.map → structured-list-item.JDICCHjN.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.v0QSLZKT.js → summary-grid-item-custom.C-8hXJcP.js} +5 -5
- package/dist/chunks/{summary-grid-item-custom.v0QSLZKT.js.map → summary-grid-item-custom.C-8hXJcP.js.map} +1 -1
- package/dist/chunks/tabs.BiTr_PdY.js +154 -0
- package/dist/chunks/tabs.BiTr_PdY.js.map +1 -0
- package/dist/chunks/tag.DSFSfnAf.js +44 -0
- package/dist/chunks/tag.DSFSfnAf.js.map +1 -0
- package/dist/chunks/{textarea.C0IMS5XS.js → textarea.CrYT_JJ-.js} +6 -6
- package/dist/chunks/textarea.CrYT_JJ-.js.map +1 -0
- package/dist/chunks/{timeline-item.Dmd78uwQ.js → timeline-item.BS_P9oEW.js} +11 -11
- package/dist/chunks/{timeline-item.Dmd78uwQ.js.map → timeline-item.BS_P9oEW.js.map} +1 -1
- package/dist/chunks/{toast.3LxCDPiT.js → toast.C7L41pAm.js} +4 -4
- package/dist/chunks/{toast.3LxCDPiT.js.map → toast.C7L41pAm.js.map} +1 -1
- package/dist/chunks/{toggle-button.bt3zBzdC.js → toggle-button.D5Ann2NH.js} +2 -2
- package/dist/chunks/{toggle-button.bt3zBzdC.js.map → toggle-button.D5Ann2NH.js.map} +1 -1
- package/dist/chunks/{toggle.CLgGH4Jr.js → toggle.INRYdQzz.js} +4 -4
- package/dist/chunks/toggle.INRYdQzz.js.map +1 -0
- package/dist/chunks/{tooltip.BN6fOXzi.js → tooltip.CS2Gij6x.js} +18 -17
- package/dist/chunks/tooltip.CS2Gij6x.js.map +1 -0
- package/dist/chunks/{tutorial.D64_0i0-.js → tutorial.D_38Tuq-.js} +5 -5
- package/dist/chunks/{tutorial.D64_0i0-.js.map → tutorial.D_38Tuq-.js.map} +1 -1
- package/dist/chunks/typography.Bu_WAKdf.js +86 -0
- package/dist/chunks/typography.Bu_WAKdf.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.DLKySNHd.js → use-bento-toast-controller.BVVMh0wc.js} +3 -3
- package/dist/chunks/use-bento-toast-controller.BVVMh0wc.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.BOAumEi7.js → use-cached-selected-values.DxHmVtct.js} +6 -6
- package/dist/chunks/{use-cached-selected-values.BOAumEi7.js.map → use-cached-selected-values.DxHmVtct.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.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +316 -299
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +21 -19
- package/dist/internal.js.map +1 -1
- package/dist/link.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.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 +1810 -0
- package/dist/styles/bento-light.css +1809 -0
- package/dist/styles/bento.css +69 -7
- package/dist/styles/legacy.css +67 -5
- package/dist/styles/styleguide.css +69 -7
- package/dist/summary-grid.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 +61 -40
- package/package.json +3 -3
- package/dist/chunks/accordion-item.BDNSykyK.js.map +0 -1
- package/dist/chunks/base-modal.BaHkDH5f.js.map +0 -1
- package/dist/chunks/calendar.BFrqPClW.js.map +0 -1
- package/dist/chunks/card.lWLgpCWM.js.map +0 -1
- package/dist/chunks/checkbox-group.C0cqbJWx.js.map +0 -1
- package/dist/chunks/checkbox-input.BH7MGdMj.js.map +0 -1
- package/dist/chunks/checkbox.B3u_hzUo.js.map +0 -1
- package/dist/chunks/data-grid.BCTcokYm.js.map +0 -1
- package/dist/chunks/date-picker.CPG0zksD.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.kQ3pHsZe.js.map +0 -1
- package/dist/chunks/dropdown.B4KMM58m.js.map +0 -1
- package/dist/chunks/filter-bar.Co2YeUUg.js.map +0 -1
- package/dist/chunks/info-icon.DNn4oZsB.js.map +0 -1
- package/dist/chunks/input-field.DBrzeKBj.js.map +0 -1
- package/dist/chunks/inspector.types.lu_MoQn5.js.map +0 -1
- package/dist/chunks/modal-fullscreen.mIlp0LnL.js.map +0 -1
- package/dist/chunks/pagination.By-p9MjL.js.map +0 -1
- package/dist/chunks/radio-group.OaYz1wJf.js.map +0 -1
- package/dist/chunks/search-bar.eC-crOww.js.map +0 -1
- package/dist/chunks/segmented-control.BZm0u0wJ.js.map +0 -1
- package/dist/chunks/selection-card-group.BLPaJy5U.js.map +0 -1
- package/dist/chunks/sidepanel.ZYT_vzbj.js.map +0 -1
- package/dist/chunks/tabs.D4ORafqH.js +0 -140
- package/dist/chunks/tabs.D4ORafqH.js.map +0 -1
- package/dist/chunks/tag.Bo_6RnVE.js +0 -64
- package/dist/chunks/tag.Bo_6RnVE.js.map +0 -1
- package/dist/chunks/textarea.C0IMS5XS.js.map +0 -1
- package/dist/chunks/toggle.CLgGH4Jr.js.map +0 -1
- package/dist/chunks/tooltip.BN6fOXzi.js.map +0 -1
- package/dist/chunks/typography.CqQaHXhq.js +0 -76
- package/dist/chunks/typography.CqQaHXhq.js.map +0 -1
- package/dist/chunks/unique-id.XFfoKuc2.js +0 -28
- package/dist/chunks/unique-id.XFfoKuc2.js.map +0 -1
- package/dist/chunks/use-bento-toast-controller.DLKySNHd.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as a, computed as o } from "vue";
|
|
2
|
-
import { B as n } from "./typography.
|
|
2
|
+
import { B as n } from "./typography.Bu_WAKdf.js";
|
|
3
3
|
import { n as _ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
4
4
|
import "../assets/status.css";
|
|
5
5
|
const l = {
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
u as B,
|
|
34
34
|
b as s
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=status.types.
|
|
36
|
+
//# sourceMappingURL=status.types.UkYKuQHH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.types.
|
|
1
|
+
{"version":3,"file":"status.types.UkYKuQHH.js","sources":["../../src/components/status/status.vue","../../src/components/status/status.types.ts"],"sourcesContent":["<template>\n <div class=\"b-status\" role=\"status\">\n <span class=\"b-status__indicator\" :class=\"conditionalClass\" role=\"presentation\"></span>\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 { BentoStatusVariant } from './status.types';\n\n const props = defineProps({\n variant: null\n});\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","/**\n * @deprecated for usage with properties since version 2.0. Use the 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"],"names":["__default__","conditionalClass","computed","props","BentoStatusVariant","BentoStatusVariant2"],"mappings":";;;;AAwCI,MAAAA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;iBAxBAC,IAAAC,EAAA,OAAA;AAAA,MAAyC,CAAA,wBAAAC,EAAA,OAAA,EAAA,GAAA;AAAA,IACM,EAAA;;;;;;;;;;;;;;;;AChBvC,IAAAC,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UANQA,IAAAD,KAAA,CAAA,CAAA;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as w, ref as p, computed as o, watch as A, provide as L, readonly as z, useSlots as Z, inject as U, onMounted as M, onBeforeUnmount as j } from "vue";
|
|
2
|
-
import { B as D } from "./typography.
|
|
2
|
+
import { B as D } from "./typography.Bu_WAKdf.js";
|
|
3
3
|
import { u as G } from "./i18n.BQkEbtPM.js";
|
|
4
4
|
import { B as E, a as q } from "./keyboard-navigation.Clz1jOaA.js";
|
|
5
5
|
import { n as O } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
-
import { B as J } from "./base-button.
|
|
6
|
+
import { B as J } from "./base-button.4UYC3kp2.js";
|
|
7
7
|
import { C as Q } from "./checkmark-small.BtF8b2gE.js";
|
|
8
8
|
import "../assets/step.css";
|
|
9
9
|
const X = (a) => {
|
|
@@ -231,4 +231,4 @@ export {
|
|
|
231
231
|
$ as b,
|
|
232
232
|
Ie as s
|
|
233
233
|
};
|
|
234
|
-
//# sourceMappingURL=step.
|
|
234
|
+
//# sourceMappingURL=step.D3-7YL7-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.CjJtlBk6.js","sources":["../../src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../src/components/stepper/composables/use-step-register/use-step-register.ts","../../src/components/stepper/stepper.keys.ts","../../src/components/stepper/stepper.types.ts","../../src/components/stepper/stepper.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/dot.vue","../../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref, UnwrapRef } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\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<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<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 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: BentoStepperStepExposeState[] | Ref<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: 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', { currentIndex: activeStepIndex + 1, totalSteps: stepsAmount, content: currentStepContent })\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, 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 BentoStepperState,\n BentoStepperStepExposeState,\n 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([\"update:index\"]);\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<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</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: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\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=\"body\" 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 BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { Booleanish } from '@/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([\"update:substep-index\"]);\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<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","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","uuid","_sfc_main$1","__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":";;;;;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AAET,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,MAIAC,IAAAL,EAAA,MAAAI,IAAAF,CAAA,MAAA,QAAAG,EAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAC,IAAAL,EAAA,EAAA,GACAM,IAAAN,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAO,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,IAAA,CAAAC,MAAA;AAEI,QAAAC,IAAAD,EAAA,cAAA,MAAA,eACAE,IAAAD,EAAA;AACA,SAAA,MAAA,KAAAC,EAAA,QAAA,EAAA,QAAAD,CAAA;AACJ,GAOaE,IAAA,CAAAC,OA2BT,EAAA,cArBA,CAAAJ,MAAA;AACI,QAAAK,IAAAN,EAAAC,CAAA;AACA,EAAAI,EAAA,MAAA,OAAAC,GAAA,GAAA;AAAA,IAAwC,aAA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AA;AAIL,UAAA6B,IAAAnC,EAAA,MAAAwB,EAAA,MAAA,YAAA,GACAY,IAAA3C,EAAA,EAAA,GACA4C,IAAArC,EAAA,OAAAwB,KAAA,gBAAAA,EAAA,MAAA,qBAAA1B,EAAA,KAAA,GACAwC,IAAAtC;AAAA,MAA0B,MAAAqC,EAAA,SAAAb,EAAA,MAAA,YAAArC,EAAA,cAAA,CAAAgD,EAAA,SAAAf,EAAA;AAAA,IAKZ,GAEdmB,IAAAvC,EAAA,OACIwB,KAAA,gBAAAA,EAAA,MAAA,UAAAvC,EAAA,aACIU,EAAA,aAGJ6B,KAAA,gBAAAA,EAAA,MAAA,oBAAA1B,EAAA,KAA+C,GAEnD0C,IAAAxC;AAAA,MAAmB,OAAAwB,KAAA,gBAAAA,EAAA,MAAA,UAAAvC,EAAA,UAAAa,EAAA,SAAA0B,KAAA,gBAAAA,EAAA,MAAA;AAAA,IAC6E,GAGhG3B,IAAA,MAAA;AACI,MAAA2C,EAAA,SAIAhB,EAAA,MAAA,eAAA1B,EAAA,KAAA;AAAA,IAAwC,GAI5C2C,IAAAzC,EAAA,MAAAqC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAA1C,EAAA,MAAAwC,EAAA,MAAA,SAAA,CAAA,GACAG,IAAA3C,EAAA,MAAAoC,EAAA,SAAAtC,EAAA,UAAA,KAAA,CAAAqC,EAAA,QAAA,MAAA,IAAA,GAEAxB,IAAAX,EAAA,OAAA;AAAA,MAA2C,kBAAAqC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[5]}
|
|
1
|
+
{"version":3,"file":"step.D3-7YL7-.js","sources":["../../src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../src/components/stepper/composables/use-step-register/use-step-register.ts","../../src/components/stepper/stepper.keys.ts","../../src/components/stepper/stepper.types.ts","../../src/components/stepper/stepper.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/dot.vue","../../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref, UnwrapRef } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\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<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<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 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: BentoStepperStepExposeState[] | Ref<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: 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', { currentIndex: activeStepIndex + 1, totalSteps: stepsAmount, content: currentStepContent })\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, 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 BentoStepperState,\n BentoStepperStepExposeState,\n 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([\"update:index\"]);\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<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</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: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\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=\"body\" 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 BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { Booleanish } from '@/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([\"update:substep-index\"]);\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<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","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","uuid","_sfc_main$1","__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":";;;;;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AAET,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,MAIAC,IAAAL,EAAA,MAAAI,IAAAF,CAAA,MAAA,QAAAG,EAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAC,IAAAL,EAAA,EAAA,GACAM,IAAAN,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAO,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,IAAA,CAAAC,MAAA;AAEI,QAAAC,IAAAD,EAAA,cAAA,MAAA,eACAE,IAAAD,EAAA;AACA,SAAA,MAAA,KAAAC,EAAA,QAAA,EAAA,QAAAD,CAAA;A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defineComponent as c, inject as n, computed as r, provide as y, ref as b } from "vue";
|
|
2
2
|
import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
3
|
-
import { B as v } from "./button.
|
|
4
|
-
import { B as h } from "./info-icon.
|
|
5
|
-
import { B as C } from "./typography.
|
|
6
|
-
import { C as B } from "./copy.
|
|
3
|
+
import { B as v } from "./button.PIszagl6.js";
|
|
4
|
+
import { B as h } from "./info-icon.BxWBisWG.js";
|
|
5
|
+
import { B as C } from "./typography.Bu_WAKdf.js";
|
|
6
|
+
import { C as B } from "./copy.fvajyLGQ.js";
|
|
7
7
|
import { S as T } from "./search.CBKhp7zB.js";
|
|
8
8
|
import { u as S } from "./i18n.BQkEbtPM.js";
|
|
9
|
-
import { B as I } from "./tooltip.
|
|
9
|
+
import { B as I } from "./tooltip.CS2Gij6x.js";
|
|
10
10
|
import "../assets/structured-list-item.css";
|
|
11
11
|
const u = Symbol("structured list condensed style injection key"), _ = Symbol("structured list labels width injection key"), L = ["25-75", "33-66", "42-58", "50-50"], x = {}, E = /* @__PURE__ */ c({
|
|
12
12
|
...x,
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
u as S,
|
|
85
85
|
z as a
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=structured-list-item.
|
|
87
|
+
//# sourceMappingURL=structured-list-item.JDICCHjN.js.map
|
package/dist/chunks/{structured-list-item.D7D8VpQY.js.map → structured-list-item.JDICCHjN.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-list-item.
|
|
1
|
+
{"version":3,"file":"structured-list-item.JDICCHjN.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../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';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50'];\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 = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\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\">\n * 123456\n * </bento-currency>\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\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\" />\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, 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 label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\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 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\">\n * 123456\n * </bento-currency>\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","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAa,MAAAA,IAAA,OAAA,+CAAA,GACAC,IAAA,OAAA,4CAAA,GCANC,IAAA,CAAA,SAAA,SAAA,SAAA,OAAA,GC+DHC,IAAA,CAAA;;;;;;;;iBA7CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GCiEAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;iBAtDAC,IAAA,OAWA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAAd,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
|
package/dist/chunks/{summary-grid-item-custom.v0QSLZKT.js → summary-grid-item-custom.C-8hXJcP.js}
RENAMED
|
@@ -3,10 +3,10 @@ import { u as v } from "./use-has-slot.C9lQZ6nz.js";
|
|
|
3
3
|
import { S as h } from "./summary-grid.keys.BBbFrFGF.js";
|
|
4
4
|
import { G as E } from "./grid-layout.HvTAa4to.js";
|
|
5
5
|
import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
-
import { B as O } from "./info-icon.
|
|
7
|
-
import { B as L, a as g } from "./typography.
|
|
8
|
-
import { B as M, a as _ } from "./tag.
|
|
9
|
-
import { C as P } from "./copy.
|
|
6
|
+
import { B as O } from "./info-icon.BxWBisWG.js";
|
|
7
|
+
import { B as L, a as g } from "./typography.Bu_WAKdf.js";
|
|
8
|
+
import { B as M, a as _ } from "./tag.DSFSfnAf.js";
|
|
9
|
+
import { C as P } from "./copy.fvajyLGQ.js";
|
|
10
10
|
import "../assets/summary-grid-item-custom.css";
|
|
11
11
|
const R = l({
|
|
12
12
|
name: "bento-summary-grid",
|
|
@@ -570,4 +570,4 @@ export {
|
|
|
570
570
|
o as f,
|
|
571
571
|
ft as s
|
|
572
572
|
};
|
|
573
|
-
//# sourceMappingURL=summary-grid-item-custom.
|
|
573
|
+
//# sourceMappingURL=summary-grid-item-custom.C-8hXJcP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-grid-item-custom.v0QSLZKT.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/summary-grid.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue"],"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 lang=\"ts\">\n import { defineComponent, PropType, provide } from 'vue';\n import { BentoSummaryGridColumnWidth, BentoSummaryGridLayout } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import { SUMMARY_GRID_LAYOUT_INJECTION_KEY } from '@/components/summary-grid/summary-grid.keys';\n\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 defineComponent({\n name: 'bento-summary-grid',\n components: { GridLayout },\n props: {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth: {\n type: Object as PropType<BentoSummaryGridColumnWidth>,\n default: null,\n },\n },\n\n setup(_props, { slots }) {\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 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\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n\n return {\n hasSlot: useHasSlot(slots),\n numberOfRows,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the 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","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum SummaryGridItemType {\n AMOUNT = 'amount',\n PERCENTAGE = 'percentage',\n NUMERIC = 'numeric',\n TEXT = 'text',\n CUSTOM = 'custom',\n}\n","<template>\n <div class=\"b-summary-grid-item\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n {{ title }}\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\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 />\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 lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n\n // Components\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItemType } from './summary-grid-item.types';\n\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 defineComponent({\n name: 'summary-grid-item',\n components: { BentoInfoIcon, BentoTypography, BentoTag, Copy },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Applies styling based on content type\n */\n // TODO add text truncation for SummaryGridItemType.TEXT\n itemType: {\n type: String as PropType<SummaryGridItemType | `${SummaryGridItemType}`>,\n default: SummaryGridItemType.CUSTOM,\n validator: (value: SummaryGridItemType) => Object.values(SummaryGridItemType).includes(value),\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n\n // amount, percentage and numeric props\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n // TODO implement logic for Large size\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored trend tag next to secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of secondary trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n },\n setup(props, { slots }) {\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n\n const tagVariantColor = direction => {\n switch (direction) {\n case BentoSummaryGridItemTrendDirection.POSITIVE:\n return BentoTagVariant.GREEN;\n case BentoSummaryGridItemTrendDirection.NEGATIVE:\n return BentoTagVariant.RED;\n default:\n return BentoTagVariant.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(() => {\n if (size.value === BentoSummaryGridItemSize.SMALL) {\n return BentoTypographyVariant.BODY;\n }\n if (itemType.value !== SummaryGridItemType.TEXT) {\n return BentoTypographyVariant.TITLE;\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === BentoSummaryGridItemSize.LARGE,\n strongest: size.value === BentoSummaryGridItemSize.SMALL,\n wide: size.value === BentoSummaryGridItemSize.SMALL,\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const summaryBarItemTrendConditionalClasses = computed(() => ({\n [`b-summary-grid-item__content-trend--${props.trend}`]: props.trend,\n }));\n\n return {\n // Values\n trendVariant,\n secondaryTrendVariant,\n typographyProps,\n\n // Styles\n computedStyles,\n summaryBarItemTrendConditionalClasses,\n\n // Utils\n hasSlot: useHasSlot(slots),\n };\n },\n });\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 class=\"b-summary-grid-item-amount\"\n >\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-amount',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Adds additional label next to amount content\n */\n secondaryLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows colored trend label next to main label\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\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 class=\"b-summary-grid-item-numeric\"\n >\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-numeric',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to main numeric content\n */\n trend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\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 class=\"b-summary-grid-item-percentage\"\n >\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-percentage',\n components: { SummaryGridItem },\n props: {\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\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 class=\"b-summary-grid-item-text\"\n >\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-text',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n },\n });\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 @copy-to-clipoard=\"$emit('copy-to-clipboard')\"\n >\n <slot />\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n\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 defineComponent({\n name: 'bento-summary-grid-item-custom',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n },\n emits: ['copy-to-clipboard'],\n });\n</script>\n"],"names":["_sfc_main$6","defineComponent","GridLayout","_props","slots","numberOfRows","slotRows","_b","_a","slotName","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","useHasSlot","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2","SummaryGridItemType","SummaryGridItemType2","_sfc_main$5","BentoInfoIcon","BentoTypography","BentoTag","Copy","value","props","trendDirection","secondaryTrendDirection","itemType","size","toRefs","tagVariantColor","direction","BentoTagVariant","trendVariant","computed","secondaryTrendVariant","typographyContentElement","BentoTypographyVariant","typographyProps","computedStyles","summaryBarItemTrendConditionalClasses","_sfc_main$4","SummaryGridItem","_sfc_main$3","_sfc_main$2","_sfc_main$1","_sfc_main"],"mappings":";;;;;;;;;;AA2DA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAA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,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,qBAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,YAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;uBC1CAI,KAAA9C,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAA0C,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA,EAAA,MAAA,QAAA,SAAA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,qBAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA,EAKA;AAAA,EACA,OAAA,CAAA,mBAAA;AAEA,CAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"summary-grid-item-custom.C-8hXJcP.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/summary-grid.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue"],"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 lang=\"ts\">\n import { defineComponent, PropType, provide } from 'vue';\n import { BentoSummaryGridColumnWidth, BentoSummaryGridLayout } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import { SUMMARY_GRID_LAYOUT_INJECTION_KEY } from '@/components/summary-grid/summary-grid.keys';\n\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 defineComponent({\n name: 'bento-summary-grid',\n components: { GridLayout },\n props: {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth: {\n type: Object as PropType<BentoSummaryGridColumnWidth>,\n default: null,\n },\n },\n\n setup(_props, { slots }) {\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 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\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n\n return {\n hasSlot: useHasSlot(slots),\n numberOfRows,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the 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","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum SummaryGridItemType {\n AMOUNT = 'amount',\n PERCENTAGE = 'percentage',\n NUMERIC = 'numeric',\n TEXT = 'text',\n CUSTOM = 'custom',\n}\n","<template>\n <div class=\"b-summary-grid-item\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n {{ title }}\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\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 />\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 lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n\n // Components\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItemType } from './summary-grid-item.types';\n\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 defineComponent({\n name: 'summary-grid-item',\n components: { BentoInfoIcon, BentoTypography, BentoTag, Copy },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Applies styling based on content type\n */\n // TODO add text truncation for SummaryGridItemType.TEXT\n itemType: {\n type: String as PropType<SummaryGridItemType | `${SummaryGridItemType}`>,\n default: SummaryGridItemType.CUSTOM,\n validator: (value: SummaryGridItemType) => Object.values(SummaryGridItemType).includes(value),\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n\n // amount, percentage and numeric props\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n // TODO implement logic for Large size\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored trend tag next to secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of secondary trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n },\n setup(props, { slots }) {\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n\n const tagVariantColor = direction => {\n switch (direction) {\n case BentoSummaryGridItemTrendDirection.POSITIVE:\n return BentoTagVariant.GREEN;\n case BentoSummaryGridItemTrendDirection.NEGATIVE:\n return BentoTagVariant.RED;\n default:\n return BentoTagVariant.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(() => {\n if (size.value === BentoSummaryGridItemSize.SMALL) {\n return BentoTypographyVariant.BODY;\n }\n if (itemType.value !== SummaryGridItemType.TEXT) {\n return BentoTypographyVariant.TITLE;\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === BentoSummaryGridItemSize.LARGE,\n strongest: size.value === BentoSummaryGridItemSize.SMALL,\n wide: size.value === BentoSummaryGridItemSize.SMALL,\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const summaryBarItemTrendConditionalClasses = computed(() => ({\n [`b-summary-grid-item__content-trend--${props.trend}`]: props.trend,\n }));\n\n return {\n // Values\n trendVariant,\n secondaryTrendVariant,\n typographyProps,\n\n // Styles\n computedStyles,\n summaryBarItemTrendConditionalClasses,\n\n // Utils\n hasSlot: useHasSlot(slots),\n };\n },\n });\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 class=\"b-summary-grid-item-amount\"\n >\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-amount',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Adds additional label next to amount content\n */\n secondaryLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows colored trend label next to main label\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\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 class=\"b-summary-grid-item-numeric\"\n >\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-numeric',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to main numeric content\n */\n trend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\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 class=\"b-summary-grid-item-percentage\"\n >\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-percentage',\n components: { SummaryGridItem },\n props: {\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\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 class=\"b-summary-grid-item-text\"\n >\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n\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 defineComponent({\n name: 'bento-summary-grid-item-text',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n },\n });\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 @copy-to-clipoard=\"$emit('copy-to-clipboard')\"\n >\n <slot />\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n\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 defineComponent({\n name: 'bento-summary-grid-item-custom',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n },\n emits: ['copy-to-clipboard'],\n });\n</script>\n"],"names":["_sfc_main$6","defineComponent","GridLayout","_props","slots","numberOfRows","slotRows","_b","_a","slotName","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","useHasSlot","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2","SummaryGridItemType","SummaryGridItemType2","_sfc_main$5","BentoInfoIcon","BentoTypography","BentoTag","Copy","value","props","trendDirection","secondaryTrendDirection","itemType","size","toRefs","tagVariantColor","direction","BentoTagVariant","trendVariant","computed","secondaryTrendVariant","typographyContentElement","BentoTypographyVariant","typographyProps","computedStyles","summaryBarItemTrendConditionalClasses","_sfc_main$4","SummaryGridItem","_sfc_main$3","_sfc_main$2","_sfc_main$1","_sfc_main"],"mappings":";;;;;;;;;;AA2DA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA,EAAA,OAAAC,EAAA,GAAA;;AAGA,QAAAC,IAAA;AACA,QAAAD,GAAA;AACA,YAAAE,KAAAC,KAAAC,IAAA,OAAA,KAAAJ,CAAA,MAAA,gBAAAI,EAAA,OAAA,CAAAC,MAAAA,EAAA,SAAA,OAAA,OAAA,gBAAAF,EAAA,IAAA,CAAAE,MAAA;;AAAA,yBAAAD,IAAAC,EAAA,MAAA,GAAA,MAAA,gBAAAD,EAAA,IAAA,EAAA;AAAA;AAIA,UADAH,IAAA,KAAA,IAAA,GAAAC,CAAA,GACAD,IAAA;AACA,cAAA,IAAA;AAAA,UAAA;AAAA,QACA;AAAA,IAEA;AASA,WAAAK,EAAAC,GANA,OAGA,EAAA,wBAAA,EAGA,GAEA;AAAA,MAAA,SAAAC,EAAAR,CAAA;AAAA,MACA,cAAAC;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9FY,IAAAQ,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KA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