dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
1,872 lines (1,871 loc) • 72.8 kB
JavaScript
function xe(e) {
var n, r, o = "";
if (typeof e == "string" || typeof e == "number") o += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var i = e.length;
for (n = 0; n < i; n++) e[n] && (r = xe(e[n])) && (o && (o += " "), o += r);
} else for (r in e) e[r] && (o && (o += " "), o += r);
return o;
}
function Re() {
for (var e, n, r = 0, o = "", i = arguments.length; r < i; r++) (e = arguments[r]) && (n = xe(e)) && (o && (o += " "), o += n);
return o;
}
const ne = "-", Pe = (e) => {
const n = Te(e), {
conflictingClassGroups: r,
conflictingClassGroupModifiers: o
} = e;
return {
getClassGroupId: (l) => {
const u = l.split(ne);
return u[0] === "" && u.length !== 1 && u.shift(), we(u, n) || Ge(l);
},
getConflictingClassGroupIds: (l, u) => {
const p = r[l] || [];
return u && o[l] ? [...p, ...o[l]] : p;
}
};
}, we = (e, n) => {
var l;
if (e.length === 0)
return n.classGroupId;
const r = e[0], o = n.nextPart.get(r), i = o ? we(e.slice(1), o) : void 0;
if (i)
return i;
if (n.validators.length === 0)
return;
const m = e.join(ne);
return (l = n.validators.find(({
validator: u
}) => u(m))) == null ? void 0 : l.classGroupId;
}, fe = /^\[(.+)\]$/, Ge = (e) => {
if (fe.test(e)) {
const n = fe.exec(e)[1], r = n == null ? void 0 : n.substring(0, n.indexOf(":"));
if (r)
return "arbitrary.." + r;
}
}, Te = (e) => {
const {
theme: n,
classGroups: r
} = e, o = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
};
for (const i in r)
re(r[i], o, i, n);
return o;
}, re = (e, n, r, o) => {
e.forEach((i) => {
if (typeof i == "string") {
const m = i === "" ? n : be(n, i);
m.classGroupId = r;
return;
}
if (typeof i == "function") {
if (Ee(i)) {
re(i(o), n, r, o);
return;
}
n.validators.push({
validator: i,
classGroupId: r
});
return;
}
Object.entries(i).forEach(([m, l]) => {
re(l, be(n, m), r, o);
});
});
}, be = (e, n) => {
let r = e;
return n.split(ne).forEach((o) => {
r.nextPart.has(o) || r.nextPart.set(o, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), r = r.nextPart.get(o);
}), r;
}, Ee = (e) => e.isThemeGetter, Le = (e) => {
if (e < 1)
return {
get: () => {
},
set: () => {
}
};
let n = 0, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
const i = (m, l) => {
r.set(m, l), n++, n > e && (n = 0, o = r, r = /* @__PURE__ */ new Map());
};
return {
get(m) {
let l = r.get(m);
if (l !== void 0)
return l;
if ((l = o.get(m)) !== void 0)
return i(m, l), l;
},
set(m, l) {
r.has(m) ? r.set(m, l) : i(m, l);
}
};
}, te = "!", se = ":", Ne = se.length, Ve = (e) => {
const {
prefix: n,
experimentalParseClassName: r
} = e;
let o = (i) => {
const m = [];
let l = 0, u = 0, p = 0, g;
for (let k = 0; k < i.length; k++) {
let y = i[k];
if (l === 0 && u === 0) {
if (y === se) {
m.push(i.slice(p, k)), p = k + Ne;
continue;
}
if (y === "/") {
g = k;
continue;
}
}
y === "[" ? l++ : y === "]" ? l-- : y === "(" ? u++ : y === ")" && u--;
}
const h = m.length === 0 ? i : i.substring(p), M = je(h), O = M !== h, F = g && g > p ? g - p : void 0;
return {
modifiers: m,
hasImportantModifier: O,
baseClassName: M,
maybePostfixModifierPosition: F
};
};
if (n) {
const i = n + se, m = o;
o = (l) => l.startsWith(i) ? m(l.substring(i.length)) : {
isExternal: !0,
modifiers: [],
hasImportantModifier: !1,
baseClassName: l,
maybePostfixModifierPosition: void 0
};
}
if (r) {
const i = o;
o = (m) => r({
className: m,
parseClassName: i
});
}
return o;
}, je = (e) => e.endsWith(te) ? e.substring(0, e.length - 1) : e.startsWith(te) ? e.substring(1) : e, Oe = (e) => {
const n = Object.fromEntries(e.orderSensitiveModifiers.map((o) => [o, !0]));
return (o) => {
if (o.length <= 1)
return o;
const i = [];
let m = [];
return o.forEach((l) => {
l[0] === "[" || n[l] ? (i.push(...m.sort(), l), m = []) : m.push(l);
}), i.push(...m.sort()), i;
};
}, Fe = (e) => ({
cache: Le(e.cacheSize),
parseClassName: Ve(e),
sortModifiers: Oe(e),
...Pe(e)
}), _e = /\s+/, Be = (e, n) => {
const {
parseClassName: r,
getClassGroupId: o,
getConflictingClassGroupIds: i,
sortModifiers: m
} = n, l = [], u = e.trim().split(_e);
let p = "";
for (let g = u.length - 1; g >= 0; g -= 1) {
const h = u[g], {
isExternal: M,
modifiers: O,
hasImportantModifier: F,
baseClassName: k,
maybePostfixModifierPosition: y
} = r(h);
if (M) {
p = h + (p.length > 0 ? " " + p : p);
continue;
}
let G = !!y, A = o(G ? k.substring(0, y) : k);
if (!A) {
if (!G) {
p = h + (p.length > 0 ? " " + p : p);
continue;
}
if (A = o(k), !A) {
p = h + (p.length > 0 ? " " + p : p);
continue;
}
G = !1;
}
const $ = m(O).join(":"), _ = F ? $ + te : $, T = _ + A;
if (l.includes(T))
continue;
l.push(T);
const E = i(A, G);
for (let I = 0; I < E.length; ++I) {
const B = E[I];
l.push(_ + B);
}
p = h + (p.length > 0 ? " " + p : p);
}
return p;
};
function We() {
let e = 0, n, r, o = "";
for (; e < arguments.length; )
(n = arguments[e++]) && (r = ke(n)) && (o && (o += " "), o += r);
return o;
}
const ke = (e) => {
if (typeof e == "string")
return e;
let n, r = "";
for (let o = 0; o < e.length; o++)
e[o] && (n = ke(e[o])) && (r && (r += " "), r += n);
return r;
};
function $e(e, ...n) {
let r, o, i, m = l;
function l(p) {
const g = n.reduce((h, M) => M(h), e());
return r = Fe(g), o = r.cache.get, i = r.cache.set, m = u, u(p);
}
function u(p) {
const g = o(p);
if (g)
return g;
const h = Be(p, r);
return i(p, h), h;
}
return function() {
return m(We.apply(null, arguments));
};
}
const f = (e) => {
const n = (r) => r[e] || [];
return n.isThemeGetter = !0, n;
}, ye = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ve = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ue = /^\d+\/\d+$/, qe = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, He = /\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$/, Je = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Xe = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, De = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, N = (e) => Ue.test(e), d = (e) => !!e && !Number.isNaN(Number(e)), S = (e) => !!e && Number.isInteger(Number(e)), ee = (e) => e.endsWith("%") && d(e.slice(0, -1)), C = (e) => qe.test(e), Ke = () => !0, Qe = (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.
He.test(e) && !Je.test(e)
), ze = () => !1, Ye = (e) => Xe.test(e), Ze = (e) => De.test(e), eo = (e) => !t(e) && !s(e), oo = (e) => V(e, Se, ze), t = (e) => ye.test(e), P = (e) => V(e, Ae, Qe), oe = (e) => V(e, ao, d), ge = (e) => V(e, Ce, ze), ro = (e) => V(e, Me, Ze), D = (e) => V(e, Ie, Ye), s = (e) => ve.test(e), W = (e) => j(e, Ae), to = (e) => j(e, io), he = (e) => j(e, Ce), so = (e) => j(e, Se), no = (e) => j(e, Me), K = (e) => j(e, Ie, !0), V = (e, n, r) => {
const o = ye.exec(e);
return o ? o[1] ? n(o[1]) : r(o[2]) : !1;
}, j = (e, n, r = !1) => {
const o = ve.exec(e);
return o ? o[1] ? n(o[1]) : r : !1;
}, Ce = (e) => e === "position" || e === "percentage", Me = (e) => e === "image" || e === "url", Se = (e) => e === "length" || e === "size" || e === "bg-size", Ae = (e) => e === "length", ao = (e) => e === "number", io = (e) => e === "family-name", Ie = (e) => e === "shadow", lo = () => {
const e = f("color"), n = f("font"), r = f("text"), o = f("font-weight"), i = f("tracking"), m = f("leading"), l = f("breakpoint"), u = f("container"), p = f("spacing"), g = f("radius"), h = f("shadow"), M = f("inset-shadow"), O = f("text-shadow"), F = f("drop-shadow"), k = f("blur"), y = f("perspective"), G = f("aspect"), A = f("ease"), $ = f("animate"), _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], T = () => [
"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"
], E = () => [...T(), s, t], I = () => ["auto", "hidden", "clip", "visible", "scroll"], B = () => ["auto", "contain", "none"], c = () => [s, t, p], v = () => [N, "full", "auto", ...c()], ae = () => [S, "none", "subgrid", s, t], ie = () => ["auto", {
span: ["full", S, s, t]
}, S, s, t], U = () => [S, "auto", s, t], le = () => ["auto", "min", "max", "fr", s, t], Q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], z = () => ["auto", ...c()], R = () => [N, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...c()], a = () => [e, s, t], ce = () => [...T(), he, ge, {
position: [s, t]
}], de = () => ["no-repeat", {
repeat: ["", "x", "y", "space", "round"]
}], me = () => ["auto", "cover", "contain", so, oo, {
size: [s, t]
}], Y = () => [ee, W, P], x = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
"full",
g,
s,
t
], w = () => ["", d, W, P], q = () => ["solid", "dashed", "dotted", "double"], pe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], b = () => [d, ee, he, ge], ue = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
k,
s,
t
], H = () => ["none", d, s, t], J = () => ["none", d, s, t], Z = () => [d, s, t], X = () => [N, "full", ...c()];
return {
cacheSize: 500,
theme: {
animate: ["spin", "ping", "pulse", "bounce"],
aspect: ["video"],
blur: [C],
breakpoint: [C],
color: [Ke],
container: [C],
"drop-shadow": [C],
ease: ["in", "out", "in-out"],
font: [eo],
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
"inset-shadow": [C],
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
radius: [C],
shadow: [C],
spacing: ["px", d],
text: [C],
"text-shadow": [C],
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
},
classGroups: {
// --------------
// --- Layout ---
// --------------
/**
* Aspect Ratio
* @see https://tailwindcss.com/docs/aspect-ratio
*/
aspect: [{
aspect: ["auto", "square", N, t, s, G]
}],
/**
* 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: [d, t, s, u]
}],
/**
* Break After
* @see https://tailwindcss.com/docs/break-after
*/
"break-after": [{
"break-after": _()
}],
/**
* Break Before
* @see https://tailwindcss.com/docs/break-before
*/
"break-before": [{
"break-before": _()
}],
/**
* 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: E()
}],
/**
* Overflow
* @see https://tailwindcss.com/docs/overflow
*/
overflow: [{
overflow: I()
}],
/**
* Overflow X
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-x": [{
"overflow-x": I()
}],
/**
* Overflow Y
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-y": [{
"overflow-y": I()
}],
/**
* Overscroll Behavior
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
overscroll: [{
overscroll: B()
}],
/**
* Overscroll Behavior X
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-x": [{
"overscroll-x": B()
}],
/**
* Overscroll Behavior Y
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-y": [{
"overscroll-y": B()
}],
/**
* 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: v()
}],
/**
* Right / Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-x": [{
"inset-x": v()
}],
/**
* Top / Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-y": [{
"inset-y": v()
}],
/**
* Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
start: [{
start: v()
}],
/**
* End
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
end: [{
end: v()
}],
/**
* Top
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
top: [{
top: v()
}],
/**
* Right
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
right: [{
right: v()
}],
/**
* Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
bottom: [{
bottom: v()
}],
/**
* Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
left: [{
left: v()
}],
/**
* Visibility
* @see https://tailwindcss.com/docs/visibility
*/
visibility: ["visible", "invisible", "collapse"],
/**
* Z-Index
* @see https://tailwindcss.com/docs/z-index
*/
z: [{
z: [S, "auto", s, t]
}],
// ------------------------
// --- Flexbox and Grid ---
// ------------------------
/**
* Flex Basis
* @see https://tailwindcss.com/docs/flex-basis
*/
basis: [{
basis: [N, "full", "auto", u, ...c()]
}],
/**
* 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: [d, N, "auto", "initial", "none", t]
}],
/**
* Flex Grow
* @see https://tailwindcss.com/docs/flex-grow
*/
grow: [{
grow: ["", d, s, t]
}],
/**
* Flex Shrink
* @see https://tailwindcss.com/docs/flex-shrink
*/
shrink: [{
shrink: ["", d, s, t]
}],
/**
* Order
* @see https://tailwindcss.com/docs/order
*/
order: [{
order: [S, "first", "last", "none", s, t]
}],
/**
* Grid Template Columns
* @see https://tailwindcss.com/docs/grid-template-columns
*/
"grid-cols": [{
"grid-cols": ae()
}],
/**
* Grid Column Start / End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start-end": [{
col: ie()
}],
/**
* Grid Column Start
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start": [{
"col-start": U()
}],
/**
* Grid Column End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-end": [{
"col-end": U()
}],
/**
* Grid Template Rows
* @see https://tailwindcss.com/docs/grid-template-rows
*/
"grid-rows": [{
"grid-rows": ae()
}],
/**
* Grid Row Start / End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start-end": [{
row: ie()
}],
/**
* Grid Row Start
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start": [{
"row-start": U()
}],
/**
* Grid Row End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-end": [{
"row-end": U()
}],
/**
* 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: c()
}],
/**
* Gap X
* @see https://tailwindcss.com/docs/gap
*/
"gap-x": [{
"gap-x": c()
}],
/**
* Gap Y
* @see https://tailwindcss.com/docs/gap
*/
"gap-y": [{
"gap-y": c()
}],
/**
* Justify Content
* @see https://tailwindcss.com/docs/justify-content
*/
"justify-content": [{
justify: [...Q(), "normal"]
}],
/**
* Justify Items
* @see https://tailwindcss.com/docs/justify-items
*/
"justify-items": [{
"justify-items": [...L(), "normal"]
}],
/**
* Justify Self
* @see https://tailwindcss.com/docs/justify-self
*/
"justify-self": [{
"justify-self": ["auto", ...L()]
}],
/**
* Align Content
* @see https://tailwindcss.com/docs/align-content
*/
"align-content": [{
content: ["normal", ...Q()]
}],
/**
* Align Items
* @see https://tailwindcss.com/docs/align-items
*/
"align-items": [{
items: [...L(), {
baseline: ["", "last"]
}]
}],
/**
* Align Self
* @see https://tailwindcss.com/docs/align-self
*/
"align-self": [{
self: ["auto", ...L(), {
baseline: ["", "last"]
}]
}],
/**
* Place Content
* @see https://tailwindcss.com/docs/place-content
*/
"place-content": [{
"place-content": Q()
}],
/**
* Place Items
* @see https://tailwindcss.com/docs/place-items
*/
"place-items": [{
"place-items": [...L(), "baseline"]
}],
/**
* Place Self
* @see https://tailwindcss.com/docs/place-self
*/
"place-self": [{
"place-self": ["auto", ...L()]
}],
// Spacing
/**
* Padding
* @see https://tailwindcss.com/docs/padding
*/
p: [{
p: c()
}],
/**
* Padding X
* @see https://tailwindcss.com/docs/padding
*/
px: [{
px: c()
}],
/**
* Padding Y
* @see https://tailwindcss.com/docs/padding
*/
py: [{
py: c()
}],
/**
* Padding Start
* @see https://tailwindcss.com/docs/padding
*/
ps: [{
ps: c()
}],
/**
* Padding End
* @see https://tailwindcss.com/docs/padding
*/
pe: [{
pe: c()
}],
/**
* Padding Top
* @see https://tailwindcss.com/docs/padding
*/
pt: [{
pt: c()
}],
/**
* Padding Right
* @see https://tailwindcss.com/docs/padding
*/
pr: [{
pr: c()
}],
/**
* Padding Bottom
* @see https://tailwindcss.com/docs/padding
*/
pb: [{
pb: c()
}],
/**
* Padding Left
* @see https://tailwindcss.com/docs/padding
*/
pl: [{
pl: c()
}],
/**
* Margin
* @see https://tailwindcss.com/docs/margin
*/
m: [{
m: z()
}],
/**
* Margin X
* @see https://tailwindcss.com/docs/margin
*/
mx: [{
mx: z()
}],
/**
* Margin Y
* @see https://tailwindcss.com/docs/margin
*/
my: [{
my: z()
}],
/**
* Margin Start
* @see https://tailwindcss.com/docs/margin
*/
ms: [{
ms: z()
}],
/**
* Margin End
* @see https://tailwindcss.com/docs/margin
*/
me: [{
me: z()
}],
/**
* Margin Top
* @see https://tailwindcss.com/docs/margin
*/
mt: [{
mt: z()
}],
/**
* Margin Right
* @see https://tailwindcss.com/docs/margin
*/
mr: [{
mr: z()
}],
/**
* Margin Bottom
* @see https://tailwindcss.com/docs/margin
*/
mb: [{
mb: z()
}],
/**
* Margin Left
* @see https://tailwindcss.com/docs/margin
*/
ml: [{
ml: z()
}],
/**
* Space Between X
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
*/
"space-x": [{
"space-x": c()
}],
/**
* 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": c()
}],
/**
* 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: R()
}],
/**
* Width
* @see https://tailwindcss.com/docs/width
*/
w: [{
w: [u, "screen", ...R()]
}],
/**
* 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",
...R()
]
}],
/**
* 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: [l]
},
...R()
]
}],
/**
* Height
* @see https://tailwindcss.com/docs/height
*/
h: [{
h: ["screen", "lh", ...R()]
}],
/**
* Min-Height
* @see https://tailwindcss.com/docs/min-height
*/
"min-h": [{
"min-h": ["screen", "lh", "none", ...R()]
}],
/**
* Max-Height
* @see https://tailwindcss.com/docs/max-height
*/
"max-h": [{
"max-h": ["screen", "lh", ...R()]
}],
// ------------------
// --- Typography ---
// ------------------
/**
* Font Size
* @see https://tailwindcss.com/docs/font-size
*/
"font-size": [{
text: ["base", r, W, P]
}],
/**
* 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: [o, s, oe]
}],
/**
* 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", ee, t]
}],
/**
* Font Family
* @see https://tailwindcss.com/docs/font-family
*/
"font-family": [{
font: [to, t, n]
}],
/**
* 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: [i, s, t]
}],
/**
* Line Clamp
* @see https://tailwindcss.com/docs/line-clamp
*/
"line-clamp": [{
"line-clamp": [d, "none", s, oe]
}],
/**
* 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 */
m,
...c()
]
}],
/**
* List Style Image
* @see https://tailwindcss.com/docs/list-style-image
*/
"list-image": [{
"list-image": ["none", s, t]
}],
/**
* 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", s, t]
}],
/**
* 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: a()
}],
/**
* Text Color
* @see https://tailwindcss.com/docs/text-color
*/
"text-color": [{
text: a()
}],
/**
* 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: [d, "from-font", "auto", s, P]
}],
/**
* Text Decoration Color
* @see https://tailwindcss.com/docs/text-decoration-color
*/
"text-decoration-color": [{
decoration: a()
}],
/**
* Text Underline Offset
* @see https://tailwindcss.com/docs/text-underline-offset
*/
"underline-offset": [{
"underline-offset": [d, "auto", s, t]
}],
/**
* 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: c()
}],
/**
* Vertical Alignment
* @see https://tailwindcss.com/docs/vertical-align
*/
"vertical-align": [{
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", s, t]
}],
/**
* 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", s, t]
}],
// -------------------
// --- 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: ce()
}],
/**
* Background Repeat
* @see https://tailwindcss.com/docs/background-repeat
*/
"bg-repeat": [{
bg: de()
}],
/**
* Background Size
* @see https://tailwindcss.com/docs/background-size
*/
"bg-size": [{
bg: me()
}],
/**
* Background Image
* @see https://tailwindcss.com/docs/background-image
*/
"bg-image": [{
bg: ["none", {
linear: [{
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
}, S, s, t],
radial: ["", s, t],
conic: [S, s, t]
}, no, ro]
}],
/**
* Background Color
* @see https://tailwindcss.com/docs/background-color
*/
"bg-color": [{
bg: a()
}],
/**
* 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: a()
}],
/**
* Gradient Color Stops Via
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via": [{
via: a()
}],
/**
* Gradient Color Stops To
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to": [{
to: a()
}],
// ---------------
// --- 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": [{
"rounded-t": x()
}],
/**
* Border Radius Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-r": [{
"rounded-r": x()
}],
/**
* Border Radius Bottom
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-b": [{
"rounded-b": x()
}],
/**
* Border Radius Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-l": [{
"rounded-l": x()
}],
/**
* Border Radius Start Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ss": [{
"rounded-ss": x()
}],
/**
* Border Radius Start End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-se": [{
"rounded-se": x()
}],
/**
* Border Radius End End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ee": [{
"rounded-ee": x()
}],
/**
* Border Radius End Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-es": [{
"rounded-es": x()
}],
/**
* Border Radius Top Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tl": [{
"rounded-tl": x()
}],
/**
* Border Radius Top Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tr": [{
"rounded-tr": x()
}],
/**
* Border Radius Bottom Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-br": [{
"rounded-br": x()
}],
/**
* Border Radius Bottom Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-bl": [{
"rounded-bl": x()
}],
/**
* Border Width
* @see https://tailwindcss.com/docs/border-width
*/
"border-w": [{
border: w()
}],
/**
* Border Width X
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-x": [{
"border-x": w()
}],
/**
* Border Width Y
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-y": [{
"border-y": w()
}],
/**
* Border Width Start
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-s": [{
"border-s": w()
}],
/**
* Border Width End
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-e": [{
"border-e": w()
}],
/**
* Border Width Top
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-t": [{
"border-t": w()
}],
/**
* Border Width Right
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-r": [{
"border-r": w()
}],
/**
* Border Width Bottom
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-b": [{
"border-b": w()
}],
/**
* Border Width Left
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-l": [{
"border-l": w()
}],
/**
* Divide Width X
* @see https://tailwindcss.com/docs/border-width#between-children
*/
"divide-x": [{
"divide-x": w()
}],
/**
* Divide Width X Reverse
* @see https://tailwindcss.com/docs/border-width#between-children
*/
"divide-x-reverse": ["divide-x-reverse"],
/**
* Divide Width Y
* @see https://tailwindcss.com/docs/border-width#between-children
*/
"divide-y": [{
"divide-y": w()
}],
/**
* Divide Width Y Reverse
* @see https://tailwindcss.com/docs/border-width#between-children
*/
"divide-y-reverse": ["divide-y-reverse"],
/**
* Border Style
* @see https://tailwindcss.com/docs/border-style
*/
"border-style": [{
border: [...q(), "hidden", "none"]
}],
/**
* Divide Style
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
*/
"divide-style": [{
divide: [...q(), "hidden", "none"]
}],
/**
* Border Color
* @see https://tailwindcss.com/docs/border-color
*/
"border-color": [{
border: a()
}],
/**
* Border Color X
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-x": [{
"border-x": a()
}],
/**
* Border Color Y
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-y": [{
"border-y": a()
}],
/**
* Border Color S
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-s": [{
"border-s": a()
}],
/**
* Border Color E
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-e": [{
"border-e": a()
}],
/**
* Border Color Top
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-t": [{
"border-t": a()
}],
/**
* Border Color Right
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-r": [{
"border-r": a()
}],
/**
* Border Color Bottom
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-b": [{
"border-b": a()
}],
/**
* Border Color Left
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-l": [{
"border-l": a()
}],
/**
* Divide Color
* @see https://tailwindcss.com/docs/divide-color
*/
"divide-color": [{
divide: a()
}],
/**
* Outline Style
* @see https://tailwindcss.com/docs/outline-style
*/
"outline-style": [{
outline: [...q(), "none", "hidden"]
}],
/**
* Outline Offset
* @see https://tailwindcss.com/docs/outline-offset
*/
"outline-offset": [{
"outline-offset": [d, s, t]
}],
/**
* Outline Width
* @see https://tailwindcss.com/docs/outline-width
*/
"outline-w": [{
outline: ["", d, W, P]
}],
/**
* Outline Color
* @see https://tailwindcss.com/docs/outline-color
*/
"outline-color": [{
outline: a()
}],
// ---------------
// --- Effects ---
// ---------------
/**
* Box Shadow
* @see https://tailwindcss.com/docs/box-shadow
*/
shadow: [{
shadow: [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
h,
K,
D
]
}],
/**
* Box Shadow Color
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
*/
"shadow-color": [{
shadow: a()
}],
/**
* Inset Box Shadow
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
*/
"inset-shadow": [{
"inset-shadow": ["none", M, K, D]
}],
/**
* Inset Box Shadow Color
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
*/
"inset-shadow-color": [{
"inset-shadow": a()
}],
/**
* Ring Width
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
*/
"ring-w": [{
ring: w()
}],
/**
* Ring Width Inset
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
* @deprecated since Tailwind CSS v4.0.0
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
*/
"ring-w-inset": ["ring-inset"],
/**
* Ring Color
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
*/
"ring-color": [{
ring: a()
}],
/**
* Ring Offset Width
* @see https://v3.tailwindcss.com/docs/ring-offset-width
* @deprecated since Tailwind CSS v4.0.0
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
*/
"ring-offset-w": [{
"ring-offset": [d, P]
}],
/**
* Ring Offset Color
* @see https://v3.tailwindcss.com/docs/ring-offset-color
* @deprecated since Tailwind CSS v4.0.0
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
*/
"ring-offset-color": [{
"ring-offset": a()
}],
/**
* Inset Ring Width
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
*/
"inset-ring-w": [{
"inset-ring": w()
}],
/**
* Inset Ring Color
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
*/
"inset-ring-color": [{
"inset-ring": a()
}],
/**
* Text Shadow
* @see https://tailwindcss.com/docs/text-shadow
*/
"text-shadow": [{
"text-shadow": ["none", O, K, D]
}],
/**
* Text Shadow Color
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
*/
"text-shadow-color": [{
"text-shadow": a()
}],
/**
* Opacity
* @see https://tailwindcss.com/docs/opacity
*/
opacity: [{
opacity: [d, s, t]
}],
/**
* Mix Blend Mode
* @see https://tailwindcss.com/docs/mix-blend-mode
*/
"mix-blend": [{
"mix-blend": [...pe(), "plus-darker", "plus-lighter"]
}],
/**
* Background Blend Mode
* @see https://tailwindcss.com/docs/background-blend-mode
*/
"bg-blend": [{
"bg-blend": pe()
}],
/**
* Mask Clip
* @see https://tailwindcss.com/docs/mask-clip
*/
"mask-clip": [{
"mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
}, "mask-no-clip"],
/**
* Mask Composite
* @see https://tailwindcss.com/docs/mask-composite
*/
"mask-composite": [{
mask: ["add", "subtract", "intersect", "exclude"]
}],
/**
* Mask Image
* @see https://tailwindcss.com/docs/mask-image
*/
"mask-image-linear-pos": [{
"mask-linear": [d]
}],
"mask-image-linear-from-pos": [{
"mask-linear-from": b()
}],
"mask-image-linear-to-pos": [{
"mask-linear-to": b()
}],
"mask-image-linear-from-color": [{
"mask-linear-from": a()
}],
"mask-image-linear-to-color": [{
"mask-linear-to": a()
}],
"mask-image-t-from-pos": [{
"mask-t-from": b()
}],
"mask-image-t-to-pos": [{
"mask-t-to": b()
}],
"mask-image-t-from-color": [{
"mask-t-from": a()
}],
"mask-image-t-to-color": [{
"mask-t-to": a()
}],
"mask-image-r-from-pos": [{
"mask-r-from": b()
}],
"mask-image-r-to-pos": [{
"mask-r-to": b()
}],
"mask-image-r-from-color": [{
"mask-r-from": a()
}],
"mask-image-r-to-color": [{
"mask-r-to": a()
}],
"mask-image-b-from-pos": [{
"mask-b-from": b()
}],
"mask-image-b-to-pos": [{
"mask-b-to": b()
}],
"mask-image-b-from-color": [{
"mask-b-from": a()
}],
"mask-image-b-to-color": [{
"mask-b-to": a()
}],
"mask-image-l-from-pos": [{
"mask-l-from": b()
}],
"mask-image-l-to-pos": [{
"mask-l-to": b()
}],
"mask-image-l-from-color": [{
"mask-l-from": a()
}],
"mask-image-l-to-color": [{
"mask-l-to": a()
}],
"mask-image-x-from-pos": [{
"mask-x-from": b()
}],
"mask-image-x-to-pos": [{
"mask-x-to": b()
}],
"mask-image-x-from-color": [{
"mask-x-from": a()
}],
"mask-image-x-to-color": [{
"mask-x-to": a()
}],
"mask-image-y-from-pos": [{
"mask-y-from": b()
}],
"mask-image-y-to-pos": [{
"mask-y-to": b()
}],
"mask-image-y-from-color": [{