@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,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as oe, useSlots as ne, ref as _, provide as ie, inject as B, toRef as re, computed as i } from "vue";
|
|
2
|
-
import { h as le, B as de } from "./dropdown.
|
|
2
|
+
import { h as le, B as de } from "./dropdown.Bnq4kP7k.js";
|
|
3
3
|
import { p as L, d as se, B as pe } from "./typography.D1OZJbEa.js";
|
|
4
4
|
import { u as ue } from "./form-field.B60VsF8d.js";
|
|
5
5
|
import { g as c } from "./generate-uid.DBWe4g6T.js";
|
|
@@ -158,7 +158,7 @@ var Se = function() {
|
|
|
158
158
|
Te,
|
|
159
159
|
!1,
|
|
160
160
|
null,
|
|
161
|
-
"
|
|
161
|
+
"f2528707"
|
|
162
162
|
);
|
|
163
163
|
const $e = ge.exports;
|
|
164
164
|
export {
|
|
@@ -171,4 +171,4 @@ export {
|
|
|
171
171
|
d as e,
|
|
172
172
|
ye as f
|
|
173
173
|
};
|
|
174
|
-
//# sourceMappingURL=input-field.
|
|
174
|
+
//# sourceMappingURL=input-field.D912rZS_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.D912rZS_.js","sources":["../../src/components/input-field/input-field.keys.ts","../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["export const INPUT_FIELD_HINT_INJECTION_KEY = Symbol('input field hint injection key');\nexport const INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY = Symbol('input field parent component injection key');\n","import { type BentoDropdownProps } from '../dropdown/dropdown.types';\nimport { type FormField } from '../../types/form-field';\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\nexport interface BentoInputDropdownProps {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Indicates that dropdown items are loading (shows a loading skeleton)\n */\n componentLoading?: BentoDropdownProps['componentLoading'];\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: BentoDropdownProps['dynamicFiltering'];\n /**\n * Empty state displayed when no search results are found\n */\n emptyState?: BentoDropdownProps['emptyState'];\n /**\n * Enables value/label pair handling for selected values\n */\n enableValueLabelPair?: BentoDropdownProps['enableValueLabelPair'];\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: BentoDropdownProps['hasMoreItems'];\n /**\n * Function that determines which options are disabled from interaction\n */\n isOptionDisabled?: BentoDropdownProps['isOptionDisabled'];\n /**\n * List of available items\n */\n items: BentoDropdownProps['items'];\n /**\n * The type of lazy load: \"automatic\" for infinite scrolling, \"button\" for a show-more button\n */\n lazyLoadType?: BentoDropdownProps['lazyLoadType'];\n /**\n * Indicates if new options are lazy loading\n */\n loading?: BentoDropdownProps['loading'];\n /**\n * Selected value of the dropdown\n */\n modelValue?: BentoDropdownProps['modelValue'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: BentoDropdownProps['readonly'];\n /**\n * Dropdown search options including debounce time and placeholder\n */\n search?: BentoDropdownProps['search'];\n /**\n * Displays non-selectable, static categories in the dropdown\n */\n staticCategories?: BentoDropdownProps['staticCategories'];\n /**\n * Enables virtual scrolling for large lists of items\n */\n virtualScroll?: BentoDropdownProps['virtualScroll'];\n}\n\n/**\n * @deprecated Since v2.0.0. Use `@<emit name>` instead.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps extends FormField {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Dropdown props for the single-select dropdown menu embedded in the input field.\n * Only a subset of `BentoDropdownProps` is supported (multi-select is not available).\n *\n * @see {@link BentoInputDropdownProps}\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Text displayed as the value of the input-field\n */\n modelValue?: BentoInputFieldValue;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n v-bind=\"getRootAttributes($attrs)\"\n :data-testid=\"getDataTestId($attrs)\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default') || label\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n :label=\"label\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"getInputFieldDropdownProps($attrs)\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"$attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"getAriaLabel($attrs)\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :aria-required=\"required\"\n :type=\"type\"\n :value=\"modelValue\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n @click=\"emit('click', $event)\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && modelValue\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"getInputFieldDropdownProps($attrs)\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <div\n v-if=\"(shouldShowError && !!errorMessage) || hasSlot('description') || description\"\n class=\"b-input-field__footer\"\n >\n <error-message v-if=\"shouldShowError && !!errorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <span\n v-if=\"hasSlot('description') || description\"\n :id=\"descriptionId\"\n class=\"b-input-field__description\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </span>\n </div>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { DROPDOWN_SMALL_SIZE_INJECTION_KEY } from '@/components/dropdown/dropdown.keys';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\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 { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n type BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const props = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaHidden: { type: Boolean, default: true },\n condensed: { type: Boolean, default: false },\n dropdown: { default: undefined },\n dropdownPosition: { default: BentoInputFieldElementPosition.START },\n modelValue: { default: undefined },\n slashedZero: { type: Boolean, default: false },\n staticValue: { default: '' },\n staticValuePosition: { default: BentoInputFieldElementPosition.START },\n type: { default: BentoInputFieldType.TEXT },\n variant: { default: BentoInputFieldVariant.DEFAULT }\n});\n\n const emit = defineEmits([\"blur\", \"click\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"update:dropdown\", \"update:model-value\"]);\n\n const { emitValue } = useFormFieldEmits<BentoInputFieldValue>(emit);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref<HTMLInputElement>(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n /**\n * Gets the overriden or the default data-testid attribute\n * @param attributes - the live attributes object\n */\n function getDataTestId(attributes: Record<string, unknown>) {\n return (attributes['data-testid'] as string) ?? 'input-text-container';\n }\n /**\n * Filters out all aria attributes for the root element.\n * @param attributes - the live attributes object\n */\n function getRootAttributes(attributes: Record<string, unknown>) {\n return Object.fromEntries(\n Object.entries(attributes).filter(([key]) => !key.startsWith('aria-') && key !== 'data-testid')\n );\n }\n\n // Provide DROPDOWN_SMALL_SIZE_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(DROPDOWN_SMALL_SIZE_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const computedLabel = computed(() => (getSlotText(slots)('default') as string) || props.label);\n const computedDescription = computed(() => (getSlotText(slots)('description') as string) || props.description);\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const getAriaLabel = (attributes: Record<string, unknown>) =>\n (attributes['aria-label'] as string | undefined) ??\n (attributes['aria-labelledby'] ? undefined : computedLabel.value || computedAriaLabelFallbackMessage.value);\n\n const computedAriaDescribedBy = computed(\n () =>\n `${computedDescription.value ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const getInputFieldDropdownProps = (attributes: Record<string, unknown>) => ({\n 'aria-label': t('ariaLabelDropdownFallback', { inputLabel: getAriaLabel(attributes) }),\n ...props.dropdown,\n });\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emitValue(inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, modelValue: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose focus methods for parent components in Vue 3.\n defineExpose({\n /**\n * Focuses the input field.\n */\n focusInput,\n\n /**\n * Focuses the dropdown when using the dropdown variant; otherwise focuses the input field.\n */\n focus,\n\n /**\n * Reference to the native input element.\n */\n inputFieldElement,\n });\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :model-value=\"inputValue\"\n * :@update:model-value=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n name: 'bento-input-field',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["INPUT_FIELD_HINT_INJECTION_KEY","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","slots","useSlots","emitValue","useFormFieldEmits","emit","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","getDataTestId","attributes","getRootAttributes","key","provide","DROPDOWN_SMALL_SIZE_INJECTION_KEY","hint","inject","onFocus","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","isDropdownReadOnly","computed","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedLabel","getSlotText","computedDescription","computedAriaOwns","computedAriaLabelFallbackMessage","getAriaLabel","computedAriaDescribedBy","inputFieldConditionalClasses","getInputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","focus","expose","inputFieldParentComponent","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;;AAAO,MAAAA,KAAA,uBAAA,gCAAA,GACAC,KAAA,uBAAA,4CAAA;ACKA,IAAAC,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKLE,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,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;AAAA;AAAA,MAKA,mBAAAlD;AAAA,IAKA,CAAA;AAEJ,UAAAoD,IAAAnC,EAAAvC,IAAA,EAAA;AAEA,WAAA,CAAA,OAAA,OAAAO,CAAA,EAAA,SAAAsC,EAAA,IAAA,KAAA,CAAA6B,MACI7B,EAAA,SAAA,QACI8B;AAAA,MAAA,2DAAA9B,EAAA,IAAA;AAAA,IACyE,IACzEA,EAAA,SAAA,aAEA8B;AAAA,MAAA,2DAAA9B,EAAA,IAAA;AAAA,IACyE,IAGzE8B,EAAA,2DAAA9B,EAAA,IAAA,GAAA,IAORzB,EAAA,mBAAA,KACIwD;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as S, provide as g, useSlots as y, ref as D, computed as d, watch as h } from "vue";
|
|
2
|
-
import { f as H, B as I } from "./input-field.
|
|
3
|
-
import { g as b } from "./dropdown.
|
|
2
|
+
import { f as H, B as I } from "./input-field.D912rZS_.js";
|
|
3
|
+
import { g as b } from "./dropdown.Bnq4kP7k.js";
|
|
4
4
|
import { u as E } from "./index.CPOlyau9.js";
|
|
5
5
|
import { u as B } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
6
|
import { u as V } from "./use-touch-device.DTqFAbXh.js";
|
|
@@ -102,4 +102,4 @@ export {
|
|
|
102
102
|
Q as B,
|
|
103
103
|
v as i
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=input-time.
|
|
105
|
+
//# sourceMappingURL=input-time.CXMuvF9N.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-time.uqE8FS62.js","sources":["../../src/utils/ts/time-input.ts","../../src/components/input-time/input-time.vue"],"sourcesContent":["const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\n/**\n * Validates a complete time string in HH:MM:SS format.\n * Hours: 00-24, Minutes: 00-59, Seconds: 00-59\n * @param timeText The time string to validate\n * @returns True if the time string is valid, false otherwise\n */\nexport const isValidTimeString = (timeText: string): boolean =>\n /^(?:[01]\\d|2[0-4]):(?:[0-5]\\d):(?:[0-5]\\d)$/.test(timeText);\n\nconst MAX_TIME_INPUT_LENGTH = 8;\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart, value = '' } = event.target as HTMLInputElement;\n\n const allowedKeys = ['Backspace', 'Tab', 'ArrowLeft', 'ArrowRight'];\n const isAllowedKey = allowedKeys.includes(event.key);\n const isValidKey = validDigitRegex.test(event.key) || isAllowedKey;\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n const isAtMaxLength = value.length >= MAX_TIME_INPUT_LENGTH;\n\n if ((!isValidKey && !isValidColon) || (isAtMaxLength && !isAllowedKey)) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <bento-input-field\n class=\"b-input-time\"\n :type=\"inputType\"\n :step=\"isTouchDevice ? 1 : undefined\"\n :condensed=\"props.condensed\"\n :disabled=\"props.disabled\"\n :error-message=\"inputErrorMessage\"\n :label=\"props.label\"\n :model-value=\"inputModelValue\"\n :optional=\"props.optional\"\n :placeholder=\"computedPlaceholder\"\n :readonly=\"props.readonly\"\n :required=\"props.required\"\n :tooltip-text=\"props.tooltipText\"\n v-bind=\"$attrs\"\n @update:model-value=\"onInput\"\n @keydown=\"onKeyDown\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"!isTouchDevice\" #description>\n <slot name=\"description\">{{\n props.description ? `${props.description} ${t('timeFormatDescription')}` : t('timeFormatDescription')\n }}</slot>\n </template>\n </bento-input-field>\n</template>\n\n<script setup lang=\"ts\">\n // Components\n import { BentoInputField } from '@/components/input-field';\n import { INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { useI18n } from '@/utils/ts/i18n';\n import { formatTimeInputValue, isValidTimeString, validateTimeInput } from '@/utils/ts/time-input';\n\n // Types\n import type { BentoInputFieldValue } from '@/components/input-field/input-field.types';\n import { type BentoInputTimeProps } from './input-time.types';\n\n // Localization\n import messages from './messages.json';\n\n import { computed, provide, ref, useSlots, watch } from 'vue';\n import { useHasSlot, useTouchDevice } from '@/composables';\n\n const VALIDATION_DEBOUNCE_TIME = 300;\n\n provide(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, 'bento-input-time');\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { isTouchDevice } = useTouchDevice();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n condensed: { type: Boolean, default: false },\n modelValue: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"keydown\", \"input:valid\", \"input:error\"]);\n\n const internalError = ref(false);\n const computedErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return internalError.value ? t('invalidTimeFormat') : null;\n });\n const inputErrorMessage = computed(() => (isTouchDevice.value ? props.errorMessage : computedErrorMessage.value));\n const inputType = computed(() => (isTouchDevice.value ? 'time' : undefined));\n const inputModelValue = computed(() => props.modelValue);\n const computedPlaceholder = computed(() => (isTouchDevice ? undefined : props.placeholder));\n\n const validateTime = (timeText: string) => {\n if (!timeText) {\n internalError.value = false;\n return;\n }\n\n const isValid = isValidTimeString(timeText);\n internalError.value = !isValid;\n\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n const validateTimeWithDebounce = debounce(validateTime, VALIDATION_DEBOUNCE_TIME);\n\n // Watch for external modelValue changes (e.g., when parent resets the value)\n watch(\n () => props.modelValue,\n newValue => {\n const timeText = String(newValue ?? '');\n // Clear the error only when the new value is a complete, valid time string\n if (timeText.length === 8 && isValidTimeString(timeText)) {\n internalError.value = false;\n }\n }\n );\n\n const onInput = (value: BentoInputFieldValue) => {\n if (props.disabled || props.readonly) {\n return;\n }\n\n if (isTouchDevice.value) {\n emit('update:model-value', String(value ?? ''));\n emit('input:valid');\n } else {\n const formatted = formatTimeInputValue(String(value ?? ''));\n emit('update:model-value', formatted);\n validateTimeWithDebounce(formatted);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isTouchDevice.value) {\n validateTimeInput(event);\n }\n emit('keydown', event);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Input time component for entering time values in HH:MM:SS format.\n * This is an extension of the `bento-input-field` component with built-in\n * time formatting and validation logic.\n *\n * @usage\n * import { BentoInputTime } from '@adyen/bento-vue2';\n *\n * const timeValue = ref('');\n *\n * export default {\n * components: { BentoInputTime },\n * template: `\n * <bento-input-time\n * label=\"Start time\"\n * :model-value=\"timeValue\"\n * @update:model-value=\"newValue => timeValue.value = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-time',\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-time.scss\" />\n"],"names":["validDigitRegex","hourRegex","minuteRegex","isValidTimeString","timeText","MAX_TIME_INPUT_LENGTH","validateTimeInput","event","selectionStart","value","isAllowedKey","isValidKey","isValidColon","isAtMaxLength","formatTimeInputValue","formattedValue","secondToLastDigit","lastDigit","__default__","messages","VALIDATION_DEBOUNCE_TIME","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","slots","useSlots","hasSlot","useHasSlot","isTouchDevice","useTouchDevice","t","useI18n","internalError","ref","computedErrorMessage","computed","props","inputErrorMessage","inputType","inputModelValue","computedPlaceholder","validateTime","isValid","emit","validateTimeWithDebounce","debounce","watch","newValue","formatted"],"mappings":";;;;;;;;AAAA,MAAAA,IAAA,QAEAC,IAAA,WACAC,IAAA,iBAQOC,IAAA,CAAAC,MAAA,8CAAA,KAAAA,CAAA,GAGPC,IAAA,GAEOC,IAAA,CAAAC,MAAA;AACH,QAAA,EAAA,gBAAAC,GAAA,OAAAC,IAAA,GAAA,IAAAF,EAAA,QAGAG,IADA,CAAA,aAAA,OAAA,aAAA,YAAA,EACA,SAAAH,EAAA,GAAA,GACAI,IAAAX,EAAA,KAAAO,EAAA,GAAA,KAAAG,GACAE,IAAA,CAAA,GAAA,GAAA,GAAA,CAAA,EAAA,SAAAJ,CAAA,KAAAD,EAAA,QAAA,KACAM,IAAAJ,EAAA,UAAAJ;AAEA,GAAA,CAAAM,KAAA,CAAAC,KAAAC,KAAA,CAAAH,MACIH,EAAA,eAAA;AAER,GAEOO,IAAA,CAAAL,MAAA;AACH,MAAA,CAAAA;AACI,WAAAA;AAGJ,MAAAM,IAAAN;AAGA,MAAAM,EAAA,WAAA,KAAA,SAAAN,GAAA,EAAA,IAAA;AACI,WAAA,IAAAM,CAAA;AAGJ,QAAA,CAAAC,GAAAC,CAAA,IAAAF,EAAA,MAAA,EAAA;AACA,SAAA,CAAA,GAAA,CAAA,EAAA,SAAAA,EAAA,MAAA,KAAAE,MAAA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AAA;AAAA,MACJ;AAAA,IACJ,gSAGJ,CAAAtB,MAAA;AACI,UAAA,EAAA0B,EAAA,YAAAA,EAAA;AAIA,YAAAR,EAAA;AACI,UAAAe,EAAA,sBAAA,OAAAjC,KAAA,EAAA,CAAA,GACAiC,EAAA,aAAA;AAAA,aAAkB;AAElB,gBAAAK,IAAAjC,EAAA,OAAAL,KAAA,EAAA,CAAA;AACA,UAAAiC,EAAA,sBAAAK,CAAA,GACAJ,EAAAI,CAAA;AAAA,QAAkC;AAAA,IACtC,cAGJ,CAAAxC,MAAA;AACI,MAAAoB,EAAA,SACIrB,EAAAC,CAAA,GAEJmC,EAAA,WAAAnC,CAAA;AAAA,IAAqB;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input-time.CXMuvF9N.js","sources":["../../src/utils/ts/time-input.ts","../../src/components/input-time/input-time.vue"],"sourcesContent":["const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\n/**\n * Validates a complete time string in HH:MM:SS format.\n * Hours: 00-24, Minutes: 00-59, Seconds: 00-59\n * @param timeText The time string to validate\n * @returns True if the time string is valid, false otherwise\n */\nexport const isValidTimeString = (timeText: string): boolean =>\n /^(?:[01]\\d|2[0-4]):(?:[0-5]\\d):(?:[0-5]\\d)$/.test(timeText);\n\nconst MAX_TIME_INPUT_LENGTH = 8;\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart, value = '' } = event.target as HTMLInputElement;\n\n const allowedKeys = ['Backspace', 'Tab', 'ArrowLeft', 'ArrowRight'];\n const isAllowedKey = allowedKeys.includes(event.key);\n const isValidKey = validDigitRegex.test(event.key) || isAllowedKey;\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n const isAtMaxLength = value.length >= MAX_TIME_INPUT_LENGTH;\n\n if ((!isValidKey && !isValidColon) || (isAtMaxLength && !isAllowedKey)) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <bento-input-field\n class=\"b-input-time\"\n :type=\"inputType\"\n :step=\"isTouchDevice ? 1 : undefined\"\n :condensed=\"props.condensed\"\n :disabled=\"props.disabled\"\n :error-message=\"inputErrorMessage\"\n :label=\"props.label\"\n :model-value=\"inputModelValue\"\n :optional=\"props.optional\"\n :placeholder=\"computedPlaceholder\"\n :readonly=\"props.readonly\"\n :required=\"props.required\"\n :tooltip-text=\"props.tooltipText\"\n v-bind=\"$attrs\"\n @update:model-value=\"onInput\"\n @keydown=\"onKeyDown\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"!isTouchDevice\" #description>\n <slot name=\"description\">{{\n props.description ? `${props.description} ${t('timeFormatDescription')}` : t('timeFormatDescription')\n }}</slot>\n </template>\n </bento-input-field>\n</template>\n\n<script setup lang=\"ts\">\n // Components\n import { BentoInputField } from '@/components/input-field';\n import { INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { useI18n } from '@/utils/ts/i18n';\n import { formatTimeInputValue, isValidTimeString, validateTimeInput } from '@/utils/ts/time-input';\n\n // Types\n import type { BentoInputFieldValue } from '@/components/input-field/input-field.types';\n import { type BentoInputTimeProps } from './input-time.types';\n\n // Localization\n import messages from './messages.json';\n\n import { computed, provide, ref, useSlots, watch } from 'vue';\n import { useHasSlot, useTouchDevice } from '@/composables';\n\n const VALIDATION_DEBOUNCE_TIME = 300;\n\n provide(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, 'bento-input-time');\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { isTouchDevice } = useTouchDevice();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n condensed: { type: Boolean, default: false },\n modelValue: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"keydown\", \"input:valid\", \"input:error\"]);\n\n const internalError = ref(false);\n const computedErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return internalError.value ? t('invalidTimeFormat') : null;\n });\n const inputErrorMessage = computed(() => (isTouchDevice.value ? props.errorMessage : computedErrorMessage.value));\n const inputType = computed(() => (isTouchDevice.value ? 'time' : undefined));\n const inputModelValue = computed(() => props.modelValue);\n const computedPlaceholder = computed(() => (isTouchDevice ? undefined : props.placeholder));\n\n const validateTime = (timeText: string) => {\n if (!timeText) {\n internalError.value = false;\n return;\n }\n\n const isValid = isValidTimeString(timeText);\n internalError.value = !isValid;\n\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n const validateTimeWithDebounce = debounce(validateTime, VALIDATION_DEBOUNCE_TIME);\n\n // Watch for external modelValue changes (e.g., when parent resets the value)\n watch(\n () => props.modelValue,\n newValue => {\n const timeText = String(newValue ?? '');\n // Clear the error only when the new value is a complete, valid time string\n if (timeText.length === 8 && isValidTimeString(timeText)) {\n internalError.value = false;\n }\n }\n );\n\n const onInput = (value: BentoInputFieldValue) => {\n if (props.disabled || props.readonly) {\n return;\n }\n\n if (isTouchDevice.value) {\n emit('update:model-value', String(value ?? ''));\n emit('input:valid');\n } else {\n const formatted = formatTimeInputValue(String(value ?? ''));\n emit('update:model-value', formatted);\n validateTimeWithDebounce(formatted);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isTouchDevice.value) {\n validateTimeInput(event);\n }\n emit('keydown', event);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Input time component for entering time values in HH:MM:SS format.\n * This is an extension of the `bento-input-field` component with built-in\n * time formatting and validation logic.\n *\n * @usage\n * import { BentoInputTime } from '@adyen/bento-vue2';\n *\n * const timeValue = ref('');\n *\n * export default {\n * components: { BentoInputTime },\n * template: `\n * <bento-input-time\n * label=\"Start time\"\n * :model-value=\"timeValue\"\n * @update:model-value=\"newValue => timeValue.value = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-time',\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-time.scss\" />\n"],"names":["validDigitRegex","hourRegex","minuteRegex","isValidTimeString","timeText","MAX_TIME_INPUT_LENGTH","validateTimeInput","event","selectionStart","value","isAllowedKey","isValidKey","isValidColon","isAtMaxLength","formatTimeInputValue","formattedValue","secondToLastDigit","lastDigit","__default__","messages","VALIDATION_DEBOUNCE_TIME","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","slots","useSlots","hasSlot","useHasSlot","isTouchDevice","useTouchDevice","t","useI18n","internalError","ref","computedErrorMessage","computed","props","inputErrorMessage","inputType","inputModelValue","computedPlaceholder","validateTime","isValid","emit","validateTimeWithDebounce","debounce","watch","newValue","formatted"],"mappings":";;;;;;;;AAAA,MAAAA,IAAA,QAEAC,IAAA,WACAC,IAAA,iBAQOC,IAAA,CAAAC,MAAA,8CAAA,KAAAA,CAAA,GAGPC,IAAA,GAEOC,IAAA,CAAAC,MAAA;AACH,QAAA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|
-
import { D as i } from "./dialog-page.
|
|
3
|
+
import { F as a } from "./footer-actions.C9STwwcv.js";
|
|
4
|
+
import { D as i } from "./dialog-page.Bct3zOQO.js";
|
|
5
5
|
import { n as p } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import "../assets/inspector-page.css";
|
|
7
7
|
const y = ["small", "large"], c = /* @__PURE__ */ r({
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
y as B,
|
|
39
39
|
b as i
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=inspector-page.
|
|
41
|
+
//# sourceMappingURL=inspector-page.BRC_7uro.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspector-page.
|
|
1
|
+
{"version":3,"file":"inspector-page.BRC_7uro.js","sources":["../../src/components/inspector/inspector.types.ts"],"sourcesContent":["export const BentoInspectorSizeOptions = ['small', 'large'] as const;\n\nexport type BentoInspectorRelativeLayout = 'push-content' | 'overlay-content';\n\nexport type BentoInspectorSize = (typeof BentoInspectorSizeOptions)[number];\n\nexport interface BentoInspectorProps {\n /**\n * ID of the current active inspector page\n */\n activePage?: string;\n\n /**\n * Shows the Expand icon in the inspector\n */\n expandable?: boolean;\n\n /**\n * Opens and closes the inspector\n */\n isOpen?: boolean;\n\n /**\n * Shows loading indicator for the content\n */\n loading?: boolean;\n\n /**\n * Determines the size of the inspector\n */\n size?: BentoInspectorSize;\n\n /**\n * The title of the component.\n * Used for accessibility and the single page inspector.\n * When using `bento-inspector-page` this title is only used for accessibility purposes\n */\n title: string;\n\n /**\n * The appearance of the inspector relative to the main content. Defaults to `push-content`.\n *\n * - `push-content`: The inspector pushes the main content to the side, resizing it to fit.\n * - `overlay-content`: The inspector opens on top of the main content, without affecting its layout.\n */\n relativeLayout?: BentoInspectorRelativeLayout;\n\n /**\n * An optional HTMLElement to focus on when returning focus from the inspector\n * to the main page content (e.g. via the `Ctrl+Shift+S` keyboard shortcut).\n *\n * By default, the inspector attempts to return focus to the element that was active before it opened.\n * However, if that trigger element is removed from the DOM (e.g., via a `v-if`), focus cannot be returned.\n *\n * Providing a `pageFocusAnchor` (e.g. role=\"gridcell\") ensures that the\n * focus context is preserved for accessibility.\n */\n pageFocusAnchor?: HTMLElement;\n}\n"],"names":["BentoInspectorSizeOptions"],"mappings":";;;;;;AAAO,MAAAA,IAAA,CAAA,SAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as a, watch as R, defineComponent as V, computed as v, provide as k, toRef as $, nextTick as Y } from "vue";
|
|
2
2
|
import { d as K, B as J } from "./typography.D1OZJbEa.js";
|
|
3
|
-
import { B as U } from "./button.
|
|
3
|
+
import { B as U } from "./button.DII5Ifwa.js";
|
|
4
4
|
import { B as X } from "./loading-indicator.PxbRzshH.js";
|
|
5
5
|
import { B as j, g as q, s as W, a as Z, f as Q } from "./focus-trap.fd6_d2EW.js";
|
|
6
6
|
import { E as ee } from "./expand.zENZmw3W.js";
|
|
@@ -133,10 +133,10 @@ var ve = function() {
|
|
|
133
133
|
Ce,
|
|
134
134
|
!1,
|
|
135
135
|
null,
|
|
136
|
-
"
|
|
136
|
+
"110ca0c0"
|
|
137
137
|
);
|
|
138
138
|
const De = _e.exports;
|
|
139
139
|
export {
|
|
140
140
|
De as B
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=inspector.
|
|
142
|
+
//# sourceMappingURL=inspector.IOtNex1r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.IOtNex1r.js","sources":["../../src/components/inspector/composables/use-focus-history/use-focus-history.ts","../../src/components/inspector/inspector.vue"],"sourcesContent":["import { ref, type Ref } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { watch } from 'vue';\n\n/**\n * A composable to track the focus history within a target element.\n * @param targetEl The stable parent element to monitor for focus changes.\n */\nexport function useFocusHistory(targetEl: Ref<HTMLElement | null>) {\n const MAX_HISTORY_LENGTH = 3;\n\n const focusHistory = ref<Array<Element>>([]);\n\n const currentActiveElement = useActiveElement();\n\n // Edge case 1:\n // While the inspector is opened, if user tabs through the data-grid to the inspector, and closes it,\n // it returns to the last element on the data grid regardless if it is a data-grid-cell.\n //\n // Edge case 2:\n // Buttons or actions teleported out of the data-grid may have the focus shifted into a different context.\n watch(currentActiveElement, newlyFocusedElement => {\n // Check if the newly focused element is a child of our target container.\n if (!targetEl.value || !newlyFocusedElement || !targetEl.value.contains(newlyFocusedElement)) {\n return;\n }\n\n // Add the focused element to the history\n focusHistory.value.unshift(newlyFocusedElement);\n\n if (focusHistory.value.length > MAX_HISTORY_LENGTH) {\n focusHistory.value.pop();\n }\n });\n\n /**\n * Iterates through the focus history to find the first valid element\n * that is still present in the DOM.\n * @returns The first valid historical element, or null if none are found.\n */\n const findValidFocusFallback = (): HTMLElement | null => {\n for (const el of focusHistory.value) {\n if (el && document.body.contains(el as Node)) {\n return el as HTMLElement;\n }\n }\n\n return null; // No valid fallback found\n };\n\n return {\n findValidFocusFallback,\n };\n}\n","<template>\n <div ref=\"wrapper\" class=\"b-inspector\" :class=\"conditionalClass\" @keydown=\"handleSectionFocus\">\n <div ref=\"page\" class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\"></slot>\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside\n v-if=\"isOpen\"\n ref=\"inspector\"\n class=\"b-inspector__container-wrapper\"\n :aria-label=\"inspectorAriaLabel\"\n @keydown.tab=\"handleTabNavigation\"\n >\n <bento-focus-trap :disabled=\"!isCompact\" class=\"b-inspector__focus-trap\">\n <div class=\"b-inspector__container\" :class=\"computedContainerClasses\">\n <template v-if=\"!isCompact\">\n <bento-button\n ref=\"returnContentButton\"\n class=\"b-inspector__return-content\"\n variant=\"secondary\"\n condensed\n :aria-describedby=\"returnToMainContentDescriptionId\"\n @click=\"moveFocusBetweenSections\"\n >\n {{ t('returnToMainContent') }}\n </bento-button>\n <span\n :id=\"returnToMainContentDescriptionId\"\n class=\"b-inspector__return-content-description\"\n >\n {{ t('returnToMainContentDescription') }}\n </span>\n </template>\n <div v-if=\"pages.length === 0\" class=\"b-inspector__header\">\n <bento-typography el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\"></slot>\n </div>\n <div class=\"b-inspector__icons\">\n <bento-button\n v-if=\"expandable\"\n ref=\"expandButton\"\n variant=\"tertiary\"\n :aria-label=\"t('expand')\"\n @click=\"emit('expand')\"\n >\n <template #iconLeft>\n <expand-icon aria-hidden=\"true\" />\n </template>\n </bento-button>\n <bento-button\n ref=\"closeButton\"\n :aria-label=\"t('close')\"\n variant=\"tertiary\"\n @click=\"emit('update:is-open', false)\"\n >\n <template #iconLeft>\n <cross-icon aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useElementSize } from '@vueuse/core';\n import moveFocusInside, { focusInside, getActiveElement, getFocusableIn } from 'focus-lock';\n\n import { type BentoInspectorProps } from './inspector.types';\n import { useFocusHistory } from './composables/use-focus-history/use-focus-history';\n import {\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal/dialog-page/dialog-page.keys';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from '@/internal/dialog-page/dialog-page.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n activePage: { default: '' },\n expandable: { type: Boolean, default: false },\n isOpen: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n size: { default: 'small' },\n title: null,\n relativeLayout: { default: 'push-content' },\n pageFocusAnchor: { default: null }\n});\n\n const emit = defineEmits([\"update:is-open\", \"update:active-page\", \"expand\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const returnToMainContentDescriptionId = generateUid('returnToMainContentDescription');\n const wrapper = ref<HTMLElement>(null);\n const inspector = ref<HTMLElement>(null);\n const page = ref<HTMLElement>(null);\n // These refs allow keyboard navigation to follow the intended order independently of the DOM order.\n const returnContentButton = ref(null);\n const expandButton = ref(null);\n const closeButton = ref(null);\n const inspectorLastFocusedElement = ref<HTMLElement>(null);\n const internalActivePage = ref(props.activePage);\n\n // Multiple page navigation\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isAnimationActive = ref(false);\n\n const { width: wrapperWidth } = useElementSize(wrapper);\n const computedContainerClasses = computed(() => {\n return {\n 'b-inspector__container--padded': pages.value.length === 0, // No pages are registered\n };\n });\n\n const isCompact = computed(() => {\n const COMPACT_THRESHOLD_SMALL = 740;\n const COMPACT_THRESHOLD_LARGE = 915;\n\n // small inspector to occupy full screen if < 740px\n // large inspector to occupy full screen if < 915px\n const threshold = props.size === 'small' ? COMPACT_THRESHOLD_SMALL : COMPACT_THRESHOLD_LARGE;\n\n return wrapperWidth.value > 0 && wrapperWidth.value < threshold;\n });\n\n const computedPageLastFocusedElement = computed(() => props.pageFocusAnchor);\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n [`b-inspector--${props.relativeLayout}`]: true,\n [`b-inspector--is-compact`]: isCompact.value,\n [`b-inspector--multi-paged`]: pages.value.length,\n }));\n\n const inspectorAriaLabel = computed(() => `${t('inspector')}, ${props.title}`);\n\n const { findValidFocusFallback } = useFocusHistory(page);\n\n /**\n * Returns the Inspector's intended tab order.\n *\n * The content must remain before the icon buttons in the DOM for the Inspector animations,\n * so the keyboard order is managed separately. The return button is omitted automatically in compact mode.\n */\n const getOrderedFocusableElements = () => {\n const navigationButtons = [\n returnContentButton.value?.$el,\n expandButton.value?.$el,\n closeButton.value?.$el,\n ].filter(Boolean) as Array<HTMLElement>;\n const contentFocusableElements = getFocusableIn(inspector.value)\n .map(({ node }) => node)\n .filter(element => !navigationButtons.includes(element));\n\n return [...navigationButtons, ...contentFocusableElements];\n };\n\n const setFocus = async () => {\n if (props.isOpen) {\n await nextTick();\n if (isCompact.value) {\n // The compact focus trap uses DOM order when it initially moves focus.\n // Explicitly focus the first ordered control so content does not skip the icon buttons.\n focusElement(getOrderedFocusableElements()[0]);\n } else {\n moveFocusInside(inspector.value, computedPageLastFocusedElement.value);\n }\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n }\n };\n\n const handleTabNavigation = (event: KeyboardEvent) => {\n // Prevent the browser's DOM-based tab order and use the Inspector-specific order instead.\n const direction = event.shiftKey ? -1 : 1;\n const focusableElements = getOrderedFocusableElements();\n const currentIndex = focusableElements.indexOf(getActiveElement());\n const nextIndex = currentIndex + direction;\n\n // Compact inspectors trap focus, so navigation should wrap around instead of returning focus to the page.\n if (isCompact.value && focusableElements.length > 0) {\n event.preventDefault();\n focusableElements[(nextIndex + focusableElements.length) % focusableElements.length].focus();\n return;\n }\n\n const focusableEl = focusableElements[nextIndex];\n\n // At either end of the Inspector, return focus to the page.\n if (!focusableEl) {\n event.preventDefault();\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n return;\n }\n\n event.preventDefault();\n focusableEl.focus();\n };\n\n const handleSectionFocus = event => {\n const sectionShortcut = event.shiftKey && event.ctrlKey && event.key === 'S';\n if (props.isOpen && !isCompact.value && sectionShortcut) {\n moveFocusBetweenSections();\n }\n };\n\n const moveFocusBetweenSections = () => {\n if (focusInside(inspector.value)) {\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n } else {\n focusElement(inspectorLastFocusedElement.value);\n }\n };\n\n const focusElement = (element: HTMLElement) => {\n if (!element) {\n return;\n }\n element?.focus();\n if (document.activeElement !== element) {\n focusElement(element.parentElement);\n }\n };\n\n /**\n * Multiple page navigation and page registration\n */\n\n const updatePage = page => emit('update:active-page', page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage: internalActivePage,\n animation,\n isAnimationActive,\n isOpen: toRef(props, 'isOpen'),\n pages,\n previousPages,\n updatePage,\n });\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n watch(\n () => props.activePage,\n () => {\n if (props.activePage) {\n internalActivePage.value = props.activePage;\n setFocus();\n }\n }\n );\n\n if (!props.activePage) {\n deprecate(\n 'BentoInspector \"active-page\" as optional',\n `Make sure to set the \"active-page\" prop and keep it in sync with \"update:active-page\".\n \"active-page\" prop will be required in the next version`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * :active-page=\"activePage\"\n * expandable\n * @update:is-open=\"isOpen = $event\"\n * @update:active-page=\"activePage = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n"],"names":["useFocusHistory","targetEl","focusHistory","ref","currentActiveElement","useActiveElement","watch","newlyFocusedElement","el","__default__","messages","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","inspector","page","returnContentButton","expandButton","closeButton","inspectorLastFocusedElement","internalActivePage","props","pages","previousPages","animation","BentoDialogPageAnimation","isAnimationActive","wrapperWidth","useElementSize","computedContainerClasses","computed","isCompact","threshold","computedPageLastFocusedElement","conditionalClass","inspectorAriaLabel","findValidFocusFallback","getOrderedFocusableElements","navigationButtons","contentFocusableElements","getFocusableIn","node","element","setFocus$1","nextTick","focusElement","setFocus","handleTabNavigation","event","direction","focusableElements","nextIndex","getActiveElement","focusableEl","emit","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","updatePage","page2","unregisterPage","pageIdToRemove","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","toRef","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;AAQO,SAAAA,GAAAC,GAAA;AAGH,QAAAC,IAAAC,EAAA,CAAA,CAAA,GAEAC,IAAAC,GAAA;AAQA,SAAAC,EAAAF,GAAA,CAAAG,MAAA;AAEI,IAAA,CA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;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -72,12 +72,12 @@ const w = h.exports, B = {
|
|
|
72
72
|
disableTypography: void 0,
|
|
73
73
|
external: void 0,
|
|
74
74
|
isNotRouting: void 0
|
|
75
|
-
},
|
|
75
|
+
}, u = m("external-link"), c = (o) => o, _ = r(() => ({
|
|
76
76
|
"b-link": !e.isButton,
|
|
77
77
|
[`b-link--${s.QUIET}`]: e.variant === s.QUIET,
|
|
78
78
|
"b-link--truncate": e.truncate
|
|
79
79
|
})), d = r(() => e.external ? e.target ?? "_blank" : e.target), f = r(() => !(e.isButton || e.isNotRouting));
|
|
80
|
-
return { __sfc: !0, t: n, props: e, nonForwardedProps: i, externalLinkId:
|
|
80
|
+
return { __sfc: !0, t: n, props: e, nonForwardedProps: i, externalLinkId: u, getAttributeTitle: c, conditionalClasses: _, computedTarget: d, showExternalLinkIcon: f, emit: t, onClick: (o, l) => {
|
|
81
81
|
t("click", o), l && l();
|
|
82
82
|
}, RouterLink: g, BentoTypography: y, ExternalLinkIcon: w };
|
|
83
83
|
}
|
|
@@ -93,7 +93,7 @@ var L = function() {
|
|
|
93
93
|
$,
|
|
94
94
|
!1,
|
|
95
95
|
null,
|
|
96
|
-
"
|
|
96
|
+
"3646b7fc"
|
|
97
97
|
);
|
|
98
98
|
const O = E.exports;
|
|
99
99
|
export {
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
w as E,
|
|
102
102
|
s as a
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=link.
|
|
104
|
+
//# sourceMappingURL=link.Cls8XShm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.Cls8XShm.js","sources":["../../src/components/link/link.types.ts","../../../ui-assets/icons-16/dist/vue/external-link.vue","../../src/components/link/link.vue"],"sourcesContent":["import type { Location } from 'vue-router/types/router.d.ts';\n// TODO: revert to import once fully migrated to Vue 3\n// import type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n\n/**\n * Manually defined RouterLinkProps to ensure compatibility\n * with Vue Macros and Vue 2.7 / 3 monorepos.\n */\nexport interface RouterLinkProps {\n /**\n * Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to\n * `router.push()` internally, so the value can be either a string or a location descriptor object.\n */\n to: string | Location;\n /**\n * Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will\n * not create a new history record.\n *\n * @default false\n */\n replace?: boolean;\n /**\n * Setting `append` prop always appends the relative path to the current path. For example, assuming we are navigating\n * from `/a` to a relative link `b`, without `append` we will end up at `/b`, but with append we will end up at\n * `/a/b`.\n *\n * @default false\n */\n append?: boolean;\n /**\n * Sometimes we want <RouterLink> to render as another tag, e.g <li>. Then we can use tag prop to specify which tag to\n * render to, and it will still listen to click events for navigation.\n *\n * @default \"a\"\n */\n tag?: string;\n /**\n * Configure the active CSS class applied when the link is active. Note the default value can also be configured\n * globally via the `linkActiveClass` router constructor option.\n *\n * @default \"router-link-active\"\n */\n activeClass?: string;\n /**\n * The default active class matching behavior is **inclusive match**. For example, `<RouterLink to=\"/a\">` will get\n * this class applied as long as the current path starts with `/a/` or is `/a`.\n *\n * @default false\n */\n exact?: boolean;\n /**\n * Allows matching only using the `path` section of the url, effectively ignoring the `query` and the `hash` sections.\n *\n * @default false\n */\n exactPath?: boolean;\n /**\n * Configure the active CSS class applied when the link is active with exact path match. Note the default value can\n * also be configured globally via the `linkExactPathActiveClass` router constructor option.\n *\n * @default \"router-link-exact-path-active\"\n */\n exactPathActiveClass?: string;\n\n /**\n * Specify the event(s) that can trigger the link navigation.\n *\n * @default 'click'\n */\n event?: string | ReadonlyArray<string>;\n /**\n * Configure the active CSS class applied when the link is active with exact match. Note the default value can also be\n * configured globally via the `linkExactActiveClass` router constructor option.\n *\n * @default \"router-link-exact-active\"\n */\n exactActiveClass?: string;\n /**\n * Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed\n * values for [aria-current](https://www.w3.org/TR/wai-aria-1.2/#aria-current) in the ARIA spec. In most cases, the\n * default of page should be the best fit.\n *\n * @default \"page\"\n */\n ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n}\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoLinkVariant {\n DEFAULT = 'default',\n QUIET = 'quiet',\n}\n\nexport interface LinkProps {\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography component.\n */\n disableTypography?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link and renders an external link icon.\n */\n external?: boolean;\n\n /**\n * Set to true if used inside a `BentoButton` component.\n */\n isButton?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n isNotRouting?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n /**\n * Set to true to truncate link. Doesn't work with disableTypography.\n */\n truncate?: boolean;\n\n /**\n * Link variant type affecting visual style.\n * @values default, quiet\n */\n variant?: BentoLinkVariant | `${BentoLinkVariant}`;\n}\n\nexport type BentoLinkProps = RouterLinkProps & LinkProps;\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=\"#001222\" d=\"M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <a\n v-if=\"external || isNotRouting\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n :aria-describedby=\"external ? externalLinkId : null\"\n :href=\"$props.to.toString()\"\n :title=\"getAttributeTitle($attrs.title)\"\n :target=\"computedTarget\"\n @click=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n <span v-if=\"showExternalLinkIcon\" aria-hidden=\"true\" class=\"b-link__external-link-icon\">\n <external-link-icon />\n </span>\n <span v-if=\"external\" :id=\"externalLinkId\" class=\"b-link--visually-hidden\">{{ t('opensInNewTab') }}</span>\n </a>\n <router-link\n v-else\n v-bind=\"{ ...$attrs, ...$props, ...nonForwardedProps }\"\n :class=\"conditionalClasses\"\n :target=\"target\"\n :to=\"props.to\"\n custom\n @click.native=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n </router-link>\n</template>\n\n<script setup lang=\"ts\">\n import { RouterLink } from 'vue-router';\n import { computed } from 'vue';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { BentoTypography } from '@/components/typography';\n import { type BentoLinkProps, BentoLinkVariant } from './link.types';\n import { useI18n } from '@/utils/ts/i18n';\n import type { RouterLinkSlotArgument } from 'vue-router/types/router.d.ts';\n import ExternalLinkIcon from '@adyen/ui-assets-icons-16/vue/external-link';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n to: null,\n replace: { type: Boolean },\n append: { type: Boolean },\n tag: null,\n activeClass: null,\n exact: { type: Boolean },\n exactPath: { type: Boolean },\n exactPathActiveClass: null,\n event: null,\n exactActiveClass: null,\n ariaCurrentValue: null,\n disableTypography: { type: Boolean },\n external: { type: Boolean },\n isButton: { type: Boolean },\n isNotRouting: { type: Boolean },\n target: { default: null },\n truncate: { type: Boolean },\n variant: { default: BentoLinkVariant.DEFAULT }\n});\n\n // Props that should not be forwarded to the underlying anchor element\n const nonForwardedProps = {\n variant: undefined,\n isButton: undefined,\n truncate: undefined,\n disableTypography: undefined,\n external: undefined,\n isNotRouting: undefined,\n };\n\n const externalLinkId = generateUid('external-link');\n\n const getAttributeTitle = (attributesTitle: unknown) => attributesTitle as string;\n\n const conditionalClasses = computed(() => ({\n 'b-link': !props.isButton,\n [`b-link--${BentoLinkVariant.QUIET}`]: props.variant === BentoLinkVariant.QUIET,\n [`b-link--truncate`]: props.truncate,\n }));\n\n const computedTarget = computed(() => (props.external ? (props.target ?? '_blank') : props.target));\n const showExternalLinkIcon = computed(() => !(props.isButton || props.isNotRouting));\n\n const emit = defineEmits([\"click\"]);\n\n const onClick = (e: MouseEvent, navigateCallback?: RouterLinkSlotArgument['navigate']) => {\n emit('click', e);\n if (navigateCallback) {\n navigateCallback();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Extends the `router-link` from the `vue-router` NPM package.\n *\n * @example\n * import { BentoLink } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLink },\n * template: `\n * <bento-link to=\"/\">\n * link\n * </bento-link>\n * `\n * }\n */\n export default {\n name: 'bento-link',\n inheritAttrs: false,\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./link.scss\" />\n"],"names":["BentoLinkVariant","BentoLinkVariant2","instance","getCurrentInstance","uuid","__default__","messages","t","useI18n","nonForwardedProps","externalLinkId","generateUid","getAttributeTitle","attributesTitle","conditionalClasses","computed","props","computedTarget","showExternalLinkIcon","e","navigateCallback","emit"],"mappings":";;;;;;;;AA0FO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;ACrFZ,UAAAE,IAAAC,EAAA,GAIAC,IAAA,OAAAF,GAAA,OAAAA,GAAA,OAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GCgHIG,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;iBA5EA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAwBAC,IAAA;AAAA,MAA0B,SAAA;AAAA,MACb,UAAA;AAAA,MACC,UAAA;AAAA,MACA,mBAAA;AAAA,MACS,UAAA;AAAA,MACT,cAAA;AAAA,IACI,GAGlBC,IAAAC,EAAA,eAAA,GAEAC,IAAA,CAAAC,MAAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,UAAA,CAAAC,EAAA;AAAA,MACtB,CAAA,WAAAhB,EAAA,KAAA,EAAA,GAAAgB,EAAA,YAAAhB,EAAA;AAAA,MACyD,oBAAAgB,EAAA;AAAA,IAC9C,EAAA,GAGhCC,IAAAF,EAAA,MAAAC,EAAA,WAAAA,EAAA,UAAA,WAAAA,EAAA,MAAA,GACAE,IAAAH,EAAA,MAAA,EAAAC,EAAA,YAAAA,EAAA,aAAA;4LAIA,CAAAG,GAAAC,MAAA;AACI,MAAAC,EAAA,SAAAF,CAAA,GACAC,KACIA,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as P, computed as r, ref as C, watch as L, provide as H, useSlots as F, inject as E } from "vue";
|
|
2
2
|
import { l as R } from "./index.CL3TXc0a.js";
|
|
3
|
-
import { u as k, a as U, B as A } from "./draggable-handle.
|
|
3
|
+
import { u as k, a as U, B as A } from "./draggable-handle.DgVdGC1V.js";
|
|
4
4
|
import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import { C as $ } from "./chevron-right-small.zD3HHYEi.js";
|
|
6
6
|
import { B as z } from "./status.DJ1Dfh5s.js";
|
|
7
|
-
import { B as N } from "./tag.
|
|
7
|
+
import { B as N } from "./tag.Dz1FQSZb.js";
|
|
8
8
|
import { B as j } from "./typography.D1OZJbEa.js";
|
|
9
9
|
import { u as G } from "./use-has-slot.C9lQZ6nz.js";
|
|
10
10
|
import { u as J } from "./index.CPOlyau9.js";
|
|
@@ -163,4 +163,4 @@ export {
|
|
|
163
163
|
ge as a,
|
|
164
164
|
ue as l
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=list-item.
|
|
166
|
+
//# sourceMappingURL=list-item.HjabBEb8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.Bcqodg1-.js","sources":["../../src/components/list/list.keys.ts","../../src/components/list/list.vue","../../src/components/list/components/list-item/list-item.vue"],"sourcesContent":["import type { ComputedRef } from 'vue';\nimport type { BentoDraggableDisabledMenus } from '@/components/draggable/composables/use-bento-draggable/use-bento-draggable';\n\nexport interface BentoListDraggableContext {\n isDraggable: ComputedRef<boolean>;\n moveItemUp: (element: HTMLElement | null) => void;\n moveItemDown: (element: HTMLElement | null) => void;\n moveItemTop: (element: HTMLElement | null) => void;\n moveItemBottom: (element: HTMLElement | null) => void;\n getDisabledMenus: (element: HTMLElement | null) => BentoDraggableDisabledMenus;\n}\n\nexport const BENTO_LIST_DRAGGABLE_INJECTION_KEY = Symbol('list draggable injection key');\n","<template>\n <div class=\"b-list\">\n <component :is=\"listElement\" ref=\"listRef\" v-bind=\"$attrs\" class=\"b-list__list\">\n <slot />\n </component>\n\n <div v-if=\"isDraggable\" class=\"b-list__announcement\" role=\"status\" aria-live=\"polite\">\n {{ announcementMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useMutationObserver } from '@vueuse/core';\n import { computed, provide, ref, watch } from 'vue';\n import { useBentoDraggable } from '@/components/draggable/composables/use-bento-draggable/use-bento-draggable';\n import { useDraggableAnnouncement } from '@/components/draggable/composables/use-draggable-announcement/use-draggable-announcement';\n import type { BentoDraggableOptions, BentoDraggableSortableEvent } from '@/components/draggable/draggable.types';\n import { BENTO_LIST_DRAGGABLE_INJECTION_KEY } from './list.keys';\n import type { BentoListDraggableContext } from './list.keys';\n import type { BentoListProps } from './list.types';\n\n // used for announcement composable\n import draggableMessages from '@/components/draggable/composables/use-draggable-announcement/messages.json';\n\n const ITEM_SELECTOR = '.b-list-item';\n\n const props = defineProps({\n type: { default: 'unordered' },\n draggable: { type: Boolean, default: false },\n draggableOptions: { default: () => ({}) }\n});\n\n const emit = defineEmits([\"reorder\"]);\n\n const listElement = computed(() => (props.type === 'ordered' ? 'ol' : 'ul'));\n const listRef = ref<HTMLElement | null>(null);\n const listItems = ref<Array<HTMLElement>>([]);\n const isDraggable = computed(() => props.draggable);\n\n const getListItems = (): Array<HTMLElement> =>\n listRef.value\n ? (Array.from(listRef.value.children).filter(child => child.matches(ITEM_SELECTOR)) as Array<HTMLElement>)\n : [];\n\n const syncListItems = () => {\n listItems.value = getListItems();\n };\n\n watch(\n listRef,\n newElement => {\n if (!newElement) {\n listItems.value = [];\n return;\n }\n\n syncListItems();\n },\n { immediate: true }\n );\n\n useMutationObserver(listRef, syncListItems, { childList: true });\n\n const getItemIndex = (el: HTMLElement | null) => (el ? listItems.value.indexOf(el) : -1);\n\n const getItemLabel = (el: HTMLElement | null, fallbackIndex: number) =>\n el?.querySelector('[data-list-item-label]')?.textContent?.trim() || `List item ${fallbackIndex + 1}`;\n\n const announceMoveAt = (fromIndex: number, toIndex: number) => {\n if (!isDraggable.value) {\n return;\n }\n\n const items = getListItems();\n announceMove({\n itemLabel: getItemLabel(items[toIndex] ?? null, toIndex),\n fromIndex,\n toIndex,\n total: items.length,\n announcement: props.draggableOptions?.dragAnnouncement,\n });\n };\n\n const moveItemDOM = (fromIndex: number, toIndex: number) => {\n const items = getListItems();\n const itemToMove = items[fromIndex];\n const targetItem = items[toIndex];\n\n if (fromIndex < toIndex) {\n listRef.value!.insertBefore(itemToMove, targetItem.nextSibling);\n } else {\n listRef.value!.insertBefore(itemToMove, targetItem);\n }\n\n syncListItems();\n announceMoveAt(fromIndex, toIndex);\n emit('reorder', { oldIndex: fromIndex, newIndex: toIndex });\n };\n\n const computedDraggableOptions = computed<BentoDraggableOptions>(() => ({\n ...props.draggableOptions,\n onSort: (event: BentoDraggableSortableEvent) => {\n syncListItems();\n if (event.oldIndex !== undefined && event.newIndex !== undefined) {\n announceMoveAt(event.oldIndex, event.newIndex);\n emit('reorder', { oldIndex: event.oldIndex, newIndex: event.newIndex });\n }\n props.draggableOptions?.onSort?.(event);\n },\n }));\n\n const { announcementMessage, announceMove } = useDraggableAnnouncement();\n\n const { moveItemUp, moveItemDown, moveItemTop, moveItemBottom, getDisabledMenus } = useBentoDraggable(\n listRef,\n computedDraggableOptions,\n {\n getItemCount: () => listItems.value.length,\n getItemIndex,\n onMoveItem: moveItemDOM,\n }\n );\n\n provide<BentoListDraggableContext>(BENTO_LIST_DRAGGABLE_INJECTION_KEY, {\n isDraggable,\n moveItemUp,\n moveItemDown,\n moveItemTop,\n moveItemBottom,\n getDisabledMenus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoList` renders an ordered or unordered list container for `BentoListItem` rows.\n *\n * @example\n * import { BentoList, BentoListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * />\n * <bento-list-item\n * label=\"Risk configuration\"\n * description=\"Updated yesterday\"\n * :tag=\"{ label: 'Review', variant: 'orange' }\"\n * />\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list',\n inheritAttrs: false,\n i18n: { messages: draggableMessages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list.scss\" />\n","<template>\n <li ref=\"itemRef\" class=\"b-list-item\" @click=\"onItemClick\" @keydown=\"onItemKeydown\">\n <bento-typography\n class=\"b-list-item__inner\"\n :class=\"conditionalClasses\"\n el=\"div\"\n :role=\"props.withChevron ? 'button' : undefined\"\n :tabindex=\"props.withChevron ? 0 : undefined\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-list-item__image\">\n <slot name=\"image\" />\n </div>\n\n <bento-draggable-handle\n v-if=\"showDragHandle\"\n condensed\n :label=\"dragHandleLabel\"\n :disabled-menus=\"disabledMenus\"\n :disabled=\"draggableOptions?.disabled\"\n @move-up=\"moveItemUp\"\n @move-down=\"moveItemDown\"\n @move-top=\"moveItemTop\"\n @move-bottom=\"moveItemBottom\"\n />\n\n <div v-if=\"hasSlot('start')\" class=\"b-list-item__start\">\n <slot v-if=\"hasSlot('start')\" name=\"start\" />\n </div>\n\n <div class=\"b-list-item__content\">\n <div v-if=\"hasSlot('content')\" class=\"b-list-item__label\" data-list-item-label>\n <slot name=\"content\" />\n </div>\n\n <template v-else>\n <div class=\"b-list-item__header\">\n <bento-typography\n v-if=\"props.label\"\n class=\"b-list-item__label\"\n data-list-item-label\n el=\"span\"\n stronger\n >\n {{ props.label }}\n </bento-typography>\n <bento-status\n v-if=\"props.showStatus\"\n class=\"b-list-item__status\"\n :variant=\"props.statusColor\"\n aria-hidden=\"true\"\n />\n <bento-tag v-if=\"props.tag\" v-bind=\"props.tag\" class=\"b-list-item__tag\" />\n </div>\n <span v-if=\"props.description\" class=\"b-list-item__description\">\n {{ props.description }}\n </span>\n </template>\n </div>\n\n <div v-if=\"hasSlot('end')\" class=\"b-list-item__end\">\n <slot name=\"end\" />\n </div>\n\n <chevron-right-icon v-if=\"props.withChevron\" class=\"b-list-item__chevron\" aria-hidden=\"true\" />\n </bento-typography>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, useSlots } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n import { BentoDraggableHandle } from '@/components/draggable/components/draggable-handle';\n import { BentoStatus } from '@/components/status';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { BENTO_LIST_DRAGGABLE_INJECTION_KEY } from '../../list.keys';\n import type { BentoListDraggableContext } from '../../list.keys';\n import type { BentoListItemProps } from './list-item.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const itemRef = ref<HTMLElement | null>(null);\n const draggableContext = inject<BentoListDraggableContext | null>(BENTO_LIST_DRAGGABLE_INJECTION_KEY, null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n label: null,\n description: null,\n draggableOptions: { default: null },\n showStatus: { type: Boolean, default: false },\n statusColor: { default: 'blue' },\n tag: { default: undefined },\n withChevron: { type: Boolean, default: false },\n showTopDivider: { type: Boolean, default: false },\n showBottomDivider: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"click\", \"move-up\", \"move-down\", \"move-top\", \"move-bottom\"]);\n\n const onItemClick = (): void => {\n if (!props.withChevron) {\n return;\n }\n emit('click');\n };\n\n const onItemKeydown = (event: KeyboardEvent): void => {\n if (!props.withChevron) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n emit('click');\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-list-item__inner--clickable': props.withChevron,\n 'b-list-item__inner--top-divider': props.showTopDivider,\n 'b-list-item__inner--bottom-divider': props.showBottomDivider,\n }));\n\n const showDragHandle = computed(() => Boolean(draggableContext?.isDraggable.value));\n const dragHandleLabel = computed(() => props.draggableOptions?.label || props.label || t('listItem'));\n const disabledMenus = computed(() => {\n if (props.draggableOptions?.disabledMenus) {\n return props.draggableOptions.disabledMenus;\n }\n\n return draggableContext?.getDisabledMenus(itemRef.value);\n });\n\n const moveItemUp = () => {\n emit('move-up');\n (props.draggableOptions?.moveUp ?? (() => draggableContext?.moveItemUp(itemRef.value)))();\n };\n\n const moveItemDown = () => {\n emit('move-down');\n (props.draggableOptions?.moveDown ?? (() => draggableContext?.moveItemDown(itemRef.value)))();\n };\n\n const moveItemTop = () => {\n emit('move-top');\n (props.draggableOptions?.moveTop ?? (() => draggableContext?.moveItemTop(itemRef.value)))();\n };\n\n const moveItemBottom = () => {\n emit('move-bottom');\n (props.draggableOptions?.moveBottom ?? (() => draggableContext?.moveItemBottom(itemRef.value)))();\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoListItem` renders an item to be used inside `BentoList`.\n *\n * @example\n * import { BentoList, BentoListItem, BentoButton, BentoToggle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem, BentoButton, BentoToggle },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * >\n * <template #start>\n * <bento-toggle />\n * </template>\n * <template #end>\n * <bento-button variant=\"secondary\">Edit</bento-button>\n * </template>\n * </bento-list-item>\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list-item',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list-item.scss\" />\n"],"names":["BENTO_LIST_DRAGGABLE_INJECTION_KEY","__default__$1","draggableMessages","ITEM_SELECTOR","listElement","computed","props","listRef","ref","listItems","isDraggable","getListItems","child","syncListItems","watch","newElement","useMutationObserver","getItemIndex","el","getItemLabel","fallbackIndex","announceMoveAt","fromIndex","toIndex","items","announceMove","moveItemDOM","itemToMove","targetItem","emit","computedDraggableOptions","event","announcementMessage","useDraggableAnnouncement","moveItemUp","moveItemDown","moveItemTop","moveItemBottom","getDisabledMenus","useBentoDraggable","provide","__default__","messages","slots","useSlots","hasSlot","useHasSlot","itemRef","draggableContext","inject","t","useI18n","onItemClick","onItemKeydown","conditionalClasses","showDragHandle","dragHandleLabel","disabledMenus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;GAYOA,IAAA,uBAAA,8BAAA,GCqJHC,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;iBA5IAC,IAAA,gBAUAC,IAAAC,EAAA,MAAAC,EAAA,SAAA,YAAA,OAAA,IAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA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A,WAAAA,EAAA,QAAA,SACIA,EAAA,eAAA,GACAF,EAAA,OAAA;AAAA,IACJ,GAGJyB,IAAAjD,EAAA,OAAA;AAAA,MAA2C,iCAAAC,EAAA;AAAA,MACA,mCAAAA,EAAA;AAAA,MACE,sCAAAA,EAAA;AAAA,IACG,EAAA,GAGhDiD,IAAAlD,EAAA,MAAA,EAAA2C,GAAA,YAAA,KAAA,GACAQ,IAAAnD,EAAA,MAAAC,EAAA,kBAAA,SAAAA,EAAA,SAAA4C,EAAA,UAAA,CAAA,GACAO,IAAApD,EAAA,MACIC,EAAA,kBAAA,gBACIA,EAAA,iBAAA,gBAGJ0C,GAAA,iBAAAD,EAAA,KAAA,CAAuD;sOAG3D,MAAA;AACI,MAAAlB,EAAA,SAAA,IACAvB,EAAA,kBAAA,WAAA,MAAA0C,GAAA,WAAAD,EAAA,KAAA,IAAA;AAAA,IAAwF,iBAG5F,MAAA;AACI,MAAAlB,EAAA,WAAA,IACAvB,EAAA,kBAAA,aAAA,MAAA0C,GAAA,aAAAD,EAAA,KAAA,IAAA;AAAA,IAA4F,gBAGhG,MAAA;AACI,MAAAlB,EAAA,UAAA,IACAvB,EAAA,kBAAA,YAAA,MAAA0C,GAAA,YAAAD,EAAA,KAAA,IAAA;AAAA,IAA0F,mBAG9F,MAAA;AACI,MAAAlB,EAAA,aAAA,IACAvB,EAAA,kBAAA,eAAA,MAAA0C,GAAA,eAAAD,EAAA,KAAA,IAAA;AAAA,IAAgG;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"list-item.HjabBEb8.js","sources":["../../src/components/list/list.keys.ts","../../src/components/list/list.vue","../../src/components/list/components/list-item/list-item.vue"],"sourcesContent":["import type { ComputedRef } from 'vue';\nimport type { BentoDraggableDisabledMenus } from '@/components/draggable/composables/use-bento-draggable/use-bento-draggable';\n\nexport interface BentoListDraggableContext {\n isDraggable: ComputedRef<boolean>;\n moveItemUp: (element: HTMLElement | null) => void;\n moveItemDown: (element: HTMLElement | null) => void;\n moveItemTop: (element: HTMLElement | null) => void;\n moveItemBottom: (element: HTMLElement | null) => void;\n getDisabledMenus: (element: HTMLElement | null) => BentoDraggableDisabledMenus;\n}\n\nexport const BENTO_LIST_DRAGGABLE_INJECTION_KEY = Symbol('list draggable injection key');\n","<template>\n <div class=\"b-list\">\n <component :is=\"listElement\" ref=\"listRef\" v-bind=\"$attrs\" class=\"b-list__list\">\n <slot />\n </component>\n\n <div v-if=\"isDraggable\" class=\"b-list__announcement\" role=\"status\" aria-live=\"polite\">\n {{ announcementMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useMutationObserver } from '@vueuse/core';\n import { computed, provide, ref, watch } from 'vue';\n import { useBentoDraggable } from '@/components/draggable/composables/use-bento-draggable/use-bento-draggable';\n import { useDraggableAnnouncement } from '@/components/draggable/composables/use-draggable-announcement/use-draggable-announcement';\n import type { BentoDraggableOptions, BentoDraggableSortableEvent } from '@/components/draggable/draggable.types';\n import { BENTO_LIST_DRAGGABLE_INJECTION_KEY } from './list.keys';\n import type { BentoListDraggableContext } from './list.keys';\n import type { BentoListProps } from './list.types';\n\n // used for announcement composable\n import draggableMessages from '@/components/draggable/composables/use-draggable-announcement/messages.json';\n\n const ITEM_SELECTOR = '.b-list-item';\n\n const props = defineProps({\n type: { default: 'unordered' },\n draggable: { type: Boolean, default: false },\n draggableOptions: { default: () => ({}) }\n});\n\n const emit = defineEmits([\"reorder\"]);\n\n const listElement = computed(() => (props.type === 'ordered' ? 'ol' : 'ul'));\n const listRef = ref<HTMLElement | null>(null);\n const listItems = ref<Array<HTMLElement>>([]);\n const isDraggable = computed(() => props.draggable);\n\n const getListItems = (): Array<HTMLElement> =>\n listRef.value\n ? (Array.from(listRef.value.children).filter(child => child.matches(ITEM_SELECTOR)) as Array<HTMLElement>)\n : [];\n\n const syncListItems = () => {\n listItems.value = getListItems();\n };\n\n watch(\n listRef,\n newElement => {\n if (!newElement) {\n listItems.value = [];\n return;\n }\n\n syncListItems();\n },\n { immediate: true }\n );\n\n useMutationObserver(listRef, syncListItems, { childList: true });\n\n const getItemIndex = (el: HTMLElement | null) => (el ? listItems.value.indexOf(el) : -1);\n\n const getItemLabel = (el: HTMLElement | null, fallbackIndex: number) =>\n el?.querySelector('[data-list-item-label]')?.textContent?.trim() || `List item ${fallbackIndex + 1}`;\n\n const announceMoveAt = (fromIndex: number, toIndex: number) => {\n if (!isDraggable.value) {\n return;\n }\n\n const items = getListItems();\n announceMove({\n itemLabel: getItemLabel(items[toIndex] ?? null, toIndex),\n fromIndex,\n toIndex,\n total: items.length,\n announcement: props.draggableOptions?.dragAnnouncement,\n });\n };\n\n const moveItemDOM = (fromIndex: number, toIndex: number) => {\n const items = getListItems();\n const itemToMove = items[fromIndex];\n const targetItem = items[toIndex];\n\n if (fromIndex < toIndex) {\n listRef.value!.insertBefore(itemToMove, targetItem.nextSibling);\n } else {\n listRef.value!.insertBefore(itemToMove, targetItem);\n }\n\n syncListItems();\n announceMoveAt(fromIndex, toIndex);\n emit('reorder', { oldIndex: fromIndex, newIndex: toIndex });\n };\n\n const computedDraggableOptions = computed<BentoDraggableOptions>(() => ({\n ...props.draggableOptions,\n onSort: (event: BentoDraggableSortableEvent) => {\n syncListItems();\n if (event.oldIndex !== undefined && event.newIndex !== undefined) {\n announceMoveAt(event.oldIndex, event.newIndex);\n emit('reorder', { oldIndex: event.oldIndex, newIndex: event.newIndex });\n }\n props.draggableOptions?.onSort?.(event);\n },\n }));\n\n const { announcementMessage, announceMove } = useDraggableAnnouncement();\n\n const { moveItemUp, moveItemDown, moveItemTop, moveItemBottom, getDisabledMenus } = useBentoDraggable(\n listRef,\n computedDraggableOptions,\n {\n getItemCount: () => listItems.value.length,\n getItemIndex,\n onMoveItem: moveItemDOM,\n }\n );\n\n provide<BentoListDraggableContext>(BENTO_LIST_DRAGGABLE_INJECTION_KEY, {\n isDraggable,\n moveItemUp,\n moveItemDown,\n moveItemTop,\n moveItemBottom,\n getDisabledMenus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoList` renders an ordered or unordered list container for `BentoListItem` rows.\n *\n * @example\n * import { BentoList, BentoListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * />\n * <bento-list-item\n * label=\"Risk configuration\"\n * description=\"Updated yesterday\"\n * :tag=\"{ label: 'Review', variant: 'orange' }\"\n * />\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list',\n inheritAttrs: false,\n i18n: { messages: draggableMessages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list.scss\" />\n","<template>\n <li ref=\"itemRef\" class=\"b-list-item\" @click=\"onItemClick\" @keydown=\"onItemKeydown\">\n <bento-typography\n class=\"b-list-item__inner\"\n :class=\"conditionalClasses\"\n el=\"div\"\n :role=\"props.withChevron ? 'button' : undefined\"\n :tabindex=\"props.withChevron ? 0 : undefined\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-list-item__image\">\n <slot name=\"image\" />\n </div>\n\n <bento-draggable-handle\n v-if=\"showDragHandle\"\n condensed\n :label=\"dragHandleLabel\"\n :disabled-menus=\"disabledMenus\"\n :disabled=\"draggableOptions?.disabled\"\n @move-up=\"moveItemUp\"\n @move-down=\"moveItemDown\"\n @move-top=\"moveItemTop\"\n @move-bottom=\"moveItemBottom\"\n />\n\n <div v-if=\"hasSlot('start')\" class=\"b-list-item__start\">\n <slot v-if=\"hasSlot('start')\" name=\"start\" />\n </div>\n\n <div class=\"b-list-item__content\">\n <div v-if=\"hasSlot('content')\" class=\"b-list-item__label\" data-list-item-label>\n <slot name=\"content\" />\n </div>\n\n <template v-else>\n <div class=\"b-list-item__header\">\n <bento-typography\n v-if=\"props.label\"\n class=\"b-list-item__label\"\n data-list-item-label\n el=\"span\"\n stronger\n >\n {{ props.label }}\n </bento-typography>\n <bento-status\n v-if=\"props.showStatus\"\n class=\"b-list-item__status\"\n :variant=\"props.statusColor\"\n aria-hidden=\"true\"\n />\n <bento-tag v-if=\"props.tag\" v-bind=\"props.tag\" class=\"b-list-item__tag\" />\n </div>\n <span v-if=\"props.description\" class=\"b-list-item__description\">\n {{ props.description }}\n </span>\n </template>\n </div>\n\n <div v-if=\"hasSlot('end')\" class=\"b-list-item__end\">\n <slot name=\"end\" />\n </div>\n\n <chevron-right-icon v-if=\"props.withChevron\" class=\"b-list-item__chevron\" aria-hidden=\"true\" />\n </bento-typography>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, useSlots } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n import { BentoDraggableHandle } from '@/components/draggable/components/draggable-handle';\n import { BentoStatus } from '@/components/status';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { BENTO_LIST_DRAGGABLE_INJECTION_KEY } from '../../list.keys';\n import type { BentoListDraggableContext } from '../../list.keys';\n import type { BentoListItemProps } from './list-item.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const itemRef = ref<HTMLElement | null>(null);\n const draggableContext = inject<BentoListDraggableContext | null>(BENTO_LIST_DRAGGABLE_INJECTION_KEY, null);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n label: null,\n description: null,\n draggableOptions: { default: null },\n showStatus: { type: Boolean, default: false },\n statusColor: { default: 'blue' },\n tag: { default: undefined },\n withChevron: { type: Boolean, default: false },\n showTopDivider: { type: Boolean, default: false },\n showBottomDivider: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"click\", \"move-up\", \"move-down\", \"move-top\", \"move-bottom\"]);\n\n const onItemClick = (): void => {\n if (!props.withChevron) {\n return;\n }\n emit('click');\n };\n\n const onItemKeydown = (event: KeyboardEvent): void => {\n if (!props.withChevron) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n emit('click');\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-list-item__inner--clickable': props.withChevron,\n 'b-list-item__inner--top-divider': props.showTopDivider,\n 'b-list-item__inner--bottom-divider': props.showBottomDivider,\n }));\n\n const showDragHandle = computed(() => Boolean(draggableContext?.isDraggable.value));\n const dragHandleLabel = computed(() => props.draggableOptions?.label || props.label || t('listItem'));\n const disabledMenus = computed(() => {\n if (props.draggableOptions?.disabledMenus) {\n return props.draggableOptions.disabledMenus;\n }\n\n return draggableContext?.getDisabledMenus(itemRef.value);\n });\n\n const moveItemUp = () => {\n emit('move-up');\n (props.draggableOptions?.moveUp ?? (() => draggableContext?.moveItemUp(itemRef.value)))();\n };\n\n const moveItemDown = () => {\n emit('move-down');\n (props.draggableOptions?.moveDown ?? (() => draggableContext?.moveItemDown(itemRef.value)))();\n };\n\n const moveItemTop = () => {\n emit('move-top');\n (props.draggableOptions?.moveTop ?? (() => draggableContext?.moveItemTop(itemRef.value)))();\n };\n\n const moveItemBottom = () => {\n emit('move-bottom');\n (props.draggableOptions?.moveBottom ?? (() => draggableContext?.moveItemBottom(itemRef.value)))();\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoListItem` renders an item to be used inside `BentoList`.\n *\n * @example\n * import { BentoList, BentoListItem, BentoButton, BentoToggle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem, BentoButton, BentoToggle },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * >\n * <template #start>\n * <bento-toggle />\n * </template>\n * <template #end>\n * <bento-button variant=\"secondary\">Edit</bento-button>\n * </template>\n * </bento-list-item>\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list-item',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list-item.scss\" />\n"],"names":["BENTO_LIST_DRAGGABLE_INJECTION_KEY","__default__$1","draggableMessages","ITEM_SELECTOR","listElement","computed","props","listRef","ref","listItems","isDraggable","getListItems","child","syncListItems","watch","newElement","useMutationObserver","getItemIndex","el","getItemLabel","fallbackIndex","announceMoveAt","fromIndex","toIndex","items","announceMove","moveItemDOM","itemToMove","targetItem","emit","computedDraggableOptions","event","announcementMessage","useDraggableAnnouncement","moveItemUp","moveItemDown","moveItemTop","moveItemBottom","getDisabledMenus","useBentoDraggable","provide","__default__","messages","slots","useSlots","hasSlot","useHasSlot","itemRef","draggableContext","inject","t","useI18n","onItemClick","onItemKeydown","conditionalClasses","showDragHandle","dragHandleLabel","disabledMenus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;GAYOA,IAAA,uBAAA,8BAAA,GCqJHC,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;iBA5IAC,IAAA,gBAUAC,IAAAC,EAAA,MAAAC,EAAA,SAAA,YAAA,OAAA,IAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAL,EAAA,MAAAC,EAAA,SAAA,GAEAK,IAAA,MAAAJ,EAAA,QAAA,MAAA,KAAAA,EAAA,MAAA,QAAA,EAAA,OAAA,CAAAK,MAAAA,EAAA,QAAAT,CAAA,CAAA,IAAA,CAAA,GAKAU,IAAA,MAAA;AACI,MAAAJ,EAAA,QAAAE,EAAA;AAAA,IAA+B;AAGnC,IAAAG;AAAA,MAAAP;AAAA,MACI,CAAAQ,MAAA;AAEI,YAAA,CAAAA,GAAA;AACI,UAAAN,EAAA,QAAA,CAAA;AACA;AAAA,QAAA;AAGJ,QAAAI,EAAA;AAAA,MAAc;AAAA,MAClB,EAAA,WAAA,GAAA;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,KAAA,CAAuD;sOAG3D,MAAA;AACI,MAAAlB,EAAA,SAAA,IACAvB,EAAA,kBAAA,WAAA,MAAA0C,GAAA,WAAAD,EAAA,KAAA,IAAA;AAAA,IAAwF,iBAG5F,MAAA;AACI,MAAAlB,EAAA,WAAA,IACAvB,EAAA,kBAAA,aAAA,MAAA0C,GAAA,aAAAD,EAAA,KAAA,IAAA;AAAA,IAA4F,gBAGhG,MAAA;AACI,MAAAlB,EAAA,UAAA,IACAvB,EAAA,kBAAA,YAAA,MAAA0C,GAAA,YAAAD,EAAA,KAAA,IAAA;AAAA,IAA0F,mBAG9F,MAAA;AACI,MAAAlB,EAAA,aAAA,IACAvB,EAAA,kBAAA,eAAA,MAAA0C,GAAA,eAAAD,EAAA,KAAA,IAAA;AAAA,IAAgG;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as e } from "vue";
|
|
2
|
-
import { B as s } from "./tag.
|
|
2
|
+
import { B as s } from "./tag.Dz1FQSZb.js";
|
|
3
3
|
import { B as r } from "./typography.D1OZJbEa.js";
|
|
4
4
|
import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/listbox-option-tag.css";
|
|
@@ -41,4 +41,4 @@ const v = m.exports;
|
|
|
41
41
|
export {
|
|
42
42
|
v as L
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=listbox-option-tag.
|
|
44
|
+
//# sourceMappingURL=listbox-option-tag.DhNxvqRO.js.map
|
package/dist/chunks/{listbox-option-tag.B08qQaBW.js.map → listbox-option-tag.DhNxvqRO.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-option-tag.
|
|
1
|
+
{"version":3,"file":"listbox-option-tag.DhNxvqRO.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as T, useSlots as x, inject as L, onMounted as A, useListeners as h, getCurrentInstance as P, toRefs as w, ref as i, computed as J, onUnmounted as U, watch as K, provide as f } from "vue";
|
|
2
2
|
import "./index.Cl4_42j5.js";
|
|
3
|
-
import { B as Y } from "./toast.
|
|
3
|
+
import { B as Y } from "./toast.CO6ByH3n.js";
|
|
4
4
|
import { B as j } from "./focus-trap.fd6_d2EW.js";
|
|
5
|
-
import { B as $ } from "./button.
|
|
5
|
+
import { B as $ } from "./button.DII5Ifwa.js";
|
|
6
6
|
import { B as z } from "./typography.D1OZJbEa.js";
|
|
7
7
|
import { u as N } from "./use-has-slot.C9lQZ6nz.js";
|
|
8
8
|
import { u as H } from "./index.CPOlyau9.js";
|
|
9
|
-
import { i as F, j as D, B as X, k as q } from "./button-actions.
|
|
9
|
+
import { i as F, j as D, B as X, k as q } from "./button-actions.bkcLUE1G.js";
|
|
10
10
|
import { C as Q } from "./cross.szJ_ZUTI.js";
|
|
11
|
-
import { D as W } from "./dialog-page.
|
|
11
|
+
import { D as W } from "./dialog-page.Bct3zOQO.js";
|
|
12
12
|
import { n as M } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
13
13
|
import { g as O } from "./generate-uid.DBWe4g6T.js";
|
|
14
14
|
import { B as Z, D as V, a as ee } from "./dialog-page.keys.Dym9e6k3.js";
|
|
@@ -221,11 +221,11 @@ var de = function() {
|
|
|
221
221
|
pe,
|
|
222
222
|
!1,
|
|
223
223
|
null,
|
|
224
|
-
"
|
|
224
|
+
"1b7c2e64"
|
|
225
225
|
);
|
|
226
226
|
const Oe = _e.exports;
|
|
227
227
|
export {
|
|
228
228
|
Oe as B,
|
|
229
229
|
re as a
|
|
230
230
|
};
|
|
231
|
-
//# sourceMappingURL=modal-fullscreen.
|
|
231
|
+
//# sourceMappingURL=modal-fullscreen.Bi1bQs4Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-fullscreen.Bi1bQs4Z.js","sources":["../../src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n :id=\"computedTitleId\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits([\"close\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value && modal.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","props","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","emit","onMounted","useListeners","useListeners$1","getCurrentInstance","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAuLIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzHA,EAAA,EAAA,IAAAC,EAAA,GA6DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAAC,GAAA,MAAA,GACAC,IAAAC,EAAA,WAAAJ,GAEAK,IAAAJ,EAAAK,GAAA,MAAA,GAEAC,IAAA,MAAA;AACI,MAAAC,EAAA,OAAA,GACAH,IAAA;AAAA,IAAa;AAGjB,WAAAI,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,0EAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;AClID,SAAAM,KAAA;AAEH,SAAA,CAAA,UAAA,CAAAC,KAAA,CAAAC,IACI,CAAA,IAGJD,IACIA,EAAA,IAGJC,EAAA,GACA,OAAA,cAAA,CAAA;AACJ;ACkPI,MAAAC,KAAA,CAAA;;;;;;;;;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