@adyen/bento-vue3 1.45.0 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +4 -2
- 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/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.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/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{accordion-item.DfOb4Pyx.js → accordion-item.BOftQTUm.js} +8 -8
- package/dist/chunks/{accordion-item.DfOb4Pyx.js.map → accordion-item.BOftQTUm.js.map} +1 -1
- package/dist/chunks/{action-bar.CmDQZkM2.js → action-bar.DHa6nS5J.js} +10 -10
- package/dist/chunks/{action-bar.CmDQZkM2.js.map → action-bar.DHa6nS5J.js.map} +1 -1
- package/dist/chunks/{alert.D1Ax6AnI.js → alert.BffQNg4e.js} +9 -9
- package/dist/chunks/{alert.D1Ax6AnI.js.map → alert.BffQNg4e.js.map} +1 -1
- package/dist/chunks/{avatar.B0-9jC6H.js → avatar.DqdDHXay.js} +3 -3
- package/dist/chunks/{avatar.B0-9jC6H.js.map → avatar.DqdDHXay.js.map} +1 -1
- package/dist/chunks/{base-button.DdNFlbgH.js → base-button.DgHMejMF.js} +9 -9
- package/dist/chunks/{base-button.DdNFlbgH.js.map → base-button.DgHMejMF.js.map} +1 -1
- package/dist/chunks/{base-modal.DbJYaHyG.js → base-modal.BP7bUB84.js} +13 -13
- package/dist/chunks/{base-modal.DbJYaHyG.js.map → base-modal.BP7bUB84.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BUyecZNi.js → button-actions-with-menu.DzQQlXXK.js} +8 -8
- package/dist/chunks/{button-actions-with-menu.BUyecZNi.js.map → button-actions-with-menu.DzQQlXXK.js.map} +1 -1
- package/dist/chunks/{button-actions.CShVMUOC.js → button-actions.C8CJcXxS.js} +8 -8
- package/dist/chunks/{button-actions.CShVMUOC.js.map → button-actions.C8CJcXxS.js.map} +1 -1
- package/dist/chunks/{button.Cneb6rPP.js → button.DSnv5X7y.js} +10 -10
- package/dist/chunks/{button.Cneb6rPP.js.map → button.DSnv5X7y.js.map} +1 -1
- package/dist/chunks/{calendar.1qqtC8ba.js → calendar.DlvMzTO4.js} +10 -10
- package/dist/chunks/{calendar.1qqtC8ba.js.map → calendar.DlvMzTO4.js.map} +1 -1
- package/dist/chunks/{card.rkMUtirc.js → card.9fQrkeSH.js} +11 -11
- package/dist/chunks/{card.rkMUtirc.js.map → card.9fQrkeSH.js.map} +1 -1
- package/dist/chunks/{checkbox-group.PTNxE0kL.js → checkbox-group.Dq57AigF.js} +13 -13
- package/dist/chunks/{checkbox-group.PTNxE0kL.js.map → checkbox-group.Dq57AigF.js.map} +1 -1
- package/dist/chunks/{checkbox-input.CAYgiRHG.js → checkbox-input.D8ZUqd4m.js} +3 -3
- package/dist/chunks/{checkbox-input.CAYgiRHG.js.map → checkbox-input.D8ZUqd4m.js.map} +1 -1
- package/dist/chunks/{checkbox.D9FJcICR.js → checkbox.BphbrpUx.js} +32 -32
- package/dist/chunks/{checkbox.D9FJcICR.js.map → checkbox.BphbrpUx.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill.g_tcBhFJ.js → checkmark-circle-fill.ClIf1E3H.js} +4 -4
- package/dist/chunks/{checkmark-circle-fill.g_tcBhFJ.js.map → checkmark-circle-fill.ClIf1E3H.js.map} +1 -1
- package/dist/chunks/{checkmark-small.BDqUF-Ni.js → checkmark-small.DEc2T64_.js} +5 -5
- package/dist/chunks/{checkmark-small.BDqUF-Ni.js.map → checkmark-small.DEc2T64_.js.map} +1 -1
- package/dist/chunks/{chevron-left.CYEK2UTr.js → chevron-left.NvV5m76j.js} +8 -8
- package/dist/chunks/{chevron-left.CYEK2UTr.js.map → chevron-left.NvV5m76j.js.map} +1 -1
- package/dist/chunks/{chevron-up.Cu9qXgBY.js → chevron-up.DQZG_BP3.js} +8 -8
- package/dist/chunks/{chevron-up.Cu9qXgBY.js.map → chevron-up.DQZG_BP3.js.map} +1 -1
- package/dist/chunks/code-snippet.BXMQTve4.js +422 -0
- package/dist/chunks/code-snippet.BXMQTve4.js.map +1 -0
- package/dist/chunks/{codemirror.CXFEqvAi.js → codemirror.OjJ-3ixa.js} +5180 -4862
- package/dist/chunks/codemirror.OjJ-3ixa.js.map +1 -0
- package/dist/chunks/{controls-group.BHxcGQ2A.js → controls-group.J99mAGhx.js} +11 -11
- package/dist/chunks/{controls-group.BHxcGQ2A.js.map → controls-group.J99mAGhx.js.map} +1 -1
- package/dist/chunks/{copy.DAMq-zRP.js → copy.CT8wuwho.js} +5 -5
- package/dist/chunks/{copy.DAMq-zRP.js.map → copy.CT8wuwho.js.map} +1 -1
- package/dist/chunks/{country.Cv_8NTmw.js → country.CcTaTBE0.js} +5 -5
- package/dist/chunks/{country.Cv_8NTmw.js.map → country.CcTaTBE0.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill-small.CJyARMSZ.js → cross-circle-fill-small.BXO78Wde.js} +5 -5
- package/dist/chunks/{cross-circle-fill-small.CJyARMSZ.js.map → cross-circle-fill-small.BXO78Wde.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.BzSjakuO.js → cross-circle-fill.DN5b3_eL.js} +4 -4
- package/dist/chunks/{cross-circle-fill.BzSjakuO.js.map → cross-circle-fill.DN5b3_eL.js.map} +1 -1
- package/dist/chunks/{cross-small.Z5EKYRm0.js → cross-small.CXWTuKA_.js} +5 -5
- package/dist/chunks/{cross-small.Z5EKYRm0.js.map → cross-small.CXWTuKA_.js.map} +1 -1
- package/dist/chunks/{cross.BZYw4R3N.js → cross.OvPfvoqX.js} +5 -5
- package/dist/chunks/{cross.BZYw4R3N.js.map → cross.OvPfvoqX.js.map} +1 -1
- package/dist/chunks/{currency.DGX-aejv.js → currency.Dz2x17_Q.js} +3 -3
- package/dist/chunks/{currency.DGX-aejv.js.map → currency.Dz2x17_Q.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Buh9mb22.js → dashboard-section.C90L1bhS.js} +6 -6
- package/dist/chunks/{dashboard-section.Buh9mb22.js.map → dashboard-section.C90L1bhS.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DYVSwQtH.js → dashed-underline.BewlZNvL.js} +8 -8
- package/dist/chunks/{dashed-underline.DYVSwQtH.js.map → dashed-underline.BewlZNvL.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B6xmEgaM.js → data-grid-template.DeAeq2Ij.js} +7 -7
- package/dist/chunks/{data-grid-template.B6xmEgaM.js.map → data-grid-template.DeAeq2Ij.js.map} +1 -1
- package/dist/chunks/{data-grid.DVc9qzLU.js → data-grid.DSPcFy6O.js} +31 -31
- package/dist/chunks/{data-grid.DVc9qzLU.js.map → data-grid.DSPcFy6O.js.map} +1 -1
- package/dist/chunks/{date-picker.Bt4fyPQ4.js → date-picker.wNOf4DoV.js} +24 -24
- package/dist/chunks/{date-picker.Bt4fyPQ4.js.map → date-picker.wNOf4DoV.js.map} +1 -1
- package/dist/chunks/{date-range-picker.Bna_2pBL.js → date-range-picker.C4l0Xe9R.js} +275 -275
- package/dist/chunks/{date-range-picker.Bna_2pBL.js.map → date-range-picker.C4l0Xe9R.js.map} +1 -1
- package/dist/chunks/{date.DeaBl297.js → date.DVGj7WKQ.js} +16 -14
- package/dist/chunks/{date.DeaBl297.js.map → date.DVGj7WKQ.js.map} +1 -1
- package/dist/chunks/{dialog-page.CJBSluwk.js → dialog-page.DNwtSB1o.js} +28 -29
- package/dist/chunks/{dialog-page.CJBSluwk.js.map → dialog-page.DNwtSB1o.js.map} +1 -1
- package/dist/chunks/{divider.DwBC4bpr.js → divider.ugNXYI-T.js} +3 -3
- package/dist/chunks/{divider.DwBC4bpr.js.map → divider.ugNXYI-T.js.map} +1 -1
- package/dist/chunks/{dot.cpdFEk6G.js → dot.pQfhaKda.js} +5 -5
- package/dist/chunks/{dot.cpdFEk6G.js.map → dot.pQfhaKda.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.ipIFhyWZ.js → dropdown-default-textbox.3HzBUxC3.js} +14 -14
- package/dist/chunks/{dropdown-default-textbox.ipIFhyWZ.js.map → dropdown-default-textbox.3HzBUxC3.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DLyxItIS.js → dropdown-tag.BRNZ7KIi.js} +8 -8
- package/dist/chunks/{dropdown-tag.DLyxItIS.js.map → dropdown-tag.BRNZ7KIi.js.map} +1 -1
- package/dist/chunks/{dropdown.CZDXXpKe.js → dropdown.DhvCTlVl.js} +270 -263
- package/dist/chunks/dropdown.DhvCTlVl.js.map +1 -0
- package/dist/chunks/{empty-state.C2ancCe6.js → empty-state.DYfl7gnt.js} +12 -12
- package/dist/chunks/{empty-state.C2ancCe6.js.map → empty-state.DYfl7gnt.js.map} +1 -1
- package/dist/chunks/{error-message.BVE3JdTq.js → error-message.C6QpZ9ux.js} +16 -16
- package/dist/chunks/{error-message.BVE3JdTq.js.map → error-message.C6QpZ9ux.js.map} +1 -1
- package/dist/chunks/{es6.jIyAPBgt.js → es6.D11bE5vq.js} +6 -6
- package/dist/chunks/{es6.jIyAPBgt.js.map → es6.D11bE5vq.js.map} +1 -1
- package/dist/chunks/{expand.CJ162RaJ.js → expand.CgwNEbbz.js} +4 -4
- package/dist/chunks/{expand.CJ162RaJ.js.map → expand.CgwNEbbz.js.map} +1 -1
- package/dist/chunks/file-uploader.DiqPKVVt.js +2226 -0
- package/dist/chunks/file-uploader.DiqPKVVt.js.map +1 -0
- package/dist/chunks/{filter-bar.oihCCt5N.js → filter-bar.ChU2rr8r.js} +52 -52
- package/dist/chunks/{filter-bar.oihCCt5N.js.map → filter-bar.ChU2rr8r.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.XaGPUsUO.js → fixed-scroller.C4zzWgje.js} +12 -12
- package/dist/chunks/{fixed-scroller.XaGPUsUO.js.map → fixed-scroller.C4zzWgje.js.map} +1 -1
- package/dist/chunks/{focus-trap.CnKbO3b1.js → focus-trap.DOiVbmpZ.js} +8 -8
- package/dist/chunks/{focus-trap.CnKbO3b1.js.map → focus-trap.DOiVbmpZ.js.map} +1 -1
- package/dist/chunks/{footer-actions.n0JIXO4Q.js → footer-actions.Cl2aupkj.js} +8 -8
- package/dist/chunks/{footer-actions.n0JIXO4Q.js.map → footer-actions.Cl2aupkj.js.map} +1 -1
- package/dist/chunks/{form-layout-title.srkVLEUW.js → form-layout-title.Du4aY15F.js} +4 -4
- package/dist/chunks/{form-layout-title.srkVLEUW.js.map → form-layout-title.Du4aY15F.js.map} +1 -1
- package/dist/chunks/{generate-uid.NJ8tVoha.js → generate-uid.D-HFI38h.js} +2 -2
- package/dist/chunks/{generate-uid.NJ8tVoha.js.map → generate-uid.D-HFI38h.js.map} +1 -1
- package/dist/chunks/{grid-layout.BTLE3rac.js → grid-layout.CqLbbEzI.js} +21 -21
- package/dist/chunks/{grid-layout.BTLE3rac.js.map → grid-layout.CqLbbEzI.js.map} +1 -1
- package/dist/chunks/{header.CAHXObTT.js → header.CUyEq2ER.js} +65 -65
- package/dist/chunks/{header.CAHXObTT.js.map → header.CUyEq2ER.js.map} +1 -1
- package/dist/chunks/{i18n.WMYWtwxB.js → i18n.CPGoe9tN.js} +540 -540
- package/dist/chunks/{i18n.WMYWtwxB.js.map → i18n.CPGoe9tN.js.map} +1 -1
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js} +3 -3
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map} +1 -1
- package/dist/chunks/{index.BMkVmbZj.js → index.BHiMheJx.js} +5 -5
- package/dist/chunks/{index.BMkVmbZj.js.map → index.BHiMheJx.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.DFv8U4sh.js → info-icon-with-popover._ZiXaIcp.js} +11 -11
- package/dist/chunks/{info-icon-with-popover.DFv8U4sh.js.map → info-icon-with-popover._ZiXaIcp.js.map} +1 -1
- package/dist/chunks/{info-icon.BCSBCH-5.js → info-icon.B6QPdxPi.js} +5 -5
- package/dist/chunks/{info-icon.BCSBCH-5.js.map → info-icon.B6QPdxPi.js.map} +1 -1
- package/dist/chunks/{info.DYNe2WnZ.js → info.CIFBUqf-.js} +4 -4
- package/dist/chunks/{info.DYNe2WnZ.js.map → info.CIFBUqf-.js.map} +1 -1
- package/dist/chunks/{input-field-password.DedPkZxg.js → input-field-password.LVaJy8_K.js} +30 -30
- package/dist/chunks/{input-field-password.DedPkZxg.js.map → input-field-password.LVaJy8_K.js.map} +1 -1
- package/dist/chunks/{input-field.3PUv6XC3.js → input-field.BVewQng_.js} +124 -115
- package/dist/chunks/input-field.BVewQng_.js.map +1 -0
- package/dist/chunks/{inspector.types.Dr0D250X.js → inspector.types.DKL2_Mku.js} +14 -14
- package/dist/chunks/{inspector.types.Dr0D250X.js.map → inspector.types.DKL2_Mku.js.map} +1 -1
- package/dist/chunks/{layout-row.9G7yVMVt.js → layout-row.CwYDJeG_.js} +4 -4
- package/dist/chunks/{layout-row.9G7yVMVt.js.map → layout-row.CwYDJeG_.js.map} +1 -1
- package/dist/chunks/{link.ClFi8uSm.js → link.DHXLGTkn.js} +11 -11
- package/dist/chunks/{link.ClFi8uSm.js.map → link.DHXLGTkn.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.zYn_kSFz.js → listbox-option-tag.DsI3DdjJ.js} +9 -9
- package/dist/chunks/{listbox-option-tag.zYn_kSFz.js.map → listbox-option-tag.DsI3DdjJ.js.map} +1 -1
- package/dist/chunks/{loading-indicator.DEepb9Wl.js → loading-indicator.N_WV9Gwz.js} +3 -3
- package/dist/chunks/{loading-indicator.DEepb9Wl.js.map → loading-indicator.N_WV9Gwz.js.map} +1 -1
- package/dist/chunks/{menu.Dmzh3Uat.js → menu.C5Y5nSvX.js} +13 -13
- package/dist/chunks/{menu.Dmzh3Uat.js.map → menu.C5Y5nSvX.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BazQAAU1.js → modal-fullscreen.Bw0CzdjS.js} +12 -12
- package/dist/chunks/{modal-fullscreen.BazQAAU1.js.map → modal-fullscreen.Bw0CzdjS.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C8vZDtlE.js → modal.vue_vue_type_script_setup_true_lang.B-_oGtsE.js} +13 -13
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C8vZDtlE.js.map → modal.vue_vue_type_script_setup_true_lang.B-_oGtsE.js.map} +1 -1
- package/dist/chunks/{pagination.BCC3GZV5.js → pagination.OzqU46-J.js} +11 -11
- package/dist/chunks/{pagination.BCC3GZV5.js.map → pagination.OzqU46-J.js.map} +1 -1
- package/dist/chunks/{payment-method.2IeC7f4x.js → payment-method.Lwl-3chY.js} +3 -3
- package/dist/chunks/{payment-method.2IeC7f4x.js.map → payment-method.Lwl-3chY.js.map} +1 -1
- package/dist/chunks/{popover.3KG1IoYE.js → popover.BFZU1OKv.js} +7 -7
- package/dist/chunks/{popover.3KG1IoYE.js.map → popover.BFZU1OKv.js.map} +1 -1
- package/dist/chunks/{popper-container.DKDjRvdv.js → popper-container.CQblHdJf.js} +4 -4
- package/dist/chunks/{popper-container.DKDjRvdv.js.map → popper-container.CQblHdJf.js.map} +1 -1
- package/dist/chunks/{promo-banner.BjLfDhBq.js → promo-banner.DB6C9Tgr.js} +12 -12
- package/dist/chunks/{promo-banner.BjLfDhBq.js.map → promo-banner.DB6C9Tgr.js.map} +1 -1
- package/dist/chunks/{radio-group.CeiSaH6M.js → radio-group.DVPnBI92.js} +8 -8
- package/dist/chunks/{radio-group.CeiSaH6M.js.map → radio-group.DVPnBI92.js.map} +1 -1
- package/dist/chunks/{radio-input.0TPahhZT.js → radio-input.ButaAWTD.js} +5 -5
- package/dist/chunks/{radio-input.0TPahhZT.js.map → radio-input.ButaAWTD.js.map} +1 -1
- package/dist/chunks/{refresh.SzRxQ44W.js → refresh.DvQeGwUF.js} +5 -5
- package/dist/chunks/{refresh.SzRxQ44W.js.map → refresh.DvQeGwUF.js.map} +1 -1
- package/dist/chunks/{search-bar.BZDJJtWB.js → search-bar.CPOGuVqp.js} +8 -8
- package/dist/chunks/{search-bar.BZDJJtWB.js.map → search-bar.CPOGuVqp.js.map} +1 -1
- package/dist/chunks/{search.KgjmJMHa.js → search.EnLryD8V.js} +4 -4
- package/dist/chunks/{search.KgjmJMHa.js.map → search.EnLryD8V.js.map} +1 -1
- package/dist/chunks/{secondary-nav.qm-rh-r6.js → secondary-nav.B1zTf8Ls.js} +11 -11
- package/dist/chunks/{secondary-nav.qm-rh-r6.js.map → secondary-nav.B1zTf8Ls.js.map} +1 -1
- package/dist/chunks/{segmented-control.BIwBQ8i3.js → segmented-control.DV9mJM7g.js} +9 -9
- package/dist/chunks/{segmented-control.BIwBQ8i3.js.map → segmented-control.DV9mJM7g.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DPGh4nwl.js → selection-card-group.z0SNFpjN.js} +17 -17
- package/dist/chunks/{selection-card-group.DPGh4nwl.js.map → selection-card-group.z0SNFpjN.js.map} +1 -1
- package/dist/chunks/{show.J9zXGWlK.js → show.ChPQTrAT.js} +6 -6
- package/dist/chunks/{show.J9zXGWlK.js.map → show.ChPQTrAT.js.map} +1 -1
- package/dist/chunks/{sidepanel.DxSdFwm1.js → sidepanel.B-YKxXQA.js} +12 -12
- package/dist/chunks/{sidepanel.DxSdFwm1.js.map → sidepanel.B-YKxXQA.js.map} +1 -1
- package/dist/chunks/{status.types.Dil95sGx.js → status.types.Bh_mGknA.js} +6 -6
- package/dist/chunks/{status.types.Dil95sGx.js.map → status.types.Bh_mGknA.js.map} +1 -1
- package/dist/chunks/{step.DAB8h_4u.js → step.CGHc2hFZ.js} +7 -7
- package/dist/chunks/{step.DAB8h_4u.js.map → step.CGHc2hFZ.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DpI6jzfM.js → structured-list-item.DNP6fkCb.js} +9 -9
- package/dist/chunks/{structured-list-item.DpI6jzfM.js.map → structured-list-item.DNP6fkCb.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.DCNWMasy.js → summary-grid-item-custom.Dm2rULoZ.js} +7 -7
- package/dist/chunks/{summary-grid-item-custom.DCNWMasy.js.map → summary-grid-item-custom.Dm2rULoZ.js.map} +1 -1
- package/dist/chunks/{tabs.B5-PZCxc.js → tabs.BXuDJsCU.js} +5 -5
- package/dist/chunks/{tabs.B5-PZCxc.js.map → tabs.BXuDJsCU.js.map} +1 -1
- package/dist/chunks/{tag.BuUbvgok.js → tag.bo9YuJ9f.js} +5 -5
- package/dist/chunks/{tag.BuUbvgok.js.map → tag.bo9YuJ9f.js.map} +1 -1
- package/dist/chunks/{teleport.B1NhF5-O.js → teleport.B255JhsV.js} +4 -4
- package/dist/chunks/{teleport.B1NhF5-O.js.map → teleport.B255JhsV.js.map} +1 -1
- package/dist/chunks/{textarea.CCr8inwI.js → textarea.FlyFaC5n.js} +8 -8
- package/dist/chunks/{textarea.CCr8inwI.js.map → textarea.FlyFaC5n.js.map} +1 -1
- package/dist/chunks/{timeline-item.DG9YaOiC.js → timeline-item.DYgnYAx0.js} +38 -38
- package/dist/chunks/{timeline-item.DG9YaOiC.js.map → timeline-item.DYgnYAx0.js.map} +1 -1
- package/dist/chunks/{toast.CVy2sf_5.js → toast.Cp-osZLV.js} +22 -22
- package/dist/chunks/{toast.CVy2sf_5.js.map → toast.Cp-osZLV.js.map} +1 -1
- package/dist/chunks/{toggle-button.CCgvi7TQ.js → toggle-button.BABftVnA.js} +4 -4
- package/dist/chunks/{toggle-button.CCgvi7TQ.js.map → toggle-button.BABftVnA.js.map} +1 -1
- package/dist/chunks/{toggle.Dl82VpiQ.js → toggle.Bme9eaeR.js} +5 -5
- package/dist/chunks/{toggle.Dl82VpiQ.js.map → toggle.Bme9eaeR.js.map} +1 -1
- package/dist/chunks/{tooltip.2MOlGHD9.js → tooltip.Ch4_ew27.js} +9 -9
- package/dist/chunks/{tooltip.2MOlGHD9.js.map → tooltip.Ch4_ew27.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CQ0vEvB4.js → tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js} +33 -33
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CQ0vEvB4.js.map → tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js.map} +1 -1
- package/dist/chunks/{typography.DN5eC5ch.js → typography.DNzU41ah.js} +3 -4
- package/dist/chunks/{typography.DN5eC5ch.js.map → typography.DNzU41ah.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.D3LA1FCd.js → use-bento-toast-controller.C2wUDcoc.js} +3 -3
- package/dist/chunks/{use-bento-toast-controller.D3LA1FCd.js.map → use-bento-toast-controller.C2wUDcoc.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BBD_AA1m.js → use-cached-selected-values.CvdhdRHz.js} +15 -15
- package/dist/chunks/{use-cached-selected-values.BBD_AA1m.js.map → use-cached-selected-values.CvdhdRHz.js.map} +1 -1
- package/dist/chunks/{use-country-items.DnPo3yxj.js → use-country-items.D4T1eUtC.js} +2 -2
- package/dist/chunks/{use-country-items.DnPo3yxj.js.map → use-country-items.D4T1eUtC.js.map} +1 -1
- package/dist/chunks/{warning-filled.tTkVob0l.js → warning-filled.OUOUbA6k.js} +5 -5
- package/dist/chunks/{warning-filled.tTkVob0l.js.map → warning-filled.OUOUbA6k.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/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/image.js +1 -1
- package/dist/index.js +170 -170
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +14 -14
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.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/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- 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 +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +6 -5
- package/dist/styles/styleguide.css +1 -0
- 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 +1 -1
- package/package.json +7 -4
- package/dist/chunks/code-snippet.volJxGqR.js +0 -392
- package/dist/chunks/code-snippet.volJxGqR.js.map +0 -1
- package/dist/chunks/codemirror.CXFEqvAi.js.map +0 -1
- package/dist/chunks/dropdown.CZDXXpKe.js.map +0 -1
- package/dist/chunks/file-uploader.BXHt0PWz.js +0 -1077
- package/dist/chunks/file-uploader.BXHt0PWz.js.map +0 -1
- package/dist/chunks/input-field.3PUv6XC3.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as P, ref as k,
|
|
2
|
-
import { B as Y } from "./menu.
|
|
3
|
-
import { a as V, B as tt } from "./popover.
|
|
4
|
-
import { B as I } from "./typography.
|
|
5
|
-
import { _ as et } from "./image.vue_vue_type_script_setup_true_lang.
|
|
6
|
-
import { u as ot } from "./i18n.
|
|
7
|
-
import { R as it } from "./refresh.
|
|
1
|
+
import { defineComponent as P, ref as k, openBlock as c, createBlock as S, unref as p, withCtx as v, createElementVNode as d, normalizeStyle as z, createElementBlock as O, mergeProps as R, toDisplayString as B, createCommentVNode as T, computed as l, isRef as H, watch as E, nextTick as U, createVNode as b, withKeys as J, createSlots as W, createTextVNode as w, renderSlot as X, Fragment as G, renderList as Q } from "vue";
|
|
2
|
+
import { B as Y } from "./menu.C5Y5nSvX.js";
|
|
3
|
+
import { a as V, B as tt } from "./popover.BFZU1OKv.js";
|
|
4
|
+
import { B as I } from "./typography.DNzU41ah.js";
|
|
5
|
+
import { _ as et } from "./image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js";
|
|
6
|
+
import { u as ot } from "./i18n.CPGoe9tN.js";
|
|
7
|
+
import { R as it } from "./refresh.DvQeGwUF.js";
|
|
8
8
|
import { _ as A } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
|
-
import { P as j, h as at, o as nt } from "./popper-container.
|
|
9
|
+
import { P as j, h as at, o as nt } from "./popper-container.CQblHdJf.js";
|
|
10
10
|
import "./popper-container.types.BCZMbVFD.js";
|
|
11
|
-
import { B as st } from "./button-actions.
|
|
11
|
+
import { B as st } from "./button-actions.C8CJcXxS.js";
|
|
12
12
|
import "../assets/tutorial.css";
|
|
13
|
-
const
|
|
13
|
+
const C = 2;
|
|
14
14
|
var L;
|
|
15
15
|
const lt = /* @__PURE__ */ P({
|
|
16
16
|
__name: "tutorial-indicator",
|
|
@@ -33,7 +33,7 @@ const lt = /* @__PURE__ */ P({
|
|
|
33
33
|
function m(e) {
|
|
34
34
|
try {
|
|
35
35
|
const i = parseFloat(getComputedStyle(e).getPropertyValue("border-radius"));
|
|
36
|
-
return Number.isNaN(i) ? "" : `${i + 2 *
|
|
36
|
+
return Number.isNaN(i) ? "" : `${i + 2 * C}px`;
|
|
37
37
|
} catch {
|
|
38
38
|
return "";
|
|
39
39
|
}
|
|
@@ -41,18 +41,18 @@ const lt = /* @__PURE__ */ P({
|
|
|
41
41
|
const o = [
|
|
42
42
|
at(),
|
|
43
43
|
nt({
|
|
44
|
-
mainAxis:
|
|
45
|
-
alignmentAxis: -
|
|
44
|
+
mainAxis: C,
|
|
45
|
+
alignmentAxis: -C
|
|
46
46
|
}),
|
|
47
47
|
{
|
|
48
48
|
name: "updateIndicatorSize",
|
|
49
49
|
fn: ({ x: e, y: i, elements: _ }) => {
|
|
50
50
|
const f = _.reference;
|
|
51
|
-
return n.value.width = `${f.offsetWidth + 4 *
|
|
51
|
+
return n.value.width = `${f.offsetWidth + 4 * C}px`, n.value.height = `${f.offsetHeight + 4 * C}px`, n.value.borderRadius = m(f), { x: e, y: i };
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
];
|
|
55
|
-
return (e, i) => (c(),
|
|
55
|
+
return (e, i) => (c(), S(p(j), {
|
|
56
56
|
"target-element": t.targetElement,
|
|
57
57
|
middleware: o,
|
|
58
58
|
position: "top-start",
|
|
@@ -78,14 +78,14 @@ const ut = {
|
|
|
78
78
|
}
|
|
79
79
|
}, pt = { key: 0 }, dt = ["clip-path"], ct = ["id"];
|
|
80
80
|
function mt(t, n, m, o, e, i) {
|
|
81
|
-
return c(),
|
|
81
|
+
return c(), O("svg", R({ role: "img" }, t.$attrs, {
|
|
82
82
|
class: "ui-assets-icons-16",
|
|
83
83
|
xmlns: "http://www.w3.org/2000/svg",
|
|
84
84
|
width: "16",
|
|
85
85
|
height: "16",
|
|
86
86
|
fill: "none"
|
|
87
87
|
}), [
|
|
88
|
-
t.$attrs["svg-title"] ? (c(),
|
|
88
|
+
t.$attrs["svg-title"] ? (c(), O("title", pt, B(t.$attrs["svg-title"]), 1)) : T("", !0),
|
|
89
89
|
d("g", {
|
|
90
90
|
"clip-path": "url(#uia-icons-16-blocked__a" + t.uuid + ")"
|
|
91
91
|
}, n[0] || (n[0] = [
|
|
@@ -238,10 +238,10 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
238
238
|
})), h = l(() => ({
|
|
239
239
|
title: e("ok"),
|
|
240
240
|
event: () => i("finish")
|
|
241
|
-
})),
|
|
241
|
+
})), x = k(!1), y = k(!1), g = l(() => {
|
|
242
242
|
var s;
|
|
243
243
|
return H(o.targetElement) ? ((s = o.targetElement.value) == null ? void 0 : s.$el) || o.targetElement.value : o.targetElement.$el || o.targetElement;
|
|
244
|
-
}),
|
|
244
|
+
}), $ = l(() => o.step === 0), F = l(() => o.step === o.totalSteps), q = l(() => !$.value), D = l(() => [
|
|
245
245
|
{
|
|
246
246
|
text: e("restartTour"),
|
|
247
247
|
handler: () => i("restart"),
|
|
@@ -256,9 +256,9 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
256
256
|
]
|
|
257
257
|
]), Z = l(() => {
|
|
258
258
|
let s;
|
|
259
|
-
|
|
259
|
+
$.value ? s = o.single ? h.value : f.value : F.value ? s = r.value : s = a.value;
|
|
260
260
|
const u = [s];
|
|
261
|
-
return
|
|
261
|
+
return $.value && !o.single ? u.push(_.value) : o.action && u.push(o.action), u;
|
|
262
262
|
});
|
|
263
263
|
return E(
|
|
264
264
|
() => o.active,
|
|
@@ -266,18 +266,18 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
266
266
|
var u, N;
|
|
267
267
|
s && ((u = g.value) != null && u.scrollIntoView) && ((N = g.value) == null || N.scrollIntoView(
|
|
268
268
|
o.scrollOptions != null ? o.scrollOptions : m
|
|
269
|
-
), await U()),
|
|
269
|
+
), await U()), x.value = s, y.value = s;
|
|
270
270
|
},
|
|
271
271
|
{ immediate: !0 }
|
|
272
|
-
), (s, u) => t.active && g.value ? (c(),
|
|
273
|
-
y.value && g.value ? (c(),
|
|
272
|
+
), (s, u) => t.active && g.value ? (c(), O("div", vt, [
|
|
273
|
+
y.value && g.value ? (c(), S(p(rt), {
|
|
274
274
|
key: 0,
|
|
275
275
|
"target-element": g.value
|
|
276
|
-
}, null, 8, ["target-element"])) :
|
|
276
|
+
}, null, 8, ["target-element"])) : T("", !0),
|
|
277
277
|
b(p(tt), {
|
|
278
278
|
"target-element": g.value,
|
|
279
279
|
position: t.position,
|
|
280
|
-
open:
|
|
280
|
+
open: x.value,
|
|
281
281
|
"aria-label": t.title,
|
|
282
282
|
"fixed-positioning": "",
|
|
283
283
|
class: "b-tutorial-popover",
|
|
@@ -298,7 +298,7 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
298
298
|
]),
|
|
299
299
|
_: 1
|
|
300
300
|
}),
|
|
301
|
-
q.value ? (c(),
|
|
301
|
+
q.value ? (c(), S(p(I), {
|
|
302
302
|
key: 0,
|
|
303
303
|
el: "span",
|
|
304
304
|
class: "b-tutorial-popover__steps"
|
|
@@ -307,7 +307,7 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
307
307
|
w(B(p(e)("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })), 1)
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
|
-
})) :
|
|
310
|
+
})) : T("", !0)
|
|
311
311
|
]),
|
|
312
312
|
b(p(I), null, {
|
|
313
313
|
default: v(() => [
|
|
@@ -316,7 +316,7 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
316
316
|
_: 3
|
|
317
317
|
}),
|
|
318
318
|
d("div", _t, [
|
|
319
|
-
|
|
319
|
+
$.value ? T("", !0) : (c(), S(p(Y), {
|
|
320
320
|
key: 0,
|
|
321
321
|
data: D.value,
|
|
322
322
|
class: "b-tutorial-popover__menu",
|
|
@@ -343,7 +343,7 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
343
343
|
key: "0"
|
|
344
344
|
} : void 0
|
|
345
345
|
]), 1032, ["target-element", "position", "open", "aria-label"])
|
|
346
|
-
])) :
|
|
346
|
+
])) : T("", !0);
|
|
347
347
|
}
|
|
348
348
|
}), Ct = /* @__PURE__ */ A(bt, [["__scopeId", "data-v-1a556949"]]), Tt = { class: "b-tutorial" }, St = {}, At = /* @__PURE__ */ P({
|
|
349
349
|
...St,
|
|
@@ -401,8 +401,8 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
401
401
|
(a) => {
|
|
402
402
|
a >= -1 && a <= i.value && (e.value = a);
|
|
403
403
|
}
|
|
404
|
-
), (a, r) => (c(),
|
|
405
|
-
(c(!0),
|
|
404
|
+
), (a, r) => (c(), O("div", Tt, [
|
|
405
|
+
(c(!0), O(G, null, Q(t.steps, (h, x) => (c(), S(p(Ct), R({ ref_for: !0 }, f(h, x), {
|
|
406
406
|
key: h.title,
|
|
407
407
|
onFinish: r[0] || (r[0] = (y) => e.value = -1),
|
|
408
408
|
onNext: r[1] || (r[1] = (y) => e.value += 1),
|
|
@@ -419,4 +419,4 @@ const ft = /* @__PURE__ */ A(ut, [["render", mt]]), M = {
|
|
|
419
419
|
export {
|
|
420
420
|
At as _
|
|
421
421
|
};
|
|
422
|
-
//# sourceMappingURL=tutorial.vue_vue_type_script_setup_true_lang.
|
|
422
|
+
//# sourceMappingURL=tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.vue_vue_type_script_setup_true_lang.CQ0vEvB4.js","sources":["../../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.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/blocked.vue","../../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../../vue2/src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.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><g :clip-path=\"'url(#uia-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></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 <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: t('skipTour'),\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, i) in steps\"\n v-bind=\"getPopoverProps(step, i)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, watch } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The current step index. If provided, will start the tutorial in that step.\n */\n index: {\n type: Number,\n default: null,\n },\n\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fired every time the step index is changed. `-1` value means the tutorial is finished/skipped.\n */\n (e: 'update:index', value: number);\n }>();\n\n const currentStep = ref(props.index || 0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n\n watch(currentStep, step => {\n emit('update:index', step);\n });\n\n watch(\n () => props.index,\n value => {\n if (value >= -1 && value <= totalSteps.value) {\n currentStep.value = value;\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["BORDER_OFFSET","computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","props","__props","t","useI18n","emit","__emit","ACTION_SKIP","computed","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;AAmBI,MAAAA,IAAA;;;;;;;;;;;;;;;AAaA,UAAAC,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAAL,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAM,IAAA;AAAA,MAAmBC,GAAA;AAAA,MACVC,GAAA;AAAA,QACE,UAAAR;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAS,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC,IAAAD,EAAA;AACA,iBAAAV,EAAA,MAAA,QAAA,GAAAW,EAAA,cAAA,IAAAZ,CAAA,MACAC,EAAA,MAAA,SAAA,GAAAW,EAAA,eAAA,IAAAZ,CAAA,MACAC,EAAA,MAAA,eAAAE,EAAAS,CAAA,GACA,EAAA,GAAAH,GAAA,GAAAC,EAAA;AAAA,QAAc;AAAA,MAClB;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;ACzDJ,IAAAG,IAAA;;EAGI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UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js","sources":["../../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.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/blocked.vue","../../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../../vue2/src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.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><g :clip-path=\"'url(#uia-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></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 <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: t('skipTour'),\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, i) in steps\"\n v-bind=\"getPopoverProps(step, i)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, watch } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The current step index. If provided, will start the tutorial in that step.\n */\n index: {\n type: Number,\n default: null,\n },\n\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fired every time the step index is changed. `-1` value means the tutorial is finished/skipped.\n */\n (e: 'update:index', value: number);\n }>();\n\n const currentStep = ref(props.index || 0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n\n watch(currentStep, step => {\n emit('update:index', step);\n });\n\n watch(\n () => props.index,\n value => {\n if (value >= -1 && value <= totalSteps.value) {\n currentStep.value = value;\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["BORDER_OFFSET","computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","props","__props","t","useI18n","emit","__emit","ACTION_SKIP","computed","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;AAmBI,MAAAA,IAAA;;;;;;;;;;;;;;;AAaA,UAAAC,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAAL,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAM,IAAA;AAAA,MAAmBC,GAAA;AAAA,MACVC,GAAA;AAAA,QACE,UAAAR;AAAA,QACO,eAAA,CAAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAS,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC,IAAAD,EAAA;AACA,iBAAAV,EAAA,MAAA,QAAA,GAAAW,EAAA,cAAA,IAAAZ,CAAA,MACAC,EAAA,MAAA,SAAA,GAAAW,EAAA,eAAA,IAAAZ,CAAA,MACAC,EAAA,MAAA,eAAAE,EAAAS,CAAA,GACA,EAAA,GAAAH,GAAA,GAAAC,EAAA;AAAA,QAAc;AAAA,MAClB;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;ACzDJ,IAAAG,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;oBAVZC,KAAA,CAAA,WAAA,GAAAC,KAAA,CAAA,IAAA;;AAEI,S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1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, computed as T, onMounted as E,
|
|
1
|
+
import { defineComponent as p, computed as T, onMounted as E, openBlock as d, createBlock as u, resolveDynamicComponent as v, normalizeClass as I, withCtx as h, renderSlot as b } from "vue";
|
|
2
2
|
import { _ as O } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
3
|
import "../assets/typography.css";
|
|
4
4
|
var a = /* @__PURE__ */ ((t) => (t.CAPTION = "caption", t.BODY = "body", t.SUBTITLE = "subtitle", t.TITLE = "title", t))(a || {}), r = /* @__PURE__ */ ((t) => (t.WIDE = "wide", t.STRONGER = "stronger", t.STRONGER_WIDE = "stronger-wide", t.STRONGEST = "strongest", t.STRONGEST_WIDE = "strongest-wide", t.MEDIUM = "m", t.LARGE = "l", t.MOBILE = "mobile", t))(r || {}), c = /* @__PURE__ */ ((t) => (t.H1 = "h1", t.H2 = "h2", t.H3 = "h3", t.H4 = "h4", t.H5 = "h5", t.H6 = "h6", t.DIV = "div", t.PARAGRAPH = "p", t.SPAN = "span", t))(c || {});
|
|
@@ -60,7 +60,7 @@ const S = {
|
|
|
60
60
|
throw new Error("Rich-text prop cannot be used with the title variant.");
|
|
61
61
|
if (e.richText && e.variant === "subtitle")
|
|
62
62
|
throw new Error("Rich-text prop cannot be used with the subtitle variant.");
|
|
63
|
-
}), (s, N) => (
|
|
63
|
+
}), (s, N) => (d(), u(v(s.el), {
|
|
64
64
|
class: I(["b-typography", n.value]),
|
|
65
65
|
"data-testid": "typography"
|
|
66
66
|
}, {
|
|
@@ -77,7 +77,6 @@ export {
|
|
|
77
77
|
r as b,
|
|
78
78
|
c,
|
|
79
79
|
R as d,
|
|
80
|
-
m as i,
|
|
81
80
|
o as p
|
|
82
81
|
};
|
|
83
|
-
//# sourceMappingURL=typography.
|
|
82
|
+
//# sourceMappingURL=typography.DNzU41ah.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.DN5eC5ch.js","sources":["../../../core/src/components/typography/typography.types.ts","../../../vue2/src/utils/ts/dev-environment.ts","../../../vue2/src/utils/ts/print-development-warning.ts","../../../vue2/src/utils/ts/deprecate.ts","../../../vue2/src/components/typography/typography.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Use \"TITLE\" instead. */\n SUBTITLE = 'subtitle',\n TITLE = 'title',\n}\n\nexport enum BentoTypographyModifier {\n WIDE = 'wide',\n STRONGER = 'stronger',\n STRONGER_WIDE = 'stronger-wide',\n STRONGEST = 'strongest',\n STRONGEST_WIDE = 'strongest-wide',\n MEDIUM = 'm',\n LARGE = 'l',\n MOBILE = 'mobile',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyElement {\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n DIV = 'div',\n PARAGRAPH = 'p',\n SPAN = 'span',\n}\n","const DEV_ENVIROMENT_NAMES = ['development', 'DEVELOPMENT', 'dev', 'DEV'];\n\nexport const isDevelopmentEnviroment = () => DEV_ENVIROMENT_NAMES.includes(process.env.NODE_ENV);\n","import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n/**\n * Prints console.warn messages in development mode only.\n *\n * @see console.warn for what parameters you can use\n */\n\nexport function printDevelopmentWarning(...args: Parameters<typeof console.warn>) {\n if (isDevelopmentEnviroment()) {\n // eslint-disable-next-line no-console\n console.warn(...args);\n }\n}\n","import { printDevelopmentWarning } from './print-development-warning';\n\nconst DEPRECATION_STYLES = ['color: red', 'background: yellow'].join(';');\nconst shownMessages = new Set<string>();\n\n/**\n * Informs users about the deprecations in development mode only.\n *\n * @param title Indicates what is being deprecated.\n * @param deprecationMessage How to avoid the deprecation by giving an example of the alternatives. Backticks can be used to multi-line the message.\n * @param toBeRemovedInVersion The version it will be removed. Must be in X.Y.Z format.\n */\nexport function deprecate(title: string, deprecationMessage: string, toBeRemovedInVersion: string) {\n // If the message is already showing, don't show it again\n if (!shownMessages.has(title)) {\n printDevelopmentWarning(`%cDEPRECATED:\\x1b[0m ${title}`, DEPRECATION_STYLES);\n // Format multi-line descriptions with the backtick\n printDevelopmentWarning(`${deprecationMessage.replaceAll(' ', '').trim()}`);\n printDevelopmentWarning(`To be removed in: %c${toBeRemovedInVersion}`, DEPRECATION_STYLES);\n shownMessages.add(title);\n }\n}\n\n/**\n * Reset shownMessages set\n *\n * @deprecated For testing purposes only. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","<template>\n <component :is=\"el\" class=\"b-typography\" :class=\"conditionalClasses\" data-testid=\"typography\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted } from 'vue';\n import {\n BentoTypographyElement,\n BentoTypographyModifier,\n BentoTypographyVariant,\n } from '@/core/components/typography/typography.types';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el?: BentoTypographyElement | `${BentoTypographyElement}`;\n\n /**\n * Adds the large class modifier.\n * Applicable to the Title variant.\n */\n large?: boolean;\n\n /**\n * Adds the medium class modifier.\n * Applicable to the Title variant.\n */\n medium?: boolean;\n\n /**\n * Adds the rich-text modifier, which allows for the use of HTML tags inside typography.\n */\n richText?: boolean;\n\n /**\n * Adds the stronger class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n stronger?: boolean;\n\n /**\n * Adds the strongest class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n strongest?: boolean;\n\n /**\n * Sets the type of typography variant.\n * @values caption, body, title.\n */\n variant?: BentoTypographyVariant | `${BentoTypographyVariant}`;\n\n /**\n * Adds the medium class modifier.\n * Applicable to tje Body variant.\n */\n wide?: boolean;\n }>(),\n {\n el: BentoTypographyElement.PARAGRAPH,\n large: false,\n medium: false,\n stronger: false,\n strongest: false,\n variant: BentoTypographyVariant.BODY,\n wide: false,\n }\n );\n\n if (props.variant === BentoTypographyVariant.SUBTITLE) {\n deprecate(\n 'BentoTypography \"subtitle\" variant (BentoTypographyVariant.SUBTITLE)',\n `Use the \"title\" or \"BentoTypographyVariant.TITLE\" variant and (optionally) combine it with a size property. e.g. medium / large.\n <bento-typography :variant=\"BentoTypographyVariant.TITLE\" medium>`,\n '2.0.0'\n );\n }\n\n const conditionalClasses = computed(() => ({\n // Rich text\n ['b-typography--rich-text']: props.richText,\n // Caption\n [`b-typography--${BentoTypographyVariant.CAPTION}`]: props.variant === BentoTypographyVariant.CAPTION,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.wide,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.stronger,\n\n // Body\n [`b-typography--${BentoTypographyVariant.BODY}`]: props.variant === BentoTypographyVariant.BODY,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.BODY && props.wide,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.BODY && props.stronger,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGEST}`]:\n props.variant === BentoTypographyVariant.BODY && props.strongest,\n\n // Subtitle\n [`b-typography--${BentoTypographyVariant.SUBTITLE}`]: props.variant === BentoTypographyVariant.SUBTITLE,\n [`b-typography--${BentoTypographyVariant.SUBTITLE}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.SUBTITLE && props.stronger,\n\n // Title\n [`b-typography--${BentoTypographyVariant.TITLE}`]:\n props.variant === BentoTypographyVariant.TITLE && !props.medium && !props.large,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.MEDIUM}`]:\n props.variant === BentoTypographyVariant.TITLE && props.medium,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.LARGE}`]:\n props.variant === BentoTypographyVariant.TITLE && props.large,\n }));\n\n onMounted(() => {\n if (props.richText && props.el !== 'div') {\n throw new Error('Rich-text prop must be used with el=\"div\" for correct HTML semantics');\n }\n\n if (props.richText && props.variant === 'title') {\n throw new Error('Rich-text prop cannot be used with the title variant.');\n }\n\n if (props.richText && props.variant === 'subtitle') {\n throw new Error('Rich-text prop cannot be used with the subtitle variant.');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Typography component makes it easy to apply a default set of font weights, sizes and other text styles\n * easily to text. The variants and properties match with those found in Figma.\n *\n * For example, seeing text with the typography styling of\n *\n * @example\n * import { BentoTypography } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTypography },\n * template: `\n * <bento-typography>\n * ... text content\n * </bento-typography>\n * `\n * }\n */\n export default {\n name: 'bento-typography',\n inheritAttrs: true,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/typography/typography.scss\" />\n"],"names":["BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","__default__","props","__props","conditionalClasses","computed","onMounted"],"mappings":";;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YACAA,EAAA,gBAAA,iBACAA,EAAA,YAAA,aACAA,EAAA,iBAAA,kBACAA,EAAA,SAA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;AAGJ,UAAAA,EAAA,YAAAA,EAAA,YAAA;AACI,cAAA,IAAA,MAAA,0DAAA;AAAA,IACJ,CAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"typography.DNzU41ah.js","sources":["../../../core/src/components/typography/typography.types.ts","../../../vue2/src/utils/ts/dev-environment.ts","../../../vue2/src/utils/ts/print-development-warning.ts","../../../vue2/src/utils/ts/deprecate.ts","../../../vue2/src/components/typography/typography.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Use \"TITLE\" instead. */\n SUBTITLE = 'subtitle',\n TITLE = 'title',\n}\n\nexport enum BentoTypographyModifier {\n WIDE = 'wide',\n STRONGER = 'stronger',\n STRONGER_WIDE = 'stronger-wide',\n STRONGEST = 'strongest',\n STRONGEST_WIDE = 'strongest-wide',\n MEDIUM = 'm',\n LARGE = 'l',\n MOBILE = 'mobile',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyElement {\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n DIV = 'div',\n PARAGRAPH = 'p',\n SPAN = 'span',\n}\n","const DEV_ENVIROMENT_NAMES = ['development', 'DEVELOPMENT', 'dev', 'DEV'];\n\nexport const isDevelopmentEnviroment = () => DEV_ENVIROMENT_NAMES.includes(process.env.NODE_ENV);\n","import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n/**\n * Prints console.warn messages in development mode only.\n *\n * @see console.warn for what parameters you can use\n */\n\nexport function printDevelopmentWarning(...args: Parameters<typeof console.warn>) {\n if (isDevelopmentEnviroment()) {\n // eslint-disable-next-line no-console\n console.warn(...args);\n }\n}\n","import { printDevelopmentWarning } from './print-development-warning';\n\nconst DEPRECATION_STYLES = ['color: red', 'background: yellow'].join(';');\nconst shownMessages = new Set<string>();\n\n/**\n * Informs users about the deprecations in development mode only.\n *\n * @param title Indicates what is being deprecated.\n * @param deprecationMessage How to avoid the deprecation by giving an example of the alternatives. Backticks can be used to multi-line the message.\n * @param toBeRemovedInVersion The version it will be removed. Must be in X.Y.Z format.\n */\nexport function deprecate(title: string, deprecationMessage: string, toBeRemovedInVersion: string) {\n // If the message is already showing, don't show it again\n if (!shownMessages.has(title)) {\n printDevelopmentWarning(`%cDEPRECATED:\\x1b[0m ${title}`, DEPRECATION_STYLES);\n // Format multi-line descriptions with the backtick\n printDevelopmentWarning(`${deprecationMessage.replaceAll(' ', '').trim()}`);\n printDevelopmentWarning(`To be removed in: %c${toBeRemovedInVersion}`, DEPRECATION_STYLES);\n shownMessages.add(title);\n }\n}\n\n/**\n * Reset shownMessages set\n *\n * @deprecated For testing purposes only. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","<template>\n <component :is=\"el\" class=\"b-typography\" :class=\"conditionalClasses\" data-testid=\"typography\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted } from 'vue';\n import {\n BentoTypographyElement,\n BentoTypographyModifier,\n BentoTypographyVariant,\n } from '@/core/components/typography/typography.types';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el?: BentoTypographyElement | `${BentoTypographyElement}`;\n\n /**\n * Adds the large class modifier.\n * Applicable to the Title variant.\n */\n large?: boolean;\n\n /**\n * Adds the medium class modifier.\n * Applicable to the Title variant.\n */\n medium?: boolean;\n\n /**\n * Adds the rich-text modifier, which allows for the use of HTML tags inside typography.\n */\n richText?: boolean;\n\n /**\n * Adds the stronger class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n stronger?: boolean;\n\n /**\n * Adds the strongest class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n strongest?: boolean;\n\n /**\n * Sets the type of typography variant.\n * @values caption, body, title.\n */\n variant?: BentoTypographyVariant | `${BentoTypographyVariant}`;\n\n /**\n * Adds the medium class modifier.\n * Applicable to tje Body variant.\n */\n wide?: boolean;\n }>(),\n {\n el: BentoTypographyElement.PARAGRAPH,\n large: false,\n medium: false,\n stronger: false,\n strongest: false,\n variant: BentoTypographyVariant.BODY,\n wide: false,\n }\n );\n\n if (props.variant === BentoTypographyVariant.SUBTITLE) {\n deprecate(\n 'BentoTypography \"subtitle\" variant (BentoTypographyVariant.SUBTITLE)',\n `Use the \"title\" or \"BentoTypographyVariant.TITLE\" variant and (optionally) combine it with a size property. e.g. medium / large.\n <bento-typography :variant=\"BentoTypographyVariant.TITLE\" medium>`,\n '2.0.0'\n );\n }\n\n const conditionalClasses = computed(() => ({\n // Rich text\n ['b-typography--rich-text']: props.richText,\n // Caption\n [`b-typography--${BentoTypographyVariant.CAPTION}`]: props.variant === BentoTypographyVariant.CAPTION,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.wide,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.stronger,\n\n // Body\n [`b-typography--${BentoTypographyVariant.BODY}`]: props.variant === BentoTypographyVariant.BODY,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.BODY && props.wide,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.BODY && props.stronger,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGEST}`]:\n props.variant === BentoTypographyVariant.BODY && props.strongest,\n\n // Subtitle\n [`b-typography--${BentoTypographyVariant.SUBTITLE}`]: props.variant === BentoTypographyVariant.SUBTITLE,\n [`b-typography--${BentoTypographyVariant.SUBTITLE}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.SUBTITLE && props.stronger,\n\n // Title\n [`b-typography--${BentoTypographyVariant.TITLE}`]:\n props.variant === BentoTypographyVariant.TITLE && !props.medium && !props.large,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.MEDIUM}`]:\n props.variant === BentoTypographyVariant.TITLE && props.medium,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.LARGE}`]:\n props.variant === BentoTypographyVariant.TITLE && props.large,\n }));\n\n onMounted(() => {\n if (props.richText && props.el !== 'div') {\n throw new Error('Rich-text prop must be used with el=\"div\" for correct HTML semantics');\n }\n\n if (props.richText && props.variant === 'title') {\n throw new Error('Rich-text prop cannot be used with the title variant.');\n }\n\n if (props.richText && props.variant === 'subtitle') {\n throw new Error('Rich-text prop cannot be used with the subtitle variant.');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Typography component makes it easy to apply a default set of font weights, sizes and other text styles\n * easily to text. The variants and properties match with those found in Figma.\n *\n * For example, seeing text with the typography styling of\n *\n * @example\n * import { BentoTypography } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTypography },\n * template: `\n * <bento-typography>\n * ... text content\n * </bento-typography>\n * `\n * }\n */\n export default {\n name: 'bento-typography',\n inheritAttrs: true,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/typography/typography.scss\" />\n"],"names":["BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","__default__","props","__props","conditionalClasses","computed","onMounted"],"mappings":";;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAA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AI,EAAA,MAAA;AACI,UAAAJ,EAAA,YAAAA,EAAA,OAAA;AACI,cAAA,IAAA,MAAA,sEAAA;AAGJ,UAAAA,EAAA,YAAAA,EAAA,YAAA;AACI,cAAA,IAAA,MAAA,uDAAA;AAGJ,UAAAA,EAAA,YAAAA,EAAA,YAAA;AACI,cAAA,IAAA,MAAA,0DAAA;AAAA,IACJ,CAAA;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as n, computed as i, inject as c, readonly as u } from "vue";
|
|
2
|
-
import { p as d } from "./typography.
|
|
3
|
-
import { g as m } from "./generate-uid.
|
|
2
|
+
import { p as d } from "./typography.DNzU41ah.js";
|
|
3
|
+
import { g as m } from "./generate-uid.D-HFI38h.js";
|
|
4
4
|
const a = (t, e) => {
|
|
5
5
|
const o = t.value.findIndex((s) => s.id === e);
|
|
6
6
|
o !== -1 && t.value.splice(o, 1);
|
|
@@ -47,4 +47,4 @@ export {
|
|
|
47
47
|
l as t,
|
|
48
48
|
v as u
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=use-bento-toast-controller.
|
|
50
|
+
//# sourceMappingURL=use-bento-toast-controller.C2wUDcoc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-bento-toast-controller.
|
|
1
|
+
{"version":3,"file":"use-bento-toast-controller.C2wUDcoc.js","sources":["../../../vue2/src/composables/use-bento-toast-controller/toast-stack.ts","../../../vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.ts"],"sourcesContent":["import { computed, ref, type Ref } from 'vue';\nimport { generateUid } from '@/core/utils/ts';\nimport type { BentoToastItemsList, ToastStack } from './use-bento-toast-controller.types';\n\nconst dismissToast: (stack: Ref<BentoToastItemsList>, id: string) => void = (stack, id) => {\n const toastIndex = stack.value.findIndex(toast => toast.id === id);\n if (toastIndex !== -1) {\n stack.value.splice(toastIndex, 1);\n }\n};\n\nexport const toastStackInjectionKey = Symbol('toast-stack');\n\n/**\n * This utility creates a global reactive state to add new toasts and keep track of them.\n * @returns {ToastStack} An object that contains reactive stack property with all add toasts and a function to add new toasts\n */\nexport const createToastStack: () => ToastStack = () => {\n const stack = ref<BentoToastItemsList>([]);\n\n const addToast = params => {\n const id = generateUid('toast');\n const toast = {\n ...params,\n id,\n dismiss: () => dismissToast(stack, id),\n };\n\n stack.value.unshift(toast);\n\n return {\n dismiss: () => dismissToast(stack, id),\n };\n };\n\n return {\n // Even though stack is a reactive property, its content suppose to be only changed from this module.\n // For this reason we return \"stack\" as readonly prop, but also return methods that can affect \"stack\" content.\n stack: computed(() => Object.freeze(Array.from(stack.value))),\n /**\n * A function that allows to add new toasts\n * @param {Object} params Toast parameters\n * @param {String} params.text A text to display inside the toast\n * @param {Object} [params.action] An object that defines action parameters for the toast\n * @param {String} params.action.text An action button text\n * @param {Function} params.action.handler A callback that would be called when action button is clicked\n * @return {Object} An object that includes \"dismiss\" function to programatically dismiss the toast\n */\n addToast,\n };\n};\n","import { getCurrentInstance, inject, readonly, ref } from 'vue';\nimport { isVue2 } from 'vue-demi';\nimport { printDevelopmentWarning } from '../../utils/ts/print-development-warning';\nimport { toastStackInjectionKey } from './toast-stack';\nimport { UseBentoToastController } from './use-bento-toast-controller.types';\n\nexport function useBentoToastController(): UseBentoToastController {\n const toastStack = isVue2\n ? getCurrentInstance()?.proxy[toastStackInjectionKey]\n : inject(toastStackInjectionKey, null);\n if (!toastStack) {\n printDevelopmentWarning('Toast does not work without Vue.use(BentoPlugin, { withToast: true })');\n // Return placeholder functions so client code won't brake, but Toasts just won't show up\n return {\n stack: readonly(ref([])),\n addToast: () => ({\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- intentional empty function explained by the comment above\n dismiss: () => {},\n }),\n };\n }\n // Return a new object so unintentional reassigning its properties won't override a global state\n return { ...toastStack };\n}\n"],"names":["dismissToast","stack","id","toastIndex","toast","toastStackInjectionKey","createToastStack","ref","addToast","params","generateUid","computed","useBentoToastController","toastStack","inject","printDevelopmentWarning","readonly"],"mappings":";;;AAIA,MAAMA,IAAsE,CAACC,GAAOC,MAAO;AACvF,QAAMC,IAAaF,EAAM,MAAM,UAAU,CAASG,MAAAA,EAAM,OAAOF,CAAE;AACjE,EAAIC,MAAe,MACTF,EAAA,MAAM,OAAOE,GAAY,CAAC;AAExC,GAEaE,IAAyB,OAAO,aAAa,GAM7CC,IAAqC,MAAM;AAC9C,QAAAL,IAAQM,EAAyB,EAAE,GAEnCC,IAAW,CAAUC,MAAA;AACjB,UAAAP,IAAKQ,EAAY,OAAO,GACxBN,IAAQ;AAAA,MACV,GAAGK;AAAA,MACH,IAAAP;AAAA,MACA,SAAS,MAAMF,EAAaC,GAAOC,CAAE;AAAA,IACzC;AAEM,WAAAD,EAAA,MAAM,QAAQG,CAAK,GAElB;AAAA,MACH,SAAS,MAAMJ,EAAaC,GAAOC,CAAE;AAAA,IACzC;AAAA,EACJ;AAEO,SAAA;AAAA;AAAA;AAAA,IAGH,OAAOS,EAAS,MAAM,OAAO,OAAO,MAAM,KAAKV,EAAM,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAU5D,UAAAO;AAAA,EACJ;AACJ;AC5CO,SAASI,IAAmD;AACzD,QAAAC,IAEAC,EAAOT,GAAwB,IAAI;AACzC,SAAKQ,IAYE,EAAE,GAAGA,EAAW,KAXnBE,EAAwB,uEAAuE,GAExF;AAAA,IACH,OAAOC,EAAST,EAAI,CAAA,CAAE,CAAC;AAAA,IACvB,UAAU,OAAO;AAAA;AAAA,MAEb,SAAS,MAAM;AAAA,MAAA;AAAA,IACnB;AAAA,EACJ;AAIR;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as v, ref as P, onMounted as Oe, onUnmounted as xe, watch as Ie, defineComponent as W, resolveComponent as L,
|
|
1
|
+
import { computed as v, ref as P, onMounted as Oe, onUnmounted as xe, watch as Ie, defineComponent as W, resolveComponent as L, openBlock as f, createElementBlock as _, createVNode as B, withCtx as T, createTextVNode as G, toDisplayString as w, createElementVNode as K, renderSlot as z, mergeProps as U, withKeys as ve, createCommentVNode as Y, createBlock as D, withModifiers as Ye, normalizeProps as ee, guardReactiveProps as ne, withDirectives as ae, vShow as Ae, toRef as se, resolveDirective as pe, toHandlers as te, Fragment as J, renderList as F, createSlots as ie, normalizeClass as fe, unref as ce, normalizeStyle as Ke } from "vue";
|
|
2
2
|
import { B as x, a as Se } from "./keyboard-navigation.C3QMVRKY.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
|
-
import { B as Z } from "./typography.
|
|
5
|
-
import { B as qe } from "./loading-indicator.
|
|
6
|
-
import { B as We } from "./empty-state.
|
|
7
|
-
import { u as ue } from "./i18n.
|
|
4
|
+
import { B as Z } from "./typography.DNzU41ah.js";
|
|
5
|
+
import { B as qe } from "./loading-indicator.N_WV9Gwz.js";
|
|
6
|
+
import { B as We } from "./empty-state.DYfl7gnt.js";
|
|
7
|
+
import { u as ue } from "./i18n.CPGoe9tN.js";
|
|
8
8
|
import { d as je } from "./debounce.DUTu11PS.js";
|
|
9
|
-
import { B as Ce } from "./checkbox.D9FJcICR.js";
|
|
10
|
-
import { B as He } from "./base-button.DdNFlbgH.js";
|
|
11
|
-
import { C as Xe } from "./cross-small.Z5EKYRm0.js";
|
|
12
9
|
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { B as Ce } from "./checkbox.BphbrpUx.js";
|
|
11
|
+
import { a as He, C as Xe } from "./chevron-up.DQZG_BP3.js";
|
|
12
|
+
import { B as Je } from "./base-button.DgHMejMF.js";
|
|
13
|
+
import { C as Ze } from "./cross-small.CXWTuKA_.js";
|
|
14
|
+
import { d as Qe, e as he } from "./button-actions.C8CJcXxS.js";
|
|
15
15
|
import { o as et } from "./resize.Bqks3WUm.js";
|
|
16
16
|
import "../assets/use-cached-selected-values.css";
|
|
17
17
|
const $e = (e, t, a, c) => {
|
|
@@ -522,8 +522,8 @@ const Ct = {
|
|
|
522
522
|
BentoCheckbox: Ce,
|
|
523
523
|
BentoTypography: Z,
|
|
524
524
|
BentoListboxOption: de,
|
|
525
|
-
ChevronDownIcon:
|
|
526
|
-
ChevronUpIcon:
|
|
525
|
+
ChevronDownIcon: He,
|
|
526
|
+
ChevronUpIcon: Xe
|
|
527
527
|
},
|
|
528
528
|
props: {
|
|
529
529
|
/**
|
|
@@ -920,13 +920,13 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
920
920
|
(f(!0), _(J, null, F(e.items, (l) => (f(), _("div", {
|
|
921
921
|
key: `selected-${l.value}`
|
|
922
922
|
}, [
|
|
923
|
-
B(ce(
|
|
923
|
+
B(ce(Je), {
|
|
924
924
|
class: "b-listbox-multi-select-chips__chip",
|
|
925
925
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
926
926
|
onClick: (r) => u(l)
|
|
927
927
|
}, {
|
|
928
928
|
iconRight: T(() => [
|
|
929
|
-
B(ce(
|
|
929
|
+
B(ce(Ze), {
|
|
930
930
|
"svg-title": ce(c)("remove")
|
|
931
931
|
}, null, 8, ["svg-title"])
|
|
932
932
|
]),
|
|
@@ -1588,4 +1588,4 @@ export {
|
|
|
1588
1588
|
rs as c,
|
|
1589
1589
|
Mt as u
|
|
1590
1590
|
};
|
|
1591
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1591
|
+
//# sourceMappingURL=use-cached-selected-values.CvdhdRHz.js.map
|