@archpublicwebsite/rangepicker 1.0.9 → 1.0.13
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/README.md +199 -89
- package/dist/Rangepicker.vue.d.ts +3 -28
- package/dist/Rangepicker.vue.d.ts.map +1 -1
- package/dist/RangepickerInput.stories.d.ts +7 -67
- package/dist/RangepickerInput.stories.d.ts.map +1 -1
- package/dist/RangepickerInput.stories.js +31 -233
- package/dist/RangepickerInput.vue.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/rangepicker.js +217 -298
- package/dist/rangepicker.js.map +1 -1
- package/dist/rangepicker.umd.cjs +1 -1
- package/dist/rangepicker.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +66 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/StoryWrapper.vue.d.ts +0 -18
- package/dist/StoryWrapper.vue.d.ts.map +0 -1
package/dist/rangepicker.js
CHANGED
|
@@ -1,204 +1,177 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, onMounted, onUnmounted, createBlock, openBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, createCommentVNode, createElementVNode,
|
|
1
|
+
import { defineComponent, computed, ref, watch, onMounted, onUnmounted, createBlock, openBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, toDisplayString, Fragment, renderList, nextTick } from "vue";
|
|
2
2
|
import { useBreakpoints, breakpointsTailwind, useWindowSize, onClickOutside } from "@vueuse/core";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4
5
|
function getDefaultExportFromCjs(x) {
|
|
5
6
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
6
7
|
}
|
|
7
|
-
var isBetween$
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})(isBetween$1, (function() {
|
|
17
|
-
return function(e, i, t) {
|
|
18
|
-
i.prototype.isBetween = function(e2, i2, s, f) {
|
|
19
|
-
var n = t(e2), o = t(i2), r = "(" === (f = f || "()")[0], u = ")" === f[1];
|
|
20
|
-
return (r ? this.isAfter(n, s) : !this.isBefore(n, s)) && (u ? this.isBefore(o, s) : !this.isAfter(o, s)) || (r ? this.isBefore(n, s) : !this.isAfter(n, s)) && (u ? this.isAfter(o, s) : !this.isBefore(o, s));
|
|
21
|
-
};
|
|
8
|
+
var isBetween$1 = { exports: {} };
|
|
9
|
+
(function(module, exports$1) {
|
|
10
|
+
!function(e, i) {
|
|
11
|
+
module.exports = i();
|
|
12
|
+
}(commonjsGlobal, function() {
|
|
13
|
+
return function(e, i, t) {
|
|
14
|
+
i.prototype.isBetween = function(e2, i2, s, f) {
|
|
15
|
+
var n = t(e2), o = t(i2), r = "(" === (f = f || "()")[0], u = ")" === f[1];
|
|
16
|
+
return (r ? this.isAfter(n, s) : !this.isBefore(n, s)) && (u ? this.isBefore(o, s) : !this.isAfter(o, s)) || (r ? this.isBefore(n, s) : !this.isAfter(n, s)) && (u ? this.isAfter(o, s) : !this.isBefore(o, s));
|
|
22
17
|
};
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var isBetweenExports = requireIsBetween();
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
})(isBetween$1);
|
|
21
|
+
var isBetweenExports = isBetween$1.exports;
|
|
28
22
|
const isBetween = /* @__PURE__ */ getDefaultExportFromCjs(isBetweenExports);
|
|
29
|
-
var isSameOrAfter$
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
module.exports = t();
|
|
38
|
-
})(isSameOrAfter$1, (function() {
|
|
39
|
-
return function(e, t) {
|
|
40
|
-
t.prototype.isSameOrAfter = function(e2, t2) {
|
|
41
|
-
return this.isSame(e2, t2) || this.isAfter(e2, t2);
|
|
42
|
-
};
|
|
23
|
+
var isSameOrAfter$1 = { exports: {} };
|
|
24
|
+
(function(module, exports$1) {
|
|
25
|
+
!function(e, t) {
|
|
26
|
+
module.exports = t();
|
|
27
|
+
}(commonjsGlobal, function() {
|
|
28
|
+
return function(e, t) {
|
|
29
|
+
t.prototype.isSameOrAfter = function(e2, t2) {
|
|
30
|
+
return this.isSame(e2, t2) || this.isAfter(e2, t2);
|
|
43
31
|
};
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var isSameOrAfterExports = requireIsSameOrAfter();
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
})(isSameOrAfter$1);
|
|
35
|
+
var isSameOrAfterExports = isSameOrAfter$1.exports;
|
|
49
36
|
const isSameOrAfter = /* @__PURE__ */ getDefaultExportFromCjs(isSameOrAfterExports);
|
|
50
|
-
var isSameOrBefore$
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
module.exports = i();
|
|
59
|
-
})(isSameOrBefore$1, (function() {
|
|
60
|
-
return function(e, i) {
|
|
61
|
-
i.prototype.isSameOrBefore = function(e2, i2) {
|
|
62
|
-
return this.isSame(e2, i2) || this.isBefore(e2, i2);
|
|
63
|
-
};
|
|
37
|
+
var isSameOrBefore$1 = { exports: {} };
|
|
38
|
+
(function(module, exports$1) {
|
|
39
|
+
!function(e, i) {
|
|
40
|
+
module.exports = i();
|
|
41
|
+
}(commonjsGlobal, function() {
|
|
42
|
+
return function(e, i) {
|
|
43
|
+
i.prototype.isSameOrBefore = function(e2, i2) {
|
|
44
|
+
return this.isSame(e2, i2) || this.isBefore(e2, i2);
|
|
64
45
|
};
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var isSameOrBeforeExports = requireIsSameOrBefore();
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
})(isSameOrBefore$1);
|
|
49
|
+
var isSameOrBeforeExports = isSameOrBefore$1.exports;
|
|
70
50
|
const isSameOrBefore = /* @__PURE__ */ getDefaultExportFromCjs(isSameOrBeforeExports);
|
|
71
|
-
var customParseFormat$
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
51
|
+
var customParseFormat$1 = { exports: {} };
|
|
52
|
+
(function(module, exports$1) {
|
|
53
|
+
!function(e, t) {
|
|
54
|
+
module.exports = t();
|
|
55
|
+
}(commonjsGlobal, function() {
|
|
56
|
+
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
57
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
58
|
+
};
|
|
59
|
+
var f = function(e2) {
|
|
60
|
+
return function(t2) {
|
|
61
|
+
this[e2] = +t2;
|
|
83
62
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
63
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
64
|
+
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
65
|
+
if (!e3) return 0;
|
|
66
|
+
if ("Z" === e3) return 0;
|
|
67
|
+
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
68
|
+
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
69
|
+
}(e2);
|
|
70
|
+
}], u = function(e2) {
|
|
71
|
+
var t2 = s[e2];
|
|
72
|
+
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
73
|
+
}, d = function(e2, t2) {
|
|
74
|
+
var n2, r2 = s.meridiem;
|
|
75
|
+
if (r2) {
|
|
76
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
77
|
+
n2 = i2 > 12;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
81
|
+
return n2;
|
|
82
|
+
}, c = { A: [o, function(e2) {
|
|
83
|
+
this.afternoon = d(e2, false);
|
|
84
|
+
}], a: [o, function(e2) {
|
|
85
|
+
this.afternoon = d(e2, true);
|
|
86
|
+
}], Q: [n, function(e2) {
|
|
87
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
88
|
+
}], S: [n, function(e2) {
|
|
89
|
+
this.milliseconds = 100 * +e2;
|
|
90
|
+
}], SS: [r, function(e2) {
|
|
91
|
+
this.milliseconds = 10 * +e2;
|
|
92
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
93
|
+
this.milliseconds = +e2;
|
|
94
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
95
|
+
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
96
|
+
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
97
|
+
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
98
|
+
var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
|
|
99
|
+
return e3.slice(0, 3);
|
|
100
|
+
})).indexOf(e2) + 1;
|
|
101
|
+
if (n2 < 1) throw new Error();
|
|
102
|
+
this.month = n2 % 12 || n2;
|
|
103
|
+
}], MMMM: [o, function(e2) {
|
|
104
|
+
var t2 = u("months").indexOf(e2) + 1;
|
|
105
|
+
if (t2 < 1) throw new Error();
|
|
106
|
+
this.month = t2 % 12 || t2;
|
|
107
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
108
|
+
this.year = a(e2);
|
|
109
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
110
|
+
function l(n2) {
|
|
111
|
+
var r2, i2;
|
|
112
|
+
r2 = n2, i2 = s && s.formats;
|
|
113
|
+
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
|
|
114
|
+
var o3 = r3 && r3.toUpperCase();
|
|
115
|
+
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
|
|
116
|
+
return t3 || n4.slice(1);
|
|
117
|
+
});
|
|
118
|
+
})).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
119
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
120
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
121
|
+
}
|
|
122
|
+
return function(e2) {
|
|
123
|
+
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
124
|
+
var i3 = o2[n3];
|
|
125
|
+
if ("string" == typeof i3) r3 += i3.length;
|
|
126
|
+
else {
|
|
127
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
128
|
+
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
104
129
|
}
|
|
105
|
-
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
106
|
-
return n2;
|
|
107
|
-
}, c = { A: [o, function(e2) {
|
|
108
|
-
this.afternoon = d(e2, false);
|
|
109
|
-
}], a: [o, function(e2) {
|
|
110
|
-
this.afternoon = d(e2, true);
|
|
111
|
-
}], Q: [n, function(e2) {
|
|
112
|
-
this.month = 3 * (e2 - 1) + 1;
|
|
113
|
-
}], S: [n, function(e2) {
|
|
114
|
-
this.milliseconds = 100 * +e2;
|
|
115
|
-
}], SS: [r, function(e2) {
|
|
116
|
-
this.milliseconds = 10 * +e2;
|
|
117
|
-
}], SSS: [/\d{3}/, function(e2) {
|
|
118
|
-
this.milliseconds = +e2;
|
|
119
|
-
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
120
|
-
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
121
|
-
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
122
|
-
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
123
|
-
var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
|
|
124
|
-
return e3.slice(0, 3);
|
|
125
|
-
}))).indexOf(e2) + 1;
|
|
126
|
-
if (n2 < 1) throw new Error();
|
|
127
|
-
this.month = n2 % 12 || n2;
|
|
128
|
-
}], MMMM: [o, function(e2) {
|
|
129
|
-
var t2 = u("months").indexOf(e2) + 1;
|
|
130
|
-
if (t2 < 1) throw new Error();
|
|
131
|
-
this.month = t2 % 12 || t2;
|
|
132
|
-
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
133
|
-
this.year = a(e2);
|
|
134
|
-
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
135
|
-
function l(n2) {
|
|
136
|
-
var r2, i2;
|
|
137
|
-
r2 = n2, i2 = s && s.formats;
|
|
138
|
-
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
|
|
139
|
-
var o3 = r3 && r3.toUpperCase();
|
|
140
|
-
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
|
|
141
|
-
return t3 || n4.slice(1);
|
|
142
|
-
}));
|
|
143
|
-
}))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
144
|
-
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
145
|
-
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
146
130
|
}
|
|
147
|
-
return function(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
153
|
-
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
154
|
-
}
|
|
131
|
+
return function(e3) {
|
|
132
|
+
var t3 = e3.afternoon;
|
|
133
|
+
if (void 0 !== t3) {
|
|
134
|
+
var n4 = e3.hours;
|
|
135
|
+
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
155
136
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
178
|
-
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
179
|
-
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
180
|
-
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
181
|
-
} catch (e5) {
|
|
182
|
-
return /* @__PURE__ */ new Date("");
|
|
183
|
-
}
|
|
184
|
-
})(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
185
|
-
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
186
|
-
o2[1] = a2[m - 1];
|
|
187
|
-
var M = n2.apply(this, o2);
|
|
188
|
-
if (M.isValid()) {
|
|
189
|
-
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
190
|
-
break;
|
|
137
|
+
}(t2), t2;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return function(e2, t2, n2) {
|
|
141
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
142
|
+
var r2 = t2.prototype, i2 = r2.parse;
|
|
143
|
+
r2.parse = function(e3) {
|
|
144
|
+
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
145
|
+
this.$u = r3;
|
|
146
|
+
var a2 = o2[1];
|
|
147
|
+
if ("string" == typeof a2) {
|
|
148
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
149
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r4) {
|
|
150
|
+
try {
|
|
151
|
+
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
152
|
+
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
153
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
154
|
+
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
155
|
+
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
156
|
+
} catch (e5) {
|
|
157
|
+
return /* @__PURE__ */ new Date("");
|
|
191
158
|
}
|
|
192
|
-
|
|
159
|
+
}(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
160
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
161
|
+
o2[1] = a2[m - 1];
|
|
162
|
+
var M = n2.apply(this, o2);
|
|
163
|
+
if (M.isValid()) {
|
|
164
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
165
|
+
break;
|
|
193
166
|
}
|
|
194
|
-
|
|
195
|
-
}
|
|
167
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
168
|
+
}
|
|
169
|
+
else i2.call(this, e3);
|
|
196
170
|
};
|
|
197
|
-
}
|
|
198
|
-
})
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
var customParseFormatExports = requireCustomParseFormat();
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
})(customParseFormat$1);
|
|
174
|
+
var customParseFormatExports = customParseFormat$1.exports;
|
|
202
175
|
const customParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
|
|
203
176
|
dayjs.extend(isBetween);
|
|
204
177
|
dayjs.extend(isSameOrAfter);
|
|
@@ -329,38 +302,38 @@ const _hoisted_1$1 = {
|
|
|
329
302
|
class: "rangepicker-overlay"
|
|
330
303
|
};
|
|
331
304
|
const _hoisted_2 = { class: "rangepicker-header" };
|
|
332
|
-
const _hoisted_3 = { class: "flex items-center justify-between
|
|
305
|
+
const _hoisted_3 = { class: "arch-flex arch-items-center arch-justify-between" };
|
|
333
306
|
const _hoisted_4 = {
|
|
334
307
|
key: 0,
|
|
335
|
-
class: "text-xs font-medium text-gray-500 mb-1"
|
|
308
|
+
class: "arch-text-xs arch-font-medium arch-text-gray-500 arch-mb-1"
|
|
336
309
|
};
|
|
337
|
-
const _hoisted_5 = { class: "text-sm font-semibold text-gray-900" };
|
|
310
|
+
const _hoisted_5 = { class: "arch-text-sm arch-font-semibold arch-text-gray-900" };
|
|
338
311
|
const _hoisted_6 = {
|
|
339
312
|
key: 0,
|
|
340
|
-
class: "text-xs text-gray-500 mt-1"
|
|
313
|
+
class: "arch-text-xs arch-text-gray-500 arch-mt-1"
|
|
341
314
|
};
|
|
342
315
|
const _hoisted_7 = { class: "rangepicker-body" };
|
|
343
316
|
const _hoisted_8 = { class: "rangepicker-month-header" };
|
|
344
317
|
const _hoisted_9 = ["disabled"];
|
|
345
318
|
const _hoisted_10 = {
|
|
346
319
|
key: 1,
|
|
347
|
-
class: "w-8"
|
|
320
|
+
class: "arch-w-8"
|
|
348
321
|
};
|
|
349
322
|
const _hoisted_11 = { class: "rangepicker-month-title" };
|
|
350
323
|
const _hoisted_12 = ["disabled"];
|
|
351
324
|
const _hoisted_13 = {
|
|
352
325
|
key: 3,
|
|
353
|
-
class: "w-8"
|
|
326
|
+
class: "arch-w-8"
|
|
354
327
|
};
|
|
355
328
|
const _hoisted_14 = { class: "rangepicker-weekdays" };
|
|
356
329
|
const _hoisted_15 = { class: "rangepicker-grid" };
|
|
357
330
|
const _hoisted_16 = ["disabled", "aria-label", "onClick", "onMouseenter"];
|
|
358
331
|
const _hoisted_17 = {
|
|
359
332
|
key: 0,
|
|
360
|
-
class: "mt-4 flex items-center justify-end gap-2 border-t border-gray-200 pt-4"
|
|
333
|
+
class: "arch-mt-4 arch-flex arch-items-center arch-justify-end arch-gap-2 arch-border-t arch-border-gray-200 arch-pt-4"
|
|
361
334
|
};
|
|
362
335
|
const _hoisted_18 = ["disabled"];
|
|
363
|
-
const _hoisted_19 = { class: "flex items-center gap-1" };
|
|
336
|
+
const _hoisted_19 = { class: "arch-flex arch-items-center arch-gap-1" };
|
|
364
337
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
365
338
|
__name: "Rangepicker",
|
|
366
339
|
props: {
|
|
@@ -438,37 +411,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
438
411
|
})
|
|
439
412
|
);
|
|
440
413
|
const nightCount = computed(() => {
|
|
441
|
-
if (!localStartDate.value || !localEndDate.value)
|
|
442
|
-
return 0;
|
|
414
|
+
if (!localStartDate.value || !localEndDate.value) return 0;
|
|
443
415
|
return localEndDate.value.diff(localStartDate.value, "day");
|
|
444
416
|
});
|
|
445
417
|
const formattedDateRange = computed(() => {
|
|
446
|
-
if (!localStartDate.value && !localEndDate.value)
|
|
447
|
-
return "";
|
|
418
|
+
if (!localStartDate.value && !localEndDate.value) return "";
|
|
448
419
|
else if (localStartDate.value && !localEndDate.value)
|
|
449
420
|
return localStartDate.value.format(props.format);
|
|
450
421
|
else if (localStartDate.value && localEndDate.value)
|
|
451
422
|
return `${localStartDate.value.format(props.format)}${props.delimiter}${localEndDate.value.format(props.format)}`;
|
|
452
|
-
else
|
|
453
|
-
return "";
|
|
423
|
+
else return "";
|
|
454
424
|
});
|
|
455
425
|
const canNavigatePrevious = computed(() => {
|
|
456
|
-
if (!parsedMinDate.value)
|
|
457
|
-
return true;
|
|
426
|
+
if (!parsedMinDate.value) return true;
|
|
458
427
|
const firstMonth = dayjs().add(monthOffset.value, "month").startOf("month");
|
|
459
428
|
return firstMonth.isAfter(parsedMinDate.value, "month");
|
|
460
429
|
});
|
|
461
430
|
const canNavigateNext = computed(() => {
|
|
462
|
-
if (!parsedMaxDate.value)
|
|
463
|
-
return true;
|
|
431
|
+
if (!parsedMaxDate.value) return true;
|
|
464
432
|
const lastMonth = dayjs().add(monthOffset.value + effectiveNumberOfMonths.value - 1, "month").endOf("month");
|
|
465
433
|
return lastMonth.isBefore(parsedMaxDate.value, "month");
|
|
466
434
|
});
|
|
467
435
|
const { width: windowWidth } = useWindowSize();
|
|
468
436
|
const calendarStyle = ref({});
|
|
469
437
|
function updatePosition() {
|
|
470
|
-
if (props.variant === "mobile")
|
|
471
|
-
return;
|
|
438
|
+
if (props.variant === "mobile") return;
|
|
472
439
|
nextTick(() => {
|
|
473
440
|
const position = calculatePosition(
|
|
474
441
|
props.triggerElement,
|
|
@@ -485,11 +452,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
485
452
|
}
|
|
486
453
|
const tooltipStyle = ref({});
|
|
487
454
|
const tooltipText = computed(() => {
|
|
488
|
-
if (!hoveredDay.value || !localStartDate.value)
|
|
489
|
-
return "";
|
|
455
|
+
if (!hoveredDay.value || !localStartDate.value) return "";
|
|
490
456
|
const nights = hoveredDay.value.date.diff(localStartDate.value, "day");
|
|
491
|
-
if (nights <= 0)
|
|
492
|
-
return "";
|
|
457
|
+
if (nights <= 0) return "";
|
|
493
458
|
return `${nights} ${nights === 1 ? "night" : "nights"}`;
|
|
494
459
|
});
|
|
495
460
|
const showTooltipComputed = computed(() => {
|
|
@@ -497,29 +462,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
497
462
|
});
|
|
498
463
|
function getDayClasses(day) {
|
|
499
464
|
const classes = ["rangepicker-day"];
|
|
500
|
-
if (!day.isCurrentMonth)
|
|
501
|
-
|
|
502
|
-
if (day.
|
|
503
|
-
|
|
504
|
-
if (day.
|
|
505
|
-
classes.push("rangepicker-day-today");
|
|
506
|
-
if (day.isWeekend && !day.isSelected)
|
|
507
|
-
classes.push("rangepicker-day-weekend");
|
|
508
|
-
if (day.isHoliday)
|
|
509
|
-
classes.push("rangepicker-day-holiday");
|
|
465
|
+
if (!day.isCurrentMonth) classes.push("rangepicker-day-other-month");
|
|
466
|
+
if (day.isDisabled) classes.push("rangepicker-day-disabled");
|
|
467
|
+
if (day.isToday) classes.push("rangepicker-day-today");
|
|
468
|
+
if (day.isWeekend && !day.isSelected) classes.push("rangepicker-day-weekend");
|
|
469
|
+
if (day.isHoliday) classes.push("rangepicker-day-holiday");
|
|
510
470
|
if (day.isSelected) {
|
|
511
|
-
if (localStartDate.value && localEndDate.value && day.date.isSame(localStartDate.value, "day") && day.date.isSame(localEndDate.value, "day"))
|
|
471
|
+
if (localStartDate.value && localEndDate.value && day.date.isSame(localStartDate.value, "day") && day.date.isSame(localEndDate.value, "day"))
|
|
512
472
|
classes.push("rangepicker-day-selected-single");
|
|
513
|
-
|
|
473
|
+
else if (localStartDate.value && day.date.isSame(localStartDate.value, "day"))
|
|
514
474
|
classes.push("rangepicker-day-selected-start");
|
|
515
|
-
|
|
475
|
+
else if (localEndDate.value && day.date.isSame(localEndDate.value, "day"))
|
|
516
476
|
classes.push("rangepicker-day-selected-end");
|
|
517
|
-
|
|
518
|
-
classes.push("rangepicker-day-selected");
|
|
519
|
-
}
|
|
477
|
+
else classes.push("rangepicker-day-selected");
|
|
520
478
|
}
|
|
521
|
-
if (day.isInRange)
|
|
522
|
-
classes.push("rangepicker-day-in-range");
|
|
479
|
+
if (day.isInRange) classes.push("rangepicker-day-in-range");
|
|
523
480
|
if (localStartDate.value && !localEndDate.value && hoveredDay.value) {
|
|
524
481
|
const start = localStartDate.value;
|
|
525
482
|
const hovered = hoveredDay.value.date;
|
|
@@ -530,15 +487,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
530
487
|
}
|
|
531
488
|
return classes;
|
|
532
489
|
}
|
|
533
|
-
function selectDate(
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
const target = event.currentTarget;
|
|
537
|
-
if (target) {
|
|
538
|
-
target.blur();
|
|
539
|
-
}
|
|
540
|
-
if (day.isDisabled)
|
|
541
|
-
return;
|
|
490
|
+
function selectDate(day, event) {
|
|
491
|
+
event.preventDefault();
|
|
492
|
+
if (day.isDisabled) return;
|
|
542
493
|
emit("dateSelected", day.date);
|
|
543
494
|
if (!localStartDate.value || localStartDate.value && localEndDate.value) {
|
|
544
495
|
localStartDate.value = day.date;
|
|
@@ -567,11 +518,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
567
518
|
}
|
|
568
519
|
}
|
|
569
520
|
emit("rangeSelected", localStartDate.value, localEndDate.value);
|
|
570
|
-
if (props.autoApply)
|
|
571
|
-
apply();
|
|
521
|
+
if (props.autoApply) apply();
|
|
572
522
|
}
|
|
573
523
|
}
|
|
574
|
-
function handleDayHover(
|
|
524
|
+
function handleDayHover(day, event) {
|
|
575
525
|
hoveredDay.value = day;
|
|
576
526
|
if (props.showTooltip && localStartDate.value && !localEndDate.value)
|
|
577
527
|
updateTooltipPosition(event);
|
|
@@ -588,33 +538,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
588
538
|
hoveredDay.value = null;
|
|
589
539
|
}
|
|
590
540
|
function previousMonth() {
|
|
591
|
-
if (canNavigatePrevious.value)
|
|
592
|
-
monthOffset.value--;
|
|
541
|
+
if (canNavigatePrevious.value) monthOffset.value--;
|
|
593
542
|
}
|
|
594
543
|
function nextMonth() {
|
|
595
|
-
if (canNavigateNext.value)
|
|
596
|
-
monthOffset.value++;
|
|
544
|
+
if (canNavigateNext.value) monthOffset.value++;
|
|
597
545
|
}
|
|
598
546
|
function close() {
|
|
599
|
-
|
|
600
|
-
console.log("[Rangepicker v1.1] close called, activeElement:", (_a = document.activeElement) == null ? void 0 : _a.tagName);
|
|
601
|
-
if (isFadingOut.value)
|
|
602
|
-
return;
|
|
603
|
-
if (document.activeElement && document.activeElement !== document.body) {
|
|
604
|
-
document.activeElement.blur();
|
|
605
|
-
}
|
|
606
|
-
document.body.focus();
|
|
607
|
-
console.log("[Rangepicker v1.1] Focus moved to body");
|
|
547
|
+
if (isFadingOut.value) return;
|
|
608
548
|
isFadingOut.value = true;
|
|
609
549
|
setTimeout(() => {
|
|
610
550
|
localIsOpen.value = false;
|
|
611
551
|
emit("update:isOpen", false);
|
|
612
552
|
isFadingOut.value = false;
|
|
613
|
-
nextTick(() => {
|
|
614
|
-
if (document.activeElement === document.body) {
|
|
615
|
-
document.body.blur();
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
553
|
}, 200);
|
|
619
554
|
}
|
|
620
555
|
function apply() {
|
|
@@ -630,61 +565,48 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
630
565
|
var _a, _b;
|
|
631
566
|
if ((_a = props.modelValue) == null ? void 0 : _a.startDate)
|
|
632
567
|
localStartDate.value = dayjs(props.modelValue.startDate);
|
|
633
|
-
else
|
|
634
|
-
localStartDate.value = null;
|
|
568
|
+
else localStartDate.value = null;
|
|
635
569
|
if ((_b = props.modelValue) == null ? void 0 : _b.endDate)
|
|
636
570
|
localEndDate.value = dayjs(props.modelValue.endDate);
|
|
637
|
-
else
|
|
638
|
-
localEndDate.value = null;
|
|
571
|
+
else localEndDate.value = null;
|
|
639
572
|
close();
|
|
640
573
|
}
|
|
641
574
|
watch(
|
|
642
575
|
() => props.isOpen,
|
|
643
576
|
(newVal) => {
|
|
644
577
|
localIsOpen.value = newVal;
|
|
645
|
-
if (newVal)
|
|
646
|
-
updatePosition();
|
|
578
|
+
if (newVal) updatePosition();
|
|
647
579
|
}
|
|
648
580
|
);
|
|
649
581
|
watch(
|
|
650
582
|
() => props.close,
|
|
651
583
|
(newVal) => {
|
|
652
|
-
if (newVal)
|
|
653
|
-
close();
|
|
584
|
+
if (newVal) close();
|
|
654
585
|
}
|
|
655
586
|
);
|
|
656
587
|
watch(
|
|
657
588
|
() => props.modelValue,
|
|
658
589
|
(newVal) => {
|
|
659
|
-
if (newVal == null ? void 0 : newVal.startDate)
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
if (newVal == null ? void 0 : newVal.endDate)
|
|
664
|
-
localEndDate.value = dayjs(newVal.endDate);
|
|
665
|
-
else
|
|
666
|
-
localEndDate.value = null;
|
|
590
|
+
if (newVal == null ? void 0 : newVal.startDate) localStartDate.value = dayjs(newVal.startDate);
|
|
591
|
+
else localStartDate.value = null;
|
|
592
|
+
if (newVal == null ? void 0 : newVal.endDate) localEndDate.value = dayjs(newVal.endDate);
|
|
593
|
+
else localEndDate.value = null;
|
|
667
594
|
},
|
|
668
595
|
{ immediate: true, deep: true }
|
|
669
596
|
);
|
|
670
597
|
watch([windowWidth, localIsOpen], () => {
|
|
671
|
-
if (localIsOpen.value)
|
|
672
|
-
updatePosition();
|
|
598
|
+
if (localIsOpen.value) updatePosition();
|
|
673
599
|
});
|
|
674
600
|
onClickOutside(calendarRef, () => {
|
|
675
|
-
if (localIsOpen.value && props.variant !== "mobile")
|
|
676
|
-
close();
|
|
601
|
+
if (localIsOpen.value && props.variant !== "mobile") close();
|
|
677
602
|
});
|
|
678
603
|
function handleKeydown(e) {
|
|
679
|
-
if (!localIsOpen.value)
|
|
680
|
-
|
|
681
|
-
if (e.key === "Escape")
|
|
682
|
-
close();
|
|
604
|
+
if (!localIsOpen.value) return;
|
|
605
|
+
if (e.key === "Escape") close();
|
|
683
606
|
}
|
|
684
607
|
onMounted(() => {
|
|
685
608
|
document.addEventListener("keydown", handleKeydown);
|
|
686
|
-
if (props.isOpen)
|
|
687
|
-
updatePosition();
|
|
609
|
+
if (props.isOpen) updatePosition();
|
|
688
610
|
});
|
|
689
611
|
onUnmounted(() => {
|
|
690
612
|
document.removeEventListener("keydown", handleKeydown);
|
|
@@ -698,14 +620,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
698
620
|
localIsOpen.value || isFadingOut.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
699
621
|
createElementVNode("div", {
|
|
700
622
|
class: "rangepicker-backdrop",
|
|
701
|
-
onClick:
|
|
623
|
+
onClick: close
|
|
702
624
|
}),
|
|
703
625
|
createElementVNode("div", {
|
|
704
626
|
ref_key: "calendarRef",
|
|
705
627
|
ref: calendarRef,
|
|
706
|
-
class: normalizeClass(["rangepicker-container", [
|
|
707
|
-
__props.variant === "mobile" ? "rangepicker-mobile" : ""
|
|
708
|
-
]]),
|
|
628
|
+
class: normalizeClass(["rangepicker-container", [__props.variant === "mobile" ? "rangepicker-mobile" : ""]]),
|
|
709
629
|
style: normalizeStyle({ ...calendarStyle.value, ...__props.colorStyles })
|
|
710
630
|
}, [
|
|
711
631
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -720,7 +640,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
720
640
|
createElementVNode("div", _hoisted_7, [
|
|
721
641
|
createElementVNode("div", {
|
|
722
642
|
class: normalizeClass(["rangepicker-month-grid", [
|
|
723
|
-
__props.variant === "mobile" ? "grid-cols-1" : `lg:grid-cols-${numberOfColumns.value}`
|
|
643
|
+
__props.variant === "mobile" ? "arch-grid-cols-1" : `lg:arch-grid-cols-${numberOfColumns.value}`
|
|
724
644
|
]])
|
|
725
645
|
}, [
|
|
726
646
|
(openBlock(true), createElementBlock(Fragment, null, renderList(calendarMonths.value, (monthData, index) => {
|
|
@@ -738,7 +658,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
738
658
|
}, [..._cache[0] || (_cache[0] = [
|
|
739
659
|
createElementVNode("svg", {
|
|
740
660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
741
|
-
class: "h-5 w-5",
|
|
661
|
+
class: "arch-h-5 arch-w-5",
|
|
742
662
|
viewBox: "0 0 20 20",
|
|
743
663
|
fill: "currentColor"
|
|
744
664
|
}, [
|
|
@@ -759,7 +679,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
759
679
|
}, [..._cache[1] || (_cache[1] = [
|
|
760
680
|
createElementVNode("svg", {
|
|
761
681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
762
|
-
class: "h-5 w-5",
|
|
682
|
+
class: "arch-h-5 arch-w-5",
|
|
763
683
|
viewBox: "0 0 20 20",
|
|
764
684
|
fill: "currentColor"
|
|
765
685
|
}, [
|
|
@@ -786,8 +706,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
786
706
|
class: normalizeClass(getDayClasses(day)),
|
|
787
707
|
disabled: day.isDisabled,
|
|
788
708
|
"aria-label": day.date.format("MMMM D, YYYY"),
|
|
789
|
-
onClick: (e) => selectDate(
|
|
790
|
-
onMouseenter: (e) => handleDayHover(
|
|
709
|
+
onClick: (e) => selectDate(day, e),
|
|
710
|
+
onMouseenter: (e) => handleDayHover(day, e),
|
|
791
711
|
onMouseleave: handleDayLeave
|
|
792
712
|
}, [
|
|
793
713
|
createElementVNode("span", null, toDisplayString(day.date.date()), 1)
|
|
@@ -799,11 +719,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
799
719
|
], 2),
|
|
800
720
|
!__props.autoApply ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
801
721
|
createElementVNode("button", {
|
|
802
|
-
class: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors",
|
|
722
|
+
class: "arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-gray-700 hover:arch-bg-gray-100 arch-rounded-lg arch-transition-colors",
|
|
803
723
|
onClick: cancel
|
|
804
724
|
}, " Cancel "),
|
|
805
725
|
createElementVNode("button", {
|
|
806
|
-
class: "px-4 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
726
|
+
class: "arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-white arch-bg-blue-600 hover:arch-bg-blue-700 arch-rounded-lg arch-transition-colors disabled:arch-opacity-50 disabled:arch-cursor-not-allowed",
|
|
807
727
|
disabled: !localStartDate.value || !localEndDate.value,
|
|
808
728
|
onClick: apply
|
|
809
729
|
}, " Apply ", 8, _hoisted_18)
|
|
@@ -832,7 +752,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
832
752
|
}
|
|
833
753
|
return target;
|
|
834
754
|
};
|
|
835
|
-
const Rangepicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
755
|
+
const Rangepicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-28d37b0e"]]);
|
|
836
756
|
const _hoisted_1 = ["id", "value", "placeholder", "readonly", "name"];
|
|
837
757
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
838
758
|
__name: "RangepickerInput",
|
|
@@ -894,14 +814,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
894
814
|
return props.modelValue || "";
|
|
895
815
|
});
|
|
896
816
|
const inputClass = computed(() => {
|
|
897
|
-
return props.class || "
|
|
817
|
+
return props.class || "arch-w-full arch-px-3 arch-py-2 arch-border arch-border-gray-300 arch-rounded-lg arch-text-sm arch-text-gray-900 focus:arch-outline-none focus:arch-ring-2 focus:arch-ring-blue-500 focus:arch-border-blue-500";
|
|
898
818
|
});
|
|
899
819
|
function openPicker() {
|
|
900
820
|
isOpen.value = true;
|
|
901
821
|
}
|
|
902
|
-
function onFocus(
|
|
903
|
-
|
|
904
|
-
event.stopPropagation();
|
|
822
|
+
function onFocus() {
|
|
823
|
+
emit("focusin");
|
|
905
824
|
openPicker();
|
|
906
825
|
}
|
|
907
826
|
function handleUpdate(value) {
|
|
@@ -974,7 +893,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
974
893
|
};
|
|
975
894
|
}
|
|
976
895
|
});
|
|
977
|
-
const RangepickerInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
896
|
+
const RangepickerInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4e3d84fa"]]);
|
|
978
897
|
function useRangepicker(triggerRef, options = {}) {
|
|
979
898
|
const isOpen = ref(false);
|
|
980
899
|
const dateRange = ref({ startDate: "", endDate: "" });
|