@adyen/bento-vue2 1.90.0 → 1.92.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 +2 -0
- package/dist/@types/index.d.ts +372 -236
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.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 -1
- 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/toggle.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.B63qIiiH.js → action-bar.ChuPTyQG.js} +3 -3
- package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.ChuPTyQG.js.map} +1 -1
- package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.Dt8nijLW.js} +2 -2
- package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.Dt8nijLW.js.map} +1 -1
- package/dist/chunks/{alert.CXRb-Smf.js → alert.CLqcPN0Q.js} +73 -55
- package/dist/chunks/alert.CLqcPN0Q.js.map +1 -0
- package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.DMdzcBrq.js} +4 -4
- package/dist/chunks/base-modal.DMdzcBrq.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.CXFziNUr.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.CXFziNUr.js.map} +1 -1
- package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.CXD6_9qN.js} +5 -5
- package/dist/chunks/button-actions.CXD6_9qN.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/button.C9b2AC9w.js.map +1 -1
- package/dist/chunks/calendar.rZsIZPxm.js +1232 -0
- package/dist/chunks/calendar.rZsIZPxm.js.map +1 -0
- package/dist/chunks/{card.WWUfBkqf.js → card.Brma5kdb.js} +2 -2
- package/dist/chunks/card.Brma5kdb.js.map +1 -0
- package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.DWZvFkjz.js} +6 -6
- package/dist/chunks/checkbox-group.DWZvFkjz.js.map +1 -0
- package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.BZP0wtnE.js} +20 -22
- package/dist/chunks/checkbox.BZP0wtnE.js.map +1 -0
- 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.4DX9iUV8.js → code-snippet.DHAymIXp.js} +3 -3
- package/dist/chunks/code-snippet.DHAymIXp.js.map +1 -0
- package/dist/chunks/constructNow.CK0ryPil.js +8 -0
- package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.CK0ryPil.js.map} +1 -1
- package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/country.types.jjXwaoMl.js.map +1 -1
- package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.D9rS8myE.js} +2 -2
- package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.D9rS8myE.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.D_FhFRXM.js} +2 -2
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.D_FhFRXM.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.CRijG20n.js} +2 -2
- package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.CRijG20n.js.map} +1 -1
- package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.hMM9F36T.js} +540 -538
- package/dist/chunks/data-grid.hMM9F36T.js.map +1 -0
- package/dist/chunks/date-picker.BSo6Cvum.js +237 -0
- package/dist/chunks/date-picker.BSo6Cvum.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.D90k5b8p.js +1097 -0
- package/dist/chunks/date-range-picker.D90k5b8p.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/{de.BJvo6njq.js → de.pvjpUJ1o.js} +2 -2
- package/dist/chunks/{de.BJvo6njq.js.map → de.pvjpUJ1o.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.CIYECBxK.js → differenceInMonths.CpwVtHZX.js} +3 -2
- package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.CpwVtHZX.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/{draggable-handle.js → chunks/draggable-handle.BR_aQH5N.js} +49 -40
- package/dist/chunks/draggable-handle.BR_aQH5N.js.map +1 -0
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.z3rsxbpW.js} +4 -4
- package/dist/chunks/dropdown-tag.z3rsxbpW.js.map +1 -0
- package/dist/chunks/dropdown.BYJwx-JD.js +1148 -0
- package/dist/chunks/dropdown.BYJwx-JD.js.map +1 -0
- package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.-Q7Oq-nY.js} +2 -2
- package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.-Q7Oq-nY.js.map} +1 -1
- package/dist/chunks/{en-US.YeSsZuOc.js → en-US.BK5uiAND.js} +5 -5
- package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.BK5uiAND.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/{es.DyUjjSL8.js → es.2H4LvTyV.js} +2 -2
- package/dist/chunks/{es.DyUjjSL8.js.map → es.2H4LvTyV.js.map} +1 -1
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.Djl0xaDN.js} +4 -4
- package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.Djl0xaDN.js.map} +1 -1
- package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.C9rWMIWO.js} +899 -882
- package/dist/chunks/filter-bar.C9rWMIWO.js.map +1 -0
- package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.D9mHwk5l.js} +2 -2
- package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.D9mHwk5l.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.zZVLCyqe.js} +71 -62
- package/dist/chunks/form-layout-title.zZVLCyqe.js.map +1 -0
- package/dist/chunks/{fr.JD_4GwS8.js → fr.Cu0IIfBP.js} +2 -2
- package/dist/chunks/{fr.JD_4GwS8.js.map → fr.Cu0IIfBP.js.map} +1 -1
- package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.BSPnWWmi.js} +14 -14
- package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.BSPnWWmi.js.map} +1 -1
- package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.g6J7x6l2.js} +10 -10
- package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.g6J7x6l2.js.map} +1 -1
- package/dist/chunks/{header.DtmZjxiU.js → header.DyZG7qWe.js} +3 -3
- package/dist/chunks/header.DyZG7qWe.js.map +1 -0
- package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.CiDdI6A_.js} +4 -4
- package/dist/chunks/input-field-password.CiDdI6A_.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.DFS58acU.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.DFS58acU.js.map} +1 -1
- package/dist/chunks/input-field.CGLjYab8.js +222 -0
- package/dist/chunks/input-field.CGLjYab8.js.map +1 -0
- package/dist/chunks/input-time.BhAUyKZM.js +135 -0
- package/dist/chunks/input-time.BhAUyKZM.js.map +1 -0
- package/dist/chunks/isSameWeek.TrpUOIn5.js +14 -0
- package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.TrpUOIn5.js.map} +1 -1
- package/dist/chunks/{it.BlUnV-yA.js → it.B65snrJA.js} +3 -3
- package/dist/chunks/{it.BlUnV-yA.js.map → it.B65snrJA.js.map} +1 -1
- package/dist/chunks/{ja.nUwDmVf2.js → ja.xGVfFSzL.js} +2 -2
- package/dist/chunks/{ja.nUwDmVf2.js.map → ja.xGVfFSzL.js.map} +1 -1
- package/dist/chunks/link.DB5g6d48.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.De6mevyD.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.De6mevyD.js.map} +1 -1
- package/dist/chunks/{modal.Brif0vAy.js → modal.BXxwn9H4.js} +93 -91
- package/dist/chunks/{modal.Brif0vAy.js.map → modal.BXxwn9H4.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.BmrU_sn_.js → pagination.BzsKZFnw.js} +37 -37
- package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.BzsKZFnw.js.map} +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/popover.types.hA13DZPg.js.map +1 -1
- package/dist/chunks/popper-container.C_n9Ds1W.js.map +1 -1
- package/dist/chunks/promo-banner.Dc_kK1x9.js.map +1 -1
- package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.D9FuAQZm.js} +2 -2
- package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.D9FuAQZm.js.map} +1 -1
- package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
- package/dist/chunks/radio-group.Bb-L-0io.js.map +1 -0
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.DPpIzYid.js} +7 -6
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.DPpIzYid.js.map} +1 -1
- package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.BEOieKeA.js} +4 -4
- package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.BEOieKeA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.BBL5zZPK.js} +2 -2
- package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.BBL5zZPK.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
- package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.nW0Bhk_u.js} +4 -4
- package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.nW0Bhk_u.js.map} +1 -1
- package/dist/chunks/{startOfWeek.CXhhX-R7.js → startOfWeek.Br5KM4z_.js} +2 -2
- package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Br5KM4z_.js.map} +1 -1
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.Dp_efYVN.js} +2 -2
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.Dp_efYVN.js.map} +1 -1
- package/dist/chunks/tag.D2xagTJv.js.map +1 -1
- package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
- package/dist/chunks/textarea.CJS-1I41.js.map +1 -0
- package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.CF9jbIRr.js} +5 -5
- package/dist/chunks/timeline-item.CF9jbIRr.js.map +1 -0
- package/dist/chunks/{toggle.B1z1YPe_.js → toggle.Ca-MM3dt.js} +3 -5
- package/dist/chunks/toggle.Ca-MM3dt.js.map +1 -0
- package/dist/chunks/tooltip.BxtnF3is.js.map +1 -1
- package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CoWDVs7_.js} +2 -2
- package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CoWDVs7_.js.map} +1 -1
- package/dist/chunks/typography.C8lPlsbD.js.map +1 -1
- package/dist/chunks/use-cached-selected-values.Du8-wWR2.js +1520 -0
- package/dist/chunks/use-cached-selected-values.Du8-wWR2.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.ibZeLD_V.js} +4 -4
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.ibZeLD_V.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/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Be4pa3-g.js} +3 -3
- package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Be4pa3-g.js.map} +1 -1
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/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/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 +274 -271
- package/dist/index.js.map +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 +1 -1
- package/dist/internal.js +24 -23
- package/dist/internal.js.map +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/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/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +144 -7
- package/package.json +8 -13
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/alert.CXRb-Smf.js.map +0 -1
- package/dist/chunks/base-modal.DpmeDmq-.js.map +0 -1
- package/dist/chunks/button-actions.BmU1DngD.js.map +0 -1
- package/dist/chunks/calendar.uvIGF_jU.js +0 -1154
- package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
- package/dist/chunks/card.WWUfBkqf.js.map +0 -1
- package/dist/chunks/checkbox-group.CI0xDnql.js.map +0 -1
- package/dist/chunks/checkbox.TsWA6O3Z.js.map +0 -1
- package/dist/chunks/code-snippet.4DX9iUV8.js.map +0 -1
- package/dist/chunks/constructNow.CIc7d13I.js +0 -8
- package/dist/chunks/data-grid.x6cEW0az.js.map +0 -1
- package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
- package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
- package/dist/chunks/date-range-picker.DPGy2h-9.js +0 -1068
- package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
- package/dist/chunks/dropdown-tag.t3FlJUSy.js.map +0 -1
- package/dist/chunks/dropdown.CvNI2V33.js +0 -790
- package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
- package/dist/chunks/error-message.BUNKRa_w.js +0 -160
- package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
- package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
- package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
- package/dist/chunks/header.DtmZjxiU.js.map +0 -1
- package/dist/chunks/input-field-password.Bdlw4dzr.js.map +0 -1
- package/dist/chunks/input-field.DH25CU_G.js +0 -207
- package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
- package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
- package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
- package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/radio-group.5oS-AeYN.js.map +0 -1
- package/dist/chunks/textarea.Bi53QF5Q.js.map +0 -1
- package/dist/chunks/timeline-item.C6Bi0eam.js.map +0 -1
- package/dist/chunks/toggle.B1z1YPe_.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js +0 -1450
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
- package/dist/chunks/warning-filled.CbJ1pcB2.js +0 -24
- package/dist/chunks/warning-filled.CbJ1pcB2.js.map +0 -1
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { ref as u, computed as p, defineComponent as H, toRef as x, watch as w, nextTick as Q } from "vue";
|
|
2
|
-
import { g as Z, s as N, b as $ } from "./calendar.uvIGF_jU.js";
|
|
3
|
-
import { h as ee } from "./button-actions.BmU1DngD.js";
|
|
4
|
-
import { d as ae, B as te } from "./typography.C8lPlsbD.js";
|
|
5
|
-
import { D as le } from "./dropdown-default-textbox.CjhLIxVq.js";
|
|
6
|
-
import { d as re } from "./debounce.DUTu11PS.js";
|
|
7
|
-
import { g as v } 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 V, a as ne } from "./use-date-input-formatter.DRMt9yR2.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 ce } from "./error-message.BUNKRa_w.js";
|
|
15
|
-
import { n as ue } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
|
-
import "../assets/date-picker.css";
|
|
17
|
-
const pe = {
|
|
18
|
-
"de-DE": {
|
|
19
|
-
datePicker: "Datumsauswahl",
|
|
20
|
-
provideDateInAFormat: "Geben Sie das Datum im Format YYYY-MM-DD an",
|
|
21
|
-
selectDate: "Wählen Sie ein Datum",
|
|
22
|
-
selectDateRange: "Wählen Sie einen Datumsbereich aus",
|
|
23
|
-
selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar"
|
|
24
|
-
},
|
|
25
|
-
"en-GB": {
|
|
26
|
-
datePicker: "Date picker",
|
|
27
|
-
provideDateInAFormat: "Enter date in YYYY-MM-DD format",
|
|
28
|
-
selectDate: "Select a date",
|
|
29
|
-
selectDateRange: "Select a date range",
|
|
30
|
-
selectedDateIsNotAvailable: "Selected date is not available"
|
|
31
|
-
},
|
|
32
|
-
"en-US": {
|
|
33
|
-
datePicker: "Date picker",
|
|
34
|
-
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
35
|
-
selectDate: "Select a date",
|
|
36
|
-
selectDateRange: "Select a date range",
|
|
37
|
-
selectedDateIsNotAvailable: "Selected date is not available"
|
|
38
|
-
},
|
|
39
|
-
"es-ES": {
|
|
40
|
-
datePicker: "Selector de fecha",
|
|
41
|
-
provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD",
|
|
42
|
-
selectDate: "Selecciona una fecha",
|
|
43
|
-
selectDateRange: "Selecciona un rango de fechas",
|
|
44
|
-
selectedDateIsNotAvailable: "La fecha seleccionada no está disponible"
|
|
45
|
-
},
|
|
46
|
-
"es-MX": {
|
|
47
|
-
datePicker: "Selector de fecha",
|
|
48
|
-
provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD",
|
|
49
|
-
selectDate: "Selecciona una fecha",
|
|
50
|
-
selectDateRange: "Selecciona un rango de fechas",
|
|
51
|
-
selectedDateIsNotAvailable: "La fecha seleccionada no está disponible"
|
|
52
|
-
},
|
|
53
|
-
"fr-FR": {
|
|
54
|
-
datePicker: "Sélecteur de date",
|
|
55
|
-
provideDateInAFormat: "Fournissez la date au format AAAA-MM-JJ",
|
|
56
|
-
selectDate: "Sélectionnez une date",
|
|
57
|
-
selectDateRange: "Sélectionnez une plage de dates",
|
|
58
|
-
selectedDateIsNotAvailable: "La date sélectionnée n’est pas disponible"
|
|
59
|
-
},
|
|
60
|
-
"it-IT": {
|
|
61
|
-
datePicker: "Selezionatore di date",
|
|
62
|
-
provideDateInAFormat: "Inserisci la data nel formato AAAA-MM-GG",
|
|
63
|
-
selectDate: "Seleziona una data",
|
|
64
|
-
selectDateRange: "Seleziona un intervallo di date",
|
|
65
|
-
selectedDateIsNotAvailable: "La data selezionata non è disponibile"
|
|
66
|
-
},
|
|
67
|
-
"ja-JP": {
|
|
68
|
-
datePicker: "日付ピッカー",
|
|
69
|
-
provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください",
|
|
70
|
-
selectDate: "日付を選択",
|
|
71
|
-
selectDateRange: "日付範囲を選択",
|
|
72
|
-
selectedDateIsNotAvailable: "選択した日付は利用できません"
|
|
73
|
-
},
|
|
74
|
-
"pt-BR": {
|
|
75
|
-
datePicker: "Seletor de data",
|
|
76
|
-
provideDateInAFormat: "Inclua a data no formato AAAA-MM-DD",
|
|
77
|
-
selectDate: "Selecione uma data",
|
|
78
|
-
selectDateRange: "Selecione um intervalo de datas",
|
|
79
|
-
selectedDateIsNotAvailable: "A data selecionada não está disponível"
|
|
80
|
-
},
|
|
81
|
-
"zh-CN": {
|
|
82
|
-
datePicker: "日期选择器",
|
|
83
|
-
provideDateInAFormat: "提供 YYYY-MM-DD 格式的日期",
|
|
84
|
-
selectDate: "选择日期",
|
|
85
|
-
selectDateRange: "选择日期范围",
|
|
86
|
-
selectedDateIsNotAvailable: "所选日期不可用"
|
|
87
|
-
}
|
|
88
|
-
}, De = ({
|
|
89
|
-
datePickerValue: d,
|
|
90
|
-
isDateIncorrect: t,
|
|
91
|
-
isMonthVariant: a,
|
|
92
|
-
placeholder: e
|
|
93
|
-
}) => {
|
|
94
|
-
var k;
|
|
95
|
-
const { locale: r, t: b } = L(), { formatDate: A } = V(), c = u((k = d.value) == null ? void 0 : k.toDateString());
|
|
96
|
-
return {
|
|
97
|
-
// Values
|
|
98
|
-
dateDisplayValue: p(() => {
|
|
99
|
-
if (t.value)
|
|
100
|
-
return c.value;
|
|
101
|
-
if (!d.value)
|
|
102
|
-
return (e == null ? void 0 : e.value) || b("selectDate");
|
|
103
|
-
const o = a != null && a.value ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
104
|
-
return Z(r.value, o).format(d.value);
|
|
105
|
-
}),
|
|
106
|
-
textInputValue: c,
|
|
107
|
-
// Methods
|
|
108
|
-
formatTextInputDisplayValue: (o = d.value) => {
|
|
109
|
-
if (t.value)
|
|
110
|
-
return;
|
|
111
|
-
if (!o) {
|
|
112
|
-
c.value = "";
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
const y = a != null && a.value ? N(o) : o;
|
|
116
|
-
c.value = A(y);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}, fe = {
|
|
120
|
-
i18n: { messages: pe },
|
|
121
|
-
name: "bento-date-picker",
|
|
122
|
-
model: { prop: "modelValue" }
|
|
123
|
-
}, me = /* @__PURE__ */ H({
|
|
124
|
-
...fe,
|
|
125
|
-
props: {
|
|
126
|
-
description: { default: void 0 },
|
|
127
|
-
disabled: { type: Boolean, default: !1 },
|
|
128
|
-
errorMessage: { default: null },
|
|
129
|
-
label: { default: void 0 },
|
|
130
|
-
optional: { type: Boolean, default: !1 },
|
|
131
|
-
placeholder: { default: null },
|
|
132
|
-
readonly: { type: Boolean, default: !1 },
|
|
133
|
-
required: { type: Boolean, default: !1 },
|
|
134
|
-
tooltipText: { default: null },
|
|
135
|
-
defaultDisplayMonth: { default: null },
|
|
136
|
-
firstDayOfWeek: { default: void 0 },
|
|
137
|
-
isDateDisabled: { default: void 0 },
|
|
138
|
-
min: { default: null },
|
|
139
|
-
max: { default: null },
|
|
140
|
-
modelValue: { default: null },
|
|
141
|
-
value: { default: null },
|
|
142
|
-
variant: { default: void 0 }
|
|
143
|
-
},
|
|
144
|
-
emits: ["update:model-value", "input"],
|
|
145
|
-
setup(d, { emit: t }) {
|
|
146
|
-
const a = d, e = 1e3, { t: r } = L(), b = v("bento-date-picker-container"), A = v("bento-date-picker-label"), c = v("bento-date-picker-description"), g = v("bento-date-picker-error"), _ = v("bento-date-picker-date-error"), k = p(() => a.label || r("datePicker", { name: b })), o = u(null), y = u(null), n = u(!1), i = u(!1), P = u(void 0), D = u(a.modelValue), { isReadOnly: z } = ie(x(a, "readonly")), { emitValue: f } = oe(t), { resolvedFirstDayOfWeek: W } = ne(x(a, "firstDayOfWeek")), { isFormatValid: C, parseDate: I, onKeyDown: O, autoFormat: M } = V(), q = p(() => ({
|
|
147
|
-
initialFocus: P.value,
|
|
148
|
-
additionalContainers: [y.value.$el]
|
|
149
|
-
}));
|
|
150
|
-
w(
|
|
151
|
-
() => a.disabled,
|
|
152
|
-
(l) => {
|
|
153
|
-
l && i.value && (i.value = !1);
|
|
154
|
-
}
|
|
155
|
-
), w(
|
|
156
|
-
[() => a.value, () => a.modelValue],
|
|
157
|
-
([l, m]) => {
|
|
158
|
-
l && ae(
|
|
159
|
-
'BentoDatePicker "value" property',
|
|
160
|
-
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
161
|
-
"2.0.0"
|
|
162
|
-
), D.value = m ?? l;
|
|
163
|
-
},
|
|
164
|
-
{ immediate: !0 }
|
|
165
|
-
);
|
|
166
|
-
const E = p(() => a.variant === "month"), { dateDisplayValue: G, textInputValue: s, formatTextInputDisplayValue: S } = De({
|
|
167
|
-
datePickerValue: D,
|
|
168
|
-
isDateIncorrect: n,
|
|
169
|
-
isMonthVariant: E,
|
|
170
|
-
placeholder: x(a, "placeholder")
|
|
171
|
-
}), F = p(() => a.isDateDisabled && s.value && C(s.value) && a.isDateDisabled(I(s.value)) && !i.value ? r("selectedDateIsNotAvailable") : n.value ? r("provideDateInAFormat") : null), U = p(() => ({
|
|
172
|
-
"b-date-picker__description--error": a.errorMessage || F.value
|
|
173
|
-
})), J = p(
|
|
174
|
-
() => `${a.description ? c : ""} ${a.errorMessage ? g : ""} ${F.value ? _ : ""}`.trim() || null
|
|
175
|
-
), B = (l) => a.min && l <= a.min || a.max && l >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(l) : !0, R = () => {
|
|
176
|
-
i.value = !1;
|
|
177
|
-
}, Y = () => {
|
|
178
|
-
i.value = !0, S();
|
|
179
|
-
}, K = (l) => {
|
|
180
|
-
n.value = !1, R(), f(l);
|
|
181
|
-
}, j = async () => {
|
|
182
|
-
n.value && (n.value = !1, s.value = null), f(null);
|
|
183
|
-
}, X = (l) => {
|
|
184
|
-
O(l);
|
|
185
|
-
}, h = (l) => {
|
|
186
|
-
if (l.length < 10)
|
|
187
|
-
return;
|
|
188
|
-
C(l) && B(I(l)) ? (n.value = !1, f(I(l))) : l && (n.value = !0, f(null));
|
|
189
|
-
}, T = re(h, e);
|
|
190
|
-
return { __sfc: !0, DEBOUNCE_TIME: e, props: a, emit: t, t: r, datePickerContainerId: b, labelId: A, descriptionId: c, errorId: g, dateErrorId: _, popoverAriaLabel: k, calendarContainerRef: o, inputContainerRef: y, isDateIncorrect: n, isDatePickerOpen: i, initialFocusOnDatePickerOpen: P, internalModelValue: D, isReadOnly: z, emitValue: f, resolvedFirstDayOfWeek: W, isFormatValid: C, parseDate: I, onKeyDown: O, autoFormat: M, computedTrapAllOptions: q, isMonthVariant: E, dateDisplayValue: G, textInputValue: s, formatTextInputDisplayValue: S, dateErrorText: F, descriptionConditionalClasses: U, ariaDescribedBy: J, isDateEnabled: B, closeDatePicker: R, openDatePicker: Y, onDateSelected: K, clearDatePickerValue: j, onDateKeyDown: X, validateDate: h, validateDateDebounced: T, onDateInputChange: (l) => {
|
|
191
|
-
s.value = M(l), i.value ? T(s.value) : h(s.value);
|
|
192
|
-
}, onSpaceBarOrEnter: async (l) => {
|
|
193
|
-
var m;
|
|
194
|
-
i.value || (l.preventDefault(), Y(), await Q(), D.value || (S(/* @__PURE__ */ new Date()), f(/* @__PURE__ */ new Date())), P.value = ((m = o.value) == null ? void 0 : m.$refs.calendarRef[0].focusOnDate(
|
|
195
|
-
a.variant === "month" ? N(D.value) : D.value,
|
|
196
|
-
!0
|
|
197
|
-
)) ?? void 0);
|
|
198
|
-
}, BentoPopover: ee, BentoTypography: te, Calendar: $, ErrorMessage: ce, FieldLabel: de, DropdownInputDefault: le, vBentoClickOutsideDirective: se };
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
var ve = function() {
|
|
202
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
203
|
-
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(r) {
|
|
204
|
-
return !r.type.indexOf("key") && t._k(r.keyCode, "space", 32, r.key, [" ", "Spacebar"]) ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
205
|
-
}, function(r) {
|
|
206
|
-
return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
207
|
-
}] } }, [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(r) {
|
|
208
|
-
return !r.type.indexOf("key") && t._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : e.closeDatePicker.apply(null, arguments);
|
|
209
|
-
} } }, [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);
|
|
210
|
-
}, be = [], ke = /* @__PURE__ */ ue(
|
|
211
|
-
me,
|
|
212
|
-
ve,
|
|
213
|
-
be,
|
|
214
|
-
!1,
|
|
215
|
-
null,
|
|
216
|
-
"307fb52e"
|
|
217
|
-
);
|
|
218
|
-
const Te = ke.exports;
|
|
219
|
-
export {
|
|
220
|
-
Te as B
|
|
221
|
-
};
|
|
222
|
-
//# sourceMappingURL=date-picker.Dln8ocL4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.Dln8ocL4.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,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