@adyen/bento-vue3 1.89.2 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/index.d.ts +767 -522
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.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/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
- package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
- package/dist/chunks/action-bar.BPS3wPde.js +336 -0
- package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.BPS3wPde.js.map} +1 -1
- package/dist/chunks/ai-tag.D7shWB_x.js +137 -0
- package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.D7shWB_x.js.map} +1 -1
- package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
- package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
- package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
- package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
- package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BxcS7Pao.js} +132 -125
- package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BxcS7Pao.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.BKdNXYgU.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.BKdNXYgU.js.map} +1 -1
- package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.DLiM8KZL.js} +203 -189
- package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.DLiM8KZL.js.map} +1 -1
- package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.qm-kFNQv.js} +460 -428
- package/dist/chunks/calendar.qm-kFNQv.js.map +1 -0
- package/dist/chunks/card.BEChcEqg.js +223 -0
- package/dist/chunks/{card.CoxQ_L0w.js.map → card.BEChcEqg.js.map} +1 -1
- package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.i3W8WO-7.js} +4 -4
- package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.i3W8WO-7.js.map} +1 -1
- package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BPrymcRl.js} +68 -61
- package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BPrymcRl.js.map} +1 -1
- package/dist/chunks/chip.DFldnqfz.js +72 -0
- package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
- package/dist/chunks/{click-outside.BPylIosK.js → click-outside.B0whuTUU.js} +2 -2
- package/dist/chunks/{click-outside.BPylIosK.js.map → click-outside.B0whuTUU.js.map} +1 -1
- package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BG5ZmCrb.js} +113 -106
- package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BG5ZmCrb.js.map} +1 -1
- package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.DqRpF9bh.js} +2 -2
- package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.DqRpF9bh.js.map} +1 -1
- package/dist/chunks/copy.CL893i9-.js +114 -0
- package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
- package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
- package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
- package/dist/chunks/country.types.6a7xxZIR.js +26 -0
- package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
- package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.C7mfUXOl.js} +3 -3
- package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.C7mfUXOl.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.B50DIXjK.js} +3 -3
- package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.B50DIXjK.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.CKdZb6EN.js} +4 -4
- package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.CKdZb6EN.js.map} +1 -1
- package/dist/chunks/data-grid.DvMe72LK.js +4247 -0
- package/dist/chunks/data-grid.DvMe72LK.js.map +1 -0
- package/dist/chunks/date-picker.CidHad1p.js +269 -0
- package/dist/chunks/date-picker.CidHad1p.js.map +1 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js +1027 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js.map +1 -0
- package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
- package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
- package/dist/chunks/{directive.Dpivxq_t.js → directive.C8kY-ZW-.js} +2 -2
- package/dist/chunks/{directive.Dpivxq_t.js.map → directive.C8kY-ZW-.js.map} +1 -1
- package/dist/chunks/draggable-handle.CySRx1tb.js +171 -0
- package/dist/chunks/draggable-handle.CySRx1tb.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.wcJ6Mgqe.js} +5 -5
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.wcJ6Mgqe.js.map} +1 -1
- package/dist/chunks/dropdown.DHoL50gV.js +1214 -0
- package/dist/chunks/dropdown.DHoL50gV.js.map +1 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js +55 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js.map +1 -0
- package/dist/chunks/field-label.DZYFjFgr.js +111 -0
- package/dist/chunks/field-label.DZYFjFgr.js.map +1 -0
- package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.Dbg3vfZ_.js} +606 -584
- package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.Dbg3vfZ_.js.map} +1 -1
- package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.Dt-cU3zy.js} +1559 -1471
- package/dist/chunks/filter-bar.Dt-cU3zy.js.map +1 -0
- package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
- package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
- package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.CYBdKDPo.js} +2 -2
- package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.CYBdKDPo.js.map} +1 -1
- package/dist/chunks/form-layout-title.B3ePK3yi.js +253 -0
- package/dist/chunks/form-layout-title.B3ePK3yi.js.map +1 -0
- package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.COak4D8-.js} +98 -84
- package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.COak4D8-.js.map} +1 -1
- package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.DqioajcO.js} +1091 -1070
- package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.DqioajcO.js.map} +1 -1
- package/dist/chunks/{header.o-7SyHtU.js → header.C21yzWrk.js} +3 -3
- package/dist/chunks/{header.o-7SyHtU.js.map → header.C21yzWrk.js.map} +1 -1
- package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
- package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
- package/dist/chunks/input-field-password.DyUphhxB.js +353 -0
- package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.DyUphhxB.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.BXVaC5ra.js} +12 -5
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.BXVaC5ra.js.map} +1 -1
- package/dist/chunks/input-field.DkUFvIWt.js +326 -0
- package/dist/chunks/input-field.DkUFvIWt.js.map +1 -0
- package/dist/chunks/input-time.WI_qdwJc.js +122 -0
- package/dist/chunks/input-time.WI_qdwJc.js.map +1 -0
- package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
- package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
- package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
- package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.c6QphYQo.js} +54 -47
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.c6QphYQo.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js} +48 -41
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js.map} +1 -1
- package/dist/chunks/on-click-outside.BgIzQ2G1.js +108 -0
- package/dist/chunks/on-click-outside.BgIzQ2G1.js.map +1 -0
- package/dist/chunks/{pagination.dpVc6Yt0.js → pagination.Cu85Lqms.js} +150 -138
- package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.Cu85Lqms.js.map} +1 -1
- package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
- package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
- package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.CfMr1fmW.js} +4 -4
- package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.CfMr1fmW.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Bf9EWzNk.js} +421 -413
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Bf9EWzNk.js.map} +1 -1
- package/dist/chunks/search-bar.p6kHCCvT.js +114 -0
- package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.p6kHCCvT.js.map} +1 -1
- package/dist/chunks/secondary-nav.CaxiyVaO.js +285 -0
- package/dist/chunks/secondary-nav.CaxiyVaO.js.map +1 -0
- package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
- package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
- package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.58XZj_SJ.js} +3 -3
- package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.58XZj_SJ.js.map} +1 -1
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.CAVhSs-O.js} +56 -49
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.CAVhSs-O.js.map} +1 -1
- package/dist/chunks/step.AsX2jAeL.js +268 -0
- package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
- package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
- package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.CDithi8M.js} +5 -5
- package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.CDithi8M.js.map} +1 -1
- package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
- package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
- package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
- package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
- package/dist/chunks/textarea.JGXAlpx9.js +257 -0
- package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.JGXAlpx9.js.map} +1 -1
- package/dist/chunks/timeline-item.BNFPpQz1.js +433 -0
- package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.BNFPpQz1.js.map} +1 -1
- package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
- package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
- package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
- package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js} +120 -113
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.Bx8uuky9.js} +436 -410
- package/dist/chunks/use-cached-selected-values.Bx8uuky9.js.map +1 -0
- package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
- package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BOuXpRb-.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BOuXpRb-.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable.js +1383 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +10 -11
- package/dist/dropdown.js.map +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +284 -279
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +26 -25
- package/dist/internal.js.map +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +7 -10
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
- package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
- package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
- package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
- package/dist/chunks/calendar.DcCqkSNJ.js.map +0 -1
- package/dist/chunks/card.CoxQ_L0w.js +0 -216
- package/dist/chunks/chip.CdgpQyXN.js +0 -65
- package/dist/chunks/copy.C2kQ1PbI.js +0 -107
- package/dist/chunks/country.types.DjpMGz7a.js +0 -19
- package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
- package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
- package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
- package/dist/chunks/date-picker.dlzZ_-5f.js.map +0 -1
- package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
- package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
- package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js +0 -408
- package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js.map +0 -1
- package/dist/chunks/dropdown.MhmX1P9o.js +0 -799
- package/dist/chunks/dropdown.MhmX1P9o.js.map +0 -1
- package/dist/chunks/error-message.DCgo8q20.js +0 -143
- package/dist/chunks/error-message.DCgo8q20.js.map +0 -1
- package/dist/chunks/filter-bar.CkAjLQol.js.map +0 -1
- package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
- package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
- package/dist/chunks/form-layout-title.DW5Kg1rh.js.map +0 -1
- package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
- package/dist/chunks/input-field.CfU0ZKtL.js +0 -315
- package/dist/chunks/input-field.CfU0ZKtL.js.map +0 -1
- package/dist/chunks/on-click-outside.ZUMLlxE_.js +0 -90
- package/dist/chunks/on-click-outside.ZUMLlxE_.js.map +0 -1
- package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
- package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
- package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
- package/dist/chunks/step.BlwoLfdw.js +0 -259
- package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
- package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
- package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
- package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.ClEJRFAd.js.map +0 -1
- package/dist/draggable-handle.js +0 -155
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as oe } from "./toast.
|
|
1
|
+
import { defineComponent as M, useSlots as x, inject as A, onMounted as R, openBlock as l, createBlock as c, unref as e, withCtx as n, renderSlot as h, createElementVNode as _, createTextVNode as O, toDisplayString as T, createCommentVNode as p, createElementBlock as w, createVNode as k, getCurrentInstance as X, toRefs as q, ref as r, computed as Q, onUnmounted as W, watch as Z, provide as g, withKeys as ee, withModifiers as te, normalizeClass as ae, createSlots as le } from "vue";
|
|
2
|
+
import { B as oe } from "./toast.De4MTkiH.js";
|
|
3
3
|
import { B as se } from "./focus-trap.BAiM_ywb.js";
|
|
4
4
|
import { B as ne } from "./button.DWF7FSIw.js";
|
|
5
5
|
import { B as D } from "./typography.B3J6_tYk.js";
|
|
6
6
|
import { u as G } from "./use-has-slot.CyMiImRQ.js";
|
|
7
7
|
import { u as ie } from "./index.B875RXHM.js";
|
|
8
|
-
import { i as K, j as $, B as re, k as ce } from "./button-actions.
|
|
8
|
+
import { i as K, j as $, B as re, k as ce } from "./button-actions.DLiM8KZL.js";
|
|
9
9
|
import { C as ue } from "./cross.CCHdi6v3.js";
|
|
10
|
-
import { b as de, B as fe, D as me, a as pe } from "./dialog-page.
|
|
10
|
+
import { b as de, B as fe, D as me, a as pe } from "./dialog-page.Bh-7RAwX.js";
|
|
11
11
|
import { _ as J } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as F } from "./generate-uid.DBWe4g6T.js";
|
|
13
13
|
import "../assets/modal-fullscreen.css";
|
|
14
14
|
const U = {
|
|
15
|
+
"de-DE": { close: "Schließen" },
|
|
16
|
+
"en-GB": { close: "Close" },
|
|
15
17
|
"en-US": { close: "Close" },
|
|
18
|
+
"es-ES": { close: "Cerrar" },
|
|
19
|
+
"es-MX": { close: "Cerrar" },
|
|
20
|
+
"fr-FR": { close: "Fermer" },
|
|
21
|
+
"it-IT": { close: "Chiudi" },
|
|
16
22
|
"ja-JP": { close: "閉じる" },
|
|
17
|
-
"pt-BR": { close: "Fechar" }
|
|
23
|
+
"pt-BR": { close: "Fechar" },
|
|
24
|
+
"zh-CN": { close: "关闭" }
|
|
18
25
|
}, ve = { class: "b-modal-fullscreen-page__header" }, _e = { class: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title" }, ge = {
|
|
19
26
|
key: 0,
|
|
20
27
|
class: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot"
|
|
21
|
-
},
|
|
28
|
+
}, he = { class: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions" }, be = { class: "b-modal-fullscreen-page__close-button" }, ye = {
|
|
22
29
|
i18n: { messages: U }
|
|
23
|
-
},
|
|
30
|
+
}, Ee = /* @__PURE__ */ M({
|
|
24
31
|
...ye,
|
|
25
32
|
__name: "modal-fullscreen-page",
|
|
26
33
|
props: {
|
|
@@ -77,11 +84,11 @@ const U = {
|
|
|
77
84
|
}
|
|
78
85
|
},
|
|
79
86
|
emits: ["close"],
|
|
80
|
-
setup(t, { emit:
|
|
81
|
-
const { t:
|
|
87
|
+
setup(t, { emit: L }) {
|
|
88
|
+
const { t: b } = ie({ messages: U }), o = t, y = L, E = x(), s = G(E), u = A(K, void 0), I = o.titleId ?? u, v = A($, void 0), d = () => {
|
|
82
89
|
y("close"), v?.();
|
|
83
90
|
};
|
|
84
|
-
return
|
|
91
|
+
return R(() => {
|
|
85
92
|
if (o.actions && o.actions.length > 2)
|
|
86
93
|
throw new Error("Not more than 2 action buttons may be provided in Bento Modal Fullscreen");
|
|
87
94
|
}), (f, C) => (l(), c(e(de), {
|
|
@@ -95,22 +102,22 @@ const U = {
|
|
|
95
102
|
_("div", _e, [
|
|
96
103
|
t.title ? (l(), c(e(D), {
|
|
97
104
|
key: 0,
|
|
98
|
-
id: e(
|
|
105
|
+
id: e(I),
|
|
99
106
|
el: "h2",
|
|
100
107
|
variant: "title",
|
|
101
108
|
class: "b-modal-fullscreen-page__title",
|
|
102
109
|
title: t.title
|
|
103
110
|
}, {
|
|
104
111
|
default: n(() => [
|
|
105
|
-
O(
|
|
112
|
+
O(T(t.title), 1)
|
|
106
113
|
]),
|
|
107
114
|
_: 1
|
|
108
115
|
}, 8, ["id", "title"])) : p("", !0)
|
|
109
116
|
]),
|
|
110
|
-
e(s)("header") ? (l(),
|
|
111
|
-
|
|
117
|
+
e(s)("header") ? (l(), w("div", ge, [
|
|
118
|
+
h(f.$slots, "header", {}, void 0, !0)
|
|
112
119
|
])) : p("", !0),
|
|
113
|
-
_("div",
|
|
120
|
+
_("div", he, [
|
|
114
121
|
t.contextualLabel ? (l(), c(e(D), {
|
|
115
122
|
key: 0,
|
|
116
123
|
class: "b-modal-fullscreen-page__contextual-label",
|
|
@@ -118,7 +125,7 @@ const U = {
|
|
|
118
125
|
title: t.contextualLabel
|
|
119
126
|
}, {
|
|
120
127
|
default: n(() => [
|
|
121
|
-
O(
|
|
128
|
+
O(T(t.contextualLabel), 1)
|
|
122
129
|
]),
|
|
123
130
|
_: 1
|
|
124
131
|
}, 8, ["title"])) : p("", !0),
|
|
@@ -128,14 +135,14 @@ const U = {
|
|
|
128
135
|
actions: t.actions
|
|
129
136
|
}, null, 8, ["actions"])) : p("", !0),
|
|
130
137
|
C[0] || (C[0] = _("div", { class: "b-modal-fullscreen-page__separator" }, null, -1)),
|
|
131
|
-
_("div",
|
|
132
|
-
|
|
138
|
+
_("div", be, [
|
|
139
|
+
k(e(ne), {
|
|
133
140
|
variant: "tertiary",
|
|
134
|
-
"aria-label": e(
|
|
141
|
+
"aria-label": e(b)("close"),
|
|
135
142
|
onClick: d
|
|
136
143
|
}, {
|
|
137
144
|
iconLeft: n(() => [
|
|
138
|
-
|
|
145
|
+
k(e(ue), { "aria-hidden": !0 })
|
|
139
146
|
]),
|
|
140
147
|
_: 1
|
|
141
148
|
}, 8, ["aria-label"])
|
|
@@ -144,17 +151,17 @@ const U = {
|
|
|
144
151
|
])
|
|
145
152
|
]),
|
|
146
153
|
content: n(() => [
|
|
147
|
-
|
|
154
|
+
h(f.$slots, "default", {}, void 0, !0)
|
|
148
155
|
]),
|
|
149
156
|
_: 3
|
|
150
157
|
}, 8, ["page-id", "previous-page"]));
|
|
151
158
|
}
|
|
152
|
-
}),
|
|
159
|
+
}), Ie = /* @__PURE__ */ J(Ee, [["__scopeId", "data-v-8579bda1"]]);
|
|
153
160
|
function Ce() {
|
|
154
|
-
return
|
|
161
|
+
return X()?.vnode.props ?? {};
|
|
155
162
|
}
|
|
156
|
-
const
|
|
157
|
-
...
|
|
163
|
+
const Be = ["id", "aria-labelledby", "onKeydown"], Le = {}, Ne = /* @__PURE__ */ M({
|
|
164
|
+
...Le,
|
|
158
165
|
__name: "modal-fullscreen",
|
|
159
166
|
props: {
|
|
160
167
|
/**
|
|
@@ -202,10 +209,10 @@ const Le = ["id", "aria-labelledby", "onKeydown"], Be = {}, Ne = /* @__PURE__ */
|
|
|
202
209
|
}
|
|
203
210
|
},
|
|
204
211
|
emits: ["before-close", "update:active-page", "update:is-open"],
|
|
205
|
-
setup(t, { emit:
|
|
206
|
-
const
|
|
212
|
+
setup(t, { emit: L }) {
|
|
213
|
+
const b = t, o = L, { activePage: y, isOpen: E } = q(b), s = r(null), u = r(!1), I = F("modal-fullscreen"), v = F("modal-fullscreen-title"), d = r(!1), f = r(!1), C = Ce(), Y = x(), S = G(Y), j = Q(() => ({
|
|
207
214
|
"b-modal-fullscreen--hide": u.value
|
|
208
|
-
})),
|
|
215
|
+
})), z = () => {
|
|
209
216
|
u.value && s.value && (s.value.close(), m.value[0] && o("update:active-page", m.value[0]), m.value = [], u.value = !1, d.value = !1, o("update:is-open", !1));
|
|
210
217
|
};
|
|
211
218
|
function N() {
|
|
@@ -218,37 +225,37 @@ const Le = ["id", "aria-labelledby", "onKeydown"], Be = {}, Ne = /* @__PURE__ */
|
|
|
218
225
|
const P = () => {
|
|
219
226
|
!s.value || !s.value.open || (u.value = !0);
|
|
220
227
|
};
|
|
221
|
-
|
|
228
|
+
R(() => {
|
|
222
229
|
f.value = !0;
|
|
223
|
-
}),
|
|
230
|
+
}), W(() => {
|
|
224
231
|
f.value = !1;
|
|
225
232
|
}), Z(
|
|
226
|
-
[() =>
|
|
233
|
+
[() => E.value, s],
|
|
227
234
|
([a, i]) => {
|
|
228
235
|
!f.value || !i || (a ? (d.value = !0, i.open || i.showModal(), m.value.length || m.value.push(y.value)) : i.open && P());
|
|
229
236
|
},
|
|
230
237
|
{ immediate: !0, flush: "post" }
|
|
231
|
-
), g(ce,
|
|
232
|
-
const
|
|
238
|
+
), g(ce, I), g(K, v), g($, N);
|
|
239
|
+
const V = r(fe.TRANSITION_LEVEL_DEEPER), B = r([]), m = r([]);
|
|
233
240
|
g(me, {
|
|
234
241
|
activePage: y,
|
|
235
|
-
animation:
|
|
242
|
+
animation: V,
|
|
236
243
|
isOpen: d,
|
|
237
|
-
pages:
|
|
244
|
+
pages: B,
|
|
238
245
|
previousPages: m,
|
|
239
246
|
updatePage: (a) => o("update:active-page", a)
|
|
240
247
|
});
|
|
241
248
|
const H = (a) => () => {
|
|
242
|
-
|
|
249
|
+
B.value = B.value?.filter((i) => i !== a);
|
|
243
250
|
};
|
|
244
|
-
return g(pe, (a) => (a &&
|
|
245
|
-
id: e(
|
|
251
|
+
return g(pe, (a) => (a && B.value.push(a), { unregisterPage: H(a) })), (a, i) => (l(), w("dialog", {
|
|
252
|
+
id: e(I),
|
|
246
253
|
ref_key: "modal",
|
|
247
254
|
ref: s,
|
|
248
255
|
class: ae(["b-modal-fullscreen", j.value]),
|
|
249
256
|
"data-dialog-element": "modal-fullscreen",
|
|
250
257
|
"aria-labelledby": e(v),
|
|
251
|
-
onAnimationend:
|
|
258
|
+
onAnimationend: z,
|
|
252
259
|
onKeydown: ee(te(N, ["prevent"]), ["esc"])
|
|
253
260
|
}, [
|
|
254
261
|
d.value ? (l(), c(e(se), {
|
|
@@ -256,7 +263,7 @@ const Le = ["id", "aria-labelledby", "onKeydown"], Be = {}, Ne = /* @__PURE__ */
|
|
|
256
263
|
class: "b-modal-fullscreen__wrapper"
|
|
257
264
|
}, {
|
|
258
265
|
default: n(() => [
|
|
259
|
-
|
|
266
|
+
b.activePage ? h(a.$slots, "default", { key: 0 }, void 0, !0) : (l(), c(Ie, {
|
|
260
267
|
key: 1,
|
|
261
268
|
actions: t.actions,
|
|
262
269
|
"contextual-label": t.contextualLabel,
|
|
@@ -267,14 +274,14 @@ const Le = ["id", "aria-labelledby", "onKeydown"], Be = {}, Ne = /* @__PURE__ */
|
|
|
267
274
|
e(S)("default") ? {
|
|
268
275
|
name: "default",
|
|
269
276
|
fn: n(() => [
|
|
270
|
-
|
|
277
|
+
h(a.$slots, "default", {}, void 0, !0)
|
|
271
278
|
]),
|
|
272
279
|
key: "0"
|
|
273
280
|
} : void 0,
|
|
274
281
|
e(S)("header") ? {
|
|
275
282
|
name: "header",
|
|
276
283
|
fn: n(() => [
|
|
277
|
-
|
|
284
|
+
h(a.$slots, "header", {}, void 0, !0)
|
|
278
285
|
]),
|
|
279
286
|
key: "1"
|
|
280
287
|
} : void 0
|
|
@@ -282,12 +289,12 @@ const Le = ["id", "aria-labelledby", "onKeydown"], Be = {}, Ne = /* @__PURE__ */
|
|
|
282
289
|
]),
|
|
283
290
|
_: 3
|
|
284
291
|
})) : p("", !0),
|
|
285
|
-
e(
|
|
286
|
-
], 42,
|
|
292
|
+
e(E) ? (l(), c(e(oe), { key: 1 })) : p("", !0)
|
|
293
|
+
], 42, Be));
|
|
287
294
|
}
|
|
288
295
|
}), $e = /* @__PURE__ */ J(Ne, [["__scopeId", "data-v-b4565341"]]);
|
|
289
296
|
export {
|
|
290
|
-
|
|
297
|
+
Ie as B,
|
|
291
298
|
$e as m
|
|
292
299
|
};
|
|
293
|
-
//# sourceMappingURL=modal-fullscreen.
|
|
300
|
+
//# sourceMappingURL=modal-fullscreen.c6QphYQo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-fullscreen.CuKVyTWb.js","sources":["../../../vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/index.ts","../../../vue2/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 :id=\"computedTitleId\"\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\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\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 * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits<{\n /**\n * Emits event when close button is clicked\n */\n (e: 'close');\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\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 i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance } from 'vue';\n\n/**\n * A composable that provides access to the component's listeners.\n * The listeners are prefixed with \"on\" in camelCase and the colons are removed (e.g. \"onClick\", \"onUpdateValue\").\n * @returns The component's listeners.\n */\nexport function useListeners() {\n return getCurrentInstance()?.vnode.props ?? {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\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\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\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 </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\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 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<{\n /**\n * Handles closing the modal. The behavior changes depending on whether a `before-close` event listener is present.\n *\n * - **When listening for the `before-close` event:**\n * The `before-close` event is emitted immediately, skipping the animation. This allows for logic to run before the modal closes.\n * The `isOpen` prop must then be set to `false` to trigger the closing animation.\n *\n * - **When not listening for the `before-close` event:**\n * The closing animation plays, then `update:is-open` is emitted with `false`.\n * This is the default behavior, compatible with `v-model` or `.sync` on the `isOpen` prop.\n */\n (e: 'before-close'): void;\n /**\n * Emits update event when page is changed internally\n */\n (e: 'update:active-page', page: string): void;\n /**\n * Emits 'update:is-open' event when the modal is closed\n */\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = 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 && modal.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 || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\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</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","t","useI18n","props","__props","emit","__emit","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","onMounted","useListeners","getCurrentInstance","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","DIALOG_PAGE_CONFIG_INJECTION_KEY","page","unregisterPage","pageIdToRemove","pageId","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;wKA4LIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAF,EAAA,CAAA,GACAG,IAAAC,GA0DAC,IAAAC,GAOAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAAC,GAAA,MAAA,GACAC,IAAAX,EAAA,WAAAQ,GAEAI,I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;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal-fullscreen.c6QphYQo.js","sources":["../../../vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/index.ts","../../../vue2/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 :id=\"computedTitleId\"\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\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\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 * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits<{\n /**\n * Emits event when close button is clicked\n */\n (e: 'close');\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\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 i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance } from 'vue';\n\n/**\n * A composable that provides access to the component's listeners.\n * The listeners are prefixed with \"on\" in camelCase and the colons are removed (e.g. \"onClick\", \"onUpdateValue\").\n * @returns The component's listeners.\n */\nexport function useListeners() {\n return getCurrentInstance()?.vnode.props ?? {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\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\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\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 </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\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 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<{\n /**\n * Handles closing the modal. The behavior changes depending on whether a `before-close` event listener is present.\n *\n * - **When listening for the `before-close` event:**\n * The `before-close` event is emitted immediately, skipping the animation. This allows for logic to run before the modal closes.\n * The `isOpen` prop must then be set to `false` to trigger the closing animation.\n *\n * - **When not listening for the `before-close` event:**\n * The closing animation plays, then `update:is-open` is emitted with `false`.\n * This is the default behavior, compatible with `v-model` or `.sync` on the `isOpen` prop.\n */\n (e: 'before-close'): void;\n /**\n * Emits update event when page is changed internally\n */\n (e: 'update:active-page', page: string): void;\n /**\n * Emits 'update:is-open' event when the modal is closed\n */\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = 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 && modal.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 || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\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</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","t","useI18n","props","__props","emit","__emit","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","onMounted","useListeners","getCurrentInstance","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","DIALOG_PAGE_CONFIG_INJECTION_KEY","page","unregisterPage","pageIdToRemove","pageId","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;wKA4LIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAF,EAAA,CAAA,GACAG,IAAAC,GA0DAC,IAAAC,GAOAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAA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AF,EAAAE,CAAA,EAAA,EAGJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as p, useSlots as
|
|
2
|
-
import { B as
|
|
1
|
+
import { defineComponent as p, useSlots as M, onMounted as P, openBlock as v, createBlock as g, mergeProps as D, createSlots as N, unref as o, withCtx as l, renderSlot as i, createVNode as K, toRefs as I, ref as j, computed as B, createTextVNode as q, toDisplayString as U, useAttrs as F, watch as V, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import { B as E, h as z, a as f, d as Y, e as k, g as C, f as W } from "./base-modal.BxcS7Pao.js";
|
|
3
3
|
import { u as w } from "./use-has-slot.CyMiImRQ.js";
|
|
4
|
-
import { F as H } from "./footer-actions.
|
|
5
|
-
import { b as
|
|
4
|
+
import { F as H } from "./footer-actions.CYBdKDPo.js";
|
|
5
|
+
import { b as L } from "./button.DWF7FSIw.js";
|
|
6
6
|
import { u as J } from "./index.B875RXHM.js";
|
|
7
|
-
import { B as
|
|
8
|
-
import { d as
|
|
9
|
-
const
|
|
7
|
+
import { B as T } from "./button-actions.DLiM8KZL.js";
|
|
8
|
+
import { d as X } from "./typography.B3J6_tYk.js";
|
|
9
|
+
const Q = p({
|
|
10
10
|
name: "bento-modal-default"
|
|
11
11
|
}), Z = /* @__PURE__ */ p({
|
|
12
|
-
...
|
|
12
|
+
...Q,
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
15
15
|
* List of actions that will be used to render the buttons.
|
|
@@ -64,7 +64,7 @@ const X = p({
|
|
|
64
64
|
*/
|
|
65
65
|
columnsSize: {
|
|
66
66
|
type: String,
|
|
67
|
-
default:
|
|
67
|
+
default: E.SMALLER
|
|
68
68
|
},
|
|
69
69
|
/**
|
|
70
70
|
* If passed - sets first button color to red
|
|
@@ -100,13 +100,13 @@ const X = p({
|
|
|
100
100
|
},
|
|
101
101
|
emits: ["update:active-page", "close-modal"],
|
|
102
102
|
setup(e, { emit: y }) {
|
|
103
|
-
const b =
|
|
103
|
+
const b = M(), n = w(b), s = y, c = e, u = () => {
|
|
104
104
|
s("close-modal");
|
|
105
105
|
};
|
|
106
|
-
return
|
|
106
|
+
return P(() => {
|
|
107
107
|
if (!(n("content") || n("content-col-1") && n("content-col-2")) && !c.activePage)
|
|
108
108
|
throw new Error("Bento Modal default variant requires content slot or column slots");
|
|
109
|
-
}), (t, a) => (v(), g(
|
|
109
|
+
}), (t, a) => (v(), g(z, D({ class: "b-modal-default" }, t.$attrs, {
|
|
110
110
|
actions: e.actions,
|
|
111
111
|
"active-page": e.activePage,
|
|
112
112
|
size: e.size,
|
|
@@ -152,7 +152,7 @@ const X = p({
|
|
|
152
152
|
name: "actions",
|
|
153
153
|
fn: l(() => [
|
|
154
154
|
i(t.$slots, "actions", {}, () => [
|
|
155
|
-
|
|
155
|
+
K(o(H), {
|
|
156
156
|
actions: e.actions,
|
|
157
157
|
"actions-label": e.actionsLabel,
|
|
158
158
|
"destructive-actions": e.destructiveActions
|
|
@@ -163,12 +163,19 @@ const X = p({
|
|
|
163
163
|
} : void 0
|
|
164
164
|
]), 1040, ["actions", "active-page", "size", "hide-close-button", "columns-size", "custom-padding", "is-dismissible", "is-open", "with-column-layout", "initially-open"]));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), $ = {
|
|
167
|
+
"de-DE": { ok: "OK" },
|
|
168
|
+
"en-GB": { ok: "OK" },
|
|
167
169
|
"en-US": { ok: "OK" },
|
|
170
|
+
"es-ES": { ok: "OK" },
|
|
171
|
+
"es-MX": { ok: "OK" },
|
|
172
|
+
"fr-FR": { ok: "OK" },
|
|
173
|
+
"it-IT": { ok: "OK" },
|
|
168
174
|
"ja-JP": { ok: "OK" },
|
|
169
|
-
"pt-BR": { ok: "OK" }
|
|
175
|
+
"pt-BR": { ok: "OK" },
|
|
176
|
+
"zh-CN": { ok: "确定" }
|
|
170
177
|
}, x = p({
|
|
171
|
-
i18n: { messages:
|
|
178
|
+
i18n: { messages: $ },
|
|
172
179
|
name: "bento-modal-dialog"
|
|
173
180
|
}), _ = /* @__PURE__ */ p({
|
|
174
181
|
...x,
|
|
@@ -232,26 +239,26 @@ const X = p({
|
|
|
232
239
|
},
|
|
233
240
|
emits: ["close-modal"],
|
|
234
241
|
setup(e, { emit: y }) {
|
|
235
|
-
const b = y, n = e, { t: s } = J({ messages:
|
|
242
|
+
const b = y, n = e, { t: s } = J({ messages: $ }), c = M(), u = w(c), { actions: t, dialogType: a } = I(n), r = j(null), S = () => {
|
|
236
243
|
b("close-modal");
|
|
237
244
|
}, d = (m) => {
|
|
238
245
|
r.value.internalModalActionClose(m);
|
|
239
|
-
},
|
|
246
|
+
}, O = B(() => [
|
|
240
247
|
{
|
|
241
248
|
title: s("ok"),
|
|
242
249
|
event: d,
|
|
243
|
-
variant:
|
|
250
|
+
variant: L.SECONDARY
|
|
244
251
|
}
|
|
245
|
-
]),
|
|
252
|
+
]), A = B(() => {
|
|
246
253
|
const m = {
|
|
247
254
|
title: "Cancel",
|
|
248
255
|
event: d
|
|
249
|
-
},
|
|
250
|
-
return a.value === f.DESTRUCTIVE ?
|
|
256
|
+
}, h = t?.value?.[0];
|
|
257
|
+
return a.value === f.DESTRUCTIVE ? h.critical = !0 : a.value === f.INFO && (h.variant = L.SECONDARY), [h, m];
|
|
251
258
|
}), R = B(() => ({
|
|
252
259
|
[`b-modal-dialog--${a.value}`]: a.value
|
|
253
260
|
}));
|
|
254
|
-
return
|
|
261
|
+
return P(() => {
|
|
255
262
|
if (n.activePage)
|
|
256
263
|
throw new Error(
|
|
257
264
|
"Bento Modal Dialog cannot contain multiple pages. Use Bento Modal default variant instead."
|
|
@@ -264,7 +271,7 @@ const X = p({
|
|
|
264
271
|
throw new Error("Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button");
|
|
265
272
|
if (a.value === f.ACKNOWLEDGEMENT && t?.value?.length)
|
|
266
273
|
throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
|
|
267
|
-
}), (m,
|
|
274
|
+
}), (m, h) => (v(), g(z, D({
|
|
268
275
|
ref_key: "modalRef",
|
|
269
276
|
ref: r,
|
|
270
277
|
class: ["b-modal-dialog", R.value],
|
|
@@ -281,16 +288,16 @@ const X = p({
|
|
|
281
288
|
i(m.$slots, "default")
|
|
282
289
|
]),
|
|
283
290
|
content: l(() => [
|
|
284
|
-
U(
|
|
291
|
+
q(U(e.content), 1)
|
|
285
292
|
]),
|
|
286
293
|
actions: l(() => [
|
|
287
|
-
o(a) === "acknowledgement" ? (v(), g(o(
|
|
294
|
+
o(a) === "acknowledgement" ? (v(), g(o(T), {
|
|
288
295
|
key: 0,
|
|
289
|
-
actions:
|
|
296
|
+
actions: O.value,
|
|
290
297
|
layout: "buttons-end"
|
|
291
|
-
}, null, 8, ["actions"])) : (v(), g(o(
|
|
298
|
+
}, null, 8, ["actions"])) : (v(), g(o(T), {
|
|
292
299
|
key: 1,
|
|
293
|
-
actions:
|
|
300
|
+
actions: A.value,
|
|
294
301
|
layout: "buttons-end"
|
|
295
302
|
}, null, 8, ["actions"]))
|
|
296
303
|
]),
|
|
@@ -353,8 +360,8 @@ const X = p({
|
|
|
353
360
|
*/
|
|
354
361
|
columnsSize: {
|
|
355
362
|
type: String,
|
|
356
|
-
default:
|
|
357
|
-
validator: (e) => Object.values(
|
|
363
|
+
default: E.SMALLER,
|
|
364
|
+
validator: (e) => Object.values(E).includes(e)
|
|
358
365
|
},
|
|
359
366
|
/**
|
|
360
367
|
* If provided, manages the padding of the whole modal container
|
|
@@ -396,8 +403,8 @@ const X = p({
|
|
|
396
403
|
*/
|
|
397
404
|
size: {
|
|
398
405
|
type: String,
|
|
399
|
-
default:
|
|
400
|
-
validator: (e) => Object.values(
|
|
406
|
+
default: k.SMALL,
|
|
407
|
+
validator: (e) => Object.values(k).includes(e)
|
|
401
408
|
},
|
|
402
409
|
/**
|
|
403
410
|
* Choose between default or dialog versions of modal
|
|
@@ -405,7 +412,7 @@ const X = p({
|
|
|
405
412
|
variant: {
|
|
406
413
|
type: String,
|
|
407
414
|
default: "default",
|
|
408
|
-
validator: (e) => Object.values(W).includes(e) || Object.values(
|
|
415
|
+
validator: (e) => Object.values(W).includes(e) || Object.values(C).includes(e)
|
|
409
416
|
},
|
|
410
417
|
/**
|
|
411
418
|
* If provided, renders the modal's content in a two-column layout an wth dividers separating its content
|
|
@@ -414,8 +421,8 @@ const X = p({
|
|
|
414
421
|
},
|
|
415
422
|
emits: ["update:active-page", "close-modal"],
|
|
416
423
|
setup(e, { emit: y }) {
|
|
417
|
-
const n =
|
|
418
|
-
() => a.value ===
|
|
424
|
+
const n = M(), s = w(n), c = F(), u = y, t = e, a = B(() => Object.values(C).includes(t.variant) ? t.variant : C[t.variant.toUpperCase()]), r = B(
|
|
425
|
+
() => a.value === C.DEFAULT ? {
|
|
419
426
|
activePage: t.activePage,
|
|
420
427
|
hideCloseButton: t.hideCloseButton,
|
|
421
428
|
size: t.size,
|
|
@@ -436,24 +443,24 @@ const X = p({
|
|
|
436
443
|
), S = () => {
|
|
437
444
|
u("close-modal");
|
|
438
445
|
};
|
|
439
|
-
return
|
|
446
|
+
return V(
|
|
440
447
|
() => t.actions,
|
|
441
448
|
() => {
|
|
442
449
|
t.actions?.[0]?.state === "success" && setTimeout(S, 500);
|
|
443
450
|
}
|
|
444
|
-
), Object.keys(c).includes("overflow-visible") &&
|
|
451
|
+
), Object.keys(c).includes("overflow-visible") && X(
|
|
445
452
|
'BentoModal "overflow-visible" property',
|
|
446
453
|
`"overflow-visible" property was made redundant. BentoModal can work correctly without the need to pass the propery.
|
|
447
454
|
Remove the "overflow-visible" prop from BentoModal to remove this error.`,
|
|
448
455
|
"2.0.0"
|
|
449
|
-
), (d,
|
|
456
|
+
), (d, O) => (v(), g(G(a.value), D({
|
|
450
457
|
class: "b-modal",
|
|
451
458
|
"is-open": e.isOpen,
|
|
452
459
|
actions: e.actions,
|
|
453
460
|
"initially-open": e.initiallyOpen
|
|
454
461
|
}, r.value, {
|
|
455
462
|
onCloseModal: S,
|
|
456
|
-
"onUpdate:activePage":
|
|
463
|
+
"onUpdate:activePage": O[0] || (O[0] = (A) => u("update:active-page", A))
|
|
457
464
|
}), N({ _: 2 }, [
|
|
458
465
|
o(s)("default") ? {
|
|
459
466
|
name: "default",
|
|
@@ -489,4 +496,4 @@ const X = p({
|
|
|
489
496
|
export {
|
|
490
497
|
ue as _
|
|
491
498
|
};
|
|
492
|
-
//# sourceMappingURL=modal.vue_vue_type_script_setup_true_lang.
|
|
499
|
+
//# sourceMappingURL=modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js.map
|