UNPKG

tailwind-sidebar

Version:

React Tailwind Sidebar helps to create side Navigation.

1,730 lines (1,729 loc) 216 kB
import * as u from "react"; import gt, { forwardRef as tr, createElement as zt, useState as Lo, useLayoutEffect as Io, useContext as nr } from "react"; import * as rr from "react-dom"; import Fo from "react-dom"; var Qe = { exports: {} }, Ve = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var wn; function $o() { if (wn) return Ve; wn = 1; var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment"); function n(r, o, s) { var i = null; if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) { s = {}; for (var a in o) a !== "key" && (s[a] = o[a]); } else s = o; return o = s.ref, { $$typeof: e, type: r, key: i, ref: o !== void 0 ? o : null, props: s }; } return Ve.Fragment = t, Ve.jsx = n, Ve.jsxs = n, Ve; } var He = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Cn; function zo() { return Cn || (Cn = 1, process.env.NODE_ENV !== "production" && (function() { function e(w) { if (w == null) return null; if (typeof w == "function") return w.$$typeof === z ? null : w.displayName || w.name || null; if (typeof w == "string") return w; switch (w) { case m: return "Fragment"; case b: return "Profiler"; case x: return "StrictMode"; case S: return "Suspense"; case O: return "SuspenseList"; case M: return "Activity"; } if (typeof w == "object") switch (typeof w.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), w.$$typeof) { case v: return "Portal"; case C: return (w.displayName || "Context") + ".Provider"; case y: return (w._context.displayName || "Context") + ".Consumer"; case R: var N = w.render; return w = w.displayName, w || (w = N.displayName || N.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w; case A: return N = w.displayName || null, N !== null ? N : e(w.type) || "Memo"; case k: N = w._payload, w = w._init; try { return e(w(N)); } catch { } } return null; } function t(w) { return "" + w; } function n(w) { try { t(w); var N = !1; } catch { N = !0; } if (N) { N = console; var F = N.error, j = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object"; return F.call( N, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", j ), t(w); } } function r(w) { if (w === m) return "<>"; if (typeof w == "object" && w !== null && w.$$typeof === k) return "<...>"; try { var N = e(w); return N ? "<" + N + ">" : "<...>"; } catch { return "<...>"; } } function o() { var w = U.A; return w === null ? null : w.getOwner(); } function s() { return Error("react-stack-top-frame"); } function i(w) { if (H.call(w, "key")) { var N = Object.getOwnPropertyDescriptor(w, "key").get; if (N && N.isReactWarning) return !1; } return w.key !== void 0; } function a(w, N) { function F() { G || (G = !0, console.error( "%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://react.dev/link/special-props)", N )); } F.isReactWarning = !0, Object.defineProperty(w, "key", { get: F, configurable: !0 }); } function l() { var w = e(this.type); return D[w] || (D[w] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), w = this.props.ref, w !== void 0 ? w : null; } function c(w, N, F, j, V, q, ve, $) { return F = q.ref, w = { $$typeof: h, type: w, key: N, props: q, _owner: V }, (F !== void 0 ? F : null) !== null ? Object.defineProperty(w, "ref", { enumerable: !1, get: l }) : Object.defineProperty(w, "ref", { enumerable: !1, value: null }), w._store = {}, Object.defineProperty(w._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(w, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(w, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: ve }), Object.defineProperty(w, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: $ }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w; } function d(w, N, F, j, V, q, ve, $) { var X = N.children; if (X !== void 0) if (j) if (B(X)) { for (j = 0; j < X.length; j++) f(X[j]); Object.freeze && Object.freeze(X); } else console.error( "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 f(X); if (H.call(N, "key")) { X = e(w); var Q = Object.keys(N).filter(function(Ce) { return Ce !== "key"; }); j = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", Y[X + j] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, j, X, Q, X ), Y[X + j] = !0); } if (X = null, F !== void 0 && (n(F), X = "" + F), i(N) && (n(N.key), X = "" + N.key), "key" in N) { F = {}; for (var ie in N) ie !== "key" && (F[ie] = N[ie]); } else F = N; return X && a( F, typeof w == "function" ? w.displayName || w.name || "Unknown" : w ), c( w, X, q, V, o(), F, ve, $ ); } function f(w) { typeof w == "object" && w !== null && w.$$typeof === h && w._store && (w._store.validated = 1); } var g = gt, h = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), C = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), U = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, H = Object.prototype.hasOwnProperty, B = Array.isArray, I = console.createTask ? console.createTask : function() { return null; }; g = { react_stack_bottom_frame: function(w) { return w(); } }; var G, D = {}, L = g.react_stack_bottom_frame.bind( g, s )(), E = I(r(s)), Y = {}; He.Fragment = m, He.jsx = function(w, N, F, j, V) { var q = 1e4 > U.recentlyCreatedOwnerStacks++; return d( w, N, F, !1, j, V, q ? Error("react-stack-top-frame") : L, q ? I(r(w)) : E ); }, He.jsxs = function(w, N, F, j, V) { var q = 1e4 > U.recentlyCreatedOwnerStacks++; return d( w, N, F, !0, j, V, q ? Error("react-stack-top-frame") : L, q ? I(r(w)) : E ); }; })()), He; } var En; function Wo() { return En || (En = 1, process.env.NODE_ENV === "production" ? Qe.exports = $o() : Qe.exports = zo()), Qe.exports; } var p = Wo(); function Rn(e, t) { if (typeof e == "function") return e(t); e != null && (e.current = t); } function or(...e) { return (t) => { let n = !1; const r = e.map((o) => { const s = Rn(o, t); return !n && typeof s == "function" && (n = !0), s; }); if (n) return () => { for (let o = 0; o < r.length; o++) { const s = r[o]; typeof s == "function" ? s() : Rn(e[o], null); } }; }; } function ne(...e) { return u.useCallback(or(...e), e); } // @__NO_SIDE_EFFECTS__ function Zt(e) { const t = /* @__PURE__ */ Bo(e), n = u.forwardRef((r, o) => { const { children: s, ...i } = r, a = u.Children.toArray(s), l = a.find(Ho); if (l) { const c = l.props.children, d = a.map((f) => f === l ? u.Children.count(c) > 1 ? u.Children.only(null) : u.isValidElement(c) ? c.props.children : null : f); return /* @__PURE__ */ p.jsx(t, { ...i, ref: o, children: u.isValidElement(c) ? u.cloneElement(c, void 0, d) : null }); } return /* @__PURE__ */ p.jsx(t, { ...i, ref: o, children: s }); }); return n.displayName = `${e}.Slot`, n; } var vt = /* @__PURE__ */ Zt("Slot"); // @__NO_SIDE_EFFECTS__ function Bo(e) { const t = u.forwardRef((n, r) => { const { children: o, ...s } = n; if (u.isValidElement(o)) { const i = Uo(o), a = Go(s, o.props); return o.type !== u.Fragment && (a.ref = r ? or(r, i) : i), u.cloneElement(o, a); } return u.Children.count(o) > 1 ? u.Children.only(null) : null; }); return t.displayName = `${e}.SlotClone`, t; } var sr = Symbol("radix.slottable"); // @__NO_SIDE_EFFECTS__ function Vo(e) { const t = ({ children: n }) => /* @__PURE__ */ p.jsx(p.Fragment, { children: n }); return t.displayName = `${e}.Slottable`, t.__radixId = sr, t; } function Ho(e) { return u.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === sr; } function Go(e, t) { const n = { ...t }; for (const r in t) { const o = e[r], s = t[r]; /^on[A-Z]/.test(r) ? o && s ? n[r] = (...a) => { const l = s(...a); return o(...a), l; } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" ")); } return { ...e, ...n }; } function Uo(e) { let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning; return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref); } function ir(e) { var t, n, r = ""; if (typeof e == "string" || typeof e == "number") r += e; else if (typeof e == "object") if (Array.isArray(e)) { var o = e.length; for (t = 0; t < o; t++) e[t] && (n = ir(e[t])) && (r && (r += " "), r += n); } else for (n in e) e[n] && (r && (r += " "), r += n); return r; } function pe() { for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = ir(e)) && (r && (r += " "), r += t); return r; } const Sn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, kn = pe, Jt = (e, t) => (n) => { var r; if (t?.variants == null) return kn(e, n?.class, n?.className); const { variants: o, defaultVariants: s } = t, i = Object.keys(o).map((c) => { const d = n?.[c], f = s?.[c]; if (d === null) return null; const g = Sn(d) || Sn(f); return o[c][g]; }), a = n && Object.entries(n).reduce((c, d) => { let [f, g] = d; return g === void 0 || (c[f] = g), c; }, {}), l = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((c, d) => { let { class: f, className: g, ...h } = d; return Object.entries(h).every((v) => { let [m, x] = v; return Array.isArray(x) ? x.includes({ ...s, ...a }[m]) : { ...s, ...a }[m] === x; }) ? [ ...c, f, g ] : c; }, []); return kn(e, i, l, n?.class, n?.className); }; /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Yo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xo = (e) => e.replace( /^([A-Z])|[\s-_]+(\w)/g, (t, n, r) => r ? r.toUpperCase() : n.toLowerCase() ), An = (e) => { const t = Xo(e); return t.charAt(0).toUpperCase() + t.slice(1); }, ar = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), Ko = (e) => { for (const t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0; }; /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var qo = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Zo = tr( ({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: o = "", children: s, iconNode: i, ...a }, l) => zt( "svg", { ref: l, ...qo, width: t, height: t, stroke: e, strokeWidth: r ? Number(n) * 24 / Number(t) : n, className: ar("lucide", o), ...!s && !Ko(a) && { "aria-hidden": "true" }, ...a }, [ ...i.map(([c, d]) => zt(c, d)), ...Array.isArray(s) ? s : [s] ] ) ); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Ie = (e, t) => { const n = tr( ({ className: r, ...o }, s) => zt(Zo, { ref: s, iconNode: t, className: ar( `lucide-${Yo(An(e))}`, `lucide-${e}`, r ), ...o }) ); return n.displayName = An(e), n; }; /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const Jo = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Qo = Ie("chevron-down", Jo); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const es = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], ts = Ie("chevron-right", es); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ns = [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }] ], lr = Ie("circle-dot", ns); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const rs = [ ["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }], ["path", { d: "M21 12H9", key: "dn1m92" }], ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }] ], os = Ie("log-out", rs); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ss = [ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], ["path", { d: "M9 3v18", key: "fh3hqa" }] ], is = Ie("panel-left", ss); /** * @license lucide-react v0.542.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const as = [ ["path", { d: "M18 6 6 18", key: "1bl5f8" }], ["path", { d: "m6 6 12 12", key: "d8bk6v" }] ], ls = Ie("x", as), Pt = 768; function cs() { const [e, t] = u.useState(void 0); return u.useEffect(() => { const n = window.matchMedia(`(max-width: ${Pt - 1}px)`), r = () => { t(window.innerWidth < Pt); }; return n.addEventListener("change", r), t(window.innerWidth < Pt), () => n.removeEventListener("change", r); }, []), !!e; } const Qt = "-", us = (e) => { const t = fs(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e; return { getClassGroupId: (i) => { const a = i.split(Qt); return a[0] === "" && a.length !== 1 && a.shift(), cr(a, t) || ds(i); }, getConflictingClassGroupIds: (i, a) => { const l = n[i] || []; return a && r[i] ? [...l, ...r[i]] : l; } }; }, cr = (e, t) => { if (e.length === 0) return t.classGroupId; const n = e[0], r = t.nextPart.get(n), o = r ? cr(e.slice(1), r) : void 0; if (o) return o; if (t.validators.length === 0) return; const s = e.join(Qt); return t.validators.find(({ validator: i }) => i(s))?.classGroupId; }, Pn = /^\[(.+)\]$/, ds = (e) => { if (Pn.test(e)) { const t = Pn.exec(e)[1], n = t?.substring(0, t.indexOf(":")); if (n) return "arbitrary.." + n; } }, fs = (e) => { const { theme: t, classGroups: n } = e, r = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; for (const o in n) Wt(n[o], r, o, t); return r; }, Wt = (e, t, n, r) => { e.forEach((o) => { if (typeof o == "string") { const s = o === "" ? t : Tn(t, o); s.classGroupId = n; return; } if (typeof o == "function") { if (ps(o)) { Wt(o(r), t, n, r); return; } t.validators.push({ validator: o, classGroupId: n }); return; } Object.entries(o).forEach(([s, i]) => { Wt(i, Tn(t, s), n, r); }); }); }, Tn = (e, t) => { let n = e; return t.split(Qt).forEach((r) => { n.nextPart.has(r) || n.nextPart.set(r, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), n = n.nextPart.get(r); }), n; }, ps = (e) => e.isThemeGetter, ms = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); const o = (s, i) => { n.set(s, i), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); }; return { get(s) { let i = n.get(s); if (i !== void 0) return i; if ((i = r.get(s)) !== void 0) return o(s, i), i; }, set(s, i) { n.has(s) ? n.set(s, i) : o(s, i); } }; }, Bt = "!", Vt = ":", hs = Vt.length, gs = (e) => { const { prefix: t, experimentalParseClassName: n } = e; let r = (o) => { const s = []; let i = 0, a = 0, l = 0, c; for (let v = 0; v < o.length; v++) { let m = o[v]; if (i === 0 && a === 0) { if (m === Vt) { s.push(o.slice(l, v)), l = v + hs; continue; } if (m === "/") { c = v; continue; } } m === "[" ? i++ : m === "]" ? i-- : m === "(" ? a++ : m === ")" && a--; } const d = s.length === 0 ? o : o.substring(l), f = vs(d), g = f !== d, h = c && c > l ? c - l : void 0; return { modifiers: s, hasImportantModifier: g, baseClassName: f, maybePostfixModifierPosition: h }; }; if (t) { const o = t + Vt, s = r; r = (i) => i.startsWith(o) ? s(i.substring(o.length)) : { isExternal: !0, modifiers: [], hasImportantModifier: !1, baseClassName: i, maybePostfixModifierPosition: void 0 }; } if (n) { const o = r; r = (s) => n({ className: s, parseClassName: o }); } return r; }, vs = (e) => e.endsWith(Bt) ? e.substring(0, e.length - 1) : e.startsWith(Bt) ? e.substring(1) : e, bs = (e) => { const t = Object.fromEntries(e.orderSensitiveModifiers.map((r) => [r, !0])); return (r) => { if (r.length <= 1) return r; const o = []; let s = []; return r.forEach((i) => { i[0] === "[" || t[i] ? (o.push(...s.sort(), i), s = []) : s.push(i); }), o.push(...s.sort()), o; }; }, xs = (e) => ({ cache: ms(e.cacheSize), parseClassName: gs(e), sortModifiers: bs(e), ...us(e) }), ys = /\s+/, ws = (e, t) => { const { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: o, sortModifiers: s } = t, i = [], a = e.trim().split(ys); let l = ""; for (let c = a.length - 1; c >= 0; c -= 1) { const d = a[c], { isExternal: f, modifiers: g, hasImportantModifier: h, baseClassName: v, maybePostfixModifierPosition: m } = n(d); if (f) { l = d + (l.length > 0 ? " " + l : l); continue; } let x = !!m, b = r(x ? v.substring(0, m) : v); if (!b) { if (!x) { l = d + (l.length > 0 ? " " + l : l); continue; } if (b = r(v), !b) { l = d + (l.length > 0 ? " " + l : l); continue; } x = !1; } const y = s(g).join(":"), C = h ? y + Bt : y, R = C + b; if (i.includes(R)) continue; i.push(R); const S = o(b, x); for (let O = 0; O < S.length; ++O) { const A = S[O]; i.push(C + A); } l = d + (l.length > 0 ? " " + l : l); } return l; }; function Cs() { let e = 0, t, n, r = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (n = ur(t)) && (r && (r += " "), r += n); return r; } const ur = (e) => { if (typeof e == "string") return e; let t, n = ""; for (let r = 0; r < e.length; r++) e[r] && (t = ur(e[r])) && (n && (n += " "), n += t); return n; }; function Es(e, ...t) { let n, r, o, s = i; function i(l) { const c = t.reduce((d, f) => f(d), e()); return n = xs(c), r = n.cache.get, o = n.cache.set, s = a, a(l); } function a(l) { const c = r(l); if (c) return c; const d = ws(l, n); return o(l, d), d; } return function() { return s(Cs.apply(null, arguments)); }; } const K = (e) => { const t = (n) => n[e] || []; return t.isThemeGetter = !0, t; }, dr = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, fr = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Rs = /^\d+\/\d+$/, Ss = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ks = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, As = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ps = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ts = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Pe = (e) => Rs.test(e), _ = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => !!e && Number.isInteger(Number(e)), Tt = (e) => e.endsWith("%") && _(e.slice(0, -1)), fe = (e) => Ss.test(e), Os = () => !0, Ns = (e) => ( // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. ks.test(e) && !As.test(e) ), pr = () => !1, _s = (e) => Ps.test(e), js = (e) => Ts.test(e), Ms = (e) => !P(e) && !T(e), Ds = (e) => Fe(e, gr, pr), P = (e) => dr.test(e), Ee = (e) => Fe(e, vr, Ns), Ot = (e) => Fe(e, zs, _), On = (e) => Fe(e, mr, pr), Ls = (e) => Fe(e, hr, js), et = (e) => Fe(e, br, _s), T = (e) => fr.test(e), Ge = (e) => $e(e, vr), Is = (e) => $e(e, Ws), Nn = (e) => $e(e, mr), Fs = (e) => $e(e, gr), $s = (e) => $e(e, hr), tt = (e) => $e(e, br, !0), Fe = (e, t, n) => { const r = dr.exec(e); return r ? r[1] ? t(r[1]) : n(r[2]) : !1; }, $e = (e, t, n = !1) => { const r = fr.exec(e); return r ? r[1] ? t(r[1]) : n : !1; }, mr = (e) => e === "position" || e === "percentage", hr = (e) => e === "image" || e === "url", gr = (e) => e === "length" || e === "size" || e === "bg-size", vr = (e) => e === "length", zs = (e) => e === "number", Ws = (e) => e === "family-name", br = (e) => e === "shadow", Bs = () => { const e = K("color"), t = K("font"), n = K("text"), r = K("font-weight"), o = K("tracking"), s = K("leading"), i = K("breakpoint"), a = K("container"), l = K("spacing"), c = K("radius"), d = K("shadow"), f = K("inset-shadow"), g = K("text-shadow"), h = K("drop-shadow"), v = K("blur"), m = K("perspective"), x = K("aspect"), b = K("ease"), y = K("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], R = () => [ "center", "top", "bottom", "left", "right", "top-left", // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 "left-top", "top-right", // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 "right-top", "bottom-right", // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 "right-bottom", "bottom-left", // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 "left-bottom" ], S = () => [...R(), T, P], O = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", "contain", "none"], k = () => [T, P, l], M = () => [Pe, "full", "auto", ...k()], z = () => [be, "none", "subgrid", T, P], U = () => ["auto", { span: ["full", be, T, P] }, be, T, P], H = () => [be, "auto", T, P], B = () => ["auto", "min", "max", "fr", T, P], I = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...k()], L = () => [Pe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], E = () => [e, T, P], Y = () => [...R(), Nn, On, { position: [T, P] }], w = () => ["no-repeat", { repeat: ["", "x", "y", "space", "round"] }], N = () => ["auto", "cover", "contain", Fs, Ds, { size: [T, P] }], F = () => [Tt, Ge, Ee], j = () => [ // Deprecated since Tailwind CSS v4.0.0 "", "none", "full", c, T, P ], V = () => ["", _, Ge, Ee], q = () => ["solid", "dashed", "dotted", "double"], ve = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], $ = () => [_, Tt, Nn, On], X = () => [ // Deprecated since Tailwind CSS v4.0.0 "", "none", v, T, P ], Q = () => ["none", _, T, P], ie = () => ["none", _, T, P], Ce = () => [_, T, P], Ae = () => [Pe, "full", ...k()]; return { cacheSize: 500, theme: { animate: ["spin", "ping", "pulse", "bounce"], aspect: ["video"], blur: [fe], breakpoint: [fe], color: [Os], container: [fe], "drop-shadow": [fe], ease: ["in", "out", "in-out"], font: [Ms], "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"], "inset-shadow": [fe], leading: ["none", "tight", "snug", "normal", "relaxed", "loose"], perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"], radius: [fe], shadow: [fe], spacing: ["px", _], text: [fe], "text-shadow": [fe], tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"] }, classGroups: { // -------------- // --- Layout --- // -------------- /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", Pe, P, T, x] }], /** * Container * @see https://tailwindcss.com/docs/container * @deprecated since Tailwind CSS v4.0.0 */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [_, P, T, a] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": C() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": C() }], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ "break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ "box-decoration": [{ "box-decoration": ["slice", "clone"] }], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [{ box: ["border", "content"] }], /** * Display * @see https://tailwindcss.com/docs/display */ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"], /** * Screen Reader Only * @see https://tailwindcss.com/docs/display#screen-reader-only */ sr: ["sr-only", "not-sr-only"], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [{ float: ["right", "left", "none", "start", "end"] }], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [{ clear: ["left", "right", "both", "none", "start", "end"] }], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: ["isolate", "isolation-auto"], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ "object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ "object-position": [{ object: S() }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: O() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": O() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": O() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: A() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": A() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": A() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ["static", "fixed", "absolute", "relative", "sticky"], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: M() }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": M() }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": M() }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: M() }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: M() }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: M() }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: M() }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: M() }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: M() }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: [be, "auto", T, P] }], // ------------------------ // --- Flexbox and Grid --- // ------------------------ /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: [Pe, "full", "auto", a, ...k()] }], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ "flex-wrap": [{ flex: ["nowrap", "wrap", "wrap-reverse"] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: [_, Pe, "auto", "initial", "none", P] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: ["", _, T, P] }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: ["", _, T, P] }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: [be, "first", "last", "none", T, P] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": z() }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: U() }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": H() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": H() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": z() }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: U() }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": H() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": H() }], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ "auto-cols": [{ "auto-cols": B() }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": B() }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: k() }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": k() }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": k() }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: [...I(), "normal"] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ "justify-items": [{ "justify-items": [...G(), "normal"] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ "justify-self": [{ "justify-self": ["auto", ...G()] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ "align-content": [{ content: ["normal", ...I()] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ "align-items": [{ items: [...G(), { baseline: ["", "last"] }] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ "align-self": [{ self: ["auto", ...G(), { baseline: ["", "last"] }] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ "place-content": [{ "place-content": I() }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ "place-items": [{ "place-items": [...G(), "baseline"] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ "place-self": [{ "place-self": ["auto", ...G()] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: k() }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: k() }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: k() }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: k() }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: k() }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: k() }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: k() }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: k() }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: k() }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: D() }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: D() }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: D() }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: D() }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: D() }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: D() }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: D() }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: D() }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: D() }], /** * Space Between X * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-x": [{ "space-x": k() }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-x-reverse": ["space-x-reverse"], /** * Space Between Y * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-y": [{ "space-y": k() }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-y-reverse": ["space-y-reverse"], // -------------- // --- Sizing --- // -------------- /** * Size * @see https://tailwindcss.com/docs/width#setting-both-width-and-height */ size: [{ size: L() }], /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: [a, "screen", ...L()] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [ a, "screen", /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ "none", ...L() ] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [ a, "screen", "none", /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ "prose", /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ { screen: [i] }, ...L() ] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: ["screen", "lh", ...L()] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": ["screen", "lh", "none", ...L()] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": ["screen", "lh", ...L()] }], // ------------------ // --- Typography --- // ------------------ /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", n, Ge, Ee] }], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ "font-smoothing": ["antialiased", "subpixel-antialiased"], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ "font-style": ["italic", "not-italic"], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ "font-weight": [{ font: [r, T, Ot] }], /** * Font Stretch * @see https://tailwindcss.com/docs/font-stretch */ "font-stretch": [{ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Tt, P] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [Is, P, t] }], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-normal": ["normal-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-ordinal": ["ordinal"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-slashed-zero": ["slashed-zero"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-figure": ["lining-nums", "oldstyle-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-spacing": ["proportional-nums", "tabular-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [{ tracking: [o, T, P] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": [_, "none", T, Ot] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: [ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ s, ...k() ] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", T, P] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ "list-style-position": [{ list: ["inside", "outside"] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["disc", "decimal", "none", T, P] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://v3.tailwindcss.com/docs/placeholder-color */ "placeholder-color": [{ placeholder: E() }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ "text-color": [{ text: E() }], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ "text-decoration": ["underline", "overline", "line-through", "no-underline"], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ "text-decoration-style": [{ decoration: [...q(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: [_, "from-font", "auto", T, Ee] }], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ "text-decoration-color": [{ decoration: E() }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": [_, "auto", T, P] }], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ "text-overflow": ["truncate", "text-ellipsis", "text-clip"], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [{ indent: k() }],