@lanaco/lnc-react-ui
Version:
React component library
213 lines (212 loc) • 4.38 kB
JavaScript
import { w as z, _ as I, T as j, g as q, s as R, r as A, a as D, i as G } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
import * as c from "react";
import { i as U } from "./emotion-is-prop-valid.esm-CbWxtx4i.js";
var V = U, W = function(e) {
return e !== "theme";
}, T = function(e) {
return typeof e == "string" && // 96 is one less than the char code
// for "a" so this is checking that
// it's a lowercase character
e.charCodeAt(0) > 96 ? V : W;
}, O = function(e, t, s) {
var r;
if (t) {
var i = t.shouldForwardProp;
r = e.__emotion_forwardProp && i ? function(d) {
return e.__emotion_forwardProp(d) && i(d);
} : i;
}
return typeof r != "function" && s && (r = e.__emotion_forwardProp), r;
}, B = function(e) {
var t = e.cache, s = e.serialized, r = e.isStringTag;
return A(t, s, r), D(function() {
return G(t, s, r);
}), null;
}, H = function o(e, t) {
var s = e.__emotion_real === e, r = s && e.__emotion_base || e, i, d;
t !== void 0 && (i = t.label, d = t.target);
var _ = O(e, t, s), w = _ || T(r), b = !w("as");
return function() {
var m = arguments, l = s && e.__emotion_styles !== void 0 ? e.__emotion_styles.slice(0) : [];
if (i !== void 0 && l.push("label:" + i + ";"), m[0] == null || m[0].raw === void 0)
l.push.apply(l, m);
else {
var S = m[0];
l.push(S[0]);
for (var k = m.length, p = 1; p < k; p++)
l.push(m[p], S[p]);
}
var n = z(function(a, u, v) {
var P = b && a.as || r, f = "", F = [], h = a;
if (a.theme == null) {
h = {};
for (var C in a)
h[C] = a[C];
h.theme = c.useContext(j);
}
typeof a.className == "string" ? f = q(u.registered, F, a.className) : a.className != null && (f = a.className + " ");
var N = R(l.concat(F), u.registered, h);
f += u.key + "-" + N.name, d !== void 0 && (f += " " + d);
var x = b && _ === void 0 ? T(P) : w, g = {};
for (var y in a)
b && y === "as" || x(y) && (g[y] = a[y]);
return g.className = f, v && (g.ref = v), /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement(B, {
cache: u,
serialized: N,
isStringTag: typeof P == "string"
}), /* @__PURE__ */ c.createElement(P, g));
});
return n.displayName = i !== void 0 ? i : "Styled(" + (typeof r == "string" ? r : r.displayName || r.name || "Component") + ")", n.defaultProps = e.defaultProps, n.__emotion_real = n, n.__emotion_base = r, n.__emotion_styles = l, n.__emotion_forwardProp = _, Object.defineProperty(n, "toString", {
value: function() {
return "." + d;
}
}), n.withComponent = function(a, u) {
var v = o(a, I({}, t, u, {
shouldForwardProp: O(n, u, !0)
}));
return v.apply(void 0, l);
}, n;
};
}, J = [
"a",
"abbr",
"address",
"area",
"article",
"aside",
"audio",
"b",
"base",
"bdi",
"bdo",
"big",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"cite",
"code",
"col",
"colgroup",
"data",
"datalist",
"dd",
"del",
"details",
"dfn",
"dialog",
"div",
"dl",
"dt",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"footer",
"form",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"kbd",
"keygen",
"label",
"legend",
"li",
"link",
"main",
"map",
"mark",
"marquee",
"menu",
"menuitem",
"meta",
"meter",
"nav",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"picture",
"pre",
"progress",
"q",
"rp",
"rt",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"small",
"source",
"span",
"strong",
"style",
"sub",
"summary",
"sup",
"table",
"tbody",
"td",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"u",
"ul",
"var",
"video",
"wbr",
// SVG
"circle",
"clipPath",
"defs",
"ellipse",
"foreignObject",
"g",
"image",
"line",
"linearGradient",
"mask",
"path",
"pattern",
"polygon",
"polyline",
"radialGradient",
"rect",
"stop",
"svg",
"text",
"tspan"
], E = H.bind(null);
J.forEach(function(o) {
E[o] = E(o);
});
export {
E as n
};