@adyen/bento-vue2 1.102.0 → 1.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +20 -3
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-button.css +1 -1
- package/dist/assets/anchor-scroller.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/empty-state.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/table-of-contents.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.C0va5Mbv.js → accordion-item.CrVVFIHa.js} +16 -49
- package/dist/chunks/{accordion-item.C0va5Mbv.js.map → accordion-item.CrVVFIHa.js.map} +1 -1
- package/dist/chunks/{action-bar.-kzjjAuX.js → action-bar.BC1fWyHX.js} +18 -150
- package/dist/chunks/{action-bar.-kzjjAuX.js.map → action-bar.BC1fWyHX.js.map} +1 -1
- package/dist/chunks/{ai-button.ChLXOu7p.js → ai-button.CP6Bu7PB.js} +3 -3
- package/dist/chunks/{ai-button.ChLXOu7p.js.map → ai-button.CP6Bu7PB.js.map} +1 -1
- package/dist/chunks/{ai-tag.DhBjifex.js → ai-tag.wYWc7yOx.js} +16 -49
- package/dist/chunks/{ai-tag.DhBjifex.js.map → ai-tag.wYWc7yOx.js.map} +1 -1
- package/dist/chunks/{alert.CDP-LTh5.js → alert.Dj57zB88.js} +15 -81
- package/dist/chunks/{alert.CDP-LTh5.js.map → alert.Dj57zB88.js.map} +1 -1
- package/dist/chunks/anchor-scroller.Bhgy748g.js +120 -0
- package/dist/chunks/anchor-scroller.Bhgy748g.js.map +1 -0
- package/dist/chunks/{avatar.rwWPYJnt.js → avatar.D__jLgjI.js} +2 -2
- package/dist/chunks/{avatar.rwWPYJnt.js.map → avatar.D__jLgjI.js.map} +1 -1
- package/dist/chunks/{base-button.BPRPrO0p.js → base-button.D5C9VIYP.js} +20 -23
- package/dist/chunks/{base-button.BPRPrO0p.js.map → base-button.D5C9VIYP.js.map} +1 -1
- package/dist/chunks/{base-modal.BagJ8weI.js → base-modal.DlD_Lj4Y.js} +100 -141
- package/dist/chunks/{base-modal.BagJ8weI.js.map → base-modal.DlD_Lj4Y.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.CTgggEw2.js +77 -0
- package/dist/chunks/{button-actions-with-menu.DNYoFmV4.js.map → button-actions-with-menu.CTgggEw2.js.map} +1 -1
- package/dist/chunks/{button-actions.Dpbx0xf3.js → button-actions.CxX7lK7z.js} +362 -442
- package/dist/chunks/{button-actions.Dpbx0xf3.js.map → button-actions.CxX7lK7z.js.map} +1 -1
- package/dist/chunks/{button.CKS_V3p5.js → button.C4kKejsg.js} +34 -37
- package/dist/chunks/{button.CKS_V3p5.js.map → button.C4kKejsg.js.map} +1 -1
- package/dist/chunks/calendar.BoFWdxN7.js +1143 -0
- package/dist/chunks/{calendar.CvHJ3Geq.js.map → calendar.BoFWdxN7.js.map} +1 -1
- package/dist/chunks/{card.DqMECGcj.js → card.B70qRHOi.js} +34 -70
- package/dist/chunks/{card.DqMECGcj.js.map → card.B70qRHOi.js.map} +1 -1
- package/dist/chunks/{checkbox-group.YnXz1Hl2.js → checkbox-group.D1zzKsdi.js} +6 -6
- package/dist/chunks/{checkbox-group.YnXz1Hl2.js.map → checkbox-group.D1zzKsdi.js.map} +1 -1
- package/dist/chunks/{checkbox-input.08E9BNeF.js → checkbox-input.kfxcyjfd.js} +28 -31
- package/dist/chunks/{checkbox-input.08E9BNeF.js.map → checkbox-input.kfxcyjfd.js.map} +1 -1
- package/dist/chunks/{checkbox.BUc2332d.js → checkbox.Ca0mu2lE.js} +58 -91
- package/dist/chunks/{checkbox.BUc2332d.js.map → checkbox.Ca0mu2lE.js.map} +1 -1
- package/dist/chunks/{chip.DHmRHsL2.js → chip.wgEnbEPw.js} +16 -38
- package/dist/chunks/{chip.DHmRHsL2.js.map → chip.wgEnbEPw.js.map} +1 -1
- package/dist/chunks/click-outside.B0whuTUU.js +20 -0
- package/dist/chunks/{click-outside.BG01Sm0A.js.map → click-outside.B0whuTUU.js.map} +1 -1
- package/dist/chunks/{code-snippet.Cha3wHUL.js → code-snippet.BglbQWRB.js} +19 -74
- package/dist/chunks/{code-snippet.Cha3wHUL.js.map → code-snippet.BglbQWRB.js.map} +1 -1
- package/dist/chunks/{codemirror.D2BAltnu.js → codemirror.Bzus_EPG.js} +15 -15
- package/dist/chunks/{codemirror.D2BAltnu.js.map → codemirror.Bzus_EPG.js.map} +1 -1
- package/dist/chunks/constructNow.DyOJDyZZ.js +8 -0
- package/dist/chunks/{constructNow.CK0ryPil.js.map → constructNow.DyOJDyZZ.js.map} +1 -1
- package/dist/chunks/{controls-group.BomXFNvi.js → controls-group.DPLAJjbv.js} +3 -3
- package/dist/chunks/{controls-group.BomXFNvi.js.map → controls-group.DPLAJjbv.js.map} +1 -1
- package/dist/chunks/{copy.BlyhTDSU.js → copy.CsKQJlen.js} +16 -60
- package/dist/chunks/{copy.BlyhTDSU.js.map → copy.CsKQJlen.js.map} +1 -1
- package/dist/chunks/{country.DySY9sbA.js → country.D8ncVjcm.js} +5 -5
- package/dist/chunks/{country.DySY9sbA.js.map → country.D8ncVjcm.js.map} +1 -1
- package/dist/chunks/country.types.BUW49nQx.js +27 -0
- package/dist/chunks/country.types.BUW49nQx.js.map +1 -0
- package/dist/chunks/currency.POwX-Trj.js +124 -0
- package/dist/chunks/{currency.Dvy9Qjjf.js.map → currency.POwX-Trj.js.map} +1 -1
- package/dist/chunks/dashboard-section.Bmu65OHg.js +98 -0
- package/dist/chunks/{dashboard-section.D2yqhERq.js.map → dashboard-section.Bmu65OHg.js.map} +1 -1
- package/dist/chunks/{dashed-underline.ByPcIHNe.js → dashed-underline.CbzCYKrk.js} +11 -12
- package/dist/chunks/{dashed-underline.ByPcIHNe.js.map → dashed-underline.CbzCYKrk.js.map} +1 -1
- package/dist/chunks/data-grid-template.BvBHJ0sH.js +102 -0
- package/dist/chunks/{data-grid-template.Ifn423Ot.js.map → data-grid-template.BvBHJ0sH.js.map} +1 -1
- package/dist/chunks/data-grid.DPh8BSnM.js +3266 -0
- package/dist/chunks/{data-grid.BDXQ_kKQ.js.map → data-grid.DPh8BSnM.js.map} +1 -1
- package/dist/chunks/date-picker.DutUBQbH.js +183 -0
- package/dist/chunks/{date-picker.CXZfCxwP.js.map → date-picker.DutUBQbH.js.map} +1 -1
- package/dist/chunks/date-range-picker.5bvgs49h.js +924 -0
- package/dist/chunks/{date-range-picker.BzVQsYk4.js.map → date-range-picker.5bvgs49h.js.map} +1 -1
- package/dist/chunks/date-time-picker.DUWWGlOX.js +127 -0
- package/dist/chunks/{date-time-picker.DaLATfJp.js.map → date-time-picker.DUWWGlOX.js.map} +1 -1
- package/dist/chunks/{date.C1HnIyOv.js → date.CPo8t1n9.js} +25 -25
- package/dist/chunks/{date.C1HnIyOv.js.map → date.CPo8t1n9.js.map} +1 -1
- package/dist/chunks/{de.pvjpUJ1o.js → de.ctR_lBqr.js} +18 -18
- package/dist/chunks/{de.pvjpUJ1o.js.map → de.ctR_lBqr.js.map} +1 -1
- package/dist/chunks/{dialog-page.B_LwIWgK.js → dialog-page.CPorblJc.js} +16 -38
- package/dist/chunks/{dialog-page.B_LwIWgK.js.map → dialog-page.CPorblJc.js.map} +1 -1
- package/dist/chunks/differenceInMonths.yz4Dfe-b.js +44 -0
- package/dist/chunks/{differenceInMonths.CpwVtHZX.js.map → differenceInMonths.yz4Dfe-b.js.map} +1 -1
- package/dist/chunks/{directive.BBWhsNtO.js → directive.D1-d-C2K.js} +2 -2
- package/dist/chunks/{directive.BBWhsNtO.js.map → directive.D1-d-C2K.js.map} +1 -1
- package/dist/chunks/{draggable-handle.kBP4prVO.js → draggable-handle.g2BFN3G1.js} +18 -114
- package/dist/chunks/{draggable-handle.kBP4prVO.js.map → draggable-handle.g2BFN3G1.js.map} +1 -1
- package/dist/chunks/draggable.iIsQLiOa.js +168 -0
- package/dist/chunks/{draggable.rTa1jcHI.js.map → draggable.iIsQLiOa.js.map} +1 -1
- package/dist/chunks/{drawer.DVJxDGw3.js → drawer.CnxX1zZ6.js} +14 -36
- package/dist/chunks/{drawer.DVJxDGw3.js.map → drawer.CnxX1zZ6.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.CaLA2NLd.js → dropdown-tag.BFnfCah8.js} +77 -81
- package/dist/chunks/{dropdown-tag.CaLA2NLd.js.map → dropdown-tag.BFnfCah8.js.map} +1 -1
- package/dist/chunks/{dropdown.DIqgVVXB.js → dropdown.Ce2P9MZ-.js} +1131 -1466
- package/dist/chunks/{dropdown.DIqgVVXB.js.map → dropdown.Ce2P9MZ-.js.map} +1 -1
- package/dist/chunks/empty-state.fziM-yAC.js +102 -0
- package/dist/chunks/empty-state.fziM-yAC.js.map +1 -0
- package/dist/chunks/{en-GB.-Q7Oq-nY.js → en-GB.BsQNm5GT.js} +2 -2
- package/dist/chunks/{en-GB.-Q7Oq-nY.js.map → en-GB.BsQNm5GT.js.map} +1 -1
- package/dist/chunks/{en-US.BK5uiAND.js → en-US.BR6y7foR.js} +30 -30
- package/dist/chunks/{en-US.BK5uiAND.js.map → en-US.BR6y7foR.js.map} +1 -1
- package/dist/chunks/{error-message.Hqp_VvD3.js → error-message.BEHBfjmn.js} +14 -36
- package/dist/chunks/{error-message.Hqp_VvD3.js.map → error-message.BEHBfjmn.js.map} +1 -1
- package/dist/chunks/{es.2H4LvTyV.js → es.DxqH-QhP.js} +14 -14
- package/dist/chunks/{es.2H4LvTyV.js.map → es.DxqH-QhP.js.map} +1 -1
- package/dist/chunks/{field-label.DjJ7wdFi.js → field-label.CgdTst2l.js} +15 -37
- package/dist/chunks/{field-label.DjJ7wdFi.js.map → field-label.CgdTst2l.js.map} +1 -1
- package/dist/chunks/{file-uploader.2rIfQ2jb.js → file-uploader.BG89SLkG.js} +317 -630
- package/dist/chunks/{file-uploader.2rIfQ2jb.js.map → file-uploader.BG89SLkG.js.map} +1 -1
- package/dist/chunks/filter-bar.BMO8wTzb.js +3087 -0
- package/dist/chunks/{filter-bar.qlViDZPY.js.map → filter-bar.BMO8wTzb.js.map} +1 -1
- package/dist/chunks/fixed-scroller.oObE3f7m.js +117 -0
- package/dist/chunks/{fixed-scroller.04EUUgD_.js.map → fixed-scroller.oObE3f7m.js.map} +1 -1
- package/dist/chunks/{focus-trap.oRKjDFzf.js → focus-trap.l-wwtCHi.js} +69 -85
- package/dist/chunks/{focus-trap.oRKjDFzf.js.map → focus-trap.l-wwtCHi.js.map} +1 -1
- package/dist/chunks/{footer-actions.DXyJtVip.js → footer-actions.Dn9KYoqB.js} +4 -4
- package/dist/chunks/{footer-actions.DXyJtVip.js.map → footer-actions.Dn9KYoqB.js.map} +1 -1
- package/dist/chunks/{form-layout-group.DnjoLZZM.js → form-layout-group.C_0b8u-g.js} +2 -2
- package/dist/chunks/{form-layout-group.DnjoLZZM.js.map → form-layout-group.C_0b8u-g.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Bt5bP9r3.js → form-layout-title.YhZCVtoc.js} +15 -37
- package/dist/chunks/{form-layout-title.Bt5bP9r3.js.map → form-layout-title.YhZCVtoc.js.map} +1 -1
- package/dist/chunks/{fr.Cu0IIfBP.js → fr.DJtn8ron.js} +16 -16
- package/dist/chunks/{fr.Cu0IIfBP.js.map → fr.DJtn8ron.js.map} +1 -1
- package/dist/chunks/{generate-uid.NJ8tVoha.js → generate-uid.DBWe4g6T.js} +15 -16
- package/dist/chunks/{generate-uid.NJ8tVoha.js.map → generate-uid.DBWe4g6T.js.map} +1 -1
- package/dist/chunks/get-slot-text.DM_NdrUC.js +6 -0
- package/dist/chunks/{get-slot-text.Bjb9dTSV.js.map → get-slot-text.DM_NdrUC.js.map} +1 -1
- package/dist/chunks/{grid-layout.1aIiz2N_.js → grid-layout.BeCrjPgT.js} +16 -17
- package/dist/chunks/{grid-layout.1aIiz2N_.js.map → grid-layout.BeCrjPgT.js.map} +1 -1
- package/dist/chunks/header-meta.mDdMmFUA.js +206 -0
- package/dist/chunks/{header-meta.CCQVPDU8.js.map → header-meta.mDdMmFUA.js.map} +1 -1
- package/dist/chunks/{header-with-views.CEU6WrV9.js → header-with-views.Dp6SyiPu.js} +791 -1270
- package/dist/chunks/{header-with-views.CEU6WrV9.js.map → header-with-views.Dp6SyiPu.js.map} +1 -1
- package/dist/chunks/{header.BoNOTATn.js → header.DUAxdw_d.js} +4 -4
- package/dist/chunks/{header.BoNOTATn.js.map → header.DUAxdw_d.js.map} +1 -1
- package/dist/chunks/{index.C7m7gI5w.js → index.CL3TXc0a.js} +154 -160
- package/dist/chunks/{index.C7m7gI5w.js.map → index.CL3TXc0a.js.map} +1 -1
- package/dist/chunks/{index.B6WW_F-J.js → index.CPOlyau9.js} +5 -5
- package/dist/chunks/index.CPOlyau9.js.map +1 -0
- package/dist/chunks/{info-icon.BnLYUTzI.js → info-icon.BRnbXunj.js} +3 -3
- package/dist/chunks/{info-icon.BnLYUTzI.js.map → info-icon.BRnbXunj.js.map} +1 -1
- package/dist/chunks/input-field-password.C9_o6Kg2.js +230 -0
- package/dist/chunks/input-field-password.C9_o6Kg2.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.CPjH0EVF.js → input-field-phone-number.zRjd8HPi.js} +724 -756
- package/dist/chunks/{input-field-phone-number.CPjH0EVF.js.map → input-field-phone-number.zRjd8HPi.js.map} +1 -1
- package/dist/chunks/{input-field.BEV5lhwO.js → input-field.BTt1ORWU.js} +22 -58
- package/dist/chunks/{input-field.BEV5lhwO.js.map → input-field.BTt1ORWU.js.map} +1 -1
- package/dist/chunks/{input-time.En4O4DRD.js → input-time.BfJIDgaH.js} +15 -48
- package/dist/chunks/{input-time.En4O4DRD.js.map → input-time.BfJIDgaH.js.map} +1 -1
- package/dist/chunks/{inspector-page.OKPf0I4k.js → inspector-page.i8bVjo9U.js} +4 -4
- package/dist/chunks/{inspector-page.OKPf0I4k.js.map → inspector-page.i8bVjo9U.js.map} +1 -1
- package/dist/chunks/{inspector.DoQPHzCc.js → inspector.Aet0jTC2.js} +39 -106
- package/dist/chunks/{inspector.DoQPHzCc.js.map → inspector.Aet0jTC2.js.map} +1 -1
- package/dist/chunks/isSameWeek.CieN9XgL.js +14 -0
- package/dist/chunks/{isSameWeek.TrpUOIn5.js.map → isSameWeek.CieN9XgL.js.map} +1 -1
- package/dist/chunks/{it.B65snrJA.js → it.keS7oN5l.js} +8 -8
- package/dist/chunks/{it.B65snrJA.js.map → it.keS7oN5l.js.map} +1 -1
- package/dist/chunks/{ja.xGVfFSzL.js → ja.cLwacUE6.js} +27 -27
- package/dist/chunks/{ja.xGVfFSzL.js.map → ja.cLwacUE6.js.map} +1 -1
- package/dist/chunks/{layout-row.CPFK9Bg7.js → layout-row.HslYnPgn.js} +34 -35
- package/dist/chunks/{layout-row.CPFK9Bg7.js.map → layout-row.HslYnPgn.js.map} +1 -1
- package/dist/chunks/{link.Cejg8jB6.js → link.CscSbaXa.js} +15 -37
- package/dist/chunks/{link.Cejg8jB6.js.map → link.CscSbaXa.js.map} +1 -1
- package/dist/chunks/list-item.Cngxa9qN.js +166 -0
- package/dist/chunks/{list-item.BiJMHR7b.js.map → list-item.Cngxa9qN.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DnvECZQC.js → listbox-option-tag.BaoiH-Ku.js} +3 -3
- package/dist/chunks/{listbox-option-tag.DnvECZQC.js.map → listbox-option-tag.BaoiH-Ku.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Bn8MzG6Z.js → modal-fullscreen.Cg1Q6ERf.js} +64 -93
- package/dist/chunks/{modal-fullscreen.Bn8MzG6Z.js.map → modal-fullscreen.Cg1Q6ERf.js.map} +1 -1
- package/dist/chunks/{modal.CClQItuJ.js → modal.u-t1CvBr.js} +81 -105
- package/dist/chunks/{modal.CClQItuJ.js.map → modal.u-t1CvBr.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.p1-x06nS.js → navigation-menu-group.gNMP4tW4.js} +80 -129
- package/dist/chunks/{navigation-menu-group.p1-x06nS.js.map → navigation-menu-group.gNMP4tW4.js.map} +1 -1
- package/dist/chunks/{on-click-outside.Cy1eFULD.js → on-click-outside.BgIzQ2G1.js} +32 -33
- package/dist/chunks/{on-click-outside.Cy1eFULD.js.map → on-click-outside.BgIzQ2G1.js.map} +1 -1
- package/dist/chunks/{pagination.CZVdaeqE.js → pagination.D81XgMQ7.js} +73 -192
- package/dist/chunks/pagination.D81XgMQ7.js.map +1 -0
- package/dist/chunks/{payment-method.B3CkgsAY.js → payment-method.Clm5dEYh.js} +2 -2
- package/dist/chunks/{payment-method.B3CkgsAY.js.map → payment-method.Clm5dEYh.js.map} +1 -1
- package/dist/chunks/popover.types.H5Y0rC1r.js +6 -0
- package/dist/chunks/{popover.types.BfnJIpII.js.map → popover.types.H5Y0rC1r.js.map} +1 -1
- package/dist/chunks/{popper-container.Cb9wuFId.js → popper-container.D08eTt4B.js} +245 -252
- package/dist/chunks/{popper-container.Cb9wuFId.js.map → popper-container.D08eTt4B.js.map} +1 -1
- package/dist/chunks/{promo-banner.DZ0gerRx.js → promo-banner.BX47zMKh.js} +17 -39
- package/dist/chunks/{promo-banner.DZ0gerRx.js.map → promo-banner.BX47zMKh.js.map} +1 -1
- package/dist/chunks/{pt-BR.D9FuAQZm.js → pt-BR.ChPOra5s.js} +14 -14
- package/dist/chunks/{pt-BR.D9FuAQZm.js.map → pt-BR.ChPOra5s.js.map} +1 -1
- package/dist/chunks/{radio-group.DUW2dya4.js → radio-group.Dtx5hOkQ.js} +23 -23
- package/dist/chunks/{radio-group.DUW2dya4.js.map → radio-group.Dtx5hOkQ.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CuCPLzUh.js → rich-text-editor.CmVsFJjh.js} +1364 -1416
- package/dist/chunks/{rich-text-editor.CuCPLzUh.js.map → rich-text-editor.CmVsFJjh.js.map} +1 -1
- package/dist/chunks/scroll-to-section.DhW8SFy0.js +101 -0
- package/dist/chunks/scroll-to-section.DhW8SFy0.js.map +1 -0
- package/dist/chunks/{search-bar.8iDkgmjw.js → search-bar.CRfYCmkl.js} +15 -48
- package/dist/chunks/{search-bar.8iDkgmjw.js.map → search-bar.CRfYCmkl.js.map} +1 -1
- package/dist/chunks/secondary-nav.B1Tj7MAA.js +192 -0
- package/dist/chunks/{secondary-nav.CmvSHxvS.js.map → secondary-nav.B1Tj7MAA.js.map} +1 -1
- package/dist/chunks/{segmented-control.Bkp2Y95s.js → segmented-control.CBc-wx0m.js} +44 -48
- package/dist/chunks/{segmented-control.Bkp2Y95s.js.map → segmented-control.CBc-wx0m.js.map} +1 -1
- package/dist/chunks/{selection-card-group.EGigQJOW.js → selection-card-group.BaK3Rt4K.js} +91 -96
- package/dist/chunks/{selection-card-group.EGigQJOW.js.map → selection-card-group.BaK3Rt4K.js.map} +1 -1
- package/dist/chunks/set-time-in-date.BVfkl8K8.js +27 -0
- package/dist/chunks/{set-time-in-date.CU7HeZLY.js.map → set-time-in-date.BVfkl8K8.js.map} +1 -1
- package/dist/chunks/{sidepanel.yB7YuzVt.js → sidepanel.DeIREn9l.js} +55 -78
- package/dist/chunks/{sidepanel.yB7YuzVt.js.map → sidepanel.DeIREn9l.js.map} +1 -1
- package/dist/chunks/startOfWeek.muMEhS7U.js +9 -0
- package/dist/chunks/{startOfWeek.Br5KM4z_.js.map → startOfWeek.muMEhS7U.js.map} +1 -1
- package/dist/chunks/{status.CKb07vxI.js → status.DJ1Dfh5s.js} +2 -2
- package/dist/chunks/{status.CKb07vxI.js.map → status.DJ1Dfh5s.js.map} +1 -1
- package/dist/chunks/step.DfI11Din.js +221 -0
- package/dist/chunks/{step.CIfxl8Wm.js.map → step.DfI11Din.js.map} +1 -1
- package/dist/chunks/{structured-list-item.Cnv4Pw5n.js → structured-list-item._7YG2L3a.js} +18 -40
- package/dist/chunks/{structured-list-item.Cnv4Pw5n.js.map → structured-list-item._7YG2L3a.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.BcIlkfVO.js → summary-grid.types.B_gUEQ0c.js} +45 -50
- package/dist/chunks/{summary-grid.types.BcIlkfVO.js.map → summary-grid.types.B_gUEQ0c.js.map} +1 -1
- package/dist/chunks/tab.DFk4K9cq.js +229 -0
- package/dist/chunks/{tab.N0xGWsfO.js.map → tab.DFk4K9cq.js.map} +1 -1
- package/dist/chunks/table-of-contents.CoEnQ9g7.js +104 -0
- package/dist/chunks/{table-of-contents.Cf-IrdZl.js.map → table-of-contents.CoEnQ9g7.js.map} +1 -1
- package/dist/chunks/{tag.BAyLm485.js → tag.BC7FFENr.js} +4 -4
- package/dist/chunks/{tag.BAyLm485.js.map → tag.BC7FFENr.js.map} +1 -1
- package/dist/chunks/textarea.Z-VYFZVq.js +176 -0
- package/dist/chunks/{textarea.BDRR1zE0.js.map → textarea.Z-VYFZVq.js.map} +1 -1
- package/dist/chunks/{timeline-item.QEEIwYMy.js → timeline-item.BGHi_lOY.js} +114 -193
- package/dist/chunks/{timeline-item.QEEIwYMy.js.map → timeline-item.BGHi_lOY.js.map} +1 -1
- package/dist/chunks/{toast.XPG0vaQB.js → toast.D-jat1Xw.js} +64 -86
- package/dist/chunks/{toast.XPG0vaQB.js.map → toast.D-jat1Xw.js.map} +1 -1
- package/dist/chunks/{toggle.Ca-MM3dt.js → toggle.BqHWIhqD.js} +4 -4
- package/dist/chunks/{toggle.Ca-MM3dt.js.map → toggle.BqHWIhqD.js.map} +1 -1
- package/dist/chunks/{tooltip.7ct8WxCl.js → tooltip.D_XsoD_u.js} +68 -70
- package/dist/chunks/{tooltip.7ct8WxCl.js.map → tooltip.D_XsoD_u.js.map} +1 -1
- package/dist/chunks/truncate.DmCXQmeb.js +8 -0
- package/dist/chunks/{truncate.BfIl_-71.js.map → truncate.DmCXQmeb.js.map} +1 -1
- package/dist/chunks/{tutorial.bROv3HSx.js → tutorial.BtxKW4ac.js} +80 -173
- package/dist/chunks/{tutorial.bROv3HSx.js.map → tutorial.BtxKW4ac.js.map} +1 -1
- package/dist/chunks/typography.D1OZJbEa.js +90 -0
- package/dist/chunks/typography.D1OZJbEa.js.map +1 -0
- package/dist/chunks/{use-bento-delayed-hover.Bz_8EabW.js → use-bento-delayed-hover.D6QjSugc.js} +2 -2
- package/dist/chunks/{use-bento-delayed-hover.Bz_8EabW.js.map → use-bento-delayed-hover.D6QjSugc.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.CB6Qbf3R.js → use-bento-toast-controller.A5xraVqa.js} +14 -15
- package/dist/chunks/{use-bento-toast-controller.CB6Qbf3R.js.map → use-bento-toast-controller.A5xraVqa.js.map} +1 -1
- package/dist/chunks/use-country-items.B1KhLbqM.js +30 -0
- package/dist/chunks/{use-country-items.CmCRY7QX.js.map → use-country-items.B1KhLbqM.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.Cv5YgCOo.js +291 -0
- package/dist/chunks/use-country-phon-code.Cv5YgCOo.js.map +1 -0
- package/dist/chunks/use-date-input-formatter.DXwvH7B0.js +1629 -0
- package/dist/chunks/{use-date-input-formatter.DfQk8_Dw.js.map → use-date-input-formatter.DXwvH7B0.js.map} +1 -1
- package/dist/chunks/use-expandable-content-height.Bdd9hQwq.js +34 -0
- package/dist/chunks/{use-expandable-content-height.2WJLCL-R.js.map → use-expandable-content-height.Bdd9hQwq.js.map} +1 -1
- package/dist/chunks/utils.DWmc2mUI.js +19 -0
- package/dist/chunks/{utils.BzUwtTXc.js.map → utils.DWmc2mUI.js.map} +1 -1
- package/dist/chunks/{zh-CN.Be4pa3-g.js → zh-CN.ZG6obniO.js} +28 -28
- package/dist/chunks/{zh-CN.Be4pa3-g.js.map → zh-CN.ZG6obniO.js.map} +1 -1
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +1 -1
- package/dist/date.js +1 -1
- package/dist/draggable.js +2 -2
- package/dist/drawer.js +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +144 -149
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/inspector.js +2 -2
- package/dist/internal.js +14 -14
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +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/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/table-of-contents.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/use-form-v4.js +331 -341
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +32 -2
- package/package.json +11 -11
- package/dist/chunks/anchor-scroller.DgC74yeM.js +0 -141
- package/dist/chunks/anchor-scroller.DgC74yeM.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.DNYoFmV4.js +0 -85
- package/dist/chunks/calendar.CvHJ3Geq.js +0 -1247
- package/dist/chunks/click-outside.BG01Sm0A.js +0 -23
- package/dist/chunks/constructNow.CK0ryPil.js +0 -8
- package/dist/chunks/country.types.8GCHsdGN.js +0 -2789
- package/dist/chunks/country.types.8GCHsdGN.js.map +0 -1
- package/dist/chunks/currency.Dvy9Qjjf.js +0 -126
- package/dist/chunks/dashboard-section.D2yqhERq.js +0 -102
- package/dist/chunks/data-grid-template.Ifn423Ot.js +0 -111
- package/dist/chunks/data-grid.BDXQ_kKQ.js +0 -4121
- package/dist/chunks/date-picker.CXZfCxwP.js +0 -252
- package/dist/chunks/date-range-picker.BzVQsYk4.js +0 -1295
- package/dist/chunks/date-time-picker.DaLATfJp.js +0 -202
- package/dist/chunks/differenceInMonths.CpwVtHZX.js +0 -44
- package/dist/chunks/draggable.rTa1jcHI.js +0 -196
- package/dist/chunks/empty-state.DSVU1vU8.js +0 -106
- package/dist/chunks/empty-state.DSVU1vU8.js.map +0 -1
- package/dist/chunks/filter-bar.qlViDZPY.js +0 -3754
- package/dist/chunks/fixed-scroller.04EUUgD_.js +0 -152
- package/dist/chunks/get-slot-text.Bjb9dTSV.js +0 -12
- package/dist/chunks/header-meta.CCQVPDU8.js +0 -250
- package/dist/chunks/index.B6WW_F-J.js.map +0 -1
- package/dist/chunks/input-field-password.Bri9q5EV.js +0 -395
- package/dist/chunks/input-field-password.Bri9q5EV.js.map +0 -1
- package/dist/chunks/isSameWeek.TrpUOIn5.js +0 -14
- package/dist/chunks/list-item.BiJMHR7b.js +0 -226
- package/dist/chunks/pagination.CZVdaeqE.js.map +0 -1
- package/dist/chunks/popover.types.BfnJIpII.js +0 -6
- package/dist/chunks/scroll-to-section.CC5g-HBX.js +0 -111
- package/dist/chunks/scroll-to-section.CC5g-HBX.js.map +0 -1
- package/dist/chunks/secondary-nav.CmvSHxvS.js +0 -266
- package/dist/chunks/set-time-in-date.CU7HeZLY.js +0 -27
- package/dist/chunks/startOfWeek.Br5KM4z_.js +0 -10
- package/dist/chunks/step.CIfxl8Wm.js +0 -253
- package/dist/chunks/tab.N0xGWsfO.js +0 -259
- package/dist/chunks/table-of-contents.Cf-IrdZl.js +0 -129
- package/dist/chunks/textarea.BDRR1zE0.js +0 -224
- package/dist/chunks/truncate.BfIl_-71.js +0 -8
- package/dist/chunks/typography.C8lPlsbD.js +0 -87
- package/dist/chunks/typography.C8lPlsbD.js.map +0 -1
- package/dist/chunks/use-country-items.CmCRY7QX.js +0 -30
- package/dist/chunks/use-country-phon-code.BWkb546s.js +0 -6641
- package/dist/chunks/use-country-phon-code.BWkb546s.js.map +0 -1
- package/dist/chunks/use-date-input-formatter.DfQk8_Dw.js +0 -1732
- package/dist/chunks/use-expandable-content-height.2WJLCL-R.js +0 -35
- package/dist/chunks/utils.BzUwtTXc.js +0 -21
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { defineComponent as g, ref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { R as
|
|
1
|
+
import { defineComponent as g, ref as _, computed as i, isRef as E, watch as T, nextTick as B } from "vue";
|
|
2
|
+
import { B as F, h as I, f as P } from "./button-actions.CxX7lK7z.js";
|
|
3
|
+
import { B as C } from "./popover.types.H5Y0rC1r.js";
|
|
4
|
+
import { B as $ } from "./typography.D1OZJbEa.js";
|
|
5
|
+
import { B as w } from "./image.C2D2hKat.js";
|
|
6
|
+
import { u as N } from "./index.CPOlyau9.js";
|
|
7
|
+
import { R as A } from "./refresh.arF7jP-l.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { n as
|
|
10
|
-
import { P as
|
|
9
|
+
import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
|
+
import { P as x, h as K, o as D } from "./popper-container.D08eTt4B.js";
|
|
11
11
|
import "../assets/tutorial.css";
|
|
12
|
-
|
|
13
|
-
const z = /* @__PURE__ */ g({
|
|
12
|
+
const j = /* @__PURE__ */ g({
|
|
14
13
|
__name: "tutorial-indicator",
|
|
15
14
|
props: {
|
|
16
15
|
/**
|
|
@@ -18,12 +17,12 @@ const z = /* @__PURE__ */ g({
|
|
|
18
17
|
* The indicator will position itself around the target element.
|
|
19
18
|
*/
|
|
20
19
|
targetElement: {
|
|
21
|
-
type:
|
|
20
|
+
type: x.props?.targetElement.type,
|
|
22
21
|
required: !0
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
24
|
setup(a) {
|
|
26
|
-
const e =
|
|
25
|
+
const e = _({
|
|
27
26
|
width: "0",
|
|
28
27
|
height: "0",
|
|
29
28
|
borderRadius: "0"
|
|
@@ -37,155 +36,67 @@ const z = /* @__PURE__ */ g({
|
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
const s = [
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
K(),
|
|
40
|
+
D({
|
|
42
41
|
mainAxis: 2,
|
|
43
42
|
alignmentAxis: -2
|
|
44
43
|
}),
|
|
45
44
|
{
|
|
46
45
|
name: "updateIndicatorSize",
|
|
47
46
|
fn: ({ x: l, y: n, elements: o }) => {
|
|
48
|
-
const
|
|
49
|
-
return e.value.width = `${
|
|
47
|
+
const u = o.reference;
|
|
48
|
+
return e.value.width = `${u.offsetWidth + 8}px`, e.value.height = `${u.offsetHeight + 8}px`, e.value.borderRadius = r(u), { x: l, y: n };
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
];
|
|
53
|
-
return { __sfc: !0, BORDER_OFFSET: 2, computedStyles: e, getBorderRadius: r, middleware: s, PopperContainer:
|
|
52
|
+
return { __sfc: !0, BORDER_OFFSET: 2, computedStyles: e, getBorderRadius: r, middleware: s, PopperContainer: x };
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
var
|
|
55
|
+
var M = function() {
|
|
57
56
|
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
58
57
|
return e(r.PopperContainer, { staticClass: "b-tutorial-indicator", attrs: { "target-element": t.targetElement, middleware: r.middleware, position: "top-start", "fixed-positioning": "", "disabled-focus-trap": "", "data-testid": "tutorial-indicator" } }, [e("div", { staticClass: "b-tutorial-indicator__highlight", style: r.computedStyles })]);
|
|
59
|
-
},
|
|
58
|
+
}, z = [], L = /* @__PURE__ */ f(
|
|
59
|
+
j,
|
|
60
|
+
M,
|
|
60
61
|
z,
|
|
61
|
-
L,
|
|
62
|
-
V,
|
|
63
62
|
!1,
|
|
64
63
|
null,
|
|
65
64
|
"ea45578e"
|
|
66
65
|
);
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
const
|
|
66
|
+
const V = L.exports;
|
|
67
|
+
let y = 0;
|
|
68
|
+
const q = {
|
|
70
69
|
beforeCreate() {
|
|
71
|
-
this.uuid =
|
|
70
|
+
this.uuid = y.toString(), y += 1;
|
|
72
71
|
}
|
|
73
72
|
};
|
|
74
|
-
var
|
|
73
|
+
var Z = function() {
|
|
75
74
|
var t = this, e = t._self._c;
|
|
76
75
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("g", { attrs: { "clip-path": "url(#uia-ui-assets/icons-16-blocked__a" + t.uuid + ")" } }, [e("path", { attrs: { 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" } })]), e("defs", [e("clipPath", { attrs: { id: "uia-ui-assets/icons-16-blocked__a" + t.uuid } }, [e("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
|
|
77
|
-
},
|
|
76
|
+
}, H = [], U = /* @__PURE__ */ f(
|
|
77
|
+
q,
|
|
78
|
+
Z,
|
|
78
79
|
H,
|
|
79
|
-
U,
|
|
80
|
-
W,
|
|
81
80
|
!1,
|
|
82
81
|
null,
|
|
83
82
|
null
|
|
84
83
|
);
|
|
85
|
-
const
|
|
86
|
-
"de-DE": {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
startTour: "Start tour",
|
|
102
|
-
stepsOfTotal: "{step} of {totalSteps}"
|
|
103
|
-
},
|
|
104
|
-
"en-US": {
|
|
105
|
-
finish: "Finish",
|
|
106
|
-
next: "Next",
|
|
107
|
-
ok: "OK",
|
|
108
|
-
restartTour: "Restart tour",
|
|
109
|
-
skipTour: "Skip tour",
|
|
110
|
-
startTour: "Start tour",
|
|
111
|
-
stepsOfTotal: "{step} of {totalSteps}"
|
|
112
|
-
},
|
|
113
|
-
"es-419": {
|
|
114
|
-
finish: "Finalizar",
|
|
115
|
-
next: "Siguiente",
|
|
116
|
-
ok: "OK",
|
|
117
|
-
restartTour: "Reiniciar recorrido",
|
|
118
|
-
skipTour: "Omitir recorrido",
|
|
119
|
-
startTour: "Iniciar recorrido",
|
|
120
|
-
stepsOfTotal: "{step} de {totalSteps}"
|
|
121
|
-
},
|
|
122
|
-
"es-ES": {
|
|
123
|
-
finish: "Finalizar",
|
|
124
|
-
next: "Siguiente",
|
|
125
|
-
ok: "OK",
|
|
126
|
-
restartTour: "Reiniciar recorrido",
|
|
127
|
-
skipTour: "Saltar recorrido",
|
|
128
|
-
startTour: "Iniciar recorrido",
|
|
129
|
-
stepsOfTotal: "{step} de {totalSteps}"
|
|
130
|
-
},
|
|
131
|
-
"es-MX": {
|
|
132
|
-
finish: "Terminar",
|
|
133
|
-
next: "Siguiente",
|
|
134
|
-
ok: "OK",
|
|
135
|
-
restartTour: "Reiniciar recorrido",
|
|
136
|
-
skipTour: "Saltar recorrido",
|
|
137
|
-
startTour: "Iniciar recorrido",
|
|
138
|
-
stepsOfTotal: "{step} de {totalSteps}"
|
|
139
|
-
},
|
|
140
|
-
"fr-FR": {
|
|
141
|
-
finish: "Terminer",
|
|
142
|
-
next: "Suivant",
|
|
143
|
-
ok: "OK",
|
|
144
|
-
restartTour: "Redémarrer la visite",
|
|
145
|
-
skipTour: "Ignorer la visite",
|
|
146
|
-
startTour: "Commencer la visite",
|
|
147
|
-
stepsOfTotal: "{step} sur {TotalSteps}"
|
|
148
|
-
},
|
|
149
|
-
"it-IT": {
|
|
150
|
-
finish: "Finisci",
|
|
151
|
-
next: "Avanti",
|
|
152
|
-
ok: "OK",
|
|
153
|
-
restartTour: "Riavvia il tour",
|
|
154
|
-
skipTour: "Salta il tour",
|
|
155
|
-
startTour: "Inizia il tour",
|
|
156
|
-
stepsOfTotal: "{step} su {totalSteps}"
|
|
157
|
-
},
|
|
158
|
-
"ja-JP": {
|
|
159
|
-
finish: "終了",
|
|
160
|
-
next: "次へ",
|
|
161
|
-
ok: "OK",
|
|
162
|
-
restartTour: "Restart tour",
|
|
163
|
-
skipTour: "ツアーをスキップ",
|
|
164
|
-
startTour: "ツアーを開始",
|
|
165
|
-
stepsOfTotal: "{step} of {totalSteps}"
|
|
166
|
-
},
|
|
167
|
-
"pt-BR": {
|
|
168
|
-
finish: "Terminar",
|
|
169
|
-
next: "Próximo",
|
|
170
|
-
ok: "OK",
|
|
171
|
-
restartTour: "Restart tour",
|
|
172
|
-
skipTour: "Pular tour",
|
|
173
|
-
startTour: "Iniciar o tour",
|
|
174
|
-
stepsOfTotal: "{step} of {totalSteps}"
|
|
175
|
-
},
|
|
176
|
-
"zh-CN": {
|
|
177
|
-
finish: "结束",
|
|
178
|
-
next: "下一个",
|
|
179
|
-
ok: "确定",
|
|
180
|
-
restartTour: "重启导览",
|
|
181
|
-
skipTour: "跳过导览",
|
|
182
|
-
startTour: "开始导览",
|
|
183
|
-
stepsOfTotal: "{step} / {totalSteps}"
|
|
184
|
-
}
|
|
185
|
-
}, Q = {
|
|
186
|
-
i18n: { messages: J }
|
|
187
|
-
}, Y = /* @__PURE__ */ g({
|
|
188
|
-
...Q,
|
|
84
|
+
const W = U.exports, X = {
|
|
85
|
+
"de-DE": { finish: "Fertig", next: "Weiter", ok: "OK", restartTour: "Tour neu starten", skipTour: "Tour überspringen", startTour: "Tour starten", stepsOfTotal: "{step} von {totalSteps}" },
|
|
86
|
+
"en-GB": { finish: "Finish", next: "Next", ok: "OK", restartTour: "Restart tour", skipTour: "Skip tour", startTour: "Start tour", stepsOfTotal: "{step} of {totalSteps}" },
|
|
87
|
+
"en-US": { finish: "Finish", next: "Next", ok: "OK", restartTour: "Restart tour", skipTour: "Skip tour", startTour: "Start tour", stepsOfTotal: "{step} of {totalSteps}" },
|
|
88
|
+
"es-419": { finish: "Finalizar", next: "Siguiente", ok: "OK", restartTour: "Reiniciar recorrido", skipTour: "Omitir recorrido", startTour: "Iniciar recorrido", stepsOfTotal: "{step} de {totalSteps}" },
|
|
89
|
+
"es-ES": { finish: "Finalizar", next: "Siguiente", ok: "OK", restartTour: "Reiniciar recorrido", skipTour: "Saltar recorrido", startTour: "Iniciar recorrido", stepsOfTotal: "{step} de {totalSteps}" },
|
|
90
|
+
"es-MX": { finish: "Terminar", next: "Siguiente", ok: "OK", restartTour: "Reiniciar recorrido", skipTour: "Saltar recorrido", startTour: "Iniciar recorrido", stepsOfTotal: "{step} de {totalSteps}" },
|
|
91
|
+
"fr-FR": { finish: "Terminer", next: "Suivant", ok: "OK", restartTour: "Redémarrer la visite", skipTour: "Ignorer la visite", startTour: "Commencer la visite", stepsOfTotal: "{step} sur {TotalSteps}" },
|
|
92
|
+
"it-IT": { finish: "Finisci", next: "Avanti", ok: "OK", restartTour: "Riavvia il tour", skipTour: "Salta il tour", startTour: "Inizia il tour", stepsOfTotal: "{step} su {totalSteps}" },
|
|
93
|
+
"ja-JP": { finish: "終了", next: "次へ", ok: "OK", restartTour: "Restart tour", skipTour: "ツアーをスキップ", startTour: "ツアーを開始", stepsOfTotal: "{step} of {totalSteps}" },
|
|
94
|
+
"pt-BR": { finish: "Terminar", next: "Próximo", ok: "OK", restartTour: "Restart tour", skipTour: "Pular tour", startTour: "Iniciar o tour", stepsOfTotal: "{step} of {totalSteps}" },
|
|
95
|
+
"zh-CN": { finish: "结束", next: "下一个", ok: "确定", restartTour: "重启导览", skipTour: "跳过导览", startTour: "开始导览", stepsOfTotal: "{step} / {totalSteps}" }
|
|
96
|
+
}, G = {
|
|
97
|
+
i18n: { messages: X }
|
|
98
|
+
}, J = /* @__PURE__ */ g({
|
|
99
|
+
...G,
|
|
189
100
|
__name: "tutorial-popover",
|
|
190
101
|
props: {
|
|
191
102
|
/**
|
|
@@ -221,8 +132,8 @@ const G = X.exports, J = {
|
|
|
221
132
|
*/
|
|
222
133
|
position: {
|
|
223
134
|
type: String,
|
|
224
|
-
default:
|
|
225
|
-
validator: (a) => Object.values(
|
|
135
|
+
default: C.BOTTOM_START,
|
|
136
|
+
validator: (a) => Object.values(C).includes(a)
|
|
226
137
|
},
|
|
227
138
|
/**
|
|
228
139
|
* Options to control the scroll into view behavior.
|
|
@@ -276,7 +187,7 @@ const G = X.exports, J = {
|
|
|
276
187
|
},
|
|
277
188
|
emits: ["next", "finish", "restart"],
|
|
278
189
|
setup(a, { emit: t }) {
|
|
279
|
-
const e = a, r = { behavior: "smooth" }, { t: s } =
|
|
190
|
+
const e = a, r = { behavior: "smooth" }, { t: s } = N(), l = i(() => ({
|
|
280
191
|
title: s("skipTour"),
|
|
281
192
|
event: () => t("finish")
|
|
282
193
|
})), n = i(() => ({
|
|
@@ -285,63 +196,59 @@ const G = X.exports, J = {
|
|
|
285
196
|
})), o = i(() => ({
|
|
286
197
|
title: s("next"),
|
|
287
198
|
event: () => t("next")
|
|
288
|
-
})),
|
|
199
|
+
})), u = i(() => ({
|
|
289
200
|
title: s("finish"),
|
|
290
201
|
event: () => t("finish")
|
|
291
202
|
})), h = i(() => ({
|
|
292
203
|
title: s("ok"),
|
|
293
204
|
event: () => t("finish")
|
|
294
|
-
})), O =
|
|
295
|
-
var u;
|
|
296
|
-
return F(e.targetElement) ? ((u = e.targetElement.value) == null ? void 0 : u.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
|
|
297
|
-
}), _ = i(() => e.step === 0), m = i(() => e.step === e.totalSteps), R = i(() => !_.value), E = i(() => [
|
|
205
|
+
})), O = _(!1), S = _(!1), d = i(() => E(e.targetElement) ? e.targetElement.value?.$el || e.targetElement.value : e.targetElement.$el || e.targetElement), c = i(() => e.step === 0), v = i(() => e.step === e.totalSteps), b = i(() => !c.value), k = i(() => [
|
|
298
206
|
{
|
|
299
207
|
text: s("restartTour"),
|
|
300
208
|
handler: () => t("restart"),
|
|
301
|
-
icon:
|
|
209
|
+
icon: A
|
|
302
210
|
},
|
|
303
|
-
...
|
|
211
|
+
...v.value ? [] : [
|
|
304
212
|
{
|
|
305
213
|
text: s("skipTour"),
|
|
306
214
|
handler: () => t("finish"),
|
|
307
|
-
icon:
|
|
215
|
+
icon: W
|
|
308
216
|
}
|
|
309
217
|
]
|
|
310
|
-
]),
|
|
311
|
-
let
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
return
|
|
218
|
+
]), R = i(() => {
|
|
219
|
+
let p;
|
|
220
|
+
c.value ? p = e.single ? h.value : n.value : v.value ? p = u.value : p = o.value;
|
|
221
|
+
const m = [p];
|
|
222
|
+
return c.value && !e.single ? m.push(l.value) : e.action && m.push(e.action), m;
|
|
315
223
|
});
|
|
316
224
|
return T(
|
|
317
225
|
() => e.active,
|
|
318
|
-
async (
|
|
319
|
-
|
|
320
|
-
u && ((c = v.value) != null && c.scrollIntoView) && ((C = v.value) == null || C.scrollIntoView(
|
|
226
|
+
async (p) => {
|
|
227
|
+
p && d.value?.scrollIntoView && (d.value?.scrollIntoView(
|
|
321
228
|
e.scrollOptions != null ? e.scrollOptions : r
|
|
322
|
-
), await
|
|
229
|
+
), await B()), O.value = p, S.value = p;
|
|
323
230
|
},
|
|
324
231
|
{ immediate: !0 }
|
|
325
|
-
), { __sfc: !0, DEFAULT_SCROLL_OPTIONS: r, props: e, t: s, emit: t, ACTION_SKIP: l, ACTION_START: n, ACTION_NEXT: o, ACTION_FINISH:
|
|
232
|
+
), { __sfc: !0, DEFAULT_SCROLL_OPTIONS: r, props: e, t: s, emit: t, ACTION_SKIP: l, ACTION_START: n, ACTION_NEXT: o, ACTION_FINISH: u, ACTION_OK: h, isPopoverOpen: O, isIndicatorVisible: S, targetElement: d, isFirstStep: c, isLastStep: v, showSteps: b, menuData: k, computedActions: R, BentoMenu: P, BentoPopover: I, BentoTypography: $, BentoButtonActions: F, BentoImage: w, TutorialIndicator: V };
|
|
326
233
|
}
|
|
327
234
|
});
|
|
328
|
-
var
|
|
235
|
+
var Q = function() {
|
|
329
236
|
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
330
237
|
return t.active && r.targetElement ? e("div", [r.isIndicatorVisible && r.targetElement ? e(r.TutorialIndicator, { attrs: { "target-element": r.targetElement } }) : t._e(), e(r.BentoPopover, { staticClass: "b-tutorial-popover", attrs: { "target-element": r.targetElement, position: t.position, open: r.isPopoverOpen, "aria-label": t.title, "fixed-positioning": "" }, nativeOn: { keydown: function(s) {
|
|
331
238
|
return !s.type.indexOf("key") && t._k(s.keyCode, "esc", 27, s.key, ["Esc", "Escape"]) ? null : r.emit("finish");
|
|
332
239
|
} }, scopedSlots: t._u([t.image ? { key: "image", fn: function() {
|
|
333
240
|
return [e(r.BentoImage, t._b({ staticClass: "b-tutorial-popover__image", attrs: { "aspect-ratio": "landscape" } }, "bento-image", t.image, !1))];
|
|
334
241
|
}, proxy: !0 } : null], null, !0) }, [e("div", { staticClass: "b-tutorial-popover__ripple", attrs: { "aria-hidden": "true" } }), e("div", { staticClass: "b-tutorial-popover__header" }, [e(r.BentoTypography, { attrs: { variant: "title", el: "span" } }, [t._v(" " + t._s(t.title) + " ")]), r.showSteps ? e(r.BentoTypography, { staticClass: "b-tutorial-popover__steps", attrs: { el: "span" } }, [t._v(" " + t._s(r.t("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })) + " ")]) : t._e()], 1), e(r.BentoTypography, [t._t("default")], 2), e("div", { staticClass: "b-tutorial-popover__footer" }, [r.isFirstStep ? t._e() : e(r.BentoMenu, { staticClass: "b-tutorial-popover__menu", attrs: { data: r.menuData, "data-testid": "menu-button" } }), e("div", { staticClass: "b-tutorial-popover__actions" }, [e(r.BentoButtonActions, { attrs: { actions: r.computedActions, layout: "buttons-end" } })], 1)], 1)], 1)], 1) : t._e();
|
|
335
|
-
},
|
|
242
|
+
}, Y = [], tt = /* @__PURE__ */ f(
|
|
243
|
+
J,
|
|
244
|
+
Q,
|
|
336
245
|
Y,
|
|
337
|
-
tt,
|
|
338
|
-
et,
|
|
339
246
|
!1,
|
|
340
247
|
null,
|
|
341
248
|
"2dd6eac0"
|
|
342
249
|
);
|
|
343
|
-
const
|
|
344
|
-
...
|
|
250
|
+
const et = tt.exports, rt = {}, st = /* @__PURE__ */ g({
|
|
251
|
+
...rt,
|
|
345
252
|
__name: "tutorial",
|
|
346
253
|
props: {
|
|
347
254
|
/**
|
|
@@ -372,19 +279,19 @@ const st = rt.exports, ot = {}, it = /* @__PURE__ */ g({
|
|
|
372
279
|
},
|
|
373
280
|
emits: ["update:index"],
|
|
374
281
|
setup(a, { emit: t }) {
|
|
375
|
-
const e = a, r =
|
|
376
|
-
function n(o,
|
|
282
|
+
const e = a, r = _(e.index || 0), s = i(() => e.steps.length - 1), l = i(() => s.value === 0);
|
|
283
|
+
function n(o, u) {
|
|
377
284
|
return {
|
|
378
285
|
// Visual
|
|
379
286
|
targetElement: o.target,
|
|
380
287
|
image: o.image,
|
|
381
288
|
title: o.title,
|
|
382
|
-
step:
|
|
289
|
+
step: u,
|
|
383
290
|
totalSteps: s.value,
|
|
384
291
|
action: o.action,
|
|
385
292
|
scrollOptions: e.scrollOptions,
|
|
386
293
|
// Config
|
|
387
|
-
active:
|
|
294
|
+
active: u === r.value,
|
|
388
295
|
single: l.value,
|
|
389
296
|
position: o.position
|
|
390
297
|
};
|
|
@@ -396,10 +303,10 @@ const st = rt.exports, ot = {}, it = /* @__PURE__ */ g({
|
|
|
396
303
|
(o) => {
|
|
397
304
|
o >= -1 && o <= s.value && (r.value = o);
|
|
398
305
|
}
|
|
399
|
-
), { __sfc: !0, props: e, emit: t, currentStep: r, totalSteps: s, isSingleTutorial: l, getPopoverProps: n, TutorialPopover:
|
|
306
|
+
), { __sfc: !0, props: e, emit: t, currentStep: r, totalSteps: s, isSingleTutorial: l, getPopoverProps: n, TutorialPopover: et };
|
|
400
307
|
}
|
|
401
308
|
});
|
|
402
|
-
var
|
|
309
|
+
var ot = function() {
|
|
403
310
|
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
404
311
|
return e("div", { staticClass: "b-tutorial" }, t._l(t.steps, function(s, l) {
|
|
405
312
|
return e(r.TutorialPopover, t._b({ key: s.title, on: { finish: function(n) {
|
|
@@ -410,16 +317,16 @@ var at = function() {
|
|
|
410
317
|
r.currentStep = 0;
|
|
411
318
|
} } }, "tutorial-popover", r.getPopoverProps(s, l), !1), [t._v(" " + t._s(s.description) + " ")]);
|
|
412
319
|
}), 1);
|
|
413
|
-
},
|
|
320
|
+
}, it = [], at = /* @__PURE__ */ f(
|
|
321
|
+
st,
|
|
322
|
+
ot,
|
|
414
323
|
it,
|
|
415
|
-
at,
|
|
416
|
-
nt,
|
|
417
324
|
!1,
|
|
418
325
|
null,
|
|
419
326
|
null
|
|
420
327
|
);
|
|
421
|
-
const
|
|
328
|
+
const Tt = at.exports;
|
|
422
329
|
export {
|
|
423
|
-
|
|
330
|
+
Tt as t
|
|
424
331
|
};
|
|
425
|
-
//# sourceMappingURL=tutorial.
|
|
332
|
+
//# sourceMappingURL=tutorial.BtxKW4ac.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.bROv3HSx.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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AAA;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.BtxKW4ac.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","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","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,MACVC,EAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAC,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC,IAAAD,EAAA;AACA,iBAAAV,EAAA,MAAA,QAAA,GAAAW,EAAA,cAAA,CAAA,MACAX,EAAA,MAAA,SAAA,GAAAW,EAAA,eAAA,CAAA,MACAX,EAAA,MAAA,eAAAE,EAAAS,CAAA,GACA,EAAA,GAAAH,GAAA,GAAAC,EAAA;AAAA,QAAc;AAAA,MAClB;AAAA,IACJ;;;;;;;;;;;;;;;;ACvDR,IAAAG,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;GC2PIE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1MAC,IAAA,EAAA,UAAA,SAAA,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WAAAR,EAAAI,GAAA,CAAAI,MAAA;AACI,MAAA3B,EAAA,gBAAA2B,CAAA;AAAA,IAAyB,CAAA,GAG7BR;AAAA,MAAA,MAAAV,EAAA;AAAA,MACgB,CAAAoB,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineComponent as p, computed as E, onMounted as T } from "vue";
|
|
2
|
+
import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
3
|
+
import "../assets/typography.css";
|
|
4
|
+
const u = ["development", "DEVELOPMENT", "dev", "DEV"], v = () => u.includes(process.env.NODE_ENV);
|
|
5
|
+
function s(...a) {
|
|
6
|
+
v() && console.warn(...a);
|
|
7
|
+
}
|
|
8
|
+
const o = ["color: red", "background: yellow"].join(";"), i = /* @__PURE__ */ new Set();
|
|
9
|
+
function I(a, t, n) {
|
|
10
|
+
i.has(a) || (s(`%cDEPRECATED:\x1B[0m ${a}`, o), s(`${t.replaceAll(" ", "").trim()}`), s(`To be removed in: %c${n}`, o), i.add(a));
|
|
11
|
+
}
|
|
12
|
+
var e = /* @__PURE__ */ ((a) => (a.CAPTION = "caption", a.BODY = "body", a.SUBTITLE = "subtitle", a.TITLE = "title", a))(e || {}), r = /* @__PURE__ */ ((a) => (a.WIDE = "wide", a.STRONGER = "stronger", a.STRONGER_WIDE = "stronger-wide", a.STRONGEST = "strongest", a.STRONGEST_WIDE = "strongest-wide", a.MEDIUM = "m", a.LARGE = "l", a.MOBILE = "mobile", a.MONOSPACE = "monospace", a))(r || {}), l = /* @__PURE__ */ ((a) => (a.H1 = "h1", a.H2 = "h2", a.H3 = "h3", a.H4 = "h4", a.H5 = "h5", a.H6 = "h6", a.DIV = "div", a.PARAGRAPH = "p", a.SPAN = "span", a))(l || {});
|
|
13
|
+
const O = {
|
|
14
|
+
name: "bento-typography",
|
|
15
|
+
inheritAttrs: !0
|
|
16
|
+
}, h = /* @__PURE__ */ p({
|
|
17
|
+
...O,
|
|
18
|
+
props: {
|
|
19
|
+
el: { default: l.PARAGRAPH },
|
|
20
|
+
large: { type: Boolean, default: !1 },
|
|
21
|
+
medium: { type: Boolean, default: !1 },
|
|
22
|
+
monospace: { type: Boolean, default: !1 },
|
|
23
|
+
richText: { type: Boolean },
|
|
24
|
+
stronger: { type: Boolean, default: !1 },
|
|
25
|
+
strongest: { type: Boolean, default: !1 },
|
|
26
|
+
variant: { default: e.BODY },
|
|
27
|
+
wide: { type: Boolean, default: !1 }
|
|
28
|
+
},
|
|
29
|
+
setup(a) {
|
|
30
|
+
const t = a;
|
|
31
|
+
t.variant === e.SUBTITLE && I(
|
|
32
|
+
'BentoTypography "subtitle" variant (BentoTypographyVariant.SUBTITLE)',
|
|
33
|
+
`Use the "title" or "BentoTypographyVariant.TITLE" variant and (optionally) combine it with a size property. e.g. medium / large.
|
|
34
|
+
<bento-typography :variant="BentoTypographyVariant.TITLE" medium>`,
|
|
35
|
+
"2.0.0"
|
|
36
|
+
);
|
|
37
|
+
const n = E(() => ({
|
|
38
|
+
// Rich text
|
|
39
|
+
"b-typography--rich-text": t.richText,
|
|
40
|
+
// Monospace
|
|
41
|
+
[`b-typography--${r.MONOSPACE}`]: t.monospace,
|
|
42
|
+
// Caption
|
|
43
|
+
[`b-typography--${e.CAPTION}`]: t.variant === e.CAPTION,
|
|
44
|
+
[`b-typography--${e.CAPTION}-${r.WIDE}`]: t.variant === e.CAPTION && t.wide,
|
|
45
|
+
[`b-typography--${e.CAPTION}-${r.STRONGER}`]: t.variant === e.CAPTION && t.stronger,
|
|
46
|
+
// Body
|
|
47
|
+
[`b-typography--${e.BODY}`]: t.variant === e.BODY,
|
|
48
|
+
[`b-typography--${e.BODY}-${r.WIDE}`]: t.variant === e.BODY && t.wide,
|
|
49
|
+
[`b-typography--${e.BODY}-${r.STRONGER}`]: t.variant === e.BODY && t.stronger,
|
|
50
|
+
[`b-typography--${e.BODY}-${r.STRONGEST}`]: t.variant === e.BODY && t.strongest,
|
|
51
|
+
// Subtitle
|
|
52
|
+
[`b-typography--${e.SUBTITLE}`]: t.variant === e.SUBTITLE,
|
|
53
|
+
[`b-typography--${e.SUBTITLE}-${r.STRONGER}`]: t.variant === e.SUBTITLE && t.stronger,
|
|
54
|
+
// Title
|
|
55
|
+
[`b-typography--${e.TITLE}`]: t.variant === e.TITLE && !t.medium && !t.large,
|
|
56
|
+
[`b-typography--${e.TITLE}-${r.MEDIUM}`]: t.variant === e.TITLE && t.medium,
|
|
57
|
+
[`b-typography--${e.TITLE}-${r.LARGE}`]: t.variant === e.TITLE && t.large
|
|
58
|
+
}));
|
|
59
|
+
return T(() => {
|
|
60
|
+
if (t.richText && t.el !== "div")
|
|
61
|
+
throw new Error('Rich-text prop must be used with el="div" for correct HTML semantics');
|
|
62
|
+
if (t.richText && t.variant === "title")
|
|
63
|
+
throw new Error("Rich-text prop cannot be used with the title variant.");
|
|
64
|
+
if (t.richText && t.variant === "subtitle")
|
|
65
|
+
throw new Error("Rich-text prop cannot be used with the subtitle variant.");
|
|
66
|
+
}), { __sfc: !0, props: t, conditionalClasses: n };
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
var m = function() {
|
|
70
|
+
var t = this, n = t._self._c, c = t._self._setupProxy;
|
|
71
|
+
return n(t.el, { tag: "component", staticClass: "b-typography", class: c.conditionalClasses, attrs: { "data-testid": "typography" } }, [t._t("default")], 2);
|
|
72
|
+
}, b = [], _ = /* @__PURE__ */ d(
|
|
73
|
+
h,
|
|
74
|
+
m,
|
|
75
|
+
b,
|
|
76
|
+
!1,
|
|
77
|
+
null,
|
|
78
|
+
"33897a3a"
|
|
79
|
+
);
|
|
80
|
+
const R = _.exports;
|
|
81
|
+
export {
|
|
82
|
+
R as B,
|
|
83
|
+
l as a,
|
|
84
|
+
r as b,
|
|
85
|
+
e as c,
|
|
86
|
+
I as d,
|
|
87
|
+
v as i,
|
|
88
|
+
s as p
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=typography.D1OZJbEa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.D1OZJbEa.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 Since v0.0.0. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Since v2.0.0. 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 MONOSPACE = 'monospace',\n}\n\n/**\n * @deprecated Since v2.0.0. Use 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 * Changes the font family to monospace.\n * Applicable to all variants.\n */\n monospace?: 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 monospace: { 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 // Monospace\n [`b-typography--${BentoTypographyModifier.MONOSPACE}`]: props.monospace,\n\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,CAAA,cAAA,oBAAA,EAAA,KAAA,GAAA,GACAC,IAAA,oBAAA,IAAA;AASO,SAAAC,EAAAC,GAAAC,GAAAC,GAAA;AAEH,EAAAJ,EAAA,IAAAE,CAAA,MACIL,EAAA,wBAAAK,CAAA,IAAAH,CAAA,GAEAF,EAAA,GAAAM,EAAA,WAAA,MAAA,EAAA,EAAA,KAAA,CAAA,EAAA,GACAN,EAAA,uBAAAO,CAAA,IAAAL,CAAA,GACAC,EAAA,IAAAE,CAAA;AAER;AClBO,IAAAG,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,WAAA,YACAA,EAAA,gBAAA,iBACAA,EAAA,YAAA,aACAA,EAAA,iBAAA,kBACAA,EAAA,SAAA,KACAA,EAAA,QAAA,KACAA,EAAA,SAAA,UACAA,EAAA,YAAA,aATQA,IAAAD,KAAA,CAAA,CAAA,GAeLE,IAAA,kBAAAC,OACHA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,MAAA,OACAA,EAAA,YAAA,KACAA,EAAA,OAAA,QATQA,IAAAD,KAAA,CAAA,CAAA;ACiFR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAE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