reactjs-calendar-date-picker
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -17,12 +17,12 @@ import $e, { useRef as Ie, useState as Ae, useEffect as Me, Fragment as fr } from "react"; | ||
Le = 1; | ||
var U = $e, M = Symbol.for("react.element"), p = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, L = U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function c(w, m, C) { | ||
var y, S = {}, D = null, F = null; | ||
C !== void 0 && (D = "" + C), m.key !== void 0 && (D = "" + m.key), m.ref !== void 0 && (F = m.ref); | ||
for (y in m) | ||
g.call(m, y) && !$.hasOwnProperty(y) && (S[y] = m[y]); | ||
if (w && w.defaultProps) | ||
for (y in m = w.defaultProps, m) | ||
S[y] === void 0 && (S[y] = m[y]); | ||
return { $$typeof: M, type: w, key: D, ref: F, props: S, _owner: L.current }; | ||
var U = $e, M = Symbol.for("react.element"), p = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, L = U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function c(O, g, S) { | ||
var y, T = {}, D = null, F = null; | ||
S !== void 0 && (D = "" + S), g.key !== void 0 && (D = "" + g.key), g.ref !== void 0 && (F = g.ref); | ||
for (y in g) | ||
m.call(g, y) && !$.hasOwnProperty(y) && (T[y] = g[y]); | ||
if (O && O.defaultProps) | ||
for (y in g = O.defaultProps, g) | ||
T[y] === void 0 && (T[y] = g[y]); | ||
return { $$typeof: M, type: O, key: D, ref: F, props: T, _owner: L.current }; | ||
} | ||
@@ -44,3 +44,3 @@ return G.Fragment = p, G.jsx = c, G.jsxs = c, G; | ||
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() { | ||
var U = $e, M = Symbol.for("react.element"), p = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), L = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), w = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), Y = Symbol.iterator, B = "@@iterator"; | ||
var U = $e, M = Symbol.for("react.element"), p = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), L = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), O = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), Y = Symbol.iterator, B = "@@iterator"; | ||
function te(e) { | ||
@@ -70,10 +70,10 @@ if (e === null || typeof e != "object") | ||
} | ||
var s = !1, f = !1, E = !1, _ = !1, T = !1, O; | ||
O = Symbol.for("react.module.reference"); | ||
var s = !1, d = !1, E = !1, _ = !1, w = !1, C; | ||
C = Symbol.for("react.module.reference"); | ||
function b(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === g || e === $ || T || e === L || e === C || e === y || _ || e === F || s || f || E || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === S || e.$$typeof === c || e.$$typeof === w || e.$$typeof === m || // This needs to include all possible module reference object | ||
return !!(typeof e == "string" || typeof e == "function" || e === m || e === $ || w || e === L || e === S || e === y || _ || e === F || s || d || E || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === T || e.$$typeof === c || e.$$typeof === O || e.$$typeof === g || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
e.$$typeof === O || e.getModuleId !== void 0)); | ||
e.$$typeof === C || e.getModuleId !== void 0)); | ||
} | ||
@@ -98,3 +98,3 @@ function P(e, r, t) { | ||
switch (e) { | ||
case g: | ||
case m: | ||
return "Fragment"; | ||
@@ -107,3 +107,3 @@ case p: | ||
return "StrictMode"; | ||
case C: | ||
case S: | ||
return "Suspense"; | ||
@@ -115,3 +115,3 @@ case y: | ||
switch (e.$$typeof) { | ||
case w: | ||
case O: | ||
var r = e; | ||
@@ -122,5 +122,5 @@ return A(r) + ".Consumer"; | ||
return A(t._context) + ".Provider"; | ||
case m: | ||
case g: | ||
return P(e, e.render, "ForwardRef"); | ||
case S: | ||
case T: | ||
var n = e.displayName || null; | ||
@@ -139,3 +139,3 @@ return n !== null ? n : x(e.type) || "Memo"; | ||
} | ||
var N = Object.assign, q = 0, de, ve, pe, he, me, ge, ye; | ||
var N = Object.assign, q = 0, de, ve, pe, he, ge, me, ye; | ||
function Ee() { | ||
@@ -147,3 +147,3 @@ } | ||
if (q === 0) { | ||
de = console.log, ve = console.info, pe = console.warn, he = console.error, me = console.group, ge = console.groupCollapsed, ye = console.groupEnd; | ||
de = console.log, ve = console.info, pe = console.warn, he = console.error, ge = console.group, me = console.groupCollapsed, ye = console.groupEnd; | ||
var e = { | ||
@@ -190,6 +190,6 @@ configurable: !0, | ||
group: N({}, e, { | ||
value: me | ||
value: ge | ||
}), | ||
groupCollapsed: N({}, e, { | ||
value: ge | ||
value: me | ||
}), | ||
@@ -273,14 +273,14 @@ groupEnd: N({}, e, { | ||
`), R = n.stack.split(` | ||
`), l = a.length - 1, d = R.length - 1; l >= 1 && d >= 0 && a[l] !== R[d]; ) | ||
d--; | ||
for (; l >= 1 && d >= 0; l--, d--) | ||
if (a[l] !== R[d]) { | ||
if (l !== 1 || d !== 1) | ||
`), f = a.length - 1, v = R.length - 1; f >= 1 && v >= 0 && a[f] !== R[v]; ) | ||
v--; | ||
for (; f >= 1 && v >= 0; f--, v--) | ||
if (a[f] !== R[v]) { | ||
if (f !== 1 || v !== 1) | ||
do | ||
if (l--, d--, d < 0 || a[l] !== R[d]) { | ||
if (f--, v--, v < 0 || a[f] !== R[v]) { | ||
var j = ` | ||
` + a[l].replace(" at new ", " at "); | ||
` + a[f].replace(" at new ", " at "); | ||
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, j), j; | ||
} | ||
while (l >= 1 && d >= 0); | ||
while (f >= 1 && v >= 0); | ||
break; | ||
@@ -310,3 +310,3 @@ } | ||
switch (e) { | ||
case C: | ||
case S: | ||
return K("Suspense"); | ||
@@ -318,5 +318,5 @@ case y: | ||
switch (e.$$typeof) { | ||
case m: | ||
case g: | ||
return Ue(e.render); | ||
case S: | ||
case T: | ||
return Z(e.type, r, t); | ||
@@ -353,4 +353,4 @@ case D: { | ||
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (l) { | ||
a = l; | ||
} catch (f) { | ||
a = f; | ||
} | ||
@@ -381,3 +381,3 @@ a && !(a instanceof Error) && (ee(i), h("%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).", n || "React class", t, o, typeof a), ee(null)), a instanceof Error && !(a.message in Re) && (Re[a.message] = !0, ee(i), h("Failed %s type: %s", t, a.message), ee(null)); | ||
} | ||
function Te(e) { | ||
function we(e) { | ||
if (ze(e)) | ||
@@ -391,3 +391,3 @@ return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), xe(e); | ||
__source: !0 | ||
}, Se, je, se; | ||
}, Te, je, se; | ||
se = {}; | ||
@@ -419,3 +419,3 @@ function Ke(e) { | ||
var t = function() { | ||
Se || (Se = !0, h("%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)); | ||
Te || (Te = !0, h("%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)); | ||
}; | ||
@@ -471,13 +471,13 @@ t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
var u, o = {}, a = null, R = null; | ||
t !== void 0 && (Te(t), a = "" + t), Xe(r) && (Te(r.key), a = "" + r.key), Ke(r) && (R = r.ref, Ze(r, i)); | ||
t !== void 0 && (we(t), a = "" + t), Xe(r) && (we(r.key), a = "" + r.key), Ke(r) && (R = r.ref, Ze(r, i)); | ||
for (u in r) | ||
Q.call(r, u) && !He.hasOwnProperty(u) && (o[u] = r[u]); | ||
if (e && e.defaultProps) { | ||
var l = e.defaultProps; | ||
for (u in l) | ||
o[u] === void 0 && (o[u] = l[u]); | ||
var f = e.defaultProps; | ||
for (u in f) | ||
o[u] === void 0 && (o[u] = f[u]); | ||
} | ||
if (a || R) { | ||
var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
a && Qe(o, d), R && er(o, d); | ||
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
a && Qe(o, v), R && er(o, v); | ||
} | ||
@@ -487,9 +487,9 @@ return rr(e, a, R, i, n, J.current, o); | ||
} | ||
var ue = I.ReactCurrentOwner, Ce = I.ReactDebugCurrentFrame; | ||
var ue = I.ReactCurrentOwner, Se = I.ReactDebugCurrentFrame; | ||
function W(e) { | ||
if (e) { | ||
var r = e._owner, t = Z(e.type, e._source, r ? r.type : null); | ||
Ce.setExtraStackFrame(t); | ||
Se.setExtraStackFrame(t); | ||
} else | ||
Ce.setExtraStackFrame(null); | ||
Se.setExtraStackFrame(null); | ||
} | ||
@@ -501,3 +501,3 @@ var ce; | ||
} | ||
function Oe() { | ||
function Ce() { | ||
{ | ||
@@ -525,6 +525,6 @@ if (ue.current) { | ||
} | ||
var we = {}; | ||
var Oe = {}; | ||
function ar(e) { | ||
{ | ||
var r = Oe(); | ||
var r = Ce(); | ||
if (!r) { | ||
@@ -545,5 +545,5 @@ var t = typeof e == "string" ? e : e.displayName || e.name; | ||
var t = ar(r); | ||
if (we[t]) | ||
if (Oe[t]) | ||
return; | ||
we[t] = !0; | ||
Oe[t] = !0; | ||
var n = ""; | ||
@@ -580,5 +580,5 @@ e && e._owner && e._owner !== ue.current && (n = " It was passed a child from " + x(e._owner.type) + "."), W(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), W(null); | ||
t = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === g || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === S)) | ||
r.$$typeof === T)) | ||
t = r.propTypes; | ||
@@ -617,9 +617,9 @@ else | ||
var R = nr(i); | ||
R ? a += R : a += Oe(); | ||
var l; | ||
e === null ? l = "null" : ie(e) ? l = "array" : e !== void 0 && e.$$typeof === M ? (l = "<" + (x(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a); | ||
R ? a += R : a += Ce(); | ||
var f; | ||
e === null ? f = "null" : ie(e) ? f = "array" : e !== void 0 && e.$$typeof === M ? (f = "<" + (x(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a); | ||
} | ||
var d = tr(e, r, t, i, u); | ||
if (d == null) | ||
return d; | ||
var v = tr(e, r, t, i, u); | ||
if (v == null) | ||
return v; | ||
if (o) { | ||
@@ -638,3 +638,3 @@ var j = r.children; | ||
} | ||
return e === g ? ir(d) : or(d), d; | ||
return e === m ? ir(v) : or(v), v; | ||
} | ||
@@ -649,9 +649,9 @@ } | ||
var cr = ur, lr = sr; | ||
z.Fragment = g, z.jsx = cr, z.jsxs = lr; | ||
z.Fragment = m, z.jsx = cr, z.jsxs = lr; | ||
}()), z; | ||
} | ||
process.env.NODE_ENV === "production" ? fe.exports = dr() : fe.exports = vr(); | ||
var v = fe.exports; | ||
var l = fe.exports; | ||
const re = [16915266e5, 16916994e5], hr = (U) => { | ||
const { onChange: M } = U, p = Ie(0), g = Ie(0), [L, $] = Ae([]), [c, w] = Ae(/* @__PURE__ */ new Date()), m = [ | ||
const { onChange: M } = U, p = Ie(0), m = Ie(0), [L, $] = Ae([]), [c, O] = Ae(/* @__PURE__ */ new Date()), g = [ | ||
"January", | ||
@@ -671,5 +671,5 @@ "February", | ||
Me(() => B(), []), Me(() => H(), [L]); | ||
const C = (s) => { | ||
var f = document.querySelectorAll(`.${s}`); | ||
[].forEach.call(f, (E) => { | ||
const S = (s) => { | ||
var d = document.querySelectorAll(`.${s}`); | ||
[].forEach.call(d, (E) => { | ||
E.classList.remove(s); | ||
@@ -680,25 +680,25 @@ }); | ||
s && s.classList.remove("from"); | ||
}, S = () => { | ||
}, T = () => { | ||
const s = document.querySelector(".to"); | ||
s && s.classList.remove("to"); | ||
}, D = (s) => { | ||
let f = !1, E = !1; | ||
let d = !1, E = !1; | ||
return re.forEach((_) => { | ||
_ >= p.current && _ <= parseInt(s) && (f = !0); | ||
}), (p.current && f || re.includes(parseInt(s))) && (E = !0, p.current = 0, g.current = 0, y(), S(), C("lights")), E; | ||
_ >= p.current && _ <= parseInt(s) && (d = !0); | ||
}), (p.current && d || re.includes(parseInt(s))) && (E = !0, p.current = 0, m.current = 0, y(), T(), S("lights")), E; | ||
}, F = (s) => { | ||
const f = s.target.id, E = document.getElementById(f), _ = p.current && parseInt(f) - p.current < 0; | ||
D(f) || ((g.current || _) && (p.current = 0, g.current = 0, S(), y(), C("lights")), p.current && !_ ? E.classList.contains("from") ? (p.current = 0, E.classList.remove("from")) : (g.current = parseInt(f), E.classList.add("to"), H()) : (p.current = parseInt(f), E.classList.add("from")), M({ | ||
const d = s.target.id, E = document.getElementById(d), _ = p.current && parseInt(d) - p.current < 0; | ||
D(d) || ((m.current || _) && (p.current = 0, m.current = 0, T(), y(), S("lights")), p.current && !_ ? E.classList.contains("from") ? (p.current = 0, E.classList.remove("from")) : (m.current = parseInt(d), E.classList.add("to"), H()) : (p.current = parseInt(d), E.classList.add("from")), M({ | ||
from: p.current, | ||
to: g.current | ||
to: m.current | ||
})); | ||
}, Y = (s, f) => { | ||
const _ = new Date(c.getFullYear(), f, s).getTime(); | ||
let T = ""; | ||
return _ === p.current ? T = "from" : _ === g.current && (T = "to"), { | ||
}, Y = (s, d) => { | ||
const _ = new Date(c.getFullYear(), d, s).getTime(); | ||
let w = ""; | ||
return _ === p.current ? w = "from" : _ === m.current && (w = "to"), { | ||
num: _.toString(), | ||
cls: T | ||
cls: w | ||
}; | ||
}, B = () => { | ||
c.setDate(1), w(c); | ||
c.setDate(1), O(c); | ||
const s = new Date( | ||
@@ -708,7 +708,7 @@ c.getFullYear(), | ||
0 | ||
).getDate(), f = new Date( | ||
).getDate(), d = new Date( | ||
c.getFullYear(), | ||
c.getMonth(), | ||
0 | ||
).getDate(), E = c.getDay(), T = 7 - new Date( | ||
).getDate(), E = c.getDay(), w = 7 - new Date( | ||
c.getFullYear(), | ||
@@ -718,7 +718,7 @@ c.getMonth() + 1, | ||
).getDay() - 1; | ||
let O = []; | ||
let C = []; | ||
for (let b = E; b > 0; b--) { | ||
const P = f - b + 1, { num: A, cls: x } = Y(P, c.getMonth() - 1); | ||
O.push( | ||
/* @__PURE__ */ v.jsx( | ||
const P = d - b + 1, { num: A, cls: x } = Y(P, c.getMonth() - 1); | ||
C.push( | ||
/* @__PURE__ */ l.jsx( | ||
"div", | ||
@@ -738,4 +738,4 @@ { | ||
let x = b === (/* @__PURE__ */ new Date()).getDate() && c.getMonth() === (/* @__PURE__ */ new Date()).getMonth() ? "today" : "day"; | ||
re.includes(parseInt(P)) && (x += " reserved"), O.push( | ||
/* @__PURE__ */ v.jsx( | ||
re.includes(parseInt(P)) && (x += " reserved"), C.push( | ||
/* @__PURE__ */ l.jsx( | ||
"div", | ||
@@ -752,6 +752,6 @@ { | ||
} | ||
for (let b = 1; b <= T; b++) { | ||
for (let b = 1; b <= w; b++) { | ||
const { num: P, cls: A } = Y(b, c.getMonth() + 1); | ||
O.push( | ||
/* @__PURE__ */ v.jsx( | ||
C.push( | ||
/* @__PURE__ */ l.jsx( | ||
"div", | ||
@@ -768,3 +768,3 @@ { | ||
} | ||
$(O); | ||
$(C); | ||
}, te = () => { | ||
@@ -775,37 +775,59 @@ c.setMonth(c.getMonth() - 1), B(); | ||
}, h = (s) => { | ||
if (C("light"), !p.current || g.current) | ||
if (S("light"), !p.current || m.current) | ||
return; | ||
const E = parseInt(s.target.id), _ = p.current; | ||
for (let T = _; T <= E; T += 864e5) { | ||
const O = document.getElementById(T.toString()); | ||
if (re.includes(T)) | ||
for (let w = _; w <= E; w += 864e5) { | ||
const C = document.getElementById(w.toString()); | ||
if (re.includes(w)) | ||
return; | ||
O && O.classList.add("light"); | ||
C && C.classList.add("light"); | ||
} | ||
}, H = () => { | ||
if (!(!p.current || !g.current)) | ||
for (let s = p.current; s <= g.current; s += 864e5) { | ||
const f = document.getElementById(s.toString()); | ||
f && f.classList.add("lights"); | ||
if (!(!p.current || !m.current)) | ||
for (let s = p.current; s <= m.current; s += 864e5) { | ||
const d = document.getElementById(s.toString()); | ||
d && d.classList.add("lights"); | ||
} | ||
}; | ||
return /* @__PURE__ */ v.jsxs("div", { className: "calendar", children: [ | ||
/* @__PURE__ */ v.jsxs("div", { className: "month", children: [ | ||
/* @__PURE__ */ v.jsx("i", { onClick: te, className: "prev" }), | ||
/* @__PURE__ */ v.jsxs("div", { className: "date", children: [ | ||
/* @__PURE__ */ v.jsx("h1", { children: m[c.getMonth()] }), | ||
/* @__PURE__ */ v.jsx("p", { children: (/* @__PURE__ */ new Date()).toDateString() }) | ||
return /* @__PURE__ */ l.jsxs("div", { className: "calendar", children: [ | ||
/* @__PURE__ */ l.jsxs("div", { className: "month", children: [ | ||
/* @__PURE__ */ l.jsx("i", { onClick: te, className: "prev", children: /* @__PURE__ */ l.jsx( | ||
"svg", | ||
{ | ||
fill: "#000000", | ||
height: "28px", | ||
width: "28px", | ||
version: "1.1", | ||
xmlns: "http://www.w3.org/2000/svg", | ||
viewBox: "0 0 59.414 59.414", | ||
children: /* @__PURE__ */ l.jsx("polygon", { points: "45.268,1.414 43.854,0 14.146,29.707 43.854,59.414 45.268,58 16.975,29.707 " }) | ||
} | ||
) }), | ||
/* @__PURE__ */ l.jsxs("div", { className: "date", children: [ | ||
/* @__PURE__ */ l.jsx("h1", { children: g[c.getMonth()] }), | ||
/* @__PURE__ */ l.jsx("p", { children: (/* @__PURE__ */ new Date()).toDateString() }) | ||
] }), | ||
/* @__PURE__ */ v.jsx("i", { onClick: I, className: "next" }) | ||
/* @__PURE__ */ l.jsx("i", { onClick: I, className: "next", children: /* @__PURE__ */ l.jsx( | ||
"svg", | ||
{ | ||
fill: "#000000", | ||
height: "28px", | ||
width: "28px", | ||
version: "1.1", | ||
xmlns: "http://www.w3.org/2000/svg", | ||
viewBox: "0 0 59.414 59.414", | ||
children: /* @__PURE__ */ l.jsx("polygon", { points: "15.561,0 14.146,1.414 42.439,29.707 14.146,58 15.561,59.414 45.268,29.707 " }) | ||
} | ||
) }) | ||
] }), | ||
/* @__PURE__ */ v.jsxs("div", { className: "weekdays", children: [ | ||
/* @__PURE__ */ v.jsx("div", { children: "Sun" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Mon" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Tue" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Wed" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Thu" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Fri" }), | ||
/* @__PURE__ */ v.jsx("div", { children: "Sat" }) | ||
/* @__PURE__ */ l.jsxs("div", { className: "weekdays", children: [ | ||
/* @__PURE__ */ l.jsx("div", { children: "Sun" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Mon" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Tue" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Wed" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Thu" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Fri" }), | ||
/* @__PURE__ */ l.jsx("div", { children: "Sat" }) | ||
] }), | ||
/* @__PURE__ */ v.jsx("div", { className: "days", children: L.map((s) => /* @__PURE__ */ v.jsx(fr, { children: s }, s.props.id)) }) | ||
/* @__PURE__ */ l.jsx("div", { className: "days", children: L.map((s) => /* @__PURE__ */ l.jsx(fr, { children: s }, s.props.id)) }) | ||
] }); | ||
@@ -812,0 +834,0 @@ }; |
@@ -9,3 +9,3 @@ (function(_,L){typeof exports=="object"&&typeof module<"u"?module.exports=L(require("react")):typeof define=="function"&&define.amd?define(["react"],L):(_=typeof globalThis<"u"?globalThis:_||self,_["reactjs-calendar-date-picker"]=L(_.React))})(this,function(_){"use strict";var L={exports:{}},J={};/** | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ve;function Le(){if(ve)return J;ve=1;var z=_,N=Symbol.for("react.element"),p=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,Y=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,V={key:!0,ref:!0,__self:!0,__source:!0};function c(D,m,O){var y,S={},P=null,I=null;O!==void 0&&(P=""+O),m.key!==void 0&&(P=""+m.key),m.ref!==void 0&&(I=m.ref);for(y in m)g.call(m,y)&&!V.hasOwnProperty(y)&&(S[y]=m[y]);if(D&&D.defaultProps)for(y in m=D.defaultProps,m)S[y]===void 0&&(S[y]=m[y]);return{$$typeof:N,type:D,key:P,ref:I,props:S,_owner:Y.current}}return J.Fragment=p,J.jsx=c,J.jsxs=c,J}var G={};/** | ||
*/var ve;function Le(){if(ve)return J;ve=1;var z=_,N=Symbol.for("react.element"),p=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,Y=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,V={key:!0,ref:!0,__self:!0,__source:!0};function c(D,m,C){var y,j={},P=null,I=null;C!==void 0&&(P=""+C),m.key!==void 0&&(P=""+m.key),m.ref!==void 0&&(I=m.ref);for(y in m)g.call(m,y)&&!V.hasOwnProperty(y)&&(j[y]=m[y]);if(D&&D.defaultProps)for(y in m=D.defaultProps,m)j[y]===void 0&&(j[y]=m[y]);return{$$typeof:N,type:D,key:P,ref:I,props:j,_owner:Y.current}}return J.Fragment=p,J.jsx=c,J.jsxs=c,J}var G={};/** | ||
* @license React | ||
@@ -18,7 +18,7 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var pe;function Ne(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var z=_,N=Symbol.for("react.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),D=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),U=Symbol.iterator,H="@@iterator";function ae(e){if(e===null||typeof e!="object")return null;var r=U&&e[U]||e[H];return typeof r=="function"?r:null}var A=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Z("error",e,t)}}function Z(e,r,t){{var n=A.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var s=!1,d=!1,E=!1,x=!1,j=!1,w;w=Symbol.for("react.module.reference");function R(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===V||j||e===Y||e===O||e===y||x||e===I||s||d||E||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===S||e.$$typeof===c||e.$$typeof===D||e.$$typeof===m||e.$$typeof===w||e.getModuleId!==void 0))}function k(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function M(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case p:return"Portal";case V:return"Profiler";case Y:return"StrictMode";case O:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:var r=e;return M(r)+".Consumer";case c:var t=e;return M(t._context)+".Provider";case m:return k(e,e.render,"ForwardRef");case S:var n=e.displayName||null;return n!==null?n:T(e.type)||"Memo";case P:{var i=e,u=i._payload,o=i._init;try{return T(o(u))}catch{return null}}}return null}var W=Object.assign,K=0,he,me,ge,ye,Ee,Re,be;function _e(){}_e.__reactDisabledLog=!0;function Ye(){{if(K===0){he=console.log,me=console.info,ge=console.warn,ye=console.error,Ee=console.group,Re=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function We(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:he}),info:W({},e,{value:me}),warn:W({},e,{value:ge}),error:W({},e,{value:ye}),group:W({},e,{value:Ee}),groupCollapsed:W({},e,{value:Re}),groupEnd:W({},e,{value:be})})}K<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=A.ReactCurrentDispatcher,ie;function Q(e,r,t){{if(ie===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ie=n&&n[1]||""}return` | ||
*/var pe;function Ne(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var z=_,N=Symbol.for("react.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),D=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),U=Symbol.iterator,H="@@iterator";function ae(e){if(e===null||typeof e!="object")return null;var r=U&&e[U]||e[H];return typeof r=="function"?r:null}var A=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Z("error",e,t)}}function Z(e,r,t){{var n=A.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var s=!1,d=!1,E=!1,x=!1,w=!1,O;O=Symbol.for("react.module.reference");function R(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===V||w||e===Y||e===C||e===y||x||e===I||s||d||E||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===j||e.$$typeof===c||e.$$typeof===D||e.$$typeof===m||e.$$typeof===O||e.getModuleId!==void 0))}function k(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function M(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case p:return"Portal";case V:return"Profiler";case Y:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:var r=e;return M(r)+".Consumer";case c:var t=e;return M(t._context)+".Provider";case m:return k(e,e.render,"ForwardRef");case j:var n=e.displayName||null;return n!==null?n:T(e.type)||"Memo";case P:{var i=e,u=i._payload,o=i._init;try{return T(o(u))}catch{return null}}}return null}var W=Object.assign,K=0,he,me,ge,ye,Ee,Re,be;function _e(){}_e.__reactDisabledLog=!0;function Ye(){{if(K===0){he=console.log,me=console.info,ge=console.warn,ye=console.error,Ee=console.group,Re=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function We(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:he}),info:W({},e,{value:me}),warn:W({},e,{value:ge}),error:W({},e,{value:ye}),group:W({},e,{value:Ee}),groupCollapsed:W({},e,{value:Re}),groupEnd:W({},e,{value:be})})}K<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=A.ReactCurrentDispatcher,ie;function Q(e,r,t){{if(ie===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ie=n&&n[1]||""}return` | ||
`+ie+e}}var se=!1,ee;{var Ve=typeof WeakMap=="function"?WeakMap:Map;ee=new Ve}function xe(e,r){if(!e||se)return"";{var t=ee.get(e);if(t!==void 0)return t}var n;se=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=oe.current,oe.current=null,Ye();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(F){n=F}Reflect.construct(e,[],o)}else{try{o.call()}catch(F){n=F}e.call(o.prototype)}}else{try{throw Error()}catch(F){n=F}e()}}catch(F){if(F&&n&&typeof F.stack=="string"){for(var a=F.stack.split(` | ||
`),b=n.stack.split(` | ||
`),l=a.length-1,v=b.length-1;l>=1&&v>=0&&a[l]!==b[v];)v--;for(;l>=1&&v>=0;l--,v--)if(a[l]!==b[v]){if(l!==1||v!==1)do if(l--,v--,v<0||a[l]!==b[v]){var C=` | ||
`+a[l].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,C),C}while(l>=1&&v>=0);break}}}finally{se=!1,oe.current=u,We(),Error.prepareStackTrace=i}var $=e?e.displayName||e.name:"",Me=$?Q($):"";return typeof e=="function"&&ee.set(e,Me),Me}function Ue(e,r,t){return xe(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,t){if(e==null)return"";if(typeof e=="function")return xe(e,Be(e));if(typeof e=="string")return Q(e);switch(e){case O:return Q("Suspense");case y:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Ue(e.render);case S:return re(e.type,r,t);case P:{var n=e,i=n._payload,u=n._init;try{return re(u(i),r,t)}catch{}}}return""}var te=Object.prototype.hasOwnProperty,Te={},je=A.ReactDebugCurrentFrame;function ne(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}function $e(e,r,t,n,i){{var u=Function.call.bind(te);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var b=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(ne(i),h("%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).",n||"React class",t,o,typeof a),ne(null)),a instanceof Error&&!(a.message in Te)&&(Te[a.message]=!0,ne(i),h("Failed %s type: %s",t,a.message),ne(null))}}}var Je=Array.isArray;function ue(e){return Je(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Ce(e){if(ze(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),Se(e)}var q=A.ReactCurrentOwner,He={key:!0,ref:!0,__self:!0,__source:!0},Oe,we,ce;ce={};function Ke(e){if(te.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function qe(e){if(te.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){if(typeof e.ref=="string"&&q.current&&r&&q.current.stateNode!==r){var t=T(q.current.type);ce[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(q.current.type),e.ref),ce[t]=!0)}}function Ze(e,r){{var t=function(){Oe||(Oe=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Qe(e,r){{var t=function(){we||(we=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var er=function(e,r,t,n,i,u,o){var a={$$typeof:N,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function rr(e,r,t,n,i){{var u,o={},a=null,b=null;t!==void 0&&(Ce(t),a=""+t),qe(r)&&(Ce(r.key),a=""+r.key),Ke(r)&&(b=r.ref,Xe(r,i));for(u in r)te.call(r,u)&&!He.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var l=e.defaultProps;for(u in l)o[u]===void 0&&(o[u]=l[u])}if(a||b){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ze(o,v),b&&Qe(o,v)}return er(e,a,b,i,n,q.current,o)}}var le=A.ReactCurrentOwner,De=A.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);De.setExtraStackFrame(t)}else De.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===N}function Pe(){{if(le.current){var e=T(le.current.type);if(e)return` | ||
`),f=a.length-1,v=b.length-1;f>=1&&v>=0&&a[f]!==b[v];)v--;for(;f>=1&&v>=0;f--,v--)if(a[f]!==b[v]){if(f!==1||v!==1)do if(f--,v--,v<0||a[f]!==b[v]){var S=` | ||
`+a[f].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,S),S}while(f>=1&&v>=0);break}}}finally{se=!1,oe.current=u,We(),Error.prepareStackTrace=i}var $=e?e.displayName||e.name:"",Me=$?Q($):"";return typeof e=="function"&&ee.set(e,Me),Me}function Ue(e,r,t){return xe(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,t){if(e==null)return"";if(typeof e=="function")return xe(e,Be(e));if(typeof e=="string")return Q(e);switch(e){case C:return Q("Suspense");case y:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Ue(e.render);case j:return re(e.type,r,t);case P:{var n=e,i=n._payload,u=n._init;try{return re(u(i),r,t)}catch{}}}return""}var te=Object.prototype.hasOwnProperty,Te={},we=A.ReactDebugCurrentFrame;function ne(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}function $e(e,r,t,n,i){{var u=Function.call.bind(te);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var b=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(ne(i),h("%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).",n||"React class",t,o,typeof a),ne(null)),a instanceof Error&&!(a.message in Te)&&(Te[a.message]=!0,ne(i),h("Failed %s type: %s",t,a.message),ne(null))}}}var Je=Array.isArray;function ue(e){return Je(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function Se(e){if(ze(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),je(e)}var q=A.ReactCurrentOwner,He={key:!0,ref:!0,__self:!0,__source:!0},Ce,Oe,ce;ce={};function Ke(e){if(te.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function qe(e){if(te.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){if(typeof e.ref=="string"&&q.current&&r&&q.current.stateNode!==r){var t=T(q.current.type);ce[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(q.current.type),e.ref),ce[t]=!0)}}function Ze(e,r){{var t=function(){Ce||(Ce=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Qe(e,r){{var t=function(){Oe||(Oe=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var er=function(e,r,t,n,i,u,o){var a={$$typeof:N,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function rr(e,r,t,n,i){{var u,o={},a=null,b=null;t!==void 0&&(Se(t),a=""+t),qe(r)&&(Se(r.key),a=""+r.key),Ke(r)&&(b=r.ref,Xe(r,i));for(u in r)te.call(r,u)&&!He.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var f=e.defaultProps;for(u in f)o[u]===void 0&&(o[u]=f[u])}if(a||b){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ze(o,v),b&&Qe(o,v)}return er(e,a,b,i,n,q.current,o)}}var le=A.ReactCurrentOwner,De=A.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);De.setExtraStackFrame(t)}else De.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===N}function Pe(){{if(le.current){var e=T(le.current.type);if(e)return` | ||
@@ -29,3 +29,3 @@ Check the render method of \``+e+"`."}return""}}function tr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` | ||
Check the top-level render call using <`+t+">.")}return r}}function Fe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=nr(r);if(ke[t])return;ke[t]=!0;var n="";e&&e._owner&&e._owner!==le.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),B(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),B(null)}}function Ie(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var n=e[t];de(n)&&Fe(n,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var i=ae(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)de(o.value)&&Fe(o.value,r)}}}function ar(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===S))t=r.propTypes;else return;if(t){var n=T(r);$e(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var i=T(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function or(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){B(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),B(null);break}}e.ref!==null&&(B(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function Ae(e,r,t,n,i,u){{var o=R(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=tr(i);b?a+=b:a+=Pe();var l;e===null?l="null":ue(e)?l="array":e!==void 0&&e.$$typeof===N?(l="<"+(T(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var v=rr(e,r,t,i,u);if(v==null)return v;if(o){var C=r.children;if(C!==void 0)if(n)if(ue(C)){for(var $=0;$<C.length;$++)Ie(C[$],e);Object.freeze&&Object.freeze(C)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ie(C,e)}return e===g?or(v):ar(v),v}}function ir(e,r,t){return Ae(e,r,t,!0)}function sr(e,r,t){return Ae(e,r,t,!1)}var ur=sr,cr=ir;G.Fragment=g,G.jsx=ur,G.jsxs=cr}()),G}process.env.NODE_ENV==="production"?L.exports=Le():L.exports=Ne();var f=L.exports;const lr="",X=[16915266e5,16916994e5];return z=>{const{onChange:N}=z,p=_.useRef(0),g=_.useRef(0),[Y,V]=_.useState([]),[c,D]=_.useState(new Date),m=["January","February","March","April","May","June","July","August","September","October","November","December"];_.useEffect(()=>H(),[]),_.useEffect(()=>Z(),[Y]);const O=s=>{var d=document.querySelectorAll(`.${s}`);[].forEach.call(d,E=>{E.classList.remove(s)})},y=()=>{const s=document.querySelector(".from");s&&s.classList.remove("from")},S=()=>{const s=document.querySelector(".to");s&&s.classList.remove("to")},P=s=>{let d=!1,E=!1;return X.forEach(x=>{x>=p.current&&x<=parseInt(s)&&(d=!0)}),(p.current&&d||X.includes(parseInt(s)))&&(E=!0,p.current=0,g.current=0,y(),S(),O("lights")),E},I=s=>{const d=s.target.id,E=document.getElementById(d),x=p.current&&parseInt(d)-p.current<0;P(d)||((g.current||x)&&(p.current=0,g.current=0,S(),y(),O("lights")),p.current&&!x?E.classList.contains("from")?(p.current=0,E.classList.remove("from")):(g.current=parseInt(d),E.classList.add("to"),Z()):(p.current=parseInt(d),E.classList.add("from")),N({from:p.current,to:g.current}))},U=(s,d)=>{const x=new Date(c.getFullYear(),d,s).getTime();let j="";return x===p.current?j="from":x===g.current&&(j="to"),{num:x.toString(),cls:j}},H=()=>{c.setDate(1),D(c);const s=new Date(c.getFullYear(),c.getMonth()+1,0).getDate(),d=new Date(c.getFullYear(),c.getMonth(),0).getDate(),E=c.getDay(),j=7-new Date(c.getFullYear(),c.getMonth()+1,0).getDay()-1;let w=[];for(let R=E;R>0;R--){const k=d-R+1,{num:M,cls:T}=U(k,c.getMonth()-1);w.push(f.jsx("div",{id:M,onMouseOver:h,onClick:I,className:`prev-date ${T}`,children:k}))}for(let R=1;R<=s;R++){const{num:k,cls:M}=U(R,c.getMonth());let T=R===new Date().getDate()&&c.getMonth()===new Date().getMonth()?"today":"day";X.includes(parseInt(k))&&(T+=" reserved"),w.push(f.jsx("div",{id:k,onMouseOver:h,onClick:I,className:`${T} ${M}`,children:R}))}for(let R=1;R<=j;R++){const{num:k,cls:M}=U(R,c.getMonth()+1);w.push(f.jsx("div",{id:k,onMouseOver:h,onClick:I,className:`next-date ${M}`,children:R}))}V(w)},ae=()=>{c.setMonth(c.getMonth()-1),H()},A=()=>{c.setMonth(c.getMonth()+1),H()},h=s=>{if(O("light"),!p.current||g.current)return;const E=parseInt(s.target.id),x=p.current;for(let j=x;j<=E;j+=864e5){const w=document.getElementById(j.toString());if(X.includes(j))return;w&&w.classList.add("light")}},Z=()=>{if(!(!p.current||!g.current))for(let s=p.current;s<=g.current;s+=864e5){const d=document.getElementById(s.toString());d&&d.classList.add("lights")}};return f.jsxs("div",{className:"calendar",children:[f.jsxs("div",{className:"month",children:[f.jsx("i",{onClick:ae,className:"prev"}),f.jsxs("div",{className:"date",children:[f.jsx("h1",{children:m[c.getMonth()]}),f.jsx("p",{children:new Date().toDateString()})]}),f.jsx("i",{onClick:A,className:"next"})]}),f.jsxs("div",{className:"weekdays",children:[f.jsx("div",{children:"Sun"}),f.jsx("div",{children:"Mon"}),f.jsx("div",{children:"Tue"}),f.jsx("div",{children:"Wed"}),f.jsx("div",{children:"Thu"}),f.jsx("div",{children:"Fri"}),f.jsx("div",{children:"Sat"})]}),f.jsx("div",{className:"days",children:Y.map(s=>f.jsx(_.Fragment,{children:s},s.props.id))})]})}}); | ||
Check the top-level render call using <`+t+">.")}return r}}function Fe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=nr(r);if(ke[t])return;ke[t]=!0;var n="";e&&e._owner&&e._owner!==le.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),B(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),B(null)}}function Ie(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var n=e[t];de(n)&&Fe(n,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var i=ae(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)de(o.value)&&Fe(o.value,r)}}}function ar(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===j))t=r.propTypes;else return;if(t){var n=T(r);$e(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var i=T(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function or(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){B(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),B(null);break}}e.ref!==null&&(B(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function Ae(e,r,t,n,i,u){{var o=R(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=tr(i);b?a+=b:a+=Pe();var f;e===null?f="null":ue(e)?f="array":e!==void 0&&e.$$typeof===N?(f="<"+(T(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var v=rr(e,r,t,i,u);if(v==null)return v;if(o){var S=r.children;if(S!==void 0)if(n)if(ue(S)){for(var $=0;$<S.length;$++)Ie(S[$],e);Object.freeze&&Object.freeze(S)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ie(S,e)}return e===g?or(v):ar(v),v}}function ir(e,r,t){return Ae(e,r,t,!0)}function sr(e,r,t){return Ae(e,r,t,!1)}var ur=sr,cr=ir;G.Fragment=g,G.jsx=ur,G.jsxs=cr}()),G}process.env.NODE_ENV==="production"?L.exports=Le():L.exports=Ne();var l=L.exports;const lr="",X=[16915266e5,16916994e5];return z=>{const{onChange:N}=z,p=_.useRef(0),g=_.useRef(0),[Y,V]=_.useState([]),[c,D]=_.useState(new Date),m=["January","February","March","April","May","June","July","August","September","October","November","December"];_.useEffect(()=>H(),[]),_.useEffect(()=>Z(),[Y]);const C=s=>{var d=document.querySelectorAll(`.${s}`);[].forEach.call(d,E=>{E.classList.remove(s)})},y=()=>{const s=document.querySelector(".from");s&&s.classList.remove("from")},j=()=>{const s=document.querySelector(".to");s&&s.classList.remove("to")},P=s=>{let d=!1,E=!1;return X.forEach(x=>{x>=p.current&&x<=parseInt(s)&&(d=!0)}),(p.current&&d||X.includes(parseInt(s)))&&(E=!0,p.current=0,g.current=0,y(),j(),C("lights")),E},I=s=>{const d=s.target.id,E=document.getElementById(d),x=p.current&&parseInt(d)-p.current<0;P(d)||((g.current||x)&&(p.current=0,g.current=0,j(),y(),C("lights")),p.current&&!x?E.classList.contains("from")?(p.current=0,E.classList.remove("from")):(g.current=parseInt(d),E.classList.add("to"),Z()):(p.current=parseInt(d),E.classList.add("from")),N({from:p.current,to:g.current}))},U=(s,d)=>{const x=new Date(c.getFullYear(),d,s).getTime();let w="";return x===p.current?w="from":x===g.current&&(w="to"),{num:x.toString(),cls:w}},H=()=>{c.setDate(1),D(c);const s=new Date(c.getFullYear(),c.getMonth()+1,0).getDate(),d=new Date(c.getFullYear(),c.getMonth(),0).getDate(),E=c.getDay(),w=7-new Date(c.getFullYear(),c.getMonth()+1,0).getDay()-1;let O=[];for(let R=E;R>0;R--){const k=d-R+1,{num:M,cls:T}=U(k,c.getMonth()-1);O.push(l.jsx("div",{id:M,onMouseOver:h,onClick:I,className:`prev-date ${T}`,children:k}))}for(let R=1;R<=s;R++){const{num:k,cls:M}=U(R,c.getMonth());let T=R===new Date().getDate()&&c.getMonth()===new Date().getMonth()?"today":"day";X.includes(parseInt(k))&&(T+=" reserved"),O.push(l.jsx("div",{id:k,onMouseOver:h,onClick:I,className:`${T} ${M}`,children:R}))}for(let R=1;R<=w;R++){const{num:k,cls:M}=U(R,c.getMonth()+1);O.push(l.jsx("div",{id:k,onMouseOver:h,onClick:I,className:`next-date ${M}`,children:R}))}V(O)},ae=()=>{c.setMonth(c.getMonth()-1),H()},A=()=>{c.setMonth(c.getMonth()+1),H()},h=s=>{if(C("light"),!p.current||g.current)return;const E=parseInt(s.target.id),x=p.current;for(let w=x;w<=E;w+=864e5){const O=document.getElementById(w.toString());if(X.includes(w))return;O&&O.classList.add("light")}},Z=()=>{if(!(!p.current||!g.current))for(let s=p.current;s<=g.current;s+=864e5){const d=document.getElementById(s.toString());d&&d.classList.add("lights")}};return l.jsxs("div",{className:"calendar",children:[l.jsxs("div",{className:"month",children:[l.jsx("i",{onClick:ae,className:"prev",children:l.jsx("svg",{fill:"#000000",height:"28px",width:"28px",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 59.414 59.414",children:l.jsx("polygon",{points:"45.268,1.414 43.854,0 14.146,29.707 43.854,59.414 45.268,58 16.975,29.707 "})})}),l.jsxs("div",{className:"date",children:[l.jsx("h1",{children:m[c.getMonth()]}),l.jsx("p",{children:new Date().toDateString()})]}),l.jsx("i",{onClick:A,className:"next",children:l.jsx("svg",{fill:"#000000",height:"28px",width:"28px",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 59.414 59.414",children:l.jsx("polygon",{points:"15.561,0 14.146,1.414 42.439,29.707 14.146,58 15.561,59.414 45.268,29.707 "})})})]}),l.jsxs("div",{className:"weekdays",children:[l.jsx("div",{children:"Sun"}),l.jsx("div",{children:"Mon"}),l.jsx("div",{children:"Tue"}),l.jsx("div",{children:"Wed"}),l.jsx("div",{children:"Thu"}),l.jsx("div",{children:"Fri"}),l.jsx("div",{children:"Sat"})]}),l.jsx("div",{className:"days",children:Y.map(s=>l.jsx(_.Fragment,{children:s},s.props.id))})]})}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "reactjs-calendar-date-picker", | ||
"private": false, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"type": "module", | ||
@@ -35,3 +35,4 @@ "main": "dist/index.umd.js", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
"react-dom": "^18.2.0", | ||
"reactjs-calendar-date-picker": "^0.0.1" | ||
}, | ||
@@ -38,0 +39,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
204599
912
3
+ Addedreactjs-calendar-date-picker@0.0.1(transitive)