minerva-design 1.0.0 → 1.0.2
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/CHANGELOG.md +12 -0
- package/custom-elements.json +663 -0
- package/dist/angular/fesm2022/minerva-angular.mjs +1163 -34
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +237 -1
- package/dist/core/calendar-date.d.cts +5 -0
- package/dist/core/calendar-date.d.ts +5 -0
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +671 -630
- package/dist/core/index.js.map +1 -1
- package/dist/core/styling-hooks/components/date-picker.d.cts +45 -0
- package/dist/core/styling-hooks/components/date-picker.d.ts +45 -0
- package/dist/core/styling-hooks/manifest.d.cts +44 -0
- package/dist/core/styling-hooks/manifest.d.ts +44 -0
- package/dist/core/styling-hooks.cjs +1 -1
- package/dist/core/styling-hooks.cjs.map +1 -1
- package/dist/core/styling-hooks.js +62 -0
- package/dist/core/styling-hooks.js.map +1 -1
- package/dist/native/components/Calendar/Calendar.cjs +1 -1
- package/dist/native/components/Calendar/Calendar.cjs.map +1 -1
- package/dist/native/components/Calendar/Calendar.d.cts +2 -0
- package/dist/native/components/Calendar/Calendar.d.ts +2 -0
- package/dist/native/components/Calendar/Calendar.js +115 -112
- package/dist/native/components/Calendar/Calendar.js.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.js +8 -8
- package/dist/native/components/Checkbox/CheckboxGroup.cjs +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.cjs.map +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.js +6 -6
- package/dist/native/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/native/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/native/components/DatePicker/DatePicker.d.cts +40 -0
- package/dist/native/components/DatePicker/DatePicker.d.ts +40 -0
- package/dist/native/components/DatePicker/DatePicker.js +110 -0
- package/dist/native/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/native/components/DatePicker/index.cjs +1 -0
- package/dist/native/components/DatePicker/index.d.cts +2 -0
- package/dist/native/components/DatePicker/index.d.ts +2 -0
- package/dist/native/components/DatePicker/index.js +2 -0
- package/dist/native/components/Radio/RadioGroup.cjs +1 -1
- package/dist/native/components/Radio/RadioGroup.cjs.map +1 -1
- package/dist/native/components/Radio/RadioGroup.js +9 -9
- package/dist/native/components/Switch/Switch.cjs +1 -1
- package/dist/native/components/Switch/Switch.cjs.map +1 -1
- package/dist/native/components/Switch/Switch.js +23 -23
- package/dist/native/components/Switch/Switch.js.map +1 -1
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.d.cts +1 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +70 -68
- package/dist/native/source/components/Calendar/Calendar.tsx +14 -6
- package/dist/native/source/components/DatePicker/DatePicker.tsx +201 -0
- package/dist/native/source/components/DatePicker/index.ts +2 -0
- package/dist/native/source/index.ts +1 -0
- package/dist/native/source/manifest.ts +6 -0
- package/dist/react/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/react/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/react/components/DatePicker/DatePicker.d.cts +13 -0
- package/dist/react/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/react/components/DatePicker/DatePicker.js +315 -0
- package/dist/react/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs +2 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js +23 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js.map +1 -0
- package/dist/react/components/DatePicker/index.cjs +1 -0
- package/dist/react/components/DatePicker/index.d.cts +5 -0
- package/dist/react/components/DatePicker/index.d.ts +5 -0
- package/dist/react/components/DatePicker/index.js +3 -0
- package/dist/react/components/DatePicker/types.d.cts +97 -0
- package/dist/react/components/DatePicker/types.d.ts +97 -0
- package/dist/react/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/react/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/react/components/Tooltip/Tooltip.js +5 -5
- package/dist/react/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/react/components/index.cjs +1 -1
- package/dist/react/components/index.d.cts +1 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/components/index.js +3 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +7 -6
- package/dist/react/style.css +1 -0
- package/dist/react/styles/date-picker.css +7 -0
- package/dist/taro/date-picker.d.ts +20 -0
- package/dist/taro/index.d.ts +1 -0
- package/dist/taro/index.js +1155 -990
- package/dist/uni/DatePicker.vue +225 -0
- package/dist/uni/DatePicker.vue.d.ts +36 -0
- package/dist/uni/MonthCalendar.vue +2 -0
- package/dist/uni/MonthCalendar.vue.d.ts +2 -0
- package/dist/uni/index.d.ts +1 -0
- package/dist/uni/index.js +1 -0
- package/dist/uni/manifest.d.ts +7 -0
- package/dist/uni/manifest.js +8 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.d.ts +36 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js +7 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js.map +1 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +380 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/DatePicker/index.d.ts +2 -0
- package/dist/vue/components/DatePicker/index.js +2 -0
- package/dist/vue/components/DatePicker/types.d.ts +26 -0
- package/dist/vue/components/MonthCalendar/MonthCalendar.vue.d.ts +1 -1
- package/dist/vue/global.d.ts +108 -0
- package/dist/vue/groups/forms-pickers.d.ts +1 -0
- package/dist/vue/groups/forms-pickers.js +5 -2
- package/dist/vue/groups/forms-pickers.js.map +1 -1
- package/dist/vue/index.js +95 -94
- package/dist/weapp/controls.js +259 -76
- package/dist/weapp/date-picker/index.js +1 -0
- package/dist/weapp/date-picker/index.json +1 -0
- package/dist/weapp/date-picker/index.wxml +1 -0
- package/dist/weapp/date-picker/index.wxss +1 -0
- package/dist/weapp/types.d.ts +19 -0
- package/dist/web-components/cdn/minerva.js +461 -335
- package/dist/web-components/cdn/minerva.js.map +1 -1
- package/dist/web-components/components/date-picker/date-picker.d.ts +110 -0
- package/dist/web-components/components/date-picker/date-picker.js +378 -0
- package/dist/web-components/components/date-picker/date-picker.js.map +1 -0
- package/dist/web-components/elements/date-picker.d.ts +1 -0
- package/dist/web-components/elements/date-picker.js +8 -0
- package/dist/web-components/elements/date-picker.js.map +1 -0
- package/dist/web-components/html-custom-data.json +85 -0
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components/index.js +8 -6
- package/dist/web-components/styles/DatePicker/datePicker.css.js +6 -0
- package/dist/web-components/styles/DatePicker/datePicker.css.js.map +1 -0
- package/dist/web-components/types/react.d.ts +12 -0
- package/dist/web-components/types/solid.d.ts +9 -0
- package/dist/web-components/types/svelte.d.ts +9 -0
- package/dist/web-components/types/vue.d.ts +10 -0
- package/package.json +9 -1
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { hooks as e } from "../../internal/hooks.js";
|
|
2
|
+
import { FORM_CONTROL_KEY as t, useFormControlContext as n, useFormControlProps as r } from "../../internal/form-control.js";
|
|
3
|
+
import { IconCalendar as ee, IconChevronLeft as te, IconChevronRight as ne, IconX as re } from "../../internal/icons.js";
|
|
4
|
+
import { useControllable as ie } from "../../internal/controllable.js";
|
|
5
|
+
import { useLayerParent as ae } from "../../internal/scope.js";
|
|
6
|
+
import { useI18n as oe } from "../../config/useI18n.js";
|
|
7
|
+
import se from "../Input/Input.vue.js";
|
|
8
|
+
import "../Input/index.js";
|
|
9
|
+
import { logicalArrowKey as ce } from "../../internal/direction.js";
|
|
10
|
+
import le from "../../internal/FloatingPanel.vue.js";
|
|
11
|
+
import { adjacentTabbable as ue, tabLeavesPanel as de } from "../TimePicker/tabbing.js";
|
|
12
|
+
import { Fragment as i, computed as a, createCommentVNode as fe, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeProps as u, nextTick as pe, normalizeClass as d, onMounted as me, openBlock as f, provide as he, ref as p, renderList as m, shallowRef as ge, toDisplayString as h, unref as g, useId as _e, withCtx as _ } from "vue";
|
|
13
|
+
import { addDays as v, dayKey as y, localDate as ve, monthStart as b, parseDayKey as x, sameMonth as S } from "../../../core/index.js";
|
|
14
|
+
import C from "../../../react/components/IconButton/iconButton.module.scss.js";
|
|
15
|
+
import w from "../../../react/components/DatePicker/datePicker.module.scss.js";
|
|
16
|
+
//#region src/components/DatePicker/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
+
var ye = ["aria-label"], be = ["id"], xe = ["aria-label"], Se = ["aria-label"], Ce = ["aria-labelledby"], we = [
|
|
18
|
+
"data-date",
|
|
19
|
+
"data-outside",
|
|
20
|
+
"aria-label",
|
|
21
|
+
"aria-selected",
|
|
22
|
+
"aria-current",
|
|
23
|
+
"aria-disabled",
|
|
24
|
+
"tabindex",
|
|
25
|
+
"onFocus",
|
|
26
|
+
"onClick",
|
|
27
|
+
"onKeydown"
|
|
28
|
+
], Te = ["disabled"], T = /*@__PURE__*/ l({
|
|
29
|
+
name: "DatePicker",
|
|
30
|
+
inheritAttrs: !1,
|
|
31
|
+
__name: "DatePicker",
|
|
32
|
+
props: {
|
|
33
|
+
modelValue: { default: void 0 },
|
|
34
|
+
defaultValue: { default: void 0 },
|
|
35
|
+
placeholder: { default: void 0 },
|
|
36
|
+
label: { default: void 0 },
|
|
37
|
+
ariaLabel: { default: void 0 },
|
|
38
|
+
ariaLabelledby: { default: void 0 },
|
|
39
|
+
ariaDescribedby: { default: void 0 },
|
|
40
|
+
id: { default: void 0 },
|
|
41
|
+
required: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
45
|
+
readOnly: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
invalid: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
name: { default: "date-picker" },
|
|
54
|
+
disabled: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
clearable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !0
|
|
61
|
+
},
|
|
62
|
+
size: { default: "medium" },
|
|
63
|
+
minDate: { default: void 0 },
|
|
64
|
+
maxDate: { default: void 0 },
|
|
65
|
+
locale: { default: void 0 }
|
|
66
|
+
},
|
|
67
|
+
emits: [
|
|
68
|
+
"update:modelValue",
|
|
69
|
+
"change",
|
|
70
|
+
"openChange"
|
|
71
|
+
],
|
|
72
|
+
setup(l, { expose: T, emit: Ee }) {
|
|
73
|
+
let E = l, D = Ee, { t: O, language: De } = oe(), k = n();
|
|
74
|
+
he(t, null);
|
|
75
|
+
let A = r(() => ({
|
|
76
|
+
id: E.id,
|
|
77
|
+
"aria-describedby": E.ariaDescribedby
|
|
78
|
+
})), j = a(() => E.disabled ?? k?.disabled.value ?? !1), M = a(() => E.readOnly ?? k?.readOnly.value ?? !1), Oe = a(() => E.required ?? k?.required.value ?? !1), N = a(() => E.invalid ?? k?.invalid.value ?? !1), P = a(() => E.label ?? E.ariaLabel ?? O("datePicker.label")), F = a(() => E.ariaLabelledby ?? (k && !E.label && !E.ariaLabel ? k.labelId.value : void 0)), I = ie(E, "modelValue", {
|
|
79
|
+
defaultProp: "defaultValue",
|
|
80
|
+
fallback: "",
|
|
81
|
+
name: "DatePicker"
|
|
82
|
+
}), L = p(!1), R = (e) => {
|
|
83
|
+
e !== L.value && (L.value = e, D("openChange", e));
|
|
84
|
+
}, z = a(() => L.value && !j.value && !M.value), B = p(null), V = p(null), H = ge(null), U = p(null), ke = ae();
|
|
85
|
+
me(() => {
|
|
86
|
+
H.value = V.value?.querySelector("input") ?? null;
|
|
87
|
+
});
|
|
88
|
+
let W = _e(), G = p(b(x(I.value ?? "") ?? /* @__PURE__ */ new Date())), K = p(""), Ae = [
|
|
89
|
+
"mon",
|
|
90
|
+
"tue",
|
|
91
|
+
"wed",
|
|
92
|
+
"thu",
|
|
93
|
+
"fri",
|
|
94
|
+
"sat",
|
|
95
|
+
"sun"
|
|
96
|
+
], q = y(/* @__PURE__ */ new Date()), je = a(() => new Intl.DateTimeFormat(E.locale ?? De.value, {
|
|
97
|
+
year: "numeric",
|
|
98
|
+
month: "long"
|
|
99
|
+
}).format(G.value)), J = a(() => {
|
|
100
|
+
let e = b(G.value), t = v(e, -((e.getDay() + 6) % 7));
|
|
101
|
+
return Array.from({ length: 42 }, (e, n) => v(t, n));
|
|
102
|
+
}), Me = a(() => Array.from({ length: 6 }, (e, t) => J.value.slice(t * 7, t * 7 + 7))), Y = (e) => !!(E.minDate && e < E.minDate || E.maxDate && e > E.maxDate), Ne = a(() => {
|
|
103
|
+
let e = J.value.map(y);
|
|
104
|
+
return [
|
|
105
|
+
K.value,
|
|
106
|
+
I.value,
|
|
107
|
+
q,
|
|
108
|
+
y(G.value),
|
|
109
|
+
...e
|
|
110
|
+
].find((t) => t && e.includes(t) && !Y(t));
|
|
111
|
+
});
|
|
112
|
+
function X(e) {
|
|
113
|
+
I.value = e, D("change", e);
|
|
114
|
+
}
|
|
115
|
+
function Z() {
|
|
116
|
+
let e = x(I.value ?? "");
|
|
117
|
+
e && (G.value = b(e));
|
|
118
|
+
}
|
|
119
|
+
function Pe(e) {
|
|
120
|
+
if (j.value || M.value) return;
|
|
121
|
+
let t = String(e);
|
|
122
|
+
if (B.value = t, t === "") {
|
|
123
|
+
X("");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
let n = x(t, !0);
|
|
127
|
+
n && !Y(y(n)) && (X(y(n)), G.value = b(n));
|
|
128
|
+
}
|
|
129
|
+
function Fe() {
|
|
130
|
+
if (B.value === null) return;
|
|
131
|
+
let e = B.value.trim();
|
|
132
|
+
if (!j.value && !M.value) {
|
|
133
|
+
if (!e) I.value && X("");
|
|
134
|
+
else {
|
|
135
|
+
let t = x(e, !1);
|
|
136
|
+
t && !Y(y(t)) && y(t) !== I.value && (X(y(t)), G.value = b(t));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
B.value = null;
|
|
140
|
+
}
|
|
141
|
+
function Q() {
|
|
142
|
+
j.value || M.value || (B.value = null, X(""), H.value?.focus());
|
|
143
|
+
}
|
|
144
|
+
function $(e) {
|
|
145
|
+
j.value || M.value || Y(y(e)) || (B.value = null, X(y(e)), G.value = b(e), R(!1), H.value?.focus());
|
|
146
|
+
}
|
|
147
|
+
function Ie() {
|
|
148
|
+
j.value || M.value || (L.value || Z(), R(!L.value));
|
|
149
|
+
}
|
|
150
|
+
async function Le(e) {
|
|
151
|
+
await pe();
|
|
152
|
+
let t = g(U.value?.element);
|
|
153
|
+
(e ? t?.querySelector(`[data-date="${e}"]`) : t?.querySelector("[role=\"gridcell\"][tabindex=\"0\"]"))?.focus();
|
|
154
|
+
}
|
|
155
|
+
function Re(e, t) {
|
|
156
|
+
if (j.value || M.value) return;
|
|
157
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
158
|
+
e.preventDefault(), e.repeat || $(t);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
let n, r = (t.getDay() + 6) % 7;
|
|
162
|
+
switch (ce(e.key, e.currentTarget)) {
|
|
163
|
+
case "ArrowLeft":
|
|
164
|
+
n = v(t, -1);
|
|
165
|
+
break;
|
|
166
|
+
case "ArrowRight":
|
|
167
|
+
n = v(t, 1);
|
|
168
|
+
break;
|
|
169
|
+
case "ArrowUp":
|
|
170
|
+
n = v(t, -7);
|
|
171
|
+
break;
|
|
172
|
+
case "ArrowDown":
|
|
173
|
+
n = v(t, 7);
|
|
174
|
+
break;
|
|
175
|
+
case "Home":
|
|
176
|
+
n = v(t, -r);
|
|
177
|
+
break;
|
|
178
|
+
case "End":
|
|
179
|
+
n = v(t, 6 - r);
|
|
180
|
+
break;
|
|
181
|
+
case "PageUp":
|
|
182
|
+
case "PageDown": {
|
|
183
|
+
let r = b(t, (e.key === "PageUp" ? -1 : 1) * (e.shiftKey ? 12 : 1));
|
|
184
|
+
n = ve(r.getFullYear(), r.getMonth(), Math.min(t.getDate(), v(b(r, 1), -1).getDate()));
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
default: return;
|
|
188
|
+
}
|
|
189
|
+
e.preventDefault(), K.value = y(n), S(n, G.value) || (G.value = b(n)), Le(y(n));
|
|
190
|
+
}
|
|
191
|
+
function ze(e) {
|
|
192
|
+
H.value && e.target === H.value && Ie();
|
|
193
|
+
}
|
|
194
|
+
function Be(e) {
|
|
195
|
+
e.key !== "ArrowDown" || j.value || M.value || (e.preventDefault(), L.value || (Z(), K.value = I.value ?? "", R(!0)), Le());
|
|
196
|
+
}
|
|
197
|
+
function Ve(e) {
|
|
198
|
+
let t = e.currentTarget, n = H.value;
|
|
199
|
+
!n || e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !de(t, e.target, e.shiftKey) || (e.preventDefault(), (e.shiftKey ? n : ue(n, ke?.value ?? n.ownerDocument.body, !1) ?? n).focus(), R(!1));
|
|
200
|
+
}
|
|
201
|
+
let He = a(() => B.value ?? I.value ?? ""), Ue = a(() => E.clearable && !!I.value && !j.value && !M.value);
|
|
202
|
+
return T({
|
|
203
|
+
input: H,
|
|
204
|
+
focus: () => H.value?.focus(),
|
|
205
|
+
blur: () => H.value?.blur()
|
|
206
|
+
}), (t, n) => (f(), o("div", u({
|
|
207
|
+
ref_key: "field",
|
|
208
|
+
ref: V,
|
|
209
|
+
class: g(w).datePicker
|
|
210
|
+
}, {
|
|
211
|
+
...t.$attrs,
|
|
212
|
+
...g(e)("date-picker", "root", {
|
|
213
|
+
state: z.value ? "open" : "closed",
|
|
214
|
+
disabled: j.value,
|
|
215
|
+
readonly: M.value,
|
|
216
|
+
invalid: N.value,
|
|
217
|
+
size: l.size
|
|
218
|
+
})
|
|
219
|
+
}, { onClick: ze }), [c(g(se), {
|
|
220
|
+
"model-value": He.value,
|
|
221
|
+
placeholder: l.placeholder ?? g(O)("datePicker.placeholder"),
|
|
222
|
+
id: g(A).id,
|
|
223
|
+
"aria-label": P.value,
|
|
224
|
+
"aria-labelledby": F.value,
|
|
225
|
+
"aria-describedby": g(A)["aria-describedby"],
|
|
226
|
+
"aria-invalid": N.value || void 0,
|
|
227
|
+
"aria-readonly": M.value || void 0,
|
|
228
|
+
required: Oe.value,
|
|
229
|
+
"read-only": M.value,
|
|
230
|
+
name: l.name,
|
|
231
|
+
disabled: j.value,
|
|
232
|
+
size: l.size,
|
|
233
|
+
"onUpdate:modelValue": Pe,
|
|
234
|
+
onBlur: Fe,
|
|
235
|
+
onKeydown: Be
|
|
236
|
+
}, {
|
|
237
|
+
suffix: _(() => [Ue.value ? (f(), o("button", u({
|
|
238
|
+
key: 0,
|
|
239
|
+
type: "button",
|
|
240
|
+
class: [
|
|
241
|
+
g(C).iconButton,
|
|
242
|
+
g(C).neutral,
|
|
243
|
+
g(C)["variant-ghost"],
|
|
244
|
+
g(C).small,
|
|
245
|
+
g(C).circle,
|
|
246
|
+
g(w).clearButton
|
|
247
|
+
],
|
|
248
|
+
tabindex: "0",
|
|
249
|
+
"aria-label": g(O)("datePicker.clear")
|
|
250
|
+
}, g(e)("icon-button", "root", {
|
|
251
|
+
state: "inactive",
|
|
252
|
+
disabled: !1,
|
|
253
|
+
loading: !1,
|
|
254
|
+
size: "small",
|
|
255
|
+
variant: "ghost",
|
|
256
|
+
color: "neutral",
|
|
257
|
+
shape: "circle"
|
|
258
|
+
}), { onClick: Q }), [s("span", u({
|
|
259
|
+
class: g(C).glyph,
|
|
260
|
+
"aria-hidden": "true"
|
|
261
|
+
}, g(e)("icon-button", "icon")), [c(g(re))], 16)], 16, ye)) : (f(), o("span", u({
|
|
262
|
+
key: 1,
|
|
263
|
+
class: g(w).calendarIcon,
|
|
264
|
+
"aria-hidden": "true"
|
|
265
|
+
}, g(e)("date-picker", "icon")), [c(g(ee))], 16))]),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 8, [
|
|
268
|
+
"model-value",
|
|
269
|
+
"placeholder",
|
|
270
|
+
"id",
|
|
271
|
+
"aria-label",
|
|
272
|
+
"aria-labelledby",
|
|
273
|
+
"aria-describedby",
|
|
274
|
+
"aria-invalid",
|
|
275
|
+
"aria-readonly",
|
|
276
|
+
"required",
|
|
277
|
+
"read-only",
|
|
278
|
+
"name",
|
|
279
|
+
"disabled",
|
|
280
|
+
"size"
|
|
281
|
+
]), c(le, u({
|
|
282
|
+
ref_key: "floating",
|
|
283
|
+
ref: U,
|
|
284
|
+
open: z.value,
|
|
285
|
+
anchor: H.value,
|
|
286
|
+
placement: "bottom-start",
|
|
287
|
+
branches: () => [V.value],
|
|
288
|
+
"return-focus-on-escape": () => H.value,
|
|
289
|
+
focusable: "",
|
|
290
|
+
role: "dialog",
|
|
291
|
+
tabindex: "-1",
|
|
292
|
+
"aria-label": P.value,
|
|
293
|
+
"aria-labelledby": F.value,
|
|
294
|
+
class: g(w).popup
|
|
295
|
+
}, g(e)("date-picker", "content", { state: "open" }), {
|
|
296
|
+
onDismiss: n[4] ||= (e) => R(!1),
|
|
297
|
+
onKeydown: Ve
|
|
298
|
+
}), {
|
|
299
|
+
default: _(() => [s("div", { class: d(g(w).panel) }, [
|
|
300
|
+
s("div", { class: d(g(w).header) }, [s("h2", {
|
|
301
|
+
id: g(W),
|
|
302
|
+
class: d(g(w).heading),
|
|
303
|
+
"aria-live": "polite"
|
|
304
|
+
}, h(je.value), 11, be), s("div", { class: d(g(w).navGroup) }, [s("button", {
|
|
305
|
+
type: "button",
|
|
306
|
+
class: d(g(w).navButton),
|
|
307
|
+
"aria-label": g(O)("monthCalendar.previousMonth"),
|
|
308
|
+
onClick: n[0] ||= (e) => G.value = g(b)(G.value, -1)
|
|
309
|
+
}, [c(g(te), {
|
|
310
|
+
"aria-hidden": "true",
|
|
311
|
+
focusable: "false"
|
|
312
|
+
})], 10, xe), s("button", {
|
|
313
|
+
type: "button",
|
|
314
|
+
class: d(g(w).navButton),
|
|
315
|
+
"aria-label": g(O)("monthCalendar.nextMonth"),
|
|
316
|
+
onClick: n[1] ||= (e) => G.value = g(b)(G.value, 1)
|
|
317
|
+
}, [c(g(ne), {
|
|
318
|
+
"aria-hidden": "true",
|
|
319
|
+
focusable: "false"
|
|
320
|
+
})], 10, Se)], 2)], 2),
|
|
321
|
+
s("div", {
|
|
322
|
+
role: "grid",
|
|
323
|
+
"aria-labelledby": g(W),
|
|
324
|
+
class: d(g(w).grid)
|
|
325
|
+
}, [s("div", {
|
|
326
|
+
role: "row",
|
|
327
|
+
class: d(g(w).week)
|
|
328
|
+
}, [(f(), o(i, null, m(Ae, (e) => s("div", {
|
|
329
|
+
key: e,
|
|
330
|
+
role: "columnheader",
|
|
331
|
+
class: d(g(w).weekday)
|
|
332
|
+
}, h(g(O)(`monthCalendar.weekdays.${e}`)), 3)), 64))], 2), (f(!0), o(i, null, m(Me.value, (e, t) => (f(), o("div", {
|
|
333
|
+
key: t,
|
|
334
|
+
role: "row",
|
|
335
|
+
class: d(g(w).week)
|
|
336
|
+
}, [(f(!0), o(i, null, m(e, (e) => (f(), o("div", {
|
|
337
|
+
key: g(y)(e),
|
|
338
|
+
role: "gridcell",
|
|
339
|
+
class: d(g(w).day),
|
|
340
|
+
"data-date": g(y)(e),
|
|
341
|
+
"data-outside": g(S)(e, G.value) ? void 0 : "",
|
|
342
|
+
"aria-label": g(y)(e),
|
|
343
|
+
"aria-selected": g(I) === g(y)(e),
|
|
344
|
+
"aria-current": g(y)(e) === g(q) ? "date" : void 0,
|
|
345
|
+
"aria-disabled": Y(g(y)(e)) || void 0,
|
|
346
|
+
tabindex: g(y)(e) === Ne.value ? 0 : -1,
|
|
347
|
+
onFocus: (t) => K.value = g(y)(e),
|
|
348
|
+
onClick: (t) => $(e),
|
|
349
|
+
onKeydown: (t) => Re(t, e)
|
|
350
|
+
}, h(e.getDate()), 43, we))), 128))], 2))), 128))], 10, Ce),
|
|
351
|
+
s("div", { class: d(g(w).footer) }, [s("button", {
|
|
352
|
+
type: "button",
|
|
353
|
+
class: d(g(w).footerButton),
|
|
354
|
+
disabled: Y(g(q)),
|
|
355
|
+
onClick: n[2] ||= (e) => $(/* @__PURE__ */ new Date())
|
|
356
|
+
}, h(g(O)("datePicker.today")), 11, Te), l.clearable && g(I) ? (f(), o("button", {
|
|
357
|
+
key: 0,
|
|
358
|
+
type: "button",
|
|
359
|
+
class: d(g(w).footerButton),
|
|
360
|
+
onClick: n[3] ||= (e) => {
|
|
361
|
+
Q(), R(!1);
|
|
362
|
+
}
|
|
363
|
+
}, h(g(O)("datePicker.clear")), 3)) : fe("", !0)], 2)
|
|
364
|
+
], 2)]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 16, [
|
|
367
|
+
"open",
|
|
368
|
+
"anchor",
|
|
369
|
+
"branches",
|
|
370
|
+
"return-focus-on-escape",
|
|
371
|
+
"aria-label",
|
|
372
|
+
"aria-labelledby",
|
|
373
|
+
"class"
|
|
374
|
+
])], 16));
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
//#endregion
|
|
378
|
+
export { T as default };
|
|
379
|
+
|
|
380
|
+
//# sourceMappingURL=DatePicker.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.vue_vue_type_script_setup_true_lang.js","names":["$attrs","_openBlock","_createElementBlock","_mergeProps","_unref","styles","_createVNode","Input","_withCtx","iconButtonStyles","_createElementVNode","FloatingPanel","_normalizeClass","_toDisplayString","_Fragment","_renderList","_createCommentVNode","Input_default","FloatingPanel_default","styles","styles$1","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","DatePicker_vue_vue_type_script_setup_true_lang_default","__expose","__emit","props","__props","emit","useI18n","fc","useFormControlContext","FORM_CONTROL_KEY","fieldProps","useFormControlProps","disabled","computed","readOnly","required","invalid","accessibleName","t","labelledBy","current","useControllable","open","ref","setOpen","next","panelOpen","draft","field","input","shallowRef","floating","tabContainer","useLayerParent","headingId","useId","month","monthStart","parseDayKey","focusedKey","weekdays","todayKey","dayKey","heading","language","days","first","start","addDays","i","weeks","isDayDisabled","key","activeKey","keys","commit","syncMonth","date","handleInputChange","text","value","handleInputBlur","handleClear","selectDate","toggle","focusDay","nextTick","panel","unref","handleDayKeyDown","event","target","weekday","logicalArrowKey","localDate","sameMonth","handleRootClick","handleInputKeyDown","handlePanelKeyDown","el","tabLeavesPanel","adjacentTabbable","displayValue","showClear","openBlock","createElementBlock","mergeProps","_ctx","hooks","createVNode","withCtx","createElementVNode","IconX","IconCalendar","_cache","normalizeClass","toDisplayString","IconChevronLeft","IconChevronRight","Fragment","renderList","day","index","week","$event","createCommentVNode"],"sources":["../../../../../vue/src/components/DatePicker/DatePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** A date input with an accessible popup calendar; values use YYYY-MM-DD. */\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useId,\n} from \"vue\";\nimport {\n addDays,\n dayKey,\n localDate,\n monthStart,\n parseDayKey,\n sameMonth,\n} from \"@minerva/core\";\nimport styles from \"@react-styles/components/DatePicker/datePicker.module.scss\";\nimport iconButtonStyles from \"@react-styles/components/IconButton/iconButton.module.scss\";\nimport { hooks } from \"../../internal/hooks\";\nimport {\n IconCalendar,\n IconChevronLeft,\n IconChevronRight,\n IconX,\n} from \"../../internal/icons\";\nimport { useControllable } from \"../../internal/controllable\";\nimport FloatingPanel from \"../../internal/FloatingPanel.vue\";\nimport { useLayerParent } from \"../../internal/scope\";\nimport {\n FORM_CONTROL_KEY,\n useFormControlContext,\n useFormControlProps,\n} from \"../../internal/form-control\";\nimport { useI18n } from \"../../config/useI18n\";\nimport { Input } from \"../Input\";\nimport { logicalArrowKey } from \"../../internal/direction\";\nimport { adjacentTabbable, tabLeavesPanel } from \"../TimePicker/tabbing\";\nimport type { DatePickerEmits, DatePickerProps } from \"./types\";\n\ndefineOptions({ name: \"DatePicker\", inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n placeholder: undefined,\n label: undefined,\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n ariaDescribedby: undefined,\n id: undefined,\n required: undefined,\n readOnly: undefined,\n invalid: undefined,\n name: \"date-picker\",\n disabled: undefined,\n clearable: true,\n size: \"medium\",\n minDate: undefined,\n maxDate: undefined,\n locale: undefined,\n});\nconst emit = defineEmits<DatePickerEmits>();\n\nconst { t, language } = useI18n();\nconst fc = useFormControlContext();\n// The field state is resolved here (explicit props win over the\n// FormControl), so the inner Input must not merge it again.\nprovide(FORM_CONTROL_KEY, null as never);\nconst fieldProps = useFormControlProps(() => ({\n id: props.id,\n \"aria-describedby\": props.ariaDescribedby,\n}));\n\nconst disabled = computed(() => props.disabled ?? fc?.disabled.value ?? false);\nconst readOnly = computed(() => props.readOnly ?? fc?.readOnly.value ?? false);\nconst required = computed(() => props.required ?? fc?.required.value ?? false);\nconst invalid = computed(() => props.invalid ?? fc?.invalid.value ?? false);\nconst accessibleName = computed(\n () => props.label ?? props.ariaLabel ?? t(\"datePicker.label\"),\n);\n// A FormLabel names the input unless `label` / `aria-label` is given; the\n// aria-label stays as fallback (aria-labelledby wins when its target\n// exists, and is ignored when it does not).\nconst labelledBy = computed(\n () =>\n props.ariaLabelledby ??\n (fc && !props.label && !props.ariaLabel ? fc.labelId.value : undefined),\n);\n\nconst current = useControllable<string | null>(props, \"modelValue\", {\n defaultProp: \"defaultValue\",\n fallback: \"\",\n name: \"DatePicker\",\n});\nconst open = ref(false);\nconst setOpen = (next: boolean) => {\n if (next === open.value) return;\n open.value = next;\n emit(\"openChange\", next);\n};\nconst panelOpen = computed(\n () => open.value && !disabled.value && !readOnly.value,\n);\n\n// Text being typed; `null` = show the formatted value\nconst draft = ref<string | null>(null);\nconst field = ref<HTMLDivElement | null>(null);\nconst input = shallowRef<HTMLInputElement | null>(null);\nconst floating = ref<InstanceType<typeof FloatingPanel> | null>(null);\n// Tab moves on within the enclosing layer (e.g. a Modal), else the page.\nconst tabContainer = useLayerParent();\n\nonMounted(() => {\n input.value = field.value?.querySelector(\"input\") ?? null;\n});\n\nconst headingId = useId();\nconst month = ref(monthStart(parseDayKey(current.value ?? \"\") ?? new Date()));\nconst focusedKey = ref(\"\");\nconst weekdays = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nconst todayKey = dayKey(new Date());\nconst heading = computed(() =>\n new Intl.DateTimeFormat(props.locale ?? language.value, {\n year: \"numeric\",\n month: \"long\",\n }).format(month.value),\n);\nconst days = computed(() => {\n const first = monthStart(month.value);\n const start = addDays(first, -((first.getDay() + 6) % 7));\n return Array.from({ length: 42 }, (_, i) => addDays(start, i));\n});\nconst weeks = computed(() =>\n Array.from({ length: 6 }, (_, i) => days.value.slice(i * 7, i * 7 + 7)),\n);\nconst isDayDisabled = (key: string) =>\n !!(\n (props.minDate && key < props.minDate) ||\n (props.maxDate && key > props.maxDate)\n );\nconst activeKey = computed(() => {\n const keys = days.value.map(dayKey);\n return [\n focusedKey.value,\n current.value,\n todayKey,\n dayKey(month.value),\n ...keys,\n ].find((key) => key && keys.includes(key) && !isDayDisabled(key));\n});\nfunction commit(next: string) {\n current.value = next;\n emit(\"change\", next);\n}\nfunction syncMonth() {\n const date = parseDayKey(current.value ?? \"\");\n if (date) month.value = monthStart(date);\n}\nfunction handleInputChange(value: string | number) {\n if (disabled.value || readOnly.value) return;\n const text = String(value);\n draft.value = text;\n if (text === \"\") {\n commit(\"\");\n return;\n }\n const date = parseDayKey(text, true);\n if (date && !isDayDisabled(dayKey(date))) {\n commit(dayKey(date));\n month.value = monthStart(date);\n }\n}\nfunction handleInputBlur() {\n if (draft.value === null) return;\n const text = draft.value.trim();\n if (!disabled.value && !readOnly.value) {\n if (!text) {\n if (current.value) commit(\"\");\n } else {\n const date = parseDayKey(text, false);\n if (\n date &&\n !isDayDisabled(dayKey(date)) &&\n dayKey(date) !== current.value\n ) {\n commit(dayKey(date));\n month.value = monthStart(date);\n }\n }\n }\n draft.value = null;\n}\nfunction handleClear() {\n if (disabled.value || readOnly.value) return;\n draft.value = null;\n commit(\"\");\n input.value?.focus();\n}\nfunction selectDate(date: Date) {\n if (disabled.value || readOnly.value || isDayDisabled(dayKey(date))) return;\n draft.value = null;\n commit(dayKey(date));\n month.value = monthStart(date);\n setOpen(false);\n input.value?.focus();\n}\nfunction toggle() {\n if (disabled.value || readOnly.value) return;\n if (!open.value) syncMonth();\n setOpen(!open.value);\n}\nasync function focusDay(key?: string) {\n await nextTick();\n const panel = unref(floating.value?.element);\n (key\n ? panel?.querySelector<HTMLElement>(`[data-date=\"${key}\"]`)\n : panel?.querySelector<HTMLElement>('[role=\"gridcell\"][tabindex=\"0\"]')\n )?.focus();\n}\nfunction handleDayKeyDown(event: KeyboardEvent, date: Date) {\n if (disabled.value || readOnly.value) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (!event.repeat) selectDate(date);\n return;\n }\n let target: Date;\n const weekday = (date.getDay() + 6) % 7;\n switch (logicalArrowKey(event.key, event.currentTarget as HTMLElement)) {\n case \"ArrowLeft\":\n target = addDays(date, -1);\n break;\n case \"ArrowRight\":\n target = addDays(date, 1);\n break;\n case \"ArrowUp\":\n target = addDays(date, -7);\n break;\n case \"ArrowDown\":\n target = addDays(date, 7);\n break;\n case \"Home\":\n target = addDays(date, -weekday);\n break;\n case \"End\":\n target = addDays(date, 6 - weekday);\n break;\n case \"PageUp\":\n case \"PageDown\": {\n const next = monthStart(\n date,\n (event.key === \"PageUp\" ? -1 : 1) * (event.shiftKey ? 12 : 1),\n );\n target = localDate(\n next.getFullYear(),\n next.getMonth(),\n Math.min(date.getDate(), addDays(monthStart(next, 1), -1).getDate()),\n );\n break;\n }\n default:\n return;\n }\n event.preventDefault();\n focusedKey.value = dayKey(target);\n if (!sameMonth(target, month.value)) month.value = monthStart(target);\n void focusDay(dayKey(target));\n}\n\n// Clicking the input toggles the panel. The handler only reacts to clicks\n// on the inner <input>, which has its own keyboard support (ArrowDown opens\n// the panel; Escape closes it), so the wrapper is not a control.\nfunction handleRootClick(event: MouseEvent) {\n if (input.value && event.target === input.value) toggle();\n}\n\nfunction handleInputKeyDown(event: KeyboardEvent) {\n if (event.key !== \"ArrowDown\" || disabled.value || readOnly.value) return;\n event.preventDefault();\n if (!open.value) {\n syncMonth();\n focusedKey.value = current.value ?? \"\";\n setOpen(true);\n }\n void focusDay();\n}\n\n// The portalled panel sits after the input in the Tab order: Tab past its\n// last control continues after the input (its clear button, then the rest of\n// the page); Shift+Tab before its first control returns to the input.\nfunction handlePanelKeyDown(event: KeyboardEvent) {\n const panel = event.currentTarget as HTMLElement;\n const el = input.value;\n if (\n !el ||\n event.key !== \"Tab\" ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n !tabLeavesPanel(panel, event.target as Element, event.shiftKey)\n )\n return;\n event.preventDefault();\n const next = event.shiftKey\n ? el\n : (adjacentTabbable(\n el,\n tabContainer?.value ?? el.ownerDocument.body,\n false,\n ) ?? el);\n next.focus();\n setOpen(false);\n}\n\nconst displayValue = computed(() => draft.value ?? current.value ?? \"\");\nconst showClear = computed(\n () =>\n props.clearable && !!current.value && !disabled.value && !readOnly.value,\n);\n\ndefineExpose({\n /** The native `<input>` (the React `ref`) */\n input,\n focus: () => input.value?.focus(),\n blur: () => input.value?.blur(),\n});\n</script>\n\n<template>\n <div\n ref=\"field\"\n :class=\"styles.datePicker\"\n v-bind=\"{\n ...$attrs,\n ...hooks('date-picker', 'root', {\n state: panelOpen ? 'open' : 'closed',\n disabled,\n readonly: readOnly,\n invalid,\n size,\n }),\n }\"\n @click=\"handleRootClick\"\n >\n <Input\n :model-value=\"displayValue\"\n :placeholder=\"placeholder ?? t('datePicker.placeholder')\"\n :id=\"fieldProps.id\"\n :aria-label=\"accessibleName\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"fieldProps['aria-describedby']\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readOnly || undefined\"\n :required=\"required\"\n :read-only=\"readOnly\"\n :name=\"name\"\n :disabled=\"disabled\"\n :size=\"size\"\n @update:model-value=\"handleInputChange\"\n @blur=\"handleInputBlur\"\n @keydown=\"handleInputKeyDown\"\n >\n <template #suffix>\n <button\n v-if=\"showClear\"\n type=\"button\"\n :class=\"[\n iconButtonStyles.iconButton,\n iconButtonStyles.neutral,\n iconButtonStyles['variant-ghost'],\n iconButtonStyles.small,\n iconButtonStyles.circle,\n styles.clearButton,\n ]\"\n tabindex=\"0\"\n :aria-label=\"t('datePicker.clear')\"\n v-bind=\"\n hooks('icon-button', 'root', {\n state: 'inactive',\n disabled: false,\n loading: false,\n size: 'small',\n variant: 'ghost',\n color: 'neutral',\n shape: 'circle',\n })\n \"\n @click=\"handleClear\"\n >\n <span\n :class=\"iconButtonStyles.glyph\"\n aria-hidden=\"true\"\n v-bind=\"hooks('icon-button', 'icon')\"\n >\n <IconX />\n </span>\n </button>\n <span\n v-else\n :class=\"styles.calendarIcon\"\n aria-hidden=\"true\"\n v-bind=\"hooks('date-picker', 'icon')\"\n >\n <IconCalendar />\n </span>\n </template>\n </Input>\n <FloatingPanel\n ref=\"floating\"\n :open=\"panelOpen\"\n :anchor=\"input\"\n placement=\"bottom-start\"\n :branches=\"() => [field]\"\n :return-focus-on-escape=\"() => input\"\n focusable\n role=\"dialog\"\n tabindex=\"-1\"\n :aria-label=\"accessibleName\"\n :aria-labelledby=\"labelledBy\"\n :class=\"styles.popup\"\n v-bind=\"hooks('date-picker', 'content', { state: 'open' })\"\n @dismiss=\"setOpen(false)\"\n @keydown=\"handlePanelKeyDown\"\n >\n <div :class=\"styles.panel\">\n <div :class=\"styles.header\">\n <h2 :id=\"headingId\" :class=\"styles.heading\" aria-live=\"polite\">\n {{ heading }}\n </h2>\n <div :class=\"styles.navGroup\">\n <button\n type=\"button\"\n :class=\"styles.navButton\"\n :aria-label=\"t('monthCalendar.previousMonth')\"\n @click=\"month = monthStart(month, -1)\"\n >\n <IconChevronLeft aria-hidden=\"true\" focusable=\"false\" />\n </button>\n <button\n type=\"button\"\n :class=\"styles.navButton\"\n :aria-label=\"t('monthCalendar.nextMonth')\"\n @click=\"month = monthStart(month, 1)\"\n >\n <IconChevronRight aria-hidden=\"true\" focusable=\"false\" />\n </button>\n </div>\n </div>\n <div role=\"grid\" :aria-labelledby=\"headingId\" :class=\"styles.grid\">\n <div role=\"row\" :class=\"styles.week\">\n <div\n v-for=\"day in weekdays\"\n :key=\"day\"\n role=\"columnheader\"\n :class=\"styles.weekday\"\n >\n {{ t(`monthCalendar.weekdays.${day}`) }}\n </div>\n </div>\n <div\n v-for=\"(week, index) in weeks\"\n :key=\"index\"\n role=\"row\"\n :class=\"styles.week\"\n >\n <div\n v-for=\"date in week\"\n :key=\"dayKey(date)\"\n role=\"gridcell\"\n :class=\"styles.day\"\n :data-date=\"dayKey(date)\"\n :data-outside=\"!sameMonth(date, month) ? '' : undefined\"\n :aria-label=\"dayKey(date)\"\n :aria-selected=\"current === dayKey(date)\"\n :aria-current=\"dayKey(date) === todayKey ? 'date' : undefined\"\n :aria-disabled=\"isDayDisabled(dayKey(date)) || undefined\"\n :tabindex=\"dayKey(date) === activeKey ? 0 : -1\"\n @focus=\"focusedKey = dayKey(date)\"\n @click=\"selectDate(date)\"\n @keydown=\"handleDayKeyDown($event, date)\"\n >\n {{ date.getDate() }}\n </div>\n </div>\n </div>\n <div :class=\"styles.footer\">\n <button\n type=\"button\"\n :class=\"styles.footerButton\"\n :disabled=\"isDayDisabled(todayKey)\"\n @click=\"selectDate(new Date())\"\n >\n {{ t(\"datePicker.today\") }}\n </button>\n <button\n v-if=\"clearable && current\"\n type=\"button\"\n :class=\"styles.footerButton\"\n @click=\"\n handleClear();\n setOpen(false);\n \"\n >\n {{ t(\"datePicker.clear\") }}\n </button>\n </div>\n </div>\n </FloatingPanel>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,IAAM+B,IAAQC,GAoBRC,IAAOH,IAEP,EAAE,MAAG,iBAAaI,GAAQ,GAC1BC,IAAKC,EAAsB;EAGjC,GAAQC,GAAkB,IAAa;EACvC,IAAMC,IAAaC,SAA2B;GAC5C,IAAIR,EAAM;GACV,oBAAoBA,EAAM;EAC5B,EAAE,GAEIS,IAAWC,QAAeV,EAAM,YAAYI,GAAI,SAAS,SAAS,EAAK,GACvEO,IAAWD,QAAeV,EAAM,YAAYI,GAAI,SAAS,SAAS,EAAK,GACvEQ,KAAWF,QAAeV,EAAM,YAAYI,GAAI,SAAS,SAAS,EAAK,GACvES,IAAUH,QAAeV,EAAM,WAAWI,GAAI,QAAQ,SAAS,EAAK,GACpEU,IAAiBJ,QACfV,EAAM,SAASA,EAAM,aAAae,EAAE,kBAAkB,CAC9D,GAIMC,IAAaN,QAEfV,EAAM,mBACLI,KAAM,CAACJ,EAAM,SAAS,CAACA,EAAM,YAAYI,EAAG,QAAQ,QAAQ,KAAA,EACjE,GAEMa,IAAUC,GAA+BlB,GAAO,cAAc;GAClE,aAAa;GACb,UAAU;GACV,MAAM;EACR,CAAC,GACKmB,IAAOC,EAAI,EAAK,GAChBC,KAAW,MAAkB;GACjC,AAAIC,MAASH,EAAK,UAClB,EAAK,QAAQG,GACbpB,EAAK,cAAcoB,CAAI;EACzB,GACMC,IAAYb,QACVS,EAAK,SAAS,CAACV,EAAS,S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IAIrBhB,EAoBM,OAAA,EApBA,OAAKE,EAAER,EAAAC,CAAA,CAAM,CAAC,MAAM,EAAA,GAAA,CACxBK,EAOS,UAAA;KANP,MAAK;KACJ,OAAKE,EAAER,EAAAC,CAAA,CAAM,CAAC,YAAY;KAC1B,UAAU0E,EAAc3E,EAAAiE,CAAA,CAAQ;KAChC,SAAK,AAAAqD,EAAA,QAAA,MAAE/B,kBAAU,IAAK,KAAI,CAAA;IAExB,GAAA9E,EAAAT,EAAA0C,CAAA,CAAC,CAAA,kBAAA,CAAA,GAAA,IAAAnB,EAAA,GAGEK,EAAA,aAAa5B,EAAA4C,CAAA,KADrB/C,EAAA,GAAAC,EAUS,UAAA;;KARP,MAAK;KACJ,OAAKU,EAAER,EAAAC,CAAA,CAAM,CAAC,YAAY;KAC1B,SAAK,AAAAqH,EAAA,QAAA,MAAA;MAA8C,AAA7BhC,EAAW,GAAkBtC,EAAO,EAAA;;IAKxD,GAAAvC,EAAAT,EAAA0C,CAAA,CAAC,CAAA,kBAAA,CAAA,GAAA,CAAA,KAAAuF,GAAA,IAAA,EAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** DatePicker uses YYYY-MM-DD strings; null and empty string are controlled empty values. */
|
|
2
|
+
export interface DatePickerProps {
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
ariaLabelledby?: string;
|
|
9
|
+
ariaDescribedby?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
name?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
size?: "small" | "medium" | "large";
|
|
18
|
+
minDate?: string;
|
|
19
|
+
maxDate?: string;
|
|
20
|
+
locale?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface DatePickerEmits {
|
|
23
|
+
"update:modelValue": [value: string];
|
|
24
|
+
change: [value: string];
|
|
25
|
+
openChange: [open: boolean];
|
|
26
|
+
}
|
|
@@ -21,6 +21,7 @@ declare const __VLS_export: import('vue').DefineComponent<MonthCalendarProps, {}
|
|
|
21
21
|
"aria-label": string;
|
|
22
22
|
modelValue: string;
|
|
23
23
|
month: Date;
|
|
24
|
+
locale: string;
|
|
24
25
|
defaultMonth: Date;
|
|
25
26
|
rangeStart: string;
|
|
26
27
|
rangeEnd: string;
|
|
@@ -28,7 +29,6 @@ declare const __VLS_export: import('vue').DefineComponent<MonthCalendarProps, {}
|
|
|
28
29
|
previousMonthLabel: string;
|
|
29
30
|
nextMonthLabel: string;
|
|
30
31
|
todayLabel: string;
|
|
31
|
-
locale: string;
|
|
32
32
|
weekdayLabels: readonly string[];
|
|
33
33
|
getDayLabel: (day: string, eventCount: number) => string;
|
|
34
34
|
getEventsLabel: (day: string) => string;
|
package/dist/vue/global.d.ts
CHANGED
|
@@ -1,8 +1,57 @@
|
|
|
1
1
|
import type * as Minerva from "./index.js";
|
|
2
2
|
declare module "vue" {
|
|
3
3
|
interface GlobalComponents {
|
|
4
|
+
MnAlert: typeof Minerva.Alert;
|
|
5
|
+
MnAppShell: typeof Minerva.AppShell;
|
|
6
|
+
MnAutoComplete: typeof Minerva.AutoComplete;
|
|
7
|
+
MnAvatar: typeof Minerva.Avatar;
|
|
8
|
+
MnAvatarGroup: typeof Minerva.AvatarGroup;
|
|
9
|
+
MnBadge: typeof Minerva.Badge;
|
|
10
|
+
MnBox: typeof Minerva.Box;
|
|
4
11
|
MnButton: typeof Minerva.Button;
|
|
12
|
+
MnCard: typeof Minerva.Card;
|
|
13
|
+
MnCardContent: typeof Minerva.CardContent;
|
|
14
|
+
MnCardDescription: typeof Minerva.CardDescription;
|
|
15
|
+
MnCardFooter: typeof Minerva.CardFooter;
|
|
16
|
+
MnCardHeader: typeof Minerva.CardHeader;
|
|
17
|
+
MnCardTitle: typeof Minerva.CardTitle;
|
|
18
|
+
MnCascader: typeof Minerva.Cascader;
|
|
19
|
+
MnCheckbox: typeof Minerva.Checkbox;
|
|
20
|
+
MnCodeBlock: typeof Minerva.CodeBlock;
|
|
21
|
+
MnCommandDialog: typeof Minerva.CommandDialog;
|
|
5
22
|
MnConfigProvider: typeof Minerva.ConfigProvider;
|
|
23
|
+
MnConfirmDialog: typeof Minerva.ConfirmDialog;
|
|
24
|
+
MnConfirmProvider: typeof Minerva.ConfirmProvider;
|
|
25
|
+
MnContextMenu: typeof Minerva.ContextMenu;
|
|
26
|
+
MnDataTable: typeof Minerva.DataTable;
|
|
27
|
+
MnDatePicker: typeof Minerva.DatePicker;
|
|
28
|
+
MnDescriptionList: typeof Minerva.DescriptionList;
|
|
29
|
+
MnDivider: typeof Minerva.Divider;
|
|
30
|
+
MnDrawer: typeof Minerva.Drawer;
|
|
31
|
+
MnDrawerBody: typeof Minerva.DrawerBody;
|
|
32
|
+
MnDrawerClose: typeof Minerva.DrawerClose;
|
|
33
|
+
MnDrawerContent: typeof Minerva.DrawerContent;
|
|
34
|
+
MnDrawerFooter: typeof Minerva.DrawerFooter;
|
|
35
|
+
MnDrawerHeader: typeof Minerva.DrawerHeader;
|
|
36
|
+
MnDrawerRoot: typeof Minerva.DrawerRoot;
|
|
37
|
+
MnDrawerTrigger: typeof Minerva.DrawerTrigger;
|
|
38
|
+
MnEmpty: typeof Minerva.Empty;
|
|
39
|
+
MnFormControl: typeof Minerva.FormControl;
|
|
40
|
+
MnFormErrorMessage: typeof Minerva.FormErrorMessage;
|
|
41
|
+
MnFormField: typeof Minerva.FormField;
|
|
42
|
+
MnFormHelperText: typeof Minerva.FormHelperText;
|
|
43
|
+
MnFormLabel: typeof Minerva.FormLabel;
|
|
44
|
+
MnFormLayout: typeof Minerva.FormLayout;
|
|
45
|
+
MnGridItem: typeof Minerva.GridItem;
|
|
46
|
+
MnHtmlPreview: typeof Minerva.HtmlPreview;
|
|
47
|
+
MnIconButton: typeof Minerva.IconButton;
|
|
48
|
+
MnInput: typeof Minerva.Input;
|
|
49
|
+
MnJsonField: typeof Minerva.JsonField;
|
|
50
|
+
MnKeyValueEditor: typeof Minerva.KeyValueEditor;
|
|
51
|
+
MnList: typeof Minerva.List;
|
|
52
|
+
MnListItem: typeof Minerva.ListItem;
|
|
53
|
+
MnLoadingState: typeof Minerva.LoadingState;
|
|
54
|
+
MnMenu: typeof Minerva.Menu;
|
|
6
55
|
MnModal: typeof Minerva.Modal;
|
|
7
56
|
MnModalBody: typeof Minerva.ModalBody;
|
|
8
57
|
MnModalClose: typeof Minerva.ModalClose;
|
|
@@ -11,6 +60,65 @@ declare module "vue" {
|
|
|
11
60
|
MnModalHeader: typeof Minerva.ModalHeader;
|
|
12
61
|
MnModalRoot: typeof Minerva.ModalRoot;
|
|
13
62
|
MnModalTrigger: typeof Minerva.ModalTrigger;
|
|
63
|
+
MnMonthCalendar: typeof Minerva.MonthCalendar;
|
|
64
|
+
MnNavTree: typeof Minerva.NavTree;
|
|
65
|
+
MnNumberInput: typeof Minerva.NumberInput;
|
|
66
|
+
MnPage: typeof Minerva.Page;
|
|
67
|
+
MnPageHeader: typeof Minerva.PageHeader;
|
|
68
|
+
MnPageSection: typeof Minerva.PageSection;
|
|
69
|
+
MnPageTab: typeof Minerva.PageTab;
|
|
70
|
+
MnPageTabs: typeof Minerva.PageTabs;
|
|
71
|
+
MnPagination: typeof Minerva.Pagination;
|
|
72
|
+
MnPaletteToggle: typeof Minerva.PaletteToggle;
|
|
73
|
+
MnPopover: typeof Minerva.Popover;
|
|
74
|
+
MnPopoverAnchor: typeof Minerva.PopoverAnchor;
|
|
75
|
+
MnPopoverClose: typeof Minerva.PopoverClose;
|
|
76
|
+
MnPopoverContent: typeof Minerva.PopoverContent;
|
|
77
|
+
MnPopoverTrigger: typeof Minerva.PopoverTrigger;
|
|
78
|
+
MnProgressIndicator: typeof Minerva.ProgressIndicator;
|
|
79
|
+
MnProse: typeof Minerva.Prose;
|
|
80
|
+
MnRadio: typeof Minerva.Radio;
|
|
81
|
+
MnRadioGroup: typeof Minerva.RadioGroup;
|
|
82
|
+
MnRating: typeof Minerva.Rating;
|
|
83
|
+
MnRatingScale: typeof Minerva.RatingScale;
|
|
84
|
+
MnResponsiveGrid: typeof Minerva.ResponsiveGrid;
|
|
85
|
+
MnSelect: typeof Minerva.Select;
|
|
86
|
+
MnSelectGroup: typeof Minerva.SelectGroup;
|
|
87
|
+
MnSelectItem: typeof Minerva.SelectItem;
|
|
88
|
+
MnSelectLabel: typeof Minerva.SelectLabel;
|
|
89
|
+
MnSelectSeparator: typeof Minerva.SelectSeparator;
|
|
90
|
+
MnSkeleton: typeof Minerva.Skeleton;
|
|
91
|
+
MnSkeletonText: typeof Minerva.SkeletonText;
|
|
92
|
+
MnSplitLayout: typeof Minerva.SplitLayout;
|
|
93
|
+
MnStack: typeof Minerva.Stack;
|
|
94
|
+
MnStatCard: typeof Minerva.StatCard;
|
|
95
|
+
MnSteps: typeof Minerva.Steps;
|
|
96
|
+
MnSwitch: typeof Minerva.Switch;
|
|
97
|
+
MnTab: typeof Minerva.Tab;
|
|
98
|
+
MnTabList: typeof Minerva.TabList;
|
|
99
|
+
MnTabPanel: typeof Minerva.TabPanel;
|
|
100
|
+
MnTable: typeof Minerva.Table;
|
|
101
|
+
MnTableBody: typeof Minerva.TableBody;
|
|
102
|
+
MnTableCell: typeof Minerva.TableCell;
|
|
103
|
+
MnTableCellContent: typeof Minerva.TableCellContent;
|
|
104
|
+
MnTableHead: typeof Minerva.TableHead;
|
|
105
|
+
MnTableHeader: typeof Minerva.TableHeader;
|
|
106
|
+
MnTableRoot: typeof Minerva.TableRoot;
|
|
107
|
+
MnTableRow: typeof Minerva.TableRow;
|
|
108
|
+
MnTabs: typeof Minerva.Tabs;
|
|
109
|
+
MnTag: typeof Minerva.Tag;
|
|
110
|
+
MnTagInput: typeof Minerva.TagInput;
|
|
111
|
+
MnTextLink: typeof Minerva.TextLink;
|
|
112
|
+
MnTextarea: typeof Minerva.Textarea;
|
|
113
|
+
MnThemeProvider: typeof Minerva.ThemeProvider;
|
|
114
|
+
MnThemeToggle: typeof Minerva.ThemeToggle;
|
|
115
|
+
MnTimePicker: typeof Minerva.TimePicker;
|
|
116
|
+
MnToastProvider: typeof Minerva.ToastProvider;
|
|
117
|
+
MnToolbar: typeof Minerva.Toolbar;
|
|
118
|
+
MnTooltip: typeof Minerva.Tooltip;
|
|
119
|
+
MnTooltipProvider: typeof Minerva.TooltipProvider;
|
|
120
|
+
MnUpload: typeof Minerva.Upload;
|
|
121
|
+
MnVirtualList: typeof Minerva.VirtualList;
|
|
14
122
|
}
|
|
15
123
|
}
|
|
16
124
|
export {};
|
|
@@ -19,10 +19,13 @@ import d from "../components/TagInput/TagInput.vue.js";
|
|
|
19
19
|
import "../components/TagInput/index.js";
|
|
20
20
|
import f from "../components/Cascader/Cascader.vue.js";
|
|
21
21
|
import "../components/Cascader/index.js";
|
|
22
|
+
import p from "../components/DatePicker/DatePicker.vue.js";
|
|
23
|
+
import "../components/DatePicker/index.js";
|
|
22
24
|
//#region src/groups/forms-pickers.ts
|
|
23
|
-
var
|
|
25
|
+
var m = /* @__PURE__ */ e({
|
|
24
26
|
AutoComplete: () => o,
|
|
25
27
|
Cascader: () => f,
|
|
28
|
+
DatePicker: () => p,
|
|
26
29
|
JsonField: () => u,
|
|
27
30
|
KeyValueEditor: () => s,
|
|
28
31
|
Select: () => n,
|
|
@@ -35,6 +38,6 @@ var p = /* @__PURE__ */ e({
|
|
|
35
38
|
Upload: () => c
|
|
36
39
|
});
|
|
37
40
|
//#endregion
|
|
38
|
-
export { o as AutoComplete, f as Cascader, u as JsonField, s as KeyValueEditor, n as Select, r as SelectGroup, t as SelectItem, i as SelectLabel, a as SelectSeparator, d as TagInput, l as TimePicker, c as Upload,
|
|
41
|
+
export { o as AutoComplete, f as Cascader, p as DatePicker, u as JsonField, s as KeyValueEditor, n as Select, r as SelectGroup, t as SelectItem, i as SelectLabel, a as SelectSeparator, d as TagInput, l as TimePicker, c as Upload, m as forms_pickers_exports };
|
|
39
42
|
|
|
40
43
|
//# sourceMappingURL=forms-pickers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms-pickers.js","names":["SelectItem_default","Select_default","SelectGroup_default","SelectLabel_default","SelectSeparator_default","AutoComplete_default","KeyValueEditor_default","Upload_default","TimePicker_default","JsonField_default","TagInput_default","Cascader_default","forms_pickers_exports"],"sources":["../../../../vue/src/groups/forms-pickers.ts"],"sourcesContent":["// Components of the \"forms-pickers\" group (see src/index.ts).\nexport * from \"../components/Select\";\nexport * from \"../components/AutoComplete\";\nexport * from \"../components/KeyValueEditor\";\nexport * from \"../components/Upload\";\nexport * from \"../components/TimePicker\";\nexport * from \"../components/JsonField\";\nexport * from \"../components/TagInput\";\nexport * from \"../components/Cascader\";\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"forms-pickers.js","names":["SelectItem_default","Select_default","SelectGroup_default","SelectLabel_default","SelectSeparator_default","AutoComplete_default","KeyValueEditor_default","Upload_default","TimePicker_default","JsonField_default","TagInput_default","Cascader_default","DatePicker_default","forms_pickers_exports"],"sources":["../../../../vue/src/groups/forms-pickers.ts"],"sourcesContent":["// Components of the \"forms-pickers\" group (see src/index.ts).\nexport * from \"../components/Select\";\nexport * from \"../components/AutoComplete\";\nexport * from \"../components/KeyValueEditor\";\nexport * from \"../components/Upload\";\nexport * from \"../components/TimePicker\";\nexport * from \"../components/JsonField\";\nexport * from \"../components/TagInput\";\nexport * from \"../components/Cascader\";\nexport * from \"../components/DatePicker\";\n"],"mappings":""}
|