@adyen/bento-vue2 1.84.2 → 1.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +6 -0
- package/dist/@types/index.d.ts +480 -268
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +5 -0
- package/dist/ai-tag.js.map +1 -0
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +5 -0
- package/dist/anchor-scroller.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-tag.css +1 -0
- package/dist/assets/anchor-scroller.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chip.js +1 -1
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
- package/dist/chunks/{accordion-item.DeV8s0oW.js → accordion-item.Cv6kG2N3.js} +2 -2
- package/dist/chunks/{accordion-item.DeV8s0oW.js.map → accordion-item.Cv6kG2N3.js.map} +1 -1
- package/dist/chunks/action-bar.Dnkt4yn7.js +163 -0
- package/dist/chunks/action-bar.Dnkt4yn7.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
- package/dist/chunks/ai-button.BTi18ipD.js +50 -0
- package/dist/chunks/ai-button.BTi18ipD.js.map +1 -0
- package/dist/chunks/ai-tag.s8TECgn_.js +82 -0
- package/dist/chunks/ai-tag.s8TECgn_.js.map +1 -0
- package/dist/chunks/{alert.B3Pdp02a.js → alert.BESCd8iS.js} +5 -5
- package/dist/chunks/{alert.B3Pdp02a.js.map → alert.BESCd8iS.js.map} +1 -1
- package/dist/chunks/anchor-scroller.3_idPubO.js +178 -0
- package/dist/chunks/anchor-scroller.3_idPubO.js.map +1 -0
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/arrow-left.CRREfabP.js +24 -0
- package/dist/chunks/arrow-left.CRREfabP.js.map +1 -0
- package/dist/chunks/arrow-right.Dn3AYpUP.js +24 -0
- package/dist/chunks/arrow-right.Dn3AYpUP.js.map +1 -0
- package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js +24 -0
- package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js.map +1 -0
- package/dist/chunks/{avatar.CUCH3CTc.js → avatar.rwWPYJnt.js} +2 -2
- package/dist/chunks/{avatar.CUCH3CTc.js.map → avatar.rwWPYJnt.js.map} +1 -1
- package/dist/chunks/{base-button.IN4bpcds.js → base-button.BPRPrO0p.js} +2 -2
- package/dist/chunks/{base-button.IN4bpcds.js.map → base-button.BPRPrO0p.js.map} +1 -1
- package/dist/chunks/{base-modal.KYkLKswF.js → base-modal.09nAcnF_.js} +41 -41
- package/dist/chunks/{base-modal.KYkLKswF.js.map → base-modal.09nAcnF_.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js → button-actions-with-menu.C8tSTxrm.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js.map → button-actions-with-menu.C8tSTxrm.js.map} +1 -1
- package/dist/chunks/{button-actions.D9n7MxWe.js → button-actions.VSc47LLH.js} +8 -8
- package/dist/chunks/{button-actions.D9n7MxWe.js.map → button-actions.VSc47LLH.js.map} +1 -1
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.DIU6m9wD.js → button.Ctj3rkxw.js} +5 -5
- package/dist/chunks/{button.DIU6m9wD.js.map → button.Ctj3rkxw.js.map} +1 -1
- package/dist/chunks/{calendar.C8DpZ4Sr.js → calendar.DiXkjQDP.js} +100 -94
- package/dist/chunks/{calendar.C8DpZ4Sr.js.map → calendar.DiXkjQDP.js.map} +1 -1
- package/dist/chunks/{card.CLX0RGG6.js → card.BdjdBN36.js} +3 -3
- package/dist/chunks/{card.CLX0RGG6.js.map → card.BdjdBN36.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BCnhjQie.js → checkbox-group.d6VQvZL7.js} +5 -5
- package/dist/chunks/{checkbox-group.BCnhjQie.js.map → checkbox-group.d6VQvZL7.js.map} +1 -1
- package/dist/chunks/{checkbox.CU5ierOq.js → checkbox.ClFNfhNh.js} +4 -4
- package/dist/chunks/{checkbox.CU5ierOq.js.map → checkbox.ClFNfhNh.js.map} +1 -1
- package/dist/chunks/{chip.C6DRfdJ8.js → chip.D_XQ8ReC.js} +3 -3
- package/dist/chunks/{chip.C6DRfdJ8.js.map → chip.D_XQ8ReC.js.map} +1 -1
- package/dist/chunks/{click-outside.C1Ud8AA2.js → click-outside.CDz_x8mN.js} +2 -2
- package/dist/chunks/{click-outside.C1Ud8AA2.js.map → click-outside.CDz_x8mN.js.map} +1 -1
- package/dist/chunks/{code-snippet.9MwDHp50.js → code-snippet.DBNJgt1j.js} +11 -11
- package/dist/chunks/{code-snippet.9MwDHp50.js.map → code-snippet.DBNJgt1j.js.map} +1 -1
- package/dist/chunks/{codemirror.Cy7iSLbd.js → codemirror.D2BAltnu.js} +3688 -3673
- package/dist/chunks/codemirror.D2BAltnu.js.map +1 -0
- package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
- package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
- package/dist/chunks/{controls-group.D4eW9DtP.js → controls-group.HUWlAOhG.js} +3 -3
- package/dist/chunks/{controls-group.D4eW9DtP.js.map → controls-group.HUWlAOhG.js.map} +1 -1
- package/dist/chunks/{copy.C0q7xgXs.js → copy.BXykYfg0.js} +7 -7
- package/dist/chunks/{copy.C0q7xgXs.js.map → copy.BXykYfg0.js.map} +1 -1
- package/dist/chunks/{country.DyrDj95W.js → country.BywHth0L.js} +3 -3
- package/dist/chunks/{country.DyrDj95W.js.map → country.BywHth0L.js.map} +1 -1
- package/dist/chunks/{country.types.DaVCMxk-.js → country.types.BBQbWkTY.js} +3 -3
- package/dist/chunks/{country.types.DaVCMxk-.js.map → country.types.BBQbWkTY.js.map} +1 -1
- package/dist/chunks/{currency.DYZr_RDk.js → currency.Ciyxfmg1.js} +2 -2
- package/dist/chunks/{currency.DYZr_RDk.js.map → currency.Ciyxfmg1.js.map} +1 -1
- package/dist/chunks/{dashboard-section.B83FdC0Z.js → dashboard-section.Cw2Ima3U.js} +6 -6
- package/dist/chunks/{dashboard-section.B83FdC0Z.js.map → dashboard-section.Cw2Ima3U.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DQGVy5T2.js → dashed-underline.Dfw7cJ-9.js} +9 -9
- package/dist/chunks/{dashed-underline.DQGVy5T2.js.map → dashed-underline.Dfw7cJ-9.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BTEFoEwf.js → data-grid-template.6LR2Jqka.js} +4 -4
- package/dist/chunks/{data-grid-template.BTEFoEwf.js.map → data-grid-template.6LR2Jqka.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
- package/dist/chunks/{data-grid.Bk7_6Z0F.js → data-grid.B_uZEPDW.js} +449 -442
- package/dist/chunks/data-grid.B_uZEPDW.js.map +1 -0
- package/dist/chunks/date-input.etw_pFpA.js +20 -0
- package/dist/chunks/date-input.etw_pFpA.js.map +1 -0
- package/dist/chunks/{date-picker.CnsC_UMG.js → date-picker.CITeN8WH.js} +56 -56
- package/dist/chunks/date-picker.CITeN8WH.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.DxVjXxap.js +897 -0
- package/dist/chunks/date-range-picker.DxVjXxap.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{date.DBWzp0So.js → date.B0m0sFP6.js} +2 -2
- package/dist/chunks/{date.DBWzp0So.js.map → date.B0m0sFP6.js.map} +1 -1
- package/dist/chunks/de.DvtL0g75.js.map +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
- package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
- package/dist/chunks/dialog-page.DA6E6qma.js +122 -0
- package/dist/chunks/dialog-page.DA6E6qma.js.map +1 -0
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
- package/dist/chunks/{directive.Cbdox5VL.js → directive.rXUeDb8p.js} +2 -2
- package/dist/chunks/{directive.Cbdox5VL.js.map → directive.rXUeDb8p.js.map} +1 -1
- package/dist/chunks/divider.DX5gwN7p.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.Cq68tN9F.js → dropdown-default-textbox.5WjhJWdh.js} +71 -80
- package/dist/chunks/dropdown-default-textbox.5WjhJWdh.js.map +1 -0
- package/dist/chunks/{dropdown-tag.HBM0wrEV.js → dropdown-tag.BnMuMIDk.js} +8 -8
- package/dist/chunks/{dropdown-tag.HBM0wrEV.js.map → dropdown-tag.BnMuMIDk.js.map} +1 -1
- package/dist/chunks/{dropdown.C2pXf8Li.js → dropdown.DDPfKc74.js} +227 -225
- package/dist/chunks/dropdown.DDPfKc74.js.map +1 -0
- package/dist/chunks/{empty-state.DpBnqAxu.js → empty-state.IiG1LXa2.js} +6 -6
- package/dist/chunks/{empty-state.DpBnqAxu.js.map → empty-state.IiG1LXa2.js.map} +1 -1
- package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
- package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
- package/dist/chunks/{field-label.CEkJnsiL.js → error-message.VenUl2OK.js} +54 -54
- package/dist/chunks/error-message.VenUl2OK.js.map +1 -0
- package/dist/chunks/es.bz0mzkMq.js.map +1 -1
- package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
- package/dist/chunks/events.BQOQSSb7.js.map +1 -1
- package/dist/chunks/{file-uploader.CnOqfuI-.js → file-uploader.BU1V40qK.js} +10 -10
- package/dist/chunks/file-uploader.BU1V40qK.js.map +1 -0
- package/dist/chunks/filter-bar.UdXQf_RN.js +3321 -0
- package/dist/chunks/filter-bar.UdXQf_RN.js.map +1 -0
- package/dist/chunks/fixed-scroller.BueAsyGk.js +120 -0
- package/dist/chunks/{fixed-scroller.Bp4-iO80.js.map → fixed-scroller.BueAsyGk.js.map} +1 -1
- package/dist/chunks/{focus-trap.CNIU5jOz.js → focus-trap.DMc1wL3A.js} +312 -295
- package/dist/chunks/focus-trap.DMc1wL3A.js.map +1 -0
- package/dist/chunks/{footer-actions.BOiN47Xd.js → footer-actions.z-api8J_.js} +4 -4
- package/dist/chunks/{footer-actions.BOiN47Xd.js.map → footer-actions.z-api8J_.js.map} +1 -1
- package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
- package/dist/chunks/{form-layout-title.CdC1T4gs.js → form-layout-title.Bbq05nMT.js} +6 -6
- package/dist/chunks/{form-layout-title.CdC1T4gs.js.map → form-layout-title.Bbq05nMT.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
- package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
- package/dist/chunks/grab.BxiVZ1RZ.js +24 -0
- package/dist/chunks/grab.BxiVZ1RZ.js.map +1 -0
- package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -1
- package/dist/chunks/{header-meta.D_oAu2S9.js → header-meta.CuMQSsOm.js} +11 -11
- package/dist/chunks/{header-meta.D_oAu2S9.js.map → header-meta.CuMQSsOm.js.map} +1 -1
- package/dist/chunks/{header-with-views.Dc9LUYNY.js → header-with-views.DX8EXLMJ.js} +383 -400
- package/dist/chunks/header-with-views.DX8EXLMJ.js.map +1 -0
- package/dist/chunks/{header.BmtlQmPs.js → header.YECm2GAh.js} +4 -4
- package/dist/chunks/{header.BmtlQmPs.js.map → header.YECm2GAh.js.map} +1 -1
- package/dist/chunks/image.C2D2hKat.js.map +1 -1
- package/dist/chunks/index.B6WW_F-J.js.map +1 -1
- package/dist/chunks/index.BkJqgYF1.js +692 -0
- package/dist/chunks/{index.BDK4hwK_.js.map → index.BkJqgYF1.js.map} +1 -1
- package/dist/chunks/{info-icon.BEyxQgD6.js → info-icon.DS9ax8ZD.js} +3 -3
- package/dist/chunks/{info-icon.BEyxQgD6.js.map → info-icon.DS9ax8ZD.js.map} +1 -1
- package/dist/chunks/{input-field-password.D23H_RvO.js → input-field-password.DrI6eF5u.js} +11 -11
- package/dist/chunks/{input-field-password.D23H_RvO.js.map → input-field-password.DrI6eF5u.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js → input-field-phone-number.Buh4x3pJ.js} +4 -4
- package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js.map → input-field-phone-number.Buh4x3pJ.js.map} +1 -1
- package/dist/chunks/{input-field.hf0_ALq0.js → input-field.NEKXqT4R.js} +7 -7
- package/dist/chunks/{input-field.hf0_ALq0.js.map → input-field.NEKXqT4R.js.map} +1 -1
- package/dist/chunks/{inspector.C0iAxxoz.js → inspector.BomNgVb-.js} +5 -5
- package/dist/chunks/{inspector.C0iAxxoz.js.map → inspector.BomNgVb-.js.map} +1 -1
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
- package/dist/chunks/isSameWeek.DjeUtLwI.js +14 -0
- package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.DjeUtLwI.js.map} +1 -1
- package/dist/chunks/{it.Oaj6BklL.js → it.DIafuXtH.js} +2 -2
- package/dist/chunks/{it.Oaj6BklL.js.map → it.DIafuXtH.js.map} +1 -1
- package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
- package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
- package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
- package/dist/chunks/{layout-row.BPX00mio.js → layout-row.BxuMJU4E.js} +4 -4
- package/dist/chunks/layout-row.BxuMJU4E.js.map +1 -0
- package/dist/chunks/{link.PsTSQjK3.js → link.DKimL08z.js} +2 -2
- package/dist/chunks/{link.PsTSQjK3.js.map → link.DKimL08z.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BlDz7oXK.js → listbox-option-tag.Cv3y0TvQ.js} +3 -3
- package/dist/chunks/{listbox-option-tag.BlDz7oXK.js.map → listbox-option-tag.Cv3y0TvQ.js.map} +1 -1
- package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -1
- package/dist/chunks/match.CMBZxEs9.js.map +1 -1
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.B1gltlxA.js → modal-fullscreen.6bAjPENL.js} +73 -69
- package/dist/chunks/modal-fullscreen.6bAjPENL.js.map +1 -0
- package/dist/chunks/{modal.e3EQ6Kex.js → modal.DOR8c0gy.js} +6 -6
- package/dist/chunks/{modal.e3EQ6Kex.js.map → modal.DOR8c0gy.js.map} +1 -1
- package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
- package/dist/chunks/on-click-outside.BW4rkhzG.js +91 -0
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +1 -0
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
- package/dist/chunks/{pagination.BcFt2FqK.js → pagination.wuEIlDcq.js} +4 -4
- package/dist/chunks/{pagination.BcFt2FqK.js.map → pagination.wuEIlDcq.js.map} +1 -1
- package/dist/chunks/{payment-method.BKXLPDC9.js → payment-method.B3CkgsAY.js} +2 -2
- package/dist/chunks/{payment-method.BKXLPDC9.js.map → payment-method.B3CkgsAY.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
- package/dist/chunks/popover.types.DkiRUQ4Z.js +6 -0
- package/dist/chunks/{popover.types.WDh5ggr3.js.map → popover.types.DkiRUQ4Z.js.map} +1 -1
- package/dist/chunks/popper-container.D4dworD4.js +1423 -0
- package/dist/chunks/popper-container.D4dworD4.js.map +1 -0
- package/dist/chunks/{promo-banner.yfBorKj7.js → promo-banner.bjMDm76T.js} +4 -4
- package/dist/chunks/{promo-banner.yfBorKj7.js.map → promo-banner.bjMDm76T.js.map} +1 -1
- package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
- package/dist/chunks/{radio-group.CtTnfkYg.js → radio-group.DKRxfGtE.js} +8 -8
- package/dist/chunks/{radio-group.CtTnfkYg.js.map → radio-group.DKRxfGtE.js.map} +1 -1
- package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -1
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
- package/dist/chunks/{rich-text-editor.Dq2CFGOu.js → rich-text-editor.DiuS9alD.js} +9 -13
- package/dist/chunks/rich-text-editor.DiuS9alD.js.map +1 -0
- package/dist/chunks/{search-bar.B0SdQBnY.js → search-bar.UVSaoX0h.js} +5 -5
- package/dist/chunks/{search-bar.B0SdQBnY.js.map → search-bar.UVSaoX0h.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BPGpxd0p.js → secondary-nav.C6ldQMZ2.js} +18 -18
- package/dist/chunks/secondary-nav.C6ldQMZ2.js.map +1 -0
- package/dist/chunks/{segmented-control.BtWFda0P.js → segmented-control.BLnuxgnJ.js} +3 -3
- package/dist/chunks/{segmented-control.BtWFda0P.js.map → segmented-control.BLnuxgnJ.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.BryV14qP.js → selection-card-group.CqGYskmS.js} +5 -5
- package/dist/chunks/{selection-card-group.BryV14qP.js.map → selection-card-group.CqGYskmS.js.map} +1 -1
- package/dist/chunks/{sidepanel.NFyZGE57.js → sidepanel.BKE87Uef.js} +71 -67
- package/dist/chunks/sidepanel.BKE87Uef.js.map +1 -0
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.D8Yh4c0G.js} +3 -3
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.D8Yh4c0G.js.map} +1 -1
- package/dist/chunks/{status.types.Cv5XN4zL.js → status.types.BTsaLHQ6.js} +2 -2
- package/dist/chunks/{status.types.Cv5XN4zL.js.map → status.types.BTsaLHQ6.js.map} +1 -1
- package/dist/chunks/{step.BLFXvHL6.js → step.BEbWkprZ.js} +5 -5
- package/dist/chunks/{step.BLFXvHL6.js.map → step.BEbWkprZ.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CptOCpHP.js → structured-list-item.DRFRap_S.js} +6 -6
- package/dist/chunks/{structured-list-item.CptOCpHP.js.map → structured-list-item.DRFRap_S.js.map} +1 -1
- package/dist/chunks/success.DhioLvPD.js.map +1 -1
- package/dist/chunks/success.nNwxJRBS.js.map +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
- package/dist/chunks/{summary-grid.types.B1T8_k1m.js → summary-grid.types.OldkhD7S.js} +10 -10
- package/dist/chunks/{summary-grid.types.B1T8_k1m.js.map → summary-grid.types.OldkhD7S.js.map} +1 -1
- package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
- package/dist/chunks/{tab.FUMpPsBP.js → tab.BqSNoefU.js} +5 -5
- package/dist/chunks/{tab.FUMpPsBP.js.map → tab.BqSNoefU.js.map} +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
- package/dist/chunks/{tag.B1Ywhgvc.js → tag.Cy3XkSDQ.js} +3 -3
- package/dist/chunks/{tag.B1Ywhgvc.js.map → tag.Cy3XkSDQ.js.map} +1 -1
- package/dist/chunks/{textarea.riUt0BiI.js → textarea.Bm9MZb_W.js} +4 -4
- package/dist/chunks/{textarea.riUt0BiI.js.map → textarea.Bm9MZb_W.js.map} +1 -1
- package/dist/chunks/{timeline-item.CFfW1DoD.js → timeline-item.Cpbm8IUw.js} +15 -15
- package/dist/chunks/{timeline-item.CFfW1DoD.js.map → timeline-item.Cpbm8IUw.js.map} +1 -1
- package/dist/chunks/{toast.Csv6tMyT.js → toast.Wuy6VuOT.js} +4 -4
- package/dist/chunks/{toast.Csv6tMyT.js.map → toast.Wuy6VuOT.js.map} +1 -1
- package/dist/chunks/{toggle.227XgEc7.js → toggle.B1z1YPe_.js} +4 -4
- package/dist/chunks/{toggle.227XgEc7.js.map → toggle.B1z1YPe_.js.map} +1 -1
- package/dist/chunks/{tooltip.C6YCavPw.js → tooltip.DF11J3k3.js} +50 -50
- package/dist/chunks/{tooltip.C6YCavPw.js.map → tooltip.DF11J3k3.js.map} +1 -1
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
- package/dist/chunks/{tutorial.D18LwXVy.js → tutorial.D5xtZ1Pt.js} +8 -8
- package/dist/chunks/{tutorial.D18LwXVy.js.map → tutorial.D5xtZ1Pt.js.map} +1 -1
- package/dist/chunks/{typography.Bq-EGj9y.js → typography.C8lPlsbD.js} +3 -3
- package/dist/chunks/{typography.Bq-EGj9y.js.map → typography.C8lPlsbD.js.map} +1 -1
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
- package/dist/chunks/{use-bento-toast-controller.MmyZXtME.js → use-bento-toast-controller.CB6Qbf3R.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.MmyZXtME.js.map → use-bento-toast-controller.CB6Qbf3R.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.gDWGi5Nk.js → use-cached-selected-values.wn2xnwYG.js} +23 -23
- package/dist/chunks/use-cached-selected-values.wn2xnwYG.js.map +1 -0
- package/dist/chunks/{use-country-items.ClS_So5N.js → use-country-items.CQnldpqM.js} +11 -11
- package/dist/chunks/{use-country-items.ClS_So5N.js.map → use-country-items.CQnldpqM.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -1
- package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
- package/dist/chunks/utils.BzUwtTXc.js +21 -0
- package/dist/chunks/utils.BzUwtTXc.js.map +1 -0
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
- package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.Bw_6j9Cd.js} +2 -2
- package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.Bw_6j9Cd.js.map} +1 -1
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +6 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/draggable-handle.js +173 -0
- package/dist/draggable-handle.js.map +1 -0
- package/dist/dropdown.js +11 -11
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +341 -335
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +42 -42
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +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/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +5 -0
- package/dist/styles/bento-light.css +5 -0
- package/dist/styles/bento.css +5 -0
- package/dist/styles/legacy.css +5 -0
- package/dist/styles/styleguide.css +5 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/use-form-v4.js +756 -7787
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +339 -35
- package/package.json +9 -9
- package/dist/assets/field-label.css +0 -1
- package/dist/chunks/action-bar.y4tcdk7R.js +0 -162
- package/dist/chunks/action-bar.y4tcdk7R.js.map +0 -1
- package/dist/chunks/ai-button.BEy4Gly-.js +0 -67
- package/dist/chunks/ai-button.BEy4Gly-.js.map +0 -1
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +0 -1
- package/dist/chunks/constructNow.DuaJst0D.js +0 -8
- package/dist/chunks/data-grid.Bk7_6Z0F.js.map +0 -1
- package/dist/chunks/date-input.BbZqj10S.js +0 -15
- package/dist/chunks/date-input.BbZqj10S.js.map +0 -1
- package/dist/chunks/date-picker.CnsC_UMG.js.map +0 -1
- package/dist/chunks/date-range-picker.B6GSRjjK.js +0 -1693
- package/dist/chunks/date-range-picker.B6GSRjjK.js.map +0 -1
- package/dist/chunks/dialog-page.QpRiNPyx.js +0 -137
- package/dist/chunks/dialog-page.QpRiNPyx.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.Cq68tN9F.js.map +0 -1
- package/dist/chunks/dropdown.C2pXf8Li.js.map +0 -1
- package/dist/chunks/field-label.CEkJnsiL.js.map +0 -1
- package/dist/chunks/file-uploader.CnOqfuI-.js.map +0 -1
- package/dist/chunks/filter-bar.CnJAxz9B.js +0 -2559
- package/dist/chunks/filter-bar.CnJAxz9B.js.map +0 -1
- package/dist/chunks/fixed-scroller.Bp4-iO80.js +0 -114
- package/dist/chunks/focus-trap.CNIU5jOz.js.map +0 -1
- package/dist/chunks/header-with-views.Dc9LUYNY.js.map +0 -1
- package/dist/chunks/index.BDK4hwK_.js +0 -593
- package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
- package/dist/chunks/layout-row.BPX00mio.js.map +0 -1
- package/dist/chunks/modal-fullscreen.B1gltlxA.js.map +0 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js +0 -101
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +0 -1
- package/dist/chunks/popover.types.WDh5ggr3.js +0 -6
- package/dist/chunks/popper-container.Cdokz_NE.js +0 -1404
- package/dist/chunks/popper-container.Cdokz_NE.js.map +0 -1
- package/dist/chunks/rich-text-editor.Dq2CFGOu.js.map +0 -1
- package/dist/chunks/secondary-nav.BPGpxd0p.js.map +0 -1
- package/dist/chunks/sidepanel.NFyZGE57.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.gDWGi5Nk.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed as l } from "vue";
|
|
2
|
+
import { C as d } from "./calendar.DiXkjQDP.js";
|
|
3
|
+
const r = d.MONDAY, D = r, p = (e) => ({
|
|
4
|
+
resolvedFirstDayOfWeek: l(() => e.value ?? D ?? r)
|
|
5
|
+
}), f = /[\d]/, y = /[A-Za-z]{2,}/, g = /^\d{4}$/, u = /^\d{4}-\d{2}$/, F = (e) => {
|
|
6
|
+
const { selectionStart: t } = e.target, a = f.test(e.key) || y.test(e.key), s = e.key === "-" && (t === 4 || t === 7), { ctrlKey: o, shiftKey: n, altKey: i, metaKey: c } = e;
|
|
7
|
+
!o && !n && !i && !c && !a && !s && e.preventDefault();
|
|
8
|
+
}, h = (e) => {
|
|
9
|
+
if (!e)
|
|
10
|
+
return e;
|
|
11
|
+
let t = e;
|
|
12
|
+
const [a, s] = t.slice(-2), o = t.length === 6, n = t.length === 9;
|
|
13
|
+
return (o && parseInt(s, 10) > 1 && a === "-" || n && parseInt(s, 10) > 3 && a === "-") && (t = `${t.slice(0, t.length - 1)}0${s}`), (g.test(t) || u.test(t)) && (t += "-"), t;
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
h as f,
|
|
17
|
+
p as u,
|
|
18
|
+
F as v
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=date-input.etw_pFpA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-input.etw_pFpA.js","sources":["../../src/composables/use-first-day-of-week/use-first-day-of-week.ts","../../src/utils/ts/date-input.ts"],"sourcesContent":["import { computed, type Ref } from 'vue';\nimport { CalendarMonthFirstDayOfWeek } from '@/internal/calendar/components/calendar-month/calendar-month.types';\n\nconst DEFAULT_FIRST_DAY_OF_WEEK = CalendarMonthFirstDayOfWeek.MONDAY;\n\n/**\n * The global default for the first day of the week.\n *\n * In the future, this value could be resolved from:\n * 1. The Bento Vue plugin options (via provide/inject).\n * In `packages/vue2/src/install.ts`, we could add a `firstDayOfWeek` option to `BentoVuePlugin`\n * and provide it globally using `Vue.provide`.\n * 2. Global i18n settings.\n * Since `vue-i18n` (v8) doesn't natively expose `firstDayOfWeek`, we could extend\n * the i18n instance or use a custom global property.\n */\nconst FIRST_DAY_OF_WEEK_SET_BY_APP = DEFAULT_FIRST_DAY_OF_WEEK;\n\n/**\n * Resolves the first day of the week based on a hierarchy of configurations:\n * 1. Component-level override (if provided).\n * 2. App override (will be set up later)\n * 3. Default value i.e. Monday\n *\n * @param firstDayOfWeekProp - The component-level prop value.\n * @returns The resolved first day of the week.\n */\nexport const useFirstDayOfWeek = (firstDayOfWeekProp: Ref<CalendarMonthFirstDayOfWeek | undefined>) => {\n const resolvedFirstDayOfWeek = computed(() => {\n return firstDayOfWeekProp.value ?? FIRST_DAY_OF_WEEK_SET_BY_APP ?? DEFAULT_FIRST_DAY_OF_WEEK;\n });\n\n return {\n resolvedFirstDayOfWeek,\n };\n};\n","const validDigitRegex = /[\\d]/;\nconst validWordRegex = /[A-Za-z]{2,}/;\n\nconst yearRegex = /^\\d{4}$/;\nconst monthRegex = /^\\d{4}-\\d{2}$/;\n\nexport const validateDateInput = (event: KeyboardEvent) => {\n // Get cursor position\n const { selectionStart } = event.target as HTMLInputElement;\n\n // Valid if `0-9` or word e.g. `Backspace`\n const isValidKey = validDigitRegex.test(event.key) || validWordRegex.test(event.key);\n\n // Valid `-` if after year (4) or month (7)\n const isValidDash = event.key === '-' && (selectionStart === 4 || selectionStart === 7);\n\n // Allow commands\n const { ctrlKey, shiftKey, altKey, metaKey } = event;\n\n if (!ctrlKey && !shiftKey && !altKey && !metaKey && !isValidKey && !isValidDash) {\n // Prevent input of invalid characters\n event.preventDefault();\n }\n};\n\nexport const formatDateInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n // Add `0` before month/day (e.g. 4 -> 04)\n const isMonth = formattedValue.length === 6;\n const isDay = formattedValue.length === 9;\n if (\n (isMonth && parseInt(lastDigit, 10) > 1 && secondToLastDigit === '-') ||\n (isDay && parseInt(lastDigit, 10) > 3 && secondToLastDigit === '-')\n ) {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 1)}0${lastDigit}`;\n }\n\n // Add `-` after year/month\n if (yearRegex.test(formattedValue) || monthRegex.test(formattedValue)) {\n formattedValue += '-';\n }\n\n return formattedValue;\n};\n"],"names":["DEFAULT_FIRST_DAY_OF_WEEK","CalendarMonthFirstDayOfWeek","FIRST_DAY_OF_WEEK_SET_BY_APP","useFirstDayOfWeek","firstDayOfWeekProp","computed","validDigitRegex","validWordRegex","yearRegex","monthRegex","validateDateInput","event","selectionStart","isValidKey","isValidDash","ctrlKey","shiftKey","altKey","metaKey","formatDateInputValue","value","formattedValue","secondToLastDigit","lastDigit","isMonth","isDay"],"mappings":";;AAGA,MAAMA,IAA4BC,EAA4B,QAaxDC,IAA+BF,GAWxBG,IAAoB,CAACC,OAKvB;AAAA,EACH,wBAL2BC,EAAS,MAC7BD,EAAmB,SAASF,KAAgCF,CACtE;AAGG,ICjCFM,IAAkB,QAClBC,IAAiB,gBAEjBC,IAAY,WACZC,IAAa,iBAENC,IAAoB,CAACC,MAAyB;AAEvD,QAAM,EAAE,gBAAAC,MAAmBD,EAAM,QAG3BE,IAAaP,EAAgB,KAAKK,EAAM,GAAG,KAAKJ,EAAe,KAAKI,EAAM,GAAG,GAG7EG,IAAcH,EAAM,QAAQ,QAAQC,MAAmB,KAAKA,MAAmB,IAG/E,EAAE,SAAAG,GAAS,UAAAC,GAAU,QAAAC,GAAQ,SAAAC,MAAYP;AAE/C,EAAI,CAACI,KAAW,CAACC,KAAY,CAACC,KAAU,CAACC,KAAW,CAACL,KAAc,CAACC,KAEhEH,EAAM,eAAA;AAEd,GAEaQ,IAAuB,CAACC,MAAkB;AACnD,MAAI,CAACA;AACD,WAAOA;AAGX,MAAIC,IAAiBD;AAErB,QAAM,CAACE,GAAmBC,CAAS,IAAIF,EAAe,MAAM,EAAE,GAExDG,IAAUH,EAAe,WAAW,GACpCI,IAAQJ,EAAe,WAAW;AACxC,UACKG,KAAW,SAASD,GAAW,EAAE,IAAI,KAAKD,MAAsB,OAChEG,KAAS,SAASF,GAAW,EAAE,IAAI,KAAKD,MAAsB,SAE/DD,IAAiB,GAAGA,EAAe,MAAM,GAAGA,EAAe,SAAS,CAAC,CAAC,IAAIE,CAAS,MAInFf,EAAU,KAAKa,CAAc,KAAKZ,EAAW,KAAKY,CAAc,OAChEA,KAAkB,MAGfA;AACX;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ref as u, computed as c, defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { h as
|
|
4
|
-
import { d as
|
|
5
|
-
import { D as
|
|
6
|
-
import { d as
|
|
7
|
-
import { v as
|
|
8
|
-
import { g as
|
|
1
|
+
import { ref as u, computed as c, defineComponent as j, toRef as P, watch as T, nextTick as z } from "vue";
|
|
2
|
+
import { g as J, s as w, e as G, b as H } from "./calendar.DiXkjQDP.js";
|
|
3
|
+
import { h as Q } from "./button-actions.VSc47LLH.js";
|
|
4
|
+
import { d as X, B as Z } from "./typography.C8lPlsbD.js";
|
|
5
|
+
import { D as $ } from "./dropdown-default-textbox.5WjhJWdh.js";
|
|
6
|
+
import { d as ee } from "./debounce.DUTu11PS.js";
|
|
7
|
+
import { u as ae, v as te, f as re } from "./date-input.etw_pFpA.js";
|
|
8
|
+
import { g as b } from "./generate-uid.NJ8tVoha.js";
|
|
9
9
|
import { u as M } from "./index.B6WW_F-J.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
10
|
+
import { u as le } from "./form-field.D_2g7vaP.js";
|
|
11
|
+
import { u as oe } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
12
12
|
import "./index.Cl4_42j5.js";
|
|
13
|
-
import { B as
|
|
14
|
-
import { F as
|
|
15
|
-
import { n as
|
|
13
|
+
import { B as ne } from "./directive.rXUeDb8p.js";
|
|
14
|
+
import { F as ie, E as se } from "./error-message.VenUl2OK.js";
|
|
15
|
+
import { n as de } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
16
|
import "../assets/date-picker.css";
|
|
17
|
-
const
|
|
17
|
+
const ue = {
|
|
18
18
|
"en-US": {
|
|
19
19
|
datePicker: "Date picker",
|
|
20
20
|
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
@@ -36,23 +36,23 @@ const se = {
|
|
|
36
36
|
selectDateRange: "Selecione um intervalo de datas",
|
|
37
37
|
selectedDateIsNotAvailable: "A data selecionada não está disponível"
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, ce = ({
|
|
40
40
|
datePickerValue: i,
|
|
41
41
|
isDateIncorrect: t,
|
|
42
42
|
isMonthVariant: a,
|
|
43
43
|
placeholder: e
|
|
44
44
|
}) => {
|
|
45
45
|
var v;
|
|
46
|
-
const { locale: l, t:
|
|
46
|
+
const { locale: l, t: y } = M(), p = u((v = i.value) == null ? void 0 : v.toDateString());
|
|
47
47
|
return {
|
|
48
48
|
// Values
|
|
49
49
|
dateDisplayValue: c(() => {
|
|
50
50
|
if (t.value)
|
|
51
51
|
return p.value;
|
|
52
52
|
if (!i.value)
|
|
53
|
-
return (e == null ? void 0 : e.value) ||
|
|
53
|
+
return (e == null ? void 0 : e.value) || y("selectDate");
|
|
54
54
|
const s = a != null && a.value ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
55
|
-
return
|
|
55
|
+
return J(l.value, s).format(i.value);
|
|
56
56
|
}),
|
|
57
57
|
textInputValue: p,
|
|
58
58
|
// Methods
|
|
@@ -63,16 +63,16 @@ const se = {
|
|
|
63
63
|
p.value = "";
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
const k = a != null && a.value ?
|
|
67
|
-
p.value =
|
|
66
|
+
const k = a != null && a.value ? w(s) : s;
|
|
67
|
+
p.value = G(k);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
},
|
|
71
|
-
i18n: { messages:
|
|
70
|
+
}, pe = {
|
|
71
|
+
i18n: { messages: ue },
|
|
72
72
|
name: "bento-date-picker",
|
|
73
73
|
model: { prop: "modelValue" }
|
|
74
|
-
},
|
|
75
|
-
...
|
|
74
|
+
}, fe = /* @__PURE__ */ j({
|
|
75
|
+
...pe,
|
|
76
76
|
props: {
|
|
77
77
|
description: { default: void 0 },
|
|
78
78
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -84,7 +84,7 @@ const se = {
|
|
|
84
84
|
required: { type: Boolean, default: !1 },
|
|
85
85
|
tooltipText: { default: null },
|
|
86
86
|
defaultDisplayMonth: { default: null },
|
|
87
|
-
firstDayOfWeek: { default:
|
|
87
|
+
firstDayOfWeek: { default: void 0 },
|
|
88
88
|
isDateDisabled: { default: void 0 },
|
|
89
89
|
min: { default: null },
|
|
90
90
|
max: { default: null },
|
|
@@ -94,19 +94,19 @@ const se = {
|
|
|
94
94
|
},
|
|
95
95
|
emits: ["update:model-value", "input"],
|
|
96
96
|
setup(i, { emit: t }) {
|
|
97
|
-
const a = i, e = 1e3, { t: l } = M(),
|
|
97
|
+
const a = i, e = 1e3, { t: l } = M(), y = b("bento-date-picker-container"), p = b("bento-date-picker-label"), _ = b("bento-date-picker-description"), g = b("bento-date-picker-error"), v = b("bento-date-picker-date-error"), s = c(() => a.label || l("datePicker", { name: y })), k = u(null), B = u(null), o = u(!1), n = u(!1), I = u(void 0), f = u(a.modelValue), { isReadOnly: h } = oe(P(a, "readonly")), { emitValue: m } = le(t), { resolvedFirstDayOfWeek: V } = ae(P(a, "firstDayOfWeek")), Y = c(() => ({
|
|
98
98
|
initialFocus: I.value,
|
|
99
|
-
additionalContainers: [
|
|
99
|
+
additionalContainers: [B.value.$el]
|
|
100
100
|
}));
|
|
101
|
-
|
|
101
|
+
T(
|
|
102
102
|
() => a.disabled,
|
|
103
103
|
(r) => {
|
|
104
104
|
r && n.value && (n.value = !1);
|
|
105
105
|
}
|
|
106
|
-
),
|
|
106
|
+
), T(
|
|
107
107
|
[() => a.value, () => a.modelValue],
|
|
108
108
|
([r, D]) => {
|
|
109
|
-
r &&
|
|
109
|
+
r && X(
|
|
110
110
|
'BentoDatePicker "value" property',
|
|
111
111
|
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
112
112
|
"2.0.0"
|
|
@@ -114,60 +114,60 @@ const se = {
|
|
|
114
114
|
},
|
|
115
115
|
{ immediate: !0 }
|
|
116
116
|
);
|
|
117
|
-
const
|
|
117
|
+
const E = c(() => a.variant === "month"), { dateDisplayValue: L, textInputValue: d, formatTextInputDisplayValue: C } = ce({
|
|
118
118
|
datePickerValue: f,
|
|
119
119
|
isDateIncorrect: o,
|
|
120
|
-
isMonthVariant:
|
|
121
|
-
placeholder:
|
|
122
|
-
}), x = c(() => a.isDateDisabled && d.value && a.isDateDisabled(new Date(d.value)) && !n.value ? l("selectedDateIsNotAvailable") : o.value ? l("provideDateInAFormat") : null),
|
|
120
|
+
isMonthVariant: E,
|
|
121
|
+
placeholder: P(a, "placeholder")
|
|
122
|
+
}), x = c(() => a.isDateDisabled && d.value && a.isDateDisabled(new Date(d.value)) && !n.value ? l("selectedDateIsNotAvailable") : o.value ? l("provideDateInAFormat") : null), N = c(() => ({
|
|
123
123
|
"b-date-picker__description--error": a.errorMessage || x.value
|
|
124
|
-
})),
|
|
124
|
+
})), W = c(
|
|
125
125
|
() => `${a.description ? _ : ""} ${a.errorMessage ? g : ""} ${x.value ? v : ""}`.trim() || null
|
|
126
|
-
),
|
|
126
|
+
), A = (r) => a.min && r <= a.min || a.max && r >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(r) : !0, F = () => {
|
|
127
127
|
n.value = !1;
|
|
128
128
|
}, R = () => {
|
|
129
129
|
n.value = !0, C();
|
|
130
130
|
}, U = (r) => {
|
|
131
|
-
o.value = !1,
|
|
131
|
+
o.value = !1, F(), m(r);
|
|
132
132
|
}, q = async () => {
|
|
133
133
|
o.value && (o.value = !1, d.value = null), m(null);
|
|
134
134
|
}, K = (r) => {
|
|
135
|
-
|
|
136
|
-
},
|
|
135
|
+
te(r);
|
|
136
|
+
}, O = (r) => {
|
|
137
137
|
if (r.length < 10)
|
|
138
138
|
return;
|
|
139
|
-
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(r) &&
|
|
140
|
-
}, S =
|
|
141
|
-
return { __sfc: !0, DEBOUNCE_TIME: e, props: a, emit: t, t: l, datePickerContainerId:
|
|
142
|
-
d.value =
|
|
139
|
+
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(r) && A(new Date(r)) ? (o.value = !1, m(new Date(r))) : r && (o.value = !0, m(null));
|
|
140
|
+
}, S = ee(O, e);
|
|
141
|
+
return { __sfc: !0, DEBOUNCE_TIME: e, props: a, emit: t, t: l, datePickerContainerId: y, labelId: p, descriptionId: _, errorId: g, dateErrorId: v, popoverAriaLabel: s, calendarContainerRef: k, inputContainerRef: B, isDateIncorrect: o, isDatePickerOpen: n, initialFocusOnDatePickerOpen: I, internalModelValue: f, isReadOnly: h, emitValue: m, resolvedFirstDayOfWeek: V, computedTrapAllOptions: Y, isMonthVariant: E, dateDisplayValue: L, textInputValue: d, formatTextInputDisplayValue: C, dateErrorText: x, descriptionConditionalClasses: N, ariaDescribedBy: W, isDateEnabled: A, closeDatePicker: F, openDatePicker: R, onDateSelected: U, clearDatePickerValue: q, onDateKeyDown: K, validateDate: O, validateDateDebounced: S, onDateInputChange: (r) => {
|
|
142
|
+
d.value = re(r), n.value ? S(d.value) : O(d.value);
|
|
143
143
|
}, onSpaceBarOrEnter: async (r) => {
|
|
144
144
|
var D;
|
|
145
|
-
n.value || (r.preventDefault(), R(), await
|
|
146
|
-
a.variant === "month" ?
|
|
145
|
+
n.value || (r.preventDefault(), R(), await z(), f.value || (C(/* @__PURE__ */ new Date()), m(/* @__PURE__ */ new Date())), I.value = ((D = k.value) == null ? void 0 : D.$refs.calendarRef[0].focusOnDate(
|
|
146
|
+
a.variant === "month" ? w(f.value) : f.value,
|
|
147
147
|
!0
|
|
148
148
|
)) ?? void 0);
|
|
149
|
-
}, BentoPopover:
|
|
149
|
+
}, BentoPopover: Q, BentoTypography: Z, Calendar: H, ErrorMessage: se, FieldLabel: ie, DropdownInputDefault: $, vBentoClickOutsideDirective: ne };
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
|
-
var
|
|
152
|
+
var me = function() {
|
|
153
153
|
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
154
154
|
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) {
|
|
155
155
|
return !l.type.indexOf("key") && t._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
156
156
|
}, function(l) {
|
|
157
157
|
return !l.type.indexOf("key") && t._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
158
|
-
}] } }, [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-describedby": e.ariaDescribedBy, 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) {
|
|
158
|
+
}] } }, [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, 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) {
|
|
159
159
|
return !l.type.indexOf("key") && t._k(l.keyCode, "esc", 27, l.key, ["Esc", "Escape"]) ? null : e.closeDatePicker.apply(null, arguments);
|
|
160
|
-
} } }, [a(e.Calendar, { ref: "calendarContainerRef", attrs: { "default-display-month": t.defaultDisplayMonth, "first-day-of-week":
|
|
161
|
-
},
|
|
162
|
-
ce,
|
|
163
|
-
pe,
|
|
160
|
+
} } }, [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);
|
|
161
|
+
}, ve = [], De = /* @__PURE__ */ de(
|
|
164
162
|
fe,
|
|
163
|
+
me,
|
|
164
|
+
ve,
|
|
165
165
|
!1,
|
|
166
166
|
null,
|
|
167
|
-
"
|
|
167
|
+
"a37bcefb"
|
|
168
168
|
);
|
|
169
|
-
const
|
|
169
|
+
const Me = De.exports;
|
|
170
170
|
export {
|
|
171
|
-
|
|
171
|
+
Me as B
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=date-picker.
|
|
173
|
+
//# sourceMappingURL=date-picker.CITeN8WH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.CITeN8WH.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 { dateToInputDateString, getDateTimeFormatter } from '@/utils/ts/format-date';\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 {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n * @param {?Ref<boolean>} 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\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 yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {Date} 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 = dateToInputDateString(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 :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 { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\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 { 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\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 props.isDateDisabled(new Date(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 validateDateInput(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 // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emitValue(new Date(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 = formatDateInputValue(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","textInputValue","ref","_a","computed","dateFormatOptions","getDateTimeFormatter","dateToFormat","date","startOfMonth","dateToInputDateString","__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","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","stringDate","validateDateDebounced","debounce","formatDateInputValue","nextTick"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-picker/date-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\nimport {\n CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek,\n type CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n type CalendarSingleDateValue as BentoDatePickerValue,\n CalendarVariant as BentoDatePickerVariant,\n} from '@/internal';\n\nexport {\n BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerValue,\n BentoDatePickerVariant,\n};\n\n/**\n * @deprecated since version 2.0. This enum is deprecated. Use the event name as a string literal instead.\n */\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDatePickerEmits = FormFieldEmits<BentoDatePickerValue>;\n\nexport interface BentoDatePickerProps extends FormField {\n /**\n * Default start date for the calendar pane.\n * Expected format: YYYY-MM-DD\n * @default null\n */\n defaultDisplayMonth?: string | null;\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default
|
|
1
|
+
{"version":3,"file":"date-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-picker/date-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\nimport {\n CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek,\n type CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n type CalendarSingleDateValue as BentoDatePickerValue,\n CalendarVariant as BentoDatePickerVariant,\n} from '@/internal';\n\nexport {\n BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerValue,\n BentoDatePickerVariant,\n};\n\n/**\n * @deprecated since version 2.0. This enum is deprecated. Use the event name as a string literal instead.\n */\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDatePickerEmits = FormFieldEmits<BentoDatePickerValue>;\n\nexport interface BentoDatePickerProps extends FormField {\n /**\n * Default start date for the calendar pane.\n * Expected format: YYYY-MM-DD\n * @default null\n */\n defaultDisplayMonth?: string | null;\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n * @default null\n */\n min?: Date | null;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n * @default null\n */\n max?: Date | null;\n\n /**\n * Selected date\n *\n * @default null\n */\n modelValue?: BentoDatePickerValue | null;\n\n /**\n * Selected date\n *\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n *\n * @default null\n */\n value?: BentoDatePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDatePickerVariant}`;\n}\n"],"names":["BentoDatePickerEvent"],"mappings":"AAkBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}
|