gradient-border
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,3 +0,3 @@ | ||
import D from "react"; | ||
var Z = { exports: {} }, W = {}; | ||
import G, { useState as ur, useLayoutEffect as sr, useEffect as lr } from "react"; | ||
var re = { exports: {} }, Y = {}; | ||
/** | ||
@@ -12,21 +12,21 @@ * @license React | ||
*/ | ||
var Te; | ||
function ur() { | ||
if (Te) | ||
return W; | ||
Te = 1; | ||
var F = D, d = Symbol.for("react.element"), s = Symbol.for("react.fragment"), C = Object.prototype.hasOwnProperty, R = F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function O(b, c, w) { | ||
var v, m = {}, p = null, E = null; | ||
w !== void 0 && (p = "" + w), c.key !== void 0 && (p = "" + c.key), c.ref !== void 0 && (E = c.ref); | ||
for (v in c) | ||
C.call(c, v) && !S.hasOwnProperty(v) && (m[v] = c[v]); | ||
if (b && b.defaultProps) | ||
for (v in c = b.defaultProps, c) | ||
m[v] === void 0 && (m[v] = c[v]); | ||
return { $$typeof: d, type: b, key: p, ref: E, props: m, _owner: R.current }; | ||
var we; | ||
function fr() { | ||
if (we) | ||
return Y; | ||
we = 1; | ||
var A = G, S = Symbol.for("react.element"), j = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, y = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function R(_, d, E) { | ||
var v, p = {}, x = null, m = null; | ||
E !== void 0 && (x = "" + E), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (m = d.ref); | ||
for (v in d) | ||
s.call(d, v) && !P.hasOwnProperty(v) && (p[v] = d[v]); | ||
if (_ && _.defaultProps) | ||
for (v in d = _.defaultProps, d) | ||
p[v] === void 0 && (p[v] = d[v]); | ||
return { $$typeof: S, type: _, key: x, ref: m, props: p, _owner: y.current }; | ||
} | ||
return W.Fragment = s, W.jsx = O, W.jsxs = O, W; | ||
return Y.Fragment = j, Y.jsx = R, Y.jsxs = R, Y; | ||
} | ||
var Y = {}; | ||
var N = {}; | ||
/** | ||
@@ -41,13 +41,13 @@ * @license React | ||
*/ | ||
var Ce; | ||
function sr() { | ||
return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() { | ||
var F = D, d = Symbol.for("react.element"), s = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), b = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), Q = Symbol.iterator, we = "@@iterator"; | ||
function Oe(e) { | ||
var Oe; | ||
function cr() { | ||
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() { | ||
var A = G, S = Symbol.for("react.element"), j = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), _ = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), L = Symbol.iterator, l = "@@iterator"; | ||
function k(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = Q && e[Q] || e[we]; | ||
var r = L && e[L] || e[l]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var P = F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
var T = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function h(e) { | ||
@@ -57,11 +57,11 @@ { | ||
t[n - 1] = arguments[n]; | ||
je("error", e, t); | ||
Se("error", e, t); | ||
} | ||
} | ||
function je(e, r, t) { | ||
function Se(e, r, t) { | ||
{ | ||
var n = P.ReactDebugCurrentFrame, i = n.getStackAddendum(); | ||
i !== "" && (r += "%s", t = t.concat([i])); | ||
var u = t.map(function(o) { | ||
return String(o); | ||
var n = T.ReactDebugCurrentFrame, o = n.getStackAddendum(); | ||
o !== "" && (r += "%s", t = t.concat([o])); | ||
var u = t.map(function(i) { | ||
return String(i); | ||
}); | ||
@@ -71,10 +71,10 @@ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u); | ||
} | ||
var Se = !1, Pe = !1, $e = !1, ke = !1, De = !1, ee; | ||
ee = Symbol.for("react.module.reference"); | ||
var je = !1, $e = !1, Pe = !1, ke = !1, De = !1, te; | ||
te = Symbol.for("react.module.reference"); | ||
function Fe(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === C || e === S || De || e === R || e === w || e === v || ke || e === E || Se || Pe || $e || typeof e == "object" && e !== null && (e.$$typeof === p || e.$$typeof === m || e.$$typeof === O || e.$$typeof === b || e.$$typeof === c || // This needs to include all possible module reference object | ||
return !!(typeof e == "string" || typeof e == "function" || e === s || e === P || De || e === y || e === E || e === v || ke || e === m || je || $e || Pe || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === p || e.$$typeof === R || e.$$typeof === _ || e.$$typeof === d || // 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 === ee || e.getModuleId !== void 0)); | ||
e.$$typeof === te || e.getModuleId !== void 0)); | ||
} | ||
@@ -85,9 +85,9 @@ function Ae(e, r, t) { | ||
return n; | ||
var i = r.displayName || r.name || ""; | ||
return i !== "" ? t + "(" + i + ")" : t; | ||
var o = r.displayName || r.name || ""; | ||
return o !== "" ? t + "(" + o + ")" : t; | ||
} | ||
function re(e) { | ||
function ne(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function _(e) { | ||
function C(e) { | ||
if (e == null) | ||
@@ -100,11 +100,11 @@ return null; | ||
switch (e) { | ||
case C: | ||
case s: | ||
return "Fragment"; | ||
case s: | ||
case j: | ||
return "Portal"; | ||
case S: | ||
case P: | ||
return "Profiler"; | ||
case R: | ||
case y: | ||
return "StrictMode"; | ||
case w: | ||
case E: | ||
return "Suspense"; | ||
@@ -116,17 +116,17 @@ case v: | ||
switch (e.$$typeof) { | ||
case b: | ||
case _: | ||
var r = e; | ||
return re(r) + ".Consumer"; | ||
case O: | ||
return ne(r) + ".Consumer"; | ||
case R: | ||
var t = e; | ||
return re(t._context) + ".Provider"; | ||
case c: | ||
return ne(t._context) + ".Provider"; | ||
case d: | ||
return Ae(e, e.render, "ForwardRef"); | ||
case m: | ||
case p: | ||
var n = e.displayName || null; | ||
return n !== null ? n : _(e.type) || "Memo"; | ||
case p: { | ||
var i = e, u = i._payload, o = i._init; | ||
return n !== null ? n : C(e.type) || "Memo"; | ||
case x: { | ||
var o = e, u = o._payload, i = o._init; | ||
try { | ||
return _(o(u)); | ||
return C(i(u)); | ||
} catch { | ||
@@ -139,14 +139,14 @@ return null; | ||
} | ||
var j = Object.assign, A = 0, te, ne, ae, oe, ie, ue, se; | ||
function le() { | ||
var $ = Object.assign, I = 0, ae, ie, oe, ue, se, le, fe; | ||
function ce() { | ||
} | ||
le.__reactDisabledLog = !0; | ||
ce.__reactDisabledLog = !0; | ||
function Ie() { | ||
{ | ||
if (A === 0) { | ||
te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, se = console.groupEnd; | ||
if (I === 0) { | ||
ae = console.log, ie = console.info, oe = console.warn, ue = console.error, se = console.group, le = console.groupCollapsed, fe = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: le, | ||
value: ce, | ||
writable: !0 | ||
@@ -164,3 +164,3 @@ }; | ||
} | ||
A++; | ||
I++; | ||
} | ||
@@ -170,3 +170,3 @@ } | ||
{ | ||
if (A--, A === 0) { | ||
if (I--, I === 0) { | ||
var e = { | ||
@@ -178,52 +178,52 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: j({}, e, { | ||
value: te | ||
log: $({}, e, { | ||
value: ae | ||
}), | ||
info: j({}, e, { | ||
value: ne | ||
info: $({}, e, { | ||
value: ie | ||
}), | ||
warn: j({}, e, { | ||
value: ae | ||
}), | ||
error: j({}, e, { | ||
warn: $({}, e, { | ||
value: oe | ||
}), | ||
group: j({}, e, { | ||
value: ie | ||
}), | ||
groupCollapsed: j({}, e, { | ||
error: $({}, e, { | ||
value: ue | ||
}), | ||
groupEnd: j({}, e, { | ||
group: $({}, e, { | ||
value: se | ||
}), | ||
groupCollapsed: $({}, e, { | ||
value: le | ||
}), | ||
groupEnd: $({}, e, { | ||
value: fe | ||
}) | ||
}); | ||
} | ||
A < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
I < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var U = P.ReactCurrentDispatcher, G; | ||
function L(e, r, t) { | ||
var J = T.ReactCurrentDispatcher, z; | ||
function M(e, r, t) { | ||
{ | ||
if (G === void 0) | ||
if (z === void 0) | ||
try { | ||
throw Error(); | ||
} catch (i) { | ||
var n = i.stack.trim().match(/\n( *(at )?)/); | ||
G = n && n[1] || ""; | ||
} catch (o) { | ||
var n = o.stack.trim().match(/\n( *(at )?)/); | ||
z = n && n[1] || ""; | ||
} | ||
return ` | ||
` + G + e; | ||
` + z + e; | ||
} | ||
} | ||
var q = !1, N; | ||
var H = !1, V; | ||
{ | ||
var Ye = typeof WeakMap == "function" ? WeakMap : Map; | ||
N = new Ye(); | ||
V = new Ye(); | ||
} | ||
function fe(e, r) { | ||
if (!e || q) | ||
function de(e, r) { | ||
if (!e || H) | ||
return ""; | ||
{ | ||
var t = N.get(e); | ||
var t = V.get(e); | ||
if (t !== void 0) | ||
@@ -233,13 +233,13 @@ return t; | ||
var n; | ||
q = !0; | ||
var i = Error.prepareStackTrace; | ||
H = !0; | ||
var o = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var u; | ||
u = U.current, U.current = null, Ie(); | ||
u = J.current, J.current = null, Ie(); | ||
try { | ||
if (r) { | ||
var o = function() { | ||
var i = function() { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(o.prototype, "props", { | ||
if (Object.defineProperty(i.prototype, "props", { | ||
set: function() { | ||
@@ -250,14 +250,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(o, []); | ||
} catch (x) { | ||
n = x; | ||
Reflect.construct(i, []); | ||
} catch (w) { | ||
n = w; | ||
} | ||
Reflect.construct(e, [], o); | ||
Reflect.construct(e, [], i); | ||
} else { | ||
try { | ||
o.call(); | ||
} catch (x) { | ||
n = x; | ||
i.call(); | ||
} catch (w) { | ||
n = w; | ||
} | ||
e.call(o.prototype); | ||
e.call(i.prototype); | ||
} | ||
@@ -267,23 +267,23 @@ } else { | ||
throw Error(); | ||
} catch (x) { | ||
n = x; | ||
} catch (w) { | ||
n = w; | ||
} | ||
e(); | ||
} | ||
} catch (x) { | ||
if (x && n && typeof x.stack == "string") { | ||
for (var a = x.stack.split(` | ||
} catch (w) { | ||
if (w && n && typeof w.stack == "string") { | ||
for (var a = w.stack.split(` | ||
`), g = n.stack.split(` | ||
`), l = a.length - 1, f = g.length - 1; l >= 1 && f >= 0 && a[l] !== g[f]; ) | ||
f--; | ||
for (; l >= 1 && f >= 0; l--, f--) | ||
if (a[l] !== g[f]) { | ||
if (l !== 1 || f !== 1) | ||
`), f = a.length - 1, c = g.length - 1; f >= 1 && c >= 0 && a[f] !== g[c]; ) | ||
c--; | ||
for (; f >= 1 && c >= 0; f--, c--) | ||
if (a[f] !== g[c]) { | ||
if (f !== 1 || c !== 1) | ||
do | ||
if (l--, f--, f < 0 || a[l] !== g[f]) { | ||
var y = ` | ||
` + a[l].replace(" at new ", " at "); | ||
return e.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, y), y; | ||
if (f--, c--, c < 0 || a[f] !== g[c]) { | ||
var b = ` | ||
` + a[f].replace(" at new ", " at "); | ||
return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, b), b; | ||
} | ||
while (l >= 1 && f >= 0); | ||
while (f >= 1 && c >= 0); | ||
break; | ||
@@ -293,11 +293,11 @@ } | ||
} finally { | ||
q = !1, U.current = u, We(), Error.prepareStackTrace = i; | ||
H = !1, J.current = u, We(), Error.prepareStackTrace = o; | ||
} | ||
var k = e ? e.displayName || e.name : "", xe = k ? L(k) : ""; | ||
return typeof e == "function" && N.set(e, xe), xe; | ||
var F = e ? e.displayName || e.name : "", Ce = F ? M(F) : ""; | ||
return typeof e == "function" && V.set(e, Ce), Ce; | ||
} | ||
function Le(e, r, t) { | ||
return fe(e, !1); | ||
function Ne(e, r, t) { | ||
return de(e, !1); | ||
} | ||
function Ne(e) { | ||
function Le(e) { | ||
var r = e.prototype; | ||
@@ -310,21 +310,21 @@ return !!(r && r.isReactComponent); | ||
if (typeof e == "function") | ||
return fe(e, Ne(e)); | ||
return de(e, Le(e)); | ||
if (typeof e == "string") | ||
return L(e); | ||
return M(e); | ||
switch (e) { | ||
case w: | ||
return L("Suspense"); | ||
case E: | ||
return M("Suspense"); | ||
case v: | ||
return L("SuspenseList"); | ||
return M("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case c: | ||
return Le(e.render); | ||
case m: | ||
case d: | ||
return Ne(e.render); | ||
case p: | ||
return B(e.type, r, t); | ||
case p: { | ||
var n = e, i = n._payload, u = n._init; | ||
case x: { | ||
var n = e, o = n._payload, u = n._init; | ||
try { | ||
return B(u(i), r, t); | ||
return B(u(o), r, t); | ||
} catch { | ||
@@ -336,34 +336,34 @@ } | ||
} | ||
var M = Object.prototype.hasOwnProperty, ce = {}, de = P.ReactDebugCurrentFrame; | ||
function V(e) { | ||
var U = Object.prototype.hasOwnProperty, ve = {}, pe = T.ReactDebugCurrentFrame; | ||
function q(e) { | ||
if (e) { | ||
var r = e._owner, t = B(e.type, e._source, r ? r.type : null); | ||
de.setExtraStackFrame(t); | ||
pe.setExtraStackFrame(t); | ||
} else | ||
de.setExtraStackFrame(null); | ||
pe.setExtraStackFrame(null); | ||
} | ||
function Be(e, r, t, n, i) { | ||
function Me(e, r, t, n, o) { | ||
{ | ||
var u = Function.call.bind(M); | ||
for (var o in e) | ||
if (u(e, o)) { | ||
var u = Function.call.bind(U); | ||
for (var i in e) | ||
if (u(e, i)) { | ||
var a = void 0; | ||
try { | ||
if (typeof e[o] != "function") { | ||
var g = 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`."); | ||
if (typeof e[i] != "function") { | ||
var g = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw g.name = "Invariant Violation", g; | ||
} | ||
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (l) { | ||
a = l; | ||
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (f) { | ||
a = f; | ||
} | ||
a && !(a instanceof Error) && (V(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), V(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, V(i), h("Failed %s type: %s", t, a.message), V(null)); | ||
a && !(a instanceof Error) && (q(o), 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, i, typeof a), q(null)), a instanceof Error && !(a.message in ve) && (ve[a.message] = !0, q(o), h("Failed %s type: %s", t, a.message), q(null)); | ||
} | ||
} | ||
} | ||
var Me = Array.isArray; | ||
function J(e) { | ||
return Me(e); | ||
var Ve = Array.isArray; | ||
function K(e) { | ||
return Ve(e); | ||
} | ||
function Ve(e) { | ||
function Be(e) { | ||
{ | ||
@@ -376,3 +376,3 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
try { | ||
return ve(e), !1; | ||
return he(e), !1; | ||
} catch { | ||
@@ -382,10 +382,10 @@ return !0; | ||
} | ||
function ve(e) { | ||
function he(e) { | ||
return "" + e; | ||
} | ||
function pe(e) { | ||
function ge(e) { | ||
if (Ue(e)) | ||
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(e)), ve(e); | ||
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), he(e); | ||
} | ||
var I = P.ReactCurrentOwner, Ge = { | ||
var W = T.ReactCurrentOwner, qe = { | ||
key: !0, | ||
@@ -395,6 +395,6 @@ ref: !0, | ||
__source: !0 | ||
}, he, ge, z; | ||
z = {}; | ||
function qe(e) { | ||
if (M.call(e, "ref")) { | ||
}, ye, me, X; | ||
X = {}; | ||
function Ge(e) { | ||
if (U.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -407,3 +407,3 @@ if (r && r.isReactWarning) | ||
function Je(e) { | ||
if (M.call(e, "key")) { | ||
if (U.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -416,5 +416,5 @@ if (r && r.isReactWarning) | ||
function ze(e, r) { | ||
if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) { | ||
var t = _(I.current.type); | ||
z[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', _(I.current.type), e.ref), z[t] = !0); | ||
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) { | ||
var t = C(W.current.type); | ||
X[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', C(W.current.type), e.ref), X[t] = !0); | ||
} | ||
@@ -425,3 +425,3 @@ } | ||
var t = function() { | ||
he || (he = !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)); | ||
ye || (ye = !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)); | ||
}; | ||
@@ -437,3 +437,3 @@ t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
var t = function() { | ||
ge || (ge = !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)); | ||
me || (me = !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)); | ||
}; | ||
@@ -446,6 +446,6 @@ t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var Xe = function(e, r, t, n, i, u, o) { | ||
var Xe = function(e, r, t, n, o, u, i) { | ||
var a = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: d, | ||
$$typeof: S, | ||
// Built-in properties that belong on the element | ||
@@ -455,3 +455,3 @@ type: e, | ||
ref: t, | ||
props: o, | ||
props: i, | ||
// Record the component responsible for creating this element. | ||
@@ -474,40 +474,40 @@ _owner: u | ||
writable: !1, | ||
value: i | ||
value: o | ||
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a; | ||
}; | ||
function Ze(e, r, t, n, i) { | ||
function Ze(e, r, t, n, o) { | ||
{ | ||
var u, o = {}, a = null, g = null; | ||
t !== void 0 && (pe(t), a = "" + t), Je(r) && (pe(r.key), a = "" + r.key), qe(r) && (g = r.ref, ze(r, i)); | ||
var u, i = {}, a = null, g = null; | ||
t !== void 0 && (ge(t), a = "" + t), Je(r) && (ge(r.key), a = "" + r.key), Ge(r) && (g = r.ref, ze(r, o)); | ||
for (u in r) | ||
M.call(r, u) && !Ge.hasOwnProperty(u) && (o[u] = r[u]); | ||
U.call(r, u) && !qe.hasOwnProperty(u) && (i[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) | ||
i[u] === void 0 && (i[u] = f[u]); | ||
} | ||
if (a || g) { | ||
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
a && He(o, f), g && Ke(o, f); | ||
var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
a && He(i, c), g && Ke(i, c); | ||
} | ||
return Xe(e, a, g, i, n, I.current, o); | ||
return Xe(e, a, g, o, n, W.current, i); | ||
} | ||
} | ||
var H = P.ReactCurrentOwner, ye = P.ReactDebugCurrentFrame; | ||
function $(e) { | ||
var Z = T.ReactCurrentOwner, be = T.ReactDebugCurrentFrame; | ||
function D(e) { | ||
if (e) { | ||
var r = e._owner, t = B(e.type, e._source, r ? r.type : null); | ||
ye.setExtraStackFrame(t); | ||
be.setExtraStackFrame(t); | ||
} else | ||
ye.setExtraStackFrame(null); | ||
be.setExtraStackFrame(null); | ||
} | ||
var K; | ||
K = !1; | ||
function X(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === d; | ||
var Q; | ||
Q = !1; | ||
function ee(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === S; | ||
} | ||
function be() { | ||
function Ee() { | ||
{ | ||
if (H.current) { | ||
var e = _(H.current.type); | ||
if (Z.current) { | ||
var e = C(Z.current.type); | ||
if (e) | ||
@@ -532,6 +532,6 @@ return ` | ||
} | ||
var me = {}; | ||
var Re = {}; | ||
function er(e) { | ||
{ | ||
var r = be(); | ||
var r = Ee(); | ||
if (!r) { | ||
@@ -546,3 +546,3 @@ var t = typeof e == "string" ? e : e.displayName || e.name; | ||
} | ||
function Re(e, r) { | ||
function _e(e, r) { | ||
{ | ||
@@ -553,25 +553,25 @@ if (!e._store || e._store.validated || e.key != null) | ||
var t = er(r); | ||
if (me[t]) | ||
if (Re[t]) | ||
return; | ||
me[t] = !0; | ||
Re[t] = !0; | ||
var n = ""; | ||
e && e._owner && e._owner !== H.current && (n = " It was passed a child from " + _(e._owner.type) + "."), $(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), $(null); | ||
e && e._owner && e._owner !== Z.current && (n = " It was passed a child from " + C(e._owner.type) + "."), D(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), D(null); | ||
} | ||
} | ||
function Ee(e, r) { | ||
function xe(e, r) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (J(e)) | ||
if (K(e)) | ||
for (var t = 0; t < e.length; t++) { | ||
var n = e[t]; | ||
X(n) && Re(n, r); | ||
ee(n) && _e(n, r); | ||
} | ||
else if (X(e)) | ||
else if (ee(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var i = Oe(e); | ||
if (typeof i == "function" && i !== e.entries) | ||
for (var u = i.call(e), o; !(o = u.next()).done; ) | ||
X(o.value) && Re(o.value, r); | ||
var o = k(e); | ||
if (typeof o == "function" && o !== e.entries) | ||
for (var u = o.call(e), i; !(i = u.next()).done; ) | ||
ee(i.value) && _e(i.value, r); | ||
} | ||
@@ -588,5 +588,5 @@ } | ||
t = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === m)) | ||
r.$$typeof === p)) | ||
t = r.propTypes; | ||
@@ -596,8 +596,8 @@ else | ||
if (t) { | ||
var n = _(r); | ||
Be(t, e.props, "prop", n, e); | ||
} else if (r.PropTypes !== void 0 && !K) { | ||
K = !0; | ||
var i = _(r); | ||
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown"); | ||
var n = C(r); | ||
Me(t, e.props, "prop", n, e); | ||
} else if (r.PropTypes !== void 0 && !Q) { | ||
Q = !0; | ||
var o = C(r); | ||
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown"); | ||
} | ||
@@ -612,81 +612,83 @@ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
if (n !== "children" && n !== "key") { | ||
$(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), $(null); | ||
D(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && ($(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), $(null)); | ||
e.ref !== null && (D(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), D(null)); | ||
} | ||
} | ||
function _e(e, r, t, n, i, u) { | ||
function Te(e, r, t, n, o, u) { | ||
{ | ||
var o = Fe(e); | ||
if (!o) { | ||
var i = Fe(e); | ||
if (!i) { | ||
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 g = Qe(i); | ||
g ? a += g : a += be(); | ||
var l; | ||
e === null ? l = "null" : J(e) ? l = "array" : e !== void 0 && e.$$typeof === d ? (l = "<" + (_(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 g = Qe(o); | ||
g ? a += g : a += Ee(); | ||
var f; | ||
e === null ? f = "null" : K(e) ? f = "array" : e !== void 0 && e.$$typeof === S ? (f = "<" + (C(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 f = Ze(e, r, t, i, u); | ||
if (f == null) | ||
return f; | ||
if (o) { | ||
var y = r.children; | ||
if (y !== void 0) | ||
var c = Ze(e, r, t, o, u); | ||
if (c == null) | ||
return c; | ||
if (i) { | ||
var b = r.children; | ||
if (b !== void 0) | ||
if (n) | ||
if (J(y)) { | ||
for (var k = 0; k < y.length; k++) | ||
Ee(y[k], e); | ||
Object.freeze && Object.freeze(y); | ||
if (K(b)) { | ||
for (var F = 0; F < b.length; F++) | ||
xe(b[F], e); | ||
Object.freeze && Object.freeze(b); | ||
} 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 | ||
Ee(y, e); | ||
xe(b, e); | ||
} | ||
return e === C ? tr(f) : rr(f), f; | ||
return e === s ? tr(c) : rr(c), c; | ||
} | ||
} | ||
function nr(e, r, t) { | ||
return _e(e, r, t, !0); | ||
return Te(e, r, t, !0); | ||
} | ||
function ar(e, r, t) { | ||
return _e(e, r, t, !1); | ||
return Te(e, r, t, !1); | ||
} | ||
var or = ar, ir = nr; | ||
Y.Fragment = C, Y.jsx = or, Y.jsxs = ir; | ||
}()), Y; | ||
var ir = ar, or = nr; | ||
N.Fragment = s, N.jsx = ir, N.jsxs = or; | ||
}()), N; | ||
} | ||
process.env.NODE_ENV === "production" ? Z.exports = ur() : Z.exports = sr(); | ||
var T = Z.exports; | ||
const fr = (F) => { | ||
process.env.NODE_ENV === "production" ? re.exports = fr() : re.exports = cr(); | ||
var O = re.exports; | ||
const vr = (A) => { | ||
const { | ||
gradientBorderWidth: d, | ||
gradientBorderRadius: s, | ||
gradientBorderColor: C, | ||
gradientCustomName: S, | ||
gradientCustomId: j, | ||
gradientBorderWidth: s, | ||
gradientBorderRadius: y, | ||
gradientBorderColor: P, | ||
gradientBorderDirection: R, | ||
gradientBorderColorDeg: S, | ||
gradientBorderChildren: O | ||
} = F, b = D.useRef(null), [c, w] = D.useState(0), [v, m] = D.useState(0); | ||
return D.useEffect(() => { | ||
if (b.current) { | ||
const { width: p, height: E } = b.current.getBoundingClientRect(); | ||
console.log("first", p, E), w(p), m(E); | ||
} | ||
}, []), /* @__PURE__ */ T.jsxs( | ||
gradientBorderColorDeg: _, | ||
gradientBorderChildren: d, | ||
width: E, | ||
height: v | ||
} = A, [p, x] = G.useState(0), [m, L] = G.useState(0), [l, k] = ur(0); | ||
return console.log("radius", d, E, v), sr(() => { | ||
x(E + 2 * s), L(v + 2 * s); | ||
}, [E, v, s]), lr(() => { | ||
p < m ? 2 * y > p ? k(2 * y - p + 2 * s) : k(y) : p > m && (2 * y > m ? k(2 * y - m + 2 * s) : k(y)); | ||
}, [p, m, y, s]), /* @__PURE__ */ O.jsxs( | ||
"svg", | ||
{ | ||
ref: b, | ||
xmlns: "http://www.w3.org/2000/svg", | ||
className: "relative", | ||
style: { | ||
width: "100%", | ||
height: "100%", | ||
position: "relative" | ||
width: `${E + 2 * s}px`, | ||
height: `${v + 2 * s}px` | ||
}, | ||
xmlns: "http://www.w3.org/2000/svg", | ||
children: [ | ||
/* @__PURE__ */ T.jsxs("defs", { children: [ | ||
/* @__PURE__ */ T.jsx( | ||
/* @__PURE__ */ O.jsxs("defs", { children: [ | ||
/* @__PURE__ */ O.jsx( | ||
"linearGradient", | ||
{ | ||
id: "customGradient", | ||
id: j, | ||
x1: `${R === "right-to-left" ? "100%" : "0%"}`, | ||
@@ -696,26 +698,32 @@ y1: `${R === "bottom-to-top" ? "100%" : "0%"}`, | ||
y2: `${R === "top-to-bottom" ? "100%" : "0%"}`, | ||
gradientTransform: `rotate(${S})`, | ||
children: C.map((p, E) => /* @__PURE__ */ T.jsx( | ||
gradientTransform: `rotate(${_})`, | ||
children: P.map((T, h) => /* @__PURE__ */ O.jsx( | ||
"stop", | ||
{ | ||
offset: `${p == null ? void 0 : p.offset}%`, | ||
stopColor: p == null ? void 0 : p.color | ||
offset: `${T.offset}%`, | ||
stopColor: T.color | ||
}, | ||
E | ||
h | ||
)) | ||
} | ||
), | ||
/* @__PURE__ */ T.jsx( | ||
/* @__PURE__ */ O.jsx( | ||
"path", | ||
{ | ||
d: `M${s + d} ${d} h${c - 2 * s - 2 * d} a${s},${s} 0 0 1 ${s},${s} v${v - 2 * s - 2 * d} a${s},${s} 0 0 1 -${s},${s} h-${c - 2 * s - 2 * d} a${s},${s} 0 0 1 -${s},-${s} v-${v - 2 * s - 2 * d} a${s},${s} 0 0 1 ${s},-${s} z`, | ||
stroke: "url('#customGradient')", | ||
strokeWidth: d, | ||
d: `M${l + s} ${s} h${p - 2 * l - 2 * s} a${l},${l} 0 0 1 ${l},${l} v${m - 2 * l - 2 * s} a${l},${l} 0 0 1 -${l},${l} h-${p - 2 * l - 2 * s} a${l},${l} 0 0 1 -${l},-${l} v-${m - 2 * l - 2 * s} a${l},${l} 0 0 1 ${l},-${l} z`, | ||
stroke: `url('#${j}')`, | ||
strokeWidth: s, | ||
fill: "none", | ||
id: "myCircle" | ||
id: S | ||
} | ||
) | ||
] }), | ||
/* @__PURE__ */ T.jsx("use", { href: "#myCircle", fill: "url('#customGradient')" }), | ||
/* @__PURE__ */ T.jsx( | ||
/* @__PURE__ */ O.jsx( | ||
"use", | ||
{ | ||
href: `#${S}`, | ||
fill: `url('#${j}')` | ||
} | ||
), | ||
/* @__PURE__ */ O.jsx( | ||
"foreignObject", | ||
@@ -733,9 +741,9 @@ { | ||
}, | ||
children: /* @__PURE__ */ T.jsx( | ||
children: /* @__PURE__ */ O.jsx( | ||
"div", | ||
{ | ||
style: { | ||
width: `${c - 2 * d}px`, | ||
height: `${v - 2 * d}px`, | ||
borderRadius: `${s}px`, | ||
width: `${p - 2 * s}px`, | ||
height: `${m - 2 * s}px`, | ||
borderRadius: `${y}px`, | ||
display: "flex", | ||
@@ -746,6 +754,6 @@ alignItems: "center", | ||
position: "absolute", | ||
top: `${d}px`, | ||
left: `${d}px` | ||
top: `${s}px`, | ||
left: `${s}px` | ||
}, | ||
children: /* @__PURE__ */ T.jsx( | ||
children: /* @__PURE__ */ O.jsx( | ||
"div", | ||
@@ -755,8 +763,5 @@ { | ||
width: "100%", | ||
height: "100%", | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "center" | ||
height: "100%" | ||
}, | ||
children: O | ||
children: d | ||
} | ||
@@ -773,4 +778,4 @@ ) | ||
export { | ||
fr as GradientBorderComponent | ||
vr as GradientBorderComponent | ||
}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
(function(j,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(j=typeof globalThis<"u"?globalThis:j||self,E(j.GradientBorderComponent={},j.React))})(this,function(j,E){"use strict";var G={exports:{}},A={};/** | ||
(function(P,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(P=typeof globalThis<"u"?globalThis:P||self,E(P.GradientBorderComponent={},P.React))})(this,function(P,E){"use strict";var H={exports:{}},W={};/** | ||
* @license React | ||
@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ee;function Oe(){if(ee)return A;ee=1;var W=E,d=Symbol.for("react.element"),s=Symbol.for("react.fragment"),w=Object.prototype.hasOwnProperty,_=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$={key:!0,ref:!0,__self:!0,__source:!0};function S(b,c,O){var v,m={},p=null,T=null;O!==void 0&&(p=""+O),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(T=c.ref);for(v in c)w.call(c,v)&&!$.hasOwnProperty(v)&&(m[v]=c[v]);if(b&&b.defaultProps)for(v in c=b.defaultProps,c)m[v]===void 0&&(m[v]=c[v]);return{$$typeof:d,type:b,key:p,ref:T,props:m,_owner:_.current}}return A.Fragment=s,A.jsx=S,A.jsxs=S,A}var I={};/** | ||
*/var ne;function je(){if(ne)return W;ne=1;var N=E,j=Symbol.for("react.element"),$=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,y=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0};function _(x,d,R){var v,p={},C=null,m=null;R!==void 0&&(C=""+R),d.key!==void 0&&(C=""+d.key),d.ref!==void 0&&(m=d.ref);for(v in d)s.call(d,v)&&!D.hasOwnProperty(v)&&(p[v]=d[v]);if(x&&x.defaultProps)for(v in d=x.defaultProps,d)p[v]===void 0&&(p[v]=d[v]);return{$$typeof:j,type:x,key:C,ref:m,props:p,_owner:y.current}}return W.Fragment=$,W.jsx=_,W.jsxs=_,W}var Y={};/** | ||
* @license React | ||
@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var re;function je(){return re||(re=1,process.env.NODE_ENV!=="production"&&function(){var W=E,d=Symbol.for("react.element"),s=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),b=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),te=Symbol.iterator,Pe="@@iterator";function $e(e){if(e===null||typeof e!="object")return null;var r=te&&e[te]||e[Pe];return typeof r=="function"?r:null}var k=W.__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];ke("error",e,t)}}function ke(e,r,t){{var n=k.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 De=!1,Fe=!1,Ae=!1,Ie=!1,We=!1,ne;ne=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===w||e===$||We||e===_||e===O||e===v||Ie||e===T||De||Fe||Ae||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===m||e.$$typeof===S||e.$$typeof===b||e.$$typeof===c||e.$$typeof===ne||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ae(e){return e.displayName||"Context"}function x(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 w:return"Fragment";case s:return"Portal";case $:return"Profiler";case _:return"StrictMode";case O:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return ae(r)+".Consumer";case S:var t=e;return ae(t._context)+".Provider";case c:return Be(e,e.render,"ForwardRef");case m:var n=e.displayName||null;return n!==null?n:x(e.type)||"Memo";case p:{var i=e,u=i._payload,o=i._init;try{return x(o(u))}catch{return null}}}return null}var P=Object.assign,Y=0,oe,ie,ue,se,le,fe,ce;function de(){}de.__reactDisabledLog=!0;function Le(){{if(Y===0){oe=console.log,ie=console.info,ue=console.warn,se=console.error,le=console.group,fe=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Y++}}function Me(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:oe}),info:P({},e,{value:ie}),warn:P({},e,{value:ue}),error:P({},e,{value:se}),group:P({},e,{value:le}),groupCollapsed:P({},e,{value:fe}),groupEnd:P({},e,{value:ce})})}Y<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=k.ReactCurrentDispatcher,J;function L(e,r,t){{if(J===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return` | ||
`+J+e}}var z=!1,M;{var Ne=typeof WeakMap=="function"?WeakMap:Map;M=new Ne}function ve(e,r){if(!e||z)return"";{var t=M.get(e);if(t!==void 0)return t}var n;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Le();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(C){n=C}Reflect.construct(e,[],o)}else{try{o.call()}catch(C){n=C}e.call(o.prototype)}}else{try{throw Error()}catch(C){n=C}e()}}catch(C){if(C&&n&&typeof C.stack=="string"){for(var a=C.stack.split(` | ||
*/var ae;function Pe(){return ae||(ae=1,process.env.NODE_ENV!=="production"&&function(){var N=E,j=Symbol.for("react.element"),$=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),x=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),M=Symbol.iterator,l="@@iterator";function F(e){if(e===null||typeof e!="object")return null;var r=M&&e[M]||e[l];return typeof r=="function"?r:null}var w=N.__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];ke("error",e,t)}}function ke(e,r,t){{var n=w.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 De=!1,Fe=!1,Ae=!1,Ie=!1,We=!1,oe;oe=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===D||We||e===y||e===R||e===v||Ie||e===m||De||Fe||Ae||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===p||e.$$typeof===_||e.$$typeof===x||e.$$typeof===d||e.$$typeof===oe||e.getModuleId!==void 0))}function Ne(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function O(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 s:return"Fragment";case $:return"Portal";case D:return"Profiler";case y:return"StrictMode";case R:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var r=e;return ie(r)+".Consumer";case _:var t=e;return ie(t._context)+".Provider";case d:return Ne(e,e.render,"ForwardRef");case p:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case C:{var i=e,u=i._payload,o=i._init;try{return O(o(u))}catch{return null}}}return null}var k=Object.assign,L=0,ue,se,le,fe,ce,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Le(){{if(L===0){ue=console.log,se=console.info,le=console.warn,fe=console.error,ce=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function Be(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:se}),warn:k({},e,{value:le}),error:k({},e,{value:fe}),group:k({},e,{value:ce}),groupCollapsed:k({},e,{value:de}),groupEnd:k({},e,{value:ve})})}L<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=w.ReactCurrentDispatcher,X;function V(e,r,t){{if(X===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);X=n&&n[1]||""}return` | ||
`+X+e}}var q=!1,U;{var Me=typeof WeakMap=="function"?WeakMap:Map;U=new Me}function he(e,r){if(!e||q)return"";{var t=U.get(e);if(t!==void 0)return t}var n;q=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=K.current,K.current=null,Le();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(S){n=S}Reflect.construct(e,[],o)}else{try{o.call()}catch(S){n=S}e.call(o.prototype)}}else{try{throw Error()}catch(S){n=S}e()}}catch(S){if(S&&n&&typeof S.stack=="string"){for(var a=S.stack.split(` | ||
`),g=n.stack.split(` | ||
`),l=a.length-1,f=g.length-1;l>=1&&f>=0&&a[l]!==g[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==g[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==g[f]){var y=` | ||
`+a[l].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,y),y}while(l>=1&&f>=0);break}}}finally{z=!1,q.current=u,Me(),Error.prepareStackTrace=i}var F=e?e.displayName||e.name:"",we=F?L(F):"";return typeof e=="function"&&M.set(e,we),we}function Ve(e,r,t){return ve(e,!1)}function Ue(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ve(e,Ue(e));if(typeof e=="string")return L(e);switch(e){case O:return L("Suspense");case v:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Ve(e.render);case m:return N(e.type,r,t);case p:{var n=e,i=n._payload,u=n._init;try{return N(u(i),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,pe={},he=k.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function Ge(e,r,t,n,i){{var u=Function.call.bind(V);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=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 g.name="Invariant Violation",g}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)&&(U(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),U(null)),a instanceof Error&&!(a.message in pe)&&(pe[a.message]=!0,U(i),h("Failed %s type: %s",t,a.message),U(null))}}}var qe=Array.isArray;function H(e){return qe(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function ye(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.",Je(e)),ge(e)}var B=k.ReactCurrentOwner,He={key:!0,ref:!0,__self:!0,__source:!0},be,me,K;K={};function Ke(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Xe(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=x(B.current.type);K[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',x(B.current.type),e.ref),K[t]=!0)}}function Qe(e,r){{var t=function(){be||(be=!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 er(e,r){{var t=function(){me||(me=!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 rr=function(e,r,t,n,i,u,o){var a={$$typeof:d,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 tr(e,r,t,n,i){{var u,o={},a=null,g=null;t!==void 0&&(ye(t),a=""+t),Xe(r)&&(ye(r.key),a=""+r.key),Ke(r)&&(g=r.ref,Ze(r,i));for(u in r)V.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||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Qe(o,f),g&&er(o,f)}return rr(e,a,g,i,n,B.current,o)}}var X=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function Re(){{if(X.current){var e=x(X.current.type);if(e)return` | ||
`),f=a.length-1,c=g.length-1;f>=1&&c>=0&&a[f]!==g[c];)c--;for(;f>=1&&c>=0;f--,c--)if(a[f]!==g[c]){if(f!==1||c!==1)do if(f--,c--,c<0||a[f]!==g[c]){var b=` | ||
`+a[f].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,b),b}while(f>=1&&c>=0);break}}}finally{q=!1,K.current=u,Be(),Error.prepareStackTrace=i}var I=e?e.displayName||e.name:"",Se=I?V(I):"";return typeof e=="function"&&U.set(e,Se),Se}function Ve(e,r,t){return he(e,!1)}function Ue(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function G(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,Ue(e));if(typeof e=="string")return V(e);switch(e){case R:return V("Suspense");case v:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ve(e.render);case p:return G(e.type,r,t);case C:{var n=e,i=n._payload,u=n._init;try{return G(u(i),r,t)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,ge={},ye=w.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Ge(e,r,t,n,i){{var u=Function.call.bind(J);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=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 g.name="Invariant Violation",g}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)&&(z(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),z(null)),a instanceof Error&&!(a.message in ge)&&(ge[a.message]=!0,z(i),h("Failed %s type: %s",t,a.message),z(null))}}}var Je=Array.isArray;function Z(e){return Je(e)}function ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return me(e),!1}catch{return!0}}function me(e){return""+e}function be(e){if(He(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(e)),me(e)}var B=w.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},Ee,Re,Q;Q={};function Xe(e){if(J.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(J.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=O(B.current.type);Q[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',O(B.current.type),e.ref),Q[t]=!0)}}function Qe(e,r){{var t=function(){Ee||(Ee=!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 er(e,r){{var t=function(){Re||(Re=!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 rr=function(e,r,t,n,i,u,o){var a={$$typeof:j,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 tr(e,r,t,n,i){{var u,o={},a=null,g=null;t!==void 0&&(be(t),a=""+t),qe(r)&&(be(r.key),a=""+r.key),Xe(r)&&(g=r.ref,Ze(r,i));for(u in r)J.call(r,u)&&!Ke.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||g){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Qe(o,c),g&&er(o,c)}return rr(e,a,g,i,n,B.current,o)}}var ee=w.ReactCurrentOwner,_e=w.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}function Te(){{if(ee.current){var e=O(ee.current.type);if(e)return` | ||
Check the render method of \``+e+"`."}return""}}function nr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` | ||
Check your code at `+r+":"+t+"."}return""}}var _e={};function ar(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
Check your code at `+r+":"+t+"."}return""}}var xe={};function ar(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
Check the top-level render call using <`+t+">.")}return r}}function Te(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+x(e._owner.type)+"."),D(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),D(null)}}function xe(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Te(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var i=$e(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)Q(o.value)&&Te(o.value,r)}}}function or(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===c||r.$$typeof===m))t=r.propTypes;else return;if(t){var n=x(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var i=x(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 ir(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){D(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}e.ref!==null&&(D(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Ce(e,r,t,n,i,u){{var o=Ye(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 g=nr(i);g?a+=g:a+=Re();var l;e===null?l="null":H(e)?l="array":e!==void 0&&e.$$typeof===d?(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)}var f=tr(e,r,t,i,u);if(f==null)return f;if(o){var y=r.children;if(y!==void 0)if(n)if(H(y)){for(var F=0;F<y.length;F++)xe(y[F],e);Object.freeze&&Object.freeze(y)}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 xe(y,e)}return e===w?ir(f):or(f),f}}function ur(e,r,t){return Ce(e,r,t,!0)}function sr(e,r,t){return Ce(e,r,t,!1)}var lr=sr,fr=ur;I.Fragment=w,I.jsx=lr,I.jsxs=fr}()),I}process.env.NODE_ENV==="production"?G.exports=Oe():G.exports=je();var R=G.exports;const Se=W=>{const{gradientBorderWidth:d,gradientBorderRadius:s,gradientBorderColor:w,gradientBorderDirection:_,gradientBorderColorDeg:$,gradientBorderChildren:S}=W,b=E.useRef(null),[c,O]=E.useState(0),[v,m]=E.useState(0);return E.useEffect(()=>{if(b.current){const{width:p,height:T}=b.current.getBoundingClientRect();console.log("first",p,T),O(p),m(T)}},[]),R.jsxs("svg",{ref:b,xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%",position:"relative"},children:[R.jsxs("defs",{children:[R.jsx("linearGradient",{id:"customGradient",x1:`${_==="right-to-left"?"100%":"0%"}`,y1:`${_==="bottom-to-top"?"100%":"0%"}`,x2:`${_==="left-to-right"?"100%":"0%"}`,y2:`${_==="top-to-bottom"?"100%":"0%"}`,gradientTransform:`rotate(${$})`,children:w.map((p,T)=>R.jsx("stop",{offset:`${p==null?void 0:p.offset}%`,stopColor:p==null?void 0:p.color},T))}),R.jsx("path",{d:`M${s+d} ${d} h${c-2*s-2*d} a${s},${s} 0 0 1 ${s},${s} v${v-2*s-2*d} a${s},${s} 0 0 1 -${s},${s} h-${c-2*s-2*d} a${s},${s} 0 0 1 -${s},-${s} v-${v-2*s-2*d} a${s},${s} 0 0 1 ${s},-${s} z`,stroke:"url('#customGradient')",strokeWidth:d,fill:"none",id:"myCircle"})]}),R.jsx("use",{href:"#myCircle",fill:"url('#customGradient')"}),R.jsx("foreignObject",{x:"0",y:"0",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:R.jsx("div",{style:{width:`${c-2*d}px`,height:`${v-2*d}px`,borderRadius:`${s}px`,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",position:"absolute",top:`${d}px`,left:`${d}px`},children:R.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:S})})})]})};j.GradientBorderComponent=Se,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})}); | ||
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),A(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),A(null)}}function we(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&Ce(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var i=F(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)te(o.value)&&Ce(o.value,r)}}}function or(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===d||r.$$typeof===p))t=r.propTypes;else return;if(t){var n=O(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var i=O(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 ir(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Oe(e,r,t,n,i,u){{var o=Ye(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 g=nr(i);g?a+=g:a+=Te();var f;e===null?f="null":Z(e)?f="array":e!==void 0&&e.$$typeof===j?(f="<"+(O(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 c=tr(e,r,t,i,u);if(c==null)return c;if(o){var b=r.children;if(b!==void 0)if(n)if(Z(b)){for(var I=0;I<b.length;I++)we(b[I],e);Object.freeze&&Object.freeze(b)}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 we(b,e)}return e===s?ir(c):or(c),c}}function ur(e,r,t){return Oe(e,r,t,!0)}function sr(e,r,t){return Oe(e,r,t,!1)}var lr=sr,fr=ur;Y.Fragment=s,Y.jsx=lr,Y.jsxs=fr}()),Y}process.env.NODE_ENV==="production"?H.exports=je():H.exports=Pe();var T=H.exports;const $e=N=>{const{gradientCustomName:j,gradientCustomId:$,gradientBorderWidth:s,gradientBorderRadius:y,gradientBorderColor:D,gradientBorderDirection:_,gradientBorderColorDeg:x,gradientBorderChildren:d,width:R,height:v}=N,[p,C]=E.useState(0),[m,M]=E.useState(0),[l,F]=E.useState(0);return console.log("radius",d,R,v),E.useLayoutEffect(()=>{C(R+2*s),M(v+2*s)},[R,v,s]),E.useEffect(()=>{p<m?2*y>p?F(2*y-p+2*s):F(y):p>m&&(2*y>m?F(2*y-m+2*s):F(y))},[p,m,y,s]),T.jsxs("svg",{className:"relative",style:{width:`${R+2*s}px`,height:`${v+2*s}px`},xmlns:"http://www.w3.org/2000/svg",children:[T.jsxs("defs",{children:[T.jsx("linearGradient",{id:$,x1:`${_==="right-to-left"?"100%":"0%"}`,y1:`${_==="bottom-to-top"?"100%":"0%"}`,x2:`${_==="left-to-right"?"100%":"0%"}`,y2:`${_==="top-to-bottom"?"100%":"0%"}`,gradientTransform:`rotate(${x})`,children:D.map((w,h)=>T.jsx("stop",{offset:`${w.offset}%`,stopColor:w.color},h))}),T.jsx("path",{d:`M${l+s} ${s} h${p-2*l-2*s} a${l},${l} 0 0 1 ${l},${l} v${m-2*l-2*s} a${l},${l} 0 0 1 -${l},${l} h-${p-2*l-2*s} a${l},${l} 0 0 1 -${l},-${l} v-${m-2*l-2*s} a${l},${l} 0 0 1 ${l},-${l} z`,stroke:`url('#${$}')`,strokeWidth:s,fill:"none",id:j})]}),T.jsx("use",{href:`#${j}`,fill:`url('#${$}')`}),T.jsx("foreignObject",{x:"0",y:"0",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:T.jsx("div",{style:{width:`${p-2*s}px`,height:`${m-2*s}px`,borderRadius:`${y}px`,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",position:"absolute",top:`${s}px`,left:`${s}px`},children:T.jsx("div",{style:{width:"100%",height:"100%"},children:d})})})]})};P.GradientBorderComponent=$e,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -1,2 +0,2 @@ | ||
import React from "react"; | ||
import { ReactElement } from "react"; | ||
type GradientBorderDirectionType = "top-to-bottom" | "right-to-left" | "bottom-to-top" | "left-to-right"; | ||
@@ -8,2 +8,4 @@ type GradientBorderColorType = Array<{ | ||
export interface GradientBorderComponentProps { | ||
gradientCustomName: string; | ||
gradientCustomId: string; | ||
gradientBorderWidth: number; | ||
@@ -14,5 +16,7 @@ gradientBorderRadius: number; | ||
gradientBorderColorDeg: number; | ||
gradientBorderChildren: React.ReactNode; | ||
gradientBorderChildren: ReactElement; | ||
width: number; | ||
height: number; | ||
} | ||
declare const GradientBorderComponent: (props: GradientBorderComponentProps) => import("react/jsx-runtime").JSX.Element; | ||
export default GradientBorderComponent; |
{ | ||
"name": "gradient-border", | ||
"private": false, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
198561
847