@archpublicwebsite/rangepicker 1.0.9 → 1.0.11
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 +227 -307
- 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,39 @@ 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 font-secondary"
|
|
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 font-secondary" };
|
|
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 font-secondary"
|
|
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
|
-
const _hoisted_11 = { class: "rangepicker-month-title" };
|
|
322
|
+
const _hoisted_11 = { class: "rangepicker-month-title font-secondary" };
|
|
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
|
-
const _hoisted_17 = {
|
|
331
|
+
const _hoisted_17 = { class: "font-secondary" };
|
|
332
|
+
const _hoisted_18 = {
|
|
359
333
|
key: 0,
|
|
360
|
-
class: "mt-4 flex items-center justify-end gap-2 border-t border-gray-200 pt-4"
|
|
334
|
+
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
335
|
};
|
|
362
|
-
const
|
|
363
|
-
const
|
|
336
|
+
const _hoisted_19 = ["disabled"];
|
|
337
|
+
const _hoisted_20 = { class: "arch-flex arch-items-center arch-gap-1" };
|
|
364
338
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
365
339
|
__name: "Rangepicker",
|
|
366
340
|
props: {
|
|
@@ -438,37 +412,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
438
412
|
})
|
|
439
413
|
);
|
|
440
414
|
const nightCount = computed(() => {
|
|
441
|
-
if (!localStartDate.value || !localEndDate.value)
|
|
442
|
-
return 0;
|
|
415
|
+
if (!localStartDate.value || !localEndDate.value) return 0;
|
|
443
416
|
return localEndDate.value.diff(localStartDate.value, "day");
|
|
444
417
|
});
|
|
445
418
|
const formattedDateRange = computed(() => {
|
|
446
|
-
if (!localStartDate.value && !localEndDate.value)
|
|
447
|
-
return "";
|
|
419
|
+
if (!localStartDate.value && !localEndDate.value) return "";
|
|
448
420
|
else if (localStartDate.value && !localEndDate.value)
|
|
449
421
|
return localStartDate.value.format(props.format);
|
|
450
422
|
else if (localStartDate.value && localEndDate.value)
|
|
451
423
|
return `${localStartDate.value.format(props.format)}${props.delimiter}${localEndDate.value.format(props.format)}`;
|
|
452
|
-
else
|
|
453
|
-
return "";
|
|
424
|
+
else return "";
|
|
454
425
|
});
|
|
455
426
|
const canNavigatePrevious = computed(() => {
|
|
456
|
-
if (!parsedMinDate.value)
|
|
457
|
-
return true;
|
|
427
|
+
if (!parsedMinDate.value) return true;
|
|
458
428
|
const firstMonth = dayjs().add(monthOffset.value, "month").startOf("month");
|
|
459
429
|
return firstMonth.isAfter(parsedMinDate.value, "month");
|
|
460
430
|
});
|
|
461
431
|
const canNavigateNext = computed(() => {
|
|
462
|
-
if (!parsedMaxDate.value)
|
|
463
|
-
return true;
|
|
432
|
+
if (!parsedMaxDate.value) return true;
|
|
464
433
|
const lastMonth = dayjs().add(monthOffset.value + effectiveNumberOfMonths.value - 1, "month").endOf("month");
|
|
465
434
|
return lastMonth.isBefore(parsedMaxDate.value, "month");
|
|
466
435
|
});
|
|
467
436
|
const { width: windowWidth } = useWindowSize();
|
|
468
437
|
const calendarStyle = ref({});
|
|
469
438
|
function updatePosition() {
|
|
470
|
-
if (props.variant === "mobile")
|
|
471
|
-
return;
|
|
439
|
+
if (props.variant === "mobile") return;
|
|
472
440
|
nextTick(() => {
|
|
473
441
|
const position = calculatePosition(
|
|
474
442
|
props.triggerElement,
|
|
@@ -485,11 +453,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
485
453
|
}
|
|
486
454
|
const tooltipStyle = ref({});
|
|
487
455
|
const tooltipText = computed(() => {
|
|
488
|
-
if (!hoveredDay.value || !localStartDate.value)
|
|
489
|
-
return "";
|
|
456
|
+
if (!hoveredDay.value || !localStartDate.value) return "";
|
|
490
457
|
const nights = hoveredDay.value.date.diff(localStartDate.value, "day");
|
|
491
|
-
if (nights <= 0)
|
|
492
|
-
return "";
|
|
458
|
+
if (nights <= 0) return "";
|
|
493
459
|
return `${nights} ${nights === 1 ? "night" : "nights"}`;
|
|
494
460
|
});
|
|
495
461
|
const showTooltipComputed = computed(() => {
|
|
@@ -497,29 +463,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
497
463
|
});
|
|
498
464
|
function getDayClasses(day) {
|
|
499
465
|
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");
|
|
466
|
+
if (!day.isCurrentMonth) classes.push("rangepicker-day-other-month");
|
|
467
|
+
if (day.isDisabled) classes.push("rangepicker-day-disabled");
|
|
468
|
+
if (day.isToday) classes.push("rangepicker-day-today");
|
|
469
|
+
if (day.isWeekend && !day.isSelected) classes.push("rangepicker-day-weekend");
|
|
470
|
+
if (day.isHoliday) classes.push("rangepicker-day-holiday");
|
|
510
471
|
if (day.isSelected) {
|
|
511
|
-
if (localStartDate.value && localEndDate.value && day.date.isSame(localStartDate.value, "day") && day.date.isSame(localEndDate.value, "day"))
|
|
472
|
+
if (localStartDate.value && localEndDate.value && day.date.isSame(localStartDate.value, "day") && day.date.isSame(localEndDate.value, "day"))
|
|
512
473
|
classes.push("rangepicker-day-selected-single");
|
|
513
|
-
|
|
474
|
+
else if (localStartDate.value && day.date.isSame(localStartDate.value, "day"))
|
|
514
475
|
classes.push("rangepicker-day-selected-start");
|
|
515
|
-
|
|
476
|
+
else if (localEndDate.value && day.date.isSame(localEndDate.value, "day"))
|
|
516
477
|
classes.push("rangepicker-day-selected-end");
|
|
517
|
-
|
|
518
|
-
classes.push("rangepicker-day-selected");
|
|
519
|
-
}
|
|
478
|
+
else classes.push("rangepicker-day-selected");
|
|
520
479
|
}
|
|
521
|
-
if (day.isInRange)
|
|
522
|
-
classes.push("rangepicker-day-in-range");
|
|
480
|
+
if (day.isInRange) classes.push("rangepicker-day-in-range");
|
|
523
481
|
if (localStartDate.value && !localEndDate.value && hoveredDay.value) {
|
|
524
482
|
const start = localStartDate.value;
|
|
525
483
|
const hovered = hoveredDay.value.date;
|
|
@@ -530,15 +488,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
530
488
|
}
|
|
531
489
|
return classes;
|
|
532
490
|
}
|
|
533
|
-
function selectDate(
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
const target = event.currentTarget;
|
|
537
|
-
if (target) {
|
|
538
|
-
target.blur();
|
|
539
|
-
}
|
|
540
|
-
if (day.isDisabled)
|
|
541
|
-
return;
|
|
491
|
+
function selectDate(day, event) {
|
|
492
|
+
event.preventDefault();
|
|
493
|
+
if (day.isDisabled) return;
|
|
542
494
|
emit("dateSelected", day.date);
|
|
543
495
|
if (!localStartDate.value || localStartDate.value && localEndDate.value) {
|
|
544
496
|
localStartDate.value = day.date;
|
|
@@ -567,11 +519,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
567
519
|
}
|
|
568
520
|
}
|
|
569
521
|
emit("rangeSelected", localStartDate.value, localEndDate.value);
|
|
570
|
-
if (props.autoApply)
|
|
571
|
-
apply();
|
|
522
|
+
if (props.autoApply) apply();
|
|
572
523
|
}
|
|
573
524
|
}
|
|
574
|
-
function handleDayHover(
|
|
525
|
+
function handleDayHover(day, event) {
|
|
575
526
|
hoveredDay.value = day;
|
|
576
527
|
if (props.showTooltip && localStartDate.value && !localEndDate.value)
|
|
577
528
|
updateTooltipPosition(event);
|
|
@@ -588,33 +539,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
588
539
|
hoveredDay.value = null;
|
|
589
540
|
}
|
|
590
541
|
function previousMonth() {
|
|
591
|
-
if (canNavigatePrevious.value)
|
|
592
|
-
monthOffset.value--;
|
|
542
|
+
if (canNavigatePrevious.value) monthOffset.value--;
|
|
593
543
|
}
|
|
594
544
|
function nextMonth() {
|
|
595
|
-
if (canNavigateNext.value)
|
|
596
|
-
monthOffset.value++;
|
|
545
|
+
if (canNavigateNext.value) monthOffset.value++;
|
|
597
546
|
}
|
|
598
547
|
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");
|
|
548
|
+
if (isFadingOut.value) return;
|
|
608
549
|
isFadingOut.value = true;
|
|
609
550
|
setTimeout(() => {
|
|
610
551
|
localIsOpen.value = false;
|
|
611
552
|
emit("update:isOpen", false);
|
|
612
553
|
isFadingOut.value = false;
|
|
613
|
-
nextTick(() => {
|
|
614
|
-
if (document.activeElement === document.body) {
|
|
615
|
-
document.body.blur();
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
554
|
}, 200);
|
|
619
555
|
}
|
|
620
556
|
function apply() {
|
|
@@ -630,61 +566,48 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
630
566
|
var _a, _b;
|
|
631
567
|
if ((_a = props.modelValue) == null ? void 0 : _a.startDate)
|
|
632
568
|
localStartDate.value = dayjs(props.modelValue.startDate);
|
|
633
|
-
else
|
|
634
|
-
localStartDate.value = null;
|
|
569
|
+
else localStartDate.value = null;
|
|
635
570
|
if ((_b = props.modelValue) == null ? void 0 : _b.endDate)
|
|
636
571
|
localEndDate.value = dayjs(props.modelValue.endDate);
|
|
637
|
-
else
|
|
638
|
-
localEndDate.value = null;
|
|
572
|
+
else localEndDate.value = null;
|
|
639
573
|
close();
|
|
640
574
|
}
|
|
641
575
|
watch(
|
|
642
576
|
() => props.isOpen,
|
|
643
577
|
(newVal) => {
|
|
644
578
|
localIsOpen.value = newVal;
|
|
645
|
-
if (newVal)
|
|
646
|
-
updatePosition();
|
|
579
|
+
if (newVal) updatePosition();
|
|
647
580
|
}
|
|
648
581
|
);
|
|
649
582
|
watch(
|
|
650
583
|
() => props.close,
|
|
651
584
|
(newVal) => {
|
|
652
|
-
if (newVal)
|
|
653
|
-
close();
|
|
585
|
+
if (newVal) close();
|
|
654
586
|
}
|
|
655
587
|
);
|
|
656
588
|
watch(
|
|
657
589
|
() => props.modelValue,
|
|
658
590
|
(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;
|
|
591
|
+
if (newVal == null ? void 0 : newVal.startDate) localStartDate.value = dayjs(newVal.startDate);
|
|
592
|
+
else localStartDate.value = null;
|
|
593
|
+
if (newVal == null ? void 0 : newVal.endDate) localEndDate.value = dayjs(newVal.endDate);
|
|
594
|
+
else localEndDate.value = null;
|
|
667
595
|
},
|
|
668
596
|
{ immediate: true, deep: true }
|
|
669
597
|
);
|
|
670
598
|
watch([windowWidth, localIsOpen], () => {
|
|
671
|
-
if (localIsOpen.value)
|
|
672
|
-
updatePosition();
|
|
599
|
+
if (localIsOpen.value) updatePosition();
|
|
673
600
|
});
|
|
674
601
|
onClickOutside(calendarRef, () => {
|
|
675
|
-
if (localIsOpen.value && props.variant !== "mobile")
|
|
676
|
-
close();
|
|
602
|
+
if (localIsOpen.value && props.variant !== "mobile") close();
|
|
677
603
|
});
|
|
678
604
|
function handleKeydown(e) {
|
|
679
|
-
if (!localIsOpen.value)
|
|
680
|
-
|
|
681
|
-
if (e.key === "Escape")
|
|
682
|
-
close();
|
|
605
|
+
if (!localIsOpen.value) return;
|
|
606
|
+
if (e.key === "Escape") close();
|
|
683
607
|
}
|
|
684
608
|
onMounted(() => {
|
|
685
609
|
document.addEventListener("keydown", handleKeydown);
|
|
686
|
-
if (props.isOpen)
|
|
687
|
-
updatePosition();
|
|
610
|
+
if (props.isOpen) updatePosition();
|
|
688
611
|
});
|
|
689
612
|
onUnmounted(() => {
|
|
690
613
|
document.removeEventListener("keydown", handleKeydown);
|
|
@@ -698,14 +621,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
698
621
|
localIsOpen.value || isFadingOut.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
699
622
|
createElementVNode("div", {
|
|
700
623
|
class: "rangepicker-backdrop",
|
|
701
|
-
onClick:
|
|
624
|
+
onClick: close
|
|
702
625
|
}),
|
|
703
626
|
createElementVNode("div", {
|
|
704
627
|
ref_key: "calendarRef",
|
|
705
628
|
ref: calendarRef,
|
|
706
|
-
class: normalizeClass(["rangepicker-container", [
|
|
707
|
-
__props.variant === "mobile" ? "rangepicker-mobile" : ""
|
|
708
|
-
]]),
|
|
629
|
+
class: normalizeClass(["rangepicker-container", [__props.variant === "mobile" ? "rangepicker-mobile" : ""]]),
|
|
709
630
|
style: normalizeStyle({ ...calendarStyle.value, ...__props.colorStyles })
|
|
710
631
|
}, [
|
|
711
632
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -720,7 +641,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
720
641
|
createElementVNode("div", _hoisted_7, [
|
|
721
642
|
createElementVNode("div", {
|
|
722
643
|
class: normalizeClass(["rangepicker-month-grid", [
|
|
723
|
-
__props.variant === "mobile" ? "grid-cols-1" : `lg:grid-cols-${numberOfColumns.value}`
|
|
644
|
+
__props.variant === "mobile" ? "arch-grid-cols-1" : `lg:arch-grid-cols-${numberOfColumns.value}`
|
|
724
645
|
]])
|
|
725
646
|
}, [
|
|
726
647
|
(openBlock(true), createElementBlock(Fragment, null, renderList(calendarMonths.value, (monthData, index) => {
|
|
@@ -738,7 +659,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
738
659
|
}, [..._cache[0] || (_cache[0] = [
|
|
739
660
|
createElementVNode("svg", {
|
|
740
661
|
xmlns: "http://www.w3.org/2000/svg",
|
|
741
|
-
class: "h-5 w-5",
|
|
662
|
+
class: "arch-h-5 arch-w-5",
|
|
742
663
|
viewBox: "0 0 20 20",
|
|
743
664
|
fill: "currentColor"
|
|
744
665
|
}, [
|
|
@@ -749,7 +670,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
749
670
|
})
|
|
750
671
|
], -1)
|
|
751
672
|
])], 8, _hoisted_9)) : (openBlock(), createElementBlock("div", _hoisted_10)),
|
|
752
|
-
createElementVNode("
|
|
673
|
+
createElementVNode("h3", _hoisted_11, toDisplayString(monthData.month.format("MMMM YYYY")), 1),
|
|
753
674
|
__props.variant === "mobile" || index === calendarMonths.value.length - 1 ? (openBlock(), createElementBlock("button", {
|
|
754
675
|
key: 2,
|
|
755
676
|
class: "rangepicker-nav-button",
|
|
@@ -759,7 +680,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
759
680
|
}, [..._cache[1] || (_cache[1] = [
|
|
760
681
|
createElementVNode("svg", {
|
|
761
682
|
xmlns: "http://www.w3.org/2000/svg",
|
|
762
|
-
class: "h-5 w-5",
|
|
683
|
+
class: "arch-h-5 arch-w-5",
|
|
763
684
|
viewBox: "0 0 20 20",
|
|
764
685
|
fill: "currentColor"
|
|
765
686
|
}, [
|
|
@@ -775,7 +696,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
775
696
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weekdays.value, (weekday) => {
|
|
776
697
|
return openBlock(), createElementBlock("div", {
|
|
777
698
|
key: weekday,
|
|
778
|
-
class: "rangepicker-weekday"
|
|
699
|
+
class: "rangepicker-weekday font-secondary"
|
|
779
700
|
}, toDisplayString(weekday), 1);
|
|
780
701
|
}), 128))
|
|
781
702
|
]),
|
|
@@ -786,27 +707,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
786
707
|
class: normalizeClass(getDayClasses(day)),
|
|
787
708
|
disabled: day.isDisabled,
|
|
788
709
|
"aria-label": day.date.format("MMMM D, YYYY"),
|
|
789
|
-
onClick: (e) => selectDate(
|
|
790
|
-
onMouseenter: (e) => handleDayHover(
|
|
710
|
+
onClick: (e) => selectDate(day, e),
|
|
711
|
+
onMouseenter: (e) => handleDayHover(day, e),
|
|
791
712
|
onMouseleave: handleDayLeave
|
|
792
713
|
}, [
|
|
793
|
-
createElementVNode("span",
|
|
714
|
+
createElementVNode("span", _hoisted_17, toDisplayString(day.date.date()), 1)
|
|
794
715
|
], 42, _hoisted_16);
|
|
795
716
|
}), 128))
|
|
796
717
|
])
|
|
797
718
|
]);
|
|
798
719
|
}), 128))
|
|
799
720
|
], 2),
|
|
800
|
-
!__props.autoApply ? (openBlock(), createElementBlock("div",
|
|
721
|
+
!__props.autoApply ? (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
801
722
|
createElementVNode("button", {
|
|
802
|
-
class: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors",
|
|
723
|
+
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 font-secondary",
|
|
803
724
|
onClick: cancel
|
|
804
725
|
}, " Cancel "),
|
|
805
726
|
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",
|
|
727
|
+
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 font-secondary",
|
|
807
728
|
disabled: !localStartDate.value || !localEndDate.value,
|
|
808
729
|
onClick: apply
|
|
809
|
-
}, " Apply ", 8,
|
|
730
|
+
}, " Apply ", 8, _hoisted_19)
|
|
810
731
|
])) : createCommentVNode("", true)
|
|
811
732
|
]),
|
|
812
733
|
showTooltipComputed.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -814,7 +735,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
814
735
|
class: "rangepicker-tooltip",
|
|
815
736
|
style: normalizeStyle(tooltipStyle.value)
|
|
816
737
|
}, [
|
|
817
|
-
createElementVNode("div",
|
|
738
|
+
createElementVNode("div", _hoisted_20, toDisplayString(tooltipText.value), 1)
|
|
818
739
|
], 4)) : createCommentVNode("", true)
|
|
819
740
|
], 6)
|
|
820
741
|
])) : createCommentVNode("", true)
|
|
@@ -832,7 +753,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
832
753
|
}
|
|
833
754
|
return target;
|
|
834
755
|
};
|
|
835
|
-
const Rangepicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
756
|
+
const Rangepicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3e01d519"]]);
|
|
836
757
|
const _hoisted_1 = ["id", "value", "placeholder", "readonly", "name"];
|
|
837
758
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
838
759
|
__name: "RangepickerInput",
|
|
@@ -894,14 +815,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
894
815
|
return props.modelValue || "";
|
|
895
816
|
});
|
|
896
817
|
const inputClass = computed(() => {
|
|
897
|
-
return props.class || "
|
|
818
|
+
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
819
|
});
|
|
899
820
|
function openPicker() {
|
|
900
821
|
isOpen.value = true;
|
|
901
822
|
}
|
|
902
|
-
function onFocus(
|
|
903
|
-
|
|
904
|
-
event.stopPropagation();
|
|
823
|
+
function onFocus() {
|
|
824
|
+
emit("focusin");
|
|
905
825
|
openPicker();
|
|
906
826
|
}
|
|
907
827
|
function handleUpdate(value) {
|
|
@@ -974,7 +894,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
974
894
|
};
|
|
975
895
|
}
|
|
976
896
|
});
|
|
977
|
-
const RangepickerInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
897
|
+
const RangepickerInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4e3d84fa"]]);
|
|
978
898
|
function useRangepicker(triggerRef, options = {}) {
|
|
979
899
|
const isOpen = ref(false);
|
|
980
900
|
const dateRange = ref({ startDate: "", endDate: "" });
|