@adyen/bento-vue2 1.72.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -10
- package/dist/@types/index.d.ts +1538 -1703
- package/dist/@types/use-form-v4.d.ts +1 -1
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.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/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.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.CoqaoVnC.js → accordion-item.nQhXD2tV.js} +2 -2
- package/dist/chunks/{accordion-item.CoqaoVnC.js.map → accordion-item.nQhXD2tV.js.map} +1 -1
- package/dist/chunks/{action-bar.Bxrtx1Vj.js → action-bar.MXZTIUNk.js} +5 -5
- package/dist/chunks/{action-bar.Bxrtx1Vj.js.map → action-bar.MXZTIUNk.js.map} +1 -1
- package/dist/chunks/{ai-button.FRPkTHz6.js → ai-button.DBwtNkyS.js} +2 -2
- package/dist/chunks/{ai-button.FRPkTHz6.js.map → ai-button.DBwtNkyS.js.map} +1 -1
- package/dist/chunks/{alert.CMyL-zWT.js → alert.SZPP58tl.js} +3 -3
- package/dist/chunks/{alert.CMyL-zWT.js.map → alert.SZPP58tl.js.map} +1 -1
- package/dist/chunks/{avatar.KdcsNOsm.js → avatar.CeDqq2Z-.js} +3 -3
- package/dist/chunks/avatar.CeDqq2Z-.js.map +1 -0
- package/dist/chunks/{base-modal.DInbAZlp.js → base-modal.BMdlCSd0.js} +7 -7
- package/dist/chunks/base-modal.BMdlCSd0.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.BtWUxmSL.js → button-actions-with-menu.BFRkPi6g.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BtWUxmSL.js.map → button-actions-with-menu.BFRkPi6g.js.map} +1 -1
- package/dist/chunks/{button-actions.55vIvDsX.js → button-actions.B81vY51z.js} +11 -14
- package/dist/chunks/button-actions.B81vY51z.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.CilT7NmM.js → button.CS_kdxYh.js} +3 -3
- package/dist/chunks/button.CS_kdxYh.js.map +1 -0
- package/dist/chunks/{calendar.M69sfyB9.js → calendar.EfqJlztU.js} +191 -187
- package/dist/chunks/calendar.EfqJlztU.js.map +1 -0
- package/dist/chunks/{card.C11dmth8.js → card.VOCKI7Ad.js} +8 -8
- package/dist/chunks/card.VOCKI7Ad.js.map +1 -0
- package/dist/chunks/{checkbox-group.Cr3WdkDM.js → checkbox-group.DETXTJqI.js} +4 -4
- package/dist/chunks/{checkbox-group.Cr3WdkDM.js.map → checkbox-group.DETXTJqI.js.map} +1 -1
- package/dist/chunks/{checkbox.D7-f9Y6w.js → checkbox.BPtHAAEa.js} +4 -4
- package/dist/chunks/{checkbox.D7-f9Y6w.js.map → checkbox.BPtHAAEa.js.map} +1 -1
- package/dist/chunks/{chip.omQX_Ziq.js → chip.fqEIkR-s.js} +2 -2
- package/dist/chunks/{chip.omQX_Ziq.js.map → chip.fqEIkR-s.js.map} +1 -1
- package/dist/chunks/{code-snippet.BGrwAxWy.js → code-snippet.VtrsOTEC.js} +7 -7
- package/dist/chunks/{code-snippet.BGrwAxWy.js.map → code-snippet.VtrsOTEC.js.map} +1 -1
- package/dist/chunks/{controls-group.CWeUgE2P.js → controls-group.82mB_GDw.js} +2 -2
- package/dist/chunks/{controls-group.CWeUgE2P.js.map → controls-group.82mB_GDw.js.map} +1 -1
- package/dist/chunks/{copy._BdbMnHK.js → copy.WQDLcs_T.js} +5 -5
- package/dist/chunks/{copy._BdbMnHK.js.map → copy.WQDLcs_T.js.map} +1 -1
- package/dist/chunks/country.CGn5WjFx.js +69 -0
- package/dist/chunks/country.CGn5WjFx.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.MT3baDtO.js → currency.DDB4G_A8.js} +52 -35
- package/dist/chunks/currency.DDB4G_A8.js.map +1 -0
- package/dist/chunks/{dashboard-section.e7ozaS9M.js → dashboard-section.jIpBvP6X.js} +3 -3
- package/dist/chunks/{dashboard-section.e7ozaS9M.js.map → dashboard-section.jIpBvP6X.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CGU6o7ni.js → dashed-underline.K-l-7bDq.js} +3 -3
- package/dist/chunks/{dashed-underline.CGU6o7ni.js.map → dashed-underline.K-l-7bDq.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BaPjUlZ2.js → data-grid-template.CozTcWQ0.js} +4 -4
- package/dist/chunks/{data-grid-template.BaPjUlZ2.js.map → data-grid-template.CozTcWQ0.js.map} +1 -1
- package/dist/chunks/{data-grid.B_Ha2vma.js → data-grid.DN9xml8y.js} +1275 -1214
- package/dist/chunks/data-grid.DN9xml8y.js.map +1 -0
- package/dist/chunks/{date-input.BqBdAO1E.js → date-format.B8RU7D42.js} +6 -6
- package/dist/chunks/date-format.B8RU7D42.js.map +1 -0
- package/dist/chunks/date-picker.DoYYzWcA.js +158 -0
- package/dist/chunks/date-picker.DoYYzWcA.js.map +1 -0
- package/dist/chunks/date-range-picker.C_pJ8yH5.js +917 -0
- package/dist/chunks/date-range-picker.C_pJ8yH5.js.map +1 -0
- package/dist/chunks/{date.BTdCYdkj.js → date.C1z2TXzM.js} +2 -2
- package/dist/chunks/{date.BTdCYdkj.js.map → date.C1z2TXzM.js.map} +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/{dialog-page.LA_ZhbYa.js → dialog-page.D23qNwKW.js} +3 -3
- package/dist/chunks/dialog-page.D23qNwKW.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.CDm-PQfc.js → dropdown-default-textbox.yLeN0E2z.js} +6 -6
- package/dist/chunks/dropdown-default-textbox.yLeN0E2z.js.map +1 -0
- package/dist/chunks/dropdown-tag.DBnurtCQ.js +245 -0
- package/dist/chunks/dropdown-tag.DBnurtCQ.js.map +1 -0
- package/dist/chunks/{dropdown.DQbTuKc5.js → dropdown.BOvtYKXS.js} +202 -193
- package/dist/chunks/dropdown.BOvtYKXS.js.map +1 -0
- package/dist/chunks/{empty-state.DNTrhYUm.js → empty-state.BsdRxzS2.js} +2 -2
- package/dist/chunks/{empty-state.DNTrhYUm.js.map → empty-state.BsdRxzS2.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{field-label.BKzuCnXr.js → field-label.Auq-Pzho.js} +3 -3
- package/dist/chunks/{field-label.BKzuCnXr.js.map → field-label.Auq-Pzho.js.map} +1 -1
- package/dist/chunks/{file-uploader.BEClGxsF.js → file-uploader.BGoCYrnw.js} +27 -28
- package/dist/chunks/file-uploader.BGoCYrnw.js.map +1 -0
- package/dist/chunks/{filter-bar.Dnnv0rpV.js → filter-bar.DzHJi42d.js} +680 -746
- package/dist/chunks/filter-bar.DzHJi42d.js.map +1 -0
- package/dist/chunks/{fixed-scroller.QCXpkadN.js → fixed-scroller.CgVOf5VE.js} +3 -3
- package/dist/chunks/{fixed-scroller.QCXpkadN.js.map → fixed-scroller.CgVOf5VE.js.map} +1 -1
- package/dist/chunks/focus-trap.BJfpIboH.js.map +1 -1
- package/dist/chunks/{footer-actions.BTELM6rh.js → footer-actions.CLq_kBwY.js} +3 -3
- package/dist/chunks/{footer-actions.BTELM6rh.js.map → footer-actions.CLq_kBwY.js.map} +1 -1
- package/dist/chunks/{form-layout-title.aXVuAWiG.js → form-layout-title.DoF6ovPB.js} +23 -16
- package/dist/chunks/form-layout-title.DoF6ovPB.js.map +1 -0
- package/dist/chunks/get-slot-text.BQS5Olxm.js.map +1 -1
- package/dist/chunks/{header-meta.DZYH-qg-.js → header-meta.uiIO1wHP.js} +30 -27
- package/dist/chunks/{header-meta.DZYH-qg-.js.map → header-meta.uiIO1wHP.js.map} +1 -1
- package/dist/chunks/{header-with-views.DjZa4Wob.js → header-with-views.t5Fr63SD.js} +87 -87
- package/dist/chunks/header-with-views.t5Fr63SD.js.map +1 -0
- package/dist/chunks/{header.CQMiTG7f.js → header.DwSyDQ68.js} +3 -3
- package/dist/chunks/{header.CQMiTG7f.js.map → header.DwSyDQ68.js.map} +1 -1
- package/dist/chunks/index.B6WW_F-J.js +31 -0
- package/dist/chunks/index.B6WW_F-J.js.map +1 -0
- package/dist/chunks/{info-icon.fB7jf3NJ.js → info-icon.Bhka3oGh.js} +3 -3
- package/dist/chunks/{info-icon.fB7jf3NJ.js.map → info-icon.Bhka3oGh.js.map} +1 -1
- package/dist/chunks/{input-field-password.BPujvbx8.js → input-field-password.Dm3HYonF.js} +24 -24
- package/dist/chunks/input-field-password.Dm3HYonF.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.bqUe_CVf.js → input-field-phone-number.bZauIuHJ.js} +1149 -1149
- package/dist/chunks/{input-field-phone-number.bqUe_CVf.js.map → input-field-phone-number.bZauIuHJ.js.map} +1 -1
- package/dist/chunks/{input-field.CwF6ldRY.js → input-field.D52XYEzU.js} +5 -5
- package/dist/chunks/input-field.D52XYEzU.js.map +1 -0
- package/dist/chunks/{inspector.g3OErNAU.js → inspector.pmpheRch.js} +4 -4
- package/dist/chunks/inspector.pmpheRch.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
- package/dist/chunks/{link.C4htMrDV.js → link.D8qpqg3W.js} +2 -2
- package/dist/chunks/{link.C4htMrDV.js.map → link.D8qpqg3W.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.UaD4kmXc.js → listbox-option-tag.Dl8GwHLT.js} +3 -3
- package/dist/chunks/listbox-option-tag.Dl8GwHLT.js.map +1 -0
- package/dist/chunks/loading-indicator.PxbRzshH.js +42 -0
- package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.B-9Ke6Ya.js → modal-fullscreen.BSKm6yn_.js} +6 -6
- package/dist/chunks/{modal-fullscreen.B-9Ke6Ya.js.map → modal-fullscreen.BSKm6yn_.js.map} +1 -1
- package/dist/chunks/{modal.qybFapnI.js → modal.Bp5twyjz.js} +6 -6
- package/dist/chunks/{modal.qybFapnI.js.map → modal.Bp5twyjz.js.map} +1 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
- package/dist/chunks/{pagination.BWTyXMRW.js → pagination.CKD9FDrA.js} +5 -5
- package/dist/chunks/pagination.CKD9FDrA.js.map +1 -0
- package/dist/chunks/popover.types.DK6opPkz.js +6 -0
- package/dist/chunks/{popover.types.iyDoIAOE.js.map → popover.types.DK6opPkz.js.map} +1 -1
- package/dist/chunks/{popper-container.C9KCAJxI.js → popper-container.agLYtGwv.js} +2 -2
- package/dist/chunks/{popper-container.C9KCAJxI.js.map → popper-container.agLYtGwv.js.map} +1 -1
- package/dist/chunks/{promo-banner.MI5NC2UT.js → promo-banner.DikQcQU2.js} +3 -3
- package/dist/chunks/promo-banner.DikQcQU2.js.map +1 -0
- package/dist/chunks/radio-group.AcYMFudv.js +177 -0
- package/dist/chunks/radio-group.AcYMFudv.js.map +1 -0
- package/dist/chunks/{radio-input.D8mv2EYC.js → radio-input.kzb4gxLW.js} +17 -17
- package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -0
- package/dist/chunks/{rich-text-editor.C905JEDW.js → rich-text-editor.BZgQ578S.js} +7 -7
- package/dist/chunks/{rich-text-editor.C905JEDW.js.map → rich-text-editor.BZgQ578S.js.map} +1 -1
- package/dist/chunks/{search-bar.CKt_-tZH.js → search-bar.c-w7Uky2.js} +4 -4
- package/dist/chunks/{search-bar.CKt_-tZH.js.map → search-bar.c-w7Uky2.js.map} +1 -1
- package/dist/chunks/{secondary-nav.B5L2bLmm.js → secondary-nav.D69COlqF.js} +9 -9
- package/dist/chunks/secondary-nav.D69COlqF.js.map +1 -0
- package/dist/chunks/{segmented-control.Dc34mUMM.js → segmented-control.Cma_nu0G.js} +17 -16
- package/dist/chunks/segmented-control.Cma_nu0G.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.CBVKMu6b.js → selection-card-group.8UIir78G.js} +5 -5
- package/dist/chunks/selection-card-group.8UIir78G.js.map +1 -0
- package/dist/chunks/{sidepanel.uWNc58r7.js → sidepanel.A9yG4FP_.js} +12 -12
- package/dist/chunks/{sidepanel.uWNc58r7.js.map → sidepanel.A9yG4FP_.js.map} +1 -1
- package/dist/chunks/{step.D8blWwfR.js → step.TzzZSA9f.js} +4 -4
- package/dist/chunks/step.TzzZSA9f.js.map +1 -0
- package/dist/chunks/{structured-list-item.BLalgOps.js → structured-list-item.CMsVwwA6.js} +6 -6
- package/dist/chunks/{structured-list-item.BLalgOps.js.map → structured-list-item.CMsVwwA6.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DqzYJ9_N.js → summary-grid.types.B80533d1.js} +6 -6
- package/dist/chunks/{summary-grid.types.DqzYJ9_N.js.map → summary-grid.types.B80533d1.js.map} +1 -1
- package/dist/chunks/{tab.D8YyoNFV.js → tab.CTui3j3e.js} +3 -3
- package/dist/chunks/tab.CTui3j3e.js.map +1 -0
- package/dist/chunks/{tag.Tjg4linG.js → tag.BwKc2d2E.js} +2 -2
- package/dist/chunks/{tag.Tjg4linG.js.map → tag.BwKc2d2E.js.map} +1 -1
- package/dist/chunks/textarea.CIQuLWQ8.js +165 -0
- package/dist/chunks/textarea.CIQuLWQ8.js.map +1 -0
- package/dist/chunks/{timeline-item.DaRKHndA.js → timeline-item.VSw9vKdO.js} +10 -10
- package/dist/chunks/timeline-item.VSw9vKdO.js.map +1 -0
- package/dist/chunks/{toast.gMDjItrP.js → toast.B4J4V6n-.js} +3 -3
- package/dist/chunks/{toast.gMDjItrP.js.map → toast.B4J4V6n-.js.map} +1 -1
- package/dist/chunks/toggle.BJMXpHRu.js +108 -0
- package/dist/chunks/toggle.BJMXpHRu.js.map +1 -0
- package/dist/chunks/{tooltip.DOD_4rkI.js → tooltip.D3SDcRef.js} +64 -68
- package/dist/chunks/tooltip.D3SDcRef.js.map +1 -0
- package/dist/chunks/{tutorial.BwnRyUoh.js → tutorial.B32GMtIj.js} +6 -6
- package/dist/chunks/tutorial.B32GMtIj.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.C7j6YhuC.js → use-cached-selected-values.IsfhJHxQ.js} +19 -19
- package/dist/chunks/use-cached-selected-values.IsfhJHxQ.js.map +1 -0
- package/dist/chunks/{use-country-items.DFdM2Ank.js → use-country-items.B3Cd3Tdo.js} +2 -2
- package/dist/chunks/use-country-items.B3Cd3Tdo.js.map +1 -0
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -1
- package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +5 -4
- package/dist/date-range-picker.js +5 -4
- package/dist/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +5 -4
- 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 +405 -329
- 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 +12 -12
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- 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/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +25 -15
- package/dist/styles/bento-light.css +9 -3
- package/dist/styles/bento.css +9 -3
- package/dist/styles/legacy.css +9 -3
- package/dist/styles/styleguide.css +9 -3
- 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.map +1 -1
- package/dist/web-types.json +1297 -1026
- package/package.json +12 -12
- package/dist/chunks/avatar.KdcsNOsm.js.map +0 -1
- package/dist/chunks/base-modal.DInbAZlp.js.map +0 -1
- package/dist/chunks/button-actions.55vIvDsX.js.map +0 -1
- package/dist/chunks/button.CilT7NmM.js.map +0 -1
- package/dist/chunks/calendar.M69sfyB9.js.map +0 -1
- package/dist/chunks/card.C11dmth8.js.map +0 -1
- package/dist/chunks/country.1yIZNjdj.js +0 -94
- package/dist/chunks/country.1yIZNjdj.js.map +0 -1
- package/dist/chunks/currency.MT3baDtO.js.map +0 -1
- package/dist/chunks/data-grid.B_Ha2vma.js.map +0 -1
- package/dist/chunks/date-input.BqBdAO1E.js.map +0 -1
- package/dist/chunks/date-picker.CGTMHUNH.js +0 -240
- package/dist/chunks/date-picker.CGTMHUNH.js.map +0 -1
- package/dist/chunks/date-range-picker.ChGfJUPq.js +0 -971
- package/dist/chunks/date-range-picker.ChGfJUPq.js.map +0 -1
- package/dist/chunks/dialog-page.LA_ZhbYa.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CDm-PQfc.js.map +0 -1
- package/dist/chunks/dropdown-tag.Bwl0fY7o.js +0 -306
- package/dist/chunks/dropdown-tag.Bwl0fY7o.js.map +0 -1
- package/dist/chunks/dropdown.DQbTuKc5.js.map +0 -1
- package/dist/chunks/file-uploader.BEClGxsF.js.map +0 -1
- package/dist/chunks/filter-bar.Dnnv0rpV.js.map +0 -1
- package/dist/chunks/form-layout-title.aXVuAWiG.js.map +0 -1
- package/dist/chunks/header-with-views.DjZa4Wob.js.map +0 -1
- package/dist/chunks/i18n.BQkEbtPM.js +0 -31
- package/dist/chunks/i18n.BQkEbtPM.js.map +0 -1
- package/dist/chunks/input-field-password.BPujvbx8.js.map +0 -1
- package/dist/chunks/input-field.CwF6ldRY.js.map +0 -1
- package/dist/chunks/inspector.g3OErNAU.js.map +0 -1
- package/dist/chunks/listbox-option-tag.UaD4kmXc.js.map +0 -1
- package/dist/chunks/loading-indicator.DXc7I1Lm.js +0 -48
- package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +0 -1
- package/dist/chunks/pagination.BWTyXMRW.js.map +0 -1
- package/dist/chunks/popover.types.iyDoIAOE.js +0 -6
- package/dist/chunks/promo-banner.MI5NC2UT.js.map +0 -1
- package/dist/chunks/radio-group.DHUa6baR.js +0 -231
- package/dist/chunks/radio-group.DHUa6baR.js.map +0 -1
- package/dist/chunks/radio-input.D8mv2EYC.js.map +0 -1
- package/dist/chunks/secondary-nav.B5L2bLmm.js.map +0 -1
- package/dist/chunks/segmented-control.Dc34mUMM.js.map +0 -1
- package/dist/chunks/selection-card-group.CBVKMu6b.js.map +0 -1
- package/dist/chunks/step.D8blWwfR.js.map +0 -1
- package/dist/chunks/tab.D8YyoNFV.js.map +0 -1
- package/dist/chunks/textarea.DUPV-I-L.js +0 -214
- package/dist/chunks/textarea.DUPV-I-L.js.map +0 -1
- package/dist/chunks/timeline-item.DaRKHndA.js.map +0 -1
- package/dist/chunks/toggle.Ct-5NUGu.js +0 -121
- package/dist/chunks/toggle.Ct-5NUGu.js.map +0 -1
- package/dist/chunks/tooltip.DOD_4rkI.js.map +0 -1
- package/dist/chunks/tutorial.BwnRyUoh.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.C7j6YhuC.js.map +0 -1
- package/dist/chunks/use-country-items.DFdM2Ank.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as oe, useAttrs as ae, useSlots as ne, ref as c, provide as re, inject as k, toRef as ie, computed as n, toRefs as se } from "vue";
|
|
2
|
-
import { a as de, I as le, b as ue, B as pe } from "./dropdown.
|
|
2
|
+
import { a as de, I as le, b as ue, B as pe } from "./dropdown.BOvtYKXS.js";
|
|
3
3
|
import { p as T, d as M, B as ce } from "./typography.hlOAxsEn.js";
|
|
4
4
|
import { g as f } from "./generate-uid.NJ8tVoha.js";
|
|
5
5
|
import { g as fe } from "./get-slot-text.BQS5Olxm.js";
|
|
6
6
|
import { u as _e } from "./aria-label.CaUURpnB.js";
|
|
7
|
-
import { u as be } from "./
|
|
7
|
+
import { u as be } from "./index.B6WW_F-J.js";
|
|
8
8
|
import { u as ye } from "./use-form-layout-loading.D3lALhtC.js";
|
|
9
9
|
import { u as he } from "./use-has-slot.C9lQZ6nz.js";
|
|
10
|
-
import { F as we, E as De } from "./field-label.
|
|
10
|
+
import { F as we, E as De } from "./field-label.Auq-Pzho.js";
|
|
11
11
|
import { n as me } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
12
|
import "../assets/input-field.css";
|
|
13
13
|
var d = /* @__PURE__ */ ((o) => (o.DEFAULT = "default", o.PAYMENT_METHOD = "payment-method", o.STATIC_VALUE = "static-value", o.DROPDOWN = "dropdown", o))(d || {}), s = /* @__PURE__ */ ((o) => (o.START = "start", o.END = "end", o))(s || {}), _ = /* @__PURE__ */ ((o) => (o.CONDENSED = "condensed", o.DISABLED = "disabled", o.READONLY = "readonly", o.ERROR = "error", o))(_ || {}), A = /* @__PURE__ */ ((o) => (o.SEARCH = "search", o.TEXT = "text", o.NUMBER = "number", o))(A || {}), ve = /* @__PURE__ */ ((o) => (o.INPUT = "input", o.ESCAPE_PRESSED = "escape-pressed", o.UPDATE_DROPDOWN = "update:dropdown", o.DROPDOWN_INPUT = "dropdown-input", o.FOCUS = "focus", o.CHANGE = "change", o.BLUR = "blur", o.KEYDOWN = "keydown", o))(ve || {});
|
|
@@ -143,7 +143,7 @@ var Se = function() {
|
|
|
143
143
|
Ie,
|
|
144
144
|
!1,
|
|
145
145
|
null,
|
|
146
|
-
"
|
|
146
|
+
"bcdcf05f"
|
|
147
147
|
);
|
|
148
148
|
const Ve = ge.exports;
|
|
149
149
|
export {
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
A as d,
|
|
155
155
|
ve as e
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=input-field.
|
|
157
|
+
//# sourceMappingURL=input-field.D52XYEzU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.D52XYEzU.js","sources":["../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["import { type BentoDropdownProps } from '../dropdown/dropdown.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = BentoDropdownProps;\nexport type BentoInputDropdownProps = {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n */\n value?: DropdownProps['value'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage?: string;\n\n /**\n * Highlights the dropdown is optional.\n */\n optional?: boolean;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * When present, indicates that the user must specify a value for the input before the owning form can be submitted.\n * The `required` attribute is supported by input types like `text`, `search`, and `number`.\n */\n required?: boolean;\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly?: boolean;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText?: string;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && value\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n ariaHidden: { type: Boolean, default: true },\n ariaLabel: { default: undefined },\n condensed: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n dropdown: { default: undefined },\n dropdownPosition: { default: BentoInputFieldElementPosition.START },\n error: { type: Boolean, default: false },\n errorMessage: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n required: { type: Boolean, default: false },\n readonly: { type: Boolean, default: false },\n slashedZero: { type: Boolean, default: false },\n staticValue: { default: '' },\n staticValuePosition: { default: BentoInputFieldElementPosition.START },\n tooltipText: { default: null },\n type: { default: BentoInputFieldType.TEXT },\n value: { default: undefined },\n variant: { default: BentoInputFieldVariant.DEFAULT }\n});\n\n const emit = defineEmits([\"update:dropdown\", \"blur\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emit('input', inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","emit","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","isDropdownReadOnly","computed","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","focus","expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAqCAE,KAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,kBAAA,mBACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,UAAA,WARQA,IAAAD,MAAA,CAAA,CAAA;;;;;;GCiWRE,KAAA;AAAA,EAAe,MAAA,EAA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;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as l, watch as h, defineComponent as L, computed as v, nextTick as S } from "vue";
|
|
2
2
|
import { d as x, B as k } from "./typography.hlOAxsEn.js";
|
|
3
|
-
import { B as A } from "./button.
|
|
4
|
-
import { B as M } from "./loading-indicator.
|
|
3
|
+
import { B as A } from "./button.CS_kdxYh.js";
|
|
4
|
+
import { B as M } from "./loading-indicator.PxbRzshH.js";
|
|
5
5
|
import { B as I, s as O, g as H, a as w, f as D } from "./focus-trap.BJfpIboH.js";
|
|
6
6
|
import { E as P } from "./expand.Bbielaja.js";
|
|
7
7
|
import { C as R } from "./cross.CC_B-vG-.js";
|
|
8
8
|
import { g as z } from "./generate-uid.NJ8tVoha.js";
|
|
9
|
-
import { u as N } from "./
|
|
9
|
+
import { u as N } from "./index.B6WW_F-J.js";
|
|
10
10
|
import { a as $, b as G } from "./index.BDK4hwK_.js";
|
|
11
11
|
import { n as K } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
12
|
import "../assets/inspector.css";
|
|
@@ -114,4 +114,4 @@ const ct = J.exports;
|
|
|
114
114
|
export {
|
|
115
115
|
ct as B
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=inspector.
|
|
117
|
+
//# sourceMappingURL=inspector.pmpheRch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.pmpheRch.js","sources":["../../src/components/inspector/composables/use-focus-history/use-focus-history.ts","../../src/components/inspector/inspector.vue"],"sourcesContent":["import { ref, type Ref } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { watch } from 'vue';\n\n/**\n * A composable to track the focus history within a target element.\n * @param targetEl The stable parent element to monitor for focus changes.\n */\nexport function useFocusHistory(targetEl: Ref<HTMLElement | null>) {\n const MAX_HISTORY_LENGTH = 3;\n\n const focusHistory = ref<Array<Element>>([]);\n\n const currentActiveElement = useActiveElement();\n\n // Edge case 1:\n // While the inspector is opened, if user tabs through the data-grid to the inspector, and closes it,\n // it returns to the last element on the data grid regardless if it is a data-grid-cell.\n //\n // Edge case 2:\n // Buttons or actions teleported out of the data-grid may have the focus shifted into a different context.\n watch(currentActiveElement, newlyFocusedElement => {\n // Check if the newly focused element is a child of our target container.\n if (!targetEl.value || !newlyFocusedElement || !targetEl.value.contains(newlyFocusedElement)) {\n return;\n }\n\n // Add the focused element to the history\n focusHistory.value.unshift(newlyFocusedElement);\n\n if (focusHistory.value.length > MAX_HISTORY_LENGTH) {\n focusHistory.value.pop();\n }\n });\n\n /**\n * Iterates through the focus history to find the first valid element\n * that is still present in the DOM.\n * @returns The first valid historical element, or null if none are found.\n */\n const findValidFocusFallback = (): HTMLElement | null => {\n for (const el of focusHistory.value) {\n if (el && document.body.contains(el as Node)) {\n return el as HTMLElement;\n }\n }\n\n return null; // No valid fallback found\n };\n\n return {\n findValidFocusFallback,\n };\n}\n","<template>\n <div ref=\"wrapper\" class=\"b-inspector\" :class=\"conditionalClass\" @keydown=\"handleSectionFocus\">\n <div ref=\"page\" class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\" />\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside\n v-if=\"isOpen\"\n ref=\"inspector\"\n class=\"b-inspector__container-wrapper\"\n :aria-label=\"inspectorAriaLabel\"\n @keydown.tab=\"handleTabNavigation\"\n >\n <bento-focus-trap :disabled=\"!isCompact\">\n <div class=\"b-inspector__container\">\n <div class=\"b-inspector__header\">\n <template v-if=\"!isCompact\">\n <bento-button\n class=\"b-inspector__return-content\"\n variant=\"secondary\"\n condensed\n :aria-describedby=\"returnToMainContentDescriptionId\"\n @click=\"moveFocusBetweenSections\"\n >\n {{ t('returnToMainContent') }}\n </bento-button>\n <span\n :id=\"returnToMainContentDescriptionId\"\n class=\"b-inspector__return-content-description\"\n >{{ t('returnToMainContentDescription') }}</span\n >\n </template>\n <bento-typography el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n <div class=\"b-inspector__icons\">\n <bento-button v-if=\"expandable\" variant=\"tertiary\" @click=\"emit('expand')\">\n <template #iconLeft><expand-icon :svg-title=\"t('expand')\"></expand-icon></template>\n </bento-button>\n <bento-button variant=\"tertiary\" @click=\"emit('update:is-open', false)\">\n <template #iconLeft><cross-icon :svg-title=\"t('close')\"></cross-icon></template>\n </bento-button>\n </div>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\" />\n </div>\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n import { useElementSize } from '@vueuse/core';\n import moveFocusInside, { focusInside, getActiveElement } from 'focus-lock';\n\n import { type BentoInspectorProps } from './inspector.types';\n import { useFocusHistory } from './composables/use-focus-history/use-focus-history';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n activePage: { default: '' },\n expandable: { type: Boolean, default: false },\n isOpen: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n size: { default: 'small' },\n title: null,\n relativeLayout: { default: 'push-content' },\n pageFocusAnchor: { default: null }\n});\n\n const emit = defineEmits([\"update:is-open\", \"update:active-page\", \"expand\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const returnToMainContentDescriptionId = generateUid('returnToMainContentDescription');\n const wrapper = ref<HTMLElement>(null);\n const inspector = ref<HTMLElement>(null);\n const page = ref<HTMLElement>(null);\n const inspectorLastFocusedElement = ref<HTMLElement>(null);\n\n const { width: wrapperWidth } = useElementSize(wrapper);\n\n const isCompact = computed(() => {\n const COMPACT_THRESHOLD_SMALL = 740;\n const COMPACT_THRESHOLD_LARGE = 915;\n\n // small inspector to occupy full screen if < 740px\n // large inspector to occupy full screen if < 915px\n const threshold = props.size === 'small' ? COMPACT_THRESHOLD_SMALL : COMPACT_THRESHOLD_LARGE;\n\n return wrapperWidth.value > 0 && wrapperWidth.value < threshold;\n });\n\n const computedPageLastFocusedElement = computed(() => props.pageFocusAnchor);\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n [`b-inspector--${props.relativeLayout}`]: true,\n [`b-inspector--is-compact`]: isCompact.value,\n }));\n\n const inspectorAriaLabel = computed(() => `${t('inspector')}, ${props.title}`);\n\n const { findValidFocusFallback } = useFocusHistory(page);\n\n const setFocus = async () => {\n if (props.isOpen) {\n await nextTick();\n moveFocusInside(inspector.value, computedPageLastFocusedElement.value);\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n }\n };\n\n const handleTabNavigation = event => {\n if (isCompact.value) {\n return;\n }\n const direction = event.shiftKey ? -1 : 1;\n const focusableEl = getNextFocusableElement(direction, inspector.value);\n // If the nextfocusableEl is the same as the activeElement that means it's the last focusable element\n // inside the inspector, so the focus is moved back to the last focused element on the page\n if (getActiveElement() === focusableEl) {\n event.preventDefault();\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n }\n };\n\n const handleSectionFocus = event => {\n const sectionShortcut = event.shiftKey && event.ctrlKey && event.key === 'S';\n if (props.isOpen && !isCompact.value && sectionShortcut) {\n moveFocusBetweenSections();\n }\n };\n\n const moveFocusBetweenSections = () => {\n if (focusInside(inspector.value)) {\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n } else {\n focusElement(inspectorLastFocusedElement.value);\n }\n };\n\n const focusElement = (element: HTMLElement) => {\n if (!element) {\n return;\n }\n element?.focus();\n if (document.activeElement !== element) {\n focusElement(element.parentElement);\n }\n };\n\n watch(\n () => props.activePage,\n () => {\n if (props.activePage) {\n setFocus();\n }\n }\n );\n\n if (!props.activePage) {\n deprecate(\n 'BentoInspector \"active-page\" as optional',\n `Make sure to set the \"active-page\" prop and keep it in sync with \"update:active-page\".\n \"active-page\" prop will be required in the next version`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * :active-page=\"activePage\"\n * expandable\n * @update:is-open=\"isOpen = $event\"\n * @update:active-page=\"activePage = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n"],"names":["useFocusHistory","targetEl","focusHistory","ref","currentActiveElement","useActiveElement","watch","newlyFocusedElement","el","__default__","messages","t","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","inspector","page","inspectorLastFocusedElement","wrapperWidth","useElementSize","isCompact","computed","threshold","props","computedPageLastFocusedElement","conditionalClass","inspectorAriaLabel","findValidFocusFallback","setFocus$1","nextTick","setFocus","focusElement","handleTabNavigation","event","direction","focusableEl","getNextFocusableElement","getActiveElement","emit","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","element","deprecate"],"mappings":";;;;;;;;;;;;AAQO,SAAAA,EAAAC,GAAA;AAGH,QAAAC,IAAAC,EAAA,CAAA,CAAA,GAEAC,IAAAC,EAAA;AAQA,SAAAC,EAAAF,GAAA,CAAAG,MAAA;AAEI,IAAA,CAAAN,EAAA,SAAA,CAAAM,KAAA,CAAAN,EAAA,MAAA,SAAAM,CAAA,MAKAL,EAAA,MAAA,QAAAK,CAAA,GAEAL,EAAA,MAAA,SAAA,KACIA,EAAA,MAAA,IAAA;AAAA,EACJ,CAAA,GAkBJ;AAAA,IAAO,wBAVP,MAAA;AACI,iBAAAM,KAAAN,EAAA;AACI,YAAAM,KAAA,SAAA,KAAA,SAAAA,CAAA;AACI,iBAAAA;AAIR,aAAA;AAAA,IAAO;AAAA,EAIP;AAER;;;;;;;;;;;;;;;;;GC2KIC,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;;;iBApIA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,gCAAA,GACAC,IAAAZ,EAAA,IAAA,GACAa,IAAAb,EAAA,IAAA,GACAc,IAAAd,EAAA,IAAA,GACAe,IAAAf,EAAA,IAAA,GAEA,EAAA,OAAAgB,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,EAAA,MAAA;AAMI,YAAAC,IAAAC,EAAA,SAAA,UAAA,MAAA;AAEA,aAAAL,EAAA,QAAA,KAAAA,EAAA,QAAAI;AAAA,IAAsD,CAAA,GAG1DE,IAAAH,EAAA,MAAAE,EAAA,eAAA,GAEAE,IAAAJ,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAE,EAAA,IAAA,EAAA,GAAA;AAAA,MACL,CAAA,gBAAAA,EAAA,cAAA,EAAA,GA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,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-navigation.pB8weElW.js","sources":["../../src/types/keyboard-navigation.ts","../../src/directives/keyboard-navigation/keyboard-navigation.ts"],"sourcesContent":["export enum BentoKeyboardNavigationKeyDownEvent {\n ARROW_DOWN = 'keydown:arrow-down',\n ARROW_LEFT = 'keydown:arrow-left',\n ARROW_RIGHT = 'keydown:arrow-right',\n ARROW_UP = 'keydown:arrow-up',\n END = 'keydown:end',\n ENTER = 'keydown:enter',\n ESCAPE = 'keydown:escape',\n HOME = 'keydown:home',\n PAGE_DOWN = 'keydown:page-down',\n PAGE_UP = 'keydown:page-up',\n SHIFT_PAGE_DOWN = 'keydown:shift-page-down',\n SHIFT_PAGE_UP = 'keydown:shift-page-up',\n TAB = 'keydown:tab',\n SPACE = 'keydown:space',\n}\n","import { listen } from '@/utils/ts/events';\nimport { type Binding } from './keyboard-navigation.types';\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\nimport type { DirectiveHook } from 'vue';\n\nconst onKeyEvent = (el: Element) => (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Esc':\n case 'Escape':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ESCAPE, { detail: event }));\n break;\n case 'Enter':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ENTER, { detail: event }));\n break;\n case 'Tab':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.TAB, { detail: event }));\n break;\n // Space\n case ' ':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SPACE, { detail: event }));\n break;\n case 'Right':\n case 'ArrowRight':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT, { detail: event }));\n break;\n case 'Left':\n case 'ArrowLeft':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT, { detail: event }));\n break;\n case 'Up':\n case 'ArrowUp':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_UP, { detail: event }));\n break;\n case 'Down':\n case 'ArrowDown':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN, { detail: event }));\n break;\n case 'PageUp':\n if (event.shiftKey) {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SHIFT_PAGE_UP, { detail: event }));\n } else {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.PAGE_UP, { detail: event }));\n }\n break;\n case 'PageDown':\n if (event.shiftKey) {\n el.dispatchEvent(\n new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SHIFT_PAGE_DOWN, { detail: event })\n );\n } else {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.PAGE_DOWN, { detail: event }));\n }\n break;\n case 'Home':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.HOME, { detail: event }));\n break;\n case 'End':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.END, { detail: event }));\n break;\n default:\n break;\n }\n};\n\nconst bindDirective: DirectiveHook<Element> = (el, binding: Binding<undefined>) => {\n // Register the listener cleanup function\n // eslint-disable-next-line no-param-reassign\n binding['keyDownListener'] = listen(el, 'keydown', onKeyEvent(el));\n};\n\nconst unbindDirective: DirectiveHook<Element> = (_, binding: Binding<undefined>) => {\n if (binding.keyDownListener) {\n binding.keyDownListener();\n }\n};\n\nexport const BentoKeyboardNavigationDirective = {\n // Vue 2 Directive hooks\n bind: bindDirective,\n unbind: unbindDirective,\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n"],"names":["BentoKeyboardNavigationKeyDownEvent","onKeyEvent","el","event","bindDirective","binding","listen","unbindDirective","_","BentoKeyboardNavigationDirective"],"mappings":";AAAY,I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AK;AAAA,IACL,KAAK;AACE,MAAAD,EAAA,cAAc,IAAI,YAAYF,EAAoC,YAAY,EAAE,QAAQG,EAAM,CAAC,CAAC;AACnG;AAAA,IACJ,KAAK;AACD,MAAIA,EAAM,WACHD,EAAA,cAAc,IAAI,YAAYF,EAAoC,eAAe,EAAE,QAAQG,EAAM,CAAC,CAAC,IAEnGD,EAAA,cAAc,IAAI,YAAYF,EAAoC,SAAS,EAAE,QAAQG,EAAM,CAAC,CAAC;AAEpG;AAAA,IACJ,KAAK;AACD,MAAIA,EAAM,WACHD,EAAA;AAAA,QACC,IAAI,YAAYF,EAAoC,iBAAiB,EAAE,QAAQG,EAAO,CAAA;AAAA,MAC1F,IAEGD,EAAA,cAAc,IAAI,YAAYF,EAAoC,WAAW,EAAE,QAAQG,EAAM,CAAC,CAAC;AAEtG;AAAA,IACJ,KAAK;AACE,MAAAD,EAAA,cAAc,IAAI,YAAYF,EAAoC,MAAM,EAAE,QAAQG,EAAM,CAAC,CAAC;AAC7F;AAAA,IACJ,KAAK;AACE,MAAAD,EAAA,cAAc,IAAI,YAAYF,EAAoC,KAAK,EAAE,QAAQG,EAAM,CAAC,CAAC;AAC5F;AAAA,EAEA;AAEZ,GAEMC,IAAwC,CAACF,GAAIG,MAAgC;AAG/E,EAAAA,EAAQ,kBAAqBC,EAAOJ,GAAI,WAAWD,EAAWC,CAAE,CAAC;AACrE,GAEMK,IAA0C,CAACC,GAAGH,MAAgC;AAChF,EAAIA,EAAQ,mBACRA,EAAQ,gBAAgB;AAEhC,GAEaI,IAAmC;AAAA;AAAA,EAE5C,MAAML;AAAA,EACN,QAAQG;AAAA;AAAA,EAER,aAAaH;AAAA,EACb,WAAWG;AACf;"}
|
|
1
|
+
{"version":3,"file":"keyboard-navigation.pB8weElW.js","sources":["../../src/types/keyboard-navigation.ts","../../src/directives/keyboard-navigation/keyboard-navigation.ts"],"sourcesContent":["export enum BentoKeyboardNavigationKeyDownEvent {\n ARROW_DOWN = 'keydown:arrow-down',\n ARROW_LEFT = 'keydown:arrow-left',\n ARROW_RIGHT = 'keydown:arrow-right',\n ARROW_UP = 'keydown:arrow-up',\n END = 'keydown:end',\n ENTER = 'keydown:enter',\n ESCAPE = 'keydown:escape',\n HOME = 'keydown:home',\n PAGE_DOWN = 'keydown:page-down',\n PAGE_UP = 'keydown:page-up',\n SHIFT_PAGE_DOWN = 'keydown:shift-page-down',\n SHIFT_PAGE_UP = 'keydown:shift-page-up',\n TAB = 'keydown:tab',\n SPACE = 'keydown:space',\n}\n","import { listen } from '@/utils/ts/events';\nimport { type Binding } from './keyboard-navigation.types';\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\nimport type { DirectiveHook } from 'vue';\n\nconst onKeyEvent = (el: Element) => (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Esc':\n case 'Escape':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ESCAPE, { detail: event }));\n break;\n case 'Enter':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ENTER, { detail: event }));\n break;\n case 'Tab':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.TAB, { detail: event }));\n break;\n // Space\n case ' ':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SPACE, { detail: event }));\n break;\n case 'Right':\n case 'ArrowRight':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT, { detail: event }));\n break;\n case 'Left':\n case 'ArrowLeft':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT, { detail: event }));\n break;\n case 'Up':\n case 'ArrowUp':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_UP, { detail: event }));\n break;\n case 'Down':\n case 'ArrowDown':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN, { detail: event }));\n break;\n case 'PageUp':\n if (event.shiftKey) {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SHIFT_PAGE_UP, { detail: event }));\n } else {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.PAGE_UP, { detail: event }));\n }\n break;\n case 'PageDown':\n if (event.shiftKey) {\n el.dispatchEvent(\n new CustomEvent(BentoKeyboardNavigationKeyDownEvent.SHIFT_PAGE_DOWN, { detail: event })\n );\n } else {\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.PAGE_DOWN, { detail: event }));\n }\n break;\n case 'Home':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.HOME, { detail: event }));\n break;\n case 'End':\n el.dispatchEvent(new CustomEvent(BentoKeyboardNavigationKeyDownEvent.END, { detail: event }));\n break;\n default:\n break;\n }\n};\n\nconst bindDirective: DirectiveHook<Element> = (el, binding: Binding<undefined>) => {\n // Register the listener cleanup function\n // eslint-disable-next-line no-param-reassign\n binding['keyDownListener'] = listen(el, 'keydown', onKeyEvent(el));\n};\n\nconst unbindDirective: DirectiveHook<Element> = (_, binding: Binding<undefined>) => {\n if (binding.keyDownListener) {\n binding.keyDownListener();\n }\n};\n\nexport const BentoKeyboardNavigationDirective = {\n // Vue 2 Directive hooks\n bind: bindDirective,\n unbind: unbindDirective,\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n"],"names":["BentoKeyboardNavigationKeyDownEvent","onKeyEvent","el","event","bindDirective","binding","listen","unbindDirective","_","BentoKeyboardNavigationDirective"],"mappings":";AAAY,IAAAA,sBAAAA,OACRA,EAAA,aAAa,sBACbA,EAAA,aAAa,sBACbA,EAAA,cAAc,uBACdA,EAAA,WAAW,oBACXA,EAAA,MAAM,eACNA,EAAA,QAAQ,iBACRA,EAAA,SAAS,kBACTA,EAAA,OAAO,gBACPA,EAAA,YAAY,qBACZA,EAAA,UAAU,mBACVA,EAAA,kBAAkB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D,EAAA,cAAc,IAAI,YAAYF,EAAoC,SAAS,EAAE,QAAQG,EAAM,CAAC,CAAC;AAEpG;AAAA,IACJ,KAAK;AACD,MAAIA,EAAM,WACHD,EAAA;AAAA,QACC,IAAI,YAAYF,EAAoC,iBAAiB,EAAE,QAAQG,EAAO,CAAA;AAAA,MAC1F,IAEGD,EAAA,cAAc,IAAI,YAAYF,EAAoC,WAAW,EAAE,QAAQG,EAAM,CAAC,CAAC;AAEtG;AAAA,IACJ,KAAK;AACE,MAAAD,EAAA,cAAc,IAAI,YAAYF,EAAoC,MAAM,EAAE,QAAQG,EAAM,CAAC,CAAC;AAC7F;AAAA,IACJ,KAAK;AACE,MAAAD,EAAA,cAAc,IAAI,YAAYF,EAAoC,KAAK,EAAE,QAAQG,EAAM,CAAC,CAAC;AAC5F;AAAA,EAEA;AAEZ,GAEMC,IAAwC,CAACF,GAAIG,MAAgC;AAG/E,EAAAA,EAAQ,kBAAqBC,EAAOJ,GAAI,WAAWD,EAAWC,CAAE,CAAC;AACrE,GAEMK,IAA0C,CAACC,GAAGH,MAAgC;AAChF,EAAIA,EAAQ,mBACRA,EAAQ,gBAAgB;AAEhC,GAEaI,IAAmC;AAAA;AAAA,EAE5C,MAAML;AAAA,EACN,QAAQG;AAAA;AAAA,EAER,aAAaH;AAAA,EACb,WAAWG;AACf;"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent as v, computed as r } from "vue";
|
|
|
2
2
|
import { RouterLink as m } from "vue-router";
|
|
3
3
|
import { g as y } from "./generate-uid.NJ8tVoha.js";
|
|
4
4
|
import { B as k } from "./typography.hlOAxsEn.js";
|
|
5
|
-
import { u as b } from "./
|
|
5
|
+
import { u as b } from "./index.B6WW_F-J.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { n as p } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
8
8
|
import "../assets/link.css";
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
T as E,
|
|
93
93
|
s as a
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=link.
|
|
95
|
+
//# sourceMappingURL=link.D8qpqg3W.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.
|
|
1
|
+
{"version":3,"file":"link.D8qpqg3W.js","sources":["../../src/components/link/link.types.ts","../../../ui-assets/icons-16/dist/vue/external-link.vue","../../src/components/link/link.vue"],"sourcesContent":["import type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoLinkVariant {\n DEFAULT = 'default',\n QUIET = 'quiet',\n}\n\nexport type BentoLinkProps = RouterLinkProps & {\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography component.\n */\n disableTypography?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link and renders an external link icon.\n */\n external?: boolean;\n\n /**\n * Set to true if used inside a `BentoButton` component.\n */\n isButton?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n isNotRouting?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n /**\n * Set to true to truncate link. Doesn't work with disableTypography.\n */\n truncate?: boolean;\n\n /**\n * Link variant type affecting visual style.\n * @values default, quiet\n */\n variant?: BentoLinkVariant | `${BentoLinkVariant}`;\n};\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z\"/></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 <a\n v-if=\"external || isNotRouting\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n :aria-describedby=\"externalLinkId\"\n :href=\"$props.to.toString()\"\n :title=\"getAttributeTitle($attrs.title)\"\n :target=\"computedTarget\"\n @click=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n <span v-if=\"showExternalLinkIcon\" aria-hidden=\"true\" class=\"b-link__external-link-icon\">\n <external-link-icon />\n </span>\n <span v-if=\"external\" :id=\"externalLinkId\" class=\"b-link--visually-hidden\">{{ t('opensInNewTab') }}</span>\n </a>\n <router-link\n v-else\n v-bind=\"{ ...$attrs, ...$props, ...nonForwardedProps }\"\n :class=\"conditionalClasses\"\n :target=\"target\"\n :to=\"props.to\"\n custom\n @click.native=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n </router-link>\n</template>\n\n<script setup lang=\"ts\">\n import { RouterLink } from 'vue-router';\n import { computed } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTypography } from '@/components/typography';\n import { type BentoLinkProps, BentoLinkVariant } from './link.types';\n import { useI18n } from '@/utils/ts/i18n';\n import type { RouterLinkSlotArgument } from 'vue-router/types/router.d.ts';\n import ExternalLinkIcon from '@adyen/ui-assets-icons-16/vue/external-link';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n to: null,\n replace: { type: Boolean },\n append: { type: Boolean },\n tag: null,\n activeClass: null,\n exact: { type: Boolean },\n exactPath: { type: Boolean },\n exactPathActiveClass: null,\n event: null,\n exactActiveClass: null,\n ariaCurrentValue: null,\n disableTypography: { type: Boolean },\n external: { type: Boolean },\n isButton: { type: Boolean },\n isNotRouting: { type: Boolean },\n target: { default: null },\n truncate: { type: Boolean },\n variant: { default: BentoLinkVariant.DEFAULT }\n});\n\n // Props that should not be forwarded to the underlying anchor element\n const nonForwardedProps = {\n variant: undefined,\n isButton: undefined,\n truncate: undefined,\n disableTypography: undefined,\n external: undefined,\n isNotRouting: undefined,\n };\n\n const externalLinkId = generateUid('external-link');\n\n const getAttributeTitle = (attributesTitle: unknown) => attributesTitle as string;\n\n const conditionalClasses = computed(() => ({\n 'b-link': !props.isButton,\n [`b-link--${BentoLinkVariant.QUIET}`]: props.variant === BentoLinkVariant.QUIET,\n [`b-link--truncate`]: props.truncate,\n }));\n\n const computedTarget = computed(() => (props.external ? (props.target ?? '_blank') : props.target));\n const showExternalLinkIcon = computed(() => !(props.isButton || props.isNotRouting));\n\n const emit = defineEmits([\"click\"]);\n\n const onClick = (e: MouseEvent, navigateCallback?: RouterLinkSlotArgument['navigate']) => {\n emit('click', e);\n if (navigateCallback) {\n navigateCallback();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Extends the `router-link` from the `vue-router` NPM package.\n *\n * @example\n * import { BentoLink } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLink },\n * template: `\n * <bento-link to=\"/\">\n * link\n * </bento-link>\n * `\n * }\n */\n export default {\n name: 'bento-link',\n inheritAttrs: false,\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/link/link.scss\" />\n"],"names":["BentoLinkVariant","BentoLinkVariant2","uuid","_sfc_main$1","__default__","messages","t","useI18n","nonForwardedProps","externalLinkId","generateUid","getAttributeTitle","attributesTitle","conditionalClasses","computed","props","computedTarget","showExternalLinkIcon","e","navigateCallback","emit"],"mappings":";;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACEZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;GC2GIE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;iBA5EA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAwBAC,IAAA;AAAA,MAA0B,SAAA;AAAA,MACb,UAAA;AAAA,MACC,UAAA;AAAA,MACA,mBAAA;AAAA,MACS,UAAA;AAAA,MACT,cAAA;AAAA,IACI,GAGlBC,IAAAC,EAAA,eAAA,GAEAC,IAAA,CAAAC,MAAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,UAAA,CAAAC,EAAA;AAAA,MACtB,CAAA,WAAAf,EAAA,KAAA,EAAA,GAAAe,EAAA,YAAAf,EAAA;AAAA,MACyD,oBAAAe,EAAA;AAAA,IAC9C,EAAA,GAGhCC,IAAAF,EAAA,MAAAC,EAAA,WAAAA,EAAA,UAAA,WAAAA,EAAA,MAAA,GACAE,IAAAH,EAAA,MAAA,EAAAC,EAAA,YAAAA,EAAA,aAAA;4LAIA,CAAAG,GAAAC,MAAA;AACI,MAAAC,EAAA,SAAAF,CAAA,GACAC,KACIA,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as e } from "vue";
|
|
2
|
-
import { B as s } from "./tag.
|
|
2
|
+
import { B as s } from "./tag.BwKc2d2E.js";
|
|
3
3
|
import { B as r } from "./typography.hlOAxsEn.js";
|
|
4
4
|
import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/listbox-option-tag.css";
|
|
@@ -35,10 +35,10 @@ var l = function() {
|
|
|
35
35
|
_,
|
|
36
36
|
!1,
|
|
37
37
|
null,
|
|
38
|
-
"
|
|
38
|
+
"954d4740"
|
|
39
39
|
);
|
|
40
40
|
const v = m.exports;
|
|
41
41
|
export {
|
|
42
42
|
v as L
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=listbox-option-tag.
|
|
44
|
+
//# sourceMappingURL=listbox-option-tag.Dl8GwHLT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listbox-option-tag.Dl8GwHLT.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as s, onMounted as r, onUnmounted as i, computed as l } from "vue";
|
|
2
|
+
import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
3
|
+
import "../assets/loading-indicator.css";
|
|
4
|
+
var t = /* @__PURE__ */ ((a) => (a.START = "loading-start", a.END = "loading-end", a))(t || {});
|
|
5
|
+
const c = {
|
|
6
|
+
name: "bento-loading-indicator"
|
|
7
|
+
}, _ = /* @__PURE__ */ s({
|
|
8
|
+
...c,
|
|
9
|
+
props: {
|
|
10
|
+
small: { type: Boolean, default: !1 },
|
|
11
|
+
large: { type: Boolean, default: !1 },
|
|
12
|
+
inverse: { type: Boolean, default: !1 }
|
|
13
|
+
},
|
|
14
|
+
emits: [],
|
|
15
|
+
setup(a, { emit: n }) {
|
|
16
|
+
const e = a;
|
|
17
|
+
r(() => n(t.START)), i(() => n(t.END));
|
|
18
|
+
const o = l(() => ({
|
|
19
|
+
"b-loading-indicator--inverse": e.inverse,
|
|
20
|
+
"b-loading-indicator--small": e.small,
|
|
21
|
+
"b-loading-indicator--large": e.large
|
|
22
|
+
}));
|
|
23
|
+
return { __sfc: !0, props: e, emit: n, conditionalClasses: o };
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
var p = function() {
|
|
27
|
+
var n = this, e = n._self._c, o = n._self._setupProxy;
|
|
28
|
+
return e("div", { staticClass: "b-loading-indicator", class: o.conditionalClasses, attrs: { "aria-hidden": "true", "data-testid": "loading-indicator" } });
|
|
29
|
+
}, f = [], u = /* @__PURE__ */ d(
|
|
30
|
+
_,
|
|
31
|
+
p,
|
|
32
|
+
f,
|
|
33
|
+
!1,
|
|
34
|
+
null,
|
|
35
|
+
"90a47943"
|
|
36
|
+
);
|
|
37
|
+
const v = u.exports;
|
|
38
|
+
export {
|
|
39
|
+
v as B,
|
|
40
|
+
t as a
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=loading-indicator.PxbRzshH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-indicator.PxbRzshH.js","sources":["../../src/components/loading-indicator/loading-indicator.types.ts","../../src/components/loading-indicator/loading-indicator.vue"],"sourcesContent":["export enum BentoLoadingIndicatorEvent {\n START = 'loading-start',\n END = 'loading-end',\n}\n\nexport interface BentoLoadingIndicatorProps {\n /**\n * Displays the loading indicator in a small size\n */\n small?: boolean;\n /**\n * Displays the loading indicator in a large size\n */\n large?: boolean;\n /**\n * Displays the loading indicator in a white variant\n */\n inverse?: boolean;\n}\n","<template>\n <div class=\"b-loading-indicator\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"loading-indicator\" />\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted } from 'vue';\n import { BentoLoadingIndicatorEvent, type BentoLoadingIndicatorProps } from './loading-indicator.types';\n\n const props = defineProps({\n small: { type: Boolean, default: false },\n large: { type: Boolean, default: false },\n inverse: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([]);\n\n onMounted(() => emit(BentoLoadingIndicatorEvent.START));\n\n onUnmounted(() => emit(BentoLoadingIndicatorEvent.END));\n\n const conditionalClasses = computed(() => ({\n 'b-loading-indicator--inverse': props.inverse,\n 'b-loading-indicator--small': props.small,\n 'b-loading-indicator--large': props.large,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * A loading indicator component that displays a spinning animation.\n *\n * @usage\n * import { BentoLoadingIndicator } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLoadingIndicator },\n * template: `\n * <bento-loading-indicator :small=\"true\" />\n * `\n * };\n */\n export default {\n name: 'bento-loading-indicator',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./loading-indicator.scss\" />\n"],"names":["BentoLoadingIndicatorEvent","BentoLoadingIndicatorEvent2","__default__","onMounted","emit","onUnmounted","conditionalClasses","computed","props"],"mappings":";;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,iBACAA,EAAA,MAAA,eAFQA,IAAAD,KAAA,CAAA,CAAA;ACyCR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;AA3BA,IAAAC,EAAA,MAAAC,EAAAJ,EAAA,KAAA,CAAA,GAEAK,EAAA,MAAAD,EAAAJ,EAAA,GAAA,CAAA;AAEA,UAAAM,IAAAC,EAAA,OAAA;AAAA,MAA2C,gCAAAC,EAAA;AAAA,MACD,8BAAAA,EAAA;AAAA,MACF,8BAAAA,EAAA;AAAA,IACA,EAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as P, useSlots as x, onMounted as M, useListeners as _, getCurrentInstance as I, toRefs as T, ref as u, computed as w, watch as D, nextTick as R, provide as f } from "vue";
|
|
2
2
|
import "./index.Cl4_42j5.js";
|
|
3
|
-
import { B as G } from "./button.
|
|
3
|
+
import { B as G } from "./button.CS_kdxYh.js";
|
|
4
4
|
import { B as J } from "./focus-trap.BJfpIboH.js";
|
|
5
5
|
import { B as $ } from "./typography.hlOAxsEn.js";
|
|
6
6
|
import { u as E } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
-
import { D as K, B as U, b as Y, a as j } from "./dialog-page.
|
|
8
|
-
import { B as z, i as H } from "./button-actions.
|
|
7
|
+
import { D as K, B as U, b as Y, a as j } from "./dialog-page.D23qNwKW.js";
|
|
8
|
+
import { B as z, i as H } from "./button-actions.B81vY51z.js";
|
|
9
9
|
import { n as S } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
10
|
import { C as V } from "./cross.CC_B-vG-.js";
|
|
11
|
-
import { u as q } from "./
|
|
11
|
+
import { u as q } from "./index.B6WW_F-J.js";
|
|
12
12
|
import { g as Q } from "./generate-uid.NJ8tVoha.js";
|
|
13
13
|
import "../assets/modal-fullscreen.css";
|
|
14
14
|
const W = {}, X = /* @__PURE__ */ P({
|
|
@@ -210,11 +210,11 @@ var re = function() {
|
|
|
210
210
|
ue,
|
|
211
211
|
!1,
|
|
212
212
|
null,
|
|
213
|
-
"
|
|
213
|
+
"e560cd86"
|
|
214
214
|
);
|
|
215
215
|
const Be = ie.exports;
|
|
216
216
|
export {
|
|
217
217
|
ae as B,
|
|
218
218
|
Be as m
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=modal-fullscreen.
|
|
220
|
+
//# sourceMappingURL=modal-fullscreen.BSKm6yn_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-fullscreen.B-9Ke6Ya.js","sources":["../../src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n </div>\n </div>\n </template>\n <template #content>\n <div class=\"b-modal-fullscreen-page__content\">\n <slot />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page v-else :actions=\"actions\" :contextual-label=\"contextualLabel\" :title=\"title\">\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n <div class=\"b-modal-fullscreen__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"closeModal\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoButton, type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import { MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\n import messages from './messages.json';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const internalIsOpen = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for modal ref to be created\n await nextTick();\n\n if (!modal.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n modal.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (modal.value.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","onMounted","props","useListeners","useListeners$1","getCurrentInstance","instance","_a","__default__","messages","activePage","isOpen","toRefs","t","useI18n","modal","ref","isClosing","modalFullscreenId","generateUid","internalIsOpen","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","emit","closeModal","startCloseModalAnimation","watch","nextTick","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_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-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n </div>\n </div>\n </template>\n <template #content>\n <div class=\"b-modal-fullscreen-page__content\">\n <slot />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page v-else :actions=\"actions\" :contextual-label=\"contextualLabel\" :title=\"title\">\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n <div class=\"b-modal-fullscreen__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"closeModal\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoButton, type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import { MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\n import messages from './messages.json';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const internalIsOpen = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for modal ref to be created\n await nextTick();\n\n if (!modal.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n modal.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (modal.value.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","onMounted","props","useListeners","useListeners$1","getCurrentInstance","instance","_a","__default__","messages","activePage","isOpen","toRefs","t","useI18n","modal","ref","isClosing","modalFullscreenId","generateUid","internalIsOpen","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","emit","closeModal","startCloseModalAnimation","watch","nextTick","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;AAqJI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhDAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;AAEA,WAAAI,EAAA,MAAA;AACI,UAAAC,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,0EAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;AChGD,SAAAC,KAAA;;AAEH,MAAA,CAAA,UAAA,CAAAC,KAAA,CAAAC;AACI,WAAA,CAAA;AAGJ,MAAAD;AACI,WAAAA,EAAA;AAGJ,QAAAE,IAA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AA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB,GAItBG,EAAAC,GAAAd,CAAA;AAGA,UAAAe,IAAAjB,EAAAkB,EAAA,uBAAA,GACAC,IAAAnB,EAAA,CAAA,CAAA,GACAS,IAAAT,EAAA,CAAA,CAAA,GACAoB,IAAA,CAAAC,MAAAX,EAAA,sBAAAW,CAAA;AAEA,IAAAN,EAAAO,GAAA;AAAA,MAAqE,YAAA5B;AAAA,MACjE,WAAAuB;AAAA,MACA,QAAAb;AAAA,MACQ,OAAAe;AAAA,MACR,eAAAV;AAAA,MACA,YAAAW;AAAA,IACA,CAAA;AAIJ,UAAAG,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAAL,EAAA,SAAA5B,IAAA4B,EAAA,UAAA,gBAAA5B,EAAA,OAAA,CAAAkC,MAAAA,MAAAD;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIA,KACIN,EAAA,MAAA,KAAAM,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAV,EAAAY,GAAAD,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as p, useSlots as B, onMounted as A, toRefs as E, ref as L, computed as f, useAttrs as P, watch as k } from "vue";
|
|
2
|
-
import { c as g, h as O, e as d, d as x, b as C, a as v, B as T } from "./base-modal.
|
|
2
|
+
import { c as g, h as O, e as d, d as x, b as C, a as v, B as T } from "./base-modal.BMdlCSd0.js";
|
|
3
3
|
import { u as b } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
|
-
import { F as R } from "./footer-actions.
|
|
4
|
+
import { F as R } from "./footer-actions.CLq_kBwY.js";
|
|
5
5
|
import { n as S } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
-
import { a as M } from "./button.
|
|
7
|
-
import { u as z } from "./
|
|
8
|
-
import { B as N } from "./button-actions.
|
|
6
|
+
import { a as M } from "./button.CS_kdxYh.js";
|
|
7
|
+
import { u as z } from "./index.B6WW_F-J.js";
|
|
8
|
+
import { B as N } from "./button-actions.B81vY51z.js";
|
|
9
9
|
import { d as $ } from "./typography.hlOAxsEn.js";
|
|
10
10
|
const F = p({
|
|
11
11
|
name: "bento-modal-default"
|
|
@@ -442,4 +442,4 @@ const pt = ot.exports;
|
|
|
442
442
|
export {
|
|
443
443
|
pt as B
|
|
444
444
|
};
|
|
445
|
-
//# sourceMappingURL=modal.
|
|
445
|
+
//# sourceMappingURL=modal.Bp5twyjz.js.map
|