@adyen/bento-vue3 1.79.1 → 1.80.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/index.d.ts +397 -918
- package/dist/action-bar.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/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{action-bar.QX16Mu4L.js → action-bar.C4v95Cp5.js} +3 -3
- package/dist/chunks/{action-bar.QX16Mu4L.js.map → action-bar.C4v95Cp5.js.map} +1 -1
- package/dist/chunks/{base-modal.CHYvJ_xU.js → base-modal.DoMod4Z4.js} +3 -3
- package/dist/chunks/{base-modal.CHYvJ_xU.js.map → base-modal.DoMod4Z4.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.B8qBBN82.js → button-actions-with-menu.BZ1cNOvQ.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.B8qBBN82.js.map → button-actions-with-menu.BZ1cNOvQ.js.map} +1 -1
- package/dist/chunks/{button-actions.Bg38lywL.js → button-actions.C-dLiuIO.js} +2 -2
- package/dist/chunks/{button-actions.Bg38lywL.js.map → button-actions.C-dLiuIO.js.map} +1 -1
- package/dist/chunks/{card.BqkufnQe.js → card.CvEtsRsw.js} +2 -2
- package/dist/chunks/{card.BqkufnQe.js.map → card.CvEtsRsw.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BRQiuU3y.js → checkbox-group.DEvATYiK.js} +6 -6
- package/dist/chunks/{checkbox-group.BRQiuU3y.js.map → checkbox-group.DEvATYiK.js.map} +1 -1
- package/dist/chunks/{checkbox.BRTK_DHj.js → checkbox.BIT67SNO.js} +3 -3
- package/dist/chunks/{checkbox.BRTK_DHj.js.map → checkbox.BIT67SNO.js.map} +1 -1
- package/dist/chunks/{code-snippet.YxZ3_4ye.js → code-snippet.CnkSxC1n.js} +4 -4
- package/dist/chunks/{code-snippet.YxZ3_4ye.js.map → code-snippet.CnkSxC1n.js.map} +1 -1
- package/dist/chunks/{controls-group.CJe5J84d.js → controls-group.B2Qci77U.js} +2 -2
- package/dist/chunks/{controls-group.CJe5J84d.js.map → controls-group.B2Qci77U.js.map} +1 -1
- package/dist/chunks/{copy.mq0o1Rag.js → copy.D5CBHqUB.js} +3 -3
- package/dist/chunks/{copy.mq0o1Rag.js.map → copy.D5CBHqUB.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CNCqp74F.js → dashboard-section.CJa7cm4o.js} +2 -2
- package/dist/chunks/{dashboard-section.CNCqp74F.js.map → dashboard-section.CJa7cm4o.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CtTu1AOE.js → dashed-underline.BzWB6Q4E.js} +3 -3
- package/dist/chunks/{dashed-underline.CtTu1AOE.js.map → dashed-underline.BzWB6Q4E.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CLpaJvTj.js → data-grid-template.CVPMnQcb.js} +3 -3
- package/dist/chunks/{data-grid-template.CLpaJvTj.js.map → data-grid-template.CVPMnQcb.js.map} +1 -1
- package/dist/chunks/{data-grid.CD3Nb4pg.js → data-grid.O3irn4sl.js} +518 -509
- package/dist/chunks/data-grid.O3irn4sl.js.map +1 -0
- package/dist/chunks/{date-picker.C3BH0Bsr.js → date-picker.9zM8Cx1u.js} +88 -87
- package/dist/chunks/date-picker.9zM8Cx1u.js.map +1 -0
- package/dist/chunks/{date-range-picker.BPZE6r01.js → date-range-picker.DI-2cYg5.js} +6 -6
- package/dist/chunks/{date-range-picker.BPZE6r01.js.map → date-range-picker.DI-2cYg5.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.B0LtUuUk.js → dropdown-tag.moDZXXVR.js} +3 -3
- package/dist/chunks/{dropdown-tag.B0LtUuUk.js.map → dropdown-tag.moDZXXVR.js.map} +1 -1
- package/dist/chunks/{dropdown.B5tPWVxg.js → dropdown.DedOkb8I.js} +5 -5
- package/dist/chunks/{dropdown.B5tPWVxg.js.map → dropdown.DedOkb8I.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{field-label.B1rMWIWY.js → field-label.Cu6X9V0_.js} +2 -2
- package/dist/chunks/{field-label.B1rMWIWY.js.map → field-label.Cu6X9V0_.js.map} +1 -1
- package/dist/chunks/{file-uploader.BwmQdkmz.js → file-uploader.B7Mbz48o.js} +3 -3
- package/dist/chunks/{file-uploader.BwmQdkmz.js.map → file-uploader.B7Mbz48o.js.map} +1 -1
- package/dist/chunks/filter-bar.CzMIJP2V.js +3199 -0
- package/dist/chunks/filter-bar.CzMIJP2V.js.map +1 -0
- package/dist/chunks/{focus-trap.CpNGD7PH.js → focus-trap.BaHvK7aT.js} +54 -51
- package/dist/chunks/focus-trap.BaHvK7aT.js.map +1 -0
- package/dist/chunks/{footer-actions.pC1mxLQm.js → footer-actions.DTbfJdED.js} +2 -2
- package/dist/chunks/{footer-actions.pC1mxLQm.js.map → footer-actions.DTbfJdED.js.map} +1 -1
- package/dist/chunks/{header-meta.DZ8Gx4XE.js → header-meta.D_ChP1El.js} +3 -3
- package/dist/chunks/{header-meta.DZ8Gx4XE.js.map → header-meta.D_ChP1El.js.map} +1 -1
- package/dist/chunks/{header-with-views.b1gt2wud.js → header-with-views.CjF-jtB0.js} +8 -8
- package/dist/chunks/{header-with-views.b1gt2wud.js.map → header-with-views.CjF-jtB0.js.map} +1 -1
- package/dist/chunks/{header.BQAAmjUF.js → header.DzaZc0dQ.js} +3 -3
- package/dist/chunks/{header.BQAAmjUF.js.map → header.DzaZc0dQ.js.map} +1 -1
- package/dist/chunks/{info-icon.DB0MI-dH.js → info-icon.C7RAAeQQ.js} +3 -3
- package/dist/chunks/{info-icon.DB0MI-dH.js.map → info-icon.C7RAAeQQ.js.map} +1 -1
- package/dist/chunks/{input-field-password.noxsH61p.js → input-field-password.Bu97g6Ot.js} +5 -5
- package/dist/chunks/{input-field-password.noxsH61p.js.map → input-field-password.Bu97g6Ot.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.B_uFvUXP.js → input-field-phone-number.Bold8Mln.js} +3 -3
- package/dist/chunks/{input-field-phone-number.B_uFvUXP.js.map → input-field-phone-number.Bold8Mln.js.map} +1 -1
- package/dist/chunks/{input-field.C9ABE4cI.js → input-field.BGwhh69z.js} +3 -3
- package/dist/chunks/{input-field.C9ABE4cI.js.map → input-field.BGwhh69z.js.map} +1 -1
- package/dist/chunks/{inspector.BKP15cx6.js → inspector.BBhrSgO6.js} +2 -2
- package/dist/chunks/{inspector.BKP15cx6.js.map → inspector.BBhrSgO6.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.C1cZs38g.js → listbox-option-tag.VRGb_04i.js} +2 -2
- package/dist/chunks/{listbox-option-tag.C1cZs38g.js.map → listbox-option-tag.VRGb_04i.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.B69QJ8D6.js → modal-fullscreen.B8SjtIoX.js} +3 -3
- package/dist/chunks/{modal-fullscreen.B69QJ8D6.js.map → modal-fullscreen.B8SjtIoX.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js → modal.vue_vue_type_script_setup_true_lang.Jj1Lcx13.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BYqbdsty.js.map → modal.vue_vue_type_script_setup_true_lang.Jj1Lcx13.js.map} +1 -1
- package/dist/chunks/{pagination.Dst8Y6DD.js → pagination.C8NKDQvi.js} +2 -2
- package/dist/chunks/{pagination.Dst8Y6DD.js.map → pagination.C8NKDQvi.js.map} +1 -1
- package/dist/chunks/popover.types.DgfeurkF.js +6 -0
- package/dist/chunks/{popover.types.BFFy1ChU.js.map → popover.types.DgfeurkF.js.map} +1 -1
- package/dist/chunks/{popper-container.Uod3yjsR.js → popper-container.I9gzp1NR.js} +2 -2
- package/dist/chunks/{popper-container.Uod3yjsR.js.map → popper-container.I9gzp1NR.js.map} +1 -1
- package/dist/chunks/{radio-group.CVDDBCP4.js → radio-group.C0qJThJ2.js} +4 -4
- package/dist/chunks/{radio-group.CVDDBCP4.js.map → radio-group.C0qJThJ2.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DyC-Nnc8.js → rich-text-editor.DYx5i67c.js} +4 -4
- package/dist/chunks/{rich-text-editor.DyC-Nnc8.js.map → rich-text-editor.DYx5i67c.js.map} +1 -1
- package/dist/chunks/{search-bar.BwrFcw9L.js → search-bar.DQ-9ejqq.js} +3 -3
- package/dist/chunks/{search-bar.BwrFcw9L.js.map → search-bar.DQ-9ejqq.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D7l9h0_t.js → secondary-nav.C4_UkHBv.js} +2 -2
- package/dist/chunks/{secondary-nav.D7l9h0_t.js.map → secondary-nav.C4_UkHBv.js.map} +1 -1
- package/dist/chunks/{segmented-control.CwDOwDIu.js → segmented-control.PlGfqyxH.js} +2 -2
- package/dist/chunks/{segmented-control.CwDOwDIu.js.map → segmented-control.PlGfqyxH.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CZfusjo0.js → selection-card-group.CudK75gJ.js} +3 -3
- package/dist/chunks/{selection-card-group.CZfusjo0.js.map → selection-card-group.CudK75gJ.js.map} +1 -1
- package/dist/chunks/{sidepanel.BFz_7DKg.js → sidepanel.BmlRQuWw.js} +3 -3
- package/dist/chunks/{sidepanel.BFz_7DKg.js.map → sidepanel.BmlRQuWw.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DjbvVIwI.js → structured-list-item.CsUD3M_V.js} +4 -4
- package/dist/chunks/{structured-list-item.DjbvVIwI.js.map → structured-list-item.CsUD3M_V.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.KVqau_I-.js → summary-grid.types.Bs4dbLqr.js} +5 -5
- package/dist/chunks/{summary-grid.types.KVqau_I-.js.map → summary-grid.types.Bs4dbLqr.js.map} +1 -1
- package/dist/chunks/{tag.BmMnGJMp.js → tag.EDED27n5.js} +2 -2
- package/dist/chunks/{tag.BmMnGJMp.js.map → tag.EDED27n5.js.map} +1 -1
- package/dist/chunks/{textarea.BZjnJf5q.js → textarea.7MePsezm.js} +2 -2
- package/dist/chunks/{textarea.BZjnJf5q.js.map → textarea.7MePsezm.js.map} +1 -1
- package/dist/chunks/timeline-item.BKS_D2Rm.js +428 -0
- package/dist/chunks/timeline-item.BKS_D2Rm.js.map +1 -0
- package/dist/chunks/{tooltip.CeX5eGnw.js → tooltip.B76ucISL.js} +2 -2
- package/dist/chunks/{tooltip.CeX5eGnw.js.map → tooltip.B76ucISL.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js → tutorial.vue_vue_type_script_setup_true_lang.DAFpeoOd.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Cqimmacx.js.map → tutorial.vue_vue_type_script_setup_true_lang.DAFpeoOd.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.os3Yp7Tw.js → use-cached-selected-values.DCxMCy_n.js} +2 -2
- package/dist/chunks/{use-cached-selected-values.os3Yp7Tw.js.map → use-cached-selected-values.DCxMCy_n.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +358 -395
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +9 -9
- 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 +2 -2
- package/dist/popper-container.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/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +4 -0
- package/dist/styles/bento-light.css +4 -0
- package/dist/styles/bento.css +4 -0
- package/dist/styles/legacy.css +4 -0
- package/dist/styles/styleguide.css +4 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.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 +1 -1
- package/package.json +5 -5
- package/dist/chunks/data-grid.CD3Nb4pg.js.map +0 -1
- package/dist/chunks/date-picker.C3BH0Bsr.js.map +0 -1
- package/dist/chunks/filter-bar.B9yGivxl.js +0 -2986
- package/dist/chunks/filter-bar.B9yGivxl.js.map +0 -1
- package/dist/chunks/focus-trap.CpNGD7PH.js.map +0 -1
- package/dist/chunks/popover.types.BFFy1ChU.js +0 -6
- package/dist/chunks/timeline-item.YjC_8BBB.js +0 -556
- package/dist/chunks/timeline-item.YjC_8BBB.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { f as
|
|
3
|
-
import { g as
|
|
4
|
-
import { d as
|
|
5
|
-
import { D as
|
|
6
|
-
import { d as
|
|
7
|
-
import { D as
|
|
1
|
+
import { ref as d, computed as c, defineComponent as oe, toRef as M, watch as U, withDirectives as re, createElementBlock as ne, openBlock as D, withKeys as P, createBlock as I, createCommentVNode as C, createElementVNode as ie, unref as t, createVNode as L, normalizeClass as se, withCtx as Y, createTextVNode as ue, toDisplayString as de, nextTick as ce } from "vue";
|
|
2
|
+
import { f as $, s as q, b as pe } from "./calendar.CyJXcMz2.js";
|
|
3
|
+
import { g as fe } from "./button-actions.C-dLiuIO.js";
|
|
4
|
+
import { d as ve, B as me } from "./typography.yBEME_Gu.js";
|
|
5
|
+
import { D as De } from "./dropdown-default-textbox.CNrsjXUU.js";
|
|
6
|
+
import { d as be } from "./debounce.DUTu11PS.js";
|
|
7
|
+
import { D as R, v as ye, f as ke } from "./date-format.B8RU7D42.js";
|
|
8
8
|
import { g as E } from "./generate-uid.NJ8tVoha.js";
|
|
9
9
|
import { u as W } from "./index.pdBj0KQU.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { g as
|
|
12
|
-
import { u as
|
|
13
|
-
import { B as
|
|
14
|
-
import { F as
|
|
15
|
-
import { _ as
|
|
10
|
+
import { u as ge } from "./form-field.D_2g7vaP.js";
|
|
11
|
+
import { g as Ie } from "./differenceInMonths.Cab3nOsb.js";
|
|
12
|
+
import { u as Ce } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
13
|
+
import { B as Ee } from "./directive.Cbdox5VL.js";
|
|
14
|
+
import { F as Be, E as K } from "./field-label.Cu6X9V0_.js";
|
|
15
|
+
import { _ as we } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
16
16
|
import "../assets/date-picker.css";
|
|
17
17
|
const S = {
|
|
18
18
|
"en-US": {
|
|
@@ -30,44 +30,44 @@ const S = {
|
|
|
30
30
|
datePicker: "Seletor de datas",
|
|
31
31
|
selectDate: "Selecione uma data"
|
|
32
32
|
}
|
|
33
|
-
},
|
|
34
|
-
datePickerValue:
|
|
33
|
+
}, _e = ({
|
|
34
|
+
datePickerValue: p,
|
|
35
35
|
isDateIncorrect: B,
|
|
36
36
|
isMonthVariant: n,
|
|
37
37
|
placeholder: a
|
|
38
38
|
}) => {
|
|
39
39
|
var y;
|
|
40
|
-
const { locale: w, t: b } = W({ messages: S }), o =
|
|
40
|
+
const { locale: w, t: b } = W({ messages: S }), o = Ie(), f = d((y = p.value) == null ? void 0 : y.toDateString());
|
|
41
41
|
return {
|
|
42
42
|
// Values
|
|
43
|
-
dateDisplayValue:
|
|
43
|
+
dateDisplayValue: c(() => {
|
|
44
44
|
var r;
|
|
45
|
-
return B.value ?
|
|
46
|
-
|
|
47
|
-
n != null && n.value ?
|
|
45
|
+
return B.value ? f.value : p.value ? $(
|
|
46
|
+
p.value,
|
|
47
|
+
n != null && n.value ? R.LONG_MONTH_YEAR : R.FULL_DATE,
|
|
48
48
|
{
|
|
49
49
|
locale: o[(r = w.value) == null ? void 0 : r.substring(0, 2)] || o.enUS
|
|
50
50
|
}
|
|
51
51
|
) : (a == null ? void 0 : a.value) || b("selectDate");
|
|
52
52
|
}),
|
|
53
|
-
textInputValue:
|
|
53
|
+
textInputValue: f,
|
|
54
54
|
// Methods
|
|
55
|
-
formatTextInputDisplayValue: (r =
|
|
56
|
-
var
|
|
55
|
+
formatTextInputDisplayValue: (r = p.value) => {
|
|
56
|
+
var i;
|
|
57
57
|
if (B.value)
|
|
58
58
|
return;
|
|
59
59
|
const _ = n != null && n.value ? q(r) : r;
|
|
60
|
-
|
|
61
|
-
locale: o[(
|
|
60
|
+
f.value = r ? $(_, R.NUMERIC_DATE_YEAR_FIRST, {
|
|
61
|
+
locale: o[(i = w.value) == null ? void 0 : i.substring(0, 2)] || o.enUS
|
|
62
62
|
}) : null;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
},
|
|
65
|
+
}, Oe = {
|
|
66
66
|
i18n: { messages: S },
|
|
67
67
|
name: "bento-date-picker",
|
|
68
68
|
model: { prop: "modelValue" }
|
|
69
|
-
},
|
|
70
|
-
...
|
|
69
|
+
}, Te = /* @__PURE__ */ oe({
|
|
70
|
+
...Oe,
|
|
71
71
|
props: {
|
|
72
72
|
defaultDisplayMonth: { default: null },
|
|
73
73
|
firstDayOfWeek: { default: 1 },
|
|
@@ -88,8 +88,11 @@ const S = {
|
|
|
88
88
|
tooltipText: { default: null }
|
|
89
89
|
},
|
|
90
90
|
emits: ["update:model-value", "input"],
|
|
91
|
-
setup(
|
|
92
|
-
const a =
|
|
91
|
+
setup(p, { emit: B }) {
|
|
92
|
+
const a = p, w = B, { t: b } = W({ messages: S }), o = E("bento-date-picker-container"), f = E("bento-date-picker-label"), F = E("bento-date-picker-description"), T = E("bento-date-picker-error"), y = E("bento-date-picker-date-error"), r = c(() => a.label || b("datePicker", { name: o })), _ = d(null), i = d(null), s = d(!1), l = d(!1), N = d(void 0), v = d(a.modelValue), { isReadOnly: j } = Ce(M(a, "readonly")), { emitValue: k } = ge(w), z = c(() => ({
|
|
93
|
+
initialFocus: N.value,
|
|
94
|
+
additionalContainers: [i.value.$el]
|
|
95
|
+
}));
|
|
93
96
|
U(
|
|
94
97
|
() => a.disabled,
|
|
95
98
|
(e) => {
|
|
@@ -98,147 +101,145 @@ const S = {
|
|
|
98
101
|
), U(
|
|
99
102
|
[() => a.value, () => a.modelValue],
|
|
100
103
|
([e, m]) => {
|
|
101
|
-
e &&
|
|
104
|
+
e && ve(
|
|
102
105
|
'BentoDatePicker "value" property',
|
|
103
106
|
'The use of "value" prop in "BentoDatePicker" is no longer supported. Use the "v-model" or "model-value" property instead.',
|
|
104
107
|
"2.0.0"
|
|
105
|
-
),
|
|
108
|
+
), v.value = m ?? e;
|
|
106
109
|
},
|
|
107
110
|
{ immediate: !0 }
|
|
108
111
|
);
|
|
109
|
-
const
|
|
110
|
-
datePickerValue:
|
|
111
|
-
isDateIncorrect:
|
|
112
|
-
isMonthVariant:
|
|
112
|
+
const G = c(() => a.variant === "month"), { dateDisplayValue: H, textInputValue: u, formatTextInputDisplayValue: V } = _e({
|
|
113
|
+
datePickerValue: v,
|
|
114
|
+
isDateIncorrect: s,
|
|
115
|
+
isMonthVariant: G,
|
|
113
116
|
placeholder: M(a, "placeholder")
|
|
114
|
-
}), g =
|
|
117
|
+
}), g = c(() => a.isDateDisabled && u.value && a.isDateDisabled(new Date(u.value)) && !l.value ? b("selectedDateIsNotAvailable") : s.value ? b("provideDateInAFormat") : null), J = c(() => ({
|
|
115
118
|
"b-date-picker__description--error": a.errorMessage || g.value
|
|
116
|
-
})),
|
|
117
|
-
() => `${a.description ? F : ""} ${a.errorMessage ?
|
|
118
|
-
),
|
|
119
|
+
})), Q = c(
|
|
120
|
+
() => `${a.description ? F : ""} ${a.errorMessage ? T : ""} ${g.value ? y : ""}`.trim() || null
|
|
121
|
+
), X = (e) => a.min && e <= a.min || a.max && e >= a.max ? !1 : a.isDateDisabled ? !a.isDateDisabled(e) : !0, O = () => {
|
|
119
122
|
l.value = !1;
|
|
120
123
|
}, x = () => {
|
|
121
124
|
l.value = !0, V();
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
},
|
|
125
|
+
}, Z = (e) => {
|
|
126
|
+
s.value = !1, O(), k(e);
|
|
127
|
+
}, ee = async () => {
|
|
128
|
+
s.value && (s.value = !1, u.value = null), k(null);
|
|
129
|
+
}, ae = (e) => {
|
|
130
|
+
ye(e);
|
|
131
|
+
}, A = (e) => {
|
|
129
132
|
if (e.length < 10)
|
|
130
133
|
return;
|
|
131
|
-
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(e) &&
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
},
|
|
134
|
+
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(e) && X(new Date(e)) ? (s.value = !1, k(new Date(e))) : e && (s.value = !0, k(null));
|
|
135
|
+
}, te = be(A, 1e3), le = (e) => {
|
|
136
|
+
u.value = ke(e), l.value ? te(u.value) : A(u.value);
|
|
137
|
+
}, h = async (e) => {
|
|
135
138
|
var m;
|
|
136
|
-
l.value || (e.preventDefault(), x(), await
|
|
137
|
-
a.variant === "month" ? q(
|
|
139
|
+
l.value || (e.preventDefault(), x(), await ce(), v.value || (V(/* @__PURE__ */ new Date()), k(/* @__PURE__ */ new Date())), N.value = ((m = _.value) == null ? void 0 : m.$refs.calendarRef[0].focusOnDate(
|
|
140
|
+
a.variant === "month" ? q(v.value) : v.value,
|
|
138
141
|
!0
|
|
139
142
|
)) ?? void 0);
|
|
140
143
|
};
|
|
141
|
-
return (e, m) =>
|
|
144
|
+
return (e, m) => re((D(), ne("div", {
|
|
142
145
|
class: "b-date-picker",
|
|
143
146
|
onKeydownCapture: [
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
P(h, ["space"]),
|
|
148
|
+
P(h, ["enter"])
|
|
146
149
|
]
|
|
147
150
|
}, [
|
|
148
|
-
e.label ? (
|
|
151
|
+
e.label ? (D(), I(t(Be), {
|
|
149
152
|
key: 0,
|
|
150
|
-
id: t(
|
|
153
|
+
id: t(f),
|
|
151
154
|
label: e.label,
|
|
152
155
|
"tooltip-text": e.tooltipText,
|
|
153
156
|
optional: e.optional,
|
|
154
157
|
required: e.required
|
|
155
158
|
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : C("", !0),
|
|
156
|
-
|
|
157
|
-
L(t(
|
|
159
|
+
ie("div", null, [
|
|
160
|
+
L(t(De), {
|
|
158
161
|
ref_key: "inputContainerRef",
|
|
159
|
-
ref:
|
|
162
|
+
ref: i,
|
|
160
163
|
"always-combobox-is-input": "",
|
|
161
164
|
ariaControls: t(o),
|
|
162
165
|
ariaExpanded: l.value,
|
|
163
|
-
"aria-labelledby": e.label ? t(
|
|
164
|
-
"aria-describedby":
|
|
166
|
+
"aria-labelledby": e.label ? t(f) : null,
|
|
167
|
+
"aria-describedby": Q.value,
|
|
165
168
|
disabled: e.disabled,
|
|
166
169
|
"dynamic-filtering": "",
|
|
167
170
|
"is-invalid": !!e.errorMessage || !!g.value,
|
|
168
171
|
open: l.value,
|
|
169
|
-
value: t(
|
|
170
|
-
"display-value": t(
|
|
172
|
+
value: t(u),
|
|
173
|
+
"display-value": t(H),
|
|
171
174
|
"debounce-time": 0,
|
|
172
175
|
readonly: t(j),
|
|
173
|
-
onInput:
|
|
176
|
+
onInput: le,
|
|
174
177
|
onOpen: x,
|
|
175
|
-
onKeydown:
|
|
176
|
-
onClear:
|
|
178
|
+
onKeydown: ae,
|
|
179
|
+
onClear: ee,
|
|
177
180
|
onClose: O
|
|
178
181
|
}, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "value", "display-value", "readonly"])
|
|
179
182
|
]),
|
|
180
|
-
g.value ? (
|
|
183
|
+
g.value ? (D(), I(t(K), {
|
|
181
184
|
key: 1,
|
|
182
185
|
id: t(y),
|
|
183
186
|
"error-message": g.value,
|
|
184
187
|
class: "b-date-picker__error-message"
|
|
185
188
|
}, null, 8, ["id", "error-message"])) : C("", !0),
|
|
186
|
-
e.errorMessage ? (
|
|
189
|
+
e.errorMessage ? (D(), I(t(K), {
|
|
187
190
|
key: 2,
|
|
188
|
-
id: t(
|
|
191
|
+
id: t(T),
|
|
189
192
|
"error-message": e.errorMessage,
|
|
190
193
|
class: "b-date-picker__error-message"
|
|
191
194
|
}, null, 8, ["id", "error-message"])) : C("", !0),
|
|
192
|
-
e.description ? (
|
|
195
|
+
e.description ? (D(), I(t(me), {
|
|
193
196
|
key: 3,
|
|
194
|
-
class:
|
|
197
|
+
class: se(["b-date-picker__description", J.value]),
|
|
195
198
|
el: "span"
|
|
196
199
|
}, {
|
|
197
200
|
default: Y(() => [
|
|
198
|
-
|
|
201
|
+
ue(de(e.description), 1)
|
|
199
202
|
]),
|
|
200
203
|
_: 1
|
|
201
204
|
}, 8, ["class"])) : C("", !0),
|
|
202
|
-
|
|
205
|
+
i.value ? (D(), I(t(fe), {
|
|
203
206
|
key: 4,
|
|
204
207
|
id: t(o),
|
|
205
208
|
class: "b-date-picker__container",
|
|
206
209
|
role: "dialog",
|
|
207
210
|
open: l.value,
|
|
208
|
-
"target-element":
|
|
211
|
+
"target-element": i.value,
|
|
209
212
|
"aria-label": r.value,
|
|
210
213
|
"aria-modal": !0,
|
|
211
214
|
position: "bottom-start",
|
|
212
215
|
"fit-content": "",
|
|
213
216
|
"trap-all": "",
|
|
214
|
-
"trap-all-options":
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
onKeydown: R(O, ["esc", "native"])
|
|
217
|
+
"trap-all-options": z.value,
|
|
218
|
+
onKeydown: P(O, ["esc", "native"])
|
|
218
219
|
}, {
|
|
219
220
|
default: Y(() => [
|
|
220
|
-
L(t(
|
|
221
|
+
L(t(pe), {
|
|
221
222
|
ref_key: "calendarContainerRef",
|
|
222
223
|
ref: _,
|
|
223
224
|
"default-display-month": e.defaultDisplayMonth,
|
|
224
225
|
"first-day-of-week": e.firstDayOfWeek,
|
|
225
226
|
"is-date-disabled": e.isDateDisabled,
|
|
226
227
|
"number-of-months": 1,
|
|
227
|
-
value:
|
|
228
|
+
value: v.value,
|
|
228
229
|
min: e.min,
|
|
229
230
|
max: e.max,
|
|
230
231
|
variant: e.variant,
|
|
231
|
-
onInput:
|
|
232
|
+
onInput: Z
|
|
232
233
|
}, null, 8, ["default-display-month", "first-day-of-week", "is-date-disabled", "value", "min", "max", "variant"])
|
|
233
234
|
]),
|
|
234
235
|
_: 1
|
|
235
236
|
}, 8, ["id", "open", "target-element", "aria-label", "trap-all-options"])) : C("", !0)
|
|
236
237
|
], 32)), [
|
|
237
|
-
[t(
|
|
238
|
+
[t(Ee), O]
|
|
238
239
|
]);
|
|
239
240
|
}
|
|
240
|
-
}),
|
|
241
|
+
}), We = /* @__PURE__ */ we(Te, [["__scopeId", "data-v-bc2bac33"]]);
|
|
241
242
|
export {
|
|
242
|
-
|
|
243
|
+
We as B
|
|
243
244
|
};
|
|
244
|
-
//# sourceMappingURL=date-picker.
|
|
245
|
+
//# sourceMappingURL=date-picker.9zM8Cx1u.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.9zM8Cx1u.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 { DateFormat } from '@/types/date-format';\nimport { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\nimport { format } from 'date-fns/format';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n * @param {?Ref<boolean>} option.isMonthVariant Indicates if the date picker has variant \"month\"\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({\n datePickerValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n 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 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 return format(\n datePickerValue.value,\n isMonthVariant?.value ? DateFormat.LONG_MONTH_YEAR : DateFormat.FULL_DATE,\n {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n }\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 const date = isMonthVariant?.value ? startOfMonth(dateToFormat) : dateToFormat;\n textInputValue.value = dateToFormat\n ? format(date, 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","<!-- 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 :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=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalModelValue\"\n :min=\"min\"\n :max=\"max\"\n :variant=\"variant\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, toRef, watch } from 'vue';\n import { startOfMonth } from 'date-fns/startOfMonth';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, type CalendarSingleDateValue, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { 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: 1, // Monday\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\n const computedTrapAllOptions = computed(() => ({\n initialFocus: initialFocusOnDatePickerOpen.value,\n additionalContainers: [inputContainerRef.value.$el],\n }));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n watch(\n [() => props.value, () => props.modelValue],\n ([newValue, newModelValue]) => {\n if (newValue) {\n deprecate(\n 'BentoDatePicker \"value\" property',\n `The use of \"value\" prop in \"BentoDatePicker\" is no longer supported. Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n internalModelValue.value = newModelValue ?? newValue;\n },\n { immediate: true }\n );\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: internalModelValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n textInputValue.value &&\n props.isDateDisabled(new Date(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emitValue(selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emitValue(null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emitValue(new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emitValue(null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!internalModelValue.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emitValue(new Date());\n }\n\n // Set initial focus\n initialFocusOnDatePickerOpen.value =\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(\n props.variant === 'month' ? startOfMonth(internalModelValue.value) : internalModelValue.value,\n true\n ) ?? undefined;\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-picker',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","isMonthVariant","placeholder","locale","t","useI18n","messages","locales","getDateLocale","textInputValue","ref","_a","computed","format","DateFormat","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","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","stringDate","validateDateDebounced","debounce","onDateInputChange","formatDateInputValue","onSpaceBarOrEnter","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBOA,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,GACAC,IAAAC,GAAA,GAEAC,IAAAC,GAAAC,IA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KAAA,IAEAmD,EAAAnD,EAAA,KAAA;AAAA,IACJ,GAUJyD,IAAA,OAAAR,MAAA;;AACI,MAAA1B,EAAA,UAGA0B,EAAA,eAAA,GAEAL,EAAA,GAGA,MAAAc,GAAA,GAGAjC,EAAA,UAEIa,EAAA,oBAAA,KAAA,CAAA,GACAT,EAAA,oBAAA,KAAA,CAAA,IAIJL,EAAA,UAAAtB,IAAAmB,EAAA,UAAA,gBAAAnB,EAAA,MAAA,YAAA,GAAA;AAAA,QACqDQ,EAAA,YAAA,UAAAF,EAAAiB,EAAA,KAAA,IAAAA,EAAA;AAAA,QAC2C;AAAA,YACxF;AAAA,IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { reactive as ke, defineComponent as lt, useSlots as St, ref as U, computed as b, onMounted as ot, createElementBlock as he, openBlock as F, createElementVNode as ae, createCommentVNode as A, normalizeClass as _e, renderSlot as He, createBlock as V, unref as D, createVNode as z, withCtx as P, createTextVNode as ie, toRaw as Ce, watch as Me, toRef as Qe, withDirectives as ht, withKeys as Ge, toDisplayString as _t, createSlots as Mt } from "vue";
|
|
2
2
|
import { g as kt } from "./index.E60QniEu.js";
|
|
3
3
|
import { B as Ot } from "./divider.Dho4_hQ7.js";
|
|
4
|
-
import { g as wt, B as Ft } from "./button-actions.
|
|
4
|
+
import { g as wt, B as Ft } from "./button-actions.C-dLiuIO.js";
|
|
5
5
|
import { B as Ue, d as We } from "./typography.yBEME_Gu.js";
|
|
6
6
|
import { D as Ct } from "./dropdown-default-textbox.CNrsjXUU.js";
|
|
7
7
|
import { e as L, a as Ke, g as Ae } from "./differenceInMonths.Cab3nOsb.js";
|
|
@@ -13,14 +13,14 @@ import { t as J, c as qt, n as $t } from "./getTimezoneOffsetInMilliseconds.B7sx
|
|
|
13
13
|
import { u as Yt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
14
14
|
import { B as Lt } from "./directive.Cbdox5VL.js";
|
|
15
15
|
import { u as jt } from "./form-field.D_2g7vaP.js";
|
|
16
|
-
import { B as Ee } from "./input-field.
|
|
17
|
-
import { B as Ht } from "./dropdown.
|
|
18
|
-
import { B as Qt } from "./segmented-control.
|
|
16
|
+
import { B as Ee } from "./input-field.BGwhh69z.js";
|
|
17
|
+
import { B as Ht } from "./dropdown.DedOkb8I.js";
|
|
18
|
+
import { B as Qt } from "./segmented-control.PlGfqyxH.js";
|
|
19
19
|
import { d as Ie } from "./debounce.DUTu11PS.js";
|
|
20
20
|
import { u as Gt } from "./use-has-slot.B7eQSabc.js";
|
|
21
21
|
import { c as Wt } from "./constructNow.BhymNmy5.js";
|
|
22
22
|
import { _ as ut } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
23
|
-
import { F as Kt, E as Ze } from "./field-label.
|
|
23
|
+
import { F as Kt, E as Ze } from "./field-label.Cu6X9V0_.js";
|
|
24
24
|
import { B as Pt } from "./button-actions.types.BptAXjD8.js";
|
|
25
25
|
import "../assets/date-range-picker.css";
|
|
26
26
|
function ue(a) {
|
|
@@ -1105,4 +1105,4 @@ export {
|
|
|
1105
1105
|
sa as a,
|
|
1106
1106
|
Se as i
|
|
1107
1107
|
};
|
|
1108
|
-
//# sourceMappingURL=date-range-picker.
|
|
1108
|
+
//# sourceMappingURL=date-range-picker.DI-2cYg5.js.map
|