@konstructio/ui
Version:
A set of reusable and customizable React components built for konstruct.io
548 lines (547 loc) • 22.2 kB
JavaScript
import { t as k } from "./chunk-cI0lbGMq.js";
var te = /* @__PURE__ */ k(((r) => {
var i = typeof Symbol == "function" && Symbol.for, P = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, w = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, h = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, d = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, _ = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, v = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, T = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, E = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, O = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, R = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, S = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, A = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, W = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, M = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, Y = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
function j(n) {
if (typeof n == "object" && n !== null) {
var U = n.$$typeof;
switch (U) {
case P:
switch (n = n.type, n) {
case v:
case T:
case h:
case g:
case d:
case O:
return n;
default:
switch (n = n && n.$$typeof, n) {
case _:
case E:
case A:
case S:
case f:
return n;
default:
return U;
}
}
case w:
return U;
}
}
}
function $(n) {
return j(n) === T;
}
r.AsyncMode = v, r.ConcurrentMode = T, r.ContextConsumer = _, r.ContextProvider = f, r.Element = P, r.ForwardRef = E, r.Fragment = h, r.Lazy = A, r.Memo = S, r.Portal = w, r.Profiler = g, r.StrictMode = d, r.Suspense = O, r.isAsyncMode = function(n) {
return $(n) || j(n) === v;
}, r.isConcurrentMode = $, r.isContextConsumer = function(n) {
return j(n) === _;
}, r.isContextProvider = function(n) {
return j(n) === f;
}, r.isElement = function(n) {
return typeof n == "object" && n !== null && n.$$typeof === P;
}, r.isForwardRef = function(n) {
return j(n) === E;
}, r.isFragment = function(n) {
return j(n) === h;
}, r.isLazy = function(n) {
return j(n) === A;
}, r.isMemo = function(n) {
return j(n) === S;
}, r.isPortal = function(n) {
return j(n) === w;
}, r.isProfiler = function(n) {
return j(n) === g;
}, r.isStrictMode = function(n) {
return j(n) === d;
}, r.isSuspense = function(n) {
return j(n) === O;
}, r.isValidElementType = function(n) {
return typeof n == "string" || typeof n == "function" || n === h || n === T || n === g || n === d || n === O || n === R || typeof n == "object" && n !== null && (n.$$typeof === A || n.$$typeof === S || n.$$typeof === f || n.$$typeof === _ || n.$$typeof === E || n.$$typeof === C || n.$$typeof === M || n.$$typeof === Y || n.$$typeof === W);
}, r.typeOf = j;
})), oe = /* @__PURE__ */ k(((r) => {
process.env.NODE_ENV !== "production" && (function() {
"use strict";
var i = typeof Symbol == "function" && Symbol.for, P = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, w = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, h = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, d = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, _ = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, v = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, T = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, E = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, O = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, R = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, S = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, A = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, W = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, M = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, Y = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
function j(t) {
return typeof t == "string" || typeof t == "function" || t === h || t === T || t === g || t === d || t === O || t === R || typeof t == "object" && t !== null && (t.$$typeof === A || t.$$typeof === S || t.$$typeof === f || t.$$typeof === _ || t.$$typeof === E || t.$$typeof === C || t.$$typeof === M || t.$$typeof === Y || t.$$typeof === W);
}
function $(t) {
if (typeof t == "object" && t !== null) {
var I = t.$$typeof;
switch (I) {
case P:
var q = t.type;
switch (q) {
case v:
case T:
case h:
case g:
case d:
case O:
return q;
default:
var ee = q && q.$$typeof;
switch (ee) {
case _:
case E:
case A:
case S:
case f:
return ee;
default:
return I;
}
}
case w:
return I;
}
}
}
var n = v, U = T, B = _, V = f, J = P, N = E, X = h, F = A, G = S, H = w, z = g, Z = d, D = O, L = !1;
function K(t) {
return L || (L = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(t) || $(t) === v;
}
function x(t) {
return $(t) === T;
}
function e(t) {
return $(t) === _;
}
function o(t) {
return $(t) === f;
}
function l(t) {
return typeof t == "object" && t !== null && t.$$typeof === P;
}
function u(t) {
return $(t) === E;
}
function a(t) {
return $(t) === h;
}
function p(t) {
return $(t) === A;
}
function c(t) {
return $(t) === S;
}
function s(t) {
return $(t) === w;
}
function b(t) {
return $(t) === g;
}
function y(t) {
return $(t) === d;
}
function m(t) {
return $(t) === O;
}
r.AsyncMode = n, r.ConcurrentMode = U, r.ContextConsumer = B, r.ContextProvider = V, r.Element = J, r.ForwardRef = N, r.Fragment = X, r.Lazy = F, r.Memo = G, r.Portal = H, r.Profiler = z, r.StrictMode = Z, r.Suspense = D, r.isAsyncMode = K, r.isConcurrentMode = x, r.isContextConsumer = e, r.isContextProvider = o, r.isElement = l, r.isForwardRef = u, r.isFragment = a, r.isLazy = p, r.isMemo = c, r.isPortal = s, r.isProfiler = b, r.isStrictMode = y, r.isSuspense = m, r.isValidElementType = j, r.typeOf = $;
})();
})), re = /* @__PURE__ */ k(((r, i) => {
process.env.NODE_ENV === "production" ? i.exports = te() : i.exports = oe();
})), ie = /* @__PURE__ */ k(((r, i) => {
var P = Object.getOwnPropertySymbols, w = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable;
function d(f) {
if (f == null) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(f);
}
function g() {
try {
if (!Object.assign) return !1;
var f = /* @__PURE__ */ new String("abc");
if (f[5] = "de", Object.getOwnPropertyNames(f)[0] === "5") return !1;
for (var _ = {}, v = 0; v < 10; v++) _["_" + String.fromCharCode(v)] = v;
if (Object.getOwnPropertyNames(_).map(function(E) {
return _[E];
}).join("") !== "0123456789") return !1;
var T = {};
return "abcdefghijklmnopqrst".split("").forEach(function(E) {
T[E] = E;
}), Object.keys(Object.assign({}, T)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
i.exports = g() ? Object.assign : function(f, _) {
for (var v, T = d(f), E, O = 1; O < arguments.length; O++) {
v = Object(arguments[O]);
for (var R in v) w.call(v, R) && (T[R] = v[R]);
if (P) {
E = P(v);
for (var S = 0; S < E.length; S++) h.call(v, E[S]) && (T[E[S]] = v[E[S]]);
}
}
return T;
};
})), Q = /* @__PURE__ */ k(((r, i) => {
var P = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
i.exports = P;
})), ne = /* @__PURE__ */ k(((r, i) => {
i.exports = Function.call.bind(Object.prototype.hasOwnProperty);
})), ae = /* @__PURE__ */ k(((r, i) => {
var P = function() {
};
if (process.env.NODE_ENV !== "production") {
var w = Q(), h = {}, d = ne();
P = function(f) {
var _ = "Warning: " + f;
typeof console < "u" && console.error(_);
try {
throw new Error(_);
} catch {
}
};
}
function g(f, _, v, T, E) {
if (process.env.NODE_ENV !== "production") {
for (var O in f) if (d(f, O)) {
var R;
try {
if (typeof f[O] != "function") {
var S = Error((T || "React class") + ": " + v + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw S.name = "Invariant Violation", S;
}
R = f[O](_, O, T, v, null, w);
} catch (W) {
R = W;
}
if (R && !(R instanceof Error) && P((T || "React class") + ": type specification of " + v + " `" + O + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof R + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), R instanceof Error && !(R.message in h)) {
h[R.message] = !0;
var A = E ? E() : "";
P("Failed " + v + " type: " + R.message + (A ?? ""));
}
}
}
}
g.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (h = {});
}, i.exports = g;
})), fe = /* @__PURE__ */ k(((r, i) => {
var P = re(), w = ie(), h = Q(), d = ne(), g = ae(), f = function() {
};
process.env.NODE_ENV !== "production" && (f = function(v) {
var T = "Warning: " + v;
typeof console < "u" && console.error(T);
try {
throw new Error(T);
} catch {
}
});
function _() {
return null;
}
i.exports = function(v, T) {
var E = typeof Symbol == "function" && Symbol.iterator, O = "@@iterator";
function R(e) {
var o = e && (E && e[E] || e[O]);
if (typeof o == "function") return o;
}
var S = "<<anonymous>>", A = {
array: Y("array"),
bigint: Y("bigint"),
bool: Y("boolean"),
func: Y("function"),
number: Y("number"),
object: Y("object"),
string: Y("string"),
symbol: Y("symbol"),
any: j(),
arrayOf: $,
element: n(),
elementType: U(),
instanceOf: B,
node: X(),
objectOf: J,
oneOf: V,
oneOfType: N,
shape: G,
exact: H
};
function W(e, o) {
return e === o ? e !== 0 || 1 / e === 1 / o : e !== e && o !== o;
}
function C(e, o) {
this.message = e, this.data = o && typeof o == "object" ? o : {}, this.stack = "";
}
C.prototype = Error.prototype;
function M(e) {
if (process.env.NODE_ENV !== "production")
var o = {}, l = 0;
function u(p, c, s, b, y, m, t) {
if (b = b || S, m = m || s, t !== h) {
if (T) {
var I = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
throw I.name = "Invariant Violation", I;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var q = b + ":" + s;
!o[q] && l < 3 && (f("You are manually calling a React.PropTypes validation function for the `" + m + "` prop on `" + b + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), o[q] = !0, l++);
}
}
return c[s] == null ? p ? c[s] === null ? new C("The " + y + " `" + m + "` is marked as required " + ("in `" + b + "`, but its value is `null`.")) : new C("The " + y + " `" + m + "` is marked as required in " + ("`" + b + "`, but its value is `undefined`.")) : null : e(c, s, b, y, m);
}
var a = u.bind(null, !1);
return a.isRequired = u.bind(null, !0), a;
}
function Y(e) {
function o(l, u, a, p, c, s) {
var b = l[u];
if (D(b) !== e) {
var y = L(b);
return new C("Invalid " + p + " `" + c + "` of type " + ("`" + y + "` supplied to `" + a + "`, expected ") + ("`" + e + "`."), { expectedType: e });
}
return null;
}
return M(o);
}
function j() {
return M(_);
}
function $(e) {
function o(l, u, a, p, c) {
if (typeof e != "function") return new C("Property `" + c + "` of component `" + a + "` has invalid PropType notation inside arrayOf.");
var s = l[u];
if (!Array.isArray(s)) {
var b = D(s);
return new C("Invalid " + p + " `" + c + "` of type " + ("`" + b + "` supplied to `" + a + "`, expected an array."));
}
for (var y = 0; y < s.length; y++) {
var m = e(s, y, a, p, c + "[" + y + "]", h);
if (m instanceof Error) return m;
}
return null;
}
return M(o);
}
function n() {
function e(o, l, u, a, p) {
var c = o[l];
if (!v(c)) {
var s = D(c);
return new C("Invalid " + a + " `" + p + "` of type " + ("`" + s + "` supplied to `" + u + "`, expected a single ReactElement."));
}
return null;
}
return M(e);
}
function U() {
function e(o, l, u, a, p) {
var c = o[l];
if (!P.isValidElementType(c)) {
var s = D(c);
return new C("Invalid " + a + " `" + p + "` of type " + ("`" + s + "` supplied to `" + u + "`, expected a single ReactElement type."));
}
return null;
}
return M(e);
}
function B(e) {
function o(l, u, a, p, c) {
if (!(l[u] instanceof e)) {
var s = e.name || S, b = x(l[u]);
return new C("Invalid " + p + " `" + c + "` of type " + ("`" + b + "` supplied to `" + a + "`, expected ") + ("instance of `" + s + "`."));
}
return null;
}
return M(o);
}
function V(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? f("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).") : f("Invalid argument supplied to oneOf, expected an array.")), _;
function o(l, u, a, p, c) {
for (var s = l[u], b = 0; b < e.length; b++) if (W(s, e[b])) return null;
var y = JSON.stringify(e, function(t, I) {
return L(I) === "symbol" ? String(I) : I;
});
return new C("Invalid " + p + " `" + c + "` of value `" + String(s) + "` " + ("supplied to `" + a + "`, expected one of " + y + "."));
}
return M(o);
}
function J(e) {
function o(l, u, a, p, c) {
if (typeof e != "function") return new C("Property `" + c + "` of component `" + a + "` has invalid PropType notation inside objectOf.");
var s = l[u], b = D(s);
if (b !== "object") return new C("Invalid " + p + " `" + c + "` of type " + ("`" + b + "` supplied to `" + a + "`, expected an object."));
for (var y in s) if (d(s, y)) {
var m = e(s, y, a, p, c + "." + y, h);
if (m instanceof Error) return m;
}
return null;
}
return M(o);
}
function N(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && f("Invalid argument supplied to oneOfType, expected an instance of array."), _;
for (var o = 0; o < e.length; o++) {
var l = e[o];
if (typeof l != "function")
return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + K(l) + " at index " + o + "."), _;
}
function u(a, p, c, s, b) {
for (var y = [], m = 0; m < e.length; m++) {
var t = e[m], I = t(a, p, c, s, b, h);
if (I == null) return null;
I.data && d(I.data, "expectedType") && y.push(I.data.expectedType);
}
var q = y.length > 0 ? ", expected one of type [" + y.join(", ") + "]" : "";
return new C("Invalid " + s + " `" + b + "` supplied to " + ("`" + c + "`" + q + "."));
}
return M(u);
}
function X() {
function e(o, l, u, a, p) {
return z(o[l]) ? null : new C("Invalid " + a + " `" + p + "` supplied to " + ("`" + u + "`, expected a ReactNode."));
}
return M(e);
}
function F(e, o, l, u, a) {
return new C((e || "React class") + ": " + o + " type `" + l + "." + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + a + "`.");
}
function G(e) {
function o(l, u, a, p, c) {
var s = l[u], b = D(s);
if (b !== "object") return new C("Invalid " + p + " `" + c + "` of type `" + b + "` " + ("supplied to `" + a + "`, expected `object`."));
for (var y in e) {
var m = e[y];
if (typeof m != "function") return F(a, p, c, y, L(m));
var t = m(s, y, a, p, c + "." + y, h);
if (t) return t;
}
return null;
}
return M(o);
}
function H(e) {
function o(l, u, a, p, c) {
var s = l[u], b = D(s);
if (b !== "object") return new C("Invalid " + p + " `" + c + "` of type `" + b + "` " + ("supplied to `" + a + "`, expected `object`."));
for (var y in w({}, l[u], e)) {
var m = e[y];
if (d(e, y) && typeof m != "function") return F(a, p, c, y, L(m));
if (!m) return new C("Invalid " + p + " `" + c + "` key `" + y + "` supplied to `" + a + "`.\nBad object: " + JSON.stringify(l[u], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(e), null, " "));
var t = m(s, y, a, p, c + "." + y, h);
if (t) return t;
}
return null;
}
return M(o);
}
function z(e) {
switch (typeof e) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !e;
case "object":
if (Array.isArray(e)) return e.every(z);
if (e === null || v(e)) return !0;
var o = R(e);
if (o) {
var l = o.call(e), u;
if (o !== e.entries) {
for (; !(u = l.next()).done; ) if (!z(u.value)) return !1;
} else for (; !(u = l.next()).done; ) {
var a = u.value;
if (a && !z(a[1]))
return !1;
}
} else return !1;
return !0;
default:
return !1;
}
}
function Z(e, o) {
return e === "symbol" ? !0 : o ? o["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && o instanceof Symbol : !1;
}
function D(e) {
var o = typeof e;
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Z(o, e) ? "symbol" : o;
}
function L(e) {
if (typeof e > "u" || e === null) return "" + e;
var o = D(e);
if (o === "object") {
if (e instanceof Date) return "date";
if (e instanceof RegExp) return "regexp";
}
return o;
}
function K(e) {
var o = L(e);
switch (o) {
case "array":
case "object":
return "an " + o;
case "boolean":
case "date":
case "regexp":
return "a " + o;
default:
return o;
}
}
function x(e) {
return !e.constructor || !e.constructor.name ? S : e.constructor.name;
}
return A.checkPropTypes = g, A.resetWarningCache = g.resetWarningCache, A.PropTypes = A, A;
};
})), ce = /* @__PURE__ */ k(((r, i) => {
var P = Q();
function w() {
}
function h() {
}
h.resetWarningCache = w, i.exports = function() {
function d(_, v, T, E, O, R) {
if (R !== P) {
var S = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
throw S.name = "Invariant Violation", S;
}
}
d.isRequired = d;
function g() {
return d;
}
var f = {
array: d,
bigint: d,
bool: d,
func: d,
number: d,
object: d,
string: d,
symbol: d,
any: d,
arrayOf: g,
element: d,
elementType: d,
instanceOf: g,
node: d,
objectOf: g,
oneOf: g,
oneOfType: g,
shape: g,
exact: g,
checkPropTypes: h,
resetWarningCache: w
};
return f.PropTypes = f, f;
};
})), se = /* @__PURE__ */ k(((r, i) => {
if (process.env.NODE_ENV !== "production") {
var P = re(), w = !0;
i.exports = fe()(P.isElement, w);
} else i.exports = ce()();
}));
export {
se as t
};