@adyen/bento-vue2 1.89.2 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/index.d.ts +381 -118
- 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/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/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.D0WVCLec.js +145 -0
- package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
- package/dist/chunks/action-bar.Dj830k6L.js +334 -0
- package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.Dj830k6L.js.map} +1 -1
- package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
- package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
- package/dist/chunks/ai-tag.AyG2UWCB.js +110 -0
- package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
- package/dist/chunks/alert.CXRb-Smf.js +160 -0
- package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
- package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
- package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.C52VMtnd.js} +104 -67
- package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.C52VMtnd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
- package/dist/chunks/{button-actions.BLk114As.js → button-actions.Bdbu0bvt.js} +222 -148
- package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
- package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
- package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
- package/dist/chunks/{calendar.CXKhBF2f.js → calendar.CqsfThnC.js} +438 -346
- package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
- package/dist/chunks/card.8z7UQeVK.js +165 -0
- package/dist/chunks/{card.GjhsXOT0.js.map → card.8z7UQeVK.js.map} +1 -1
- package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.Dur2Edtw.js} +4 -4
- package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
- package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.vNjt6QDJ.js} +93 -56
- package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
- package/dist/chunks/chip.BFY_-VCz.js +84 -0
- package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
- package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
- package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.BVpFBhKq.js} +133 -76
- package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
- package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/copy.qqGYFbKJ.js +133 -0
- package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
- package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
- package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
- package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
- package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
- package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.DNxNVV44.js} +3 -3
- package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
- package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.DL2_sik5.js} +3 -3
- package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
- package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.BFv1zr6g.js} +4 -4
- package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
- package/dist/chunks/data-grid.ZHY5EzP3.js +4071 -0
- package/dist/chunks/data-grid.ZHY5EzP3.js.map +1 -0
- package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
- package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
- package/dist/chunks/date-range-picker.LCWVAa5R.js +1089 -0
- package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
- package/dist/chunks/dialog-page.EdejG53a.js +143 -0
- package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
- package/dist/chunks/draggable-handle.Ba28eM8o.js +245 -0
- package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
- package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.B61hPq5n.js} +5 -5
- package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
- package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
- package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
- package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
- package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
- package/dist/chunks/error-message.CyERcfdt.js +72 -0
- package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.DeWmLpfp.js} +751 -469
- package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
- package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.Bd4ghW_B.js} +1596 -1039
- package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
- package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
- package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
- package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CvUaoMzj.js} +3 -3
- package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
- package/dist/chunks/form-layout-title.DzGajv4U.js +248 -0
- package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
- package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.AXUGoqDd.js} +127 -73
- package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.AXUGoqDd.js.map} +1 -1
- package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.Ba4dswJF.js} +1121 -680
- package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
- package/dist/chunks/{header.DkC-KKWa.js → header.C7B7RBib.js} +3 -3
- package/dist/chunks/{header.DkC-KKWa.js.map → header.C7B7RBib.js.map} +1 -1
- package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
- package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
- package/dist/chunks/input-field-password.BNAtIn_D.js +381 -0
- package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.CEYx1s4b.js} +98 -71
- package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
- package/dist/chunks/input-field.Dh5W0Az-.js +211 -0
- package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
- package/dist/chunks/input-time.BLuMfakv.js +135 -0
- package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
- package/dist/chunks/inspector.BzBPlz-5.js +172 -0
- package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
- package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
- package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
- package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
- package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.DTvg2NLk.js} +63 -36
- package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
- package/dist/chunks/{modal.o0KddMiG.js → modal.D_TcWTkf.js} +63 -36
- package/dist/chunks/{modal.o0KddMiG.js.map → modal.D_TcWTkf.js.map} +1 -1
- package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
- package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
- package/dist/chunks/{pagination.ZISqB4M_.js → pagination.D6BxMw5L.js} +221 -99
- package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.D6BxMw5L.js.map} +1 -1
- package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
- package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
- package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.Bb-L-0io.js} +4 -4
- package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.Bb-L-0io.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.Dtdfh-0V.js} +1782 -1731
- package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
- package/dist/chunks/search-bar.MVJS9-Mh.js +126 -0
- package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
- package/dist/chunks/secondary-nav.C-nPZR-2.js +226 -0
- package/dist/chunks/secondary-nav.C-nPZR-2.js.map +1 -0
- package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
- package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
- package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.CLJPaknG.js} +3 -3
- package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.BTRfwGiS.js} +66 -39
- package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
- package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
- package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
- package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.DUIqCmwg.js} +5 -5
- package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
- package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
- package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
- package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
- package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
- package/dist/chunks/textarea.CJS-1I41.js +219 -0
- package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.CJS-1I41.js.map} +1 -1
- package/dist/chunks/timeline-item.BOUWkLi1.js +322 -0
- package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
- package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
- package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
- package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
- package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
- package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.CZt_mcuT.js} +190 -103
- package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.CZt_mcuT.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.BJbWbkEQ.js} +553 -417
- package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
- package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
- package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
- package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- 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/draggable.js +1396 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +11 -12
- package/dist/dropdown.js.map +1 -1
- 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 +280 -275
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +26 -25
- package/dist/internal.js.map +1 -1
- 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/pagination.js +1 -1
- package/dist/popover.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/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +297 -4
- package/package.json +10 -15
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
- package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
- package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
- package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
- package/dist/chunks/calendar.CXKhBF2f.js.map +0 -1
- package/dist/chunks/card.GjhsXOT0.js +0 -128
- package/dist/chunks/chip.DTpENaGC.js +0 -57
- package/dist/chunks/copy.BVGQcf22.js +0 -86
- package/dist/chunks/country.types.DxKjyd0S.js +0 -20
- package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
- package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
- package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
- package/dist/chunks/date-picker.CnazYcSX.js +0 -155
- package/dist/chunks/date-picker.CnazYcSX.js.map +0 -1
- package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
- package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dialog-page.oyG153fC.js +0 -116
- package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js +0 -337
- package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js.map +0 -1
- package/dist/chunks/dropdown.Ct7uhPr6.js +0 -696
- package/dist/chunks/dropdown.Ct7uhPr6.js.map +0 -1
- package/dist/chunks/error-message.RxdStT3S.js +0 -106
- package/dist/chunks/error-message.RxdStT3S.js.map +0 -1
- package/dist/chunks/filter-bar.zD_ctViU.js.map +0 -1
- package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
- package/dist/chunks/form-layout-title.Bw7VgOO5.js +0 -210
- package/dist/chunks/form-layout-title.Bw7VgOO5.js.map +0 -1
- package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
- package/dist/chunks/input-field.m1PMwa4C.js +0 -170
- package/dist/chunks/input-field.m1PMwa4C.js.map +0 -1
- package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
- package/dist/chunks/search-bar.DPjYDhja.js +0 -89
- package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
- package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
- package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
- package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
- package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DqX2qsMC.js.map +0 -1
- package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
- package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
- package/dist/draggable-handle.js +0 -149
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { ref as c, computed as p, defineComponent as Q, toRef as F, watch as V, nextTick as X } from "vue";
|
|
2
|
-
import { g as Z, s as Y, b as $ } from "./calendar.CXKhBF2f.js";
|
|
3
|
-
import { h as ee } from "./button-actions.BLk114As.js";
|
|
4
|
-
import { d as ae, B as te } from "./typography.C8lPlsbD.js";
|
|
5
|
-
import { D as re } from "./dropdown-default-textbox.Dvzg0StF.js";
|
|
6
|
-
import { d as le } from "./debounce.DUTu11PS.js";
|
|
7
|
-
import { g as D } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
-
import { u as L } from "./index.B6WW_F-J.js";
|
|
9
|
-
import { u as oe } from "./form-field.D_2g7vaP.js";
|
|
10
|
-
import { u as N, a as ne } from "./use-date-input-formatter.BYaTO3vz.js";
|
|
11
|
-
import { u as ie } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
12
|
-
import "./index.Cl4_42j5.js";
|
|
13
|
-
import { B as se } from "./directive.rXUeDb8p.js";
|
|
14
|
-
import { F as de, E as ue } from "./error-message.RxdStT3S.js";
|
|
15
|
-
import { n as ce } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
|
-
import "../assets/date-picker.css";
|
|
17
|
-
const pe = {
|
|
18
|
-
"en-US": { datePicker: "Date picker", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
|
|
19
|
-
"ja-JP": { datePicker: "日付ピッカー", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
|
|
20
|
-
"pt-BR": { datePicker: "Seletor de datas", provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" }
|
|
21
|
-
}, fe = ({
|
|
22
|
-
datePickerValue: d,
|
|
23
|
-
isDateIncorrect: t,
|
|
24
|
-
isMonthVariant: a,
|
|
25
|
-
placeholder: e
|
|
26
|
-
}) => {
|
|
27
|
-
var b;
|
|
28
|
-
const { locale: l, t: y } = L(), { formatDate: g } = N(), u = c((b = d.value) == null ? void 0 : b.toDateString());
|
|
29
|
-
return {
|
|
30
|
-
// Values
|
|
31
|
-
dateDisplayValue: p(() => {
|
|
32
|
-
if (t.value)
|
|
33
|
-
return u.value;
|
|
34
|
-
if (!d.value)
|
|
35
|
-
return (e == null ? void 0 : e.value) || y("selectDate");
|
|
36
|
-
const o = a != null && a.value ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
37
|
-
return Z(l.value, o).format(d.value);
|
|
38
|
-
}),
|
|
39
|
-
textInputValue: u,
|
|
40
|
-
// Methods
|
|
41
|
-
formatTextInputDisplayValue: (o = d.value) => {
|
|
42
|
-
if (t.value)
|
|
43
|
-
return;
|
|
44
|
-
if (!o) {
|
|
45
|
-
u.value = "";
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const k = a != null && a.value ? Y(o) : o;
|
|
49
|
-
u.value = g(k);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}, me = {
|
|
53
|
-
i18n: { messages: pe },
|
|
54
|
-
name: "bento-date-picker",
|
|
55
|
-
model: { prop: "modelValue" }
|
|
56
|
-
}, ve = /* @__PURE__ */ Q({
|
|
57
|
-
...me,
|
|
58
|
-
props: {
|
|
59
|
-
description: { default: void 0 },
|
|
60
|
-
disabled: { type: Boolean, default: !1 },
|
|
61
|
-
errorMessage: { default: null },
|
|
62
|
-
label: { default: void 0 },
|
|
63
|
-
optional: { type: Boolean, default: !1 },
|
|
64
|
-
placeholder: { default: null },
|
|
65
|
-
readonly: { type: Boolean, default: !1 },
|
|
66
|
-
required: { type: Boolean, default: !1 },
|
|
67
|
-
tooltipText: { default: null },
|
|
68
|
-
defaultDisplayMonth: { default: null },
|
|
69
|
-
firstDayOfWeek: { default: void 0 },
|
|
70
|
-
isDateDisabled: { default: void 0 },
|
|
71
|
-
min: { default: null },
|
|
72
|
-
max: { default: null },
|
|
73
|
-
modelValue: { default: null },
|
|
74
|
-
value: { default: null },
|
|
75
|
-
variant: { default: void 0 }
|
|
76
|
-
},
|
|
77
|
-
emits: ["update:model-value", "input"],
|
|
78
|
-
setup(d, { emit: t }) {
|
|
79
|
-
const a = d, e = 1e3, { t: l } = L(), y = D("bento-date-picker-container"), g = D("bento-date-picker-label"), u = D("bento-date-picker-description"), C = D("bento-date-picker-error"), I = D("bento-date-picker-date-error"), b = p(() => a.label || l("datePicker", { name: y })), o = c(null), k = c(null), n = c(!1), i = c(!1), x = c(void 0), f = c(a.modelValue), { isReadOnly: q } = ie(F(a, "readonly")), { emitValue: m } = oe(t), { resolvedFirstDayOfWeek: W } = ne(F(a, "firstDayOfWeek")), { isFormatValid: O, parseDate: _, onKeyDown: A, autoFormat: S } = N(), U = p(() => ({
|
|
80
|
-
initialFocus: x.value,
|
|
81
|
-
additionalContainers: [k.value.$el]
|
|
82
|
-
}));
|
|
83
|
-
V(
|
|
84
|
-
() => a.disabled,
|
|
85
|
-
(r) => {
|
|
86
|
-
r && i.value && (i.value = !1);
|
|
87
|
-
}
|
|
88
|
-
), V(
|
|
89
|
-
[() => a.value, () => a.modelValue],
|
|
90
|
-
([r, v]) => {
|
|
91
|
-
r && ae(
|
|
92
|
-
'BentoDatePicker "value" property',
|
|
93
|
-
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
94
|
-
"2.0.0"
|
|
95
|
-
), f.value = v ?? r;
|
|
96
|
-
},
|
|
97
|
-
{ immediate: !0 }
|
|
98
|
-
);
|
|
99
|
-
const T = p(() => a.variant === "month"), { dateDisplayValue: K, textInputValue: s, formatTextInputDisplayValue: P } = fe({
|
|
100
|
-
datePickerValue: f,
|
|
101
|
-
isDateIncorrect: n,
|
|
102
|
-
isMonthVariant: T,
|
|
103
|
-
placeholder: F(a, "placeholder")
|
|
104
|
-
}), B = p(() => a.isDateDisabled && s.value && O(s.value) && a.isDateDisabled(_(s.value)) && !i.value ? l("selectedDateIsNotAvailable") : n.value ? l("provideDateInAFormat") : null), j = p(() => ({
|
|
105
|
-
"b-date-picker__description--error": a.errorMessage || B.value
|
|
106
|
-
})), z = p(
|
|
107
|
-
() => `${a.description ? u : ""} ${a.errorMessage ? C : ""} ${B.value ? I : ""}`.trim() || null
|
|
108
|
-
), R = (r) => a.min && r <= a.min || a.max && r >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(r) : !0, w = () => {
|
|
109
|
-
i.value = !1;
|
|
110
|
-
}, M = () => {
|
|
111
|
-
i.value = !0, P();
|
|
112
|
-
}, J = (r) => {
|
|
113
|
-
n.value = !1, w(), m(r);
|
|
114
|
-
}, G = async () => {
|
|
115
|
-
n.value && (n.value = !1, s.value = null), m(null);
|
|
116
|
-
}, H = (r) => {
|
|
117
|
-
A(r);
|
|
118
|
-
}, E = (r) => {
|
|
119
|
-
if (r.length < 10)
|
|
120
|
-
return;
|
|
121
|
-
O(r) && R(_(r)) ? (n.value = !1, m(_(r))) : r && (n.value = !0, m(null));
|
|
122
|
-
}, h = le(E, e);
|
|
123
|
-
return { __sfc: !0, DEBOUNCE_TIME: e, props: a, emit: t, t: l, datePickerContainerId: y, labelId: g, descriptionId: u, errorId: C, dateErrorId: I, popoverAriaLabel: b, calendarContainerRef: o, inputContainerRef: k, isDateIncorrect: n, isDatePickerOpen: i, initialFocusOnDatePickerOpen: x, internalModelValue: f, isReadOnly: q, emitValue: m, resolvedFirstDayOfWeek: W, isFormatValid: O, parseDate: _, onKeyDown: A, autoFormat: S, computedTrapAllOptions: U, isMonthVariant: T, dateDisplayValue: K, textInputValue: s, formatTextInputDisplayValue: P, dateErrorText: B, descriptionConditionalClasses: j, ariaDescribedBy: z, isDateEnabled: R, closeDatePicker: w, openDatePicker: M, onDateSelected: J, clearDatePickerValue: G, onDateKeyDown: H, validateDate: E, validateDateDebounced: h, onDateInputChange: (r) => {
|
|
124
|
-
s.value = S(r), i.value ? h(s.value) : E(s.value);
|
|
125
|
-
}, onSpaceBarOrEnter: async (r) => {
|
|
126
|
-
var v;
|
|
127
|
-
i.value || (r.preventDefault(), M(), await X(), f.value || (P(/* @__PURE__ */ new Date()), m(/* @__PURE__ */ new Date())), x.value = ((v = o.value) == null ? void 0 : v.$refs.calendarRef[0].focusOnDate(
|
|
128
|
-
a.variant === "month" ? Y(f.value) : f.value,
|
|
129
|
-
!0
|
|
130
|
-
)) ?? void 0);
|
|
131
|
-
}, BentoPopover: ee, BentoTypography: te, Calendar: $, ErrorMessage: ue, FieldLabel: de, DropdownInputDefault: re, vBentoClickOutsideDirective: se };
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
var De = function() {
|
|
135
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
136
|
-
return a("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDatePicker, expression: "closeDatePicker" }], staticClass: "b-date-picker", on: { "!keydown": [function(l) {
|
|
137
|
-
return !l.type.indexOf("key") && t._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
138
|
-
}, function(l) {
|
|
139
|
-
return !l.type.indexOf("key") && t._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
140
|
-
}] } }, [t.label ? a(e.FieldLabel, { attrs: { id: e.labelId, label: t.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), a("div", [a(e.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDatePickerOpen, "aria-labelledby": t.label ? e.labelId : null, "aria-label": t.label ? null : e.popoverAriaLabel, "aria-describedby": e.ariaDescribedBy, "aria-required": t.required, disabled: t.disabled, "dynamic-filtering": "", "is-invalid": !!t.errorMessage || !!e.dateErrorText, open: e.isDatePickerOpen, value: e.textInputValue, "display-value": e.dateDisplayValue, "debounce-time": 0, readonly: e.isReadOnly }, on: { input: e.onDateInputChange, open: e.openDatePicker, keydown: e.onDateKeyDown, clear: e.clearDatePickerValue, close: e.closeDatePicker } })], 1), e.dateErrorText ? a(e.ErrorMessage, { staticClass: "b-date-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.dateErrorText } }) : t._e(), t.errorMessage ? a(e.ErrorMessage, { staticClass: "b-date-picker__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description ? a(e.BentoTypography, { staticClass: "b-date-picker__description", class: e.descriptionConditionalClasses, attrs: { el: "span" } }, [t._v(" " + t._s(t.description) + " ")]) : t._e(), e.inputContainerRef ? a(e.BentoPopover, { staticClass: "b-date-picker__container", attrs: { id: e.datePickerContainerId, role: "dialog", open: e.isDatePickerOpen, "target-element": e.inputContainerRef, "aria-label": e.popoverAriaLabel, "aria-modal": !0, position: "bottom-start", "fit-content": "", "trap-all": "", "trap-all-options": e.computedTrapAllOptions }, nativeOn: { keydown: function(l) {
|
|
141
|
-
return !l.type.indexOf("key") && t._k(l.keyCode, "esc", 27, l.key, ["Esc", "Escape"]) ? null : e.closeDatePicker.apply(null, arguments);
|
|
142
|
-
} } }, [a(e.Calendar, { ref: "calendarContainerRef", attrs: { "default-display-month": t.defaultDisplayMonth, "first-day-of-week": e.resolvedFirstDayOfWeek, "is-date-disabled": t.isDateDisabled, "number-of-months": 1, value: e.internalModelValue, min: t.min, max: t.max, variant: t.variant }, on: { input: e.onDateSelected } })], 1) : t._e()], 1);
|
|
143
|
-
}, ye = [], be = /* @__PURE__ */ ce(
|
|
144
|
-
ve,
|
|
145
|
-
De,
|
|
146
|
-
ye,
|
|
147
|
-
!1,
|
|
148
|
-
null,
|
|
149
|
-
"307fb52e"
|
|
150
|
-
);
|
|
151
|
-
const he = be.exports;
|
|
152
|
-
export {
|
|
153
|
-
he as B
|
|
154
|
-
};
|
|
155
|
-
//# sourceMappingURL=date-picker.CnazYcSX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.CnazYcSX.js","sources":["../../src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../src/components/date-picker/date-picker.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { type UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { getDateTimeFormatter } from '@/utils/ts/format-date/format-date';\nimport { useDateInputFormatter } from '@/composables/use-date-input-formatter/use-date-input-formatter';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param option.isDateIncorrect Indicates if the date is correct or not\n * @param option.isMonthVariant Indicates if the date picker has variant \"month\"\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({\n datePickerValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const { formatDate } = useDateInputFormatter();\n\n const textInputValue = ref(datePickerValue.value?.toDateString());\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return placeholder?.value || (t('selectDate') as string);\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" or \"MMMM yyyy (June 2023)\"\n // if there's a valid date selected\n const dateFormatOptions: Intl.DateTimeFormatOptions = isMonthVariant?.value\n ? { month: 'long', year: 'numeric' }\n : { day: 'numeric', month: 'short', year: 'numeric' };\n\n return getDateTimeFormatter(locale.value, dateFormatOptions).format(datePickerValue.value);\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the current format and sets it as \"formatTextInputDisplayValue\" value\n * @param dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n if (!dateToFormat) {\n textInputValue.value = '';\n return;\n }\n\n const date = isMonthVariant?.value ? startOfMonth(dateToFormat) : dateToFormat;\n textInputValue.value = formatDate(date);\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-label=\"label ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n trap-all\n :trap-all-options=\"computedTrapAllOptions\"\n @keydown.esc.native=\"closeDatePicker\"\n >\n <calendar\n ref=\"calendarContainerRef\"\n :default-display-month=\"defaultDisplayMonth\"\n :first-day-of-week=\"resolvedFirstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalModelValue\"\n :min=\"min\"\n :max=\"max\"\n :variant=\"variant\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, toRef, watch } from 'vue';\n import { startOfMonth } from 'date-fns/startOfMonth';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, type CalendarSingleDateValue, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useDateInputFormatter, useFirstDayOfWeek, useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { type BentoDatePickerEmits, type BentoDatePickerProps } from './date-picker.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: undefined },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n defaultDisplayMonth: { default: null },\n firstDayOfWeek: { default: undefined },\n isDateDisabled: { default: undefined },\n min: { default: null },\n max: { default: null },\n modelValue: { default: null },\n value: { default: null },\n variant: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const initialFocusOnDatePickerOpen = ref(undefined);\n const internalModelValue = ref<CalendarSingleDateValue | null>(props.modelValue); // to be removed when `props.value` is removed\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits<CalendarSingleDateValue>(emit);\n const { resolvedFirstDayOfWeek } = useFirstDayOfWeek(toRef(props, 'firstDayOfWeek'));\n const { isFormatValid, parseDate, onKeyDown, autoFormat } = useDateInputFormatter();\n\n const computedTrapAllOptions = computed(() => ({\n initialFocus: initialFocusOnDatePickerOpen.value,\n additionalContainers: [inputContainerRef.value.$el],\n }));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n watch(\n [() => props.value, () => props.modelValue],\n ([newValue, newModelValue]) => {\n if (newValue) {\n deprecate(\n 'BentoDatePicker \"value\" property',\n `The use of \"value\" prop in \"BentoDatePicker\" is no longer supported. Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n internalModelValue.value = newModelValue ?? newValue;\n },\n { immediate: true }\n );\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: internalModelValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n textInputValue.value &&\n isFormatValid(textInputValue.value) &&\n props.isDateDisabled(parseDate(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emitValue(selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emitValue(null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n onKeyDown(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n const isValidDate = isFormatValid(stringDate) && isDateEnabled(parseDate(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emitValue(parseDate(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emitValue(null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = autoFormat(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!internalModelValue.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emitValue(new Date());\n }\n\n // Set initial focus\n initialFocusOnDatePickerOpen.value =\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(\n props.variant === 'month' ? startOfMonth(internalModelValue.value) : internalModelValue.value,\n true\n ) ?? undefined;\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-picker',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","isMonthVariant","placeholder","locale","t","useI18n","formatDate","useDateInputFormatter","textInputValue","ref","_a","computed","dateFormatOptions","getDateTimeFormatter","dateToFormat","date","startOfMonth","__default__","messages","DEBOUNCE_TIME","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","props","calendarContainerRef","inputContainerRef","isDatePickerOpen","initialFocusOnDatePickerOpen","internalModelValue","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","resolvedFirstDayOfWeek","useFirstDayOfWeek","isFormatValid","parseDate","onKeyDown","autoFormat","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDate","stringDate","validateDateDebounced","debounce","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;GAgBOA,KAAA,CAAA;AAAA,EAAmE,iBAAAC;AAAA,EACtE,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAEJ,MAAA;;AACI,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,GAAAC,IAAAX,EAAA,UAAA,gBAAAW,EAAA,cAAA;AAyCA,SAAA;AAAA;AAAA,IAAO,kBAvCPC,EAAA,MAAA;AAEI,UAAAX,EAAA;AACI,eAAAQ,EAAA;AAIJ,UAAA,CAAAT,EAAA;AACI,gBAAAG,KAAA,gBAAAA,EAAA,UAAAE,EAAA,YAAA;AAKJ,YAAAQ,IAAAX,KAAA,QAAAA,EAAA,QAAA,EAAA,OAAA,QAAA,MAAA,UAAA,IAAA,EAAA,KAAA,WAAA,OAAA,SAAA,MAAA,UAAA;AAIA,aAAAY,EAAAV,EAAA,OAAAS,CAAA,EAAA,OAAAb,EAAA,KAAA;AAAA,IAAyF,CAAA;AAAA,IAwBzF,gBAAAS;AAAA;AAAA,IACA,6BAlBJ,CAAAM,IAAAf,EAAA,UAAA;AAEI,UAAAC,EAAA;AACI;AAGJ,UAAA,CAAAc,GAAA;AACI,QAAAN,EAAA,QAAA;AACA;AAAA,MAAA;AAGJ,YAAAO,IAAAd,KAAA,QAAAA,EAAA,QAAAe,EAAAF,CAAA,IAAAA;AACA,MAAAN,EAAA,QAAAF,EAAAS,CAAA;AAAA,IAAsC;AAAA,EAStC;AAER,GCgTIE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,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