@wssto2/vue-core 0.4.15 → 0.4.17
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/{ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
- package/dist/{Activity-4q26REYj.js → Activity-DnFB6WXf.js} +5 -5
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js} +64 -63
- package/dist/{Changes-CKIuGF8O.js → Changes-DMrQYv2e.js} +4 -4
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CVnZzaBm.js} +5 -5
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js → DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js} +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-BIXzNzYo.js +278 -0
- package/dist/{DeadLetters-DPGcQOz1.js → DeadLetters-BF9PS4mA.js} +3 -3
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +1 -1
- package/dist/{General-CUA9b3ML.js → General-yInbmj6I.js} +8 -8
- package/dist/{NewRolePage-DBfCvDWA.js → NewRolePage-09C3P6fE.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js +150 -0
- package/dist/{ProfilePage-On-eAiJ-.js → ProfilePage-CvV44C0m.js} +8 -8
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-D87Hs75d.js → RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js → ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js → RoleEditor.vue_vue_type_script_setup_true_lang-BqWoby16.js} +7 -7
- package/dist/{RolePage-B8oul55j.js → RolePage-DuIFjSKH.js} +8 -8
- package/dist/{RolesPage-DsXVivdj.js → RolesPage-BzqBqils.js} +5 -5
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-B0p_8xQG.js → SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js} +2 -2
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js → SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js} +161 -139
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js → SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js} +3 -3
- package/dist/{Sessions-BTyXDEuY.js → Sessions-_qmODKw2.js} +2 -2
- package/dist/{SettingsPage-DHTmMgif.js → SettingsPage-Bz48sO08.js} +9 -9
- package/dist/{SignIn-DU4DE2wj.js → SignIn-DJsTGQ79.js} +5 -5
- package/dist/{SignInPage-BA22kyOp.js → SignInPage-Bb78MIDk.js} +3 -3
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js → SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js} +1 -1
- package/dist/{SignIns-C8QAZBaL.js → SignIns-yRjJrf47.js} +2 -2
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js +187 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js → Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js} +1 -1
- package/dist/{UserRecord-D1BNmYp9.js → UserRecord-4L0FrCty.js} +9 -9
- package/dist/{UsersList-ltx3G23-.js → UsersList-ww_-FoAq.js} +9 -9
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +1 -1
- package/dist/app/index.js +1 -1
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +1 -1
- package/dist/{control-CX9BG2UB.js → control-B_Nwtmag.js} +96 -82
- package/dist/{fieldMessages-DV6sESpn.js → fieldMessages-6HVzSDqG.js} +1 -1
- package/dist/form/CardSelectField.vue.d.ts +2 -2
- package/dist/form/ChoiceChips.vue.d.ts +2 -2
- package/dist/form/ComboField.vue.d.ts +2 -2
- package/dist/form/CommandDialog.vue.d.ts +3 -0
- package/dist/form/DateField.vue.d.ts +9 -2
- package/dist/form/DateTimeField.vue.d.ts +9 -2
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +9 -2
- package/dist/form/I18nField.vue.d.ts +9 -2
- package/dist/form/MoneyField.vue.d.ts +9 -2
- package/dist/form/MonthYearField.vue.d.ts +9 -2
- package/dist/form/MultiSelectField.vue.d.ts +2 -2
- package/dist/form/NumberField.vue.d.ts +20 -2
- package/dist/form/PhotoField.vue.d.ts +9 -2
- package/dist/form/SegmentedField.vue.d.ts +2 -2
- package/dist/form/SelectField.vue.d.ts +2 -2
- package/dist/form/SwitchField.vue.d.ts +2 -2
- package/dist/form/TextField.vue.d.ts +9 -2
- package/dist/form/TextareaField.vue.d.ts +9 -2
- package/dist/form/TimeField.vue.d.ts +9 -2
- package/dist/form/field.d.ts +9 -0
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +1176 -977
- package/dist/format/index.js +1 -1
- package/dist/format-D8X4zsx6.js +78 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +31 -28
- package/dist/identity/index.js +1 -1
- package/dist/{index-BCw_Ki6z.js → index-C6vCe149.js} +3 -3
- package/dist/{index-Chh4z9xW.js → index-DW9gyWL1.js} +8 -8
- package/dist/{index-DwdVrW6q.js → index-JjALCpwi.js} +13 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +2 -0
- package/dist/intlLocale-CeRU44qJ.js +4 -0
- package/dist/notifications/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/phone/index.js +112 -111
- package/dist/resource/index.js +1 -1
- package/dist/{rowLayout-D1cYQghV.js → rowLayout-BFz4Kdoy.js} +2 -2
- package/dist/{status-cWCAMAmW.js → status-Cz54-7z7.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-B-N6HJOz.js → useCommand-YN9EMb7s.js} +41 -38
- package/dist/{useTypedEntry-aTfPBAhw.js → useTypedEntry-C7k7Dyl-.js} +237 -236
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js +0 -256
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +0 -126
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js +0 -59
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js +0 -65
- package/dist/TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js +0 -270
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js +0 -69
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js +0 -165
- package/dist/format-B8mJm946.js +0 -77
|
@@ -1,82 +1,83 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as K, ref as L, watch as re, computed as _, openBlock as f, createElementBlock as b, Fragment as I, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Ee, toDisplayString as M, renderList as j, useModel as ce, useId as Te, useTemplateRef as me, createCommentVNode as Z, createBlock as ue, mergeModels as fe, nextTick as Ce, onMounted as Fe, onBeforeUnmount as je, normalizeStyle as ee, withCtx as ye } from "vue";
|
|
2
|
+
import { i as W } from "./intlLocale-CeRU44qJ.js";
|
|
3
|
+
import { useI18n as X } from "vue-i18n";
|
|
4
|
+
import { u as Me } from "./format-D8X4zsx6.js";
|
|
5
|
+
import { _ as Oe } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
5
6
|
import { _ as F } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
-
import { a as
|
|
7
|
-
const
|
|
7
|
+
import { a as We } from "./mediaQuery-CygcXmFW.js";
|
|
8
|
+
const Re = /^(\d{4})-(\d{2})-(\d{2})$/, Ve = 864e5, R = (e, t = 2) => String(e).padStart(t, "0"), He = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Be = (e) => e % 4 === 0 && e % 100 !== 0 || e % 400 === 0, se = (e, t) => t === 2 && Be(e) ? 29 : He[t - 1] ?? 0;
|
|
8
9
|
function O(e, t, a) {
|
|
9
|
-
return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a >
|
|
10
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a > se(e, t) ? null : `${R(e, 4)}-${R(t)}-${R(a)}`;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
const t = e ?
|
|
12
|
+
function H(e) {
|
|
13
|
+
const t = e ? Re.exec(e) : null;
|
|
13
14
|
if (!t) return null;
|
|
14
15
|
const a = { year: Number(t[1]), month: Number(t[2]), day: Number(t[3]) };
|
|
15
16
|
return O(a.year, a.month, a.day) ? a : null;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
18
|
+
const le = (e) => H(e) !== null, Ne = (e) => `${R(e.year, 4)}-${R(e.month)}-${R(e.day)}`;
|
|
19
|
+
function Se(e) {
|
|
19
20
|
const t = /* @__PURE__ */ new Date(0);
|
|
20
|
-
return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() /
|
|
21
|
+
return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() / Ve);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
const t = new Date(e *
|
|
23
|
+
function Ke(e) {
|
|
24
|
+
const t = new Date(e * Ve);
|
|
24
25
|
return { year: t.getUTCFullYear(), month: t.getUTCMonth() + 1, day: t.getUTCDate() };
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const ie = (e) => H(e) ?? { year: 1970, month: 1, day: 1 };
|
|
27
28
|
function Y(e, t) {
|
|
28
|
-
return
|
|
29
|
+
return Ne(Ke(Se(ie(e)) + t));
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
const a =
|
|
32
|
-
return O(u, m, Math.min(a.day,
|
|
31
|
+
function B(e, t) {
|
|
32
|
+
const a = ie(e), n = a.year * 12 + (a.month - 1) + t, u = Math.floor(n / 12), m = n % 12 + 1;
|
|
33
|
+
return O(u, m, Math.min(a.day, se(u, m))) ?? e;
|
|
33
34
|
}
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
const t =
|
|
37
|
-
return
|
|
35
|
+
const xe = (e, t) => B(e, t * 12);
|
|
36
|
+
function oe(e) {
|
|
37
|
+
const t = ie(e);
|
|
38
|
+
return Ne({ ...t, day: se(t.year, t.month) });
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
const t = (
|
|
40
|
+
function ve(e) {
|
|
41
|
+
const t = (Se(ie(e)) + 3) % 7;
|
|
41
42
|
return (t < 0 ? t + 7 : t) + 1;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
return Y(e, -((
|
|
44
|
+
function be(e, t) {
|
|
45
|
+
return Y(e, -((ve(e) - t + 7) % 7));
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
47
|
+
const Qe = (e, t) => Y(be(e, t), 6);
|
|
48
|
+
function qe(e) {
|
|
48
49
|
let t = Y(e, 1);
|
|
49
|
-
for (;
|
|
50
|
+
for (; ve(t) >= 6; ) t = Y(t, 1);
|
|
50
51
|
return t;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function de(e = /* @__PURE__ */ new Date()) {
|
|
53
54
|
return O(e.getFullYear(), e.getMonth() + 1, e.getDate()) ?? "1970-01-01";
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function Ge(e, t) {
|
|
56
57
|
if (t.min && e < t.min || t.max && e > t.max) return !0;
|
|
57
58
|
const a = t.disabled;
|
|
58
59
|
return a ? typeof a == "function" ? a(e) : a.some((n) => typeof n == "string" ? n === e : e >= n.from && e <= n.to) : !1;
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function te(e, t) {
|
|
61
62
|
return t.min && e < t.min ? t.min : t.max && e > t.max ? t.max : e;
|
|
62
63
|
}
|
|
63
|
-
function Ge(e) {
|
|
64
|
-
return Se(e)?.firstDay ?? 1;
|
|
65
|
-
}
|
|
66
64
|
function Ze(e) {
|
|
67
|
-
return
|
|
65
|
+
return Ue(e)?.firstDay ?? 1;
|
|
68
66
|
}
|
|
69
|
-
function
|
|
67
|
+
function Je(e) {
|
|
68
|
+
return Ue(e)?.weekend ?? [6, 7];
|
|
69
|
+
}
|
|
70
|
+
function Ue(e) {
|
|
70
71
|
try {
|
|
71
|
-
const t = new Intl.Locale(e);
|
|
72
|
+
const t = new Intl.Locale(W(e));
|
|
72
73
|
return t.getWeekInfo?.() ?? t.weekInfo ?? null;
|
|
73
74
|
} catch {
|
|
74
75
|
return null;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
-
const n = O(e, t, 1) ?? "1970-01-01", u =
|
|
79
|
-
for (let r =
|
|
78
|
+
function Xe(e, t, a) {
|
|
79
|
+
const n = O(e, t, 1) ?? "1970-01-01", u = oe(n), m = [];
|
|
80
|
+
for (let r = be(n, a.firstWeekday); r <= u; r = Y(r, 7))
|
|
80
81
|
m.push(
|
|
81
82
|
Array.from({ length: 7 }, (d, o) => {
|
|
82
83
|
const c = Y(r, o);
|
|
@@ -84,16 +85,16 @@ function Je(e, t, a) {
|
|
|
84
85
|
day: c,
|
|
85
86
|
date: Number(c.slice(8)),
|
|
86
87
|
inMonth: c.startsWith(n.slice(0, 7)),
|
|
87
|
-
weekend: a.weekend.includes(
|
|
88
|
+
weekend: a.weekend.includes(ve(c)),
|
|
88
89
|
today: c === a.today,
|
|
89
90
|
selected: c === a.selected,
|
|
90
|
-
disabled:
|
|
91
|
+
disabled: Ge(c, a.rules)
|
|
91
92
|
};
|
|
92
93
|
})
|
|
93
94
|
);
|
|
94
95
|
return m;
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function et(e, t, a, n) {
|
|
97
98
|
switch (t) {
|
|
98
99
|
case "ArrowLeft":
|
|
99
100
|
return Y(e, -1);
|
|
@@ -104,24 +105,24 @@ function Xe(e, t, a, n) {
|
|
|
104
105
|
case "ArrowDown":
|
|
105
106
|
return Y(e, 7);
|
|
106
107
|
case "PageUp":
|
|
107
|
-
return a ?
|
|
108
|
+
return a ? xe(e, -1) : B(e, -1);
|
|
108
109
|
case "PageDown":
|
|
109
|
-
return a ?
|
|
110
|
+
return a ? xe(e, 1) : B(e, 1);
|
|
110
111
|
case "Home":
|
|
111
|
-
return
|
|
112
|
+
return be(e, n);
|
|
112
113
|
case "End":
|
|
113
|
-
return
|
|
114
|
+
return Qe(e, n);
|
|
114
115
|
default:
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
|
-
const
|
|
119
|
+
const tt = {
|
|
119
120
|
class: "flex flex-col gap-2",
|
|
120
121
|
"data-test": "month-year-panel"
|
|
121
|
-
},
|
|
122
|
+
}, at = { class: "flex items-center" }, nt = ["disabled", "aria-label"], lt = ["aria-label"], ot = ["disabled", "aria-label"], rt = { class: "grid grid-cols-3 gap-1.5" }, st = ["aria-pressed", "aria-label", "disabled", "onClick"], it = { class: "flex items-center" }, ut = ["disabled", "aria-label"], dt = {
|
|
122
123
|
class: "grow text-center text-body font-semibold tabular-nums",
|
|
123
124
|
"aria-live": "polite"
|
|
124
|
-
},
|
|
125
|
+
}, ct = ["disabled", "aria-label"], mt = { class: "grid grid-cols-3 gap-1.5" }, ft = ["aria-pressed", "disabled", "onClick"], ae = "flex size-8 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", ge = "min-h-9 cursor-pointer rounded-full px-1 text-subheadline focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-fill", vt = /* @__PURE__ */ K({
|
|
125
126
|
__name: "MonthYearPanel",
|
|
126
127
|
props: {
|
|
127
128
|
month: { default: null },
|
|
@@ -133,8 +134,8 @@ const et = {
|
|
|
133
134
|
},
|
|
134
135
|
emits: ["pick"],
|
|
135
136
|
setup(e, { emit: t }) {
|
|
136
|
-
const a = e, n = t, { t: u } =
|
|
137
|
-
|
|
137
|
+
const a = e, n = t, { t: u } = X(), m = (k) => Math.floor(k / 10) * 10, r = L(c(a.year ?? a.viewYear ?? (/* @__PURE__ */ new Date()).getFullYear())), d = L(!1), o = L(m(r.value));
|
|
138
|
+
re(
|
|
138
139
|
() => a.year,
|
|
139
140
|
(k) => {
|
|
140
141
|
k !== null && (r.value = c(k));
|
|
@@ -151,59 +152,59 @@ const et = {
|
|
|
151
152
|
r.value = k, d.value = !1;
|
|
152
153
|
}
|
|
153
154
|
const P = (k) => k ? "bg-tint font-semibold text-content-on-tint" : "bg-fill text-content-strong hover:bg-fill-strong";
|
|
154
|
-
return (k, g) => (f(), b("div",
|
|
155
|
+
return (k, g) => (f(), b("div", tt, [
|
|
155
156
|
d.value ? (f(), b(I, { key: 1 }, [
|
|
156
|
-
h("div",
|
|
157
|
+
h("div", it, [
|
|
157
158
|
h("button", {
|
|
158
159
|
type: "button",
|
|
159
160
|
disabled: o.value <= a.minYear,
|
|
160
161
|
"aria-label": y(u)("core.form.date.previous_years"),
|
|
161
|
-
class: $(
|
|
162
|
+
class: $(ae),
|
|
162
163
|
onClick: g[2] || (g[2] = (p) => o.value -= 12)
|
|
163
164
|
}, [
|
|
164
165
|
N(y(F), {
|
|
165
166
|
name: "arrowLeftSLine",
|
|
166
167
|
size: 18
|
|
167
168
|
})
|
|
168
|
-
], 8,
|
|
169
|
-
h("p",
|
|
169
|
+
], 8, ut),
|
|
170
|
+
h("p", dt, M(v.value[0]) + " – " + M(v.value[11]), 1),
|
|
170
171
|
h("button", {
|
|
171
172
|
type: "button",
|
|
172
173
|
disabled: o.value + 11 >= a.maxYear,
|
|
173
174
|
"aria-label": y(u)("core.form.date.next_years"),
|
|
174
|
-
class: $(
|
|
175
|
+
class: $(ae),
|
|
175
176
|
onClick: g[3] || (g[3] = (p) => o.value += 12)
|
|
176
177
|
}, [
|
|
177
178
|
N(y(F), {
|
|
178
179
|
name: "arrowRightSLine",
|
|
179
180
|
size: 18
|
|
180
181
|
})
|
|
181
|
-
], 8,
|
|
182
|
+
], 8, ct)
|
|
182
183
|
]),
|
|
183
|
-
h("div",
|
|
184
|
+
h("div", mt, [
|
|
184
185
|
(f(!0), b(I, null, j(v.value, (p) => (f(), b("button", {
|
|
185
186
|
key: p,
|
|
186
187
|
type: "button",
|
|
187
188
|
"aria-pressed": a.year === p,
|
|
188
189
|
disabled: p < a.minYear || p > a.maxYear,
|
|
189
|
-
class: $([
|
|
190
|
+
class: $([ge, "tabular-nums", P(a.year === p || a.year === null && r.value === p)]),
|
|
190
191
|
onClick: (l) => S(p)
|
|
191
|
-
}, M(p), 11,
|
|
192
|
+
}, M(p), 11, ft))), 128))
|
|
192
193
|
])
|
|
193
194
|
], 64)) : (f(), b(I, { key: 0 }, [
|
|
194
|
-
h("div",
|
|
195
|
+
h("div", at, [
|
|
195
196
|
h("button", {
|
|
196
197
|
type: "button",
|
|
197
198
|
disabled: r.value <= a.minYear,
|
|
198
199
|
"aria-label": y(u)("core.form.date.previous_year"),
|
|
199
|
-
class: $(
|
|
200
|
+
class: $(ae),
|
|
200
201
|
onClick: g[0] || (g[0] = (p) => r.value = c(r.value - 1))
|
|
201
202
|
}, [
|
|
202
203
|
N(y(F), {
|
|
203
204
|
name: "arrowLeftSLine",
|
|
204
205
|
size: 18
|
|
205
206
|
})
|
|
206
|
-
], 8,
|
|
207
|
+
], 8, nt),
|
|
207
208
|
h("button", {
|
|
208
209
|
type: "button",
|
|
209
210
|
"aria-label": y(u)("core.form.date.years"),
|
|
@@ -211,43 +212,43 @@ const et = {
|
|
|
211
212
|
class: "flex min-h-8 grow cursor-pointer items-center justify-center gap-1 rounded-control text-lg font-semibold tabular-nums hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
212
213
|
onClick: z
|
|
213
214
|
}, [
|
|
214
|
-
|
|
215
|
+
Ee(M(r.value), 1),
|
|
215
216
|
N(y(F), {
|
|
216
217
|
name: "arrowDownSLine",
|
|
217
218
|
size: 14,
|
|
218
219
|
class: "text-content-link"
|
|
219
220
|
})
|
|
220
|
-
], 8,
|
|
221
|
+
], 8, lt),
|
|
221
222
|
h("button", {
|
|
222
223
|
type: "button",
|
|
223
224
|
disabled: r.value >= a.maxYear,
|
|
224
225
|
"aria-label": y(u)("core.form.date.next_year"),
|
|
225
|
-
class: $(
|
|
226
|
+
class: $(ae),
|
|
226
227
|
onClick: g[1] || (g[1] = (p) => r.value = c(r.value + 1))
|
|
227
228
|
}, [
|
|
228
229
|
N(y(F), {
|
|
229
230
|
name: "arrowRightSLine",
|
|
230
231
|
size: 18
|
|
231
232
|
})
|
|
232
|
-
], 8,
|
|
233
|
+
], 8, ot)
|
|
233
234
|
]),
|
|
234
|
-
h("div",
|
|
235
|
+
h("div", rt, [
|
|
235
236
|
(f(), b(I, null, j(12, (p) => h("button", {
|
|
236
237
|
key: p,
|
|
237
238
|
type: "button",
|
|
238
239
|
"aria-pressed": D(p),
|
|
239
240
|
"aria-label": `${w(p, "long")} ${r.value}`,
|
|
240
241
|
disabled: a.monthDisabled?.(r.value, p),
|
|
241
|
-
class: $([
|
|
242
|
+
class: $([ge, P(D(p))]),
|
|
242
243
|
onClick: (l) => n("pick", { month: p, year: r.value })
|
|
243
|
-
}, M(w(p, "short")), 11,
|
|
244
|
+
}, M(w(p, "short")), 11, st)), 64))
|
|
244
245
|
])
|
|
245
246
|
], 64))
|
|
246
247
|
]));
|
|
247
248
|
}
|
|
248
|
-
}),
|
|
249
|
+
}), bt = ["aria-expanded", "aria-label"], pt = ["id"], ht = ["id"], yt = ["disabled", "aria-label"], xt = ["disabled", "aria-label"], gt = ["aria-labelledby"], kt = ["aria-selected"], _t = ["data-day", "aria-label", "aria-current", "aria-disabled", "tabindex", "onClick"], ke = "flex shrink-0 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", wt = /* @__PURE__ */ K({
|
|
249
250
|
__name: "Calendar",
|
|
250
|
-
props: /* @__PURE__ */
|
|
251
|
+
props: /* @__PURE__ */ fe({
|
|
251
252
|
min: { default: null },
|
|
252
253
|
max: { default: null },
|
|
253
254
|
disabledDates: { type: [Array, Function], default: void 0 },
|
|
@@ -260,59 +261,59 @@ const et = {
|
|
|
260
261
|
}),
|
|
261
262
|
emits: ["update:modelValue"],
|
|
262
263
|
setup(e, { expose: t }) {
|
|
263
|
-
const a = e, n =
|
|
264
|
+
const a = e, n = ce(e, "modelValue"), { t: u } = X(), m = Me(), r = Te(), d = me("grid"), o = _(() => ({ min: a.min, max: a.max, disabled: a.disabledDates })), c = _(() => Ze(m.locale));
|
|
264
265
|
function v() {
|
|
265
|
-
return
|
|
266
|
+
return le(n.value) ? n.value : te(le(a.openOn) ? a.openOn : de(), o.value);
|
|
266
267
|
}
|
|
267
|
-
const w =
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
const w = H(v()), D = L({ year: w.year, month: w.month }), z = L(v()), S = L(!1);
|
|
269
|
+
re(n, (i) => {
|
|
270
|
+
le(i) && P(i);
|
|
270
271
|
});
|
|
271
272
|
function P(i) {
|
|
272
|
-
const x =
|
|
273
|
+
const x = H(i);
|
|
273
274
|
D.value = { year: x.year, month: x.month }, z.value = i;
|
|
274
275
|
}
|
|
275
276
|
const k = _(
|
|
276
|
-
() =>
|
|
277
|
+
() => Xe(D.value.year, D.value.month, { firstWeekday: c.value, weekend: Je(m.locale), today: de(), selected: n.value, rules: o.value })
|
|
277
278
|
), g = _(() => O(D.value.year, D.value.month, 1) ?? "1970-01-01"), p = _(() => z.value.startsWith(g.value.slice(0, 7)) ? z.value : g.value), l = _(() => u("core.form.months.with_year", { month: u(`core.form.months.long.${D.value.month}`), year: D.value.year })), T = _(() => {
|
|
278
|
-
const i = new Intl.DateTimeFormat(m.locale, { weekday: "short", timeZone: "UTC" });
|
|
279
|
+
const i = new Intl.DateTimeFormat(W(m.locale), { weekday: "short", timeZone: "UTC" });
|
|
279
280
|
return Array.from({ length: 7 }, (x, C) => {
|
|
280
|
-
const
|
|
281
|
-
return V.charAt(0).toLocaleUpperCase(m.locale) + V.slice(1, 2);
|
|
281
|
+
const q = new Date(Date.UTC(2026, 8, 28 + (c.value - 1 + C) % 7)), V = i.format(q).replace(/\.$/, "");
|
|
282
|
+
return V.charAt(0).toLocaleUpperCase(W(m.locale)) + V.slice(1, 2);
|
|
282
283
|
});
|
|
283
284
|
}), s = _(() => {
|
|
284
|
-
const i = new Intl.DateTimeFormat(m.locale, { dateStyle: "full", timeZone: "UTC" });
|
|
285
|
+
const i = new Intl.DateTimeFormat(W(m.locale), { dateStyle: "full", timeZone: "UTC" });
|
|
285
286
|
return (x) => {
|
|
286
|
-
const C =
|
|
287
|
+
const C = H(x);
|
|
287
288
|
return i.format(new Date(Date.UTC(C.year, C.month - 1, C.day)));
|
|
288
289
|
};
|
|
289
|
-
}), A = _(() => !a.min ||
|
|
290
|
-
async function
|
|
291
|
-
P(i), x && (await
|
|
290
|
+
}), A = _(() => !a.min || oe(B(g.value, -1)) >= a.min), E = _(() => !a.max || B(g.value, 1) <= a.max);
|
|
291
|
+
async function Q(i, x) {
|
|
292
|
+
P(i), x && (await Ce(), pe());
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
+
function pe() {
|
|
294
295
|
d.value?.querySelector(`[data-day="${p.value}"]`)?.focus();
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
+
function ze(i) {
|
|
297
298
|
if (i.altKey || i.ctrlKey || i.metaKey) return;
|
|
298
|
-
const x =
|
|
299
|
-
x && (i.preventDefault(),
|
|
299
|
+
const x = et(p.value, i.key, i.shiftKey, c.value);
|
|
300
|
+
x && (i.preventDefault(), Q(te(x, o.value), !0));
|
|
300
301
|
}
|
|
301
|
-
const
|
|
302
|
-
function
|
|
302
|
+
const he = (i) => Q(te(B(p.value, i), o.value), !1);
|
|
303
|
+
function Ae(i, x) {
|
|
303
304
|
z.value = i, x || (n.value = i);
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
-
const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)),
|
|
307
|
-
S.value = !1,
|
|
306
|
+
function Ie(i) {
|
|
307
|
+
const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)), se(i.year, i.month)));
|
|
308
|
+
S.value = !1, Q(te(x ?? g.value, o.value), !0);
|
|
308
309
|
}
|
|
309
|
-
const
|
|
310
|
+
const Le = (i, x) => {
|
|
310
311
|
const C = O(i, x, 1) ?? "";
|
|
311
|
-
return !!a.max && C > a.max || !!a.min &&
|
|
312
|
+
return !!a.max && C > a.max || !!a.min && oe(C) < a.min;
|
|
312
313
|
};
|
|
313
|
-
t({ focus:
|
|
314
|
+
t({ focus: pe });
|
|
314
315
|
const U = _(() => a.size === "touch");
|
|
315
|
-
function
|
|
316
|
+
function Pe(i) {
|
|
316
317
|
if (i.selected) return "bg-tint font-semibold text-content-on-tint";
|
|
317
318
|
const x = i.disabled ? "cursor-default text-content-disabled line-through decoration-1" : i.inMonth ? i.weekend ? "text-content-muted" : "text-content-strong" : "text-content-disabled", C = i.today ? "font-bold text-content-link ring-[1.5px] ring-inset ring-tint" : "";
|
|
318
319
|
return [x, C, i.disabled ? "" : "hover:bg-fill"].join(" ");
|
|
@@ -335,54 +336,54 @@ const et = {
|
|
|
335
336
|
h("span", {
|
|
336
337
|
id: y(r),
|
|
337
338
|
"aria-live": "polite"
|
|
338
|
-
}, M(l.value), 9,
|
|
339
|
+
}, M(l.value), 9, pt),
|
|
339
340
|
N(y(F), {
|
|
340
341
|
name: "arrowDownSLine",
|
|
341
342
|
size: 14,
|
|
342
343
|
class: "text-content-link"
|
|
343
344
|
})
|
|
344
|
-
], 8,
|
|
345
|
+
], 8, bt)) : (f(), b("p", {
|
|
345
346
|
key: 1,
|
|
346
347
|
id: y(r),
|
|
347
348
|
"aria-live": "polite",
|
|
348
349
|
class: $(["ml-1.5 font-semibold", U.value ? "text-headline" : "text-lg"])
|
|
349
|
-
}, M(l.value), 11,
|
|
350
|
+
}, M(l.value), 11, ht)),
|
|
350
351
|
x[3] || (x[3] = h("span", { class: "grow" }, null, -1)),
|
|
351
|
-
S.value ?
|
|
352
|
+
S.value ? Z("", !0) : (f(), b(I, { key: 2 }, [
|
|
352
353
|
h("button", {
|
|
353
354
|
type: "button",
|
|
354
355
|
disabled: !A.value,
|
|
355
356
|
"aria-label": y(u)("core.form.date.previous_month"),
|
|
356
|
-
class: $([
|
|
357
|
-
onClick: x[1] || (x[1] = (C) =>
|
|
357
|
+
class: $([ke, U.value ? "size-11" : "size-8"]),
|
|
358
|
+
onClick: x[1] || (x[1] = (C) => he(-1))
|
|
358
359
|
}, [
|
|
359
360
|
N(y(F), {
|
|
360
361
|
name: "arrowLeftSLine",
|
|
361
362
|
size: U.value ? 22 : 18
|
|
362
363
|
}, null, 8, ["size"])
|
|
363
|
-
], 10,
|
|
364
|
+
], 10, yt),
|
|
364
365
|
h("button", {
|
|
365
366
|
type: "button",
|
|
366
367
|
disabled: !E.value,
|
|
367
368
|
"aria-label": y(u)("core.form.date.next_month"),
|
|
368
|
-
class: $([
|
|
369
|
-
onClick: x[2] || (x[2] = (C) =>
|
|
369
|
+
class: $([ke, U.value ? "size-11" : "size-8"]),
|
|
370
|
+
onClick: x[2] || (x[2] = (C) => he(1))
|
|
370
371
|
}, [
|
|
371
372
|
N(y(F), {
|
|
372
373
|
name: "arrowRightSLine",
|
|
373
374
|
size: U.value ? 22 : 18
|
|
374
375
|
}, null, 8, ["size"])
|
|
375
|
-
], 10,
|
|
376
|
+
], 10, xt)
|
|
376
377
|
], 64))
|
|
377
378
|
], 2),
|
|
378
|
-
S.value ? (f(),
|
|
379
|
+
S.value ? (f(), ue(vt, {
|
|
379
380
|
key: 0,
|
|
380
381
|
month: D.value.month,
|
|
381
382
|
year: D.value.year,
|
|
382
383
|
"min-year": a.min ? Number(a.min.slice(0, 4)) : 1,
|
|
383
384
|
"max-year": a.max ? Number(a.max.slice(0, 4)) : 9999,
|
|
384
|
-
"month-disabled":
|
|
385
|
-
onPick:
|
|
385
|
+
"month-disabled": Le,
|
|
386
|
+
onPick: Ie
|
|
386
387
|
}, null, 8, ["month", "year", "min-year", "max-year"])) : (f(), b("div", {
|
|
387
388
|
key: 1,
|
|
388
389
|
ref_key: "grid",
|
|
@@ -390,20 +391,20 @@ const et = {
|
|
|
390
391
|
role: "grid",
|
|
391
392
|
"aria-labelledby": y(r),
|
|
392
393
|
class: $(["flex flex-col", U.value ? "gap-y-1" : "gap-0.5"]),
|
|
393
|
-
onKeydown:
|
|
394
|
+
onKeydown: ze
|
|
394
395
|
}, [
|
|
395
396
|
h("div", {
|
|
396
397
|
role: "row",
|
|
397
398
|
class: $(["grid grid-cols-7 text-center", U.value ? "" : "gap-0.5"])
|
|
398
399
|
}, [
|
|
399
|
-
(f(!0), b(I, null, j(T.value, (C,
|
|
400
|
-
key:
|
|
400
|
+
(f(!0), b(I, null, j(T.value, (C, q) => (f(), b("div", {
|
|
401
|
+
key: q,
|
|
401
402
|
role: "columnheader",
|
|
402
403
|
class: $(["py-1 font-semibold text-content-disabled", U.value ? "text-footnote" : "text-caption"])
|
|
403
404
|
}, M(C), 3))), 128))
|
|
404
405
|
], 2),
|
|
405
|
-
(f(!0), b(I, null, j(k.value, (C,
|
|
406
|
-
key:
|
|
406
|
+
(f(!0), b(I, null, j(k.value, (C, q) => (f(), b("div", {
|
|
407
|
+
key: q,
|
|
407
408
|
role: "row",
|
|
408
409
|
class: $(["grid grid-cols-7", U.value ? "" : "gap-0.5"])
|
|
409
410
|
}, [
|
|
@@ -419,15 +420,15 @@ const et = {
|
|
|
419
420
|
"aria-current": V.today ? "date" : void 0,
|
|
420
421
|
"aria-disabled": V.disabled || void 0,
|
|
421
422
|
tabindex: V.day === p.value ? 0 : -1,
|
|
422
|
-
class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [U.value ? "h-11 text-body" : "h-9 text-body",
|
|
423
|
-
onClick: (
|
|
424
|
-
}, M(V.date), 11,
|
|
425
|
-
], 8,
|
|
423
|
+
class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [U.value ? "h-11 text-body" : "h-9 text-body", Pe(V)]]),
|
|
424
|
+
onClick: (Qt) => Ae(V.day, V.disabled)
|
|
425
|
+
}, M(V.date), 11, _t)
|
|
426
|
+
], 8, kt))), 128))
|
|
426
427
|
], 2))), 128))
|
|
427
|
-
], 42,
|
|
428
|
+
], 42, gt))
|
|
428
429
|
], 2));
|
|
429
430
|
}
|
|
430
|
-
}),
|
|
431
|
+
}), $t = ["aria-label"], Dt = ["disabled", "aria-pressed", "onClick"], Tt = /* @__PURE__ */ K({
|
|
431
432
|
__name: "QuickChips",
|
|
432
433
|
props: {
|
|
433
434
|
items: {},
|
|
@@ -436,7 +437,7 @@ const et = {
|
|
|
436
437
|
},
|
|
437
438
|
emits: ["pick"],
|
|
438
439
|
setup(e, { emit: t }) {
|
|
439
|
-
const a = e, n = t, { t: u } =
|
|
440
|
+
const a = e, n = t, { t: u } = X();
|
|
440
441
|
return (m, r) => (f(), b("div", {
|
|
441
442
|
role: "group",
|
|
442
443
|
"aria-label": y(u)("core.form.date.quick"),
|
|
@@ -453,28 +454,28 @@ const et = {
|
|
|
453
454
|
d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
|
|
454
455
|
]]),
|
|
455
456
|
onClick: (o) => n("pick", d.value)
|
|
456
|
-
}, M(d.label), 11,
|
|
457
|
-
], 8,
|
|
457
|
+
}, M(d.label), 11, Dt))), 128))
|
|
458
|
+
], 8, $t));
|
|
458
459
|
}
|
|
459
|
-
}),
|
|
460
|
-
function
|
|
461
|
-
return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${
|
|
460
|
+
}), Ct = /^(\d{2}):(\d{2})$/, _e = (e) => String(e).padStart(2, "0");
|
|
461
|
+
function J(e, t) {
|
|
462
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${_e(e)}:${_e(t)}`;
|
|
462
463
|
}
|
|
463
|
-
function
|
|
464
|
-
const t = e ?
|
|
465
|
-
return t &&
|
|
464
|
+
function Ye(e) {
|
|
465
|
+
const t = e ? Ct.exec(e) : null;
|
|
466
|
+
return t && J(Number(t[1]), Number(t[2])) ? { hour: Number(t[1]), minute: Number(t[2]) } : null;
|
|
466
467
|
}
|
|
467
|
-
const
|
|
468
|
-
function
|
|
468
|
+
const aa = (e) => Ye(e) !== null;
|
|
469
|
+
function Mt(e) {
|
|
469
470
|
const t = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
470
471
|
return Array.from({ length: Math.ceil(60 / t) }, (a, n) => n * t);
|
|
471
472
|
}
|
|
472
|
-
const
|
|
473
|
-
function
|
|
473
|
+
const we = Array.from({ length: 24 }, (e, t) => t);
|
|
474
|
+
function $e(e = 1, t = /* @__PURE__ */ new Date()) {
|
|
474
475
|
const a = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
475
|
-
return
|
|
476
|
+
return J(t.getHours(), t.getMinutes() - t.getMinutes() % a) ?? "00:00";
|
|
476
477
|
}
|
|
477
|
-
function
|
|
478
|
+
function na(e, t = 1) {
|
|
478
479
|
const a = e.trim().toLowerCase();
|
|
479
480
|
let n, u;
|
|
480
481
|
const m = /^(\d{1,2})\s*[:.,h]\s*(\d{1,2})?$/.exec(a);
|
|
@@ -485,17 +486,17 @@ function ta(e, t = 1) {
|
|
|
485
486
|
else if (/^\d{3,4}$/.test(a))
|
|
486
487
|
n = Number(a.slice(0, -2)), u = Number(a.slice(-2));
|
|
487
488
|
else return { error: "invalid" };
|
|
488
|
-
const r =
|
|
489
|
+
const r = J(n, u);
|
|
489
490
|
return r ? t > 1 && u % t !== 0 ? { error: "step" } : { time: r } : { error: "invalid" };
|
|
490
491
|
}
|
|
491
|
-
const
|
|
492
|
-
function
|
|
492
|
+
const Vt = (e, t) => `${e}T${t}`;
|
|
493
|
+
function Nt(e) {
|
|
493
494
|
const t = e ? /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}:\d{2}))?/.exec(e) : null;
|
|
494
495
|
return { day: t?.[1] ?? null, time: t?.[2] ?? null };
|
|
495
496
|
}
|
|
496
|
-
const
|
|
497
|
+
const St = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected", "data-value", "onClick"], Yt = ["aria-label", "aria-activedescendant"], zt = ["id", "aria-selected", "data-value", "onClick"], G = 30, De = 150, ne = /* @__PURE__ */ K({
|
|
497
498
|
__name: "ValueColumn",
|
|
498
|
-
props: /* @__PURE__ */
|
|
499
|
+
props: /* @__PURE__ */ fe({
|
|
499
500
|
values: {},
|
|
500
501
|
label: {},
|
|
501
502
|
variant: { default: "list" }
|
|
@@ -505,7 +506,7 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
505
506
|
}),
|
|
506
507
|
emits: ["update:modelValue"],
|
|
507
508
|
setup(e) {
|
|
508
|
-
const t = e, a =
|
|
509
|
+
const t = e, a = ce(e, "modelValue"), n = (De - G) / 2, u = Te(), m = me("scroller"), r = We("(prefers-reduced-motion: reduce)"), d = _(() => a.value === null ? -1 : t.values.indexOf(a.value)), o = L(Math.max(0, d.value));
|
|
509
510
|
let c;
|
|
510
511
|
const v = (l) => String(l).padStart(2, "0"), w = (l) => `${u}-${l}`;
|
|
511
512
|
function D(l) {
|
|
@@ -530,22 +531,22 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
530
531
|
if (!s || l < 0 || typeof s.scrollTo != "function") return;
|
|
531
532
|
const A = T || r.value ? "instant" : "smooth";
|
|
532
533
|
if (t.variant === "wheel") {
|
|
533
|
-
Math.abs(s.scrollTop - l *
|
|
534
|
+
Math.abs(s.scrollTop - l * G) > 1 && s.scrollTo({ top: l * G, behavior: A });
|
|
534
535
|
return;
|
|
535
536
|
}
|
|
536
537
|
const E = s.querySelector(`[data-value="${t.values[l]}"]`);
|
|
537
538
|
if (!E) return;
|
|
538
|
-
const
|
|
539
|
-
s.scrollTo({ top: Math.max(0,
|
|
539
|
+
const Q = E.offsetTop - (s.clientHeight - E.offsetHeight) / 2;
|
|
540
|
+
s.scrollTo({ top: Math.max(0, Q), behavior: A });
|
|
540
541
|
}
|
|
541
542
|
function k() {
|
|
542
543
|
const l = m.value;
|
|
543
|
-
t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop /
|
|
544
|
+
t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop / G))), clearTimeout(c), c = setTimeout(() => {
|
|
544
545
|
const T = t.values[o.value];
|
|
545
546
|
T !== void 0 && T !== a.value && (a.value = T);
|
|
546
547
|
}, 90));
|
|
547
548
|
}
|
|
548
|
-
|
|
549
|
+
Fe(() => void Ce(() => P(d.value, !0))), je(() => clearTimeout(c)), re(d, (l) => {
|
|
549
550
|
o.value = Math.max(0, l), P(l, !1);
|
|
550
551
|
});
|
|
551
552
|
const g = (l) => Math.abs(l - o.value), p = (l) => g(l) === 0 ? "text-[22px] font-semibold text-content-strong" : g(l) === 1 ? "text-[19px] text-content-muted" : "text-base text-content-disabled";
|
|
@@ -568,8 +569,8 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
568
569
|
"data-value": s,
|
|
569
570
|
class: $(["flex min-h-6.5 shrink-0 cursor-pointer items-center justify-center rounded-md text-body tabular-nums transition-colors duration-motion-fast", s === a.value ? "bg-tint font-semibold text-content-on-tint" : "text-content-strong hover:bg-fill"]),
|
|
570
571
|
onClick: (A) => S(s)
|
|
571
|
-
}, M(v(s)), 11,
|
|
572
|
-
], 40,
|
|
572
|
+
}, M(v(s)), 11, Ut))), 128))
|
|
573
|
+
], 40, St)) : (f(), b("div", {
|
|
573
574
|
key: 1,
|
|
574
575
|
ref_key: "scroller",
|
|
575
576
|
ref: m,
|
|
@@ -578,12 +579,12 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
578
579
|
"aria-label": t.label,
|
|
579
580
|
"aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
|
|
580
581
|
class: "relative w-16 snap-y snap-mandatory overflow-y-auto overscroll-contain rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
|
|
581
|
-
style:
|
|
582
|
+
style: ee({ height: `${De}px` }),
|
|
582
583
|
onScrollPassive: k,
|
|
583
584
|
onKeydown: z
|
|
584
585
|
}, [
|
|
585
586
|
h("div", {
|
|
586
|
-
style:
|
|
587
|
+
style: ee({ height: `${n}px` }),
|
|
587
588
|
"aria-hidden": "true"
|
|
588
589
|
}, null, 4),
|
|
589
590
|
(f(!0), b(I, null, j(t.values, (s, A) => (f(), b("div", {
|
|
@@ -593,26 +594,26 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
593
594
|
"aria-selected": s === a.value,
|
|
594
595
|
"data-value": s,
|
|
595
596
|
class: $(["flex cursor-pointer snap-center items-center justify-center tabular-nums", p(A)]),
|
|
596
|
-
style:
|
|
597
|
+
style: ee({ height: `${G}px` }),
|
|
597
598
|
onClick: (E) => S(s)
|
|
598
|
-
}, M(v(s)), 15,
|
|
599
|
+
}, M(v(s)), 15, zt))), 128)),
|
|
599
600
|
h("div", {
|
|
600
|
-
style:
|
|
601
|
+
style: ee({ height: `${n}px` }),
|
|
601
602
|
"aria-hidden": "true"
|
|
602
603
|
}, null, 4)
|
|
603
|
-
], 44,
|
|
604
|
+
], 44, Yt));
|
|
604
605
|
}
|
|
605
|
-
}),
|
|
606
|
+
}), At = {
|
|
606
607
|
key: 0,
|
|
607
608
|
class: "flex h-49 gap-1.5",
|
|
608
609
|
"data-test": "time-columns"
|
|
609
|
-
},
|
|
610
|
+
}, It = {
|
|
610
611
|
key: 1,
|
|
611
612
|
class: "relative flex items-center justify-center gap-1",
|
|
612
613
|
"data-test": "time-columns"
|
|
613
|
-
},
|
|
614
|
+
}, Lt = /* @__PURE__ */ K({
|
|
614
615
|
__name: "TimeColumns",
|
|
615
|
-
props: /* @__PURE__ */
|
|
616
|
+
props: /* @__PURE__ */ fe({
|
|
616
617
|
step: { default: 1 },
|
|
617
618
|
variant: { default: "list" }
|
|
618
619
|
}, {
|
|
@@ -621,39 +622,39 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
621
622
|
}),
|
|
622
623
|
emits: ["update:modelValue"],
|
|
623
624
|
setup(e) {
|
|
624
|
-
const t = e, a =
|
|
625
|
+
const t = e, a = ce(e, "modelValue"), { t: n } = X(), u = _(() => Ye(a.value)), m = _(() => Mt(t.step)), r = _({
|
|
625
626
|
get: () => u.value?.hour ?? null,
|
|
626
627
|
set: (o) => {
|
|
627
|
-
o !== null && (a.value =
|
|
628
|
+
o !== null && (a.value = J(o, u.value?.minute ?? 0));
|
|
628
629
|
}
|
|
629
630
|
}), d = _({
|
|
630
631
|
get: () => u.value?.minute ?? null,
|
|
631
632
|
set: (o) => {
|
|
632
|
-
o !== null && (a.value =
|
|
633
|
+
o !== null && (a.value = J(u.value?.hour ?? 0, o));
|
|
633
634
|
}
|
|
634
635
|
});
|
|
635
|
-
return (o, c) => t.variant === "list" ? (f(), b("div",
|
|
636
|
-
N(
|
|
636
|
+
return (o, c) => t.variant === "list" ? (f(), b("div", At, [
|
|
637
|
+
N(ne, {
|
|
637
638
|
modelValue: r.value,
|
|
638
639
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => r.value = v),
|
|
639
|
-
values: y(
|
|
640
|
+
values: y(we),
|
|
640
641
|
label: y(n)("core.form.time.hour")
|
|
641
642
|
}, null, 8, ["modelValue", "values", "label"]),
|
|
642
|
-
N(
|
|
643
|
+
N(ne, {
|
|
643
644
|
modelValue: d.value,
|
|
644
645
|
"onUpdate:modelValue": c[1] || (c[1] = (v) => d.value = v),
|
|
645
646
|
values: m.value,
|
|
646
647
|
label: y(n)("core.form.time.minute")
|
|
647
648
|
}, null, 8, ["modelValue", "values", "label"])
|
|
648
|
-
])) : (f(), b("div",
|
|
649
|
+
])) : (f(), b("div", It, [
|
|
649
650
|
c[4] || (c[4] = h("div", {
|
|
650
651
|
class: "pointer-events-none absolute inset-x-0 h-9 rounded-lg bg-fill",
|
|
651
652
|
"aria-hidden": "true"
|
|
652
653
|
}, null, -1)),
|
|
653
|
-
N(
|
|
654
|
+
N(ne, {
|
|
654
655
|
modelValue: r.value,
|
|
655
656
|
"onUpdate:modelValue": c[2] || (c[2] = (v) => r.value = v),
|
|
656
|
-
values: y(
|
|
657
|
+
values: y(we),
|
|
657
658
|
label: y(n)("core.form.time.hour"),
|
|
658
659
|
variant: "wheel",
|
|
659
660
|
class: "relative"
|
|
@@ -662,7 +663,7 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
662
663
|
class: "relative text-[22px] font-semibold",
|
|
663
664
|
"aria-hidden": "true"
|
|
664
665
|
}, ":", -1)),
|
|
665
|
-
N(
|
|
666
|
+
N(ne, {
|
|
666
667
|
modelValue: d.value,
|
|
667
668
|
"onUpdate:modelValue": c[3] || (c[3] = (v) => d.value = v),
|
|
668
669
|
values: m.value,
|
|
@@ -672,22 +673,22 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
672
673
|
}, null, 8, ["modelValue", "values", "label"])
|
|
673
674
|
]));
|
|
674
675
|
}
|
|
675
|
-
}),
|
|
676
|
+
}), Pt = { class: "flex min-h-bar-height items-center gap-2 px-4 pb-1" }, Et = ["disabled"], Ft = ["id"], jt = {
|
|
676
677
|
class: "flex flex-col gap-3.5",
|
|
677
678
|
"data-test": "date-picker-sheet"
|
|
678
|
-
},
|
|
679
|
+
}, Ot = {
|
|
679
680
|
key: 1,
|
|
680
681
|
class: "rounded-group bg-surface-cell p-2.5 shadow-group"
|
|
681
|
-
},
|
|
682
|
+
}, Wt = {
|
|
682
683
|
key: 2,
|
|
683
684
|
class: "flex items-center gap-2 rounded-group bg-surface-cell px-4 py-2 shadow-group"
|
|
684
|
-
},
|
|
685
|
+
}, Rt = {
|
|
685
686
|
key: 0,
|
|
686
687
|
class: "w-22 shrink-0 text-body"
|
|
687
|
-
},
|
|
688
|
+
}, Ht = { class: "flex grow justify-center" }, Bt = {
|
|
688
689
|
class: "min-h-5 text-center text-subheadline text-content-muted",
|
|
689
690
|
"aria-live": "polite"
|
|
690
|
-
},
|
|
691
|
+
}, la = /* @__PURE__ */ K({
|
|
691
692
|
__name: "DatePickerSheet",
|
|
692
693
|
props: {
|
|
693
694
|
title: {},
|
|
@@ -703,13 +704,13 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
703
704
|
},
|
|
704
705
|
emits: ["update:modelValue"],
|
|
705
706
|
setup(e, { expose: t, emit: a }) {
|
|
706
|
-
const n = e, u = a, { t: m } =
|
|
707
|
+
const n = e, u = a, { t: m } = X(), r = Me(), d = me("sheet"), o = _(() => n.mode !== "time"), c = _(() => n.mode !== "date"), v = L(null), w = L(null);
|
|
707
708
|
function D() {
|
|
708
|
-
const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } :
|
|
709
|
-
v.value =
|
|
709
|
+
const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Nt(n.modelValue);
|
|
710
|
+
v.value = le(l.day) ? l.day : null, w.value = c.value ? l.time ?? $e(n.step) : null, d.value?.present();
|
|
710
711
|
}
|
|
711
712
|
function z() {
|
|
712
|
-
return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value :
|
|
713
|
+
return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Vt(v.value, w.value ?? $e(n.step)) : null;
|
|
713
714
|
}
|
|
714
715
|
function S() {
|
|
715
716
|
u("update:modelValue", z()), d.value?.dismiss();
|
|
@@ -721,33 +722,33 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
721
722
|
n.mode === "time" ? w.value = l : v.value = l;
|
|
722
723
|
}
|
|
723
724
|
function g(l) {
|
|
724
|
-
w.value = l, o.value && !v.value && (v.value =
|
|
725
|
+
w.value = l, o.value && !v.value && (v.value = de());
|
|
725
726
|
}
|
|
726
727
|
const p = _(() => {
|
|
727
728
|
const l = (T) => {
|
|
728
|
-
const s =
|
|
729
|
-
return A.charAt(0).toLocaleUpperCase(r.locale) + A.slice(1);
|
|
729
|
+
const s = H(T), A = new Intl.DateTimeFormat(W(r.locale), { dateStyle: "full", timeZone: "UTC" }).format(new Date(Date.UTC(s.year, s.month - 1, s.day)));
|
|
730
|
+
return A.charAt(0).toLocaleUpperCase(W(r.locale)) + A.slice(1);
|
|
730
731
|
};
|
|
731
732
|
return n.mode === "time" ? w.value ?? "" : v.value ? n.mode === "date" || !w.value ? l(v.value) : m("core.form.time.at", { date: l(v.value), time: w.value }) : "";
|
|
732
733
|
});
|
|
733
|
-
return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(),
|
|
734
|
+
return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(), ue(Oe, {
|
|
734
735
|
ref_key: "sheet",
|
|
735
736
|
ref: d,
|
|
736
737
|
title: n.title,
|
|
737
738
|
grouped: ""
|
|
738
739
|
}, {
|
|
739
|
-
header:
|
|
740
|
-
h("div",
|
|
740
|
+
header: ye(({ titleId: s }) => [
|
|
741
|
+
h("div", Pt, [
|
|
741
742
|
h("button", {
|
|
742
743
|
type: "button",
|
|
743
744
|
disabled: !n.clearable,
|
|
744
745
|
class: "min-w-16 cursor-pointer py-1.5 text-start text-headline text-content-link focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled",
|
|
745
746
|
onClick: P
|
|
746
|
-
}, M(y(m)("core.form.select.clear")), 9,
|
|
747
|
+
}, M(y(m)("core.form.select.clear")), 9, Et),
|
|
747
748
|
h("h3", {
|
|
748
749
|
id: s,
|
|
749
750
|
class: "min-w-0 grow truncate text-center text-headline font-semibold"
|
|
750
|
-
}, M(n.title), 9,
|
|
751
|
+
}, M(n.title), 9, Ft),
|
|
751
752
|
h("button", {
|
|
752
753
|
type: "button",
|
|
753
754
|
class: "min-w-16 cursor-pointer py-1.5 text-end text-headline font-semibold text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
@@ -755,17 +756,17 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
755
756
|
}, M(y(m)("core.form.select.done")), 1)
|
|
756
757
|
])
|
|
757
758
|
]),
|
|
758
|
-
default:
|
|
759
|
-
h("div",
|
|
760
|
-
n.shortcuts.length > 0 ? (f(),
|
|
759
|
+
default: ye(() => [
|
|
760
|
+
h("div", jt, [
|
|
761
|
+
n.shortcuts.length > 0 ? (f(), ue(Tt, {
|
|
761
762
|
key: 0,
|
|
762
763
|
variant: "sheet",
|
|
763
764
|
items: n.shortcuts,
|
|
764
765
|
selected: n.mode === "time" ? w.value : v.value,
|
|
765
766
|
onPick: k
|
|
766
|
-
}, null, 8, ["items", "selected"])) :
|
|
767
|
-
o.value ? (f(), b("div",
|
|
768
|
-
N(
|
|
767
|
+
}, null, 8, ["items", "selected"])) : Z("", !0),
|
|
768
|
+
o.value ? (f(), b("div", Ot, [
|
|
769
|
+
N(wt, {
|
|
769
770
|
modelValue: v.value,
|
|
770
771
|
"onUpdate:modelValue": T[0] || (T[0] = (s) => v.value = s),
|
|
771
772
|
size: "touch",
|
|
@@ -774,38 +775,38 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
|
|
|
774
775
|
"disabled-dates": n.disabledDates,
|
|
775
776
|
"open-on": n.openOn
|
|
776
777
|
}, null, 8, ["modelValue", "min", "max", "disabled-dates", "open-on"])
|
|
777
|
-
])) :
|
|
778
|
-
c.value ? (f(), b("div",
|
|
779
|
-
o.value ? (f(), b("p",
|
|
780
|
-
h("div",
|
|
781
|
-
N(
|
|
778
|
+
])) : Z("", !0),
|
|
779
|
+
c.value ? (f(), b("div", Wt, [
|
|
780
|
+
o.value ? (f(), b("p", Rt, M(y(m)("core.form.time.label")), 1)) : Z("", !0),
|
|
781
|
+
h("div", Ht, [
|
|
782
|
+
N(Lt, {
|
|
782
783
|
"model-value": w.value,
|
|
783
784
|
variant: "wheel",
|
|
784
785
|
step: n.step,
|
|
785
786
|
"onUpdate:modelValue": g
|
|
786
787
|
}, null, 8, ["model-value", "step"])
|
|
787
788
|
])
|
|
788
|
-
])) :
|
|
789
|
-
h("p",
|
|
789
|
+
])) : Z("", !0),
|
|
790
|
+
h("p", Bt, M(p.value), 1)
|
|
790
791
|
])
|
|
791
792
|
]),
|
|
792
793
|
_: 1
|
|
793
794
|
}, 8, ["title"]));
|
|
794
795
|
}
|
|
795
|
-
}),
|
|
796
|
+
}), oa = (e) => e ? ["today", "tomorrow", "next-working-day"] : ["today", "tomorrow", "week", "month-end"], ra = ["now", "08:00", "12:00"], Kt = {
|
|
796
797
|
today: (e) => e,
|
|
797
798
|
tomorrow: (e) => Y(e, 1),
|
|
798
799
|
week: (e) => Y(e, 7),
|
|
799
|
-
"month-end": (e) =>
|
|
800
|
-
"next-working-day": (e) =>
|
|
800
|
+
"month-end": (e) => oe(e),
|
|
801
|
+
"next-working-day": (e) => qe(e)
|
|
801
802
|
};
|
|
802
|
-
function
|
|
803
|
-
return typeof e == "string" ? { key: e, label: t(e), value:
|
|
803
|
+
function sa(e, t, a) {
|
|
804
|
+
return typeof e == "string" ? { key: e, label: t(e), value: Kt[e](a) } : { key: e.label, label: e.label, value: e.day(a) };
|
|
804
805
|
}
|
|
805
|
-
function
|
|
806
|
+
function ia(e, t, a) {
|
|
806
807
|
return e === "now" ? { key: "now", label: t, value: a } : typeof e == "string" ? { key: e, label: `${Number(e.slice(0, 2))}${e.slice(2)}`, value: e } : { key: e.label, label: e.label, value: e.time() };
|
|
807
808
|
}
|
|
808
|
-
function
|
|
809
|
+
function ua(e) {
|
|
809
810
|
const t = L(null), a = L(), n = _(() => t.value ?? (e.model.value ? e.display(e.model.value) : "")), u = _(() => {
|
|
810
811
|
if (t.value === null || t.value.trim() === "") return null;
|
|
811
812
|
const o = e.parse(t.value);
|
|
@@ -827,31 +828,31 @@ function sa(e) {
|
|
|
827
828
|
}
|
|
828
829
|
r(o.value);
|
|
829
830
|
}
|
|
830
|
-
return
|
|
831
|
+
return re(e.model, (o) => {
|
|
831
832
|
o === null && a.value || (t.value = null, a.value = void 0);
|
|
832
833
|
}), { text: n, typed: u, message: a, input: m, commit: d, set: r };
|
|
833
834
|
}
|
|
834
835
|
export {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
836
|
+
la as _,
|
|
837
|
+
Ye as a,
|
|
838
|
+
Lt as b,
|
|
839
|
+
Tt as c,
|
|
840
|
+
ra as d,
|
|
841
|
+
de as e,
|
|
841
842
|
Y as f,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
843
|
+
Ge as g,
|
|
844
|
+
oa as h,
|
|
845
|
+
aa as i,
|
|
846
|
+
sa as j,
|
|
847
|
+
le as k,
|
|
848
|
+
wt as l,
|
|
848
849
|
O as m,
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
850
|
+
J as n,
|
|
851
|
+
Vt as o,
|
|
852
|
+
na as p,
|
|
853
|
+
vt as q,
|
|
854
|
+
ia as r,
|
|
855
|
+
Nt as s,
|
|
856
|
+
$e as t,
|
|
857
|
+
ua as u
|
|
857
858
|
};
|