@theengineerguy/chronos-picker 1.0.0 → 1.0.1
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/components/DateTimePicker.d.ts.map +1 -1
- package/dist/index.esm.js +364 -362
- package/dist/index.js +9 -9
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Ke, { useMemo as
|
|
1
|
+
import Ke, { useMemo as xe, useState as z, useEffect as ce, useRef as Le, useCallback as Ee } from "react";
|
|
2
2
|
import { DateTime as Y } from "luxon";
|
|
3
|
-
var
|
|
3
|
+
var je = { exports: {} }, H = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -12,19 +12,19 @@ var Te = { exports: {} }, Z = {};
|
|
|
12
12
|
*/
|
|
13
13
|
var Ue;
|
|
14
14
|
function xr() {
|
|
15
|
-
if (Ue) return
|
|
15
|
+
if (Ue) return H;
|
|
16
16
|
Ue = 1;
|
|
17
|
-
var
|
|
18
|
-
function v(S,
|
|
17
|
+
var a = Ke, l = Symbol.for("react.element"), d = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, p = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, j = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function v(S, y, C) {
|
|
19
19
|
var x, w = {}, O = null, _ = null;
|
|
20
|
-
|
|
21
|
-
for (x in
|
|
22
|
-
if (S && S.defaultProps) for (x in
|
|
23
|
-
return { $$typeof: l, type: S, key: O, ref: _, props: w, _owner:
|
|
20
|
+
C !== void 0 && (O = "" + C), y.key !== void 0 && (O = "" + y.key), y.ref !== void 0 && (_ = y.ref);
|
|
21
|
+
for (x in y) c.call(y, x) && !j.hasOwnProperty(x) && (w[x] = y[x]);
|
|
22
|
+
if (S && S.defaultProps) for (x in y = S.defaultProps, y) w[x] === void 0 && (w[x] = y[x]);
|
|
23
|
+
return { $$typeof: l, type: S, key: O, ref: _, props: w, _owner: p.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return H.Fragment = d, H.jsx = v, H.jsxs = v, H;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var Q = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -37,54 +37,54 @@ var X = {};
|
|
|
37
37
|
var ze;
|
|
38
38
|
function Er() {
|
|
39
39
|
return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
-
var
|
|
41
|
-
function
|
|
40
|
+
var a = Ke, l = Symbol.for("react.element"), d = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), S = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), D = Symbol.iterator, P = "@@iterator";
|
|
41
|
+
function A(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var r =
|
|
44
|
+
var r = D && e[D] || e[P];
|
|
45
45
|
return typeof r == "function" ? r : null;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var o = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function s(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
51
|
-
t[
|
|
52
|
-
|
|
50
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
51
|
+
t[i - 1] = arguments[i];
|
|
52
|
+
b("error", e, t);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function b(e, r, t) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
57
|
+
var i = o.ReactDebugCurrentFrame, h = i.getStackAddendum();
|
|
58
58
|
h !== "" && (r += "%s", t = t.concat([h]));
|
|
59
|
-
var
|
|
59
|
+
var m = t.map(function(f) {
|
|
60
60
|
return String(f);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var k = !1,
|
|
66
|
-
|
|
65
|
+
var k = !1, G = !1, L = !1, q = !1, ee = !1, re;
|
|
66
|
+
re = Symbol.for("react.module.reference");
|
|
67
67
|
function ue(e) {
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === j ||
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === j || ee || e === p || e === C || e === x || q || e === _ || k || G || L || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === w || e.$$typeof === v || e.$$typeof === S || e.$$typeof === y || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === re || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
74
|
+
function fe(e, r, t) {
|
|
75
|
+
var i = e.displayName;
|
|
76
|
+
if (i)
|
|
77
|
+
return i;
|
|
78
78
|
var h = r.displayName || r.name || "";
|
|
79
79
|
return h !== "" ? t + "(" + h + ")" : t;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Z(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
84
|
function I(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof e.tag == "number" &&
|
|
87
|
+
if (typeof e.tag == "number" && s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
88
|
return e.displayName || e.name || null;
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
@@ -95,9 +95,9 @@ function Er() {
|
|
|
95
95
|
return "Portal";
|
|
96
96
|
case j:
|
|
97
97
|
return "Profiler";
|
|
98
|
-
case
|
|
98
|
+
case p:
|
|
99
99
|
return "StrictMode";
|
|
100
|
-
case
|
|
100
|
+
case C:
|
|
101
101
|
return "Suspense";
|
|
102
102
|
case x:
|
|
103
103
|
return "SuspenseList";
|
|
@@ -106,19 +106,19 @@ function Er() {
|
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
107
|
case S:
|
|
108
108
|
var r = e;
|
|
109
|
-
return
|
|
109
|
+
return Z(r) + ".Consumer";
|
|
110
110
|
case v:
|
|
111
111
|
var t = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
return
|
|
112
|
+
return Z(t._context) + ".Provider";
|
|
113
|
+
case y:
|
|
114
|
+
return fe(e, e.render, "ForwardRef");
|
|
115
115
|
case w:
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var i = e.displayName || null;
|
|
117
|
+
return i !== null ? i : I(e.type) || "Memo";
|
|
118
118
|
case O: {
|
|
119
|
-
var h = e,
|
|
119
|
+
var h = e, m = h._payload, f = h._init;
|
|
120
120
|
try {
|
|
121
|
-
return I(f(
|
|
121
|
+
return I(f(m));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,14 +126,14 @@ function Er() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var W = Object.assign,
|
|
129
|
+
var W = Object.assign, V = 0, te, E, g, F, U, ne, _e;
|
|
130
130
|
function Re() {
|
|
131
131
|
}
|
|
132
132
|
Re.__reactDisabledLog = !0;
|
|
133
133
|
function Je() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (V === 0) {
|
|
136
|
+
te = console.log, E = console.info, g = console.warn, F = console.error, U = console.group, ne = console.groupCollapsed, _e = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
@@ -150,12 +150,12 @@ function Er() {
|
|
|
150
150
|
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
V++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function Ge() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (V--, V === 0) {
|
|
159
159
|
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
@@ -163,64 +163,64 @@ function Er() {
|
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
165
|
log: W({}, e, {
|
|
166
|
-
value:
|
|
166
|
+
value: te
|
|
167
167
|
}),
|
|
168
168
|
info: W({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: E
|
|
170
170
|
}),
|
|
171
171
|
warn: W({}, e, {
|
|
172
|
-
value:
|
|
172
|
+
value: g
|
|
173
173
|
}),
|
|
174
174
|
error: W({}, e, {
|
|
175
|
-
value:
|
|
175
|
+
value: F
|
|
176
176
|
}),
|
|
177
177
|
group: W({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: U
|
|
179
179
|
}),
|
|
180
180
|
groupCollapsed: W({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: ne
|
|
182
182
|
}),
|
|
183
183
|
groupEnd: W({}, e, {
|
|
184
184
|
value: _e
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
V < 0 && s("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var de = o.ReactCurrentDispatcher, he;
|
|
192
|
+
function ae(e, r, t) {
|
|
193
193
|
{
|
|
194
|
-
if (
|
|
194
|
+
if (he === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
197
|
} catch (h) {
|
|
198
|
-
var
|
|
199
|
-
|
|
198
|
+
var i = h.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
he = i && i[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
|
-
` +
|
|
202
|
+
` + he + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var ve = !1, oe;
|
|
206
206
|
{
|
|
207
207
|
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
-
|
|
208
|
+
oe = new qe();
|
|
209
209
|
}
|
|
210
210
|
function Se(e, r) {
|
|
211
|
-
if (!e ||
|
|
211
|
+
if (!e || ve)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var t =
|
|
214
|
+
var t = oe.get(e);
|
|
215
215
|
if (t !== void 0)
|
|
216
216
|
return t;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
218
|
+
var i;
|
|
219
|
+
ve = !0;
|
|
220
220
|
var h = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var m;
|
|
223
|
+
m = de.current, de.current = null, Je();
|
|
224
224
|
try {
|
|
225
225
|
if (r) {
|
|
226
226
|
var f = function() {
|
|
@@ -233,50 +233,50 @@ function Er() {
|
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
235
|
Reflect.construct(f, []);
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
236
|
+
} catch (N) {
|
|
237
|
+
i = N;
|
|
238
238
|
}
|
|
239
239
|
Reflect.construct(e, [], f);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
242
|
f.call();
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
243
|
+
} catch (N) {
|
|
244
|
+
i = N;
|
|
245
245
|
}
|
|
246
246
|
e.call(f.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
} catch (N) {
|
|
252
|
+
i = N;
|
|
253
253
|
}
|
|
254
254
|
e();
|
|
255
255
|
}
|
|
256
|
-
} catch (
|
|
257
|
-
if (
|
|
258
|
-
for (var u =
|
|
259
|
-
`),
|
|
260
|
-
`), T = u.length - 1, R =
|
|
256
|
+
} catch (N) {
|
|
257
|
+
if (N && i && typeof N.stack == "string") {
|
|
258
|
+
for (var u = N.stack.split(`
|
|
259
|
+
`), M = i.stack.split(`
|
|
260
|
+
`), T = u.length - 1, R = M.length - 1; T >= 1 && R >= 0 && u[T] !== M[R]; )
|
|
261
261
|
R--;
|
|
262
262
|
for (; T >= 1 && R >= 0; T--, R--)
|
|
263
|
-
if (u[T] !==
|
|
263
|
+
if (u[T] !== M[R]) {
|
|
264
264
|
if (T !== 1 || R !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (T--, R--, R < 0 || u[T] !==
|
|
266
|
+
if (T--, R--, R < 0 || u[T] !== M[R]) {
|
|
267
267
|
var $ = `
|
|
268
268
|
` + u[T].replace(" at new ", " at ");
|
|
269
|
-
return e.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
269
|
+
return e.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", e.displayName)), typeof e == "function" && oe.set(e, $), $;
|
|
270
270
|
}
|
|
271
271
|
while (T >= 1 && R >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
ve = !1, de.current = m, Ge(), Error.prepareStackTrace = h;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" &&
|
|
278
|
+
var J = e ? e.displayName || e.name : "", B = J ? ae(J) : "";
|
|
279
|
+
return typeof e == "function" && oe.set(e, B), B;
|
|
280
280
|
}
|
|
281
281
|
function Ze(e, r, t) {
|
|
282
282
|
return Se(e, !1);
|
|
@@ -285,64 +285,64 @@ function Er() {
|
|
|
285
285
|
var r = e.prototype;
|
|
286
286
|
return !!(r && r.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function se(e, r, t) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
292
|
return Se(e, Xe(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return ae(e);
|
|
295
295
|
switch (e) {
|
|
296
|
-
case
|
|
297
|
-
return
|
|
296
|
+
case C:
|
|
297
|
+
return ae("Suspense");
|
|
298
298
|
case x:
|
|
299
|
-
return
|
|
299
|
+
return ae("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
303
|
+
case y:
|
|
304
304
|
return Ze(e.render);
|
|
305
305
|
case w:
|
|
306
|
-
return
|
|
306
|
+
return se(e.type, r, t);
|
|
307
307
|
case O: {
|
|
308
|
-
var
|
|
308
|
+
var i = e, h = i._payload, m = i._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return se(m(h), r, t);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var X = Object.prototype.hasOwnProperty, ke = {}, we = o.ReactDebugCurrentFrame;
|
|
318
|
+
function ie(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var r = e._owner, t =
|
|
320
|
+
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
321
321
|
we.setExtraStackFrame(t);
|
|
322
322
|
} else
|
|
323
323
|
we.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function He(e, r, t,
|
|
325
|
+
function He(e, r, t, i, h) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
327
|
+
var m = Function.call.bind(X);
|
|
328
328
|
for (var f in e)
|
|
329
|
-
if (
|
|
329
|
+
if (m(e, f)) {
|
|
330
330
|
var u = void 0;
|
|
331
331
|
try {
|
|
332
332
|
if (typeof e[f] != "function") {
|
|
333
|
-
var
|
|
334
|
-
throw
|
|
333
|
+
var M = Error((i || "React class") + ": " + t + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw M.name = "Invariant Violation", M;
|
|
335
335
|
}
|
|
336
|
-
u = e[f](r, f,
|
|
336
|
+
u = e[f](r, f, i, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
337
|
} catch (T) {
|
|
338
338
|
u = T;
|
|
339
339
|
}
|
|
340
|
-
u && !(u instanceof Error) && (
|
|
340
|
+
u && !(u instanceof Error) && (ie(h), s("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", t, f, typeof u), ie(null)), u instanceof Error && !(u.message in ke) && (ke[u.message] = !0, ie(h), s("Failed %s type: %s", t, u.message), ie(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
var Qe = Array.isArray;
|
|
345
|
-
function
|
|
345
|
+
function me(e) {
|
|
346
346
|
return Qe(e);
|
|
347
347
|
}
|
|
348
348
|
function er(e) {
|
|
@@ -363,16 +363,16 @@ function Er() {
|
|
|
363
363
|
}
|
|
364
364
|
function Ce(e) {
|
|
365
365
|
if (rr(e))
|
|
366
|
-
return
|
|
366
|
+
return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Oe(e);
|
|
367
367
|
}
|
|
368
|
-
var Pe =
|
|
368
|
+
var Pe = o.ReactCurrentOwner, tr = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
373
|
}, Me, Ne;
|
|
374
374
|
function nr(e) {
|
|
375
|
-
if (
|
|
375
|
+
if (X.call(e, "ref")) {
|
|
376
376
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
377
|
if (r && r.isReactWarning)
|
|
378
378
|
return !1;
|
|
@@ -380,7 +380,7 @@ function Er() {
|
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
382
|
function ar(e) {
|
|
383
|
-
if (
|
|
383
|
+
if (X.call(e, "key")) {
|
|
384
384
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
385
|
if (r && r.isReactWarning)
|
|
386
386
|
return !1;
|
|
@@ -393,7 +393,7 @@ function Er() {
|
|
|
393
393
|
function sr(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var t = function() {
|
|
396
|
-
Me || (Me = !0,
|
|
396
|
+
Me || (Me = !0, s("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
397
|
};
|
|
398
398
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: t,
|
|
@@ -404,7 +404,7 @@ function Er() {
|
|
|
404
404
|
function ir(e, r) {
|
|
405
405
|
{
|
|
406
406
|
var t = function() {
|
|
407
|
-
Ne || (Ne = !0,
|
|
407
|
+
Ne || (Ne = !0, s("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
408
|
};
|
|
409
409
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: t,
|
|
@@ -412,7 +412,7 @@ function Er() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var lr = function(e, r, t,
|
|
415
|
+
var lr = function(e, r, t, i, h, m, f) {
|
|
416
416
|
var u = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
418
|
$$typeof: l,
|
|
@@ -422,7 +422,7 @@ function Er() {
|
|
|
422
422
|
ref: t,
|
|
423
423
|
props: f,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: m
|
|
426
426
|
};
|
|
427
427
|
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
@@ -433,7 +433,7 @@ function Er() {
|
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
436
|
+
value: i
|
|
437
437
|
}), Object.defineProperty(u, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
@@ -441,35 +441,35 @@ function Er() {
|
|
|
441
441
|
value: h
|
|
442
442
|
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
443
443
|
};
|
|
444
|
-
function cr(e, r, t,
|
|
444
|
+
function cr(e, r, t, i, h) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
t !== void 0 && (Ce(t), u = "" + t), ar(r) && (Ce(r.key), u = "" + r.key), nr(r) && (
|
|
448
|
-
for (
|
|
449
|
-
|
|
446
|
+
var m, f = {}, u = null, M = null;
|
|
447
|
+
t !== void 0 && (Ce(t), u = "" + t), ar(r) && (Ce(r.key), u = "" + r.key), nr(r) && (M = r.ref, or(r, h));
|
|
448
|
+
for (m in r)
|
|
449
|
+
X.call(r, m) && !tr.hasOwnProperty(m) && (f[m] = r[m]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
451
|
var T = e.defaultProps;
|
|
452
|
-
for (
|
|
453
|
-
f[
|
|
452
|
+
for (m in T)
|
|
453
|
+
f[m] === void 0 && (f[m] = T[m]);
|
|
454
454
|
}
|
|
455
|
-
if (u ||
|
|
455
|
+
if (u || M) {
|
|
456
456
|
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
-
u && sr(f, R),
|
|
457
|
+
u && sr(f, R), M && ir(f, R);
|
|
458
458
|
}
|
|
459
|
-
return lr(e, u,
|
|
459
|
+
return lr(e, u, M, h, i, Pe.current, f);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var pe =
|
|
463
|
-
function
|
|
462
|
+
var pe = o.ReactCurrentOwner, De = o.ReactDebugCurrentFrame;
|
|
463
|
+
function K(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var r = e._owner, t =
|
|
465
|
+
var r = e._owner, t = se(e.type, e._source, r ? r.type : null);
|
|
466
466
|
De.setExtraStackFrame(t);
|
|
467
467
|
} else
|
|
468
468
|
De.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
function
|
|
470
|
+
var be;
|
|
471
|
+
be = !1;
|
|
472
|
+
function ye(e) {
|
|
473
473
|
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
474
474
|
}
|
|
475
475
|
function Ae() {
|
|
@@ -509,26 +509,26 @@ Check the top-level render call using <` + t + ">.");
|
|
|
509
509
|
if ($e[t])
|
|
510
510
|
return;
|
|
511
511
|
$e[t] = !0;
|
|
512
|
-
var
|
|
513
|
-
e && e._owner && e._owner !== pe.current && (
|
|
512
|
+
var i = "";
|
|
513
|
+
e && e._owner && e._owner !== pe.current && (i = " It was passed a child from " + I(e._owner.type) + "."), K(e), s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, i), K(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
function Fe(e, r) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
520
|
+
if (me(e))
|
|
521
521
|
for (var t = 0; t < e.length; t++) {
|
|
522
|
-
var
|
|
523
|
-
|
|
522
|
+
var i = e[t];
|
|
523
|
+
ye(i) && Ie(i, r);
|
|
524
524
|
}
|
|
525
|
-
else if (
|
|
525
|
+
else if (ye(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var h =
|
|
528
|
+
var h = A(e);
|
|
529
529
|
if (typeof h == "function" && h !== e.entries)
|
|
530
|
-
for (var
|
|
531
|
-
|
|
530
|
+
for (var m = h.call(e), f; !(f = m.next()).done; )
|
|
531
|
+
ye(f.value) && Ie(f.value, r);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
@@ -540,75 +540,75 @@ Check the top-level render call using <` + t + ">.");
|
|
|
540
540
|
var t;
|
|
541
541
|
if (typeof r == "function")
|
|
542
542
|
t = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
545
|
r.$$typeof === w))
|
|
546
546
|
t = r.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (t) {
|
|
550
|
-
var
|
|
551
|
-
He(t, e.props, "prop",
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !
|
|
553
|
-
|
|
550
|
+
var i = I(r);
|
|
551
|
+
He(t, e.props, "prop", i, e);
|
|
552
|
+
} else if (r.PropTypes !== void 0 && !be) {
|
|
553
|
+
be = !0;
|
|
554
554
|
var h = I(r);
|
|
555
|
-
|
|
555
|
+
s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
function hr(e) {
|
|
561
561
|
{
|
|
562
562
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
|
|
563
|
+
var i = r[t];
|
|
564
|
+
if (i !== "children" && i !== "key") {
|
|
565
|
+
K(e), s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), K(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (K(e), s("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
var We = {};
|
|
573
|
-
function Ye(e, r, t,
|
|
573
|
+
function Ye(e, r, t, i, h, m) {
|
|
574
574
|
{
|
|
575
575
|
var f = ue(e);
|
|
576
576
|
if (!f) {
|
|
577
577
|
var u = "";
|
|
578
578
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var
|
|
580
|
-
|
|
579
|
+
var M = ur();
|
|
580
|
+
M ? u += M : u += Ae();
|
|
581
581
|
var T;
|
|
582
|
-
e === null ? T = "null" :
|
|
582
|
+
e === null ? T = "null" : me(e) ? T = "array" : e !== void 0 && e.$$typeof === l ? (T = "<" + (I(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, u);
|
|
583
583
|
}
|
|
584
|
-
var R = cr(e, r, t, h,
|
|
584
|
+
var R = cr(e, r, t, h, m);
|
|
585
585
|
if (R == null)
|
|
586
586
|
return R;
|
|
587
587
|
if (f) {
|
|
588
588
|
var $ = r.children;
|
|
589
589
|
if ($ !== void 0)
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
Fe($[
|
|
590
|
+
if (i)
|
|
591
|
+
if (me($)) {
|
|
592
|
+
for (var J = 0; J < $.length; J++)
|
|
593
|
+
Fe($[J], e);
|
|
594
594
|
Object.freeze && Object.freeze($);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
s("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
598
|
Fe($, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
600
|
+
if (X.call(r, "key")) {
|
|
601
|
+
var B = I(e), N = Object.keys(r).filter(function(gr) {
|
|
602
602
|
return gr !== "key";
|
|
603
|
-
}),
|
|
604
|
-
if (!We[
|
|
605
|
-
var yr =
|
|
606
|
-
|
|
603
|
+
}), ge = N.length > 0 ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!We[B + ge]) {
|
|
605
|
+
var yr = N.length > 0 ? "{" + N.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
s(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, ge, B, yr, B), We[B + ge] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
return e === c ? hr(R) : dr(R), R;
|
|
@@ -617,15 +617,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
617
617
|
function vr(e, r, t) {
|
|
618
618
|
return Ye(e, r, t, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function mr(e, r, t) {
|
|
621
621
|
return Ye(e, r, t, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var pr = mr, br = vr;
|
|
624
|
+
Q.Fragment = c, Q.jsx = pr, Q.jsxs = br;
|
|
625
|
+
}()), Q;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
627
|
+
process.env.NODE_ENV === "production" ? je.exports = xr() : je.exports = Er();
|
|
628
|
+
var n = je.exports;
|
|
629
629
|
const Tr = "Asia/Kolkata", Ve = [
|
|
630
630
|
{ value: "Asia/Kolkata", label: "India (IST)" },
|
|
631
631
|
{ value: "America/New_York", label: "Eastern Time (ET)" },
|
|
@@ -640,85 +640,85 @@ const Tr = "Asia/Kolkata", Ve = [
|
|
|
640
640
|
{ value: "Australia/Sydney", label: "Sydney (AEDT)" },
|
|
641
641
|
{ value: "UTC", label: "UTC" }
|
|
642
642
|
];
|
|
643
|
-
function
|
|
644
|
-
return Y.isDateTime(
|
|
643
|
+
function le(a, l) {
|
|
644
|
+
return Y.isDateTime(a) ? a.setZone(l) : typeof a == "string" ? Y.fromISO(a, { zone: l }) : Y.fromJSDate(a, { zone: l });
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
return Y.now().setZone(
|
|
646
|
+
function Te(a) {
|
|
647
|
+
return Y.now().setZone(a);
|
|
648
648
|
}
|
|
649
|
-
function Be(
|
|
650
|
-
const d = Y.now().setZone(
|
|
651
|
-
return `UTC${d >= 0 ? "+" : "-"}${c}${
|
|
649
|
+
function Be(a) {
|
|
650
|
+
const d = Y.now().setZone(a).offset, c = Math.floor(Math.abs(d) / 60), p = Math.abs(d) % 60;
|
|
651
|
+
return `UTC${d >= 0 ? "+" : "-"}${c}${p > 0 ? `:${p.toString().padStart(2, "0")}` : ""}`;
|
|
652
652
|
}
|
|
653
|
-
function jr(
|
|
653
|
+
function jr(a, l, d, c, p, j) {
|
|
654
654
|
const v = Y.fromObject(
|
|
655
|
-
{ year:
|
|
655
|
+
{ year: a, month: l, day: 1 },
|
|
656
656
|
{ zone: d }
|
|
657
|
-
), S = v.startOf("week"),
|
|
657
|
+
), S = v.startOf("week"), C = v.endOf("month").endOf("week"), x = Y.now().setZone(d).startOf("day"), w = [];
|
|
658
658
|
let O = [], _ = S;
|
|
659
|
-
for (; _ <=
|
|
660
|
-
const
|
|
661
|
-
let
|
|
662
|
-
|
|
659
|
+
for (; _ <= C; ) {
|
|
660
|
+
const D = _.month === l, P = _.hasSame(x, "day"), A = c ? _.hasSame(c, "day") : !1;
|
|
661
|
+
let o = !1;
|
|
662
|
+
p && _ < p.startOf("day") && (o = !0), j && _ > j.endOf("day") && (o = !0), O.push({
|
|
663
663
|
date: _,
|
|
664
|
-
isCurrentMonth:
|
|
665
|
-
isToday:
|
|
666
|
-
isSelected:
|
|
667
|
-
isDisabled:
|
|
664
|
+
isCurrentMonth: D,
|
|
665
|
+
isToday: P,
|
|
666
|
+
isSelected: A,
|
|
667
|
+
isDisabled: o
|
|
668
668
|
}), O.length === 7 && (w.push(O), O = []), _ = _.plus({ days: 1 });
|
|
669
669
|
}
|
|
670
670
|
return w;
|
|
671
671
|
}
|
|
672
672
|
function _r() {
|
|
673
|
-
const
|
|
673
|
+
const a = Y.now().startOf("week"), l = [];
|
|
674
674
|
for (let d = 0; d < 7; d++) {
|
|
675
|
-
const c =
|
|
675
|
+
const c = a.plus({ days: d });
|
|
676
676
|
l.push(c.toFormat("ccc"));
|
|
677
677
|
}
|
|
678
678
|
return l;
|
|
679
679
|
}
|
|
680
680
|
function Rr() {
|
|
681
|
-
const
|
|
681
|
+
const a = [];
|
|
682
682
|
for (let l = 1; l <= 12; l++) {
|
|
683
683
|
const d = Y.fromObject({ month: l });
|
|
684
|
-
|
|
684
|
+
a.push(d.toFormat("MMMM"));
|
|
685
685
|
}
|
|
686
|
-
return
|
|
686
|
+
return a;
|
|
687
687
|
}
|
|
688
688
|
const Sr = ({
|
|
689
|
-
viewDate:
|
|
689
|
+
viewDate: a,
|
|
690
690
|
selectedDate: l,
|
|
691
691
|
onDateSelect: d,
|
|
692
692
|
onViewDateChange: c,
|
|
693
|
-
timezone:
|
|
693
|
+
timezone: p,
|
|
694
694
|
minDate: j,
|
|
695
695
|
maxDate: v
|
|
696
696
|
}) => {
|
|
697
|
-
const S =
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
697
|
+
const S = xe(() => jr(
|
|
698
|
+
a.year,
|
|
699
|
+
a.month,
|
|
700
|
+
p,
|
|
701
701
|
l ?? void 0,
|
|
702
702
|
j,
|
|
703
703
|
v
|
|
704
|
-
), [
|
|
705
|
-
c(
|
|
704
|
+
), [a, l, p, j, v]), y = xe(() => _r(), []), C = xe(() => Rr(), []), x = () => {
|
|
705
|
+
c(a.minus({ months: 1 }));
|
|
706
706
|
}, w = () => {
|
|
707
|
-
c(
|
|
708
|
-
}, O = (
|
|
709
|
-
const
|
|
710
|
-
c(
|
|
711
|
-
}, _ = (
|
|
712
|
-
const
|
|
713
|
-
c(
|
|
714
|
-
},
|
|
715
|
-
|
|
716
|
-
},
|
|
717
|
-
(
|
|
718
|
-
},
|
|
719
|
-
return /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
707
|
+
c(a.plus({ months: 1 }));
|
|
708
|
+
}, O = (s) => {
|
|
709
|
+
const b = parseInt(s.target.value, 10);
|
|
710
|
+
c(a.set({ month: b }));
|
|
711
|
+
}, _ = (s) => {
|
|
712
|
+
const b = parseInt(s.target.value, 10);
|
|
713
|
+
c(a.set({ year: b }));
|
|
714
|
+
}, D = (s, b) => {
|
|
715
|
+
b || d(s);
|
|
716
|
+
}, P = (s, b, k) => {
|
|
717
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), D(b, k));
|
|
718
|
+
}, A = a.year, o = Array.from({ length: 21 }, (s, b) => A - 10 + b);
|
|
719
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "chronos-calendar", role: "region", "aria-label": "Calendar", children: [
|
|
720
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-calendar-header", children: [
|
|
721
|
+
/* @__PURE__ */ n.jsx(
|
|
722
722
|
"button",
|
|
723
723
|
{
|
|
724
724
|
type: "button",
|
|
@@ -728,29 +728,29 @@ const Sr = ({
|
|
|
728
728
|
children: "‹"
|
|
729
729
|
}
|
|
730
730
|
),
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-month-year-selectors", children: [
|
|
732
|
+
/* @__PURE__ */ n.jsx(
|
|
733
733
|
"select",
|
|
734
734
|
{
|
|
735
735
|
className: "chronos-month-select",
|
|
736
|
-
value:
|
|
736
|
+
value: a.month,
|
|
737
737
|
onChange: O,
|
|
738
738
|
"aria-label": "Select month",
|
|
739
|
-
children:
|
|
739
|
+
children: C.map((s, b) => /* @__PURE__ */ n.jsx("option", { value: b + 1, children: s }, b))
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ n.jsx(
|
|
743
743
|
"select",
|
|
744
744
|
{
|
|
745
745
|
className: "chronos-year-select",
|
|
746
|
-
value:
|
|
746
|
+
value: a.year,
|
|
747
747
|
onChange: _,
|
|
748
748
|
"aria-label": "Select year",
|
|
749
|
-
children:
|
|
749
|
+
children: o.map((s) => /* @__PURE__ */ n.jsx("option", { value: s, children: s }, s))
|
|
750
750
|
}
|
|
751
751
|
)
|
|
752
752
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ n.jsx(
|
|
754
754
|
"button",
|
|
755
755
|
{
|
|
756
756
|
type: "button",
|
|
@@ -761,51 +761,51 @@ const Sr = ({
|
|
|
761
761
|
}
|
|
762
762
|
)
|
|
763
763
|
] }),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
S.map((
|
|
764
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-calendar-grid", children: [
|
|
765
|
+
/* @__PURE__ */ n.jsx("div", { className: "chronos-weekday-row", children: y.map((s) => /* @__PURE__ */ n.jsx("div", { className: "chronos-weekday", children: s }, s)) }),
|
|
766
|
+
S.map((s, b) => /* @__PURE__ */ n.jsx("div", { className: "chronos-week-row", children: s.map((k, G) => /* @__PURE__ */ n.jsx(
|
|
767
767
|
"button",
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
className: `chronos-day ${k.isSelected ? "selected" : ""} ${k.isToday ? "today" : ""} ${k.isCurrentMonth ? "" : "other-month"} ${k.isDisabled ? "disabled" : ""}`,
|
|
771
|
-
onClick: () =>
|
|
772
|
-
onKeyDown: (
|
|
771
|
+
onClick: () => D(k.date, k.isDisabled),
|
|
772
|
+
onKeyDown: (L) => P(L, k.date, k.isDisabled),
|
|
773
773
|
disabled: k.isDisabled,
|
|
774
774
|
"aria-label": k.date.toFormat("MMMM d, yyyy"),
|
|
775
775
|
"aria-selected": k.isSelected,
|
|
776
776
|
"aria-current": k.isToday ? "date" : void 0,
|
|
777
777
|
children: k.date.day
|
|
778
778
|
},
|
|
779
|
-
|
|
780
|
-
)) },
|
|
779
|
+
G
|
|
780
|
+
)) }, b))
|
|
781
781
|
] })
|
|
782
782
|
] });
|
|
783
783
|
}, kr = ({
|
|
784
|
-
value:
|
|
784
|
+
value: a,
|
|
785
785
|
onChange: l,
|
|
786
786
|
use24Hour: d
|
|
787
787
|
}) => {
|
|
788
|
-
const [c,
|
|
789
|
-
|
|
788
|
+
const [c, p] = z((a == null ? void 0 : a.hour) ?? 12), [j, v] = z((a == null ? void 0 : a.minute) ?? 0), [S, y] = z(
|
|
789
|
+
a && a.hour >= 12 ? "PM" : "AM"
|
|
790
790
|
);
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}, [
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
let
|
|
797
|
-
d || (S === "PM" &&
|
|
798
|
-
}, x = (
|
|
799
|
-
v(
|
|
791
|
+
ce(() => {
|
|
792
|
+
a && (p(a.hour), v(a.minute), y(a.hour >= 12 ? "PM" : "AM"));
|
|
793
|
+
}, [a]);
|
|
794
|
+
const C = (o) => {
|
|
795
|
+
p(o);
|
|
796
|
+
let s = o;
|
|
797
|
+
d || (S === "PM" && o !== 12 ? s = o + 12 : S === "AM" && o === 12 && (s = 0)), l(s, j);
|
|
798
|
+
}, x = (o) => {
|
|
799
|
+
v(o), l(c, o);
|
|
800
800
|
}, w = () => {
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
let
|
|
804
|
-
|
|
805
|
-
}, O = d ? c : c % 12 || 12, _ = d ? 23 : 12,
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
801
|
+
const o = S === "AM" ? "PM" : "AM";
|
|
802
|
+
y(o);
|
|
803
|
+
let s = c;
|
|
804
|
+
o === "PM" && c !== 12 ? s = c + 12 : o === "AM" && c === 12 ? s = 0 : o === "AM" && c > 12 && (s = c - 12), l(s, j);
|
|
805
|
+
}, O = d ? c : c % 12 || 12, _ = d ? 23 : 12, D = d ? 0 : 1, P = Array.from({ length: _ - D + 1 }, (o, s) => D + s), A = Array.from({ length: 60 }, (o, s) => s);
|
|
806
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "chronos-time-picker", role: "group", "aria-label": "Time picker", children: [
|
|
807
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-time-header", children: [
|
|
808
|
+
/* @__PURE__ */ n.jsxs(
|
|
809
809
|
"svg",
|
|
810
810
|
{
|
|
811
811
|
className: "chronos-clock-icon",
|
|
@@ -815,44 +815,44 @@ const Sr = ({
|
|
|
815
815
|
stroke: "currentColor",
|
|
816
816
|
strokeWidth: "2",
|
|
817
817
|
children: [
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
819
|
+
/* @__PURE__ */ n.jsx("polyline", { points: "12 6 12 12 16 14" })
|
|
820
820
|
]
|
|
821
821
|
}
|
|
822
822
|
),
|
|
823
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ n.jsx("span", { children: "Time" })
|
|
824
824
|
] }),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-time-controls", children: [
|
|
826
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-time-input-group", children: [
|
|
827
|
+
/* @__PURE__ */ n.jsx("label", { htmlFor: "chronos-hour-select", className: "chronos-time-label", children: "Hour" }),
|
|
828
|
+
/* @__PURE__ */ n.jsx(
|
|
829
829
|
"select",
|
|
830
830
|
{
|
|
831
831
|
id: "chronos-hour-select",
|
|
832
832
|
className: "chronos-time-select",
|
|
833
833
|
value: O,
|
|
834
|
-
onChange: (
|
|
834
|
+
onChange: (o) => C(parseInt(o.target.value, 10)),
|
|
835
835
|
"aria-label": "Select hour",
|
|
836
|
-
children:
|
|
836
|
+
children: P.map((o) => /* @__PURE__ */ n.jsx("option", { value: o, children: o.toString().padStart(2, "0") }, o))
|
|
837
837
|
}
|
|
838
838
|
)
|
|
839
839
|
] }),
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ n.jsx("span", { className: "chronos-time-separator", children: ":" }),
|
|
841
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-time-input-group", children: [
|
|
842
|
+
/* @__PURE__ */ n.jsx("label", { htmlFor: "chronos-minute-select", className: "chronos-time-label", children: "Minute" }),
|
|
843
|
+
/* @__PURE__ */ n.jsx(
|
|
844
844
|
"select",
|
|
845
845
|
{
|
|
846
846
|
id: "chronos-minute-select",
|
|
847
847
|
className: "chronos-time-select",
|
|
848
848
|
value: j,
|
|
849
|
-
onChange: (
|
|
849
|
+
onChange: (o) => x(parseInt(o.target.value, 10)),
|
|
850
850
|
"aria-label": "Select minute",
|
|
851
|
-
children:
|
|
851
|
+
children: A.map((o) => /* @__PURE__ */ n.jsx("option", { value: o, children: o.toString().padStart(2, "0") }, o))
|
|
852
852
|
}
|
|
853
853
|
)
|
|
854
854
|
] }),
|
|
855
|
-
!d && /* @__PURE__ */
|
|
855
|
+
!d && /* @__PURE__ */ n.jsx(
|
|
856
856
|
"button",
|
|
857
857
|
{
|
|
858
858
|
type: "button",
|
|
@@ -865,17 +865,17 @@ const Sr = ({
|
|
|
865
865
|
] })
|
|
866
866
|
] });
|
|
867
867
|
}, wr = ({
|
|
868
|
-
value:
|
|
868
|
+
value: a,
|
|
869
869
|
onChange: l
|
|
870
870
|
}) => {
|
|
871
|
-
const [d, c] = z(!1),
|
|
872
|
-
label:
|
|
871
|
+
const [d, c] = z(!1), p = Ve.find((v) => v.value === a) || {
|
|
872
|
+
label: a
|
|
873
873
|
}, j = (v) => {
|
|
874
874
|
l(v), c(!1);
|
|
875
875
|
};
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
876
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "chronos-timezone-selector", children: [
|
|
877
|
+
/* @__PURE__ */ n.jsxs("div", { className: "chronos-timezone-header", children: [
|
|
878
|
+
/* @__PURE__ */ n.jsxs(
|
|
879
879
|
"svg",
|
|
880
880
|
{
|
|
881
881
|
className: "chronos-globe-icon",
|
|
@@ -885,15 +885,15 @@ const Sr = ({
|
|
|
885
885
|
stroke: "currentColor",
|
|
886
886
|
strokeWidth: "2",
|
|
887
887
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
889
|
+
/* @__PURE__ */ n.jsx("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
|
|
890
|
+
/* @__PURE__ */ n.jsx("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
891
891
|
]
|
|
892
892
|
}
|
|
893
893
|
),
|
|
894
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ n.jsx("span", { children: "Timezone" })
|
|
895
895
|
] }),
|
|
896
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ n.jsxs(
|
|
897
897
|
"button",
|
|
898
898
|
{
|
|
899
899
|
type: "button",
|
|
@@ -902,9 +902,9 @@ const Sr = ({
|
|
|
902
902
|
"aria-expanded": d,
|
|
903
903
|
"aria-label": "Select timezone",
|
|
904
904
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ n.jsx("span", { className: "chronos-timezone-label", children: p.label }),
|
|
906
|
+
/* @__PURE__ */ n.jsx("span", { className: "chronos-timezone-offset", children: Be(a) }),
|
|
907
|
+
/* @__PURE__ */ n.jsx(
|
|
908
908
|
"svg",
|
|
909
909
|
{
|
|
910
910
|
className: `chronos-chevron ${d ? "expanded" : ""}`,
|
|
@@ -913,136 +913,138 @@ const Sr = ({
|
|
|
913
913
|
fill: "none",
|
|
914
914
|
stroke: "currentColor",
|
|
915
915
|
strokeWidth: "2",
|
|
916
|
-
children: /* @__PURE__ */
|
|
916
|
+
children: /* @__PURE__ */ n.jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
917
917
|
}
|
|
918
918
|
)
|
|
919
919
|
]
|
|
920
920
|
}
|
|
921
921
|
),
|
|
922
|
-
d && /* @__PURE__ */
|
|
922
|
+
d && /* @__PURE__ */ n.jsx("div", { className: "chronos-timezone-list", role: "listbox", children: Ve.map((v) => /* @__PURE__ */ n.jsxs(
|
|
923
923
|
"button",
|
|
924
924
|
{
|
|
925
925
|
type: "button",
|
|
926
|
-
className: `chronos-timezone-option ${v.value ===
|
|
926
|
+
className: `chronos-timezone-option ${v.value === a ? "selected" : ""}`,
|
|
927
927
|
onClick: () => j(v.value),
|
|
928
928
|
role: "option",
|
|
929
|
-
"aria-selected": v.value ===
|
|
929
|
+
"aria-selected": v.value === a,
|
|
930
930
|
children: [
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ n.jsx("span", { className: "chronos-timezone-option-label", children: v.label }),
|
|
932
|
+
/* @__PURE__ */ n.jsx("span", { className: "chronos-timezone-option-offset", children: Be(v.value) })
|
|
933
933
|
]
|
|
934
934
|
},
|
|
935
935
|
v.value
|
|
936
936
|
)) })
|
|
937
937
|
] });
|
|
938
938
|
}, Pr = ({
|
|
939
|
-
value:
|
|
939
|
+
value: a,
|
|
940
940
|
onChange: l,
|
|
941
941
|
timezone: d = Tr,
|
|
942
942
|
dateFormat: c = "DD",
|
|
943
|
-
timeFormat:
|
|
943
|
+
timeFormat: p = "HH:mm",
|
|
944
944
|
minDate: j,
|
|
945
945
|
maxDate: v,
|
|
946
946
|
placeholder: S = "Select date and time",
|
|
947
|
-
disabled:
|
|
948
|
-
showTime:
|
|
947
|
+
disabled: y = !1,
|
|
948
|
+
showTime: C = !0,
|
|
949
949
|
use24Hour: x = !0,
|
|
950
950
|
className: w = "",
|
|
951
951
|
ariaLabel: O = "Date and time picker",
|
|
952
|
-
showTimezoneSelector: _ = !1
|
|
952
|
+
showTimezoneSelector: _ = !1,
|
|
953
|
+
theme: D = "light"
|
|
953
954
|
}) => {
|
|
954
|
-
const [
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}, [
|
|
955
|
+
const [P, A] = z(!1), [o, s] = z(() => a ? le(a, d) : null), [b, k] = z(d), [G, L] = z(() => o || Te(d)), q = Le(null), ee = Le(null);
|
|
956
|
+
ce(() => {
|
|
957
|
+
a && s(le(a, b));
|
|
958
|
+
}, [a, b]), ce(() => {
|
|
958
959
|
const E = (g) => {
|
|
959
|
-
|
|
960
|
+
q.current && !q.current.contains(g.target) && A(!1);
|
|
960
961
|
};
|
|
961
|
-
if (
|
|
962
|
+
if (P)
|
|
962
963
|
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
963
|
-
}, [
|
|
964
|
+
}, [P]), ce(() => {
|
|
964
965
|
const E = (g) => {
|
|
965
966
|
var F;
|
|
966
|
-
g.key === "Escape" &&
|
|
967
|
+
g.key === "Escape" && P && (A(!1), (F = ee.current) == null || F.focus());
|
|
967
968
|
};
|
|
968
969
|
return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
|
|
969
|
-
}, [
|
|
970
|
-
const
|
|
970
|
+
}, [P]);
|
|
971
|
+
const re = Ee((E) => {
|
|
971
972
|
let g = E;
|
|
972
|
-
if (
|
|
973
|
-
hour:
|
|
974
|
-
minute:
|
|
975
|
-
second:
|
|
976
|
-
})),
|
|
973
|
+
if (o && (g = E.set({
|
|
974
|
+
hour: o.hour,
|
|
975
|
+
minute: o.minute,
|
|
976
|
+
second: o.second
|
|
977
|
+
})), s(g), L(g), C || A(!1), l) {
|
|
977
978
|
const F = {
|
|
978
979
|
iso: g.toISO() || "",
|
|
979
|
-
formatted: g.toFormat(`${c} ${
|
|
980
|
+
formatted: g.toFormat(`${c} ${p}`),
|
|
980
981
|
timestamp: g.toMillis(),
|
|
981
982
|
dateTime: g
|
|
982
983
|
};
|
|
983
984
|
l(F);
|
|
984
985
|
}
|
|
985
|
-
}, [
|
|
986
|
-
const U = (
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
986
|
+
}, [o, C, l, c, p]), ue = Ee((E, g) => {
|
|
987
|
+
const U = (o || Te(b)).set({ hour: E, minute: g, second: 0 });
|
|
988
|
+
if (s(U), l) {
|
|
989
|
+
const ne = {
|
|
989
990
|
iso: U.toISO() || "",
|
|
990
|
-
formatted: U.toFormat(`${c} ${
|
|
991
|
+
formatted: U.toFormat(`${c} ${p}`),
|
|
991
992
|
timestamp: U.toMillis(),
|
|
992
993
|
dateTime: U
|
|
993
994
|
};
|
|
994
|
-
l(
|
|
995
|
+
l(ne);
|
|
995
996
|
}
|
|
996
|
-
}, [
|
|
997
|
-
if (
|
|
998
|
-
const g =
|
|
999
|
-
if (
|
|
997
|
+
}, [o, b, l, c, p]), fe = Ee((E) => {
|
|
998
|
+
if (k(E), o) {
|
|
999
|
+
const g = o.setZone(E);
|
|
1000
|
+
if (s(g), L(g), l) {
|
|
1000
1001
|
const F = {
|
|
1001
1002
|
iso: g.toISO() || "",
|
|
1002
|
-
formatted: g.toFormat(`${c} ${
|
|
1003
|
+
formatted: g.toFormat(`${c} ${p}`),
|
|
1003
1004
|
timestamp: g.toMillis(),
|
|
1004
1005
|
dateTime: g
|
|
1005
1006
|
};
|
|
1006
1007
|
l(F);
|
|
1007
1008
|
}
|
|
1008
1009
|
} else
|
|
1009
|
-
L(
|
|
1010
|
-
}, [
|
|
1011
|
-
|
|
1012
|
-
},
|
|
1013
|
-
(E.key === "Enter" || E.key === " ") && (E.preventDefault(),
|
|
1014
|
-
},
|
|
1015
|
-
return /* @__PURE__ */
|
|
1010
|
+
L(Te(E));
|
|
1011
|
+
}, [o, l, c, p]), Z = () => {
|
|
1012
|
+
y || A(!P);
|
|
1013
|
+
}, I = (E) => {
|
|
1014
|
+
(E.key === "Enter" || E.key === " ") && (E.preventDefault(), Z());
|
|
1015
|
+
}, W = o ? o.toFormat(`${c} ${C ? p : ""}`) : "", V = j ? le(j, b) : void 0, te = v ? le(v, b) : void 0;
|
|
1016
|
+
return /* @__PURE__ */ n.jsxs(
|
|
1016
1017
|
"div",
|
|
1017
1018
|
{
|
|
1018
|
-
ref:
|
|
1019
|
+
ref: q,
|
|
1019
1020
|
className: `chronos-picker ${w}`,
|
|
1020
|
-
"data-disabled":
|
|
1021
|
+
"data-disabled": y,
|
|
1022
|
+
"data-theme": D,
|
|
1021
1023
|
children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ n.jsxs(
|
|
1023
1025
|
"div",
|
|
1024
1026
|
{
|
|
1025
1027
|
className: "chronos-input-wrapper",
|
|
1026
|
-
onClick:
|
|
1028
|
+
onClick: Z,
|
|
1027
1029
|
children: [
|
|
1028
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ n.jsx(
|
|
1029
1031
|
"input",
|
|
1030
1032
|
{
|
|
1031
|
-
ref:
|
|
1033
|
+
ref: ee,
|
|
1032
1034
|
type: "text",
|
|
1033
1035
|
className: "chronos-input",
|
|
1034
|
-
value:
|
|
1036
|
+
value: W,
|
|
1035
1037
|
placeholder: S,
|
|
1036
1038
|
readOnly: !0,
|
|
1037
|
-
disabled:
|
|
1038
|
-
onKeyDown:
|
|
1039
|
+
disabled: y,
|
|
1040
|
+
onKeyDown: I,
|
|
1039
1041
|
"aria-label": O,
|
|
1040
|
-
"aria-expanded":
|
|
1042
|
+
"aria-expanded": P,
|
|
1041
1043
|
"aria-haspopup": "dialog",
|
|
1042
1044
|
role: "combobox"
|
|
1043
1045
|
}
|
|
1044
1046
|
),
|
|
1045
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ n.jsxs(
|
|
1046
1048
|
"svg",
|
|
1047
1049
|
{
|
|
1048
1050
|
className: "chronos-calendar-icon",
|
|
@@ -1052,49 +1054,49 @@ const Sr = ({
|
|
|
1052
1054
|
stroke: "currentColor",
|
|
1053
1055
|
strokeWidth: "2",
|
|
1054
1056
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1057
|
+
/* @__PURE__ */ n.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
1058
|
+
/* @__PURE__ */ n.jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
1059
|
+
/* @__PURE__ */ n.jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
1060
|
+
/* @__PURE__ */ n.jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
1059
1061
|
]
|
|
1060
1062
|
}
|
|
1061
1063
|
)
|
|
1062
1064
|
]
|
|
1063
1065
|
}
|
|
1064
1066
|
),
|
|
1065
|
-
|
|
1067
|
+
P && /* @__PURE__ */ n.jsxs(
|
|
1066
1068
|
"div",
|
|
1067
1069
|
{
|
|
1068
1070
|
className: "chronos-dropdown",
|
|
1069
1071
|
role: "dialog",
|
|
1070
1072
|
"aria-label": "Date and time picker dialog",
|
|
1071
1073
|
children: [
|
|
1072
|
-
/* @__PURE__ */
|
|
1074
|
+
/* @__PURE__ */ n.jsx(
|
|
1073
1075
|
Sr,
|
|
1074
1076
|
{
|
|
1075
|
-
viewDate:
|
|
1076
|
-
selectedDate:
|
|
1077
|
-
onDateSelect:
|
|
1077
|
+
viewDate: G,
|
|
1078
|
+
selectedDate: o,
|
|
1079
|
+
onDateSelect: re,
|
|
1078
1080
|
onViewDateChange: L,
|
|
1079
|
-
timezone:
|
|
1080
|
-
minDate:
|
|
1081
|
-
maxDate:
|
|
1081
|
+
timezone: b,
|
|
1082
|
+
minDate: V,
|
|
1083
|
+
maxDate: te
|
|
1082
1084
|
}
|
|
1083
1085
|
),
|
|
1084
|
-
|
|
1086
|
+
C && /* @__PURE__ */ n.jsx(
|
|
1085
1087
|
kr,
|
|
1086
1088
|
{
|
|
1087
|
-
value:
|
|
1088
|
-
onChange:
|
|
1089
|
+
value: o,
|
|
1090
|
+
onChange: ue,
|
|
1089
1091
|
use24Hour: x,
|
|
1090
|
-
timezone:
|
|
1092
|
+
timezone: b
|
|
1091
1093
|
}
|
|
1092
1094
|
),
|
|
1093
|
-
_ && /* @__PURE__ */
|
|
1095
|
+
_ && /* @__PURE__ */ n.jsx(
|
|
1094
1096
|
wr,
|
|
1095
1097
|
{
|
|
1096
|
-
value:
|
|
1097
|
-
onChange:
|
|
1098
|
+
value: b,
|
|
1099
|
+
onChange: fe
|
|
1098
1100
|
}
|
|
1099
1101
|
)
|
|
1100
1102
|
]
|
|
@@ -1108,6 +1110,6 @@ export {
|
|
|
1108
1110
|
Ve as COMMON_TIMEZONES,
|
|
1109
1111
|
Tr as DEFAULT_TIMEZONE,
|
|
1110
1112
|
Pr as DateTimePicker,
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
+
le as convertToTimezone,
|
|
1114
|
+
Te as nowInTimezone
|
|
1113
1115
|
};
|