UNPKG

catalyst-design

Version:

Reusable Component library for Catalyst

1,928 lines (1,927 loc) 1 MB
import { jsx as g, Fragment as $t, jsxs as j } from "react/jsx-runtime"; import * as d from "react"; import E, { forwardRef as Nn, createElement as kt, useState as rt, createContext as i2, useContext as s2, useEffect as un, useMemo as Po, useCallback as _t, useRef as hi, useLayoutEffect as Rw, isValidElement as l2, PureComponent as qi, useImperativeHandle as c2, cloneElement as u2 } from "react"; import * as ji from "react-dom"; import Xf from "react-dom"; function _w(e) { var t, n, r = ""; if (typeof e == "string" || typeof e == "number") r += e; else if (typeof e == "object") if (Array.isArray(e)) { var o = e.length; for (t = 0; t < o; t++) e[t] && (n = _w(e[t])) && (r && (r += " "), r += n); } else for (n in e) e[n] && (r && (r += " "), r += n); return r; } function dn() { for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = _w(e)) && (r && (r += " "), r += t); return r; } const Zf = "-", d2 = (e) => { const t = p2(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e; return { getClassGroupId: (i) => { const s = i.split(Zf); return s[0] === "" && s.length !== 1 && s.shift(), Ew(s, t) || f2(i); }, getConflictingClassGroupIds: (i, s) => { const l = n[i] || []; return s && r[i] ? [...l, ...r[i]] : l; } }; }, Ew = (e, t) => { var i; if (e.length === 0) return t.classGroupId; const n = e[0], r = t.nextPart.get(n), o = r ? Ew(e.slice(1), r) : void 0; if (o) return o; if (t.validators.length === 0) return; const a = e.join(Zf); return (i = t.validators.find(({ validator: s }) => s(a))) == null ? void 0 : i.classGroupId; }, pm = /^\[(.+)\]$/, f2 = (e) => { if (pm.test(e)) { const t = pm.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (n) return "arbitrary.." + n; } }, p2 = (e) => { const { theme: t, prefix: n } = e, r = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return m2(Object.entries(e.classGroups), n).forEach(([a, i]) => { kd(i, r, a, t); }), r; }, kd = (e, t, n, r) => { e.forEach((o) => { if (typeof o == "string") { const a = o === "" ? t : hm(t, o); a.classGroupId = n; return; } if (typeof o == "function") { if (h2(o)) { kd(o(r), t, n, r); return; } t.validators.push({ validator: o, classGroupId: n }); return; } Object.entries(o).forEach(([a, i]) => { kd(i, hm(t, a), n, r); }); }); }, hm = (e, t) => { let n = e; return t.split(Zf).forEach((r) => { n.nextPart.has(r) || n.nextPart.set(r, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), n = n.nextPart.get(r); }), n; }, h2 = (e) => e.isThemeGetter, m2 = (e, t) => t ? e.map(([n, r]) => { const o = r.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([i, s]) => [t + i, s])) : a); return [n, o]; }) : e, g2 = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); const o = (a, i) => { n.set(a, i), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); }; return { get(a) { let i = n.get(a); if (i !== void 0) return i; if ((i = r.get(a)) !== void 0) return o(a, i), i; }, set(a, i) { n.has(a) ? n.set(a, i) : o(a, i); } }; }, Pw = "!", v2 = (e) => { const { separator: t, experimentalParseClassName: n } = e, r = t.length === 1, o = t[0], a = t.length, i = (s) => { const l = []; let c = 0, u = 0, f; for (let y = 0; y < s.length; y++) { let w = s[y]; if (c === 0) { if (w === o && (r || s.slice(y, y + a) === t)) { l.push(s.slice(u, y)), u = y + a; continue; } if (w === "/") { f = y; continue; } } w === "[" ? c++ : w === "]" && c--; } const p = l.length === 0 ? s : s.substring(u), h = p.startsWith(Pw), v = h ? p.substring(1) : p, m = f && f > u ? f - u : void 0; return { modifiers: l, hasImportantModifier: h, baseClassName: v, maybePostfixModifierPosition: m }; }; return n ? (s) => n({ className: s, parseClassName: i }) : i; }, y2 = (e) => { if (e.length <= 1) return e; const t = []; let n = []; return e.forEach((r) => { r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r); }), t.push(...n.sort()), t; }, w2 = (e) => ({ cache: g2(e.cacheSize), parseClassName: v2(e), ...d2(e) }), b2 = /\s+/, C2 = (e, t) => { const { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: o } = t, a = [], i = e.trim().split(b2); let s = ""; for (let l = i.length - 1; l >= 0; l -= 1) { const c = i[l], { modifiers: u, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: h } = n(c); let v = !!h, m = r(v ? p.substring(0, h) : p); if (!m) { if (!v) { s = c + (s.length > 0 ? " " + s : s); continue; } if (m = r(p), !m) { s = c + (s.length > 0 ? " " + s : s); continue; } v = !1; } const y = y2(u).join(":"), w = f ? y + Pw : y, b = w + m; if (a.includes(b)) continue; a.push(b); const C = o(m, v); for (let x = 0; x < C.length; ++x) { const R = C[x]; a.push(w + R); } s = c + (s.length > 0 ? " " + s : s); } return s; }; function x2() { let e = 0, t, n, r = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (n = Mw(t)) && (r && (r += " "), r += n); return r; } const Mw = (e) => { if (typeof e == "string") return e; let t, n = ""; for (let r = 0; r < e.length; r++) e[r] && (t = Mw(e[r])) && (n && (n += " "), n += t); return n; }; function S2(e, ...t) { let n, r, o, a = i; function i(l) { const c = t.reduce((u, f) => f(u), e()); return n = w2(c), r = n.cache.get, o = n.cache.set, a = s, s(l); } function s(l) { const c = r(l); if (c) return c; const u = C2(l, n); return o(l, u), u; } return function() { return a(x2.apply(null, arguments)); }; } const $e = (e) => { const t = (n) => n[e] || []; return t.isThemeGetter = !0, t; }, Nw = /^\[(?:([a-z-]+):)?(.+)\]$/i, R2 = /^\d+\/\d+$/, _2 = /* @__PURE__ */ new Set(["px", "full", "screen"]), E2 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, P2 = /\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$/, M2 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, N2 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, T2 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, rn = (e) => _r(e) || _2.has(e) || R2.test(e), yn = (e) => Gr(e, "length", F2), _r = (e) => !!e && !Number.isNaN(Number(e)), Ws = (e) => Gr(e, "number", _r), so = (e) => !!e && Number.isInteger(Number(e)), O2 = (e) => e.endsWith("%") && _r(e.slice(0, -1)), we = (e) => Nw.test(e), wn = (e) => E2.test(e), A2 = /* @__PURE__ */ new Set(["length", "size", "percentage"]), D2 = (e) => Gr(e, A2, Tw), I2 = (e) => Gr(e, "position", Tw), $2 = /* @__PURE__ */ new Set(["image", "url"]), k2 = (e) => Gr(e, $2, z2), L2 = (e) => Gr(e, "", B2), lo = () => !0, Gr = (e, t, n) => { const r = Nw.exec(e); return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; }, F2 = (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. P2.test(e) && !M2.test(e) ), Tw = () => !1, B2 = (e) => N2.test(e), z2 = (e) => T2.test(e), H2 = () => { const e = $e("colors"), t = $e("spacing"), n = $e("blur"), r = $e("brightness"), o = $e("borderColor"), a = $e("borderRadius"), i = $e("borderSpacing"), s = $e("borderWidth"), l = $e("contrast"), c = $e("grayscale"), u = $e("hueRotate"), f = $e("invert"), p = $e("gap"), h = $e("gradientColorStops"), v = $e("gradientColorStopPositions"), m = $e("inset"), y = $e("margin"), w = $e("opacity"), b = $e("padding"), C = $e("saturate"), x = $e("scale"), R = $e("sepia"), _ = $e("skew"), S = $e("space"), P = $e("translate"), M = () => ["auto", "contain", "none"], $ = () => ["auto", "hidden", "clip", "visible", "scroll"], N = () => ["auto", we, t], A = () => [we, t], T = () => ["", rn, yn], O = () => ["auto", _r, we], H = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], z = () => ["solid", "dashed", "dotted", "double", "none"], G = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], U = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], B = () => ["", "0", we], Q = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], re = () => [_r, we]; return { cacheSize: 500, separator: ":", theme: { colors: [lo], spacing: [rn, yn], blur: ["none", "", wn, we], brightness: re(), borderColor: [e], borderRadius: ["none", "", "full", wn, we], borderSpacing: A(), borderWidth: T(), contrast: re(), grayscale: B(), hueRotate: re(), invert: B(), gap: A(), gradientColorStops: [e], gradientColorStopPositions: [O2, yn], inset: N(), margin: N(), opacity: re(), padding: A(), saturate: re(), scale: re(), sepia: B(), skew: re(), space: A(), translate: A() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", we] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [wn] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": Q() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": Q() }], /** * 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: [...H(), we] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: $() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": $() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": $() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: M() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": M() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": M() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ["static", "fixed", "absolute", "relative", "sticky"], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: [m] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [m] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [m] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [m] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [m] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [m] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [m] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [m] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [m] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", so, we] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: N() }], /** * 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", we] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: B() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: B() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", so, we] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [lo] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", so, we] }, we] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": O() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": O() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [lo] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [so, we] }, we] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": O() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": O() }], /** * 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", we] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", we] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [p] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [p] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [p] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...U()] }], /** * 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", ...U(), "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": [...U(), "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: [b] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [b] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [b] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [b] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [b] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [b] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [b] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [b] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [b] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [y] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [y] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [y] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [y] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [y] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [y] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [y] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [y] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [y] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [S] }], /** * 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": [S] }], /** * 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", we, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [we, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [we, t, "none", "full", "min", "max", "fit", "prose", { screen: [wn] }, wn] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [we, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [we, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [we, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [we, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", wn, yn] }], /** * 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", Ws] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [lo] }], /** * 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: ["tighter", "tight", "normal", "wide", "wider", "widest", we] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", _r, Ws] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", rn, we] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", we] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", we] }], /** * 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": [w] }], /** * 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": [w] }], /** * 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: [...z(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: ["auto", "from-font", rn, yn] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": ["auto", rn, we] }], /** * 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: A() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", we] }], /** * 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", we] }], // 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": [w] }], /** * 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: [...H(), I2] }], /** * 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", D2] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ "bg-image": [{ bg: ["none", { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, k2] }], /** * 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: [v] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via-pos": [{ via: [v] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to-pos": [{ to: [v] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from": [{ from: [h] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via": [{ via: [h] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to": [{ to: [h] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [a] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-s": [{ "rounded-s": [a] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ "rounded-e": [{ "rounded-e": [a] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ "rounded-t": [{ "rounded-t": [a] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-r": [{ "rounded-r": [a] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ "rounded-b": [{ "rounded-b": [a] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-l": [{ "rounded-l": [a] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-ss": [{ "rounded-ss": [a] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ "rounded-se": [{ "rounded-se": [a] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ "rounded-ee": [{ "rounded-ee": [a] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-es": [{ "rounded-es": [a] }], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-tl": [{ "rounded-tl": [a] }], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-tr": [{ "rounded-tr": [a] }], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-br": [{ "rounded-br": [a] }], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-bl": [{ "rounded-bl": [a] }], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ "border-w": [{ border: [s] }], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ "border-w-x": [{ "border-x": [s] }], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ "border-w-y": [{ "border-y": [s] }], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ "border-w-s": [{ "border-s": [s] }], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ "border-w-e": [{ "border-e": [s] }], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ "border-w-t": [{ "border-t": [s] }], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ "border-w-r": [{ "border-r": [s] }], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ "border-w-b": [{ "border-b": [s] }], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ "border-w-l": [{ "border-l": [s] }], /** * Border Opacity * @see https://tailwindcss.com/docs/border-opacity */ "border-opacity": [{ "border-opacity": [w] }], /** * Border Style * @see https://tailwindcss.com/docs/border-style */ "border-style": [{ border: [...z(), "hidden"] }], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ "divide-x": [{ "divide-x": [s] }], /** * 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": [s] }], /** * 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": [w] }], /** * Divide Style * @see https://tailwindcss.com/docs/divide-style */ "divide-style": [{ divide: z() }], /** * Border Color * @see https://tailwindcss.com/docs/border-color */ "border-color": [{ border: [o] }], /** * Border Color X * @see https://tailwindcss.com/docs/border-color */ "border-color-x": [{ "border-x": [o] }], /** * Border Color Y * @see https://tailwindcss.com/docs/border-color */ "border-color-y": [{ "border-y": [o] }], /** * Border Color S * @see https://tailwindcss.com/docs/border-color */ "border-color-s": [{ "border-s": [o] }], /** * Border Color E * @see https://tailwindcss.com/docs/border-color */ "border-color-e": [{ "border-e": [o] }], /** * Border Color Top * @see https://tailwindcss.com/docs/border-color */ "border-color-t": [{ "border-t": [o] }], /** * Border Color Right * @see https://tailwindcss.com/docs/border-color */ "border-color-r": [{ "border-r": [o] }], /** * Border Color Bottom * @see https://tailwindcss.com/docs/border-color */ "border-color-b": [{ "border-b": [o] }], /** * Border Color Left * @see https://tailwindcss.com/docs/border-color */ "border-color-l": [{ "border-l": [o] }], /** * Divide Color * @see https://tailwindcss.com/docs/divide-color */ "divide-color": [{ divide: [o] }], /** * Outline Style * @see https://tailwindcss.com/docs/outline-style */ "outline-style": [{ outline: ["", ...z()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ "outline-offset": [{ "outline-offset": [rn, we] }], /** * Outline Width * @see https://tailwindcss.com/docs/outline-width */ "outline-w": [{ outline: [rn, yn] }], /** * 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: T() }], /** * 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": [w] }], /** * Ring Offset Width * @see https://tailwindcss.com/docs/ring-offset-width */ "ring-offset-w": [{ "ring-offset": [rn, yn] }], /** * 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", wn, L2] }], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow-color */ "shadow-color": [{ shadow: [lo] }], /** * Opacity * @see https://tailwindcss.com/docs/opacity */ opacity: [{ opacity: [w] }], /** * Mix Blend Mode * @see https://tailwindcss.com/docs/mix-blend-mode */ "mix-blend": [{ "mix-blend": [...G(), "plus-lighter", "plus-darker"] }], /** * Background Blend Mode * @see https://tailwindcss.com/docs/background-blend-mode */ "bg-blend": [{ "bg-blend": G() }], // 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: [n] }], /** * Brightness * @see https://tailwindcss.com/docs/brightness */ brightness: [{ brightness: [r] }], /** * Contrast * @see https://tailwindcss.com/docs/contrast */ contrast: [{ contrast: [l] }], /** * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ "drop-shadow": [{ "drop-shadow": ["", "none", wn, we] }], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale */ grayscale: [{ grayscale: [c] }], /** * Hue Rotate * @see https://tailwindcss.com/docs/hue-rotate */ "hue-rotate": [{ "hue-rotate": [u] }], /** * Invert * @see https://tailwindcss.com/docs/invert */ invert: [{ invert: [f] }], /** * Saturate * @see https://tailwindcss.com/docs/saturate */ saturate: [{ saturate: [C] }], /** * Sepia * @see https://tailwindcss.com/docs/sepia */ sepia: [{ sepia: [R] }], /** * 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": [n] }], /** * Backdrop Brightness * @see https://tailwindcss.com/docs/backdrop-brightness */ "backdrop-brightness": [{ "backdrop-brightness": [r] }], /** * Backdrop Contrast * @see https://tailwindcss.com/docs/backdrop-contrast */ "backdrop-contrast": [{ "backdrop-contrast": [l] }], /** * Backdrop Grayscale * @see https://tailwindcss.com/docs/backdrop-grayscale */ "backdrop-grayscale": [{ "backdrop-grayscale": [c] }], /** * Backdrop Hue Rotate * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [u] }], /** * Backdrop Invert * @see https://tailwindcss.com/docs/backdrop-invert */ "backdrop-invert": [{ "backdrop-invert": [f] }], /** * Backdrop Opacity * @see https://tailwindcss.com/docs/backdrop-opacity */ "backdrop-opacity": [{ "backdrop-opacity": [w] }], /** * Backdrop Saturate * @see https://tailwindcss.com/docs/backdrop-saturate */ "backdrop-saturate": [{ "backdrop-saturate": [C] }], /** * Backdrop Sepia * @see https://tailwindcss.com/docs/backdrop-sepia */ "backdrop-sepia": [{ "backdrop-sepia": [R] }], // Tables /** * Border Collapse * @see https://tailwindcss.com/docs/border-collapse */ "border-collapse": [{ border: ["collapse", "separate"] }], /** * Border Spacing * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing": [{ "border-spacing": [i] }], /** * Border Spacing X * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-x": [{ "border-spacing-x": [i] }], /** * Border Spacing Y * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-y": [{ "border-spacing-y": [i] }], /** * Table Layout * @see https://tailwindcss.com/docs/table-layout */ "table-layout": [{ table: ["auto", "fixed"] }], /** * Caption Side * @see https://tailwindcss.com/docs/caption-side */ caption: [{ caption: ["top", "bottom"] }], // Transitions and Animation /** * Tranisition Property * @see https://tailwindcss.com/docs/transition-property */ transition: [{ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", we] }], /** * Transition Duration * @see https://tailwindcss.com/docs/transition-duration */ duration: [{ duration: re() }], /** * Transition Timing Function * @see https://tailwindcss.com/docs/transition-timing-function */ ease: [{ ease: ["linear", "in", "out", "in-out", we] }], /** * Transition Delay * @see https://tailwindcss.com/docs/transition-delay */ delay: [{ delay: re() }], /** * Animation * @see https://tailwindcss.com/docs/animation */ animate: [{ animate: ["none", "spin", "ping", "pulse", "bounce", we] }], // Transforms /** * Transform * @see https://tailwindcss.com/docs/transform */ transform: [{ transform: ["", "gpu", "none"] }], /** * Scale * @see https://tailwindcss.com/docs/scale */ scale: [{ scale: [x] }], /** * Scale X * @see https://tailwindcss.com/docs/scale */ "scale-x": [{ "scale-x": [x] }], /** * Scale Y * @see https://tailwindcss.com/docs/scale */ "scale-y": [{ "scale-y": [x] }], /** * Rotate * @see https://tailwindcss.com/docs/rotate */ rotate: [{ rotate: [so, we] }], /** * Translate X * @see https://tailwindcss.com/docs/translate */ "translate-x": [{ "translate-x": [P] }], /** * Translate Y * @see https://tailwindcss.com/docs/translate */ "translate-y": [{ "translate-y": [P] }], /** * Skew X * @see https://tailwindcss.com/docs/skew */ "skew-x": [{