@adyen/bento-vue2 2.0.0-rc.6 → 2.0.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/README.md +0 -38
- package/dist/@types/index.d.ts +78 -34
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-tag.css +1 -1
- package/dist/assets/anchor-scroller.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid-template.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/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/info-icon-with-popover.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/progress-bar.css +1 -1
- package/dist/assets/promo-banner.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/table-of-contents.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.V3zpgTzM.js → accordion-item.DOj7vqeL.js} +2 -2
- package/dist/chunks/accordion-item.DOj7vqeL.js.map +1 -0
- package/dist/chunks/{action-bar.BhS26IWQ.js → action-bar.BsXW7BI2.js} +77 -67
- package/dist/chunks/action-bar.BsXW7BI2.js.map +1 -0
- package/dist/chunks/{ai-button.CeT3y12R.js → ai-button.BnFk5CzK.js} +2 -2
- package/dist/chunks/{ai-button.CeT3y12R.js.map → ai-button.BnFk5CzK.js.map} +1 -1
- package/dist/chunks/{ai-tag.C72E0L5z.js → ai-tag.D2Q0xhFK.js} +3 -3
- package/dist/chunks/ai-tag.D2Q0xhFK.js.map +1 -0
- package/dist/chunks/{alert.DrGpzkQI.js → alert.DJDHwVeR.js} +2 -2
- package/dist/chunks/{alert.DrGpzkQI.js.map → alert.DJDHwVeR.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.DT7QZd5b.js → anchor-scroller.BbvghQxZ.js} +8 -8
- package/dist/chunks/anchor-scroller.BbvghQxZ.js.map +1 -0
- package/dist/chunks/{base-button.edpjvY15.js → base-button.DOhHyU7x.js} +2 -2
- package/dist/chunks/{base-button.edpjvY15.js.map → base-button.DOhHyU7x.js.map} +1 -1
- package/dist/chunks/{base-modal.BXDCTPAM.js → base-modal.CcmoTJdc.js} +90 -82
- package/dist/chunks/base-modal.CcmoTJdc.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.CgInFpmT.js → button-actions-with-menu.BY394ars.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.CgInFpmT.js.map → button-actions-with-menu.BY394ars.js.map} +1 -1
- package/dist/chunks/{button-actions.DdAWQn3c.js → button-actions.bkcLUE1G.js} +5 -5
- package/dist/chunks/{button-actions.DdAWQn3c.js.map → button-actions.bkcLUE1G.js.map} +1 -1
- package/dist/chunks/{button.CBqJGWy5.js → button.DII5Ifwa.js} +2 -2
- package/dist/chunks/{button.CBqJGWy5.js.map → button.DII5Ifwa.js.map} +1 -1
- package/dist/chunks/{calendar.Avy_89bW.js → calendar.CXdLEeN4.js} +5 -5
- package/dist/chunks/calendar.CXdLEeN4.js.map +1 -0
- package/dist/chunks/{card.C-e-dnNE.js → card.b9PEJ7hm.js} +57 -49
- package/dist/chunks/card.b9PEJ7hm.js.map +1 -0
- package/dist/chunks/{checkbox-group.DKSC-XM9.js → checkbox-group.UYN1ljai.js} +6 -6
- package/dist/chunks/checkbox-group.UYN1ljai.js.map +1 -0
- package/dist/chunks/{checkbox.CZM7Q3Zi.js → checkbox.Co4HoHKF.js} +15 -15
- package/dist/chunks/checkbox.Co4HoHKF.js.map +1 -0
- package/dist/chunks/{chip.CCBRXSGa.js → chip.DRsJylWl.js} +2 -2
- package/dist/chunks/{chip.CCBRXSGa.js.map → chip.DRsJylWl.js.map} +1 -1
- package/dist/chunks/{code-snippet.Dius_4s_.js → code-snippet.CnThWqVb.js} +5 -5
- package/dist/chunks/{code-snippet.Dius_4s_.js.map → code-snippet.CnThWqVb.js.map} +1 -1
- package/dist/chunks/{copy.CXHEw5S0.js → copy.CSk1rCRo.js} +2 -2
- package/dist/chunks/{copy.CXHEw5S0.js.map → copy.CSk1rCRo.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill-small.Doaiq7Wx.js → cross-circle-fill-small.CZN966bc.js} +2 -2
- package/dist/chunks/cross-circle-fill-small.CZN966bc.js.map +1 -0
- package/dist/chunks/{dashboard-section.MA5pmdOu.js → dashboard-section.CYEoNH9Q.js} +3 -3
- package/dist/chunks/{dashboard-section.MA5pmdOu.js.map → dashboard-section.CYEoNH9Q.js.map} +1 -1
- package/dist/chunks/{dashed-underline.B7PRJBq4.js → dashed-underline.CzKc-fJW.js} +2 -2
- package/dist/chunks/{dashed-underline.B7PRJBq4.js.map → dashed-underline.CzKc-fJW.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BEM5__ib.js → data-grid-template.DCwzh2G7.js} +4 -4
- package/dist/chunks/{data-grid-template.BEM5__ib.js.map → data-grid-template.DCwzh2G7.js.map} +1 -1
- package/dist/chunks/{data-grid.B9Htvwxc.js → data-grid.B1lI07ze.js} +19 -19
- package/dist/chunks/data-grid.B1lI07ze.js.map +1 -0
- package/dist/chunks/{date-picker.CnRL1L1b.js → date-picker.gDsw8bn1.js} +7 -7
- package/dist/chunks/date-picker.gDsw8bn1.js.map +1 -0
- package/dist/chunks/{date-range-picker.ucOMFCrT.js → date-range-picker.CqixIJxG.js} +10 -10
- package/dist/chunks/{date-range-picker.ucOMFCrT.js.map → date-range-picker.CqixIJxG.js.map} +1 -1
- package/dist/chunks/{date-time-picker.DvEpFiBu.js → date-time-picker.Bktntun4.js} +5 -5
- package/dist/chunks/{date-time-picker.DvEpFiBu.js.map → date-time-picker.Bktntun4.js.map} +1 -1
- package/dist/chunks/{dialog-page.CEVl-RI4.js → dialog-page.Bct3zOQO.js} +2 -2
- package/dist/chunks/{dialog-page.CEVl-RI4.js.map → dialog-page.Bct3zOQO.js.map} +1 -1
- package/dist/chunks/{draggable-handle.CJ2udN5Z.js → draggable-handle.DgVdGC1V.js} +2 -2
- package/dist/chunks/{draggable-handle.CJ2udN5Z.js.map → draggable-handle.DgVdGC1V.js.map} +1 -1
- package/dist/chunks/{draggable.D9_-DZ-l.js → draggable.DYKdXdbj.js} +2 -2
- package/dist/chunks/{draggable.D9_-DZ-l.js.map → draggable.DYKdXdbj.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BEzzqw23.js → dropdown-tag.Dk7SooVv.js} +3 -3
- package/dist/chunks/{dropdown-tag.BEzzqw23.js.map → dropdown-tag.Dk7SooVv.js.map} +1 -1
- package/dist/chunks/{dropdown.Bkl-FGT4.js → dropdown.Bnq4kP7k.js} +9 -9
- package/dist/chunks/dropdown.Bnq4kP7k.js.map +1 -0
- package/dist/chunks/{empty-state.CCnSOrRQ.js → empty-state.C2wjdE3y.js} +3 -3
- package/dist/chunks/{empty-state.CCnSOrRQ.js.map → empty-state.C2wjdE3y.js.map} +1 -1
- package/dist/chunks/es6.yPcTMnSH.js.map +1 -1
- package/dist/chunks/{file-uploader.BRedpY0J.js → file-uploader.DllKBmP8.js} +6 -6
- package/dist/chunks/file-uploader.DllKBmP8.js.map +1 -0
- package/dist/chunks/{filter-bar.Di-vepKR.js → filter-bar.DXpLhnxG.js} +572 -591
- package/dist/chunks/filter-bar.DXpLhnxG.js.map +1 -0
- package/dist/chunks/{fixed-scroller.QHqymN36.js → fixed-scroller.YC4bZifw.js} +2 -2
- package/dist/chunks/{fixed-scroller.QHqymN36.js.map → fixed-scroller.YC4bZifw.js.map} +1 -1
- package/dist/chunks/{footer-actions.Hs92lEbc.js → footer-actions.C9STwwcv.js} +3 -3
- package/dist/chunks/{footer-actions.Hs92lEbc.js.map → footer-actions.C9STwwcv.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CCsmZ9E8.js → form-layout-title.C0lwzPZz.js} +2 -2
- package/dist/chunks/{form-layout-title.CCsmZ9E8.js.map → form-layout-title.C0lwzPZz.js.map} +1 -1
- package/dist/chunks/generate-uid.DBWe4g6T.js.map +1 -1
- package/dist/chunks/{header-with-views.CRmtYRDr.js → header-with-views.HwbE278X.js} +665 -661
- package/dist/chunks/{header-with-views.CRmtYRDr.js.map → header-with-views.HwbE278X.js.map} +1 -1
- package/dist/chunks/{header.JBgD0-kG.js → header.CmyqVXuG.js} +4 -4
- package/dist/chunks/{header.JBgD0-kG.js.map → header.CmyqVXuG.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.B8URkh7g.js → info-icon-with-popover.BvYyGm4D.js} +3 -3
- package/dist/chunks/info-icon-with-popover.BvYyGm4D.js.map +1 -0
- package/dist/chunks/{input-field-password.Dbl53ZX_.js → input-field-password.9bWhLud0.js} +5 -5
- package/dist/chunks/input-field-password.9bWhLud0.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.BdZDHzrf.js → input-field-phone-number.CCn1N9St.js} +2 -2
- package/dist/chunks/{input-field-phone-number.BdZDHzrf.js.map → input-field-phone-number.CCn1N9St.js.map} +1 -1
- package/dist/chunks/{input-field.LPEj6r0i.js → input-field.D912rZS_.js} +3 -3
- package/dist/chunks/input-field.D912rZS_.js.map +1 -0
- package/dist/chunks/{input-time.uqE8FS62.js → input-time.CXMuvF9N.js} +3 -3
- package/dist/chunks/{input-time.uqE8FS62.js.map → input-time.CXMuvF9N.js.map} +1 -1
- package/dist/chunks/{inspector-page.B8HHiZB3.js → inspector-page.BRC_7uro.js} +3 -3
- package/dist/chunks/{inspector-page.B8HHiZB3.js.map → inspector-page.BRC_7uro.js.map} +1 -1
- package/dist/chunks/{inspector.CcXe5K4v.js → inspector.IOtNex1r.js} +3 -3
- package/dist/chunks/inspector.IOtNex1r.js.map +1 -0
- package/dist/chunks/{link.BzIDMKgE.js → link.Cls8XShm.js} +4 -4
- package/dist/chunks/link.Cls8XShm.js.map +1 -0
- package/dist/chunks/{list-item.Bcqodg1-.js → list-item.HjabBEb8.js} +3 -3
- package/dist/chunks/{list-item.Bcqodg1-.js.map → list-item.HjabBEb8.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.B08qQaBW.js → listbox-option-tag.DhNxvqRO.js} +2 -2
- package/dist/chunks/{listbox-option-tag.B08qQaBW.js.map → listbox-option-tag.DhNxvqRO.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Bo2wcyxV.js → modal-fullscreen.Bi1bQs4Z.js} +6 -6
- package/dist/chunks/modal-fullscreen.Bi1bQs4Z.js.map +1 -0
- package/dist/chunks/{modal.pzXwZQtG.js → modal.B3-pmL5s.js} +5 -5
- package/dist/chunks/{modal.pzXwZQtG.js.map → modal.B3-pmL5s.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.CKVu4No8.js → navigation-menu-group.B-AV49Bn.js} +6 -6
- package/dist/chunks/navigation-menu-group.B-AV49Bn.js.map +1 -0
- package/dist/chunks/{pagination.D4uye85j.js → pagination.cI_pc6oE.js} +5 -5
- package/dist/chunks/pagination.cI_pc6oE.js.map +1 -0
- package/dist/chunks/{progress-bar.CeSR79Ue.js → progress-bar.RlF3a0Gb.js} +2 -2
- package/dist/chunks/progress-bar.RlF3a0Gb.js.map +1 -0
- package/dist/chunks/{promo-banner.BzTq9SMT.js → promo-banner.B5szTysj.js} +7 -7
- package/dist/chunks/{promo-banner.BzTq9SMT.js.map → promo-banner.B5szTysj.js.map} +1 -1
- package/dist/chunks/{radio-group.70MGuwY1.js → radio-group.CvsQDlHi.js} +4 -4
- package/dist/chunks/radio-group.CvsQDlHi.js.map +1 -0
- package/dist/chunks/{rich-text-editor.wa-8sYrf.js → rich-text-editor.DNmVJilP.js} +6 -6
- package/dist/chunks/{rich-text-editor.wa-8sYrf.js.map → rich-text-editor.DNmVJilP.js.map} +1 -1
- package/dist/chunks/{search-bar.C900XBUm.js → search-bar.--4KVNkf.js} +3 -3
- package/dist/chunks/{search-bar.C900XBUm.js.map → search-bar.--4KVNkf.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Dv3WA-JA.js → secondary-nav.CXtDQAay.js} +5 -5
- package/dist/chunks/secondary-nav.CXtDQAay.js.map +1 -0
- package/dist/chunks/{segmented-control.CxOLPKpX.js → segmented-control.nYpRQTGc.js} +2 -2
- package/dist/chunks/segmented-control.nYpRQTGc.js.map +1 -0
- package/dist/chunks/{selection-card-group.DNHKvN7F.js → selection-card-group.DjFWMqVZ.js} +21 -21
- package/dist/chunks/selection-card-group.DjFWMqVZ.js.map +1 -0
- package/dist/chunks/{sidepanel.lCym69kV.js → sidepanel.CntIcmx-.js} +6 -6
- package/dist/chunks/sidepanel.CntIcmx-.js.map +1 -0
- package/dist/chunks/{step.DWC-MMij.js → step.BCa9IOWB.js} +2 -2
- package/dist/chunks/{step.DWC-MMij.js.map → step.BCa9IOWB.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DozZFSKW.js → structured-list-item.Bhe0CH1M.js} +3 -3
- package/dist/chunks/{structured-list-item.DozZFSKW.js.map → structured-list-item.Bhe0CH1M.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.W9PBumap.js → summary-grid.types.C70ED6WD.js} +4 -4
- package/dist/chunks/{summary-grid.types.W9PBumap.js.map → summary-grid.types.C70ED6WD.js.map} +1 -1
- package/dist/chunks/{tab.5rS16WWy.js → tab.BK1sIJAJ.js} +38 -38
- package/dist/chunks/tab.BK1sIJAJ.js.map +1 -0
- package/dist/chunks/{table-of-contents.f_6G1qFS.js → table-of-contents.BTy95Rrs.js} +2 -2
- package/dist/chunks/table-of-contents.BTy95Rrs.js.map +1 -0
- package/dist/chunks/tag.Dz1FQSZb.js +56 -0
- package/dist/chunks/tag.Dz1FQSZb.js.map +1 -0
- package/dist/chunks/{textarea.BGm1lgyY.js → textarea.CcV9U3I7.js} +4 -4
- package/dist/chunks/textarea.CcV9U3I7.js.map +1 -0
- package/dist/chunks/{timeline-item.Ctso54I1.js → timeline-item.BG2by0xf.js} +9 -9
- package/dist/chunks/{timeline-item.Ctso54I1.js.map → timeline-item.BG2by0xf.js.map} +1 -1
- package/dist/chunks/title-details.ChwPP7C5.js +119 -0
- package/dist/chunks/title-details.ChwPP7C5.js.map +1 -0
- package/dist/chunks/{toast.DL_9zlHB.js → toast.CO6ByH3n.js} +2 -2
- package/dist/chunks/{toast.DL_9zlHB.js.map → toast.CO6ByH3n.js.map} +1 -1
- package/dist/chunks/{toggle.BkTeqKsx.js → toggle.Dgh7aw1D.js} +2 -2
- package/dist/chunks/toggle.Dgh7aw1D.js.map +1 -0
- package/dist/chunks/tooltip.DFYc5NKM.js.map +1 -1
- package/dist/chunks/{tutorial.FPpVdWTS.js → tutorial.K0aOQWIg.js} +2 -2
- package/dist/chunks/{tutorial.FPpVdWTS.js.map → tutorial.K0aOQWIg.js.map} +1 -1
- package/dist/chunks/use-bento-toast-controller.A5xraVqa.js.map +1 -1
- package/dist/chunks/{use-date-input-formatter.BzLbx82k.js → use-date-input-formatter.MgbFwUqJ.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BzLbx82k.js.map → use-date-input-formatter.MgbFwUqJ.js.map} +1 -1
- package/dist/chunks/use-dynamic-date-fns-locale.Bpb2DeYR.js +39 -0
- package/dist/chunks/use-dynamic-date-fns-locale.Bpb2DeYR.js.map +1 -0
- 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-time-picker.js +1 -1
- package/dist/draggable.js +2 -2
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +64 -64
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/inspector.js +2 -2
- package/dist/internal.js +10 -10
- package/dist/link.js +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/progress-bar.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +3 -3
- package/dist/styles/bento-light.css +4 -4
- package/dist/styles/bento.css +4 -4
- package/dist/styles/legacy.css +4 -4
- package/dist/styles/styleguide.css +4 -4
- package/dist/styles/utility.css +4 -4
- package/dist/summary-grid.js +1 -1
- package/dist/table-of-contents.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/web-types.json +65 -3
- package/package.json +6 -6
- package/dist/chunks/accordion-item.V3zpgTzM.js.map +0 -1
- package/dist/chunks/action-bar.BhS26IWQ.js.map +0 -1
- package/dist/chunks/ai-tag.C72E0L5z.js.map +0 -1
- package/dist/chunks/anchor-scroller.DT7QZd5b.js.map +0 -1
- package/dist/chunks/base-modal.BXDCTPAM.js.map +0 -1
- package/dist/chunks/calendar.Avy_89bW.js.map +0 -1
- package/dist/chunks/card.C-e-dnNE.js.map +0 -1
- package/dist/chunks/checkbox-group.DKSC-XM9.js.map +0 -1
- package/dist/chunks/checkbox.CZM7Q3Zi.js.map +0 -1
- package/dist/chunks/cross-circle-fill-small.Doaiq7Wx.js.map +0 -1
- package/dist/chunks/data-grid.B9Htvwxc.js.map +0 -1
- package/dist/chunks/date-picker.CnRL1L1b.js.map +0 -1
- package/dist/chunks/dropdown.Bkl-FGT4.js.map +0 -1
- package/dist/chunks/file-uploader.BRedpY0J.js.map +0 -1
- package/dist/chunks/filter-bar.Di-vepKR.js.map +0 -1
- package/dist/chunks/info-icon-with-popover.B8URkh7g.js.map +0 -1
- package/dist/chunks/input-field-password.Dbl53ZX_.js.map +0 -1
- package/dist/chunks/input-field.LPEj6r0i.js.map +0 -1
- package/dist/chunks/inspector.CcXe5K4v.js.map +0 -1
- package/dist/chunks/link.BzIDMKgE.js.map +0 -1
- package/dist/chunks/modal-fullscreen.Bo2wcyxV.js.map +0 -1
- package/dist/chunks/navigation-menu-group.CKVu4No8.js.map +0 -1
- package/dist/chunks/pagination.D4uye85j.js.map +0 -1
- package/dist/chunks/progress-bar.CeSR79Ue.js.map +0 -1
- package/dist/chunks/radio-group.70MGuwY1.js.map +0 -1
- package/dist/chunks/secondary-nav.Dv3WA-JA.js.map +0 -1
- package/dist/chunks/segmented-control.CxOLPKpX.js.map +0 -1
- package/dist/chunks/selection-card-group.DNHKvN7F.js.map +0 -1
- package/dist/chunks/sidepanel.lCym69kV.js.map +0 -1
- package/dist/chunks/tab.5rS16WWy.js.map +0 -1
- package/dist/chunks/table-of-contents.f_6G1qFS.js.map +0 -1
- package/dist/chunks/tag.DSzato7w.js +0 -50
- package/dist/chunks/tag.DSzato7w.js.map +0 -1
- package/dist/chunks/textarea.BGm1lgyY.js.map +0 -1
- package/dist/chunks/title-details.Dwm8V6Zg.js +0 -151
- package/dist/chunks/title-details.Dwm8V6Zg.js.map +0 -1
- package/dist/chunks/toggle.BkTeqKsx.js.map +0 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { B as
|
|
12
|
-
import {
|
|
1
|
+
import { defineComponent as U, useSlots as R, ref as C, watch as H, computed as o, onMounted as O } from "vue";
|
|
2
|
+
import { B as z, d as N } from "./typography.D1OZJbEa.js";
|
|
3
|
+
import { B as F } from "./link.Cls8XShm.js";
|
|
4
|
+
import { C as W } from "./chevron-down.B_QiVCoO.js";
|
|
5
|
+
import { C as P } from "./chevron-up.YQRo8uKs.js";
|
|
6
|
+
import { C as K } from "./chevron-right-small.zD3HHYEi.js";
|
|
7
|
+
import { u as Y } from "./use-expandable-content-height.Bdd9hQwq.js";
|
|
8
|
+
import { u as q } from "./use-has-slot.C9lQZ6nz.js";
|
|
9
|
+
import { g as j } from "./generate-uid.DBWe4g6T.js";
|
|
10
|
+
import { u as G } from "./index.CPOlyau9.js";
|
|
11
|
+
import { B as J } from "./button-actions.types.BptAXjD8.js";
|
|
12
|
+
import { T as X } from "./title-details.ChwPP7C5.js";
|
|
13
|
+
import { B as Q } from "./button-actions.bkcLUE1G.js";
|
|
14
|
+
import { n as V } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
13
15
|
import "../assets/card.css";
|
|
14
16
|
var _ = /* @__PURE__ */ ((s) => (s.PRIMARY = "primary", s.SECONDARY = "secondary", s))(_ || {}), r = /* @__PURE__ */ ((s) => (s.DEFAULT = "default", s.SMALL = "small", s))(r || {});
|
|
15
|
-
const
|
|
17
|
+
const Z = {
|
|
16
18
|
"de-DE": { hideContent: "Inhalt ausblenden", showContent: "Inhalt anzeigen" },
|
|
17
19
|
"en-GB": { hideContent: "Hide content", showContent: "Show content" },
|
|
18
20
|
"en-US": { hideContent: "Hide content", showContent: "Show content" },
|
|
@@ -24,14 +26,14 @@ const j = {
|
|
|
24
26
|
"ja-JP": { hideContent: "コンテンツを非表示", showContent: "コンテンツを表示" },
|
|
25
27
|
"pt-BR": { hideContent: "Ocultar conteúdo", showContent: "Mostrar conteúdo" },
|
|
26
28
|
"zh-CN": { hideContent: "隐藏内容", showContent: "显示内容" }
|
|
27
|
-
},
|
|
28
|
-
i18n: { messages:
|
|
29
|
+
}, $ = {
|
|
30
|
+
i18n: { messages: Z },
|
|
29
31
|
name: "bento-card"
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
+
}, ee = /* @__PURE__ */ U({
|
|
33
|
+
...$,
|
|
32
34
|
props: {
|
|
33
35
|
actions: { default: null },
|
|
34
|
-
actionsLayout: { default:
|
|
36
|
+
actionsLayout: { default: J.BUTTONS_END },
|
|
35
37
|
background: { default: _.PRIMARY },
|
|
36
38
|
clickable: { type: Boolean, default: !1 },
|
|
37
39
|
closed: { type: Boolean, default: !1 },
|
|
@@ -39,69 +41,75 @@ const j = {
|
|
|
39
41
|
expandable: { type: Boolean, default: !1 },
|
|
40
42
|
lastUpdated: { default: null },
|
|
41
43
|
reloadButton: { default: null },
|
|
44
|
+
link: { default: void 0 },
|
|
42
45
|
titleSize: { default: r.DEFAULT }
|
|
43
46
|
},
|
|
44
47
|
emits: ["click", "expanded"],
|
|
45
48
|
setup(s, { emit: a }) {
|
|
46
|
-
const e = s, { t } =
|
|
47
|
-
|
|
49
|
+
const e = s, { t } = G(), n = R(), l = q(n), u = C(null), f = j("card"), d = C(!e.closed);
|
|
50
|
+
H(
|
|
48
51
|
() => e.closed,
|
|
49
52
|
(c) => {
|
|
50
53
|
d.value = !c;
|
|
51
54
|
}
|
|
52
55
|
);
|
|
53
|
-
const
|
|
54
|
-
() => l("default") || l("description") || l("header") ||
|
|
55
|
-
), y = o(() => l("default") || l("header")),
|
|
56
|
+
const h = o(() => !e.expandable && !!e.lastUpdated), i = o(
|
|
57
|
+
() => l("default") || l("description") || l("header") || h.value
|
|
58
|
+
), y = o(() => l("default") || l("header")), b = o(
|
|
56
59
|
() => (l("content") || e.actions?.length) && (!e.expandable || e.expandable && d.value)
|
|
57
|
-
),
|
|
60
|
+
), g = o(() => e.clickable && !e.disabled ? 0 : -1), x = o(() => e.expandable && !e.disabled ? 0 : -1), m = o(() => !e.expandable), w = o(() => ({
|
|
58
61
|
[`b-card--${e.background}`]: e.background,
|
|
59
62
|
"b-card--clickable": e.clickable,
|
|
60
63
|
"b-card--expandable": e.expandable,
|
|
61
64
|
"b-card--disabled": (e.clickable || e.expandable) && e.disabled
|
|
62
|
-
})), m = o(() => ({
|
|
63
|
-
"b-card__header--expandable": e.expandable,
|
|
64
|
-
"b-card__header--without-body": !e.expandable && !h.value
|
|
65
65
|
})), k = o(() => ({
|
|
66
|
-
"b-
|
|
66
|
+
"b-card__header--expandable": e.expandable,
|
|
67
|
+
"b-card__header--without-body": !e.expandable && !b.value
|
|
67
68
|
})), v = o(() => ({
|
|
69
|
+
"b-card__toggle--small-text": e.titleSize === r.SMALL
|
|
70
|
+
})), B = o(() => ({
|
|
68
71
|
"b-card__body--expandable": e.expandable && l("content"),
|
|
69
72
|
"b-card__body--without-header": !e.expandable && !i.value
|
|
70
|
-
})),
|
|
73
|
+
})), S = o(() => ({
|
|
71
74
|
"b-card__content--without-header": !e.expandable && !i.value,
|
|
72
75
|
"b-card__content--expandable": e.expandable
|
|
73
|
-
})),
|
|
76
|
+
})), I = o(() => {
|
|
74
77
|
const c = !e.expandable && e.actions && !l("content");
|
|
75
78
|
return {
|
|
76
79
|
"b-card__actions--without-content": c,
|
|
77
80
|
"b-card__actions--without-content-and-with-header": c && i.value
|
|
78
81
|
};
|
|
79
|
-
}),
|
|
82
|
+
}), L = o(() => ({
|
|
80
83
|
"b-card__title-wrapper--truncated": l("header")
|
|
81
|
-
})),
|
|
84
|
+
})), T = o(
|
|
82
85
|
() => ({
|
|
83
86
|
el: "div",
|
|
84
87
|
variant: e.titleSize === r.DEFAULT ? "title" : "body",
|
|
85
88
|
strongest: e.titleSize === r.SMALL,
|
|
86
89
|
wide: e.titleSize === r.SMALL
|
|
87
90
|
})
|
|
88
|
-
), { contentHeight: p } =
|
|
91
|
+
), { contentHeight: p } = Y(u, d), A = o(
|
|
89
92
|
() => e.expandable && p.value ? { "max-height": p.value } : {}
|
|
90
|
-
)
|
|
91
|
-
return { __sfc: !0, t, slots: n, hasSlot: l, props: e, emit: a, contentDiv: u, cardId: f, showContent: d, showLastUpdated: b, showHeader: i, showTitleWrapper: y, showCardBody: h, tabIndex: x, headerTabIndex: w, cardConditionalClasses: g, cardHeaderConditionalClasses: m, cardToggleConditionalClasses: k, cardBodyConditionalClasses: v, cardContentConditionalClasses: B, cardActionsConditionalClasses: S, cardTitleWrapperConditionalClasses: T, typography: L, contentHeight: p, contentMaxHeight: I, toggleExpansion: () => {
|
|
93
|
+
), D = () => {
|
|
92
94
|
!e.disabled && e.expandable && (d.value = !d.value, a("expanded", d.value));
|
|
93
|
-
},
|
|
94
|
-
e.disabled || (a("click"), e.clickable ||
|
|
95
|
+
}, E = () => {
|
|
96
|
+
e.disabled || (a("click"), e.clickable || N(
|
|
95
97
|
'BentoCard "@click" property',
|
|
96
98
|
'Use the BentoCard "@click" with the "clickable" property to enable accessible styles.',
|
|
97
99
|
"2.0.0"
|
|
98
100
|
));
|
|
99
|
-
},
|
|
101
|
+
}, M = () => {
|
|
100
102
|
e.clickable && !e.disabled && a("click");
|
|
101
|
-
}
|
|
103
|
+
};
|
|
104
|
+
return O(() => {
|
|
105
|
+
if (e.link && e.clickable)
|
|
106
|
+
throw new Error(
|
|
107
|
+
'Do not combine the BentoCard "link" property with the "clickable" property. Nested interactive controls create a confusing and inaccessible experience for users of assistive technologies.'
|
|
108
|
+
);
|
|
109
|
+
}), { __sfc: !0, t, slots: n, hasSlot: l, props: e, emit: a, contentDiv: u, cardId: f, showContent: d, showLastUpdated: h, showHeader: i, showTitleWrapper: y, showCardBody: b, tabIndex: g, headerTabIndex: x, isRegularCard: m, cardConditionalClasses: w, cardHeaderConditionalClasses: k, cardToggleConditionalClasses: v, cardBodyConditionalClasses: B, cardContentConditionalClasses: S, cardActionsConditionalClasses: I, cardTitleWrapperConditionalClasses: L, typography: T, contentHeight: p, contentMaxHeight: A, toggleExpansion: D, onClick: E, onKeyDown: M, BentoTypography: z, BentoLink: F, BentoButtonActions: Q, TitleDetails: X, ChevronDownIcon: W, ChevronUpIcon: P, ChevronRightSmallIcon: K };
|
|
102
110
|
}
|
|
103
111
|
});
|
|
104
|
-
var
|
|
112
|
+
var te = function() {
|
|
105
113
|
var a = this, e = a._self._c, t = a._self._setupProxy;
|
|
106
114
|
return e("div", { staticClass: "b-card", class: t.cardConditionalClasses, attrs: { tabindex: t.tabIndex, "data-testid": "card" }, on: { click: t.onClick, keydown: [function(n) {
|
|
107
115
|
return !n.type.indexOf("key") && a._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : t.onKeyDown.apply(null, arguments);
|
|
@@ -111,21 +119,21 @@ var J = function() {
|
|
|
111
119
|
return !n.type.indexOf("key") && a._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : t.toggleExpansion.apply(null, arguments);
|
|
112
120
|
}, function(n) {
|
|
113
121
|
return !n.type.indexOf("key") && a._k(n.keyCode, "space", 32, n.key, [" ", "Spacebar"]) ? null : t.toggleExpansion.apply(null, arguments);
|
|
114
|
-
}] } }, [e("div", { staticClass: "b-card__header-wrapper" }, [t.showTitleWrapper ? e("div", { staticClass: "b-card__header-slot-wrapper" }, [e("div", { staticClass: "b-card__title-wrapper", class: t.cardTitleWrapperConditionalClasses }, [a.expandable ? e("div", { staticClass: "b-card__toggle", class: t.cardToggleConditionalClasses }, [t.showContent ? e(t.ChevronUpIcon, { attrs: { "svg-title": t.t("hideContent"), "aria-hidden": "true" } }) : e(t.ChevronDownIcon, { attrs: { "svg-title": t.t("showContent"), "aria-hidden": "true" } })], 1) : a._e(), t.hasSlot("default") ? e(t.BentoTypography, a._b({ staticClass: "b-card__title" }, "bento-typography", t.typography, !1), [a._t("default")], 2) : a._e()],
|
|
122
|
+
}] } }, [e("div", { staticClass: "b-card__header-wrapper" }, [t.showTitleWrapper ? e("div", { staticClass: "b-card__header-slot-wrapper" }, [e("div", { staticClass: "b-card__title-wrapper", class: t.cardTitleWrapperConditionalClasses }, [a.expandable ? e("div", { staticClass: "b-card__toggle", class: t.cardToggleConditionalClasses }, [t.showContent ? e(t.ChevronUpIcon, { attrs: { "svg-title": t.t("hideContent"), "aria-hidden": "true" } }) : e(t.ChevronDownIcon, { attrs: { "svg-title": t.t("showContent"), "aria-hidden": "true" } })], 1) : a._e(), t.hasSlot("default") ? [a.link && t.isRegularCard ? e(t.BentoLink, a._b({ staticClass: "b-card__link", attrs: { variant: "quiet", "disable-typography": "" } }, "bento-link", a.link, !1), [e(t.BentoTypography, a._b({ staticClass: "b-card__title", attrs: { el: "span" } }, "bento-typography", t.typography, !1), [a._t("default")], 2), e(t.ChevronRightSmallIcon, { staticClass: "b-card__link-icon", attrs: { "aria-hidden": "true" } })], 1) : e(t.BentoTypography, a._b({ staticClass: "b-card__title" }, "bento-typography", t.typography, !1), [a._t("default")], 2)] : a._e()], 2), t.hasSlot("header") ? [a._t("header")] : a._e()], 2) : a._e(), t.hasSlot("description") || t.showLastUpdated ? e("div", { staticClass: "b-card__title-details" }, [e(t.TitleDetails, { attrs: { "last-updated": t.showLastUpdated ? a.lastUpdated : null, "reload-button": t.showLastUpdated ? a.reloadButton : null }, scopedSlots: a._u([t.hasSlot("description") ? { key: "description", fn: function() {
|
|
115
123
|
return [a._t("description")];
|
|
116
124
|
}, proxy: !0 } : null], null, !0) })], 1) : a._e()])]) : a._e(), e("Transition", { attrs: { name: "b-card__animation" } }, [t.showCardBody ? e("div", { staticClass: "b-card__wrapper", style: t.contentMaxHeight }, [e("div", { ref: "contentDiv", staticClass: "b-card__body", class: t.cardBodyConditionalClasses, attrs: { id: a.expandable ? t.cardId : null } }, [t.hasSlot("content") ? e("div", { staticClass: "b-card__content", class: t.cardContentConditionalClasses }, [a._t("content")], 2) : a._e(), a.actions ? e("div", { staticClass: "b-card__actions", class: t.cardActionsConditionalClasses }, [e(t.BentoButtonActions, { attrs: { actions: a.actions, layout: a.actionsLayout } })], 1) : a._e()])]) : a._e()])], 1);
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
}, ae = [], ne = /* @__PURE__ */ V(
|
|
126
|
+
ee,
|
|
127
|
+
te,
|
|
128
|
+
ae,
|
|
121
129
|
!1,
|
|
122
130
|
null,
|
|
123
|
-
"
|
|
131
|
+
"669c9da4"
|
|
124
132
|
);
|
|
125
|
-
const
|
|
133
|
+
const ye = ne.exports;
|
|
126
134
|
export {
|
|
127
135
|
_ as B,
|
|
128
136
|
r as a,
|
|
129
|
-
|
|
137
|
+
ye as c
|
|
130
138
|
};
|
|
131
|
-
//# sourceMappingURL=card.
|
|
139
|
+
//# sourceMappingURL=card.b9PEJ7hm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.b9PEJ7hm.js","sources":["../../src/components/card/card.types.ts","../../src/components/card/card.vue"],"sourcesContent":["import { type BentoLinkProps } from '../link';\n\nexport { type TitleDetailsReloadButton as BentoCardReloadButton } from '../internal/title-details/title-details.types';\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n\nexport type BentoCardLink = Omit<BentoLinkProps, 'variant'>;\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\n <template v-if=\"hasSlot('default')\">\n <bento-link\n v-if=\"link && isRegularCard\"\n class=\"b-card__link\"\n v-bind=\"link\"\n variant=\"quiet\"\n disable-typography\n >\n <bento-typography class=\"b-card__title\" v-bind=\"typography\" el=\"span\">\n <slot />\n </bento-typography>\n\n <chevron-right-small-icon class=\"b-card__link-icon\" aria-hidden=\"true\" />\n </bento-link>\n\n <bento-typography v-else class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </template>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <div v-if=\"hasSlot('description') || showLastUpdated\" class=\"b-card__title-details\">\n <title-details\n :last-updated=\"showLastUpdated ? lastUpdated : null\"\n :reload-button=\"showLastUpdated ? reloadButton : null\"\n >\n <template v-if=\"hasSlot('description')\" #description><slot name=\"description\" /></template>\n </title-details>\n </div>\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, onMounted, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoLink } from '@/components/link';\n import { BentoButtonActions, BentoButtonActionsLayout, type BentoButtonActionsList } from '@/components/button';\n import {\n BentoCardBackground,\n type BentoCardLink,\n type BentoCardReloadButton,\n BentoCardTitleSize,\n } from '@/components/card/card.types';\n import { TitleDetails } from '@/internal/title-details';\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 import ChevronRightSmallIcon from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\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 '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\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 = defineProps({\n actions: { default: null },\n actionsLayout: { default: BentoButtonActionsLayout.BUTTONS_END },\n background: { default: BentoCardBackground.PRIMARY },\n clickable: { type: Boolean, default: false },\n closed: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n expandable: { type: Boolean, default: false },\n lastUpdated: { default: null },\n reloadButton: { default: null },\n link: { default: undefined },\n titleSize: { default: BentoCardTitleSize.DEFAULT }\n});\n\n const emit = defineEmits([\"click\", \"expanded\"]);\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 showLastUpdated = computed(() => !props.expandable && Boolean(props.lastUpdated));\n const showHeader = computed(\n () => hasSlot('default') || hasSlot('description') || hasSlot('header') || showLastUpdated.value\n );\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 const isRegularCard = computed(() => !props.expandable);\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 { contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\n );\n\n const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\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\n onMounted(() => {\n if (props.link && props.clickable) {\n throw new Error(\n 'Do not combine the BentoCard \"link\" property with the \"clickable\" property. Nested interactive controls create a confusing and inaccessible experience for users of assistive technologies.'\n );\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","useI18n","slots","useSlots","hasSlot","useHasSlot","contentDiv","ref","cardId","generateUid","showContent","props","watch","value","showLastUpdated","computed","showHeader","showTitleWrapper","showCardBody","tabIndex","headerTabIndex","isRegularCard","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","contentHeight","useExpandableContentHeight","contentMaxHeight","toggleExpansion","emit","onClick","deprecate","onKeyDown","onMounted"],"mappings":";;;;;;;;;;;;;;;AAOO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;GCqQRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;iBA7JA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GA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AAA,OAAA;AAAA,IACJ;AAGJ,WAAAI,EAAA,MAAA;AACI,UAAA5B,EAAA,QAAAA,EAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, useSlots as y, toRef as v, computed as u, watch as f, ref as g } from "vue";
|
|
2
|
-
import { B as x } from "./checkbox.
|
|
2
|
+
import { B as x } from "./checkbox.Co4HoHKF.js";
|
|
3
3
|
import { g as C } from "./generate-uid.DBWe4g6T.js";
|
|
4
4
|
import { u as S } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
5
5
|
import { u as E } from "./form-field.B60VsF8d.js";
|
|
@@ -76,9 +76,9 @@ const m = "bento-checkbox-group", w = {
|
|
|
76
76
|
setup(l, { emit: e }) {
|
|
77
77
|
const r = l, o = y(), t = C("error"), { isReadOnly: d } = S(v(r, "readonly")), { emitValue: i } = E(e), _ = u(() => !r.disabled && !d.value && !!r.errorMessage), h = u(() => ({
|
|
78
78
|
"b-checkbox-group__checkboxes--horizontal": r.variant === n.HORIZONTAL
|
|
79
|
-
})),
|
|
79
|
+
})), c = (a) => !!o[a], p = u(() => c("content") && r.variant !== "vertical");
|
|
80
80
|
f(
|
|
81
|
-
|
|
81
|
+
p,
|
|
82
82
|
(a) => {
|
|
83
83
|
if (a)
|
|
84
84
|
throw new Error("The content slot is only available for the vertical checkbox group layout");
|
|
@@ -91,7 +91,7 @@ const m = "bento-checkbox-group", w = {
|
|
|
91
91
|
() => {
|
|
92
92
|
s.value = r.modelValue;
|
|
93
93
|
}
|
|
94
|
-
), { __sfc: !0, COMPONENT_NAME: m, props: r, emit: e, slots: o, errorId: t, isReadOnly: d, emitValue: i, shouldShowGroupError: _, conditionalClasses: h, hasContentSlot:
|
|
94
|
+
), { __sfc: !0, COMPONENT_NAME: m, props: r, emit: e, slots: o, errorId: t, isReadOnly: d, emitValue: i, shouldShowGroupError: _, conditionalClasses: h, hasContentSlot: c, shouldShowSlotsError: p, inputValue: s, onModelValueUpdate: (a) => {
|
|
95
95
|
s.value = a, i(a);
|
|
96
96
|
}, ControlsGroup: V, ErrorMessage: k, BentoCheckbox: x };
|
|
97
97
|
}
|
|
@@ -113,11 +113,11 @@ var I = function() {
|
|
|
113
113
|
O,
|
|
114
114
|
!1,
|
|
115
115
|
null,
|
|
116
|
-
"
|
|
116
|
+
"293a918c"
|
|
117
117
|
);
|
|
118
118
|
const H = L.exports;
|
|
119
119
|
export {
|
|
120
120
|
H as B,
|
|
121
121
|
n as a
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=checkbox-group.
|
|
123
|
+
//# sourceMappingURL=checkbox-group.UYN1ljai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.UYN1ljai.js","sources":["../../src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../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 Since v2.0.0. Use 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=\"shouldShowGroupError ? errorId : ''\"\n :aria-required=\"required\"\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=\"shouldShowGroupError\"\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, 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 '@/utils/ts/generate-uid';\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 * 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([\"update:model-value\"]);\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(() => !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</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', event: 'update:model-value' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","__default__","slots","useSlots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","props","emitValue","useFormFieldEmits","emit","shouldShowGroupError","computed","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","value"],"mappings":";;;;;;;;;AAMO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;AC0KR,MAAAE,IAAA,wBAoBAC,IAAA;AAAA,EAAe,MAAAD;AAAA,EACL,OAAA,EAAA,MAAA,cAAA,OAAA,qBAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlEAE,IAAAC,EAAA,GAEAC,IAAAC,EAAA,OAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAAC,EAAAC,GAAA,UAAA,CAAA,GACA,EAAA,WAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA,CAAAL,EAAA,YAAA,CAAAH,EAAA,SAAA,CAAA,CAAAG,EAAA,YAAA,GAEAM,IAAAD,EAAA,OAAA;AAAA,MAA2C,4CAAAL,EAAA,YAAAX,EAAA;AAAA,IACiD,EAAA,GAM5FkB,IAAA,CAAAC,MAAA,CAAA,CAAAf,EAAAe,CAAA,GACAC,IAAAJ,EAAA,MAAAE,EAAA,SAAA,KAAAP,EAAA,YAAA,UAAA;AAEA,IAAAU;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,EAAAb,EAAA,UAAA;AACA,WAAAU;AAAA,MAAA,MAAAV,EAAA;AAAA,MACgB,MAAA;AAER,QAAAY,EAAA,QAAAZ,EAAA;AAAA,MAAyB;AAAA,IAC7B,wOAGJ,CAAAc,MAAA;AACI,MAAAF,EAAA,QAAAE,GACAb,EAAAa,CAAA;AAAA,IAAe;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as w, toRefs as g, computed as o, ref as k, onMounted as z, useAttrs as F } from "vue";
|
|
2
2
|
import { B as H } from "./typography.D1OZJbEa.js";
|
|
3
|
-
import {
|
|
4
|
-
import { u as j } from "./use-
|
|
5
|
-
import { u as G } from "./use-has-slot.C9lQZ6nz.js";
|
|
3
|
+
import { u as O } from "./use-default-slot-validator.BDn0wkYP.js";
|
|
4
|
+
import { u as j } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
5
|
import { g as C } from "./generate-uid.DBWe4g6T.js";
|
|
7
6
|
import { g as c } from "./get-slot-text.DM_NdrUC.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
7
|
+
import { u as G } from "./index.CPOlyau9.js";
|
|
8
|
+
import { u as J } from "./aria-label.CaUURpnB.js";
|
|
10
9
|
import { B as S } from "./minus-small.CAycYt5H.js";
|
|
11
|
-
import { B as
|
|
12
|
-
import { E as
|
|
10
|
+
import { B as K } from "./tag.Dz1FQSZb.js";
|
|
11
|
+
import { E as X } from "./error-message.DKnoUezI.js";
|
|
12
|
+
import { C as Y } from "./checkbox-input.CIoy_QxO.js";
|
|
13
13
|
import { n as Q } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
14
14
|
import "../assets/checkbox.css";
|
|
15
15
|
var s = /* @__PURE__ */ ((a) => (a.UPDATE = "update:model-value", a.INPUT = "input", a))(s || {});
|
|
@@ -29,10 +29,10 @@ const W = {
|
|
|
29
29
|
name: "bento-checkbox",
|
|
30
30
|
i18n: { messages: W },
|
|
31
31
|
components: {
|
|
32
|
-
BentoTag:
|
|
32
|
+
BentoTag: K,
|
|
33
33
|
BentoTypography: H,
|
|
34
|
-
CheckboxInput:
|
|
35
|
-
ErrorMessage:
|
|
34
|
+
CheckboxInput: Y,
|
|
35
|
+
ErrorMessage: X
|
|
36
36
|
},
|
|
37
37
|
inheritAttrs: !1,
|
|
38
38
|
model: { prop: "modelValue" },
|
|
@@ -99,8 +99,8 @@ const W = {
|
|
|
99
99
|
},
|
|
100
100
|
emits: [s.UPDATE, s.INPUT],
|
|
101
101
|
setup(a, { attrs: e, emit: t, slots: r }) {
|
|
102
|
-
const { t: d } =
|
|
103
|
-
|
|
102
|
+
const { t: d } = G(), u = C("description"), b = C("error"), n = j(r), { disabled: p, indeterminate: A, modelValue: i, readonly: B, value: E } = g(a), h = c(r)("default"), f = c(r)("description");
|
|
103
|
+
O("bento-checkbox", r.default, r.description);
|
|
104
104
|
const m = o(() => Array.isArray(i.value)), I = o(() => m.value ? i.value.some((l) => l === E.value) : i.value), _ = o(() => A.value), T = o(
|
|
105
105
|
() => !a.disabled && !a.readonly && (a.hasError || !!a.errorMessage)
|
|
106
106
|
), v = o(() => !a.disabled && !a.readonly && !!a.errorMessage), y = o(() => n("content")), D = o(() => _?.value || I?.value), M = o(
|
|
@@ -112,7 +112,7 @@ const W = {
|
|
|
112
112
|
x.value = d("checkbox");
|
|
113
113
|
});
|
|
114
114
|
const q = o(
|
|
115
|
-
() =>
|
|
115
|
+
() => J({
|
|
116
116
|
ariaLabel: P.value,
|
|
117
117
|
// TODO: take this line away when the aria-label props is removed
|
|
118
118
|
label: U,
|
|
@@ -162,11 +162,11 @@ var ee = function() {
|
|
|
162
162
|
ae,
|
|
163
163
|
!1,
|
|
164
164
|
null,
|
|
165
|
-
"
|
|
165
|
+
"1331e2cd"
|
|
166
166
|
);
|
|
167
167
|
const _e = te.exports;
|
|
168
168
|
export {
|
|
169
169
|
_e as B,
|
|
170
170
|
s as a
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=checkbox.
|
|
172
|
+
//# sourceMappingURL=checkbox.Co4HoHKF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.Co4HoHKF.js","sources":["../../src/components/checkbox/checkbox.types.ts","../../src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '../tag/tag.types';\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 :aria-required=\"required\"\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 >*</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 { BentoCheckboxEvent, type BentoCheckboxTag } 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 '@/utils/ts/generate-uid';\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 { BentoCheckboxState, type BentoCheckboxType, type BentoMultiCheckboxType } from '@/types/checkbox';\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 Since v2.0.0. Use `aria-label` instead.\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","BentoCheckboxState","newValue"],"mappings":";;;;;;;;;;;;;;AAEO,IAAAA,IAAA,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;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, computed as r } from "vue";
|
|
2
|
-
import { B as l } from "./base-button.
|
|
2
|
+
import { B as l } from "./base-button.DOhHyU7x.js";
|
|
3
3
|
import { B as m } from "./typography.D1OZJbEa.js";
|
|
4
4
|
import { C as p } from "./cross-small.B9l4YLVX.js";
|
|
5
5
|
import { u as d } from "./index.CPOlyau9.js";
|
|
@@ -62,4 +62,4 @@ const L = B.exports;
|
|
|
62
62
|
export {
|
|
63
63
|
L as B
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chip.
|
|
65
|
+
//# sourceMappingURL=chip.DRsJylWl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.
|
|
1
|
+
{"version":3,"file":"chip.DRsJylWl.js","sources":["../../src/components/chip/chip.vue"],"sourcesContent":["<template>\n <base-button class=\"b-chip\" :disabled=\"disabled\" :class=\"conditionalClasses\" @click=\"emit('click')\">\n <bento-typography el=\"span\" :variant=\"computedTypographyVariant\" class=\"b-chip__text\">\n {{ computedLabel }}\n </bento-typography>\n <template #iconRight><cross-small-icon :svg-title=\"t('remove')\" class=\"b-chip__icon\" /></template>\n </base-button>\n</template>\n\n<script setup lang=\"ts\">\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import CrossSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { truncate } from '@/utils/ts/truncate';\n\n import type { BentoChipProps } from './chip.types';\n\n import messages from './messages.json';\n import { computed } from 'vue';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n label: null,\n disabled: { type: Boolean, default: false },\n readonly: { type: Boolean, default: false },\n error: { type: Boolean, default: false },\n condensed: { type: Boolean, default: false },\n characterLimit: { default: null }\n});\n\n const emit = defineEmits([\"click\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const computedLabel = computed(() =>\n props.characterLimit ? truncate(props.label, props.characterLimit) : props.label\n );\n\n const computedTypographyVariant = computed<`${BentoTypographyVariant}`>(() =>\n props.condensed ? 'caption' : 'body'\n );\n\n const conditionalClasses = computed(() => ({\n 'b-chip--condensed': props.condensed,\n 'b-chip--readonly': props.readonly && !props.disabled,\n 'b-chip--error': props.error,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Chip is a dismissible tag-like component that can be used to display selected items, which may need to be removed by the user.\n *\n * @example\n * import { BentoChip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoChip },\n * template: `\n * <bento-chip\n * label=\"Label\"\n * :character-limit=\"20\"\n * condensed\n * @click=\"removeChip()\"\n *\n * />\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./chip.scss\" />\n"],"names":["__default__","messages","t","useI18n","computedLabel","computed","props","truncate","computedTypographyVariant","conditionalClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;GAwEIA,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;iBArCA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC;AAAA,MAAsB,MAAAC,EAAA,iBAAAC,EAAAD,EAAA,OAAAA,EAAA,cAAA,IAAAA,EAAA;AAAA,IACyD,GAG/EE,IAAAH;AAAA,MAAkC,MAAAC,EAAA,YAAA,YAAA;AAAA,IACA,GAGlCG,IAAAJ,EAAA,OAAA;AAAA,MAA2C,qBAAAC,EAAA;AAAA,MACZ,oBAAAA,EAAA,YAAA,CAAAA,EAAA;AAAA,MACkB,iBAAAA,EAAA;AAAA,IACtB,EAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as M, useAttrs as Q, ref as g, computed as l, shallowRef as E, onMounted as Y, watch as V, watchEffect as W } from "vue";
|
|
2
2
|
import { s as j, H as Z, t as e, L as z, a as H, b as J, c as F, p as U, j as G, d as q, x as X, e as K, E as ee, h as te, k as ne, i as ae, C as f, f as P, g as _, l as oe, m as se } from "./codemirror.Bzus_EPG.js";
|
|
3
3
|
import { c as re, d as ie, e as le, f as ce } from "./es6.yPcTMnSH.js";
|
|
4
|
-
import { B as de } from "./dropdown.
|
|
5
|
-
import { B as pe } from "./button.
|
|
4
|
+
import { B as de } from "./dropdown.Bnq4kP7k.js";
|
|
5
|
+
import { B as pe } from "./button.DII5Ifwa.js";
|
|
6
6
|
import { B as ue } from "./typography.D1OZJbEa.js";
|
|
7
7
|
import { B as ge } from "./loading-indicator.PxbRzshH.js";
|
|
8
8
|
import { u as fe } from "./index.CPOlyau9.js";
|
|
9
9
|
import { E as me } from "./expand.zENZmw3W.js";
|
|
10
|
-
import { h as he } from "./base-modal.
|
|
11
|
-
import { C as be } from "./copy.
|
|
10
|
+
import { h as he } from "./base-modal.CcmoTJdc.js";
|
|
11
|
+
import { C as be } from "./copy.CSk1rCRo.js";
|
|
12
12
|
import { n as _e } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
13
13
|
import "../assets/code-snippet.css";
|
|
14
14
|
const Oe = {
|
|
@@ -259,4 +259,4 @@ export {
|
|
|
259
259
|
O as b,
|
|
260
260
|
Je as c
|
|
261
261
|
};
|
|
262
|
-
//# sourceMappingURL=code-snippet.
|
|
262
|
+
//# sourceMappingURL=code-snippet.CnThWqVb.js.map
|