@adyen/bento-vue2 1.32.1 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +21 -18
- 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/alert.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.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/checkbox-input.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/dashed-underline.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.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/search-bar.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/status.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/toast.css +1 -1
- package/dist/assets/toggle-button.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +4 -4
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{accordion-item.CNYpvxwN.js → accordion-item.IMlV_Vik.js} +3 -3
- package/dist/chunks/{accordion-item.CNYpvxwN.js.map → accordion-item.IMlV_Vik.js.map} +1 -1
- package/dist/chunks/{action-bar.Ds_ofJs6.js → action-bar.CxsPPZZ_.js} +17 -17
- package/dist/chunks/action-bar.CxsPPZZ_.js.map +1 -0
- package/dist/chunks/{alert.Ba2hSVeM.js → alert.DtT7BRdr.js} +4 -4
- package/dist/chunks/{alert.Ba2hSVeM.js.map → alert.DtT7BRdr.js.map} +1 -1
- package/dist/chunks/{avatar.DohItrb9.js → avatar.0ffdL8i0.js} +8 -8
- package/dist/chunks/avatar.0ffdL8i0.js.map +1 -0
- package/dist/chunks/{base-button.-qw8sZSY.js → base-button.qWj0m9-v.js} +2 -2
- package/dist/chunks/{base-button.-qw8sZSY.js.map → base-button.qWj0m9-v.js.map} +1 -1
- package/dist/chunks/{base-modal.B17Ib1QQ.js → base-modal.8sjjRWsL.js} +35 -35
- package/dist/chunks/base-modal.8sjjRWsL.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.K8p3AG8r.js → button-actions-with-menu.DKjOf4Ox.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.K8p3AG8r.js.map → button-actions-with-menu.DKjOf4Ox.js.map} +1 -1
- package/dist/chunks/{button-actions.IJs0hN8c.js → button-actions.BQHr68sA.js} +3 -3
- package/dist/chunks/{button-actions.IJs0hN8c.js.map → button-actions.BQHr68sA.js.map} +1 -1
- package/dist/chunks/{button.qOf7CXY2.js → button.79klAcOK.js} +13 -13
- package/dist/chunks/button.79klAcOK.js.map +1 -0
- package/dist/chunks/{calendar.etLGotqH.js → calendar.CaTMWZUM.js} +124 -124
- package/dist/chunks/calendar.CaTMWZUM.js.map +1 -0
- package/dist/chunks/{card.-BYuiE_X.js → card.ignL7-CH.js} +4 -4
- package/dist/chunks/card.ignL7-CH.js.map +1 -0
- package/dist/chunks/{checkbox-group.Bj9gURHB.js → checkbox-group.2mm5bv7a.js} +5 -5
- package/dist/chunks/{checkbox-group.Bj9gURHB.js.map → checkbox-group.2mm5bv7a.js.map} +1 -1
- package/dist/chunks/{checkbox-input.DwDwI2BD.js → checkbox-input.BH7MGdMj.js} +9 -6
- package/dist/chunks/checkbox-input.BH7MGdMj.js.map +1 -0
- package/dist/chunks/{checkbox.CKQZXIR3.js → checkbox.BKzfGbb1.js} +5 -5
- package/dist/chunks/{checkbox.CKQZXIR3.js.map → checkbox.BKzfGbb1.js.map} +1 -1
- package/dist/chunks/{code-snippet.Bg39szoO.js → code-snippet.Bh-9Sz0W.js} +7 -7
- package/dist/chunks/{code-snippet.Bg39szoO.js.map → code-snippet.Bh-9Sz0W.js.map} +1 -1
- package/dist/chunks/{controls-group.WoEXCpkM.js → controls-group.kIQ5t39B.js} +4 -4
- package/dist/chunks/{controls-group.WoEXCpkM.js.map → controls-group.kIQ5t39B.js.map} +1 -1
- package/dist/chunks/{copy.CIuoE2VU.js → copy.B1DYKX_q.js} +4 -4
- package/dist/chunks/{copy.CIuoE2VU.js.map → copy.B1DYKX_q.js.map} +1 -1
- package/dist/chunks/{country.DeYdzMXh.js → country.DWQ85WGG.js} +2 -2
- package/dist/chunks/{country.DeYdzMXh.js.map → country.DWQ85WGG.js.map} +1 -1
- package/dist/chunks/{currency.Cfq_Yw2V.js → currency.D_2CN1OJ.js} +2 -2
- package/dist/chunks/{currency.Cfq_Yw2V.js.map → currency.D_2CN1OJ.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CKy3tW-3.js → dashboard-section.CS63czQW.js} +5 -5
- package/dist/chunks/dashboard-section.CS63czQW.js.map +1 -0
- package/dist/chunks/{dashed-underline.OyLCDT1U.js → dashed-underline.XuUFwxOe.js} +11 -11
- package/dist/chunks/dashed-underline.XuUFwxOe.js.map +1 -0
- package/dist/chunks/{data-grid-template.CxaInpI8.js → data-grid-template.DEDwDJCy.js} +9 -9
- package/dist/chunks/data-grid-template.DEDwDJCy.js.map +1 -0
- package/dist/chunks/{data-grid.Bq6Dy5tI.js → data-grid.caE5wVpr.js} +717 -716
- package/dist/chunks/data-grid.caE5wVpr.js.map +1 -0
- package/dist/chunks/{date-picker.DInJznhU.js → date-picker.D9hFJD_h.js} +17 -17
- package/dist/chunks/{date-picker.DInJznhU.js.map → date-picker.D9hFJD_h.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D8-Ns1O7.js → date-range-picker.BlTFEbr-.js} +333 -314
- package/dist/chunks/date-range-picker.BlTFEbr-.js.map +1 -0
- package/dist/chunks/{date.DQaxR7TF.js → date.DaiTzNEZ.js} +2 -2
- package/dist/chunks/{date.DQaxR7TF.js.map → date.DaiTzNEZ.js.map} +1 -1
- package/dist/chunks/{dialog-page.Cc-XASGB.js → dialog-page.bmDDYmn9.js} +3 -3
- package/dist/chunks/dialog-page.bmDDYmn9.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.BM9qsdzQ.js → dropdown-default-textbox.kQ3pHsZe.js} +5 -4
- package/dist/chunks/dropdown-default-textbox.kQ3pHsZe.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Ce5HgBMv.js → dropdown-tag.BBEI_7RS.js} +19 -19
- package/dist/chunks/dropdown-tag.BBEI_7RS.js.map +1 -0
- package/dist/chunks/{dropdown.CR6vDGwi.js → dropdown.D6tsk4ko.js} +23 -22
- package/dist/chunks/dropdown.D6tsk4ko.js.map +1 -0
- package/dist/chunks/{empty-state.CWy3y5Ly.js → empty-state.C2ba_wDp.js} +3 -3
- package/dist/chunks/{empty-state.CWy3y5Ly.js.map → empty-state.C2ba_wDp.js.map} +1 -1
- package/dist/chunks/{error-message.epR1WJH2.js → error-message.BEtdKrpc.js} +3 -3
- package/dist/chunks/{error-message.epR1WJH2.js.map → error-message.BEtdKrpc.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.jtfYLtU9.js → filter-bar.Tl9rgAKU.js} +793 -823
- package/dist/chunks/filter-bar.Tl9rgAKU.js.map +1 -0
- package/dist/chunks/{fixed-scroller.wvGW5A2g.js → fixed-scroller.CQWDnydO.js} +2 -2
- package/dist/chunks/fixed-scroller.CQWDnydO.js.map +1 -0
- package/dist/chunks/{footer-actions.B6Q5ybfw.js → footer-actions.CwHY2-Ap.js} +4 -4
- package/dist/chunks/{footer-actions.B6Q5ybfw.js.map → footer-actions.CwHY2-Ap.js.map} +1 -1
- package/dist/chunks/{form-layout-title.ChRqPBDL.js → form-layout-title.CRsR3o2x.js} +3 -3
- package/dist/chunks/{form-layout-title.ChRqPBDL.js.map → form-layout-title.CRsR3o2x.js.map} +1 -1
- package/dist/chunks/{header.jOE8ctvn.js → header.CkUxb-Pw.js} +5 -5
- package/dist/chunks/{header.jOE8ctvn.js.map → header.CkUxb-Pw.js.map} +1 -1
- package/dist/chunks/{info-icon.DQI7sjBY.js → info-icon.DNn4oZsB.js} +3 -3
- package/dist/chunks/{info-icon.DQI7sjBY.js.map → info-icon.DNn4oZsB.js.map} +1 -1
- package/dist/chunks/{input-field.Czp_0nIh.js → input-field.7PrsNCUx.js} +5 -5
- package/dist/chunks/{input-field.Czp_0nIh.js.map → input-field.7PrsNCUx.js.map} +1 -1
- package/dist/chunks/{inspector.types.l7r-FN49.js → inspector.types.D6kCCKNk.js} +4 -4
- package/dist/chunks/inspector.types.D6kCCKNk.js.map +1 -0
- package/dist/chunks/{link.CjFBXE3D.js → link.Xce4kDGy.js} +3 -3
- package/dist/chunks/{link.CjFBXE3D.js.map → link.Xce4kDGy.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BXz3dHfF.js → listbox-option-tag.RVvWMKvz.js} +3 -3
- package/dist/chunks/{listbox-option-tag.BXz3dHfF.js.map → listbox-option-tag.RVvWMKvz.js.map} +1 -1
- package/dist/chunks/{loading-button.Ba8So0d6.js → loading-button.DDPZYO6r.js} +3 -3
- package/dist/chunks/{loading-button.Ba8So0d6.js.map → loading-button.DDPZYO6r.js.map} +1 -1
- package/dist/chunks/{menu.e-PrV4Wl.js → menu.CoT0jBpw.js} +5 -5
- package/dist/chunks/{menu.e-PrV4Wl.js.map → menu.CoT0jBpw.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.PFFfWzPD.js → modal-fullscreen.BQKE0bm0.js} +6 -6
- package/dist/chunks/{modal-fullscreen.PFFfWzPD.js.map → modal-fullscreen.BQKE0bm0.js.map} +1 -1
- package/dist/chunks/{modal.DPrBUWDe.js → modal.BnlC8y2b.js} +6 -6
- package/dist/chunks/modal.BnlC8y2b.js.map +1 -0
- package/dist/chunks/on-click-outside.MUWbmGDn.js.map +1 -1
- package/dist/chunks/{pagination.Bz02p3If.js → pagination.Cqm8aS25.js} +4 -4
- package/dist/chunks/{pagination.Bz02p3If.js.map → pagination.Cqm8aS25.js.map} +1 -1
- package/dist/chunks/{payment-method.BnLkBqVQ.js → payment-method.CyQwoqEe.js} +2 -2
- package/dist/chunks/{payment-method.BnLkBqVQ.js.map → payment-method.CyQwoqEe.js.map} +1 -1
- package/dist/chunks/{popover.Du6UI6Yh.js → popover.BAZk1sm7.js} +6 -6
- package/dist/chunks/{popover.Du6UI6Yh.js.map → popover.BAZk1sm7.js.map} +1 -1
- package/dist/chunks/{popper-container.By1AW5Od.js → popper-container.CnWphJTN.js} +2 -2
- package/dist/chunks/{popper-container.By1AW5Od.js.map → popper-container.CnWphJTN.js.map} +1 -1
- package/dist/chunks/{radio-group.D650KrHa.js → radio-group.Dt5aLsJR.js} +8 -8
- package/dist/chunks/radio-group.Dt5aLsJR.js.map +1 -0
- package/dist/chunks/{radio-input.UWFngqop.js → radio-input.q980f8Uf.js} +2 -2
- package/dist/chunks/{radio-input.UWFngqop.js.map → radio-input.q980f8Uf.js.map} +1 -1
- package/dist/chunks/{search-bar.CQw7r7Km.js → search-bar.56yYCp8_.js} +16 -16
- package/dist/chunks/search-bar.56yYCp8_.js.map +1 -0
- package/dist/chunks/{secondary-nav.BCccdpL6.js → secondary-nav.CCCscrYe.js} +6 -6
- package/dist/chunks/secondary-nav.CCCscrYe.js.map +1 -0
- package/dist/chunks/{segmented-control.BeXMVbce.js → segmented-control.BZm0u0wJ.js} +13 -13
- package/dist/chunks/segmented-control.BZm0u0wJ.js.map +1 -0
- package/dist/chunks/selection-card-group.BX5SJQJl.js +255 -0
- package/dist/chunks/selection-card-group.BX5SJQJl.js.map +1 -0
- package/dist/chunks/{sidepanel.DRP_jFVq.js → sidepanel.BRe8Xgnq.js} +7 -6
- package/dist/chunks/sidepanel.BRe8Xgnq.js.map +1 -0
- package/dist/chunks/{status.types.CcGZuqg5.js → status.types.dPBUkNia.js} +10 -10
- package/dist/chunks/status.types.dPBUkNia.js.map +1 -0
- package/dist/chunks/{step.RkChji1p.js → step.CjJtlBk6.js} +5 -5
- package/dist/chunks/step.CjJtlBk6.js.map +1 -0
- package/dist/chunks/{structured-list-item.BfEARGrz.js → structured-list-item.DpLscUX4.js} +14 -14
- package/dist/chunks/structured-list-item.DpLscUX4.js.map +1 -0
- package/dist/chunks/{summary-grid-item-custom.Cjv109f8.js → summary-grid-item-custom.B7Re6OCf.js} +5 -5
- package/dist/chunks/{summary-grid-item-custom.Cjv109f8.js.map → summary-grid-item-custom.B7Re6OCf.js.map} +1 -1
- package/dist/chunks/{tabs.BLCcrVbI.js → tabs.D4ORafqH.js} +3 -3
- package/dist/chunks/{tabs.BLCcrVbI.js.map → tabs.D4ORafqH.js.map} +1 -1
- package/dist/chunks/{tag.4Vqj8tm4.js → tag.Bo_6RnVE.js} +3 -3
- package/dist/chunks/{tag.4Vqj8tm4.js.map → tag.Bo_6RnVE.js.map} +1 -1
- package/dist/chunks/{textarea.DM2Cwx14.js → textarea.C6mA9dbj.js} +14 -13
- package/dist/chunks/textarea.C6mA9dbj.js.map +1 -0
- package/dist/chunks/{timeline-item.B2c3eI3L.js → timeline-item.D_ha1hxw.js} +9 -9
- package/dist/chunks/{timeline-item.B2c3eI3L.js.map → timeline-item.D_ha1hxw.js.map} +1 -1
- package/dist/chunks/{toast.rrKNWeM6.js → toast.KVxSBsXC.js} +5 -5
- package/dist/chunks/toast.KVxSBsXC.js.map +1 -0
- package/dist/chunks/{toggle-button.CBuKACw5.js → toggle-button.bt3zBzdC.js} +3 -3
- package/dist/chunks/toggle-button.bt3zBzdC.js.map +1 -0
- package/dist/chunks/{toggle.DtrStAja.js → toggle.CLgGH4Jr.js} +2 -2
- package/dist/chunks/{toggle.DtrStAja.js.map → toggle.CLgGH4Jr.js.map} +1 -1
- package/dist/chunks/{tooltip.4f_qwm8o.js → tooltip.BN6fOXzi.js} +3 -3
- package/dist/chunks/{tooltip.4f_qwm8o.js.map → tooltip.BN6fOXzi.js.map} +1 -1
- package/dist/chunks/{tutorial.DUjlu3SH.js → tutorial.DzhfqdFU.js} +7 -7
- package/dist/chunks/tutorial.DzhfqdFU.js.map +1 -0
- package/dist/chunks/{typography.CdCYtxYj.js → typography.CqQaHXhq.js} +2 -2
- package/dist/chunks/typography.CqQaHXhq.js.map +1 -0
- package/dist/chunks/{use-bento-toast-controller.C66wCsav.js → use-bento-toast-controller.DLKySNHd.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.C66wCsav.js.map → use-bento-toast-controller.DLKySNHd.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DWQ8SMSi.js → use-cached-selected-values.1vo5LvgW.js} +83 -82
- package/dist/chunks/use-cached-selected-values.1vo5LvgW.js.map +1 -0
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.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 +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +68 -66
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +8 -8
- package/dist/link.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/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +80 -165
- package/package.json +3 -2
- package/dist/chunks/action-bar.Ds_ofJs6.js.map +0 -1
- package/dist/chunks/avatar.DohItrb9.js.map +0 -1
- package/dist/chunks/base-modal.B17Ib1QQ.js.map +0 -1
- package/dist/chunks/button.qOf7CXY2.js.map +0 -1
- package/dist/chunks/calendar.etLGotqH.js.map +0 -1
- package/dist/chunks/card.-BYuiE_X.js.map +0 -1
- package/dist/chunks/checkbox-input.DwDwI2BD.js.map +0 -1
- package/dist/chunks/dashboard-section.CKy3tW-3.js.map +0 -1
- package/dist/chunks/dashed-underline.OyLCDT1U.js.map +0 -1
- package/dist/chunks/data-grid-template.CxaInpI8.js.map +0 -1
- package/dist/chunks/data-grid.Bq6Dy5tI.js.map +0 -1
- package/dist/chunks/date-range-picker.D8-Ns1O7.js.map +0 -1
- package/dist/chunks/dialog-page.Cc-XASGB.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.BM9qsdzQ.js.map +0 -1
- package/dist/chunks/dropdown-tag.Ce5HgBMv.js.map +0 -1
- package/dist/chunks/dropdown.CR6vDGwi.js.map +0 -1
- package/dist/chunks/filter-bar.jtfYLtU9.js.map +0 -1
- package/dist/chunks/fixed-scroller.wvGW5A2g.js.map +0 -1
- package/dist/chunks/inspector.types.l7r-FN49.js.map +0 -1
- package/dist/chunks/modal.DPrBUWDe.js.map +0 -1
- package/dist/chunks/radio-group.D650KrHa.js.map +0 -1
- package/dist/chunks/search-bar.CQw7r7Km.js.map +0 -1
- package/dist/chunks/secondary-nav.BCccdpL6.js.map +0 -1
- package/dist/chunks/segmented-control.BeXMVbce.js.map +0 -1
- package/dist/chunks/selection-card-group.D5DRYhrw.js +0 -247
- package/dist/chunks/selection-card-group.D5DRYhrw.js.map +0 -1
- package/dist/chunks/sidepanel.DRP_jFVq.js.map +0 -1
- package/dist/chunks/status.types.CcGZuqg5.js.map +0 -1
- package/dist/chunks/step.RkChji1p.js.map +0 -1
- package/dist/chunks/structured-list-item.BfEARGrz.js.map +0 -1
- package/dist/chunks/textarea.DM2Cwx14.js.map +0 -1
- package/dist/chunks/toast.rrKNWeM6.js.map +0 -1
- package/dist/chunks/toggle-button.CBuKACw5.js.map +0 -1
- package/dist/chunks/tutorial.DUjlu3SH.js.map +0 -1
- package/dist/chunks/typography.CdCYtxYj.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DWQ8SMSi.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.
|
|
1
|
+
{"version":3,"file":"accordion-item.IMlV_Vik.js","sources":["../../src/components/accordion/accordion.keys.ts","../../src/components/accordion/accordion.vue","../../src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"update:is-expanded\"]);\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,GCqDTC,IAAA,CAAA;;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,EAAAC,GAAA,WAAA,CAAA;;;;;;;;;;;;;;qBCoHAC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;iBA9FAC,IAAA,wCAsBAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAJ,EAAA,UAAA,GAGAM,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAAd,GAAA,SAAA,GAGA,EAAA,qBAAAe,GAAA,eAAAC,EAAA,IAAAC,EAAAV,GAAAE,CAAA,GAEAS,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAhB,EAAA;AAAA,MACgB,CAAAiB,MAAA;AAER,QAAAZ,EAAA,QAAAY;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAA,MAAAb,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAe,IAAA;AACA,QAAA,CAAAA,KAAAf,EAAA,UACIe,IAAAC,EAAAhB,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIQ,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJK;AAAA,MAAAX;AAAA,MACI,CAAAY,MAAA;AAGI,QAAAG,EAAA,sBAAAH,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as x, computed as c, ref as b, toRefs as O, watch as g, provide as V, nextTick as B } from "vue";
|
|
2
|
-
import { B as P } from "./button.
|
|
3
|
-
import { B as R } from "./typography.
|
|
4
|
-
import { B as F } from "./button-actions-with-menu.
|
|
2
|
+
import { B as P } from "./button.79klAcOK.js";
|
|
3
|
+
import { B as R } from "./typography.CqQaHXhq.js";
|
|
4
|
+
import { B as F } from "./button-actions-with-menu.DKjOf4Ox.js";
|
|
5
5
|
import { C as W } from "./cross.CsUPDmaA.js";
|
|
6
6
|
import { u as L } from "./i18n.BQkEbtPM.js";
|
|
7
7
|
import { u as k } from "./index.iCshT3Hx.js";
|
|
8
|
-
import { P as M } from "./popover.
|
|
9
|
-
import { B as U } from "./button-actions.
|
|
8
|
+
import { P as M } from "./popover.BAZk1sm7.js";
|
|
9
|
+
import { B as U } from "./button-actions.BQHr68sA.js";
|
|
10
10
|
import { n as z } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
11
11
|
import "../assets/action-bar.css";
|
|
12
12
|
const D = {
|
|
@@ -96,8 +96,8 @@ const D = {
|
|
|
96
96
|
const o = n.actions.map((w) => ({
|
|
97
97
|
...w,
|
|
98
98
|
variant: "secondary"
|
|
99
|
-
})),
|
|
100
|
-
return [...
|
|
99
|
+
})), f = o.slice(0, e.value).reverse(), d = o.slice(e.value);
|
|
100
|
+
return [...f, ...d];
|
|
101
101
|
}), N = c(() => [
|
|
102
102
|
{
|
|
103
103
|
title: r("save"),
|
|
@@ -108,21 +108,21 @@ const D = {
|
|
|
108
108
|
variant: "secondary",
|
|
109
109
|
event: () => a("cancel")
|
|
110
110
|
}
|
|
111
|
-
]),
|
|
112
|
-
await B(), i.value > l.value.clientWidth + v + t && e.value < u.value && (e.value += 1,
|
|
113
|
-
},
|
|
114
|
-
await B(), i.value < l.value.clientWidth + v && e.value > 0 && (e.value -= 1,
|
|
111
|
+
]), p = async () => {
|
|
112
|
+
await B(), i.value > l.value.clientWidth + v + t && e.value < u.value && (e.value += 1, p());
|
|
113
|
+
}, _ = async () => {
|
|
114
|
+
await B(), i.value < l.value.clientWidth + v && e.value > 0 && (e.value -= 1, _());
|
|
115
115
|
};
|
|
116
116
|
return g(
|
|
117
117
|
() => i.value,
|
|
118
|
-
async (o,
|
|
118
|
+
async (o, f) => {
|
|
119
119
|
if (await B(), !l.value)
|
|
120
120
|
return;
|
|
121
|
-
const d = o >
|
|
122
|
-
i.value < C ? e.value = 0 : d ?
|
|
121
|
+
const d = o > f;
|
|
122
|
+
i.value < C ? e.value = 0 : d ? p() : _();
|
|
123
123
|
},
|
|
124
124
|
{ immediate: !0 }
|
|
125
|
-
), { __sfc: !0, AVERAGE_BUTTON_SIZE: t, MENU_OFFSET: m, RESPONSIVE_BREAKPOINT: C, SPACING: v, props: n, emit: a, t: r, tc: S, label: E, actionBar: l, extraBottomSpacing: y, visibleActions: A, width: i, internalDisplayedActions: e, internalVisibleActions: u, isConfirmationVariant: h, conditionalClasses: I, actionsInternal: T, confirmationActions: N, showActions:
|
|
125
|
+
), { __sfc: !0, AVERAGE_BUTTON_SIZE: t, MENU_OFFSET: m, RESPONSIVE_BREAKPOINT: C, SPACING: v, props: n, emit: a, t: r, tc: S, label: E, actionBar: l, extraBottomSpacing: y, visibleActions: A, width: i, internalDisplayedActions: e, internalVisibleActions: u, isConfirmationVariant: h, conditionalClasses: I, actionsInternal: T, confirmationActions: N, showActions: p, hideActions: _, BentoButton: P, BentoButtonActions: U, BentoTypography: R, ButtonActionsWithMenu: F, CrossIcon: W };
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
var q = function() {
|
|
@@ -138,10 +138,10 @@ var q = function() {
|
|
|
138
138
|
J,
|
|
139
139
|
!1,
|
|
140
140
|
null,
|
|
141
|
-
"
|
|
141
|
+
"be92816e"
|
|
142
142
|
);
|
|
143
143
|
const ot = Y.exports;
|
|
144
144
|
export {
|
|
145
145
|
ot as B
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=action-bar.
|
|
147
|
+
//# sourceMappingURL=action-bar.CxsPPZZ_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-bar.CxsPPZZ_.js","sources":["../../src/components/action-bar/action-bar.vue"],"sourcesContent":["<template>\n <Transition name=\"b-action-bar__animation\" appear>\n <section class=\"b-action-bar\" :class=\"conditionalClasses\" :aria-label=\"t('actionBar')\">\n <div ref=\"actionBar\" class=\"b-action-bar__container\">\n <div v-if=\"!isConfirmationVariant\" class=\"b-action-bar__close-button\">\n <bento-button variant=\"tertiary\" inverse :aria-label=\"t('close')\" @click=\"emit('close')\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n <bento-typography el=\"span\" stronger class=\"b-action-bar__selection\">\n {{ itemCounter }} {{ isConfirmationVariant ? tc('unsavedChanges', itemCounter) : label }}\n </bento-typography>\n <bento-button-actions\n v-if=\"isConfirmationVariant\"\n :actions=\"confirmationActions\"\n class=\"b-action-bar__actions\"\n inverse\n />\n <button-actions-with-menu\n v-else\n :actions=\"actionsInternal\"\n class=\"b-action-bar__actions\"\n :displayed-actions=\"internalDisplayedActions\"\n menu-position=\"top-end\"\n inverse\n />\n </div>\n </section>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, PropType, provide, ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { type BentoActionBarVariant } from '@/components/action-bar/action-bar.types';\n import ButtonActionsWithMenu from '@/components/internal/button-actions-with-menu/button-actions-with-menu.vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { useWindowSize } from '@vueuse/core';\n\n import messages from './messages.json';\n import { POPOVER_OFFSET_INJECTION_KEY } from '@/components/popover/popover.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // Constants\n const AVERAGE_BUTTON_SIZE = 100;\n const MENU_OFFSET = 7;\n const RESPONSIVE_BREAKPOINT = 500;\n const SPACING = 32;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Required and used for the `default` variant.\n *\n * Each object in the list should have a `title`, an `event` and,\n * optionally, an `icon`.\n *\n * The component will display 4 actions and the hide the rest inside a menu.\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: () => [],\n },\n /**\n * How many actions should be visible outside the menu, cannot be more than 4\n */\n visibleActions: {\n type: Number,\n default: 4,\n validator: (value: number) => value > 0 && value <= 4,\n },\n /**\n * Use when there are sticky elements at the bottom, like sticky pagination\n */\n extraBottomSpacing: {\n type: Boolean,\n default: false,\n },\n /**\n * Show how many items are selected\n */\n itemCounter: {\n type: Number,\n required: true,\n },\n /**\n * Label for the selection, e.g. 'selected'/'changed'\n */\n selectionLabel: {\n type: String,\n default: null,\n },\n /**\n * Variant for the action bar\n * @values default, confirmation\n */\n variant: {\n type: String as PropType<BentoActionBarVariant>,\n default: 'default',\n },\n });\n\n const emit = defineEmits([\"close\", \"cancel\", \"save\"]);\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n const label = computed(() => (props.selectionLabel ? props.selectionLabel : t('selected')));\n\n // Refs\n const actionBar = ref<HTMLDivElement>(null);\n const { extraBottomSpacing, visibleActions } = toRefs(props);\n const { width } = useWindowSize();\n const internalDisplayedActions = ref(null);\n const internalVisibleActions = ref(null);\n\n const isConfirmationVariant = computed(() => props.variant === 'confirmation');\n\n watch(\n () => visibleActions.value,\n value => {\n internalVisibleActions.value = value <= 4 ? value : 4;\n internalDisplayedActions.value = internalVisibleActions.value;\n },\n { immediate: true }\n );\n\n // Styling\n const conditionalClasses = computed(() => ({\n 'b-action-bar--extra-spacing': extraBottomSpacing.value,\n 'b-action-bar--confirmation': isConfirmationVariant.value,\n }));\n\n // Provide POPOVER_OFFSET_INJECTION_KEY to change the value of the popover offset\n provide(POPOVER_OFFSET_INJECTION_KEY, MENU_OFFSET);\n\n // Manipulate actions array to display as intended\n const actionsInternal = computed(() => {\n // All buttons should be of type secondary in the action bar\n const actions = props.actions.map(action => ({\n ...action,\n variant: 'secondary',\n })) as BentoButtonActionsList;\n // Shown actions should display from left to right in action bar, instead of right to left which is the button actions default\n const shownActions = actions.slice(0, internalDisplayedActions.value).reverse();\n const hiddenActions = actions.slice(internalDisplayedActions.value);\n\n return [...shownActions, ...hiddenActions];\n });\n\n const confirmationActions = computed<BentoButtonActionsList>(() => [\n {\n title: t('save'),\n event: () => emit('save'),\n },\n {\n title: t('cancel'),\n variant: 'secondary',\n event: () => emit('cancel'),\n },\n ]);\n\n // Recursive functions to determine how many actions should be visible/hidden based on the screens width\n const showActions = async () => {\n await nextTick();\n if (\n width.value > actionBar.value.clientWidth + SPACING + AVERAGE_BUTTON_SIZE &&\n internalDisplayedActions.value < internalVisibleActions.value\n ) {\n internalDisplayedActions.value += 1;\n showActions();\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n if (width.value < actionBar.value.clientWidth + SPACING && internalDisplayedActions.value > 0) {\n internalDisplayedActions.value -= 1;\n hideActions();\n }\n };\n\n // Screen width watcher to toggle hidden/visible actions\n watch(\n () => width.value,\n async (newValue, oldValue) => {\n await nextTick();\n if (!actionBar.value) {\n return;\n }\n const isIncreasing = newValue > oldValue;\n if (width.value < RESPONSIVE_BREAKPOINT) {\n internalDisplayedActions.value = 0;\n } else if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Action bar is a floating bar that provides users with quick access to key actions that can be applied to one or multiple items.\n *\n * @example\n * import { BentoActionBar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoActionBar },\n * template: `\n * <bento-action-bar\n * :actions='[\n * {\n * title: 'Delete',\n * critical: true,\n * icon: BinIcon,\n * event: () => true,\n * },\n * {\n * title: 'Edit',\n * icon: EditIcon,\n * event: () => true,\n * }\n * ]'\n * @close=\"closeAction\"\n * :item-counter=\"5\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./action-bar.scss\" />\n"],"names":["__default__","messages","AVERAGE_BUTTON_SIZE","MENU_OFFSET","RESPONSIVE_BREAKPOINT","SPACING","t","tc","useI18n","label","computed","props","actionBar","ref","extraBottomSpacing","visibleActions","toRefs","width","useWindowSize","internalDisplayedActions","internalVisibleActions","isConfirmationVariant","watch","value","conditionalClasses","provide","POPOVER_OFFSET_INJECTION_KEY","actionsInternal","actions","action","shownActions","hiddenActions","confirmationActions","emit","showActions","nextTick","hideActions","newValue","oldValue","isIncreasing"],"mappings":";;;;;;;;;;;;;;;;;;;;GA8OIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA/LAC,IAAA,KACAC,IAAA,GACAC,IAAA,KACAC,IAAA,IA2DA,EAAA,GAAAC,GAAA,IAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,MAAAC,EAAA,iBAAAA,EAAA,iBAAAL,EAAA,UAAA,CAAA,GAGAM,IAAAC,EAAA,IAAA,GACA,EAAA,oBAAAC,GAAA,gBAAAC,EAAA,IAAAC,EAAAL,CAAA,GACA,EAAA,OAAAM,EAAA,IAAAC,EAAA,GACAC,IAAAN,EAAA,IAAA,GACAO,IAAAP,EAAA,IAAA,GAEAQ,IAAAX,EAAA,MAAAC,EAAA,YAAA,cAAA;AAEA,IAAAW;AAAA,MAAA,MAAAP,EAAA;AAAA,MACyB,CAAAQ,MAAA;AAEjB,QAAAH,EAAA,QAAAG,KAAA,IAAAA,IAAA,GACAJ,EAAA,QAAAC,EAAA;AAAA,MAAwD;AAAA,MAC5D,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAI,IAAAd,EAAA,OAAA;AAAA,MAA2C,+BAAAI,EAAA;AAAA,MACW,8BAAAO,EAAA;AAAA,IACE,EAAA;AAIxD,IAAAI,EAAAC,GAAAvB,CAAA;AAGA,UAAAwB,IAAAjB,EAAA,MAAA;AAEI,YAAAkB,IAAAjB,EAAA,QAAA,IAAA,CAAAkB,OAAA;AAAA,QAA6C,GAAAA;AAAA,QACtC,SAAA;AAAA,MACM,EAAA,GAGbC,IAAAF,EAAA,MAAA,GAAAT,EAAA,KAAA,EAAA,QAAA,GACAY,IAAAH,EAAA,MAAAT,EAAA,KAAA;AAEA,aAAA,CAAA,GAAAW,GAAA,GAAAC,CAAA;AAAA,IAAyC,CAAA,GAG7CC,IAAAtB,EAAA,MAAA;AAAA,MAAmE;AAAA,QAC/D,OAAAJ,EAAA,MAAA;AAAA,QACmB,OAAA,MAAA2B,EAAA,MAAA;AAAA,MACS;AAAA,MAC5B;AAAA,QACA,OAAA3B,EAAA,QAAA;AAAA,QACqB,SAAA;AAAA,QACR,OAAA,MAAA2B,EAAA,QAAA;AAAA,MACiB;AAAA,IAC9B,CAAA,GAIJC,IAAA,YAAA;AACI,YAAAC,EAAA,GACAlB,EAAA,QAAAL,EAAA,MAAA,cAAAP,IAAAH,KAAAiB,EAAA,QAAAC,EAAA,UAIID,EAAA,SAAA,GACAe,EAAA;AAAA,IACJ,GAGJE,IAAA,YAAA;AACI,YAAAD,EAAA,GACAlB,EAAA,QAAAL,EAAA,MAAA,cAAAP,KAAAc,EAAA,QAAA,MACIA,EAAA,SAAA,GACAiB,EAAA;AAAA,IACJ;AAIJ,WAAAd;AAAA,MAAA,MAAAL,EAAA;AAAA,MACgB,OAAAoB,GAAAC,MAAA;AAGR,YADA,MAAAH,EAAA,GACA,CAAAvB,EAAA;AACI;AAEJ,cAAA2B,IAAAF,IAAAC;AACA,QAAArB,EAAA,QAAAb,IACIe,EAAA,QAAA,IAAiCoB,IAEjCL,EAAA,IAEAE,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as I, useSlots as y, computed as r, onMounted as T } from "vue";
|
|
2
|
-
import { c as S, a as c, B as b } from "./typography.
|
|
3
|
-
import { B as H } from "./button.
|
|
2
|
+
import { c as S, a as c, B as b } from "./typography.CqQaHXhq.js";
|
|
3
|
+
import { B as H } from "./button.79klAcOK.js";
|
|
4
4
|
import { C as B } from "./cross-small.BLUwtRB-.js";
|
|
5
5
|
import { W as w } from "./warning-filled.CLKRzGMT.js";
|
|
6
6
|
import { C as L } from "./cross-circle-fill.CnYH4R_h.js";
|
|
@@ -84,7 +84,7 @@ var U = function() {
|
|
|
84
84
|
W,
|
|
85
85
|
!1,
|
|
86
86
|
null,
|
|
87
|
-
"
|
|
87
|
+
"2c793db1"
|
|
88
88
|
);
|
|
89
89
|
const X = D.exports;
|
|
90
90
|
export {
|
|
@@ -93,4 +93,4 @@ export {
|
|
|
93
93
|
o as b,
|
|
94
94
|
u as c
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=alert.
|
|
96
|
+
//# sourceMappingURL=alert.DtT7BRdr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.Ba2hSVeM.js","sources":["../../src/components/alert/alert.types.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/info-filled.vue","../../src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\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><g :clip-path=\"'url(#uia-icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M5.0342 0.839937C6.45033 0.253358 8.00859 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM8.75 4.5C8.75 4.23478 8.64464 3.98043 8.45711 3.79289C8.26957 3.60536 8.01522 3.5 7.75 3.5C7.55222 3.5 7.35888 3.55865 7.19443 3.66853C7.02998 3.77841 6.90181 3.93459 6.82612 4.11732C6.75043 4.30004 6.73063 4.50111 6.76921 4.69509C6.8078 4.88907 6.90304 5.06725 7.04289 5.20711C7.18275 5.34696 7.36093 5.4422 7.55491 5.48079C7.74889 5.51937 7.94996 5.49957 8.13268 5.42388C8.31541 5.34819 8.47159 5.22002 8.58147 5.05557C8.69135 4.89112 8.75 4.69778 8.75 4.5ZM8.75 6.25H6.25V7.75H7.25V10.25H6.25V11.75H9.75V10.25H8.75V6.25Z\"/></g><defs><clipPath :id=\"'uia-icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_sfc_main$1","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","isTipVariant","computed","props","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkIcon","WarningIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","emit","onMounted"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;AChBZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;GCyJIE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;iBApGAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAmCA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAlB,EAAA,GAAA,GAEAmB,IAAAF,EAAA,OAAA;AAAA,MAAgD,CAAA,YAAAC,EAAA,IAAA,EAAA,GAAAA,EAAA;AAAA,MACV,CAAA,YAAAlB,EAAA,GAAA,EAAA,GAAAgB,EAAA;AAAA,IACkB,EAAA,GAGxDI,IAAAH,EAAA,MAAAH,EAAA,GAAAI,EAAA,IAAA,MAAA,CAAA,GAEAG,IAAAJ,EAAA,MAAA;AACI,cAAAC,EAAA,MAAA;AAAA,QAAoB,KAAAhB,EAAA;AAEZ,iBAAAoB;AAAA,QAAO,KAAApB,EAAA;AAEP,iBAAAqB;AAAA,QAAO,KAAArB,EAAA;AAEP,iBAAAsB;AAAA,QAAO,KAAAtB,EAAA;AAAA,QACe;AAEtB,iBAAAuB;AAAA,MAAO;AAAA,IACf,CAAA,GAGJC,IAAAT,EAAA,OAAA;AAAA,MAA8C,IAAAU,EAAA;AAAA,MACf,SAAAX,EAAA,QAAAY,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAZ,EAAA,MAAAC,EAAA,SAAAhB,EAAA,YAAA,WAAA,OAAA,GAEA4B,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAA4B,EAAA,MAAA;AACI,UAAA,CAAAtB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"alert.DtT7BRdr.js","sources":["../../src/components/alert/alert.types.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/info-filled.vue","../../src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\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><g :clip-path=\"'url(#uia-icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M5.0342 0.839937C6.45033 0.253358 8.00859 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM8.75 4.5C8.75 4.23478 8.64464 3.98043 8.45711 3.79289C8.26957 3.60536 8.01522 3.5 7.75 3.5C7.55222 3.5 7.35888 3.55865 7.19443 3.66853C7.02998 3.77841 6.90181 3.93459 6.82612 4.11732C6.75043 4.30004 6.73063 4.50111 6.76921 4.69509C6.8078 4.88907 6.90304 5.06725 7.04289 5.20711C7.18275 5.34696 7.36093 5.4422 7.55491 5.48079C7.74889 5.51937 7.94996 5.49957 8.13268 5.42388C8.31541 5.34819 8.47159 5.22002 8.58147 5.05557C8.69135 4.89112 8.75 4.69778 8.75 4.5ZM8.75 6.25H6.25V7.75H7.25V10.25H6.25V11.75H9.75V10.25H8.75V6.25Z\"/></g><defs><clipPath :id=\"'uia-icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"close-alert\"]);\n\n const props = defineProps({\n closeButton: { type: Boolean, default: false },\n type: { default: BentoAlertTypeOption.HIGHLIGHT },\n variant: { default: BentoAlertVariant.DEFAULT }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_sfc_main$1","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","isTipVariant","computed","props","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkIcon","WarningIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","emit","onMounted"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;AChBZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;GCgIIE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;iBA3EAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAUA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAlB,EAAA,GAAA,GAEAmB,IAAAF,EAAA,OAAA;AAAA,MAAgD,CAAA,YAAAC,EAAA,IAAA,EAAA,GAAAA,EAAA;AAAA,MACV,CAAA,YAAAlB,EAAA,GAAA,EAAA,GAAAgB,EAAA;AAAA,IACkB,EAAA,GAGxDI,IAAAH,EAAA,MAAAH,EAAA,GAAAI,EAAA,IAAA,MAAA,CAAA,GAEAG,IAAAJ,EAAA,MAAA;AACI,cAAAC,EAAA,MAAA;AAAA,QAAoB,KAAAhB,EAAA;AAEZ,iBAAAoB;AAAA,QAAO,KAAApB,EAAA;AAEP,iBAAAqB;AAAA,QAAO,KAAArB,EAAA;AAEP,iBAAAsB;AAAA,QAAO,KAAAtB,EAAA;AAAA,QACe;AAEtB,iBAAAuB;AAAA,MAAO;AAAA,IACf,CAAA,GAGJC,IAAAT,EAAA,OAAA;AAAA,MAA8C,IAAAU,EAAA;AAAA,MACf,SAAAX,EAAA,QAAAY,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAZ,EAAA,MAAAC,EAAA,SAAAhB,EAAA,YAAA,WAAA,OAAA,GAEA4B,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAA4B,EAAA,MAAA;AACI,UAAA,CAAAtB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as b, computed as n, defineComponent as _, toRefs as m } from "vue";
|
|
2
|
-
import { B as p } from "./typography.
|
|
2
|
+
import { B as p } from "./typography.CqQaHXhq.js";
|
|
3
3
|
import "./index.Cl4_42j5.js";
|
|
4
4
|
import { n as v } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/avatar.css";
|
|
6
|
-
const
|
|
6
|
+
const f = (t) => {
|
|
7
7
|
const a = b(t);
|
|
8
8
|
return n(() => a.value ? a.value.trim().charAt(0).toUpperCase() : null);
|
|
9
9
|
};
|
|
@@ -18,7 +18,7 @@ const L = {}, y = /* @__PURE__ */ _({
|
|
|
18
18
|
variant: { default: o.LARGE }
|
|
19
19
|
},
|
|
20
20
|
setup(t) {
|
|
21
|
-
const a = t, { username: r } = m(a), e =
|
|
21
|
+
const a = t, { username: r } = m(a), e = f(r), c = n(() => ({
|
|
22
22
|
[`b-avatar-image--${o.SMALL}`]: a.variant === o.SMALL,
|
|
23
23
|
[`b-avatar-image--${a.color}`]: a.color
|
|
24
24
|
}));
|
|
@@ -34,7 +34,7 @@ var g = function() {
|
|
|
34
34
|
C,
|
|
35
35
|
!1,
|
|
36
36
|
null,
|
|
37
|
-
"
|
|
37
|
+
"aa0b2027"
|
|
38
38
|
);
|
|
39
39
|
const h = E.exports, A = {
|
|
40
40
|
name: "bento-avatar"
|
|
@@ -46,11 +46,11 @@ const h = E.exports, A = {
|
|
|
46
46
|
username: null
|
|
47
47
|
},
|
|
48
48
|
setup(t) {
|
|
49
|
-
const a = t, { username: r } = m(a), e = n(() => a.iconOnly ? a.username : null), c = n(() => a.src ? null : a.username), u =
|
|
49
|
+
const a = t, { username: r } = m(a), e = n(() => a.iconOnly ? a.username : null), c = n(() => a.src ? null : a.username), u = f(r), l = n(() => u.value ? u.value.charCodeAt(0) - 65 : null), d = n(() => {
|
|
50
50
|
const i = 26 / Object.keys(s).length;
|
|
51
51
|
return l.value <= i ? s.YELLOW : l.value <= i * 2 ? s.BLUE : l.value <= i * 3 ? s.GREEN : s.RED;
|
|
52
52
|
});
|
|
53
|
-
return { __sfc: !0, props: a, username: r, computedAriaLabel: e, computedUsername: c, initials: u, charCode: l, avatarColor:
|
|
53
|
+
return { __sfc: !0, props: a, username: r, computedAriaLabel: e, computedUsername: c, initials: u, charCode: l, avatarColor: d, AvatarImage: h, BentoAvatarImageVariant: o, BentoTypography: p };
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
var R = function() {
|
|
@@ -62,10 +62,10 @@ var R = function() {
|
|
|
62
62
|
$,
|
|
63
63
|
!1,
|
|
64
64
|
null,
|
|
65
|
-
"
|
|
65
|
+
"2be0bf91"
|
|
66
66
|
);
|
|
67
67
|
const T = B.exports;
|
|
68
68
|
export {
|
|
69
69
|
T as B
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=avatar.
|
|
71
|
+
//# sourceMappingURL=avatar.0ffdL8i0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.0ffdL8i0.js","sources":["../../src/composables/initials.ts","../../src/components/avatar/components/avatar-image/avatar-image.types.ts","../../src/components/avatar/components/avatar-image/avatar-image.vue","../../src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"Profile picture\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = defineProps({\n color: { default: BentoAvatarImageColor.YELLOW },\n src: { default: null },\n username: { default: null },\n variant: { default: BentoAvatarImageVariant.LARGE }\n});\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = defineProps({\n iconOnly: { type: Boolean, default: false },\n src: { default: null },\n username: null\n});\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","toRefs","props","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ;ACbY,IAAAG,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UAJQA,IAAAD,KAAA,CAAA,CAAA;ACwCR,MAAAE,IAAA,CAAA;;;;;;;;;;iBArBA,EAAA,UAAAR,EAAA,IAAAS,EAAAC,CAAA,GACAC,IAAAZ,EAAAC,CAAA,GAEAY,IAAAT,EAAA,OAAA;AAAA,MAA2C,CAAA,mBAAAC,EAAA,KAAA,EAAA,GAAAM,EAAA,YAAAN,EAAA;AAAA,MACyD,CAAA,mBAAAM,EAAA,KAAA,EAAA,GAAAA,EAAA;AAAA,IACtD,EAAA;;;;;;;;;;;;;;;qBCqC9CG,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;iBA1CA,EAAA,UAAAb,EAAA,IAAAS,EAAAC,CAAA,GAEAI,IAAAX,EAAA,MAAAO,EAAA,WAAAA,EAAA,WAAA,IAAA,GACAT,IAAAE,EAAA,MAAAO,EAAA,MAAA,OAAAA,EAAA,QAAA,GACAC,IAAAZ,EAAAC,CAAA,GAGAe,IAAAZ,EAAA,MAAAQ,EAAA,QAAAA,EAAA,MAAA,WAAA,CAAA,IAAA,KAAA,IAAA,GAGAK,IAAAb,EAAA,MAAA;AAGI,YAAAc,IAAA,KADA,OAAA,KAAAX,CAAA,EAAA;AAGA,aAAAS,EAAA,SAAAE,IACIX,EAAA,SAEJS,EAAA,SAAAE,IAAA,IACIX,EAAA,OAEJS,EAAA,SAAAE,IAAA,IACIX,EAAA,QAEJA,EAAA;AAAA,IAA6B,CAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, computed as r, ref as d } from "vue";
|
|
2
|
-
import { B as f } from "./typography.
|
|
2
|
+
import { B as f } from "./typography.CqQaHXhq.js";
|
|
3
3
|
import { u as p } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
4
|
import { n as _ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/base-button.css";
|
|
@@ -83,4 +83,4 @@ export {
|
|
|
83
83
|
x as B,
|
|
84
84
|
e as a
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=base-button
|
|
86
|
+
//# sourceMappingURL=base-button.qWj0m9-v.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button
|
|
1
|
+
{"version":3,"file":"base-button.qWj0m9-v.js","sources":["../../src/components/internal/base-button/base-button.types.ts","../../src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACwDZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACAJ,EAAA;AAAA,IACAA,EAAA;AAAA,IACAA,EAAA;AAAA,IACAA,EAAA;AAAA,EACA;AAAA,EACA,MAAAK,GAAA,EAAA,OAAAC,GAAA,MAAAC,GAAA,OAAAC,EAAA,GAAA;AAEA,UAAAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAA,kBAAAC,IAAAH,EAAA,eAAA,MAAA,gBAAAG,EAAA;AAAA,MACA;AAAA,KAAA,GAGAC,IAAAC,EAAA,IAAA,GAEAC,IAAAJ,EAAA,OAAA;AAAA,MAAA,CAAA,kBAAAZ,EAAA,WAAA,EAAA,GAAAO,EAAA;AAAA,MACA,CAAA,kBAAAP,EAAA,SAAA,EAAA,GAAA,CAAAQ,EAAA;AAAA,IACA,EAAA;AAoBA,WAAA;AAAA;AAAA,MAAA,gBAAAG;AAAA,MAEA,oBAAAK;AAAA;AAAA,MACA,eApBA,CAAAC,MAAA;AACA,QAAAV,EAAA,YAGAU,EAAA,eAAA,GACAA,EAAA,gBAAA,KAHAR,EAAAP,EAAA,OAAAe,CAAA;AAAA,MAIA;AAAA,MAiBA,eAdA,CAAAA,MAAA;AACA,QAAAR,EAAAP,EAAA,OAAAe,CAAA;AAAA,MAAA;AAAA,MAcA,cAXA,CAAAA,MAAA;AACA,QAAAR,EAAAP,EAAA,MAAAe,CAAA;AAAA,MAAA;AAAA,MAWA,SAAAC,EAAAV,CAAA;AAAA;AAAA,MACA,oBAAAM;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as T, useSlots as q, ref as
|
|
2
|
-
import { B as at } from "./button.
|
|
1
|
+
import { defineComponent as T, useSlots as q, ref as r, computed as l, inject as Q, watch as w, nextTick as X, onUnmounted as Z, useAttrs as V, onMounted as tt, provide as D, toRefs as et } from "vue";
|
|
2
|
+
import { B as at } from "./button.79klAcOK.js";
|
|
3
3
|
import { B as ot } from "./focus-trap.DSkLNO_i.js";
|
|
4
4
|
import { u as J } from "./use-has-slot.C9lQZ6nz.js";
|
|
5
5
|
import { u as nt } from "./i18n.BQkEbtPM.js";
|
|
6
6
|
import { M as st } from "./base-modal.keys.C2PQXcE2.js";
|
|
7
7
|
import { g as lt } from "./unique-id.XFfoKuc2.js";
|
|
8
|
-
import { B as it } from "./typography.
|
|
9
|
-
import { F as
|
|
10
|
-
import { D as
|
|
8
|
+
import { B as it } from "./typography.CqQaHXhq.js";
|
|
9
|
+
import { F as ut } from "./footer-actions.CwHY2-Ap.js";
|
|
10
|
+
import { D as rt, B as ct, b as dt, a as mt } from "./dialog-page.bmDDYmn9.js";
|
|
11
11
|
import { o as pt } from "./resize.Bqks3WUm.js";
|
|
12
12
|
import { G as gt, a as ft } from "./grid-layout.HvTAa4to.js";
|
|
13
13
|
import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
14
14
|
import { C as _t } from "./cross.CsUPDmaA.js";
|
|
15
15
|
import { B as vt } from "./directive.O3yEdalv.js";
|
|
16
16
|
import "../assets/base-modal.css";
|
|
17
|
-
var yt = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.DIALOG = "dialog", a))(yt || {}), Ct = /* @__PURE__ */ ((a) => (a.DEFAULT = "BentoModalDefault", a.DIALOG = "BentoModalDialog", a))(Ct || {}), G = /* @__PURE__ */ ((a) => (a.SMALL = "small", a.MEDIUM = "medium", a.LARGE = "large", a))(G || {}), E = /* @__PURE__ */ ((a) => (a.SMALLER = "smaller", a.EQUAL = "equal", a.BIGGER = "bigger", a))(E || {}), F = /* @__PURE__ */ ((a) => (a.DIALOG = "dialog", a.ALERT_DIALOG = "alertdialog", a))(F || {}), ht = /* @__PURE__ */ ((a) => (a.CONFIRMATION = "confirmation", a.DESTRUCTIVE = "destructive", a.INFO = "info", a.ACKNOWLEDGEMENT = "acknowledgement", a))(ht || {}),
|
|
18
|
-
const
|
|
17
|
+
var yt = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.DIALOG = "dialog", a))(yt || {}), Ct = /* @__PURE__ */ ((a) => (a.DEFAULT = "BentoModalDefault", a.DIALOG = "BentoModalDialog", a))(Ct || {}), G = /* @__PURE__ */ ((a) => (a.SMALL = "small", a.MEDIUM = "medium", a.LARGE = "large", a))(G || {}), E = /* @__PURE__ */ ((a) => (a.SMALLER = "smaller", a.EQUAL = "equal", a.BIGGER = "bigger", a))(E || {}), F = /* @__PURE__ */ ((a) => (a.DIALOG = "dialog", a.ALERT_DIALOG = "alertdialog", a))(F || {}), ht = /* @__PURE__ */ ((a) => (a.CONFIRMATION = "confirmation", a.DESTRUCTIVE = "destructive", a.INFO = "info", a.ACKNOWLEDGEMENT = "acknowledgement", a))(ht || {}), At = /* @__PURE__ */ ((a) => (a.CLOSE_MODAL = "close-modal", a))(At || {});
|
|
18
|
+
const bt = {
|
|
19
19
|
"en-US": {
|
|
20
20
|
ariaLabelFallback: "modal",
|
|
21
21
|
close: "Close"
|
|
@@ -97,33 +97,33 @@ const At = {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
setup(a) {
|
|
100
|
-
const e = a, o = 26, t = q(), n = J(t), c =
|
|
100
|
+
const e = a, o = 26, t = q(), n = J(t), c = r(null), O = l(() => ({
|
|
101
101
|
"b-modal-page--custom-padding": e.customPadding
|
|
102
102
|
})), I = l(() => {
|
|
103
|
-
var
|
|
103
|
+
var u;
|
|
104
104
|
return {
|
|
105
105
|
"b-modal-page__content--with-header": n("default"),
|
|
106
|
-
"b-modal-page__content--with-actions": n("actions") || ((
|
|
106
|
+
"b-modal-page__content--with-actions": n("actions") || ((u = e.actions) == null ? void 0 : u.length)
|
|
107
107
|
};
|
|
108
108
|
}), R = l(() => {
|
|
109
109
|
if (!e.customPadding)
|
|
110
110
|
return {};
|
|
111
|
-
const
|
|
111
|
+
const u = {
|
|
112
112
|
paddingLeft: e.customPadding,
|
|
113
113
|
paddingRight: e.customPadding
|
|
114
|
-
}, i = { ...
|
|
114
|
+
}, i = { ...u, paddingTop: void 0, paddingBottom: void 0 };
|
|
115
115
|
return n("default") || (i.paddingTop = e.customPadding), n("actions") || (i.paddingBottom = e.customPadding), {
|
|
116
116
|
header: {
|
|
117
|
-
...
|
|
117
|
+
...u,
|
|
118
118
|
paddingTop: e.customPadding,
|
|
119
119
|
paddingRight: `${parseInt(e.customPadding, 10) + o}px`,
|
|
120
120
|
flex: 1
|
|
121
121
|
},
|
|
122
122
|
content: i,
|
|
123
|
-
actions: { ...
|
|
123
|
+
actions: { ...u, paddingBottom: e.customPadding },
|
|
124
124
|
backButton: { top: e.customPadding, paddingLeft: e.customPadding }
|
|
125
125
|
};
|
|
126
|
-
}), d = l(() => e.withColumnLayout &&
|
|
126
|
+
}), d = l(() => e.withColumnLayout && b.value === G.LARGE), g = l(() => e.columnsSize === E.SMALLER ? [
|
|
127
127
|
{ small: 4, medium: 4, large: 4 },
|
|
128
128
|
{ small: 8, medium: 8, large: 8 }
|
|
129
129
|
] : e.columnsSize === E.BIGGER ? [
|
|
@@ -132,13 +132,13 @@ const At = {
|
|
|
132
132
|
] : [
|
|
133
133
|
{ small: 6, medium: 6, large: 6 },
|
|
134
134
|
{ small: 6, medium: 6, large: 6 }
|
|
135
|
-
]), { activePage: f, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size:
|
|
135
|
+
]), { activePage: f, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size: b } = Q(j), h = l(() => f.value === e.pageId || !f.value);
|
|
136
136
|
let p = null;
|
|
137
137
|
return w(
|
|
138
138
|
() => f.value,
|
|
139
|
-
async (
|
|
140
|
-
var
|
|
141
|
-
h.value && (await X(), _.value = `${(k = (
|
|
139
|
+
async (u, i) => {
|
|
140
|
+
var A, k;
|
|
141
|
+
h.value && (await X(), _.value = `${(k = (A = c.value) == null ? void 0 : A.$el) == null ? void 0 : k.clientHeight}px`, B.value = e.customPadding, m.value = i !== void 0, p = pt(c.value, () => {
|
|
142
142
|
var v, S;
|
|
143
143
|
const L = `${(S = (v = c.value) == null ? void 0 : v.$el) == null ? void 0 : S.clientHeight}px`;
|
|
144
144
|
L && L !== _.value && (_.value = L);
|
|
@@ -147,7 +147,7 @@ const At = {
|
|
|
147
147
|
{ immediate: !0 }
|
|
148
148
|
), Z(() => {
|
|
149
149
|
p == null || p.disconnect();
|
|
150
|
-
}), { __sfc: !0, CLOSE_BUTTON_ICON_WIDTH: o, slots: t, hasSlot: n, page: c, props: e, modalPageConditionalClasses: O, modalContentConditionalClasses: I, customPaddingStyles: R, hasColumnLayout: d, computedColumnWidth: g, activePage: f, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size:
|
|
150
|
+
}), { __sfc: !0, CLOSE_BUTTON_ICON_WIDTH: o, slots: t, hasSlot: n, page: c, props: e, modalPageConditionalClasses: O, modalContentConditionalClasses: I, customPaddingStyles: R, hasColumnLayout: d, computedColumnWidth: g, activePage: f, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size: b, isCurrentPage: h, pageElementObserver: p, BentoTypography: it, GridLayout: gt, GridLayoutContainerType: ft, FooterActions: ut, DialogPage: rt };
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
var Pt = function() {
|
|
@@ -158,7 +158,7 @@ var Pt = function() {
|
|
|
158
158
|
} }, scopedSlots: e._u([t.hasSlot("default") || t.showCloseButton ? { key: "header", fn: function() {
|
|
159
159
|
return [o("div", { staticClass: "b-modal-page__header-container", style: t.customPaddingStyles.header }, [o("div", { staticClass: "b-modal-page__header" }, [o(t.BentoTypography, { staticClass: "b-modal-page__title", attrs: { "aria-label": "base modal title", el: "span", variant: "title", stronger: "" } }, [t.hasSlot("default") ? e._t("default") : e._e()], 2)], 1)])];
|
|
160
160
|
}, proxy: !0 } : null, { key: "content", fn: function() {
|
|
161
|
-
return [o("div", { staticClass: "b-modal-page__content", class: t.modalContentConditionalClasses, style: t.customPaddingStyles.content }, [t.hasSlot("content") || t.hasSlot("content-col-1") && t.hasSlot("content-col-2") ? o(t.BentoTypography, { attrs: {
|
|
161
|
+
return [o("div", { staticClass: "b-modal-page__content", class: t.modalContentConditionalClasses, style: t.customPaddingStyles.content }, [t.hasSlot("content") || t.hasSlot("content-col-1") && t.hasSlot("content-col-2") ? o(t.BentoTypography, { attrs: { el: "div" } }, [t.hasColumnLayout ? o(t.GridLayout, { staticClass: "b-modal-page__grid", attrs: { "column-width": t.computedColumnWidth, "container-type": t.GridLayoutContainerType.NORMAL, "no-gap": "" }, scopedSlots: e._u([{ key: "col-1", fn: function() {
|
|
162
162
|
return [e._t("content-col-1")];
|
|
163
163
|
}, proxy: !0 }, { key: "col-2", fn: function() {
|
|
164
164
|
return [e._t("content-col-2")];
|
|
@@ -174,10 +174,10 @@ var Pt = function() {
|
|
|
174
174
|
Et,
|
|
175
175
|
!1,
|
|
176
176
|
null,
|
|
177
|
-
"
|
|
177
|
+
"8ee5a20b"
|
|
178
178
|
);
|
|
179
179
|
const It = Ot.exports, Bt = T({
|
|
180
|
-
i18n: { messages:
|
|
180
|
+
i18n: { messages: bt },
|
|
181
181
|
name: "base-modal"
|
|
182
182
|
}), kt = /* @__PURE__ */ T({
|
|
183
183
|
...Bt,
|
|
@@ -271,22 +271,22 @@ const It = Ot.exports, Bt = T({
|
|
|
271
271
|
},
|
|
272
272
|
emits: ["update:active-page", "close-modal"],
|
|
273
273
|
setup(a, { expose: e, emit: o }) {
|
|
274
|
-
const t = a, n = 500, { t: c } = nt(), O = q(), I = V(), R = J(O), d =
|
|
274
|
+
const t = a, n = 500, { t: c } = nt(), O = q(), I = V(), R = J(O), d = r(null), g = r(!1), f = lt("modal"), _ = l(() => t.isDismissible && !t.hideCloseButton), m = r(t.customPadding), B = l(() => m.value ? { top: m.value, right: m.value } : {}), x = l(() => I["aria-label"] ?? c("ariaLabelFallback")), b = l(() => t.withColumnLayout && t.size === G.LARGE), h = () => {
|
|
275
275
|
d.value.showModal();
|
|
276
276
|
}, p = () => {
|
|
277
277
|
o("close-modal");
|
|
278
|
-
},
|
|
278
|
+
}, u = () => {
|
|
279
279
|
g.value && (d.value.close(), y.value[0] && o("update:active-page", y.value[0]), y.value = [], g.value = !1, p());
|
|
280
280
|
}, i = () => {
|
|
281
281
|
d.value.open && (g.value = !0);
|
|
282
|
-
},
|
|
282
|
+
}, A = (s) => {
|
|
283
283
|
s && s.preventDefault(), !(!t.isDismissible && t.modalRole === F.DIALOG) && i();
|
|
284
284
|
}, k = () => {
|
|
285
|
-
t.isDismissible &&
|
|
285
|
+
t.isDismissible && A();
|
|
286
286
|
}, L = l(() => ({
|
|
287
287
|
[`b-modal-base__container--${t.size}`]: t.size,
|
|
288
288
|
"b-modal-base__container--hide": g.value,
|
|
289
|
-
"b-modal-base__container--column-layout":
|
|
289
|
+
"b-modal-base__container--column-layout": b.value,
|
|
290
290
|
"b-modal-base__container--animation": M.value
|
|
291
291
|
}));
|
|
292
292
|
w(
|
|
@@ -306,12 +306,12 @@ const It = Ot.exports, Bt = T({
|
|
|
306
306
|
), tt(() => {
|
|
307
307
|
t.isOpen && d.value && h();
|
|
308
308
|
}), e({
|
|
309
|
-
internalModalActionClose:
|
|
309
|
+
internalModalActionClose: A
|
|
310
310
|
}), D(st, f);
|
|
311
|
-
const { activePage: v, isOpen: S, size: z } = et(t), U =
|
|
311
|
+
const { activePage: v, isOpen: S, size: z } = et(t), U = r(ct.TRANSITION_LEVEL_DEEPER), P = r([]), y = r([]), $ = (s) => o("update:active-page", s), H = (s) => () => {
|
|
312
312
|
var C;
|
|
313
313
|
P.value = (C = P.value) == null ? void 0 : C.filter((N) => N !== s);
|
|
314
|
-
}, K = (s) => (s && P.value.push(s), { unregisterPage: H(s) }), Y =
|
|
314
|
+
}, K = (s) => (s && P.value.push(s), { unregisterPage: H(s) }), Y = r(""), M = r(!1);
|
|
315
315
|
return D(j, {
|
|
316
316
|
activePage: v,
|
|
317
317
|
height: Y,
|
|
@@ -326,7 +326,7 @@ const It = Ot.exports, Bt = T({
|
|
|
326
326
|
pages: P,
|
|
327
327
|
previousPages: y,
|
|
328
328
|
updatePage: $
|
|
329
|
-
}), D(mt, K), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: n, t: c, slots: O, attrs: I, hasSlot: R, modal: d, isClosing: g, modalId: f, emit: o, props: t, showCloseButton: _, pageCustomPadding: m, customPaddingStyles: B, computedAriaLabel: x, hasColumnLayout:
|
|
329
|
+
}), D(mt, K), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: n, t: c, slots: O, attrs: I, hasSlot: R, modal: d, isClosing: g, modalId: f, emit: o, props: t, showCloseButton: _, pageCustomPadding: m, customPaddingStyles: B, computedAriaLabel: x, hasColumnLayout: b, openModal: h, emitCloseEvent: p, closeModalAfterAnimation: u, startCloseModalAnimation: i, internalModalActionClose: A, closeModalOnClickOutside: k, modalConditionalClasses: L, activePage: v, isOpen: S, size: z, animation: U, pages: P, previousPages: y, updatePage: $, unregisterPage: H, registerPage: K, height: Y, isAnimationActive: M, BentoButton: at, BentoFocusTrap: ot, vBentoClickOutsideDirective: vt, BentoModalPage: It, CrossIcon: _t };
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
332
|
var Dt = function() {
|
|
@@ -350,7 +350,7 @@ var Dt = function() {
|
|
|
350
350
|
Gt,
|
|
351
351
|
!1,
|
|
352
352
|
null,
|
|
353
|
-
"
|
|
353
|
+
"02e288d2"
|
|
354
354
|
);
|
|
355
355
|
const Qt = Tt.exports;
|
|
356
356
|
export {
|
|
@@ -361,7 +361,7 @@ export {
|
|
|
361
361
|
E as d,
|
|
362
362
|
F as e,
|
|
363
363
|
ht as f,
|
|
364
|
-
|
|
364
|
+
At as g,
|
|
365
365
|
Qt as h
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=base-modal.
|
|
367
|
+
//# sourceMappingURL=base-modal.8sjjRWsL.js.map
|