@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
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { ref as m, computed as r, defineComponent as me, toRef as E, watch as G, withDirectives as ve, openBlock as d, createElementBlock as fe, withKeys as R, createBlock as p, unref as t, createCommentVNode as h, createElementVNode as De, normalizeClass as be, withCtx as x, createTextVNode as ye, toDisplayString as ke, createVNode as ge, nextTick as he } from "vue";
|
|
2
|
+
import { g as Ae, s as _, b as Ie, e as Me, f as Se, p as Fe } from "./calendar.qm-kFNQv.js";
|
|
3
|
+
import { h as Ce } from "./button-actions.DLiM8KZL.js";
|
|
4
|
+
import { d as Be, B as Pe } from "./typography.B3J6_tYk.js";
|
|
5
|
+
import { D as Ne } from "./dropdown.DHoL50gV.js";
|
|
6
|
+
import { B as Ve } from "./input-field.DkUFvIWt.js";
|
|
7
|
+
import { d as Ee } from "./use-cached-selected-values.Bx8uuky9.js";
|
|
8
|
+
import { g as A } from "./generate-uid.DBWe4g6T.js";
|
|
9
|
+
import { u as j } from "./index.B875RXHM.js";
|
|
10
|
+
import { u as Re } from "./form-field.D_2g7vaP.js";
|
|
11
|
+
import { u as X, a as Ye } from "./use-date-input-formatter.BOuXpRb-.js";
|
|
12
|
+
import { u as Te } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
13
|
+
import { u as we } from "./use-touch-device.DTqFAbXh.js";
|
|
14
|
+
import { B as Oe } from "./directive.C8kY-ZW-.js";
|
|
15
|
+
import { F as qe } from "./field-label.DZYFjFgr.js";
|
|
16
|
+
import { E as J } from "./error-message.Dyvrw6ZB.js";
|
|
17
|
+
import { _ as ze } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
18
|
+
import "../assets/date-picker.css";
|
|
19
|
+
const Y = {
|
|
20
|
+
"de-DE": { datePicker: "Datumsauswahl", provideDateInAFormat: "Geben Sie das Datum im Format YYYY-MM-DD an", selectDate: "Wählen Sie ein Datum", selectDateRange: "Wählen Sie einen Datumsbereich aus", selectedDateIsNotAvailable: "Ausgewähltes Datum ist nicht verfügbar" },
|
|
21
|
+
"en-GB": { datePicker: "Date picker", provideDateInAFormat: "Enter date in YYYY-MM-DD format", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
|
|
22
|
+
"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" },
|
|
23
|
+
"es-ES": { datePicker: "Selector de fecha", provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD", selectDate: "Selecciona una fecha", selectDateRange: "Selecciona un rango de fechas", selectedDateIsNotAvailable: "La fecha seleccionada no está disponible" },
|
|
24
|
+
"es-MX": { datePicker: "Selector de fecha", provideDateInAFormat: "Proporciona la fecha en formato AAAA-MM-DD", selectDate: "Selecciona una fecha", selectDateRange: "Selecciona un rango de fechas", selectedDateIsNotAvailable: "La fecha seleccionada no está disponible" },
|
|
25
|
+
"fr-FR": { datePicker: "Sélecteur de date", provideDateInAFormat: "Fournissez la date au format AAAA-MM-JJ", selectDate: "Sélectionnez une date", selectDateRange: "Sélectionnez une plage de dates", selectedDateIsNotAvailable: "La date sélectionnée n’est pas disponible" },
|
|
26
|
+
"it-IT": { datePicker: "Selezionatore di date", provideDateInAFormat: "Inserisci la data nel formato AAAA-MM-GG", selectDate: "Seleziona una data", selectDateRange: "Seleziona un intervallo di date", selectedDateIsNotAvailable: "La data selezionata non è disponibile" },
|
|
27
|
+
"ja-JP": { datePicker: "日付ピッカー", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
|
|
28
|
+
"pt-BR": { datePicker: "Seletor de data", provideDateInAFormat: "Inclua 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" },
|
|
29
|
+
"zh-CN": { datePicker: "日期选择器", provideDateInAFormat: "提供 YYYY-MM-DD 格式的日期", selectDate: "选择日期", selectDateRange: "选择日期范围", selectedDateIsNotAvailable: "所选日期不可用" }
|
|
30
|
+
}, Le = ({
|
|
31
|
+
datePickerValue: v,
|
|
32
|
+
isDateIncorrect: I,
|
|
33
|
+
isMonthVariant: C,
|
|
34
|
+
placeholder: a
|
|
35
|
+
}) => {
|
|
36
|
+
const { locale: B, t: b } = j({ messages: Y }), { formatDate: y } = X(), o = m(v.value?.toDateString());
|
|
37
|
+
return {
|
|
38
|
+
// Values
|
|
39
|
+
dateDisplayValue: r(() => {
|
|
40
|
+
if (I.value)
|
|
41
|
+
return o.value;
|
|
42
|
+
if (!v.value)
|
|
43
|
+
return a?.value || b("selectDate");
|
|
44
|
+
const i = C?.value ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
45
|
+
return Ae(B.value, i).format(v.value);
|
|
46
|
+
}),
|
|
47
|
+
textInputValue: o,
|
|
48
|
+
// Methods
|
|
49
|
+
formatTextInputDisplayValue: (i = v.value) => {
|
|
50
|
+
if (I.value)
|
|
51
|
+
return;
|
|
52
|
+
if (!i) {
|
|
53
|
+
o.value = "";
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const k = C?.value ? _(i) : i;
|
|
57
|
+
o.value = y(k);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}, $e = {
|
|
61
|
+
i18n: { messages: Y },
|
|
62
|
+
name: "bento-date-picker",
|
|
63
|
+
model: { prop: "modelValue" }
|
|
64
|
+
}, Ke = /* @__PURE__ */ me({
|
|
65
|
+
...$e,
|
|
66
|
+
props: {
|
|
67
|
+
defaultDisplayMonth: { default: null },
|
|
68
|
+
firstDayOfWeek: { default: void 0 },
|
|
69
|
+
isDateDisabled: { default: void 0 },
|
|
70
|
+
min: { default: null },
|
|
71
|
+
max: { default: null },
|
|
72
|
+
modelValue: { default: null },
|
|
73
|
+
value: { default: null },
|
|
74
|
+
variant: { default: void 0 },
|
|
75
|
+
description: { default: void 0 },
|
|
76
|
+
disabled: { type: Boolean, default: !1 },
|
|
77
|
+
errorMessage: { default: null },
|
|
78
|
+
label: { default: void 0 },
|
|
79
|
+
optional: { type: Boolean, default: !1 },
|
|
80
|
+
placeholder: { default: null },
|
|
81
|
+
readonly: { type: Boolean, default: !1 },
|
|
82
|
+
required: { type: Boolean, default: !1 },
|
|
83
|
+
tooltipText: { default: null }
|
|
84
|
+
},
|
|
85
|
+
emits: ["update:model-value", "input"],
|
|
86
|
+
setup(v, { emit: I }) {
|
|
87
|
+
const a = v, B = I, { t: b } = j({ messages: Y }), y = A("bento-date-picker-container"), o = A("bento-date-picker-label"), T = A("bento-date-picker-description"), P = A("bento-date-picker-error"), i = A("bento-date-picker-date-error"), k = r(() => a.label || b("datePicker", { name: y })), w = m(null), g = m(null), u = m(!1), l = m(!1), O = m(void 0), c = m(a.modelValue), { isReadOnly: q } = Te(E(a, "readonly")), { emitValue: n } = Re(B), { resolvedFirstDayOfWeek: H } = Ye(E(a, "firstDayOfWeek")), { isFormatValid: z, parseDate: M, onKeyDown: Q, autoFormat: Z } = X(), { isTouchDevice: N } = we(), ee = r(() => ({
|
|
88
|
+
initialFocus: O.value,
|
|
89
|
+
additionalContainers: [g.value.$el]
|
|
90
|
+
}));
|
|
91
|
+
G(
|
|
92
|
+
() => a.disabled,
|
|
93
|
+
(e) => {
|
|
94
|
+
e && l.value && (l.value = !1);
|
|
95
|
+
}
|
|
96
|
+
), G(
|
|
97
|
+
[() => a.value, () => a.modelValue],
|
|
98
|
+
([e, D]) => {
|
|
99
|
+
e && Be(
|
|
100
|
+
'BentoDatePicker "value" property',
|
|
101
|
+
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
102
|
+
"2.0.0"
|
|
103
|
+
), c.value = D ?? e;
|
|
104
|
+
},
|
|
105
|
+
{ immediate: !0 }
|
|
106
|
+
);
|
|
107
|
+
const S = r(() => a.variant === "month"), { dateDisplayValue: ae, textInputValue: s, formatTextInputDisplayValue: L } = Le({
|
|
108
|
+
datePickerValue: c,
|
|
109
|
+
isDateIncorrect: u,
|
|
110
|
+
isMonthVariant: S,
|
|
111
|
+
placeholder: E(a, "placeholder")
|
|
112
|
+
}), V = (e) => e ? S.value ? Me(e) : Se(e) : "", te = r(() => V(c.value)), le = (e) => {
|
|
113
|
+
if (!e) {
|
|
114
|
+
n(null);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (S.value) {
|
|
118
|
+
n(Fe(e));
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const D = M(e);
|
|
122
|
+
D && n(D);
|
|
123
|
+
}, f = r(() => a.isDateDisabled && s.value && z(s.value) && a.isDateDisabled(M(s.value)) && !l.value ? b("selectedDateIsNotAvailable") : u.value ? b("provideDateInAFormat") : null), re = r(() => ({
|
|
124
|
+
"b-date-picker__description--error": a.errorMessage || f.value
|
|
125
|
+
})), $ = r(
|
|
126
|
+
() => `${a.description ? T : ""} ${a.errorMessage ? P : ""} ${f.value ? i : ""}`.trim() || null
|
|
127
|
+
), oe = r(() => V(a.min)), ie = r(() => V(a.max)), ne = (e) => a.min && e <= a.min || a.max && e >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(e) : !0, F = () => {
|
|
128
|
+
l.value = !1;
|
|
129
|
+
}, K = () => {
|
|
130
|
+
l.value = !0, L();
|
|
131
|
+
}, se = (e) => {
|
|
132
|
+
u.value = !1, F(), n(e);
|
|
133
|
+
}, de = async () => {
|
|
134
|
+
u.value && (u.value = !1, s.value = null), n(null);
|
|
135
|
+
}, ue = (e) => {
|
|
136
|
+
Q(e);
|
|
137
|
+
}, U = (e) => {
|
|
138
|
+
if (e.length < 10)
|
|
139
|
+
return;
|
|
140
|
+
z(e) && ne(M(e)) ? (u.value = !1, n(M(e))) : e && (u.value = !0, n(null));
|
|
141
|
+
}, ce = Ee(U, 1e3), pe = (e) => {
|
|
142
|
+
s.value = Z(e), l.value || N.value ? U(s.value) : ce(s.value);
|
|
143
|
+
}, W = async (e) => {
|
|
144
|
+
l.value || (e.preventDefault(), K(), await he(), c.value || (L(/* @__PURE__ */ new Date()), n(/* @__PURE__ */ new Date())), O.value = w.value?.$refs.calendarRef[0].focusOnDate(
|
|
145
|
+
a.variant === "month" ? _(c.value) : c.value,
|
|
146
|
+
!0
|
|
147
|
+
) ?? void 0);
|
|
148
|
+
};
|
|
149
|
+
return (e, D) => ve((d(), fe("div", {
|
|
150
|
+
class: "b-date-picker",
|
|
151
|
+
onKeydownCapture: [
|
|
152
|
+
R(W, ["space"]),
|
|
153
|
+
R(W, ["enter"])
|
|
154
|
+
]
|
|
155
|
+
}, [
|
|
156
|
+
e.label ? (d(), p(t(qe), {
|
|
157
|
+
key: 0,
|
|
158
|
+
id: t(o),
|
|
159
|
+
label: e.label,
|
|
160
|
+
"tooltip-text": e.tooltipText,
|
|
161
|
+
optional: e.optional,
|
|
162
|
+
required: e.required
|
|
163
|
+
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : h("", !0),
|
|
164
|
+
De("div", null, [
|
|
165
|
+
t(N) ? (d(), p(t(Ve), {
|
|
166
|
+
key: 0,
|
|
167
|
+
ref_key: "inputContainerRef",
|
|
168
|
+
ref: g,
|
|
169
|
+
type: S.value ? "month" : "date",
|
|
170
|
+
"aria-labelledby": e.label ? t(o) : e.$attrs?.["aria-labelledby"],
|
|
171
|
+
"aria-label": e.label || e.$attrs?.["aria-labelledby"] ? null : k.value,
|
|
172
|
+
"aria-describedby": $.value,
|
|
173
|
+
"aria-required": e.required,
|
|
174
|
+
disabled: e.disabled,
|
|
175
|
+
error: !!e.errorMessage || !!f.value,
|
|
176
|
+
"model-value": te.value,
|
|
177
|
+
readonly: t(q),
|
|
178
|
+
min: oe.value,
|
|
179
|
+
max: ie.value,
|
|
180
|
+
"onUpdate:modelValue": le
|
|
181
|
+
}, null, 8, ["type", "aria-labelledby", "aria-label", "aria-describedby", "aria-required", "disabled", "error", "model-value", "readonly", "min", "max"])) : (d(), p(t(Ne), {
|
|
182
|
+
key: 1,
|
|
183
|
+
ref_key: "inputContainerRef",
|
|
184
|
+
ref: g,
|
|
185
|
+
"always-combobox-is-input": "",
|
|
186
|
+
ariaControls: t(y),
|
|
187
|
+
ariaExpanded: l.value,
|
|
188
|
+
"aria-labelledby": e.label ? t(o) : e.$attrs?.["aria-labelledby"],
|
|
189
|
+
"aria-label": e.label ? null : k.value,
|
|
190
|
+
"aria-describedby": $.value,
|
|
191
|
+
"aria-required": e.required,
|
|
192
|
+
disabled: e.disabled,
|
|
193
|
+
"dynamic-filtering": "",
|
|
194
|
+
"is-invalid": !!e.errorMessage || !!f.value,
|
|
195
|
+
open: l.value,
|
|
196
|
+
value: t(s),
|
|
197
|
+
"display-value": t(ae),
|
|
198
|
+
"debounce-time": 0,
|
|
199
|
+
readonly: t(q),
|
|
200
|
+
onInput: pe,
|
|
201
|
+
onOpen: K,
|
|
202
|
+
onKeydown: ue,
|
|
203
|
+
onClear: de,
|
|
204
|
+
onClose: F
|
|
205
|
+
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-label", "aria-describedby", "aria-required", "disabled", "is-invalid", "open", "value", "display-value", "readonly"]))
|
|
206
|
+
]),
|
|
207
|
+
f.value ? (d(), p(t(J), {
|
|
208
|
+
key: 1,
|
|
209
|
+
id: t(i),
|
|
210
|
+
"error-message": f.value,
|
|
211
|
+
class: "b-date-picker__error-message"
|
|
212
|
+
}, null, 8, ["id", "error-message"])) : h("", !0),
|
|
213
|
+
e.errorMessage ? (d(), p(t(J), {
|
|
214
|
+
key: 2,
|
|
215
|
+
id: t(P),
|
|
216
|
+
"error-message": e.errorMessage,
|
|
217
|
+
class: "b-date-picker__error-message"
|
|
218
|
+
}, null, 8, ["id", "error-message"])) : h("", !0),
|
|
219
|
+
e.description ? (d(), p(t(Pe), {
|
|
220
|
+
key: 3,
|
|
221
|
+
class: be(["b-date-picker__description", re.value]),
|
|
222
|
+
el: "span"
|
|
223
|
+
}, {
|
|
224
|
+
default: x(() => [
|
|
225
|
+
ye(ke(e.description), 1)
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["class"])) : h("", !0),
|
|
229
|
+
g.value && !t(N) ? (d(), p(t(Ce), {
|
|
230
|
+
key: 4,
|
|
231
|
+
id: t(y),
|
|
232
|
+
class: "b-date-picker__container",
|
|
233
|
+
role: "dialog",
|
|
234
|
+
open: l.value,
|
|
235
|
+
"target-element": g.value,
|
|
236
|
+
"aria-label": k.value,
|
|
237
|
+
"aria-modal": !0,
|
|
238
|
+
position: "bottom-start",
|
|
239
|
+
"fit-content": "",
|
|
240
|
+
"trap-all": "",
|
|
241
|
+
"trap-all-options": ee.value,
|
|
242
|
+
onKeydown: R(F, ["esc", "native"])
|
|
243
|
+
}, {
|
|
244
|
+
default: x(() => [
|
|
245
|
+
ge(t(Ie), {
|
|
246
|
+
ref_key: "calendarContainerRef",
|
|
247
|
+
ref: w,
|
|
248
|
+
"default-display-month": e.defaultDisplayMonth,
|
|
249
|
+
"first-day-of-week": t(H),
|
|
250
|
+
"is-date-disabled": e.isDateDisabled,
|
|
251
|
+
"number-of-months": 1,
|
|
252
|
+
value: c.value,
|
|
253
|
+
min: e.min,
|
|
254
|
+
max: e.max,
|
|
255
|
+
variant: e.variant,
|
|
256
|
+
onInput: se
|
|
257
|
+
}, null, 8, ["default-display-month", "first-day-of-week", "is-date-disabled", "value", "min", "max", "variant"])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["id", "open", "target-element", "aria-label", "trap-all-options"])) : h("", !0)
|
|
261
|
+
], 32)), [
|
|
262
|
+
[t(Oe), F]
|
|
263
|
+
]);
|
|
264
|
+
}
|
|
265
|
+
}), ia = /* @__PURE__ */ ze(Ke, [["__scopeId", "data-v-891101c7"]]);
|
|
266
|
+
export {
|
|
267
|
+
ia as B
|
|
268
|
+
};
|
|
269
|
+
//# sourceMappingURL=date-picker.CidHad1p.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.CidHad1p.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 <bento-input-field\n v-if=\"isTouchDevice\"\n ref=\"inputContainerRef\"\n :type=\"isMonthVariant ? 'month' : 'date'\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\n :aria-label=\"label || $attrs?.['aria-labelledby'] ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :error=\"!!errorMessage || !!dateErrorText\"\n :model-value=\"nativeValue\"\n :readonly=\"isReadOnly\"\n :min=\"formattedMin\"\n :max=\"formattedMax\"\n @update:model-value=\"onNativeDateInput\"\n />\n <dropdown-input-default\n v-else\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\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 && !isTouchDevice\"\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 import { BentoInputField } from '@/components/input-field';\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 { dateToNativeDateString, dateToNativeMonthString, parseNativeMonthString } from '@/utils/ts/format-date';\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, useTouchDevice } 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 const { isTouchDevice } = useTouchDevice();\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 formatNativeDate = (date: Date): string => {\n if (!date) {\n return '';\n }\n return isMonthVariant.value ? dateToNativeMonthString(date) : dateToNativeDateString(date);\n };\n\n const nativeValue = computed(() => formatNativeDate(internalModelValue.value));\n\n const onNativeDateInput = (value: string) => {\n if (!value) {\n emitValue(null);\n return;\n }\n\n if (isMonthVariant.value) {\n emitValue(parseNativeMonthString(value));\n return;\n }\n\n const date = parseDate(value);\n if (date) {\n emitValue(date);\n }\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 formattedMin = computed(() => formatNativeDate(props.min));\n const formattedMax = computed(() => formatNativeDate(props.max));\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 // On touch devices with native input, we also want immediate feedback.\n if (isDatePickerOpen.value || isTouchDevice.value) {\n validateDate(textInputValue.value);\n } else {\n validateDateDebounced(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","isTouchDevice","useTouchDevice","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","formatNativeDate","dateToNativeMonthString","dateToNativeDateString","nativeValue","onNativeDateInput","value","parseNativeMonthString","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","formattedMin","formattedMax","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDate","stringDate","validateDateDebounced","debounce","onDateInputChange","onSpaceBarOrEnter","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBOA,KAAA,CAAA;AAAA,EAAmE,iBAAAC;AAAA,EACtE,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAEJ,MAAA;AACI,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAC,EAAA,CAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAAX,EAAA,OAAA,aAAA,CAAA;AAyCA,SAAA;AAAA;AAAA,IAAO,kBAvCPY,EAAA,MAAA;AAEI,UAAAX,EAAA;AACI,eAAAS,EAAA;AAIJ,UAAA,CAAAV,EAAA;AACI,eAAAG,GAAA,SAAAE,EAAA,YAAA;AAKJ,YAAAQ,IAAAX,GAAA,QAAA,EAAA,OAAA,Q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