react-contribution-calendar
Advanced tools
Comparing version 1.2.13 to 1.3.0
import './styles/style.css'; | ||
import Je, { useRef as Er, useState as _r, useEffect as Rr } from "react"; | ||
var me = { exports: {} }, z = {}; | ||
import Je, { useRef as _r, useState as Rr, useEffect as Dr } from "react"; | ||
var Ee = { exports: {} }, z = {}; | ||
/** | ||
@@ -18,14 +18,14 @@ * @license React | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function c(s, i, g) { | ||
var d, v = {}, R = null, T = null; | ||
g !== void 0 && (R = "" + g), i.key !== void 0 && (R = "" + i.key), i.ref !== void 0 && (T = i.ref); | ||
for (d in i) | ||
a.call(i, d) && !h.hasOwnProperty(d) && (v[d] = i[d]); | ||
var t = Je, l = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function p(s, o, b) { | ||
var c, d = {}, _ = null, T = null; | ||
b !== void 0 && (_ = "" + b), o.key !== void 0 && (_ = "" + o.key), o.ref !== void 0 && (T = o.ref); | ||
for (c in o) | ||
a.call(o, c) && !v.hasOwnProperty(c) && (d[c] = o[c]); | ||
if (s && s.defaultProps) | ||
for (d in i = s.defaultProps, i) | ||
v[d] === void 0 && (v[d] = i[d]); | ||
return { $$typeof: l, type: s, key: R, ref: T, props: v, _owner: u.current }; | ||
for (c in o = s.defaultProps, o) | ||
d[c] === void 0 && (d[c] = o[c]); | ||
return { $$typeof: l, type: s, key: _, ref: T, props: d, _owner: u.current }; | ||
} | ||
return z.Fragment = o, z.jsx = c, z.jsxs = c, z; | ||
return z.Fragment = i, z.jsx = p, z.jsxs = p, z; | ||
} | ||
@@ -43,13 +43,13 @@ var q = {}; | ||
var Le; | ||
function Dr() { | ||
function Tr() { | ||
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), E = Symbol.iterator, F = "@@iterator"; | ||
function C(e) { | ||
var t = Je, l = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), h = Symbol.iterator, w = "@@iterator"; | ||
function F(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = E && e[E] || e[F]; | ||
var r = h && e[h] || e[w]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function S(e) { | ||
var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function D(e) { | ||
{ | ||
@@ -63,33 +63,33 @@ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++) | ||
{ | ||
var f = j.ReactDebugCurrentFrame, b = f.getStackAddendum(); | ||
b !== "" && (r += "%s", n = n.concat([b])); | ||
var _ = n.map(function(y) { | ||
return String(y); | ||
var f = C.ReactDebugCurrentFrame, m = f.getStackAddendum(); | ||
m !== "" && (r += "%s", n = n.concat([m])); | ||
var R = n.map(function(g) { | ||
return String(g); | ||
}); | ||
_.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _); | ||
R.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, R); | ||
} | ||
} | ||
var ie = !1, H = !1, se = !1, fe = !1, ce = !1, G; | ||
G = Symbol.for("react.module.reference"); | ||
function I(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === h || ce || e === u || e === g || e === d || fe || e === T || ie || H || se || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === v || e.$$typeof === c || e.$$typeof === s || e.$$typeof === i || // This needs to include all possible module reference object | ||
var H = !1, se = !1, G = !1, fe = !1, ce = !1, K; | ||
K = Symbol.for("react.module.reference"); | ||
function ue(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === v || ce || e === u || e === b || e === c || fe || e === T || H || se || G || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === d || e.$$typeof === p || e.$$typeof === s || e.$$typeof === o || // 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 === G || e.getModuleId !== void 0)); | ||
e.$$typeof === K || e.getModuleId !== void 0)); | ||
} | ||
function M(e, r, n) { | ||
function I(e, r, n) { | ||
var f = e.displayName; | ||
if (f) | ||
return f; | ||
var b = r.displayName || r.name || ""; | ||
return b !== "" ? n + "(" + b + ")" : n; | ||
var m = r.displayName || r.name || ""; | ||
return m !== "" ? n + "(" + m + ")" : n; | ||
} | ||
function O(e) { | ||
function P(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function A(e) { | ||
function S(e) { | ||
if (e == null) | ||
return null; | ||
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") | ||
if (typeof e.tag == "number" && D("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; | ||
@@ -101,11 +101,11 @@ if (typeof e == "string") | ||
return "Fragment"; | ||
case o: | ||
case i: | ||
return "Portal"; | ||
case h: | ||
case v: | ||
return "Profiler"; | ||
case u: | ||
return "StrictMode"; | ||
case g: | ||
case b: | ||
return "Suspense"; | ||
case d: | ||
case c: | ||
return "SuspenseList"; | ||
@@ -117,15 +117,15 @@ } | ||
var r = e; | ||
return O(r) + ".Consumer"; | ||
case c: | ||
return P(r) + ".Consumer"; | ||
case p: | ||
var n = e; | ||
return O(n._context) + ".Provider"; | ||
case i: | ||
return M(e, e.render, "ForwardRef"); | ||
case v: | ||
return P(n._context) + ".Provider"; | ||
case o: | ||
return I(e, e.render, "ForwardRef"); | ||
case d: | ||
var f = e.displayName || null; | ||
return f !== null ? f : A(e.type) || "Memo"; | ||
case R: { | ||
var b = e, _ = b._payload, y = b._init; | ||
return f !== null ? f : S(e.type) || "Memo"; | ||
case _: { | ||
var m = e, R = m._payload, g = m._init; | ||
try { | ||
return A(y(_)); | ||
return S(g(R)); | ||
} catch { | ||
@@ -138,10 +138,10 @@ return null; | ||
} | ||
var x = Object.assign, P = 0, K, X, Z, Q, Re, Se, De; | ||
var $ = Object.assign, O = 0, M, X, Z, Q, ee, De, Se; | ||
function Te() { | ||
} | ||
Te.__reactDisabledLog = !0; | ||
function Ge() { | ||
function Ke() { | ||
{ | ||
if (P === 0) { | ||
K = console.log, X = console.info, Z = console.warn, Q = console.error, Re = console.group, Se = console.groupCollapsed, De = console.groupEnd; | ||
if (O === 0) { | ||
M = console.log, X = console.info, Z = console.warn, Q = console.error, ee = console.group, De = console.groupCollapsed, Se = console.groupEnd; | ||
var e = { | ||
@@ -163,8 +163,8 @@ configurable: !0, | ||
} | ||
P++; | ||
O++; | ||
} | ||
} | ||
function Ke() { | ||
function Xe() { | ||
{ | ||
if (P--, P === 0) { | ||
if (O--, O === 0) { | ||
var e = { | ||
@@ -176,52 +176,52 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: x({}, e, { | ||
value: K | ||
log: $({}, e, { | ||
value: M | ||
}), | ||
info: x({}, e, { | ||
info: $({}, e, { | ||
value: X | ||
}), | ||
warn: x({}, e, { | ||
warn: $({}, e, { | ||
value: Z | ||
}), | ||
error: x({}, e, { | ||
error: $({}, e, { | ||
value: Q | ||
}), | ||
group: x({}, e, { | ||
value: Re | ||
group: $({}, e, { | ||
value: ee | ||
}), | ||
groupCollapsed: x({}, e, { | ||
groupCollapsed: $({}, e, { | ||
value: De | ||
}), | ||
groupEnd: $({}, e, { | ||
value: Se | ||
}), | ||
groupEnd: x({}, e, { | ||
value: De | ||
}) | ||
}); | ||
} | ||
P < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
O < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var ue = j.ReactCurrentDispatcher, de; | ||
function ee(e, r, n) { | ||
var de = C.ReactCurrentDispatcher, ve; | ||
function re(e, r, n) { | ||
{ | ||
if (de === void 0) | ||
if (ve === void 0) | ||
try { | ||
throw Error(); | ||
} catch (b) { | ||
var f = b.stack.trim().match(/\n( *(at )?)/); | ||
de = f && f[1] || ""; | ||
} catch (m) { | ||
var f = m.stack.trim().match(/\n( *(at )?)/); | ||
ve = f && f[1] || ""; | ||
} | ||
return ` | ||
` + de + e; | ||
` + ve + e; | ||
} | ||
} | ||
var ve = !1, re; | ||
var pe = !1, te; | ||
{ | ||
var Xe = typeof WeakMap == "function" ? WeakMap : Map; | ||
re = new Xe(); | ||
var Ze = typeof WeakMap == "function" ? WeakMap : Map; | ||
te = new Ze(); | ||
} | ||
function we(e, r) { | ||
if (!e || ve) | ||
if (!e || pe) | ||
return ""; | ||
{ | ||
var n = re.get(e); | ||
var n = te.get(e); | ||
if (n !== void 0) | ||
@@ -231,13 +231,13 @@ return n; | ||
var f; | ||
ve = !0; | ||
var b = Error.prepareStackTrace; | ||
pe = !0; | ||
var m = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var _; | ||
_ = ue.current, ue.current = null, Ge(); | ||
var R; | ||
R = de.current, de.current = null, Ke(); | ||
try { | ||
if (r) { | ||
var y = function() { | ||
var g = function() { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(y.prototype, "props", { | ||
if (Object.defineProperty(g.prototype, "props", { | ||
set: function() { | ||
@@ -248,14 +248,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(y, []); | ||
Reflect.construct(g, []); | ||
} catch (N) { | ||
f = N; | ||
} | ||
Reflect.construct(e, [], y); | ||
Reflect.construct(e, [], g); | ||
} else { | ||
try { | ||
y.call(); | ||
g.call(); | ||
} catch (N) { | ||
f = N; | ||
} | ||
e.call(y.prototype); | ||
e.call(g.prototype); | ||
} | ||
@@ -272,16 +272,16 @@ } else { | ||
if (N && f && typeof N.stack == "string") { | ||
for (var p = N.stack.split(` | ||
for (var y = N.stack.split(` | ||
`), k = f.stack.split(` | ||
`), D = p.length - 1, w = k.length - 1; D >= 1 && w >= 0 && p[D] !== k[w]; ) | ||
w--; | ||
for (; D >= 1 && w >= 0; D--, w--) | ||
if (p[D] !== k[w]) { | ||
if (D !== 1 || w !== 1) | ||
`), x = y.length - 1, j = k.length - 1; x >= 1 && j >= 0 && y[x] !== k[j]; ) | ||
j--; | ||
for (; x >= 1 && j >= 0; x--, j--) | ||
if (y[x] !== k[j]) { | ||
if (x !== 1 || j !== 1) | ||
do | ||
if (D--, w--, w < 0 || p[D] !== k[w]) { | ||
var $ = ` | ||
` + p[D].replace(" at new ", " at "); | ||
return e.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, $), $; | ||
if (x--, j--, j < 0 || y[x] !== k[j]) { | ||
var A = ` | ||
` + y[x].replace(" at new ", " at "); | ||
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, A), A; | ||
} | ||
while (D >= 1 && w >= 0); | ||
while (x >= 1 && j >= 0); | ||
break; | ||
@@ -291,37 +291,37 @@ } | ||
} finally { | ||
ve = !1, ue.current = _, Ke(), Error.prepareStackTrace = b; | ||
pe = !1, de.current = R, Xe(), Error.prepareStackTrace = m; | ||
} | ||
var W = e ? e.displayName || e.name : "", Ye = W ? ee(W) : ""; | ||
return typeof e == "function" && re.set(e, Ye), Ye; | ||
var W = e ? e.displayName || e.name : "", Ye = W ? re(W) : ""; | ||
return typeof e == "function" && te.set(e, Ye), Ye; | ||
} | ||
function Ze(e, r, n) { | ||
function Qe(e, r, n) { | ||
return we(e, !1); | ||
} | ||
function Qe(e) { | ||
function er(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
} | ||
function te(e, r, n) { | ||
function ne(e, r, n) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return we(e, Qe(e)); | ||
return we(e, er(e)); | ||
if (typeof e == "string") | ||
return ee(e); | ||
return re(e); | ||
switch (e) { | ||
case g: | ||
return ee("Suspense"); | ||
case d: | ||
return ee("SuspenseList"); | ||
case b: | ||
return re("Suspense"); | ||
case c: | ||
return re("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case i: | ||
return Ze(e.render); | ||
case v: | ||
return te(e.type, r, n); | ||
case R: { | ||
var f = e, b = f._payload, _ = f._init; | ||
case o: | ||
return Qe(e.render); | ||
case d: | ||
return ne(e.type, r, n); | ||
case _: { | ||
var f = e, m = f._payload, R = f._init; | ||
try { | ||
return te(_(b), r, n); | ||
return ne(R(m), r, n); | ||
} catch { | ||
@@ -333,6 +333,6 @@ } | ||
} | ||
var ne = Object.prototype.hasOwnProperty, Fe = {}, je = j.ReactDebugCurrentFrame; | ||
function le(e) { | ||
var le = Object.prototype.hasOwnProperty, xe = {}, je = C.ReactDebugCurrentFrame; | ||
function ae(e) { | ||
if (e) { | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null); | ||
je.setExtraStackFrame(n); | ||
@@ -342,26 +342,26 @@ } else | ||
} | ||
function er(e, r, n, f, b) { | ||
function rr(e, r, n, f, m) { | ||
{ | ||
var _ = Function.call.bind(ne); | ||
for (var y in e) | ||
if (_(e, y)) { | ||
var p = void 0; | ||
var R = Function.call.bind(le); | ||
for (var g in e) | ||
if (R(e, g)) { | ||
var y = void 0; | ||
try { | ||
if (typeof e[y] != "function") { | ||
var k = Error((f || "React class") + ": " + n + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
if (typeof e[g] != "function") { | ||
var k = Error((f || "React class") + ": " + n + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw k.name = "Invariant Violation", k; | ||
} | ||
p = e[y](r, y, f, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (D) { | ||
p = D; | ||
y = e[g](r, g, f, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (x) { | ||
y = x; | ||
} | ||
p && !(p instanceof Error) && (le(b), 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).", f || "React class", n, y, typeof p), le(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, le(b), S("Failed %s type: %s", n, p.message), le(null)); | ||
y && !(y instanceof Error) && (ae(m), D("%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).", f || "React class", n, g, typeof y), ae(null)), y instanceof Error && !(y.message in xe) && (xe[y.message] = !0, ae(m), D("Failed %s type: %s", n, y.message), ae(null)); | ||
} | ||
} | ||
} | ||
var rr = Array.isArray; | ||
function pe(e) { | ||
return rr(e); | ||
var tr = Array.isArray; | ||
function ye(e) { | ||
return tr(e); | ||
} | ||
function tr(e) { | ||
function nr(e) { | ||
{ | ||
@@ -372,5 +372,5 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
} | ||
function nr(e) { | ||
function lr(e) { | ||
try { | ||
return xe(e), !1; | ||
return Fe(e), !1; | ||
} catch { | ||
@@ -380,10 +380,10 @@ return !0; | ||
} | ||
function xe(e) { | ||
function Fe(e) { | ||
return "" + e; | ||
} | ||
function Ce(e) { | ||
if (nr(e)) | ||
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), xe(e); | ||
if (lr(e)) | ||
return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Fe(e); | ||
} | ||
var U = j.ReactCurrentOwner, lr = { | ||
var U = C.ReactCurrentOwner, ar = { | ||
key: !0, | ||
@@ -393,6 +393,6 @@ ref: !0, | ||
__source: !0 | ||
}, Oe, ke, ye; | ||
ye = {}; | ||
function ar(e) { | ||
if (ne.call(e, "ref")) { | ||
}, Oe, ke, he; | ||
he = {}; | ||
function or(e) { | ||
if (le.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -404,4 +404,4 @@ if (r && r.isReactWarning) | ||
} | ||
function or(e) { | ||
if (ne.call(e, "key")) { | ||
function ir(e) { | ||
if (le.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -413,12 +413,12 @@ if (r && r.isReactWarning) | ||
} | ||
function ir(e, r) { | ||
function sr(e, r) { | ||
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) { | ||
var n = A(U.current.type); | ||
ye[n] || (S('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', A(U.current.type), e.ref), ye[n] = !0); | ||
var n = S(U.current.type); | ||
he[n] || (D('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', S(U.current.type), e.ref), he[n] = !0); | ||
} | ||
} | ||
function sr(e, r) { | ||
function fr(e, r) { | ||
{ | ||
var n = function() { | ||
Oe || (Oe = !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)); | ||
Oe || (Oe = !0, D("%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)); | ||
}; | ||
@@ -431,6 +431,6 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
} | ||
function fr(e, r) { | ||
function cr(e, r) { | ||
{ | ||
var n = function() { | ||
ke || (ke = !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)); | ||
ke || (ke = !0, D("%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)); | ||
}; | ||
@@ -443,4 +443,4 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var cr = function(e, r, n, f, b, _, y) { | ||
var p = { | ||
var ur = function(e, r, n, f, m, R, g) { | ||
var y = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
@@ -452,7 +452,7 @@ $$typeof: l, | ||
ref: n, | ||
props: y, | ||
props: g, | ||
// Record the component responsible for creating this element. | ||
_owner: _ | ||
_owner: R | ||
}; | ||
return p._store = {}, Object.defineProperty(p._store, "validated", { | ||
return y._store = {}, Object.defineProperty(y._store, "validated", { | ||
configurable: !1, | ||
@@ -462,3 +462,3 @@ enumerable: !1, | ||
value: !1 | ||
}), Object.defineProperty(p, "_self", { | ||
}), Object.defineProperty(y, "_self", { | ||
configurable: !1, | ||
@@ -468,31 +468,31 @@ enumerable: !1, | ||
value: f | ||
}), Object.defineProperty(p, "_source", { | ||
}), Object.defineProperty(y, "_source", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: b | ||
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p; | ||
value: m | ||
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y; | ||
}; | ||
function ur(e, r, n, f, b) { | ||
function dr(e, r, n, f, m) { | ||
{ | ||
var _, y = {}, p = null, k = null; | ||
n !== void 0 && (Ce(n), p = "" + n), or(r) && (Ce(r.key), p = "" + r.key), ar(r) && (k = r.ref, ir(r, b)); | ||
for (_ in r) | ||
ne.call(r, _) && !lr.hasOwnProperty(_) && (y[_] = r[_]); | ||
var R, g = {}, y = null, k = null; | ||
n !== void 0 && (Ce(n), y = "" + n), ir(r) && (Ce(r.key), y = "" + r.key), or(r) && (k = r.ref, sr(r, m)); | ||
for (R in r) | ||
le.call(r, R) && !ar.hasOwnProperty(R) && (g[R] = r[R]); | ||
if (e && e.defaultProps) { | ||
var D = e.defaultProps; | ||
for (_ in D) | ||
y[_] === void 0 && (y[_] = D[_]); | ||
var x = e.defaultProps; | ||
for (R in x) | ||
g[R] === void 0 && (g[R] = x[R]); | ||
} | ||
if (p || k) { | ||
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
p && sr(y, w), k && fr(y, w); | ||
if (y || k) { | ||
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
y && fr(g, j), k && cr(g, j); | ||
} | ||
return cr(e, p, k, b, f, U.current, y); | ||
return ur(e, y, k, m, f, U.current, g); | ||
} | ||
} | ||
var he = j.ReactCurrentOwner, Pe = j.ReactDebugCurrentFrame; | ||
var ge = C.ReactCurrentOwner, Pe = C.ReactDebugCurrentFrame; | ||
function Y(e) { | ||
if (e) { | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null); | ||
Pe.setExtraStackFrame(n); | ||
@@ -502,5 +502,5 @@ } else | ||
} | ||
var ge; | ||
ge = !1; | ||
function be(e) { | ||
var be; | ||
be = !1; | ||
function me(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
@@ -510,4 +510,4 @@ } | ||
{ | ||
if (he.current) { | ||
var e = A(he.current.type); | ||
if (ge.current) { | ||
var e = S(ge.current.type); | ||
if (e) | ||
@@ -521,3 +521,3 @@ return ` | ||
} | ||
function dr(e) { | ||
function vr(e) { | ||
{ | ||
@@ -534,3 +534,3 @@ if (e !== void 0) { | ||
var $e = {}; | ||
function vr(e) { | ||
function pr(e) { | ||
{ | ||
@@ -552,3 +552,3 @@ var r = Ae(); | ||
e._store.validated = !0; | ||
var n = vr(r); | ||
var n = pr(r); | ||
if ($e[n]) | ||
@@ -558,3 +558,3 @@ return; | ||
var f = ""; | ||
e && e._owner && e._owner !== he.current && (f = " It was passed a child from " + A(e._owner.type) + "."), Y(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.', n, f), Y(null); | ||
e && e._owner && e._owner !== ge.current && (f = " It was passed a child from " + S(e._owner.type) + "."), Y(e), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, f), Y(null); | ||
} | ||
@@ -566,18 +566,18 @@ } | ||
return; | ||
if (pe(e)) | ||
if (ye(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var f = e[n]; | ||
be(f) && Me(f, r); | ||
me(f) && Me(f, r); | ||
} | ||
else if (be(e)) | ||
else if (me(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var b = C(e); | ||
if (typeof b == "function" && b !== e.entries) | ||
for (var _ = b.call(e), y; !(y = _.next()).done; ) | ||
be(y.value) && Me(y.value, r); | ||
var m = F(e); | ||
if (typeof m == "function" && m !== e.entries) | ||
for (var R = m.call(e), g; !(g = R.next()).done; ) | ||
me(g.value) && Me(g.value, r); | ||
} | ||
} | ||
} | ||
function pr(e) { | ||
function yr(e) { | ||
{ | ||
@@ -590,5 +590,5 @@ var r = e.type; | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === i || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === v)) | ||
r.$$typeof === d)) | ||
n = r.propTypes; | ||
@@ -598,13 +598,13 @@ else | ||
if (n) { | ||
var f = A(r); | ||
er(n, e.props, "prop", f, e); | ||
} else if (r.PropTypes !== void 0 && !ge) { | ||
ge = !0; | ||
var b = A(r); | ||
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown"); | ||
var f = S(r); | ||
rr(n, e.props, "prop", f, e); | ||
} else if (r.PropTypes !== void 0 && !be) { | ||
be = !0; | ||
var m = S(r); | ||
D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
} | ||
function yr(e) { | ||
function hr(e) { | ||
{ | ||
@@ -614,55 +614,55 @@ for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
if (f !== "children" && f !== "key") { | ||
Y(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), Y(null); | ||
Y(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), Y(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (Y(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
e.ref !== null && (Y(e), D("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
} | ||
} | ||
function Ie(e, r, n, f, b, _) { | ||
function Ie(e, r, n, f, m, R) { | ||
{ | ||
var y = I(e); | ||
if (!y) { | ||
var p = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (p += " 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 k = dr(b); | ||
k ? p += k : p += Ae(); | ||
var D; | ||
e === null ? D = "null" : pe(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (A(e.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : D = 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", D, p); | ||
var g = ue(e); | ||
if (!g) { | ||
var y = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (y += " 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 k = vr(m); | ||
k ? y += k : y += Ae(); | ||
var x; | ||
e === null ? x = "null" : ye(e) ? x = "array" : e !== void 0 && e.$$typeof === l ? (x = "<" + (S(e.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, y); | ||
} | ||
var w = ur(e, r, n, b, _); | ||
if (w == null) | ||
return w; | ||
if (y) { | ||
var $ = r.children; | ||
if ($ !== void 0) | ||
var j = dr(e, r, n, m, R); | ||
if (j == null) | ||
return j; | ||
if (g) { | ||
var A = r.children; | ||
if (A !== void 0) | ||
if (f) | ||
if (pe($)) { | ||
for (var W = 0; W < $.length; W++) | ||
Ne($[W], e); | ||
Object.freeze && Object.freeze($); | ||
if (ye(A)) { | ||
for (var W = 0; W < A.length; W++) | ||
Ne(A[W], e); | ||
Object.freeze && Object.freeze(A); | ||
} else | ||
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."); | ||
D("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 | ||
Ne($, e); | ||
Ne(A, e); | ||
} | ||
return e === a ? yr(w) : pr(w), w; | ||
return e === a ? hr(j) : yr(j), j; | ||
} | ||
} | ||
function hr(e, r, n) { | ||
function gr(e, r, n) { | ||
return Ie(e, r, n, !0); | ||
} | ||
function gr(e, r, n) { | ||
function br(e, r, n) { | ||
return Ie(e, r, n, !1); | ||
} | ||
var br = gr, mr = hr; | ||
q.Fragment = a, q.jsx = br, q.jsxs = mr; | ||
var mr = br, Er = gr; | ||
q.Fragment = a, q.jsx = mr, q.jsxs = Er; | ||
}()), q; | ||
} | ||
process.env.NODE_ENV === "production" ? me.exports = Sr() : me.exports = Dr(); | ||
var m = me.exports; | ||
function Ee({ children: t, textColor: l, style: o, colSpan: a, hide: u, ...h }) { | ||
return /* @__PURE__ */ m.jsx("td", { className: "calendar-label", style: o, colSpan: a, ...h, children: u ? void 0 : /* @__PURE__ */ m.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
process.env.NODE_ENV === "production" ? Ee.exports = Sr() : Ee.exports = Tr(); | ||
var E = Ee.exports; | ||
function _e({ children: t, textColor: l, style: i, colSpan: a, hide: u, ...v }) { | ||
return /* @__PURE__ */ E.jsx("td", { className: "calendar-label", style: i, colSpan: a, ...v, children: u ? void 0 : /* @__PURE__ */ E.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
} | ||
const Tr = { | ||
const wr = { | ||
// light themes | ||
@@ -908,3 +908,3 @@ empty: { | ||
} | ||
}, wr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Fr = (t = /* @__PURE__ */ new Date()) => { | ||
}, xr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], jr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
@@ -918,3 +918,3 @@ Sun: "Sunday", | ||
Sat: "Saturday" | ||
}, o = { | ||
}, i = { | ||
Jan: "January", | ||
@@ -935,109 +935,109 @@ Feb: "February", | ||
year: a[3], | ||
month: o[a[1]], | ||
month: i[a[1]], | ||
day: parseInt(a[2], 10), | ||
date: l[a[0]] | ||
}; | ||
}, Br = (t) => t.reduce((l, o) => l + o, 0), jr = (t) => { | ||
const l = Fr(new Date(t)); | ||
}, Jr = (t) => t.reduce((l, i) => l + i, 0), Fr = (t) => { | ||
const l = jr(new Date(t)); | ||
return `${l.date}, ${l.month} ${l.day}, ${l.year}`; | ||
}, Be = (t, l, o) => `${t}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`, xr = (t, l, o) => `${t}-${String(l).padStart(2, "0")}-${String(o).padStart(2, "0")}`, ae = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Vr = (t) => +t.slice(8, 10), Cr = (t = V()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, _e = (t = V()) => [31, Cr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Or = (t) => new Date(t).getDay(), B = (t = V()) => new Date(t, 0, 1).getDay(), Jr = (t) => new Date(t).getDay(), V = () => (/* @__PURE__ */ new Date()).getFullYear(), Ur = (t = V(), l, o) => { | ||
const a = _e(t), u = B(t), h = []; | ||
let c = u; | ||
}, Be = (t, l, i) => `${t}-${String(l + 1).padStart(2, "0")}-${String(i).padStart(2, "0")}`, Cr = (t, l, i) => `${t}-${String(l).padStart(2, "0")}-${String(i).padStart(2, "0")}`, oe = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Ur = (t) => +t.slice(8, 10), Or = (t = V()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, Re = (t = V()) => [31, Or(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = (t) => new Date(t).getDay(), B = (t = V()) => new Date(t, 0, 1).getDay(), zr = (t) => new Date(t).getDay(), V = () => (/* @__PURE__ */ new Date()).getFullYear(), qr = (t = V(), l, i) => { | ||
const a = Re(t), u = B(t), v = []; | ||
let p = u; | ||
for (let s = 0; s < 12; s++) { | ||
const i = a[s]; | ||
let g = 0; | ||
for (let d = 0; d < i; d++) | ||
c === 0 && g++, c = (c + 1) % 7; | ||
s === 0 && u !== 0 && g++, h.push(g); | ||
const o = a[s]; | ||
let b = 0; | ||
for (let c = 0; c < o; c++) | ||
p === 0 && b++, p = (p + 1) % 7; | ||
s === 0 && u !== 0 && b++, v.push(b); | ||
} | ||
return t !== l && u !== 0 && l !== o && (h[0] -= 1), h; | ||
}, kr = (t) => { | ||
return t !== l && u !== 0 && l !== i && (v[0] -= 1), v; | ||
}, Pr = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
return t.forEach((o) => { | ||
Object.keys(o).forEach((a) => { | ||
l.set(a, o[a]); | ||
return t.forEach((i) => { | ||
Object.keys(i).forEach((a) => { | ||
l.set(a, i[a]); | ||
}); | ||
}), l; | ||
}, Ue = (t) => typeof t == "string" ? Tr[t] : t, Pr = (t, l) => { | ||
let o = 0; | ||
}, Ue = (t) => typeof t == "string" ? wr[t] : t, Ar = (t, l) => { | ||
let i = 0; | ||
for (let a = t; a <= l; ++a) | ||
o += ze(t, a === t); | ||
return new Array(7).fill(0).map(() => new Array(o).fill(0)); | ||
}, Ar = (t, l) => { | ||
let o = 0; | ||
i += ze(t, a === t); | ||
return new Array(7).fill(0).map(() => new Array(i).fill(0)); | ||
}, $r = (t, l) => { | ||
let i = 0; | ||
for (let a = t; a <= l; ++a) | ||
o += ze(t, a === t); | ||
return new Array(7).fill("").map(() => new Array(o).fill("")); | ||
i += ze(t, a === t); | ||
return new Array(7).fill("").map(() => new Array(i).fill("")); | ||
}, ze = (t, l) => { | ||
const o = B(t); | ||
return l || o === 0 ? 53 : 52; | ||
}, $r = (t, l, o) => { | ||
const a = L(t), u = L(l), h = Pr(a, u); | ||
let c = 0, s = 1; | ||
for (let i = a; i <= u; ++i) { | ||
const g = o ? B(i) : (B(i) + 6) % 7, d = _e(i); | ||
let v = 0, R = 1, T = g; | ||
for (; v < 12; ) { | ||
for (let E = 0; E < d[v]; ++E) | ||
h[T % 7][~~(T / 7) + c] = s, T++, R++, s++; | ||
R > d[v] && (R = 1, v++); | ||
const i = B(t); | ||
return l || i === 0 ? 53 : 52; | ||
}, Mr = (t, l, i) => { | ||
const a = L(t), u = L(l), v = Ar(a, u); | ||
let p = 0, s = 1; | ||
for (let o = a; o <= u; ++o) { | ||
const b = i ? B(o) : (B(o) + 6) % 7, c = Re(o); | ||
let d = 0, _ = 1, T = b; | ||
for (; d < 12; ) { | ||
for (let h = 0; h < c[d]; ++h) | ||
v[T % 7][~~(T / 7) + p] = s, T++, _++, s++; | ||
_ > c[d] && (_ = 1, d++); | ||
} | ||
c += ~~(T / 7); | ||
p += ~~(T / 7); | ||
} | ||
return h; | ||
}, qe = (t, l, o) => { | ||
const a = L(t), u = L(l), h = Ar(a, u); | ||
let c = 0; | ||
return v; | ||
}, qe = (t, l, i) => { | ||
const a = L(t), u = L(l), v = $r(a, u); | ||
let p = 0; | ||
for (let s = a; s <= u; ++s) { | ||
const i = o ? B(s) : (B(s) + 6) % 7, g = _e(s); | ||
let d = 0, v = 1, R = i; | ||
for (; d < 12; ) { | ||
for (let T = 0; T < g[d]; ++T) { | ||
const E = xr(s, d + 1, v); | ||
h[R % 7][~~(R / 7) + c] = E, R++, v++; | ||
const o = i ? B(s) : (B(s) + 6) % 7, b = Re(s); | ||
let c = 0, d = 1, _ = o; | ||
for (; c < 12; ) { | ||
for (let T = 0; T < b[c]; ++T) { | ||
const h = Cr(s, c + 1, d); | ||
v[_ % 7][~~(_ / 7) + p] = h, _++, d++; | ||
} | ||
v > g[d] && (v = 1, d++); | ||
d > b[c] && (d = 1, c++); | ||
} | ||
c += ~~(R / 7); | ||
p += ~~(_ / 7); | ||
} | ||
return h; | ||
}, oe = (t, l, o) => { | ||
const a = `${t}-01-01`, u = Mr(a, l), h = $r(a, l, o); | ||
for (let c = 0; c < h.length; ++c) | ||
for (let s = 0; s < h[c].length; ++s) | ||
if (u === h[c][s]) | ||
return { row: c, col: s }; | ||
return v; | ||
}, ie = (t, l, i) => { | ||
const a = `${t}-01-01`, u = Nr(a, l), v = Mr(a, l, i); | ||
for (let p = 0; p < v.length; ++p) | ||
for (let s = 0; s < v[p].length; ++s) | ||
if (u === v[p][s]) | ||
return { row: p, col: s }; | ||
return { row: 0, col: 0 }; | ||
}, Mr = (t, l) => { | ||
const o = new Date(t); | ||
return (new Date(l).getTime() - o.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, He = (t, l, o, a) => { | ||
const { row: u, col: h } = oe( | ||
}, Nr = (t, l) => { | ||
const i = new Date(t); | ||
return (new Date(l).getTime() - i.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, He = (t, l, i, a) => { | ||
const { row: u, col: v } = ie( | ||
L(t), | ||
t, | ||
a | ||
), { col: c } = oe(L(t), l, a), s = [], i = []; | ||
let g = -1, d = 0; | ||
for (let v = h; v <= c; ++v) | ||
v === h ? d = Ve(o[u][v]) - 1 : d = Ve(o[0][v]) - 1, d !== g && (s.push(wr[d]), g = d, i.push(0)), i[i.length - 1]++; | ||
return { months: s, colSpans: i }; | ||
), { col: p } = ie(L(t), l, a), s = [], o = []; | ||
let b = -1, c = 0; | ||
for (let d = v; d <= p; ++d) | ||
d === v ? c = Ve(i[u][d]) - 1 : c = Ve(i[0][d]) - 1, c !== b && (s.push(xr[c]), b = c, o.push(0)), o[o.length - 1]++; | ||
return { months: s, colSpans: o }; | ||
}; | ||
function Nr({ start: t, end: l, textColor: o, startsOnSunday: a, cy: u }) { | ||
const h = qe(t, l, a), { day: c } = ae(t), { year: s, month: i, day: g } = ae(l), d = Or(`${s}-${i}-01`), { months: v, colSpans: R } = He(t, l, h, a); | ||
return /* @__PURE__ */ m.jsx("thead", { children: /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { textColor: o, style: { fontSize: u }, colSpan: 1, children: " " }), | ||
v.map((T, E) => { | ||
let F = R[E]; | ||
R.length === 1 && R[0] === 1 ? F++ : v.length > 1 && g < 10 && d !== 0 && E === v.length - 2 ? F-- : v.length > 1 && g < 10 && d !== 0 && E === v.length - 1 && F++; | ||
const C = E === 0 && v.length > 1 && F <= 1 && c >= 21; | ||
return /* @__PURE__ */ m.jsx( | ||
Ee, | ||
function Ir({ start: t, end: l, textColor: i, startsOnSunday: a, cy: u }) { | ||
const v = qe(t, l, a), { day: p } = oe(t), { year: s, month: o, day: b } = oe(l), c = kr(`${s}-${o}-01`), { months: d, colSpans: _ } = He(t, l, v, a); | ||
return /* @__PURE__ */ E.jsx("thead", { children: /* @__PURE__ */ E.jsxs("tr", { children: [ | ||
/* @__PURE__ */ E.jsx(_e, { className: "day-of-the-week", textColor: i, style: { fontSize: u }, colSpan: 1, children: " " }), | ||
d.map((T, h) => { | ||
let w = _[h]; | ||
_.length === 1 && _[0] === 1 ? w++ : d.length > 1 && b < 10 && c !== 0 && h === d.length - 2 ? w-- : d.length > 1 && b < 10 && c !== 0 && h === d.length - 1 && w++; | ||
const F = h === 0 && d.length > 1 && w <= 1 && p >= 21; | ||
return /* @__PURE__ */ E.jsx( | ||
_e, | ||
{ | ||
textColor: o, | ||
textColor: i, | ||
style: { fontSize: u }, | ||
colSpan: F, | ||
hide: C, | ||
colSpan: w, | ||
hide: F, | ||
children: T | ||
}, | ||
E | ||
h | ||
); | ||
@@ -1047,48 +1047,51 @@ }) | ||
} | ||
function Ir({ | ||
function Yr({ | ||
cx: t, | ||
theme: l, | ||
themeProps: o, | ||
themeProps: i, | ||
dataLevel: a, | ||
style: u, | ||
dataTooltip: h, | ||
tooltipSize: c, | ||
dataTooltip: v, | ||
tooltipSize: p, | ||
...s | ||
}) { | ||
const i = Er(null), [g, d] = _r(-10), v = (E) => { | ||
if (!E) | ||
const o = _r(null), [b, c] = Rr(-10), d = (h) => { | ||
if (!h) | ||
return 0; | ||
let w = 0; | ||
return h.childNodes.forEach((F) => { | ||
F.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(F).display !== "none" && w++; | ||
}), w; | ||
}, _ = (h) => { | ||
if (!h || !h.parentNode) | ||
return -1; | ||
const w = Array.from(h.parentNode.childNodes); | ||
let F = 0; | ||
return E.childNodes.forEach((C) => { | ||
C.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(C).display !== "none" && F++; | ||
}), F; | ||
}, R = (E) => { | ||
if (!E || !E.parentNode) | ||
return -1; | ||
const F = Array.from(E.parentNode.childNodes); | ||
let C = 0; | ||
for (let j = 0; j < E.cellIndex; j++) | ||
F[j].style.display !== "none" && C++; | ||
return C; | ||
for (let C = 0; C < h.cellIndex; C++) | ||
w[C].style.display !== "none" && F++; | ||
return F; | ||
}; | ||
Rr(() => { | ||
const E = () => { | ||
var F; | ||
if (i.current) { | ||
const C = v((F = i.current) == null ? void 0 : F.parentNode), j = R(i.current); | ||
if (C) { | ||
let S = -10; | ||
j / C > 0.33 ? S = Math.max(~~(i.current.cellIndex * -9 * t) / C, -9 * t) : S = Math.max(~~i.current.cellIndex * -30 * t / C, -10), d(S); | ||
Dr(() => { | ||
const h = () => { | ||
var w; | ||
if (o.current) { | ||
const F = d((w = o.current) == null ? void 0 : w.parentNode), C = _(o.current); | ||
if (F) { | ||
let D = -10; | ||
C / F > 0.33 ? D = Math.max(~~(o.current.cellIndex * -9 * t) / F, -9 * t) : D = Math.max(~~o.current.cellIndex * -30 * t / F, -10), c(D); | ||
} | ||
} | ||
}; | ||
return i.current && i.current.addEventListener("mouseover", E), () => { | ||
i.current && i.current.removeEventListener("mouseover", E); | ||
return o.current && o.current.addEventListener("mouseover", h), () => { | ||
o.current && o.current.removeEventListener("mouseover", h); | ||
}; | ||
}, []); | ||
const T = (E) => E === "emoji_positive" || E === "emoji_negative"; | ||
return /* @__PURE__ */ m.jsx( | ||
const T = (h) => { | ||
const w = typeof h == "string" ? !1 : h.isTextTheme || !1; | ||
return h === "emoji_positive" || h === "emoji_negative" || w; | ||
}; | ||
return /* @__PURE__ */ E.jsx( | ||
"td", | ||
{ | ||
ref: i, | ||
ref: o, | ||
className: "calendar-cell top half-arrow", | ||
@@ -1098,32 +1101,36 @@ style: { | ||
outline: T(l) ? "transparent" : "1px solid rgba(27, 31, 35, 0.06)", | ||
backgroundColor: T(l) ? "transparent" : o[`level${a}`], | ||
"--tooltip-offset": `${g}px`, | ||
fontSize: c | ||
backgroundColor: T(l) ? "transparent" : i[`level${a}`], | ||
"--tooltip-offset": `${b}px`, | ||
fontSize: p | ||
}, | ||
"data-tooltip": h, | ||
"data-tooltip": v, | ||
"data-level": a, | ||
...s, | ||
children: T(l) ? o[`level${a}`] : void 0 | ||
children: T(l) ? i[`level${a}`] : void 0 | ||
} | ||
); | ||
} | ||
function Yr({ | ||
function Wr({ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: u, | ||
includeBoundary: h, | ||
cx: c, | ||
cy: s, | ||
cr: i, | ||
theme: g, | ||
end: i, | ||
daysOfTheWeek: a, | ||
textColor: u, | ||
startsOnSunday: v, | ||
includeBoundary: p, | ||
cx: s, | ||
cy: o, | ||
cr: b, | ||
theme: c, | ||
onClick: d | ||
}) { | ||
const { year: v, day: R } = ae(l), { day: T } = ae(o), { row: E, col: F } = oe(v, l, u), { row: C, col: j } = oe(v, o, u), S = qe(l, o, u), { colSpans: J } = He(l, o, S, u), ie = u ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], H = Ue(g), se = kr(t), fe = (M, O) => O == j + 1 && J[J.length - 1] === 1, ce = (M, O) => O < F || O > j, G = (M, O) => O === F && M < E || O === j && M > C, I = () => F === j || T - R <= 7; | ||
return /* @__PURE__ */ m.jsx("tbody", { children: ie.map((M, O) => /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { tabIndex: 0, textColor: a, style: { textAlign: "left", fontSize: s, lineHeight: 0 }, children: M }), | ||
S[O].map((A, x) => { | ||
if (j === 0 && x === 1) | ||
return /* @__PURE__ */ m.jsx( | ||
const { year: _, day: T } = oe(l), { day: h } = oe(i), { row: w, col: F } = ie(_, l, v), { row: C, col: D } = ie(_, i, v), J = qe(l, i, v), { colSpans: H } = He(l, i, J, v), se = v ? a : (() => { | ||
const P = [...a]; | ||
return P.push(P.shift() || ""), P; | ||
})(), G = Ue(c), fe = Pr(t), ce = (P, S) => S == D + 1 && H[H.length - 1] === 1, K = (P, S) => S < F || S > D, ue = (P, S) => S === F && P < w || S === D && P > C, I = () => F === D || h - T <= 7; | ||
return /* @__PURE__ */ E.jsx("tbody", { children: se.map((P, S) => /* @__PURE__ */ E.jsxs("tr", { children: [ | ||
/* @__PURE__ */ E.jsx(_e, { tabIndex: 0, textColor: u, style: { textAlign: "left", fontSize: o, lineHeight: 0 }, children: P }), | ||
J[S].map(($, O) => { | ||
if (D === 0 && O === 1) | ||
return /* @__PURE__ */ E.jsx( | ||
"td", | ||
@@ -1133,6 +1140,6 @@ { | ||
padding: 0, | ||
width: I() ? c : 0, | ||
height: I() ? s : 0, | ||
width: I() ? s : 0, | ||
height: I() ? o : 0, | ||
outline: "none", | ||
borderRadius: i, | ||
borderRadius: b, | ||
outlineOffset: "-1px", | ||
@@ -1142,8 +1149,8 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
x | ||
O | ||
); | ||
if (fe(O, x)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "block" } }, x); | ||
if (G(O, x)) | ||
return /* @__PURE__ */ m.jsx( | ||
if (ce(S, O)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "block" } }, O); | ||
if (ue(S, O)) | ||
return /* @__PURE__ */ E.jsx( | ||
"td", | ||
@@ -1153,6 +1160,6 @@ { | ||
padding: 0, | ||
width: I() ? c : 0, | ||
height: I() ? s : 0, | ||
outline: h ? `1px solid ${H.level0}` : "none", | ||
borderRadius: i, | ||
width: I() ? s : 0, | ||
height: I() ? o : 0, | ||
outline: p ? `1px solid ${G.level0}` : "none", | ||
borderRadius: b, | ||
outlineOffset: "-1px", | ||
@@ -1162,76 +1169,88 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
x | ||
O | ||
); | ||
if (ce(O, x)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "none" } }, x); | ||
const P = se.get(A), K = jr(A), X = (Z) => { | ||
const Q = { | ||
date: A, | ||
data: P == null ? void 0 : P.data | ||
if (K(S, O)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "none" } }, O); | ||
const M = fe.get($), X = Fr($), Z = (Q) => { | ||
const ee = { | ||
date: $, | ||
data: M == null ? void 0 : M.data | ||
}; | ||
d && d(Z, Q); | ||
d && d(Q, ee); | ||
}; | ||
return /* @__PURE__ */ m.jsx( | ||
Ir, | ||
return /* @__PURE__ */ E.jsx( | ||
Yr, | ||
{ | ||
cx: c, | ||
cx: s, | ||
tabIndex: -1, | ||
style: { width: c, height: s, borderRadius: i }, | ||
dataLevel: P !== void 0 ? P.level : 0, | ||
"data-content": JSON.stringify(P == null ? void 0 : P.data), | ||
dataTooltip: K, | ||
tooltipSize: s, | ||
theme: g, | ||
themeProps: H, | ||
onClick: X | ||
style: { width: s, height: o, borderRadius: b }, | ||
dataLevel: M !== void 0 ? M.level : 0, | ||
"data-content": JSON.stringify(M == null ? void 0 : M.data), | ||
dataTooltip: X, | ||
tooltipSize: o, | ||
theme: c, | ||
themeProps: G, | ||
onClick: Z | ||
}, | ||
x | ||
O | ||
); | ||
}) | ||
] }, M)) }); | ||
] }, `${P}-${S}`)) }); | ||
} | ||
function Wr({ textColor: t, cx: l, cy: o, theme: a }) { | ||
const u = Ue(a), h = `4px ${l + 72}px 0 0`, c = (i) => i === "emoji_positive" || i === "emoji_negative", s = (i, g) => c(i) ? { width: l, height: o, fontSize: l } : { width: l, height: o, backgroundColor: u[`level${g}`], outline: "1px solid #1b1f230f" }; | ||
return /* @__PURE__ */ m.jsx("div", { className: "description", style: { padding: h }, children: /* @__PURE__ */ m.jsxs("div", { className: "themes", children: [ | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "Less" }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 0) }, children: c(a) ? u.level0 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 1) }, children: c(a) ? u.level1 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 2) }, children: c(a) ? u.level2 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 3) }, children: c(a) ? u.level3 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 4) }, children: c(a) ? u.level4 : void 0 }), | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "More" }) | ||
const Lr = (t, l) => { | ||
const i = new Error(l); | ||
return i.name = t, i; | ||
}; | ||
var Ge = /* @__PURE__ */ ((t) => (t.Number = "Number Error", t.String = "String Error", t))(Ge || {}); | ||
function Br({ textColor: t, cx: l, cy: i, theme: a }) { | ||
const u = Ue(a), v = `4px ${l + 72}px 0 0`, p = (o) => { | ||
const b = typeof o == "string" ? !1 : o.isTextTheme || !1; | ||
return o === "emoji_positive" || o === "emoji_negative" || b; | ||
}, s = (o, b) => p(o) ? { width: l, height: i, fontSize: l } : { width: l, height: i, backgroundColor: u[`level${b}`], outline: "1px solid #1b1f230f" }; | ||
return /* @__PURE__ */ E.jsx("div", { className: "description", style: { padding: v }, children: /* @__PURE__ */ E.jsxs("div", { className: "themes", children: [ | ||
/* @__PURE__ */ E.jsx("span", { style: { color: t, fontSize: l }, children: "Less" }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 0) }, children: p(a) ? u.level0 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 1) }, children: p(a) ? u.level1 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 2) }, children: p(a) ? u.level2 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 3) }, children: p(a) ? u.level3 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 4) }, children: p(a) ? u.level4 : void 0 }), | ||
/* @__PURE__ */ E.jsx("span", { style: { color: t, fontSize: l }, children: "More" }) | ||
] }) }); | ||
} | ||
function zr({ | ||
function Hr({ | ||
data: t = [], | ||
start: l = Be(V(), 0, 1), | ||
end: o = Be(V(), 11, 31), | ||
textColor: a = "#1f2328", | ||
startsOnSunday: u = !0, | ||
includeBoundary: h = !0, | ||
cx: c = 10, | ||
cy: s = 10, | ||
cr: i = 2, | ||
theme: g = "grass", | ||
onCellClick: d = () => { | ||
}, | ||
style: v | ||
end: i = Be(V(), 11, 31), | ||
daysOfTheWeek: a = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
textColor: u = "#1f2328", | ||
startsOnSunday: v = !0, | ||
includeBoundary: p = !0, | ||
cx: s = 10, | ||
cy: o = 10, | ||
cr: b = 2, | ||
theme: c = "grass", | ||
onCellClick: d = (h, w) => console.log(w), | ||
scroll: _ = !1, | ||
style: T | ||
}) { | ||
const R = `0 ${c + 70}px 0 ${c + 10}px`; | ||
return /* @__PURE__ */ m.jsxs("div", { className: "container", style: v, children: [ | ||
/* @__PURE__ */ m.jsx("div", { className: "calendar", style: { padding: R }, children: /* @__PURE__ */ m.jsxs("table", { children: [ | ||
/* @__PURE__ */ m.jsx(Nr, { start: l, end: o, textColor: a, startsOnSunday: u, cy: s }), | ||
/* @__PURE__ */ m.jsx( | ||
Yr, | ||
const h = `0 ${s + 70}px 0 ${s + 10}px`; | ||
if (a.length !== 7) | ||
throw Lr(Ge.Number, "The length of the `daysOfTheWeek` should be exact 7."); | ||
return /* @__PURE__ */ E.jsxs("div", { className: "container", style: T, children: [ | ||
/* @__PURE__ */ E.jsx("div", { className: "calendar", style: { padding: h, overflowX: _ ? "scroll" : "clip" }, children: /* @__PURE__ */ E.jsxs("table", { children: [ | ||
/* @__PURE__ */ E.jsx(Ir, { start: l, end: i, textColor: u, startsOnSunday: v, cy: o }), | ||
/* @__PURE__ */ E.jsx( | ||
Wr, | ||
{ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: u, | ||
includeBoundary: h, | ||
cx: c, | ||
cy: s, | ||
cr: i, | ||
theme: g, | ||
end: i, | ||
daysOfTheWeek: a, | ||
textColor: u, | ||
startsOnSunday: v, | ||
includeBoundary: p, | ||
cx: s, | ||
cy: o, | ||
cr: b, | ||
theme: c, | ||
onClick: d | ||
@@ -1241,27 +1260,27 @@ } | ||
] }) }), | ||
/* @__PURE__ */ m.jsx(Wr, { textColor: a, cx: c, cy: s, theme: g }) | ||
/* @__PURE__ */ E.jsx(Br, { textColor: u, cx: s, cy: o, theme: c }) | ||
] }); | ||
} | ||
export { | ||
zr as ContributionCalendar, | ||
Hr as ContributionCalendar, | ||
Ue as createTheme, | ||
Br as getArraySum, | ||
Ur as getColumnSpansForYears, | ||
Jr as getArraySum, | ||
qr as getColumnSpansForYears, | ||
V as getCurrentYear, | ||
Fr as getDateDetails, | ||
jr as getDateDetails, | ||
Be as getDateString, | ||
jr as getDateTooltip, | ||
Fr as getDateTooltip, | ||
qe as getDayArray, | ||
Or as getDayIndexFromDateString, | ||
Jr as getDayIndexOfMonth, | ||
Mr as getDaysBetween, | ||
kr as getDayIndexFromDateString, | ||
zr as getDayIndexOfMonth, | ||
Nr as getDaysBetween, | ||
B as getFirstDayIndexOfYear, | ||
He as getMonthsAndColSpans, | ||
oe as getRowAndColumnIndexFromDate, | ||
Cr as isLeapYear, | ||
ae as parseDateFromDateString, | ||
Vr as parseDayFromDateString, | ||
kr as parseInputData, | ||
ie as getRowAndColumnIndexFromDate, | ||
Or as isLeapYear, | ||
oe as parseDateFromDateString, | ||
Ur as parseDayFromDateString, | ||
Pr as parseInputData, | ||
Ve as parseMonthFromDateString, | ||
L as parseYearFromDateString | ||
}; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.2.13 | ||
// Type definitions for react-contribution-calendar 1.3.0 | ||
// Project: https://github.com/encaffeine/react-contribution-calendar | ||
@@ -14,2 +14,12 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark> | ||
* @param {ThemeProps} themeProps - Theme color properties from level 0 to 4. | ||
* @example | ||
* ```tsx | ||
* const customTheme = createTheme({ | ||
level0: '#ebedf0', | ||
level1: '#9be9a8', | ||
level2: '#40c463', | ||
level3: '#30a14e', | ||
level4: '#216e39', | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -24,2 +34,16 @@ export const createTheme: (themeProps: ThemeProps) => ThemeProps | ||
* List of items in the data, defaults to an empty list `[]`. | ||
* @example | ||
* ```tsx | ||
* const data = [ | ||
* { | ||
* "2023-07-08": { "level": 2, "data": {} } | ||
* }, | ||
* { | ||
* "2023-07-09": { "level": 1, "data": {} } | ||
* }, | ||
* ... | ||
* ] | ||
* | ||
* <ContributionCalendar data={data} /> | ||
* ``` | ||
*/ | ||
@@ -29,3 +53,7 @@ data?: InputData[] | ||
* The starting date of calendar, defaults to 1st January of current year. | ||
* To set `start` date, `end` date should be provided as well. | ||
* `start` date must be earlier than `end` date. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar start="2023-04-04" /> | ||
* ``` | ||
*/ | ||
@@ -35,7 +63,27 @@ start?: string | ||
* The ending date of calendar, defaults to 31st December of current year. | ||
* To set `end` date, `start` date should be provided as well. | ||
* `start` date must be earlier than `end` date. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar end="2023-05-19" /> | ||
* ``` | ||
*/ | ||
end?: string | ||
/** | ||
* The days of the week, defaults to `['Sun', 'Mon', ... 'Sat']`. The day of the | ||
* week should start from Sunday regardless of the `startsOnSunday` option. | ||
* The length of the array must be exact `7`. | ||
* @example | ||
* ```tsx | ||
* const daysOfTheWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] | ||
* | ||
* <ContributionCalendar daysOfTheWeek={daysOfTheWeek} /> | ||
* ``` | ||
*/ | ||
daysOfTheWeek?: string[] | ||
/** | ||
* The text color of calendar indexes for months and dates, defaults to `#1F2328`. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar textColor="#000" /> | ||
* ``` | ||
*/ | ||
@@ -46,2 +94,6 @@ textColor?: string | ||
* If set to false, the week will start on Monday. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar startsOnSunday={true} /> | ||
* ``` | ||
*/ | ||
@@ -51,2 +103,6 @@ startsOnSunday?: boolean | ||
* Whether to include the boundary column or not, defaults to `true`. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar includeBoundary={true} /> | ||
* ``` | ||
*/ | ||
@@ -56,2 +112,6 @@ includeBoundary?: boolean | ||
* The size of width of each cell, defaults to `10`px. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar cx={10} /> | ||
* ``` | ||
*/ | ||
@@ -61,2 +121,6 @@ cx?: number | ||
* The size of height of each cell, defaults to `10`px. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar cy={10} /> | ||
* ``` | ||
*/ | ||
@@ -66,2 +130,6 @@ cy?: number | ||
* The border radius of each cell, defaults to `2`px. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar cr={2} /> | ||
* ``` | ||
*/ | ||
@@ -72,10 +140,27 @@ cr?: number | ||
* `ThemeProps` could be added directly i.e. when trying to use custom theme. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar theme="grass" /> | ||
* ``` | ||
*/ | ||
theme?: string | ThemeProps | ||
/** | ||
* Click event handler for table cells. This takes `cellData` as optional value. | ||
* Click event handler for table cells. This takes `data` as optional value | ||
* of each cell and returns callback function. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar onCellClick={(e, data) => console.log(data)} /> | ||
* ``` | ||
*/ | ||
onCellClick?: MouseEventHandler | ||
/** | ||
* Option for showing scrollbar for the calendar table, defaults to false. | ||
*/ | ||
scroll?: boolean | ||
/** | ||
* Root styles for the ContributionCalendar. | ||
* @example | ||
* ```tsx | ||
* <ContributionCalendar style={{ padding: '4px' }} /> | ||
* ``` | ||
*/ | ||
@@ -124,3 +209,3 @@ style?: CSSProperties | ||
* | ||
* @version 1.2.13 | ||
* @version 1.3.0 | ||
* @see {@link https://github.com/encaffeine/react-contribution-calendar#apis} | ||
@@ -127,0 +212,0 @@ */ |
@@ -38,2 +38,6 @@ /** | ||
/** | ||
* Option for text theme, defaults to `false`. | ||
*/ | ||
isTextTheme?: boolean | ||
/** | ||
* Level 0 color. This is the lowest level of priority. | ||
@@ -40,0 +44,0 @@ */ |
{ | ||
"name": "react-contribution-calendar", | ||
"description": "A GitHub-like contribution calendar component for React", | ||
"version": "1.2.13", | ||
"version": "1.3.0", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
@@ -33,16 +33,9 @@ # react-contribution-calendar | ||
{ | ||
'2020-04-20': { | ||
level: 2, | ||
} | ||
'2020-04-20': { level: 2 } | ||
}, | ||
{ | ||
'2023-07-08': { | ||
level: 1, | ||
}, | ||
'2023-07-08': { level: 1 }, | ||
}, | ||
{ | ||
'2023-07-09': { | ||
level: 4, | ||
data: {}, | ||
}, | ||
'2023-07-09': { level: 4, data: {} }, | ||
}, | ||
@@ -63,2 +56,3 @@ { | ||
end="2023-05-19" | ||
daysOfTheWeek={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']} | ||
textColor="#1F2328" | ||
@@ -72,2 +66,4 @@ startsOnSunday={true} | ||
onCellClick={(e, data) => console.log(data)} | ||
scroll={false} | ||
style={} | ||
/> | ||
@@ -107,2 +103,3 @@ ``` | ||
- **`end`**: Optional. The ending date for the calendar to end, defaults to current year's December 31st(`YYYY-MM-DD` format). | ||
- **`daysOfTheWeek`**: Optional. The days of the week, which will be the head column of each row. The array should start from Sunday so that you can use with `startsOnSunday` option correctly. Defaults to `['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']`. | ||
- **`textColor`**: Optional. The color of indexes. String color code format, defaults to `#1F2328`. | ||
@@ -115,2 +112,3 @@ - **`startsOnSunday`**: Optional. Whether to start the calendar on Sunday or not, defaults to `true`. If set to false, calendar will start on Monday. | ||
- **`cr`**: Optional. The pixel size of border radius of each cell, defaults to `2`. | ||
- **`scroll`**: Optional. Whether to show scrollbar or not, defaults to `false`. | ||
- **`onCellClick`**: Optional. An onClick mouse event on each table cell. | ||
@@ -205,12 +203,2 @@ | ||
```tsx | ||
emoji_positive: { | ||
level0: '🫥', | ||
level1: '😢', | ||
level2: '😞', | ||
level3: '🙂', | ||
level4: '😃', | ||
}, | ||
``` | ||
#### `emoji_negative` | ||
@@ -220,12 +208,2 @@ | ||
```tsx | ||
emoji_negative: { | ||
level0: '😃', | ||
level1: '🙂', | ||
level2: '😕', | ||
level3: '😢', | ||
level4: '🫥', | ||
}, | ||
``` | ||
<br /> | ||
@@ -340,1 +318,22 @@ | ||
``` | ||
And say if you'd like to set text theme like emoji, then you could add `isTextTheme` property as follows: | ||
```javascript | ||
import { ContributionCalendar } from 'react-contribution-calendar' | ||
function App() { | ||
return ( | ||
<ContributionCalendar | ||
theme={{ | ||
isTextTheme: true, // <--- Must be added if it's a text theme. | ||
level0: '🙂', | ||
level1: '🤔', | ||
level2: '😎', | ||
level3: 'A', | ||
level4: 'B', | ||
}} | ||
/> | ||
) | ||
} | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85997
1659
332