@adyen/bento-vue3 1.84.2 → 1.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +6 -0
- package/dist/@types/index.d.ts +480 -268
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +5 -0
- package/dist/ai-tag.js.map +1 -0
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +5 -0
- package/dist/anchor-scroller.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-tag.css +1 -0
- package/dist/assets/anchor-scroller.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chip.js +1 -1
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
- package/dist/chunks/{accordion-item.yRlQj4VF.js → accordion-item.QQ06tTjt.js} +8 -8
- package/dist/chunks/{accordion-item.yRlQj4VF.js.map → accordion-item.QQ06tTjt.js.map} +1 -1
- package/dist/chunks/action-bar.g7rM3wUc.js +209 -0
- package/dist/chunks/action-bar.g7rM3wUc.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
- package/dist/chunks/ai-button.XfeGC4-Q.js +57 -0
- package/dist/chunks/ai-button.XfeGC4-Q.js.map +1 -0
- package/dist/chunks/ai-tag.UlRkq54l.js +139 -0
- package/dist/chunks/ai-tag.UlRkq54l.js.map +1 -0
- package/dist/chunks/{alert.BYcw-u3b.js → alert.CDWtu0Hu.js} +11 -11
- package/dist/chunks/{alert.BYcw-u3b.js.map → alert.CDWtu0Hu.js.map} +1 -1
- package/dist/chunks/anchor-scroller.CKIQu3NK.js +215 -0
- package/dist/chunks/anchor-scroller.CKIQu3NK.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/arrow-left.C6UiqO-c.js +29 -0
- package/dist/chunks/arrow-left.C6UiqO-c.js.map +1 -0
- package/dist/chunks/arrow-right.fSdLV_ho.js +29 -0
- package/dist/chunks/arrow-right.fSdLV_ho.js.map +1 -0
- package/dist/chunks/artificial-intelligence-ai-filled.AhDHffzT.js +44 -0
- package/dist/chunks/artificial-intelligence-ai-filled.AhDHffzT.js.map +1 -0
- package/dist/chunks/{avatar.CNGMjwg3.js → avatar.Caeba-pw.js} +3 -3
- package/dist/chunks/{avatar.CNGMjwg3.js.map → avatar.Caeba-pw.js.map} +1 -1
- package/dist/chunks/{base-button.CUd03aA2.js → base-button.CRYAiuzn.js} +9 -9
- package/dist/chunks/{base-button.CUd03aA2.js.map → base-button.CRYAiuzn.js.map} +1 -1
- package/dist/chunks/{base-modal.D3GyeCFT.js → base-modal.D5HrjwL1.js} +23 -23
- package/dist/chunks/{base-modal.D3GyeCFT.js.map → base-modal.D5HrjwL1.js.map} +1 -1
- package/dist/chunks/{bin.DuHlEQBO.js → bin.Cude0fiB.js} +4 -4
- package/dist/chunks/{bin.DuHlEQBO.js.map → bin.Cude0fiB.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js → button-actions-with-menu.DBqA3Ws5.js} +7 -7
- package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js.map → button-actions-with-menu.DBqA3Ws5.js.map} +1 -1
- package/dist/chunks/{button-actions.Crj4QFAd.js → button-actions.BH-J7dux.js} +17 -17
- package/dist/chunks/{button-actions.Crj4QFAd.js.map → button-actions.BH-J7dux.js.map} +1 -1
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.CSp48LJt.js → button.C6t9_lzm.js} +12 -12
- package/dist/chunks/{button.CSp48LJt.js.map → button.C6t9_lzm.js.map} +1 -1
- package/dist/chunks/{calendar.DKPx_cQU.js → calendar.DzeJoNc2.js} +113 -107
- package/dist/chunks/{calendar.DKPx_cQU.js.map → calendar.DzeJoNc2.js.map} +1 -1
- package/dist/chunks/{card.C_03IYJe.js → card.DcXXdxWL.js} +7 -7
- package/dist/chunks/{card.C_03IYJe.js.map → card.DcXXdxWL.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DZrhxIHp.js → checkbox-group.Bh_aqKoA.js} +11 -11
- package/dist/chunks/{checkbox-group.DZrhxIHp.js.map → checkbox-group.Bh_aqKoA.js.map} +1 -1
- package/dist/chunks/{checkbox-input.Dk9iFQQe.js → checkbox-input.BZjSoCQW.js} +4 -4
- package/dist/chunks/{checkbox-input.Dk9iFQQe.js.map → checkbox-input.BZjSoCQW.js.map} +1 -1
- package/dist/chunks/{checkbox.BWgWtiLJ.js → checkbox.7kpOXm-b.js} +22 -22
- package/dist/chunks/{checkbox.BWgWtiLJ.js.map → checkbox.7kpOXm-b.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill._6-d40ru.js → checkmark-circle-fill.DugX5fbG.js} +4 -4
- package/dist/chunks/{checkmark-circle-fill._6-d40ru.js.map → checkmark-circle-fill.DugX5fbG.js.map} +1 -1
- package/dist/chunks/{checkmark-small.x-gmK2Dt.js → checkmark-small.CRuZauJc.js} +5 -5
- package/dist/chunks/{checkmark-small.x-gmK2Dt.js.map → checkmark-small.CRuZauJc.js.map} +1 -1
- package/dist/chunks/{chevron-down.DCQ6ZLaq.js → chevron-down.XeE-LBV_.js} +5 -5
- package/dist/chunks/{chevron-down.DCQ6ZLaq.js.map → chevron-down.XeE-LBV_.js.map} +1 -1
- package/dist/chunks/{chevron-left.Cfn1uGLH.js → chevron-left.C_vPW7OR.js} +8 -8
- package/dist/chunks/{chevron-left.Cfn1uGLH.js.map → chevron-left.C_vPW7OR.js.map} +1 -1
- package/dist/chunks/{chevron-up.kfuLRpZb.js → chevron-up.Cmgl2a3x.js} +5 -5
- package/dist/chunks/{chevron-up.kfuLRpZb.js.map → chevron-up.Cmgl2a3x.js.map} +1 -1
- package/dist/chunks/{chip.eefnwpgE.js → chip.CyW1V8RU.js} +7 -7
- package/dist/chunks/{chip.eefnwpgE.js.map → chip.CyW1V8RU.js.map} +1 -1
- package/dist/chunks/{click-outside.C1Ud8AA2.js → click-outside.CDz_x8mN.js} +2 -2
- package/dist/chunks/{click-outside.C1Ud8AA2.js.map → click-outside.CDz_x8mN.js.map} +1 -1
- package/dist/chunks/{code-snippet.BX3Yeo0x.js → code-snippet.UIqVTv4U.js} +15 -15
- package/dist/chunks/{code-snippet.BX3Yeo0x.js.map → code-snippet.UIqVTv4U.js.map} +1 -1
- package/dist/chunks/{codemirror.Cy7iSLbd.js → codemirror.D2BAltnu.js} +3688 -3673
- package/dist/chunks/codemirror.D2BAltnu.js.map +1 -0
- package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
- package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
- package/dist/chunks/{controls-group.DpFv8c4E.js → controls-group.Dip3WAKV.js} +10 -10
- package/dist/chunks/{controls-group.DpFv8c4E.js.map → controls-group.Dip3WAKV.js.map} +1 -1
- package/dist/chunks/{copy.xg9ElNxd.js → copy.ByyQlckP.js} +6 -6
- package/dist/chunks/{copy.xg9ElNxd.js.map → copy.ByyQlckP.js.map} +1 -1
- package/dist/chunks/{country.vSfTQW51.js → country.DJts6kCv.js} +5 -5
- package/dist/chunks/{country.vSfTQW51.js.map → country.DJts6kCv.js.map} +1 -1
- package/dist/chunks/{country.types.DaVCMxk-.js → country.types.BBQbWkTY.js} +3 -3
- package/dist/chunks/{country.types.DaVCMxk-.js.map → country.types.BBQbWkTY.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill-small.Dv5-PxwF.js → cross-circle-fill-small.H1wH-vcZ.js} +5 -5
- package/dist/chunks/{cross-circle-fill-small.Dv5-PxwF.js.map → cross-circle-fill-small.H1wH-vcZ.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.CYLL7jfC.js → cross-circle-fill.BWCKKn0E.js} +4 -4
- package/dist/chunks/{cross-circle-fill.CYLL7jfC.js.map → cross-circle-fill.BWCKKn0E.js.map} +1 -1
- package/dist/chunks/{cross-small.n1UO5wNB.js → cross-small.Bjq2Gqvh.js} +5 -5
- package/dist/chunks/{cross-small.n1UO5wNB.js.map → cross-small.Bjq2Gqvh.js.map} +1 -1
- package/dist/chunks/{cross.B92GxFTY.js → cross.CCHdi6v3.js} +5 -5
- package/dist/chunks/{cross.B92GxFTY.js.map → cross.CCHdi6v3.js.map} +1 -1
- package/dist/chunks/{currency.DijmAkAB.js → currency.Afx8MVdY.js} +4 -4
- package/dist/chunks/{currency.DijmAkAB.js.map → currency.Afx8MVdY.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D_k3_Z2T.js → dashboard-section.CIHtXoeW.js} +8 -8
- package/dist/chunks/{dashboard-section.D_k3_Z2T.js.map → dashboard-section.CIHtXoeW.js.map} +1 -1
- package/dist/chunks/{dashed-underline.B0z2ZZh7.js → dashed-underline.CLwPU-C2.js} +14 -14
- package/dist/chunks/{dashed-underline.B0z2ZZh7.js.map → dashed-underline.CLwPU-C2.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DdIrvOXp.js → data-grid-template.BTpSfkQt.js} +8 -8
- package/dist/chunks/{data-grid-template.DdIrvOXp.js.map → data-grid-template.BTpSfkQt.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
- package/dist/chunks/{data-grid.CqtJp9rE.js → data-grid.CXDdiHz8.js} +1239 -1236
- package/dist/chunks/data-grid.CXDdiHz8.js.map +1 -0
- package/dist/chunks/date-input.XSJuuCHe.js +20 -0
- package/dist/chunks/date-input.XSJuuCHe.js.map +1 -0
- package/dist/chunks/{date-picker.DGIwFh6T.js → date-picker.CvTSZhMI.js} +82 -81
- package/dist/chunks/date-picker.CvTSZhMI.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.BPCt7cwj.js +1100 -0
- package/dist/chunks/date-range-picker.BPCt7cwj.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date.CL55prL0.js → date.BtB1HyWQ.js} +4 -4
- package/dist/chunks/{date.CL55prL0.js.map → date.BtB1HyWQ.js.map} +1 -1
- package/dist/chunks/de.DvtL0g75.js.map +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
- package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
- package/dist/chunks/dialog-page.B3ptLXXP.js +162 -0
- package/dist/chunks/dialog-page.B3ptLXXP.js.map +1 -0
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
- package/dist/chunks/{directive.Cbdox5VL.js → directive.rXUeDb8p.js} +2 -2
- package/dist/chunks/{directive.Cbdox5VL.js.map → directive.rXUeDb8p.js.map} +1 -1
- package/dist/chunks/{divider.Dho4_hQ7.js → divider.BIY84UH7.js} +5 -5
- package/dist/chunks/{divider.Dho4_hQ7.js.map → divider.BIY84UH7.js.map} +1 -1
- package/dist/chunks/{dot.ob6N-5Um.js → dot.DBmwmOUN.js} +5 -5
- package/dist/chunks/{dot.ob6N-5Um.js.map → dot.DBmwmOUN.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.DFtFMu5G.js → dropdown-default-textbox.B-_dTUVX.js} +107 -117
- package/dist/chunks/dropdown-default-textbox.B-_dTUVX.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Bf6TiNZw.js → dropdown-tag.DDNOZhEG.js} +20 -20
- package/dist/chunks/{dropdown-tag.Bf6TiNZw.js.map → dropdown-tag.DDNOZhEG.js.map} +1 -1
- package/dist/chunks/dropdown.CU6nfq3V.js +836 -0
- package/dist/chunks/dropdown.CU6nfq3V.js.map +1 -0
- package/dist/chunks/{empty-state.D_ifpeU-.js → empty-state.DqdPzU-g.js} +15 -15
- package/dist/chunks/{empty-state.D_ifpeU-.js.map → empty-state.DqdPzU-g.js.map} +1 -1
- package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
- package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
- package/dist/chunks/{field-label.D7vU2Icm.js → error-message.BYA2_fPV.js} +67 -67
- package/dist/chunks/error-message.BYA2_fPV.js.map +1 -0
- package/dist/chunks/es.bz0mzkMq.js.map +1 -1
- package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
- package/dist/chunks/events.BQOQSSb7.js.map +1 -1
- package/dist/chunks/{expand.C9IAqYYL.js → expand.BrywY9jl.js} +4 -4
- package/dist/chunks/{expand.C9IAqYYL.js.map → expand.BrywY9jl.js.map} +1 -1
- package/dist/chunks/{file-uploader.BmBKLzIx.js → file-uploader.Q2ufNRTY.js} +80 -80
- package/dist/chunks/file-uploader.Q2ufNRTY.js.map +1 -0
- package/dist/chunks/filter-bar.BVj9YVv-.js +4125 -0
- package/dist/chunks/filter-bar.BVj9YVv-.js.map +1 -0
- package/dist/chunks/fixed-scroller.i1tmEmst.js +161 -0
- package/dist/chunks/{fixed-scroller.e56yJp7Q.js.map → fixed-scroller.i1tmEmst.js.map} +1 -1
- package/dist/chunks/{focus-trap.BaHvK7aT.js → focus-trap.CBvh2H_m.js} +294 -277
- package/dist/chunks/focus-trap.CBvh2H_m.js.map +1 -0
- package/dist/chunks/{footer-actions.BqNvwVk7.js → footer-actions.DLzMOB7j.js} +8 -8
- package/dist/chunks/{footer-actions.BqNvwVk7.js.map → footer-actions.DLzMOB7j.js.map} +1 -1
- package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
- package/dist/chunks/{form-layout-title.CPsEzRzS.js → form-layout-title.DYmTc6M7.js} +7 -7
- package/dist/chunks/{form-layout-title.CPsEzRzS.js.map → form-layout-title.DYmTc6M7.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
- package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
- package/dist/chunks/grab.DJYL4kBq.js +26 -0
- package/dist/chunks/grab.DJYL4kBq.js.map +1 -0
- package/dist/chunks/{grid-layout.DDaRNz4-.js → grid-layout.Vhv1_zFs.js} +21 -21
- package/dist/chunks/{grid-layout.DDaRNz4-.js.map → grid-layout.Vhv1_zFs.js.map} +1 -1
- package/dist/chunks/{header-meta.PysBmkSU.js → header-meta.Bw8ZGwJW.js} +15 -15
- package/dist/chunks/{header-meta.PysBmkSU.js.map → header-meta.Bw8ZGwJW.js.map} +1 -1
- package/dist/chunks/{header-with-views.XzJCg2Ln.js → header-with-views.CJDoE4hw.js} +617 -635
- package/dist/chunks/header-with-views.CJDoE4hw.js.map +1 -0
- package/dist/chunks/{header.yMTOq8MR.js → header.BeH8KH_l.js} +14 -14
- package/dist/chunks/{header.yMTOq8MR.js.map → header.BeH8KH_l.js.map} +1 -1
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js} +3 -3
- package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map} +1 -1
- package/dist/chunks/{index.pdBj0KQU.js → index.B875RXHM.js} +3 -3
- package/dist/chunks/{index.pdBj0KQU.js.map → index.B875RXHM.js.map} +1 -1
- package/dist/chunks/index.CbxHJr39.js +691 -0
- package/dist/chunks/{index.E60QniEu.js.map → index.CbxHJr39.js.map} +1 -1
- package/dist/chunks/{info-icon.BQDGteil.js → info-icon.BLtyJvY4.js} +9 -9
- package/dist/chunks/{info-icon.BQDGteil.js.map → info-icon.BLtyJvY4.js.map} +1 -1
- package/dist/chunks/{info.BKwey1HA.js → info.6Z6NxUst.js} +4 -4
- package/dist/chunks/{info.BKwey1HA.js.map → info.6Z6NxUst.js.map} +1 -1
- package/dist/chunks/{input-field-password.Drp3Gn3x.js → input-field-password.KeKQPIZv.js} +21 -21
- package/dist/chunks/{input-field-password.Drp3Gn3x.js.map → input-field-password.KeKQPIZv.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CcCrGAZb.js → input-field-phone-number.eaU9p15A.js} +10 -10
- package/dist/chunks/{input-field-phone-number.CcCrGAZb.js.map → input-field-phone-number.eaU9p15A.js.map} +1 -1
- package/dist/chunks/{input-field.CBegTqdQ.js → input-field.CNdqlGw6.js} +9 -9
- package/dist/chunks/{input-field.CBegTqdQ.js.map → input-field.CNdqlGw6.js.map} +1 -1
- package/dist/chunks/{inspector.Dox76eqN.js → inspector.Bnf0g7QE.js} +16 -16
- package/dist/chunks/{inspector.Dox76eqN.js.map → inspector.Bnf0g7QE.js.map} +1 -1
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
- package/dist/chunks/isSameWeek.DjeUtLwI.js +14 -0
- package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.DjeUtLwI.js.map} +1 -1
- package/dist/chunks/{it.Oaj6BklL.js → it.DIafuXtH.js} +2 -2
- package/dist/chunks/{it.Oaj6BklL.js.map → it.DIafuXtH.js.map} +1 -1
- package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
- package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
- package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
- package/dist/chunks/{layout-row.CX8kV_w0.js → layout-row.Bz-mRqAq.js} +5 -5
- package/dist/chunks/layout-row.Bz-mRqAq.js.map +1 -0
- package/dist/chunks/{link.BLCQlEZU.js → link.DTCn2EtX.js} +11 -11
- package/dist/chunks/{link.BLCQlEZU.js.map → link.DTCn2EtX.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BQZJF00q.js → listbox-option-tag.C3ihNg6_.js} +9 -9
- package/dist/chunks/{listbox-option-tag.BQZJF00q.js.map → listbox-option-tag.C3ihNg6_.js.map} +1 -1
- package/dist/chunks/{loading-indicator.Db794TT5.js → loading-indicator.BPol9I84.js} +3 -3
- package/dist/chunks/{loading-indicator.Db794TT5.js.map → loading-indicator.BPol9I84.js.map} +1 -1
- package/dist/chunks/match.CMBZxEs9.js.map +1 -1
- package/dist/chunks/{minus-small.DYIyF5XW.js → minus-small.CnYLTuSv.js} +5 -5
- package/dist/chunks/{minus-small.DYIyF5XW.js.map → minus-small.CnYLTuSv.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BXjxVsAq.js → modal-fullscreen.B3AGUJgl.js} +100 -96
- package/dist/chunks/modal-fullscreen.B3AGUJgl.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js → modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js} +13 -13
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js.map → modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js.map} +1 -1
- package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
- package/dist/chunks/on-click-outside.BW4rkhzG.js +91 -0
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +1 -0
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
- package/dist/chunks/{pagination.BofKoYTB.js → pagination.lu9nx8j8.js} +10 -10
- package/dist/chunks/{pagination.BofKoYTB.js.map → pagination.lu9nx8j8.js.map} +1 -1
- package/dist/chunks/{payment-method.BGEBaa4w.js → payment-method.AeKHZlAO.js} +3 -3
- package/dist/chunks/{payment-method.BGEBaa4w.js.map → payment-method.AeKHZlAO.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
- package/dist/chunks/popover.types.C_Z2JeVK.js +6 -0
- package/dist/chunks/{popover.types.DgfeurkF.js.map → popover.types.C_Z2JeVK.js.map} +1 -1
- package/dist/chunks/popper-container.BefZxTzP.js +1432 -0
- package/dist/chunks/popper-container.BefZxTzP.js.map +1 -0
- package/dist/chunks/{promo-banner.BIRH5sVX.js → promo-banner.BLie64oS.js} +11 -11
- package/dist/chunks/{promo-banner.BIRH5sVX.js.map → promo-banner.BLie64oS.js.map} +1 -1
- package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
- package/dist/chunks/{radio-group.BqsQRDjs.js → radio-group.C6nQRQDB.js} +20 -20
- package/dist/chunks/{radio-group.BqsQRDjs.js.map → radio-group.C6nQRQDB.js.map} +1 -1
- package/dist/chunks/{radio-input.CBNE-AkM.js → radio-input.DektLjN4.js} +3 -3
- package/dist/chunks/{radio-input.CBNE-AkM.js.map → radio-input.DektLjN4.js.map} +1 -1
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
- package/dist/chunks/{refresh.BB4ouvz_.js → refresh.C31KClfx.js} +5 -5
- package/dist/chunks/{refresh.BB4ouvz_.js.map → refresh.C31KClfx.js.map} +1 -1
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
- package/dist/chunks/{rich-text-editor.Bafyvjc3.js → rich-text-editor.C39NKgl0.js} +11 -15
- package/dist/chunks/rich-text-editor.C39NKgl0.js.map +1 -0
- package/dist/chunks/{search-bar.DrkPxPDP.js → search-bar.CbTrg2Sk.js} +10 -10
- package/dist/chunks/{search-bar.DrkPxPDP.js.map → search-bar.CbTrg2Sk.js.map} +1 -1
- package/dist/chunks/{search.PczW-onY.js → search.ClLmZAgC.js} +4 -4
- package/dist/chunks/{search.PczW-onY.js.map → search.ClLmZAgC.js.map} +1 -1
- package/dist/chunks/{secondary-nav.C0_VfFa9.js → secondary-nav.DTOZQewf.js} +25 -25
- package/dist/chunks/secondary-nav.DTOZQewf.js.map +1 -0
- package/dist/chunks/{segmented-control.CFlHfj3N.js → segmented-control.D9rHBysM.js} +9 -9
- package/dist/chunks/{segmented-control.CFlHfj3N.js.map → segmented-control.D9rHBysM.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.DNPlEqEq.js → selection-card-group.KEsG0D5V.js} +9 -9
- package/dist/chunks/{selection-card-group.DNPlEqEq.js.map → selection-card-group.KEsG0D5V.js.map} +1 -1
- package/dist/chunks/{show.CT4Augxb.js → show.BreRPkgL.js} +6 -6
- package/dist/chunks/{show.CT4Augxb.js.map → show.BreRPkgL.js.map} +1 -1
- package/dist/chunks/{sidepanel.RJihFo_R.js → sidepanel.DJCagqzl.js} +73 -69
- package/dist/chunks/sidepanel.DJCagqzl.js.map +1 -0
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.D8Yh4c0G.js} +3 -3
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.D8Yh4c0G.js.map} +1 -1
- package/dist/chunks/{status.types.ChOI6XGU.js → status.types.D3v3k-Q8.js} +6 -6
- package/dist/chunks/{status.types.ChOI6XGU.js.map → status.types.D3v3k-Q8.js.map} +1 -1
- package/dist/chunks/{step.DpgnDx29.js → step.BV7MsrRF.js} +9 -9
- package/dist/chunks/{step.DpgnDx29.js.map → step.BV7MsrRF.js.map} +1 -1
- package/dist/chunks/{structured-list-item.B-hdp7rW.js → structured-list-item.f1tmHSEN.js} +9 -9
- package/dist/chunks/{structured-list-item.B-hdp7rW.js.map → structured-list-item.f1tmHSEN.js.map} +1 -1
- package/dist/chunks/success.DhioLvPD.js.map +1 -1
- package/dist/chunks/success.nNwxJRBS.js.map +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
- package/dist/chunks/{summary-grid.types.BVLRSBAF.js → summary-grid.types.COcV-sOB.js} +13 -13
- package/dist/chunks/{summary-grid.types.BVLRSBAF.js.map → summary-grid.types.COcV-sOB.js.map} +1 -1
- package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
- package/dist/chunks/{tab.JPngc9oS.js → tab.DRrnMCxe.js} +6 -6
- package/dist/chunks/{tab.JPngc9oS.js.map → tab.DRrnMCxe.js.map} +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
- package/dist/chunks/{tag.DFJIvNLs.js → tag.Dr7MKe9q.js} +9 -9
- package/dist/chunks/{tag.DFJIvNLs.js.map → tag.Dr7MKe9q.js.map} +1 -1
- package/dist/chunks/{textarea.CEDkF8BB.js → textarea.CtgbUCjH.js} +7 -7
- package/dist/chunks/{textarea.CEDkF8BB.js.map → textarea.CtgbUCjH.js.map} +1 -1
- package/dist/chunks/{timeline-item.BxGaSGLf.js → timeline-item.D9nmCe6u.js} +41 -41
- package/dist/chunks/{timeline-item.BxGaSGLf.js.map → timeline-item.D9nmCe6u.js.map} +1 -1
- package/dist/chunks/{toast.DiIIrX7h.js → toast.Bbtq3Icj.js} +22 -22
- package/dist/chunks/{toast.DiIIrX7h.js.map → toast.Bbtq3Icj.js.map} +1 -1
- package/dist/chunks/{toggle.vl0ZwLhN.js → toggle.BupEBkIG.js} +6 -6
- package/dist/chunks/{toggle.vl0ZwLhN.js.map → toggle.BupEBkIG.js.map} +1 -1
- package/dist/chunks/{tooltip.Nn3o8_vO.js → tooltip.DYpJZ-99.js} +60 -60
- package/dist/chunks/tooltip.DYpJZ-99.js.map +1 -0
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js → tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js} +32 -32
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js.map → tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js.map} +1 -1
- package/dist/chunks/{typography.6Oo5TOMP.js → typography.B3J6_tYk.js} +5 -5
- package/dist/chunks/{typography.6Oo5TOMP.js.map → typography.B3J6_tYk.js.map} +1 -1
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
- package/dist/chunks/{use-bento-toast-controller.V61h7XzI.js → use-bento-toast-controller.BFctDoMg.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.V61h7XzI.js.map → use-bento-toast-controller.BFctDoMg.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BZIa5TRx.js → use-cached-selected-values.BiSuG1eX.js} +28 -28
- package/dist/chunks/use-cached-selected-values.BiSuG1eX.js.map +1 -0
- package/dist/chunks/{use-country-items.JZCYNoW7.js → use-country-items.BTzByPdQ.js} +9 -9
- package/dist/chunks/{use-country-items.JZCYNoW7.js.map → use-country-items.BTzByPdQ.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.O02rzsob.js.map +1 -1
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
- package/dist/chunks/utils.BzUwtTXc.js +21 -0
- package/dist/chunks/utils.BzUwtTXc.js.map +1 -0
- package/dist/chunks/{warning-filled.BMGD0G-_.js → warning-filled.BzyK_mMj.js} +5 -5
- package/dist/chunks/{warning-filled.BMGD0G-_.js.map → warning-filled.BzyK_mMj.js.map} +1 -1
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
- package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.Bw_6j9Cd.js} +2 -2
- package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.Bw_6j9Cd.js.map} +1 -1
- package/dist/click-outside.js +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 +6 -5
- 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/draggable-handle.js +179 -0
- package/dist/draggable-handle.js.map +1 -0
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/image.js +1 -1
- package/dist/index.js +341 -335
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +42 -42
- 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 +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +5 -0
- package/dist/styles/bento-light.css +5 -0
- package/dist/styles/bento.css +5 -0
- package/dist/styles/legacy.css +5 -0
- package/dist/styles/styleguide.css +5 -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/use-form-v4.js +756 -7787
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +6 -7
- package/dist/assets/field-label.css +0 -1
- package/dist/chunks/action-bar.CriH15oF.js +0 -204
- package/dist/chunks/action-bar.CriH15oF.js.map +0 -1
- package/dist/chunks/ai-button.CDRPf7IY.js +0 -93
- package/dist/chunks/ai-button.CDRPf7IY.js.map +0 -1
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +0 -1
- package/dist/chunks/constructNow.DuaJst0D.js +0 -8
- package/dist/chunks/data-grid.CqtJp9rE.js.map +0 -1
- package/dist/chunks/date-input.BbZqj10S.js +0 -15
- package/dist/chunks/date-input.BbZqj10S.js.map +0 -1
- package/dist/chunks/date-picker.DGIwFh6T.js.map +0 -1
- package/dist/chunks/date-range-picker.Df9XyFMH.js +0 -1896
- package/dist/chunks/date-range-picker.Df9XyFMH.js.map +0 -1
- package/dist/chunks/dialog-page.DaZSlMzY.js +0 -181
- package/dist/chunks/dialog-page.DaZSlMzY.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.DFtFMu5G.js.map +0 -1
- package/dist/chunks/dropdown.Dct8gr_q.js +0 -837
- package/dist/chunks/dropdown.Dct8gr_q.js.map +0 -1
- package/dist/chunks/field-label.D7vU2Icm.js.map +0 -1
- package/dist/chunks/file-uploader.BmBKLzIx.js.map +0 -1
- package/dist/chunks/filter-bar.DHRuvmx9.js +0 -3363
- package/dist/chunks/filter-bar.DHRuvmx9.js.map +0 -1
- package/dist/chunks/fixed-scroller.e56yJp7Q.js +0 -155
- package/dist/chunks/focus-trap.BaHvK7aT.js.map +0 -1
- package/dist/chunks/header-with-views.XzJCg2Ln.js.map +0 -1
- package/dist/chunks/index.E60QniEu.js +0 -592
- package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
- package/dist/chunks/layout-row.CX8kV_w0.js.map +0 -1
- package/dist/chunks/modal-fullscreen.BXjxVsAq.js.map +0 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js +0 -101
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +0 -1
- package/dist/chunks/popover.types.DgfeurkF.js +0 -6
- package/dist/chunks/popper-container.I9gzp1NR.js +0 -1413
- package/dist/chunks/popper-container.I9gzp1NR.js.map +0 -1
- package/dist/chunks/rich-text-editor.Bafyvjc3.js.map +0 -1
- package/dist/chunks/secondary-nav.C0_VfFa9.js.map +0 -1
- package/dist/chunks/sidepanel.RJihFo_R.js.map +0 -1
- package/dist/chunks/tooltip.Nn3o8_vO.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BZIa5TRx.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as J, useSlots as q, ref as L, watch as A, computed as o,
|
|
2
|
-
import { B as T, d as Z } from "./typography.
|
|
3
|
-
import { C as ee } from "./chevron-down.
|
|
4
|
-
import { C as ae } from "./chevron-up.
|
|
1
|
+
import { defineComponent as J, useSlots as q, ref as L, watch as A, computed as o, openBlock as l, createElementBlock as i, withKeys as _, normalizeClass as c, unref as n, renderSlot as b, createCommentVNode as d, createElementVNode as C, createBlock as h, mergeProps as G, withCtx as k, createVNode as E, Transition as Q, normalizeStyle as X } from "vue";
|
|
2
|
+
import { B as T, d as Z } from "./typography.B3J6_tYk.js";
|
|
3
|
+
import { C as ee } from "./chevron-down.XeE-LBV_.js";
|
|
4
|
+
import { C as ae } from "./chevron-up.Cmgl2a3x.js";
|
|
5
5
|
import { u as te } from "./use-expandable-content-height.GkjjbmPy.js";
|
|
6
6
|
import { u as oe } from "./use-has-slot.B7eQSabc.js";
|
|
7
7
|
import { g as ne } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
-
import { u as le } from "./index.
|
|
8
|
+
import { u as le } from "./index.B875RXHM.js";
|
|
9
9
|
import { o as de } from "./resize.Bqks3WUm.js";
|
|
10
10
|
import { B as se } from "./button-actions.types.BptAXjD8.js";
|
|
11
|
-
import { B as re } from "./button-actions.
|
|
11
|
+
import { B as re } from "./button-actions.BH-J7dux.js";
|
|
12
12
|
import { _ as ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import "../assets/card.css";
|
|
14
14
|
var D = /* @__PURE__ */ ((s) => (s.PRIMARY = "primary", s.SECONDARY = "secondary", s))(D || {}), p = /* @__PURE__ */ ((s) => (s.DEFAULT = "default", s.SMALL = "small", s))(p || {});
|
|
@@ -225,4 +225,4 @@ export {
|
|
|
225
225
|
p as a,
|
|
226
226
|
De as c
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=card.
|
|
228
|
+
//# sourceMappingURL=card.DcXXdxWL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.C_03IYJe.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\n class=\"b-card\"\n :class=\"cardConditionalClasses\"\n :tabindex=\"tabIndex\"\n data-testid=\"card\"\n @click=\"onClick\"\n @keydown.enter=\"onKeyDown\"\n @keydown.space=\"onKeyDown\"\n >\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=\"headerTabIndex\"\n :aria-controls=\"expandable && showCardBody ? 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, type 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 import { deprecate } from '@/utils/ts/deprecate';\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 * Makes the whole card clickable\n */\n clickable?: boolean;\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 clickable: false,\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.clickable && !props.disabled ? 0 : -1));\n const headerTabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--clickable': props.clickable,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': (props.clickable || 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 if (!props.clickable) {\n deprecate(\n 'BentoCard \"@click\" property',\n `Use the BentoCard \"@click\" with the \"clickable\" property to enable accessible styles.`,\n '2.0.0'\n );\n }\n }\n };\n\n const onKeyDown = () => {\n if (props.clickable && !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=\"./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","headerTabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick","deprecate","onKeyDown"],"mappings":";;;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;gBCuTRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;AAxOA,UAAA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GAEAI,IAAAC,GAmFAC,IAAAC,GAKAC,IAAAC,EAAA,IAAA,GAEAC,IAAAC,GAAA,MAAA,GACAC,IAAAH,EAAA,CAAAL,EAAA,MAAA;AACA,IAAAS;AAAA,MAAA,MAAAT,EAAA;AAAA,MACgB,CAAAU,MAAA;AAER,QAAAF,EAAA,QAAA,CAAAE;AAAA,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"card.DcXXdxWL.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\n class=\"b-card\"\n :class=\"cardConditionalClasses\"\n :tabindex=\"tabIndex\"\n data-testid=\"card\"\n @click=\"onClick\"\n @keydown.enter=\"onKeyDown\"\n @keydown.space=\"onKeyDown\"\n >\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=\"headerTabIndex\"\n :aria-controls=\"expandable && showCardBody ? 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, type 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 import { deprecate } from '@/utils/ts/deprecate';\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 * Makes the whole card clickable\n */\n clickable?: boolean;\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 clickable: false,\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.clickable && !props.disabled ? 0 : -1));\n const headerTabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--clickable': props.clickable,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': (props.clickable || 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 if (!props.clickable) {\n deprecate(\n 'BentoCard \"@click\" property',\n `Use the BentoCard \"@click\" with the \"clickable\" property to enable accessible styles.`,\n '2.0.0'\n );\n }\n }\n };\n\n const onKeyDown = () => {\n if (props.clickable && !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=\"./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","headerTabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick","deprecate","onKeyDown"],"mappings":";;;;;;;;;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACH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AAGvF,IAAAnB;AAAA,MAAA,MAAAL,EAAA;AAAA,MACqB,MAAA;AAEb,YAAA2B,IAAA;AACA,QAAA,CAAAA,KAAA3B,EAAA,UACI2B,IAAAC,GAAA5B,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIuB,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ;AAGJ,UAAAM,IAAA,MAAA;AACI,MAAA,CAAAjC,EAAA,YAAAA,EAAA,eACIQ,EAAA,QAAA,CAAAA,EAAA,OACAN,EAAA,YAAAM,EAAA,KAAA,GACAmB,EAAA;AAAA,IACJ,GAGJO,IAAA,MAAA;AACI,MAAAlC,EAAA,aACIE,EAAA,OAAA,GAEAF,EAAA,aACImC;AAAA,QAAA;AAAA,QACI;AAAA,QACA;AAAA,MACA;AAAA,IAGZ,GAGJC,IAAA,MAAA;AACI,MAAApC,EAAA,aAAA,CAAAA,EAAA,YACIE,EAAA,OAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as V, useSlots as L, toRef as T, computed as l, watch as b, ref as w, onMounted as I,
|
|
2
|
-
import { B as z } from "./checkbox.
|
|
1
|
+
import { defineComponent as V, useSlots as L, toRef as T, computed as l, watch as b, ref as w, onMounted as I, openBlock as s, createElementBlock as h, createVNode as N, unref as a, normalizeClass as O, withCtx as n, Fragment as A, renderList as q, createBlock as g, createSlots as R, createTextVNode as y, toDisplayString as v, renderSlot as F, mergeProps as G, createCommentVNode as U } from "vue";
|
|
2
|
+
import { B as z } from "./checkbox.7kpOXm-b.js";
|
|
3
3
|
import { g as H } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { d as P } from "./typography.
|
|
4
|
+
import { d as P } from "./typography.B3J6_tYk.js";
|
|
5
5
|
import { u as Z } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
6
6
|
import { u as _ } from "./form-field.D_2g7vaP.js";
|
|
7
|
-
import { C as j } from "./controls-group.
|
|
8
|
-
import { E as D } from "./
|
|
7
|
+
import { C as j } from "./controls-group.Dip3WAKV.js";
|
|
8
|
+
import { E as D } from "./error-message.BYA2_fPV.js";
|
|
9
9
|
import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
10
|
import "../assets/checkbox-group.css";
|
|
11
11
|
var d = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(d || {});
|
|
@@ -114,7 +114,7 @@ const J = { class: "b-checkbox-group" }, K = "bento-checkbox-group", Q = {
|
|
|
114
114
|
);
|
|
115
115
|
}), (t, X) => (s(), h("div", J, [
|
|
116
116
|
N(a(j), {
|
|
117
|
-
class:
|
|
117
|
+
class: O(["b-checkbox-group__checkboxes", B.value]),
|
|
118
118
|
"aria-describedby": p.value ? a(c) : "",
|
|
119
119
|
"component-name": "bento-checkbox-group",
|
|
120
120
|
description: e.description,
|
|
@@ -127,7 +127,7 @@ const J = { class: "b-checkbox-group" }, K = "bento-checkbox-group", Q = {
|
|
|
127
127
|
"tooltip-text": e.tooltipText
|
|
128
128
|
}, {
|
|
129
129
|
default: n(() => [
|
|
130
|
-
(s(!0), h(
|
|
130
|
+
(s(!0), h(A, null, q(e.items, (r) => (s(), g(z, {
|
|
131
131
|
key: r.value,
|
|
132
132
|
"model-value": u.value,
|
|
133
133
|
value: r.value,
|
|
@@ -137,7 +137,7 @@ const J = { class: "b-checkbox-group" }, K = "bento-checkbox-group", Q = {
|
|
|
137
137
|
readonly: a(i) || r.readonly,
|
|
138
138
|
tag: r.tag,
|
|
139
139
|
"onUpdate:modelValue": M
|
|
140
|
-
},
|
|
140
|
+
}, R({
|
|
141
141
|
default: n(() => [
|
|
142
142
|
y(v(r.label), 1)
|
|
143
143
|
]),
|
|
@@ -153,7 +153,7 @@ const J = { class: "b-checkbox-group" }, K = "bento-checkbox-group", Q = {
|
|
|
153
153
|
f("content") ? {
|
|
154
154
|
name: "content",
|
|
155
155
|
fn: n(() => [
|
|
156
|
-
|
|
156
|
+
F(t.$slots, "content", G({ ref_for: !0 }, r), void 0, !0)
|
|
157
157
|
]),
|
|
158
158
|
key: "1"
|
|
159
159
|
} : void 0
|
|
@@ -166,7 +166,7 @@ const J = { class: "b-checkbox-group" }, K = "bento-checkbox-group", Q = {
|
|
|
166
166
|
id: a(c),
|
|
167
167
|
"error-message": e.errorMessage,
|
|
168
168
|
class: "b-checkbox-group__error-message"
|
|
169
|
-
}, null, 8, ["id", "error-message"])) :
|
|
169
|
+
}, null, 8, ["id", "error-message"])) : U("", !0)
|
|
170
170
|
]));
|
|
171
171
|
}
|
|
172
172
|
}), de = /* @__PURE__ */ $(W, [["__scopeId", "data-v-6e6d058b"]]);
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
de as B,
|
|
175
175
|
d as a
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=checkbox-group.
|
|
177
|
+
//# sourceMappingURL=checkbox-group.Bh_aqKoA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.DZrhxIHp.js","sources":["../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import { type FormFieldEmits } from '../../../../types/form-field';\nimport type { BentoCheckboxTag } from '../../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\nexport interface 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\nexport type BentoCheckboxGroupEmits = FormFieldEmits<any>;\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=\"bento-checkbox-group\"\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=\"onModelValueUpdate\"\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 setup lang=\"ts\">\n import { computed, onMounted, type PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n type BentoCheckboxGroupEmits,\n type BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\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 import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\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 as PropType<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) => Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n });\n\n const emit = defineEmits<BentoCheckboxGroupEmits>();\n\n const slots = useSlots();\n\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits(emit);\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\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: string) => !!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 onModelValueUpdate = (value: any) => {\n inputValue.value = value;\n emitValue(value);\n };\n\n onMounted(() => {\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</script>\n\n<script lang=\"ts\">\n const COMPONENT_NAME = 'bento-checkbox-group';\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 {\n name: COMPONENT_NAME,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","__default__","props","__props","emit","__emit","slots","useSlots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onModelValueUpdate","value","onMounted","deprecate"],"mappings":";;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;yCCgMRE,IAAA,wBAoBAC,IAAA;AAAA,EAAe,MAAAD;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlKA,UAAAE,IAAAC,GA+EAC,IAAAC,GAEAC,IAAAC,EAAA,GAEAC,IAAAC,EAAA,OAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAAC,EAAAV,GAAA,UAAA,CAAA,GACA,EAAA,WAAAW,EAAA,IAAAC,EAAAV,CAAA,GAEAW,IAAAC;AAAA,MAA6B,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,UAAA,CAAA,CAAAR,EAAA,gBAAAA,EAAA;AAAA,IACoD,GAEjFe,IAAAD,EAAA,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,SAAA,CAAA,CAAAR,EAAA,YAAA,GAEAgB,IAAAF,EAAA,OAAA;AAAA,MAA2C,4CAAAd,EAAA,YAAAJ,EAAA;AAAA,IACiD,EAAA,GAM5FqB,IAAA,CAAAC,MAAA,CAAA,CAAAd,EAAAc,CAAA,GACAC,IAAAL,EAAA,MAAAG,EAAA,SAAA,KAAAjB,EAAA,YAAA,UAAA;AAEA,IAAAoB;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,2EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAC,IAAAC,EAAAvB,EAAA,UAAA;AACA,IAAAoB;AAAA,MAAA,MAAApB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAsB,EAAA,QAAAtB,EAAA;AAAA,MAAyB;AAAA,IAC7B;AAGJ,UAAAwB,IAAA,CAAAC,MAAA;AACI,MAAAH,EAAA,QAAAG,GACAd,EAAAc,CAAA;AAAA,IAAe;AAGnB,WAAAC,EAAA,MAAA;AACI,MAAA1B,EAAA,YACI2B;AAAA,QAAA;AAAA,QACI;AAAA;AAAA;AAAA,QACA;AAAA,MAGA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox-group.Bh_aqKoA.js","sources":["../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import { type FormFieldEmits } from '../../../../types/form-field';\nimport type { BentoCheckboxTag } from '../../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\nexport interface 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\nexport type BentoCheckboxGroupEmits = FormFieldEmits<any>;\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=\"bento-checkbox-group\"\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=\"onModelValueUpdate\"\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 setup lang=\"ts\">\n import { computed, onMounted, type PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n type BentoCheckboxGroupEmits,\n type BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\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 import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\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 as PropType<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) => Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n });\n\n const emit = defineEmits<BentoCheckboxGroupEmits>();\n\n const slots = useSlots();\n\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits(emit);\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\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: string) => !!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 onModelValueUpdate = (value: any) => {\n inputValue.value = value;\n emitValue(value);\n };\n\n onMounted(() => {\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</script>\n\n<script lang=\"ts\">\n const COMPONENT_NAME = 'bento-checkbox-group';\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 {\n name: COMPONENT_NAME,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","__default__","props","__props","emit","__emit","slots","useSlots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onModelValueUpdate","value","onMounted","deprecate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,CAAAC,MAAA;AACI,MAAAH,EAAA,QAAAG,GACAd,EAAAc,CAAA;AAAA,IAAe;AAGnB,WAAAC,EAAA,MAAA;AACI,MAAA1B,EAAA,YACI2B;AAAA,QAAA;AAAA,QACI;AAAA;AAAA;AAAA,QACA;AAAA,MAGA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as S, useAttrs as L, ref as V, computed as i, toRefs as w,
|
|
2
|
-
import { C as o, N as Y, a as E } from "./minus-small.
|
|
3
|
-
import { C as z } from "./checkmark-small.
|
|
1
|
+
import { defineComponent as S, useAttrs as L, ref as V, computed as i, toRefs as w, openBlock as b, createElementBlock as O, normalizeClass as K, unref as r, createBlock as C, createCommentVNode as P, createElementVNode as U, mergeProps as T, withKeys as x, withModifiers as _ } from "vue";
|
|
2
|
+
import { C as o, N as Y, a as E } from "./minus-small.CnYLTuSv.js";
|
|
3
|
+
import { C as z } from "./checkmark-small.CRuZauJc.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
5
|
import "../assets/checkbox-input.css";
|
|
6
6
|
const H = ["id", "aria-label", "aria-checked", "aria-describedby", "aria-invalid", "checked", "disabled", ".indeterminate", "value", "aria-readonly"], M = {
|
|
@@ -146,4 +146,4 @@ const H = ["id", "aria-label", "aria-checked", "aria-describedby", "aria-invalid
|
|
|
146
146
|
export {
|
|
147
147
|
W as C
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=checkbox-input.
|
|
149
|
+
//# sourceMappingURL=checkbox-input.BZjSoCQW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-input.Dk9iFQQe.js","sources":["../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["<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 v-bind=\"computedAttrs\"\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 @keydown.space.prevent=\"inputRef?.click()\"\n @keydown.enter.prevent=\"inputRef?.click()\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, type PropType, ref, toRefs, useAttrs } from 'vue';\n import {\n CheckboxInputEvent,\n type CheckboxInputGroupItems,\n CheckboxInputState,\n type CheckboxInputType,\n type MultiCheckboxInputType,\n } from '@/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 import { isVue3 } from 'vue-demi';\n\n const attrs = useAttrs();\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 inputRef = ref<HTMLInputElement | null>(null);\n\n // filter out style classes because in vue3 they are also part of attrs\n const computedAttrs = computed(() => {\n if (isVue3) {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n } else {\n return attrs;\n }\n });\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => {\n // Append classes set from parent to first element\n const inheritClasses = (attrs.class as string)?.split(' ').reduce((acc, className) => {\n acc[className] = true;\n return acc;\n }, {});\n\n return {\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n ...inheritClasses,\n };\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=\"./checkbox-input.scss\" />\n"],"names":["__default__","attrs","useAttrs","props","__props","emit","__emit","inputRef","ref","computedAttrs","computed","_class","_style","rest","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","inheritClasses","_a","acc","className","CheckboxInputState","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index","CheckboxInputEvent"],"mappings":";;;;;uJAgNIA,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzKA,UAAAC,IAAAC,EAAA,GACAC,IAAAC,GA4DAC,IAAAC,GAOAC,IAAAC,EAAA,IAAA,GAGAC,IAAAC,EAAA,MAAA;AACI;AACI,cAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,GAAAC,EAAA,IAAAZ;AACA,eAAAY;AAAA,MAAO;AAAA,IAGX,CAAA,GAGJ,EAAA,UAAAC,GAAA,eAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,OAAAC,EAAA,IAAAC,EAAAhB,CAAA,GAEAiB,IAAAV,EAAA,MAAA;;AAEI,YAAAW,KAAAC,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,MAAA,KAAA,OAAA,CAAAC,GAAAC,OACID,EAAAC,CAAA,IAAA,IACAD,IAAO,CAAA;AAGX,aAAA;AAAA,QAAO,CAAA,qBAAAE,EAAA,QAAA,EAAA,GAAAtB,EAAA;AAAA,QACyD,CAAA,qBAAAsB,EAAA,QAAA,EAAA,GAAAtB,EAAA;AAAA,QACA,GAAAkB;AAAA,MACzD;AAAA,IACP,CAAA,GAGJK,IAAAhB,EAAA,OAAA;AAAA,MAAkD,CAAA,8BAAAe,EAAA,SAAA,EAAA,GAAA,CAAAE,EAAA,SAAA,CAAAxB,EAAA;AAAA,MAC6C,CAAA,8BAAAsB,EAAA,KAAA,EAAA,GAAAtB,EAAA;AAAA,MACzB,CAAA,8BAAAsB,EAAA,QAAA,EAAA,GAAAtB,EAAA;AAAA,IACG,EAAA,GAGzEyB,IAAAlB,EAAA,MAAA,MAAA,QAAAM,EAAA,KAAA,CAAA,GAEAW,IAAAjB,EAAA,MACIkB,EAAA,QAIAZ,EAAA,MAAA,KAAA,CAAAa,MAAAA,MAAAX,EAAA,KAAA,IAHIF,EAAA,KAGiF,GAIzFc,IAAApB;AAAA,MAAoB,MAAAP,EAAA,gBAAA,UAAA,GAAA,CAAA,CAAAwB,EAAA,KAAA;AAAA,IACoC,GAExDI,IAAArB;AAAA,MAAoB,MAAAP,EAAA,YAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA;AAAA,IACkC,GAItD6B,IAAA,CAAAC,MAAA;AACI,UAAAhB,EAAA,OAAA;AACI,QAAAgB,EAAA,eAAA;AACA;AAAA,MAAA;AAAA,IACJ,GAEJC,IAAA,CAAAD,MAAA;AACI,UAAAnB,EAAA;AACI;AAGJ,YAAAqB,IAAAF,EAAA,OAAA;AAEA,UAAAL,EAAA,OAAA;AACI,cAAAQ,IAAA,CAAA,GAAApB,EAAA,KAAA,GACAqB,IAAAD,EAAA,QAAAlB,EAAA,KAAA;AAEA,QAAAmB,MAAA,KACID,EAAA,KAAAlB,EAAA,KAAA,IAEAkB,EAAA,OAAAC,GAAA,CAAA,GAEJhC,EAAAiC,EAAA,QAAAF,CAAA;AAAA,MAA8C;AAE9C,QAAA/B,EAAAiC,EAAA,QAAAH,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox-input.BZjSoCQW.js","sources":["../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["<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 v-bind=\"computedAttrs\"\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 @keydown.space.prevent=\"inputRef?.click()\"\n @keydown.enter.prevent=\"inputRef?.click()\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, type PropType, ref, toRefs, useAttrs } from 'vue';\n import {\n CheckboxInputEvent,\n type CheckboxInputGroupItems,\n CheckboxInputState,\n type CheckboxInputType,\n type MultiCheckboxInputType,\n } from '@/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 import { isVue3 } from 'vue-demi';\n\n const attrs = useAttrs();\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 inputRef = ref<HTMLInputElement | null>(null);\n\n // filter out style classes because in vue3 they are also part of attrs\n const computedAttrs = computed(() => {\n if (isVue3) {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n } else {\n return attrs;\n }\n });\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => {\n // Append classes set from parent to first element\n const inheritClasses = (attrs.class as string)?.split(' ').reduce((acc, className) => {\n acc[className] = true;\n return acc;\n }, {});\n\n return {\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n ...inheritClasses,\n };\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=\"./checkbox-input.scss\" />\n"],"names":["__default__","attrs","useAttrs","props","__props","emit","__emit","inputRef","ref","computedAttrs","computed","_class","_style","rest","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","inheritClasses","_a","acc","className","CheckboxInputState","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index","CheckboxInputEvent"],"mappings":";;;;;uJAgNIA,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzKA,UAAAC,IAAAC,EAAA,GACA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AAA;AAAA,IACkC,GAItD6B,IAAA,CAAAC,MAAA;AACI,UAAAhB,EAAA,OAAA;AACI,QAAAgB,EAAA,eAAA;AACA;AAAA,MAAA;AAAA,IACJ,GAEJC,IAAA,CAAAD,MAAA;AACI,UAAAnB,EAAA;AACI;AAGJ,YAAAqB,IAAAF,EAAA,OAAA;AAEA,UAAAL,EAAA,OAAA;AACI,cAAAQ,IAAA,CAAA,GAAApB,EAAA,KAAA,GACAqB,IAAAD,EAAA,QAAAlB,EAAA,KAAA;AAEA,QAAAmB,MAAA,KACID,EAAA,KAAAlB,EAAA,KAAA,IAEAkB,EAAA,OAAAC,GAAA,CAAA,GAEJhC,EAAAiC,EAAA,QAAAF,CAAA;AAAA,MAA8C;AAE9C,QAAA/B,EAAAiC,EAAA,QAAAH,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Z, toRefs as D, computed as a, ref as U, onMounted as G, useAttrs as x, resolveComponent as f,
|
|
2
|
-
import { B as oe } from "./typography.
|
|
3
|
-
import { C as re } from "./checkbox-input.
|
|
4
|
-
import { C as N } from "./minus-small.
|
|
1
|
+
import { defineComponent as Z, toRefs as D, computed as a, ref as U, onMounted as G, useAttrs as x, resolveComponent as f, openBlock as t, createElementBlock as q, mergeProps as B, createVNode as ee, createBlock as n, withCtx as d, createElementVNode as ae, renderSlot as E, createTextVNode as L, toDisplayString as M, createCommentVNode as s } from "vue";
|
|
2
|
+
import { B as oe } from "./typography.B3J6_tYk.js";
|
|
3
|
+
import { C as re } from "./checkbox-input.BZjSoCQW.js";
|
|
4
|
+
import { C as N } from "./minus-small.CnYLTuSv.js";
|
|
5
5
|
import { u as te } from "./use-default-slot-validator.O02rzsob.js";
|
|
6
6
|
import { u as le } from "./use-has-slot.B7eQSabc.js";
|
|
7
7
|
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
8
8
|
import { g as _ } from "./get-slot-text.CQRAP2_q.js";
|
|
9
|
-
import { u as ne } from "./index.
|
|
9
|
+
import { u as ne } from "./index.B875RXHM.js";
|
|
10
10
|
import { u as se } from "./aria-label.CaUURpnB.js";
|
|
11
|
-
import { B as de } from "./tag.
|
|
12
|
-
import { E as ie } from "./
|
|
11
|
+
import { B as de } from "./tag.Dr7MKe9q.js";
|
|
12
|
+
import { E as ie } from "./error-message.BYA2_fPV.js";
|
|
13
13
|
import { _ as ue } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
14
14
|
import "../assets/checkbox.css";
|
|
15
15
|
var i = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(i || {});
|
|
@@ -182,7 +182,7 @@ function me(e, $, h, l, y, g) {
|
|
|
182
182
|
"onUpdate:modelValue": e.onChange
|
|
183
183
|
}), null, 16, ["aria-label", "aria-describedby", "disabled", "has-error", "indeterminate", "value", "model-value", "readonly", "onUpdate:modelValue"]),
|
|
184
184
|
e.hasSlot("default") || e.shouldShowErrorMessage ? (t(), q("span", pe, [
|
|
185
|
-
e.hasSlot("default") ? (t(),
|
|
185
|
+
e.hasSlot("default") ? (t(), n(r, {
|
|
186
186
|
key: 0,
|
|
187
187
|
class: "b-checkbox__label",
|
|
188
188
|
el: "span",
|
|
@@ -192,7 +192,7 @@ function me(e, $, h, l, y, g) {
|
|
|
192
192
|
ae("span", null, [
|
|
193
193
|
E(e.$slots, "default", {}, void 0, !0)
|
|
194
194
|
]),
|
|
195
|
-
e.optional ? (t(),
|
|
195
|
+
e.optional ? (t(), n(r, {
|
|
196
196
|
key: 0,
|
|
197
197
|
class: "b-checkbox__label-requirement",
|
|
198
198
|
el: "span"
|
|
@@ -201,7 +201,7 @@ function me(e, $, h, l, y, g) {
|
|
|
201
201
|
L("(" + M(e.t("optional")) + ")", 1)
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
|
-
})) : e.required ? (t(),
|
|
204
|
+
})) : e.required ? (t(), n(r, {
|
|
205
205
|
key: 1,
|
|
206
206
|
class: "b-checkbox__label-requirement",
|
|
207
207
|
el: "span"
|
|
@@ -210,15 +210,15 @@ function me(e, $, h, l, y, g) {
|
|
|
210
210
|
L("(" + M(e.t("required")) + ")", 1)
|
|
211
211
|
]),
|
|
212
212
|
_: 1
|
|
213
|
-
})) :
|
|
214
|
-
e.tag ? (t(),
|
|
213
|
+
})) : s("", !0),
|
|
214
|
+
e.tag ? (t(), n(c, B({
|
|
215
215
|
key: 2,
|
|
216
216
|
class: "b-checkbox__label-tag"
|
|
217
|
-
}, e.tag), null, 16)) :
|
|
217
|
+
}, e.tag), null, 16)) : s("", !0)
|
|
218
218
|
]),
|
|
219
219
|
_: 3
|
|
220
|
-
})) :
|
|
221
|
-
e.hasSlot("default") && e.hasSlot("description") ? (t(),
|
|
220
|
+
})) : s("", !0),
|
|
221
|
+
e.hasSlot("default") && e.hasSlot("description") ? (t(), n(r, {
|
|
222
222
|
key: 1,
|
|
223
223
|
id: e.descriptionId,
|
|
224
224
|
class: "b-checkbox__description",
|
|
@@ -229,13 +229,13 @@ function me(e, $, h, l, y, g) {
|
|
|
229
229
|
E(e.$slots, "description", {}, void 0, !0)
|
|
230
230
|
]),
|
|
231
231
|
_: 3
|
|
232
|
-
}, 8, ["id"])) :
|
|
233
|
-
e.shouldShowErrorMessage ? (t(),
|
|
232
|
+
}, 8, ["id"])) : s("", !0),
|
|
233
|
+
e.shouldShowErrorMessage ? (t(), n(v, {
|
|
234
234
|
key: 2,
|
|
235
235
|
id: e.errorId,
|
|
236
236
|
"error-message": e.errorMessage
|
|
237
|
-
}, null, 8, ["id", "error-message"])) :
|
|
238
|
-
e.contentSlotAvailable ? (t(),
|
|
237
|
+
}, null, 8, ["id", "error-message"])) : s("", !0),
|
|
238
|
+
e.contentSlotAvailable ? (t(), n(r, {
|
|
239
239
|
key: 3,
|
|
240
240
|
class: "b-checkbox__content",
|
|
241
241
|
el: "span",
|
|
@@ -245,8 +245,8 @@ function me(e, $, h, l, y, g) {
|
|
|
245
245
|
E(e.$slots, "content", {}, void 0, !0)
|
|
246
246
|
]),
|
|
247
247
|
_: 3
|
|
248
|
-
})) :
|
|
249
|
-
])) :
|
|
248
|
+
})) : s("", !0)
|
|
249
|
+
])) : s("", !0)
|
|
250
250
|
], 16, be);
|
|
251
251
|
}
|
|
252
252
|
const Ie = /* @__PURE__ */ ue(ce, [["render", me], ["__scopeId", "data-v-1d08bc84"]]);
|
|
@@ -254,4 +254,4 @@ export {
|
|
|
254
254
|
Ie as B,
|
|
255
255
|
i as a
|
|
256
256
|
};
|
|
257
|
-
//# sourceMappingURL=checkbox.
|
|
257
|
+
//# sourceMappingURL=checkbox.7kpOXm-b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.BWgWtiLJ.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '../tag/tag.types';\nimport {\n CheckboxInputState as BentoCheckboxState,\n type CheckboxInputType as BentoCheckboxType,\n type MultiCheckboxInputType as BentoMultiCheckboxType,\n} from '@/internal/checkbox-input/checkbox-input.types';\n\nexport { BentoCheckboxState, BentoCheckboxType, BentoMultiCheckboxType };\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n\nexport type BentoCheckboxTag = BentoTagProps;\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\" v-bind=\"styleAttrs\" :aria-hidden=\"getAriaHidden($attrs)\">\n <checkbox-input\n v-bind=\"$attrs\"\n ref=\"input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :has-error=\"shouldShowError\"\n :indeterminate=\"isIndeterminate\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :readonly=\"readonly\"\n @update:model-value=\"onChange\"\n />\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <span><slot /></span>\n <bento-typography v-if=\"optional\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n <bento-typography v-else-if=\"required\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-tag v-if=\"tag\" class=\"b-checkbox__label-tag\" v-bind=\"tag\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"contentSlotAvailable\" class=\"b-checkbox__content\" el=\"span\" variant=\"body\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n type HTMLAttributes,\n onMounted,\n type PropType,\n ref,\n toRefs,\n useAttrs,\n } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n type BentoCheckboxTag,\n type BentoCheckboxType,\n type BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { CheckboxInput } from '@/components/internal/checkbox-input';\n import { ErrorMessage } from '@/components/internal/error-message';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoTag } from '@/components/tag';\n import { type BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CheckboxInput,\n ErrorMessage,\n },\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\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 * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\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 * 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<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Highlights the checkbox is optional.\n */\n optional: { type: Boolean, default: false },\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 * Highlights the checkbox is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoCheckboxTag>, default: undefined },\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 emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // Content slot logic\n const hasContentSlot = computed(() => hasSlot('content'));\n const isCheckedOrIntermediate = computed(() => isIndeterminate?.value || isChecked?.value);\n const contentSlotAvailable = computed(\n () => hasContentSlot?.value && isCheckboxGroup?.value && isCheckedOrIntermediate?.value\n );\n\n // ARIA fields\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const checkboxTranslation = ref();\n // Translations used in the script tag need to be inside onMounted otherwise they fail in Vue 3\n onMounted(() => {\n checkboxTranslation.value = t('checkbox');\n });\n // Only add aria-label if no label slot is present\n const computedAriaLabel = computed(\n () =>\n useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : checkboxTranslation.value,\n }).value\n );\n const getAriaHidden = (attributes: HTMLAttributes) => attributes?.['aria-hidden'];\n\n const styleAttrs = computed(() => {\n const { style, class: cls } = useAttrs();\n return {\n class: cls as HTMLAttributes['class'],\n style: style as HTMLAttributes['style'],\n };\n });\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n const onChange = (newValue: BentoCheckboxType | BentoCheckboxGroupItems) => {\n if (disabled.value) {\n return;\n }\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaDescribedBy,\n computedAriaLabel,\n conditionalClass,\n defaultSlotValue,\n descriptionSlotValue,\n isIndeterminate,\n shouldShowError,\n shouldShowErrorMessage,\n contentSlotAvailable,\n hasContentSlot,\n styleAttrs,\n\n // Methods\n hasSlot,\n onChange,\n getAriaHidden,\n\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxEvent","BentoCheckboxEvent2","_sfc_main","defineComponent","messages","BentoTag","BentoTypography","CheckboxInput","ErrorMessage","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","hasContentSlot","isCheckedOrIntermediate","contentSlotAvailable","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","checkboxTranslation","onMounted","computedAriaLabel","useAriaLabel","getAriaHidden","attributes","styleAttrs","style","cls","useAttrs","conditionalClass","CheckboxInputState","newValue","_hoisted_1","_ctx","$attrs","createVNode","_component_checkbox_input","mergeProps","openBlock","createElementBlock","_hoisted_2","createBlock","_component_bento_typography","createElementVNode","createTextVNode","toDisplayString","required","createCommentVNode","_component_bento_tag","tag","renderSlot","_component_error_message"],"mappings":";;;;;;;;;;;;;;AASY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;GCoFRE,KAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,MAAA,EAAA,UAAAC,EAAA;AAAA,EACW,YAAA;AAAA,IACL,UAAAC;AAAA,IACR,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,EACA;AAAA,EACJ,cAAA;AAAA,EACc,OAAA,EAAA,MAAA,aAAA;AAAA,EACc,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACrB,WAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAOsC,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKC,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKF,eAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASK,YAAA;AAAA,MAQnC,MAAA,CAAA,SAAA,KAAA;AAAA,MACa,SAAA;AAAA,IACZ;AAAA;AAAA;AAAA;AAAA,IACb,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAK0C,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AA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A,QAAA,GAAA;AAAA,MAAA,GAAA,GAAA,CAAA,IAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,MAmCuGd,EAAA,0BAAAK,EAAA,GAAAG,EAAAU,GAAA;AAAA,QAAlC,KAAA;AAAA,QAAG,IAAAlB,EAAA;AAAA,QAnCxE,iBAAAA,EAAA;AAAA,MAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,MAuC+Bd,EAAA,wBAAAK,EAAA,GAAAG,EAAAC,GAAA;AAAA,QAFsD,KAAA;AAAA,QAAI,OAAA;AAAA,QAAc,IAAA;AAAA,QArCvG,SAAA;AAAA,MAAA,GAAA;AAAA;UAAAQ,EAAAjB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA,KAAAA,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.7kpOXm-b.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '../tag/tag.types';\nimport {\n CheckboxInputState as BentoCheckboxState,\n type CheckboxInputType as BentoCheckboxType,\n type MultiCheckboxInputType as BentoMultiCheckboxType,\n} from '@/internal/checkbox-input/checkbox-input.types';\n\nexport { BentoCheckboxState, BentoCheckboxType, BentoMultiCheckboxType };\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n\nexport type BentoCheckboxTag = BentoTagProps;\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\" v-bind=\"styleAttrs\" :aria-hidden=\"getAriaHidden($attrs)\">\n <checkbox-input\n v-bind=\"$attrs\"\n ref=\"input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :has-error=\"shouldShowError\"\n :indeterminate=\"isIndeterminate\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :readonly=\"readonly\"\n @update:model-value=\"onChange\"\n />\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <span><slot /></span>\n <bento-typography v-if=\"optional\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n <bento-typography v-else-if=\"required\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-tag v-if=\"tag\" class=\"b-checkbox__label-tag\" v-bind=\"tag\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"contentSlotAvailable\" class=\"b-checkbox__content\" el=\"span\" variant=\"body\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n type HTMLAttributes,\n onMounted,\n type PropType,\n ref,\n toRefs,\n useAttrs,\n } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n type BentoCheckboxTag,\n type BentoCheckboxType,\n type BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { CheckboxInput } from '@/components/internal/checkbox-input';\n import { ErrorMessage } from '@/components/internal/error-message';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoTag } from '@/components/tag';\n import { type BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CheckboxInput,\n ErrorMessage,\n },\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\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 * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\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 * 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<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Highlights the checkbox is optional.\n */\n optional: { type: Boolean, default: false },\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 * Highlights the checkbox is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoCheckboxTag>, default: undefined },\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 emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // Content slot logic\n const hasContentSlot = computed(() => hasSlot('content'));\n const isCheckedOrIntermediate = computed(() => isIndeterminate?.value || isChecked?.value);\n const contentSlotAvailable = computed(\n () => hasContentSlot?.value && isCheckboxGroup?.value && isCheckedOrIntermediate?.value\n );\n\n // ARIA fields\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const checkboxTranslation = ref();\n // Translations used in the script tag need to be inside onMounted otherwise they fail in Vue 3\n onMounted(() => {\n checkboxTranslation.value = t('checkbox');\n });\n // Only add aria-label if no label slot is present\n const computedAriaLabel = computed(\n () =>\n useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : checkboxTranslation.value,\n }).value\n );\n const getAriaHidden = (attributes: HTMLAttributes) => attributes?.['aria-hidden'];\n\n const styleAttrs = computed(() => {\n const { style, class: cls } = useAttrs();\n return {\n class: cls as HTMLAttributes['class'],\n style: style as HTMLAttributes['style'],\n };\n });\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n const onChange = (newValue: BentoCheckboxType | BentoCheckboxGroupItems) => {\n if (disabled.value) {\n return;\n }\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaDescribedBy,\n computedAriaLabel,\n conditionalClass,\n defaultSlotValue,\n descriptionSlotValue,\n isIndeterminate,\n shouldShowError,\n shouldShowErrorMessage,\n contentSlotAvailable,\n hasContentSlot,\n styleAttrs,\n\n // Methods\n hasSlot,\n onChange,\n getAriaHidden,\n\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxEvent","BentoCheckboxEvent2","_sfc_main","defineComponent","messages","BentoTag","BentoTypography","CheckboxInput","ErrorMessage","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","hasContentSlot","isCheckedOrIntermediate","contentSlotAvailable","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","checkboxTranslation","onMounted","computedAriaLabel","useAriaLabel","getAriaHidden","attributes","styleAttrs","style","cls","useAttrs","conditionalClass","CheckboxInputState","newValue","_hoisted_1","_ctx","$attrs","createVNode","_component_checkbox_input","mergeProps","openBlock","createElementBlock","_hoisted_2","createBlock","_component_bento_typography","createElementVNode","createTextVNode","toDisplayString","required","createCommentVNode","_component_bento_tag","tag","renderSlot","_component_error_message"],"mappings":";;;;;;;;;;;;;;AASO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;GCoFRE,KAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,MAAA,EAAA,UAAAC,EAAA;AAAA,EACW,YAAA;AAAA,IACL,UAAAC;AAAA,IACR,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,EACA;AAAA,EACJ,cAAA;AAAA,EACc,OAAA,EAAA,MAAA,aAAA;AAAA,EACc,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACrB,WAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAOsC,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKC,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKF,eAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASK,YAAA;AAAA,MAQnC,MAAA,CAAA,SAAA,KAA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,EAAA;AAAA,QACF,OAAA;AAAA,QACI,IAAA;AAAA,QA/BvB,SAAA;AAAA,MAAA,GAAA;AAAA;UAAAiB,EAAAjB,EAAA,QAAA,eAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,GAAA,GAAA,CAAA,IAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,MAmCuGd,EAAA,0BAAAK,EAAA,GAAAG,EAAAU,GAAA;AAAA,QAAlC,KAAA;AAAA,QAAG,IAAAlB,EAAA;AAAA,QAnCxE,iBAAAA,EAAA;AAAA,MAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,MAuC+Bd,EAAA,wBAAAK,EAAA,GAAAG,EAAAC,GAAA;AAAA,QAFsD,KAAA;AAAA,QAAI,OAAA;AAAA,QAAc,IAAA;AAAA,QArCvG,SAAA;AAAA,MAAA,GAAA;AAAA;UAAAQ,EAAAjB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,CAAA,KAAAc,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA,KAAAA,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import {
|
|
2
|
+
import { openBlock as s, createElementBlock as l, mergeProps as o, toDisplayString as n, createCommentVNode as a, createElementVNode as e } from "vue";
|
|
3
3
|
import { _ as c } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
4
|
let r = 0;
|
|
5
5
|
const u = {
|
|
@@ -8,14 +8,14 @@ const u = {
|
|
|
8
8
|
}
|
|
9
9
|
}, p = { key: 0 }, d = ["clip-path"], f = ["id"];
|
|
10
10
|
function m(t, i, h, _, g, k) {
|
|
11
|
-
return
|
|
11
|
+
return s(), l("svg", o({ role: "img" }, t.$attrs, {
|
|
12
12
|
class: "ui-assets-icons-16",
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: "16",
|
|
15
15
|
height: "16",
|
|
16
16
|
fill: "none"
|
|
17
17
|
}), [
|
|
18
|
-
t.$attrs["svg-title"] ? (
|
|
18
|
+
t.$attrs["svg-title"] ? (s(), l("title", p, n(t.$attrs["svg-title"]), 1)) : a("", !0),
|
|
19
19
|
e("g", {
|
|
20
20
|
"clip-path": "url(#uia-ui-assets/icons-16-checkmark_circle_fill__a" + t.uuid + ")"
|
|
21
21
|
}, i[0] || (i[0] = [
|
|
@@ -41,4 +41,4 @@ const L = /* @__PURE__ */ c(u, [["render", m]]);
|
|
|
41
41
|
export {
|
|
42
42
|
L as C
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=checkmark-circle-fill.
|
|
44
|
+
//# sourceMappingURL=checkmark-circle-fill.DugX5fbG.js.map
|
package/dist/chunks/{checkmark-circle-fill._6-d40ru.js.map → checkmark-circle-fill.DugX5fbG.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkmark-circle-fill.
|
|
1
|
+
{"version":3,"file":"checkmark-circle-fill.DugX5fbG.js","sources":["../../../ui-assets/icons-16/dist/vue/checkmark-circle-fill.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-checkmark_circle_fill__a' + uuid + ')'\"><path fill=\"#001222\" d=\"M0.25 8C0.25 3.71979 3.71979 0.25 8 0.25C12.2802 0.25 15.75 3.71979 15.75 8C15.75 12.2802 12.2802 15.75 8 15.75C3.71979 15.75 0.25 12.2802 0.25 8ZM11.0001 4.93945L7.0001 8.93946L5.00011 6.93947L3.93945 8.00013L7.00011 11.0608L12.0608 6.00011L11.0001 4.93945Z\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-checkmark_circle_fill__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n"],"names":["uuid","_sfc_main","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_mergeProps","_ctx","_hoisted_1","_createCommentVNode","_createElementVNode"],"mappings":";;;AAOI,IAAIA,IAAO;AAEX,MAAKC,IAAU;AAAA,EACX,eAAe;AACX,SAAK,OAAOD,EAAK,SAAQ,GACzBA,KAAQ;AAAA,EACZ;SAbR,KAAA,EAAA,GAAAE,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAA0sB,OAA1sBC,EAA0sB,EAArsB,MAAK,MAAK,GAASC,EAAA,QAAM;AAAA,IAAE,OAAM;AAAA,IAAqB,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA;IAAoBA,EAAA,OAAM,WAAA,UAAnBF,EAAmE,SAFxMG,KAE0KD,EAAA,OAAM,WAAA,CAAA,GAAA,CAAA,KAFhLE,EAAA,IAAA,EAAA;AAAA,IAEwMC,EAAqX,KAAA;AAAA,MAAjX,sEAAoEH,EAAA,OAAI;AAAA;MAAQG,EAA6R,QAAA;AAAA,QAAvR,MAAK;AAAA,QAAU,GAAE;AAAA;IAFnT,IAAA,GAAAR,CAAA;AAAA,IAE6jBQ,EAA2I,QAAA,MAAA;AAAA,MAArIA,EAA8H,YAAA;AAAA,QAAnH,wDAAwDH,EAAA;AAAA;QAAMG,EAA0C,QAAA;AAAA,UAApC,OAAM;AAAA,UAAK,QAAO;AAAA,UAAK,MAAK;AAAA;MAF9qB,IAAA,GAAAP,CAAA;AAAA;;;;"}
|