@adyen/bento-vue3 1.88.1 → 1.89.2
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 +722 -524
- 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/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-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.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/inspector.css +1 -1
- package/dist/assets/list-item.css +1 -0
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/use-cached-selected-values.css +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.QQ06tTjt.js → accordion-item.BX1KrLMl.js} +6 -15
- package/dist/chunks/{accordion-item.QQ06tTjt.js.map → accordion-item.BX1KrLMl.js.map} +1 -1
- package/dist/chunks/{action-bar.BS2cJzG_.js → action-bar.DLMaIUWW.js} +8 -34
- package/dist/chunks/{action-bar.BS2cJzG_.js.map → action-bar.DLMaIUWW.js.map} +1 -1
- package/dist/chunks/{ai-button.XfeGC4-Q.js → ai-button.1YJdI-sw.js} +3 -3
- package/dist/chunks/{ai-button.XfeGC4-Q.js.map → ai-button.1YJdI-sw.js.map} +1 -1
- package/dist/chunks/{ai-tag.DVCW-_vD.js → ai-tag.DK63ExDc.js} +6 -15
- package/dist/chunks/{ai-tag.DVCW-_vD.js.map → ai-tag.DK63ExDc.js.map} +1 -1
- package/dist/chunks/{alert.CDWtu0Hu.js → alert.C_8-VNi_.js} +6 -24
- package/dist/chunks/{alert.CDWtu0Hu.js.map → alert.C_8-VNi_.js.map} +1 -1
- package/dist/chunks/anchor-scroller.NhjLDBZI.js +207 -0
- package/dist/chunks/{anchor-scroller.BctgW0se.js.map → anchor-scroller.NhjLDBZI.js.map} +1 -1
- package/dist/chunks/{base-button.CRYAiuzn.js → base-button.CvHl36Ue.js} +24 -27
- package/dist/chunks/{base-button.CRYAiuzn.js.map → base-button.CvHl36Ue.js.map} +1 -1
- package/dist/chunks/base-modal.C2-JyHC_.js +424 -0
- package/dist/chunks/{base-modal.gZAtk-xP.js.map → base-modal.C2-JyHC_.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.BQFAgAI2.js +85 -0
- package/dist/chunks/{button-actions-with-menu.Tba1ME79.js.map → button-actions-with-menu.BQFAgAI2.js.map} +1 -1
- package/dist/chunks/{button-actions.BYBpjNqy.js → button-actions.cMQWyZne.js} +511 -542
- package/dist/chunks/{button-actions.BYBpjNqy.js.map → button-actions.cMQWyZne.js.map} +1 -1
- package/dist/chunks/{button.C6t9_lzm.js → button.DWF7FSIw.js} +42 -45
- package/dist/chunks/{button.C6t9_lzm.js.map → button.DWF7FSIw.js.map} +1 -1
- package/dist/chunks/calendar.DcCqkSNJ.js +1201 -0
- package/dist/chunks/{calendar.vM3abC8y.js.map → calendar.DcCqkSNJ.js.map} +1 -1
- package/dist/chunks/{card.Cw63i7Ul.js → card.CoxQ_L0w.js} +9 -21
- package/dist/chunks/{card.Cw63i7Ul.js.map → card.CoxQ_L0w.js.map} +1 -1
- package/dist/chunks/{checkbox-group.ODQy-ICn.js → checkbox-group.96n9Cc3W.js} +5 -5
- package/dist/chunks/{checkbox-group.ODQy-ICn.js.map → checkbox-group.96n9Cc3W.js.map} +1 -1
- package/dist/chunks/{checkbox-input.BZjSoCQW.js → checkbox-input.CVFQCfZM.js} +44 -51
- package/dist/chunks/{checkbox-input.BZjSoCQW.js.map → checkbox-input.CVFQCfZM.js.map} +1 -1
- package/dist/chunks/{checkbox.C3Ewfygy.js → checkbox.C6ATh8f5.js} +85 -94
- package/dist/chunks/{checkbox.C3Ewfygy.js.map → checkbox.C6ATh8f5.js.map} +1 -1
- package/dist/chunks/chevron-right-small.BCinNiMt.js +29 -0
- package/dist/chunks/chevron-right-small.BCinNiMt.js.map +1 -0
- package/dist/chunks/{chip.CyW1V8RU.js → chip.CdgpQyXN.js} +6 -12
- package/dist/chunks/{chip.CyW1V8RU.js.map → chip.CdgpQyXN.js.map} +1 -1
- package/dist/chunks/click-outside.BPylIosK.js +20 -0
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BPylIosK.js.map} +1 -1
- package/dist/chunks/{code-snippet.BaJU2I5_.js → code-snippet.DgAuuZF5.js} +9 -24
- package/dist/chunks/{code-snippet.BaJU2I5_.js.map → code-snippet.DgAuuZF5.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.D9uRk678.js +8 -0
- package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.D9uRk678.js.map} +1 -1
- package/dist/chunks/{controls-group.Bu5lNTyH.js → controls-group.C7hOE1F4.js} +3 -3
- package/dist/chunks/{controls-group.Bu5lNTyH.js.map → controls-group.C7hOE1F4.js.map} +1 -1
- package/dist/chunks/{copy.C_BCNHYQ.js → copy.C2kQ1PbI.js} +7 -19
- package/dist/chunks/{copy.C_BCNHYQ.js.map → copy.C2kQ1PbI.js.map} +1 -1
- package/dist/chunks/{country.DJts6kCv.js → country.CaGc08Ps.js} +3 -3
- package/dist/chunks/{country.DJts6kCv.js.map → country.CaGc08Ps.js.map} +1 -1
- package/dist/chunks/country.types.DjpMGz7a.js +19 -0
- package/dist/chunks/{country.types.BBQbWkTY.js.map → country.types.DjpMGz7a.js.map} +1 -1
- package/dist/chunks/{currency.Afx8MVdY.js → currency.DuTEzR_W.js} +40 -42
- package/dist/chunks/{currency.Afx8MVdY.js.map → currency.DuTEzR_W.js.map} +1 -1
- package/dist/chunks/dashboard-section.UafHRkMa.js +161 -0
- package/dist/chunks/{dashboard-section.CgoLquLP.js.map → dashboard-section.UafHRkMa.js.map} +1 -1
- package/dist/chunks/dashed-underline.CcDV2Aks.js +108 -0
- package/dist/chunks/{dashed-underline.wbRHATeE.js.map → dashed-underline.CcDV2Aks.js.map} +1 -1
- package/dist/chunks/data-grid-template.CnC4TQvk.js +135 -0
- package/dist/chunks/{data-grid-template.D40V1cmi.js.map → data-grid-template.CnC4TQvk.js.map} +1 -1
- package/dist/chunks/data-grid.BSIXLRm7.js +4014 -0
- package/dist/chunks/{data-grid.C2nCCbeC.js.map → data-grid.BSIXLRm7.js.map} +1 -1
- package/dist/chunks/date-picker.dlzZ_-5f.js +231 -0
- package/dist/chunks/{date-picker.D5B_SECc.js.map → date-picker.dlzZ_-5f.js.map} +1 -1
- package/dist/chunks/date-range-picker.DC6CK0As.js +995 -0
- package/dist/chunks/{date-range-picker.B0q7Z4df.js.map → date-range-picker.DC6CK0As.js.map} +1 -1
- package/dist/chunks/{date.BtB1HyWQ.js → date.R2Wz6o7J.js} +28 -28
- package/dist/chunks/{date.BtB1HyWQ.js.map → date.R2Wz6o7J.js.map} +1 -1
- package/dist/chunks/{de.BJvo6njq.js → de.DXrHnkLX.js} +18 -18
- package/dist/chunks/{de.BJvo6njq.js.map → de.DXrHnkLX.js.map} +1 -1
- package/dist/chunks/{dialog-page.C1KUI51V.js → dialog-page.COfKqjT-.js} +7 -13
- package/dist/chunks/{dialog-page.C1KUI51V.js.map → dialog-page.COfKqjT-.js.map} +1 -1
- package/dist/chunks/differenceInMonths.s_znQQpw.js +43 -0
- package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.s_znQQpw.js.map} +1 -1
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Dpivxq_t.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Dpivxq_t.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.CskseEho.js → dropdown-default-textbox.bq9AlGzJ.js} +55 -64
- package/dist/chunks/{dropdown-default-textbox.CskseEho.js.map → dropdown-default-textbox.bq9AlGzJ.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Zj-exiup.js → dropdown-tag.Ysrac5GN.js} +82 -86
- package/dist/chunks/{dropdown-tag.Zj-exiup.js.map → dropdown-tag.Ysrac5GN.js.map} +1 -1
- package/dist/chunks/dropdown.MhmX1P9o.js +799 -0
- package/dist/chunks/{dropdown.CxjzXI-k.js.map → dropdown.MhmX1P9o.js.map} +1 -1
- package/dist/chunks/{empty-state.DqdPzU-g.js → empty-state.DT4sFyjB.js} +7 -14
- package/dist/chunks/{empty-state.DqdPzU-g.js.map → empty-state.DT4sFyjB.js.map} +1 -1
- package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.CBpvhDYV.js} +2 -2
- package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.CBpvhDYV.js.map} +1 -1
- package/dist/chunks/{en-US.YeSsZuOc.js → en-US.CCazFVNP.js} +30 -30
- package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.CCazFVNP.js.map} +1 -1
- package/dist/chunks/{error-message.oGiefI2-.js → error-message.DCgo8q20.js} +8 -20
- package/dist/chunks/{error-message.oGiefI2-.js.map → error-message.DCgo8q20.js.map} +1 -1
- package/dist/chunks/{es.DyUjjSL8.js → es.CoF2PB8b.js} +14 -14
- package/dist/chunks/{es.DyUjjSL8.js.map → es.CoF2PB8b.js.map} +1 -1
- package/dist/chunks/{file-uploader.BnmNI1O7.js → file-uploader.Bfd1uUMe.js} +575 -680
- package/dist/chunks/{file-uploader.BnmNI1O7.js.map → file-uploader.Bfd1uUMe.js.map} +1 -1
- package/dist/chunks/filter-bar.CkAjLQol.js +3675 -0
- package/dist/chunks/filter-bar.CkAjLQol.js.map +1 -0
- package/dist/chunks/fixed-scroller.DtkaGyMD.js +150 -0
- package/dist/chunks/{fixed-scroller.i1tmEmst.js.map → fixed-scroller.DtkaGyMD.js.map} +1 -1
- package/dist/chunks/{focus-trap.BxCwzLqN.js → focus-trap.BAiM_ywb.js} +70 -86
- package/dist/chunks/{focus-trap.BxCwzLqN.js.map → focus-trap.BAiM_ywb.js.map} +1 -1
- package/dist/chunks/{footer-actions.Ck6UztD8.js → footer-actions.BcYSsoUg.js} +3 -3
- package/dist/chunks/{footer-actions.Ck6UztD8.js.map → footer-actions.BcYSsoUg.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CQfeGyVw.js → form-layout-title.DW5Kg1rh.js} +4 -6
- package/dist/chunks/{form-layout-title.CQfeGyVw.js.map → form-layout-title.DW5Kg1rh.js.map} +1 -1
- package/dist/chunks/{fr.JD_4GwS8.js → fr.CJXL-Ief.js} +16 -16
- package/dist/chunks/{fr.JD_4GwS8.js.map → fr.CJXL-Ief.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.8Fbl1GOr.js +6 -0
- package/dist/chunks/{get-slot-text.CQRAP2_q.js.map → get-slot-text.8Fbl1GOr.js.map} +1 -1
- package/dist/chunks/{grid-layout.Vhv1_zFs.js → grid-layout.CCWNscU_.js} +11 -12
- package/dist/chunks/{grid-layout.Vhv1_zFs.js.map → grid-layout.CCWNscU_.js.map} +1 -1
- package/dist/chunks/{header-meta.lGt3HsyH.js → header-meta.Bym9AlQm.js} +84 -96
- package/dist/chunks/{header-meta.lGt3HsyH.js.map → header-meta.Bym9AlQm.js.map} +1 -1
- package/dist/chunks/{header-with-views.D_sy4I2A.js → header-with-views.Djba6iol.js} +1013 -1156
- package/dist/chunks/{header-with-views.D_sy4I2A.js.map → header-with-views.Djba6iol.js.map} +1 -1
- package/dist/chunks/{header.oXqwf2xN.js → header.o-7SyHtU.js} +4 -4
- package/dist/chunks/{header.oXqwf2xN.js.map → header.o-7SyHtU.js.map} +1 -1
- package/dist/chunks/{index.Dppy4qHk.js → index.DDwcHPb6.js} +12 -12
- package/dist/chunks/{index.Dppy4qHk.js.map → index.DDwcHPb6.js.map} +1 -1
- package/dist/chunks/{info-icon.DyPOv7Pi.js → info-icon.BUala_wq.js} +3 -3
- package/dist/chunks/{info-icon.DyPOv7Pi.js.map → info-icon.BUala_wq.js.map} +1 -1
- package/dist/chunks/input-field-password.DZytmp_p.js +346 -0
- package/dist/chunks/{input-field-password.C_h61CMn.js.map → input-field-password.DZytmp_p.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.KctRYA9p.js → input-field-phone-number.CxblrmaU.js} +720 -736
- package/dist/chunks/{input-field-phone-number.KctRYA9p.js.map → input-field-phone-number.CxblrmaU.js.map} +1 -1
- package/dist/chunks/{input-field.DPElUS0U.js → input-field.CfU0ZKtL.js} +42 -54
- package/dist/chunks/{input-field.DPElUS0U.js.map → input-field.CfU0ZKtL.js.map} +1 -1
- package/dist/chunks/{inspector.BjLhY3bE.js → inspector.B9k4tJWe.js} +9 -27
- package/dist/chunks/{inspector.BjLhY3bE.js.map → inspector.B9k4tJWe.js.map} +1 -1
- package/dist/chunks/isSameWeek.Dj6luS8h.js +14 -0
- package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.Dj6luS8h.js.map} +1 -1
- package/dist/chunks/{it.BlUnV-yA.js → it.20Y7h-bF.js} +8 -8
- package/dist/chunks/{it.BlUnV-yA.js.map → it.20Y7h-bF.js.map} +1 -1
- package/dist/chunks/{ja.nUwDmVf2.js → ja.DXlq0H98.js} +27 -27
- package/dist/chunks/{ja.nUwDmVf2.js.map → ja.DXlq0H98.js.map} +1 -1
- package/dist/chunks/layout-row.B5VJGEQH.js +99 -0
- package/dist/chunks/{layout-row.Da8nkm9z.js.map → layout-row.B5VJGEQH.js.map} +1 -1
- package/dist/chunks/link.D6D6YGsN.js +113 -0
- package/dist/chunks/{link.DTCn2EtX.js.map → link.D6D6YGsN.js.map} +1 -1
- package/dist/chunks/list-item.DO5uULke.js +128 -0
- package/dist/chunks/list-item.DO5uULke.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.CoBUYwFG.js → listbox-option-tag.Cvplth7d.js} +2 -2
- package/dist/chunks/{listbox-option-tag.CoBUYwFG.js.map → listbox-option-tag.Cvplth7d.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.9ZDR_S29.js → modal-fullscreen.CuKVyTWb.js} +100 -108
- package/dist/chunks/{modal-fullscreen.9ZDR_S29.js.map → modal-fullscreen.CuKVyTWb.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js → modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js} +134 -143
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js.map → modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map} +1 -1
- package/dist/chunks/on-click-outside.ZUMLlxE_.js +90 -0
- package/dist/chunks/{on-click-outside.BW4rkhzG.js.map → on-click-outside.ZUMLlxE_.js.map} +1 -1
- package/dist/chunks/pagination.dpVc6Yt0.js +401 -0
- package/dist/chunks/pagination.dpVc6Yt0.js.map +1 -0
- package/dist/chunks/popover.types.D8tHtFl3.js +6 -0
- package/dist/chunks/{popover.types.DhALnOLQ.js.map → popover.types.D8tHtFl3.js.map} +1 -1
- package/dist/chunks/{popper-container.DAK7c9uS.js → popper-container.DMN8n5iC.js} +79 -86
- package/dist/chunks/{popper-container.DAK7c9uS.js.map → popper-container.DMN8n5iC.js.map} +1 -1
- package/dist/chunks/{promo-banner.aNwH6uQx.js → promo-banner.BzveHNOI.js} +7 -13
- package/dist/chunks/{promo-banner.aNwH6uQx.js.map → promo-banner.BzveHNOI.js.map} +1 -1
- package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.DmhmCzxE.js} +14 -14
- package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.DmhmCzxE.js.map} +1 -1
- package/dist/chunks/{radio-group.DEYzF6o7.js → radio-group.Cuiq4mxy.js} +46 -46
- package/dist/chunks/{radio-group.DEYzF6o7.js.map → radio-group.Cuiq4mxy.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DH1d5Zcp.js → rich-text-editor.DLMiT4f5.js} +1018 -1024
- package/dist/chunks/{rich-text-editor.DH1d5Zcp.js.map → rich-text-editor.DLMiT4f5.js.map} +1 -1
- package/dist/chunks/{search-bar.Dtzx88Pv.js → search-bar.CsFyP0_I.js} +6 -15
- package/dist/chunks/{search-bar.Dtzx88Pv.js.map → search-bar.CsFyP0_I.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Zs7dBoJv.js → secondary-nav.CLBdq98c.js} +6 -12
- package/dist/chunks/{secondary-nav.Zs7dBoJv.js.map → secondary-nav.CLBdq98c.js.map} +1 -1
- package/dist/chunks/{segmented-control.Aqquod8g.js → segmented-control.KeQ5kuR1.js} +47 -51
- package/dist/chunks/{segmented-control.Aqquod8g.js.map → segmented-control.KeQ5kuR1.js.map} +1 -1
- package/dist/chunks/selection-card-group.XM11Kk-4.js +412 -0
- package/dist/chunks/{selection-card-group.C7IK2Vl5.js.map → selection-card-group.XM11Kk-4.js.map} +1 -1
- package/dist/chunks/{sidepanel.DaXPcTHm.js → sidepanel.b2QZ1Jsx.js} +64 -71
- package/dist/chunks/{sidepanel.DaXPcTHm.js.map → sidepanel.b2QZ1Jsx.js.map} +1 -1
- package/dist/chunks/startOfWeek.Cvmo-f5J.js +9 -0
- package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Cvmo-f5J.js.map} +1 -1
- package/dist/chunks/status.H00BAmRx.js +42 -0
- package/dist/chunks/status.H00BAmRx.js.map +1 -0
- package/dist/chunks/status.types.Dx8MDhEH.js +5 -0
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -0
- package/dist/chunks/{step.BV7MsrRF.js → step.BlwoLfdw.js} +56 -68
- package/dist/chunks/{step.BV7MsrRF.js.map → step.BlwoLfdw.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DAIaUMCY.js → structured-list-item.e-8kRleh.js} +8 -14
- package/dist/chunks/{structured-list-item.DAIaUMCY.js.map → structured-list-item.e-8kRleh.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.BZcZS_dW.js → summary-grid.types.CcvOC03H.js} +172 -179
- package/dist/chunks/{summary-grid.types.BZcZS_dW.js.map → summary-grid.types.CcvOC03H.js.map} +1 -1
- package/dist/chunks/tab.mR5uUSdp.js +265 -0
- package/dist/chunks/{tab.DRrnMCxe.js.map → tab.mR5uUSdp.js.map} +1 -1
- package/dist/chunks/{tag.CqWg6C3H.js → tag.DujMVFh-.js} +3 -3
- package/dist/chunks/{tag.CqWg6C3H.js.map → tag.DujMVFh-.js.map} +1 -1
- package/dist/chunks/textarea.CHV6Z8nt.js +247 -0
- package/dist/chunks/{textarea.CvI2InIB.js.map → textarea.CHV6Z8nt.js.map} +1 -1
- package/dist/chunks/timeline-item.CaGcRZbt.js +419 -0
- package/dist/chunks/timeline-item.CaGcRZbt.js.map +1 -0
- package/dist/chunks/{toast.Bbtq3Icj.js → toast.C2oehk9P.js} +72 -78
- package/dist/chunks/{toast.Bbtq3Icj.js.map → toast.C2oehk9P.js.map} +1 -1
- package/dist/chunks/{toggle.BupEBkIG.js → toggle.BQoprdX-.js} +5 -5
- package/dist/chunks/{toggle.BupEBkIG.js.map → toggle.BQoprdX-.js.map} +1 -1
- package/dist/chunks/tooltip.CbADa_4p.js +199 -0
- package/dist/chunks/{tooltip.Lwtlhv3u.js.map → tooltip.CbADa_4p.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.vue_vue_type_script_setup_true_lang.BL2QTKmV.js → tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js} +100 -124
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js.map → tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BFctDoMg.js → use-bento-toast-controller.D_NSnBxi.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.BFctDoMg.js.map → use-bento-toast-controller.D_NSnBxi.js.map} +1 -1
- package/dist/chunks/use-cached-selected-values.ClEJRFAd.js +1631 -0
- package/dist/chunks/{use-cached-selected-values.C4_X3vVj.js.map → use-cached-selected-values.ClEJRFAd.js.map} +1 -1
- package/dist/chunks/use-country-items.D_3LBe2I.js +30 -0
- package/dist/chunks/{use-country-items.BTzByPdQ.js.map → use-country-items.D_3LBe2I.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.DoqTGkNr.js +287 -0
- package/dist/chunks/use-country-phon-code.DoqTGkNr.js.map +1 -0
- package/dist/chunks/use-date-input-formatter.CDRzd-hW.js +1629 -0
- package/dist/chunks/{use-date-input-formatter.dtbK-CEy.js.map → use-date-input-formatter.CDRzd-hW.js.map} +1 -1
- package/dist/chunks/use-default-slot-validator.BzHcrgmy.js +12 -0
- package/dist/chunks/{use-default-slot-validator.O02rzsob.js.map → use-default-slot-validator.BzHcrgmy.js.map} +1 -1
- package/dist/chunks/use-expandable-content-height.B5jjRvCz.js +16 -0
- package/dist/chunks/{use-expandable-content-height.GkjjbmPy.js.map → use-expandable-content-height.B5jjRvCz.js.map} +1 -1
- package/dist/chunks/use-has-slot.CyMiImRQ.js +14 -0
- package/dist/chunks/{use-has-slot.B7eQSabc.js.map → use-has-slot.CyMiImRQ.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.ChYkuQAR.js → zh-CN.Ce34mXsX.js} +28 -28
- package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Ce34mXsX.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.js +1 -1
- package/dist/draggable-handle.js +4 -28
- package/dist/draggable-handle.js.map +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +241 -241
- 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 +13 -13
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/list.js +6 -0
- package/dist/list.js.map +1 -0
- 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/status.js +4 -3
- package/dist/status.js.map +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js +331 -341
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +7 -7
- package/dist/chunks/anchor-scroller.BctgW0se.js +0 -214
- package/dist/chunks/base-modal.gZAtk-xP.js +0 -443
- package/dist/chunks/button-actions-with-menu.Tba1ME79.js +0 -93
- package/dist/chunks/calendar.vM3abC8y.js +0 -1234
- package/dist/chunks/click-outside.CDz_x8mN.js +0 -23
- package/dist/chunks/constructNow.CIc7d13I.js +0 -8
- package/dist/chunks/country.types.BBQbWkTY.js +0 -773
- package/dist/chunks/dashboard-section.CgoLquLP.js +0 -165
- package/dist/chunks/dashed-underline.wbRHATeE.js +0 -114
- package/dist/chunks/data-grid-template.D40V1cmi.js +0 -144
- package/dist/chunks/data-grid.C2nCCbeC.js +0 -4368
- package/dist/chunks/date-picker.D5B_SECc.js +0 -251
- package/dist/chunks/date-range-picker.B0q7Z4df.js +0 -1084
- package/dist/chunks/differenceInMonths.CIYECBxK.js +0 -43
- package/dist/chunks/dropdown.CxjzXI-k.js +0 -837
- package/dist/chunks/filter-bar.DJ7O4zLX.js +0 -4036
- package/dist/chunks/filter-bar.DJ7O4zLX.js.map +0 -1
- package/dist/chunks/fixed-scroller.i1tmEmst.js +0 -161
- package/dist/chunks/get-slot-text.CQRAP2_q.js +0 -12
- package/dist/chunks/input-field-password.C_h61CMn.js +0 -402
- package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
- package/dist/chunks/layout-row.Da8nkm9z.js +0 -100
- package/dist/chunks/link.DTCn2EtX.js +0 -116
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/pagination.B32UgSoH.js +0 -488
- package/dist/chunks/pagination.B32UgSoH.js.map +0 -1
- package/dist/chunks/popover.types.DhALnOLQ.js +0 -6
- package/dist/chunks/selection-card-group.C7IK2Vl5.js +0 -417
- package/dist/chunks/startOfWeek.CXhhX-R7.js +0 -10
- package/dist/chunks/status.types.D3v3k-Q8.js +0 -44
- package/dist/chunks/status.types.D3v3k-Q8.js.map +0 -1
- package/dist/chunks/tab.DRrnMCxe.js +0 -273
- package/dist/chunks/textarea.CvI2InIB.js +0 -255
- package/dist/chunks/timeline-item.BooD99hL.js +0 -427
- package/dist/chunks/timeline-item.BooD99hL.js.map +0 -1
- package/dist/chunks/tooltip.Lwtlhv3u.js +0 -202
- package/dist/chunks/truncate.BfIl_-71.js +0 -8
- package/dist/chunks/use-cached-selected-values.C4_X3vVj.js +0 -1711
- package/dist/chunks/use-country-items.BTzByPdQ.js +0 -30
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js +0 -5621
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +0 -1
- package/dist/chunks/use-date-input-formatter.dtbK-CEy.js +0 -1732
- package/dist/chunks/use-default-slot-validator.O02rzsob.js +0 -16
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js +0 -17
- package/dist/chunks/use-has-slot.B7eQSabc.js +0 -15
- package/dist/chunks/utils.BzUwtTXc.js +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.Lwtlhv3u.js","sources":["../../../vue2/src/directives/tooltip/tooltip.types.ts","../../../vue2/src/types/utils-events.ts","../../../vue2/src/components/internal/tooltip/tooltip.types.ts","../../../vue2/src/components/internal/tooltip/tooltip.vue","../../../vue2/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 || !tooltipInstance.content || !el || !tooltip) {\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 || !tooltip) {\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 if (tooltip) {\n tooltip.isShown = false;\n }\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__","props","__props","conditionalClasses","computed","tooltipInstances","ariaDescribedByAttr","tooltipId","generateUid","tooltipVNode","tooltip","open","tooltipProps","reactive","createTooltip","el","createApp","Tooltip","h","destroyTooltip","getTooltipPosition","binding","getTooltipInstanceForTarget","ctx","showTooltip","tooltipInstance","isDialogOpen","node","_b","_a","_d","_c","nextTick","hideTooltip","tooltipBind","show","hide","listen","evt","tooltipUpdate","position","tooltipUnbind","context","removeListener","BentoTooltipDirective"],"mappings":";;;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EAAA1B,CAAA;AAAA,EAAgB;AAExB;"}
|
|
1
|
+
{"version":3,"file":"tooltip.CbADa_4p.js","sources":["../../../vue2/src/directives/tooltip/tooltip.types.ts","../../../vue2/src/types/utils-events.ts","../../../vue2/src/components/internal/tooltip/tooltip.types.ts","../../../vue2/src/components/internal/tooltip/tooltip.vue","../../../vue2/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 || !tooltipInstance.content || !el || !tooltip) {\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 || !tooltip) {\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 if (tooltip) {\n tooltip.isShown = false;\n }\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__","props","__props","conditionalClasses","computed","tooltipInstances","ariaDescribedByAttr","tooltipId","generateUid","tooltipVNode","tooltip","open","tooltipProps","reactive","createTooltip","el","createApp","Tooltip","h","destroyTooltip","getTooltipPosition","binding","getTooltipInstanceForTarget","ctx","showTooltip","tooltipInstance","isDialogOpen","node","nextTick","hideTooltip","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,EAAA,aAAA,aACAA,EAAA,UAAA,UACAA,EAAA,YAAA,YACAA,EAAA,MAAA,OACAA,EAAA,OAAA,QACAA,EAAA,MAAA,OAXQA,IAAAD,KAAA,CAAA,CAAA;ACTL,MAAAE,IAAA,EAAA,GAAAL,EAAA;AAGA,IAAAM,IAAA,kBAAAJ,OACHA,EAAA,SAAA,UADQA,IAAAI,KAAA,CAAA,CAAA;ACmFR,MAAAC,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9DA,UAAAC,IAAAC,GAmDAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,cAAAL,EAAA,MAAA,EAAA,GAAA,CAAAE,EAAA;AAAA,IACY,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;kEC/C3DI,IAAA,CAAA,GACAC,IAAA,oBACAC,IAAAC,EAAA,SAAA;AAEA,IAAAC,GAGAC,GAEAC,IAAA;AAEA,MAAAC,IAAAC,EAAA;AAAA,EAA8B,eAAA;AAAA,EACX,SAAA;AAAA,EACN,IAAAN;A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AA;AAAA,EAAyB;AAAA,EAC7B,UAAAN,GAAA;AAEI,IAAAsB,EAAAtB,CAAA;AAAA,EAAgB;AAExB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate.
|
|
1
|
+
{"version":3,"file":"truncate.DmCXQmeb.js","sources":["../../../vue2/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,GAAiB,SAAA;AACjC,SAAOE,GAAS,SAASD,IAAiB,GAAGC,GAAS,MAAM,GAAGD,CAAc,CAAC,QAAQC;AAC1F;"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
7
|
-
import { R as
|
|
1
|
+
import { defineComponent as w, ref as k, openBlock as d, createBlock as S, unref as r, withCtx as v, createElementVNode as p, normalizeStyle as D, createElementBlock as O, mergeProps as P, toDisplayString as B, createCommentVNode as T, computed as s, isRef as Z, watch as I, nextTick as z, createVNode as b, withKeys as H, createSlots as U, createTextVNode as E, renderSlot as J, Fragment as W, renderList as X } from "vue";
|
|
2
|
+
import { h as G, f as Q, B as Y } from "./button-actions.cMQWyZne.js";
|
|
3
|
+
import { B as F } from "./popover.types.D8tHtFl3.js";
|
|
4
|
+
import { B as N } from "./typography.B3J6_tYk.js";
|
|
5
|
+
import { _ as tt } from "./image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js";
|
|
6
|
+
import { u as et } from "./index.B875RXHM.js";
|
|
7
|
+
import { R as ot } from "./refresh.C31KClfx.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { _ as
|
|
10
|
-
import { P as
|
|
9
|
+
import { _ as R } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
+
import { P as V, h as it, o as at } from "./popper-container.DMN8n5iC.js";
|
|
11
11
|
import "../assets/tutorial.css";
|
|
12
|
-
const C = 2
|
|
13
|
-
var L;
|
|
14
|
-
const lt = /* @__PURE__ */ P({
|
|
12
|
+
const C = 2, nt = /* @__PURE__ */ w({
|
|
15
13
|
__name: "tutorial-indicator",
|
|
16
14
|
props: {
|
|
17
15
|
/**
|
|
@@ -19,7 +17,7 @@ const lt = /* @__PURE__ */ P({
|
|
|
19
17
|
* The indicator will position itself around the target element.
|
|
20
18
|
*/
|
|
21
19
|
targetElement: {
|
|
22
|
-
type:
|
|
20
|
+
type: V.props?.targetElement.type,
|
|
23
21
|
required: !0
|
|
24
22
|
}
|
|
25
23
|
},
|
|
@@ -29,7 +27,7 @@ const lt = /* @__PURE__ */ P({
|
|
|
29
27
|
height: "0",
|
|
30
28
|
borderRadius: "0"
|
|
31
29
|
});
|
|
32
|
-
function
|
|
30
|
+
function c(e) {
|
|
33
31
|
try {
|
|
34
32
|
const i = parseFloat(getComputedStyle(e).getPropertyValue("border-radius"));
|
|
35
33
|
return Number.isNaN(i) ? "" : `${i + 2 * C}px`;
|
|
@@ -38,8 +36,8 @@ const lt = /* @__PURE__ */ P({
|
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
const o = [
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
it(),
|
|
40
|
+
at({
|
|
43
41
|
mainAxis: C,
|
|
44
42
|
alignmentAxis: -C
|
|
45
43
|
}),
|
|
@@ -47,11 +45,11 @@ const lt = /* @__PURE__ */ P({
|
|
|
47
45
|
name: "updateIndicatorSize",
|
|
48
46
|
fn: ({ x: e, y: i, elements: _ }) => {
|
|
49
47
|
const m = _.reference;
|
|
50
|
-
return n.value.width = `${m.offsetWidth + 4 * C}px`, n.value.height = `${m.offsetHeight + 4 * C}px`, n.value.borderRadius =
|
|
48
|
+
return n.value.width = `${m.offsetWidth + 4 * C}px`, n.value.height = `${m.offsetHeight + 4 * C}px`, n.value.borderRadius = c(m), { x: e, y: i };
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
];
|
|
54
|
-
return (e, i) => (
|
|
52
|
+
return (e, i) => (d(), S(r(V), {
|
|
55
53
|
"target-element": t.targetElement,
|
|
56
54
|
middleware: o,
|
|
57
55
|
position: "top-start",
|
|
@@ -61,77 +59,59 @@ const lt = /* @__PURE__ */ P({
|
|
|
61
59
|
"data-testid": "tutorial-indicator"
|
|
62
60
|
}, {
|
|
63
61
|
default: v(() => [
|
|
64
|
-
|
|
62
|
+
p("div", {
|
|
65
63
|
class: "b-tutorial-indicator__highlight",
|
|
66
|
-
style:
|
|
64
|
+
style: D(n.value)
|
|
67
65
|
}, null, 4)
|
|
68
66
|
]),
|
|
69
67
|
_: 1
|
|
70
68
|
}, 8, ["target-element"]));
|
|
71
69
|
}
|
|
72
|
-
}),
|
|
73
|
-
let
|
|
74
|
-
const
|
|
70
|
+
}), st = /* @__PURE__ */ R(nt, [["__scopeId", "data-v-672deffb"]]);
|
|
71
|
+
let j = 0;
|
|
72
|
+
const lt = {
|
|
75
73
|
beforeCreate() {
|
|
76
|
-
this.uuid =
|
|
74
|
+
this.uuid = j.toString(), j += 1;
|
|
77
75
|
}
|
|
78
|
-
},
|
|
79
|
-
function
|
|
80
|
-
return
|
|
76
|
+
}, rt = { key: 0 }, ut = ["clip-path"], pt = ["id"];
|
|
77
|
+
function dt(t, n, c, o, e, i) {
|
|
78
|
+
return d(), O("svg", P({ role: "img" }, t.$attrs, {
|
|
81
79
|
class: "ui-assets-icons-16",
|
|
82
80
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
81
|
width: "16",
|
|
84
82
|
height: "16",
|
|
85
83
|
fill: "none"
|
|
86
84
|
}), [
|
|
87
|
-
t.$attrs["svg-title"] ? (
|
|
88
|
-
|
|
85
|
+
t.$attrs["svg-title"] ? (d(), O("title", rt, B(t.$attrs["svg-title"]), 1)) : T("", !0),
|
|
86
|
+
p("g", {
|
|
89
87
|
"clip-path": "url(#uia-ui-assets/icons-16-blocked__a" + t.uuid + ")"
|
|
90
88
|
}, n[0] || (n[0] = [
|
|
91
|
-
|
|
89
|
+
p("path", {
|
|
92
90
|
fill: "#001222",
|
|
93
91
|
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"
|
|
94
92
|
}, null, -1)
|
|
95
|
-
]), 8,
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
]), 8, ut),
|
|
94
|
+
p("defs", null, [
|
|
95
|
+
p("clipPath", {
|
|
98
96
|
id: "uia-ui-assets/icons-16-blocked__a" + t.uuid
|
|
99
97
|
}, n[1] || (n[1] = [
|
|
100
|
-
|
|
98
|
+
p("rect", {
|
|
101
99
|
width: "16",
|
|
102
100
|
height: "16",
|
|
103
101
|
fill: "#fff"
|
|
104
102
|
}, null, -1)
|
|
105
|
-
]), 8,
|
|
103
|
+
]), 8, pt)
|
|
106
104
|
])
|
|
107
105
|
], 16);
|
|
108
106
|
}
|
|
109
|
-
const
|
|
110
|
-
"en-US": {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
stepsOfTotal: "{step} of {totalSteps}"
|
|
118
|
-
},
|
|
119
|
-
"ja-JP": {
|
|
120
|
-
finish: "終了",
|
|
121
|
-
next: "次へ",
|
|
122
|
-
ok: "OK",
|
|
123
|
-
skipTour: "ツアーをスキップ"
|
|
124
|
-
},
|
|
125
|
-
"pt-BR": {
|
|
126
|
-
finish: "Terminar",
|
|
127
|
-
next: "Próximo",
|
|
128
|
-
ok: "OK",
|
|
129
|
-
skipTour: "Pular tour"
|
|
130
|
-
}
|
|
131
|
-
}, vt = { key: 0 }, gt = { class: "b-tutorial-popover__header" }, _t = { class: "b-tutorial-popover__footer" }, ht = { class: "b-tutorial-popover__actions" }, yt = {
|
|
132
|
-
i18n: { messages: M }
|
|
133
|
-
}, bt = /* @__PURE__ */ P({
|
|
134
|
-
...yt,
|
|
107
|
+
const ct = /* @__PURE__ */ R(lt, [["render", dt]]), K = {
|
|
108
|
+
"en-US": { finish: "Finish", next: "Next", ok: "OK", restartTour: "Restart tour", skipTour: "Skip tour", startTour: "Start tour", stepsOfTotal: "{step} of {totalSteps}" },
|
|
109
|
+
"ja-JP": { finish: "終了", next: "次へ", ok: "OK", skipTour: "ツアーをスキップ" },
|
|
110
|
+
"pt-BR": { finish: "Terminar", next: "Próximo", ok: "OK", skipTour: "Pular tour" }
|
|
111
|
+
}, ft = { key: 0 }, mt = { class: "b-tutorial-popover__header" }, vt = { class: "b-tutorial-popover__footer" }, gt = { class: "b-tutorial-popover__actions" }, _t = {
|
|
112
|
+
i18n: { messages: K }
|
|
113
|
+
}, ht = /* @__PURE__ */ w({
|
|
114
|
+
..._t,
|
|
135
115
|
__name: "tutorial-popover",
|
|
136
116
|
props: {
|
|
137
117
|
/**
|
|
@@ -167,8 +147,8 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
167
147
|
*/
|
|
168
148
|
position: {
|
|
169
149
|
type: String,
|
|
170
|
-
default:
|
|
171
|
-
validator: (t) => Object.values(
|
|
150
|
+
default: F.BOTTOM_START,
|
|
151
|
+
validator: (t) => Object.values(F).includes(t)
|
|
172
152
|
},
|
|
173
153
|
/**
|
|
174
154
|
* Options to control the scroll into view behavior.
|
|
@@ -222,108 +202,104 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
222
202
|
},
|
|
223
203
|
emits: ["next", "finish", "restart"],
|
|
224
204
|
setup(t, { emit: n }) {
|
|
225
|
-
const
|
|
205
|
+
const c = { behavior: "smooth" }, o = t, { t: e } = et({ messages: K }), i = n, _ = s(() => ({
|
|
226
206
|
title: e("skipTour"),
|
|
227
207
|
event: () => i("finish")
|
|
228
|
-
})), m =
|
|
208
|
+
})), m = s(() => ({
|
|
229
209
|
title: e("startTour"),
|
|
230
210
|
event: () => i("next")
|
|
231
|
-
})), a =
|
|
211
|
+
})), a = s(() => ({
|
|
232
212
|
title: e("next"),
|
|
233
213
|
event: () => i("next")
|
|
234
|
-
})),
|
|
214
|
+
})), l = s(() => ({
|
|
235
215
|
title: e("finish"),
|
|
236
216
|
event: () => i("finish")
|
|
237
|
-
})), h =
|
|
217
|
+
})), h = s(() => ({
|
|
238
218
|
title: e("ok"),
|
|
239
219
|
event: () => i("finish")
|
|
240
|
-
})), x = k(!1), y = k(!1), g =
|
|
241
|
-
var s;
|
|
242
|
-
return H(o.targetElement) ? ((s = o.targetElement.value) == null ? void 0 : s.$el) || o.targetElement.value : o.targetElement.$el || o.targetElement;
|
|
243
|
-
}), $ = l(() => o.step === 0), F = l(() => o.step === o.totalSteps), q = l(() => !$.value), D = l(() => [
|
|
220
|
+
})), x = k(!1), y = k(!1), g = s(() => Z(o.targetElement) ? o.targetElement.value?.$el || o.targetElement.value : o.targetElement.$el || o.targetElement), $ = s(() => o.step === 0), A = s(() => o.step === o.totalSteps), L = s(() => !$.value), M = s(() => [
|
|
244
221
|
{
|
|
245
222
|
text: e("restartTour"),
|
|
246
223
|
handler: () => i("restart"),
|
|
247
|
-
icon:
|
|
224
|
+
icon: ot
|
|
248
225
|
},
|
|
249
|
-
...
|
|
226
|
+
...A.value ? [] : [
|
|
250
227
|
{
|
|
251
228
|
text: e("skipTour"),
|
|
252
229
|
handler: () => i("finish"),
|
|
253
|
-
icon:
|
|
230
|
+
icon: ct
|
|
254
231
|
}
|
|
255
232
|
]
|
|
256
|
-
]),
|
|
257
|
-
let
|
|
258
|
-
$.value ?
|
|
259
|
-
const
|
|
260
|
-
return $.value && !o.single ?
|
|
233
|
+
]), q = s(() => {
|
|
234
|
+
let u;
|
|
235
|
+
$.value ? u = o.single ? h.value : m.value : A.value ? u = l.value : u = a.value;
|
|
236
|
+
const f = [u];
|
|
237
|
+
return $.value && !o.single ? f.push(_.value) : o.action && f.push(o.action), f;
|
|
261
238
|
});
|
|
262
|
-
return
|
|
239
|
+
return I(
|
|
263
240
|
() => o.active,
|
|
264
|
-
async (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
), await U()), x.value = s, y.value = s;
|
|
241
|
+
async (u) => {
|
|
242
|
+
u && g.value?.scrollIntoView && (g.value?.scrollIntoView(
|
|
243
|
+
o.scrollOptions != null ? o.scrollOptions : c
|
|
244
|
+
), await z()), x.value = u, y.value = u;
|
|
269
245
|
},
|
|
270
246
|
{ immediate: !0 }
|
|
271
|
-
), (
|
|
272
|
-
y.value && g.value ? (
|
|
247
|
+
), (u, f) => t.active && g.value ? (d(), O("div", ft, [
|
|
248
|
+
y.value && g.value ? (d(), S(r(st), {
|
|
273
249
|
key: 0,
|
|
274
250
|
"target-element": g.value
|
|
275
251
|
}, null, 8, ["target-element"])) : T("", !0),
|
|
276
|
-
b(
|
|
252
|
+
b(r(G), {
|
|
277
253
|
"target-element": g.value,
|
|
278
254
|
position: t.position,
|
|
279
255
|
open: x.value,
|
|
280
256
|
"aria-label": t.title,
|
|
281
257
|
"fixed-positioning": "",
|
|
282
258
|
class: "b-tutorial-popover",
|
|
283
|
-
onKeydown:
|
|
284
|
-
},
|
|
259
|
+
onKeydown: f[0] || (f[0] = H((Tt) => i("finish"), ["esc", "native"]))
|
|
260
|
+
}, U({
|
|
285
261
|
default: v(() => [
|
|
286
|
-
|
|
262
|
+
f[1] || (f[1] = p("div", {
|
|
287
263
|
"aria-hidden": "true",
|
|
288
264
|
class: "b-tutorial-popover__ripple"
|
|
289
265
|
}, null, -1)),
|
|
290
|
-
|
|
291
|
-
b(
|
|
266
|
+
p("div", mt, [
|
|
267
|
+
b(r(N), {
|
|
292
268
|
variant: "title",
|
|
293
269
|
el: "span"
|
|
294
270
|
}, {
|
|
295
271
|
default: v(() => [
|
|
296
|
-
|
|
272
|
+
E(B(t.title), 1)
|
|
297
273
|
]),
|
|
298
274
|
_: 1
|
|
299
275
|
}),
|
|
300
|
-
|
|
276
|
+
L.value ? (d(), S(r(N), {
|
|
301
277
|
key: 0,
|
|
302
278
|
el: "span",
|
|
303
279
|
class: "b-tutorial-popover__steps"
|
|
304
280
|
}, {
|
|
305
281
|
default: v(() => [
|
|
306
|
-
|
|
282
|
+
E(B(r(e)("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })), 1)
|
|
307
283
|
]),
|
|
308
284
|
_: 1
|
|
309
285
|
})) : T("", !0)
|
|
310
286
|
]),
|
|
311
|
-
b(
|
|
287
|
+
b(r(N), null, {
|
|
312
288
|
default: v(() => [
|
|
313
|
-
|
|
289
|
+
J(u.$slots, "default", {}, void 0, !0)
|
|
314
290
|
]),
|
|
315
291
|
_: 3
|
|
316
292
|
}),
|
|
317
|
-
|
|
318
|
-
$.value ? T("", !0) : (
|
|
293
|
+
p("div", vt, [
|
|
294
|
+
$.value ? T("", !0) : (d(), S(r(Q), {
|
|
319
295
|
key: 0,
|
|
320
|
-
data:
|
|
296
|
+
data: M.value,
|
|
321
297
|
class: "b-tutorial-popover__menu",
|
|
322
298
|
"data-testid": "menu-button"
|
|
323
299
|
}, null, 8, ["data"])),
|
|
324
|
-
|
|
325
|
-
b(
|
|
326
|
-
actions:
|
|
300
|
+
p("div", gt, [
|
|
301
|
+
b(r(Y), {
|
|
302
|
+
actions: q.value,
|
|
327
303
|
layout: "buttons-end"
|
|
328
304
|
}, null, 8, ["actions"])
|
|
329
305
|
])
|
|
@@ -334,7 +310,7 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
334
310
|
t.image ? {
|
|
335
311
|
name: "image",
|
|
336
312
|
fn: v(() => [
|
|
337
|
-
b(
|
|
313
|
+
b(r(tt), P(t.image, {
|
|
338
314
|
"aspect-ratio": "landscape",
|
|
339
315
|
class: "b-tutorial-popover__image"
|
|
340
316
|
}), null, 16)
|
|
@@ -344,8 +320,8 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
344
320
|
]), 1032, ["target-element", "position", "open", "aria-label"])
|
|
345
321
|
])) : T("", !0);
|
|
346
322
|
}
|
|
347
|
-
}),
|
|
348
|
-
...
|
|
323
|
+
}), yt = /* @__PURE__ */ R(ht, [["__scopeId", "data-v-27309751"]]), bt = { class: "b-tutorial" }, Ct = {}, Pt = /* @__PURE__ */ w({
|
|
324
|
+
...Ct,
|
|
349
325
|
__name: "tutorial",
|
|
350
326
|
props: {
|
|
351
327
|
/**
|
|
@@ -376,39 +352,39 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
376
352
|
},
|
|
377
353
|
emits: ["update:index"],
|
|
378
354
|
setup(t, { emit: n }) {
|
|
379
|
-
const
|
|
380
|
-
function m(a,
|
|
355
|
+
const c = t, o = n, e = k(c.index || 0), i = s(() => c.steps.length - 1), _ = s(() => i.value === 0);
|
|
356
|
+
function m(a, l) {
|
|
381
357
|
return {
|
|
382
358
|
// Visual
|
|
383
359
|
targetElement: a.target,
|
|
384
360
|
image: a.image,
|
|
385
361
|
title: a.title,
|
|
386
|
-
step:
|
|
362
|
+
step: l,
|
|
387
363
|
totalSteps: i.value,
|
|
388
364
|
action: a.action,
|
|
389
|
-
scrollOptions:
|
|
365
|
+
scrollOptions: c.scrollOptions,
|
|
390
366
|
// Config
|
|
391
|
-
active:
|
|
367
|
+
active: l === e.value,
|
|
392
368
|
single: _.value,
|
|
393
369
|
position: a.position
|
|
394
370
|
};
|
|
395
371
|
}
|
|
396
|
-
return
|
|
372
|
+
return I(e, (a) => {
|
|
397
373
|
o("update:index", a);
|
|
398
|
-
}),
|
|
399
|
-
() =>
|
|
374
|
+
}), I(
|
|
375
|
+
() => c.index,
|
|
400
376
|
(a) => {
|
|
401
377
|
a >= -1 && a <= i.value && (e.value = a);
|
|
402
378
|
}
|
|
403
|
-
), (a,
|
|
404
|
-
(
|
|
379
|
+
), (a, l) => (d(), O("div", bt, [
|
|
380
|
+
(d(!0), O(W, null, X(t.steps, (h, x) => (d(), S(r(yt), P({ ref_for: !0 }, m(h, x), {
|
|
405
381
|
key: h.title,
|
|
406
|
-
onFinish:
|
|
407
|
-
onNext:
|
|
408
|
-
onRestart:
|
|
382
|
+
onFinish: l[0] || (l[0] = (y) => e.value = -1),
|
|
383
|
+
onNext: l[1] || (l[1] = (y) => e.value += 1),
|
|
384
|
+
onRestart: l[2] || (l[2] = (y) => e.value = 0)
|
|
409
385
|
}), {
|
|
410
386
|
default: v(() => [
|
|
411
|
-
|
|
387
|
+
E(B(h.description), 1)
|
|
412
388
|
]),
|
|
413
389
|
_: 2
|
|
414
390
|
}, 1040))), 128))
|
|
@@ -416,6 +392,6 @@ const mt = /* @__PURE__ */ A(ut, [["render", ft]]), M = {
|
|
|
416
392
|
}
|
|
417
393
|
});
|
|
418
394
|
export {
|
|
419
|
-
|
|
395
|
+
Pt as _
|
|
420
396
|
};
|
|
421
|
-
//# sourceMappingURL=tutorial.vue_vue_type_script_setup_true_lang.
|
|
397
|
+
//# sourceMappingURL=tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map
|