@adyen/bento-vue2 1.84.2 → 1.85.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/components.d.ts +4 -0
- package/dist/@types/index.d.ts +244 -130
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +5 -0
- package/dist/ai-tag.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-tag.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
- package/dist/chunks/accordion-item.DeV8s0oW.js.map +1 -1
- package/dist/chunks/action-bar.rgLdy6Bu.js +163 -0
- package/dist/chunks/action-bar.rgLdy6Bu.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
- package/dist/chunks/ai-button.ggEcDV08.js +50 -0
- package/dist/chunks/ai-button.ggEcDV08.js.map +1 -0
- package/dist/chunks/ai-tag.DKMGiQcJ.js +74 -0
- package/dist/chunks/ai-tag.DKMGiQcJ.js.map +1 -0
- package/dist/chunks/alert.B3Pdp02a.js.map +1 -1
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/arrow-left.CRREfabP.js +24 -0
- package/dist/chunks/arrow-left.CRREfabP.js.map +1 -0
- package/dist/chunks/arrow-right.Dn3AYpUP.js +24 -0
- package/dist/chunks/arrow-right.Dn3AYpUP.js.map +1 -0
- package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js +24 -0
- package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js.map +1 -0
- package/dist/chunks/avatar.CUCH3CTc.js.map +1 -1
- package/dist/chunks/base-button.IN4bpcds.js.map +1 -1
- package/dist/chunks/{base-modal.KYkLKswF.js → base-modal.QsjzGei_.js} +5 -5
- package/dist/chunks/{base-modal.KYkLKswF.js.map → base-modal.QsjzGei_.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js → button-actions-with-menu.PL45aAcI.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js.map → button-actions-with-menu.PL45aAcI.js.map} +1 -1
- package/dist/chunks/{button-actions.D9n7MxWe.js → button-actions.JRDi9PFT.js} +2 -2
- package/dist/chunks/{button-actions.D9n7MxWe.js.map → button-actions.JRDi9PFT.js.map} +1 -1
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/button.DIU6m9wD.js.map +1 -1
- package/dist/chunks/{calendar.C8DpZ4Sr.js → calendar.B0SmuooF.js} +95 -89
- package/dist/chunks/{calendar.C8DpZ4Sr.js.map → calendar.B0SmuooF.js.map} +1 -1
- package/dist/chunks/{card.CLX0RGG6.js → card.CVkEg8m1.js} +2 -2
- package/dist/chunks/{card.CLX0RGG6.js.map → card.CVkEg8m1.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BCnhjQie.js → checkbox-group.DPZJjcdT.js} +4 -4
- package/dist/chunks/{checkbox-group.BCnhjQie.js.map → checkbox-group.DPZJjcdT.js.map} +1 -1
- package/dist/chunks/{checkbox.CU5ierOq.js → checkbox.D3D1I22O.js} +3 -3
- package/dist/chunks/{checkbox.CU5ierOq.js.map → checkbox.D3D1I22O.js.map} +1 -1
- package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -1
- package/dist/chunks/{code-snippet.9MwDHp50.js → code-snippet.BN5P-KQo.js} +4 -4
- package/dist/chunks/{code-snippet.9MwDHp50.js.map → code-snippet.BN5P-KQo.js.map} +1 -1
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +1 -1
- package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
- package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
- package/dist/chunks/{controls-group.D4eW9DtP.js → controls-group.BwXz0UYr.js} +2 -2
- package/dist/chunks/{controls-group.D4eW9DtP.js.map → controls-group.BwXz0UYr.js.map} +1 -1
- package/dist/chunks/{copy.C0q7xgXs.js → copy.BIh04KTY.js} +3 -3
- package/dist/chunks/{copy.C0q7xgXs.js.map → copy.BIh04KTY.js.map} +1 -1
- package/dist/chunks/country.types.DaVCMxk-.js.map +1 -1
- package/dist/chunks/currency.DYZr_RDk.js.map +1 -1
- package/dist/chunks/{dashboard-section.B83FdC0Z.js → dashboard-section.BvFMd9CQ.js} +3 -3
- package/dist/chunks/{dashboard-section.B83FdC0Z.js.map → dashboard-section.BvFMd9CQ.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DQGVy5T2.js → dashed-underline.CXyMT-cF.js} +3 -3
- package/dist/chunks/{dashed-underline.DQGVy5T2.js.map → dashed-underline.CXyMT-cF.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
- package/dist/chunks/{data-grid-template.BTEFoEwf.js → data-grid-template.wWWI3FE3.js} +3 -3
- package/dist/chunks/{data-grid-template.BTEFoEwf.js.map → data-grid-template.wWWI3FE3.js.map} +1 -1
- package/dist/chunks/{data-grid.Bk7_6Z0F.js → data-grid.Dcj_tU8q.js} +426 -419
- package/dist/chunks/data-grid.Dcj_tU8q.js.map +1 -0
- package/dist/chunks/date-input.BbZqj10S.js.map +1 -1
- package/dist/chunks/{date-picker.CnsC_UMG.js → date-picker.Dh3-TgPT.js} +4 -4
- package/dist/chunks/{date-picker.CnsC_UMG.js.map → date-picker.Dh3-TgPT.js.map} +1 -1
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.BOn_Xjkr.js +897 -0
- package/dist/chunks/date-range-picker.BOn_Xjkr.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date.DBWzp0So.js.map +1 -1
- package/dist/chunks/de.DvtL0g75.js.map +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
- package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
- package/dist/chunks/dialog-page.BegXhP0L.js +118 -0
- package/dist/chunks/dialog-page.BegXhP0L.js.map +1 -0
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
- package/dist/chunks/directive.Cbdox5VL.js.map +1 -1
- package/dist/chunks/divider.DX5gwN7p.js.map +1 -1
- package/dist/chunks/dropdown-default-textbox.Cq68tN9F.js.map +1 -1
- package/dist/chunks/{dropdown-tag.HBM0wrEV.js → dropdown-tag.C7Buz72U.js} +3 -3
- package/dist/chunks/{dropdown-tag.HBM0wrEV.js.map → dropdown-tag.C7Buz72U.js.map} +1 -1
- package/dist/chunks/{dropdown.C2pXf8Li.js → dropdown.ByH2zHxF.js} +5 -5
- package/dist/chunks/{dropdown.C2pXf8Li.js.map → dropdown.ByH2zHxF.js.map} +1 -1
- package/dist/chunks/empty-state.DpBnqAxu.js.map +1 -1
- package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
- package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
- package/dist/chunks/es.bz0mzkMq.js.map +1 -1
- package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
- package/dist/chunks/events.BQOQSSb7.js.map +1 -1
- package/dist/chunks/{field-label.CEkJnsiL.js → field-label.BKxm8ehO.js} +2 -2
- package/dist/chunks/{field-label.CEkJnsiL.js.map → field-label.BKxm8ehO.js.map} +1 -1
- package/dist/chunks/{file-uploader.CnOqfuI-.js → file-uploader.U7YUrGoM.js} +4 -4
- package/dist/chunks/file-uploader.U7YUrGoM.js.map +1 -0
- package/dist/chunks/filter-bar.BRE0djRy.js +3313 -0
- package/dist/chunks/filter-bar.BRE0djRy.js.map +1 -0
- package/dist/chunks/{focus-trap.CNIU5jOz.js → focus-trap.Ed8RY9cJ.js} +2 -2
- package/dist/chunks/{focus-trap.CNIU5jOz.js.map → focus-trap.Ed8RY9cJ.js.map} +1 -1
- package/dist/chunks/{footer-actions.BOiN47Xd.js → footer-actions.mS3IiJg7.js} +2 -2
- package/dist/chunks/{footer-actions.BOiN47Xd.js.map → footer-actions.mS3IiJg7.js.map} +1 -1
- package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
- package/dist/chunks/{form-layout-title.CdC1T4gs.js → form-layout-title.C3uKS3GA.js} +2 -2
- package/dist/chunks/{form-layout-title.CdC1T4gs.js.map → form-layout-title.C3uKS3GA.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
- package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
- package/dist/chunks/grab.BxiVZ1RZ.js +24 -0
- package/dist/chunks/grab.BxiVZ1RZ.js.map +1 -0
- package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -1
- package/dist/chunks/{header-meta.D_oAu2S9.js → header-meta.CQTfyEJR.js} +8 -8
- package/dist/chunks/{header-meta.D_oAu2S9.js.map → header-meta.CQTfyEJR.js.map} +1 -1
- package/dist/chunks/{header-with-views.Dc9LUYNY.js → header-with-views.-PRI2W3p.js} +383 -400
- package/dist/chunks/header-with-views.-PRI2W3p.js.map +1 -0
- package/dist/chunks/{header.BmtlQmPs.js → header.DDwoZ8fF.js} +3 -3
- package/dist/chunks/{header.BmtlQmPs.js.map → header.DDwoZ8fF.js.map} +1 -1
- package/dist/chunks/image.C2D2hKat.js.map +1 -1
- package/dist/chunks/index.B6WW_F-J.js.map +1 -1
- package/dist/chunks/{index.BDK4hwK_.js → index.Zfd79j1_.js} +3 -3
- package/dist/chunks/{index.BDK4hwK_.js.map → index.Zfd79j1_.js.map} +1 -1
- package/dist/chunks/{info-icon.BEyxQgD6.js → info-icon.gUcRjEyG.js} +3 -3
- package/dist/chunks/{info-icon.BEyxQgD6.js.map → info-icon.gUcRjEyG.js.map} +1 -1
- package/dist/chunks/{input-field-password.D23H_RvO.js → input-field-password.BO3EMjVD.js} +6 -6
- package/dist/chunks/{input-field-password.D23H_RvO.js.map → input-field-password.BO3EMjVD.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js → input-field-phone-number.DDQIkRdm.js} +3 -3
- package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js.map → input-field-phone-number.DDQIkRdm.js.map} +1 -1
- package/dist/chunks/{input-field.hf0_ALq0.js → input-field.BRIDLPBn.js} +3 -3
- package/dist/chunks/{input-field.hf0_ALq0.js.map → input-field.BRIDLPBn.js.map} +1 -1
- package/dist/chunks/{inspector.C0iAxxoz.js → inspector.DCda4tku.js} +3 -3
- package/dist/chunks/{inspector.C0iAxxoz.js.map → inspector.DCda4tku.js.map} +1 -1
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
- package/dist/chunks/isSameWeek.5sjhTHiU.js +14 -0
- package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.5sjhTHiU.js.map} +1 -1
- package/dist/chunks/{it.Oaj6BklL.js → it.DEniTaO2.js} +2 -2
- package/dist/chunks/{it.Oaj6BklL.js.map → it.DEniTaO2.js.map} +1 -1
- package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
- package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
- package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
- package/dist/chunks/{layout-row.BPX00mio.js → layout-row.BtCzzLTz.js} +3 -3
- package/dist/chunks/layout-row.BtCzzLTz.js.map +1 -0
- package/dist/chunks/link.PsTSQjK3.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.BlDz7oXK.js → listbox-option-tag.B63aT5Sq.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BlDz7oXK.js.map → listbox-option-tag.B63aT5Sq.js.map} +1 -1
- package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -1
- package/dist/chunks/match.CMBZxEs9.js.map +1 -1
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.B1gltlxA.js → modal-fullscreen.CRLZX72M.js} +4 -4
- package/dist/chunks/{modal-fullscreen.B1gltlxA.js.map → modal-fullscreen.CRLZX72M.js.map} +1 -1
- package/dist/chunks/{modal.e3EQ6Kex.js → modal.BnAZ8Nj1.js} +4 -4
- package/dist/chunks/{modal.e3EQ6Kex.js.map → modal.BnAZ8Nj1.js.map} +1 -1
- package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
- package/dist/chunks/{pagination.BcFt2FqK.js → pagination.spAA5CX0.js} +2 -2
- package/dist/chunks/{pagination.BcFt2FqK.js.map → pagination.spAA5CX0.js.map} +1 -1
- package/dist/chunks/payment-method.BKXLPDC9.js.map +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
- package/dist/chunks/popover.types.Zm8nugBw.js +6 -0
- package/dist/chunks/{popover.types.WDh5ggr3.js.map → popover.types.Zm8nugBw.js.map} +1 -1
- package/dist/chunks/{popper-container.Cdokz_NE.js → popper-container.CXUG6v_U.js} +2 -2
- package/dist/chunks/{popper-container.Cdokz_NE.js.map → popper-container.CXUG6v_U.js.map} +1 -1
- package/dist/chunks/{promo-banner.yfBorKj7.js → promo-banner.BkLMZH66.js} +2 -2
- package/dist/chunks/{promo-banner.yfBorKj7.js.map → promo-banner.BkLMZH66.js.map} +1 -1
- package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
- package/dist/chunks/{radio-group.CtTnfkYg.js → radio-group.B6-Fd_kH.js} +4 -4
- package/dist/chunks/{radio-group.CtTnfkYg.js.map → radio-group.B6-Fd_kH.js.map} +1 -1
- package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -1
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
- package/dist/chunks/{rich-text-editor.Dq2CFGOu.js → rich-text-editor.DeywBxSb.js} +4 -4
- package/dist/chunks/{rich-text-editor.Dq2CFGOu.js.map → rich-text-editor.DeywBxSb.js.map} +1 -1
- package/dist/chunks/{search-bar.B0SdQBnY.js → search-bar.BKRppqyI.js} +3 -3
- package/dist/chunks/{search-bar.B0SdQBnY.js.map → search-bar.BKRppqyI.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BPGpxd0p.js → secondary-nav.RQ5eRpPH.js} +3 -3
- package/dist/chunks/{secondary-nav.BPGpxd0p.js.map → secondary-nav.RQ5eRpPH.js.map} +1 -1
- package/dist/chunks/{segmented-control.BtWFda0P.js → segmented-control.BomURsCq.js} +2 -2
- package/dist/chunks/{segmented-control.BtWFda0P.js.map → segmented-control.BomURsCq.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.BryV14qP.js → selection-card-group.gh-fMA9T.js} +4 -4
- package/dist/chunks/{selection-card-group.BryV14qP.js.map → selection-card-group.gh-fMA9T.js.map} +1 -1
- package/dist/chunks/{sidepanel.NFyZGE57.js → sidepanel.B80Mujpk.js} +5 -5
- package/dist/chunks/{sidepanel.NFyZGE57.js.map → sidepanel.B80Mujpk.js.map} +1 -1
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.CM1KIrNi.js} +2 -2
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.CM1KIrNi.js.map} +1 -1
- package/dist/chunks/status.types.Cv5XN4zL.js.map +1 -1
- package/dist/chunks/step.BLFXvHL6.js.map +1 -1
- package/dist/chunks/{structured-list-item.CptOCpHP.js → structured-list-item.DCEKBtbT.js} +4 -4
- package/dist/chunks/{structured-list-item.CptOCpHP.js.map → structured-list-item.DCEKBtbT.js.map} +1 -1
- package/dist/chunks/success.DhioLvPD.js.map +1 -1
- package/dist/chunks/success.nNwxJRBS.js.map +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
- package/dist/chunks/{summary-grid.types.B1T8_k1m.js → summary-grid.types.BV8FDXGv.js} +5 -5
- package/dist/chunks/{summary-grid.types.B1T8_k1m.js.map → summary-grid.types.BV8FDXGv.js.map} +1 -1
- package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
- package/dist/chunks/tab.FUMpPsBP.js.map +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
- package/dist/chunks/{tag.B1Ywhgvc.js → tag.CroNYKsL.js} +2 -2
- package/dist/chunks/{tag.B1Ywhgvc.js.map → tag.CroNYKsL.js.map} +1 -1
- package/dist/chunks/{textarea.riUt0BiI.js → textarea.CtTdhV_G.js} +2 -2
- package/dist/chunks/{textarea.riUt0BiI.js.map → textarea.CtTdhV_G.js.map} +1 -1
- package/dist/chunks/{timeline-item.CFfW1DoD.js → timeline-item.DCWllef8.js} +6 -6
- package/dist/chunks/{timeline-item.CFfW1DoD.js.map → timeline-item.DCWllef8.js.map} +1 -1
- package/dist/chunks/toggle.227XgEc7.js.map +1 -1
- package/dist/chunks/{tooltip.C6YCavPw.js → tooltip.DxJQHsuI.js} +2 -2
- package/dist/chunks/{tooltip.C6YCavPw.js.map → tooltip.DxJQHsuI.js.map} +1 -1
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
- package/dist/chunks/{tutorial.D18LwXVy.js → tutorial.O_vT6Q2b.js} +7 -7
- package/dist/chunks/{tutorial.D18LwXVy.js.map → tutorial.O_vT6Q2b.js.map} +1 -1
- package/dist/chunks/typography.Bq-EGj9y.js.map +1 -1
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
- package/dist/chunks/use-bento-toast-controller.MmyZXtME.js.map +1 -1
- package/dist/chunks/{use-cached-selected-values.gDWGi5Nk.js → use-cached-selected-values.3YqO69wz.js} +14 -14
- package/dist/chunks/{use-cached-selected-values.gDWGi5Nk.js.map → use-cached-selected-values.3YqO69wz.js.map} +1 -1
- package/dist/chunks/use-country-items.ClS_So5N.js.map +1 -1
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -1
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
- package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.CgIooHto.js} +2 -2
- package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.CgIooHto.js.map} +1 -1
- package/dist/code-snippet.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 +6 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable-handle.js +157 -0
- package/dist/draggable-handle.js.map +1 -0
- package/dist/dropdown.js +3 -3
- 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-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +325 -321
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +11 -11
- package/dist/layout.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/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +5 -0
- package/dist/styles/bento-light.css +5 -0
- package/dist/styles/bento.css +5 -0
- package/dist/styles/legacy.css +5 -0
- package/dist/styles/styleguide.css +5 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +212 -6
- package/package.json +8 -8
- package/dist/chunks/action-bar.y4tcdk7R.js +0 -162
- package/dist/chunks/action-bar.y4tcdk7R.js.map +0 -1
- package/dist/chunks/ai-button.BEy4Gly-.js +0 -67
- package/dist/chunks/ai-button.BEy4Gly-.js.map +0 -1
- package/dist/chunks/constructNow.DuaJst0D.js +0 -8
- package/dist/chunks/data-grid.Bk7_6Z0F.js.map +0 -1
- package/dist/chunks/date-range-picker.B6GSRjjK.js +0 -1693
- package/dist/chunks/date-range-picker.B6GSRjjK.js.map +0 -1
- package/dist/chunks/dialog-page.QpRiNPyx.js +0 -137
- package/dist/chunks/dialog-page.QpRiNPyx.js.map +0 -1
- package/dist/chunks/file-uploader.CnOqfuI-.js.map +0 -1
- package/dist/chunks/filter-bar.CnJAxz9B.js +0 -2559
- package/dist/chunks/filter-bar.CnJAxz9B.js.map +0 -1
- package/dist/chunks/header-with-views.Dc9LUYNY.js.map +0 -1
- package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
- package/dist/chunks/layout-row.BPX00mio.js.map +0 -1
- package/dist/chunks/popover.types.WDh5ggr3.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.227XgEc7.js","sources":["../../src/components/toggle/toggle.types.ts","../../src/components/toggle/toggle.vue"],"sourcesContent":["export enum BentoTogglePropClass {\n LABEL_FIRST = 'label-first',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoToggleLabelPosition {\n BEFORE = 'before',\n AFTER = 'after',\n}\n","<template>\n <label class=\"b-toggle\" :class=\"conditionalClasses\" data-testid=\"label\">\n <input\n v-model=\"toggleInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedDescription\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly\"\n role=\"switch\"\n class=\"b-toggle__input\"\n type=\"checkbox\"\n @change=\"$event => onChange($event)\"\n @click=\"onClick\"\n />\n <span class=\"b-toggle__track\" aria-hidden=\"true\">\n <span class=\"b-toggle__handle\">\n <checkmark-small v-if=\"toggleInput\" />\n </span>\n </span>\n <span v-if=\"hasSlot('default')\" class=\"b-toggle__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" data-testid=\"inner-label\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n el=\"span\"\n variant=\"body\"\n class=\"b-toggle__description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRefs, useAttrs, useSlots, watch } from 'vue';\n import CheckmarkSmall from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import { BentoToggleLabelPosition, BentoTogglePropClass } from './toggle.types';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/core/utils/ts';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { getSlotText } from '@/utils/ts/get-slot-text/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the toggle. It is strongly recommended to pass such value when the toggle is used without a label\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n /**\n * Disable the toggle (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Position of the label relative to the toggle (optional)\n * @values before, after\n */\n labelPosition: {\n type: String as PropType<BentoToggleLabelPosition | `${BentoToggleLabelPosition}`>,\n default: BentoToggleLabelPosition.BEFORE,\n validator: (value: BentoToggleLabelPosition) => Object.values(BentoToggleLabelPosition).includes(value),\n },\n /**\n * Setting this property to true will set the toggle to read only state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * Indicates if the switch is \"on\" or \"off\"\n */\n value: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const toggleInput = ref(props.value);\n const descriptionId: string = generateUid('toggle-description');\n\n useDefaultSlotValidator('bento-toggle', slots.default, slots.description);\n\n const labelSlot = computed((): string | null => (hasSlot('default') ? getSlotText(slots)('default') : null));\n\n const ariaLabelAttribute = computed(() => attrs['aria-label'] as string);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: labelSlot,\n });\n\n const computedDescription = computed((): string | null => descriptionId ?? null);\n\n const conditionalClasses = computed((): { [key: string]: boolean } => ({\n [`b-toggle--${BentoTogglePropClass.LABEL_FIRST}`]: props.labelPosition === BentoToggleLabelPosition.BEFORE,\n 'b-toggle--disabled': props.disabled,\n 'b-toggle--readonly': props.readonly,\n }));\n\n const onChange = (event: Event) => {\n emit('input', (event.target as HTMLInputElement).checked);\n };\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n watch(\n () => props.value,\n newValue => {\n toggleInput.value = newValue;\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * A wrapper around the bento toggle, providing checkbox functionality with a knob-like toggle\n *\n * @usage\n * import { BentoToggle, BentoLabelPosition } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoToggle },\n * template: `\n * <bento-toggle\n * :value=\"toggleValue\"`\n * label-position=\"LabelPosition.BEFORE\"\n * @input=\"optionalHandler($event)\"\n * >\n * Label Text\n * </bento-toggle>\n * `,\n * }\n */\n export default {\n name: 'bento-toggle',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle.scss\" />\n"],"names":["BentoTogglePropClass","BentoTogglePropClass2","BentoToggleLabelPosition","BentoToggleLabelPosition2","__default__","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","toggleInput","ref","props","descriptionId","generateUid","useDefaultSlotValidator","labelSlot","computed","getSlotText","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","computedDescription","conditionalClasses","onChange","event","emit","onClick","watch","newValue"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"toggle.227XgEc7.js","sources":["../../src/components/toggle/toggle.types.ts","../../src/components/toggle/toggle.vue"],"sourcesContent":["export enum BentoTogglePropClass {\n LABEL_FIRST = 'label-first',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoToggleLabelPosition {\n BEFORE = 'before',\n AFTER = 'after',\n}\n","<template>\n <label class=\"b-toggle\" :class=\"conditionalClasses\" data-testid=\"label\">\n <input\n v-model=\"toggleInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedDescription\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly\"\n role=\"switch\"\n class=\"b-toggle__input\"\n type=\"checkbox\"\n @change=\"$event => onChange($event)\"\n @click=\"onClick\"\n />\n <span class=\"b-toggle__track\" aria-hidden=\"true\">\n <span class=\"b-toggle__handle\">\n <checkmark-small v-if=\"toggleInput\" />\n </span>\n </span>\n <span v-if=\"hasSlot('default')\" class=\"b-toggle__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" data-testid=\"inner-label\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n el=\"span\"\n variant=\"body\"\n class=\"b-toggle__description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRefs, useAttrs, useSlots, watch } from 'vue';\n import CheckmarkSmall from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import { BentoToggleLabelPosition, BentoTogglePropClass } from './toggle.types';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/core/utils/ts';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { getSlotText } from '@/utils/ts/get-slot-text/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the toggle. It is strongly recommended to pass such value when the toggle is used without a label\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n /**\n * Disable the toggle (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Position of the label relative to the toggle (optional)\n * @values before, after\n */\n labelPosition: {\n type: String as PropType<BentoToggleLabelPosition | `${BentoToggleLabelPosition}`>,\n default: BentoToggleLabelPosition.BEFORE,\n validator: (value: BentoToggleLabelPosition) => Object.values(BentoToggleLabelPosition).includes(value),\n },\n /**\n * Setting this property to true will set the toggle to read only state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * Indicates if the switch is \"on\" or \"off\"\n */\n value: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const toggleInput = ref(props.value);\n const descriptionId: string = generateUid('toggle-description');\n\n useDefaultSlotValidator('bento-toggle', slots.default, slots.description);\n\n const labelSlot = computed((): string | null => (hasSlot('default') ? getSlotText(slots)('default') : null));\n\n const ariaLabelAttribute = computed(() => attrs['aria-label'] as string);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: labelSlot,\n });\n\n const computedDescription = computed((): string | null => descriptionId ?? null);\n\n const conditionalClasses = computed((): { [key: string]: boolean } => ({\n [`b-toggle--${BentoTogglePropClass.LABEL_FIRST}`]: props.labelPosition === BentoToggleLabelPosition.BEFORE,\n 'b-toggle--disabled': props.disabled,\n 'b-toggle--readonly': props.readonly,\n }));\n\n const onChange = (event: Event) => {\n emit('input', (event.target as HTMLInputElement).checked);\n };\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n watch(\n () => props.value,\n newValue => {\n toggleInput.value = newValue;\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * A wrapper around the bento toggle, providing checkbox functionality with a knob-like toggle\n *\n * @usage\n * import { BentoToggle, BentoLabelPosition } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoToggle },\n * template: `\n * <bento-toggle\n * :value=\"toggleValue\"`\n * label-position=\"LabelPosition.BEFORE\"\n * @input=\"optionalHandler($event)\"\n * >\n * Label Text\n * </bento-toggle>\n * `,\n * }\n */\n export default {\n name: 'bento-toggle',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle.scss\" />\n"],"names":["BentoTogglePropClass","BentoTogglePropClass2","BentoToggleLabelPosition","BentoToggleLabelPosition2","__default__","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","toggleInput","ref","props","descriptionId","generateUid","useDefaultSlotValidator","labelSlot","computed","getSlotText","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","computedDescription","conditionalClasses","onChange","event","emit","onClick","watch","newValue"],"mappings":";;;;;;;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACuJR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlHAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAL,CAAA,GA+CAM,IAAAC,EAAAC,EAAA,KAAA,GACAC,IAAAC,EAAA,oBAAA;AAEA,IAAAC,EAAA,gBAAAX,EAAA,SAAAA,EAAA,WAAA;AAEA,UAAAY,IAAAC,EAAA,MAAAT,EAAA,SAAA,IAAAU,EAAAd,CAAA,EAAA,SAAA,IAAA,IAAA,GAEAe,IAAAF,EAAA,MAAAX,EAAA,YAAA,CAAA,GACA,EAAA,WAAAc,EAAA,IAAAC,EAAAT,CAAA,GACAU,IAAAC,EAAA;AAAA,MAAuC,WAAAJ,EAAA;AAAA;AAAA,MACL,OAAAC;AAAA,MAEvB,iBAAAJ;AAAA,IACU,CAAA,GAGrBQ,IAAAP,EAAA,MAAAJ,KAAA,IAAA,GAEAY,IAAAR,EAAA,OAAA;AAAA,MAAuE,CAAA,aAAAlB,EAAA,WAAA,EAAA,GAAAa,EAAA,kBAAAX,EAAA;AAAA,MACiC,sBAAAW,EAAA;AAAA,MACxE,sBAAAA,EAAA;AAAA,IACA,EAAA,GAGhCc,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,SAAAD,EAAA,OAAA,OAAA;AAAA,IAAwD,GAI5DE,IAAA,CAAAF,MAAA;AACI,MAAAf,EAAA,YACIe,EAAA,eAAA;AAAA,IACJ;AAGJ,WAAAG;AAAA,MAAA,MAAAlB,EAAA;AAAA,MACgB,CAAAmB,MAAA;AAER,QAAArB,EAAA,QAAAqB;AAAA,MAAoB;AAAA,IACxB;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as O, computed as y, reactive as C, nextTick as D } from "vue";
|
|
2
2
|
import { l as r } from "./events.BQOQSSb7.js";
|
|
3
3
|
import { g as R } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { a as g, c as B, P as N } from "./popper-container.
|
|
4
|
+
import { a as g, c as B, P as N } from "./popper-container.CXUG6v_U.js";
|
|
5
5
|
import { V as $ } from "./index.Cl4_42j5.js";
|
|
6
6
|
import { B as I } from "./typography.Bq-EGj9y.js";
|
|
7
7
|
import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
@@ -186,4 +186,4 @@ export {
|
|
|
186
186
|
h as c,
|
|
187
187
|
x as d
|
|
188
188
|
};
|
|
189
|
-
//# sourceMappingURL=tooltip.
|
|
189
|
+
//# sourceMappingURL=tooltip.DxJQHsuI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.C6YCavPw.js","sources":["../../src/directives/tooltip/tooltip.types.ts","../../src/types/utils-events.ts","../../src/components/internal/tooltip/tooltip.types.ts","../../src/components/internal/tooltip/tooltip.vue","../../src/directives/tooltip/tooltip.ts"],"sourcesContent":["import type { DirectiveBinding } from 'vue/types/options';\nimport { PopperContainerPositionBasic } from '../../components/popper-container/popper-container.types';\n\nexport interface BentoTooltipDirectiveBinding extends Readonly<DirectiveBinding> {\n readonly value: string;\n}\n\nexport const BentoTooltipPosition = { ...PopperContainerPositionBasic };\nexport type BentoTooltipPosition = PopperContainerPositionBasic;\n\nexport enum BentoTooltipState {\n HIDDEN = 'hidden',\n}\n","import type { Vue } from 'vue-demi';\n\nexport interface ListenOptions {\n capture?: boolean;\n passive?: boolean;\n once?: boolean;\n self?: boolean;\n vm?: Vue;\n onCleanup?: () => void;\n}\n\nexport enum EventKey {\n ESCAPE = 'Escape',\n ENTER = 'Enter',\n ARROW_LEFT = 'ArrowLeft',\n ARROW_UP = 'ArrowUp',\n ARROW_RIGHT = 'ArrowRight',\n ARROW_DOWN = 'ArrowDown',\n PAGE_UP = 'PageUp',\n PAGE_DOWN = 'PageDown',\n END = 'End',\n HOME = 'Home',\n TAB = 'Tab',\n}\n\n/**\n * @deprecated `Event.keyCode` is deprecated. Use `EventKey` instead\n */\nexport enum KeyCode {\n ESCAPE = 27,\n ENTER = 13,\n ARROW_LEFT = 37,\n ARROW_UP = 38,\n ARROW_RIGHT = 39,\n ARROW_DOWN = 40,\n PAGE_UP = 33,\n PAGE_DOWN = 34,\n END = 35,\n HOME = 36,\n}\n","import { PopperContainerPositionBasic } from '../../popper-container/popper-container.types';\n\nexport const BentoTooltipPosition = { ...PopperContainerPositionBasic };\nexport type BentoTooltipPosition = PopperContainerPositionBasic;\n\nexport enum BentoTooltipState {\n HIDDEN = 'hidden',\n}\n","<template>\n <popper-container\n :id=\"id\"\n :aria-role=\"PopperContainerAriaRole.TOOLTIP\"\n :arrow=\"{ classes: ['b-tooltip__arrow'] }\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :is-hidden=\"!isShown\"\n :offset=\"[0, 4]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n :disabled-focus-trap=\"disabledFocusTrap\"\n class=\"b-tooltip\"\n >\n <bento-typography el=\"span\" variant=\"caption\">\n {{ content }}\n </bento-typography>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import type {} from '@floating-ui/vue';\n import { computed, type PropType } from 'vue';\n import { BentoTooltipPosition, BentoTooltipState } from './tooltip.types';\n import { type FallbackPositionProp, PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import { BentoTypography } from '@/components/typography';\n import { type VueNodeElement } from '@/types/elements';\n\n const props = defineProps({\n /**\n * The tooltip's id. Necessary for accessibility purposes.\n */\n id: { type: String, default: null },\n /**\n * Tooltip's target reference to the DOM element or Vue component.\n * The tooltip will position itself relatively to target element, in the specified position.\n */\n targetElement: { type: [Element, Object] as PropType<VueNodeElement>, required: true },\n /**\n * Tooltip's position relative to the target element.\n * Possible values are: 'top', 'bottom', 'left' and 'right'.\n */\n position: {\n type: String as PropType<BentoTooltipPosition>,\n default: BentoTooltipPosition.TOP,\n validator: value => Object.values(BentoTooltipPosition).includes(value as BentoTooltipPosition),\n },\n /**\n * Tooltip's offset.\n * If specified, the tooltip will have an offset in pixels between it and the target element\n * in specified position.\n */\n offset: { type: Number, default: 0 },\n /**\n * Tooltip's text content.\n */\n content: { type: String, required: true },\n /**\n * Shows / Hides the Tooltip component\n */\n isShown: { type: Boolean, default: false },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * @see {@link https://floating-ui.com/docs/flip#fallbackplacements}\n */\n fallbackPosition: {\n type: [Array, String] as PropType<FallbackPositionProp>,\n default: () => ['top', 'bottom', 'right', 'left'],\n },\n\n /**\n * Disables focus-trap for tooltip.\n * Useful for maintaining focus on the target element.\n */\n disabledFocusTrap: { type: Boolean, default: false },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-tooltip--${BentoTooltipState.HIDDEN}`]: !props.isShown,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Tooltip container, to be used internally to render the tooltip container where the text is shown.\n */\n export default {\n name: 'tooltip',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tooltip.scss\" />\n","import { nextTick, reactive } from 'vue';\nimport { listen } from '@/utils/ts/events';\nimport { generateUid } from '@/core/utils/ts';\nimport { EventKey } from '@/types/utils-events';\nimport { BentoTooltipPosition } from './tooltip.types';\nimport { type BentoTooltipDirectiveBinding } from './tooltip.types';\nimport { createApp, h, isVue2, isVue3, Vue2 } from 'vue-demi';\nimport Tooltip from '@/internal/tooltip/tooltip.vue';\n\ninterface TooltipInstance {\n target: HTMLElement;\n content: string;\n position: BentoTooltipPosition;\n removeListeners: Array<() => void>;\n}\n\n/**\n * Tooltip directive to render a tooltip on a given HTML element or component.\n *\n * @usage\n * import { BentoTooltipDirective, BentoTooltipPosition } from '@adyen/bento-vue2';\n *\n * export default {\n * directives: { BentoTooltipDirective },\n * template: `\n * <bento-button\n * v-bento-tooltip-directive:BentoTooltipPosition.BOTTOM=\"refToTextContent\"\n * >\n * Button text\n * </bento-button>\n * `,\n * }\n */\nconst tooltipInstances: Array<TooltipInstance> = [];\nconst ariaDescribedByAttr = 'aria-describedby';\nconst tooltipId = generateUid('tooltip');\n\nlet tooltipVNode;\n\n// Reusable Tooltip component instance.\nlet tooltip;\n// Global visibility state to prevent tooltips from showing after it being instructed to hide\nlet open = false;\n\nconst tooltipProps = reactive({\n targetElement: null,\n content: 'START_MESSAGE',\n id: tooltipId,\n position: undefined,\n isShown: false,\n});\n\n/**\n * Creates a new Tooltip component instance and inserts it into DOM.\n * @param {HTMLElement} el the target element for the Tooltip\n * @internal\n */\nconst createTooltip = (el: HTMLElement) => {\n // Sets the target's tabindex so as to make the tooltip interactive via keyboard navigation\n el.setAttribute('tabindex', '0');\n\n if (isVue2) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Type error for Vue method in Vue 3 but this code only executes in vue 2 so ignoring.\n const TooltipComponent = Vue2.extend(Tooltip);\n tooltip = new TooltipComponent({ propsData: { targetElement: el, content: '', id: tooltipId } }).$mount();\n document.body.appendChild(tooltip.$el);\n } else {\n tooltipProps.targetElement = el;\n tooltip = createApp({\n components: { Tooltip },\n setup() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Type error for h method in Vue 2 but this code only executes in vue 3 so ignoring.\n return () => h(Tooltip, { ...tooltipProps }, '');\n },\n });\n tooltipVNode = document.createElement('div');\n tooltipVNode.id = 'tooltip-parent';\n document.body.appendChild(tooltipVNode);\n tooltip.mount('#tooltip-parent');\n }\n};\n\n/**\n * Removes Tooltip component instance from the DOM and destroys it.\n * @internal\n */\nconst destroyTooltip = () => {\n if (isVue2) {\n if (document.contains(tooltip.$el)) {\n document.body.removeChild(tooltip.$el);\n }\n tooltip.$destroy();\n } else {\n tooltip.unmount();\n if (document.contains(tooltipVNode)) {\n document.body.removeChild(tooltipVNode);\n }\n }\n\n tooltip = undefined;\n};\n\n/**\n * Returns tooltip position based on the specified argument.\n * By default returns 'top' if no argument is specified.\n * @param {BentoTooltipDirectiveBinding} binding Directive binding object.\n * @returns {string} Tooltip position.\n * @internal\n */\nconst getTooltipPosition = (binding: BentoTooltipDirectiveBinding): BentoTooltipPosition =>\n Object.values(BentoTooltipPosition).includes(binding.arg as BentoTooltipPosition)\n ? (binding.arg as BentoTooltipPosition)\n : BentoTooltipPosition.TOP;\n\n/**\n * Get the correct Tooltip instance for the given target element\n * @param {HTMLElement} el the target element for the Tooltip\n * @returns\n */\nconst getTooltipInstanceForTarget = (el: HTMLElement): TooltipInstance =>\n tooltipInstances.find(\n ctx =>\n // isEqualNode doesn't work correct for svg element, hence the second check here\n ctx.target.isEqualNode(el) && ctx.target === el\n );\n\n/**\n * On mouse enter event updates tooltip with correct content and position, and shows tooltip.\n * @param {?HTMLElement} el - Target element\n * @internal\n */\nconst showTooltip = (el?: HTMLElement) => {\n const tooltipInstance = getTooltipInstanceForTarget(el);\n\n // If tooltip content is empty – do not show the tooltip\n if (!tooltipInstance.content || !el) {\n return;\n }\n\n if (el) {\n el.setAttribute(ariaDescribedByAttr, tooltipId);\n }\n\n // If the Tooltip is inside a dialog, move tooltip element inside of it\n // It gets restored to <body> when it gets hidden\n let isDialogOpen = false;\n document.querySelectorAll('dialog').forEach(node => {\n isDialogOpen = node?.open || isDialogOpen;\n });\n\n if (isDialogOpen) {\n if (isVue2) {\n el.after(tooltip.$el);\n // eslint-disable-next-line no-underscore-dangle\n } else if (tooltip?._instance?.vnode?.el) {\n // eslint-disable-next-line no-underscore-dangle\n el.after(tooltip?._instance?.vnode?.el);\n }\n isDialogOpen = false;\n }\n\n open = true;\n\n tooltip.content = tooltipInstance.content;\n tooltip.position = tooltipInstance.position;\n\n tooltipProps.content = tooltipInstance.content;\n tooltipProps.position = tooltipInstance.position;\n\n // Do calculations on a next tick, otherwise tooltip position calculations will be wrong\n nextTick(() => {\n // Do not open tooltip if it has been instructed to hide in process\n if (!open) {\n return;\n }\n tooltip.targetElement = el;\n tooltip.isShown = true;\n\n tooltipProps.targetElement = el;\n tooltipProps.isShown = true;\n });\n};\n\n/**\n * On mouse leave event hides the tooltip.\n * @internal\n */\nconst hideTooltip = (el?: HTMLElement) => {\n // Restore the tooltip element to body if it got move out of <body>\n if (tooltip.$el?.parentElement?.tagName && tooltip.$el?.parentElement?.tagName !== 'BODY') {\n document.body.appendChild(tooltip.$el);\n }\n\n open = false;\n tooltip.isShown = false;\n tooltipProps.isShown = false;\n if (el) {\n el.removeAttribute(ariaDescribedByAttr);\n }\n};\n\nconst tooltipBind = (el: HTMLElement, binding: BentoTooltipDirectiveBinding) => {\n // eslint-disable-next-line no-prototype-builtins\n if (!binding.hasOwnProperty('value') || binding.value) {\n // Create Tooltip component singleton instance\n if (tooltipInstances.length === 0) {\n createTooltip(el);\n }\n\n const show = () => showTooltip(el);\n const hide = () => hideTooltip(el);\n\n // Create and store context object, which has directive related handlers and content.\n const tooltipInstance: TooltipInstance = {\n target: el,\n content: binding.value,\n position: getTooltipPosition(binding),\n removeListeners: [\n listen(el, 'mouseenter', show),\n listen(el, 'mouseleave', hide),\n listen(el, 'focus', () => {\n if (el.matches(':focus-visible')) {\n show();\n }\n }),\n listen(el, 'blur', evt => {\n const focusEvent = <FocusEvent>evt;\n\n // when blurred and it transitions to the tooltip via screenreader, it should not close\n if ((focusEvent.relatedTarget as Element)?.getAttribute('role') !== 'tooltip') {\n hide();\n }\n }),\n listen(el, 'keydown', evt => {\n const keyboardEvent = <KeyboardEvent>evt;\n if (keyboardEvent.key === EventKey.ESCAPE) {\n hide();\n }\n }),\n ],\n };\n\n tooltipInstances.push(tooltipInstance);\n }\n};\n\nconst tooltipUpdate = (el: HTMLElement, binding: BentoTooltipDirectiveBinding) => {\n const tooltipInstance = getTooltipInstanceForTarget(el);\n if (tooltipInstance) {\n // Update tooltip content value if it is changed\n if (tooltipInstance?.content !== binding.value) {\n tooltipInstance.content = binding.value;\n // If tooltip is currently shown for current element – update tooltip's content value\n if (tooltip.isShown && tooltip.targetElement.isEqualNode(el)) {\n if (!tooltipInstance.content) {\n tooltip.isShown = false;\n } else {\n tooltip.content = binding.value;\n }\n\n // This forces the tooltip to refresh and update content in Vue3\n if (isVue3) {\n hideTooltip(el);\n showTooltip(el);\n }\n }\n }\n // Update tooltip position if it is changed\n if (tooltipInstance.position !== binding.arg) {\n const position = getTooltipPosition(binding);\n tooltipInstance.position = position;\n tooltip.position = position;\n }\n } else if (!tooltipInstance && binding.value) {\n // If I don't have a tooltip instance yet but the value passed was updated\n tooltipBind(el, binding);\n }\n};\n\nconst tooltipUnbind = (el: HTMLElement) => {\n const context = getTooltipInstanceForTarget(el);\n\n // Prevent unbinding/removing when there's nothing to unbind, leads to stack overflow errors\n if (!context) {\n return;\n }\n\n context.removeListeners.forEach(removeListener => {\n removeListener();\n });\n\n // If el is removed while tooltip is displayed, the tooltip doesnt hide as\n // there is no el to trigger mouseleave/blur.\n hideTooltip();\n\n tooltipInstances.splice(tooltipInstances.indexOf(context), 1);\n\n // If all the elements using the directive are removed, then no point having\n // the component on the page.\n if (tooltipInstances.length === 0) {\n destroyTooltip();\n }\n};\n\n/**\n * This directive allows you to bind a tooltip to an element.\n * Tooltip can be configured to be shown in one of four positions: 'top', 'left', 'right' and 'bottom'.\n *\n * @example\n * import { BentoTooltipDirective as BentoTooltip, BentoTooltipPosition } from '@adyen/bento-vue2';\n *\n * export default {\n * directives: { BentoTooltip },\n * methods: {\n * contentExpression() {\n * return 'tooltip content';\n * },\n * },\n * template: `<div>\n * <div v-bento-tooltip:left=\"refToTooltipContent\"></div>\n * <div v-bento-tooltip:[TooltipPosition.BOTTOM]=\"refToTooltipContent\"></div>\n *\n * <!-- If you don't specify the position then by default it's `TooltipPosition.TOP` -->\n * <div v-bento-tooltip=\"refToTooltipContent\"></div>\n *\n * <!-- Tooltip content can also be a data property or a method or a computed property as well -->\n * <div v-bento-tooltip=\"contentExpression()\"></div>\n * </div>`,\n * };\n */\nexport const BentoTooltipDirective = {\n // Vue 2 Directive hooks\n bind(el, binding) {\n tooltipBind(el, binding);\n },\n update(el, binding) {\n tooltipUpdate(el, binding);\n },\n unbind(el) {\n tooltipUnbind(el);\n },\n // Vue 3 Directive hooks\n beforeMount(el, binding) {\n tooltipBind(el, binding);\n },\n mounted(el, binding) {\n tooltipUpdate(el, binding);\n },\n updated(el, binding) {\n tooltipUpdate(el, binding);\n },\n unmounted(el) {\n tooltipUnbind(el);\n },\n};\n"],"names":["BentoTooltipPosition$1","PopperContainerPositionBasic","BentoTooltipState$1","BentoTooltipState2","EventKey","EventKey2","BentoTooltipPosition","BentoTooltipState","__default__","conditionalClasses","computed","props","tooltipInstances","ariaDescribedByAttr","tooltipId","generateUid","tooltip","open","tooltipProps","reactive","createTooltip","el","TooltipComponent","Vue2","Tooltip","destroyTooltip","getTooltipPosition","binding","getTooltipInstanceForTarget","ctx","showTooltip","tooltipInstance","isDialogOpen","node","nextTick","hideTooltip","_b","_a","_d","_c","tooltipBind","show","hide","listen","evt","tooltipUpdate","position","tooltipUnbind","context","removeListener","BentoTooltipDirective"],"mappings":";;;;;;;;AAOa,MAAAA,IAAA,EAAA,GAAAC,EAAA;AAGD,IAAAC,IAAA,kBAAAC,OACRA,EAAA,SAAA,UADQA,IAAAD,KAAA,CAAA,CAAA,GCCAE,IAAA,kBAAAC,O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CAAA;AAGA,EAAA2B,MAIAA,EAAA,gBAAA,QAAA,CAAAC,MAAA;AACI,IAAAA,EAAA;AAAA,EAAe,CAAA,GAKnBd,EAAA,GAEAvB,EAAA,OAAAA,EAAA,QAAAoC,CAAA,GAAA,CAAA,GAIApC,EAAA,WAAA,KACIa,EAAA;AAER,GA4BOyB,IAAA;AAAA;AAAA,EAA8B,KAAA7B,GAAAM,GAAA;AAG7B,IAAAa,EAAAnB,GAAAM,CAAA;AAAA,EAAuB;AAAA,EAC3B,OAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,OAAAN,GAAA;AAEI,IAAA0B,EAAA1B,CAAA;AAAA,EAAgB;AAAA;AAAA,EACpB,YAAAA,GAAAM,GAAA;AAGI,IAAAa,EAAAnB,GAAAM,CAAA;AAAA,EAAuB;AAAA,EAC3B,QAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,QAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,UAAAN,GAAA;AAEI,IAAA0B,EAAA1B,CAAA;AAAA,EAAgB;AAExB;"}
|
|
1
|
+
{"version":3,"file":"tooltip.DxJQHsuI.js","sources":["../../src/directives/tooltip/tooltip.types.ts","../../src/types/utils-events.ts","../../src/components/internal/tooltip/tooltip.types.ts","../../src/components/internal/tooltip/tooltip.vue","../../src/directives/tooltip/tooltip.ts"],"sourcesContent":["import type { DirectiveBinding } from 'vue/types/options';\nimport { PopperContainerPositionBasic } from '../../components/popper-container/popper-container.types';\n\nexport interface BentoTooltipDirectiveBinding extends Readonly<DirectiveBinding> {\n readonly value: string;\n}\n\nexport const BentoTooltipPosition = { ...PopperContainerPositionBasic };\nexport type BentoTooltipPosition = PopperContainerPositionBasic;\n\nexport enum BentoTooltipState {\n HIDDEN = 'hidden',\n}\n","import type { Vue } from 'vue-demi';\n\nexport interface ListenOptions {\n capture?: boolean;\n passive?: boolean;\n once?: boolean;\n self?: boolean;\n vm?: Vue;\n onCleanup?: () => void;\n}\n\nexport enum EventKey {\n ESCAPE = 'Escape',\n ENTER = 'Enter',\n ARROW_LEFT = 'ArrowLeft',\n ARROW_UP = 'ArrowUp',\n ARROW_RIGHT = 'ArrowRight',\n ARROW_DOWN = 'ArrowDown',\n PAGE_UP = 'PageUp',\n PAGE_DOWN = 'PageDown',\n END = 'End',\n HOME = 'Home',\n TAB = 'Tab',\n}\n\n/**\n * @deprecated `Event.keyCode` is deprecated. Use `EventKey` instead\n */\nexport enum KeyCode {\n ESCAPE = 27,\n ENTER = 13,\n ARROW_LEFT = 37,\n ARROW_UP = 38,\n ARROW_RIGHT = 39,\n ARROW_DOWN = 40,\n PAGE_UP = 33,\n PAGE_DOWN = 34,\n END = 35,\n HOME = 36,\n}\n","import { PopperContainerPositionBasic } from '../../popper-container/popper-container.types';\n\nexport const BentoTooltipPosition = { ...PopperContainerPositionBasic };\nexport type BentoTooltipPosition = PopperContainerPositionBasic;\n\nexport enum BentoTooltipState {\n HIDDEN = 'hidden',\n}\n","<template>\n <popper-container\n :id=\"id\"\n :aria-role=\"PopperContainerAriaRole.TOOLTIP\"\n :arrow=\"{ classes: ['b-tooltip__arrow'] }\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :is-hidden=\"!isShown\"\n :offset=\"[0, 4]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n :disabled-focus-trap=\"disabledFocusTrap\"\n class=\"b-tooltip\"\n >\n <bento-typography el=\"span\" variant=\"caption\">\n {{ content }}\n </bento-typography>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import type {} from '@floating-ui/vue';\n import { computed, type PropType } from 'vue';\n import { BentoTooltipPosition, BentoTooltipState } from './tooltip.types';\n import { type FallbackPositionProp, PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import { BentoTypography } from '@/components/typography';\n import { type VueNodeElement } from '@/types/elements';\n\n const props = defineProps({\n /**\n * The tooltip's id. Necessary for accessibility purposes.\n */\n id: { type: String, default: null },\n /**\n * Tooltip's target reference to the DOM element or Vue component.\n * The tooltip will position itself relatively to target element, in the specified position.\n */\n targetElement: { type: [Element, Object] as PropType<VueNodeElement>, required: true },\n /**\n * Tooltip's position relative to the target element.\n * Possible values are: 'top', 'bottom', 'left' and 'right'.\n */\n position: {\n type: String as PropType<BentoTooltipPosition>,\n default: BentoTooltipPosition.TOP,\n validator: value => Object.values(BentoTooltipPosition).includes(value as BentoTooltipPosition),\n },\n /**\n * Tooltip's offset.\n * If specified, the tooltip will have an offset in pixels between it and the target element\n * in specified position.\n */\n offset: { type: Number, default: 0 },\n /**\n * Tooltip's text content.\n */\n content: { type: String, required: true },\n /**\n * Shows / Hides the Tooltip component\n */\n isShown: { type: Boolean, default: false },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * @see {@link https://floating-ui.com/docs/flip#fallbackplacements}\n */\n fallbackPosition: {\n type: [Array, String] as PropType<FallbackPositionProp>,\n default: () => ['top', 'bottom', 'right', 'left'],\n },\n\n /**\n * Disables focus-trap for tooltip.\n * Useful for maintaining focus on the target element.\n */\n disabledFocusTrap: { type: Boolean, default: false },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-tooltip--${BentoTooltipState.HIDDEN}`]: !props.isShown,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Tooltip container, to be used internally to render the tooltip container where the text is shown.\n */\n export default {\n name: 'tooltip',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tooltip.scss\" />\n","import { nextTick, reactive } from 'vue';\nimport { listen } from '@/utils/ts/events';\nimport { generateUid } from '@/core/utils/ts';\nimport { EventKey } from '@/types/utils-events';\nimport { BentoTooltipPosition } from './tooltip.types';\nimport { type BentoTooltipDirectiveBinding } from './tooltip.types';\nimport { createApp, h, isVue2, isVue3, Vue2 } from 'vue-demi';\nimport Tooltip from '@/internal/tooltip/tooltip.vue';\n\ninterface TooltipInstance {\n target: HTMLElement;\n content: string;\n position: BentoTooltipPosition;\n removeListeners: Array<() => void>;\n}\n\n/**\n * Tooltip directive to render a tooltip on a given HTML element or component.\n *\n * @usage\n * import { BentoTooltipDirective, BentoTooltipPosition } from '@adyen/bento-vue2';\n *\n * export default {\n * directives: { BentoTooltipDirective },\n * template: `\n * <bento-button\n * v-bento-tooltip-directive:BentoTooltipPosition.BOTTOM=\"refToTextContent\"\n * >\n * Button text\n * </bento-button>\n * `,\n * }\n */\nconst tooltipInstances: Array<TooltipInstance> = [];\nconst ariaDescribedByAttr = 'aria-describedby';\nconst tooltipId = generateUid('tooltip');\n\nlet tooltipVNode;\n\n// Reusable Tooltip component instance.\nlet tooltip;\n// Global visibility state to prevent tooltips from showing after it being instructed to hide\nlet open = false;\n\nconst tooltipProps = reactive({\n targetElement: null,\n content: 'START_MESSAGE',\n id: tooltipId,\n position: undefined,\n isShown: false,\n});\n\n/**\n * Creates a new Tooltip component instance and inserts it into DOM.\n * @param {HTMLElement} el the target element for the Tooltip\n * @internal\n */\nconst createTooltip = (el: HTMLElement) => {\n // Sets the target's tabindex so as to make the tooltip interactive via keyboard navigation\n el.setAttribute('tabindex', '0');\n\n if (isVue2) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Type error for Vue method in Vue 3 but this code only executes in vue 2 so ignoring.\n const TooltipComponent = Vue2.extend(Tooltip);\n tooltip = new TooltipComponent({ propsData: { targetElement: el, content: '', id: tooltipId } }).$mount();\n document.body.appendChild(tooltip.$el);\n } else {\n tooltipProps.targetElement = el;\n tooltip = createApp({\n components: { Tooltip },\n setup() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Type error for h method in Vue 2 but this code only executes in vue 3 so ignoring.\n return () => h(Tooltip, { ...tooltipProps }, '');\n },\n });\n tooltipVNode = document.createElement('div');\n tooltipVNode.id = 'tooltip-parent';\n document.body.appendChild(tooltipVNode);\n tooltip.mount('#tooltip-parent');\n }\n};\n\n/**\n * Removes Tooltip component instance from the DOM and destroys it.\n * @internal\n */\nconst destroyTooltip = () => {\n if (isVue2) {\n if (document.contains(tooltip.$el)) {\n document.body.removeChild(tooltip.$el);\n }\n tooltip.$destroy();\n } else {\n tooltip.unmount();\n if (document.contains(tooltipVNode)) {\n document.body.removeChild(tooltipVNode);\n }\n }\n\n tooltip = undefined;\n};\n\n/**\n * Returns tooltip position based on the specified argument.\n * By default returns 'top' if no argument is specified.\n * @param {BentoTooltipDirectiveBinding} binding Directive binding object.\n * @returns {string} Tooltip position.\n * @internal\n */\nconst getTooltipPosition = (binding: BentoTooltipDirectiveBinding): BentoTooltipPosition =>\n Object.values(BentoTooltipPosition).includes(binding.arg as BentoTooltipPosition)\n ? (binding.arg as BentoTooltipPosition)\n : BentoTooltipPosition.TOP;\n\n/**\n * Get the correct Tooltip instance for the given target element\n * @param {HTMLElement} el the target element for the Tooltip\n * @returns\n */\nconst getTooltipInstanceForTarget = (el: HTMLElement): TooltipInstance =>\n tooltipInstances.find(\n ctx =>\n // isEqualNode doesn't work correct for svg element, hence the second check here\n ctx.target.isEqualNode(el) && ctx.target === el\n );\n\n/**\n * On mouse enter event updates tooltip with correct content and position, and shows tooltip.\n * @param {?HTMLElement} el - Target element\n * @internal\n */\nconst showTooltip = (el?: HTMLElement) => {\n const tooltipInstance = getTooltipInstanceForTarget(el);\n\n // If tooltip content is empty – do not show the tooltip\n if (!tooltipInstance.content || !el) {\n return;\n }\n\n if (el) {\n el.setAttribute(ariaDescribedByAttr, tooltipId);\n }\n\n // If the Tooltip is inside a dialog, move tooltip element inside of it\n // It gets restored to <body> when it gets hidden\n let isDialogOpen = false;\n document.querySelectorAll('dialog').forEach(node => {\n isDialogOpen = node?.open || isDialogOpen;\n });\n\n if (isDialogOpen) {\n if (isVue2) {\n el.after(tooltip.$el);\n // eslint-disable-next-line no-underscore-dangle\n } else if (tooltip?._instance?.vnode?.el) {\n // eslint-disable-next-line no-underscore-dangle\n el.after(tooltip?._instance?.vnode?.el);\n }\n isDialogOpen = false;\n }\n\n open = true;\n\n tooltip.content = tooltipInstance.content;\n tooltip.position = tooltipInstance.position;\n\n tooltipProps.content = tooltipInstance.content;\n tooltipProps.position = tooltipInstance.position;\n\n // Do calculations on a next tick, otherwise tooltip position calculations will be wrong\n nextTick(() => {\n // Do not open tooltip if it has been instructed to hide in process\n if (!open) {\n return;\n }\n tooltip.targetElement = el;\n tooltip.isShown = true;\n\n tooltipProps.targetElement = el;\n tooltipProps.isShown = true;\n });\n};\n\n/**\n * On mouse leave event hides the tooltip.\n * @internal\n */\nconst hideTooltip = (el?: HTMLElement) => {\n // Restore the tooltip element to body if it got move out of <body>\n if (tooltip.$el?.parentElement?.tagName && tooltip.$el?.parentElement?.tagName !== 'BODY') {\n document.body.appendChild(tooltip.$el);\n }\n\n open = false;\n tooltip.isShown = false;\n tooltipProps.isShown = false;\n if (el) {\n el.removeAttribute(ariaDescribedByAttr);\n }\n};\n\nconst tooltipBind = (el: HTMLElement, binding: BentoTooltipDirectiveBinding) => {\n // eslint-disable-next-line no-prototype-builtins\n if (!binding.hasOwnProperty('value') || binding.value) {\n // Create Tooltip component singleton instance\n if (tooltipInstances.length === 0) {\n createTooltip(el);\n }\n\n const show = () => showTooltip(el);\n const hide = () => hideTooltip(el);\n\n // Create and store context object, which has directive related handlers and content.\n const tooltipInstance: TooltipInstance = {\n target: el,\n content: binding.value,\n position: getTooltipPosition(binding),\n removeListeners: [\n listen(el, 'mouseenter', show),\n listen(el, 'mouseleave', hide),\n listen(el, 'focus', () => {\n if (el.matches(':focus-visible')) {\n show();\n }\n }),\n listen(el, 'blur', evt => {\n const focusEvent = <FocusEvent>evt;\n\n // when blurred and it transitions to the tooltip via screenreader, it should not close\n if ((focusEvent.relatedTarget as Element)?.getAttribute('role') !== 'tooltip') {\n hide();\n }\n }),\n listen(el, 'keydown', evt => {\n const keyboardEvent = <KeyboardEvent>evt;\n if (keyboardEvent.key === EventKey.ESCAPE) {\n hide();\n }\n }),\n ],\n };\n\n tooltipInstances.push(tooltipInstance);\n }\n};\n\nconst tooltipUpdate = (el: HTMLElement, binding: BentoTooltipDirectiveBinding) => {\n const tooltipInstance = getTooltipInstanceForTarget(el);\n if (tooltipInstance) {\n // Update tooltip content value if it is changed\n if (tooltipInstance?.content !== binding.value) {\n tooltipInstance.content = binding.value;\n // If tooltip is currently shown for current element – update tooltip's content value\n if (tooltip.isShown && tooltip.targetElement.isEqualNode(el)) {\n if (!tooltipInstance.content) {\n tooltip.isShown = false;\n } else {\n tooltip.content = binding.value;\n }\n\n // This forces the tooltip to refresh and update content in Vue3\n if (isVue3) {\n hideTooltip(el);\n showTooltip(el);\n }\n }\n }\n // Update tooltip position if it is changed\n if (tooltipInstance.position !== binding.arg) {\n const position = getTooltipPosition(binding);\n tooltipInstance.position = position;\n tooltip.position = position;\n }\n } else if (!tooltipInstance && binding.value) {\n // If I don't have a tooltip instance yet but the value passed was updated\n tooltipBind(el, binding);\n }\n};\n\nconst tooltipUnbind = (el: HTMLElement) => {\n const context = getTooltipInstanceForTarget(el);\n\n // Prevent unbinding/removing when there's nothing to unbind, leads to stack overflow errors\n if (!context) {\n return;\n }\n\n context.removeListeners.forEach(removeListener => {\n removeListener();\n });\n\n // If el is removed while tooltip is displayed, the tooltip doesnt hide as\n // there is no el to trigger mouseleave/blur.\n hideTooltip();\n\n tooltipInstances.splice(tooltipInstances.indexOf(context), 1);\n\n // If all the elements using the directive are removed, then no point having\n // the component on the page.\n if (tooltipInstances.length === 0) {\n destroyTooltip();\n }\n};\n\n/**\n * This directive allows you to bind a tooltip to an element.\n * Tooltip can be configured to be shown in one of four positions: 'top', 'left', 'right' and 'bottom'.\n *\n * @example\n * import { BentoTooltipDirective as BentoTooltip, BentoTooltipPosition } from '@adyen/bento-vue2';\n *\n * export default {\n * directives: { BentoTooltip },\n * methods: {\n * contentExpression() {\n * return 'tooltip content';\n * },\n * },\n * template: `<div>\n * <div v-bento-tooltip:left=\"refToTooltipContent\"></div>\n * <div v-bento-tooltip:[TooltipPosition.BOTTOM]=\"refToTooltipContent\"></div>\n *\n * <!-- If you don't specify the position then by default it's `TooltipPosition.TOP` -->\n * <div v-bento-tooltip=\"refToTooltipContent\"></div>\n *\n * <!-- Tooltip content can also be a data property or a method or a computed property as well -->\n * <div v-bento-tooltip=\"contentExpression()\"></div>\n * </div>`,\n * };\n */\nexport const BentoTooltipDirective = {\n // Vue 2 Directive hooks\n bind(el, binding) {\n tooltipBind(el, binding);\n },\n update(el, binding) {\n tooltipUpdate(el, binding);\n },\n unbind(el) {\n tooltipUnbind(el);\n },\n // Vue 3 Directive hooks\n beforeMount(el, binding) {\n tooltipBind(el, binding);\n },\n mounted(el, binding) {\n tooltipUpdate(el, binding);\n },\n updated(el, binding) {\n tooltipUpdate(el, binding);\n },\n unmounted(el) {\n tooltipUnbind(el);\n },\n};\n"],"names":["BentoTooltipPosition$1","PopperContainerPositionBasic","BentoTooltipState$1","BentoTooltipState2","EventKey","EventKey2","BentoTooltipPosition","BentoTooltipState","__default__","conditionalClasses","computed","props","tooltipInstances","ariaDescribedByAttr","tooltipId","generateUid","tooltip","open","tooltipProps","reactive","createTooltip","el","TooltipComponent","Vue2","Tooltip","destroyTooltip","getTooltipPosition","binding","getTooltipInstanceForTarget","ctx","showTooltip","tooltipInstance","isDialogOpen","node","nextTick","hideTooltip","_b","_a","_d","_c","tooltipBind","show","hide","listen","evt","tooltipUpdate","position","tooltipUnbind","context","removeListener","BentoTooltipDirective"],"mappings":";;;;;;;;AAOO,MAAAA,IAAA,EAAA,GAAAC,EAAA;AAGA,IAAAC,IAAA,kBAAAC,OACHA,EAAA,SAAA,UADQA,IAAAD,KAAA,CAAA,CAAA,GCCLE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,QAAA,SACAA,EAAA,aAAA,aACAA,EAAA,WAAA,WACAA,EAAA,cAAA,cACAA,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,GAKnBd,EAAA,GAEAvB,EAAA,OAAAA,EAAA,QAAAoC,CAAA,GAAA,CAAA,GAIApC,EAAA,WAAA,KACIa,EAAA;AAER,GA4BOyB,IAAA;AAAA;AAAA,EAA8B,KAAA7B,GAAAM,GAAA;AAG7B,IAAAa,EAAAnB,GAAAM,CAAA;AAAA,EAAuB;AAAA,EAC3B,OAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,OAAAN,GAAA;AAEI,IAAA0B,EAAA1B,CAAA;AAAA,EAAgB;AAAA;AAAA,EACpB,YAAAA,GAAAM,GAAA;AAGI,IAAAa,EAAAnB,GAAAM,CAAA;AAAA,EAAuB;AAAA,EAC3B,QAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,QAAAN,GAAAM,GAAA;AAEI,IAAAkB,EAAAxB,GAAAM,CAAA;AAAA,EAAyB;AAAA,EAC7B,UAAAN,GAAA;AAEI,IAAA0B,EAAA1B,CAAA;AAAA,EAAgB;AAExB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate.BfIl_-71.js","sources":["../../src/utils/ts/truncate.ts"],"sourcesContent":["/**\n * Trunctes a string if it goes over a certain character limit.\n * @param aString the string or number to truncate.\n * @param characterLimit the character limit to start truncating at.\n * @returns a string that is truncated if it's length is over the limit.\n */\nexport const truncate = (aStringOrNumber: string | number, characterLimit: number) => {\n const aString = aStringOrNumber?.toString();\n return aString?.length > characterLimit ? `${aString?.slice(0, characterLimit)}...` : aString;\n};\n"],"names":["truncate","aStringOrNumber","characterLimit","aString"],"mappings":"
|
|
1
|
+
{"version":3,"file":"truncate.BfIl_-71.js","sources":["../../src/utils/ts/truncate.ts"],"sourcesContent":["/**\n * Trunctes a string if it goes over a certain character limit.\n * @param aString the string or number to truncate.\n * @param characterLimit the character limit to start truncating at.\n * @returns a string that is truncated if it's length is over the limit.\n */\nexport const truncate = (aStringOrNumber: string | number, characterLimit: number) => {\n const aString = aStringOrNumber?.toString();\n return aString?.length > characterLimit ? `${aString?.slice(0, characterLimit)}...` : aString;\n};\n"],"names":["truncate","aStringOrNumber","characterLimit","aString"],"mappings":"AAMO,MAAMA,IAAW,CAACC,GAAkCC,MAA2B;AAClF,QAAMC,IAAUF,KAAA,gBAAAA,EAAiB;AACjC,UAAOE,KAAA,gBAAAA,EAAS,UAASD,IAAiB,GAAGC,KAAA,gBAAAA,EAAS,MAAM,GAAGD,EAAe,QAAQC;AAC1F;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as h, ref as d, computed as a, isRef as F, watch as g, nextTick as $ } from "vue";
|
|
2
|
-
import { B as k, h as I, f as w } from "./button-actions.
|
|
3
|
-
import { B as S } from "./popover.types.
|
|
2
|
+
import { B as k, h as I, f as w } from "./button-actions.JRDi9PFT.js";
|
|
3
|
+
import { B as S } from "./popover.types.Zm8nugBw.js";
|
|
4
4
|
import { B as N } from "./typography.Bq-EGj9y.js";
|
|
5
5
|
import { B as A } from "./image.C2D2hKat.js";
|
|
6
6
|
import { u as D } from "./index.B6WW_F-J.js";
|
|
7
7
|
import { R as j } from "./refresh.arF7jP-l.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
|
-
import { P as b, h as L, o as M } from "./popper-container.
|
|
10
|
+
import { P as b, h as L, o as M } from "./popper-container.CXUG6v_U.js";
|
|
11
11
|
import "../assets/tutorial.css";
|
|
12
12
|
var B;
|
|
13
13
|
const K = /* @__PURE__ */ h({
|
|
@@ -213,7 +213,7 @@ const X = W.exports, G = {
|
|
|
213
213
|
})), C = a(() => ({
|
|
214
214
|
title: o("ok"),
|
|
215
215
|
event: () => t("finish")
|
|
216
|
-
})),
|
|
216
|
+
})), O = d(!1), y = d(!1), v = a(() => {
|
|
217
217
|
var u;
|
|
218
218
|
return F(e.targetElement) ? ((u = e.targetElement.value) == null ? void 0 : u.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
|
|
219
219
|
}), _ = a(() => e.step === 0), m = a(() => e.step === e.totalSteps), E = a(() => !_.value), R = a(() => [
|
|
@@ -241,10 +241,10 @@ const X = W.exports, G = {
|
|
|
241
241
|
var c, T;
|
|
242
242
|
u && ((c = v.value) != null && c.scrollIntoView) && ((T = v.value) == null || T.scrollIntoView(
|
|
243
243
|
e.scrollOptions != null ? e.scrollOptions : s
|
|
244
|
-
), await $()),
|
|
244
|
+
), await $()), O.value = u, y.value = u;
|
|
245
245
|
},
|
|
246
246
|
{ immediate: !0 }
|
|
247
|
-
), { __sfc: !0, DEFAULT_SCROLL_OPTIONS: s, props: e, t: o, emit: t, ACTION_SKIP: l, ACTION_START: i, ACTION_NEXT: r, ACTION_FINISH: p, ACTION_OK: C, isPopoverOpen:
|
|
247
|
+
), { __sfc: !0, DEFAULT_SCROLL_OPTIONS: s, props: e, t: o, emit: t, ACTION_SKIP: l, ACTION_START: i, ACTION_NEXT: r, ACTION_FINISH: p, ACTION_OK: C, isPopoverOpen: O, isIndicatorVisible: y, targetElement: v, isFirstStep: _, isLastStep: m, showSteps: E, menuData: R, computedActions: P, BentoMenu: w, BentoPopover: I, BentoTypography: N, BentoButtonActions: k, BentoImage: A, TutorialIndicator: z };
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
var tt = function() {
|
|
@@ -344,4 +344,4 @@ const Ct = lt.exports;
|
|
|
344
344
|
export {
|
|
345
345
|
Ct as t
|
|
346
346
|
};
|
|
347
|
-
//# sourceMappingURL=tutorial.
|
|
347
|
+
//# sourceMappingURL=tutorial.O_vT6Q2b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.D18LwXVy.js","sources":["../../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../ui-assets/icons-16/dist/vue/blocked.vue","../../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../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-ui-assets/icons-16-blocked__a' + uuid + ')'\"><path fill=\"#001222\" 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-ui-assets/icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\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, type 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/elements';\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([\"next\", \"finish\", \"restart\"]);\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<Array<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, type 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<Array<BentoTutorialStep>>,\n required: true,\n validator: (value: Array<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([\"update:index\"]);\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":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_sfc_main$2","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,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,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAC,IAAA;AAAA,MAAmBC,EAAA;AAAA,M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MAAAX,EAAA;AAAA,MACgB,OAAAY,MAAA;;AAER,QAAAA,OAAAX,IAAAH,EAAA,UAAA,QAAAG,EAAA,qBACIY,IAAAf,EAAA,UAAA,QAAAe,EAAA;AAAA,UAAqBb,EAAA,iBAAA,OAAAA,EAAA,gBAAAd;AAAA,WAKrB,MAAA4B,EAAA,IAGJlB,EAAA,QAAAgB,GACAf,EAAA,QAAAe;AAAA,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;uBCxItBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAxEAC,IAAA7C,EAAA6B,EAAA,SAAA,CAAA,GAEAiB,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA,QACV,eAAApB,EAAA;AAAA;AAAA,QACQ,QAAAqB,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA7B,EAAA,gBAAA6B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tutorial.O_vT6Q2b.js","sources":["../../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../ui-assets/icons-16/dist/vue/blocked.vue","../../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../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-ui-assets/icons-16-blocked__a' + uuid + ')'\"><path fill=\"#001222\" 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-ui-assets/icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\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, type 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/elements';\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([\"next\", \"finish\", \"restart\"]);\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<Array<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, type 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<Array<BentoTutorialStep>>,\n required: true,\n validator: (value: Array<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([\"update:index\"]);\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":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_sfc_main$2","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,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,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IAC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q-EGj9y.js","sources":["../../src/utils/ts/dev-environment.ts","../../src/utils/ts/print-development-warning.ts","../../src/utils/ts/deprecate.ts","../../src/components/typography/typography.types.ts","../../src/components/typography/typography.vue"],"sourcesContent":["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","/**\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\nexport interface BentoTypographyProps {\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 the Body variant.\n */\n wide?: boolean;\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 { deprecate } from '@/utils/ts/deprecate';\n import {\n BentoTypographyElement,\n BentoTypographyModifier,\n type BentoTypographyProps,\n BentoTypographyVariant,\n } from './typography.types';\n\n const props = defineProps({\n el: { default: BentoTypographyElement.PARAGRAPH },\n large: { type: Boolean, default: false },\n medium: { type: Boolean, default: false },\n richText: { type: Boolean },\n stronger: { type: Boolean, default: false },\n strongest: { type: Boolean, default: false },\n variant: { default: BentoTypographyVariant.BODY },\n wide: { type: Boolean, default: false }\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=\"./typography.scss\" />\n"],"names":["DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","__default__","props","conditionalClasses","computed","onMounted"],"mappings":";;;AAAA,MAAAA,IAAA,CAAA,eAAA,eAAA,OAAA,KAAA,GAEOC,IAAA,MAAAD,EAAA,SAAA,QAAA,IAAA,QAAA;ACMA,SAAAE,KAAAC,GAAA;AACH,EAAAF,EAAA,KAEI,QAAA,KAAA,GAAAE,CAAA;AAER;ACXA,MAAAC,IAAA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AA;AAGJ,UAAAA,EAAA,YAAAA,EAAA,YAAA;AACI,cAAA,IAAA,MAAA,0DAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"typography.Bq-EGj9y.js","sources":["../../src/utils/ts/dev-environment.ts","../../src/utils/ts/print-development-warning.ts","../../src/utils/ts/deprecate.ts","../../src/components/typography/typography.types.ts","../../src/components/typography/typography.vue"],"sourcesContent":["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","/**\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\nexport interface BentoTypographyProps {\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 the Body variant.\n */\n wide?: boolean;\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 { deprecate } from '@/utils/ts/deprecate';\n import {\n BentoTypographyElement,\n BentoTypographyModifier,\n type BentoTypographyProps,\n BentoTypographyVariant,\n } from './typography.types';\n\n const props = defineProps({\n el: { default: BentoTypographyElement.PARAGRAPH },\n large: { type: Boolean, default: false },\n medium: { type: Boolean, default: false },\n richText: { type: Boolean },\n stronger: { type: Boolean, default: false },\n strongest: { type: Boolean, default: false },\n variant: { default: BentoTypographyVariant.BODY },\n wide: { type: Boolean, default: false }\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=\"./typography.scss\" />\n"],"names":["DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","__default__","props","conditionalClasses","computed","onMounted"],"mappings":";;;AAAA,MAAAA,IAAA,CAAA,eAAA,eAAA,OAAA,KAAA,GAEOC,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MAAA;AACI,UAAAH,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-files.5wQwbfkp.js","sources":["../../src/components/empty-state/assets/large/upload-files.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='300'%20height='300'%20viewBox='0%200%20300%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_69_698)'%3e%3cpath%20d='M274.644%2053.2879H106.437V257.832H274.644V53.2879Z'%20fill='%23EEF0F3'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='4.71%204.71'/%3e%3cpath%20d='M110.981%2042.4709L99.6461%2058.7553L83.4088%2047.4485L46.2676%20108.659L147.416%20174.663L195.897%2097.1682L110.981%2042.4709Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M83.4089%2047.4485L95.1584%2059.5747L98.2617%2054.7666L83.4089%2047.4485Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M83.4089%2047.4485L110.981%2042.4709L99.6462%2058.7553L83.4089%2047.4485Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M194.894%20164.952L207.232%20216.598L222.509%20203.775L234.72%20218.326L240.541%20213.443L228.33%20198.891L243.611%20186.073L194.894%20164.952Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.555%2081.5855C199.528%2081.7644%20198.845%2082.7439%20199.029%2083.7658L202.217%20101.854L203.361%20108.348C203.945%20111.673%20201.718%20114.851%20198.393%20115.44C195.068%20116.024%20191.885%20113.796%20191.301%20110.476L190.566%20106.304L190.157%20103.987L186.969%2085.8991L186.587%2083.7282L186.399%2082.6545C185.994%2080.3517%20187.534%2078.1525%20189.837%2077.7428C192.139%2077.3378%20194.339%2078.8777%20194.748%2081.1805L198.511%20102.513C198.737%20103.794%20197.88%20105.014%20196.599%20105.24C195.318%20105.466%20194.098%20104.609%20193.872%20103.328L190.684%2085.2398C190.505%2084.2132%20189.526%2083.5304%20188.504%2083.714C187.482%2083.8977%20186.794%2084.8725%20186.978%2085.8944L190.166%20103.982C190.75%20107.307%20193.934%20109.535%20197.258%20108.951C200.583%20108.367%20202.81%20105.183%20202.226%20101.859L199.038%2083.7705L198.464%2080.5259C197.696%2076.1793%20193.538%2073.2643%20189.191%2074.0319C184.845%2074.7995%20181.93%2078.9578%20182.697%2083.3043L187.604%20111.131C188.551%20116.499%20193.689%20120.097%20199.062%20119.151C204.43%20118.204%20208.033%20113.066%20207.082%20107.693L202.749%2083.1113C202.57%2082.0847%20201.591%2081.4018%20200.569%2081.5855H200.555Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M190.957%20225.946L33.275%20198.143C28.1514%20197.239%2024.7325%20192.355%2025.6367%20187.232L46.8987%2066.6526C47.8029%2061.529%2052.6863%2058.1102%2057.8099%2059.0143L89.1493%2064.5382C92.8414%2065.1881%2096.1189%2067.2789%2098.271%2070.3493L99.1988%2071.6726C101.346%2074.743%20104.628%2076.8339%20108.32%2077.4838L213.863%2096.0945C218.987%2096.9987%20222.405%20101.882%20221.501%20107.006L201.873%20218.307C200.969%20223.431%20196.086%20226.85%20190.962%20225.946H190.957Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M212.216%20105.367L54.5365%2077.5637C49.4139%2076.6605%2044.529%2080.0809%2043.6257%2085.2035L25.6354%20187.232C24.7321%20192.355%2028.1526%20197.24%2033.2752%20198.143L190.955%20225.946C196.078%20226.849%20200.963%20223.429%20201.866%20218.306L219.857%20116.278C220.76%20111.155%20217.339%20106.27%20212.216%20105.367Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M105.005%20189.337L151.075%2078.4209L230.731%20107.415L184.656%20218.326L105.005%20189.337Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M192.074%20213.616L230.73%20107.412L151.076%2078.4202L112.421%20184.625L192.074%20213.616Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.459%20181.814L189.262%20207.584L224.696%20110.23L153.893%2084.4599L118.459%20181.814Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.23%20166.464L144.577%20176.278C147.284%20191.644%20161.939%20201.905%20177.31%20199.198C192.676%20196.49%20202.938%20181.835%20200.23%20166.464Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M155.921%20145.734L138.926%20142.739L127.835%20155.958L133.736%20172.176L150.732%20175.171L161.826%20161.953L155.921%20145.734Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M148.651%20117.385L138.99%20125.491L176.816%20170.57L186.477%20162.464L148.651%20117.385Z'%20fill='%23067934'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M195.874%20167.029C202.319%20167.029%20207.543%20161.805%20207.543%20155.36C207.543%20148.915%20202.319%20143.69%20195.874%20143.69C189.429%20143.69%20184.204%20148.915%20184.204%20155.36C184.204%20161.805%20189.429%20167.029%20195.874%20167.029Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M179.382%20153.881L176.114%20135.331L172.841%20116.782L190.543%20123.224L208.245%20129.666L193.811%20141.774L179.382%20153.881Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M182.688%2083.3043L187.595%20111.131C188.542%20116.499%20193.679%20120.097%20199.052%20119.151C204.421%20118.204%20208.023%20113.066%20207.072%20107.693L202.74%2083.1113C202.561%2082.0847%20201.581%2081.4018%20200.559%2081.5855C199.537%2081.7691%20198.85%2082.7439%20199.034%2083.7658L203.366%20108.348C203.95%20111.673%20201.723%20114.851%20198.398%20115.44C195.073%20116.024%20191.89%20113.796%20191.306%20110.476L190.571%20106.304L186.399%2082.6498'%20fill='white'/%3e%3cpath%20d='M182.688%2083.3043L187.595%20111.131C188.542%20116.499%20193.679%20120.097%20199.052%20119.151C204.421%20118.204%20208.023%20113.066%20207.072%20107.693L202.74%2083.1113C202.561%2082.0847%20201.581%2081.4018%20200.559%2081.5855C199.537%2081.7691%20198.85%2082.7439%20199.034%2083.7658L203.366%20108.348C203.95%20111.673%20201.723%20114.851%20198.398%20115.44C195.073%20116.024%20191.89%20113.796%20191.306%20110.476L190.571%20106.304L186.399%2082.6498'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M196.848%2093.0947L200.621%2093.7587L200.272%2091.8515L196.533%2091.3194L196.848%2093.0947Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.103%20154.733L212.441%20206.379L227.722%20193.556L239.933%20208.107L245.753%20203.224L233.543%20188.673L248.819%20175.849L200.103%20154.733Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_69_698'%3e%3crect%20width='251'%20height='216.623'%20fill='white'%20transform='translate(24%2042)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["uploadFiles"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"upload-files.5wQwbfkp.js","sources":["../../src/components/empty-state/assets/large/upload-files.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='300'%20height='300'%20viewBox='0%200%20300%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_69_698)'%3e%3cpath%20d='M274.644%2053.2879H106.437V257.832H274.644V53.2879Z'%20fill='%23EEF0F3'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='4.71%204.71'/%3e%3cpath%20d='M110.981%2042.4709L99.6461%2058.7553L83.4088%2047.4485L46.2676%20108.659L147.416%20174.663L195.897%2097.1682L110.981%2042.4709Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M83.4089%2047.4485L95.1584%2059.5747L98.2617%2054.7666L83.4089%2047.4485Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M83.4089%2047.4485L110.981%2042.4709L99.6462%2058.7553L83.4089%2047.4485Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M194.894%20164.952L207.232%20216.598L222.509%20203.775L234.72%20218.326L240.541%20213.443L228.33%20198.891L243.611%20186.073L194.894%20164.952Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.555%2081.5855C199.528%2081.7644%20198.845%2082.7439%20199.029%2083.7658L202.217%20101.854L203.361%20108.348C203.945%20111.673%20201.718%20114.851%20198.393%20115.44C195.068%20116.024%20191.885%20113.796%20191.301%20110.476L190.566%20106.304L190.157%20103.987L186.969%2085.8991L186.587%2083.7282L186.399%2082.6545C185.994%2080.3517%20187.534%2078.1525%20189.837%2077.7428C192.139%2077.3378%20194.339%2078.8777%20194.748%2081.1805L198.511%20102.513C198.737%20103.794%20197.88%20105.014%20196.599%20105.24C195.318%20105.466%20194.098%20104.609%20193.872%20103.328L190.684%2085.2398C190.505%2084.2132%20189.526%2083.5304%20188.504%2083.714C187.482%2083.8977%20186.794%2084.8725%20186.978%2085.8944L190.166%20103.982C190.75%20107.307%20193.934%20109.535%20197.258%20108.951C200.583%20108.367%20202.81%20105.183%20202.226%20101.859L199.038%2083.7705L198.464%2080.5259C197.696%2076.1793%20193.538%2073.2643%20189.191%2074.0319C184.845%2074.7995%20181.93%2078.9578%20182.697%2083.3043L187.604%20111.131C188.551%20116.499%20193.689%20120.097%20199.062%20119.151C204.43%20118.204%20208.033%20113.066%20207.082%20107.693L202.749%2083.1113C202.57%2082.0847%20201.591%2081.4018%20200.569%2081.5855H200.555Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M190.957%20225.946L33.275%20198.143C28.1514%20197.239%2024.7325%20192.355%2025.6367%20187.232L46.8987%2066.6526C47.8029%2061.529%2052.6863%2058.1102%2057.8099%2059.0143L89.1493%2064.5382C92.8414%2065.1881%2096.1189%2067.2789%2098.271%2070.3493L99.1988%2071.6726C101.346%2074.743%20104.628%2076.8339%20108.32%2077.4838L213.863%2096.0945C218.987%2096.9987%20222.405%20101.882%20221.501%20107.006L201.873%20218.307C200.969%20223.431%20196.086%20226.85%20190.962%20225.946H190.957Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M212.216%20105.367L54.5365%2077.5637C49.4139%2076.6605%2044.529%2080.0809%2043.6257%2085.2035L25.6354%20187.232C24.7321%20192.355%2028.1526%20197.24%2033.2752%20198.143L190.955%20225.946C196.078%20226.849%20200.963%20223.429%20201.866%20218.306L219.857%20116.278C220.76%20111.155%20217.339%20106.27%20212.216%20105.367Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M105.005%20189.337L151.075%2078.4209L230.731%20107.415L184.656%20218.326L105.005%20189.337Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M192.074%20213.616L230.73%20107.412L151.076%2078.4202L112.421%20184.625L192.074%20213.616Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.459%20181.814L189.262%20207.584L224.696%20110.23L153.893%2084.4599L118.459%20181.814Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.23%20166.464L144.577%20176.278C147.284%20191.644%20161.939%20201.905%20177.31%20199.198C192.676%20196.49%20202.938%20181.835%20200.23%20166.464Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M155.921%20145.734L138.926%20142.739L127.835%20155.958L133.736%20172.176L150.732%20175.171L161.826%20161.953L155.921%20145.734Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M148.651%20117.385L138.99%20125.491L176.816%20170.57L186.477%20162.464L148.651%20117.385Z'%20fill='%23067934'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M195.874%20167.029C202.319%20167.029%20207.543%20161.805%20207.543%20155.36C207.543%20148.915%20202.319%20143.69%20195.874%20143.69C189.429%20143.69%20184.204%20148.915%20184.204%20155.36C184.204%20161.805%20189.429%20167.029%20195.874%20167.029Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M179.382%20153.881L176.114%20135.331L172.841%20116.782L190.543%20123.224L208.245%20129.666L193.811%20141.774L179.382%20153.881Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M182.688%2083.3043L187.595%20111.131C188.542%20116.499%20193.679%20120.097%20199.052%20119.151C204.421%20118.204%20208.023%20113.066%20207.072%20107.693L202.74%2083.1113C202.561%2082.0847%20201.581%2081.4018%20200.559%2081.5855C199.537%2081.7691%20198.85%2082.7439%20199.034%2083.7658L203.366%20108.348C203.95%20111.673%20201.723%20114.851%20198.398%20115.44C195.073%20116.024%20191.89%20113.796%20191.306%20110.476L190.571%20106.304L186.399%2082.6498'%20fill='white'/%3e%3cpath%20d='M182.688%2083.3043L187.595%20111.131C188.542%20116.499%20193.679%20120.097%20199.052%20119.151C204.421%20118.204%20208.023%20113.066%20207.072%20107.693L202.74%2083.1113C202.561%2082.0847%20201.581%2081.4018%20200.559%2081.5855C199.537%2081.7691%20198.85%2082.7439%20199.034%2083.7658L203.366%20108.348C203.95%20111.673%20201.723%20114.851%20198.398%20115.44C195.073%20116.024%20191.89%20113.796%20191.306%20110.476L190.571%20106.304L186.399%2082.6498'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M196.848%2093.0947L200.621%2093.7587L200.272%2091.8515L196.533%2091.3194L196.848%2093.0947Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M200.103%20154.733L212.441%20206.379L227.722%20193.556L239.933%20208.107L245.753%20203.224L233.543%20188.673L248.819%20175.849L200.103%20154.733Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.706379'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_69_698'%3e%3crect%20width='251'%20height='216.623'%20fill='white'%20transform='translate(24%2042)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["uploadFiles"],"mappings":"AAAA,MAAAA,IAAe;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-files.jTQY6y2X.js","sources":["../../src/components/empty-state/assets/small/upload-files.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='200'%20height='200'%20viewBox='0%200%20200%20200'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M175.783%2040.8807H73.2502V165.563H175.783V40.8807Z'%20fill='%23EEF0F3'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='2.87%202.87'/%3e%3cpath%20d='M76.0203%2034.287L69.1109%2044.2134L59.2132%2037.3212L36.5734%2074.6325L98.2297%20114.866L127.782%2067.6284L76.0203%2034.287Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M59.2134%2037.3212L66.3754%2044.7129L68.2671%2041.7821L59.2134%2037.3212Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M59.2134%2037.3212L76.0204%2034.287L69.111%2044.2134L59.2134%2037.3212Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.171%20108.947L134.691%20140.428L144.004%20132.612L151.447%20141.482L154.995%20138.505L147.552%20129.635L156.866%20121.821L127.171%20108.947Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.621%2058.1298C129.995%2058.2389%20129.579%2058.836%20129.691%2059.4589L131.634%2070.4846L132.332%2074.4431C132.688%2076.4697%20131.33%2078.4073%20129.303%2078.7662C127.277%2079.1221%20125.336%2077.7643%20124.98%2075.7406L124.533%2073.1973L124.283%2071.785L122.339%2060.7592L122.107%2059.4359L121.992%2058.7814C121.745%2057.3777%20122.684%2056.0372%20124.088%2055.7875C125.491%2055.5406%20126.832%2056.4793%20127.082%2057.8829L129.375%2070.8865C129.513%2071.6673%20128.991%2072.4108%20128.21%2072.5486C127.429%2072.6863%20126.686%2072.1639%20126.548%2071.3831L124.604%2060.3574C124.495%2059.7316%20123.898%2059.3154%20123.275%2059.4273C122.652%2059.5393%20122.233%2060.1335%20122.345%2060.7564L124.289%2071.7821C124.645%2073.8087%20126.585%2075.1665%20128.612%2074.8105C130.638%2074.4546%20131.996%2072.5141%20131.64%2070.4875L129.697%2059.4617L129.346%2057.4839C128.879%2054.8344%20126.344%2053.0576%20123.694%2053.5255C121.045%2053.9934%20119.268%2056.5281%20119.736%2059.1776L122.727%2076.1396C123.304%2079.412%20126.436%2081.6051%20129.711%2081.0281C132.983%2080.4512%20135.179%2077.3194%20134.6%2074.0441L131.959%2059.0599C131.85%2058.4341%20131.253%2058.0179%20130.63%2058.1298H130.621Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M124.771%20146.126L28.6537%20129.179C25.5305%20128.627%2023.4465%20125.651%2023.9977%20122.528L36.9582%2049.0273C37.5093%2045.9041%2040.4861%2043.8201%2043.6092%2044.3713L62.7126%2047.7384C64.9631%2048.1346%2066.961%2049.4091%2068.2728%2051.2807L68.8383%2052.0873C70.1473%2053.9589%2072.148%2055.2334%2074.3985%2055.6295L138.733%2066.9739C141.856%2067.5251%20143.94%2070.5018%20143.389%2073.625L131.425%20141.47C130.874%20144.593%20127.897%20146.677%20124.774%20146.126H124.771Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M137.73%2072.626L41.614%2055.6783C38.4915%2055.1277%2035.5138%2057.2127%2034.9632%2060.3352L23.997%20122.528C23.4464%20125.65%2025.5314%20128.628%2028.6539%20129.179L124.77%20146.126C127.892%20146.677%20130.87%20144.592%20131.421%20141.469L142.387%2079.2768C142.937%2076.1542%20140.852%2073.1766%20137.73%2072.626Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M72.3777%20123.811L100.46%2056.2008L149.015%2073.8747L120.93%20141.482L72.3777%20123.811Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.452%20138.611L149.015%2073.8724L100.461%2056.2004L76.8979%20120.939L125.452%20138.611Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.5785%20119.225L123.737%20134.934L145.337%2075.5904L102.178%2059.8819L80.5785%20119.225Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.423%20109.868L96.4989%20115.851C98.1495%20125.217%20107.083%20131.472%20116.452%20129.822C125.819%20128.171%20132.074%20119.238%20130.423%20109.868Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M103.414%2097.2323L93.0542%2095.4067L86.2941%20103.464L89.8909%20113.35L100.251%20115.176L107.014%20107.118L103.414%2097.2323Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M98.9824%2079.9517L93.0935%2084.893L116.151%20112.371L122.039%20107.43L98.9824%2079.9517Z'%20fill='%23067934'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.768%20110.213C131.696%20110.213%20134.881%20107.028%20134.881%20103.1C134.881%2099.1711%20131.696%2095.9865%20127.768%2095.9865C123.839%2095.9865%20120.655%2099.1711%20120.655%20103.1C120.655%20107.028%20123.839%20110.213%20127.768%20110.213Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M117.715%20102.198L115.723%2090.8913L113.728%2079.5842L124.518%2083.5111L135.309%2087.438L126.51%2094.8182L117.715%20102.198Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M119.73%2059.1775L122.721%2076.1396C123.298%2079.412%20126.43%2081.6051%20129.705%2081.0281C132.978%2080.4511%20135.174%2077.3194%20134.594%2074.0441L131.953%2059.0598C131.844%2058.434%20131.247%2058.0178%20130.624%2058.1298C130.001%2058.2417%20129.582%2058.8359%20129.694%2059.4588L132.335%2074.4431C132.691%2076.4697%20131.333%2078.4073%20129.306%2078.7661C127.28%2079.1221%20125.339%2077.7643%20124.983%2075.7406L124.536%2073.1973L121.992%2058.7785'%20fill='white'/%3e%3cpath%20d='M119.73%2059.1775L122.721%2076.1396C123.298%2079.412%20126.43%2081.6051%20129.705%2081.0281C132.978%2080.4511%20135.174%2077.3194%20134.594%2074.0441L131.953%2059.0598C131.844%2058.434%20131.247%2058.0178%20130.624%2058.1298C130.001%2058.2417%20129.582%2058.8359%20129.694%2059.4588L132.335%2074.4431C132.691%2076.4697%20131.333%2078.4073%20129.306%2078.7661C127.28%2079.1221%20125.339%2077.7643%20124.983%2075.7406L124.536%2073.1973L121.992%2058.7785'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M128.362%2065.1454L130.661%2065.5502L130.449%2064.3876L128.17%2064.0632L128.362%2065.1454Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.345%20102.718L137.866%20134.199L147.181%20126.383L154.625%20135.253L158.173%20132.276L150.729%20123.406L160.041%20115.589L130.345%20102.718Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["uploadFiles"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"upload-files.jTQY6y2X.js","sources":["../../src/components/empty-state/assets/small/upload-files.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='200'%20height='200'%20viewBox='0%200%20200%20200'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M175.783%2040.8807H73.2502V165.563H175.783V40.8807Z'%20fill='%23EEF0F3'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='2.87%202.87'/%3e%3cpath%20d='M76.0203%2034.287L69.1109%2044.2134L59.2132%2037.3212L36.5734%2074.6325L98.2297%20114.866L127.782%2067.6284L76.0203%2034.287Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M59.2134%2037.3212L66.3754%2044.7129L68.2671%2041.7821L59.2134%2037.3212Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M59.2134%2037.3212L76.0204%2034.287L69.111%2044.2134L59.2134%2037.3212Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.171%20108.947L134.691%20140.428L144.004%20132.612L151.447%20141.482L154.995%20138.505L147.552%20129.635L156.866%20121.821L127.171%20108.947Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.621%2058.1298C129.995%2058.2389%20129.579%2058.836%20129.691%2059.4589L131.634%2070.4846L132.332%2074.4431C132.688%2076.4697%20131.33%2078.4073%20129.303%2078.7662C127.277%2079.1221%20125.336%2077.7643%20124.98%2075.7406L124.533%2073.1973L124.283%2071.785L122.339%2060.7592L122.107%2059.4359L121.992%2058.7814C121.745%2057.3777%20122.684%2056.0372%20124.088%2055.7875C125.491%2055.5406%20126.832%2056.4793%20127.082%2057.8829L129.375%2070.8865C129.513%2071.6673%20128.991%2072.4108%20128.21%2072.5486C127.429%2072.6863%20126.686%2072.1639%20126.548%2071.3831L124.604%2060.3574C124.495%2059.7316%20123.898%2059.3154%20123.275%2059.4273C122.652%2059.5393%20122.233%2060.1335%20122.345%2060.7564L124.289%2071.7821C124.645%2073.8087%20126.585%2075.1665%20128.612%2074.8105C130.638%2074.4546%20131.996%2072.5141%20131.64%2070.4875L129.697%2059.4617L129.346%2057.4839C128.879%2054.8344%20126.344%2053.0576%20123.694%2053.5255C121.045%2053.9934%20119.268%2056.5281%20119.736%2059.1776L122.727%2076.1396C123.304%2079.412%20126.436%2081.6051%20129.711%2081.0281C132.983%2080.4512%20135.179%2077.3194%20134.6%2074.0441L131.959%2059.0599C131.85%2058.4341%20131.253%2058.0179%20130.63%2058.1298H130.621Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M124.771%20146.126L28.6537%20129.179C25.5305%20128.627%2023.4465%20125.651%2023.9977%20122.528L36.9582%2049.0273C37.5093%2045.9041%2040.4861%2043.8201%2043.6092%2044.3713L62.7126%2047.7384C64.9631%2048.1346%2066.961%2049.4091%2068.2728%2051.2807L68.8383%2052.0873C70.1473%2053.9589%2072.148%2055.2334%2074.3985%2055.6295L138.733%2066.9739C141.856%2067.5251%20143.94%2070.5018%20143.389%2073.625L131.425%20141.47C130.874%20144.593%20127.897%20146.677%20124.774%20146.126H124.771Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M137.73%2072.626L41.614%2055.6783C38.4915%2055.1277%2035.5138%2057.2127%2034.9632%2060.3352L23.997%20122.528C23.4464%20125.65%2025.5314%20128.628%2028.6539%20129.179L124.77%20146.126C127.892%20146.677%20130.87%20144.592%20131.421%20141.469L142.387%2079.2768C142.937%2076.1542%20140.852%2073.1766%20137.73%2072.626Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M72.3777%20123.811L100.46%2056.2008L149.015%2073.8747L120.93%20141.482L72.3777%20123.811Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.452%20138.611L149.015%2073.8724L100.461%2056.2004L76.8979%20120.939L125.452%20138.611Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.5785%20119.225L123.737%20134.934L145.337%2075.5904L102.178%2059.8819L80.5785%20119.225Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.423%20109.868L96.4989%20115.851C98.1495%20125.217%20107.083%20131.472%20116.452%20129.822C125.819%20128.171%20132.074%20119.238%20130.423%20109.868Z'%20fill='%23D5F3E1'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M103.414%2097.2323L93.0542%2095.4067L86.2941%20103.464L89.8909%20113.35L100.251%20115.176L107.014%20107.118L103.414%2097.2323Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M98.9824%2079.9517L93.0935%2084.893L116.151%20112.371L122.039%20107.43L98.9824%2079.9517Z'%20fill='%23067934'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.768%20110.213C131.696%20110.213%20134.881%20107.028%20134.881%20103.1C134.881%2099.1711%20131.696%2095.9865%20127.768%2095.9865C123.839%2095.9865%20120.655%2099.1711%20120.655%20103.1C120.655%20107.028%20123.839%20110.213%20127.768%20110.213Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M117.715%20102.198L115.723%2090.8913L113.728%2079.5842L124.518%2083.5111L135.309%2087.438L126.51%2094.8182L117.715%20102.198Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M119.73%2059.1775L122.721%2076.1396C123.298%2079.412%20126.43%2081.6051%20129.705%2081.0281C132.978%2080.4511%20135.174%2077.3194%20134.594%2074.0441L131.953%2059.0598C131.844%2058.434%20131.247%2058.0178%20130.624%2058.1298C130.001%2058.2417%20129.582%2058.8359%20129.694%2059.4588L132.335%2074.4431C132.691%2076.4697%20131.333%2078.4073%20129.306%2078.7661C127.28%2079.1221%20125.339%2077.7643%20124.983%2075.7406L124.536%2073.1973L121.992%2058.7785'%20fill='white'/%3e%3cpath%20d='M119.73%2059.1775L122.721%2076.1396C123.298%2079.412%20126.43%2081.6051%20129.705%2081.0281C132.978%2080.4511%20135.174%2077.3194%20134.594%2074.0441L131.953%2059.0598C131.844%2058.434%20131.247%2058.0178%20130.624%2058.1298C130.001%2058.2417%20129.582%2058.8359%20129.694%2059.4588L132.335%2074.4431C132.691%2076.4697%20131.333%2078.4073%20129.306%2078.7661C127.28%2079.1221%20125.339%2077.7643%20124.983%2075.7406L124.536%2073.1973L121.992%2058.7785'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M128.362%2065.1454L130.661%2065.5502L130.449%2064.3876L128.17%2064.0632L128.362%2065.1454Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M130.345%20102.718L137.866%20134.199L147.181%20126.383L154.625%20135.253L158.173%20132.276L150.729%20123.406L160.041%20115.589L130.345%20102.718Z'%20fill='white'%20stroke='%2300112C'%20stroke-width='0.430582'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["uploadFiles"],"mappings":"AAAA,MAAAA,IAAe;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-bento-toast-controller.MmyZXtME.js","sources":["../../src/composables/use-bento-toast-controller/toast-stack.ts","../../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 { type 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","_a","getCurrentInstance","printDevelopmentWarning","readonly"],"mappings":";;;;AAIA,MAAMA,IAAsE,CAACC,GAAOC,MAAO;AACvF,QAAMC,IAAaF,EAAM,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"use-bento-toast-controller.MmyZXtME.js","sources":["../../src/composables/use-bento-toast-controller/toast-stack.ts","../../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 { type 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","_a","getCurrentInstance","printDevelopmentWarning","readonly"],"mappings":";;;;AAIA,MAAMA,IAAsE,CAACC,GAAOC,MAAO;AACvF,QAAMC,IAAaF,EAAM,MAAM,UAAU,CAAAG,MAASA,EAAM,OAAOF,CAAE;AACjE,EAAIC,MAAe,MACfF,EAAM,MAAM,OAAOE,GAAY,CAAC;AAExC,GAEaE,2BAAgC,aAAa,GAM7CC,IAAqC,MAAM;AACpD,QAAML,IAAQM,EAAyB,EAAE,GAEnCC,IAAW,CAAAC,MAAU;AACvB,UAAMP,IAAKQ,EAAY,OAAO,GACxBN,IAAQ;AAAA,MACV,GAAGK;AAAA,MACH,IAAAP;AAAA,MACA,SAAS,MAAMF,EAAaC,GAAOC,CAAE;AAAA,IAAA;AAGzC,WAAAD,EAAM,MAAM,QAAQG,CAAK,GAElB;AAAA,MACH,SAAS,MAAMJ,EAAaC,GAAOC,CAAE;AAAA,IAAA;AAAA,EAE7C;AAEA,SAAO;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,EAAA;AAER;AC5CO,SAASI,IAAmD;;AAC/D,QAAMC,KACAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,MAAMT;AAElC,SAAKQ,IAYE,EAAE,GAAGA,EAAA,KAXRG,EAAwB,uEAAuE,GAExF;AAAA,IACH,OAAOC,EAASV,EAAI,CAAA,CAAE,CAAC;AAAA,IACvB,UAAU,OAAO;AAAA;AAAA,MAEb,SAAS,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,EACpB;AAKZ;"}
|