@adyen/bento-vue2 1.34.0 → 1.35.1
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/index.d.ts +2 -2
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/currency.css +1 -0
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/accordion-item.BDNSykyK.js +116 -0
- package/dist/chunks/accordion-item.BDNSykyK.js.map +1 -0
- package/dist/chunks/{action-bar.CsRmYQ-k.js → action-bar.CCVKS1xo.js} +51 -37
- package/dist/chunks/{action-bar.CsRmYQ-k.js.map → action-bar.CCVKS1xo.js.map} +1 -1
- package/dist/chunks/{alert.DtT7BRdr.js → alert.CVsckdGC.js} +17 -11
- package/dist/chunks/{alert.DtT7BRdr.js.map → alert.CVsckdGC.js.map} +1 -1
- package/dist/chunks/{avatar.0ffdL8i0.js → avatar.qcWk9clF.js} +9 -9
- package/dist/chunks/avatar.qcWk9clF.js.map +1 -0
- package/dist/chunks/{base-modal.zHjXVjwU.js → base-modal.BaHkDH5f.js} +15 -9
- package/dist/chunks/{base-modal.zHjXVjwU.js.map → base-modal.BaHkDH5f.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.B6Nb6Ohu.js → button-actions-with-menu.Bl82u6yP.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.B6Nb6Ohu.js.map → button-actions-with-menu.Bl82u6yP.js.map} +1 -1
- package/dist/chunks/{button-actions.BQHr68sA.js → button-actions.DN4eIQes.js} +2 -2
- package/dist/chunks/{button-actions.BQHr68sA.js.map → button-actions.DN4eIQes.js.map} +1 -1
- package/dist/chunks/{calendar.CaTMWZUM.js → calendar.BFrqPClW.js} +230 -230
- package/dist/chunks/calendar.BFrqPClW.js.map +1 -0
- package/dist/chunks/card.lWLgpCWM.js +123 -0
- package/dist/chunks/card.lWLgpCWM.js.map +1 -0
- package/dist/chunks/{checkbox-group.D_mCZMPr.js → checkbox-group.C0cqbJWx.js} +4 -4
- package/dist/chunks/{checkbox-group.D_mCZMPr.js.map → checkbox-group.C0cqbJWx.js.map} +1 -1
- package/dist/chunks/{checkbox.CaX67eM_.js → checkbox.B3u_hzUo.js} +38 -28
- package/dist/chunks/{checkbox.CaX67eM_.js.map → checkbox.B3u_hzUo.js.map} +1 -1
- package/dist/chunks/{code-snippet.DgKK7fE8.js → code-snippet.BgjvWTHP.js} +43 -34
- package/dist/chunks/code-snippet.BgjvWTHP.js.map +1 -0
- package/dist/chunks/{controls-group.6aTaRWFI.js → controls-group.DLBxlPfl.js} +2 -2
- package/dist/chunks/{controls-group.6aTaRWFI.js.map → controls-group.DLBxlPfl.js.map} +1 -1
- package/dist/chunks/{copy.B1DYKX_q.js → copy.CmxcGt77.js} +31 -23
- package/dist/chunks/{copy.B1DYKX_q.js.map → copy.CmxcGt77.js.map} +1 -1
- package/dist/chunks/{currency.D_2CN1OJ.js → currency.CbZqZrBz.js} +9 -8
- package/dist/chunks/{currency.D_2CN1OJ.js.map → currency.CbZqZrBz.js.map} +1 -1
- package/dist/chunks/{dashboard-section.DWfQGGwS.js → dashboard-section.BfXtTf6l.js} +2 -2
- package/dist/chunks/{dashboard-section.DWfQGGwS.js.map → dashboard-section.BfXtTf6l.js.map} +1 -1
- package/dist/chunks/{dashed-underline.C7gLtEqx.js → dashed-underline.xq5j9fGG.js} +2 -2
- package/dist/chunks/{dashed-underline.C7gLtEqx.js.map → dashed-underline.xq5j9fGG.js.map} +1 -1
- package/dist/chunks/{data-grid-template.2xocKVqX.js → data-grid-template.C8AR5CxA.js} +2 -2
- package/dist/chunks/{data-grid-template.2xocKVqX.js.map → data-grid-template.C8AR5CxA.js.map} +1 -1
- package/dist/chunks/{data-grid.CUn6MrZz.js → data-grid.BCTcokYm.js} +472 -426
- package/dist/chunks/{data-grid.CUn6MrZz.js.map → data-grid.BCTcokYm.js.map} +1 -1
- package/dist/chunks/{date-picker.C6_KbCYT.js → date-picker.CPG0zksD.js} +91 -83
- package/dist/chunks/date-picker.CPG0zksD.js.map +1 -0
- package/dist/chunks/{date-range-picker.DaTgBXP1.js → date-range-picker.Bt439x32.js} +265 -243
- package/dist/chunks/date-range-picker.Bt439x32.js.map +1 -0
- package/dist/chunks/{date.DaiTzNEZ.js → date.C0uwNQjg.js} +80 -80
- package/dist/chunks/{date.DaiTzNEZ.js.map → date.C0uwNQjg.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.pJ_sQbJN.js → dropdown-tag.Cd4LGtwl.js} +3 -3
- package/dist/chunks/{dropdown-tag.pJ_sQbJN.js.map → dropdown-tag.Cd4LGtwl.js.map} +1 -1
- package/dist/chunks/{dropdown.DpsQPLy-.js → dropdown.B4KMM58m.js} +158 -139
- package/dist/chunks/dropdown.B4KMM58m.js.map +1 -0
- package/dist/chunks/{error-message.BnFyGbR7.js → error-message.GCYDEzGL.js} +28 -14
- package/dist/chunks/{error-message.BnFyGbR7.js.map → error-message.GCYDEzGL.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.DGBvcKsz.js → filter-bar.Co2YeUUg.js} +604 -589
- package/dist/chunks/filter-bar.Co2YeUUg.js.map +1 -0
- package/dist/chunks/{footer-actions.CwHY2-Ap.js → footer-actions.CxxS87iQ.js} +2 -2
- package/dist/chunks/{footer-actions.CwHY2-Ap.js.map → footer-actions.CxxS87iQ.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CRsR3o2x.js → form-layout-title.DomnJXLE.js} +2 -2
- package/dist/chunks/{form-layout-title.CRsR3o2x.js.map → form-layout-title.DomnJXLE.js.map} +1 -1
- package/dist/chunks/{index.B_UZQ6qF.js → get-date-locale.BN8xEjY0.js} +855 -204
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
- package/dist/chunks/{header.BmNDoXio.js → header.zacQVbjn.js} +79 -73
- package/dist/chunks/{header.BmNDoXio.js.map → header.zacQVbjn.js.map} +1 -1
- package/dist/chunks/{index.Z84QE0E2.js → index.CrhTVr5J.js} +2 -2
- package/dist/chunks/{index.Z84QE0E2.js.map → index.CrhTVr5J.js.map} +1 -1
- package/dist/chunks/{index.xqFSZOAb.js → index.DDnf1O9p.js} +2 -2
- package/dist/chunks/{index.xqFSZOAb.js.map → index.DDnf1O9p.js.map} +1 -1
- package/dist/chunks/{index.B_EJflcs.js → index.DPafeRJa.js} +2 -2
- package/dist/chunks/{index.B_EJflcs.js.map → index.DPafeRJa.js.map} +1 -1
- package/dist/chunks/{input-field.S5HIZtYA.js → input-field.DBrzeKBj.js} +3 -3
- package/dist/chunks/{input-field.S5HIZtYA.js.map → input-field.DBrzeKBj.js.map} +1 -1
- package/dist/chunks/{inspector.types.D6kCCKNk.js → inspector.types.lu_MoQn5.js} +17 -9
- package/dist/chunks/{inspector.types.D6kCCKNk.js.map → inspector.types.lu_MoQn5.js.map} +1 -1
- package/dist/chunks/{loading-button.DDPZYO6r.js → loading-button.DoX2sopf.js} +39 -25
- package/dist/chunks/loading-button.DoX2sopf.js.map +1 -0
- package/dist/chunks/{menu.DSOJEn4v.js → menu.DHakGFS4.js} +2 -2
- package/dist/chunks/{menu.DSOJEn4v.js.map → menu.DHakGFS4.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BQKE0bm0.js → modal-fullscreen.mIlp0LnL.js} +25 -19
- package/dist/chunks/{modal-fullscreen.BQKE0bm0.js.map → modal-fullscreen.mIlp0LnL.js.map} +1 -1
- package/dist/chunks/{modal.ClqkmzVZ.js → modal.CtTQWN8H.js} +25 -19
- package/dist/chunks/modal.CtTQWN8H.js.map +1 -0
- package/dist/chunks/{pagination.he0lQGAV.js → pagination.By-p9MjL.js} +2 -2
- package/dist/chunks/{pagination.he0lQGAV.js.map → pagination.By-p9MjL.js.map} +1 -1
- package/dist/chunks/{popover.UmNw_M-C.js → popover.BDaf6hmW.js} +2 -2
- package/dist/chunks/{popover.UmNw_M-C.js.map → popover.BDaf6hmW.js.map} +1 -1
- package/dist/chunks/{radio-group.D7cuMKzV.js → radio-group.OaYz1wJf.js} +3 -3
- package/dist/chunks/{radio-group.D7cuMKzV.js.map → radio-group.OaYz1wJf.js.map} +1 -1
- package/dist/chunks/{search-bar.BPyYb0WB.js → search-bar.eC-crOww.js} +14 -6
- package/dist/chunks/{search-bar.BPyYb0WB.js.map → search-bar.eC-crOww.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CMUfpgQf.js → secondary-nav.1xw-o8OR.js} +2 -2
- package/dist/chunks/{secondary-nav.CMUfpgQf.js.map → secondary-nav.1xw-o8OR.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DbMfzyTG.js → selection-card-group.BLPaJy5U.js} +3 -3
- package/dist/chunks/{selection-card-group.DbMfzyTG.js.map → selection-card-group.BLPaJy5U.js.map} +1 -1
- package/dist/chunks/{sidepanel.Ck6Ts9RR.js → sidepanel.ZYT_vzbj.js} +24 -18
- package/dist/chunks/{sidepanel.Ck6Ts9RR.js.map → sidepanel.ZYT_vzbj.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DpLscUX4.js → structured-list-item.D7D8VpQY.js} +22 -16
- package/dist/chunks/{structured-list-item.DpLscUX4.js.map → structured-list-item.D7D8VpQY.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.B7Re6OCf.js → summary-grid-item-custom.v0QSLZKT.js} +2 -2
- package/dist/chunks/{summary-grid-item-custom.B7Re6OCf.js.map → summary-grid-item-custom.v0QSLZKT.js.map} +1 -1
- package/dist/chunks/{textarea.BRMpTWKS.js → textarea.C0IMS5XS.js} +2 -2
- package/dist/chunks/{textarea.BRMpTWKS.js.map → textarea.C0IMS5XS.js.map} +1 -1
- package/dist/chunks/{timeline-item.jh7UnviR.js → timeline-item.Dmd78uwQ.js} +53 -47
- package/dist/chunks/{timeline-item.jh7UnviR.js.map → timeline-item.Dmd78uwQ.js.map} +1 -1
- package/dist/chunks/{tutorial.DERGsCkg.js → tutorial.D64_0i0-.js} +50 -38
- package/dist/chunks/{tutorial.DERGsCkg.js.map → tutorial.D64_0i0-.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.B39-iEp4.js → use-cached-selected-values.BOAumEi7.js} +54 -40
- package/dist/chunks/{use-cached-selected-values.B39-iEp4.js.map → use-cached-selected-values.BOAumEi7.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +43 -43
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +5 -5
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +9 -9
- package/package.json +2 -2
- package/dist/chunks/accordion-item.IMlV_Vik.js +0 -100
- package/dist/chunks/accordion-item.IMlV_Vik.js.map +0 -1
- package/dist/chunks/avatar.0ffdL8i0.js.map +0 -1
- package/dist/chunks/calendar.CaTMWZUM.js.map +0 -1
- package/dist/chunks/card.ignL7-CH.js +0 -115
- package/dist/chunks/card.ignL7-CH.js.map +0 -1
- package/dist/chunks/code-snippet.DgKK7fE8.js.map +0 -1
- package/dist/chunks/date-picker.C6_KbCYT.js.map +0 -1
- package/dist/chunks/date-range-picker.DaTgBXP1.js.map +0 -1
- package/dist/chunks/dropdown.DpsQPLy-.js.map +0 -1
- package/dist/chunks/filter-bar.DGBvcKsz.js.map +0 -1
- package/dist/chunks/index.B_UZQ6qF.js.map +0 -1
- package/dist/chunks/loading-button.DDPZYO6r.js.map +0 -1
- package/dist/chunks/modal.ClqkmzVZ.js.map +0 -1
|
@@ -1,58 +1,66 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { B as q } from "./popover.
|
|
1
|
+
import { ref as D, computed as m, defineComponent as L, toRef as P, watch as Y, nextTick as E } from "vue";
|
|
2
|
+
import { B as q } from "./popover.BDaf6hmW.js";
|
|
3
3
|
import { B as W } from "./typography.CqQaHXhq.js";
|
|
4
|
-
import { d as
|
|
5
|
-
import { D as
|
|
6
|
-
import { g as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
4
|
+
import { d as j } from "./debounce.DUTu11PS.js";
|
|
5
|
+
import { D as S, v as K, f as z } from "./date-input.BqBdAO1E.js";
|
|
6
|
+
import { g as p } from "./unique-id.XFfoKuc2.js";
|
|
7
|
+
import { u as B } from "./i18n.BQkEbtPM.js";
|
|
8
|
+
import { g as J } from "./get-date-locale.BN8xEjY0.js";
|
|
9
|
+
import { f as T } from "./date.C0uwNQjg.js";
|
|
10
|
+
import { u as $ } from "./use-form-layout-loading.D3lALhtC.js";
|
|
11
11
|
import "./index.Cl4_42j5.js";
|
|
12
|
-
import { a as
|
|
13
|
-
import { D as
|
|
14
|
-
import { E as
|
|
15
|
-
import { B as
|
|
16
|
-
import { n as
|
|
12
|
+
import { a as f } from "./calendar.BFrqPClW.js";
|
|
13
|
+
import { D as G } from "./dropdown-default-textbox.kQ3pHsZe.js";
|
|
14
|
+
import { E as H, F as Q } from "./error-message.GCYDEzGL.js";
|
|
15
|
+
import { B as X } from "./directive.O3yEdalv.js";
|
|
16
|
+
import { n as Z } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
17
17
|
import "../assets/date-picker.css";
|
|
18
|
-
const
|
|
18
|
+
const ee = ({ datePickerValue: a, isDateIncorrect: e }) => {
|
|
19
19
|
var v;
|
|
20
|
-
const { locale: r, t: n } =
|
|
20
|
+
const { locale: r, t: n } = B(), s = J(), d = D((v = a.value) == null ? void 0 : v.toDateString());
|
|
21
21
|
return {
|
|
22
22
|
// Values
|
|
23
|
-
dateDisplayValue:
|
|
24
|
-
locale:
|
|
23
|
+
dateDisplayValue: m(() => e.value ? d.value : a.value ? T(a.value, S.FULL_DATE, {
|
|
24
|
+
locale: s[r.value.substring(0, 2)] || s.enUS
|
|
25
25
|
}) : n("selectDate")),
|
|
26
|
-
textInputValue:
|
|
26
|
+
textInputValue: d,
|
|
27
27
|
// Methods
|
|
28
|
-
formatTextInputDisplayValue: (
|
|
29
|
-
e.value || (
|
|
30
|
-
locale:
|
|
28
|
+
formatTextInputDisplayValue: (u = a.value) => {
|
|
29
|
+
e.value || (d.value = u ? T(u, S.NUMERIC_DATE_YEAR_FIRST, {
|
|
30
|
+
locale: s[r.value.substring(0, 2)] || s.enUS
|
|
31
31
|
}) : null);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
const
|
|
35
|
+
var o = /* @__PURE__ */ ((a) => (a.INPUT = "input", a))(o || {});
|
|
36
|
+
const ae = {
|
|
37
37
|
"en-US": {
|
|
38
|
+
datePicker: "Date picker",
|
|
38
39
|
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
39
40
|
selectDate: "Select a date",
|
|
40
41
|
selectDateRange: "Select a date range",
|
|
41
|
-
selectedDateIsNotAvailable: "Selected date is not available"
|
|
42
|
-
|
|
42
|
+
selectedDateIsNotAvailable: "Selected date is not available"
|
|
43
|
+
},
|
|
44
|
+
"pt-BR": {
|
|
45
|
+
datePicker: "Seletor de datas",
|
|
46
|
+
selectDate: "Selecione uma data"
|
|
47
|
+
},
|
|
48
|
+
"ja-JP": {
|
|
49
|
+
datePicker: "日付ピッカー",
|
|
50
|
+
selectDate: "日付を選択"
|
|
43
51
|
}
|
|
44
|
-
},
|
|
45
|
-
i18n: { messages:
|
|
52
|
+
}, te = 1e3, re = L({
|
|
53
|
+
i18n: { messages: ae },
|
|
46
54
|
name: "bento-date-picker",
|
|
47
55
|
components: {
|
|
48
56
|
BentoTypography: W,
|
|
49
57
|
BentoPopover: q,
|
|
50
|
-
Calendar:
|
|
51
|
-
ErrorMessage:
|
|
52
|
-
DropdownInputDefault:
|
|
53
|
-
FieldLabel:
|
|
58
|
+
Calendar: f,
|
|
59
|
+
ErrorMessage: H,
|
|
60
|
+
DropdownInputDefault: G,
|
|
61
|
+
FieldLabel: Q
|
|
54
62
|
},
|
|
55
|
-
directives: { BentoClickOutsideDirective:
|
|
63
|
+
directives: { BentoClickOutsideDirective: X },
|
|
56
64
|
props: {
|
|
57
65
|
/**
|
|
58
66
|
* Descriptive supporting text visbile underneath the dropdown.
|
|
@@ -69,19 +77,19 @@ const re = {
|
|
|
69
77
|
/**
|
|
70
78
|
* Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
71
79
|
*/
|
|
72
|
-
firstDayOfWeek:
|
|
80
|
+
firstDayOfWeek: f.props.firstDayOfWeek,
|
|
73
81
|
/**
|
|
74
82
|
* Indicate if a date should be disabled or not
|
|
75
83
|
*/
|
|
76
|
-
isDateDisabled:
|
|
84
|
+
isDateDisabled: f.props.isDateDisabled,
|
|
77
85
|
/**
|
|
78
86
|
* Sets a minimum limit for selectable dates - dates before `min` will not be selectable
|
|
79
87
|
*/
|
|
80
|
-
min:
|
|
88
|
+
min: f.props.min,
|
|
81
89
|
/**
|
|
82
90
|
* Sets a maximum limit for selectable dates - dates after `max` will not be selectable
|
|
83
91
|
*/
|
|
84
|
-
max:
|
|
92
|
+
max: f.props.max,
|
|
85
93
|
/**
|
|
86
94
|
* Text that is displayed as a label above the element.
|
|
87
95
|
*/
|
|
@@ -107,91 +115,91 @@ const re = {
|
|
|
107
115
|
*/
|
|
108
116
|
value: { type: [Date, Object], default: null }
|
|
109
117
|
},
|
|
110
|
-
emits: [
|
|
118
|
+
emits: [o.INPUT],
|
|
111
119
|
setup(a, { emit: e }) {
|
|
112
|
-
const { t: r } =
|
|
113
|
-
|
|
120
|
+
const { t: r } = B(), n = p("bento-date-picker-container"), s = p("bento-date-picker-label"), d = p("bento-date-picker-description"), b = p("bento-date-picker-error"), y = p("bento-date-picker-date-error"), v = m(() => a.label || r("datePicker", { name: n })), u = D(null), O = D(null), l = D(!1), i = D(!1), { isReadOnly: R } = $(P(a, "readonly"));
|
|
121
|
+
Y(
|
|
114
122
|
() => a.disabled,
|
|
115
123
|
(t) => {
|
|
116
|
-
t &&
|
|
124
|
+
t && i.value && (i.value = !1);
|
|
117
125
|
}
|
|
118
126
|
);
|
|
119
|
-
const { dateDisplayValue:
|
|
120
|
-
datePickerValue:
|
|
127
|
+
const { dateDisplayValue: w, textInputValue: c, formatTextInputDisplayValue: g } = ee({
|
|
128
|
+
datePickerValue: P(a, "value"),
|
|
121
129
|
isDateIncorrect: l
|
|
122
|
-
}), k =
|
|
130
|
+
}), k = m(() => a.isDateDisabled && a.isDateDisabled(new Date(c.value)) && !i.value ? r("selectedDateIsNotAvailable") : l.value ? r("provideDateInAFormat") : null), U = m(() => ({
|
|
123
131
|
"b-date-picker__description--error": a.errorMessage || k.value
|
|
124
|
-
})),
|
|
125
|
-
() => `${a.description ?
|
|
126
|
-
),
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
l.value = !1,
|
|
132
|
-
},
|
|
133
|
-
l.value && (l.value = !1,
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
132
|
+
})), V = m(
|
|
133
|
+
() => `${a.description ? d : ""} ${a.errorMessage ? b : ""} ${k.value ? y : ""}`.trim() || null
|
|
134
|
+
), N = (t) => a.min && t <= a.min || a.max && t >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(t) : !0, I = () => {
|
|
135
|
+
i.value = !1;
|
|
136
|
+
}, x = () => {
|
|
137
|
+
i.value = !0, g();
|
|
138
|
+
}, M = (t) => {
|
|
139
|
+
l.value = !1, I(), e(o.INPUT, t);
|
|
140
|
+
}, h = async () => {
|
|
141
|
+
l.value && (l.value = !1, c.value = null), e(o.INPUT, null);
|
|
142
|
+
}, A = (t) => {
|
|
143
|
+
K(t);
|
|
144
|
+
}, C = (t) => {
|
|
137
145
|
if (t.length < 10)
|
|
138
146
|
return;
|
|
139
|
-
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(t) &&
|
|
140
|
-
},
|
|
147
|
+
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(t) && N(new Date(t)) ? (l.value = !1, e(o.INPUT, new Date(t))) : t && (l.value = !0, e(o.INPUT, null));
|
|
148
|
+
}, F = j(C, te);
|
|
141
149
|
return {
|
|
142
150
|
// Refs
|
|
143
|
-
inputContainerRef:
|
|
144
|
-
calendarContainerRef:
|
|
151
|
+
inputContainerRef: O,
|
|
152
|
+
calendarContainerRef: u,
|
|
145
153
|
// Values,
|
|
146
|
-
dateDisplayValue:
|
|
154
|
+
dateDisplayValue: w,
|
|
147
155
|
datePickerContainerId: n,
|
|
148
|
-
descriptionConditionalClasses:
|
|
156
|
+
descriptionConditionalClasses: U,
|
|
149
157
|
isDateIncorrect: l,
|
|
150
|
-
isDatePickerOpen:
|
|
158
|
+
isDatePickerOpen: i,
|
|
151
159
|
isReadOnly: R,
|
|
152
160
|
dateErrorText: k,
|
|
153
|
-
labelId:
|
|
154
|
-
descriptionId:
|
|
161
|
+
labelId: s,
|
|
162
|
+
descriptionId: d,
|
|
155
163
|
errorId: b,
|
|
156
164
|
dateErrorId: y,
|
|
157
165
|
popoverAriaLabel: v,
|
|
158
|
-
ariaDescribedBy:
|
|
159
|
-
textInputValue:
|
|
166
|
+
ariaDescribedBy: V,
|
|
167
|
+
textInputValue: c,
|
|
160
168
|
// Events
|
|
161
|
-
closeDatePicker:
|
|
162
|
-
clearDatePickerValue:
|
|
163
|
-
onDateSelected:
|
|
164
|
-
openDatePicker:
|
|
165
|
-
onDateKeyDown:
|
|
169
|
+
closeDatePicker: I,
|
|
170
|
+
clearDatePickerValue: h,
|
|
171
|
+
onDateSelected: M,
|
|
172
|
+
openDatePicker: x,
|
|
173
|
+
onDateKeyDown: A,
|
|
166
174
|
onDateInputChange: (t) => {
|
|
167
|
-
|
|
175
|
+
c.value = z(t), i.value ? F(c.value) : C(c.value);
|
|
168
176
|
},
|
|
169
177
|
// Keyboard navigation
|
|
170
178
|
onSpaceBarOrEnter: async (t) => {
|
|
171
179
|
var _;
|
|
172
|
-
|
|
180
|
+
i.value || (t.preventDefault(), x(), await E(), a.value || (g(/* @__PURE__ */ new Date()), e(o.INPUT, /* @__PURE__ */ new Date()), await E()), (_ = u.value) == null || _.$refs.calendarRef[0].focusOnDate(a.value));
|
|
173
181
|
}
|
|
174
182
|
};
|
|
175
183
|
}
|
|
176
184
|
});
|
|
177
|
-
var
|
|
185
|
+
var ne = function() {
|
|
178
186
|
var e = this, r = e._self._c;
|
|
179
187
|
return e._self._setupProxy, r("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDatePicker, expression: "closeDatePicker" }], staticClass: "b-date-picker", on: { "!keydown": [function(n) {
|
|
180
188
|
return !n.type.indexOf("key") && e._k(n.keyCode, "space", 32, n.key, [" ", "Spacebar"]) ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
181
189
|
}, function(n) {
|
|
182
190
|
return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
183
191
|
}] } }, [e.label ? r("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), r("div", [r("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDatePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "dynamic-filtering": "", "is-invalid": !!e.errorMessage || !!e.dateErrorText, open: e.isDatePickerOpen, value: e.textInputValue, "display-value": e.dateDisplayValue, "debounce-time": 0, readonly: e.isReadOnly }, on: { input: e.onDateInputChange, open: e.openDatePicker, keydown: e.onDateKeyDown, clear: e.clearDatePickerValue, close: e.closeDatePicker } })], 1), e.dateErrorText ? r("error-message", { staticClass: "b-date-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.dateErrorText } }) : e._e(), e.errorMessage ? r("error-message", { staticClass: "b-date-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? r("bento-typography", { staticClass: "b-date-picker__description", class: e.descriptionConditionalClasses, attrs: { el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? r("bento-popover", { staticClass: "b-date-picker__container", attrs: { id: e.datePickerContainerId, role: "dialog", open: e.isDatePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, "aria-modal": !0, position: "bottom-start", "fit-content": "" } }, [r("calendar", { ref: "calendarContainerRef", attrs: { "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "number-of-months": 1, value: e.value, min: e.min, max: e.max }, on: { input: e.onDateSelected } })], 1) : e._e()], 1);
|
|
184
|
-
},
|
|
192
|
+
}, le = [], ie = /* @__PURE__ */ Z(
|
|
193
|
+
re,
|
|
194
|
+
ne,
|
|
185
195
|
le,
|
|
186
|
-
oe,
|
|
187
|
-
ie,
|
|
188
196
|
!1,
|
|
189
197
|
null,
|
|
190
198
|
"408106fe"
|
|
191
199
|
);
|
|
192
|
-
const
|
|
200
|
+
const Ee = ie.exports;
|
|
193
201
|
export {
|
|
194
|
-
|
|
195
|
-
|
|
202
|
+
Ee as B,
|
|
203
|
+
o as a
|
|
196
204
|
};
|
|
197
|
-
//# sourceMappingURL=date-picker.
|
|
205
|
+
//# sourceMappingURL=date-picker.CPG0zksD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.CPG0zksD.js","sources":["../../src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../src/components/date-picker/date-picker.types.ts","../../src/components/date-picker/date-picker.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = getDateLocale();\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 t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\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-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n :min=\"min\"\n :max=\"max\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDatePickerEvent, BentoDatePickerValue } 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 /**\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 defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n FieldLabel,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: Calendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: Calendar.props.max,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\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 { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\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 const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n props.isDateDisabled(new Date(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","getDateLocale","textInputValue","ref","_a","computed","format","DateFormat","dateToFormat","BentoDatePickerEvent","BentoDatePickerEvent2","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","FieldLabel","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","stringDate","validateDateDebounced","debounce","formatDateInputValue","nextTick"],"mappings":";;;;;;;;;;;;;;;;;AAYO,MAAAA,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,GAEAC,IAAAC,GAAAC,IAAAT,EAAA,UAAA,gBAAAS,EAAA,cAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIT,EAAA,QACIM,EAAA,QAIJP,EAAA,QAKAW,EAAAX,EAAA,OAAAY,EAAA,WAAA;AAAA,MAAmE,QAAAP,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAG,EAAA;AAAA,IACN,CAAA,IALzDF,EAAA,YAAA,CAMH;AAAA,IAsBD,gBAAAI;AAAA;AAAA,IACA,6BAhBJ,CAAAM,IAAAb,EAAA,UAAA;AAEI,MAAAC,EAAA,UAIAM,EAAA,QAAAM,IAAAF,EAAAE,GAAAD,EAAA,yBAAA;AAAA,Q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