@tenoxui/preset-tailwind
Version:
Minimal tailwindcss preset for tenoxui
1,049 lines • 88.9 kB
JavaScript
var H = Object.defineProperty, G = Object.defineProperties;
var K = Object.getOwnPropertyDescriptors;
var E = Object.getOwnPropertySymbols;
var X = Object.prototype.hasOwnProperty, Y = Object.prototype.propertyIsEnumerable;
var F = (n, t, e) => t in n ? H(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, p = (n, t) => {
for (var e in t || (t = {}))
X.call(t, e) && F(n, e, t[e]);
if (E)
for (var e of E(t))
Y.call(t, e) && F(n, e, t[e]);
return n;
}, y = (n, t) => G(n, K(t));
function s(n) {
return Q(n);
}
function Q(n) {
if (/^(webkit|moz|ms|o)[A-Z]/.test(n)) {
const t = n.match(/^(webkit|moz|ms|o)/);
if (t) {
const e = t[0];
return `-${e}${n.slice(e.length).replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)}`;
}
}
return n.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
}
const J = /[-+]?(?:\d*\.\d+|\d+)/, U = /[-+]?\d+/, V = /[-+]?(?:\d*\.\d+|\d+)\%/, ee = /(?:[-+]?(?:\d*\.\d+|\d+)fr)/, te = /(?:\d+\s*\/\s*\d+)/, re = /[-+]?(?:\d*\.\d+|\d+)[a-zA-Z%]+/, oe = /-?(?:\d*\.)?\d+(?:ms|s)/, ne = /-?(?:\d*\.)?\d+(?:deg|rad|grad|turn)/, le = /-?(?:\d*\.)?\d+(?:Hz|kHz)/, ie = /-?(?:\d*\.)?\d+(?:dpi|dpcm|dppx|x)/, ae = /-?(?:\d*\.)?\d+(?:px|em|rem|ex|ch|vw|vh|vmin|vmax|cm|mm|in|pt|pc|Q|%|cap|ic|lh|rlh|vi|vb|svw|svh|lvw|lvh|dvw|dvh)/, se = /(?:\#(?:[a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})|\b(?:rgb|rgba|hsl|hsla|color|lab|lch|oklab|oklch)\(\s*[^)]*\s*\)|\b(?:aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|transparent|currentcolor)\b)/, ce = /(?:[.#][a-zA-Z0-9_-]+|[a-zA-Z_][a-zA-Z0-9_-]*|\*|\[(?:[a-zA-Z0-9_-]+(?:[~|^$*]?=(?:"[^"]*"|'[^']*'|[^\]]*))?)?\]|::?[a-zA-Z][a-zA-Z0-9_-]*(?:\([^\)]*\))?|>|\+|~|\s|,)+/, de = {
number: J,
integer: U,
percentage: V,
fraction: ee,
ratio: te,
dimension: re,
time: oe,
angle: ne,
frequency: le,
resolution: ie,
length: ae,
color: se,
selector: ce
}, i = {};
for (const [n, t] of Object.entries(de))
i[n] = new RegExp(`^${t.source}$`, "i");
function u(n, t, e) {
const r = t.replace("current", "currentColor"), o = (d) => typeof d == "string" && !d.startsWith("--") ? s(d) : d, l = Array.isArray(n) ? n.map(o) : [o(n)];
if (e) {
const d = l.map((x) => `${x}: color-mix(in srgb, ${r} ${e}%, transparent);`).join(`
`), b = l.map((x) => `${x}: color-mix(in oklab, ${r} ${e}%, transparent);`).join(`
`);
return `value:${d} @supports (color: color-mix(in lab, red, red)) { ${b} }`;
}
return `value:${l.map((d) => `${d}: ${r}`).join(";")};`;
}
function f(n, t, e = 0.25) {
let r = i.length.test(n) ? n : n + t;
return i.number.test(n + t) && n + t !== "0" && (r = Number(n) * e + "rem"), r;
}
function c(n, t, e = !1, r = !1, o = !1, l = {}) {
return ({ value: a = "", unit: d = "", secondValue: b = "", secondUnit: x = "", key: R = "", raw: C }) => {
if (!a || R || !r && b) return null;
const [, , T, Z] = C, j = T.startsWith("[") ? a : l[a + d] || l[T + Z] || f(a, d, t);
if (r && b) {
const I = f(b, x, t);
let _ = `${j} ${I}`;
return o && i.number.test(a + d) && i.number.test(b + x) && (_ = (Number(a) / Number(b) * 100).toFixed(2) + "%"), e ? _ : "value:" + (Array.isArray(n) ? n.map((D) => `${s(D)}: ${_}`).join(";") : `${s(n)}: ${_}`);
}
return e ? j : "value:" + (Array.isArray(n) ? n.map((I) => `${s(I)}: ${j}`).join(";") : `${s(n)}: ${j}`);
};
}
/*!
* @nousantx/someutils v0.7.1 | MIT License
*
* Copyright (c) 2024-present NOuSantx <nousantx@gmail.com>
*
* Built Date: Mon May 05 2025 06:00:21 GMT+0700 (Western Indonesia Time)
*/
function pe(n) {
const t = {};
return Object.keys(n).forEach((e) => {
Object.entries(n[e]).forEach(([r, o]) => {
const l = r;
t[l] || (t[l] = {}), o !== void 0 && t[l] && (t[l][e] = o);
});
}), t;
}
function B(n) {
return n.reduce((t, e) => (t[e] = e, t), {});
}
const O = {
property: (n = 0.25) => ({
aspect: ({ value: t = "", unit: e = "", secondValue: r = "", secondUnit: o = "" }) => {
const l = { square: "1 / 1", video: "16 / 9" };
if (!i.number.test(t) && !(l[t] || t === "auto") || e || o || i.number.test(t) && !r)
return null;
const a = l[t] || (t === "auto" ? "auto" : `${t} / ${r}`);
return `value:${s("aspectRatio")}: ${a}`;
},
columns: {
group: "container-size",
property: "columns"
},
"break-after": {
property: "breakAfter",
value: ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"]
},
"break-before": {
property: "breakBefore",
value: ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"]
},
"break-inside": {
property: "breakInside",
value: ["auto", "avoid", "avoid-page", "avoid-column"]
},
"box-decoration": {
property: "boxDecorationBreak",
value: ["clone", "slice"]
},
"sr-only": ({ value: t }) => t ? null : "value:position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;",
"not-sr-only": ({ value: t }) => t ? null : "value:position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal;",
float: ({ key: t = "", value: e = "", secondValue: r = "" }) => !["right", "left", "none", "start", "end"].includes(e) || t || r ? null : `value:float: ${["start", "end"].includes(e) ? `inline-${e}` : e}`,
clear: ({ key: t = "", value: e = "", secondValue: r = "" }) => !["right", "left", "none", "start", "end", "both"].includes(e) || t || r ? null : `value:clear: ${["start", "end"].includes(e) ? `inline-${e}` : e}`,
object: {
property: ({ value: t = "", key: e = "", secondValue: r = "", raw: o }) => {
const l = ["none", "contain", "fill", "cover", "scale-down"], a = [
"top",
"left",
"bottom",
"right",
"top-left",
"top-right",
"bottom-left",
"bottom-right",
"center"
];
return ![...l, ...a].includes(o[2]) && !(o[2].startsWith("[") || o[2].startsWith("(")) || e && !["position", "fit"].includes(e) || r ? null : e ? e === "position" ? "objectPosition" : "objectFit" : l.includes(t) ? "objectFit" : "objectPosition";
}
},
overflow: {
property: "overflow",
value: ["hidden", "scroll", "clip", "visible", "auto"]
},
"overflow-x": {
property: "overflowX",
value: ["hidden", "scroll", "clip", "visible", "auto"]
},
"overflow-y": {
property: "overflowY",
value: ["hidden", "scroll", "clip", "visible", "auto"]
},
overscroll: {
property: "overscrollBehavior",
value: ["auto", "contain", "none"]
},
"overscroll-x": {
property: "overscrollBehaviorX",
value: ["auto", "contain", "none"]
},
"overscroll-y": {
property: "overscrollBehaviorY",
value: ["auto", "contain", "none"]
},
top: c("top", n, !1, !0, !0),
left: c("left", n, !1, !0, !0),
bottom: c("bottom", n, !1, !0, !0),
right: c("right", n, !1, !0, !0),
inset: c("inset", n, !1, !0, !0),
"inset-x": c("insetInline", n, !1, !0, !0),
"inset-y": c("insetBlock", n, !1, !0, !0),
start: c("insetInlineStart", n, !1, !0, !0),
end: c("insetInlineEnd", n, !1, !0, !0),
z: ({ value: t = "", unit: e = "", key: r = "", secondValue: o = "" }) => !t || (e || r || o || i.length.test(t + e)) && t !== "auto" ? null : `value:${s("zIndex")}: ${t}`
}),
classes: {
boxSizing: {
"box-border": "border-box",
"box-content": "content-box"
},
display: y(p({}, B([
"inline",
"block",
"inline-block",
"flow-root",
"inline-flex",
"grid",
"inline-grid",
"contents",
"table",
"table-caption",
"table-cell",
"table-column",
"table-column-group",
"table-footer-group",
"table-row-group",
"table-row",
"list-item"
])), {
hidden: "none"
}),
isolation: {
isolate: "isolate",
"isolation-auto": "auto"
},
position: B(["static", "fixed", "absolute", "relative", "sticky"]),
visibility: {
visible: "visible",
invisible: "hidden",
collapse: "collapse"
}
}
}, w = {
property: (n = 0.25) => ({
/* Flexbox Utilities */
flex: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "", secondUnit: l = "" }) => {
if (e || l || o || r && !i.number.test(t + e)) return null;
if (!t) return "value:display: flex";
if (["row", "col", "row-reverse", "col-reverse"].includes(t))
return `value:${s("flexDirection")}: ${t.replace("col", "column")}`;
if (["wrap", "wrap-reverse", "nowrap"].includes(t))
return `value:${s("flexWrap")}: ${t}`;
let d = {
auto: "1 1 auto",
initial: "0 1 auto",
none: "none"
}[t] || t;
return i.number.test(t) && r && (d = Number(t) / Number(r) * 100 + "%"), `value:flex: ${d}`;
},
basis: {
group: "container-size",
property: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (t || l) return null;
let a = i.length.test(e) ? e : e + r;
return i.number.test(e + r) && !o ? a = Number(e) * n + "rem" : o && i.number.test(e + r) && i.number.test(o) && (a = Number(e) / Number(o) * 100 + "%"), `value:${s("flexBasis")}: ${a}`;
}
},
grow: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("flexGrow")}: ${t || "1"}`,
shrink: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("flexShrink")}: ${t || "1"}`,
order: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:order: ${{
none: "0",
first: "calc(-infinity)",
last: "calc(infinity)"
}[t] || t}`,
/* Grid Utilities */
/* Grid Columns */
"grid-cols": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => {
if (o || r) return null;
let l = t + e;
return i.number.test(t + e) && (l = `repeat(${t}, minmax(0, 1fr))`), `value:${s("gridTemplateColumns")}: ${l}`;
},
"col-span": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "", raw: l = [] }) => {
if (o || r || i.number.test(t + e) && (t + e).startsWith("-"))
return null;
let a;
return l[2] === "full" ? a = "1 / -1" : a = `span ${t + e} / span ${t + e}`, `value:${s("gridColumn")}: ${a}`;
},
"col-start": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridColumnStart")}: ${t}`,
"col-end": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridColumnEnd")}: ${t}`,
col: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridColumn")}: ${t}`,
/* Grid Rows */
"grid-rows": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => {
if (o || r) return null;
let l = t + e;
return i.number.test(t + e) && (l = `repeat(${t}, minmax(0, 1fr))`), `value:${s("gridTemplateRows")}: ${l}`;
},
"row-span": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "", raw: l = [] }) => {
if (o || r || i.number.test(t + e) && (t + e).startsWith("-"))
return null;
let a;
return l[2] === "full" ? a = "1 / -1" : a = `span ${t + e} / span ${t + e}`, `value:${s("gridRow")}: ${a}`;
},
"row-start": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridRowStart")}: ${t}`,
"row-end": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridRowEnd")}: ${t}`,
row: ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o || r || e ? null : `value:${s("gridRow")}: ${t}`,
/* Other Grid */
"grid-flow": ({ value: t = "", secondValue: e = "", key: r = "" }) => r || !["row", "col", "dense", "row-dense", "col-dense"].includes(t) ? null : `value:${s("gridAutoFlow")}: ${t.replace("-", " ").replace("col", "column")}`,
"auto-cols": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o ? null : `value:${s("gridAutoColumns")}: ${t + e}`,
"auto-rows": ({ value: t = "", unit: e = "", secondValue: r = "", key: o = "" }) => o ? null : `value:${s("gridAutoRows")}: ${t + e}`,
/* Gap */
gap: c("gap", n),
"gap-x": c("columnGap", n),
"gap-y": c("rowGap", n)
}),
classes: {
justifyContent: {
"justify-start": "flex-start",
"justify-end": "flex-end",
"justify-end-safe": "safe flex-end",
"justify-center": "center",
"justify-center-safe": "safe center",
"justify-between": "space-between",
"justify-around": "space-around",
"justify-evenly": "space-evenly",
"justify-stretch": "stretch",
"justify-baseline": "baseline",
"justify-normal": "normal"
},
justifyItems: {
"justify-items-start": "start",
"justify-items-end": "end",
"justify-items-end-safe": "safe end",
"justify-items-center": "center",
"justify-items-center-safe": "safe center",
"justify-items-stretch": "stretch",
"justify-items-normal": "normal"
},
justifySelf: {
"justify-self-start": "start",
"justify-self-end": "end",
"justify-self-end-safe": "safe end",
"justify-self-center": "center",
"justify-self-center-safe": "safe center",
"justify-self-stretch": "stretch",
"justify-self-auto": "auto"
},
alignContent: {
"content-normal": "normal",
"content-start": "flex-start",
"content-end": "flex-end",
"content-center": "center",
"content-between": "space-between",
"content-around": "space-around",
"content-evenly": "space-evenly",
"content-stretch": "stretch",
"content-baseline": "baseline"
},
alignItems: {
"items-start": "flex-start",
"items-end": "flex-end",
"items-end-safe": "safe flex-end",
"items-center": "center",
"items-center-safe": "safe center",
"items-stretch": "stretch",
"items-baseline": "baseline",
"items-baseline-last": "last baseline"
},
alignSelf: {
"self-start": "flex-start",
"self-end": "flex-end",
"self-end-safe": "safe flex-end",
"self-center": "center",
"self-center-safe": "safe center",
"self-stretch": "stretch",
"self-baseline": "baseline",
"self-baseline-last": "last baseline",
"self-auto": "auto"
},
placeContent: {
"place-content-start": "start",
"place-content-end": "end",
"place-content-end-safe": "safe end",
"place-content-center": "center",
"place-content-center-safe": "safe center",
"place-content-between": "space-between",
"place-content-around": "space-around",
"place-content-evenly": "space-evenly",
"place-content-stretch": "stretch",
"place-content-baseline": "baseline"
},
placeItems: {
"place-items-start": "start",
"place-items-end": "end",
"place-items-end-safe": "safe end",
"place-items-center": "center",
"place-items-center-safe": "safe center",
"place-items-stretch": "stretch",
"place-items-baseline": "baseline"
},
placeSelf: {
"place-self-start": "start",
"place-self-end": "end",
"place-self-end-safe": "safe end",
"place-self-center": "center",
"place-self-center-safe": "safe center",
"place-self-stretch": "stretch",
"place-self-auto": "auto"
}
}
};
function S(n) {
return n.replace(/^(\d)/, "\\3$1 ").replace(/([#{}.:;?%&,@+*~'"!^$[\]()=>|/])/g, "\\$1");
}
const ue = (n = 0.25) => ({
p: c("padding", n),
pt: c("paddingTop", n),
pl: c("paddingLeft", n),
pb: c("paddingBottom", n),
pr: c("paddingRight", n),
py: c("paddingBlock", n),
px: c("paddingInline", n),
ps: c("paddingInlineStart", n),
pe: c("paddingInlineEnd", n),
m: c("margin", n),
mt: c("marginTop", n),
ml: c("marginLeft", n),
mb: c("marginBottom", n),
mr: c("marginRight", n),
my: c("marginBlock", n),
mx: c("marginInline", n),
ms: c("marginInlineStart", n),
me: c("marginInlineEnd", n),
w: {
property: c("width", n, !1, !0, !0, { screen: "100vw" }),
group: "container-size"
},
"min-w": {
property: c("minWidth", n, !1, !0, !0, { screen: "100vw" }),
group: "container-size"
},
"max-w": {
property: c("maxWidth", n, !1, !0, !0, { screen: "100vw" }),
group: "container-size"
},
h: c("height", n, !1, !0, !0, { screen: "100vh" }),
"min-h": c("minHeight", n, !1, !0, !0, { screen: "100vh" }),
"max-h": c("maxHeight", n, !1, !0, !0, { screen: "100vh" }),
size: {
property: c(["width", "height"], n, !1, !0, !0),
group: "container-size"
},
"space-x": ({ value: t = "", unit: e = "", key: r = "", secondValue: o = "", raw: l }) => {
if (r || o) return null;
const a = f(t, e, n);
return {
className: `${S(l[6])} > :not(:last-child)`,
cssRules: `--tw-space-x-reverse: 0;
margin-inline-start: calc(${a} * var(--tw-space-x-reverse));
margin-inline-end: calc(${a} * calc(1 - var(--tw-space-x-reverse)));`,
value: null
};
},
"space-y": ({ value: t = "", unit: e = "", key: r = "", secondValue: o = "", raw: l }) => {
if (!t || r || o) return null;
const a = f(t, e, n);
return {
className: `${S(l[6])} > :not(:last-child)`,
cssRules: `--tw-space-y-reverse: 0;
margin-block-start: calc(${a} * var(--tw-space-y-reverse));
margin-block-end: calc(${a} * calc(1 - var(--tw-space-y-reverse)));`,
value: null
};
}
}), N = {
property: (n = 0.25) => {
const t = {
none: "1",
tight: "1.25",
snug: "1.375",
normal: "1.5",
relaxed: "1.625",
loose: "2"
};
return {
text: ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "", secondUnit: a = "", raw: d }) => {
if (!r || e && !["length", "color"].includes(e)) return null;
const b = {
xs: ["0.75rem", "calc(1 / 0.75)"],
sm: ["0.875rem", "calc(1.25 / 0.875)"],
base: ["1rem", "calc(1.5 / 1)"],
lg: ["1.125rem", "calc(1.75 / 1.125)"],
xl: ["1.25rem", "calc(1.75 / 1.25)"],
"2xl": ["1.5rem", "calc(2 / 1.5)"],
"3xl": ["1.875rem", "calc(2.25 / 1.875)"],
"4xl": ["2.25rem", "calc(2.5 / 2.25)"],
"5xl": ["3rem", "1"],
"6xl": ["3.75rem", "1"],
"7xl": ["4.5rem", "1"],
"8xl": ["6rem", "1"],
"9xl": ["8rem", "1"]
};
if (e === "color" || i.color.test(r) || ["inherit", "current", "black", "white", "transparent"].includes(r) && e !== "length")
return a ? null : u("color", r, l);
if (["center", "justify", "left", "right", "start", "end"].includes(r))
return l ? null : `value:${s("textAlign")}: ${r}`;
if (["wrap", "nowrap", "balance", "pretty"].includes(r))
return l ? null : `value:${s("textWrap")}: ${r}`;
if (["ellipsis", "clip"].includes(r))
return l ? null : `value:${s("textOverflow")}: ${r}`;
if (e === "length" || i.length.test(r + o) || i.number.test(r + o) || r + o in b) {
if (r + o in b) {
const x = r + o, [R, C] = b[x];
return `value:${s("fontSize")}: ${R}; ${s("lineHeight")}: ${t[l] || (d && d[4] && (d[4].startsWith("[") || d[4].startsWith("(")) ? l : i.number.test(l + a) ? f(l, a, n) : C)}`;
}
return `value:${s("fontSize")}: ${i.number.test(r + o) ? n * Number(r) + "rem" : r + o}${l ? `; ${s("lineHeight")}: ${t[l] || (d && d[4] && (d[4].startsWith("[") || d[4].startsWith("(")) ? l : i.number.test(l + a) ? f(l, a, n) : l + a)}` : ""}`;
}
return l ? null : `value:color: ${r}`;
},
font: {
group: "default-font-family",
property: ({ value: e = "", unit: r = "", secondValue: o = "", key: l = "" }) => {
if (!e || l && !["weight", "family-name", "family", "stretch"].includes(l) || o || r && r !== "%")
return null;
const a = {
thin: "100",
extralight: "200",
light: "300",
normal: "400",
medium: "500",
semibold: "600",
bold: "700",
extrabold: "800",
black: "900"
};
return !r && (l === "weight" || a[e] && l !== "stretch") || e.endsWith("00") ? `value:${s("fontWeight")}: ${a[e] || e}` : l === "stretch" || [
"ultra-condensed",
"extra-condensed",
"condensed",
"semi-condensed",
// 'normal', use with direct key instead
"semi-expanded",
"expanded",
"extra-expanded",
"ultra-expanded"
].includes(e) || r ? `value:${s("fontStretch")}: ${e + r}` : r ? null : `value:${s("fontFamily")}: ${e}`;
}
},
"font-stretch": "fontStretch",
tracking: ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "" }) => {
if (!r || e || l) return null;
const a = {
tighter: "-0.05em",
tight: "-0.025em",
normal: "0em",
wide: "0.025em",
wider: "0.05em",
widest: "0.1em"
};
return `value:${s("letterSpacing")}: ${a[r] || r + o}`;
},
"line-clamp": ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "" }) => !r || e || o || l ? null : r === "none" ? "value:overflow: visible; display: block; -webkit-box-orient: horizontal; -webkit-line-clamp: unset;" : i.number.test(r) ? `value:overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${r};` : null,
list: "listStyleType",
"list-image": "listStyleImage",
decoration: ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "", secondUnit: a = "" }) => e && !["length", "color"].includes(e) || a ? null : e === "length" || !l && (i.number.test(r) || ["from-font", "auto"].includes(r)) ? `value:${s("textDecorationThickness")}: ${i.number.test(r) ? `${r}${o || "px"}` : r}` : o ? null : ["solid", "double", "wavy", "dotted", "dashed"].includes(r) && !l ? `value:${s("textDecorationStyle")}: ${r}` : e === "color" || !i.color.test(r) && r !== "current" ? null : u("textDecorationColor", r, l),
"underline-offset": {
property: "textUnderlineOffset",
value: ({ value: e = "", unit: r = "", key: o = "", secondValue: l = "" }) => o || l ? null : i.number.test(e + r) ? e + (r || "px") : e + r
},
leading: ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "", raw: a }) => e || l ? null : `value:${s("lineHeight")}: ${t[r] || (a[2].startsWith("[") || a[2].startsWith("(") ? r : i.number.test(r + o) ? f(r, o, n) : r + o)}`,
indent: c("textIndent", n),
align: ({ key: e = "", value: r = "", unit: o = "", secondValue: l = "" }) => e || l || !i.number.test(r) && ![
"baseline",
"top",
"middle",
"bottom",
"sub",
"super",
"text-top",
"text-bottom"
].includes(r) ? null : `value:${s("verticalAlign")}: ${i.number.test(r) ? r + (o || "px") : r}`,
whitespace: {
property: "whiteSpace",
value: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
},
wrap: {
property: "overflowWrap",
value: ["break-word", "anywhere", "normal"]
},
hyphens: {
property: "hyphens",
value: ["none", "manual", "auto"]
},
content: "content"
};
},
classes: y(p({}, pe({
truncate: {
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
},
antialiased: {
webkitFontSmoothing: "antialiased",
mozOsxFontSmoothing: "grayscale"
},
"subpixel-antialiased": {
webkitFontSmoothing: "auto",
mozOsxFontSmoothing: "auto"
}
})), {
fontStyle: {
italic: "italic",
"not-italic": "normal"
},
fontVariantNumeric: y(p({}, B([
"ordinal",
"slashed-zero",
"lining-nums",
"oldstyle-nums",
"proportional-nums",
"tabular-nums",
"diagonal-fractions",
"stacked-fractions"
])), {
"normal-nums": "normal"
}),
listStylePosition: {
"list-inside": "inside",
"list-outside": "outside"
},
textDecorationLine: {
underline: "underline",
overline: "overline",
"line-through": "line-through",
"no-underline": "none"
},
textTransform: {
uppercase: "uppercase",
lowercase: "lowercase",
capitalize: "capitalize",
"normal-case": "none"
},
wordBreak: {
"break-normal": "normal",
"break-all": "break-all",
"break-keep": "keep-all"
}
})
}, he = {
property: (n = 0.25) => ({
"bg-clip": ({ value: t = "", key: e = "", secondValue: r = "" }) => e || r || !t || !["text", "border", "padding", "content"].includes(t) ? null : `value:${s("backgroundClip")}: ${t !== "text" ? `${t}-box` : t}`,
"bg-origin": ({ value: t = "", key: e = "", secondValue: r = "" }) => e || r || !t || !["border", "padding", "content"].includes(t) ? null : `value:${s("backgroundClip")}: ${t}-box`,
"bg-position": "backgroundPosition",
"bg-size": "backgroundSize",
bg: ({ key: t = "", value: e = "", unit: r = "", secondUnit: o = "", secondValue: l = "", raw: a }) => !e || t && !["image", "size"].includes(t) ? null : t === "size" ? l ? null : `value:${s("backgroundSize")}: ${e}` : t === "image" || e.startsWith("url(") ? l ? null : `value:${s("backgroundImage")}: ${e}` : e === "radial" || e === "conic" ? t || l && ![
"srgb",
"hsl",
"oklab",
"oklch",
"longer",
"shorter",
"increasing",
"decreasing"
].includes(l) ? null : `value:--tw-gradient-position: in ${l ? ["srgb", "hsl", "oklab", "oklch"].includes(l) ? l : `oklch ${l} hue` : "oklab"}; ${s("backgroundImage")}: ${e}-gradient(var(--tw-gradient-stops))` : [
"center",
"top",
"left",
"bottom",
"right",
"top-left",
"top-right",
"bottom-left",
"bottom-right"
].includes(a[2]) ? l ? null : `value:${s("backgroundPosition")}: ${e}` : ["repeat", "repeat-x", "repeat-y", "no-repeat", "repeat-space", "repeat-round"].includes(
e
) ? l ? null : `value:${s("backgroundRepeat")}: ${e === "repeat-space" || e === "repeat-round" ? e.replace("repeat-", "") : e}` : ["fixed", "scroll", "local"].includes(e) ? l ? null : `value:${s("backgroundAttachment")}: ${e}` : ["cover", "auto", "contain"].includes(e) ? l ? null : `value:${s("backgroundSize")}: ${e}` : t === "color" || i.color.test(e) || ["inherit", "current", "black", "white", "transparent"].includes(e) && t !== "length" ? o ? null : u("backgroundColor", e, l) : e === "clip" || l ? null : `value:background: ${e}`,
"bg-linear": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => {
const l = {
"to-t": "to top",
"to-l": "to left",
"to-b": "to bottom",
"to-r": "to right",
"to-tl": "to top left",
"to-tr": "to top right",
"to-bl": "to bottom left",
"to-br": "to bottom right"
};
return !e || t || o && ![
"srgb",
"hsl",
"oklab",
"oklch",
"longer",
"shorter",
"increasing",
"decreasing"
].includes(o) || !i.number.test(e) && !i.angle.test(e + r) && !l[e + r] ? null : `value:--tw-gradient-position: ${l[e + r] || e + (r || "deg")}; @supports (background-image: linear-gradient(in lab, red, red)) { --tw-gradient-position: ${l[e] || e + (r || "deg")} in ${o ? ["srgb", "hsl", "oklab", "oklch"].includes(o) ? o : `oklch ${o} hue` : "oklab"}; } ${s("backgroundImage")}: linear-gradient(var(--tw-gradient-stops))`;
},
"bg-radial": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o ? null : `value:--tw-gradient-position: ${e + r}; ${s(
"backgroundImage"
)}: radial-gradient(var(--tw-gradient-stops, ${e + r}))`,
"bg-conic": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o && ![
"srgb",
"hsl",
"oklab",
"oklch",
"longer",
"shorter",
"increasing",
"decreasing"
].includes(o) || !i.number.test(e) && !i.angle.test(e + r) ? null : `value:--tw-gradient-position: from ${e + (r || "deg")} in ${o ? ["srgb", "hsl", "oklab", "oklch"].includes(o) ? o : `oklch ${o} hue` : "oklab"}; ${s("backgroundImage")}: conic-gradient(var(--tw-gradient-stops))`,
from: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t || r && r !== "%" || l ? null : i.number.test(e) ? `value:--tw-gradient-from-position: ${e + (r || "%")}` : i.color.test(e) || e === "current" ? l ? null : `${u(
"--tw-gradient-from",
e,
o
)} --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));` : null,
via: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t || r && r !== "%" || l ? null : i.number.test(e) ? `value:--tw-gradient-via-position: ${e + (r || "%")}` : i.color.test(e) || e === "current" ? l ? null : `${u(
"--tw-gradient-via",
e,
o
)} --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-via-stops);` : null,
to: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t || r && r !== "%" || l ? null : i.number.test(e) ? `value:--tw-gradient-to-position: ${e + (r || "%")}` : i.color.test(e) || e === "current" ? l ? null : `${u(
"--tw-gradient-to",
e,
o
)} --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));` : null
})
}, h = {
full: "calc(infinity * 1px)",
none: "0",
xs: "0.125rem",
sm: "0.25rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem",
"4xl": "2rem"
};
function $(n = "border") {
return ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => t && !["length", "color"].includes(t) || l ? null : i.length.test(e) ? `value:${s(`${n}Width`)}: ${e}` : t === "length" || i.number.test(e) ? o ? null : `value:${s(`${n}Width`)}: ${e}${r || "px"}` : t === "color" || i.color.test(e) || e === "current" ? u(`${n}Color`, e, o) : `value:${s(n)}: ${e}`;
}
const fe = {
property: (n = 0.25) => ({
"border-x": $("borderInline"),
"border-y": $("borderBlock"),
"border-s": $("borderInlineStart"),
"border-e": $("borderInlineEnd"),
"border-t": $("borderTop"),
"border-r": $("borderRight"),
"border-b": $("borderBottom"),
"border-l": $("borderLeft"),
border: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (t && !["length", "color"].includes(t) || l) return null;
const a = "border";
return e ? ["x", "y", "s", "e", "t", "r", "b", "l"].includes(e) && !o ? `value:${s(`${{
x: "borderInline",
y: "borderBlock",
s: "borderInlineStart",
e: "borderInlineEnd",
t: "borderTop",
r: "borderRight",
b: "borderBottom",
l: "borderLeft"
}[e]}Width`)}: 1px` : ["solid", "dashed", "dotted", "double", "hidden", "none"].includes(e) ? o ? null : `value:${s(`${a}Style`)}: ${e}` : t === "length" || i.number.test(e) ? o ? null : `value:${s(`${a}Width`)}: ${e}${r || "px"}` : t === "color" || i.color.test(e) || e === "current" ? u(`${a}Color`, e, o) : `value:${a}: ${e}` : `value:${s(`${a}Width`)}: 1px`;
},
rounded: c("borderRadius", n, !1, !1, !1, h),
"rounded-ss": c(
"borderStartStartRadius",
n,
!1,
!1,
!1,
h
),
"rounded-se": c(
"borderStartEndRadius",
n,
!1,
!1,
!1,
h
),
"rounded-ee": c(
"borderEndEndRadius",
n,
!1,
!1,
!1,
h
),
"rounded-es": c(
"borderEndStartRadius",
n,
!1,
!1,
!1,
h
),
"rounded-s": c(
["borderStartStartRadius", "borderEndStartRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-e": c(
["borderStartEndRadius", "borderEndEndRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-t": c(
["borderTopLeftRadius", "borderTopRightRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-l": c(
["borderTopLeftRadius", "borderBottomLeftRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-b": c(
["borderBottomLeftRadius", "borderBottomRightRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-r": c(
["borderTopRightRadius", "borderBottomRightRadius"],
n,
!1,
!1,
!1,
h
),
"rounded-tl": c(
"borderTopLeftRadius",
n,
!1,
!1,
!1,
h
),
"rounded-tr": c(
"borderTopRightRadius",
n,
!1,
!1,
!1,
h
),
"rounded-bl": c(
"borderBottomLeftRadius",
n,
!1,
!1,
!1,
h
),
"rounded-br": c(
"borderBottomRightRadius",
n,
!1,
!1,
!1,
h
),
outline: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (t && !["length"].includes(t) || l) return null;
const a = "outline";
return e ? ["solid", "dashed", "dotted", "double", "hidden", "none"].includes(e) ? o ? null : e === "hidden" ? `value:outline: 2px solid transparent; ${s("outlineOffset")}: 2px;` : `value:${s(`${a}Style`)}: ${e}` : t === "length" || i.number.test(e) ? o ? null : `value:${s(`${a}Width`)}: ${e}${r || "px"}` : i.color.test(e) || e === "current" ? u(`${a}Color`, e, o) : `value:${a}: ${e}` : `value:${s(`${a}Width`)}: 1px`;
},
"outline-offset": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t || o ? null : i.number.test(e) ? `value:${s("outlineOffset")}: ${e}${r || "px"}` : `value:${s("outlineOffset")}: ${e}${r}`,
"divide-x": ({ value: t, unit: e, key: r, secondValue: o, raw: l }) => {
if (r || o && o !== "reverse") return null;
const a = `${S(l[6])} > :not(:last-child)`, d = t ? i.length.test(t) ? t : t + (e || "px") : "1px";
return {
className: a,
cssRules: `${s("borderInlineStartWidth")}: ${o ? d : "0px"};
${s("borderInlineEndWidth")}: ${o ? "0px" : d};`,
value: null
};
},
"divide-y": ({ value: t, unit: e, key: r, secondValue: o, raw: l }) => {
if (r || o && o !== "reverse") return null;
const a = `${S(l[6])} > :not(:last-child)`, d = t ? i.length.test(t) ? t : t + (e || "px") : "1px";
return {
className: a,
cssRules: `${s("borderTopWidth")}: ${o ? d : "0px"};
${s("borderBottomWidth")}: ${o ? "0px" : d};`,
value: null
};
},
/**
* Using divide-* utility to set border-style and border-color properties for dividers
*/
divide: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "", raw: a }) => !e || t || l ? null : {
className: `${S(a[6])} > :not(:last-child)`,
cssRules: ["solid", "dashed", "dotted", "double", "hidden", "none"].includes(e) ? o ? null : `${s("borderStyle")}: ${e}` : i.color.test(e) || e === "current" ? u("borderColor", e, o).slice(6) : null,
value: null
}
})
}, P = {
property: (n = 0.25) => ({
shadow: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (t || l) return null;
const a = {
"2xs": "0 1px var(--tw-shadow-color, rgb(0 0 0 / 0.05))",
xs: "0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05))",
sm: "0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1))",
md: "0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1))",
lg: "0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1))",
xl: "0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1))",
"2xl": "0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25))",
none: "0 0 #0000"
};
return e === "current" || i.color.test(e) ? u("--tw-shadow-color", e, o) : o || i.length.test(e + r) ? null : `value:--tw-shadow: ${e ? a[e + r] || e + r : a.sm};box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);`;
},
"inset-shadow": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (!e || t || l) return null;
if (e === "current" || i.color.test(e))
return u("--tw-inset-shadow-color", e, o);
const a = {
"2xs": "inset 0 1px var(--tw-inset-ring-shadow, rgb(0 0 0 / 0.05))",
xs: "inset 0 1px 1px var(--tw-inset-ring-shadow, rgb(0 0 0 / 0.05))",
sm: "inset 0 2px 4px var(--tw-inset-ring-shadow, rgb(0 0 0 / 0.05))",
none: "0 0 #0000"
};
return o || i.length.test(e + r) ? null : `value:--tw-inset-shadow: ${a[e + r] || e + r};box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);`;
},
ring: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => t || l ? null : e === "current" || i.color.test(e) ? u("--tw-ring-color", e, o) : o ? null : `value:--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(${e ? e + (r || "px") : "1px"} + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);`,
"inset-ring": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => t || l ? null : e === "current" || i.color.test(e) ? u("--tw-inset-ring-color", e, o) : o ? null : `value:--tw-inset-ring-shadow: 0 0 0 ${e ? e + (r || "px") : "1px"} var(--tw-inset-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);`,
"ring-offset": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t || l ? null : e === "current" || i.color.test(e) ? u("--tw-ring-offset-color", e, o) : o ? null : `value:--tw-ring-offset-width: ${e + (r || "px")}; --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);`,
"text-shadow": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => !e || t && t !== "color" || l ? null : e === "current" || i.color.test(e) ? u("--tw-text-shadow-color", e, o) : o ? null : `value:text-shadow: ${{
"2xs": "0px 1px 0px var(--tw-text-shadow-color, rgb(0 0 0 / 0.15))",
xs: "0px 1px 1px var(--tw-text-shadow-color, rgb(0 0 0 / 0.2))",
sm: "0px 1px 0px var(--tw-text-shadow-color, rgb(0 0 0 / 0.075)), 0px 1px 1px var(--tw-text-shadow-color, rgb(0 0 0 / 0.075)), 0px 2px 2px var(--tw-text-shadow-color, rgb(0 0 0 / 0.075))",
md: "0px 1px 1px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1)), 0px 1px 2px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1)), 0px 2px 4px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1))",
lg: "0px 1px 2px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1)), 0px 3px 2px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1)), 0px 4px 8px var(--tw-text-shadow-color, rgb(0 0 0 / 0.1))",
none: "none"
}[e + r] || e};`,
opacity: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o ? null : `value:opacity: ${e + r || "%"}`,
"mix-blend": {
property: "mixBlendMode",
value: [
"normal",
"multiply",
"screen",
"overlay",
"darken",
"lighten",
"color-dodge",
"color-burn",
"hard-light",
"soft-light",
"difference",
"exclusion",
"hue",
"saturation",
"color",
"luminosity",
"plus-darker",
"plus-lighter"
]
},
"bg-blend": {
property: "backgroundBlendMode",
value: [
"normal",
"multiply",
"screen",
"overlay",
"darken",
"lighten",
"color-dodge",
"color-burn",
"hard-light",
"soft-light",
"difference",
"exclusion",
"hue",
"saturation",
"color",
"luminosity"
]
},
"mask-clip": ({ key: t = "", value: e = "", secondValue: r = "" }) => t || r || !["border", "padding", "content", "fill", "stroke", "view"].includes(e) ? null : `value:${s("maskClip")} ${e}-box`,
"mask-origin": ({ key: t = "", value: e = "", secondValue: r = "" }) => t || r || !["border", "padding", "content", "fill", "stroke", "view"].includes(e) ? null : `value:${s("maskOrigin")} ${e}-box`,
mask: ({ key: t = "", value: e = "", secondValue: r = "", raw: o }) => !e || t || r ? null : [
"top",
"left",
"bottom",
"right",
"top-left",
"top-right",
"bottom-left",
"bottom-right"
].includes(o[2]) ? `value:${s("maskPosition")}: ${e}` : ["add", "substract", "intersect", "exclude"].includes(e) ? `value:${s("maskComposite")}: ${e}` : ["repeat", "repeat-x", "repeat-y", "no-repeat", "repeat-space", "repeat-round"].includes(
e
) ? `value:${s("maskRepeat")}: ${e === "repeat-space" || e === "repeat-round" ? e.replace("repeat-", "") : e}` : ["cover", "auto", "contain"].includes(e) ? `value:${s("maskSize")}: ${e}` : `value:${s("maskImage")}: ${e}`,
/* mask-image logic later 🗿 */
"mask-position": "maskPosition",
"mask-size": "maskSize",
"mask-type": {
property: "maskType",
value: ["alpha", "luminance"]
}
}),
classes: {
maskClip: {
"mask-no-clip": "no-clip"
}
}
}, g = "filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);", k = "-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);", L = (n = 0.25) => ({
filter: "filter",
"backdrop-filter": "backdropFilter",
blur: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => {
if (!e || t || o) return null;
const l = {
xs: "4px",
sm: "8px",
md: "12px",
lg: "16px",
xl: "24px",
"2xl": "40px",
"3xl": "64px"
};
return !l[e + r] && !i.number.test(e) && e !== "none" ? null : `value:--tw-blur: ${e === "none" ? " " : `blur(${l[e + r] || e + (r || "px")})`}; ${g}`;
},
brightness: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-brightness: brightness(${i.number.test(e) ? e + "%" : e}); ${g}`,
contrast: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-contrast: contrast(${i.number.test(e) ? e + "%" : e}); ${g}`,
saturate: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-saturate: saturate(${i.number.test(e) ? e + "%" : e}); ${g}`,
"hue-rotate": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "deg" ? null : `value:--tw-hue-rotate: hue-rotate(${i.number.test(e) ? e + "deg" : e}); ${g}`,
grayscale: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o || r && r !== "%" ? null : `value:--tw-grayscale: grayscale(${e ? i.number.test(e) ? e + "%" : e : "100%"}); ${g}`,
invert: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o || r && r !== "%" ? null : `value:--tw-invert: invert(${e ? i.number.test(e) ? e + "%" : e : "100%"}); ${g}`,
sepia: ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o || r && r !== "%" ? null : `value:--tw-sepia: sepia(${e ? i.number.test(e) ? e + "%" : e : "100%"}); ${g}`,
"drop-shadow": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "", secondUnit: l = "" }) => {
if (!e || t || l) return null;
if (e === "current" || i.color.test(e))
return u("--tw-drop-shadow-color", e, o);
const a = {
xs: "0 1px 1px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.05))",
sm: "0 1px 2px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.15))",
md: "0 3px 3px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.12))",
lg: "0 4px 4px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.15))",
xl: "0 9px 7px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.1))",
"2xl": "0 25px 25px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.15))",
none: "0 0 #0000"
};
return o || i.length.test(e + r) ? null : `value:--tw-drop-shadow: drop-shadow(${a[e + r] || e + r}); ${g}`;
},
"backdrop-blur": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => {
if (!e || t || o) return null;
const l = {
xs: "4px",
sm: "8px",
md: "12px",
lg: "16px",
xl: "24px",
"2xl": "40px",
"3xl": "64px"
};
return !l[e + r] && !i.number.test(e) && e !== "none" ? null : `value:--tw-backdrop-blur: ${e === "none" ? " " : `blur(${l[e + r] || e + (r || "px")})`}; ${k}`;
},
"backdrop-brightness": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-backdrop-brightness: brightness(${i.number.test(e) ? e + "%" : e}); ${k}`,
"backdrop-contrast": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-backdrop-contrast: contrast(${i.number.test(e) ? e + "%" : e}); ${k}`,
"backdrop-saturate": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-backdrop-saturate: saturate(${i.number.test(e) ? e + "%" : e}); ${k}`,
"backdrop-opacity": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "%" ? null : `value:--tw-backdrop-opacity: opacity(${i.number.test(e) ? e + "%" : e}); ${k}`,
"backdrop-hue-rotate": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => !e || t || o || r && r !== "deg" ? null : `value:--tw-backdrop-hue-rotate: hue-rotate(${i.number.test(e) ? e + "deg" : e}); ${k}`,
"backdrop-grayscale": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o || r && r !== "%" ? null : `value:--tw-backdrop-grayscale: grayscale(${e ? i.number.test(e) ? e + "%" : e : "100%"}); ${k}`,
"backdrop-invert": ({ key: t = "", value: e = "", unit: r = "", secondValue: o = "" }) => t || o || r && r !=