@kitn.ai/ui
Version:
Framework-agnostic, Shadow-DOM web components for building AI chat interfaces — works in React, Vue, Angular, Svelte, or plain HTML. Authored in SolidJS.
1,798 lines • 583 kB
JavaScript
var Ql = Object.defineProperty;
var Jl = (e, t, n) => t in e ? Ql(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var $e = (e, t, n) => Jl(e, typeof t != "symbol" ? t + "" : t, n);
import { createSignal as ee, onCleanup as Re, useContext as Me, createContext as Ne, createRoot as es, splitProps as te, For as de, createEffect as ue, on as _e, Show as b, createMemo as G, mergeProps as ht, createUniqueId as qe, onMount as Be, ErrorBoundary as rn, Index as _r, untrack as ts, children as ns, createResource as rs, Switch as Kr, Match as Ae } from "solid-js";
import { createComponent as l, spread as se, mergeProps as z, memo as pe, insert as g, Dynamic as on, template as p, use as Se, effect as A, className as W, setAttribute as E, setStyleProperty as we, style as nt, delegateEvents as Ce, Portal as Hn, addEventListener as yt, setBoolAttribute as is } from "solid-js/web";
import { createStore as Cr, produce as ut, unwrap as dr } from "solid-js/store";
function Uo(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number") r += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var i = e.length;
for (t = 0; t < i; t++) e[t] && (n = Uo(e[t])) && (r && (r += " "), r += n);
} else for (n in e) e[n] && (r && (r += " "), r += n);
return r;
}
function Wo() {
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Uo(e)) && (r && (r += " "), r += t);
return r;
}
const os = (e, t) => {
const n = new Array(e.length + t.length);
for (let r = 0; r < e.length; r++)
n[r] = e[r];
for (let r = 0; r < t.length; r++)
n[e.length + r] = t[r];
return n;
}, as = (e, t) => ({
classGroupId: e,
validator: t
}), Go = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
nextPart: e,
validators: t,
classGroupId: n
}), In = "-", Mi = [], ls = "arbitrary..", ss = (e) => {
const t = ds(e), {
conflictingClassGroups: n,
conflictingClassGroupModifiers: r
} = e;
return {
getClassGroupId: (a) => {
if (a.startsWith("[") && a.endsWith("]"))
return cs(a);
const s = a.split(In), c = s[0] === "" && s.length > 1 ? 1 : 0;
return Ko(s, c, t);
},
getConflictingClassGroupIds: (a, s) => {
if (s) {
const c = r[a], u = n[a];
return c ? u ? os(u, c) : c : u || Mi;
}
return n[a] || Mi;
}
};
}, Ko = (e, t, n) => {
if (e.length - t === 0)
return n.classGroupId;
const i = e[t], o = n.nextPart.get(i);
if (o) {
const u = Ko(e, t + 1, o);
if (u) return u;
}
const a = n.validators;
if (a === null)
return;
const s = t === 0 ? e.join(In) : e.slice(t).join(In), c = a.length;
for (let u = 0; u < c; u++) {
const d = a[u];
if (d.validator(s))
return d.classGroupId;
}
}, cs = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
const t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
return r ? ls + r : void 0;
})(), ds = (e) => {
const {
theme: t,
classGroups: n
} = e;
return us(n, t);
}, us = (e, t) => {
const n = Go();
for (const r in e) {
const i = e[r];
Zr(i, n, r, t);
}
return n;
}, Zr = (e, t, n, r) => {
const i = e.length;
for (let o = 0; o < i; o++) {
const a = e[o];
fs(a, t, n, r);
}
}, fs = (e, t, n, r) => {
if (typeof e == "string") {
gs(e, t, n);
return;
}
if (typeof e == "function") {
hs(e, t, n, r);
return;
}
ms(e, t, n, r);
}, gs = (e, t, n) => {
const r = e === "" ? t : Zo(t, e);
r.classGroupId = n;
}, hs = (e, t, n, r) => {
if (vs(e)) {
Zr(e(r), t, n, r);
return;
}
t.validators === null && (t.validators = []), t.validators.push(as(n, e));
}, ms = (e, t, n, r) => {
const i = Object.entries(e), o = i.length;
for (let a = 0; a < o; a++) {
const [s, c] = i[a];
Zr(c, Zo(t, s), n, r);
}
}, Zo = (e, t) => {
let n = e;
const r = t.split(In), i = r.length;
for (let o = 0; o < i; o++) {
const a = r[o];
let s = n.nextPart.get(a);
s || (s = Go(), n.nextPart.set(a, s)), n = s;
}
return n;
}, vs = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, ps = (e) => {
if (e < 1)
return {
get: () => {
},
set: () => {
}
};
let t = 0, n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
const i = (o, a) => {
n[o] = a, t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ Object.create(null));
};
return {
get(o) {
let a = n[o];
if (a !== void 0)
return a;
if ((a = r[o]) !== void 0)
return i(o, a), a;
},
set(o, a) {
o in n ? n[o] = a : i(o, a);
}
};
}, Sr = "!", Ni = ":", bs = [], Pi = (e, t, n, r, i) => ({
modifiers: e,
hasImportantModifier: t,
baseClassName: n,
maybePostfixModifierPosition: r,
isExternal: i
}), xs = (e) => {
const {
prefix: t,
experimentalParseClassName: n
} = e;
let r = (i) => {
const o = [];
let a = 0, s = 0, c = 0, u;
const d = i.length;
for (let x = 0; x < d; x++) {
const k = i[x];
if (a === 0 && s === 0) {
if (k === Ni) {
o.push(i.slice(c, x)), c = x + 1;
continue;
}
if (k === "/") {
u = x;
continue;
}
}
k === "[" ? a++ : k === "]" ? a-- : k === "(" ? s++ : k === ")" && s--;
}
const f = o.length === 0 ? i : i.slice(c);
let h = f, m = !1;
f.endsWith(Sr) ? (h = f.slice(0, -1), m = !0) : (
/**
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
*/
f.startsWith(Sr) && (h = f.slice(1), m = !0)
);
const v = u && u > c ? u - c : void 0;
return Pi(o, m, h, v);
};
if (t) {
const i = t + Ni, o = r;
r = (a) => a.startsWith(i) ? o(a.slice(i.length)) : Pi(bs, !1, a, void 0, !0);
}
if (n) {
const i = r;
r = (o) => n({
className: o,
parseClassName: i
});
}
return r;
}, ys = (e) => {
const t = /* @__PURE__ */ new Map();
return e.orderSensitiveModifiers.forEach((n, r) => {
t.set(n, 1e6 + r);
}), (n) => {
const r = [];
let i = [];
for (let o = 0; o < n.length; o++) {
const a = n[o], s = a[0] === "[", c = t.has(a);
s || c ? (i.length > 0 && (i.sort(), r.push(...i), i = []), r.push(a)) : i.push(a);
}
return i.length > 0 && (i.sort(), r.push(...i)), r;
};
}, ks = (e) => ({
cache: ps(e.cacheSize),
parseClassName: xs(e),
sortModifiers: ys(e),
postfixLookupClassGroupIds: ws(e),
...ss(e)
}), ws = (e) => {
const t = /* @__PURE__ */ Object.create(null), n = e.postfixLookupClassGroups;
if (n)
for (let r = 0; r < n.length; r++)
t[n[r]] = !0;
return t;
}, $s = /\s+/, _s = (e, t) => {
const {
parseClassName: n,
getClassGroupId: r,
getConflictingClassGroupIds: i,
sortModifiers: o,
postfixLookupClassGroupIds: a
} = t, s = [], c = e.trim().split($s);
let u = "";
for (let d = c.length - 1; d >= 0; d -= 1) {
const f = c[d], {
isExternal: h,
modifiers: m,
hasImportantModifier: v,
baseClassName: x,
maybePostfixModifierPosition: k
} = n(f);
if (h) {
u = f + (u.length > 0 ? " " + u : u);
continue;
}
let I = !!k, w;
if (I) {
const D = x.substring(0, k);
w = r(D);
const R = w && a[w] ? r(x) : void 0;
R && R !== w && (w = R, I = !1);
} else
w = r(x);
if (!w) {
if (!I) {
u = f + (u.length > 0 ? " " + u : u);
continue;
}
if (w = r(x), !w) {
u = f + (u.length > 0 ? " " + u : u);
continue;
}
I = !1;
}
const L = m.length === 0 ? "" : m.length === 1 ? m[0] : o(m).join(":"), S = v ? L + Sr : L, N = S + w;
if (s.indexOf(N) > -1)
continue;
s.push(N);
const O = i(w, I);
for (let D = 0; D < O.length; ++D) {
const R = O[D];
s.push(S + R);
}
u = f + (u.length > 0 ? " " + u : u);
}
return u;
}, Cs = (...e) => {
let t = 0, n, r, i = "";
for (; t < e.length; )
(n = e[t++]) && (r = Xo(n)) && (i && (i += " "), i += r);
return i;
}, Xo = (e) => {
if (typeof e == "string")
return e;
let t, n = "";
for (let r = 0; r < e.length; r++)
e[r] && (t = Xo(e[r])) && (n && (n += " "), n += t);
return n;
}, Oi = (e, ...t) => {
let n, r, i, o;
const a = (c) => {
const u = t.reduce((d, f) => f(d), e());
return n = ks(u), r = n.cache.get, i = n.cache.set, o = s, s(c);
}, s = (c) => {
const u = r(c);
if (u)
return u;
const d = _s(c, n);
return i(c, d), d;
};
return o = a, (...c) => o(Cs(...c));
}, Ss = [], ze = (e) => {
const t = (n) => n[e] || Ss;
return t.isThemeGetter = !0, t;
}, Yo = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Qo = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ts = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Rs = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, zs = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, As = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Is = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Es = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, at = (e) => Ts.test(e), ge = (e) => !!e && !Number.isNaN(Number(e)), Ke = (e) => !!e && Number.isInteger(Number(e)), ur = (e) => e.endsWith("%") && ge(e.slice(0, -1)), et = (e) => Rs.test(e), Jo = () => !0, Ls = (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.
zs.test(e) && !As.test(e)
), Xr = () => !1, Ms = (e) => Is.test(e), Ns = (e) => Es.test(e), Ps = (e) => !ie(e) && !oe(e), Os = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Ds = (e) => mt(e, na, Xr), ie = (e) => Yo.test(e), pt = (e) => mt(e, ra, Ls), Di = (e) => mt(e, Ws, ge), Bs = (e) => mt(e, oa, Jo), Fs = (e) => mt(e, ia, Xr), Bi = (e) => mt(e, ea, Xr), js = (e) => mt(e, ta, Ns), hn = (e) => mt(e, aa, Ms), oe = (e) => Qo.test(e), Zt = (e) => Ct(e, ra), Hs = (e) => Ct(e, ia), Fi = (e) => Ct(e, ea), qs = (e) => Ct(e, na), Vs = (e) => Ct(e, ta), mn = (e) => Ct(e, aa, !0), Us = (e) => Ct(e, oa, !0), mt = (e, t, n) => {
const r = Yo.exec(e);
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
}, Ct = (e, t, n = !1) => {
const r = Qo.exec(e);
return r ? r[1] ? t(r[1]) : n : !1;
}, ea = (e) => e === "position" || e === "percentage", ta = (e) => e === "image" || e === "url", na = (e) => e === "length" || e === "size" || e === "bg-size", ra = (e) => e === "length", Ws = (e) => e === "number", ia = (e) => e === "family-name", oa = (e) => e === "number" || e === "weight", aa = (e) => e === "shadow", ji = () => {
const e = ze("color"), t = ze("font"), n = ze("text"), r = ze("font-weight"), i = ze("tracking"), o = ze("leading"), a = ze("breakpoint"), s = ze("container"), c = ze("spacing"), u = ze("radius"), d = ze("shadow"), f = ze("inset-shadow"), h = ze("text-shadow"), m = ze("drop-shadow"), v = ze("blur"), x = ze("perspective"), k = ze("aspect"), I = ze("ease"), w = ze("animate"), L = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], S = () => [
"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"
], N = () => [...S(), oe, ie], O = () => ["auto", "hidden", "clip", "visible", "scroll"], D = () => ["auto", "contain", "none"], R = () => [oe, ie, c], U = () => [at, "full", "auto", ...R()], q = () => [Ke, "none", "subgrid", oe, ie], j = () => ["auto", {
span: ["full", Ke, oe, ie]
}, Ke, oe, ie], C = () => [Ke, "auto", oe, ie], P = () => ["auto", "min", "max", "fr", oe, ie], y = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], M = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], F = () => ["auto", ...R()], H = () => [at, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...R()], Y = () => [at, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...R()], le = () => [at, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...R()], Q = () => [e, oe, ie], J = () => [...S(), Fi, Bi, {
position: [oe, ie]
}], ae = () => ["no-repeat", {
repeat: ["", "x", "y", "space", "round"]
}], $ = () => ["auto", "cover", "contain", qs, Ds, {
size: [oe, ie]
}], B = () => [ur, Zt, pt], K = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
"full",
u,
oe,
ie
], Z = () => ["", ge, Zt, pt], me = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], he = () => [ge, ur, Fi, Bi], Le = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
v,
oe,
ie
], ye = () => ["none", ge, oe, ie], We = () => ["none", ge, oe, ie], it = () => [ge, oe, ie], Ge = () => [at, "full", ...R()];
return {
cacheSize: 500,
theme: {
animate: ["spin", "ping", "pulse", "bounce"],
aspect: ["video"],
blur: [et],
breakpoint: [et],
color: [Jo],
container: [et],
"drop-shadow": [et],
ease: ["in", "out", "in-out"],
font: [Ps],
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
"inset-shadow": [et],
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
radius: [et],
shadow: [et],
spacing: ["px", ge],
text: [et],
"text-shadow": [et],
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
},
classGroups: {
// --------------
// --- Layout ---
// --------------
/**
* Aspect Ratio
* @see https://tailwindcss.com/docs/aspect-ratio
*/
aspect: [{
aspect: ["auto", "square", at, ie, oe, k]
}],
/**
* Container
* @see https://tailwindcss.com/docs/container
* @deprecated since Tailwind CSS v4.0.0
*/
container: ["container"],
/**
* Container Type
* @see https://tailwindcss.com/docs/responsive-design#container-queries
*/
"container-type": [{
"@container": ["", "normal", "size", oe, ie]
}],
/**
* Container Name
* @see https://tailwindcss.com/docs/responsive-design#named-containers
*/
"container-named": [Os],
/**
* Columns
* @see https://tailwindcss.com/docs/columns
*/
columns: [{
columns: [ge, ie, oe, s]
}],
/**
* Break After
* @see https://tailwindcss.com/docs/break-after
*/
"break-after": [{
"break-after": L()
}],
/**
* Break Before
* @see https://tailwindcss.com/docs/break-before
*/
"break-before": [{
"break-before": L()
}],
/**
* 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: N()
}],
/**
* Overflow
* @see https://tailwindcss.com/docs/overflow
*/
overflow: [{
overflow: O()
}],
/**
* Overflow X
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-x": [{
"overflow-x": O()
}],
/**
* Overflow Y
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-y": [{
"overflow-y": O()
}],
/**
* Overscroll Behavior
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
overscroll: [{
overscroll: D()
}],
/**
* Overscroll Behavior X
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-x": [{
"overscroll-x": D()
}],
/**
* Overscroll Behavior Y
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-y": [{
"overscroll-y": D()
}],
/**
* Position
* @see https://tailwindcss.com/docs/position
*/
position: ["static", "fixed", "absolute", "relative", "sticky"],
/**
* Inset
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
inset: [{
inset: U()
}],
/**
* Inset Inline
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-x": [{
"inset-x": U()
}],
/**
* Inset Block
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-y": [{
"inset-y": U()
}],
/**
* Inset Inline Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
* @todo class group will be renamed to `inset-s` in next major release
*/
start: [{
"inset-s": U(),
/**
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
*/
start: U()
}],
/**
* Inset Inline End
* @see https://tailwindcss.com/docs/top-right-bottom-left
* @todo class group will be renamed to `inset-e` in next major release
*/
end: [{
"inset-e": U(),
/**
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
*/
end: U()
}],
/**
* Inset Block Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-bs": [{
"inset-bs": U()
}],
/**
* Inset Block End
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-be": [{
"inset-be": U()
}],
/**
* Top
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
top: [{
top: U()
}],
/**
* Right
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
right: [{
right: U()
}],
/**
* Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
bottom: [{
bottom: U()
}],
/**
* Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
left: [{
left: U()
}],
/**
* Visibility
* @see https://tailwindcss.com/docs/visibility
*/
visibility: ["visible", "invisible", "collapse"],
/**
* Z-Index
* @see https://tailwindcss.com/docs/z-index
*/
z: [{
z: [Ke, "auto", oe, ie]
}],
// ------------------------
// --- Flexbox and Grid ---
// ------------------------
/**
* Flex Basis
* @see https://tailwindcss.com/docs/flex-basis
*/
basis: [{
basis: [at, "full", "auto", s, ...R()]
}],
/**
* 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: [ge, at, "auto", "initial", "none", ie]
}],
/**
* Flex Grow
* @see https://tailwindcss.com/docs/flex-grow
*/
grow: [{
grow: ["", ge, oe, ie]
}],
/**
* Flex Shrink
* @see https://tailwindcss.com/docs/flex-shrink
*/
shrink: [{
shrink: ["", ge, oe, ie]
}],
/**
* Order
* @see https://tailwindcss.com/docs/order
*/
order: [{
order: [Ke, "first", "last", "none", oe, ie]
}],
/**
* Grid Template Columns
* @see https://tailwindcss.com/docs/grid-template-columns
*/
"grid-cols": [{
"grid-cols": q()
}],
/**
* Grid Column Start / End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start-end": [{
col: j()
}],
/**
* Grid Column Start
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start": [{
"col-start": C()
}],
/**
* Grid Column End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-end": [{
"col-end": C()
}],
/**
* Grid Template Rows
* @see https://tailwindcss.com/docs/grid-template-rows
*/
"grid-rows": [{
"grid-rows": q()
}],
/**
* Grid Row Start / End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start-end": [{
row: j()
}],
/**
* Grid Row Start
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start": [{
"row-start": C()
}],
/**
* Grid Row End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-end": [{
"row-end": C()
}],
/**
* 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": P()
}],
/**
* Grid Auto Rows
* @see https://tailwindcss.com/docs/grid-auto-rows
*/
"auto-rows": [{
"auto-rows": P()
}],
/**
* Gap
* @see https://tailwindcss.com/docs/gap
*/
gap: [{
gap: R()
}],
/**
* Gap X
* @see https://tailwindcss.com/docs/gap
*/
"gap-x": [{
"gap-x": R()
}],
/**
* Gap Y
* @see https://tailwindcss.com/docs/gap
*/
"gap-y": [{
"gap-y": R()
}],
/**
* Justify Content
* @see https://tailwindcss.com/docs/justify-content
*/
"justify-content": [{
justify: [...y(), "normal"]
}],
/**
* Justify Items
* @see https://tailwindcss.com/docs/justify-items
*/
"justify-items": [{
"justify-items": [...M(), "normal"]
}],
/**
* Justify Self
* @see https://tailwindcss.com/docs/justify-self
*/
"justify-self": [{
"justify-self": ["auto", ...M()]
}],
/**
* Align Content
* @see https://tailwindcss.com/docs/align-content
*/
"align-content": [{
content: ["normal", ...y()]
}],
/**
* Align Items
* @see https://tailwindcss.com/docs/align-items
*/
"align-items": [{
items: [...M(), {
baseline: ["", "last"]
}]
}],
/**
* Align Self
* @see https://tailwindcss.com/docs/align-self
*/
"align-self": [{
self: ["auto", ...M(), {
baseline: ["", "last"]
}]
}],
/**
* Place Content
* @see https://tailwindcss.com/docs/place-content
*/
"place-content": [{
"place-content": y()
}],
/**
* Place Items
* @see https://tailwindcss.com/docs/place-items
*/
"place-items": [{
"place-items": [...M(), "baseline"]
}],
/**
* Place Self
* @see https://tailwindcss.com/docs/place-self
*/
"place-self": [{
"place-self": ["auto", ...M()]
}],
// Spacing
/**
* Padding
* @see https://tailwindcss.com/docs/padding
*/
p: [{
p: R()
}],
/**
* Padding Inline
* @see https://tailwindcss.com/docs/padding
*/
px: [{
px: R()
}],
/**
* Padding Block
* @see https://tailwindcss.com/docs/padding
*/
py: [{
py: R()
}],
/**
* Padding Inline Start
* @see https://tailwindcss.com/docs/padding
*/
ps: [{
ps: R()
}],
/**
* Padding Inline End
* @see https://tailwindcss.com/docs/padding
*/
pe: [{
pe: R()
}],
/**
* Padding Block Start
* @see https://tailwindcss.com/docs/padding
*/
pbs: [{
pbs: R()
}],
/**
* Padding Block End
* @see https://tailwindcss.com/docs/padding
*/
pbe: [{
pbe: R()
}],
/**
* Padding Top
* @see https://tailwindcss.com/docs/padding
*/
pt: [{
pt: R()
}],
/**
* Padding Right
* @see https://tailwindcss.com/docs/padding
*/
pr: [{
pr: R()
}],
/**
* Padding Bottom
* @see https://tailwindcss.com/docs/padding
*/
pb: [{
pb: R()
}],
/**
* Padding Left
* @see https://tailwindcss.com/docs/padding
*/
pl: [{
pl: R()
}],
/**
* Margin
* @see https://tailwindcss.com/docs/margin
*/
m: [{
m: F()
}],
/**
* Margin Inline
* @see https://tailwindcss.com/docs/margin
*/
mx: [{
mx: F()
}],
/**
* Margin Block
* @see https://tailwindcss.com/docs/margin
*/
my: [{
my: F()
}],
/**
* Margin Inline Start
* @see https://tailwindcss.com/docs/margin
*/
ms: [{
ms: F()
}],
/**
* Margin Inline End
* @see https://tailwindcss.com/docs/margin
*/
me: [{
me: F()
}],
/**
* Margin Block Start
* @see https://tailwindcss.com/docs/margin
*/
mbs: [{
mbs: F()
}],
/**
* Margin Block End
* @see https://tailwindcss.com/docs/margin
*/
mbe: [{
mbe: F()
}],
/**
* Margin Top
* @see https://tailwindcss.com/docs/margin
*/
mt: [{
mt: F()
}],
/**
* Margin Right
* @see https://tailwindcss.com/docs/margin
*/
mr: [{
mr: F()
}],
/**
* Margin Bottom
* @see https://tailwindcss.com/docs/margin
*/
mb: [{
mb: F()
}],
/**
* Margin Left
* @see https://tailwindcss.com/docs/margin
*/
ml: [{
ml: F()
}],
/**
* Space Between X
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
*/
"space-x": [{
"space-x": R()
}],
/**
* 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": R()
}],
/**
* 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: H()
}],
/**
* Inline Size
* @see https://tailwindcss.com/docs/width
*/
"inline-size": [{
inline: ["auto", ...Y()]
}],
/**
* Min-Inline Size
* @see https://tailwindcss.com/docs/min-width
*/
"min-inline-size": [{
"min-inline": ["auto", ...Y()]
}],
/**
* Max-Inline Size
* @see https://tailwindcss.com/docs/max-width
*/
"max-inline-size": [{
"max-inline": ["none", ...Y()]
}],
/**
* Block Size
* @see https://tailwindcss.com/docs/height
*/
"block-size": [{
block: ["auto", ...le()]
}],
/**
* Min-Block Size
* @see https://tailwindcss.com/docs/min-height
*/
"min-block-size": [{
"min-block": ["auto", ...le()]
}],
/**
* Max-Block Size
* @see https://tailwindcss.com/docs/max-height
*/
"max-block-size": [{
"max-block": ["none", ...le()]
}],
/**
* Width
* @see https://tailwindcss.com/docs/width
*/
w: [{
w: [s, "screen", ...H()]
}],
/**
* Min-Width
* @see https://tailwindcss.com/docs/min-width
*/
"min-w": [{
"min-w": [
s,
"screen",
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
"none",
...H()
]
}],
/**
* Max-Width
* @see https://tailwindcss.com/docs/max-width
*/
"max-w": [{
"max-w": [
s,
"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: [a]
},
...H()
]
}],
/**
* Height
* @see https://tailwindcss.com/docs/height
*/
h: [{
h: ["screen", "lh", ...H()]
}],
/**
* Min-Height
* @see https://tailwindcss.com/docs/min-height
*/
"min-h": [{
"min-h": ["screen", "lh", "none", ...H()]
}],
/**
* Max-Height
* @see https://tailwindcss.com/docs/max-height
*/
"max-h": [{
"max-h": ["screen", "lh", ...H()]
}],
// ------------------
// --- Typography ---
// ------------------
/**
* Font Size
* @see https://tailwindcss.com/docs/font-size
*/
"font-size": [{
text: ["base", n, Zt, pt]
}],
/**
* Font Smoothing
* @see https://tailwindcss.com/docs/font-smoothing
*/
"font-smoothing": ["antialiased", "subpixel-antialiased"],
/**
* Font Style
* @see https://tailwindcss.com/docs/font-style
*/
"font-style": ["italic", "not-italic"],
/**
* Font Weight
* @see https://tailwindcss.com/docs/font-weight
*/
"font-weight": [{
font: [r, Us, Bs]
}],
/**
* 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", ur, ie]
}],
/**
* Font Family
* @see https://tailwindcss.com/docs/font-family
*/
"font-family": [{
font: [Hs, Fs, t]
}],
/**
* Font Feature Settings
* @see https://tailwindcss.com/docs/font-feature-settings
*/
"font-features": [{
"font-features": [ie]
}],
/**
* 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, oe, ie]
}],
/**
* Line Clamp
* @see https://tailwindcss.com/docs/line-clamp
*/
"line-clamp": [{
"line-clamp": [ge, "none", oe, Di]
}],
/**
* 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 */
o,
...R()
]
}],
/**
* List Style Image
* @see https://tailwindcss.com/docs/list-style-image
*/
"list-image": [{
"list-image": ["none", oe, ie]
}],
/**
* 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", oe, ie]
}],
/**
* 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: Q()
}],
/**
* Text Color
* @see https://tailwindcss.com/docs/text-color
*/
"text-color": [{
text: Q()
}],
/**
* 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: [...me(), "wavy"]
}],
/**
* Text Decoration Thickness
* @see https://tailwindcss.com/docs/text-decoration-thickness
*/
"text-decoration-thickness": [{
decoration: [ge, "from-font", "auto", oe, pt]
}],
/**
* Text Decoration Color
* @see https://tailwindcss.com/docs/text-decoration-color
*/
"text-decoration-color": [{
decoration: Q()
}],
/**
* Text Underline Offset
* @see https://tailwindcss.com/docs/text-underline-offset
*/
"underline-offset": [{
"underline-offset": [ge, "auto", oe, ie]
}],
/**
* 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: R()
}],
/**
* Tab Size
* @see https://tailwindcss.com/docs/tab-size
*/
"tab-size": [{
tab: [Ke, oe, ie]
}],
/**
* Vertical Alignment
* @see https://tailwindcss.com/docs/vertical-align
*/
"vertical-align": [{
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", oe, ie]
}],
/**
* 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", oe, ie]
}],
// -------------------
// --- 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: J()
}],
/**
* Background Repeat
* @see https://tailwindcss.com/docs/background-repeat
*/
"bg-repeat": [{
bg: ae()
}],
/**
* Background Size
* @see https://tailwindcss.com/docs/background-size
*/
"bg-size": [{
bg: $()
}],
/**
* Background Image
* @see https://tailwindcss.com/docs/background-image
*/
"bg-image": [{
bg: ["none", {
linear: [{
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
}, Ke, oe, ie],
radial: ["", oe, ie],
conic: [Ke, oe, ie]
}, Vs, js]
}],
/**
* Background Color
* @see https://tailwindcss.com/docs/background-color
*/
"bg-color": [{
bg: Q()
}],
/**
* Gradient Color Stops From Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-from-pos": [{
from: B()
}],
/**
* Gradient Color Stops Via Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via-pos": [{
via: B()
}],
/**
* Gradient Color Stops To Position
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to-pos": [{
to: B()
}],
/**
* Gradient Color Stops From
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-from": [{
from: Q()
}],
/**
* Gradient Color Stops Via
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via": [{
via: Q()
}],
/**
* Gradient Color Stops To
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to": [{
to: Q()
}],
// ---------------
// --- Borders ---
// ---------------
/**
* Border Radius
* @see https://tailwindcss.com/docs/border-radius
*/
rounded: [{
rounded: K()
}],
/**
* Border Radius Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-s": [{
"rounded-s": K()
}],
/**
* Border Radius End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-e": [{
"rounded-e": K()
}],
/**
* Border Radius Top
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-t": [{
"rounded-t": K()
}],
/**
* Border Radius Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-r": [{
"rounded-r": K()
}],
/**
* Border Radius Bottom
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-b": [{
"rounded-b": K()
}],
/**
* Border Radius Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-l": [{
"rounded-l": K()
}],
/**
* Border Radius Start Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ss": [{
"rounded-ss": K()
}],
/**
* Border Radius Start End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-se": [{
"rounded-se": K()
}],
/**
* Border Radius End End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ee": [{
"rounded-ee": K()
}],
/**
* Border Radius End Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-es": [{
"rounded-es": K()
}],
/**
* Border Radius Top Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tl": [{
"rounded-tl": K()
}],
/**
* Border Radius Top Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tr": [{
"rounded-tr": K()
}],
/**
* Border Radius Bottom Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-br": [{
"rounded-br": K()
}],
/**
* Border Radius Bottom Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-bl": [{
"rounded-bl": K()
}],
/**
* Border Width
* @see https://tailwindcss.com/docs/border-width
*/
"border-w": [{
border: Z()
}],
/**
* Border Width Inline
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-x": [{
"border-x": Z()
}],
/**
* Border Width Block
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-y": [{
"border-y": Z()
}],
/**
* Border Width Inline Start
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-s": [{
"border-s": Z()
}],
/**
* Border Width Inline End
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-e": [{
"border-e": Z()
}],
/**
* Border Width Block Start
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-bs": [{
"border-bs": Z()
}],
/**
* Border Width Block End
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-be": [{
"border-be": Z()
}],
/**
* Border Width Top
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-t": [{
"border-t": Z()
}],
/**
* Border Width Right
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-r": [{
"border-r": Z()
}],
/**
* Border Width Bottom
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-b": [{
"border-b": Z()
}],
/**
* Border Width Left
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-l": [{
"border-l": Z()
}],
/**
* Divide Width X
* @see https://tailwindcss.com/docs/border-width#between-children
*/
"divide-x": [{
"divide-x": Z()
}],
/**
* 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": Z()
}],
/**
* 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: [...me(), "hidden", "none"]
}],
/**
* Divide Style
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
*/
"divide-style": [{
divide: [...me(), "hidden", "none"]
}],
/**
* Border Color
* @see https://tailwindcss.com/docs/border-color
*/
"border-color": [{
border: Q()
}],
/**
* Border Color Inline
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-x": [{
"border-x": Q()
}],
/**
* Border Color Block
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-y": [{
"border-y": Q()
}],
/**
* Border Color Inline Start
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-s": [{
"border-s": Q()
}],
/**
* Border Color Inline End
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-e": [{
"border-e": Q()
}],
/**
* Border Color Block Start
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-bs": [{
"border-bs": Q()
}],
/**
* Border Color Block End
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-be": [{
"border-be": Q()
}],
/**
* Border Color Top
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-t": [{
"border-t": Q()
}],
/**
* Border Color Right
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-r": [{
"border