UNPKG

@alfan-ui/core

Version:

694 lines (693 loc) 28.8 kB
import v from "react"; var b = "colors", x = "sizes", l = "space", ne = { gap: l, gridGap: l, columnGap: l, gridColumnGap: l, rowGap: l, gridRowGap: l, inset: l, insetBlock: l, insetBlockEnd: l, insetBlockStart: l, insetInline: l, insetInlineEnd: l, insetInlineStart: l, margin: l, marginTop: l, marginRight: l, marginBottom: l, marginLeft: l, marginBlock: l, marginBlockEnd: l, marginBlockStart: l, marginInline: l, marginInlineEnd: l, marginInlineStart: l, padding: l, paddingTop: l, paddingRight: l, paddingBottom: l, paddingLeft: l, paddingBlock: l, paddingBlockEnd: l, paddingBlockStart: l, paddingInline: l, paddingInlineEnd: l, paddingInlineStart: l, top: l, right: l, bottom: l, left: l, scrollMargin: l, scrollMarginTop: l, scrollMarginRight: l, scrollMarginBottom: l, scrollMarginLeft: l, scrollMarginX: l, scrollMarginY: l, scrollMarginBlock: l, scrollMarginBlockEnd: l, scrollMarginBlockStart: l, scrollMarginInline: l, scrollMarginInlineEnd: l, scrollMarginInlineStart: l, scrollPadding: l, scrollPaddingTop: l, scrollPaddingRight: l, scrollPaddingBottom: l, scrollPaddingLeft: l, scrollPaddingX: l, scrollPaddingY: l, scrollPaddingBlock: l, scrollPaddingBlockEnd: l, scrollPaddingBlockStart: l, scrollPaddingInline: l, scrollPaddingInlineEnd: l, scrollPaddingInlineStart: l, fontSize: "fontSizes", background: b, backgroundColor: b, backgroundImage: b, borderImage: b, border: b, borderBlock: b, borderBlockEnd: b, borderBlockStart: b, borderBottom: b, borderBottomColor: b, borderColor: b, borderInline: b, borderInlineEnd: b, borderInlineStart: b, borderLeft: b, borderLeftColor: b, borderRight: b, borderRightColor: b, borderTop: b, borderTopColor: b, caretColor: b, color: b, columnRuleColor: b, fill: b, outline: b, outlineColor: b, stroke: b, textDecorationColor: b, fontFamily: "fonts", fontWeight: "fontWeights", lineHeight: "lineHeights", letterSpacing: "letterSpacings", blockSize: x, minBlockSize: x, maxBlockSize: x, inlineSize: x, minInlineSize: x, maxInlineSize: x, width: x, minWidth: x, maxWidth: x, height: x, minHeight: x, maxHeight: x, flexBasis: x, gridTemplateColumns: x, gridTemplateRows: x, borderWidth: "borderWidths", borderTopWidth: "borderWidths", borderRightWidth: "borderWidths", borderBottomWidth: "borderWidths", borderLeftWidth: "borderWidths", borderStyle: "borderStyles", borderTopStyle: "borderStyles", borderRightStyle: "borderStyles", borderBottomStyle: "borderStyles", borderLeftStyle: "borderStyles", borderRadius: "radii", borderTopLeftRadius: "radii", borderTopRightRadius: "radii", borderBottomRightRadius: "radii", borderBottomLeftRadius: "radii", boxShadow: "shadows", textShadow: "shadows", transition: "transitions", zIndex: "zIndices" }, oe = (e, t) => typeof t == "function" ? { "()": Function.prototype.toString.call(t) } : t, L = () => { const e = /* @__PURE__ */ Object.create(null); return (t, n, ...r) => { const i = ((o) => JSON.stringify(o, oe))(t); return i in e ? e[i] : e[i] = n(t, ...r); }; }, w = Symbol.for("sxs.internal"), Z = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), q = (e) => { for (const t in e) return !0; return !1; }, { hasOwnProperty: ie } = Object.prototype, U = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), le = /\s+(?![^()]*\))/, M = (e) => (t) => e(...typeof t == "string" ? String(t).split(le) : [t]), X = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: M((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e })), marginInline: M((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e })), maxSize: M((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e })), minSize: M((e, t) => ({ minBlockSize: e, minInlineSize: t || e })), paddingBlock: M((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e })), paddingInline: M((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e })) }, J = /([\d.]+)([^]*)/, se = (e, t) => e.length ? e.reduce((n, r) => (n.push(...t.map((i) => i.includes("&") ? i.replace(/&/g, /[ +>|~]/.test(r) && /&.*&/.test(i) ? `:is(${r})` : r) : r + " " + i)), n), []) : t, ae = (e, t) => e in ce && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, (n, r, i, o) => r + (i === "stretch" ? `-moz-available${o};${U(e)}:${r}-webkit-fill-available` : `-moz-fit-content${o};${U(e)}:${r}fit-content`) + o) : String(t), ce = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, j = (e) => e ? e + "-" : "", te = (e, t, n) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, (r, i, o, d, c) => d == "$" == !!o ? r : (i || d == "--" ? "calc(" : "") + "var(--" + (d === "$" ? j(t) + (c.includes("$") ? "" : j(n)) + c.replace(/\$/g, "-") : c) + ")" + (i || d == "--" ? "*" + (i || "") + (o || "1") + ")" : "")), de = /\s*,\s*(?![^()]*\))/, ge = Object.prototype.toString, P = (e, t, n, r, i) => { let o, d, c; const s = (m, p, h) => { let a, g; const f = (S) => { for (a in S) { const y = a.charCodeAt(0) === 64, V = y && Array.isArray(S[a]) ? S[a] : [S[a]]; for (g of V) { const I = /[A-Z]/.test(u = a) ? u : u.replace(/-[^]/g, ($) => $[1].toUpperCase()), O = typeof g == "object" && g && g.toString === ge && (!r.utils[I] || !p.length); if (I in r.utils && !O) { const $ = r.utils[I]; if ($ !== d) { d = $, f($(g)), d = null; continue; } } else if (I in X) { const $ = X[I]; if ($ !== c) { c = $, f($(g)), c = null; continue; } } if (y && (k = a.slice(1) in r.media ? "@media " + r.media[a.slice(1)] : a, a = k.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, ($, B, z, E, R, W) => { const C = J.test(B), N = 0.0625 * (C ? -1 : 1), [F, Y] = C ? [E, B] : [B, E]; return "(" + (z[0] === "=" ? "" : z[0] === ">" === C ? "max-" : "min-") + F + ":" + (z[0] !== "=" && z.length === 1 ? Y.replace(J, (re, H, G) => Number(H) + N * (z === ">" ? 1 : -1) + G) : Y) + (R ? ") and (" + (R[0] === ">" ? "min-" : "max-") + F + ":" + (R.length === 1 ? W.replace(J, (re, H, G) => Number(H) + N * (R === ">" ? -1 : 1) + G) : W) : "") + ")"; })), O) { const $ = y ? h.concat(a) : [...h], B = y ? [...p] : se(p, a.split(de)); o !== void 0 && i(K(...o)), o = void 0, s(g, B, $); } else o === void 0 && (o = [[], p, h]), a = y || a.charCodeAt(0) !== 36 ? a : `--${j(r.prefix)}${a.slice(1).replace(/\$/g, "-")}`, g = O ? g : typeof g == "number" ? g && I in me ? String(g) + "px" : String(g) : te(ae(I, g ?? ""), r.prefix, r.themeMap[I]), o[0].push(`${y ? `${a} ` : `${U(a)}:`}${g}`); } } var k, u; }; f(m), o !== void 0 && i(K(...o)), o = void 0; }; s(e, t, n); }, K = (e, t, n) => `${n.map((r) => `${r}{`).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(n.length ? n.length + 1 : 0).join("}")}`, me = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, Q = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), T = (e) => ((t) => { let n, r = ""; for (n = Math.abs(t); n > 52; n = n / 52 | 0) r = Q(n % 52) + r; return Q(n % 52) + r; })(((t, n) => { let r = n.length; for (; r; ) t = 33 * t ^ n.charCodeAt(--r); return t; })(5381, JSON.stringify(e)) >>> 0), D = ["themed", "global", "styled", "onevar", "resonevar", "allvar", "inline"], he = (e) => { if (e.href && !e.href.startsWith(location.origin)) return !1; try { return !!e.cssRules; } catch { return !1; } }, pe = (e) => { let t; const n = () => { const { cssRules: i } = t.sheet; return [].map.call(i, (o, d) => { const { cssText: c } = o; let s = ""; if (c.startsWith("--sxs")) return ""; if (i[d - 1] && (s = i[d - 1].cssText).startsWith("--sxs")) { if (!o.cssRules.length) return ""; for (const m in t.rules) if (t.rules[m].group === o) return `--sxs{--sxs:${[...t.rules[m].cache].join(" ")}}${c}`; return o.cssRules.length ? `${s}${c}` : ""; } return c; }).join(""); }, r = () => { if (t) { const { rules: c, sheet: s } = t; if (!s.deleteRule) { for (; Object(Object(s.cssRules)[0]).type === 3; ) s.cssRules.splice(0, 1); s.cssRules = []; } for (const m in c) delete c[m]; } const i = Object(e).styleSheets || []; for (const c of i) if (he(c)) { for (let s = 0, m = c.cssRules; m[s]; ++s) { const p = Object(m[s]); if (p.type !== 1) continue; const h = Object(m[s + 1]); if (h.type !== 4) continue; ++s; const { cssText: a } = p; if (!a.startsWith("--sxs")) continue; const g = a.slice(14, -3).trim().split(/\s+/), f = D[g[0]]; f && (t || (t = { sheet: c, reset: r, rules: {}, toString: n }), t.rules[f] = { group: h, index: s, cache: new Set(g) }); } if (t) break; } if (!t) { const c = (s, m) => ({ type: m, cssRules: [], insertRule(p, h) { this.cssRules.splice(h, 0, c(p, { import: 3, undefined: 1 }[(p.toLowerCase().match(/^@([a-z]+)/) || [])[1]] || 4)); }, get cssText() { return s === "@media{}" ? `@media{${[].map.call(this.cssRules, (p) => p.cssText).join("")}}` : s; } }); t = { sheet: e ? (e.head || e).appendChild(document.createElement("style")).sheet : c("", "text/css"), rules: {}, reset: r, toString: n }; } const { sheet: o, rules: d } = t; for (let c = D.length - 1; c >= 0; --c) { const s = D[c]; if (!d[s]) { const m = D[c + 1], p = d[m] ? d[m].index : o.cssRules.length; o.insertRule("@media{}", p), o.insertRule(`--sxs{--sxs:${c}}`, p), d[s] = { group: o.cssRules[p + 1], index: p, cache: /* @__PURE__ */ new Set([c]) }; } ue(d[s]); } }; return r(), t; }, ue = (e) => { const t = e.group; let n = t.cssRules.length; e.apply = (r) => { try { t.insertRule(r, n), ++n; } catch { } }; }, A = Symbol(), fe = L(), _ = (e, t) => fe(e, () => (...n) => { let r = { type: null, composers: /* @__PURE__ */ new Set() }; for (const i of n) if (i != null) if (i[w]) { r.type == null && (r.type = i[w].type); for (const o of i[w].composers) r.composers.add(o); } else i.constructor !== Object || i.$$typeof ? r.type == null && (r.type = i) : r.composers.add(be(i, e)); return r.type == null && (r.type = "span"), r.composers.size || r.composers.add(["PJLV", {}, [], [], {}, []]), Se(e, r, t); }), be = ({ variants: e, compoundVariants: t, defaultVariants: n, ...r }, i) => { const o = `${j(i.prefix)}c-${T(r)}`, d = [], c = [], s = /* @__PURE__ */ Object.create(null), m = []; for (const a in n) s[a] = String(n[a]); if (typeof e == "object" && e) for (const a in e) { p = s, h = a, ie.call(p, h) || (s[a] = "undefined"); const g = e[a]; for (const f in g) { const S = { [a]: String(f) }; String(f) === "undefined" && m.push(a); const k = g[f], u = [S, k, !q(k)]; d.push(u); } } var p, h; if (typeof t == "object" && t) for (const a of t) { let { css: g, ...f } = a; g = typeof g == "object" && g || {}; for (const k in f) f[k] = String(f[k]); const S = [f, g, !q(g)]; c.push(S); } return [o, r, d, c, s, m]; }, Se = (e, t, n) => { const [r, i, o, d] = ye(t.composers), c = typeof t.type == "function" || t.type.$$typeof ? ((h) => { function a() { for (let g = 0; g < a[A].length; g++) { const [f, S] = a[A][g]; h.rules[f].apply(S); } return a[A] = [], null; } return a[A] = [], a.rules = {}, D.forEach((g) => a.rules[g] = { apply: (f) => a[A].push([g, f]) }), a; })(n) : null, s = (c || n).rules, m = `.${r}${i.length > 1 ? `:where(.${i.slice(1).join(".")})` : ""}`, p = (h) => { h = typeof h == "object" && h || ke; const { css: a, ...g } = h, f = {}; for (const u in o) if (delete g[u], u in h) { let y = h[u]; typeof y == "object" && y ? f[u] = { "@initial": o[u], ...y } : (y = String(y), f[u] = y !== "undefined" || d.has(u) ? y : o[u]); } else f[u] = o[u]; const S = /* @__PURE__ */ new Set([...i]); for (const [u, y, V, I] of t.composers) { n.rules.styled.cache.has(u) || (n.rules.styled.cache.add(u), P(y, [`.${u}`], [], e, (B) => { s.styled.apply(B); })); const O = ee(V, f, e.media), $ = ee(I, f, e.media, !0); for (const B of O) if (B !== void 0) for (const [z, E, R] of B) { const W = `${u}-${T(E)}-${z}`; S.add(W); const C = (R ? n.rules.resonevar : n.rules.onevar).cache, N = R ? s.resonevar : s.onevar; C.has(W) || (C.add(W), P(E, [`.${W}`], [], e, (F) => { N.apply(F); })); } for (const B of $) if (B !== void 0) for (const [z, E] of B) { const R = `${u}-${T(E)}-${z}`; S.add(R), n.rules.allvar.cache.has(R) || (n.rules.allvar.cache.add(R), P(E, [`.${R}`], [], e, (W) => { s.allvar.apply(W); })); } } if (typeof a == "object" && a) { const u = `${r}-i${T(a)}-css`; S.add(u), n.rules.inline.cache.has(u) || (n.rules.inline.cache.add(u), P(a, [`.${u}`], [], e, (y) => { s.inline.apply(y); })); } for (const u of String(h.className || "").trim().split(/\s+/)) u && S.add(u); const k = g.className = [...S].join(" "); return { type: t.type, className: k, selector: m, props: g, toString: () => k, deferredInjector: c }; }; return Z(p, { className: r, selector: m, [w]: t, toString: () => (n.rules.styled.cache.has(r) || p(), r) }); }, ye = (e) => { let t = ""; const n = [], r = {}, i = []; for (const [o, , , , d, c] of e) { t === "" && (t = o), n.push(o), i.push(...c); for (const s in d) { const m = d[s]; (r[s] === void 0 || m !== "undefined" || c.includes(m)) && (r[s] = m); } } return [t, n, r, new Set(i)]; }, ee = (e, t, n, r) => { const i = []; e: for (let [o, d, c] of e) { if (c) continue; let s, m = 0, p = !1; for (s in o) { const h = o[s]; let a = t[s]; if (a !== h) { if (typeof a != "object" || !a) continue e; { let g, f, S = 0; for (const k in a) { if (h === String(a[k])) { if (k !== "@initial") { const u = k.slice(1); (f = f || []).push(u in n ? n[u] : k.replace(/^@media ?/, "")), p = !0; } m += S, g = !0; } ++S; } if (f && f.length && (d = { ["@media " + f.join(", ")]: d }), !g) continue e; } } } (i[m] = i[m] || []).push([r ? "cv" : `${s}-${o[s]}`, d, p]); } return i; }, ke = {}, xe = L(), $e = (e, t) => xe(e, () => (...n) => { const r = () => { for (let i of n) { i = typeof i == "object" && i || {}; let o = T(i); if (!t.rules.global.cache.has(o)) { if (t.rules.global.cache.add(o), "@import" in i) { let d = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1; for (let c of [].concat(i["@import"])) c = c.includes('"') || c.includes("'") ? c : `"${c}"`, t.sheet.insertRule(`@import ${c};`, d++); delete i["@import"]; } P(i, [], [], e, (d) => { t.rules.global.apply(d); }); } } return ""; }; return Z(r, { toString: r }); }), Be = L(), Re = (e, t) => Be(e, () => (n) => { const r = `${j(e.prefix)}k-${T(n)}`, i = () => { if (!t.rules.global.cache.has(r)) { t.rules.global.cache.add(r); const o = []; P(n, [], [], e, (c) => o.push(c)); const d = `@keyframes ${r}{${o.join("")}}`; t.rules.global.apply(d); } return r; }; return Z(i, { get name() { return i(); }, toString: i }); }), Ie = class { constructor(e, t, n, r) { this.token = e == null ? "" : String(e), this.value = t == null ? "" : String(t), this.scale = n == null ? "" : String(n), this.prefix = r == null ? "" : String(r); } get computedValue() { return "var(" + this.variable + ")"; } get variable() { return "--" + j(this.prefix) + j(this.scale) + this.token; } toString() { return this.computedValue; } }, ze = L(), We = (e, t) => ze(e, () => (n, r) => { r = typeof n == "object" && n || Object(r); const i = `.${n = (n = typeof n == "string" ? n : "") || `${j(e.prefix)}t-${T(r)}`}`, o = {}, d = []; for (const s in r) { o[s] = {}; for (const m in r[s]) { const p = `--${j(e.prefix)}${s}-${m}`, h = te(String(r[s][m]), e.prefix, s); o[s][m] = new Ie(m, h, s, e.prefix), d.push(`${p}:${h}`); } } const c = () => { if (d.length && !t.rules.themed.cache.has(n)) { t.rules.themed.cache.add(n); const s = `${r === e.theme ? ":root," : ""}.${n}{${d.join(";")}}`; t.rules.themed.apply(s); } return n; }; return { ...o, get className() { return c(); }, selector: i, toString: c }; }), je = L(), Ee = L(), we = (e) => { const t = ((n) => { let r = !1; const i = je(n, (o) => { r = !0; const d = "prefix" in (o = typeof o == "object" && o || {}) ? String(o.prefix) : "", c = typeof o.media == "object" && o.media || {}, s = typeof o.root == "object" ? o.root || null : globalThis.document || null, m = typeof o.theme == "object" && o.theme || {}, p = { prefix: d, media: c, theme: m, themeMap: typeof o.themeMap == "object" && o.themeMap || { ...ne }, utils: typeof o.utils == "object" && o.utils || {} }, h = pe(s), a = { css: _(p, h), globalCss: $e(p, h), keyframes: Re(p, h), createTheme: We(p, h), reset() { h.reset(), a.theme.toString(); }, theme: {}, sheet: h, config: p, prefix: d, getCssText: h.toString, toString: h.toString }; return String(a.theme = a.createTheme(m)), a; }); return r || i.reset(), i; })(e); return t.styled = (({ config: n, sheet: r }) => Ee(n, () => { const i = _(n, r); return (...o) => { const d = i(...o), c = d[w].type, s = v.forwardRef((m, p) => { const h = m && m.as || c, { props: a, deferredInjector: g } = d(m); return delete a.as, a.ref = p, g ? v.createElement(v.Fragment, null, v.createElement(h, a), v.createElement(g, null)) : v.createElement(h, a); }); return s.className = d.className, s.displayName = `Styled.${c.displayName || c.name || c}`, s.selector = d.selector, s.toString = () => d.selector, s[w] = d[w], s; }; }))(t), t; }; const Te = { sm: "(min-width: 640px)", md: "(min-width: 768px)", lg: "(min-width: 1024px)", xl: "(min-width: 1280px)", xxl: "(min-width: 1536px)" }, Ce = { blue1: "hsl(212, 35.0%, 9.2%)", blue2: "hsl(216, 50.0%, 11.8%)", blue3: "hsl(214, 59.4%, 15.3%)", blue4: "hsl(214, 65.8%, 17.9%)", blue5: "hsl(213, 71.2%, 20.2%)", blue6: "hsl(212, 77.4%, 23.1%)", blue7: "hsl(211, 85.1%, 27.4%)", blue8: "hsl(211, 89.7%, 34.1%)", blue9: "hsl(206, 100%, 50.0%)", blue10: "hsl(209, 100%, 60.6%)", blue11: "hsl(210, 100%, 66.1%)", blue12: "hsl(206, 98.0%, 95.8%)" }, ve = { gray1: "hsl(0, 0%, 8.5%)", gray2: "hsl(0, 0%, 11.0%)", gray3: "hsl(0, 0%, 13.6%)", gray4: "hsl(0, 0%, 15.8%)", gray5: "hsl(0, 0%, 17.9%)", gray6: "hsl(0, 0%, 20.5%)", gray7: "hsl(0, 0%, 24.3%)", gray8: "hsl(0, 0%, 31.2%)", gray9: "hsl(0, 0%, 43.9%)", gray10: "hsl(0, 0%, 49.4%)", gray11: "hsl(0, 0%, 62.8%)", gray12: "hsl(0, 0%, 93.0%)" }, Me = { green1: "hsl(146, 30.0%, 7.4%)", green2: "hsl(155, 44.2%, 8.4%)", green3: "hsl(155, 46.7%, 10.9%)", green4: "hsl(154, 48.4%, 12.9%)", green5: "hsl(154, 49.7%, 14.9%)", green6: "hsl(154, 50.9%, 17.6%)", green7: "hsl(153, 51.8%, 21.8%)", green8: "hsl(151, 51.7%, 28.4%)", green9: "hsl(151, 55.0%, 41.5%)", green10: "hsl(151, 49.3%, 46.5%)", green11: "hsl(151, 50.0%, 53.2%)", green12: "hsl(137, 72.0%, 94.0%)" }, Pe = { blue1: "hsl(206, 100%, 99.2%)", blue2: "hsl(210, 100%, 98.0%)", blue3: "hsl(209, 100%, 96.5%)", blue4: "hsl(210, 98.8%, 94.0%)", blue5: "hsl(209, 95.0%, 90.1%)", blue6: "hsl(209, 81.2%, 84.5%)", blue7: "hsl(208, 77.5%, 76.9%)", blue8: "hsl(206, 81.9%, 65.3%)", blue9: "hsl(206, 100%, 50.0%)", blue10: "hsl(208, 100%, 47.3%)", blue11: "hsl(211, 100%, 43.2%)", blue12: "hsl(211, 100%, 15.0%)" }, Le = { gray1: "hsl(0, 0%, 99.0%)", gray2: "hsl(0, 0%, 97.3%)", gray3: "hsl(0, 0%, 95.1%)", gray4: "hsl(0, 0%, 93.0%)", gray5: "hsl(0, 0%, 90.9%)", gray6: "hsl(0, 0%, 88.7%)", gray7: "hsl(0, 0%, 85.8%)", gray8: "hsl(0, 0%, 78.0%)", gray9: "hsl(0, 0%, 56.1%)", gray10: "hsl(0, 0%, 52.3%)", gray11: "hsl(0, 0%, 43.5%)", gray12: "hsl(0, 0%, 9.0%)" }, Oe = { green1: "hsl(136, 50.0%, 98.9%)", green2: "hsl(138, 62.5%, 96.9%)", green3: "hsl(139, 55.2%, 94.5%)", green4: "hsl(140, 48.7%, 91.0%)", green5: "hsl(141, 43.7%, 86.0%)", green6: "hsl(143, 40.3%, 79.0%)", green7: "hsl(146, 38.5%, 69.0%)", green8: "hsl(151, 40.2%, 54.1%)", green9: "hsl(151, 55.0%, 41.5%)", green10: "hsl(152, 57.5%, 37.6%)", green11: "hsl(153, 67.0%, 28.5%)", green12: "hsl(155, 40.0%, 14.0%)" }, Ae = { transparent: "transparent", black: "#00000", white: "#FFFFF" }, De = { ...Pe, ...Le, ...Oe }, Ne = { ...Ce, ...ve, ...Me }, qe = (e) => ({ ...Ae, ...{ dark: De, light: Ne }[e] }), Fe = { none: "0", xs: "0.1rem", sm: "0.125rem", base: "0.25rem", md: "0.375rem", lg: "0.5rem", xl: "0.75rem", "2xl": "1rem", "3xl": "1.5rem", full: "9999px" }, Ve = { 0.5: "0.125rem", 1: "0.25rem", 1.5: "0.375rem", 2: "0.5rem", 2.5: "0.625rem", 3: "0.75rem", 3.5: "0.875rem", 4: "1rem", 5: "1.25rem", 6: "1.5rem", 7: "1.75rem", 8: "2rem", 9: "2.25rem", 10: "2.5rem", 12: "3rem", 14: "3.5rem", 16: "4rem", 20: "5rem", 24: "6rem", 28: "7rem", 32: "8rem", 36: "9rem", 40: "10rem", 44: "11rem", 48: "12rem", 52: "13rem", 56: "14rem", 60: "15rem", 64: "16rem", 72: "18rem", 80: "20rem", 96: "24rem" }, He = { "3xs": "0.45rem", "2xs": "0.625rem", xs: "0.75rem", sm: "0.875rem", md: "1rem", lg: "1.125rem", xl: "1.25rem", "2xl": "1.5rem", "3xl": "1.875rem", "4xl": "2.25rem", "5xl": "3rem", "6xl": "3.75rem", "7xl": "4.5rem", "8xl": "6rem", "9xl": "8rem" }, Ge = { m: (e) => ({ margin: e }), mt: (e) => ({ marginTop: e }), mb: (e) => ({ marginBottom: e }), my: (e) => ({ marginTop: e, marginBottom: e }), ml: (e) => ({ marginLeft: e }), mr: (e) => ({ marginRight: e }), mx: (e) => ({ marginLeft: e, marginRight: e }), p: (e) => ({ padding: e }), pt: (e) => ({ paddingTop: e }), pb: (e) => ({ paddingBottom: e }), py: (e) => ({ paddingTop: e, paddingBottom: e }), pl: (e) => ({ paddingLeft: e }), pr: (e) => ({ paddingRight: e }), px: (e) => ({ paddingLeft: e, paddingRight: e }) }, { config: Xe, createTheme: Ke, css: Je, getCssText: Qe, globalCss: _e, keyframes: et, prefix: tt, reset: rt, styled: Ue, theme: nt } = we({ media: Te, utils: Ge, theme: { space: Ve, radii: Fe, fontSizes: He } }), Ze = Je({ variants: { variant: { solid: {} }, color: { blue: {} }, size: { xs: { px: "$2", py: "$1", fontSize: "$xs" }, sm: { px: "$4", py: "$2", fontSize: "$sm" }, md: { px: "$5", py: "$3", fontSize: "$md" }, lg: { px: "$6", py: "$4", fontSize: "$lg" } }, rounded: { xs: { borderRadius: "$xs" }, sm: { borderRadius: "$sm" }, md: { borderRadius: "$md" }, lg: { borderRadius: "$lg" }, full: { borderRadius: "$full" } } }, compoundVariants: [ { variant: "solid", color: "blue", css: { backgroundColor: "$blue3", color: "$gray12", "&:hover": { backgroundColor: "$blue4" }, "&:active": { backgroundColor: "$blue5" } } } ], transitionDuration: "500ms", defaultVariants: { variant: "solid", color: "blue", rounded: "md", size: "md" } }), ot = Ue("button", Ze); export { ot as Button, Te as breakpoints, Xe as config, Ke as createTheme, Je as css, Ne as darkColors, He as fontSizes, qe as getColors, Qe as getCssText, _e as globalCss, et as keyframes, De as lightColors, Ae as mainColors, tt as prefix, Fe as radius, rt as reset, Ve as spaces, Ue as styled, nt as theme };