@quidgest/ui 0.17.1 → 0.17.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/dist/json/api.json +1 -1
- package/dist/ui.css +8 -9
- package/dist/ui.esm.js +3517 -3426
- package/dist/ui.js +28 -28
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +246 -208
- package/dist/ui.scss +15 -15
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +721 -638
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QIcon/InlineSvg.d.ts.map +1 -1
- package/esm/components/QIcon/InlineSvg.js +2 -2
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/composables/useInputMask/index.js +9 -9
- package/esm/utils/date.d.ts +6 -0
- package/esm/utils/date.d.ts.map +1 -1
- package/esm/utils/date.js +139 -131
- package/esm/utils/index.js +19 -18
- package/package.json +7 -12
package/esm/utils/date.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _(n) {
|
|
2
2
|
let t = "", u = 0, r = !1;
|
|
3
3
|
for (; u < n.length; ) {
|
|
4
4
|
const i = n[u];
|
|
@@ -24,22 +24,29 @@ function Y(n) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function L(n) {
|
|
28
28
|
return /[Hh]|m|s|a/.test(n);
|
|
29
29
|
}
|
|
30
30
|
function J(n) {
|
|
31
31
|
return /s/.test(n);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function R(n) {
|
|
34
34
|
return /h|a/.test(n);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return /^[^dMy]*$/.test(n) &&
|
|
36
|
+
function U(n) {
|
|
37
|
+
return /^[^dMy]*$/.test(n) && L(n);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function T(n, t = 2) {
|
|
40
40
|
return String(n).padStart(t, "0");
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const k = /^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/;
|
|
43
|
+
function B(n) {
|
|
44
|
+
const t = n.trim();
|
|
45
|
+
if (!t || !k.test(t)) return null;
|
|
46
|
+
const u = new Date(t);
|
|
47
|
+
return Number.isNaN(u.getTime()) ? null : u;
|
|
48
|
+
}
|
|
49
|
+
const F = /yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g, O = /* @__PURE__ */ new Set(["HH", "H", "hh", "h", "mm", "m", "ss", "s", "SSS", "S", "a"]);
|
|
43
50
|
function C(n) {
|
|
44
51
|
switch (n) {
|
|
45
52
|
case "yyyy":
|
|
@@ -68,23 +75,23 @@ function C(n) {
|
|
|
68
75
|
return null;
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
|
-
function
|
|
78
|
+
function P(n, t) {
|
|
72
79
|
var g;
|
|
73
80
|
if (!n.trim()) return null;
|
|
74
|
-
const u = t.match(
|
|
81
|
+
const u = t.match(F) ?? [];
|
|
75
82
|
let r = 0, i = "", a = !1;
|
|
76
|
-
const D = (
|
|
83
|
+
const D = (l) => {
|
|
77
84
|
let h = "";
|
|
78
|
-
for (; h.length <
|
|
85
|
+
for (; h.length < l && r < n.length; ) {
|
|
79
86
|
const f = n[r];
|
|
80
87
|
if (!/\d/.test(f)) break;
|
|
81
88
|
h += f, r += 1;
|
|
82
89
|
}
|
|
83
90
|
return h;
|
|
84
91
|
};
|
|
85
|
-
for (const
|
|
86
|
-
if (
|
|
87
|
-
const f =
|
|
92
|
+
for (const l of u) {
|
|
93
|
+
if (l.startsWith("'")) {
|
|
94
|
+
const f = l.slice(1, -1).replace(/''/g, "'");
|
|
88
95
|
if (n.slice(r, r + f.length) === f) {
|
|
89
96
|
i += f, r += f.length;
|
|
90
97
|
continue;
|
|
@@ -95,7 +102,7 @@ function k(n, t) {
|
|
|
95
102
|
}
|
|
96
103
|
return null;
|
|
97
104
|
}
|
|
98
|
-
const h = C(
|
|
105
|
+
const h = C(l);
|
|
99
106
|
if (h) {
|
|
100
107
|
if (a || r >= n.length) {
|
|
101
108
|
a = !0, i += "0".repeat(h.max);
|
|
@@ -104,21 +111,21 @@ function k(n, t) {
|
|
|
104
111
|
const f = D(h.max);
|
|
105
112
|
if (!f) return null;
|
|
106
113
|
if (f.length < h.max) {
|
|
107
|
-
if (!O.has(
|
|
114
|
+
if (!O.has(l)) return null;
|
|
108
115
|
a = !0, i += f.padEnd(h.max, "0");
|
|
109
116
|
continue;
|
|
110
117
|
}
|
|
111
118
|
i += f;
|
|
112
119
|
continue;
|
|
113
120
|
}
|
|
114
|
-
if (
|
|
121
|
+
if (l === "MMMM" || l === "MMM" || l === "EEEE" || l === "EEE") {
|
|
115
122
|
if (r >= n.length) return null;
|
|
116
|
-
const
|
|
117
|
-
if (!
|
|
118
|
-
i +=
|
|
123
|
+
const M = ((g = n.slice(r).match(/^[\p{L}\s.'-]+/u)) == null ? void 0 : g[0]) ?? "";
|
|
124
|
+
if (!M) return null;
|
|
125
|
+
i += M, r += M.length;
|
|
119
126
|
continue;
|
|
120
127
|
}
|
|
121
|
-
if (
|
|
128
|
+
if (l === "a") {
|
|
122
129
|
if (r >= n.length) {
|
|
123
130
|
a = !0, i += "AM";
|
|
124
131
|
continue;
|
|
@@ -128,44 +135,44 @@ function k(n, t) {
|
|
|
128
135
|
i += f, r += 2;
|
|
129
136
|
continue;
|
|
130
137
|
}
|
|
131
|
-
if (n.slice(r, r +
|
|
132
|
-
i +=
|
|
138
|
+
if (n.slice(r, r + l.length) === l) {
|
|
139
|
+
i += l, r += l.length;
|
|
133
140
|
continue;
|
|
134
141
|
}
|
|
135
142
|
if (r >= n.length) {
|
|
136
|
-
a = !0, i +=
|
|
143
|
+
a = !0, i += l;
|
|
137
144
|
continue;
|
|
138
145
|
}
|
|
139
146
|
return null;
|
|
140
147
|
}
|
|
141
148
|
return n.slice(r).trim() || i === n ? null : i;
|
|
142
149
|
}
|
|
143
|
-
function
|
|
150
|
+
function X(n, t) {
|
|
144
151
|
var D;
|
|
145
|
-
if (!
|
|
146
|
-
const u = t.match(
|
|
152
|
+
if (!L(t)) return !1;
|
|
153
|
+
const u = t.match(F) ?? [];
|
|
147
154
|
let r = 0, i = !1;
|
|
148
155
|
const a = (o) => {
|
|
149
156
|
let g = "";
|
|
150
157
|
for (; g.length < o && r < n.length; ) {
|
|
151
|
-
const
|
|
152
|
-
if (!/\d/.test(
|
|
153
|
-
g +=
|
|
158
|
+
const l = n[r];
|
|
159
|
+
if (!/\d/.test(l)) break;
|
|
160
|
+
g += l, r += 1;
|
|
154
161
|
}
|
|
155
162
|
return g;
|
|
156
163
|
};
|
|
157
164
|
for (const o of u) {
|
|
158
165
|
if (O.has(o) && (i = !0), o.startsWith("'")) {
|
|
159
|
-
const
|
|
160
|
-
if (n.slice(r, r +
|
|
161
|
-
r +=
|
|
166
|
+
const l = o.slice(1, -1).replace(/''/g, "'");
|
|
167
|
+
if (n.slice(r, r + l.length) !== l) break;
|
|
168
|
+
r += l.length;
|
|
162
169
|
continue;
|
|
163
170
|
}
|
|
164
171
|
const g = C(o);
|
|
165
172
|
if (g) {
|
|
166
|
-
const
|
|
167
|
-
if (i &&
|
|
168
|
-
if (!
|
|
173
|
+
const l = a(g.max);
|
|
174
|
+
if (i && l.length > 0) return !0;
|
|
175
|
+
if (!l) break;
|
|
169
176
|
continue;
|
|
170
177
|
}
|
|
171
178
|
if (o === "MMMM" || o === "MMM" || o === "EEEE" || o === "EEE") {
|
|
@@ -176,8 +183,8 @@ function R(n, t) {
|
|
|
176
183
|
}
|
|
177
184
|
if (o === "a") {
|
|
178
185
|
if (!i) continue;
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
186
|
+
const l = n.slice(r, r + 2).toUpperCase();
|
|
187
|
+
if (l === "AM" || l === "PM") return !0;
|
|
181
188
|
break;
|
|
182
189
|
}
|
|
183
190
|
if (n.slice(r, r + o.length) !== o) break;
|
|
@@ -185,30 +192,30 @@ function R(n, t) {
|
|
|
185
192
|
}
|
|
186
193
|
return !1;
|
|
187
194
|
}
|
|
188
|
-
function
|
|
195
|
+
function Z(n, t, u) {
|
|
189
196
|
const r = A(n, t, u);
|
|
190
197
|
if (r) return r;
|
|
191
|
-
const i =
|
|
198
|
+
const i = P(n, t);
|
|
192
199
|
return i ? A(i, t, u) : null;
|
|
193
200
|
}
|
|
194
|
-
function
|
|
201
|
+
function Y(n) {
|
|
195
202
|
return n % 4 === 0 && n % 100 !== 0 || n % 400 === 0;
|
|
196
203
|
}
|
|
197
|
-
function
|
|
204
|
+
function $(n, t) {
|
|
198
205
|
const u = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
199
|
-
return n === 1 &&
|
|
206
|
+
return n === 1 && Y(t) ? 29 : u[n];
|
|
200
207
|
}
|
|
201
|
-
function
|
|
208
|
+
function G(n) {
|
|
202
209
|
return n.getDay();
|
|
203
210
|
}
|
|
204
|
-
function
|
|
211
|
+
function K(n, t) {
|
|
205
212
|
return n.getFullYear() === t.getFullYear() && n.getMonth() === t.getMonth() && n.getDate() === t.getDate();
|
|
206
213
|
}
|
|
207
|
-
function
|
|
214
|
+
function z(n, t, u) {
|
|
208
215
|
return n > t && n < u;
|
|
209
216
|
}
|
|
210
|
-
function
|
|
211
|
-
const r = n.getFullYear(), i = n.getMonth() + 1, a = n.getDate(), D = n.getDay(), o = n.getHours(), g = n.getMinutes(),
|
|
217
|
+
function j(n, t, u) {
|
|
218
|
+
const r = n.getFullYear(), i = n.getMonth() + 1, a = n.getDate(), D = n.getDay(), o = n.getHours(), g = n.getMinutes(), l = n.getSeconds(), h = o % 12 || 12, f = o >= 12, M = [
|
|
212
219
|
"January",
|
|
213
220
|
"February",
|
|
214
221
|
"March",
|
|
@@ -221,7 +228,7 @@ function z(n, t, u) {
|
|
|
221
228
|
"October",
|
|
222
229
|
"November",
|
|
223
230
|
"December"
|
|
224
|
-
],
|
|
231
|
+
], v = [
|
|
225
232
|
"Sunday",
|
|
226
233
|
"Monday",
|
|
227
234
|
"Tuesday",
|
|
@@ -229,17 +236,17 @@ function z(n, t, u) {
|
|
|
229
236
|
"Thursday",
|
|
230
237
|
"Friday",
|
|
231
238
|
"Saturday"
|
|
232
|
-
], E = (u == null ? void 0 : u.getMonthName) ?? ((
|
|
233
|
-
const y =
|
|
234
|
-
return
|
|
235
|
-
}), p = (u == null ? void 0 : u.getWeekdayName) ?? ((
|
|
236
|
-
const y =
|
|
237
|
-
return
|
|
238
|
-
}),
|
|
239
|
-
return t.replace(
|
|
239
|
+
], E = (u == null ? void 0 : u.getMonthName) ?? ((s, x) => {
|
|
240
|
+
const y = M[s];
|
|
241
|
+
return x ? y.substring(0, 3) : y;
|
|
242
|
+
}), p = (u == null ? void 0 : u.getWeekdayName) ?? ((s, x) => {
|
|
243
|
+
const y = v[s];
|
|
244
|
+
return x ? y.substring(0, 3) : y;
|
|
245
|
+
}), N = /(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g;
|
|
246
|
+
return t.replace(N, (s) => s.startsWith("'") ? s.slice(1, -1).replace(/''/g, "'") : s === "yyyy" ? String(r) : s === "yy" ? String(r).slice(-2) : s === "MMMM" ? E(i - 1, !1) : s === "MMM" ? E(i - 1, !0) : s === "MM" ? T(i) : s === "M" ? String(i) : s === "dd" ? T(a) : s === "d" ? String(a) : s === "EEEE" ? p(D, !1) : s === "EEE" ? p(D, !0) : s === "HH" ? T(o) : s === "H" ? String(o) : s === "hh" ? T(h) : s === "h" ? String(h) : s === "mm" ? T(g) : s === "m" ? String(g) : s === "ss" ? T(l) : s === "s" ? String(l) : s === "a" ? f ? "PM" : "AM" : s);
|
|
240
247
|
}
|
|
241
248
|
function A(n, t, u) {
|
|
242
|
-
var S,
|
|
249
|
+
var S, I;
|
|
243
250
|
if (!n) return null;
|
|
244
251
|
const r = [
|
|
245
252
|
"January",
|
|
@@ -262,21 +269,21 @@ function A(n, t, u) {
|
|
|
262
269
|
"Thursday",
|
|
263
270
|
"Friday",
|
|
264
271
|
"Saturday"
|
|
265
|
-
], a = t.match(
|
|
266
|
-
let o = 0, g = null,
|
|
267
|
-
const
|
|
272
|
+
], a = t.match(F) ?? [], D = a.includes("a");
|
|
273
|
+
let o = 0, g = null, l = null, h = null, f = null, M = null, v = null, E = 0, p = 0, N = 0;
|
|
274
|
+
const s = (c, e) => {
|
|
268
275
|
let d = "";
|
|
269
|
-
for (let
|
|
270
|
-
const w = n[o +
|
|
276
|
+
for (let m = 0; m < e && o + m < n.length; m++) {
|
|
277
|
+
const w = n[o + m];
|
|
271
278
|
if (!/\d/.test(w)) break;
|
|
272
279
|
d += w;
|
|
273
280
|
}
|
|
274
281
|
return d.length < c ? null : (o += d.length, Number.parseInt(d, 10));
|
|
275
|
-
},
|
|
276
|
-
const e = [...c].sort((
|
|
277
|
-
for (const
|
|
278
|
-
if (d.startsWith(
|
|
279
|
-
return o +=
|
|
282
|
+
}, x = (c) => {
|
|
283
|
+
const e = [...c].sort((m, w) => w.length - m.length), d = n.slice(o).toLowerCase();
|
|
284
|
+
for (const m of e)
|
|
285
|
+
if (d.startsWith(m.toLowerCase()))
|
|
286
|
+
return o += m.length, m;
|
|
280
287
|
return null;
|
|
281
288
|
};
|
|
282
289
|
for (const c of a) {
|
|
@@ -287,115 +294,115 @@ function A(n, t, u) {
|
|
|
287
294
|
continue;
|
|
288
295
|
}
|
|
289
296
|
if (c === "yyyy") {
|
|
290
|
-
const e =
|
|
297
|
+
const e = s(4, 4);
|
|
291
298
|
if (e === null) return null;
|
|
292
299
|
g = e;
|
|
293
300
|
continue;
|
|
294
301
|
}
|
|
295
302
|
if (c === "yy") {
|
|
296
|
-
const e =
|
|
303
|
+
const e = s(2, 2);
|
|
297
304
|
if (e === null) return null;
|
|
298
305
|
g = e < 50 ? 2e3 + e : 1900 + e;
|
|
299
306
|
continue;
|
|
300
307
|
}
|
|
301
308
|
if (c === "MMMM" || c === "MMM") {
|
|
302
|
-
const e = c === "MMM", d = e ? r.map((w) => w.slice(0, 3)) : r,
|
|
303
|
-
if (!
|
|
309
|
+
const e = c === "MMM", d = e ? r.map((w) => w.slice(0, 3)) : r, m = x(d);
|
|
310
|
+
if (!m || (l = ((S = u == null ? void 0 : u.getMonthIndex) == null ? void 0 : S.call(u, m, e)) ?? d.findIndex((w) => w.toLowerCase() === m.toLowerCase()), l < 0)) return null;
|
|
304
311
|
continue;
|
|
305
312
|
}
|
|
306
313
|
if (c === "MM") {
|
|
307
|
-
const e =
|
|
314
|
+
const e = s(2, 2);
|
|
308
315
|
if (e === null) return null;
|
|
309
|
-
|
|
316
|
+
l = e - 1;
|
|
310
317
|
continue;
|
|
311
318
|
}
|
|
312
319
|
if (c === "M") {
|
|
313
|
-
const e =
|
|
320
|
+
const e = s(1, 2);
|
|
314
321
|
if (e === null) return null;
|
|
315
|
-
|
|
322
|
+
l = e - 1;
|
|
316
323
|
continue;
|
|
317
324
|
}
|
|
318
325
|
if (c === "dd") {
|
|
319
|
-
const e =
|
|
326
|
+
const e = s(2, 2);
|
|
320
327
|
if (e === null) return null;
|
|
321
328
|
h = e;
|
|
322
329
|
continue;
|
|
323
330
|
}
|
|
324
331
|
if (c === "d") {
|
|
325
|
-
const e =
|
|
332
|
+
const e = s(1, 2);
|
|
326
333
|
if (e === null) return null;
|
|
327
334
|
h = e;
|
|
328
335
|
continue;
|
|
329
336
|
}
|
|
330
337
|
if (c === "EEEE" || c === "EEE") {
|
|
331
|
-
const e = c === "EEE", d = e ? i.map((
|
|
332
|
-
if (!
|
|
338
|
+
const e = c === "EEE", d = e ? i.map((W) => W.slice(0, 3)) : i, m = x(d);
|
|
339
|
+
if (!m || (((I = u == null ? void 0 : u.getWeekdayIndex) == null ? void 0 : I.call(u, m, e)) ?? d.findIndex((W) => W.toLowerCase() === m.toLowerCase())) < 0) return null;
|
|
333
340
|
continue;
|
|
334
341
|
}
|
|
335
342
|
if (c === "HH") {
|
|
336
|
-
const e =
|
|
343
|
+
const e = s(2, 2);
|
|
337
344
|
if (e === null) return null;
|
|
338
345
|
f = e;
|
|
339
346
|
continue;
|
|
340
347
|
}
|
|
341
348
|
if (c === "H") {
|
|
342
|
-
const e =
|
|
349
|
+
const e = s(1, 2);
|
|
343
350
|
if (e === null) return null;
|
|
344
351
|
f = e;
|
|
345
352
|
continue;
|
|
346
353
|
}
|
|
347
354
|
if (c === "hh") {
|
|
348
|
-
const e =
|
|
355
|
+
const e = s(2, 2);
|
|
349
356
|
if (e === null) return null;
|
|
350
|
-
|
|
357
|
+
M = e;
|
|
351
358
|
continue;
|
|
352
359
|
}
|
|
353
360
|
if (c === "h") {
|
|
354
|
-
const e =
|
|
361
|
+
const e = s(1, 2);
|
|
355
362
|
if (e === null) return null;
|
|
356
|
-
|
|
363
|
+
M = e;
|
|
357
364
|
continue;
|
|
358
365
|
}
|
|
359
366
|
if (c === "mm") {
|
|
360
|
-
const e =
|
|
367
|
+
const e = s(2, 2);
|
|
361
368
|
if (e === null) return null;
|
|
362
369
|
E = e;
|
|
363
370
|
continue;
|
|
364
371
|
}
|
|
365
372
|
if (c === "m") {
|
|
366
|
-
const e =
|
|
373
|
+
const e = s(1, 2);
|
|
367
374
|
if (e === null) return null;
|
|
368
375
|
E = e;
|
|
369
376
|
continue;
|
|
370
377
|
}
|
|
371
378
|
if (c === "ss") {
|
|
372
|
-
const e =
|
|
379
|
+
const e = s(2, 2);
|
|
373
380
|
if (e === null) return null;
|
|
374
381
|
p = e;
|
|
375
382
|
continue;
|
|
376
383
|
}
|
|
377
384
|
if (c === "s") {
|
|
378
|
-
const e =
|
|
385
|
+
const e = s(1, 2);
|
|
379
386
|
if (e === null) return null;
|
|
380
387
|
p = e;
|
|
381
388
|
continue;
|
|
382
389
|
}
|
|
383
390
|
if (c === "SSS") {
|
|
384
|
-
const e =
|
|
391
|
+
const e = s(3, 3);
|
|
385
392
|
if (e === null) return null;
|
|
386
|
-
|
|
393
|
+
N = e;
|
|
387
394
|
continue;
|
|
388
395
|
}
|
|
389
396
|
if (c === "S") {
|
|
390
|
-
const e =
|
|
397
|
+
const e = s(1, 1);
|
|
391
398
|
if (e === null) return null;
|
|
392
|
-
|
|
399
|
+
N = e;
|
|
393
400
|
continue;
|
|
394
401
|
}
|
|
395
402
|
if (c === "a") {
|
|
396
403
|
const e = n.slice(o, o + 2).toUpperCase();
|
|
397
404
|
if (e !== "AM" && e !== "PM") return null;
|
|
398
|
-
|
|
405
|
+
v = e, o += 2;
|
|
399
406
|
continue;
|
|
400
407
|
}
|
|
401
408
|
if (!n.slice(o).startsWith(c)) return null;
|
|
@@ -406,16 +413,16 @@ function A(n, t, u) {
|
|
|
406
413
|
if (f !== null) {
|
|
407
414
|
if (f < 0 || f > 23) return null;
|
|
408
415
|
y = f;
|
|
409
|
-
} else if (
|
|
410
|
-
if (
|
|
416
|
+
} else if (M !== null) {
|
|
417
|
+
if (M < 1 || M > 12) return null;
|
|
411
418
|
if (!D)
|
|
412
|
-
y =
|
|
419
|
+
y = M;
|
|
413
420
|
else {
|
|
414
|
-
if (
|
|
415
|
-
y =
|
|
421
|
+
if (v === null) return null;
|
|
422
|
+
y = v === "PM" ? M === 12 ? 12 : M + 12 : M === 12 ? 0 : M;
|
|
416
423
|
}
|
|
417
424
|
}
|
|
418
|
-
if (g === null &&
|
|
425
|
+
if (g === null && l === null && h === null && (f !== null || M !== null)) {
|
|
419
426
|
const c = /* @__PURE__ */ new Date();
|
|
420
427
|
return new Date(
|
|
421
428
|
c.getFullYear(),
|
|
@@ -424,56 +431,57 @@ function A(n, t, u) {
|
|
|
424
431
|
y,
|
|
425
432
|
E,
|
|
426
433
|
p,
|
|
427
|
-
|
|
434
|
+
N
|
|
428
435
|
);
|
|
429
436
|
}
|
|
430
|
-
if (g === null ||
|
|
431
|
-
const H = new Date(g,
|
|
432
|
-
return H.getFullYear() !== g || H.getMonth() !==
|
|
437
|
+
if (g === null || l === null || h === null) return null;
|
|
438
|
+
const H = new Date(g, l, h, y, E, p, N);
|
|
439
|
+
return H.getFullYear() !== g || H.getMonth() !== l || H.getDate() !== h || H.getHours() !== y || H.getMinutes() !== E || H.getSeconds() !== p ? null : H;
|
|
433
440
|
}
|
|
434
|
-
function
|
|
441
|
+
function q(n) {
|
|
435
442
|
const t = new Date(n);
|
|
436
443
|
return t.setHours(0, 0, 0, 0), t;
|
|
437
444
|
}
|
|
438
|
-
function
|
|
445
|
+
function Q(n) {
|
|
439
446
|
const t = new Date(n);
|
|
440
447
|
return t.setHours(23, 59, 59, 999), t;
|
|
441
448
|
}
|
|
442
|
-
function
|
|
449
|
+
function V(n, t) {
|
|
443
450
|
const u = new Date(n);
|
|
444
451
|
return u.setDate(u.getDate() + t), u;
|
|
445
452
|
}
|
|
446
|
-
function
|
|
453
|
+
function b(n, t) {
|
|
447
454
|
const u = new Date(n);
|
|
448
455
|
return u.setMonth(u.getMonth() + t), u;
|
|
449
456
|
}
|
|
450
|
-
function
|
|
457
|
+
function nn(n) {
|
|
451
458
|
return new Date(n.getFullYear(), n.getMonth(), 1);
|
|
452
459
|
}
|
|
453
|
-
function
|
|
460
|
+
function en(n) {
|
|
454
461
|
return new Date(n.getFullYear(), n.getMonth() + 1, 0);
|
|
455
462
|
}
|
|
456
463
|
export {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
464
|
+
V as addDays,
|
|
465
|
+
b as addMonths,
|
|
466
|
+
P as completePartialDateInput,
|
|
467
|
+
_ as convertDatePatternToMask,
|
|
468
|
+
j as formatDate,
|
|
462
469
|
J as formatUsesSeconds,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
470
|
+
L as formatUsesTime,
|
|
471
|
+
$ as getDaysInMonth,
|
|
472
|
+
Q as getEndOfDay,
|
|
473
|
+
nn as getFirstDayOfMonth,
|
|
474
|
+
G as getFirstDayOfWeek,
|
|
475
|
+
en as getLastDayOfMonth,
|
|
476
|
+
q as getStartOfDay,
|
|
477
|
+
X as inputIncludesTimePortion,
|
|
478
|
+
z as isBetween,
|
|
479
|
+
Y as isLeapYear,
|
|
480
|
+
K as isSameDay,
|
|
481
|
+
U as isTimeOnlyFormat,
|
|
482
|
+
T as padNumber,
|
|
476
483
|
A as parseDate,
|
|
477
|
-
|
|
478
|
-
|
|
484
|
+
Z as parseDateWithCompletion,
|
|
485
|
+
B as parseIsoDate,
|
|
486
|
+
R as uses12HourFormat
|
|
479
487
|
};
|
package/esm/utils/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { addDays as o, addMonths as r, completePartialDateInput as a, convertDatePatternToMask as s, formatDate as m, formatUsesSeconds as n, formatUsesTime as i, getDaysInMonth as g, getEndOfDay as p, getFirstDayOfMonth as l, getFirstDayOfWeek as f, getLastDayOfMonth as D, getStartOfDay as y, inputIncludesTimePortion as d, isBetween as h, isLeapYear as T, isSameDay as b, isTimeOnlyFormat as x, padNumber as u, parseDate as C, parseDateWithCompletion as O,
|
|
2
|
-
import { getComplementaryColor as
|
|
3
|
-
import { hslToRgb as P, hueToRgb as k, rgbToHex as
|
|
4
|
-
import { darken as
|
|
5
|
-
import { mergeColorSchemes as
|
|
6
|
-
import { isValidHex as
|
|
1
|
+
import { addDays as o, addMonths as r, completePartialDateInput as a, convertDatePatternToMask as s, formatDate as m, formatUsesSeconds as n, formatUsesTime as i, getDaysInMonth as g, getEndOfDay as p, getFirstDayOfMonth as l, getFirstDayOfWeek as f, getLastDayOfMonth as D, getStartOfDay as y, inputIncludesTimePortion as d, isBetween as h, isLeapYear as T, isSameDay as b, isTimeOnlyFormat as x, padNumber as u, parseDate as C, parseDateWithCompletion as O, parseIsoDate as c, uses12HourFormat as M } from "./date.js";
|
|
2
|
+
import { getComplementaryColor as F, getContrastingColor as H } from "./color/contrast.js";
|
|
3
|
+
import { hslToRgb as P, hueToRgb as k, rgbToHex as R, rgbToHsl as L, rgbToVariableString as U } from "./color/conversion.js";
|
|
4
|
+
import { darken as W, lighten as v } from "./color/manipulate.js";
|
|
5
|
+
import { mergeColorSchemes as B } from "./color/merge.js";
|
|
6
|
+
import { isValidHex as N, parseColor as Y, tryParseRgb as j } from "./color/parse.js";
|
|
7
7
|
export {
|
|
8
8
|
o as addDays,
|
|
9
9
|
r as addMonths,
|
|
10
10
|
a as completePartialDateInput,
|
|
11
11
|
s as convertDatePatternToMask,
|
|
12
|
-
|
|
12
|
+
W as darken,
|
|
13
13
|
m as formatDate,
|
|
14
14
|
n as formatUsesSeconds,
|
|
15
15
|
i as formatUsesTime,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
F as getComplementaryColor,
|
|
17
|
+
H as getContrastingColor,
|
|
18
18
|
g as getDaysInMonth,
|
|
19
19
|
p as getEndOfDay,
|
|
20
20
|
l as getFirstDayOfMonth,
|
|
@@ -28,16 +28,17 @@ export {
|
|
|
28
28
|
T as isLeapYear,
|
|
29
29
|
b as isSameDay,
|
|
30
30
|
x as isTimeOnlyFormat,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
N as isValidHex,
|
|
32
|
+
v as lighten,
|
|
33
|
+
B as mergeColorSchemes,
|
|
34
34
|
u as padNumber,
|
|
35
|
-
|
|
35
|
+
Y as parseColor,
|
|
36
36
|
C as parseDate,
|
|
37
37
|
O as parseDateWithCompletion,
|
|
38
|
-
|
|
39
|
-
R as
|
|
40
|
-
L as
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
c as parseIsoDate,
|
|
39
|
+
R as rgbToHex,
|
|
40
|
+
L as rgbToHsl,
|
|
41
|
+
U as rgbToVariableString,
|
|
42
|
+
j as tryParseRgb,
|
|
43
|
+
M as uses12HourFormat
|
|
43
44
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quidgest/ui",
|
|
3
3
|
"description": "Quidgest's UI framework",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Quidgest",
|
|
@@ -47,28 +47,23 @@
|
|
|
47
47
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
48
48
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
49
|
"@rollup/plugin-terser": "^0.4.4",
|
|
50
|
-
"@storybook/addon-
|
|
51
|
-
"@storybook/addon-
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/manager-api": "^8.6.3",
|
|
55
|
-
"@storybook/test": "^8.6.3",
|
|
56
|
-
"@storybook/theming": "^8.6.3",
|
|
57
|
-
"@storybook/vue3": "^8.6.3",
|
|
58
|
-
"@storybook/vue3-vite": "^8.6.3",
|
|
50
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
51
|
+
"@storybook/addon-links": "^10.4.6",
|
|
52
|
+
"@storybook/vue3": "^10.4.6",
|
|
53
|
+
"@storybook/vue3-vite": "^10.4.6",
|
|
59
54
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
60
55
|
"@vue/test-utils": "^2.4.6",
|
|
61
56
|
"acorn-walk": "^8.3.4",
|
|
62
57
|
"autoprefixer": "^10.4.20",
|
|
63
58
|
"cssnano": "^7.0.6",
|
|
64
59
|
"postcss": "^8.5.1",
|
|
65
|
-
"storybook": "^
|
|
60
|
+
"storybook": "^10.4.6",
|
|
66
61
|
"vite": "^6.0.11",
|
|
67
62
|
"vite-plugin-dts": "^4.5.0",
|
|
68
63
|
"vue-tsc": "^2.2.0"
|
|
69
64
|
},
|
|
70
65
|
"peerDependencies": {
|
|
71
|
-
"vue": "^3.5.
|
|
66
|
+
"vue": "^3.5.39"
|
|
72
67
|
},
|
|
73
68
|
"dependencies": {
|
|
74
69
|
"uuid": "^13.0.0"
|