@adyen/bento-vue3 1.89.2 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/index.d.ts +767 -522
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
- package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
- package/dist/chunks/action-bar.BPS3wPde.js +336 -0
- package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.BPS3wPde.js.map} +1 -1
- package/dist/chunks/ai-tag.D7shWB_x.js +137 -0
- package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.D7shWB_x.js.map} +1 -1
- package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
- package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
- package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
- package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
- package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BxcS7Pao.js} +132 -125
- package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BxcS7Pao.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.BKdNXYgU.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.BKdNXYgU.js.map} +1 -1
- package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.DLiM8KZL.js} +203 -189
- package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.DLiM8KZL.js.map} +1 -1
- package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.qm-kFNQv.js} +460 -428
- package/dist/chunks/calendar.qm-kFNQv.js.map +1 -0
- package/dist/chunks/card.BEChcEqg.js +223 -0
- package/dist/chunks/{card.CoxQ_L0w.js.map → card.BEChcEqg.js.map} +1 -1
- package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.i3W8WO-7.js} +4 -4
- package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.i3W8WO-7.js.map} +1 -1
- package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BPrymcRl.js} +68 -61
- package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BPrymcRl.js.map} +1 -1
- package/dist/chunks/chip.DFldnqfz.js +72 -0
- package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
- package/dist/chunks/{click-outside.BPylIosK.js → click-outside.B0whuTUU.js} +2 -2
- package/dist/chunks/{click-outside.BPylIosK.js.map → click-outside.B0whuTUU.js.map} +1 -1
- package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BG5ZmCrb.js} +113 -106
- package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BG5ZmCrb.js.map} +1 -1
- package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.DqRpF9bh.js} +2 -2
- package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.DqRpF9bh.js.map} +1 -1
- package/dist/chunks/copy.CL893i9-.js +114 -0
- package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
- package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
- package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
- package/dist/chunks/country.types.6a7xxZIR.js +26 -0
- package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
- package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.C7mfUXOl.js} +3 -3
- package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.C7mfUXOl.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.B50DIXjK.js} +3 -3
- package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.B50DIXjK.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.CKdZb6EN.js} +4 -4
- package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.CKdZb6EN.js.map} +1 -1
- package/dist/chunks/data-grid.DvMe72LK.js +4247 -0
- package/dist/chunks/data-grid.DvMe72LK.js.map +1 -0
- package/dist/chunks/date-picker.CidHad1p.js +269 -0
- package/dist/chunks/date-picker.CidHad1p.js.map +1 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js +1027 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js.map +1 -0
- package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
- package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
- package/dist/chunks/{directive.Dpivxq_t.js → directive.C8kY-ZW-.js} +2 -2
- package/dist/chunks/{directive.Dpivxq_t.js.map → directive.C8kY-ZW-.js.map} +1 -1
- package/dist/chunks/draggable-handle.CySRx1tb.js +171 -0
- package/dist/chunks/draggable-handle.CySRx1tb.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.wcJ6Mgqe.js} +5 -5
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.wcJ6Mgqe.js.map} +1 -1
- package/dist/chunks/dropdown.DHoL50gV.js +1214 -0
- package/dist/chunks/dropdown.DHoL50gV.js.map +1 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js +55 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js.map +1 -0
- package/dist/chunks/field-label.DZYFjFgr.js +111 -0
- package/dist/chunks/field-label.DZYFjFgr.js.map +1 -0
- package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.Dbg3vfZ_.js} +606 -584
- package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.Dbg3vfZ_.js.map} +1 -1
- package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.Dt-cU3zy.js} +1559 -1471
- package/dist/chunks/filter-bar.Dt-cU3zy.js.map +1 -0
- package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
- package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
- package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.CYBdKDPo.js} +2 -2
- package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.CYBdKDPo.js.map} +1 -1
- package/dist/chunks/form-layout-title.B3ePK3yi.js +253 -0
- package/dist/chunks/form-layout-title.B3ePK3yi.js.map +1 -0
- package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.COak4D8-.js} +98 -84
- package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.COak4D8-.js.map} +1 -1
- package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.DqioajcO.js} +1091 -1070
- package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.DqioajcO.js.map} +1 -1
- package/dist/chunks/{header.o-7SyHtU.js → header.C21yzWrk.js} +3 -3
- package/dist/chunks/{header.o-7SyHtU.js.map → header.C21yzWrk.js.map} +1 -1
- package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
- package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
- package/dist/chunks/input-field-password.DyUphhxB.js +353 -0
- package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.DyUphhxB.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.BXVaC5ra.js} +12 -5
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.BXVaC5ra.js.map} +1 -1
- package/dist/chunks/input-field.DkUFvIWt.js +326 -0
- package/dist/chunks/input-field.DkUFvIWt.js.map +1 -0
- package/dist/chunks/input-time.WI_qdwJc.js +122 -0
- package/dist/chunks/input-time.WI_qdwJc.js.map +1 -0
- package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
- package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
- package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
- package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.c6QphYQo.js} +54 -47
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.c6QphYQo.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js} +48 -41
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js.map} +1 -1
- package/dist/chunks/on-click-outside.BgIzQ2G1.js +108 -0
- package/dist/chunks/on-click-outside.BgIzQ2G1.js.map +1 -0
- package/dist/chunks/{pagination.dpVc6Yt0.js → pagination.Cu85Lqms.js} +150 -138
- package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.Cu85Lqms.js.map} +1 -1
- package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
- package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
- package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.CfMr1fmW.js} +4 -4
- package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.CfMr1fmW.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Bf9EWzNk.js} +421 -413
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Bf9EWzNk.js.map} +1 -1
- package/dist/chunks/search-bar.p6kHCCvT.js +114 -0
- package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.p6kHCCvT.js.map} +1 -1
- package/dist/chunks/secondary-nav.CaxiyVaO.js +285 -0
- package/dist/chunks/secondary-nav.CaxiyVaO.js.map +1 -0
- package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
- package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
- package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.58XZj_SJ.js} +3 -3
- package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.58XZj_SJ.js.map} +1 -1
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.CAVhSs-O.js} +56 -49
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.CAVhSs-O.js.map} +1 -1
- package/dist/chunks/step.AsX2jAeL.js +268 -0
- package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
- package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
- package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.CDithi8M.js} +5 -5
- package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.CDithi8M.js.map} +1 -1
- package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
- package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
- package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
- package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
- package/dist/chunks/textarea.JGXAlpx9.js +257 -0
- package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.JGXAlpx9.js.map} +1 -1
- package/dist/chunks/timeline-item.BNFPpQz1.js +433 -0
- package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.BNFPpQz1.js.map} +1 -1
- package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
- package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
- package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
- package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js} +120 -113
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.Bx8uuky9.js} +436 -410
- package/dist/chunks/use-cached-selected-values.Bx8uuky9.js.map +1 -0
- package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
- package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BOuXpRb-.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BOuXpRb-.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable.js +1383 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +10 -11
- 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 +284 -279
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +26 -25
- package/dist/internal.js.map +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +7 -10
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
- package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
- package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
- package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
- package/dist/chunks/calendar.DcCqkSNJ.js.map +0 -1
- package/dist/chunks/card.CoxQ_L0w.js +0 -216
- package/dist/chunks/chip.CdgpQyXN.js +0 -65
- package/dist/chunks/copy.C2kQ1PbI.js +0 -107
- package/dist/chunks/country.types.DjpMGz7a.js +0 -19
- package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
- package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
- package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
- package/dist/chunks/date-picker.dlzZ_-5f.js.map +0 -1
- package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
- package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
- package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js +0 -408
- package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js.map +0 -1
- package/dist/chunks/dropdown.MhmX1P9o.js +0 -799
- package/dist/chunks/dropdown.MhmX1P9o.js.map +0 -1
- package/dist/chunks/error-message.DCgo8q20.js +0 -143
- package/dist/chunks/error-message.DCgo8q20.js.map +0 -1
- package/dist/chunks/filter-bar.CkAjLQol.js.map +0 -1
- package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
- package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
- package/dist/chunks/form-layout-title.DW5Kg1rh.js.map +0 -1
- package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
- package/dist/chunks/input-field.CfU0ZKtL.js +0 -315
- package/dist/chunks/input-field.CfU0ZKtL.js.map +0 -1
- package/dist/chunks/on-click-outside.ZUMLlxE_.js +0 -90
- package/dist/chunks/on-click-outside.ZUMLlxE_.js.map +0 -1
- package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
- package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
- package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
- package/dist/chunks/step.BlwoLfdw.js +0 -259
- package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
- package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
- package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
- package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.ClEJRFAd.js.map +0 -1
- package/dist/draggable-handle.js +0 -155
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import { ref as s, computed as d, defineComponent as se, toRef as O, watch as x, withDirectives as de, openBlock as p, createElementBlock as ue, withKeys as w, createBlock as b, unref as t, createCommentVNode as y, createElementVNode as ce, createVNode as K, normalizeClass as pe, withCtx as U, createTextVNode as me, toDisplayString as ve, nextTick as fe } from "vue";
|
|
2
|
-
import { g as De, s as L, b as be } from "./calendar.DcCqkSNJ.js";
|
|
3
|
-
import { h as ye } from "./button-actions.cMQWyZne.js";
|
|
4
|
-
import { d as ke, B as ge } from "./typography.B3J6_tYk.js";
|
|
5
|
-
import { d as Ie } from "./debounce.DUTu11PS.js";
|
|
6
|
-
import { g as k } from "./generate-uid.DBWe4g6T.js";
|
|
7
|
-
import { u as W } from "./index.B875RXHM.js";
|
|
8
|
-
import { u as he } from "./form-field.D_2g7vaP.js";
|
|
9
|
-
import { u as j, a as Ce } from "./use-date-input-formatter.CDRzd-hW.js";
|
|
10
|
-
import { u as Be } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
11
|
-
import { B as Me } from "./directive.Dpivxq_t.js";
|
|
12
|
-
import { D as Ve } from "./dropdown-default-textbox.bq9AlGzJ.js";
|
|
13
|
-
import { F as Fe, E as $ } from "./error-message.DCgo8q20.js";
|
|
14
|
-
import { _ as Ee } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
15
|
-
import "../assets/date-picker.css";
|
|
16
|
-
const A = {
|
|
17
|
-
"en-US": { datePicker: "Date picker", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
|
|
18
|
-
"ja-JP": { datePicker: "日付ピッカー", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
|
|
19
|
-
"pt-BR": { datePicker: "Seletor de datas", provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" }
|
|
20
|
-
}, Oe = ({
|
|
21
|
-
datePickerValue: u,
|
|
22
|
-
isDateIncorrect: g,
|
|
23
|
-
isMonthVariant: B,
|
|
24
|
-
placeholder: a
|
|
25
|
-
}) => {
|
|
26
|
-
const { locale: M, t: m } = W({ messages: A }), { formatDate: v } = j(), n = s(u.value?.toDateString());
|
|
27
|
-
return {
|
|
28
|
-
// Values
|
|
29
|
-
dateDisplayValue: d(() => {
|
|
30
|
-
if (g.value)
|
|
31
|
-
return n.value;
|
|
32
|
-
if (!u.value)
|
|
33
|
-
return a?.value || m("selectDate");
|
|
34
|
-
const o = B?.value ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
35
|
-
return De(M.value, o).format(u.value);
|
|
36
|
-
}),
|
|
37
|
-
textInputValue: n,
|
|
38
|
-
// Methods
|
|
39
|
-
formatTextInputDisplayValue: (o = u.value) => {
|
|
40
|
-
if (g.value)
|
|
41
|
-
return;
|
|
42
|
-
if (!o) {
|
|
43
|
-
n.value = "";
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const I = B?.value ? L(o) : o;
|
|
47
|
-
n.value = v(I);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}, we = {
|
|
51
|
-
i18n: { messages: A },
|
|
52
|
-
name: "bento-date-picker",
|
|
53
|
-
model: { prop: "modelValue" }
|
|
54
|
-
}, Ae = /* @__PURE__ */ se({
|
|
55
|
-
...we,
|
|
56
|
-
props: {
|
|
57
|
-
defaultDisplayMonth: { default: null },
|
|
58
|
-
firstDayOfWeek: { default: void 0 },
|
|
59
|
-
isDateDisabled: { default: void 0 },
|
|
60
|
-
min: { default: null },
|
|
61
|
-
max: { default: null },
|
|
62
|
-
modelValue: { default: null },
|
|
63
|
-
value: { default: null },
|
|
64
|
-
variant: { default: void 0 },
|
|
65
|
-
description: { default: void 0 },
|
|
66
|
-
disabled: { type: Boolean, default: !1 },
|
|
67
|
-
errorMessage: { default: null },
|
|
68
|
-
label: { default: void 0 },
|
|
69
|
-
optional: { type: Boolean, default: !1 },
|
|
70
|
-
placeholder: { default: null },
|
|
71
|
-
readonly: { type: Boolean, default: !1 },
|
|
72
|
-
required: { type: Boolean, default: !1 },
|
|
73
|
-
tooltipText: { default: null }
|
|
74
|
-
},
|
|
75
|
-
emits: ["update:model-value", "input"],
|
|
76
|
-
setup(u, { emit: g }) {
|
|
77
|
-
const a = u, M = g, { t: m } = W({ messages: A }), v = k("bento-date-picker-container"), n = k("bento-date-picker-label"), P = k("bento-date-picker-description"), V = k("bento-date-picker-error"), o = k("bento-date-picker-date-error"), I = d(() => a.label || m("datePicker", { name: v })), T = s(null), h = s(null), i = s(!1), l = s(!1), S = s(void 0), c = s(a.modelValue), { isReadOnly: z } = Be(O(a, "readonly")), { emitValue: f } = he(M), { resolvedFirstDayOfWeek: J } = Ce(O(a, "firstDayOfWeek")), { isFormatValid: R, parseDate: F, onKeyDown: G, autoFormat: H } = j(), Q = d(() => ({
|
|
78
|
-
initialFocus: S.value,
|
|
79
|
-
additionalContainers: [h.value.$el]
|
|
80
|
-
}));
|
|
81
|
-
x(
|
|
82
|
-
() => a.disabled,
|
|
83
|
-
(e) => {
|
|
84
|
-
e && l.value && (l.value = !1);
|
|
85
|
-
}
|
|
86
|
-
), x(
|
|
87
|
-
[() => a.value, () => a.modelValue],
|
|
88
|
-
([e, E]) => {
|
|
89
|
-
e && ke(
|
|
90
|
-
'BentoDatePicker "value" property',
|
|
91
|
-
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
92
|
-
"2.0.0"
|
|
93
|
-
), c.value = E ?? e;
|
|
94
|
-
},
|
|
95
|
-
{ immediate: !0 }
|
|
96
|
-
);
|
|
97
|
-
const X = d(() => a.variant === "month"), { dateDisplayValue: Z, textInputValue: r, formatTextInputDisplayValue: N } = Oe({
|
|
98
|
-
datePickerValue: c,
|
|
99
|
-
isDateIncorrect: i,
|
|
100
|
-
isMonthVariant: X,
|
|
101
|
-
placeholder: O(a, "placeholder")
|
|
102
|
-
}), D = d(() => a.isDateDisabled && r.value && R(r.value) && a.isDateDisabled(F(r.value)) && !l.value ? m("selectedDateIsNotAvailable") : i.value ? m("provideDateInAFormat") : null), ee = d(() => ({
|
|
103
|
-
"b-date-picker__description--error": a.errorMessage || D.value
|
|
104
|
-
})), ae = d(
|
|
105
|
-
() => `${a.description ? P : ""} ${a.errorMessage ? V : ""} ${D.value ? o : ""}`.trim() || null
|
|
106
|
-
), te = (e) => a.min && e <= a.min || a.max && e >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(e) : !0, C = () => {
|
|
107
|
-
l.value = !1;
|
|
108
|
-
}, _ = () => {
|
|
109
|
-
l.value = !0, N();
|
|
110
|
-
}, le = (e) => {
|
|
111
|
-
i.value = !1, C(), f(e);
|
|
112
|
-
}, oe = async () => {
|
|
113
|
-
i.value && (i.value = !1, r.value = null), f(null);
|
|
114
|
-
}, re = (e) => {
|
|
115
|
-
G(e);
|
|
116
|
-
}, Y = (e) => {
|
|
117
|
-
if (e.length < 10)
|
|
118
|
-
return;
|
|
119
|
-
R(e) && te(F(e)) ? (i.value = !1, f(F(e))) : e && (i.value = !0, f(null));
|
|
120
|
-
}, ne = Ie(Y, 1e3), ie = (e) => {
|
|
121
|
-
r.value = H(e), l.value ? ne(r.value) : Y(r.value);
|
|
122
|
-
}, q = async (e) => {
|
|
123
|
-
l.value || (e.preventDefault(), _(), await fe(), c.value || (N(/* @__PURE__ */ new Date()), f(/* @__PURE__ */ new Date())), S.value = T.value?.$refs.calendarRef[0].focusOnDate(
|
|
124
|
-
a.variant === "month" ? L(c.value) : c.value,
|
|
125
|
-
!0
|
|
126
|
-
) ?? void 0);
|
|
127
|
-
};
|
|
128
|
-
return (e, E) => de((p(), ue("div", {
|
|
129
|
-
class: "b-date-picker",
|
|
130
|
-
onKeydownCapture: [
|
|
131
|
-
w(q, ["space"]),
|
|
132
|
-
w(q, ["enter"])
|
|
133
|
-
]
|
|
134
|
-
}, [
|
|
135
|
-
e.label ? (p(), b(t(Fe), {
|
|
136
|
-
key: 0,
|
|
137
|
-
id: t(n),
|
|
138
|
-
label: e.label,
|
|
139
|
-
"tooltip-text": e.tooltipText,
|
|
140
|
-
optional: e.optional,
|
|
141
|
-
required: e.required
|
|
142
|
-
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : y("", !0),
|
|
143
|
-
ce("div", null, [
|
|
144
|
-
K(t(Ve), {
|
|
145
|
-
ref_key: "inputContainerRef",
|
|
146
|
-
ref: h,
|
|
147
|
-
"always-combobox-is-input": "",
|
|
148
|
-
ariaControls: t(v),
|
|
149
|
-
ariaExpanded: l.value,
|
|
150
|
-
"aria-labelledby": e.label ? t(n) : null,
|
|
151
|
-
"aria-label": e.label ? null : I.value,
|
|
152
|
-
"aria-describedby": ae.value,
|
|
153
|
-
"aria-required": e.required,
|
|
154
|
-
disabled: e.disabled,
|
|
155
|
-
"dynamic-filtering": "",
|
|
156
|
-
"is-invalid": !!e.errorMessage || !!D.value,
|
|
157
|
-
open: l.value,
|
|
158
|
-
value: t(r),
|
|
159
|
-
"display-value": t(Z),
|
|
160
|
-
"debounce-time": 0,
|
|
161
|
-
readonly: t(z),
|
|
162
|
-
onInput: ie,
|
|
163
|
-
onOpen: _,
|
|
164
|
-
onKeydown: re,
|
|
165
|
-
onClear: oe,
|
|
166
|
-
onClose: C
|
|
167
|
-
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-label", "aria-describedby", "aria-required", "disabled", "is-invalid", "open", "value", "display-value", "readonly"])
|
|
168
|
-
]),
|
|
169
|
-
D.value ? (p(), b(t($), {
|
|
170
|
-
key: 1,
|
|
171
|
-
id: t(o),
|
|
172
|
-
"error-message": D.value,
|
|
173
|
-
class: "b-date-picker__error-message"
|
|
174
|
-
}, null, 8, ["id", "error-message"])) : y("", !0),
|
|
175
|
-
e.errorMessage ? (p(), b(t($), {
|
|
176
|
-
key: 2,
|
|
177
|
-
id: t(V),
|
|
178
|
-
"error-message": e.errorMessage,
|
|
179
|
-
class: "b-date-picker__error-message"
|
|
180
|
-
}, null, 8, ["id", "error-message"])) : y("", !0),
|
|
181
|
-
e.description ? (p(), b(t(ge), {
|
|
182
|
-
key: 3,
|
|
183
|
-
class: pe(["b-date-picker__description", ee.value]),
|
|
184
|
-
el: "span"
|
|
185
|
-
}, {
|
|
186
|
-
default: U(() => [
|
|
187
|
-
me(ve(e.description), 1)
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
}, 8, ["class"])) : y("", !0),
|
|
191
|
-
h.value ? (p(), b(t(ye), {
|
|
192
|
-
key: 4,
|
|
193
|
-
id: t(v),
|
|
194
|
-
class: "b-date-picker__container",
|
|
195
|
-
role: "dialog",
|
|
196
|
-
open: l.value,
|
|
197
|
-
"target-element": h.value,
|
|
198
|
-
"aria-label": I.value,
|
|
199
|
-
"aria-modal": !0,
|
|
200
|
-
position: "bottom-start",
|
|
201
|
-
"fit-content": "",
|
|
202
|
-
"trap-all": "",
|
|
203
|
-
"trap-all-options": Q.value,
|
|
204
|
-
onKeydown: w(C, ["esc", "native"])
|
|
205
|
-
}, {
|
|
206
|
-
default: U(() => [
|
|
207
|
-
K(t(be), {
|
|
208
|
-
ref_key: "calendarContainerRef",
|
|
209
|
-
ref: T,
|
|
210
|
-
"default-display-month": e.defaultDisplayMonth,
|
|
211
|
-
"first-day-of-week": t(J),
|
|
212
|
-
"is-date-disabled": e.isDateDisabled,
|
|
213
|
-
"number-of-months": 1,
|
|
214
|
-
value: c.value,
|
|
215
|
-
min: e.min,
|
|
216
|
-
max: e.max,
|
|
217
|
-
variant: e.variant,
|
|
218
|
-
onInput: le
|
|
219
|
-
}, null, 8, ["default-display-month", "first-day-of-week", "is-date-disabled", "value", "min", "max", "variant"])
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
}, 8, ["id", "open", "target-element", "aria-label", "trap-all-options"])) : y("", !0)
|
|
223
|
-
], 32)), [
|
|
224
|
-
[t(Me), C]
|
|
225
|
-
]);
|
|
226
|
-
}
|
|
227
|
-
}), je = /* @__PURE__ */ Ee(Ae, [["__scopeId", "data-v-2e9461af"]]);
|
|
228
|
-
export {
|
|
229
|
-
je as B
|
|
230
|
-
};
|
|
231
|
-
//# sourceMappingURL=date-picker.dlzZ_-5f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.dlzZ_-5f.js","sources":["../../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../../vue2/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 = withDefaults(defineProps<BentoDatePickerProps>(), {\n defaultDisplayMonth: null,\n description: undefined,\n disabled: false,\n errorMessage: null,\n firstDayOfWeek: undefined,\n isDateDisabled: undefined,\n label: undefined,\n max: null,\n min: null,\n modelValue: null,\n optional: false,\n placeholder: null,\n readonly: false,\n required: false,\n tooltipText: null,\n value: null,\n variant: undefined, // Default will be set by @/internal/calendar\n });\n\n const emit = defineEmits<BentoDatePickerEmits>();\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","messages","formatDate","useDateInputFormatter","textInputValue","ref","computed","dateFormatOptions","getDateTimeFormatter","dateToFormat","date","startOfMonth","__default__","props","__props","emit","__emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","initialFocusOnDatePickerOpen","internalModelValue","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","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","onDateInputChange","onSpaceBarOrEnter","nextTick"],"mappings":";;;;;;;;;;;;;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