@adyen/bento-vue3 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +109 -4
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/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/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{action-bar.BW9db7ja.js → action-bar.eo5EXYmg.js} +5 -5
- package/dist/chunks/{action-bar.BW9db7ja.js.map → action-bar.eo5EXYmg.js.map} +1 -1
- package/dist/chunks/{alert.eqWeCHyL.js → alert.DEf0borp.js} +23 -23
- package/dist/chunks/alert.DEf0borp.js.map +1 -0
- package/dist/chunks/{base-modal.BRYHc9Ez.js → base-modal.BlC6TZNz.js} +3 -3
- package/dist/chunks/{base-modal.BRYHc9Ez.js.map → base-modal.BlC6TZNz.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.DQaq1bkf.js +174 -0
- package/dist/chunks/button-actions-with-menu.DQaq1bkf.js.map +1 -0
- package/dist/chunks/{button-actions.BPnsl_QP.js → button-actions.BvGAE7sw.js} +3 -3
- package/dist/chunks/{button-actions.BPnsl_QP.js.map → button-actions.BvGAE7sw.js.map} +1 -1
- package/dist/chunks/calendar.D2X834TU.js +1252 -0
- package/dist/chunks/calendar.D2X834TU.js.map +1 -0
- package/dist/chunks/{card.BwC4MSjn.js → card.IrL_Fw-f.js} +2 -2
- package/dist/chunks/{card.BwC4MSjn.js.map → card.IrL_Fw-f.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Bzd-qpJ-.js → checkbox-group.BVJfN48k.js} +4 -4
- package/dist/chunks/{checkbox-group.Bzd-qpJ-.js.map → checkbox-group.BVJfN48k.js.map} +1 -1
- package/dist/chunks/{checkbox-input.XtCjXis9.js → checkbox-input.CgbJsFXD.js} +61 -55
- package/dist/chunks/checkbox-input.CgbJsFXD.js.map +1 -0
- package/dist/chunks/{checkbox.DJRe4ync.js → checkbox.erdZ58Kk.js} +72 -64
- package/dist/chunks/checkbox.erdZ58Kk.js.map +1 -0
- package/dist/chunks/{checkmark-circle-fill.D9gNCN0T.js → checkmark-circle-fill.jicbqe7k.js} +11 -11
- package/dist/chunks/checkmark-circle-fill.jicbqe7k.js.map +1 -0
- package/dist/chunks/{code-snippet.0HhLVaJR.js → code-snippet.Bb4_r0C8.js} +5 -5
- package/dist/chunks/{code-snippet.0HhLVaJR.js.map → code-snippet.Bb4_r0C8.js.map} +1 -1
- package/dist/chunks/{controls-group.DnX2B502.js → controls-group.BaDhGB9H.js} +2 -2
- package/dist/chunks/{controls-group.DnX2B502.js.map → controls-group.BaDhGB9H.js.map} +1 -1
- package/dist/chunks/{copy.BzeHBtEF.js → copy.gmSTAqHY.js} +2 -2
- package/dist/chunks/{copy.BzeHBtEF.js.map → copy.gmSTAqHY.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.DLWo6wBR.js → cross-circle-fill.B7YpDLTK.js} +18 -18
- package/dist/chunks/cross-circle-fill.B7YpDLTK.js.map +1 -0
- package/dist/chunks/{dashboard-section.CySxZmlx.js → dashboard-section.MAHmbUDG.js} +3 -3
- package/dist/chunks/{dashboard-section.CySxZmlx.js.map → dashboard-section.MAHmbUDG.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CCKLdMc7.js → dashed-underline.DY8xR9GH.js} +3 -3
- package/dist/chunks/{dashed-underline.CCKLdMc7.js.map → dashed-underline.DY8xR9GH.js.map} +1 -1
- package/dist/chunks/{data-grid-template.iM84gKjt.js → data-grid-template.Dievz913.js} +2 -2
- package/dist/chunks/{data-grid-template.iM84gKjt.js.map → data-grid-template.Dievz913.js.map} +1 -1
- package/dist/chunks/{data-grid.B2L_4qN7.js → data-grid.KZqjmRvk.js} +28 -28
- package/dist/chunks/data-grid.KZqjmRvk.js.map +1 -0
- package/dist/chunks/{date-picker.CMi0Kuy3.js → date-picker.BWJYkSmo.js} +123 -100
- package/dist/chunks/date-picker.BWJYkSmo.js.map +1 -0
- package/dist/chunks/date-range-picker.1Vbf9Zk8.js +1107 -0
- package/dist/chunks/date-range-picker.1Vbf9Zk8.js.map +1 -0
- package/dist/chunks/{date.Cvfyq77s.js → date.DoJuTLhO.js} +17 -17
- package/dist/chunks/{date.Cvfyq77s.js.map → date.DoJuTLhO.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.Filez078.js → dropdown-default-textbox.CwsgzDpx.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.Filez078.js.map → dropdown-default-textbox.CwsgzDpx.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.B4-3z8xz.js → dropdown-tag.C9nM0YHC.js} +4 -4
- package/dist/chunks/{dropdown-tag.B4-3z8xz.js.map → dropdown-tag.C9nM0YHC.js.map} +1 -1
- package/dist/chunks/{dropdown.CRLx2Juh.js → dropdown.qw5oXFYs.js} +171 -170
- package/dist/chunks/{dropdown.CRLx2Juh.js.map → dropdown.qw5oXFYs.js.map} +1 -1
- package/dist/chunks/{error-message.68kVjf_N.js → error-message.DAjisbU1.js} +3 -3
- package/dist/chunks/{error-message.68kVjf_N.js.map → error-message.DAjisbU1.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.Cz89e0Ci.js → file-uploader.BLJpDgAZ.js} +9 -9
- package/dist/chunks/file-uploader.BLJpDgAZ.js.map +1 -0
- package/dist/chunks/{filter-bar.bfUnCTPj.js → filter-bar.DYrXBQDF.js} +989 -1042
- package/dist/chunks/filter-bar.DYrXBQDF.js.map +1 -0
- package/dist/chunks/{focus-trap.DPJj05sV.js → focus-trap.DMgm-9f7.js} +2 -2
- package/dist/chunks/{focus-trap.DPJj05sV.js.map → focus-trap.DMgm-9f7.js.map} +1 -1
- package/dist/chunks/{footer-actions.DtbsjfSM.js → footer-actions.DK3pMfDY.js} +2 -2
- package/dist/chunks/{footer-actions.DtbsjfSM.js.map → footer-actions.DK3pMfDY.js.map} +1 -1
- package/dist/chunks/{form-layout-title.B7phPY2m.js → form-layout-title.BWCOZyay.js} +62 -60
- package/dist/chunks/form-layout-title.BWCOZyay.js.map +1 -0
- package/dist/chunks/header.BASKzNwu.js +234 -0
- package/dist/chunks/header.BASKzNwu.js.map +1 -0
- package/dist/chunks/index.BDuTpjD8.js +40 -0
- package/dist/chunks/index.BDuTpjD8.js.map +1 -0
- package/dist/chunks/index.BxBB1rsx.js +15 -0
- package/dist/chunks/index.BxBB1rsx.js.map +1 -0
- package/dist/chunks/{index.BS3BeXQJ.js → index.CMGT-6mh.js} +2 -1
- package/dist/chunks/{index.BS3BeXQJ.js.map → index.CMGT-6mh.js.map} +1 -1
- package/dist/chunks/index.DD7TppDb.js +10 -0
- package/dist/chunks/index.DD7TppDb.js.map +1 -0
- package/dist/chunks/{info-icon-with-popover.pHwJeQxm.js → info-icon-with-popover.BJccyOFx.js} +3 -3
- package/dist/chunks/{info-icon-with-popover.pHwJeQxm.js.map → info-icon-with-popover.BJccyOFx.js.map} +1 -1
- package/dist/chunks/{info-icon.DUUa2W2z.js → info-icon.L8AexnZg.js} +3 -3
- package/dist/chunks/{info-icon.DUUa2W2z.js.map → info-icon.L8AexnZg.js.map} +1 -1
- package/dist/chunks/{info.CpPLBOVg.js → info.HK3R7Drc.js} +9 -9
- package/dist/chunks/info.HK3R7Drc.js.map +1 -0
- package/dist/chunks/{input-field-password.zIUeIG8i.js → input-field-password.CZNUHo6s.js} +92 -89
- package/dist/chunks/input-field-password.CZNUHo6s.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.BGS23WKe.js → input-field-phone-number.D1zlBh3R.js} +348 -345
- package/dist/chunks/{input-field-phone-number.BGS23WKe.js.map → input-field-phone-number.D1zlBh3R.js.map} +1 -1
- package/dist/chunks/input-field.DqMdqM2u.js +298 -0
- package/dist/chunks/input-field.DqMdqM2u.js.map +1 -0
- package/dist/chunks/{inspector.types.9S8hNOjR.js → inspector.types.Dwt3V80X.js} +3 -3
- package/dist/chunks/{inspector.types.9S8hNOjR.js.map → inspector.types.Dwt3V80X.js.map} +1 -1
- package/dist/chunks/{layout-row.BAz7JrXo.js → layout-row.Drm_y8e3.js} +2 -2
- package/dist/chunks/{layout-row.BAz7JrXo.js.map → layout-row.Drm_y8e3.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.D557okR8.js → listbox-option-tag.YSvtcy4P.js} +2 -2
- package/dist/chunks/{listbox-option-tag.D557okR8.js.map → listbox-option-tag.YSvtcy4P.js.map} +1 -1
- package/dist/chunks/{menu.ZE0cTcKL.js → menu.DfzP2nRU.js} +22 -22
- package/dist/chunks/menu.DfzP2nRU.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CjZh3U8e.js → modal-fullscreen.T1x_vroe.js} +3 -3
- package/dist/chunks/{modal-fullscreen.CjZh3U8e.js.map → modal-fullscreen.T1x_vroe.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C4Z_Q8bq.js → modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.C4Z_Q8bq.js.map → modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js.map} +1 -1
- package/dist/chunks/{pagination.BSp5RwM0.js → pagination.Bt8DNme-.js} +2 -2
- package/dist/chunks/{pagination.BSp5RwM0.js.map → pagination.Bt8DNme-.js.map} +1 -1
- package/dist/chunks/{payment-method.BACjrzKP.js → payment-method.CLUppDo_.js} +7 -7
- package/dist/chunks/payment-method.CLUppDo_.js.map +1 -0
- package/dist/chunks/{popover.DLyVEjCd.js → popover.COzLcAET.js} +3 -3
- package/dist/chunks/{popover.DLyVEjCd.js.map → popover.COzLcAET.js.map} +1 -1
- package/dist/chunks/{popper-container.Bx3CBGg6.js → popper-container.CEtaux25.js} +2 -2
- package/dist/chunks/{popper-container.Bx3CBGg6.js.map → popper-container.CEtaux25.js.map} +1 -1
- package/dist/chunks/{promo-banner.Clae7YGL.js → promo-banner.BCpw2tDD.js} +2 -2
- package/dist/chunks/{promo-banner.Clae7YGL.js.map → promo-banner.BCpw2tDD.js.map} +1 -1
- package/dist/chunks/{radio-group.Bdy7_UIu.js → radio-group.rxg-4rF_.js} +4 -4
- package/dist/chunks/{radio-group.Bdy7_UIu.js.map → radio-group.rxg-4rF_.js.map} +1 -1
- package/dist/chunks/{search-bar.uUWWZpqL.js → search-bar.DlihXfPt.js} +5 -5
- package/dist/chunks/{search-bar.uUWWZpqL.js.map → search-bar.DlihXfPt.js.map} +1 -1
- package/dist/chunks/{search.BwQq1yRg.js → search.CW_aTqip.js} +13 -13
- package/dist/chunks/search.CW_aTqip.js.map +1 -0
- package/dist/chunks/{secondary-nav.DJudnYiY.js → secondary-nav.D2loVonk.js} +3 -3
- package/dist/chunks/{secondary-nav.DJudnYiY.js.map → secondary-nav.D2loVonk.js.map} +1 -1
- package/dist/chunks/{segmented-control.BqJXrEmp.js → segmented-control.Wn-miTIl.js} +2 -2
- package/dist/chunks/{segmented-control.BqJXrEmp.js.map → segmented-control.Wn-miTIl.js.map} +1 -1
- package/dist/chunks/{selection-card-group.COMI4GGI.js → selection-card-group.CtQaeZFM.js} +12 -12
- package/dist/chunks/{selection-card-group.COMI4GGI.js.map → selection-card-group.CtQaeZFM.js.map} +1 -1
- package/dist/chunks/{sidepanel.VwZpyqJr.js → sidepanel.CjaHQEin.js} +3 -3
- package/dist/chunks/{sidepanel.VwZpyqJr.js.map → sidepanel.CjaHQEin.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BZJQzyt_.js → structured-list-item.DAwADFpI.js} +5 -5
- package/dist/chunks/{structured-list-item.BZJQzyt_.js.map → structured-list-item.DAwADFpI.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.rBC-2kKM.js → summary-grid-item-custom.DTCzOBBy.js} +4 -4
- package/dist/chunks/{summary-grid-item-custom.rBC-2kKM.js.map → summary-grid-item-custom.DTCzOBBy.js.map} +1 -1
- package/dist/chunks/{tag.CXADLCgG.js → tag.B1hW92hG.js} +2 -2
- package/dist/chunks/{tag.CXADLCgG.js.map → tag.B1hW92hG.js.map} +1 -1
- package/dist/chunks/{textarea.4s69xpG3.js → textarea.DMA29yQA.js} +2 -2
- package/dist/chunks/{textarea.4s69xpG3.js.map → textarea.DMA29yQA.js.map} +1 -1
- package/dist/chunks/{timeline-item.DOoLkIox.js → timeline-item.kWg3dTy1.js} +12 -11
- package/dist/chunks/{timeline-item.DOoLkIox.js.map → timeline-item.kWg3dTy1.js.map} +1 -1
- package/dist/chunks/{tooltip.BtfIbhGU.js → tooltip.Y730-n-n.js} +2 -2
- package/dist/chunks/{tooltip.BtfIbhGU.js.map → tooltip.Y730-n-n.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.DRlP0P1P.js → tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js} +7 -7
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.9xqNZAmj.js → use-cached-selected-values.DDP7LJoI.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.9xqNZAmj.js.map → use-cached-selected-values.DDP7LJoI.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +51 -51
- 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 +35 -33
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +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/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +26 -0
- package/dist/styles/bento-light.css +26 -0
- package/dist/styles/bento.css +26 -0
- package/dist/styles/legacy.css +28 -2
- package/dist/styles/styleguide.css +26 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/chunks/alert.eqWeCHyL.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.Hl8tUKa4.js +0 -119
- package/dist/chunks/button-actions-with-menu.Hl8tUKa4.js.map +0 -1
- package/dist/chunks/calendar.DfN1__E_.js +0 -971
- package/dist/chunks/calendar.DfN1__E_.js.map +0 -1
- package/dist/chunks/checkbox-input.XtCjXis9.js.map +0 -1
- package/dist/chunks/checkbox.DJRe4ync.js.map +0 -1
- package/dist/chunks/checkmark-circle-fill.D9gNCN0T.js.map +0 -1
- package/dist/chunks/cross-circle-fill.DLWo6wBR.js.map +0 -1
- package/dist/chunks/data-grid.B2L_4qN7.js.map +0 -1
- package/dist/chunks/date-picker.CMi0Kuy3.js.map +0 -1
- package/dist/chunks/date-range-picker.-KwSzmW_.js +0 -1087
- package/dist/chunks/date-range-picker.-KwSzmW_.js.map +0 -1
- package/dist/chunks/file-uploader.Cz89e0Ci.js.map +0 -1
- package/dist/chunks/filter-bar.bfUnCTPj.js.map +0 -1
- package/dist/chunks/form-layout-title.B7phPY2m.js.map +0 -1
- package/dist/chunks/header.ITEMuMAU.js +0 -256
- package/dist/chunks/header.ITEMuMAU.js.map +0 -1
- package/dist/chunks/index.CrhTVr5J.js +0 -10
- package/dist/chunks/index.CrhTVr5J.js.map +0 -1
- package/dist/chunks/index.DDnf1O9p.js +0 -22
- package/dist/chunks/index.DDnf1O9p.js.map +0 -1
- package/dist/chunks/index.DPafeRJa.js +0 -10
- package/dist/chunks/index.DPafeRJa.js.map +0 -1
- package/dist/chunks/info.CpPLBOVg.js.map +0 -1
- package/dist/chunks/input-field-password.zIUeIG8i.js.map +0 -1
- package/dist/chunks/input-field.y006Hyc1.js +0 -292
- package/dist/chunks/input-field.y006Hyc1.js.map +0 -1
- package/dist/chunks/menu.ZE0cTcKL.js.map +0 -1
- package/dist/chunks/payment-method.BACjrzKP.js.map +0 -1
- package/dist/chunks/search.BwQq1yRg.js.map +0 -1
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.DRlP0P1P.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.Bzd-qpJ-.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,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AA;AAAA,UAAA,IAAA;AAAA;YA+BoB,MAAA;AAAA,YAAA,IAAAK,EAAA,MAAA;AAAA,cA/BpBG,EAAAf,EAAA,QAAA,WAAAgB,EAAA,EAAA,SAAA,GAAA,GAAAT,CAAA,GAAA,QAAA,EAAA;AAAA,YAAA,CAAA;AAAA,YAAA,KAAA;AAAA,UAAA,IAAA;AAAA,gIAAA,GAAA,GAAA;AAAA,MAAA,CAAA;AAAA,MAoCkBrB,GAAAA;AAAAA,IAAAA,GAAAA,GAAAA,CAAAA,oBAAAA,kBAAAA,SAAAA,eAAAA,YAAAA,QAAAA,cAAAA,SAAAA,YAAAA,YAAAA,cAAAA,CAAAA;AAAAA,IAIRc,EAAA,+BAAAH,EAAA,GAAAW,EAAAS,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAjB,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA,MAvClB,OAAA;AAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAkB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox-group.BVJfN48k.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","_ctx","hideLabel","label","optional","required","Fragment","renderList","item","createBlock","_component_bento_checkbox","disabled","createSlots","withCtx","createTextVNode","toDisplayString","renderSlot","mergeProps","_component_error_message","createCommentVNode"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAA+B,MAAAF;AAAA,EACrB,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA,EAAA,MAAA,aAAA;AAAA,EAC7B,OAAA;AAAA;AAAA;AAAA;AAAA,IACrB,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAIwC,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKD,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKE,QAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAOI,WAAA,EAAA,MAAA,SAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,OAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKgC,OAAA,EAA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,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAkB,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import { C as
|
|
1
|
+
import { createElementBlock as f, openBlock as s, mergeProps as D, createCommentVNode as x, createElementVNode as $, toDisplayString as O, defineComponent as S, computed as l, useAttrs as U, toRefs as H, normalizeClass as I, createBlock as E, unref as i } from "vue";
|
|
2
|
+
import { C as P } from "./checkmark-small.D7l69yBf.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { _ as
|
|
4
|
+
import { _ as A } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
5
|
import "../assets/checkbox-input.css";
|
|
6
|
-
var
|
|
6
|
+
var r = /* @__PURE__ */ ((e) => (e.UNCHECKED = "unchecked", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(r || {}), m = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e))(m || {});
|
|
7
7
|
let g = 0;
|
|
8
|
-
const
|
|
8
|
+
const T = {
|
|
9
9
|
beforeCreate() {
|
|
10
10
|
this.uuid = g.toString(), g += 1;
|
|
11
11
|
}
|
|
12
|
-
},
|
|
13
|
-
function
|
|
14
|
-
return
|
|
12
|
+
}, Y = { key: 0 };
|
|
13
|
+
function K(e, o, a, p, h, b) {
|
|
14
|
+
return s(), f("svg", D({ role: "img" }, e.$attrs, {
|
|
15
15
|
class: "ui-assets-icons-16",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
17
|
width: "16",
|
|
18
18
|
height: "16",
|
|
19
19
|
fill: "none"
|
|
20
20
|
}), [
|
|
21
|
-
e.$attrs["svg-title"] ? (
|
|
22
|
-
o[0] || (o[0] =
|
|
21
|
+
e.$attrs["svg-title"] ? (s(), f("title", Y, O(e.$attrs["svg-title"]), 1)) : x("", !0),
|
|
22
|
+
o[0] || (o[0] = $("path", {
|
|
23
23
|
fill: "#00112C",
|
|
24
24
|
d: "M4.25 7.25H11.75V8.75H4.25V7.25Z"
|
|
25
25
|
}, null, -1))
|
|
26
26
|
], 16);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const z = /* @__PURE__ */ A(T, [["render", K]]), G = ["id", "aria-label", "aria-checked", "aria-describedby", "aria-invalid", "checked", "disabled", ".indeterminate", "value", "aria-readonly"], M = {
|
|
29
29
|
name: "checkbox-input",
|
|
30
30
|
inheritAttrs: !1
|
|
31
|
-
},
|
|
32
|
-
...
|
|
31
|
+
}, Z = /* @__PURE__ */ S({
|
|
32
|
+
...M,
|
|
33
33
|
props: {
|
|
34
34
|
/**
|
|
35
35
|
* The aria label associated to the input checkbox.
|
|
@@ -83,69 +83,75 @@ const Y = /* @__PURE__ */ $(I, [["render", T]]), K = ["id", "aria-label", "aria-
|
|
|
83
83
|
},
|
|
84
84
|
emits: ["update:model-value"],
|
|
85
85
|
setup(e, { emit: o }) {
|
|
86
|
-
const a = e, p = o,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
[`b-checkbox-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
const a = e, p = o, h = l(() => {
|
|
87
|
+
{
|
|
88
|
+
const { class: t, style: v, ...n } = U();
|
|
89
|
+
return n;
|
|
90
|
+
}
|
|
91
|
+
}), { disabled: b, indeterminate: y, modelValue: c, readonly: k, value: d } = H(a), R = l(() => ({
|
|
92
|
+
[`b-checkbox-input--${r.DISABLED}`]: a.disabled,
|
|
93
|
+
[`b-checkbox-input--${r.READONLY}`]: a.readonly
|
|
94
|
+
})), B = l(() => ({
|
|
95
|
+
[`b-checkbox-input__outline--${r.UNCHECKED}`]: !u.value && !a.indeterminate,
|
|
96
|
+
[`b-checkbox-input__outline--${r.ERROR}`]: a.hasError,
|
|
97
|
+
[`b-checkbox-input__outline--${r.READONLY}`]: a.readonly
|
|
98
|
+
})), _ = l(() => Array.isArray(c.value)), u = l(() => _.value ? c.value.some((t) => t === d.value) : c.value), N = l(
|
|
99
|
+
() => a.indeterminate ? "mixed" : `${!!u.value}`
|
|
100
|
+
), L = l(
|
|
96
101
|
() => a.hasError && !a.disabled && !a.readonly
|
|
97
|
-
),
|
|
98
|
-
if (
|
|
99
|
-
|
|
102
|
+
), V = (t) => {
|
|
103
|
+
if (k.value) {
|
|
104
|
+
t.preventDefault();
|
|
100
105
|
return;
|
|
101
106
|
}
|
|
102
|
-
},
|
|
107
|
+
}, w = (t) => {
|
|
103
108
|
if (b.value)
|
|
104
109
|
return;
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
const
|
|
108
|
-
|
|
110
|
+
const v = t.target.checked;
|
|
111
|
+
if (_.value) {
|
|
112
|
+
const n = [...c.value], C = n.indexOf(d.value);
|
|
113
|
+
C === -1 ? n.push(d.value) : n.splice(C, 1), p(m.UPDATE, n);
|
|
109
114
|
} else
|
|
110
|
-
p(
|
|
115
|
+
p(m.UPDATE, v);
|
|
111
116
|
};
|
|
112
|
-
return (
|
|
113
|
-
class:
|
|
117
|
+
return (t, v) => (s(), f("div", {
|
|
118
|
+
class: I(["b-checkbox-input", R.value])
|
|
114
119
|
}, [
|
|
115
|
-
|
|
120
|
+
i(y) ? (s(), E(i(z), {
|
|
116
121
|
key: 0,
|
|
117
122
|
class: "b-checkbox-input__icon",
|
|
118
123
|
"svg-title": "",
|
|
119
124
|
"aria-hidden": "true"
|
|
120
|
-
})) :
|
|
125
|
+
})) : u.value ? (s(), E(i(P), {
|
|
121
126
|
key: 1,
|
|
122
127
|
class: "b-checkbox-input__icon",
|
|
123
128
|
"svg-title": "",
|
|
124
129
|
"aria-hidden": "true"
|
|
125
|
-
})) :
|
|
126
|
-
|
|
130
|
+
})) : x("", !0),
|
|
131
|
+
$("input", D({
|
|
127
132
|
id: e.id,
|
|
128
|
-
ref: "inputRef"
|
|
133
|
+
ref: "inputRef"
|
|
134
|
+
}, h.value, {
|
|
129
135
|
type: "checkbox",
|
|
130
|
-
class:
|
|
136
|
+
class: ["b-checkbox-input__outline", B.value],
|
|
131
137
|
"aria-label": e.ariaLabel,
|
|
132
|
-
"aria-checked":
|
|
138
|
+
"aria-checked": N.value,
|
|
133
139
|
"aria-describedby": e.ariaDescribedby,
|
|
134
|
-
"aria-invalid":
|
|
135
|
-
checked:
|
|
136
|
-
disabled:
|
|
137
|
-
".indeterminate":
|
|
138
|
-
value:
|
|
139
|
-
"aria-readonly":
|
|
140
|
-
onClick:
|
|
141
|
-
onChange:
|
|
142
|
-
}, null,
|
|
140
|
+
"aria-invalid": L.value,
|
|
141
|
+
checked: u.value,
|
|
142
|
+
disabled: i(b),
|
|
143
|
+
".indeterminate": i(y),
|
|
144
|
+
value: i(d),
|
|
145
|
+
"aria-readonly": i(k),
|
|
146
|
+
onClick: V,
|
|
147
|
+
onChange: w
|
|
148
|
+
}), null, 48, G)
|
|
143
149
|
], 2));
|
|
144
150
|
}
|
|
145
|
-
}),
|
|
151
|
+
}), Q = /* @__PURE__ */ A(Z, [["__scopeId", "data-v-b1e7648e"]]);
|
|
146
152
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
153
|
+
r as C,
|
|
154
|
+
z as N,
|
|
155
|
+
Q as a
|
|
150
156
|
};
|
|
151
|
-
//# sourceMappingURL=checkbox-input.
|
|
157
|
+
//# sourceMappingURL=checkbox-input.CgbJsFXD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-input.CgbJsFXD.js","sources":["../../../core/src/components/internal/checkbox-input/checkbox-input.types.ts","../../../ui-assets/icons-16/dist/vue/minus-small.vue","../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["export type MultiCheckboxInputType = Array<string | number>;\nexport type CheckboxInputType = boolean | MultiCheckboxInputType;\n\nexport enum CheckboxInputState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum CheckboxInputEvent {\n UPDATE = 'update:model-value',\n}\n\ninterface CheckboxInputGroupItem {\n value: string | number;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type CheckboxInputGroupItems = Array<CheckboxInputGroupItem>;\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M4.25 7.25H11.75V8.75H4.25V7.25Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <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=\"attrs\"\n type=\"checkbox\"\n class=\"b-checkbox-input__outline\"\n :class=\"outlineConditionalClasses\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedby\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"indeterminate\"\n :value=\"value\"\n :aria-readonly=\"readonly\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, HTMLAttributes, PropType, toRefs, useAttrs } from 'vue';\n import {\n CheckboxInputEvent,\n CheckboxInputGroupItems,\n CheckboxInputState,\n CheckboxInputType,\n MultiCheckboxInputType,\n } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { isVue3 } from 'vue-demi';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the checkbox. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<CheckboxInputType | CheckboxInputGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n });\n\n const emit = defineEmits<{\n /**\n * Emit that emits the input value\n */\n (e: 'update:model-value', value: boolean | Array<string | number>): void;\n }>();\n\n // filter out style classes because in vue3 they are also part of attrs\n const attrs = computed(() => {\n if (isVue3) {\n const { class: _class, style: _style, ...rest } = useAttrs();\n return rest;\n } else {\n return useAttrs();\n }\n });\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${CheckboxInputState.UNCHECKED}`]: !isChecked.value && !props.indeterminate,\n [`b-checkbox-input__outline--${CheckboxInputState.ERROR}`]: props.hasError,\n [`b-checkbox-input__outline--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as MultiCheckboxInputType).some(item => item === value.value);\n });\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n props.indeterminate ? 'mixed' : `${!!isChecked.value}`\n );\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(\n () => props.hasError && !props.disabled && !props.readonly\n );\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n return;\n }\n };\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as MultiCheckboxInputType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(CheckboxInputEvent.UPDATE, newCheckedList);\n } else {\n emit(CheckboxInputEvent.UPDATE, newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a checkbox input (without label)\n *\n * @example\n * import { BentoCheckboxInput } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <bento-checkbox-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'checkbox-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/checkbox-input/checkbox-input.scss\" />\n"],"names":["CheckboxInputState","CheckboxInputState2","CheckboxInputEvent","CheckboxInputEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","props","__props","emit","__emit","attrs","computed","_class","_style","rest","useAttrs","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index"],"mappings":";;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBADQA,IAAAD,KAAA,CAAA,CAAA;ACHR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;;AAVR,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;gFAFzHC,EAAA,IAAA,EAAA;AAAA;MAE8M,MAAA;AAAA,MAAe,GAAA;AAAA;;;kMCgMzNC,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7JA,UAAAC,IAAAC,GA4DAC,IAAAC,GAQAC,IAAAC,EAAA,MAAA;AACI;AACI,cAAA,EAAA,OAAAC,GAAA,OA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,EAAA,QAAAb,EAAA,KAAA;AAEA,QAAAc,MAAA,KACID,EAAA,KAAAb,EAAA,KAAA,IAEAa,EAAA,OAAAC,GAAA,CAAA,GAEJ1B,EAAAX,EAAA,QAAAoC,CAAA;AAAA,MAA8C;AAE9C,QAAAzB,EAAAX,EAAA,QAAAmC,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import {
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import { g as
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { _ as
|
|
1
|
+
import { defineComponent as Q, toRefs as D, computed as a, ref as W, useAttrs as X, resolveComponent as f, createElementBlock as T, openBlock as r, mergeProps as A, createVNode as Z, createCommentVNode as l, createBlock as n, withCtx as d, createElementVNode as G, renderSlot as E, createTextVNode as U, toDisplayString as q } from "vue";
|
|
2
|
+
import { B as x } from "./typography.DN5eC5ch.js";
|
|
3
|
+
import { a as ee, C as L } from "./checkbox-input.CgbJsFXD.js";
|
|
4
|
+
import { u as ae } from "./use-default-slot-validator.O02rzsob.js";
|
|
5
|
+
import { u as oe } from "./use-has-slot.B7eQSabc.js";
|
|
6
|
+
import { g as N } from "./generate-uid.NJ8tVoha.js";
|
|
7
|
+
import { g as _ } from "./get-slot-text.DQlZEsId.js";
|
|
8
|
+
import { u as re } from "./i18n.D9azDLPe.js";
|
|
9
|
+
import { u as te } from "./aria-label.CaUURpnB.js";
|
|
10
|
+
import { B as le } from "./tag.B1hW92hG.js";
|
|
11
|
+
import { E as ne } from "./error-message.DAjisbU1.js";
|
|
12
|
+
import { _ as se } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import "../assets/checkbox.css";
|
|
14
|
-
var
|
|
14
|
+
var i = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(i || {});
|
|
15
15
|
const M = {
|
|
16
16
|
"en-US": {
|
|
17
17
|
checkbox: "Checkbox",
|
|
@@ -28,15 +28,16 @@ const M = {
|
|
|
28
28
|
optional: "opcional",
|
|
29
29
|
required: "obrigatório"
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, de = Q({
|
|
32
32
|
name: "bento-checkbox",
|
|
33
33
|
i18n: { messages: M },
|
|
34
34
|
components: {
|
|
35
|
-
BentoTag:
|
|
36
|
-
BentoTypography:
|
|
37
|
-
CheckboxInput:
|
|
38
|
-
ErrorMessage:
|
|
35
|
+
BentoTag: le,
|
|
36
|
+
BentoTypography: x,
|
|
37
|
+
CheckboxInput: ee,
|
|
38
|
+
ErrorMessage: ne
|
|
39
39
|
},
|
|
40
|
+
inheritAttrs: !1,
|
|
40
41
|
model: { prop: "modelValue" },
|
|
41
42
|
props: {
|
|
42
43
|
/**
|
|
@@ -101,57 +102,64 @@ const M = {
|
|
|
101
102
|
*/
|
|
102
103
|
value: { type: [String, Number], default: null }
|
|
103
104
|
},
|
|
104
|
-
emits: [
|
|
105
|
-
setup(e, { attrs:
|
|
106
|
-
const { t: y } =
|
|
107
|
-
|
|
108
|
-
const
|
|
105
|
+
emits: [i.UPDATE, i.INPUT],
|
|
106
|
+
setup(e, { attrs: V, emit: h, slots: t }) {
|
|
107
|
+
const { t: y } = re({ messages: M }), g = N("description"), u = N("error"), o = oe(t), { disabled: c, indeterminate: v, modelValue: k, readonly: P, value: w } = D(e), $ = _(t)("default"), I = _(t)("description");
|
|
108
|
+
ae("bento-checkbox", t.default, t.description);
|
|
109
|
+
const b = a(() => Array.isArray(k.value)), S = a(() => b.value ? k.value.some((s) => s === w.value) : k.value), p = a(() => v.value), R = a(
|
|
109
110
|
() => !e.disabled && !e.readonly && (e.hasError || !!e.errorMessage)
|
|
110
|
-
), C = a(() => !e.disabled && !e.readonly && !!e.errorMessage),
|
|
111
|
-
() => (
|
|
112
|
-
),
|
|
113
|
-
() => `${C.value ?
|
|
114
|
-
),
|
|
115
|
-
ariaLabel:
|
|
111
|
+
), C = a(() => !e.disabled && !e.readonly && !!e.errorMessage), m = a(() => o("content")), B = a(() => (p == null ? void 0 : p.value) || (S == null ? void 0 : S.value)), j = a(
|
|
112
|
+
() => (m == null ? void 0 : m.value) && (b == null ? void 0 : b.value) && (B == null ? void 0 : B.value)
|
|
113
|
+
), F = a(
|
|
114
|
+
() => `${C.value ? u : ""} ${$ && I ? g : ""}`.trim() || null
|
|
115
|
+
), H = W(V["aria-label"]), { ariaLabel: J } = D(e), O = te({
|
|
116
|
+
ariaLabel: H.value,
|
|
116
117
|
// TODO: take this line away when the aria-label props is removed
|
|
117
|
-
label:
|
|
118
|
-
defaultFallback: o("default") ?
|
|
119
|
-
}),
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
label: J,
|
|
119
|
+
defaultFallback: o("default") ? _(t)("default") : y("checkbox")
|
|
120
|
+
}), Y = a(() => {
|
|
121
|
+
const { style: s, class: K } = X();
|
|
122
|
+
return {
|
|
123
|
+
class: K,
|
|
124
|
+
style: s
|
|
125
|
+
};
|
|
126
|
+
}), z = a(() => ({
|
|
127
|
+
[`b-checkbox--${L.DISABLED}`]: c.value,
|
|
128
|
+
[`b-checkbox--${L.READONLY}`]: P.value
|
|
122
129
|
}));
|
|
123
130
|
return {
|
|
124
131
|
// Values
|
|
125
132
|
descriptionId: g,
|
|
126
|
-
errorId:
|
|
127
|
-
ariaDescribedBy:
|
|
128
|
-
computedAriaLabel:
|
|
129
|
-
conditionalClass:
|
|
130
|
-
defaultSlotValue:
|
|
131
|
-
descriptionSlotValue:
|
|
132
|
-
isIndeterminate:
|
|
133
|
+
errorId: u,
|
|
134
|
+
ariaDescribedBy: F,
|
|
135
|
+
computedAriaLabel: O,
|
|
136
|
+
conditionalClass: z,
|
|
137
|
+
defaultSlotValue: $,
|
|
138
|
+
descriptionSlotValue: I,
|
|
139
|
+
isIndeterminate: p,
|
|
133
140
|
shouldShowError: R,
|
|
134
141
|
shouldShowErrorMessage: C,
|
|
135
142
|
contentSlotAvailable: j,
|
|
136
|
-
hasContentSlot:
|
|
143
|
+
hasContentSlot: m,
|
|
144
|
+
styleAttrs: Y,
|
|
137
145
|
// Methods
|
|
138
146
|
hasSlot: o,
|
|
139
|
-
onChange: (
|
|
140
|
-
|
|
147
|
+
onChange: (s) => {
|
|
148
|
+
c.value || (h(i.UPDATE, s), h(i.INPUT, s));
|
|
141
149
|
},
|
|
142
150
|
t: y
|
|
143
151
|
};
|
|
144
152
|
}
|
|
145
|
-
}),
|
|
153
|
+
}), ie = {
|
|
146
154
|
key: 0,
|
|
147
155
|
class: "b-checkbox__text"
|
|
148
156
|
};
|
|
149
|
-
function
|
|
150
|
-
const
|
|
151
|
-
return r(),
|
|
152
|
-
class:
|
|
153
|
-
}, [
|
|
154
|
-
|
|
157
|
+
function ue(e, V, h, t, y, g) {
|
|
158
|
+
const u = f("checkbox-input"), o = f("bento-typography"), c = f("bento-tag"), v = f("error-message");
|
|
159
|
+
return r(), T("label", A({
|
|
160
|
+
class: ["b-checkbox", e.conditionalClass]
|
|
161
|
+
}, e.styleAttrs), [
|
|
162
|
+
Z(u, A({ ref: "input" }, e.$attrs, {
|
|
155
163
|
"aria-label": e.computedAriaLabel,
|
|
156
164
|
"aria-describedby": e.ariaDescribedBy,
|
|
157
165
|
disabled: e.disabled,
|
|
@@ -162,15 +170,15 @@ function de(e, _, h, t, y, g) {
|
|
|
162
170
|
readonly: e.readonly,
|
|
163
171
|
"onUpdate:modelValue": e.onChange
|
|
164
172
|
}), null, 16, ["aria-label", "aria-describedby", "disabled", "has-error", "indeterminate", "value", "model-value", "readonly", "onUpdate:modelValue"]),
|
|
165
|
-
e.hasSlot("default") || e.shouldShowErrorMessage ? (r(),
|
|
173
|
+
e.hasSlot("default") || e.shouldShowErrorMessage ? (r(), T("span", ie, [
|
|
166
174
|
e.hasSlot("default") ? (r(), n(o, {
|
|
167
175
|
key: 0,
|
|
168
176
|
class: "b-checkbox__label",
|
|
169
177
|
el: "span",
|
|
170
178
|
variant: "body"
|
|
171
179
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
|
|
180
|
+
default: d(() => [
|
|
181
|
+
G("span", null, [
|
|
174
182
|
E(e.$slots, "default", {}, void 0, !0)
|
|
175
183
|
]),
|
|
176
184
|
e.optional ? (r(), n(o, {
|
|
@@ -178,7 +186,7 @@ function de(e, _, h, t, y, g) {
|
|
|
178
186
|
class: "b-checkbox__label-requirement",
|
|
179
187
|
el: "span"
|
|
180
188
|
}, {
|
|
181
|
-
default:
|
|
189
|
+
default: d(() => [
|
|
182
190
|
U("(" + q(e.t("optional")) + ")", 1)
|
|
183
191
|
]),
|
|
184
192
|
_: 1
|
|
@@ -187,12 +195,12 @@ function de(e, _, h, t, y, g) {
|
|
|
187
195
|
class: "b-checkbox__label-requirement",
|
|
188
196
|
el: "span"
|
|
189
197
|
}, {
|
|
190
|
-
default:
|
|
198
|
+
default: d(() => [
|
|
191
199
|
U("(" + q(e.t("required")) + ")", 1)
|
|
192
200
|
]),
|
|
193
201
|
_: 1
|
|
194
202
|
})) : l("", !0),
|
|
195
|
-
e.tag ? (r(), n(
|
|
203
|
+
e.tag ? (r(), n(c, A({
|
|
196
204
|
key: 2,
|
|
197
205
|
class: "b-checkbox__label-tag"
|
|
198
206
|
}, e.tag), null, 16)) : l("", !0)
|
|
@@ -206,7 +214,7 @@ function de(e, _, h, t, y, g) {
|
|
|
206
214
|
el: "span",
|
|
207
215
|
variant: "body"
|
|
208
216
|
}, {
|
|
209
|
-
default:
|
|
217
|
+
default: d(() => [
|
|
210
218
|
E(e.$slots, "description", {}, void 0, !0)
|
|
211
219
|
]),
|
|
212
220
|
_: 3
|
|
@@ -222,17 +230,17 @@ function de(e, _, h, t, y, g) {
|
|
|
222
230
|
el: "span",
|
|
223
231
|
variant: "body"
|
|
224
232
|
}, {
|
|
225
|
-
default:
|
|
233
|
+
default: d(() => [
|
|
226
234
|
E(e.$slots, "content", {}, void 0, !0)
|
|
227
235
|
]),
|
|
228
236
|
_: 3
|
|
229
237
|
})) : l("", !0)
|
|
230
238
|
])) : l("", !0)
|
|
231
|
-
],
|
|
239
|
+
], 16);
|
|
232
240
|
}
|
|
233
|
-
const
|
|
241
|
+
const Ee = /* @__PURE__ */ se(de, [["render", ue], ["__scopeId", "data-v-96cbf3a6"]]);
|
|
234
242
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
243
|
+
Ee as B,
|
|
244
|
+
i as a
|
|
237
245
|
};
|
|
238
|
-
//# sourceMappingURL=checkbox.
|
|
246
|
+
//# sourceMappingURL=checkbox.erdZ58Kk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.erdZ58Kk.js","sources":["../../../core/src/components/checkbox/checkbox.types.ts","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '@/core/components/tag/tag.types';\nimport type {\n CheckboxInputType as BentoCheckboxType,\n MultiCheckboxInputType as BentoMultiCheckboxType,\n} from '@/core/components/internal/checkbox-input/checkbox-input.types';\nimport { CheckboxInputState as BentoCheckboxState } from '@/core/components/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\">\n <checkbox-input\n ref=\"input\"\n v-bind=\"$attrs\"\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 { computed, defineComponent, PropType, ref, toRefs, useAttrs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxTag,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from '@/core/components/checkbox/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 type { HTMLAttributes } from 'vue/types/jsx.d.ts';\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 { BentoCheckboxGroupItems } from '@/core/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 computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default') ? (getSlotText(slots)('default') as string) : t('checkbox'),\n });\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\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox/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","computedAriaLabel","useAriaLabel","styleAttrs","style","cls","useAttrs","conditionalClass","CheckboxInputState","newValue","_ctx","openBlock","createElementBlock","_hoisted_1","createBlock","_component_bento_typography","createElementVNode","createTextVNode","toDisplayString","required","createCommentVNode","_component_bento_tag","mergeProps","tag","renderSlot","_component_error_message"],"mappings":";;;;;;;;;;;;;AASY,I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A,CAAA,KAAAU,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA,KAAAA,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { createElementBlock as
|
|
2
|
+
import { createElementBlock as s, openBlock as l, mergeProps as o, createCommentVNode as n, createElementVNode as e, toDisplayString as a } from "vue";
|
|
3
3
|
import { _ as c } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
|
-
let
|
|
5
|
-
const
|
|
4
|
+
let r = 0;
|
|
5
|
+
const u = {
|
|
6
6
|
beforeCreate() {
|
|
7
|
-
this.uuid =
|
|
7
|
+
this.uuid = r.toString(), r += 1;
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, p = { key: 0 }, d = ["clip-path"], f = ["id"];
|
|
10
10
|
function m(t, i, h, _, g, C) {
|
|
11
|
-
return
|
|
11
|
+
return l(), s("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"] ? (l(), s("title", p, a(t.$attrs["svg-title"]), 1)) : n("", !0),
|
|
19
19
|
e("g", {
|
|
20
|
-
"clip-path": "url(#uia-icons-16-checkmark_circle_fill__a" + t.uuid + ")"
|
|
20
|
+
"clip-path": "url(#uia-ui-assets/icons-16-checkmark_circle_fill__a" + t.uuid + ")"
|
|
21
21
|
}, i[0] || (i[0] = [
|
|
22
22
|
e("path", {
|
|
23
23
|
fill: "#00112C",
|
|
@@ -26,7 +26,7 @@ function m(t, i, h, _, g, C) {
|
|
|
26
26
|
]), 8, d),
|
|
27
27
|
e("defs", null, [
|
|
28
28
|
e("clipPath", {
|
|
29
|
-
id: "uia-icons-16-checkmark_circle_fill__a" + t.uuid
|
|
29
|
+
id: "uia-ui-assets/icons-16-checkmark_circle_fill__a" + t.uuid
|
|
30
30
|
}, i[1] || (i[1] = [
|
|
31
31
|
e("rect", {
|
|
32
32
|
width: "16",
|
|
@@ -37,8 +37,8 @@ function m(t, i, h, _, g, C) {
|
|
|
37
37
|
])
|
|
38
38
|
], 16);
|
|
39
39
|
}
|
|
40
|
-
const L = /* @__PURE__ */ c(
|
|
40
|
+
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.jicbqe7k.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkmark-circle-fill.jicbqe7k.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=\"#00112C\" 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,SAAU,GAC3BA,KAAQ;AAAA,EACX;AACJ,SAdL,KAAA,EAAA,GAAAE,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAA0sB,OAA1sBC,EAA0sB,EAArsB,MAAK,MAAK,GAASC,EAAM,QAAA;AAAA,IAAE,OAAM;AAAA,IAAqB,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA;IAAoBA,EAAM,OAAA,WAAA,UAAnBF,EAAmE,SAFxMG,KAE0KD,EAAM,OAAA,WAAA,CAAA,GAAA,CAAA,KAFhLE,EAAA,IAAA,EAAA;AAAA,IAEwMC,EAAqX,KAAA;AAAA,MAAjX,sEAAoEH,EAAI,OAAA;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,EAAI;AAAA;QAAEG,EAA0C,QAAA;AAAA,UAApC,OAAM;AAAA,UAAK,QAAO;AAAA,UAAK,MAAK;AAAA;MAF9qB,IAAA,GAAAP,CAAA;AAAA;;;;"}
|