@adyen/bento-vue3 1.46.0 → 1.47.1
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 +109 -44
- 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/base-modal.css +1 -1
- package/dist/assets/calendar.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/divider.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.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/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/status.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{accordion-item.BOftQTUm.js → accordion-item.LeB4jteX.js} +12 -12
- package/dist/chunks/{accordion-item.BOftQTUm.js.map → accordion-item.LeB4jteX.js.map} +1 -1
- package/dist/chunks/{action-bar.DHa6nS5J.js → action-bar.BN-AoRn0.js} +17 -17
- package/dist/chunks/{action-bar.DHa6nS5J.js.map → action-bar.BN-AoRn0.js.map} +1 -1
- package/dist/chunks/{alert.BffQNg4e.js → alert.DTX7XqPC.js} +15 -15
- package/dist/chunks/{alert.BffQNg4e.js.map → alert.DTX7XqPC.js.map} +1 -1
- package/dist/chunks/{avatar.DqdDHXay.js → avatar.B0-9jC6H.js} +3 -3
- package/dist/chunks/{avatar.DqdDHXay.js.map → avatar.B0-9jC6H.js.map} +1 -1
- package/dist/chunks/{base-button.DgHMejMF.js → base-button.DdNFlbgH.js} +9 -9
- package/dist/chunks/{base-button.DgHMejMF.js.map → base-button.DdNFlbgH.js.map} +1 -1
- package/dist/chunks/{base-modal.BP7bUB84.js → base-modal.BsD3EOCY.js} +16 -16
- package/dist/chunks/{base-modal.BP7bUB84.js.map → base-modal.BsD3EOCY.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DzQQlXXK.js → button-actions-with-menu.CUL1q1Ca.js} +8 -8
- package/dist/chunks/{button-actions-with-menu.DzQQlXXK.js.map → button-actions-with-menu.CUL1q1Ca.js.map} +1 -1
- package/dist/chunks/{button-actions.C8CJcXxS.js → button-actions.DBgK5Qwo.js} +11 -11
- package/dist/chunks/{button-actions.C8CJcXxS.js.map → button-actions.DBgK5Qwo.js.map} +1 -1
- package/dist/chunks/{button.DSnv5X7y.js → button.Cneb6rPP.js} +10 -10
- package/dist/chunks/{button.DSnv5X7y.js.map → button.Cneb6rPP.js.map} +1 -1
- package/dist/chunks/{calendar.DlvMzTO4.js → calendar.CKY08nCx.js} +126 -113
- package/dist/chunks/{calendar.DlvMzTO4.js.map → calendar.CKY08nCx.js.map} +1 -1
- package/dist/chunks/{card.9fQrkeSH.js → card.BUBXMpP5.js} +19 -19
- package/dist/chunks/{card.9fQrkeSH.js.map → card.BUBXMpP5.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Dq57AigF.js → checkbox-group.DOAFzAX-.js} +13 -13
- package/dist/chunks/{checkbox-group.Dq57AigF.js.map → checkbox-group.DOAFzAX-.js.map} +1 -1
- package/dist/chunks/{checkbox-input.D8ZUqd4m.js → checkbox-input.CAYgiRHG.js} +3 -3
- package/dist/chunks/{checkbox-input.D8ZUqd4m.js.map → checkbox-input.CAYgiRHG.js.map} +1 -1
- package/dist/chunks/{checkbox.BphbrpUx.js → checkbox.J51-tG4g.js} +29 -29
- package/dist/chunks/{checkbox.BphbrpUx.js.map → checkbox.J51-tG4g.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill.ClIf1E3H.js → checkmark-circle-fill.g_tcBhFJ.js} +4 -4
- package/dist/chunks/{checkmark-circle-fill.ClIf1E3H.js.map → checkmark-circle-fill.g_tcBhFJ.js.map} +1 -1
- package/dist/chunks/{checkmark-small.DEc2T64_.js → checkmark-small.BDqUF-Ni.js} +5 -5
- package/dist/chunks/{checkmark-small.DEc2T64_.js.map → checkmark-small.BDqUF-Ni.js.map} +1 -1
- package/dist/chunks/{chevron-left.NvV5m76j.js → chevron-left.CYEK2UTr.js} +8 -8
- package/dist/chunks/{chevron-left.NvV5m76j.js.map → chevron-left.CYEK2UTr.js.map} +1 -1
- package/dist/chunks/{chevron-up.DQZG_BP3.js → chevron-up.Cu9qXgBY.js} +8 -8
- package/dist/chunks/{chevron-up.DQZG_BP3.js.map → chevron-up.Cu9qXgBY.js.map} +1 -1
- package/dist/chunks/{code-snippet.BXMQTve4.js → code-snippet.Cpik3i9g.js} +31 -31
- package/dist/chunks/{code-snippet.BXMQTve4.js.map → code-snippet.Cpik3i9g.js.map} +1 -1
- package/dist/chunks/{codemirror.OjJ-3ixa.js → codemirror.0fz2cWJS.js} +1355 -1364
- package/dist/chunks/{codemirror.OjJ-3ixa.js.map → codemirror.0fz2cWJS.js.map} +1 -1
- package/dist/chunks/{controls-group.J99mAGhx.js → controls-group.CjqybvY2.js} +11 -11
- package/dist/chunks/{controls-group.J99mAGhx.js.map → controls-group.CjqybvY2.js.map} +1 -1
- package/dist/chunks/{copy.CT8wuwho.js → copy.VRsofU-g.js} +9 -9
- package/dist/chunks/{copy.CT8wuwho.js.map → copy.VRsofU-g.js.map} +1 -1
- package/dist/chunks/{country.CcTaTBE0.js → country.D2t_VEYd.js} +5 -5
- package/dist/chunks/{country.CcTaTBE0.js.map → country.D2t_VEYd.js.map} +1 -1
- package/dist/chunks/{country.types.pilf5B3F.js → country.types.CLjbulKL.js} +4114 -4114
- package/dist/chunks/{country.types.pilf5B3F.js.map → country.types.CLjbulKL.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill-small.BXO78Wde.js → cross-circle-fill-small.CJyARMSZ.js} +5 -5
- package/dist/chunks/{cross-circle-fill-small.BXO78Wde.js.map → cross-circle-fill-small.CJyARMSZ.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.DN5b3_eL.js → cross-circle-fill.BzSjakuO.js} +4 -4
- package/dist/chunks/{cross-circle-fill.DN5b3_eL.js.map → cross-circle-fill.BzSjakuO.js.map} +1 -1
- package/dist/chunks/{cross-small.CXWTuKA_.js → cross-small.Z5EKYRm0.js} +5 -5
- package/dist/chunks/{cross-small.CXWTuKA_.js.map → cross-small.Z5EKYRm0.js.map} +1 -1
- package/dist/chunks/{cross.OvPfvoqX.js → cross.BZYw4R3N.js} +5 -5
- package/dist/chunks/{cross.OvPfvoqX.js.map → cross.BZYw4R3N.js.map} +1 -1
- package/dist/chunks/{currency.Dz2x17_Q.js → currency.DGX-aejv.js} +3 -3
- package/dist/chunks/{currency.Dz2x17_Q.js.map → currency.DGX-aejv.js.map} +1 -1
- package/dist/chunks/{dashboard-section.C90L1bhS.js → dashboard-section.BAJgkMXW.js} +6 -6
- package/dist/chunks/{dashboard-section.C90L1bhS.js.map → dashboard-section.BAJgkMXW.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BewlZNvL.js → dashed-underline.B_eVv1aB.js} +8 -8
- package/dist/chunks/{dashed-underline.BewlZNvL.js.map → dashed-underline.B_eVv1aB.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DeAeq2Ij.js → data-grid-template.DrwGj6Yq.js} +7 -7
- package/dist/chunks/{data-grid-template.DeAeq2Ij.js.map → data-grid-template.DrwGj6Yq.js.map} +1 -1
- package/dist/chunks/{data-grid.DSPcFy6O.js → data-grid.DSWWz-QK.js} +66 -66
- package/dist/chunks/{data-grid.DSPcFy6O.js.map → data-grid.DSWWz-QK.js.map} +1 -1
- package/dist/chunks/{date-picker.wNOf4DoV.js → date-picker.Ck51Ng3N.js} +49 -40
- package/dist/chunks/date-picker.Ck51Ng3N.js.map +1 -0
- package/dist/chunks/{date-range-picker.C4l0Xe9R.js → date-range-picker.D_N3gZ-n.js} +346 -342
- package/dist/chunks/date-range-picker.D_N3gZ-n.js.map +1 -0
- package/dist/chunks/{date.DVGj7WKQ.js → date.DeaBl297.js} +14 -16
- package/dist/chunks/{date.DVGj7WKQ.js.map → date.DeaBl297.js.map} +1 -1
- package/dist/chunks/{dialog-page.DNwtSB1o.js → dialog-page.CJBSluwk.js} +29 -28
- package/dist/chunks/{dialog-page.DNwtSB1o.js.map → dialog-page.CJBSluwk.js.map} +1 -1
- package/dist/chunks/divider.qUOSAbU6.js +33 -0
- package/dist/chunks/divider.qUOSAbU6.js.map +1 -0
- package/dist/chunks/{dot.pQfhaKda.js → dot.cpdFEk6G.js} +5 -5
- package/dist/chunks/{dot.pQfhaKda.js.map → dot.cpdFEk6G.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.3HzBUxC3.js → dropdown-default-textbox.Dl8Jv2bS.js} +17 -17
- package/dist/chunks/{dropdown-default-textbox.3HzBUxC3.js.map → dropdown-default-textbox.Dl8Jv2bS.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BRNZ7KIi.js → dropdown-tag.B33Tsgtl.js} +9 -9
- package/dist/chunks/{dropdown-tag.BRNZ7KIi.js.map → dropdown-tag.B33Tsgtl.js.map} +1 -1
- package/dist/chunks/{dropdown.DhvCTlVl.js → dropdown.WdgHycb4.js} +26 -26
- package/dist/chunks/{dropdown.DhvCTlVl.js.map → dropdown.WdgHycb4.js.map} +1 -1
- package/dist/chunks/{empty-state.DYfl7gnt.js → empty-state.C2ancCe6.js} +12 -12
- package/dist/chunks/{empty-state.DYfl7gnt.js.map → empty-state.C2ancCe6.js.map} +1 -1
- package/dist/chunks/{error-message.C6QpZ9ux.js → error-message.qsc0nOWT.js} +23 -23
- package/dist/chunks/{error-message.C6QpZ9ux.js.map → error-message.qsc0nOWT.js.map} +1 -1
- package/dist/chunks/{es6.D11bE5vq.js → es6.BtaxuP0b.js} +4 -4
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -0
- package/dist/chunks/{expand.CgwNEbbz.js → expand.CJ162RaJ.js} +4 -4
- package/dist/chunks/{expand.CgwNEbbz.js.map → expand.CJ162RaJ.js.map} +1 -1
- package/dist/chunks/{file-uploader.DiqPKVVt.js → file-uploader.BNGBBltW.js} +24 -24
- package/dist/chunks/{file-uploader.DiqPKVVt.js.map → file-uploader.BNGBBltW.js.map} +1 -1
- package/dist/chunks/{filter-bar.ChU2rr8r.js → filter-bar.Cq3pYzD3.js} +90 -90
- package/dist/chunks/{filter-bar.ChU2rr8r.js.map → filter-bar.Cq3pYzD3.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.C4zzWgje.js → fixed-scroller.XaGPUsUO.js} +12 -12
- package/dist/chunks/{fixed-scroller.C4zzWgje.js.map → fixed-scroller.XaGPUsUO.js.map} +1 -1
- package/dist/chunks/{focus-trap.DOiVbmpZ.js → focus-trap.CnKbO3b1.js} +8 -8
- package/dist/chunks/{focus-trap.DOiVbmpZ.js.map → focus-trap.CnKbO3b1.js.map} +1 -1
- package/dist/chunks/{footer-actions.Cl2aupkj.js → footer-actions.BG8-pOU-.js} +8 -8
- package/dist/chunks/{footer-actions.Cl2aupkj.js.map → footer-actions.BG8-pOU-.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Du4aY15F.js → form-layout-title._25l9_Xm.js} +4 -4
- package/dist/chunks/{form-layout-title.Du4aY15F.js.map → form-layout-title._25l9_Xm.js.map} +1 -1
- package/dist/chunks/{generate-uid.D-HFI38h.js → generate-uid.NJ8tVoha.js} +2 -2
- package/dist/chunks/{generate-uid.D-HFI38h.js.map → generate-uid.NJ8tVoha.js.map} +1 -1
- package/dist/chunks/{grid-layout.CqLbbEzI.js → grid-layout.BTLE3rac.js} +21 -21
- package/dist/chunks/{grid-layout.CqLbbEzI.js.map → grid-layout.BTLE3rac.js.map} +1 -1
- package/dist/chunks/{header.CUyEq2ER.js → header.vPx_0dwO.js} +65 -65
- package/dist/chunks/{header.CUyEq2ER.js.map → header.vPx_0dwO.js.map} +1 -1
- package/dist/chunks/{i18n.CPGoe9tN.js → i18n.WMYWtwxB.js} +540 -540
- package/dist/chunks/{i18n.CPGoe9tN.js.map → i18n.WMYWtwxB.js.map} +1 -1
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js → image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js} +3 -3
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map → image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map} +1 -1
- package/dist/chunks/{index.BHiMheJx.js → index.BMkVmbZj.js} +5 -5
- package/dist/chunks/{index.BHiMheJx.js.map → index.BMkVmbZj.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover._ZiXaIcp.js → info-icon-with-popover.CieLDo3g.js} +14 -14
- package/dist/chunks/{info-icon-with-popover._ZiXaIcp.js.map → info-icon-with-popover.CieLDo3g.js.map} +1 -1
- package/dist/chunks/{info-icon.B6QPdxPi.js → info-icon.BCSBCH-5.js} +5 -5
- package/dist/chunks/{info-icon.B6QPdxPi.js.map → info-icon.BCSBCH-5.js.map} +1 -1
- package/dist/chunks/{info.CIFBUqf-.js → info.DYNe2WnZ.js} +4 -4
- package/dist/chunks/{info.CIFBUqf-.js.map → info.DYNe2WnZ.js.map} +1 -1
- package/dist/chunks/{input-field-password.LVaJy8_K.js → input-field-password.OfQkQre5.js} +96 -96
- package/dist/chunks/{input-field-password.LVaJy8_K.js.map → input-field-password.OfQkQre5.js.map} +1 -1
- package/dist/chunks/{input-field.BVewQng_.js → input-field.BrJ-Zb36.js} +9 -9
- package/dist/chunks/{input-field.BVewQng_.js.map → input-field.BrJ-Zb36.js.map} +1 -1
- package/dist/chunks/{inspector.types.DKL2_Mku.js → inspector.types.DQQN1eqF.js} +18 -18
- package/dist/chunks/{inspector.types.DKL2_Mku.js.map → inspector.types.DQQN1eqF.js.map} +1 -1
- package/dist/chunks/{layout-row.CwYDJeG_.js → layout-row.9G7yVMVt.js} +4 -4
- package/dist/chunks/{layout-row.CwYDJeG_.js.map → layout-row.9G7yVMVt.js.map} +1 -1
- package/dist/chunks/{link.DHXLGTkn.js → link.ClFi8uSm.js} +11 -11
- package/dist/chunks/{link.DHXLGTkn.js.map → link.ClFi8uSm.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DsI3DdjJ.js → listbox-option-tag.zYn_kSFz.js} +9 -9
- package/dist/chunks/{listbox-option-tag.DsI3DdjJ.js.map → listbox-option-tag.zYn_kSFz.js.map} +1 -1
- package/dist/chunks/{loading-indicator.N_WV9Gwz.js → loading-indicator.DEepb9Wl.js} +3 -3
- package/dist/chunks/{loading-indicator.N_WV9Gwz.js.map → loading-indicator.DEepb9Wl.js.map} +1 -1
- package/dist/chunks/{menu.C5Y5nSvX.js → menu.CihQsfY6.js} +15 -15
- package/dist/chunks/{menu.C5Y5nSvX.js.map → menu.CihQsfY6.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Bw0CzdjS.js → modal-fullscreen.D39_mhdY.js} +15 -15
- package/dist/chunks/{modal-fullscreen.Bw0CzdjS.js.map → modal-fullscreen.D39_mhdY.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B-_oGtsE.js → modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js} +13 -13
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B-_oGtsE.js.map → modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js.map} +1 -1
- package/dist/chunks/{pagination.OzqU46-J.js → pagination.CGuEx7mk.js} +54 -54
- package/dist/chunks/{pagination.OzqU46-J.js.map → pagination.CGuEx7mk.js.map} +1 -1
- package/dist/chunks/{payment-method.Lwl-3chY.js → payment-method.2IeC7f4x.js} +3 -3
- package/dist/chunks/{payment-method.Lwl-3chY.js.map → payment-method.2IeC7f4x.js.map} +1 -1
- package/dist/chunks/{popover.BFZU1OKv.js → popover.Bzb-pzfB.js} +7 -7
- package/dist/chunks/{popover.BFZU1OKv.js.map → popover.Bzb-pzfB.js.map} +1 -1
- package/dist/chunks/{popper-container.CQblHdJf.js → popper-container.DKDjRvdv.js} +4 -4
- package/dist/chunks/{popper-container.CQblHdJf.js.map → popper-container.DKDjRvdv.js.map} +1 -1
- package/dist/chunks/{promo-banner.DB6C9Tgr.js → promo-banner.BjLfDhBq.js} +12 -12
- package/dist/chunks/{promo-banner.DB6C9Tgr.js.map → promo-banner.BjLfDhBq.js.map} +1 -1
- package/dist/chunks/{radio-group.DVPnBI92.js → radio-group.DkfCMh_u.js} +107 -94
- package/dist/chunks/radio-group.DkfCMh_u.js.map +1 -0
- package/dist/chunks/{radio-input.ButaAWTD.js → radio-input.DKfQGxtp.js} +27 -23
- package/dist/chunks/{radio-input.ButaAWTD.js.map → radio-input.DKfQGxtp.js.map} +1 -1
- package/dist/chunks/{refresh.DvQeGwUF.js → refresh.SzRxQ44W.js} +5 -5
- package/dist/chunks/{refresh.DvQeGwUF.js.map → refresh.SzRxQ44W.js.map} +1 -1
- package/dist/chunks/{search-bar.CPOGuVqp.js → search-bar.5iUfOW7J.js} +12 -12
- package/dist/chunks/{search-bar.CPOGuVqp.js.map → search-bar.5iUfOW7J.js.map} +1 -1
- package/dist/chunks/{search.EnLryD8V.js → search.KgjmJMHa.js} +4 -4
- package/dist/chunks/{search.EnLryD8V.js.map → search.KgjmJMHa.js.map} +1 -1
- package/dist/chunks/{secondary-nav.B1zTf8Ls.js → secondary-nav.JfPd7s37.js} +7 -7
- package/dist/chunks/{secondary-nav.B1zTf8Ls.js.map → secondary-nav.JfPd7s37.js.map} +1 -1
- package/dist/chunks/{segmented-control.DV9mJM7g.js → segmented-control.BIwBQ8i3.js} +9 -9
- package/dist/chunks/{segmented-control.DV9mJM7g.js.map → segmented-control.BIwBQ8i3.js.map} +1 -1
- package/dist/chunks/{selection-card-group.z0SNFpjN.js → selection-card-group.BHYvAL-T.js} +11 -11
- package/dist/chunks/{selection-card-group.z0SNFpjN.js.map → selection-card-group.BHYvAL-T.js.map} +1 -1
- package/dist/chunks/{show.ChPQTrAT.js → show.J9zXGWlK.js} +6 -6
- package/dist/chunks/{show.ChPQTrAT.js.map → show.J9zXGWlK.js.map} +1 -1
- package/dist/chunks/{sidepanel.B-YKxXQA.js → sidepanel.Bk35AAFF.js} +15 -15
- package/dist/chunks/{sidepanel.B-YKxXQA.js.map → sidepanel.Bk35AAFF.js.map} +1 -1
- package/dist/chunks/{status.types.Bh_mGknA.js → status.types.Bdv2zuuh.js} +7 -7
- package/dist/chunks/status.types.Bdv2zuuh.js.map +1 -0
- package/dist/chunks/{step.CGHc2hFZ.js → step.DAB8h_4u.js} +7 -7
- package/dist/chunks/{step.CGHc2hFZ.js.map → step.DAB8h_4u.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DNP6fkCb.js → structured-list-item.wpnBS69h.js} +12 -12
- package/dist/chunks/{structured-list-item.DNP6fkCb.js.map → structured-list-item.wpnBS69h.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.Dm2rULoZ.js → summary-grid-item-custom.C8AD1NAh.js} +7 -7
- package/dist/chunks/{summary-grid-item-custom.Dm2rULoZ.js.map → summary-grid-item-custom.C8AD1NAh.js.map} +1 -1
- package/dist/chunks/{tabs.BXuDJsCU.js → tabs.B5-PZCxc.js} +5 -5
- package/dist/chunks/{tabs.BXuDJsCU.js.map → tabs.B5-PZCxc.js.map} +1 -1
- package/dist/chunks/{tag.bo9YuJ9f.js → tag.BuUbvgok.js} +5 -5
- package/dist/chunks/{tag.bo9YuJ9f.js.map → tag.BuUbvgok.js.map} +1 -1
- package/dist/chunks/{teleport.B255JhsV.js → teleport.B1NhF5-O.js} +4 -4
- package/dist/chunks/{teleport.B255JhsV.js.map → teleport.B1NhF5-O.js.map} +1 -1
- package/dist/chunks/{textarea.FlyFaC5n.js → textarea.C0k8by9A.js} +8 -8
- package/dist/chunks/{textarea.FlyFaC5n.js.map → textarea.C0k8by9A.js.map} +1 -1
- package/dist/chunks/{timeline-item.DYgnYAx0.js → timeline-item.CYw68jQr.js} +47 -47
- package/dist/chunks/{timeline-item.DYgnYAx0.js.map → timeline-item.CYw68jQr.js.map} +1 -1
- package/dist/chunks/{toast.Cp-osZLV.js → toast.CVy2sf_5.js} +22 -22
- package/dist/chunks/{toast.Cp-osZLV.js.map → toast.CVy2sf_5.js.map} +1 -1
- package/dist/chunks/{toggle-button.BABftVnA.js → toggle-button.CCgvi7TQ.js} +4 -4
- package/dist/chunks/{toggle-button.BABftVnA.js.map → toggle-button.CCgvi7TQ.js.map} +1 -1
- package/dist/chunks/{toggle.Bme9eaeR.js → toggle.Dl82VpiQ.js} +5 -5
- package/dist/chunks/{toggle.Bme9eaeR.js.map → toggle.Dl82VpiQ.js.map} +1 -1
- package/dist/chunks/{tooltip.Ch4_ew27.js → tooltip.2MOlGHD9.js} +9 -9
- package/dist/chunks/{tooltip.Ch4_ew27.js.map → tooltip.2MOlGHD9.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js → tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js} +39 -39
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.hNv57lCE.js.map → tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js.map} +1 -1
- package/dist/chunks/{typography.DNzU41ah.js → typography.DN5eC5ch.js} +4 -3
- package/dist/chunks/{typography.DNzU41ah.js.map → typography.DN5eC5ch.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.C2wUDcoc.js → use-bento-toast-controller.D3LA1FCd.js} +3 -3
- package/dist/chunks/{use-bento-toast-controller.C2wUDcoc.js.map → use-bento-toast-controller.D3LA1FCd.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.CvdhdRHz.js → use-cached-selected-values.YAg3m-Af.js} +22 -22
- package/dist/chunks/{use-cached-selected-values.CvdhdRHz.js.map → use-cached-selected-values.YAg3m-Af.js.map} +1 -1
- package/dist/chunks/{use-country-items.D4T1eUtC.js → use-country-items.DJn6gU4P.js} +3 -3
- package/dist/chunks/{use-country-items.D4T1eUtC.js.map → use-country-items.DJn6gU4P.js.map} +1 -1
- package/dist/chunks/{warning-filled.OUOUbA6k.js → warning-filled.tTkVob0l.js} +5 -5
- package/dist/chunks/{warning-filled.OUOUbA6k.js.map → warning-filled.tTkVob0l.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- 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/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/image.js +1 -1
- package/dist/index.js +171 -171
- 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.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +14 -14
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.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/styles/bento-dark.css +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +1 -0
- package/dist/styles/styleguide.css +1 -0
- 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 +1 -1
- package/package.json +2 -2
- package/dist/chunks/date-picker.wNOf4DoV.js.map +0 -1
- package/dist/chunks/date-range-picker.C4l0Xe9R.js.map +0 -1
- package/dist/chunks/divider.ugNXYI-T.js +0 -22
- package/dist/chunks/divider.ugNXYI-T.js.map +0 -1
- package/dist/chunks/es6.D11bE5vq.js.map +0 -1
- package/dist/chunks/radio-group.DVPnBI92.js.map +0 -1
- package/dist/chunks/status.types.Bh_mGknA.js.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as K, useSlots as j, ref as S, watch as B, computed as n,
|
|
2
|
-
import { B as E } from "./typography.
|
|
3
|
-
import { C as Q, a as X } from "./chevron-up.
|
|
1
|
+
import { defineComponent as K, useSlots as j, ref as S, watch as B, computed as n, createElementBlock as i, openBlock as d, normalizeClass as c, createCommentVNode as s, createVNode as L, unref as o, renderSlot as b, withKeys as A, createElementVNode as m, createBlock as _, mergeProps as J, withCtx as f, Transition as q, normalizeStyle as G } from "vue";
|
|
2
|
+
import { B as E } from "./typography.DN5eC5ch.js";
|
|
3
|
+
import { C as Q, a as X } from "./chevron-up.Cu9qXgBY.js";
|
|
4
4
|
import { u as Z } from "./use-expandable-content-height.GkjjbmPy.js";
|
|
5
5
|
import { u as ee } from "./use-has-slot.B7eQSabc.js";
|
|
6
|
-
import { g as ae } from "./generate-uid.
|
|
7
|
-
import { u as te } from "./i18n.
|
|
6
|
+
import { g as ae } from "./generate-uid.NJ8tVoha.js";
|
|
7
|
+
import { u as te } from "./i18n.WMYWtwxB.js";
|
|
8
8
|
import { o as oe } from "./resize.Bqks3WUm.js";
|
|
9
|
-
import { c as ne, B as de } from "./button-actions.
|
|
9
|
+
import { c as ne, B as de } from "./button-actions.DBgK5Qwo.js";
|
|
10
10
|
import { _ as se } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
11
|
import "../assets/card.css";
|
|
12
12
|
var T = /* @__PURE__ */ ((l) => (l.PRIMARY = "primary", l.SECONDARY = "secondary", l))(T || {}), p = /* @__PURE__ */ ((l) => (l.DEFAULT = "default", l.SMALL = "small", l))(p || {});
|
|
13
13
|
const D = {
|
|
14
14
|
"en-US": {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
"pt-BR": {
|
|
19
|
-
showContent: "Mostrar conteúdo",
|
|
20
|
-
hideContent: "Ocultar conteúdo"
|
|
15
|
+
hideContent: "Hide content",
|
|
16
|
+
showContent: "Show content"
|
|
21
17
|
},
|
|
22
18
|
"ja-JP": {
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
hideContent: "コンテンツを非表示",
|
|
20
|
+
showContent: "コンテンツを表示"
|
|
21
|
+
},
|
|
22
|
+
"pt-BR": {
|
|
23
|
+
hideContent: "Ocultar conteúdo",
|
|
24
|
+
showContent: "Mostrar conteúdo"
|
|
25
25
|
}
|
|
26
26
|
}, le = {
|
|
27
27
|
key: 0,
|
|
@@ -121,8 +121,8 @@ const D = {
|
|
|
121
121
|
role: a.expandable ? "button" : null,
|
|
122
122
|
onClick: h,
|
|
123
123
|
onKeypress: [
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
A(h, ["enter"]),
|
|
125
|
+
A(h, ["space"])
|
|
126
126
|
]
|
|
127
127
|
}, [
|
|
128
128
|
m("div", ie, [
|
|
@@ -169,7 +169,7 @@ const D = {
|
|
|
169
169
|
})) : s("", !0)
|
|
170
170
|
])
|
|
171
171
|
], 42, re)) : s("", !0),
|
|
172
|
-
|
|
172
|
+
L(q, { name: "b-card__animation" }, {
|
|
173
173
|
default: f(() => [
|
|
174
174
|
x.value ? (d(), i("div", {
|
|
175
175
|
key: 0,
|
|
@@ -192,7 +192,7 @@ const D = {
|
|
|
192
192
|
key: 1,
|
|
193
193
|
class: c(["b-card__actions", P.value])
|
|
194
194
|
}, [
|
|
195
|
-
|
|
195
|
+
L(o(de), {
|
|
196
196
|
actions: a.actions,
|
|
197
197
|
layout: a.actionsLayout
|
|
198
198
|
}, null, 8, ["actions", "layout"])
|
|
@@ -210,4 +210,4 @@ export {
|
|
|
210
210
|
p as a,
|
|
211
211
|
Se as c
|
|
212
212
|
};
|
|
213
|
-
//# sourceMappingURL=card.
|
|
213
|
+
//# sourceMappingURL=card.BUBXMpP5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.9fQrkeSH.js","sources":["../../../vue2/src/components/card/card.types.ts","../../../vue2/src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\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 // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = withDefaults(\n 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 * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines the color of card background\n */\n background?: BentoCardBackground | `${BentoCardBackground}`;\n\n /**\n * Sets the expandable card in a closed state\n */\n closed?: boolean;\n\n /**\n * Disables the expandable card\n */\n disabled?: boolean;\n\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable?: boolean;\n\n /**\n * Defines the title size of the card header\n */\n titleSize?: BentoCardTitleSize | `${BentoCardTitleSize}`;\n }>(),\n {\n actions: null,\n actionsLayout: BentoButtonActionsLayout.BUTTONS_END,\n background: BentoCardBackground.PRIMARY,\n closed: false,\n disabled: false,\n expandable: false,\n titleSize: BentoCardTitleSize.DEFAULT,\n }\n );\n\n const emit = defineEmits<{\n (e: 'click');\n (e: 'expanded', isExpanded: boolean);\n }>();\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n } as InstanceType<typeof BentoTypography>['$props'])\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\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 const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/card/card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","t","useI18n","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","contentDiv","ref","cardId","generateUid","showContent","watch","value","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick"],"mappings":";;;;;;;;;;;AAGY,IAA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,CAAAA,KAAA1B,EAAA,UACI0B,IAAAC,GAAA3B,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIsB,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ;AAGJ,UAAAM,IAAA,MAAA;AACI,MAAA,CAAAhC,EAAA,YAAAA,EAAA,eACIQ,EAAA,QAAA,CAAAA,EAAA,OACAN,EAAA,YAAAM,EAAA,KAAA,GACAkB,EAAA;AAAA,IACJ,GAGJO,IAAA,MAAA;AACI,MAAAjC,EAAA,YACIE,EAAA,OAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"card.BUBXMpP5.js","sources":["../../../vue2/src/components/card/card.types.ts","../../../vue2/src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\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 // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = withDefaults(\n 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 * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines the color of card background\n */\n background?: BentoCardBackground | `${BentoCardBackground}`;\n\n /**\n * Sets the expandable card in a closed state\n */\n closed?: boolean;\n\n /**\n * Disables the expandable card\n */\n disabled?: boolean;\n\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable?: boolean;\n\n /**\n * Defines the title size of the card header\n */\n titleSize?: BentoCardTitleSize | `${BentoCardTitleSize}`;\n }>(),\n {\n actions: null,\n actionsLayout: BentoButtonActionsLayout.BUTTONS_END,\n background: BentoCardBackground.PRIMARY,\n closed: false,\n disabled: false,\n expandable: false,\n titleSize: BentoCardTitleSize.DEFAULT,\n }\n );\n\n const emit = defineEmits<{\n (e: 'click');\n (e: 'expanded', isExpanded: boolean);\n }>();\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n } as InstanceType<typeof BentoTypography>['$props'])\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\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 const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/card/card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","t","useI18n","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","contentDiv","ref","cardId","generateUid","showContent","watch","value","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,G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,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ;AAGJ,UAAAM,IAAA,MAAA;AACI,MAAA,CAAAhC,EAAA,YAAAA,EAAA,eACIQ,EAAA,QAAA,CAAAA,EAAA,OACAN,EAAA,YAAAM,EAAA,KAAA,GACAkB,EAAA;AAAA,IACJ,GAGJO,IAAA,MAAA;AACI,MAAAjC,EAAA,YACIE,EAAA,OAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as B, toRef as I, computed as l, watch as y, ref as T, resolveComponent as m,
|
|
2
|
-
import {
|
|
3
|
-
import { g as P } from "./generate-uid.
|
|
4
|
-
import { d as R } from "./typography.
|
|
1
|
+
import { defineComponent as B, toRef as I, computed as l, watch as y, ref as T, resolveComponent as m, createElementBlock as v, openBlock as n, createVNode as N, createBlock as E, createCommentVNode as V, normalizeClass as w, withCtx as s, Fragment as O, renderList as A, createSlots as G, createTextVNode as k, toDisplayString as S, renderSlot as L, mergeProps as _ } from "vue";
|
|
2
|
+
import { a as d, B as U } from "./checkbox.J51-tG4g.js";
|
|
3
|
+
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
+
import { d as R } from "./typography.DN5eC5ch.js";
|
|
5
5
|
import { u as q } from "./use-form-layout-loading.D3lALhtC.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { E as $ } from "./error-message.qsc0nOWT.js";
|
|
7
|
+
import { C as z } from "./controls-group.CjqybvY2.js";
|
|
8
8
|
import { _ as D } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
9
|
import "../assets/checkbox-group.css";
|
|
10
10
|
var i = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(i || {});
|
|
11
11
|
const C = "bento-checkbox-group", F = B({
|
|
12
12
|
name: C,
|
|
13
|
-
components: { BentoCheckbox: U, ControlsGroup:
|
|
13
|
+
components: { BentoCheckbox: U, ControlsGroup: z, ErrorMessage: $ },
|
|
14
14
|
model: { prop: "modelValue" },
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -129,7 +129,7 @@ function Z(e, u, b, f, a, g) {
|
|
|
129
129
|
const c = m("bento-checkbox"), p = m("controls-group"), t = m("error-message");
|
|
130
130
|
return n(), v("div", H, [
|
|
131
131
|
N(p, {
|
|
132
|
-
class:
|
|
132
|
+
class: w(["b-checkbox-group__checkboxes", e.conditionalClasses]),
|
|
133
133
|
"aria-describedby": e.shouldShowGroupErrorMessage ? e.errorId : "",
|
|
134
134
|
"component-name": e.COMPONENT_NAME,
|
|
135
135
|
description: e.description,
|
|
@@ -142,7 +142,7 @@ function Z(e, u, b, f, a, g) {
|
|
|
142
142
|
"tooltip-text": e.tooltipText
|
|
143
143
|
}, {
|
|
144
144
|
default: s(() => [
|
|
145
|
-
(n(!0), v(
|
|
145
|
+
(n(!0), v(O, null, A(e.items, (o) => (n(), E(c, {
|
|
146
146
|
key: o.value,
|
|
147
147
|
"model-value": e.inputValue,
|
|
148
148
|
value: o.value,
|
|
@@ -152,7 +152,7 @@ function Z(e, u, b, f, a, g) {
|
|
|
152
152
|
readonly: e.isReadOnly || o.readonly,
|
|
153
153
|
tag: o.tag,
|
|
154
154
|
"onUpdate:modelValue": e.onInput
|
|
155
|
-
},
|
|
155
|
+
}, G({
|
|
156
156
|
default: s(() => [
|
|
157
157
|
k(S(o.label), 1)
|
|
158
158
|
]),
|
|
@@ -168,7 +168,7 @@ function Z(e, u, b, f, a, g) {
|
|
|
168
168
|
e.hasContentSlot("content") ? {
|
|
169
169
|
name: "content",
|
|
170
170
|
fn: s(() => [
|
|
171
|
-
|
|
171
|
+
L(e.$slots, "content", _({ ref_for: !0 }, o), void 0, !0)
|
|
172
172
|
]),
|
|
173
173
|
key: "1"
|
|
174
174
|
} : void 0
|
|
@@ -181,7 +181,7 @@ function Z(e, u, b, f, a, g) {
|
|
|
181
181
|
id: e.errorId,
|
|
182
182
|
"error-message": e.errorMessage,
|
|
183
183
|
class: "b-checkbox-group__error-message"
|
|
184
|
-
}, null, 8, ["id", "error-message"])) :
|
|
184
|
+
}, null, 8, ["id", "error-message"])) : V("", !0)
|
|
185
185
|
]);
|
|
186
186
|
}
|
|
187
187
|
const ee = /* @__PURE__ */ D(F, [["render", Z], ["__scopeId", "data-v-0b4123a9"]]);
|
|
@@ -189,4 +189,4 @@ export {
|
|
|
189
189
|
i as B,
|
|
190
190
|
ee as c
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=checkbox-group.
|
|
192
|
+
//# sourceMappingURL=checkbox-group.DOAFzAX-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.Dq57AigF.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA,EAAA,MAAA,aAAA;AAAA,EAC7B,OAAA;AAAA;AAAA;AAAA;AAAA,IACrB,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAIwC,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKD,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,QAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAOI,WAAA,EAAA,MAAA,SAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,OAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKgC,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKpC,YAAA,EAAA,MAAA,OAAA,SAAA,MAAA,CAAA,EAAA;AAAA;AAAA;A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zAX-.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA,EAAA,MAAA,a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A;YA+BoB,MAAA;AAAA,YAAA,IAAAK,EAAA,MAAA;AAAA,cA/BpBG,EAAAf,EAAA,QAAA,WAAAgB,EAAA,EAAA,SAAA,GAAA,GAAAT,CAAA,GAAA,QAAA,EAAA;AAAA,YAAA,CAAA;AAAA,YAAA,KAAA;AAAA,UAAA,IAAA;AAAA,gIAAA,GAAA,GAAA;AAAA,MAAA,CAAA;AAAA,MAoCkBrB,GAAAA;AAAAA,IAAAA,GAAAA,GAAAA,CAAAA,oBAAAA,kBAAAA,SAAAA,eAAAA,YAAAA,QAAAA,cAAAA,SAAAA,YAAAA,YAAAA,cAAAA,CAAAA;AAAAA,IAIRc,EAAA,+BAAAH,EAAA,GAAAW,EAAAS,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAjB,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA,MAvClB,OAAA;AAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAkB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as H } from "./checkmark-small.
|
|
1
|
+
import { createElementBlock as v, openBlock as r, mergeProps as w, createCommentVNode as D, createElementVNode as x, toDisplayString as O, defineComponent as S, toRefs as U, computed as l, normalizeClass as C, createBlock as E, unref as t } from "vue";
|
|
2
|
+
import { C as H } from "./checkmark-small.BDqUF-Ni.js";
|
|
3
3
|
import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
4
|
import "../assets/checkbox-input.css";
|
|
5
5
|
var n = /* @__PURE__ */ ((e) => (e.UNCHECKED = "unchecked", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(n || {}), m = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e))(m || {});
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
Y as N,
|
|
148
148
|
q as a
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=checkbox-input.
|
|
150
|
+
//# sourceMappingURL=checkbox-input.CAYgiRHG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-input.D8ZUqd4m.js","sources":["../../../core/src/components/internal/checkbox-input/checkbox-input.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/minus-small.vue","../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["export type MultiCheckboxInputType = Array<string | number>;\nexport type CheckboxInputType = boolean | MultiCheckboxInputType;\n\nexport enum CheckboxInputState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum CheckboxInputEvent {\n UPDATE = 'update:model-value',\n}\n\ninterface CheckboxInputGroupItem {\n value: string | number;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type CheckboxInputGroupItems = Array<CheckboxInputGroupItem>;\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M4.25 7.25H11.75V8.75H4.25V7.25Z\"/></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-checkbox-input\" :class=\"conditionalClasses\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <checkmark-small-icon v-else-if=\"isChecked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <input\n :id=\"id\"\n ref=\"inputRef\"\n type=\"checkbox\"\n class=\"b-checkbox-input__outline\"\n :class=\"outlineConditionalClasses\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedby\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"indeterminate\"\n :value=\"value\"\n :aria-readonly=\"readonly\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, HTMLAttributes, PropType, toRefs } from 'vue';\n import {\n CheckboxInputEvent,\n CheckboxInputGroupItems,\n CheckboxInputState,\n CheckboxInputType,\n MultiCheckboxInputType,\n } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the checkbox. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<CheckboxInputType | CheckboxInputGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n });\n\n const emit = defineEmits<{\n /**\n * Emit that emits the input value\n */\n (e: 'update:model-value', value: boolean | Array<string | number>): void;\n }>();\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${CheckboxInputState.UNCHECKED}`]: !isChecked.value && !props.indeterminate,\n [`b-checkbox-input__outline--${CheckboxInputState.ERROR}`]: props.hasError,\n [`b-checkbox-input__outline--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as MultiCheckboxInputType).some(item => item === value.value);\n });\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n props.indeterminate ? 'mixed' : `${!!isChecked.value}`\n );\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(\n () => props.hasError && !props.disabled && !props.readonly\n );\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n return;\n }\n };\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as MultiCheckboxInputType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(CheckboxInputEvent.UPDATE, newCheckedList);\n } else {\n emit(CheckboxInputEvent.UPDATE, newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a checkbox input (without label)\n *\n * @example\n * import { BentoCheckboxInput } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <bento-checkbox-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'checkbox-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/checkbox-input/checkbox-input.scss\" />\n"],"names":["CheckboxInputState","CheckboxInputState2","CheckboxInputEvent","CheckboxInputEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","props","__props","emit","__emit","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","computed","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index"],"mappings":";;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBADQA,IAAAD,KAAA,CAAA,CAAA;ACLR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;;AARR,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;gFAFzHC,EAAA,IA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A;AACI;AAGJ,YAAAiB,IAAAF,EAAA,OAAA;AAEA,UAAAL,EAAA,OAAA;AACI,cAAAQ,IAAA,CAAA,GAAAhB,EAAA,KAAA,GACAiB,IAAAD,EAAA,QAAAd,EAAA,KAAA;AAEA,QAAAe,MAAA,KACID,EAAA,KAAAd,EAAA,KAAA,IAEAc,EAAA,OAAAC,GAAA,CAAA,GAEJrB,EAAAX,EAAA,QAAA+B,CAAA;AAAA,MAA8C;AAE9C,QAAApB,EAAAX,EAAA,QAAA8B,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"checkbox-input.CAYgiRHG.js","sources":["../../../core/src/components/internal/checkbox-input/checkbox-input.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/minus-small.vue","../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["export type MultiCheckboxInputType = Array<string | number>;\nexport type CheckboxInputType = boolean | MultiCheckboxInputType;\n\nexport enum CheckboxInputState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum CheckboxInputEvent {\n UPDATE = 'update:model-value',\n}\n\ninterface CheckboxInputGroupItem {\n value: string | number;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type CheckboxInputGroupItems = Array<CheckboxInputGroupItem>;\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M4.25 7.25H11.75V8.75H4.25V7.25Z\"/></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-checkbox-input\" :class=\"conditionalClasses\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <checkmark-small-icon v-else-if=\"isChecked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <input\n :id=\"id\"\n ref=\"inputRef\"\n type=\"checkbox\"\n class=\"b-checkbox-input__outline\"\n :class=\"outlineConditionalClasses\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedby\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"indeterminate\"\n :value=\"value\"\n :aria-readonly=\"readonly\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, HTMLAttributes, PropType, toRefs } from 'vue';\n import {\n CheckboxInputEvent,\n CheckboxInputGroupItems,\n CheckboxInputState,\n CheckboxInputType,\n MultiCheckboxInputType,\n } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the checkbox. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<CheckboxInputType | CheckboxInputGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n });\n\n const emit = defineEmits<{\n /**\n * Emit that emits the input value\n */\n (e: 'update:model-value', value: boolean | Array<string | number>): void;\n }>();\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${CheckboxInputState.UNCHECKED}`]: !isChecked.value && !props.indeterminate,\n [`b-checkbox-input__outline--${CheckboxInputState.ERROR}`]: props.hasError,\n [`b-checkbox-input__outline--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as MultiCheckboxInputType).some(item => item === value.value);\n });\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n props.indeterminate ? 'mixed' : `${!!isChecked.value}`\n );\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(\n () => props.hasError && !props.disabled && !props.readonly\n );\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n return;\n }\n };\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as MultiCheckboxInputType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(CheckboxInputEvent.UPDATE, newCheckedList);\n } else {\n emit(CheckboxInputEvent.UPDATE, newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a checkbox input (without label)\n *\n * @example\n * import { BentoCheckboxInput } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <bento-checkbox-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'checkbox-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/checkbox-input/checkbox-input.scss\" />\n"],"names":["CheckboxInputState","CheckboxInputState2","CheckboxInputEvent","CheckboxInputEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","props","__props","emit","__emit","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","computed","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index"],"mappings":";;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,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AoB,MAAAX,EAAA,gBAAA,UAAA,GAAA,CAAA,CAAAa,EAAA,KAAA;AAAA,IACoC,GAExDI,IAAAN;AAAA,MAAoB,MAAAX,EAAA,YAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA;AAAA,IACkC,GAItDkB,IAAA,CAAAC,MAAA;AACI,UAAAZ,EAAA,OAAA;AACI,QAAAY,EAAA,eAAA;AACA;AAAA,MAAA;AAAA,IACJ,GAEJC,IAAA,CAAAD,MAAA;AACI,UAAAf,EAAA;AACI;AAGJ,YAAAiB,IAAAF,EAAA,OAAA;AAEA,UAAAL,EAAA,OAAA;AACI,cAAAQ,IAAA,CAAA,GAAAhB,EAAA,KAAA,GACAiB,IAAAD,EAAA,QAAAd,EAAA,KAAA;AAEA,QAAAe,MAAA,KACID,EAAA,KAAAd,EAAA,KAAA,IAEAc,EAAA,OAAAC,GAAA,CAAA,GAEJrB,EAAAX,EAAA,QAAA+B,CAAA;AAAA,MAA8C;AAE9C,QAAApB,EAAAX,EAAA,QAAA8B,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as Y, toRefs as I, computed as a, ref as K, resolveComponent as f,
|
|
2
|
-
import { B as Z } from "./typography.
|
|
1
|
+
import { defineComponent as Y, toRefs as I, computed as a, ref as K, resolveComponent as f, createElementBlock as D, openBlock as r, normalizeClass as Q, createVNode as W, createCommentVNode as l, mergeProps as T, createBlock as n, withCtx as s, createElementVNode as X, renderSlot as E, createTextVNode as U, toDisplayString as q } from "vue";
|
|
2
|
+
import { B as Z } from "./typography.DN5eC5ch.js";
|
|
3
3
|
import { u as G } from "./use-default-slot-validator.O02rzsob.js";
|
|
4
4
|
import { u as x } from "./use-has-slot.B7eQSabc.js";
|
|
5
|
-
import { g as L } from "./generate-uid.
|
|
5
|
+
import { g as L } from "./generate-uid.NJ8tVoha.js";
|
|
6
6
|
import { g as A } from "./get-slot-text.D5WBGjic.js";
|
|
7
|
-
import { u as ee } from "./i18n.
|
|
7
|
+
import { u as ee } from "./i18n.WMYWtwxB.js";
|
|
8
8
|
import { u as ae } from "./aria-label.CaUURpnB.js";
|
|
9
|
-
import { B as oe } from "./tag.
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { B as oe } from "./tag.BuUbvgok.js";
|
|
10
|
+
import { E as re } from "./error-message.qsc0nOWT.js";
|
|
11
|
+
import { a as te, C as N } from "./checkbox-input.CAYgiRHG.js";
|
|
12
12
|
import { _ as le } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import "../assets/checkbox.css";
|
|
14
14
|
var d = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(d || {});
|
|
@@ -18,15 +18,15 @@ const M = {
|
|
|
18
18
|
optional: "optional",
|
|
19
19
|
required: "required"
|
|
20
20
|
},
|
|
21
|
-
"pt-BR": {
|
|
22
|
-
checkbox: "Caixa de seleção",
|
|
23
|
-
optional: "opcional",
|
|
24
|
-
required: "obrigatório"
|
|
25
|
-
},
|
|
26
21
|
"ja-JP": {
|
|
27
22
|
checkbox: "チェックボックス",
|
|
28
23
|
optional: "任意",
|
|
29
24
|
required: "必須"
|
|
25
|
+
},
|
|
26
|
+
"pt-BR": {
|
|
27
|
+
checkbox: "Caixa de seleção",
|
|
28
|
+
optional: "opcional",
|
|
29
|
+
required: "obrigatório"
|
|
30
30
|
}
|
|
31
31
|
}, ne = Y({
|
|
32
32
|
name: "bento-checkbox",
|
|
@@ -34,8 +34,8 @@ const M = {
|
|
|
34
34
|
components: {
|
|
35
35
|
BentoTag: oe,
|
|
36
36
|
BentoTypography: Z,
|
|
37
|
-
CheckboxInput:
|
|
38
|
-
ErrorMessage:
|
|
37
|
+
CheckboxInput: te,
|
|
38
|
+
ErrorMessage: re
|
|
39
39
|
},
|
|
40
40
|
model: { prop: "modelValue" },
|
|
41
41
|
props: {
|
|
@@ -163,7 +163,7 @@ function de(e, _, h, t, y, g) {
|
|
|
163
163
|
"onUpdate:modelValue": e.onChange
|
|
164
164
|
}), null, 16, ["aria-label", "aria-describedby", "disabled", "has-error", "indeterminate", "value", "model-value", "readonly", "onUpdate:modelValue"]),
|
|
165
165
|
e.hasSlot("default") || e.shouldShowErrorMessage ? (r(), D("span", se, [
|
|
166
|
-
e.hasSlot("default") ? (r(),
|
|
166
|
+
e.hasSlot("default") ? (r(), n(o, {
|
|
167
167
|
key: 0,
|
|
168
168
|
class: "b-checkbox__label",
|
|
169
169
|
el: "span",
|
|
@@ -173,7 +173,7 @@ function de(e, _, h, t, y, g) {
|
|
|
173
173
|
X("span", null, [
|
|
174
174
|
E(e.$slots, "default", {}, void 0, !0)
|
|
175
175
|
]),
|
|
176
|
-
e.optional ? (r(),
|
|
176
|
+
e.optional ? (r(), n(o, {
|
|
177
177
|
key: 0,
|
|
178
178
|
class: "b-checkbox__label-requirement",
|
|
179
179
|
el: "span"
|
|
@@ -182,7 +182,7 @@ function de(e, _, h, t, y, g) {
|
|
|
182
182
|
U("(" + q(e.t("optional")) + ")", 1)
|
|
183
183
|
]),
|
|
184
184
|
_: 1
|
|
185
|
-
})) : e.required ? (r(),
|
|
185
|
+
})) : e.required ? (r(), n(o, {
|
|
186
186
|
key: 1,
|
|
187
187
|
class: "b-checkbox__label-requirement",
|
|
188
188
|
el: "span"
|
|
@@ -191,15 +191,15 @@ function de(e, _, h, t, y, g) {
|
|
|
191
191
|
U("(" + q(e.t("required")) + ")", 1)
|
|
192
192
|
]),
|
|
193
193
|
_: 1
|
|
194
|
-
})) :
|
|
195
|
-
e.tag ? (r(),
|
|
194
|
+
})) : l("", !0),
|
|
195
|
+
e.tag ? (r(), n(u, T({
|
|
196
196
|
key: 2,
|
|
197
197
|
class: "b-checkbox__label-tag"
|
|
198
|
-
}, e.tag), null, 16)) :
|
|
198
|
+
}, e.tag), null, 16)) : l("", !0)
|
|
199
199
|
]),
|
|
200
200
|
_: 3
|
|
201
|
-
})) :
|
|
202
|
-
e.hasSlot("default") && e.hasSlot("description") ? (r(),
|
|
201
|
+
})) : l("", !0),
|
|
202
|
+
e.hasSlot("default") && e.hasSlot("description") ? (r(), n(o, {
|
|
203
203
|
key: 1,
|
|
204
204
|
id: e.descriptionId,
|
|
205
205
|
class: "b-checkbox__description",
|
|
@@ -210,13 +210,13 @@ function de(e, _, h, t, y, g) {
|
|
|
210
210
|
E(e.$slots, "description", {}, void 0, !0)
|
|
211
211
|
]),
|
|
212
212
|
_: 3
|
|
213
|
-
}, 8, ["id"])) :
|
|
214
|
-
e.shouldShowErrorMessage ? (r(),
|
|
213
|
+
}, 8, ["id"])) : l("", !0),
|
|
214
|
+
e.shouldShowErrorMessage ? (r(), n(v, {
|
|
215
215
|
key: 2,
|
|
216
216
|
id: e.errorId,
|
|
217
217
|
"error-message": e.errorMessage
|
|
218
|
-
}, null, 8, ["id", "error-message"])) :
|
|
219
|
-
e.contentSlotAvailable ? (r(),
|
|
218
|
+
}, null, 8, ["id", "error-message"])) : l("", !0),
|
|
219
|
+
e.contentSlotAvailable ? (r(), n(o, {
|
|
220
220
|
key: 3,
|
|
221
221
|
class: "b-checkbox__content",
|
|
222
222
|
el: "span",
|
|
@@ -226,8 +226,8 @@ function de(e, _, h, t, y, g) {
|
|
|
226
226
|
E(e.$slots, "content", {}, void 0, !0)
|
|
227
227
|
]),
|
|
228
228
|
_: 3
|
|
229
|
-
})) :
|
|
230
|
-
])) :
|
|
229
|
+
})) : l("", !0)
|
|
230
|
+
])) : l("", !0)
|
|
231
231
|
], 2);
|
|
232
232
|
}
|
|
233
233
|
const Be = /* @__PURE__ */ le(ne, [["render", de], ["__scopeId", "data-v-3d320a6b"]]);
|
|
@@ -235,4 +235,4 @@ export {
|
|
|
235
235
|
Be as B,
|
|
236
236
|
d as a
|
|
237
237
|
};
|
|
238
|
-
//# sourceMappingURL=checkbox.
|
|
238
|
+
//# sourceMappingURL=checkbox.J51-tG4g.js.map
|