UNPKG

@hirebus/academy

Version:

React component library for academy and learning platforms

1,865 lines 406 kB
import { jsx as l, jsxs as T, Fragment as Ye } from "react/jsx-runtime"; import * as m from "react"; import we, { forwardRef as Zr, createElement as Fn, useState as ve, useMemo as pe, useRef as kt, useEffect as pt, useCallback as ae, useLayoutEffect as mc, memo as ta } from "react"; import { useQueryState as uo } from "nuqs"; import { NuqsAdapter as ra } from "nuqs/adapters/react"; import { Slot as Kt } from "@radix-ui/react-slot"; import * as na from "@radix-ui/react-collapsible"; import * as Gr from "react-dom"; import hc from "react-dom"; import * as Ce from "@radix-ui/react-dropdown-menu"; const Rt = { /** * Course routes */ course: { /** Base path for course view */ view: "course", /** Path for course creation */ create: "course/create", /** Path for course editing */ edit: "course/edit", /** * Build a path to view a specific course * @param id - Course ID * @returns Full path to the course */ viewById: (e) => `course/${e}`, /** * Build a path to edit a specific course * @param id - Course ID * @returns Full path to edit the course */ editById: (e) => `course/edit/${e}` }, /** * Academy routes */ academy: { /** Base path to academy view */ index: "/academy", /** * Build a path to view a course in the academy * @param id - Course ID * @returns Full path to the course in academy */ viewCourse: (e) => `/academy?route=course/${e}` } }, oa = () => { }, sa = typeof process < "u" && process.env.NODE_ENV === "production" || // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof import.meta < "u" && !0, gc = sa ? oa : (...e) => console.debug(...e), yc = sa ? oa : (...e) => console.info(...e), vc = (...e) => console.warn(...e), bc = (...e) => console.error(...e), aa = { debug: gc, info: yc, warn: vc, error: bc }, Yo = (e) => { let t; const r = /* @__PURE__ */ new Set(), n = (d, f) => { const p = typeof d == "function" ? d(t) : d; if (!Object.is(p, t)) { const h = t; t = f ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), r.forEach((g) => g(t, h)); } }, o = () => t, i = { setState: n, getState: o, getInitialState: () => c, subscribe: (d) => (r.add(d), () => r.delete(d)) }, c = t = e(n, o, i); return i; }, wc = (e) => e ? Yo(e) : Yo, xc = (e) => e; function Sc(e, t = xc) { const r = we.useSyncExternalStore( e.subscribe, () => t(e.getState()), () => t(e.getInitialState()) ); return we.useDebugValue(r), r; } const Nc = (e) => { const t = wc(e), r = (n) => Sc(t, n); return Object.assign(r, t), r; }, Cc = (e) => Nc; function ia(e, t) { let r; try { r = e(); } catch { return; } return { getItem: (o) => { var s; const a = (c) => c === null ? null : JSON.parse(c, void 0), i = (s = r.getItem(o)) != null ? s : null; return i instanceof Promise ? i.then(a) : a(i); }, setItem: (o, s) => r.setItem( o, JSON.stringify(s, void 0) ), removeItem: (o) => r.removeItem(o) }; } const $n = (e) => (t) => { try { const r = e(t); return r instanceof Promise ? r : { then(n) { return $n(n)(r); }, catch(n) { return this; } }; } catch (r) { return { then(n) { return this; }, catch(n) { return $n(n)(r); } }; } }, Pc = (e, t) => (r, n, o) => { let s = { storage: ia(() => localStorage), partialize: (u) => u, version: 0, merge: (u, v) => ({ ...v, ...u }), ...t }, a = !1; const i = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(); let d = s.storage; if (!d) return e( (...u) => { console.warn( `[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.` ), r(...u); }, n, o ); const f = () => { const u = s.partialize({ ...n() }); return d.setItem(s.name, { state: u, version: s.version }); }, p = o.setState; o.setState = (u, v) => { p(u, v), f(); }; const h = e( (...u) => { r(...u), f(); }, n, o ); o.getInitialState = () => h; let g; const w = () => { var u, v; if (!d) return; a = !1, i.forEach((y) => { var N; return y((N = n()) != null ? N : h); }); const x = ((v = s.onRehydrateStorage) == null ? void 0 : v.call(s, (u = n()) != null ? u : h)) || void 0; return $n(d.getItem.bind(d))(s.name).then((y) => { if (y) if (typeof y.version == "number" && y.version !== s.version) { if (s.migrate) { const N = s.migrate( y.state, y.version ); return N instanceof Promise ? N.then((C) => [!0, C]) : [!0, N]; } console.error( "State loaded from storage couldn't be migrated since no migrate function was provided" ); } else return [!1, y.state]; return [!1, void 0]; }).then((y) => { var N; const [C, S] = y; if (g = s.merge( S, (N = n()) != null ? N : h ), r(g, !0), C) return f(); }).then(() => { x == null || x(g, void 0), g = n(), a = !0, c.forEach((y) => y(g)); }).catch((y) => { x == null || x(void 0, y); }); }; return o.persist = { setOptions: (u) => { s = { ...s, ...u }, u.storage && (d = u.storage); }, clearStorage: () => { d == null || d.removeItem(s.name); }, getOptions: () => s, rehydrate: () => w(), hasHydrated: () => a, onHydrate: (u) => (i.add(u), () => { i.delete(u); }), onFinishHydration: (u) => (c.add(u), () => { c.delete(u); }) }, s.skipHydration || w(), g || h; }, Tc = Pc, _c = { courses: [], editingCourse: null }, Ge = Cc()( Tc( (e) => ({ ..._c, // Courses actions setInitialCourses: (t) => { e({ courses: t }); }, addCourse: (t) => { e((r) => ({ courses: [...r.courses, t] })); }, updateCourse: (t) => { e((r) => ({ courses: r.courses.map( (n) => n.courseId === t.courseId ? { ...n, ...t } : n ) })); }, deleteCourse: (t) => { e((r) => ({ courses: r.courses.filter((n) => n.courseId !== t) })); }, setVideoProgress: (t, r) => { e((n) => ({ courses: n.courses.map( (o) => o.courseId === t ? { ...o, videoProgress: r } : o ) })); }, // UI actions setEditingCourse: (t) => { e({ editingCourse: t }); } }), { name: "__academy_storage", storage: ia(() => ({ getItem: (e) => { const t = localStorage.getItem(e); if (!t) return null; try { const r = JSON.parse(t); if (r.state && Array.isArray(r.state.courses)) { const n = Ge.getState(); r.state.courses = r.state.courses.map( (o) => { const s = n.courses.find( (a) => a.courseId === o.courseId ); return s ? { ...s, ...o } : { ...o, courseContent: [], courseFiles: [], enrolledUsers: [], creatorId: 0 }; } ); } return r; } catch (r) { return aa.error("Error parsing stored state:", r), null; } }, setItem: (e, t) => localStorage.setItem(e, JSON.stringify(t)), removeItem: (e) => localStorage.removeItem(e) })), partialize: (e) => ({ // Only persist essential course data, not the full objects with large thumbnails courses: e.courses.map((t) => ({ courseId: t.courseId, name: t.name, description: t.description, category: t.category, tags: t.tags, status: t.status, createdAt: t.createdAt, updatedAt: t.updatedAt })) // Don't persist UI state at all }) } ) ); var Be = /* @__PURE__ */ ((e) => (e.AllCourses = "All Courses", e.ProfessionalDevelopment = "Professional Development", e.SkillsDevelopment = "Skills Development", e.WorkplaceSuccess = "Workplace Success", e.Management = "Management", e.Leadership = "Leadership", e))(Be || {}), ne = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.MP4 = "video/mp4", e.PNG = "image/png", e.WEBP = "image/webp", e.JPG = "image/jpeg", e))(ne || {}), Oe = /* @__PURE__ */ ((e) => (e.DRAFT = "Draft", e.ACTIVE = "Active", e.INACTIVE = "Inactive", e))(Oe || {}); function la(e) { var t, r, n = ""; if (typeof e == "string" || typeof e == "number") n += e; else if (typeof e == "object") if (Array.isArray(e)) { var o = e.length; for (t = 0; t < o; t++) e[t] && (r = la(e[t])) && (n && (n += " "), n += r); } else for (r in e) e[r] && (n && (n += " "), n += r); return n; } function Ec() { for (var e, t, r = 0, n = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = la(e)) && (n && (n += " "), n += t); return n; } const fo = "-", Ac = (e) => { const t = Oc(e), { conflictingClassGroups: r, conflictingClassGroupModifiers: n } = e; return { getClassGroupId: (a) => { const i = a.split(fo); return i[0] === "" && i.length !== 1 && i.shift(), ca(i, t) || Rc(a); }, getConflictingClassGroupIds: (a, i) => { const c = r[a] || []; return i && n[a] ? [...c, ...n[a]] : c; } }; }, ca = (e, t) => { var a; if (e.length === 0) return t.classGroupId; const r = e[0], n = t.nextPart.get(r), o = n ? ca(e.slice(1), n) : void 0; if (o) return o; if (t.validators.length === 0) return; const s = e.join(fo); return (a = t.validators.find(({ validator: i }) => i(s))) == null ? void 0 : a.classGroupId; }, Ko = /^\[(.+)\]$/, Rc = (e) => { if (Ko.test(e)) { const t = Ko.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (r) return "arbitrary.." + r; } }, Oc = (e) => { const { theme: t, prefix: r } = e, n = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return kc(Object.entries(e.classGroups), r).forEach(([s, a]) => { jn(a, n, s, t); }), n; }, jn = (e, t, r, n) => { e.forEach((o) => { if (typeof o == "string") { const s = o === "" ? t : Xo(t, o); s.classGroupId = r; return; } if (typeof o == "function") { if (Ic(o)) { jn(o(n), t, r, n); return; } t.validators.push({ validator: o, classGroupId: r }); return; } Object.entries(o).forEach(([s, a]) => { jn(a, Xo(t, s), r, n); }); }); }, Xo = (e, t) => { let r = e; return t.split(fo).forEach((n) => { r.nextPart.has(n) || r.nextPart.set(n, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), r = r.nextPart.get(n); }), r; }, Ic = (e) => e.isThemeGetter, kc = (e, t) => t ? e.map(([r, n]) => { const o = n.map((s) => typeof s == "string" ? t + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([a, i]) => [t + a, i])) : s); return [r, o]; }) : e, Mc = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); const o = (s, a) => { r.set(s, a), t++, t > e && (t = 0, n = r, r = /* @__PURE__ */ new Map()); }; return { get(s) { let a = r.get(s); if (a !== void 0) return a; if ((a = n.get(s)) !== void 0) return o(s, a), a; }, set(s, a) { r.has(s) ? r.set(s, a) : o(s, a); } }; }, da = "!", Dc = (e) => { const { separator: t, experimentalParseClassName: r } = e, n = t.length === 1, o = t[0], s = t.length, a = (i) => { const c = []; let d = 0, f = 0, p; for (let v = 0; v < i.length; v++) { let x = i[v]; if (d === 0) { if (x === o && (n || i.slice(v, v + s) === t)) { c.push(i.slice(f, v)), f = v + s; continue; } if (x === "/") { p = v; continue; } } x === "[" ? d++ : x === "]" && d--; } const h = c.length === 0 ? i : i.substring(f), g = h.startsWith(da), w = g ? h.substring(1) : h, u = p && p > f ? p - f : void 0; return { modifiers: c, hasImportantModifier: g, baseClassName: w, maybePostfixModifierPosition: u }; }; return r ? (i) => r({ className: i, parseClassName: a }) : a; }, Lc = (e) => { if (e.length <= 1) return e; const t = []; let r = []; return e.forEach((n) => { n[0] === "[" ? (t.push(...r.sort(), n), r = []) : r.push(n); }), t.push(...r.sort()), t; }, Fc = (e) => ({ cache: Mc(e.cacheSize), parseClassName: Dc(e), ...Ac(e) }), $c = /\s+/, jc = (e, t) => { const { parseClassName: r, getClassGroupId: n, getConflictingClassGroupIds: o } = t, s = [], a = e.trim().split($c); let i = ""; for (let c = a.length - 1; c >= 0; c -= 1) { const d = a[c], { modifiers: f, hasImportantModifier: p, baseClassName: h, maybePostfixModifierPosition: g } = r(d); let w = !!g, u = n(w ? h.substring(0, g) : h); if (!u) { if (!w) { i = d + (i.length > 0 ? " " + i : i); continue; } if (u = n(h), !u) { i = d + (i.length > 0 ? " " + i : i); continue; } w = !1; } const v = Lc(f).join(":"), x = p ? v + da : v, y = x + u; if (s.includes(y)) continue; s.push(y); const N = o(u, w); for (let C = 0; C < N.length; ++C) { const S = N[C]; s.push(x + S); } i = d + (i.length > 0 ? " " + i : i); } return i; }; function Uc() { let e = 0, t, r, n = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (r = ua(t)) && (n && (n += " "), n += r); return n; } const ua = (e) => { if (typeof e == "string") return e; let t, r = ""; for (let n = 0; n < e.length; n++) e[n] && (t = ua(e[n])) && (r && (r += " "), r += t); return r; }; function Vc(e, ...t) { let r, n, o, s = a; function a(c) { const d = t.reduce((f, p) => p(f), e()); return r = Fc(d), n = r.cache.get, o = r.cache.set, s = i, i(c); } function i(c) { const d = n(c); if (d) return d; const f = jc(c, r); return o(c, f), f; } return function() { return s(Uc.apply(null, arguments)); }; } const he = (e) => { const t = (r) => r[e] || []; return t.isThemeGetter = !0, t; }, fa = /^\[(?:([a-z-]+):)?(.+)\]$/i, Bc = /^\d+\/\d+$/, zc = /* @__PURE__ */ new Set(["px", "full", "screen"]), Wc = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Hc = /\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$/, qc = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Zc = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Gc = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ut = (e) => qt(e) || zc.has(e) || Bc.test(e), wt = (e) => Qt(e, "length", rd), qt = (e) => !!e && !Number.isNaN(Number(e)), hn = (e) => Qt(e, "number", qt), or = (e) => !!e && Number.isInteger(Number(e)), Yc = (e) => e.endsWith("%") && qt(e.slice(0, -1)), ce = (e) => fa.test(e), xt = (e) => Wc.test(e), Kc = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Xc = (e) => Qt(e, Kc, pa), Jc = (e) => Qt(e, "position", pa), Qc = /* @__PURE__ */ new Set(["image", "url"]), ed = (e) => Qt(e, Qc, od), td = (e) => Qt(e, "", nd), sr = () => !0, Qt = (e, t, r) => { const n = fa.exec(e); return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1; }, rd = (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. Hc.test(e) && !qc.test(e) ), pa = () => !1, nd = (e) => Zc.test(e), od = (e) => Gc.test(e), sd = () => { const e = he("colors"), t = he("spacing"), r = he("blur"), n = he("brightness"), o = he("borderColor"), s = he("borderRadius"), a = he("borderSpacing"), i = he("borderWidth"), c = he("contrast"), d = he("grayscale"), f = he("hueRotate"), p = he("invert"), h = he("gap"), g = he("gradientColorStops"), w = he("gradientColorStopPositions"), u = he("inset"), v = he("margin"), x = he("opacity"), y = he("padding"), N = he("saturate"), C = he("scale"), S = he("sepia"), V = he("skew"), _ = he("space"), W = he("translate"), z = () => ["auto", "contain", "none"], J = () => ["auto", "hidden", "clip", "visible", "scroll"], I = () => ["auto", ce, t], A = () => [ce, t], j = () => ["", ut, wt], k = () => ["auto", qt, ce], K = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], F = () => ["solid", "dashed", "dotted", "double", "none"], X = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], le = () => ["", "0", ce], R = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], M = () => [qt, ce]; return { cacheSize: 500, separator: ":", theme: { colors: [sr], spacing: [ut, wt], blur: ["none", "", xt, ce], brightness: M(), borderColor: [e], borderRadius: ["none", "", "full", xt, ce], borderSpacing: A(), borderWidth: j(), contrast: M(), grayscale: le(), hueRotate: M(), invert: le(), gap: A(), gradientColorStops: [e], gradientColorStopPositions: [Yc, wt], inset: I(), margin: I(), opacity: M(), padding: A(), saturate: M(), scale: M(), sepia: le(), skew: M(), space: A(), translate: A() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", ce] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [xt] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": R() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": R() }], /** * 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: [...K(), ce] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: J() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": J() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": J() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: z() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": z() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": z() }], /** * 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: [u] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [u] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [u] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [u] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [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: ["auto", or, ce] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: I() }], /** * 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", ce] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: le() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: le() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", or, ce] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [sr] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", or, ce] }, ce] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": k() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": k() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [sr] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [or, ce] }, ce] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": k() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": k() }], /** * 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", ce] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", ce] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [h] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [h] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [h] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...Z()] }], /** * 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", ...Z(), "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": [...Z(), "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: [y] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [y] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [y] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [y] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [y] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [y] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [y] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [y] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [y] }], /** * 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": [_] }], /** * 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": [_] }], /** * 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", ce, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [ce, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [ce, t, "none", "full", "min", "max", "fit", "prose", { screen: [xt] }, xt] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [ce, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [ce, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [ce, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [ce, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", xt, wt] }], /** * 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", hn] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [sr] }], /** * 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", ce] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", qt, hn] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ut, ce] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", ce] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", ce] }], /** * 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: [...F(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: ["auto", "from-font", ut, wt] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": ["auto", ut, ce] }], /** * 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", ce] }], /** * 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", ce] }], // 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: [...K(), Jc] }], /** * 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", Xc] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ "bg-image": [{ bg: ["none", { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, ed] }], /** * 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: [w] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via-pos": [{ via: [w] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to-pos": [{ to: [w] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from": [{ from: [g] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via": [{ via: [g] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to": [{ to: [g] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [s] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-s": [{ "rounded-s": [s] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ "rounded-e": [{ "rounded-e": [s] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ "rounded-t": [{ "rounded-t": [s] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-r": [{ "rounded-r": [s] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ "rounded-b": [{ "rounded-b": [s] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-l": [{ "rounded-l": [s] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-ss": [{ "rounded-ss": [s] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ "rounded-se": [{ "rounded-se": [s] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ "rounded-ee": [{ "rounded-ee": [s] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-es": [{ "rounded-es": [s] }], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-tl": [{ "rounded-tl": [s] }], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-tr": [{ "rounded-tr": [s] }], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-br": [{ "rounded-br": [s] }], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-bl": [{ "rounded-bl": [s] }], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ "border-w": [{ border: [i] }], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ "border-w-x": [{ "border-x": [i] }], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ "border-w-y": [{ "border-y": [i] }], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ "border-w-s": [{ "border-s": [i] }], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ "border-w-e": [{ "border-e": [i] }], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ "border-w-t": [{ "border-t": [i] }], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ "border-w-r": [{ "border-r": [i] }], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ "border-w-b": [{ "border-b": [i] }], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ "border-w-l": [{ "border-l": [i] }], /** * 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: [...F(), "hidden"] }], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ "divide-x": [{ "divide-x": [i] }], /** * 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": [i] }], /** * 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: F() }], /** * 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: ["", ...F()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ "outline-offset": [{ "outline-offset": [ut, ce] }], /** * Outline Width * @see https://tailwindcss.