ethiopian-datepicker-shadcn
Version:
A ShadCN-styled Ethiopian DatePicker React component using kenat.
1,747 lines • 90.7 kB
JavaScript
import * as N from "react";
import De, { useState as ye, useEffect as Ue } from "react";
import { MonthGrid as fe } from "kenat";
import { ChevronLeft as Be, ChevronRight as qe } from "lucide-react";
var de = { exports: {} }, ne = {};
/**
* @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 ke;
function Je() {
if (ke) return ne;
ke = 1;
var e = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
function r(t, s, a) {
var c = null;
if (a !== void 0 && (c = "" + a), s.key !== void 0 && (c = "" + s.key), "key" in s) {
a = {};
for (var u in s)
u !== "key" && (a[u] = s[u]);
} else a = s;
return s = a.ref, {
$$typeof: e,
type: t,
key: c,
ref: s !== void 0 ? s : null,
props: a
};
}
return ne.Fragment = o, ne.jsx = r, ne.jsxs = r, ne;
}
var se = {};
/**
* @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 we;
function Xe() {
return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
function e(n) {
if (n == null) return null;
if (typeof n == "function")
return n.$$typeof === ie ? null : n.displayName || n.name || null;
if (typeof n == "string") return n;
switch (n) {
case h:
return "Fragment";
case k:
return "Profiler";
case S:
return "StrictMode";
case D:
return "Suspense";
case $:
return "SuspenseList";
case M:
return "Activity";
}
if (typeof n == "object")
switch (typeof n.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), n.$$typeof) {
case j:
return "Portal";
case G:
return (n.displayName || "Context") + ".Provider";
case V:
return (n._context.displayName || "Context") + ".Consumer";
case Y:
var p = n.render;
return n = n.displayName, n || (n = p.displayName || p.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
case q:
return p = n.displayName || null, p !== null ? p : e(n.type) || "Memo";
case f:
p = n._payload, n = n._init;
try {
return e(n(p));
} catch {
}
}
return null;
}
function o(n) {
return "" + n;
}
function r(n) {
try {
o(n);
var p = !1;
} catch {
p = !0;
}
if (p) {
p = console;
var y = p.error, x = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
return y.call(
p,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
x
), o(n);
}
}
function t(n) {
if (n === h) return "<>";
if (typeof n == "object" && n !== null && n.$$typeof === f)
return "<...>";
try {
var p = e(n);
return p ? "<" + p + ">" : "<...>";
} catch {
return "<...>";
}
}
function s() {
var n = Z.A;
return n === null ? null : n.getOwner();
}
function a() {
return Error("react-stack-top-frame");
}
function c(n) {
if (J.call(n, "key")) {
var p = Object.getOwnPropertyDescriptor(n, "key").get;
if (p && p.isReactWarning) return !1;
}
return n.key !== void 0;
}
function u(n, p) {
function y() {
F || (F = !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)",
p
));
}
y.isReactWarning = !0, Object.defineProperty(n, "key", {
get: y,
configurable: !0
});
}
function m() {
var n = e(this.type);
return O[n] || (O[n] = !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."
)), n = this.props.ref, n !== void 0 ? n : null;
}
function g(n, p, y, x, R, P, Q, E) {
return y = P.ref, n = {
$$typeof: z,
type: n,
key: p,
props: P,
_owner: R
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(n, "ref", {
enumerable: !1,
get: m
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(n, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.defineProperty(n, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: Q
}), Object.defineProperty(n, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: E
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
}
function v(n, p, y, x, R, P, Q, E) {
var C = p.children;
if (C !== void 0)
if (x)
if (le(C)) {
for (x = 0; x < C.length; x++)
w(C[x]);
Object.freeze && Object.freeze(C);
} 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 w(C);
if (J.call(p, "key")) {
C = e(n);
var I = Object.keys(p).filter(function(oe) {
return oe !== "key";
});
x = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", te[C + x] || (I = 0 < I.length ? "{" + I.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} />`,
x,
C,
I,
C
), te[C + x] = !0);
}
if (C = null, y !== void 0 && (r(y), C = "" + y), c(p) && (r(p.key), C = "" + p.key), "key" in p) {
y = {};
for (var U in p)
U !== "key" && (y[U] = p[U]);
} else y = p;
return C && u(
y,
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
), g(
n,
C,
P,
R,
s(),
y,
Q,
E
);
}
function w(n) {
typeof n == "object" && n !== null && n.$$typeof === z && n._store && (n._store.validated = 1);
}
var T = De, z = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), G = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), ie = Symbol.for("react.client.reference"), Z = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, le = Array.isArray, X = console.createTask ? console.createTask : function() {
return null;
};
T = {
"react-stack-bottom-frame": function(n) {
return n();
}
};
var F, O = {}, L = T["react-stack-bottom-frame"].bind(
T,
a
)(), d = X(t(a)), te = {};
se.Fragment = h, se.jsx = function(n, p, y, x, R) {
var P = 1e4 > Z.recentlyCreatedOwnerStacks++;
return v(
n,
p,
y,
!1,
x,
R,
P ? Error("react-stack-top-frame") : L,
P ? X(t(n)) : d
);
}, se.jsxs = function(n, p, y, x, R) {
var P = 1e4 > Z.recentlyCreatedOwnerStacks++;
return v(
n,
p,
y,
!0,
x,
R,
P ? Error("react-stack-top-frame") : L,
P ? X(t(n)) : d
);
};
}()), se;
}
var Re;
function He() {
return Re || (Re = 1, process.env.NODE_ENV === "production" ? de.exports = Je() : de.exports = Xe()), de.exports;
}
var A = He();
function Ee(e, o) {
if (typeof e == "function")
return e(o);
e != null && (e.current = o);
}
function Ze(...e) {
return (o) => {
let r = !1;
const t = e.map((s) => {
const a = Ee(s, o);
return !r && typeof a == "function" && (r = !0), a;
});
if (r)
return () => {
for (let s = 0; s < t.length; s++) {
const a = t[s];
typeof a == "function" ? a() : Ee(e[s], null);
}
};
};
}
// @__NO_SIDE_EFFECTS__
function Qe(e) {
const o = /* @__PURE__ */ er(e), r = N.forwardRef((t, s) => {
const { children: a, ...c } = t, u = N.Children.toArray(a), m = u.find(tr);
if (m) {
const g = m.props.children, v = u.map((w) => w === m ? N.Children.count(g) > 1 ? N.Children.only(null) : N.isValidElement(g) ? g.props.children : null : w);
return /* @__PURE__ */ A.jsx(o, { ...c, ref: s, children: N.isValidElement(g) ? N.cloneElement(g, void 0, v) : null });
}
return /* @__PURE__ */ A.jsx(o, { ...c, ref: s, children: a });
});
return r.displayName = `${e}.Slot`, r;
}
var Ke = /* @__PURE__ */ Qe("Slot");
// @__NO_SIDE_EFFECTS__
function er(e) {
const o = N.forwardRef((r, t) => {
const { children: s, ...a } = r;
if (N.isValidElement(s)) {
const c = nr(s), u = or(a, s.props);
return s.type !== N.Fragment && (u.ref = t ? Ze(t, c) : c), N.cloneElement(s, u);
}
return N.Children.count(s) > 1 ? N.Children.only(null) : null;
});
return o.displayName = `${e}.SlotClone`, o;
}
var rr = Symbol("radix.slottable");
function tr(e) {
return N.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === rr;
}
function or(e, o) {
const r = { ...o };
for (const t in o) {
const s = e[t], a = o[t];
/^on[A-Z]/.test(t) ? s && a ? r[t] = (...u) => {
const m = a(...u);
return s(...u), m;
} : s && (r[t] = s) : t === "style" ? r[t] = { ...s, ...a } : t === "className" && (r[t] = [s, a].filter(Boolean).join(" "));
}
return { ...e, ...r };
}
function nr(e) {
var t, s;
let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = o && "isReactWarning" in o && o.isReactWarning;
return r ? e.ref : (o = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, r = o && "isReactWarning" in o && o.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
}
function Ne(e) {
var o, r, t = "";
if (typeof e == "string" || typeof e == "number") t += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var s = e.length;
for (o = 0; o < s; o++) e[o] && (r = Ne(e[o])) && (t && (t += " "), t += r);
} else for (r in e) e[r] && (t && (t += " "), t += r);
return t;
}
function ze() {
for (var e, o, r = 0, t = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (o = Ne(e)) && (t && (t += " "), t += o);
return t;
}
const Se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ae = ze, sr = (e, o) => (r) => {
var t;
if ((o == null ? void 0 : o.variants) == null) return Ae(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
const { variants: s, defaultVariants: a } = o, c = Object.keys(s).map((g) => {
const v = r == null ? void 0 : r[g], w = a == null ? void 0 : a[g];
if (v === null) return null;
const T = Se(v) || Se(w);
return s[g][T];
}), u = r && Object.entries(r).reduce((g, v) => {
let [w, T] = v;
return T === void 0 || (g[w] = T), g;
}, {}), m = o == null || (t = o.compoundVariants) === null || t === void 0 ? void 0 : t.reduce((g, v) => {
let { class: w, className: T, ...z } = v;
return Object.entries(z).every((j) => {
let [h, S] = j;
return Array.isArray(S) ? S.includes({
...a,
...u
}[h]) : {
...a,
...u
}[h] === S;
}) ? [
...g,
w,
T
] : g;
}, []);
return Ae(e, c, m, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
}, ve = "-", ar = (e) => {
const o = lr(e), {
conflictingClassGroups: r,
conflictingClassGroupModifiers: t
} = e;
return {
getClassGroupId: (c) => {
const u = c.split(ve);
return u[0] === "" && u.length !== 1 && u.shift(), Oe(u, o) || ir(c);
},
getConflictingClassGroupIds: (c, u) => {
const m = r[c] || [];
return u && t[c] ? [...m, ...t[c]] : m;
}
};
}, Oe = (e, o) => {
var c;
if (e.length === 0)
return o.classGroupId;
const r = e[0], t = o.nextPart.get(r), s = t ? Oe(e.slice(1), t) : void 0;
if (s)
return s;
if (o.validators.length === 0)
return;
const a = e.join(ve);
return (c = o.validators.find(({
validator: u
}) => u(a))) == null ? void 0 : c.classGroupId;
}, Te = /^\[(.+)\]$/, ir = (e) => {
if (Te.test(e)) {
const o = Te.exec(e)[1], r = o == null ? void 0 : o.substring(0, o.indexOf(":"));
if (r)
return "arbitrary.." + r;
}
}, lr = (e) => {
const {
theme: o,
classGroups: r
} = e, t = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
};
for (const s in r)
ge(r[s], t, s, o);
return t;
}, ge = (e, o, r, t) => {
e.forEach((s) => {
if (typeof s == "string") {
const a = s === "" ? o : Ce(o, s);
a.classGroupId = r;
return;
}
if (typeof s == "function") {
if (cr(s)) {
ge(s(t), o, r, t);
return;
}
o.validators.push({
validator: s,
classGroupId: r
});
return;
}
Object.entries(s).forEach(([a, c]) => {
ge(c, Ce(o, a), r, t);
});
});
}, Ce = (e, o) => {
let r = e;
return o.split(ve).forEach((t) => {
r.nextPart.has(t) || r.nextPart.set(t, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), r = r.nextPart.get(t);
}), r;
}, cr = (e) => e.isThemeGetter, dr = (e) => {
if (e < 1)
return {
get: () => {
},
set: () => {
}
};
let o = 0, r = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
const s = (a, c) => {
r.set(a, c), o++, o > e && (o = 0, t = r, r = /* @__PURE__ */ new Map());
};
return {
get(a) {
let c = r.get(a);
if (c !== void 0)
return c;
if ((c = t.get(a)) !== void 0)
return s(a, c), c;
},
set(a, c) {
r.has(a) ? r.set(a, c) : s(a, c);
}
};
}, he = "!", xe = ":", ur = xe.length, mr = (e) => {
const {
prefix: o,
experimentalParseClassName: r
} = e;
let t = (s) => {
const a = [];
let c = 0, u = 0, m = 0, g;
for (let j = 0; j < s.length; j++) {
let h = s[j];
if (c === 0 && u === 0) {
if (h === xe) {
a.push(s.slice(m, j)), m = j + ur;
continue;
}
if (h === "/") {
g = j;
continue;
}
}
h === "[" ? c++ : h === "]" ? c-- : h === "(" ? u++ : h === ")" && u--;
}
const v = a.length === 0 ? s : s.substring(m), w = fr(v), T = w !== v, z = g && g > m ? g - m : void 0;
return {
modifiers: a,
hasImportantModifier: T,
baseClassName: w,
maybePostfixModifierPosition: z
};
};
if (o) {
const s = o + xe, a = t;
t = (c) => c.startsWith(s) ? a(c.substring(s.length)) : {
isExternal: !0,
modifiers: [],
hasImportantModifier: !1,
baseClassName: c,
maybePostfixModifierPosition: void 0
};
}
if (r) {
const s = t;
t = (a) => r({
className: a,
parseClassName: s
});
}
return t;
}, fr = (e) => e.endsWith(he) ? e.substring(0, e.length - 1) : e.startsWith(he) ? e.substring(1) : e, pr = (e) => {
const o = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0]));
return (t) => {
if (t.length <= 1)
return t;
const s = [];
let a = [];
return t.forEach((c) => {
c[0] === "[" || o[c] ? (s.push(...a.sort(), c), a = []) : a.push(c);
}), s.push(...a.sort()), s;
};
}, br = (e) => ({
cache: dr(e.cacheSize),
parseClassName: mr(e),
sortModifiers: pr(e),
...ar(e)
}), gr = /\s+/, hr = (e, o) => {
const {
parseClassName: r,
getClassGroupId: t,
getConflictingClassGroupIds: s,
sortModifiers: a
} = o, c = [], u = e.trim().split(gr);
let m = "";
for (let g = u.length - 1; g >= 0; g -= 1) {
const v = u[g], {
isExternal: w,
modifiers: T,
hasImportantModifier: z,
baseClassName: j,
maybePostfixModifierPosition: h
} = r(v);
if (w) {
m = v + (m.length > 0 ? " " + m : m);
continue;
}
let S = !!h, k = t(S ? j.substring(0, h) : j);
if (!k) {
if (!S) {
m = v + (m.length > 0 ? " " + m : m);
continue;
}
if (k = t(j), !k) {
m = v + (m.length > 0 ? " " + m : m);
continue;
}
S = !1;
}
const V = a(T).join(":"), G = z ? V + he : V, Y = G + k;
if (c.includes(Y))
continue;
c.push(Y);
const D = s(k, S);
for (let $ = 0; $ < D.length; ++$) {
const q = D[$];
c.push(G + q);
}
m = v + (m.length > 0 ? " " + m : m);
}
return m;
};
function xr() {
let e = 0, o, r, t = "";
for (; e < arguments.length; )
(o = arguments[e++]) && (r = Me(o)) && (t && (t += " "), t += r);
return t;
}
const Me = (e) => {
if (typeof e == "string")
return e;
let o, r = "";
for (let t = 0; t < e.length; t++)
e[t] && (o = Me(e[t])) && (r && (r += " "), r += o);
return r;
};
function vr(e, ...o) {
let r, t, s, a = c;
function c(m) {
const g = o.reduce((v, w) => w(v), e());
return r = br(g), t = r.cache.get, s = r.cache.set, a = u, u(m);
}
function u(m) {
const g = t(m);
if (g)
return g;
const v = hr(m, r);
return s(m, v), v;
}
return function() {
return a(xr.apply(null, arguments));
};
}
const _ = (e) => {
const o = (r) => r[e] || [];
return o.isThemeGetter = !0, o;
}, Ie = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ve = /^\((?:(\w[\w-]*):)?(.+)\)$/i, yr = /^\d+\/\d+$/, kr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, wr = /\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$/, Rr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Er = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, K = (e) => yr.test(e), b = (e) => !!e && !Number.isNaN(Number(e)), B = (e) => !!e && Number.isInteger(Number(e)), pe = (e) => e.endsWith("%") && b(e.slice(0, -1)), W = (e) => kr.test(e), Ar = () => !0, Tr = (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.
wr.test(e) && !Rr.test(e)
), Ge = () => !1, Cr = (e) => Er.test(e), _r = (e) => Sr.test(e), jr = (e) => !i(e) && !l(e), Pr = (e) => ee(e, Fe, Ge), i = (e) => Ie.test(e), H = (e) => ee(e, We, Tr), be = (e) => ee(e, Ir, b), _e = (e) => ee(e, Le, Ge), Nr = (e) => ee(e, $e, _r), ue = (e) => ee(e, Ye, Cr), l = (e) => Ve.test(e), ae = (e) => re(e, We), zr = (e) => re(e, Vr), je = (e) => re(e, Le), Or = (e) => re(e, Fe), Mr = (e) => re(e, $e), me = (e) => re(e, Ye, !0), ee = (e, o, r) => {
const t = Ie.exec(e);
return t ? t[1] ? o(t[1]) : r(t[2]) : !1;
}, re = (e, o, r = !1) => {
const t = Ve.exec(e);
return t ? t[1] ? o(t[1]) : r : !1;
}, Le = (e) => e === "position" || e === "percentage", $e = (e) => e === "image" || e === "url", Fe = (e) => e === "length" || e === "size" || e === "bg-size", We = (e) => e === "length", Ir = (e) => e === "number", Vr = (e) => e === "family-name", Ye = (e) => e === "shadow", Gr = () => {
const e = _("color"), o = _("font"), r = _("text"), t = _("font-weight"), s = _("tracking"), a = _("leading"), c = _("breakpoint"), u = _("container"), m = _("spacing"), g = _("radius"), v = _("shadow"), w = _("inset-shadow"), T = _("text-shadow"), z = _("drop-shadow"), j = _("blur"), h = _("perspective"), S = _("aspect"), k = _("ease"), V = _("animate"), G = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [
"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"
], D = () => [...Y(), l, i], $ = () => ["auto", "hidden", "clip", "visible", "scroll"], q = () => ["auto", "contain", "none"], f = () => [l, i, m], M = () => [K, "full", "auto", ...f()], ie = () => [B, "none", "subgrid", l, i], Z = () => ["auto", {
span: ["full", B, l, i]
}, B, l, i], J = () => [B, "auto", l, i], le = () => ["auto", "min", "max", "fr", l, i], X = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], F = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...f()], L = () => [K, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...f()], d = () => [e, l, i], te = () => [...Y(), je, _e, {
position: [l, i]
}], n = () => ["no-repeat", {
repeat: ["", "x", "y", "space", "round"]
}], p = () => ["auto", "cover", "contain", Or, Pr, {
size: [l, i]
}], y = () => [pe, ae, H], x = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
"full",
g,
l,
i
], R = () => ["", b, ae, H], P = () => ["solid", "dashed", "dotted", "double"], Q = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], E = () => [b, pe, je, _e], C = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
j,
l,
i
], I = () => ["none", b, l, i], U = () => ["none", b, l, i], oe = () => [b, l, i], ce = () => [K, "full", ...f()];
return {
cacheSize: 500,
theme: {
animate: ["spin", "ping", "pulse", "bounce"],
aspect: ["video"],
blur: [W],
breakpoint: [W],
color: [Ar],
container: [W],
"drop-shadow": [W],
ease: ["in", "out", "in-out"],
font: [jr],
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
"inset-shadow": [W],
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
radius: [W],
shadow: [W],
spacing: ["px", b],
text: [W],
"text-shadow": [W],
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
},
classGroups: {
// --------------
// --- Layout ---
// --------------
/**
* Aspect Ratio
* @see https://tailwindcss.com/docs/aspect-ratio
*/
aspect: [{
aspect: ["auto", "square", K, i, l, S]
}],
/**
* 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: [b, i, l, u]
}],
/**
* Break After
* @see https://tailwindcss.com/docs/break-after
*/
"break-after": [{
"break-after": G()
}],
/**
* Break Before
* @see https://tailwindcss.com/docs/break-before
*/
"break-before": [{
"break-before": G()
}],
/**
* 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: D()
}],
/**
* Overflow
* @see https://tailwindcss.com/docs/overflow
*/
overflow: [{
overflow: $()
}],
/**
* Overflow X
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-x": [{
"overflow-x": $()
}],
/**
* Overflow Y
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-y": [{
"overflow-y": $()
}],
/**
* Overscroll Behavior
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
overscroll: [{
overscroll: q()
}],
/**
* Overscroll Behavior X
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-x": [{
"overscroll-x": q()
}],
/**
* Overscroll Behavior Y
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-y": [{
"overscroll-y": q()
}],
/**
* 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: [B, "auto", l, i]
}],
// ------------------------
// --- Flexbox and Grid ---
// ------------------------
/**
* Flex Basis
* @see https://tailwindcss.com/docs/flex-basis
*/
basis: [{
basis: [K, "full", "auto", u, ...f()]
}],
/**
* 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: [b, K, "auto", "initial", "none", i]
}],
/**
* Flex Grow
* @see https://tailwindcss.com/docs/flex-grow
*/
grow: [{
grow: ["", b, l, i]
}],
/**
* Flex Shrink
* @see https://tailwindcss.com/docs/flex-shrink
*/
shrink: [{
shrink: ["", b, l, i]
}],
/**
* Order
* @see https://tailwindcss.com/docs/order
*/
order: [{
order: [B, "first", "last", "none", l, i]
}],
/**
* Grid Template Columns
* @see https://tailwindcss.com/docs/grid-template-columns
*/
"grid-cols": [{
"grid-cols": ie()
}],
/**
* Grid Column Start / End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start-end": [{
col: Z()
}],
/**
* Grid Column Start
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start": [{
"col-start": J()
}],
/**
* Grid Column End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-end": [{
"col-end": J()
}],
/**
* Grid Template Rows
* @see https://tailwindcss.com/docs/grid-template-rows
*/
"grid-rows": [{
"grid-rows": ie()
}],
/**
* Grid Row Start / End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start-end": [{
row: Z()
}],
/**
* Grid Row Start
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start": [{
"row-start": J()
}],
/**
* Grid Row End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-end": [{
"row-end": J()
}],
/**
* 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": le()
}],
/**
* Grid Auto Rows
* @see https://tailwindcss.com/docs/grid-auto-rows
*/
"auto-rows": [{
"auto-rows": le()
}],
/**
* Gap
* @see https://tailwindcss.com/docs/gap
*/
gap: [{
gap: f()
}],
/**
* Gap X
* @see https://tailwindcss.com/docs/gap
*/
"gap-x": [{
"gap-x": f()
}],
/**
* Gap Y
* @see https://tailwindcss.com/docs/gap
*/
"gap-y": [{
"gap-y": f()
}],
/**
* Justify Content
* @see https://tailwindcss.com/docs/justify-content
*/
"justify-content": [{
justify: [...X(), "normal"]
}],
/**
* Justify Items
* @see https://tailwindcss.com/docs/justify-items
*/
"justify-items": [{
"justify-items": [...F(), "normal"]
}],
/**
* Justify Self
* @see https://tailwindcss.com/docs/justify-self
*/
"justify-self": [{
"justify-self": ["auto", ...F()]
}],
/**
* Align Content
* @see https://tailwindcss.com/docs/align-content
*/
"align-content": [{
content: ["normal", ...X()]
}],
/**
* Align Items
* @see https://tailwindcss.com/docs/align-items
*/
"align-items": [{
items: [...F(), {
baseline: ["", "last"]
}]
}],
/**
* Align Self
* @see https://tailwindcss.com/docs/align-self
*/
"align-self": [{
self: ["auto", ...F(), {
baseline: ["", "last"]
}]
}],
/**
* Place Content
* @see https://tailwindcss.com/docs/place-content
*/
"place-content": [{
"place-content": X()
}],
/**
* Place Items
* @see https://tailwindcss.com/docs/place-items
*/
"place-items": [{
"place-items": [...F(), "baseline"]
}],
/**
* Place Self
* @see https://tailwindcss.com/docs/place-self
*/
"place-self": [{
"place-self": ["auto", ...F()]
}],
// Spacing
/**
* Padding
* @see https://tailwindcss.com/docs/padding
*/
p: [{
p: f()
}],
/**
* Padding X
* @see https://tailwindcss.com/docs/padding
*/
px: [{
px: f()
}],
/**
* Padding Y
* @see https://tailwindcss.com/docs/padding
*/
py: [{
py: f()
}],
/**
* Padding Start
* @see https://tailwindcss.com/docs/padding
*/
ps: [{
ps: f()
}],
/**
* Padding End
* @see https://tailwindcss.com/docs/padding
*/
pe: [{
pe: f()
}],
/**
* Padding Top
* @see https://tailwindcss.com/docs/padding
*/
pt: [{
pt: f()
}],
/**
* Padding Right
* @see https://tailwindcss.com/docs/padding
*/
pr: [{
pr: f()
}],
/**
* Padding Bottom
* @see https://tailwindcss.com/docs/padding
*/
pb: [{
pb: f()
}],
/**
* Padding Left
* @see https://tailwindcss.com/docs/padding
*/
pl: [{
pl: f()
}],
/**
* Margin
* @see https://tailwindcss.com/docs/margin
*/
m: [{
m: O()
}],
/**
* Margin X
* @see https://tailwindcss.com/docs/margin
*/
mx: [{
mx: O()
}],
/**
* Margin Y
* @see https://tailwindcss.com/docs/margin
*/
my: [{
my: O()
}],
/**
* Margin Start
* @see https://tailwindcss.com/docs/margin
*/
ms: [{
ms: O()
}],
/**
* Margin End
* @see https://tailwindcss.com/docs/margin
*/
me: [{
me: O()
}],
/**
* Margin Top
* @see https://tailwindcss.com/docs/margin
*/
mt: [{
mt: O()
}],
/**
* Margin Right
* @see https://tailwindcss.com/docs/margin
*/
mr: [{
mr: O()
}],
/**
* Margin Bottom
* @see https://tailwindcss.com/docs/margin
*/
mb: [{
mb: O()
}],
/**
* Margin Left
* @see https://tailwindcss.com/docs/margin
*/
ml: [{
ml: O()
}],
/**
* Space Between X
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
*/
"space-x": [{
"space-x": f()
}],
/**
* 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": f()
}],
/**
* 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: [u, "screen", ...L()]
}],
/**
* Min-Width
* @see https://tailwindcss.com/docs/min-width
*/
"min-w": [{
"min-w": [
u,
"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": [
u,
"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: [c]
},
...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", r, ae, H]
}],
/**
* 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: [t, l, be]
}],
/**
* 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", pe, i]
}],
/**
* Font Family
* @see https://tailwindcss.com/docs/font-family
*/
"font-family": [{
font: [zr, i, o]
}],
/**
* 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: [s, l, i]
}],
/**
* Line Clamp
* @see https://tailwindcss.com/docs/line-clamp
*/
"line-clamp": [{
"line-clamp": [b, "none", l, be]
}],
/**
* 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 */
a,
...f()
]
}],
/**
* List Style Image
* @see https://tailwindcss.com/docs/list-style-image
*/
"list-image": [{
"list-image": ["none", l, i]
}],
/**
* 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", l, i]
}],
/**
* 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: d()
}],
/**
* Text Color
* @see https://tailwindcss.com/docs/text-color
*/
"text-color": [{
text: d()
}],
/**
* 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: [...P(), "wavy"]
}],
/**
* Text Decoration Thickness
* @see https://tailwindcss.com/docs/text-decoration-thickness
*/
"text-decoration-thickness": [{
decoration: [b, "from-font", "auto", l, H]
}],
/**
* Text Decoration Color
* @see https://tailwindcss.com/docs/text-decoration-color
*/
"text-decoration-color": [{
decoration: d()
}],
/**
* Text Underline Offset
* @see https://tailwindcss.com/docs/text-underline-offset
*/
"underline-offset": [{
"underline-offset": [b, "auto", l, i]
}],
/**
* 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: f()
}],
/**
* Vertical Alignment
* @see https://tailwindcss.com/docs/vertical-align
*/
"vertical-align": [{
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", l, i]
}],
/**
* Whitespace
* @see https://tailwindcss.com/docs/whitespace
*/
whitespace: [{
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
}],
/**
* Word Break
* @see https://tailwindcss.com/docs/word-break
*/
break: [{
break: ["normal", "words", "all", "keep"]
}],
/**
* Overflow Wrap
* @see https://tailwindcss.com/docs/overflow-wrap
*/
wrap: [{
wrap: ["break-word", "anywhere", "normal"]
}],
/**
* Hyphens
* @see https://tailwindcss.com/docs/hyphens
*/
hyphens: [{
hyphens: ["none", "manual", "auto"]
}],
/**
* Content
* @see https://tailwindcss.com/docs/content
*/
content: [{
content: ["none", l, i]
}],
// -------------------
// --- Backgrounds ---
// -------------------
/**
* Background Attachment
* @see https://tailwindcss.com/docs/background-attachment
*/
"bg-attachment": [{
bg: ["fixed", "local", "scroll"]
}],
/**
* Background Clip
* @see https://tailwindcss.com/docs/background-clip
*/
"bg-clip": [{
"bg-clip": ["border", "padding", "content", "text"]
}],
/**
* Background Origin
* @see https://tailwindcss.com/docs/background-origin
*/
"bg-origin": [{
"bg-origin": ["border", "padding", "content"]
}],
/**
* Background Position
* @see https://tailwindcss.com/docs/background-position
*/
"bg-position": [{
bg: te()
}],
/**
* Background Repeat
* @see https://tailwindcss.com/docs/background-repeat
*/
"bg-repeat": [{
bg: n()
}],
/**
* Background Size
* @see https://tailwindcss.com/docs/background-size
*/
"bg-size": [{
bg: p()
}],
/**
* Background Image
* @see https://tailwindcss.com/docs/background-image
*/
"bg-image": [{
bg: ["none", {
linear: [{
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
}, B, l, i],
radial: ["", l, i],
conic: [B, l, i]
}, Mr, Nr]
}],
/**
* Background Color
* @see https://tailwindcss.com/docs/background-color
*/
"bg-color": [{
bg: d()
}],
/**
* Gradient Color Stops From Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-from-pos": [{
from: y()
}],
/**
* Gradient Color Stops Via Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via-pos": [{
via: y()
}],
/**
* Gradient Color Stops To Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to-pos": [{
to: y()
}],
/**
* Gradient Color Stops From
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-from": [{
from: d()
}],
/**
* Gradient Color Stops Via
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via": [{
via: d()
}],
/**
* Gradient Color Stops To
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to": [{
to: d()
}],
// ---------------
// --- Borders ---
// ---------------
/**
* Border Radius
* @see https://tailwindcss.com/docs/border-radius
*/
rounded: [{
rounded: x()
}],
/**
* Border Radius Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-s": [{
"rounded-s": x()
}],
/**
* Border Radius End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-e": [{
"rounded-e": x()
}],
/**
* Border Radius Top
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-t": [{
"ro