react-ts-tab-lib
Version:
A React Typescript library rendering a Table compenent receiving in props for rows an array of a generic type T (precised when using the component) and for columns an array of objects of type Column<T> precising the displayName, the key of the T type and
1,861 lines • 371 kB
JavaScript
import { jsx as A, Fragment as wr, jsxs as ne } from "react/jsx-runtime";
import * as et from "react";
import J, { useRef as z, useImperativeHandle as Is, Children as Lr, isValidElement as An, useContext as de, useState as oe, useEffect as X, useMemo as G, useCallback as q, createContext as ct, useLayoutEffect as Fi, useId as Kn, useInsertionEffect as Ii, forwardRef as Ri, Fragment as Rs, createElement as Os, cloneElement as Oi } from "react";
import Bs, { flushSync as Bi } from "react-dom";
import './index.css';function Cs({
title: e,
titleId: t,
...r
}, o) {
return /* @__PURE__ */ et.createElement("svg", Object.assign({
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "currentColor",
"aria-hidden": "true",
"data-slot": "icon",
ref: o,
"aria-labelledby": t
}, r), e ? /* @__PURE__ */ et.createElement("title", {
id: t
}, e) : null, /* @__PURE__ */ et.createElement("path", {
fillRule: "evenodd",
d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
clipRule: "evenodd"
}));
}
const zs = /* @__PURE__ */ et.forwardRef(Cs);
var Hs = {
default: "bg-default text-default-foreground",
primary: "bg-primary text-primary-foreground",
secondary: "bg-secondary text-secondary-foreground",
success: "bg-success text-success-foreground",
warning: "bg-warning text-warning-foreground",
danger: "bg-danger text-danger-foreground",
foreground: "bg-foreground text-background"
}, _s = {
default: "shadow-lg shadow-default/50 bg-default text-default-foreground",
primary: "shadow-lg shadow-primary/40 bg-primary text-primary-foreground",
secondary: "shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",
success: "shadow-lg shadow-success/40 bg-success text-success-foreground",
warning: "shadow-lg shadow-warning/40 bg-warning text-warning-foreground",
danger: "shadow-lg shadow-danger/40 bg-danger text-danger-foreground"
}, Vs = {
default: "bg-transparent border-default text-foreground",
primary: "bg-transparent border-primary text-primary",
secondary: "bg-transparent border-secondary text-secondary",
success: "bg-transparent border-success text-success",
warning: "bg-transparent border-warning text-warning",
danger: "bg-transparent border-danger text-danger"
}, Ws = {
default: "bg-default/40 text-default-700",
primary: "bg-primary/20 text-primary-600",
secondary: "bg-secondary/20 text-secondary-600",
success: "bg-success/20 text-success-700 dark:text-success",
warning: "bg-warning/20 text-warning-700 dark:text-warning",
danger: "bg-danger/20 text-danger-600 dark:text-danger-500"
}, js = {
default: "border-default bg-default-100 text-default-foreground",
primary: "border-default bg-default-100 text-primary",
secondary: "border-default bg-default-100 text-secondary",
success: "border-default bg-default-100 text-success",
warning: "border-default bg-default-100 text-warning",
danger: "border-default bg-default-100 text-danger"
}, Us = {
default: "bg-transparent text-default-foreground",
primary: "bg-transparent text-primary",
secondary: "bg-transparent text-secondary",
success: "bg-transparent text-success",
warning: "bg-transparent text-warning",
danger: "bg-transparent text-danger"
}, Gs = {
default: "border-default text-default-foreground",
primary: "border-primary text-primary",
secondary: "border-secondary text-secondary",
success: "border-success text-success",
warning: "border-warning text-warning",
danger: "border-danger text-danger"
}, V = {
solid: Hs,
shadow: _s,
bordered: Vs,
flat: Ws,
faded: js,
light: Us,
ghost: Gs
}, ir = ["small", "medium", "large"], xo = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: ir,
borderRadius: ir
},
classGroups: {
shadow: [{ shadow: ir }],
"font-size": [{ text: ["tiny", ...ir] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
}, Po = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ke = (e) => !e || typeof e != "object" || Object.keys(e).length === 0, Ns = (e, t) => JSON.stringify(e) === JSON.stringify(t);
function Ci(e, t) {
e.forEach(function(r) {
Array.isArray(r) ? Ci(r, t) : t.push(r);
});
}
function zi(e) {
let t = [];
return Ci(e, t), t;
}
var Hi = (...e) => zi(e).filter(Boolean), _i = (e, t) => {
let r = {}, o = Object.keys(e), n = Object.keys(t);
for (let i of o) if (n.includes(i)) {
let a = e[i], l = t[i];
Array.isArray(a) || Array.isArray(l) ? r[i] = Hi(l, a) : typeof a == "object" && typeof l == "object" ? r[i] = _i(a, l) : r[i] = l + " " + a;
} else r[i] = e[i];
for (let i of n) o.includes(i) || (r[i] = t[i]);
return r;
}, Eo = (e) => !e || typeof e != "string" ? e : e.replace(/\s+/g, " ").trim();
const Fn = "-", Ys = (e) => {
const t = qs(e), {
conflictingClassGroups: r,
conflictingClassGroupModifiers: o
} = e;
return {
getClassGroupId: (a) => {
const l = a.split(Fn);
return l[0] === "" && l.length !== 1 && l.shift(), Vi(l, t) || Xs(a);
},
getConflictingClassGroupIds: (a, l) => {
const s = r[a] || [];
return l && o[a] ? [...s, ...o[a]] : s;
}
};
}, Vi = (e, t) => {
var a;
if (e.length === 0)
return t.classGroupId;
const r = e[0], o = t.nextPart.get(r), n = o ? Vi(e.slice(1), o) : void 0;
if (n)
return n;
if (t.validators.length === 0)
return;
const i = e.join(Fn);
return (a = t.validators.find(({
validator: l
}) => l(i))) == null ? void 0 : a.classGroupId;
}, So = /^\[(.+)\]$/, Xs = (e) => {
if (So.test(e)) {
const t = So.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
if (r)
return "arbitrary.." + r;
}
}, qs = (e) => {
const {
theme: t,
prefix: r
} = e, o = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
};
return Js(Object.entries(e.classGroups), r).forEach(([i, a]) => {
cn(a, o, i, t);
}), o;
}, cn = (e, t, r, o) => {
e.forEach((n) => {
if (typeof n == "string") {
const i = n === "" ? t : To(t, n);
i.classGroupId = r;
return;
}
if (typeof n == "function") {
if (Zs(n)) {
cn(n(o), t, r, o);
return;
}
t.validators.push({
validator: n,
classGroupId: r
});
return;
}
Object.entries(n).forEach(([i, a]) => {
cn(a, To(t, i), r, o);
});
});
}, To = (e, t) => {
let r = e;
return t.split(Fn).forEach((o) => {
r.nextPart.has(o) || r.nextPart.set(o, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), r = r.nextPart.get(o);
}), r;
}, Zs = (e) => e.isThemeGetter, Js = (e, t) => t ? e.map(([r, o]) => {
const n = o.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([a, l]) => [t + a, l])) : i);
return [r, n];
}) : e, Qs = (e) => {
if (e < 1)
return {
get: () => {
},
set: () => {
}
};
let t = 0, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
const n = (i, a) => {
r.set(i, a), t++, t > e && (t = 0, o = r, r = /* @__PURE__ */ new Map());
};
return {
get(i) {
let a = r.get(i);
if (a !== void 0)
return a;
if ((a = o.get(i)) !== void 0)
return n(i, a), a;
},
set(i, a) {
r.has(i) ? r.set(i, a) : n(i, a);
}
};
}, Wi = "!", ec = (e) => {
const {
separator: t,
experimentalParseClassName: r
} = e, o = t.length === 1, n = t[0], i = t.length, a = (l) => {
const s = [];
let u = 0, c = 0, f;
for (let v = 0; v < l.length; v++) {
let x = l[v];
if (u === 0) {
if (x === n && (o || l.slice(v, v + i) === t)) {
s.push(l.slice(c, v)), c = v + i;
continue;
}
if (x === "/") {
f = v;
continue;
}
}
x === "[" ? u++ : x === "]" && u--;
}
const d = s.length === 0 ? l : l.substring(c), p = d.startsWith(Wi), b = p ? d.substring(1) : d, y = f && f > c ? f - c : void 0;
return {
modifiers: s,
hasImportantModifier: p,
baseClassName: b,
maybePostfixModifierPosition: y
};
};
return r ? (l) => r({
className: l,
parseClassName: a
}) : a;
}, tc = (e) => {
if (e.length <= 1)
return e;
const t = [];
let r = [];
return e.forEach((o) => {
o[0] === "[" ? (t.push(...r.sort(), o), r = []) : r.push(o);
}), t.push(...r.sort()), t;
}, rc = (e) => ({
cache: Qs(e.cacheSize),
parseClassName: ec(e),
...Ys(e)
}), nc = /\s+/, oc = (e, t) => {
const {
parseClassName: r,
getClassGroupId: o,
getConflictingClassGroupIds: n
} = t, i = [], a = e.trim().split(nc);
let l = "";
for (let s = a.length - 1; s >= 0; s -= 1) {
const u = a[s], {
modifiers: c,
hasImportantModifier: f,
baseClassName: d,
maybePostfixModifierPosition: p
} = r(u);
let b = !!p, y = o(b ? d.substring(0, p) : d);
if (!y) {
if (!b) {
l = u + (l.length > 0 ? " " + l : l);
continue;
}
if (y = o(d), !y) {
l = u + (l.length > 0 ? " " + l : l);
continue;
}
b = !1;
}
const v = tc(c).join(":"), x = f ? v + Wi : v, m = x + y;
if (i.includes(m))
continue;
i.push(m);
const S = n(y, b);
for (let K = 0; K < S.length; ++K) {
const T = S[K];
i.push(x + T);
}
l = u + (l.length > 0 ? " " + l : l);
}
return l;
};
function ic() {
let e = 0, t, r, o = "";
for (; e < arguments.length; )
(t = arguments[e++]) && (r = ji(t)) && (o && (o += " "), o += r);
return o;
}
const ji = (e) => {
if (typeof e == "string")
return e;
let t, r = "";
for (let o = 0; o < e.length; o++)
e[o] && (t = ji(e[o])) && (r && (r += " "), r += t);
return r;
};
function un(e, ...t) {
let r, o, n, i = a;
function a(s) {
const u = t.reduce((c, f) => f(c), e());
return r = rc(u), o = r.cache.get, n = r.cache.set, i = l, l(s);
}
function l(s) {
const u = o(s);
if (u)
return u;
const c = oc(s, r);
return n(s, c), c;
}
return function() {
return i(ic.apply(null, arguments));
};
}
const ce = (e) => {
const t = (r) => r[e] || [];
return t.isThemeGetter = !0, t;
}, Ui = /^\[(?:([a-z-]+):)?(.+)\]$/i, ac = /^\d+\/\d+$/, lc = /* @__PURE__ */ new Set(["px", "full", "screen"]), sc = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, cc = /\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$/, uc = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, dc = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, fc = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, qe = (e) => At(e) || lc.has(e) || ac.test(e), it = (e) => Rt(e, "length", wc), At = (e) => !!e && !Number.isNaN(Number(e)), Gr = (e) => Rt(e, "number", At), Vt = (e) => !!e && Number.isInteger(Number(e)), pc = (e) => e.endsWith("%") && At(e.slice(0, -1)), U = (e) => Ui.test(e), at = (e) => sc.test(e), gc = /* @__PURE__ */ new Set(["length", "size", "percentage"]), hc = (e) => Rt(e, gc, Gi), bc = (e) => Rt(e, "position", Gi), vc = /* @__PURE__ */ new Set(["image", "url"]), mc = (e) => Rt(e, vc, xc), yc = (e) => Rt(e, "", $c), Wt = () => !0, Rt = (e, t, r) => {
const o = Ui.exec(e);
return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : r(o[2]) : !1;
}, wc = (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.
cc.test(e) && !uc.test(e)
), Gi = () => !1, $c = (e) => dc.test(e), xc = (e) => fc.test(e), dn = () => {
const e = ce("colors"), t = ce("spacing"), r = ce("blur"), o = ce("brightness"), n = ce("borderColor"), i = ce("borderRadius"), a = ce("borderSpacing"), l = ce("borderWidth"), s = ce("contrast"), u = ce("grayscale"), c = ce("hueRotate"), f = ce("invert"), d = ce("gap"), p = ce("gradientColorStops"), b = ce("gradientColorStopPositions"), y = ce("inset"), v = ce("margin"), x = ce("opacity"), m = ce("padding"), S = ce("saturate"), K = ce("scale"), T = ce("sepia"), L = ce("skew"), B = ce("space"), g = ce("translate"), D = () => ["auto", "contain", "none"], I = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", U, t], P = () => [U, t], h = () => ["", qe, it], M = () => ["auto", At, U], w = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], k = () => ["solid", "dashed", "dotted", "double", "none"], F = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], $ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", U], C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], _ = () => [At, U];
return {
cacheSize: 500,
separator: ":",
theme: {
colors: [Wt],
spacing: [qe, it],
blur: ["none", "", at, U],
brightness: _(),
borderColor: [e],
borderRadius: ["none", "", "full", at, U],
borderSpacing: P(),
borderWidth: h(),
contrast: _(),
grayscale: O(),
hueRotate: _(),
invert: O(),
gap: P(),
gradientColorStops: [e],
gradientColorStopPositions: [pc, it],
inset: E(),
margin: E(),
opacity: _(),
padding: P(),
saturate: _(),
scale: _(),
sepia: O(),
skew: _(),
space: P(),
translate: P()
},
classGroups: {
// Layout
/**
* Aspect Ratio
* @see https://tailwindcss.com/docs/aspect-ratio
*/
aspect: [{
aspect: ["auto", "square", "video", U]
}],
/**
* Container
* @see https://tailwindcss.com/docs/container
*/
container: ["container"],
/**
* Columns
* @see https://tailwindcss.com/docs/columns
*/
columns: [{
columns: [at]
}],
/**
* Break After
* @see https://tailwindcss.com/docs/break-after
*/
"break-after": [{
"break-after": C()
}],
/**
* Break Before
* @see https://tailwindcss.com/docs/break-before
*/
"break-before": [{
"break-before": C()
}],
/**
* Break Inside
* @see https://tailwindcss.com/docs/break-inside
*/
"break-inside": [{
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
}],
/**
* Box Decoration Break
* @see https://tailwindcss.com/docs/box-decoration-break
*/
"box-decoration": [{
"box-decoration": ["slice", "clone"]
}],
/**
* Box Sizing
* @see https://tailwindcss.com/docs/box-sizing
*/
box: [{
box: ["border", "content"]
}],
/**
* Display
* @see https://tailwindcss.com/docs/display
*/
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
/**
* 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: [...w(), U]
}],
/**
* 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: 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"],
/**
* Top / Right / Bottom / Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
inset: [{
inset: [y]
}],
/**
* Right / Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-x": [{
"inset-x": [y]
}],
/**
* Top / Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-y": [{
"inset-y": [y]
}],
/**
* Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
start: [{
start: [y]
}],
/**
* End
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
end: [{
end: [y]
}],
/**
* Top
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
top: [{
top: [y]
}],
/**
* Right
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
right: [{
right: [y]
}],
/**
* Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
bottom: [{
bottom: [y]
}],
/**
* Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
left: [{
left: [y]
}],
/**
* Visibility
* @see https://tailwindcss.com/docs/visibility
*/
visibility: ["visible", "invisible", "collapse"],
/**
* Z-Index
* @see https://tailwindcss.com/docs/z-index
*/
z: [{
z: ["auto", Vt, U]
}],
// Flexbox and Grid
/**
* Flex Basis
* @see https://tailwindcss.com/docs/flex-basis
*/
basis: [{
basis: E()
}],
/**
* 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: ["wrap", "wrap-reverse", "nowrap"]
}],
/**
* Flex
* @see https://tailwindcss.com/docs/flex
*/
flex: [{
flex: ["1", "auto", "initial", "none", U]
}],
/**
* Flex Grow
* @see https://tailwindcss.com/docs/flex-grow
*/
grow: [{
grow: O()
}],
/**
* Flex Shrink
* @see https://tailwindcss.com/docs/flex-shrink
*/
shrink: [{
shrink: O()
}],
/**
* Order
* @see https://tailwindcss.com/docs/order
*/
order: [{
order: ["first", "last", "none", Vt, U]
}],
/**
* Grid Template Columns
* @see https://tailwindcss.com/docs/grid-template-columns
*/
"grid-cols": [{
"grid-cols": [Wt]
}],
/**
* Grid Column Start / End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start-end": [{
col: ["auto", {
span: ["full", Vt, U]
}, U]
}],
/**
* Grid Column Start
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start": [{
"col-start": M()
}],
/**
* Grid Column End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-end": [{
"col-end": M()
}],
/**
* Grid Template Rows
* @see https://tailwindcss.com/docs/grid-template-rows
*/
"grid-rows": [{
"grid-rows": [Wt]
}],
/**
* Grid Row Start / End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start-end": [{
row: ["auto", {
span: [Vt, U]
}, U]
}],
/**
* Grid Row Start
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start": [{
"row-start": M()
}],
/**
* Grid Row End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-end": [{
"row-end": M()
}],
/**
* 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": ["auto", "min", "max", "fr", U]
}],
/**
* Grid Auto Rows
* @see https://tailwindcss.com/docs/grid-auto-rows
*/
"auto-rows": [{
"auto-rows": ["auto", "min", "max", "fr", U]
}],
/**
* Gap
* @see https://tailwindcss.com/docs/gap
*/
gap: [{
gap: [d]
}],
/**
* Gap X
* @see https://tailwindcss.com/docs/gap
*/
"gap-x": [{
"gap-x": [d]
}],
/**
* Gap Y
* @see https://tailwindcss.com/docs/gap
*/
"gap-y": [{
"gap-y": [d]
}],
/**
* Justify Content
* @see https://tailwindcss.com/docs/justify-content
*/
"justify-content": [{
justify: ["normal", ...$()]
}],
/**
* Justify Items
* @see https://tailwindcss.com/docs/justify-items
*/
"justify-items": [{
"justify-items": ["start", "end", "center", "stretch"]
}],
/**
* Justify Self
* @see https://tailwindcss.com/docs/justify-self
*/
"justify-self": [{
"justify-self": ["auto", "start", "end", "center", "stretch"]
}],
/**
* Align Content
* @see https://tailwindcss.com/docs/align-content
*/
"align-content": [{
content: ["normal", ...$(), "baseline"]
}],
/**
* Align Items
* @see https://tailwindcss.com/docs/align-items
*/
"align-items": [{
items: ["start", "end", "center", "baseline", "stretch"]
}],
/**
* Align Self
* @see https://tailwindcss.com/docs/align-self
*/
"align-self": [{
self: ["auto", "start", "end", "center", "stretch", "baseline"]
}],
/**
* Place Content
* @see https://tailwindcss.com/docs/place-content
*/
"place-content": [{
"place-content": [...$(), "baseline"]
}],
/**
* Place Items
* @see https://tailwindcss.com/docs/place-items
*/
"place-items": [{
"place-items": ["start", "end", "center", "baseline", "stretch"]
}],
/**
* Place Self
* @see https://tailwindcss.com/docs/place-self
*/
"place-self": [{
"place-self": ["auto", "start", "end", "center", "stretch"]
}],
// Spacing
/**
* Padding
* @see https://tailwindcss.com/docs/padding
*/
p: [{
p: [m]
}],
/**
* Padding X
* @see https://tailwindcss.com/docs/padding
*/
px: [{
px: [m]
}],
/**
* Padding Y
* @see https://tailwindcss.com/docs/padding
*/
py: [{
py: [m]
}],
/**
* Padding Start
* @see https://tailwindcss.com/docs/padding
*/
ps: [{
ps: [m]
}],
/**
* Padding End
* @see https://tailwindcss.com/docs/padding
*/
pe: [{
pe: [m]
}],
/**
* Padding Top
* @see https://tailwindcss.com/docs/padding
*/
pt: [{
pt: [m]
}],
/**
* Padding Right
* @see https://tailwindcss.com/docs/padding
*/
pr: [{
pr: [m]
}],
/**
* Padding Bottom
* @see https://tailwindcss.com/docs/padding
*/
pb: [{
pb: [m]
}],
/**
* Padding Left
* @see https://tailwindcss.com/docs/padding
*/
pl: [{
pl: [m]
}],
/**
* Margin
* @see https://tailwindcss.com/docs/margin
*/
m: [{
m: [v]
}],
/**
* Margin X
* @see https://tailwindcss.com/docs/margin
*/
mx: [{
mx: [v]
}],
/**
* Margin Y
* @see https://tailwindcss.com/docs/margin
*/
my: [{
my: [v]
}],
/**
* Margin Start
* @see https://tailwindcss.com/docs/margin
*/
ms: [{
ms: [v]
}],
/**
* Margin End
* @see https://tailwindcss.com/docs/margin
*/
me: [{
me: [v]
}],
/**
* Margin Top
* @see https://tailwindcss.com/docs/margin
*/
mt: [{
mt: [v]
}],
/**
* Margin Right
* @see https://tailwindcss.com/docs/margin
*/
mr: [{
mr: [v]
}],
/**
* Margin Bottom
* @see https://tailwindcss.com/docs/margin
*/
mb: [{
mb: [v]
}],
/**
* Margin Left
* @see https://tailwindcss.com/docs/margin
*/
ml: [{
ml: [v]
}],
/**
* Space Between X
* @see https://tailwindcss.com/docs/space
*/
"space-x": [{
"space-x": [B]
}],
/**
* Space Between X Reverse
* @see https://tailwindcss.com/docs/space
*/
"space-x-reverse": ["space-x-reverse"],
/**
* Space Between Y
* @see https://tailwindcss.com/docs/space
*/
"space-y": [{
"space-y": [B]
}],
/**
* Space Between Y Reverse
* @see https://tailwindcss.com/docs/space
*/
"space-y-reverse": ["space-y-reverse"],
// Sizing
/**
* Width
* @see https://tailwindcss.com/docs/width
*/
w: [{
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", U, t]
}],
/**
* Min-Width
* @see https://tailwindcss.com/docs/min-width
*/
"min-w": [{
"min-w": [U, t, "min", "max", "fit"]
}],
/**
* Max-Width
* @see https://tailwindcss.com/docs/max-width
*/
"max-w": [{
"max-w": [U, t, "none", "full", "min", "max", "fit", "prose", {
screen: [at]
}, at]
}],
/**
* Height
* @see https://tailwindcss.com/docs/height
*/
h: [{
h: [U, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
}],
/**
* Min-Height
* @see https://tailwindcss.com/docs/min-height
*/
"min-h": [{
"min-h": [U, t, "min", "max", "fit", "svh", "lvh", "dvh"]
}],
/**
* Max-Height
* @see https://tailwindcss.com/docs/max-height
*/
"max-h": [{
"max-h": [U, t, "min", "max", "fit", "svh", "lvh", "dvh"]
}],
/**
* Size
* @see https://tailwindcss.com/docs/size
*/
size: [{
size: [U, t, "auto", "min", "max", "fit"]
}],
// Typography
/**
* Font Size
* @see https://tailwindcss.com/docs/font-size
*/
"font-size": [{
text: ["base", at, it]
}],
/**
* 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: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Gr]
}],
/**
* Font Family
* @see https://tailwindcss.com/docs/font-family
*/
"font-family": [{
font: [Wt]
}],
/**
* 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-fractons"],
/**
* Letter Spacing
* @see https://tailwindcss.com/docs/letter-spacing
*/
tracking: [{
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", U]
}],
/**
* Line Clamp
* @see https://tailwindcss.com/docs/line-clamp
*/
"line-clamp": [{
"line-clamp": ["none", At, Gr]
}],
/**
* Line Height
* @see https://tailwindcss.com/docs/line-height
*/
leading: [{
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", qe, U]
}],
/**
* List Style Image
* @see https://tailwindcss.com/docs/list-style-image
*/
"list-image": [{
"list-image": ["none", U]
}],
/**
* List Style Type
* @see https://tailwindcss.com/docs/list-style-type
*/
"list-style-type": [{
list: ["none", "disc", "decimal", U]
}],
/**
* List Style Position
* @see https://tailwindcss.com/docs/list-style-position
*/
"list-style-position": [{
list: ["inside", "outside"]
}],
/**
* Placeholder Color
* @deprecated since Tailwind CSS v3.0.0
* @see https://tailwindcss.com/docs/placeholder-color
*/
"placeholder-color": [{
placeholder: [e]
}],
/**
* Placeholder Opacity
* @see https://tailwindcss.com/docs/placeholder-opacity
*/
"placeholder-opacity": [{
"placeholder-opacity": [x]
}],
/**
* Text Alignment
* @see https://tailwindcss.com/docs/text-align
*/
"text-alignment": [{
text: ["left", "center", "right", "justify", "start", "end"]
}],
/**
* Text Color
* @see https://tailwindcss.com/docs/text-color
*/
"text-color": [{
text: [e]
}],
/**
* Text Opacity
* @see https://tailwindcss.com/docs/text-opacity
*/
"text-opacity": [{
"text-opacity": [x]
}],
/**
* 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: [...k(), "wavy"]
}],
/**
* Text Decoration Thickness
* @see https://tailwindcss.com/docs/text-decoration-thickness
*/
"text-decoration-thickness": [{
decoration: ["auto", "from-font", qe, it]
}],
/**
* Text Underline Offset
* @see https://tailwindcss.com/docs/text-underline-offset
*/
"underline-offset": [{
"underline-offset": ["auto", qe, U]
}],
/**
* Text Decoration Color
* @see https://tailwindcss.com/docs/text-decoration-color
*/
"text-decoration-color": [{
decoration: [e]
}],
/**
* 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: P()
}],
/**
* Vertical Alignment
* @see https://tailwindcss.com/docs/vertical-align
*/
"vertical-align": [{
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", U]
}],
/**
* 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"]
}],
/**
* Hyphens
* @see https://tailwindcss.com/docs/hyphens
*/
hyphens: [{
hyphens: ["none", "manual", "auto"]
}],
/**
* Content
* @see https://tailwindcss.com/docs/content
*/
content: [{
content: ["none", U]
}],
// 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 Opacity
* @deprecated since Tailwind CSS v3.0.0
* @see https://tailwindcss.com/docs/background-opacity
*/
"bg-opacity": [{
"bg-opacity": [x]
}],
/**
* 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: [...w(), bc]
}],
/**
* Background Repeat
* @see https://tailwindcss.com/docs/background-repeat
*/
"bg-repeat": [{
bg: ["no-repeat", {
repeat: ["", "x", "y", "round", "space"]
}]
}],
/**
* Background Size
* @see https://tailwindcss.com/docs/background-size
*/
"bg-size": [{
bg: ["auto", "cover", "contain", hc]
}],
/**
* Background Image
* @see https://tailwindcss.com/docs/background-image
*/
"bg-image": [{
bg: ["none", {
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
}, mc]
}],
/**
* Background Color
* @see https://tailwindcss.com/docs/background-color
*/
"bg-color": [{
bg: [e]
}],
/**
* 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: [p]
}],
/**
* Gradient Color Stops Via
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-via": [{
via: [p]
}],
/**
* Gradient Color Stops To
* @see https://tailwindcss.com/docs/gradient-color-stops
*/
"gradient-to": [{
to: [p]
}],
// Borders
/**
* Border Radius
* @see https://tailwindcss.com/docs/border-radius
*/
rounded: [{
rounded: [i]
}],
/**
* Border Radius Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-s": [{
"rounded-s": [i]
}],
/**
* Border Radius End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-e": [{
"rounded-e": [i]
}],
/**
* Border Radius Top
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-t": [{
"rounded-t": [i]
}],
/**
* Border Radius Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-r": [{
"rounded-r": [i]
}],
/**
* Border Radius Bottom
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-b": [{
"rounded-b": [i]
}],
/**
* Border Radius Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-l": [{
"rounded-l": [i]
}],
/**
* Border Radius Start Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ss": [{
"rounded-ss": [i]
}],
/**
* Border Radius Start End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-se": [{
"rounded-se": [i]
}],
/**
* Border Radius End End
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-ee": [{
"rounded-ee": [i]
}],
/**
* Border Radius End Start
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-es": [{
"rounded-es": [i]
}],
/**
* Border Radius Top Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tl": [{
"rounded-tl": [i]
}],
/**
* Border Radius Top Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-tr": [{
"rounded-tr": [i]
}],
/**
* Border Radius Bottom Right
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-br": [{
"rounded-br": [i]
}],
/**
* Border Radius Bottom Left
* @see https://tailwindcss.com/docs/border-radius
*/
"rounded-bl": [{
"rounded-bl": [i]
}],
/**
* Border Width
* @see https://tailwindcss.com/docs/border-width
*/
"border-w": [{
border: [l]
}],
/**
* Border Width X
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-x": [{
"border-x": [l]
}],
/**
* Border Width Y
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-y": [{
"border-y": [l]
}],
/**
* Border Width Start
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-s": [{
"border-s": [l]
}],
/**
* Border Width End
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-e": [{
"border-e": [l]
}],
/**
* Border Width Top
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-t": [{
"border-t": [l]
}],
/**
* Border Width Right
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-r": [{
"border-r": [l]
}],
/**
* Border Width Bottom
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-b": [{
"border-b": [l]
}],
/**
* Border Width Left
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-l": [{
"border-l": [l]
}],
/**
* Border Opacity
* @see https://tailwindcss.com/docs/border-opacity
*/
"border-opacity": [{
"border-opacity": [x]
}],
/**
* Border Style
* @see https://tailwindcss.com/docs/border-style
*/
"border-style": [{
border: [...k(), "hidden"]
}],
/**
* Divide Width X
* @see https://tailwindcss.com/docs/divide-width
*/
"divide-x": [{
"divide-x": [l]
}],
/**
* Divide Width X Reverse
* @see https://tailwindcss.com/docs/divide-width
*/
"divide-x-reverse": ["divide-x-reverse"],
/**
* Divide Width Y
* @see https://tailwindcss.com/docs/divide-width
*/
"divide-y": [{
"divide-y": [l]
}],
/**
* Divide Width Y Reverse
* @see https://tailwindcss.com/docs/divide-width
*/
"divide-y-reverse": ["divide-y-reverse"],
/**
* Divide Opacity
* @see https://tailwindcss.com/docs/divide-opacity
*/
"divide-opacity": [{
"divide-opacity": [x]
}],
/**
* Divide Style
* @see https://tailwindcss.com/docs/divide-style
*/
"divide-style": [{
divide: k()
}],
/**
* Border Color
* @see https://tailwindcss.com/docs/border-color
*/
"border-color": [{
border: [n]
}],
/**
* Border Color X
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-x": [{
"border-x": [n]
}],
/**
* Border Color Y
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-y": [{
"border-y": [n]
}],
/**
* Border Color S
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-s": [{
"border-s": [n]
}],
/**
* Border Color E
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-e": [{
"border-e": [n]
}],
/**
* Border Color Top
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-t": [{
"border-t": [n]
}],
/**
* Border Color Right
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-r": [{
"border-r": [n]
}],
/**
* Border Color Bottom
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-b": [{
"border-b": [n]
}],
/**
* Border Color Left
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-l": [{
"border-l": [n]
}],
/**
* Divide Color
* @see https://tailwindcss.com/docs/divide-color
*/
"divide-color": [{
divide: [n]
}],
/**
* Outline Style
* @see https://tailwindcss.com/docs/outline-style
*/
"outline-style": [{
outline: ["", ...k()]
}],
/**
* Outline Offset
* @see https://tailwindcss.com/docs/outline-offset
*/
"outline-offset": [{
"outline-offset": [qe, U]
}],
/**
* Outline Width
* @see https://tailwindcss.com/docs/outline-width
*/
"outline-w": [{
outline: [qe, it]
}],
/**
* Outline Color
* @see https://tailwindcss.com/docs/outline-color
*/
"outline-color": [{
outline: [e]
}],
/**
* Ring Width
* @see https://tailwindcss.com/docs/ring-width
*/
"ring-w": [{
ring: h()
}],
/**
* Ring Width Inset
* @see https://tailwindcss.com/docs/ring-width
*/
"ring-w-inset": ["ring-inset"],
/**
* Ring Color
* @see https://tailwindcss.com/docs/ring-color
*/
"ring-color": [{
ring: [e]
}],
/**
* Ring Opacity
* @see https://tailwindcss.com/docs/ring-opacity
*/
"ring-opacity": [{
"ring-opacity": [x]
}],
/**
* Ring Offset Width
* @see https://tailwindcss.com/docs/ring-offset-width
*/
"ring-offset-w": [{
"ring-offset": [qe, it]
}],
/**
* Ring Offset Color
* @see https://tailwindcss.com/docs/ring-offset-color
*/
"ring-offset-color": [{
"ring-offset": [e]
}],
// Effects
/**
* Box Shadow
* @see https://tailwindcss.com/docs/box-shadow
*/
shadow: [{
shadow: ["", "inner", "none", at, yc]
}],
/**
* Box Shadow Color
* @see https://tailwindcss.com/docs/box-shadow-color
*/
"shadow-color": [{
shadow: [Wt]
}],
/**
* Opacity
* @see https://tailwindcss.com/docs/opacity
*/
opacity: [{
opacity: [x]
}],
/**
* Mix Blend Mode
* @see https://tailwindcss.com/docs/mix-blend-mode
*/
"mix-blend": [{
"mix-blend": [...F(), "plus-lighter", "plus-darker"]
}],
/**
* Background Blend Mode
* @see https://tailwindcss.com/docs/background-blend-mode
*/
"bg-blend": [{
"bg-blend": F()
}],
// Filters
/**
* Filter
* @deprecated since Tailwind CSS v3.0.0
* @see https://tailwindcss.com/docs/filter
*/
filter: [{
filter: ["", "none"]
}],
/**
* Blur
* @see https://tailwindcss.com/docs/blur
*/
blur: [{
blur: [r]
}],
/**
* Brightness
* @see https://tailwindcss.com/docs/brightness
*/
brightness: [{
brightness: [o]
}],
/**
* Contrast
* @see https://tailwindcss.com/docs/contrast
*/
contrast: [{
contrast: [s]
}],
/**
* Drop Shadow
* @see https://tailwindcss.com/docs/drop-shadow
*/
"drop-shadow": [{
"drop-shadow": ["", "none", at, U]
}],
/**
* Grayscale
* @see https://tailwindcss.com/docs/grayscale
*/
grayscale: [{
grayscale: [u]
}],
/**
* Hue Rotate
* @see https://tailwindcss.com/docs/hue-rotate
*/
"hue-rotate": [{
"hue-rotate": [c]
}],
/**
* Invert
* @see https://tailwindcss.com/docs/invert
*/
invert: [{
invert: [f]
}],
/**
* Saturate
* @see https://tailwindcss.com/docs/saturate
*/
saturate: [{
saturate: [S]
}],
/**
* Sepia
* @see https://tailwindcss.com/docs/sepia
*/
sepia: [{
sepia: [T]
}],
/**
* Backdrop Filter
* @deprecated since Tailwind CSS v3.0.0
* @see https://tailwindcss.com/docs/backdrop-filter
*/
"backdrop-filter": [{
"backdrop-filter": ["", "none"]
}],
/**
* Backdrop Blur
* @see https://tailwindcss.com/docs/backdrop-blur
*/
"backdrop-blur": [{
"backdrop-blur": [r]
}],
/**
* Backdrop Brightness
* @see https://tailwindcss.com/docs/backdrop-brightness
*/
"backdrop-brightness": [{
"backdrop-brightness": [o]
}],
/**
* Backdrop Contrast
* @see https://tailwindcss.com/docs/backdrop-contrast
*/
"backdrop-contrast": [{
"backdrop-contrast": [s]
}],
/**
* Backdrop Grayscale
* @see https://tailwindcss.com/docs/backdrop-grayscale
*/
"backdrop-grayscale": [{
"backdrop-grayscale": [u