@sawabona/forms 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3062 +1,300 @@
1
- var Je = Object.defineProperty, Ze = Object.defineProperties;
2
- var qe = Object.getOwnPropertyDescriptors;
3
- var re = Object.getOwnPropertySymbols;
4
- var Se = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
5
- var Ce = (e, o, t) => o in e ? Je(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, A = (e, o) => {
6
- for (var t in o || (o = {}))
7
- Se.call(o, t) && Ce(e, t, o[t]);
8
- if (re)
9
- for (var t of re(o))
10
- Ne.call(o, t) && Ce(e, t, o[t]);
1
+ var _ = Object.defineProperty, D = Object.defineProperties;
2
+ var O = Object.getOwnPropertyDescriptors;
3
+ var A = Object.getOwnPropertySymbols;
4
+ var R = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
5
+ var T = (e, a, t) => a in e ? _(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, x = (e, a) => {
6
+ for (var t in a || (a = {}))
7
+ R.call(a, t) && T(e, t, a[t]);
8
+ if (A)
9
+ for (var t of A(a))
10
+ P.call(a, t) && T(e, t, a[t]);
11
11
  return e;
12
- }, P = (e, o) => Ze(e, qe(o));
13
- var ze = (e) => typeof e == "symbol" ? e : e + "", Ae = (e, o) => {
12
+ }, w = (e, a) => D(e, O(a));
13
+ var j = (e) => typeof e == "symbol" ? e : e + "", z = (e, a) => {
14
14
  var t = {};
15
15
  for (var r in e)
16
- Se.call(e, r) && o.indexOf(r) < 0 && (t[r] = e[r]);
17
- if (e != null && re)
18
- for (var r of re(e))
19
- o.indexOf(r) < 0 && Ne.call(e, r) && (t[r] = e[r]);
16
+ R.call(e, r) && a.indexOf(r) < 0 && (t[r] = e[r]);
17
+ if (e != null && A)
18
+ for (var r of A(e))
19
+ a.indexOf(r) < 0 && P.call(e, r) && (t[r] = e[r]);
20
20
  return t;
21
21
  };
22
- import { jsxs as z, jsx as u } from "react/jsx-runtime";
23
- import { useState as et, useMemo as tt, useCallback as j, createContext as rt, useContext as ot, useRef as nt, useEffect as pe } from "react";
24
- import { motion as I, AnimatePresence as st } from "framer-motion";
25
- import { Check as Le, Star as at, ChevronLeft as it, ChevronRight as lt } from "lucide-react";
26
- function ct({ schema: e, onSubmit: o }) {
27
- var k;
28
- const [t, r] = et({
22
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
23
+ import { useState as H, useMemo as K, useCallback as C, createContext as Q, useContext as V, useRef as W, useEffect as L } from "react";
24
+ import { motion as y, AnimatePresence as M } from "framer-motion";
25
+ import { Check as $, Star as U, ChevronLeft as G, ChevronRight as X } from "lucide-react";
26
+ function J({ schema: e, onSubmit: a }) {
27
+ var b;
28
+ const [t, r] = H({
29
29
  answers: {},
30
- currentStepId: ((k = e.questions[0]) == null ? void 0 : k.id) || "",
30
+ currentStepId: ((b = e.questions[0]) == null ? void 0 : b.id) || "",
31
31
  history: [],
32
32
  isSubmitting: !1,
33
33
  errors: {},
34
34
  isCompleted: !1
35
- }), n = tt(
36
- () => e.questions.findIndex((p) => p.id === t.currentStepId),
35
+ }), d = K(
36
+ () => e.questions.findIndex((o) => o.id === t.currentStepId),
37
37
  [e.questions, t.currentStepId]
38
- ), s = e.questions[n], a = j((p, y) => {
39
- r((w) => P(A({}, w), {
40
- answers: P(A({}, w.answers), {
41
- [p]: y
38
+ ), l = e.questions[d], h = C((o, s) => {
39
+ r((i) => w(x({}, i), {
40
+ answers: w(x({}, i.answers), {
41
+ [o]: s
42
42
  }),
43
43
  // Clear error on modification
44
- errors: P(A({}, w.errors), {
45
- [p]: ""
44
+ errors: w(x({}, i.errors), {
45
+ [o]: ""
46
46
  })
47
47
  }));
48
- }, []), d = j((p, y) => {
49
- r((w) => {
50
- if (y === null) {
51
- const V = w.errors, { [p]: D } = V, F = Ae(V, [ze(p)]);
52
- return P(A({}, w), { errors: F });
48
+ }, []), u = C((o, s) => {
49
+ r((i) => {
50
+ if (s === null) {
51
+ const N = i.errors, { [o]: k } = N, I = z(N, [j(o)]);
52
+ return w(x({}, i), { errors: I });
53
53
  }
54
- return P(A({}, w), {
55
- errors: P(A({}, w.errors), { [p]: y })
54
+ return w(x({}, i), {
55
+ errors: w(x({}, i.errors), { [o]: s })
56
56
  });
57
57
  });
58
- }, []), i = j(() => {
59
- var w;
60
- if (!s) return !0;
61
- const p = t.answers[s.id], y = s.validation;
62
- return y && y.required && (p === void 0 || p === "" || Array.isArray(p) && p.length === 0) ? (d(s.id, ((w = e.i18n) == null ? void 0 : w.required) || "This field is required"), !1) : !0;
63
- }, [s, t.answers, d, e.i18n]), f = j((p) => {
64
- const y = e.questions.findIndex((w) => w.id === p.id);
65
- return y < e.questions.length - 1 ? e.questions[y + 1].id : "submit";
66
- }, [e.questions]), g = j(() => {
67
- if (!i()) return;
68
- const p = f(s);
69
- p === "submit" ? (r((y) => P(A({}, y), { isCompleted: !0 })), o == null || o(t.answers)) : r((y) => P(A({}, y), {
70
- history: [...y.history, y.currentStepId],
71
- currentStepId: p
58
+ }, []), c = C(() => {
59
+ var i;
60
+ if (!l) return !0;
61
+ const o = t.answers[l.id], s = l.validation;
62
+ return s && s.required && (o === void 0 || o === "" || Array.isArray(o) && o.length === 0) ? (u(l.id, ((i = e.i18n) == null ? void 0 : i.required) || "This field is required"), !1) : !0;
63
+ }, [l, t.answers, u, e.i18n]), p = C((o) => {
64
+ const s = e.questions.findIndex((i) => i.id === o.id);
65
+ return s < e.questions.length - 1 ? e.questions[s + 1].id : "submit";
66
+ }, [e.questions]), f = C(() => {
67
+ if (!c()) return;
68
+ const o = p(l);
69
+ o === "submit" ? (r((s) => w(x({}, s), { isCompleted: !0 })), a == null || a(t.answers)) : r((s) => w(x({}, s), {
70
+ history: [...s.history, s.currentStepId],
71
+ currentStepId: o
72
72
  }));
73
- }, [s, t.answers, i, f, o]), x = j(() => {
73
+ }, [l, t.answers, c, p, a]), g = C(() => {
74
74
  if (t.history.length === 0) return;
75
- const p = t.history[t.history.length - 1];
76
- r((y) => P(A({}, y), {
77
- history: y.history.slice(0, -1),
78
- currentStepId: p
75
+ const o = t.history[t.history.length - 1];
76
+ r((s) => w(x({}, s), {
77
+ history: s.history.slice(0, -1),
78
+ currentStepId: o
79
79
  }));
80
- }, [t.history]), v = j((p) => {
81
- if (!e.questions.some((w) => w.id === p)) {
82
- console.warn(`Step ${p} does not exist`);
80
+ }, [t.history]), v = C((o) => {
81
+ if (!e.questions.some((i) => i.id === o)) {
82
+ console.warn(`Step ${o} does not exist`);
83
83
  return;
84
84
  }
85
- r((w) => P(A({}, w), {
86
- history: [...w.history, w.currentStepId],
87
- currentStepId: p
85
+ r((i) => w(x({}, i), {
86
+ history: [...i.history, i.currentStepId],
87
+ currentStepId: o
88
88
  }));
89
- }, [e.questions]), S = j(() => {
90
- var p;
89
+ }, [e.questions]), S = C(() => {
90
+ var o;
91
91
  r({
92
92
  answers: {},
93
- currentStepId: ((p = e.questions[0]) == null ? void 0 : p.id) || "",
93
+ currentStepId: ((o = e.questions[0]) == null ? void 0 : o.id) || "",
94
94
  history: [],
95
95
  isSubmitting: !1,
96
96
  errors: {},
97
97
  isCompleted: !1
98
98
  });
99
99
  }, [e.questions]);
100
- return P(A({}, t), {
101
- setAnswer: a,
102
- nextStep: g,
103
- prevStep: x,
100
+ return w(x({}, t), {
101
+ setAnswer: h,
102
+ nextStep: f,
103
+ prevStep: g,
104
104
  jumpToStep: v,
105
- submitForm: () => o == null ? void 0 : o(t.answers),
105
+ submitForm: () => a == null ? void 0 : a(t.answers),
106
106
  resetForm: S,
107
- registerError: d,
107
+ registerError: u,
108
108
  // Helper to calculate progress
109
- progress: n / e.questions.length * 100
109
+ progress: d / e.questions.length * 100
110
110
  });
111
111
  }
112
- const Fe = rt(void 0), X = () => {
113
- const e = ot(Fe);
112
+ const B = Q(void 0), F = () => {
113
+ const e = V(B);
114
114
  if (!e)
115
115
  throw new Error("useFormContext must be used within a FormProvider");
116
116
  return e;
117
117
  };
118
- function dt({ question: e }) {
119
- const { answers: o, setAnswer: t, nextStep: r } = X(), n = o[e.id], s = n != null ? String(n) : "", a = nt(null);
120
- pe(() => {
121
- const g = setTimeout(() => {
122
- var x;
123
- (x = a.current) == null || x.focus();
118
+ function Y({ question: e }) {
119
+ var g, v, S, b, o;
120
+ const { answers: a, setAnswer: t, nextStep: r } = F(), d = a[e.id], l = d != null ? String(d) : "", h = W(null);
121
+ L(() => {
122
+ const s = setTimeout(() => {
123
+ var i;
124
+ (i = h.current) == null || i.focus();
124
125
  }, 500);
125
- return () => clearTimeout(g);
126
+ return () => clearTimeout(s);
126
127
  }, [e.id]);
127
- const d = (g) => {
128
- var S;
129
- let x = g.target.value;
130
- const v = ((S = e.validation) == null ? void 0 : S.maxLength) || 2048;
131
- if (x.length > v && (x = x.slice(0, v)), e.type === "number") {
132
- const k = x === "" ? "" : parseFloat(x);
133
- t(e.id, k);
128
+ const u = (s) => {
129
+ var k;
130
+ let i = s.target.value;
131
+ const N = ((k = e.validation) == null ? void 0 : k.maxLength) || 2048;
132
+ if (i.length > N && (i = i.slice(0, N)), e.type === "number") {
133
+ const I = i === "" ? "" : parseFloat(i);
134
+ t(e.id, I);
134
135
  } else
135
- t(e.id, x);
136
- }, i = () => {
137
- var g, x, v, S, k;
138
- if ((g = e.validation) != null && g.required && !s) return !1;
139
- if (s) {
140
- if ((x = e.validation) != null && x.minLength && s.length < e.validation.minLength || e.type === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)) return !1;
141
- if ((v = e.validation) != null && v.pattern)
136
+ t(e.id, i);
137
+ }, c = () => {
138
+ var s, i, N, k, I;
139
+ if ((s = e.validation) != null && s.required && !l) return !1;
140
+ if (l) {
141
+ if ((i = e.validation) != null && i.minLength && l.length < e.validation.minLength || e.type === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)) return !1;
142
+ if ((N = e.validation) != null && N.pattern)
142
143
  try {
143
- if (!new RegExp(e.validation.pattern).test(s)) return !1;
144
- } catch (p) {
145
- console.error("Invalid regex pattern in schema", p);
144
+ if (!new RegExp(e.validation.pattern).test(l)) return !1;
145
+ } catch (E) {
146
+ console.error("Invalid regex pattern in schema", E);
146
147
  }
147
148
  if (e.type === "number") {
148
- const p = parseFloat(s);
149
- if (!isNaN(p) && (((S = e.validation) == null ? void 0 : S.min) !== void 0 && p < e.validation.min || ((k = e.validation) == null ? void 0 : k.max) !== void 0 && p > e.validation.max))
149
+ const E = parseFloat(l);
150
+ if (!isNaN(E) && (((k = e.validation) == null ? void 0 : k.min) !== void 0 && E < e.validation.min || ((I = e.validation) == null ? void 0 : I.max) !== void 0 && E > e.validation.max))
150
151
  return !1;
151
152
  }
152
153
  }
153
154
  return !0;
154
- }, f = (g) => {
155
- if (g.key === "Enter" && !g.shiftKey) {
156
- if (g.preventDefault(), !i()) {
157
- const x = document.querySelector(".sawabona-form-container") || document.body;
158
- x.classList.add("shake-animation"), setTimeout(() => x.classList.remove("shake-animation"), 500);
155
+ }, p = (s) => {
156
+ if (s.key === "Enter" && !s.shiftKey) {
157
+ if (s.preventDefault(), !c()) {
158
+ const i = document.querySelector(".sawabona-form-container") || document.body;
159
+ i.classList.add("shake-animation"), setTimeout(() => i.classList.remove("shake-animation"), 500);
159
160
  return;
160
161
  }
161
162
  r();
162
163
  }
163
164
  };
164
- return /* @__PURE__ */ z("div", { className: "w-full relative group", children: [
165
- /* @__PURE__ */ u(
165
+ return /* @__PURE__ */ m("div", { className: "w-full relative group", children: [
166
+ /* @__PURE__ */ n(
166
167
  "input",
167
168
  {
168
- ref: a,
169
+ ref: h,
169
170
  type: e.type,
170
- value: s,
171
- onChange: d,
172
- onKeyDown: f,
173
- placeholder: e.placeholder || "Type your answer...",
174
- className: "w-full bg-transparent text-3xl md:text-5xl border-b-2 border-primary/20 focus:border-primary py-4 outline-none transition-all placeholder:text-muted-foreground/20 font-light"
171
+ value: typeof l == "string" || typeof l == "number" ? l : "",
172
+ onChange: u,
173
+ onKeyDown: p,
174
+ placeholder: e.placeholder,
175
+ minLength: (g = e.validation) == null ? void 0 : g.minLength,
176
+ maxLength: ((v = e.validation) == null ? void 0 : v.maxLength) || 2048,
177
+ min: (S = e.validation) == null ? void 0 : S.min,
178
+ max: (b = e.validation) == null ? void 0 : b.max,
179
+ pattern: (o = e.validation) == null ? void 0 : o.pattern,
180
+ className: `
181
+ w-full bg-transparent border-b-2 border-sw-text-secondary/20
182
+ py-4 text-2xl md:text-3xl font-medium outline-none transition-colors
183
+ placeholder:text-sw-text-secondary/30
184
+ focus:border-sw-primary
185
+ font-sw-heading
186
+ `,
187
+ autoFocus: !0
175
188
  }
176
189
  ),
177
- /* @__PURE__ */ u(
178
- I.div,
179
- {
180
- initial: { width: "0%" },
181
- animate: { width: s ? "100%" : "0%" },
182
- transition: { duration: 0.3 },
183
- className: "absolute bottom-0 left-0 h-[2px] bg-primary"
184
- }
185
- ),
186
- /* @__PURE__ */ u("div", { className: "mt-4 flex items-center gap-2 opacity-0 animate-in fade-in slide-in-from-top-2 duration-700 delay-300 fill-mode-forwards", children: /* @__PURE__ */ z("div", { className: "flex items-center gap-1.5 text-sm md:text-base font-medium bg-primary/10 text-primary px-3 py-1.5 rounded-md", children: [
187
- /* @__PURE__ */ u("span", { children: "Pressione" }),
188
- /* @__PURE__ */ u("span", { className: "font-bold border border-primary/30 rounded px-1 min-w-[20px] text-center", children: "↵" }),
189
- /* @__PURE__ */ u("span", { children: "Enter" })
190
- ] }) })
190
+ void 0,
191
+ /* @__PURE__ */ m("p", { className: "text-sm opacity-50 mt-4", children: [
192
+ e.type === "email" && "Press Enter to continue",
193
+ e.type === "text" && "Press Enter to continue",
194
+ e.type === "number" && "Press Enter to continue",
195
+ e.type === "url" && "Press Enter to continue"
196
+ ] })
191
197
  ] });
192
198
  }
193
- function je(e) {
194
- var o, t, r = "";
195
- if (typeof e == "string" || typeof e == "number") r += e;
196
- else if (typeof e == "object") if (Array.isArray(e)) {
197
- var n = e.length;
198
- for (o = 0; o < n; o++) e[o] && (t = je(e[o])) && (r && (r += " "), r += t);
199
- } else for (t in e) e[t] && (r && (r += " "), r += t);
200
- return r;
201
- }
202
- function mt() {
203
- for (var e, o, t = 0, r = "", n = arguments.length; t < n; t++) (e = arguments[t]) && (o = je(e)) && (r && (r += " "), r += o);
204
- return r;
205
- }
206
- const pt = (e, o) => {
207
- const t = new Array(e.length + o.length);
208
- for (let r = 0; r < e.length; r++)
209
- t[r] = e[r];
210
- for (let r = 0; r < o.length; r++)
211
- t[e.length + r] = o[r];
212
- return t;
213
- }, ut = (e, o) => ({
214
- classGroupId: e,
215
- validator: o
216
- }), Ge = (e = /* @__PURE__ */ new Map(), o = null, t) => ({
217
- nextPart: e,
218
- validators: o,
219
- classGroupId: t
220
- }), se = "-", Ie = [], ft = "arbitrary..", gt = (e) => {
221
- const o = ht(e), {
222
- conflictingClassGroups: t,
223
- conflictingClassGroupModifiers: r
224
- } = e;
225
- return {
226
- getClassGroupId: (a) => {
227
- if (a.startsWith("[") && a.endsWith("]"))
228
- return bt(a);
229
- const d = a.split(se), i = d[0] === "" && d.length > 1 ? 1 : 0;
230
- return Oe(d, i, o);
231
- },
232
- getConflictingClassGroupIds: (a, d) => {
233
- if (d) {
234
- const i = r[a], f = t[a];
235
- return i ? f ? pt(f, i) : i : f || Ie;
236
- }
237
- return t[a] || Ie;
238
- }
239
- };
240
- }, Oe = (e, o, t) => {
241
- if (e.length - o === 0)
242
- return t.classGroupId;
243
- const n = e[o], s = t.nextPart.get(n);
244
- if (s) {
245
- const f = Oe(e, o + 1, s);
246
- if (f) return f;
247
- }
248
- const a = t.validators;
249
- if (a === null)
250
- return;
251
- const d = o === 0 ? e.join(se) : e.slice(o).join(se), i = a.length;
252
- for (let f = 0; f < i; f++) {
253
- const g = a[f];
254
- if (g.validator(d))
255
- return g.classGroupId;
256
- }
257
- }, bt = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
258
- const o = e.slice(1, -1), t = o.indexOf(":"), r = o.slice(0, t);
259
- return r ? ft + r : void 0;
260
- })(), ht = (e) => {
261
- const {
262
- theme: o,
263
- classGroups: t
264
- } = e;
265
- return xt(t, o);
266
- }, xt = (e, o) => {
267
- const t = Ge();
268
- for (const r in e) {
269
- const n = e[r];
270
- ue(n, t, r, o);
271
- }
272
- return t;
273
- }, ue = (e, o, t, r) => {
274
- const n = e.length;
275
- for (let s = 0; s < n; s++) {
276
- const a = e[s];
277
- yt(a, o, t, r);
278
- }
279
- }, yt = (e, o, t, r) => {
280
- if (typeof e == "string") {
281
- wt(e, o, t);
282
- return;
283
- }
284
- if (typeof e == "function") {
285
- vt(e, o, t, r);
286
- return;
287
- }
288
- kt(e, o, t, r);
289
- }, wt = (e, o, t) => {
290
- const r = e === "" ? o : Ve(o, e);
291
- r.classGroupId = t;
292
- }, vt = (e, o, t, r) => {
293
- if (Ct(e)) {
294
- ue(e(r), o, t, r);
295
- return;
296
- }
297
- o.validators === null && (o.validators = []), o.validators.push(ut(t, e));
298
- }, kt = (e, o, t, r) => {
299
- const n = Object.entries(e), s = n.length;
300
- for (let a = 0; a < s; a++) {
301
- const [d, i] = n[a];
302
- ue(i, Ve(o, d), t, r);
303
- }
304
- }, Ve = (e, o) => {
305
- let t = e;
306
- const r = o.split(se), n = r.length;
307
- for (let s = 0; s < n; s++) {
308
- const a = r[s];
309
- let d = t.nextPart.get(a);
310
- d || (d = Ge(), t.nextPart.set(a, d)), t = d;
311
- }
312
- return t;
313
- }, Ct = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, St = (e) => {
314
- if (e < 1)
315
- return {
316
- get: () => {
317
- },
318
- set: () => {
319
- }
320
- };
321
- let o = 0, t = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
322
- const n = (s, a) => {
323
- t[s] = a, o++, o > e && (o = 0, r = t, t = /* @__PURE__ */ Object.create(null));
324
- };
325
- return {
326
- get(s) {
327
- let a = t[s];
328
- if (a !== void 0)
329
- return a;
330
- if ((a = r[s]) !== void 0)
331
- return n(s, a), a;
332
- },
333
- set(s, a) {
334
- s in t ? t[s] = a : n(s, a);
335
- }
336
- };
337
- }, de = "!", Re = ":", Nt = [], Te = (e, o, t, r, n) => ({
338
- modifiers: e,
339
- hasImportantModifier: o,
340
- baseClassName: t,
341
- maybePostfixModifierPosition: r,
342
- isExternal: n
343
- }), zt = (e) => {
344
- const {
345
- prefix: o,
346
- experimentalParseClassName: t
347
- } = e;
348
- let r = (n) => {
349
- const s = [];
350
- let a = 0, d = 0, i = 0, f;
351
- const g = n.length;
352
- for (let p = 0; p < g; p++) {
353
- const y = n[p];
354
- if (a === 0 && d === 0) {
355
- if (y === Re) {
356
- s.push(n.slice(i, p)), i = p + 1;
357
- continue;
358
- }
359
- if (y === "/") {
360
- f = p;
361
- continue;
362
- }
363
- }
364
- y === "[" ? a++ : y === "]" ? a-- : y === "(" ? d++ : y === ")" && d--;
365
- }
366
- const x = s.length === 0 ? n : n.slice(i);
367
- let v = x, S = !1;
368
- x.endsWith(de) ? (v = x.slice(0, -1), S = !0) : (
369
- /**
370
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
371
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
372
- */
373
- x.startsWith(de) && (v = x.slice(1), S = !0)
374
- );
375
- const k = f && f > i ? f - i : void 0;
376
- return Te(s, S, v, k);
377
- };
378
- if (o) {
379
- const n = o + Re, s = r;
380
- r = (a) => a.startsWith(n) ? s(a.slice(n.length)) : Te(Nt, !1, a, void 0, !0);
381
- }
382
- if (t) {
383
- const n = r;
384
- r = (s) => t({
385
- className: s,
386
- parseClassName: n
387
- });
388
- }
389
- return r;
390
- }, At = (e) => {
391
- const o = /* @__PURE__ */ new Map();
392
- return e.orderSensitiveModifiers.forEach((t, r) => {
393
- o.set(t, 1e6 + r);
394
- }), (t) => {
395
- const r = [];
396
- let n = [];
397
- for (let s = 0; s < t.length; s++) {
398
- const a = t[s], d = a[0] === "[", i = o.has(a);
399
- d || i ? (n.length > 0 && (n.sort(), r.push(...n), n = []), r.push(a)) : n.push(a);
400
- }
401
- return n.length > 0 && (n.sort(), r.push(...n)), r;
402
- };
403
- }, It = (e) => A({
404
- cache: St(e.cacheSize),
405
- parseClassName: zt(e),
406
- sortModifiers: At(e)
407
- }, gt(e)), Rt = /\s+/, Tt = (e, o) => {
408
- const {
409
- parseClassName: t,
410
- getClassGroupId: r,
411
- getConflictingClassGroupIds: n,
412
- sortModifiers: s
413
- } = o, a = [], d = e.trim().split(Rt);
414
- let i = "";
415
- for (let f = d.length - 1; f >= 0; f -= 1) {
416
- const g = d[f], {
417
- isExternal: x,
418
- modifiers: v,
419
- hasImportantModifier: S,
420
- baseClassName: k,
421
- maybePostfixModifierPosition: p
422
- } = t(g);
423
- if (x) {
424
- i = g + (i.length > 0 ? " " + i : i);
425
- continue;
426
- }
427
- let y = !!p, w = r(y ? k.substring(0, p) : k);
428
- if (!w) {
429
- if (!y) {
430
- i = g + (i.length > 0 ? " " + i : i);
431
- continue;
432
- }
433
- if (w = r(k), !w) {
434
- i = g + (i.length > 0 ? " " + i : i);
435
- continue;
436
- }
437
- y = !1;
438
- }
439
- const V = v.length === 0 ? "" : v.length === 1 ? v[0] : s(v).join(":"), D = S ? V + de : V, F = D + w;
440
- if (a.indexOf(F) > -1)
441
- continue;
442
- a.push(F);
443
- const U = n(w, y);
444
- for (let W = 0; W < U.length; ++W) {
445
- const K = U[W];
446
- a.push(D + K);
447
- }
448
- i = g + (i.length > 0 ? " " + i : i);
449
- }
450
- return i;
451
- }, Pt = (...e) => {
452
- let o = 0, t, r, n = "";
453
- for (; o < e.length; )
454
- (t = e[o++]) && (r = We(t)) && (n && (n += " "), n += r);
455
- return n;
456
- }, We = (e) => {
457
- if (typeof e == "string")
458
- return e;
459
- let o, t = "";
460
- for (let r = 0; r < e.length; r++)
461
- e[r] && (o = We(e[r])) && (t && (t += " "), t += o);
462
- return t;
463
- }, Mt = (e, ...o) => {
464
- let t, r, n, s;
465
- const a = (i) => {
466
- const f = o.reduce((g, x) => x(g), e());
467
- return t = It(f), r = t.cache.get, n = t.cache.set, s = d, d(i);
468
- }, d = (i) => {
469
- const f = r(i);
470
- if (f)
471
- return f;
472
- const g = Tt(i, t);
473
- return n(i, g), g;
474
- };
475
- return s = a, (...i) => s(Pt(...i));
476
- }, Et = [], C = (e) => {
477
- const o = (t) => t[e] || Et;
478
- return o.isThemeGetter = !0, o;
479
- }, _e = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Be = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Lt = /^\d+\/\d+$/, Ft = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, jt = /\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$/, Gt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ot = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Vt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Q = (e) => Lt.test(e), h = (e) => !!e && !Number.isNaN(Number(e)), G = (e) => !!e && Number.isInteger(Number(e)), ce = (e) => e.endsWith("%") && h(e.slice(0, -1)), L = (e) => Ft.test(e), $e = () => !0, Wt = (e) => (
480
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
481
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
482
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
483
- jt.test(e) && !Gt.test(e)
484
- ), fe = () => !1, _t = (e) => Ot.test(e), Bt = (e) => Vt.test(e), $t = (e) => !l(e) && !c(e), Dt = (e) => O(e, He, fe), l = (e) => _e.test(e), B = (e) => O(e, Qe, Wt), Pe = (e) => O(e, Zt, h), Ut = (e) => O(e, Ye, $e), Ht = (e) => O(e, Ke, fe), Me = (e) => O(e, De, fe), Qt = (e) => O(e, Ue, Bt), oe = (e) => O(e, Xe, _t), c = (e) => Be.test(e), Y = (e) => $(e, Qe), Kt = (e) => $(e, Ke), Ee = (e) => $(e, De), Yt = (e) => $(e, He), Xt = (e) => $(e, Ue), ne = (e) => $(e, Xe, !0), Jt = (e) => $(e, Ye, !0), O = (e, o, t) => {
485
- const r = _e.exec(e);
486
- return r ? r[1] ? o(r[1]) : t(r[2]) : !1;
487
- }, $ = (e, o, t = !1) => {
488
- const r = Be.exec(e);
489
- return r ? r[1] ? o(r[1]) : t : !1;
490
- }, De = (e) => e === "position" || e === "percentage", Ue = (e) => e === "image" || e === "url", He = (e) => e === "length" || e === "size" || e === "bg-size", Qe = (e) => e === "length", Zt = (e) => e === "number", Ke = (e) => e === "family-name", Ye = (e) => e === "number" || e === "weight", Xe = (e) => e === "shadow", qt = () => {
491
- const e = C("color"), o = C("font"), t = C("text"), r = C("font-weight"), n = C("tracking"), s = C("leading"), a = C("breakpoint"), d = C("container"), i = C("spacing"), f = C("radius"), g = C("shadow"), x = C("inset-shadow"), v = C("text-shadow"), S = C("drop-shadow"), k = C("blur"), p = C("perspective"), y = C("aspect"), w = C("ease"), V = C("animate"), D = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [
492
- "center",
493
- "top",
494
- "bottom",
495
- "left",
496
- "right",
497
- "top-left",
498
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
499
- "left-top",
500
- "top-right",
501
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
502
- "right-top",
503
- "bottom-right",
504
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
505
- "right-bottom",
506
- "bottom-left",
507
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
508
- "left-bottom"
509
- ], U = () => [...F(), c, l], W = () => ["auto", "hidden", "clip", "visible", "scroll"], K = () => ["auto", "contain", "none"], b = () => [c, l, i], M = () => [Q, "full", "auto", ...b()], ge = () => [G, "none", "subgrid", c, l], be = () => ["auto", {
510
- span: ["full", G, c, l]
511
- }, G, c, l], J = () => [G, "auto", c, l], he = () => ["auto", "min", "max", "fr", c, l], ae = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], H = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], E = () => ["auto", ...b()], _ = () => [Q, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...b()], m = () => [e, c, l], xe = () => [...F(), Ee, Me, {
512
- position: [c, l]
513
- }], ye = () => ["no-repeat", {
514
- repeat: ["", "x", "y", "space", "round"]
515
- }], we = () => ["auto", "cover", "contain", Yt, Dt, {
516
- size: [c, l]
517
- }], ie = () => [ce, Y, B], R = () => [
518
- // Deprecated since Tailwind CSS v4.0.0
519
- "",
520
- "none",
521
- "full",
522
- f,
523
- c,
524
- l
525
- ], T = () => ["", h, Y, B], Z = () => ["solid", "dashed", "dotted", "double"], ve = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], N = () => [h, ce, Ee, Me], ke = () => [
526
- // Deprecated since Tailwind CSS v4.0.0
527
- "",
528
- "none",
529
- k,
530
- c,
531
- l
532
- ], q = () => ["none", h, c, l], ee = () => ["none", h, c, l], le = () => [h, c, l], te = () => [Q, "full", ...b()];
533
- return {
534
- cacheSize: 500,
535
- theme: {
536
- animate: ["spin", "ping", "pulse", "bounce"],
537
- aspect: ["video"],
538
- blur: [L],
539
- breakpoint: [L],
540
- color: [$e],
541
- container: [L],
542
- "drop-shadow": [L],
543
- ease: ["in", "out", "in-out"],
544
- font: [$t],
545
- "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
546
- "inset-shadow": [L],
547
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
548
- perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
549
- radius: [L],
550
- shadow: [L],
551
- spacing: ["px", h],
552
- text: [L],
553
- "text-shadow": [L],
554
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
555
- },
556
- classGroups: {
557
- // --------------
558
- // --- Layout ---
559
- // --------------
560
- /**
561
- * Aspect Ratio
562
- * @see https://tailwindcss.com/docs/aspect-ratio
563
- */
564
- aspect: [{
565
- aspect: ["auto", "square", Q, l, c, y]
566
- }],
567
- /**
568
- * Container
569
- * @see https://tailwindcss.com/docs/container
570
- * @deprecated since Tailwind CSS v4.0.0
571
- */
572
- container: ["container"],
573
- /**
574
- * Columns
575
- * @see https://tailwindcss.com/docs/columns
576
- */
577
- columns: [{
578
- columns: [h, l, c, d]
579
- }],
580
- /**
581
- * Break After
582
- * @see https://tailwindcss.com/docs/break-after
583
- */
584
- "break-after": [{
585
- "break-after": D()
586
- }],
587
- /**
588
- * Break Before
589
- * @see https://tailwindcss.com/docs/break-before
590
- */
591
- "break-before": [{
592
- "break-before": D()
593
- }],
594
- /**
595
- * Break Inside
596
- * @see https://tailwindcss.com/docs/break-inside
597
- */
598
- "break-inside": [{
599
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
600
- }],
601
- /**
602
- * Box Decoration Break
603
- * @see https://tailwindcss.com/docs/box-decoration-break
604
- */
605
- "box-decoration": [{
606
- "box-decoration": ["slice", "clone"]
607
- }],
608
- /**
609
- * Box Sizing
610
- * @see https://tailwindcss.com/docs/box-sizing
611
- */
612
- box: [{
613
- box: ["border", "content"]
614
- }],
615
- /**
616
- * Display
617
- * @see https://tailwindcss.com/docs/display
618
- */
619
- 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"],
620
- /**
621
- * Screen Reader Only
622
- * @see https://tailwindcss.com/docs/display#screen-reader-only
623
- */
624
- sr: ["sr-only", "not-sr-only"],
625
- /**
626
- * Floats
627
- * @see https://tailwindcss.com/docs/float
628
- */
629
- float: [{
630
- float: ["right", "left", "none", "start", "end"]
631
- }],
632
- /**
633
- * Clear
634
- * @see https://tailwindcss.com/docs/clear
635
- */
636
- clear: [{
637
- clear: ["left", "right", "both", "none", "start", "end"]
638
- }],
639
- /**
640
- * Isolation
641
- * @see https://tailwindcss.com/docs/isolation
642
- */
643
- isolation: ["isolate", "isolation-auto"],
644
- /**
645
- * Object Fit
646
- * @see https://tailwindcss.com/docs/object-fit
647
- */
648
- "object-fit": [{
649
- object: ["contain", "cover", "fill", "none", "scale-down"]
650
- }],
651
- /**
652
- * Object Position
653
- * @see https://tailwindcss.com/docs/object-position
654
- */
655
- "object-position": [{
656
- object: U()
657
- }],
658
- /**
659
- * Overflow
660
- * @see https://tailwindcss.com/docs/overflow
661
- */
662
- overflow: [{
663
- overflow: W()
664
- }],
665
- /**
666
- * Overflow X
667
- * @see https://tailwindcss.com/docs/overflow
668
- */
669
- "overflow-x": [{
670
- "overflow-x": W()
671
- }],
672
- /**
673
- * Overflow Y
674
- * @see https://tailwindcss.com/docs/overflow
675
- */
676
- "overflow-y": [{
677
- "overflow-y": W()
678
- }],
679
- /**
680
- * Overscroll Behavior
681
- * @see https://tailwindcss.com/docs/overscroll-behavior
682
- */
683
- overscroll: [{
684
- overscroll: K()
685
- }],
686
- /**
687
- * Overscroll Behavior X
688
- * @see https://tailwindcss.com/docs/overscroll-behavior
689
- */
690
- "overscroll-x": [{
691
- "overscroll-x": K()
692
- }],
693
- /**
694
- * Overscroll Behavior Y
695
- * @see https://tailwindcss.com/docs/overscroll-behavior
696
- */
697
- "overscroll-y": [{
698
- "overscroll-y": K()
699
- }],
700
- /**
701
- * Position
702
- * @see https://tailwindcss.com/docs/position
703
- */
704
- position: ["static", "fixed", "absolute", "relative", "sticky"],
705
- /**
706
- * Top / Right / Bottom / Left
707
- * @see https://tailwindcss.com/docs/top-right-bottom-left
708
- */
709
- inset: [{
710
- inset: M()
711
- }],
712
- /**
713
- * Right / Left
714
- * @see https://tailwindcss.com/docs/top-right-bottom-left
715
- */
716
- "inset-x": [{
717
- "inset-x": M()
718
- }],
719
- /**
720
- * Top / Bottom
721
- * @see https://tailwindcss.com/docs/top-right-bottom-left
722
- */
723
- "inset-y": [{
724
- "inset-y": M()
725
- }],
726
- /**
727
- * Start
728
- * @see https://tailwindcss.com/docs/top-right-bottom-left
729
- */
730
- start: [{
731
- start: M()
732
- }],
733
- /**
734
- * End
735
- * @see https://tailwindcss.com/docs/top-right-bottom-left
736
- */
737
- end: [{
738
- end: M()
739
- }],
740
- /**
741
- * Top
742
- * @see https://tailwindcss.com/docs/top-right-bottom-left
743
- */
744
- top: [{
745
- top: M()
746
- }],
747
- /**
748
- * Right
749
- * @see https://tailwindcss.com/docs/top-right-bottom-left
750
- */
751
- right: [{
752
- right: M()
753
- }],
754
- /**
755
- * Bottom
756
- * @see https://tailwindcss.com/docs/top-right-bottom-left
757
- */
758
- bottom: [{
759
- bottom: M()
760
- }],
761
- /**
762
- * Left
763
- * @see https://tailwindcss.com/docs/top-right-bottom-left
764
- */
765
- left: [{
766
- left: M()
767
- }],
768
- /**
769
- * Visibility
770
- * @see https://tailwindcss.com/docs/visibility
771
- */
772
- visibility: ["visible", "invisible", "collapse"],
773
- /**
774
- * Z-Index
775
- * @see https://tailwindcss.com/docs/z-index
776
- */
777
- z: [{
778
- z: [G, "auto", c, l]
779
- }],
780
- // ------------------------
781
- // --- Flexbox and Grid ---
782
- // ------------------------
783
- /**
784
- * Flex Basis
785
- * @see https://tailwindcss.com/docs/flex-basis
786
- */
787
- basis: [{
788
- basis: [Q, "full", "auto", d, ...b()]
789
- }],
790
- /**
791
- * Flex Direction
792
- * @see https://tailwindcss.com/docs/flex-direction
793
- */
794
- "flex-direction": [{
795
- flex: ["row", "row-reverse", "col", "col-reverse"]
796
- }],
797
- /**
798
- * Flex Wrap
799
- * @see https://tailwindcss.com/docs/flex-wrap
800
- */
801
- "flex-wrap": [{
802
- flex: ["nowrap", "wrap", "wrap-reverse"]
803
- }],
804
- /**
805
- * Flex
806
- * @see https://tailwindcss.com/docs/flex
807
- */
808
- flex: [{
809
- flex: [h, Q, "auto", "initial", "none", l]
810
- }],
811
- /**
812
- * Flex Grow
813
- * @see https://tailwindcss.com/docs/flex-grow
814
- */
815
- grow: [{
816
- grow: ["", h, c, l]
817
- }],
818
- /**
819
- * Flex Shrink
820
- * @see https://tailwindcss.com/docs/flex-shrink
821
- */
822
- shrink: [{
823
- shrink: ["", h, c, l]
824
- }],
825
- /**
826
- * Order
827
- * @see https://tailwindcss.com/docs/order
828
- */
829
- order: [{
830
- order: [G, "first", "last", "none", c, l]
831
- }],
832
- /**
833
- * Grid Template Columns
834
- * @see https://tailwindcss.com/docs/grid-template-columns
835
- */
836
- "grid-cols": [{
837
- "grid-cols": ge()
838
- }],
839
- /**
840
- * Grid Column Start / End
841
- * @see https://tailwindcss.com/docs/grid-column
842
- */
843
- "col-start-end": [{
844
- col: be()
845
- }],
846
- /**
847
- * Grid Column Start
848
- * @see https://tailwindcss.com/docs/grid-column
849
- */
850
- "col-start": [{
851
- "col-start": J()
852
- }],
853
- /**
854
- * Grid Column End
855
- * @see https://tailwindcss.com/docs/grid-column
856
- */
857
- "col-end": [{
858
- "col-end": J()
859
- }],
860
- /**
861
- * Grid Template Rows
862
- * @see https://tailwindcss.com/docs/grid-template-rows
863
- */
864
- "grid-rows": [{
865
- "grid-rows": ge()
866
- }],
867
- /**
868
- * Grid Row Start / End
869
- * @see https://tailwindcss.com/docs/grid-row
870
- */
871
- "row-start-end": [{
872
- row: be()
873
- }],
874
- /**
875
- * Grid Row Start
876
- * @see https://tailwindcss.com/docs/grid-row
877
- */
878
- "row-start": [{
879
- "row-start": J()
880
- }],
881
- /**
882
- * Grid Row End
883
- * @see https://tailwindcss.com/docs/grid-row
884
- */
885
- "row-end": [{
886
- "row-end": J()
887
- }],
888
- /**
889
- * Grid Auto Flow
890
- * @see https://tailwindcss.com/docs/grid-auto-flow
891
- */
892
- "grid-flow": [{
893
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
894
- }],
895
- /**
896
- * Grid Auto Columns
897
- * @see https://tailwindcss.com/docs/grid-auto-columns
898
- */
899
- "auto-cols": [{
900
- "auto-cols": he()
901
- }],
902
- /**
903
- * Grid Auto Rows
904
- * @see https://tailwindcss.com/docs/grid-auto-rows
905
- */
906
- "auto-rows": [{
907
- "auto-rows": he()
908
- }],
909
- /**
910
- * Gap
911
- * @see https://tailwindcss.com/docs/gap
912
- */
913
- gap: [{
914
- gap: b()
915
- }],
916
- /**
917
- * Gap X
918
- * @see https://tailwindcss.com/docs/gap
919
- */
920
- "gap-x": [{
921
- "gap-x": b()
922
- }],
923
- /**
924
- * Gap Y
925
- * @see https://tailwindcss.com/docs/gap
926
- */
927
- "gap-y": [{
928
- "gap-y": b()
929
- }],
930
- /**
931
- * Justify Content
932
- * @see https://tailwindcss.com/docs/justify-content
933
- */
934
- "justify-content": [{
935
- justify: [...ae(), "normal"]
936
- }],
937
- /**
938
- * Justify Items
939
- * @see https://tailwindcss.com/docs/justify-items
940
- */
941
- "justify-items": [{
942
- "justify-items": [...H(), "normal"]
943
- }],
944
- /**
945
- * Justify Self
946
- * @see https://tailwindcss.com/docs/justify-self
947
- */
948
- "justify-self": [{
949
- "justify-self": ["auto", ...H()]
950
- }],
951
- /**
952
- * Align Content
953
- * @see https://tailwindcss.com/docs/align-content
954
- */
955
- "align-content": [{
956
- content: ["normal", ...ae()]
957
- }],
958
- /**
959
- * Align Items
960
- * @see https://tailwindcss.com/docs/align-items
961
- */
962
- "align-items": [{
963
- items: [...H(), {
964
- baseline: ["", "last"]
965
- }]
966
- }],
967
- /**
968
- * Align Self
969
- * @see https://tailwindcss.com/docs/align-self
970
- */
971
- "align-self": [{
972
- self: ["auto", ...H(), {
973
- baseline: ["", "last"]
974
- }]
975
- }],
976
- /**
977
- * Place Content
978
- * @see https://tailwindcss.com/docs/place-content
979
- */
980
- "place-content": [{
981
- "place-content": ae()
982
- }],
983
- /**
984
- * Place Items
985
- * @see https://tailwindcss.com/docs/place-items
986
- */
987
- "place-items": [{
988
- "place-items": [...H(), "baseline"]
989
- }],
990
- /**
991
- * Place Self
992
- * @see https://tailwindcss.com/docs/place-self
993
- */
994
- "place-self": [{
995
- "place-self": ["auto", ...H()]
996
- }],
997
- // Spacing
998
- /**
999
- * Padding
1000
- * @see https://tailwindcss.com/docs/padding
1001
- */
1002
- p: [{
1003
- p: b()
1004
- }],
1005
- /**
1006
- * Padding X
1007
- * @see https://tailwindcss.com/docs/padding
1008
- */
1009
- px: [{
1010
- px: b()
1011
- }],
1012
- /**
1013
- * Padding Y
1014
- * @see https://tailwindcss.com/docs/padding
1015
- */
1016
- py: [{
1017
- py: b()
1018
- }],
1019
- /**
1020
- * Padding Start
1021
- * @see https://tailwindcss.com/docs/padding
1022
- */
1023
- ps: [{
1024
- ps: b()
1025
- }],
1026
- /**
1027
- * Padding End
1028
- * @see https://tailwindcss.com/docs/padding
1029
- */
1030
- pe: [{
1031
- pe: b()
1032
- }],
1033
- /**
1034
- * Padding Top
1035
- * @see https://tailwindcss.com/docs/padding
1036
- */
1037
- pt: [{
1038
- pt: b()
1039
- }],
1040
- /**
1041
- * Padding Right
1042
- * @see https://tailwindcss.com/docs/padding
1043
- */
1044
- pr: [{
1045
- pr: b()
1046
- }],
1047
- /**
1048
- * Padding Bottom
1049
- * @see https://tailwindcss.com/docs/padding
1050
- */
1051
- pb: [{
1052
- pb: b()
1053
- }],
1054
- /**
1055
- * Padding Left
1056
- * @see https://tailwindcss.com/docs/padding
1057
- */
1058
- pl: [{
1059
- pl: b()
1060
- }],
1061
- /**
1062
- * Margin
1063
- * @see https://tailwindcss.com/docs/margin
1064
- */
1065
- m: [{
1066
- m: E()
1067
- }],
1068
- /**
1069
- * Margin X
1070
- * @see https://tailwindcss.com/docs/margin
1071
- */
1072
- mx: [{
1073
- mx: E()
1074
- }],
1075
- /**
1076
- * Margin Y
1077
- * @see https://tailwindcss.com/docs/margin
1078
- */
1079
- my: [{
1080
- my: E()
1081
- }],
1082
- /**
1083
- * Margin Start
1084
- * @see https://tailwindcss.com/docs/margin
1085
- */
1086
- ms: [{
1087
- ms: E()
1088
- }],
1089
- /**
1090
- * Margin End
1091
- * @see https://tailwindcss.com/docs/margin
1092
- */
1093
- me: [{
1094
- me: E()
1095
- }],
1096
- /**
1097
- * Margin Top
1098
- * @see https://tailwindcss.com/docs/margin
1099
- */
1100
- mt: [{
1101
- mt: E()
1102
- }],
1103
- /**
1104
- * Margin Right
1105
- * @see https://tailwindcss.com/docs/margin
1106
- */
1107
- mr: [{
1108
- mr: E()
1109
- }],
1110
- /**
1111
- * Margin Bottom
1112
- * @see https://tailwindcss.com/docs/margin
1113
- */
1114
- mb: [{
1115
- mb: E()
1116
- }],
1117
- /**
1118
- * Margin Left
1119
- * @see https://tailwindcss.com/docs/margin
1120
- */
1121
- ml: [{
1122
- ml: E()
1123
- }],
1124
- /**
1125
- * Space Between X
1126
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1127
- */
1128
- "space-x": [{
1129
- "space-x": b()
1130
- }],
1131
- /**
1132
- * Space Between X Reverse
1133
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1134
- */
1135
- "space-x-reverse": ["space-x-reverse"],
1136
- /**
1137
- * Space Between Y
1138
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1139
- */
1140
- "space-y": [{
1141
- "space-y": b()
1142
- }],
1143
- /**
1144
- * Space Between Y Reverse
1145
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1146
- */
1147
- "space-y-reverse": ["space-y-reverse"],
1148
- // --------------
1149
- // --- Sizing ---
1150
- // --------------
1151
- /**
1152
- * Size
1153
- * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1154
- */
1155
- size: [{
1156
- size: _()
1157
- }],
1158
- /**
1159
- * Width
1160
- * @see https://tailwindcss.com/docs/width
1161
- */
1162
- w: [{
1163
- w: [d, "screen", ..._()]
1164
- }],
1165
- /**
1166
- * Min-Width
1167
- * @see https://tailwindcss.com/docs/min-width
1168
- */
1169
- "min-w": [{
1170
- "min-w": [
1171
- d,
1172
- "screen",
1173
- /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1174
- "none",
1175
- ..._()
1176
- ]
1177
- }],
1178
- /**
1179
- * Max-Width
1180
- * @see https://tailwindcss.com/docs/max-width
1181
- */
1182
- "max-w": [{
1183
- "max-w": [
1184
- d,
1185
- "screen",
1186
- "none",
1187
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1188
- "prose",
1189
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1190
- {
1191
- screen: [a]
1192
- },
1193
- ..._()
1194
- ]
1195
- }],
1196
- /**
1197
- * Height
1198
- * @see https://tailwindcss.com/docs/height
1199
- */
1200
- h: [{
1201
- h: ["screen", "lh", ..._()]
1202
- }],
1203
- /**
1204
- * Min-Height
1205
- * @see https://tailwindcss.com/docs/min-height
1206
- */
1207
- "min-h": [{
1208
- "min-h": ["screen", "lh", "none", ..._()]
1209
- }],
1210
- /**
1211
- * Max-Height
1212
- * @see https://tailwindcss.com/docs/max-height
1213
- */
1214
- "max-h": [{
1215
- "max-h": ["screen", "lh", ..._()]
1216
- }],
1217
- // ------------------
1218
- // --- Typography ---
1219
- // ------------------
1220
- /**
1221
- * Font Size
1222
- * @see https://tailwindcss.com/docs/font-size
1223
- */
1224
- "font-size": [{
1225
- text: ["base", t, Y, B]
1226
- }],
1227
- /**
1228
- * Font Smoothing
1229
- * @see https://tailwindcss.com/docs/font-smoothing
1230
- */
1231
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1232
- /**
1233
- * Font Style
1234
- * @see https://tailwindcss.com/docs/font-style
1235
- */
1236
- "font-style": ["italic", "not-italic"],
1237
- /**
1238
- * Font Weight
1239
- * @see https://tailwindcss.com/docs/font-weight
1240
- */
1241
- "font-weight": [{
1242
- font: [r, Jt, Ut]
1243
- }],
1244
- /**
1245
- * Font Stretch
1246
- * @see https://tailwindcss.com/docs/font-stretch
1247
- */
1248
- "font-stretch": [{
1249
- "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", ce, l]
1250
- }],
1251
- /**
1252
- * Font Family
1253
- * @see https://tailwindcss.com/docs/font-family
1254
- */
1255
- "font-family": [{
1256
- font: [Kt, Ht, o]
1257
- }],
1258
- /**
1259
- * Font Variant Numeric
1260
- * @see https://tailwindcss.com/docs/font-variant-numeric
1261
- */
1262
- "fvn-normal": ["normal-nums"],
1263
- /**
1264
- * Font Variant Numeric
1265
- * @see https://tailwindcss.com/docs/font-variant-numeric
1266
- */
1267
- "fvn-ordinal": ["ordinal"],
1268
- /**
1269
- * Font Variant Numeric
1270
- * @see https://tailwindcss.com/docs/font-variant-numeric
1271
- */
1272
- "fvn-slashed-zero": ["slashed-zero"],
1273
- /**
1274
- * Font Variant Numeric
1275
- * @see https://tailwindcss.com/docs/font-variant-numeric
1276
- */
1277
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1278
- /**
1279
- * Font Variant Numeric
1280
- * @see https://tailwindcss.com/docs/font-variant-numeric
1281
- */
1282
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1283
- /**
1284
- * Font Variant Numeric
1285
- * @see https://tailwindcss.com/docs/font-variant-numeric
1286
- */
1287
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1288
- /**
1289
- * Letter Spacing
1290
- * @see https://tailwindcss.com/docs/letter-spacing
1291
- */
1292
- tracking: [{
1293
- tracking: [n, c, l]
1294
- }],
1295
- /**
1296
- * Line Clamp
1297
- * @see https://tailwindcss.com/docs/line-clamp
1298
- */
1299
- "line-clamp": [{
1300
- "line-clamp": [h, "none", c, Pe]
1301
- }],
1302
- /**
1303
- * Line Height
1304
- * @see https://tailwindcss.com/docs/line-height
1305
- */
1306
- leading: [{
1307
- leading: [
1308
- /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1309
- s,
1310
- ...b()
1311
- ]
1312
- }],
1313
- /**
1314
- * List Style Image
1315
- * @see https://tailwindcss.com/docs/list-style-image
1316
- */
1317
- "list-image": [{
1318
- "list-image": ["none", c, l]
1319
- }],
1320
- /**
1321
- * List Style Position
1322
- * @see https://tailwindcss.com/docs/list-style-position
1323
- */
1324
- "list-style-position": [{
1325
- list: ["inside", "outside"]
1326
- }],
1327
- /**
1328
- * List Style Type
1329
- * @see https://tailwindcss.com/docs/list-style-type
1330
- */
1331
- "list-style-type": [{
1332
- list: ["disc", "decimal", "none", c, l]
1333
- }],
1334
- /**
1335
- * Text Alignment
1336
- * @see https://tailwindcss.com/docs/text-align
1337
- */
1338
- "text-alignment": [{
1339
- text: ["left", "center", "right", "justify", "start", "end"]
1340
- }],
1341
- /**
1342
- * Placeholder Color
1343
- * @deprecated since Tailwind CSS v3.0.0
1344
- * @see https://v3.tailwindcss.com/docs/placeholder-color
1345
- */
1346
- "placeholder-color": [{
1347
- placeholder: m()
1348
- }],
1349
- /**
1350
- * Text Color
1351
- * @see https://tailwindcss.com/docs/text-color
1352
- */
1353
- "text-color": [{
1354
- text: m()
1355
- }],
1356
- /**
1357
- * Text Decoration
1358
- * @see https://tailwindcss.com/docs/text-decoration
1359
- */
1360
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1361
- /**
1362
- * Text Decoration Style
1363
- * @see https://tailwindcss.com/docs/text-decoration-style
1364
- */
1365
- "text-decoration-style": [{
1366
- decoration: [...Z(), "wavy"]
1367
- }],
1368
- /**
1369
- * Text Decoration Thickness
1370
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1371
- */
1372
- "text-decoration-thickness": [{
1373
- decoration: [h, "from-font", "auto", c, B]
1374
- }],
1375
- /**
1376
- * Text Decoration Color
1377
- * @see https://tailwindcss.com/docs/text-decoration-color
1378
- */
1379
- "text-decoration-color": [{
1380
- decoration: m()
1381
- }],
1382
- /**
1383
- * Text Underline Offset
1384
- * @see https://tailwindcss.com/docs/text-underline-offset
1385
- */
1386
- "underline-offset": [{
1387
- "underline-offset": [h, "auto", c, l]
1388
- }],
1389
- /**
1390
- * Text Transform
1391
- * @see https://tailwindcss.com/docs/text-transform
1392
- */
1393
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1394
- /**
1395
- * Text Overflow
1396
- * @see https://tailwindcss.com/docs/text-overflow
1397
- */
1398
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1399
- /**
1400
- * Text Wrap
1401
- * @see https://tailwindcss.com/docs/text-wrap
1402
- */
1403
- "text-wrap": [{
1404
- text: ["wrap", "nowrap", "balance", "pretty"]
1405
- }],
1406
- /**
1407
- * Text Indent
1408
- * @see https://tailwindcss.com/docs/text-indent
1409
- */
1410
- indent: [{
1411
- indent: b()
1412
- }],
1413
- /**
1414
- * Vertical Alignment
1415
- * @see https://tailwindcss.com/docs/vertical-align
1416
- */
1417
- "vertical-align": [{
1418
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", c, l]
1419
- }],
1420
- /**
1421
- * Whitespace
1422
- * @see https://tailwindcss.com/docs/whitespace
1423
- */
1424
- whitespace: [{
1425
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1426
- }],
1427
- /**
1428
- * Word Break
1429
- * @see https://tailwindcss.com/docs/word-break
1430
- */
1431
- break: [{
1432
- break: ["normal", "words", "all", "keep"]
1433
- }],
1434
- /**
1435
- * Overflow Wrap
1436
- * @see https://tailwindcss.com/docs/overflow-wrap
1437
- */
1438
- wrap: [{
1439
- wrap: ["break-word", "anywhere", "normal"]
1440
- }],
1441
- /**
1442
- * Hyphens
1443
- * @see https://tailwindcss.com/docs/hyphens
1444
- */
1445
- hyphens: [{
1446
- hyphens: ["none", "manual", "auto"]
1447
- }],
1448
- /**
1449
- * Content
1450
- * @see https://tailwindcss.com/docs/content
1451
- */
1452
- content: [{
1453
- content: ["none", c, l]
1454
- }],
1455
- // -------------------
1456
- // --- Backgrounds ---
1457
- // -------------------
1458
- /**
1459
- * Background Attachment
1460
- * @see https://tailwindcss.com/docs/background-attachment
1461
- */
1462
- "bg-attachment": [{
1463
- bg: ["fixed", "local", "scroll"]
1464
- }],
1465
- /**
1466
- * Background Clip
1467
- * @see https://tailwindcss.com/docs/background-clip
1468
- */
1469
- "bg-clip": [{
1470
- "bg-clip": ["border", "padding", "content", "text"]
1471
- }],
1472
- /**
1473
- * Background Origin
1474
- * @see https://tailwindcss.com/docs/background-origin
1475
- */
1476
- "bg-origin": [{
1477
- "bg-origin": ["border", "padding", "content"]
1478
- }],
1479
- /**
1480
- * Background Position
1481
- * @see https://tailwindcss.com/docs/background-position
1482
- */
1483
- "bg-position": [{
1484
- bg: xe()
1485
- }],
1486
- /**
1487
- * Background Repeat
1488
- * @see https://tailwindcss.com/docs/background-repeat
1489
- */
1490
- "bg-repeat": [{
1491
- bg: ye()
1492
- }],
1493
- /**
1494
- * Background Size
1495
- * @see https://tailwindcss.com/docs/background-size
1496
- */
1497
- "bg-size": [{
1498
- bg: we()
1499
- }],
1500
- /**
1501
- * Background Image
1502
- * @see https://tailwindcss.com/docs/background-image
1503
- */
1504
- "bg-image": [{
1505
- bg: ["none", {
1506
- linear: [{
1507
- to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1508
- }, G, c, l],
1509
- radial: ["", c, l],
1510
- conic: [G, c, l]
1511
- }, Xt, Qt]
1512
- }],
1513
- /**
1514
- * Background Color
1515
- * @see https://tailwindcss.com/docs/background-color
1516
- */
1517
- "bg-color": [{
1518
- bg: m()
1519
- }],
1520
- /**
1521
- * Gradient Color Stops From Position
1522
- * @see https://tailwindcss.com/docs/gradient-color-stops
1523
- */
1524
- "gradient-from-pos": [{
1525
- from: ie()
1526
- }],
1527
- /**
1528
- * Gradient Color Stops Via Position
1529
- * @see https://tailwindcss.com/docs/gradient-color-stops
1530
- */
1531
- "gradient-via-pos": [{
1532
- via: ie()
1533
- }],
1534
- /**
1535
- * Gradient Color Stops To Position
1536
- * @see https://tailwindcss.com/docs/gradient-color-stops
1537
- */
1538
- "gradient-to-pos": [{
1539
- to: ie()
1540
- }],
1541
- /**
1542
- * Gradient Color Stops From
1543
- * @see https://tailwindcss.com/docs/gradient-color-stops
1544
- */
1545
- "gradient-from": [{
1546
- from: m()
1547
- }],
1548
- /**
1549
- * Gradient Color Stops Via
1550
- * @see https://tailwindcss.com/docs/gradient-color-stops
1551
- */
1552
- "gradient-via": [{
1553
- via: m()
1554
- }],
1555
- /**
1556
- * Gradient Color Stops To
1557
- * @see https://tailwindcss.com/docs/gradient-color-stops
1558
- */
1559
- "gradient-to": [{
1560
- to: m()
1561
- }],
1562
- // ---------------
1563
- // --- Borders ---
1564
- // ---------------
1565
- /**
1566
- * Border Radius
1567
- * @see https://tailwindcss.com/docs/border-radius
1568
- */
1569
- rounded: [{
1570
- rounded: R()
1571
- }],
1572
- /**
1573
- * Border Radius Start
1574
- * @see https://tailwindcss.com/docs/border-radius
1575
- */
1576
- "rounded-s": [{
1577
- "rounded-s": R()
1578
- }],
1579
- /**
1580
- * Border Radius End
1581
- * @see https://tailwindcss.com/docs/border-radius
1582
- */
1583
- "rounded-e": [{
1584
- "rounded-e": R()
1585
- }],
1586
- /**
1587
- * Border Radius Top
1588
- * @see https://tailwindcss.com/docs/border-radius
1589
- */
1590
- "rounded-t": [{
1591
- "rounded-t": R()
1592
- }],
1593
- /**
1594
- * Border Radius Right
1595
- * @see https://tailwindcss.com/docs/border-radius
1596
- */
1597
- "rounded-r": [{
1598
- "rounded-r": R()
1599
- }],
1600
- /**
1601
- * Border Radius Bottom
1602
- * @see https://tailwindcss.com/docs/border-radius
1603
- */
1604
- "rounded-b": [{
1605
- "rounded-b": R()
1606
- }],
1607
- /**
1608
- * Border Radius Left
1609
- * @see https://tailwindcss.com/docs/border-radius
1610
- */
1611
- "rounded-l": [{
1612
- "rounded-l": R()
1613
- }],
1614
- /**
1615
- * Border Radius Start Start
1616
- * @see https://tailwindcss.com/docs/border-radius
1617
- */
1618
- "rounded-ss": [{
1619
- "rounded-ss": R()
1620
- }],
1621
- /**
1622
- * Border Radius Start End
1623
- * @see https://tailwindcss.com/docs/border-radius
1624
- */
1625
- "rounded-se": [{
1626
- "rounded-se": R()
1627
- }],
1628
- /**
1629
- * Border Radius End End
1630
- * @see https://tailwindcss.com/docs/border-radius
1631
- */
1632
- "rounded-ee": [{
1633
- "rounded-ee": R()
1634
- }],
1635
- /**
1636
- * Border Radius End Start
1637
- * @see https://tailwindcss.com/docs/border-radius
1638
- */
1639
- "rounded-es": [{
1640
- "rounded-es": R()
1641
- }],
1642
- /**
1643
- * Border Radius Top Left
1644
- * @see https://tailwindcss.com/docs/border-radius
1645
- */
1646
- "rounded-tl": [{
1647
- "rounded-tl": R()
1648
- }],
1649
- /**
1650
- * Border Radius Top Right
1651
- * @see https://tailwindcss.com/docs/border-radius
1652
- */
1653
- "rounded-tr": [{
1654
- "rounded-tr": R()
1655
- }],
1656
- /**
1657
- * Border Radius Bottom Right
1658
- * @see https://tailwindcss.com/docs/border-radius
1659
- */
1660
- "rounded-br": [{
1661
- "rounded-br": R()
1662
- }],
1663
- /**
1664
- * Border Radius Bottom Left
1665
- * @see https://tailwindcss.com/docs/border-radius
1666
- */
1667
- "rounded-bl": [{
1668
- "rounded-bl": R()
1669
- }],
1670
- /**
1671
- * Border Width
1672
- * @see https://tailwindcss.com/docs/border-width
1673
- */
1674
- "border-w": [{
1675
- border: T()
1676
- }],
1677
- /**
1678
- * Border Width X
1679
- * @see https://tailwindcss.com/docs/border-width
1680
- */
1681
- "border-w-x": [{
1682
- "border-x": T()
1683
- }],
1684
- /**
1685
- * Border Width Y
1686
- * @see https://tailwindcss.com/docs/border-width
1687
- */
1688
- "border-w-y": [{
1689
- "border-y": T()
1690
- }],
1691
- /**
1692
- * Border Width Start
1693
- * @see https://tailwindcss.com/docs/border-width
1694
- */
1695
- "border-w-s": [{
1696
- "border-s": T()
1697
- }],
1698
- /**
1699
- * Border Width End
1700
- * @see https://tailwindcss.com/docs/border-width
1701
- */
1702
- "border-w-e": [{
1703
- "border-e": T()
1704
- }],
1705
- /**
1706
- * Border Width Top
1707
- * @see https://tailwindcss.com/docs/border-width
1708
- */
1709
- "border-w-t": [{
1710
- "border-t": T()
1711
- }],
1712
- /**
1713
- * Border Width Right
1714
- * @see https://tailwindcss.com/docs/border-width
1715
- */
1716
- "border-w-r": [{
1717
- "border-r": T()
1718
- }],
1719
- /**
1720
- * Border Width Bottom
1721
- * @see https://tailwindcss.com/docs/border-width
1722
- */
1723
- "border-w-b": [{
1724
- "border-b": T()
1725
- }],
1726
- /**
1727
- * Border Width Left
1728
- * @see https://tailwindcss.com/docs/border-width
1729
- */
1730
- "border-w-l": [{
1731
- "border-l": T()
1732
- }],
1733
- /**
1734
- * Divide Width X
1735
- * @see https://tailwindcss.com/docs/border-width#between-children
1736
- */
1737
- "divide-x": [{
1738
- "divide-x": T()
1739
- }],
1740
- /**
1741
- * Divide Width X Reverse
1742
- * @see https://tailwindcss.com/docs/border-width#between-children
1743
- */
1744
- "divide-x-reverse": ["divide-x-reverse"],
1745
- /**
1746
- * Divide Width Y
1747
- * @see https://tailwindcss.com/docs/border-width#between-children
1748
- */
1749
- "divide-y": [{
1750
- "divide-y": T()
1751
- }],
1752
- /**
1753
- * Divide Width Y Reverse
1754
- * @see https://tailwindcss.com/docs/border-width#between-children
1755
- */
1756
- "divide-y-reverse": ["divide-y-reverse"],
1757
- /**
1758
- * Border Style
1759
- * @see https://tailwindcss.com/docs/border-style
1760
- */
1761
- "border-style": [{
1762
- border: [...Z(), "hidden", "none"]
1763
- }],
1764
- /**
1765
- * Divide Style
1766
- * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1767
- */
1768
- "divide-style": [{
1769
- divide: [...Z(), "hidden", "none"]
1770
- }],
1771
- /**
1772
- * Border Color
1773
- * @see https://tailwindcss.com/docs/border-color
1774
- */
1775
- "border-color": [{
1776
- border: m()
1777
- }],
1778
- /**
1779
- * Border Color X
1780
- * @see https://tailwindcss.com/docs/border-color
1781
- */
1782
- "border-color-x": [{
1783
- "border-x": m()
1784
- }],
1785
- /**
1786
- * Border Color Y
1787
- * @see https://tailwindcss.com/docs/border-color
1788
- */
1789
- "border-color-y": [{
1790
- "border-y": m()
1791
- }],
1792
- /**
1793
- * Border Color S
1794
- * @see https://tailwindcss.com/docs/border-color
1795
- */
1796
- "border-color-s": [{
1797
- "border-s": m()
1798
- }],
1799
- /**
1800
- * Border Color E
1801
- * @see https://tailwindcss.com/docs/border-color
1802
- */
1803
- "border-color-e": [{
1804
- "border-e": m()
1805
- }],
1806
- /**
1807
- * Border Color Top
1808
- * @see https://tailwindcss.com/docs/border-color
1809
- */
1810
- "border-color-t": [{
1811
- "border-t": m()
1812
- }],
1813
- /**
1814
- * Border Color Right
1815
- * @see https://tailwindcss.com/docs/border-color
1816
- */
1817
- "border-color-r": [{
1818
- "border-r": m()
1819
- }],
1820
- /**
1821
- * Border Color Bottom
1822
- * @see https://tailwindcss.com/docs/border-color
1823
- */
1824
- "border-color-b": [{
1825
- "border-b": m()
1826
- }],
1827
- /**
1828
- * Border Color Left
1829
- * @see https://tailwindcss.com/docs/border-color
1830
- */
1831
- "border-color-l": [{
1832
- "border-l": m()
1833
- }],
1834
- /**
1835
- * Divide Color
1836
- * @see https://tailwindcss.com/docs/divide-color
1837
- */
1838
- "divide-color": [{
1839
- divide: m()
1840
- }],
1841
- /**
1842
- * Outline Style
1843
- * @see https://tailwindcss.com/docs/outline-style
1844
- */
1845
- "outline-style": [{
1846
- outline: [...Z(), "none", "hidden"]
1847
- }],
1848
- /**
1849
- * Outline Offset
1850
- * @see https://tailwindcss.com/docs/outline-offset
1851
- */
1852
- "outline-offset": [{
1853
- "outline-offset": [h, c, l]
1854
- }],
1855
- /**
1856
- * Outline Width
1857
- * @see https://tailwindcss.com/docs/outline-width
1858
- */
1859
- "outline-w": [{
1860
- outline: ["", h, Y, B]
1861
- }],
1862
- /**
1863
- * Outline Color
1864
- * @see https://tailwindcss.com/docs/outline-color
1865
- */
1866
- "outline-color": [{
1867
- outline: m()
1868
- }],
1869
- // ---------------
1870
- // --- Effects ---
1871
- // ---------------
1872
- /**
1873
- * Box Shadow
1874
- * @see https://tailwindcss.com/docs/box-shadow
1875
- */
1876
- shadow: [{
1877
- shadow: [
1878
- // Deprecated since Tailwind CSS v4.0.0
1879
- "",
1880
- "none",
1881
- g,
1882
- ne,
1883
- oe
1884
- ]
1885
- }],
1886
- /**
1887
- * Box Shadow Color
1888
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
1889
- */
1890
- "shadow-color": [{
1891
- shadow: m()
1892
- }],
1893
- /**
1894
- * Inset Box Shadow
1895
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1896
- */
1897
- "inset-shadow": [{
1898
- "inset-shadow": ["none", x, ne, oe]
1899
- }],
1900
- /**
1901
- * Inset Box Shadow Color
1902
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
1903
- */
1904
- "inset-shadow-color": [{
1905
- "inset-shadow": m()
1906
- }],
1907
- /**
1908
- * Ring Width
1909
- * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
1910
- */
1911
- "ring-w": [{
1912
- ring: T()
1913
- }],
1914
- /**
1915
- * Ring Width Inset
1916
- * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
1917
- * @deprecated since Tailwind CSS v4.0.0
1918
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1919
- */
1920
- "ring-w-inset": ["ring-inset"],
1921
- /**
1922
- * Ring Color
1923
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
1924
- */
1925
- "ring-color": [{
1926
- ring: m()
1927
- }],
1928
- /**
1929
- * Ring Offset Width
1930
- * @see https://v3.tailwindcss.com/docs/ring-offset-width
1931
- * @deprecated since Tailwind CSS v4.0.0
1932
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1933
- */
1934
- "ring-offset-w": [{
1935
- "ring-offset": [h, B]
1936
- }],
1937
- /**
1938
- * Ring Offset Color
1939
- * @see https://v3.tailwindcss.com/docs/ring-offset-color
1940
- * @deprecated since Tailwind CSS v4.0.0
1941
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1942
- */
1943
- "ring-offset-color": [{
1944
- "ring-offset": m()
1945
- }],
1946
- /**
1947
- * Inset Ring Width
1948
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
1949
- */
1950
- "inset-ring-w": [{
1951
- "inset-ring": T()
1952
- }],
1953
- /**
1954
- * Inset Ring Color
1955
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
1956
- */
1957
- "inset-ring-color": [{
1958
- "inset-ring": m()
1959
- }],
1960
- /**
1961
- * Text Shadow
1962
- * @see https://tailwindcss.com/docs/text-shadow
1963
- */
1964
- "text-shadow": [{
1965
- "text-shadow": ["none", v, ne, oe]
1966
- }],
1967
- /**
1968
- * Text Shadow Color
1969
- * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
1970
- */
1971
- "text-shadow-color": [{
1972
- "text-shadow": m()
1973
- }],
1974
- /**
1975
- * Opacity
1976
- * @see https://tailwindcss.com/docs/opacity
1977
- */
1978
- opacity: [{
1979
- opacity: [h, c, l]
1980
- }],
1981
- /**
1982
- * Mix Blend Mode
1983
- * @see https://tailwindcss.com/docs/mix-blend-mode
1984
- */
1985
- "mix-blend": [{
1986
- "mix-blend": [...ve(), "plus-darker", "plus-lighter"]
1987
- }],
1988
- /**
1989
- * Background Blend Mode
1990
- * @see https://tailwindcss.com/docs/background-blend-mode
1991
- */
1992
- "bg-blend": [{
1993
- "bg-blend": ve()
1994
- }],
1995
- /**
1996
- * Mask Clip
1997
- * @see https://tailwindcss.com/docs/mask-clip
1998
- */
1999
- "mask-clip": [{
2000
- "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2001
- }, "mask-no-clip"],
2002
- /**
2003
- * Mask Composite
2004
- * @see https://tailwindcss.com/docs/mask-composite
2005
- */
2006
- "mask-composite": [{
2007
- mask: ["add", "subtract", "intersect", "exclude"]
2008
- }],
2009
- /**
2010
- * Mask Image
2011
- * @see https://tailwindcss.com/docs/mask-image
2012
- */
2013
- "mask-image-linear-pos": [{
2014
- "mask-linear": [h]
2015
- }],
2016
- "mask-image-linear-from-pos": [{
2017
- "mask-linear-from": N()
2018
- }],
2019
- "mask-image-linear-to-pos": [{
2020
- "mask-linear-to": N()
2021
- }],
2022
- "mask-image-linear-from-color": [{
2023
- "mask-linear-from": m()
2024
- }],
2025
- "mask-image-linear-to-color": [{
2026
- "mask-linear-to": m()
2027
- }],
2028
- "mask-image-t-from-pos": [{
2029
- "mask-t-from": N()
2030
- }],
2031
- "mask-image-t-to-pos": [{
2032
- "mask-t-to": N()
2033
- }],
2034
- "mask-image-t-from-color": [{
2035
- "mask-t-from": m()
2036
- }],
2037
- "mask-image-t-to-color": [{
2038
- "mask-t-to": m()
2039
- }],
2040
- "mask-image-r-from-pos": [{
2041
- "mask-r-from": N()
2042
- }],
2043
- "mask-image-r-to-pos": [{
2044
- "mask-r-to": N()
2045
- }],
2046
- "mask-image-r-from-color": [{
2047
- "mask-r-from": m()
2048
- }],
2049
- "mask-image-r-to-color": [{
2050
- "mask-r-to": m()
2051
- }],
2052
- "mask-image-b-from-pos": [{
2053
- "mask-b-from": N()
2054
- }],
2055
- "mask-image-b-to-pos": [{
2056
- "mask-b-to": N()
2057
- }],
2058
- "mask-image-b-from-color": [{
2059
- "mask-b-from": m()
2060
- }],
2061
- "mask-image-b-to-color": [{
2062
- "mask-b-to": m()
2063
- }],
2064
- "mask-image-l-from-pos": [{
2065
- "mask-l-from": N()
2066
- }],
2067
- "mask-image-l-to-pos": [{
2068
- "mask-l-to": N()
2069
- }],
2070
- "mask-image-l-from-color": [{
2071
- "mask-l-from": m()
2072
- }],
2073
- "mask-image-l-to-color": [{
2074
- "mask-l-to": m()
2075
- }],
2076
- "mask-image-x-from-pos": [{
2077
- "mask-x-from": N()
2078
- }],
2079
- "mask-image-x-to-pos": [{
2080
- "mask-x-to": N()
2081
- }],
2082
- "mask-image-x-from-color": [{
2083
- "mask-x-from": m()
2084
- }],
2085
- "mask-image-x-to-color": [{
2086
- "mask-x-to": m()
2087
- }],
2088
- "mask-image-y-from-pos": [{
2089
- "mask-y-from": N()
2090
- }],
2091
- "mask-image-y-to-pos": [{
2092
- "mask-y-to": N()
2093
- }],
2094
- "mask-image-y-from-color": [{
2095
- "mask-y-from": m()
2096
- }],
2097
- "mask-image-y-to-color": [{
2098
- "mask-y-to": m()
2099
- }],
2100
- "mask-image-radial": [{
2101
- "mask-radial": [c, l]
2102
- }],
2103
- "mask-image-radial-from-pos": [{
2104
- "mask-radial-from": N()
2105
- }],
2106
- "mask-image-radial-to-pos": [{
2107
- "mask-radial-to": N()
2108
- }],
2109
- "mask-image-radial-from-color": [{
2110
- "mask-radial-from": m()
2111
- }],
2112
- "mask-image-radial-to-color": [{
2113
- "mask-radial-to": m()
2114
- }],
2115
- "mask-image-radial-shape": [{
2116
- "mask-radial": ["circle", "ellipse"]
2117
- }],
2118
- "mask-image-radial-size": [{
2119
- "mask-radial": [{
2120
- closest: ["side", "corner"],
2121
- farthest: ["side", "corner"]
2122
- }]
2123
- }],
2124
- "mask-image-radial-pos": [{
2125
- "mask-radial-at": F()
2126
- }],
2127
- "mask-image-conic-pos": [{
2128
- "mask-conic": [h]
2129
- }],
2130
- "mask-image-conic-from-pos": [{
2131
- "mask-conic-from": N()
2132
- }],
2133
- "mask-image-conic-to-pos": [{
2134
- "mask-conic-to": N()
2135
- }],
2136
- "mask-image-conic-from-color": [{
2137
- "mask-conic-from": m()
2138
- }],
2139
- "mask-image-conic-to-color": [{
2140
- "mask-conic-to": m()
2141
- }],
2142
- /**
2143
- * Mask Mode
2144
- * @see https://tailwindcss.com/docs/mask-mode
2145
- */
2146
- "mask-mode": [{
2147
- mask: ["alpha", "luminance", "match"]
2148
- }],
2149
- /**
2150
- * Mask Origin
2151
- * @see https://tailwindcss.com/docs/mask-origin
2152
- */
2153
- "mask-origin": [{
2154
- "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2155
- }],
2156
- /**
2157
- * Mask Position
2158
- * @see https://tailwindcss.com/docs/mask-position
2159
- */
2160
- "mask-position": [{
2161
- mask: xe()
2162
- }],
2163
- /**
2164
- * Mask Repeat
2165
- * @see https://tailwindcss.com/docs/mask-repeat
2166
- */
2167
- "mask-repeat": [{
2168
- mask: ye()
2169
- }],
2170
- /**
2171
- * Mask Size
2172
- * @see https://tailwindcss.com/docs/mask-size
2173
- */
2174
- "mask-size": [{
2175
- mask: we()
2176
- }],
2177
- /**
2178
- * Mask Type
2179
- * @see https://tailwindcss.com/docs/mask-type
2180
- */
2181
- "mask-type": [{
2182
- "mask-type": ["alpha", "luminance"]
2183
- }],
2184
- /**
2185
- * Mask Image
2186
- * @see https://tailwindcss.com/docs/mask-image
2187
- */
2188
- "mask-image": [{
2189
- mask: ["none", c, l]
2190
- }],
2191
- // ---------------
2192
- // --- Filters ---
2193
- // ---------------
2194
- /**
2195
- * Filter
2196
- * @see https://tailwindcss.com/docs/filter
2197
- */
2198
- filter: [{
2199
- filter: [
2200
- // Deprecated since Tailwind CSS v3.0.0
2201
- "",
2202
- "none",
2203
- c,
2204
- l
2205
- ]
2206
- }],
2207
- /**
2208
- * Blur
2209
- * @see https://tailwindcss.com/docs/blur
2210
- */
2211
- blur: [{
2212
- blur: ke()
2213
- }],
2214
- /**
2215
- * Brightness
2216
- * @see https://tailwindcss.com/docs/brightness
2217
- */
2218
- brightness: [{
2219
- brightness: [h, c, l]
2220
- }],
2221
- /**
2222
- * Contrast
2223
- * @see https://tailwindcss.com/docs/contrast
2224
- */
2225
- contrast: [{
2226
- contrast: [h, c, l]
2227
- }],
2228
- /**
2229
- * Drop Shadow
2230
- * @see https://tailwindcss.com/docs/drop-shadow
2231
- */
2232
- "drop-shadow": [{
2233
- "drop-shadow": [
2234
- // Deprecated since Tailwind CSS v4.0.0
2235
- "",
2236
- "none",
2237
- S,
2238
- ne,
2239
- oe
2240
- ]
2241
- }],
2242
- /**
2243
- * Drop Shadow Color
2244
- * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2245
- */
2246
- "drop-shadow-color": [{
2247
- "drop-shadow": m()
2248
- }],
2249
- /**
2250
- * Grayscale
2251
- * @see https://tailwindcss.com/docs/grayscale
2252
- */
2253
- grayscale: [{
2254
- grayscale: ["", h, c, l]
2255
- }],
2256
- /**
2257
- * Hue Rotate
2258
- * @see https://tailwindcss.com/docs/hue-rotate
2259
- */
2260
- "hue-rotate": [{
2261
- "hue-rotate": [h, c, l]
2262
- }],
2263
- /**
2264
- * Invert
2265
- * @see https://tailwindcss.com/docs/invert
2266
- */
2267
- invert: [{
2268
- invert: ["", h, c, l]
2269
- }],
2270
- /**
2271
- * Saturate
2272
- * @see https://tailwindcss.com/docs/saturate
2273
- */
2274
- saturate: [{
2275
- saturate: [h, c, l]
2276
- }],
2277
- /**
2278
- * Sepia
2279
- * @see https://tailwindcss.com/docs/sepia
2280
- */
2281
- sepia: [{
2282
- sepia: ["", h, c, l]
2283
- }],
2284
- /**
2285
- * Backdrop Filter
2286
- * @see https://tailwindcss.com/docs/backdrop-filter
2287
- */
2288
- "backdrop-filter": [{
2289
- "backdrop-filter": [
2290
- // Deprecated since Tailwind CSS v3.0.0
2291
- "",
2292
- "none",
2293
- c,
2294
- l
2295
- ]
2296
- }],
2297
- /**
2298
- * Backdrop Blur
2299
- * @see https://tailwindcss.com/docs/backdrop-blur
2300
- */
2301
- "backdrop-blur": [{
2302
- "backdrop-blur": ke()
2303
- }],
2304
- /**
2305
- * Backdrop Brightness
2306
- * @see https://tailwindcss.com/docs/backdrop-brightness
2307
- */
2308
- "backdrop-brightness": [{
2309
- "backdrop-brightness": [h, c, l]
2310
- }],
2311
- /**
2312
- * Backdrop Contrast
2313
- * @see https://tailwindcss.com/docs/backdrop-contrast
2314
- */
2315
- "backdrop-contrast": [{
2316
- "backdrop-contrast": [h, c, l]
2317
- }],
2318
- /**
2319
- * Backdrop Grayscale
2320
- * @see https://tailwindcss.com/docs/backdrop-grayscale
2321
- */
2322
- "backdrop-grayscale": [{
2323
- "backdrop-grayscale": ["", h, c, l]
2324
- }],
2325
- /**
2326
- * Backdrop Hue Rotate
2327
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2328
- */
2329
- "backdrop-hue-rotate": [{
2330
- "backdrop-hue-rotate": [h, c, l]
2331
- }],
2332
- /**
2333
- * Backdrop Invert
2334
- * @see https://tailwindcss.com/docs/backdrop-invert
2335
- */
2336
- "backdrop-invert": [{
2337
- "backdrop-invert": ["", h, c, l]
2338
- }],
2339
- /**
2340
- * Backdrop Opacity
2341
- * @see https://tailwindcss.com/docs/backdrop-opacity
2342
- */
2343
- "backdrop-opacity": [{
2344
- "backdrop-opacity": [h, c, l]
2345
- }],
2346
- /**
2347
- * Backdrop Saturate
2348
- * @see https://tailwindcss.com/docs/backdrop-saturate
2349
- */
2350
- "backdrop-saturate": [{
2351
- "backdrop-saturate": [h, c, l]
2352
- }],
2353
- /**
2354
- * Backdrop Sepia
2355
- * @see https://tailwindcss.com/docs/backdrop-sepia
2356
- */
2357
- "backdrop-sepia": [{
2358
- "backdrop-sepia": ["", h, c, l]
2359
- }],
2360
- // --------------
2361
- // --- Tables ---
2362
- // --------------
2363
- /**
2364
- * Border Collapse
2365
- * @see https://tailwindcss.com/docs/border-collapse
2366
- */
2367
- "border-collapse": [{
2368
- border: ["collapse", "separate"]
2369
- }],
2370
- /**
2371
- * Border Spacing
2372
- * @see https://tailwindcss.com/docs/border-spacing
2373
- */
2374
- "border-spacing": [{
2375
- "border-spacing": b()
2376
- }],
2377
- /**
2378
- * Border Spacing X
2379
- * @see https://tailwindcss.com/docs/border-spacing
2380
- */
2381
- "border-spacing-x": [{
2382
- "border-spacing-x": b()
2383
- }],
2384
- /**
2385
- * Border Spacing Y
2386
- * @see https://tailwindcss.com/docs/border-spacing
2387
- */
2388
- "border-spacing-y": [{
2389
- "border-spacing-y": b()
2390
- }],
2391
- /**
2392
- * Table Layout
2393
- * @see https://tailwindcss.com/docs/table-layout
2394
- */
2395
- "table-layout": [{
2396
- table: ["auto", "fixed"]
2397
- }],
2398
- /**
2399
- * Caption Side
2400
- * @see https://tailwindcss.com/docs/caption-side
2401
- */
2402
- caption: [{
2403
- caption: ["top", "bottom"]
2404
- }],
2405
- // ---------------------------------
2406
- // --- Transitions and Animation ---
2407
- // ---------------------------------
2408
- /**
2409
- * Transition Property
2410
- * @see https://tailwindcss.com/docs/transition-property
2411
- */
2412
- transition: [{
2413
- transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", c, l]
2414
- }],
2415
- /**
2416
- * Transition Behavior
2417
- * @see https://tailwindcss.com/docs/transition-behavior
2418
- */
2419
- "transition-behavior": [{
2420
- transition: ["normal", "discrete"]
2421
- }],
2422
- /**
2423
- * Transition Duration
2424
- * @see https://tailwindcss.com/docs/transition-duration
2425
- */
2426
- duration: [{
2427
- duration: [h, "initial", c, l]
2428
- }],
2429
- /**
2430
- * Transition Timing Function
2431
- * @see https://tailwindcss.com/docs/transition-timing-function
2432
- */
2433
- ease: [{
2434
- ease: ["linear", "initial", w, c, l]
2435
- }],
2436
- /**
2437
- * Transition Delay
2438
- * @see https://tailwindcss.com/docs/transition-delay
2439
- */
2440
- delay: [{
2441
- delay: [h, c, l]
2442
- }],
2443
- /**
2444
- * Animation
2445
- * @see https://tailwindcss.com/docs/animation
2446
- */
2447
- animate: [{
2448
- animate: ["none", V, c, l]
2449
- }],
2450
- // ------------------
2451
- // --- Transforms ---
2452
- // ------------------
2453
- /**
2454
- * Backface Visibility
2455
- * @see https://tailwindcss.com/docs/backface-visibility
2456
- */
2457
- backface: [{
2458
- backface: ["hidden", "visible"]
2459
- }],
2460
- /**
2461
- * Perspective
2462
- * @see https://tailwindcss.com/docs/perspective
2463
- */
2464
- perspective: [{
2465
- perspective: [p, c, l]
2466
- }],
2467
- /**
2468
- * Perspective Origin
2469
- * @see https://tailwindcss.com/docs/perspective-origin
2470
- */
2471
- "perspective-origin": [{
2472
- "perspective-origin": U()
2473
- }],
2474
- /**
2475
- * Rotate
2476
- * @see https://tailwindcss.com/docs/rotate
2477
- */
2478
- rotate: [{
2479
- rotate: q()
2480
- }],
2481
- /**
2482
- * Rotate X
2483
- * @see https://tailwindcss.com/docs/rotate
2484
- */
2485
- "rotate-x": [{
2486
- "rotate-x": q()
2487
- }],
2488
- /**
2489
- * Rotate Y
2490
- * @see https://tailwindcss.com/docs/rotate
2491
- */
2492
- "rotate-y": [{
2493
- "rotate-y": q()
2494
- }],
2495
- /**
2496
- * Rotate Z
2497
- * @see https://tailwindcss.com/docs/rotate
2498
- */
2499
- "rotate-z": [{
2500
- "rotate-z": q()
2501
- }],
2502
- /**
2503
- * Scale
2504
- * @see https://tailwindcss.com/docs/scale
2505
- */
2506
- scale: [{
2507
- scale: ee()
2508
- }],
2509
- /**
2510
- * Scale X
2511
- * @see https://tailwindcss.com/docs/scale
2512
- */
2513
- "scale-x": [{
2514
- "scale-x": ee()
2515
- }],
2516
- /**
2517
- * Scale Y
2518
- * @see https://tailwindcss.com/docs/scale
2519
- */
2520
- "scale-y": [{
2521
- "scale-y": ee()
2522
- }],
2523
- /**
2524
- * Scale Z
2525
- * @see https://tailwindcss.com/docs/scale
2526
- */
2527
- "scale-z": [{
2528
- "scale-z": ee()
2529
- }],
2530
- /**
2531
- * Scale 3D
2532
- * @see https://tailwindcss.com/docs/scale
2533
- */
2534
- "scale-3d": ["scale-3d"],
2535
- /**
2536
- * Skew
2537
- * @see https://tailwindcss.com/docs/skew
2538
- */
2539
- skew: [{
2540
- skew: le()
2541
- }],
2542
- /**
2543
- * Skew X
2544
- * @see https://tailwindcss.com/docs/skew
2545
- */
2546
- "skew-x": [{
2547
- "skew-x": le()
2548
- }],
2549
- /**
2550
- * Skew Y
2551
- * @see https://tailwindcss.com/docs/skew
2552
- */
2553
- "skew-y": [{
2554
- "skew-y": le()
2555
- }],
2556
- /**
2557
- * Transform
2558
- * @see https://tailwindcss.com/docs/transform
2559
- */
2560
- transform: [{
2561
- transform: [c, l, "", "none", "gpu", "cpu"]
2562
- }],
2563
- /**
2564
- * Transform Origin
2565
- * @see https://tailwindcss.com/docs/transform-origin
2566
- */
2567
- "transform-origin": [{
2568
- origin: U()
2569
- }],
2570
- /**
2571
- * Transform Style
2572
- * @see https://tailwindcss.com/docs/transform-style
2573
- */
2574
- "transform-style": [{
2575
- transform: ["3d", "flat"]
2576
- }],
2577
- /**
2578
- * Translate
2579
- * @see https://tailwindcss.com/docs/translate
2580
- */
2581
- translate: [{
2582
- translate: te()
2583
- }],
2584
- /**
2585
- * Translate X
2586
- * @see https://tailwindcss.com/docs/translate
2587
- */
2588
- "translate-x": [{
2589
- "translate-x": te()
2590
- }],
2591
- /**
2592
- * Translate Y
2593
- * @see https://tailwindcss.com/docs/translate
2594
- */
2595
- "translate-y": [{
2596
- "translate-y": te()
2597
- }],
2598
- /**
2599
- * Translate Z
2600
- * @see https://tailwindcss.com/docs/translate
2601
- */
2602
- "translate-z": [{
2603
- "translate-z": te()
2604
- }],
2605
- /**
2606
- * Translate None
2607
- * @see https://tailwindcss.com/docs/translate
2608
- */
2609
- "translate-none": ["translate-none"],
2610
- // ---------------------
2611
- // --- Interactivity ---
2612
- // ---------------------
2613
- /**
2614
- * Accent Color
2615
- * @see https://tailwindcss.com/docs/accent-color
2616
- */
2617
- accent: [{
2618
- accent: m()
2619
- }],
2620
- /**
2621
- * Appearance
2622
- * @see https://tailwindcss.com/docs/appearance
2623
- */
2624
- appearance: [{
2625
- appearance: ["none", "auto"]
2626
- }],
2627
- /**
2628
- * Caret Color
2629
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2630
- */
2631
- "caret-color": [{
2632
- caret: m()
2633
- }],
2634
- /**
2635
- * Color Scheme
2636
- * @see https://tailwindcss.com/docs/color-scheme
2637
- */
2638
- "color-scheme": [{
2639
- scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2640
- }],
2641
- /**
2642
- * Cursor
2643
- * @see https://tailwindcss.com/docs/cursor
2644
- */
2645
- cursor: [{
2646
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", c, l]
2647
- }],
2648
- /**
2649
- * Field Sizing
2650
- * @see https://tailwindcss.com/docs/field-sizing
2651
- */
2652
- "field-sizing": [{
2653
- "field-sizing": ["fixed", "content"]
2654
- }],
2655
- /**
2656
- * Pointer Events
2657
- * @see https://tailwindcss.com/docs/pointer-events
2658
- */
2659
- "pointer-events": [{
2660
- "pointer-events": ["auto", "none"]
2661
- }],
2662
- /**
2663
- * Resize
2664
- * @see https://tailwindcss.com/docs/resize
2665
- */
2666
- resize: [{
2667
- resize: ["none", "", "y", "x"]
2668
- }],
2669
- /**
2670
- * Scroll Behavior
2671
- * @see https://tailwindcss.com/docs/scroll-behavior
2672
- */
2673
- "scroll-behavior": [{
2674
- scroll: ["auto", "smooth"]
2675
- }],
2676
- /**
2677
- * Scroll Margin
2678
- * @see https://tailwindcss.com/docs/scroll-margin
2679
- */
2680
- "scroll-m": [{
2681
- "scroll-m": b()
2682
- }],
2683
- /**
2684
- * Scroll Margin X
2685
- * @see https://tailwindcss.com/docs/scroll-margin
2686
- */
2687
- "scroll-mx": [{
2688
- "scroll-mx": b()
2689
- }],
2690
- /**
2691
- * Scroll Margin Y
2692
- * @see https://tailwindcss.com/docs/scroll-margin
2693
- */
2694
- "scroll-my": [{
2695
- "scroll-my": b()
2696
- }],
2697
- /**
2698
- * Scroll Margin Start
2699
- * @see https://tailwindcss.com/docs/scroll-margin
2700
- */
2701
- "scroll-ms": [{
2702
- "scroll-ms": b()
2703
- }],
2704
- /**
2705
- * Scroll Margin End
2706
- * @see https://tailwindcss.com/docs/scroll-margin
2707
- */
2708
- "scroll-me": [{
2709
- "scroll-me": b()
2710
- }],
2711
- /**
2712
- * Scroll Margin Top
2713
- * @see https://tailwindcss.com/docs/scroll-margin
2714
- */
2715
- "scroll-mt": [{
2716
- "scroll-mt": b()
2717
- }],
2718
- /**
2719
- * Scroll Margin Right
2720
- * @see https://tailwindcss.com/docs/scroll-margin
2721
- */
2722
- "scroll-mr": [{
2723
- "scroll-mr": b()
2724
- }],
2725
- /**
2726
- * Scroll Margin Bottom
2727
- * @see https://tailwindcss.com/docs/scroll-margin
2728
- */
2729
- "scroll-mb": [{
2730
- "scroll-mb": b()
2731
- }],
2732
- /**
2733
- * Scroll Margin Left
2734
- * @see https://tailwindcss.com/docs/scroll-margin
2735
- */
2736
- "scroll-ml": [{
2737
- "scroll-ml": b()
2738
- }],
2739
- /**
2740
- * Scroll Padding
2741
- * @see https://tailwindcss.com/docs/scroll-padding
2742
- */
2743
- "scroll-p": [{
2744
- "scroll-p": b()
2745
- }],
2746
- /**
2747
- * Scroll Padding X
2748
- * @see https://tailwindcss.com/docs/scroll-padding
2749
- */
2750
- "scroll-px": [{
2751
- "scroll-px": b()
2752
- }],
2753
- /**
2754
- * Scroll Padding Y
2755
- * @see https://tailwindcss.com/docs/scroll-padding
2756
- */
2757
- "scroll-py": [{
2758
- "scroll-py": b()
2759
- }],
2760
- /**
2761
- * Scroll Padding Start
2762
- * @see https://tailwindcss.com/docs/scroll-padding
2763
- */
2764
- "scroll-ps": [{
2765
- "scroll-ps": b()
2766
- }],
2767
- /**
2768
- * Scroll Padding End
2769
- * @see https://tailwindcss.com/docs/scroll-padding
2770
- */
2771
- "scroll-pe": [{
2772
- "scroll-pe": b()
2773
- }],
2774
- /**
2775
- * Scroll Padding Top
2776
- * @see https://tailwindcss.com/docs/scroll-padding
2777
- */
2778
- "scroll-pt": [{
2779
- "scroll-pt": b()
2780
- }],
2781
- /**
2782
- * Scroll Padding Right
2783
- * @see https://tailwindcss.com/docs/scroll-padding
2784
- */
2785
- "scroll-pr": [{
2786
- "scroll-pr": b()
2787
- }],
2788
- /**
2789
- * Scroll Padding Bottom
2790
- * @see https://tailwindcss.com/docs/scroll-padding
2791
- */
2792
- "scroll-pb": [{
2793
- "scroll-pb": b()
2794
- }],
2795
- /**
2796
- * Scroll Padding Left
2797
- * @see https://tailwindcss.com/docs/scroll-padding
2798
- */
2799
- "scroll-pl": [{
2800
- "scroll-pl": b()
2801
- }],
2802
- /**
2803
- * Scroll Snap Align
2804
- * @see https://tailwindcss.com/docs/scroll-snap-align
2805
- */
2806
- "snap-align": [{
2807
- snap: ["start", "end", "center", "align-none"]
2808
- }],
2809
- /**
2810
- * Scroll Snap Stop
2811
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2812
- */
2813
- "snap-stop": [{
2814
- snap: ["normal", "always"]
2815
- }],
2816
- /**
2817
- * Scroll Snap Type
2818
- * @see https://tailwindcss.com/docs/scroll-snap-type
2819
- */
2820
- "snap-type": [{
2821
- snap: ["none", "x", "y", "both"]
2822
- }],
2823
- /**
2824
- * Scroll Snap Type Strictness
2825
- * @see https://tailwindcss.com/docs/scroll-snap-type
2826
- */
2827
- "snap-strictness": [{
2828
- snap: ["mandatory", "proximity"]
2829
- }],
2830
- /**
2831
- * Touch Action
2832
- * @see https://tailwindcss.com/docs/touch-action
2833
- */
2834
- touch: [{
2835
- touch: ["auto", "none", "manipulation"]
2836
- }],
2837
- /**
2838
- * Touch Action X
2839
- * @see https://tailwindcss.com/docs/touch-action
2840
- */
2841
- "touch-x": [{
2842
- "touch-pan": ["x", "left", "right"]
2843
- }],
2844
- /**
2845
- * Touch Action Y
2846
- * @see https://tailwindcss.com/docs/touch-action
2847
- */
2848
- "touch-y": [{
2849
- "touch-pan": ["y", "up", "down"]
2850
- }],
2851
- /**
2852
- * Touch Action Pinch Zoom
2853
- * @see https://tailwindcss.com/docs/touch-action
2854
- */
2855
- "touch-pz": ["touch-pinch-zoom"],
2856
- /**
2857
- * User Select
2858
- * @see https://tailwindcss.com/docs/user-select
2859
- */
2860
- select: [{
2861
- select: ["none", "text", "all", "auto"]
2862
- }],
2863
- /**
2864
- * Will Change
2865
- * @see https://tailwindcss.com/docs/will-change
2866
- */
2867
- "will-change": [{
2868
- "will-change": ["auto", "scroll", "contents", "transform", c, l]
2869
- }],
2870
- // -----------
2871
- // --- SVG ---
2872
- // -----------
2873
- /**
2874
- * Fill
2875
- * @see https://tailwindcss.com/docs/fill
2876
- */
2877
- fill: [{
2878
- fill: ["none", ...m()]
2879
- }],
2880
- /**
2881
- * Stroke Width
2882
- * @see https://tailwindcss.com/docs/stroke-width
2883
- */
2884
- "stroke-w": [{
2885
- stroke: [h, Y, B, Pe]
2886
- }],
2887
- /**
2888
- * Stroke
2889
- * @see https://tailwindcss.com/docs/stroke
2890
- */
2891
- stroke: [{
2892
- stroke: ["none", ...m()]
2893
- }],
2894
- // ---------------------
2895
- // --- Accessibility ---
2896
- // ---------------------
2897
- /**
2898
- * Forced Color Adjust
2899
- * @see https://tailwindcss.com/docs/forced-color-adjust
2900
- */
2901
- "forced-color-adjust": [{
2902
- "forced-color-adjust": ["auto", "none"]
2903
- }]
2904
- },
2905
- conflictingClassGroups: {
2906
- overflow: ["overflow-x", "overflow-y"],
2907
- overscroll: ["overscroll-x", "overscroll-y"],
2908
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2909
- "inset-x": ["right", "left"],
2910
- "inset-y": ["top", "bottom"],
2911
- flex: ["basis", "grow", "shrink"],
2912
- gap: ["gap-x", "gap-y"],
2913
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2914
- px: ["pr", "pl"],
2915
- py: ["pt", "pb"],
2916
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2917
- mx: ["mr", "ml"],
2918
- my: ["mt", "mb"],
2919
- size: ["w", "h"],
2920
- "font-size": ["leading"],
2921
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2922
- "fvn-ordinal": ["fvn-normal"],
2923
- "fvn-slashed-zero": ["fvn-normal"],
2924
- "fvn-figure": ["fvn-normal"],
2925
- "fvn-spacing": ["fvn-normal"],
2926
- "fvn-fraction": ["fvn-normal"],
2927
- "line-clamp": ["display", "overflow"],
2928
- rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2929
- "rounded-s": ["rounded-ss", "rounded-es"],
2930
- "rounded-e": ["rounded-se", "rounded-ee"],
2931
- "rounded-t": ["rounded-tl", "rounded-tr"],
2932
- "rounded-r": ["rounded-tr", "rounded-br"],
2933
- "rounded-b": ["rounded-br", "rounded-bl"],
2934
- "rounded-l": ["rounded-tl", "rounded-bl"],
2935
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2936
- "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2937
- "border-w-x": ["border-w-r", "border-w-l"],
2938
- "border-w-y": ["border-w-t", "border-w-b"],
2939
- "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2940
- "border-color-x": ["border-color-r", "border-color-l"],
2941
- "border-color-y": ["border-color-t", "border-color-b"],
2942
- translate: ["translate-x", "translate-y", "translate-none"],
2943
- "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
2944
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2945
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2946
- "scroll-my": ["scroll-mt", "scroll-mb"],
2947
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2948
- "scroll-px": ["scroll-pr", "scroll-pl"],
2949
- "scroll-py": ["scroll-pt", "scroll-pb"],
2950
- touch: ["touch-x", "touch-y", "touch-pz"],
2951
- "touch-x": ["touch"],
2952
- "touch-y": ["touch"],
2953
- "touch-pz": ["touch"]
2954
- },
2955
- conflictingClassGroupModifiers: {
2956
- "font-size": ["leading"]
2957
- },
2958
- orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
2959
- };
2960
- }, er = /* @__PURE__ */ Mt(qt);
2961
- function me(...e) {
2962
- return er(mt(e));
2963
- }
2964
- function tr({ question: e }) {
2965
- var d;
2966
- const { answers: o, setAnswer: t, nextStep: r } = X(), n = o[e.id] || "", s = (i) => {
2967
- t(e.id, i), setTimeout(() => r(), 400);
2968
- }, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
2969
- return pe(() => {
2970
- const i = (f) => {
199
+ function Z({ question: e }) {
200
+ var u;
201
+ const { answers: a, setAnswer: t, nextStep: r } = F(), d = a[e.id] || "", l = (c) => {
202
+ t(e.id, c), setTimeout(() => r(), 400);
203
+ }, h = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
204
+ return L(() => {
205
+ const c = (p) => {
2971
206
  var v;
2972
- const g = f.key.toUpperCase(), x = a.indexOf(g);
2973
- x >= 0 && x < (((v = e.options) == null ? void 0 : v.length) || 0) && s(e.options[x].value);
207
+ const f = p.key.toUpperCase(), g = h.indexOf(f);
208
+ g >= 0 && g < (((v = e.options) == null ? void 0 : v.length) || 0) && l(e.options[g].value);
2974
209
  };
2975
- return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
2976
- }, [e.options, e.id]), /* @__PURE__ */ u("div", { className: "flex flex-col gap-3 w-full max-w-xl", children: (d = e.options) == null ? void 0 : d.map((i, f) => {
2977
- const g = n === i.value;
2978
- return /* @__PURE__ */ z(
2979
- I.button,
210
+ return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
211
+ }, [e.options, e.id]), /* @__PURE__ */ n("div", { className: "flex flex-col gap-3 w-full max-w-xl", children: (u = e.options) == null ? void 0 : u.map((c, p) => {
212
+ const f = Array.isArray(d) ? d.includes(c.value) : d === c.value;
213
+ return /* @__PURE__ */ m(
214
+ y.button,
2980
215
  {
2981
- onClick: () => s(i.value),
2982
- initial: { opacity: 0, x: -20 },
2983
- animate: { opacity: 1, x: 0 },
2984
- transition: { delay: f * 0.1, duration: 0.4 },
2985
- whileHover: { scale: 1.02, x: 5, transition: { duration: 0.2 } },
2986
- whileTap: { scale: 0.98 },
2987
- className: me(
2988
- "group flex items-center gap-4 p-4 md:p-6 rounded-lg border-2 text-left transition-all duration-200 outline-none",
2989
- g ? "border-primary bg-primary/10 text-primary shadow-lg" : "border-muted-foreground/20 hover:border-primary/50 hover:bg-white/5"
2990
- ),
216
+ initial: { opacity: 0, y: 10 },
217
+ animate: { opacity: 1, y: 0 },
218
+ transition: { delay: p * 0.05 },
219
+ onClick: () => l(c.value),
220
+ className: `
221
+ w-full text-left p-4 rounded-lg border-2 transition-all duration-200
222
+ flex items-center justify-between group
223
+ ${f ? "border-sw-primary bg-sw-primary/5 text-sw-primary" : "border-sw-text-secondary/10 hover:border-sw-primary/50 hover:bg-sw-primary/5"}
224
+ `,
2991
225
  children: [
2992
- /* @__PURE__ */ u("div", { className: me(
2993
- "w-8 h-8 md:w-10 md:h-10 flex items-center justify-center rounded border text-sm md:text-base font-bold transition-colors",
2994
- g ? "bg-primary text-secondary border-primary" : "border-muted-foreground/30 text-muted-foreground group-hover:border-primary group-hover:text-primary"
2995
- ), children: a[f] }),
2996
- /* @__PURE__ */ u("span", { className: "text-xl md:text-2xl font-medium flex-1", children: i.label }),
2997
- g && /* @__PURE__ */ u(I.div, { initial: { scale: 0 }, animate: { scale: 1 }, children: /* @__PURE__ */ u(Le, { className: "w-6 h-6 md:w-8 md:h-8" }) })
226
+ /* @__PURE__ */ m("span", { className: "text-lg font-medium flex items-center gap-3", children: [
227
+ /* @__PURE__ */ n("span", { className: `
228
+ w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors
229
+ ${f ? "border-sw-primary bg-sw-primary" : "border-sw-text-secondary/30 group-hover:border-sw-primary/50"}
230
+ `, children: f && /* @__PURE__ */ n($, { size: 14, className: "text-sw-background" }) }),
231
+ c.label
232
+ ] }),
233
+ /* @__PURE__ */ m("span", { className: "opacity-0 group-hover:opacity-100 transition-opacity text-xs font-mono uppercase tracking-widest text-sw-text-secondary/50", children: [
234
+ "Select ",
235
+ /* @__PURE__ */ m("span", { className: "hidden md:inline", children: [
236
+ "Key ",
237
+ p + 1
238
+ ] })
239
+ ] })
2998
240
  ]
2999
241
  },
3000
- String(i.value)
242
+ String(c.value)
3001
243
  );
3002
244
  }) });
3003
245
  }
3004
- function rr({ question: e }) {
3005
- var s;
3006
- const { answers: o, setAnswer: t } = X(), r = o[e.id] || 0, n = Math.min(((s = e.validation) == null ? void 0 : s.max) || 5, 20);
3007
- return /* @__PURE__ */ z("div", { className: "flex flex-col gap-6", children: [
3008
- /* @__PURE__ */ u("div", { className: "flex gap-4 flex-wrap", children: Array.from({ length: n }).map((a, d) => {
3009
- const i = d + 1, f = i <= r;
3010
- return /* @__PURE__ */ u(
3011
- I.button,
246
+ function q({ question: e }) {
247
+ var l;
248
+ const { answers: a, setAnswer: t } = F(), r = a[e.id] || 0, d = Math.min(((l = e.validation) == null ? void 0 : l.max) || 5, 20);
249
+ return /* @__PURE__ */ m("div", { className: "flex flex-col gap-6", children: [
250
+ /* @__PURE__ */ n("div", { className: "flex gap-4 flex-wrap", children: Array.from({ length: d }).map((h, u) => {
251
+ const c = u + 1, p = c <= r;
252
+ return /* @__PURE__ */ n(
253
+ y.button,
3012
254
  {
3013
- type: "button",
3014
- className: "focus:outline-none",
3015
- onClick: () => t(e.id, i),
3016
- whileHover: { scale: 1.2, rotate: 5 },
3017
- whileTap: { scale: 0.9 },
3018
255
  initial: { opacity: 0, scale: 0 },
3019
256
  animate: { opacity: 1, scale: 1 },
3020
- transition: { delay: d * 0.05 },
3021
- children: /* @__PURE__ */ u(
3022
- at,
257
+ transition: { delay: u * 0.05 },
258
+ onClick: () => t(e.id, c),
259
+ whileHover: { scale: 1.2, rotate: 5 },
260
+ whileTap: { scale: 0.9 },
261
+ className: "focus:outline-none",
262
+ children: /* @__PURE__ */ n(
263
+ U,
3023
264
  {
3024
- className: me(
3025
- "w-12 h-12 md:w-16 md:h-16 transition-all duration-300",
3026
- f ? "fill-yellow-400 text-yellow-400 drop-shadow-[0_0_15px_rgba(250,204,21,0.4)]" : "text-zinc-600 hover:text-yellow-400/50"
3027
- ),
265
+ className: `w-12 h-12 md:w-16 md:h-16 transition-all duration-300 ${p ? "fill-yellow-400 text-yellow-400 drop-shadow-[0_0_15px_rgba(250,204,21,0.4)]" : "text-zinc-600 hover:text-yellow-400/50"}`,
3028
266
  strokeWidth: 1.5
3029
267
  }
3030
268
  )
3031
269
  },
3032
- d
270
+ u
3033
271
  );
3034
272
  }) }),
3035
- /* @__PURE__ */ z("div", { className: "flex justify-between w-full max-w-[300px] md:max-w-[400px] px-2 items-center", children: [
3036
- /* @__PURE__ */ u("span", { className: "text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide", children: e.minLabel || "Poor" }),
3037
- /* @__PURE__ */ u(
3038
- I.div,
273
+ /* @__PURE__ */ m("div", { className: "flex justify-between w-full max-w-[300px] md:max-w-[400px] px-2 items-center", children: [
274
+ /* @__PURE__ */ n("span", { className: "text-sm md:text-base font-medium text-sw-text-secondary/50 uppercase tracking-wide", children: e.minLabel || "Poor" }),
275
+ /* @__PURE__ */ n(
276
+ y.div,
3039
277
  {
3040
278
  initial: { opacity: 0, scale: 0.8 },
3041
279
  animate: { opacity: r ? 1 : 0, scale: r ? 1 : 0.8 },
3042
280
  className: "font-bold text-primary text-xl",
3043
- children: r ? `${r} / ${n}` : ""
281
+ children: r ? `${r} / ${d}` : ""
3044
282
  }
3045
283
  ),
3046
- /* @__PURE__ */ u("span", { className: "text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide", children: e.maxLabel || "Excellent" })
284
+ /* @__PURE__ */ n("span", { className: "text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide", children: e.maxLabel || "Excellent" })
3047
285
  ] })
3048
286
  ] });
3049
287
  }
3050
- function or({ question: e }) {
3051
- const { schema: o } = X(), t = o.questions.findIndex((d) => d.id === e.id) + 1, r = o.questions.length, n = {
288
+ function ee({ question: e }) {
289
+ const { schema: a } = F(), t = a.questions.findIndex((u) => u.id === e.id) + 1, r = a.questions.length, d = {
3052
290
  hidden: { opacity: 0, y: 20 },
3053
291
  visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] } }
3054
- }, s = (d) => d && d.replace(/\{\{(\w+)\}\}/g, (i, f) => {
3055
- const g = a.answers[f];
3056
- return g != null ? String(g) : "";
3057
- }), a = X();
3058
- return /* @__PURE__ */ z(
3059
- I.div,
292
+ }, l = (u) => u && u.replace(/\{\{(\w+)\}\}/g, (c, p) => {
293
+ const f = h.answers[p];
294
+ return f != null ? String(f) : "";
295
+ }), h = F();
296
+ return /* @__PURE__ */ m(
297
+ y.div,
3060
298
  {
3061
299
  className: "flex flex-col gap-8 w-full max-w-4xl mx-auto",
3062
300
  initial: "hidden",
@@ -3065,34 +303,34 @@ function or({ question: e }) {
3065
303
  visible: { transition: { staggerChildren: 0.1 } }
3066
304
  },
3067
305
  children: [
3068
- /* @__PURE__ */ z("div", { className: "flex flex-col gap-2", children: [
3069
- /* @__PURE__ */ u(I.div, { variants: n, className: "flex gap-4 items-baseline", children: /* @__PURE__ */ z("span", { className: "flex items-center gap-2 text-sm md:text-base font-medium text-primary/90 bg-primary/10 px-3 py-1 rounded-full border border-primary/20 backdrop-blur-sm", children: [
3070
- /* @__PURE__ */ u("span", { children: t }),
3071
- /* @__PURE__ */ u("span", { className: "opacity-40 text-xs", children: "/" }),
3072
- /* @__PURE__ */ u("span", { className: "opacity-60", children: r })
306
+ /* @__PURE__ */ m("div", { className: "flex flex-col gap-2", children: [
307
+ /* @__PURE__ */ n(y.div, { variants: d, className: "flex gap-4 items-baseline", children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2 text-sm md:text-base font-medium text-sw-primary/90 bg-sw-primary/10 px-3 py-1 rounded-full border border-sw-primary/20 backdrop-blur-sm", children: [
308
+ /* @__PURE__ */ n("span", { children: t }),
309
+ /* @__PURE__ */ n("span", { className: "opacity-40 text-xs", children: "/" }),
310
+ /* @__PURE__ */ n("span", { className: "opacity-60", children: r })
3073
311
  ] }) }),
3074
- /* @__PURE__ */ z(
3075
- I.h2,
312
+ /* @__PURE__ */ m(
313
+ y.h2,
3076
314
  {
3077
- variants: n,
3078
- className: "text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2",
315
+ variants: d,
316
+ className: "text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2 font-sw-heading",
3079
317
  children: [
3080
- s(e.title),
318
+ l(e.title),
3081
319
  " ",
3082
- /* @__PURE__ */ u("span", { className: "text-primary", children: "*" })
320
+ /* @__PURE__ */ n("span", { className: "text-sw-primary", children: "*" })
3083
321
  ]
3084
322
  }
3085
323
  ),
3086
- e.description && /* @__PURE__ */ u(
3087
- I.p,
324
+ e.description && /* @__PURE__ */ n(
325
+ y.p,
3088
326
  {
3089
- variants: n,
327
+ variants: d,
3090
328
  className: "text-lg md:text-xl text-muted-foreground font-normal leading-relaxed max-w-2xl mt-2",
3091
- children: s(e.description)
329
+ children: l(e.description)
3092
330
  }
3093
331
  )
3094
332
  ] }),
3095
- /* @__PURE__ */ u(I.div, { variants: n, className: "w-full mt-6", children: e.type === "text" || e.type === "email" || e.type === "number" || e.type === "url" ? /* @__PURE__ */ u(dt, { question: e }) : e.type === "select" ? /* @__PURE__ */ u(tr, { question: e }) : e.type === "rating" ? /* @__PURE__ */ u(rr, { question: e }) : /* @__PURE__ */ z("div", { className: "p-4 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 rounded", children: [
333
+ /* @__PURE__ */ n(y.div, { variants: d, className: "w-full mt-6", children: e.type === "text" || e.type === "email" || e.type === "number" || e.type === "url" ? /* @__PURE__ */ n(Y, { question: e }) : e.type === "select" ? /* @__PURE__ */ n(Z, { question: e }) : e.type === "rating" ? /* @__PURE__ */ n(q, { question: e }) : /* @__PURE__ */ m("div", { className: "p-4 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 rounded", children: [
3096
334
  "Unsupported question type: ",
3097
335
  e.type,
3098
336
  " (ID: ",
@@ -3103,7 +341,7 @@ function or({ question: e }) {
3103
341
  }
3104
342
  );
3105
343
  }
3106
- const nr = {
344
+ const te = {
3107
345
  next: "Next",
3108
346
  back: "Back",
3109
347
  submit: "Submit",
@@ -3111,81 +349,81 @@ const nr = {
3111
349
  optional: "Optional",
3112
350
  stepInfo: "Question {{current}} of {{total}}"
3113
351
  };
3114
- function dr({ schema: e, onSubmit: o }) {
352
+ function oe({ schema: e, onSubmit: a }) {
3115
353
  var S;
3116
- const t = ct({ schema: e, onSubmit: o }), r = e.theme || {
354
+ const t = J({ schema: e, onSubmit: a }), r = e.theme || {
3117
355
  backgroundColor: "#ffffff",
3118
356
  textColor: "#000000",
3119
357
  // Start with generic defaults, override in usage
3120
358
  primaryColor: "#000000",
3121
359
  borderRadius: "8px",
3122
360
  fontFamily: "sans-serif"
3123
- }, n = A(A({}, nr), e.i18n), s = {
361
+ }, d = x(x({}, te), e.i18n), l = {
3124
362
  backgroundColor: r.backgroundColor,
3125
363
  color: r.textColor,
3126
364
  fontFamily: r.fontFamily
3127
- }, a = r.buttonVariant === "outline", d = {
3128
- backgroundColor: a ? "transparent" : r.primaryColor,
3129
- color: a ? r.primaryColor : r.textColor,
3130
- border: a ? `2px solid ${r.primaryColor}` : "none",
365
+ }, h = r.buttonVariant === "outline", u = {
366
+ backgroundColor: h ? "transparent" : r.primaryColor,
367
+ color: h ? r.primaryColor : r.textColor,
368
+ border: h ? `2px solid ${r.primaryColor}` : "none",
3131
369
  borderRadius: r.borderRadius || "8px",
3132
370
  fontWeight: 600
3133
- }, i = {
371
+ }, c = {
3134
372
  color: r.primaryColor,
3135
373
  borderRadius: r.borderRadius || "8px",
3136
374
  fontWeight: 600
3137
- }, { autoReload: f, reloadDelay: g = 3e3 } = e;
3138
- if (pe(() => {
3139
- if (t.isCompleted && f) {
3140
- const k = setTimeout(() => {
375
+ }, { autoReload: p, reloadDelay: f = 3e3 } = e;
376
+ if (L(() => {
377
+ if (t.isCompleted && p) {
378
+ const b = setTimeout(() => {
3141
379
  t.resetForm();
3142
- }, g);
3143
- return () => clearTimeout(k);
380
+ }, f);
381
+ return () => clearTimeout(b);
3144
382
  }
3145
- }, [t.isCompleted, f, g, t.resetForm]), t.isCompleted)
3146
- return /* @__PURE__ */ z(
383
+ }, [t.isCompleted, p, f, t.resetForm]), t.isCompleted)
384
+ return /* @__PURE__ */ m(
3147
385
  "div",
3148
386
  {
3149
387
  className: "flex flex-col items-center justify-center h-full w-full p-8 text-center relative overflow-hidden",
3150
- style: s,
388
+ style: l,
3151
389
  children: [
3152
- f && /* @__PURE__ */ u(
3153
- I.div,
390
+ p && /* @__PURE__ */ n(
391
+ y.div,
3154
392
  {
3155
393
  initial: { width: "0%" },
3156
394
  animate: { width: "100%" },
3157
- transition: { duration: g / 1e3, ease: "linear" },
395
+ transition: { duration: f / 1e3, ease: "linear" },
3158
396
  className: "absolute top-0 left-0 h-1 bg-green-500 z-50"
3159
397
  }
3160
398
  ),
3161
- /* @__PURE__ */ z(
3162
- I.div,
399
+ /* @__PURE__ */ m(
400
+ y.div,
3163
401
  {
3164
402
  initial: { scale: 0.9, opacity: 0, y: 20 },
3165
403
  animate: { scale: 1, opacity: 1, y: 0 },
3166
404
  transition: { duration: 0.6, ease: [0.22, 1, 0.36, 1] },
3167
405
  className: "flex flex-col items-center",
3168
406
  children: [
3169
- /* @__PURE__ */ u("div", { className: "mb-6 p-4 rounded-full bg-green-500/20 text-green-500 w-24 h-24 flex items-center justify-center", children: /* @__PURE__ */ u(Le, { size: 48 }) }),
3170
- /* @__PURE__ */ u("h1", { className: "text-4xl md:text-5xl font-bold mb-4 tracking-tight", children: "Obrigado!" }),
3171
- /* @__PURE__ */ u("p", { className: "text-xl opacity-70 max-w-md leading-relaxed", children: "Suas respostas foram enviadas com sucesso." })
407
+ /* @__PURE__ */ n("div", { className: "mb-6 p-4 rounded-full bg-green-500/20 text-green-500 w-24 h-24 flex items-center justify-center", children: /* @__PURE__ */ n($, { size: 48 }) }),
408
+ /* @__PURE__ */ n("h1", { className: "text-4xl md:text-5xl font-bold mb-4 tracking-tight", children: "Obrigado!" }),
409
+ /* @__PURE__ */ n("p", { className: "text-xl opacity-70 max-w-md leading-relaxed", children: "Suas respostas foram enviadas com sucesso." })
3172
410
  ]
3173
411
  }
3174
412
  )
3175
413
  ]
3176
414
  }
3177
415
  );
3178
- const x = e.questions.find((k) => k.id === t.currentStepId), v = (e.questions.findIndex((k) => k.id === t.currentStepId) + 1) / e.questions.length * 100;
3179
- return /* @__PURE__ */ u(Fe.Provider, { value: P(A({}, t), { schema: e }), children: /* @__PURE__ */ z(
416
+ const g = e.questions.find((b) => b.id === t.currentStepId), v = (e.questions.findIndex((b) => b.id === t.currentStepId) + 1) / e.questions.length * 100;
417
+ return /* @__PURE__ */ n(B.Provider, { value: w(x({}, t), { schema: e }), children: /* @__PURE__ */ m(
3180
418
  "div",
3181
419
  {
3182
420
  className: "w-full h-full flex flex-col relative overflow-hidden transition-colors duration-700",
3183
- style: s,
421
+ style: l,
3184
422
  children: [
3185
- /* @__PURE__ */ z("div", { className: "absolute top-0 left-0 w-full h-1 z-50", children: [
3186
- /* @__PURE__ */ u("div", { className: "absolute top-0 left-0 w-full h-full bg-current opacity-10" }),
3187
- /* @__PURE__ */ u(
3188
- I.div,
423
+ /* @__PURE__ */ m("div", { className: "absolute top-0 left-0 w-full h-1 z-50", children: [
424
+ /* @__PURE__ */ n("div", { className: "absolute top-0 left-0 w-full h-full bg-current opacity-10" }),
425
+ /* @__PURE__ */ n(
426
+ y.div,
3189
427
  {
3190
428
  className: "h-full relative z-10",
3191
429
  initial: { width: 0 },
@@ -3195,30 +433,30 @@ function dr({ schema: e, onSubmit: o }) {
3195
433
  }
3196
434
  )
3197
435
  ] }),
3198
- /* @__PURE__ */ u("div", { className: "flex-1 flex flex-col items-center justify-center p-6 md:p-12 w-full max-w-5xl mx-auto z-10", children: /* @__PURE__ */ u(st, { mode: "wait", children: x && /* @__PURE__ */ u(
3199
- I.div,
436
+ /* @__PURE__ */ n("div", { className: "flex-1 flex flex-col items-center justify-center p-6 md:p-12 w-full max-w-5xl mx-auto z-10", children: /* @__PURE__ */ n(M, { mode: "wait", children: g && /* @__PURE__ */ n(
437
+ y.div,
3200
438
  {
3201
439
  initial: { opacity: 0, y: 40 },
3202
440
  animate: { opacity: 1, y: 0 },
3203
441
  exit: { opacity: 0, y: -40 },
3204
442
  transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] },
3205
443
  className: "w-full",
3206
- children: /* @__PURE__ */ u(or, { question: x })
444
+ children: /* @__PURE__ */ n(ee, { question: g })
3207
445
  },
3208
- x.id
446
+ g.id
3209
447
  ) }) }),
3210
- /* @__PURE__ */ z("div", { className: "w-full px-6 pt-6 pb-8 md:p-10 flex flex-col md:flex-row justify-between items-center z-20 gap-4", children: [
3211
- r.showPoweredBy !== !1 && /* @__PURE__ */ z(
448
+ /* @__PURE__ */ m("div", { className: "w-full px-6 pt-6 pb-8 md:p-10 flex flex-col md:flex-row justify-between items-center z-20 gap-4", children: [
449
+ r.showPoweredBy !== !1 && /* @__PURE__ */ m(
3212
450
  "a",
3213
451
  {
3214
452
  href: "#",
3215
- className: "order-3 md:order-1 group flex items-center gap-2 px-3 py-1.5 rounded-md border border-white/10 bg-black/20 hover:border-primary/50 hover:bg-black/40 transition-all duration-300 cursor-pointer no-underline backdrop-blur-sm",
453
+ className: "order-3 md:order-1 group flex items-center gap-2 px-3 py-1.5 rounded-md border border-white/10 bg-black/20 hover:border-sw-primary/50 hover:bg-black/40 transition-all duration-300 cursor-pointer no-underline backdrop-blur-sm",
3216
454
  children: [
3217
- /* @__PURE__ */ u("span", { className: "text-[10px] md:text-xs font-mono font-medium tracking-[0.2em] uppercase text-muted-foreground group-hover:text-muted-foreground/80 transition-colors", children: "Powered By" }),
3218
- /* @__PURE__ */ u(
455
+ /* @__PURE__ */ n("span", { className: "text-[10px] md:text-xs font-mono font-medium tracking-[0.2em] uppercase text-muted-foreground group-hover:text-muted-foreground/80 transition-colors", children: "Powered By" }),
456
+ /* @__PURE__ */ n(
3219
457
  "span",
3220
458
  {
3221
- className: "text-[10px] md:text-xs font-mono font-bold tracking-[0.2em] uppercase transition-colors shadow-primary",
459
+ className: "text-[10px] md:text-xs font-mono font-bold tracking-[0.2em] uppercase transition-colors shadow-sw-primary",
3222
460
  style: { color: r.brandColor || r.primaryColor },
3223
461
  children: ((S = r.poweredBy) == null ? void 0 : S.replace("Powered by ", "")) || "SAWABONA TECH"
3224
462
  }
@@ -3226,30 +464,30 @@ function dr({ schema: e, onSubmit: o }) {
3226
464
  ]
3227
465
  }
3228
466
  ),
3229
- /* @__PURE__ */ z("div", { className: "flex items-center gap-4 order-2 md:order-3 ml-auto", children: [
3230
- /* @__PURE__ */ u(
3231
- I.button,
467
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-4 order-2 md:order-3 ml-auto", children: [
468
+ /* @__PURE__ */ n(
469
+ y.button,
3232
470
  {
3233
471
  onClick: t.prevStep,
3234
472
  disabled: t.history.length === 0,
3235
473
  whileHover: { scale: 1.05 },
3236
474
  whileTap: { scale: 0.95 },
3237
475
  className: "w-12 h-12 md:w-14 md:h-14 flex items-center justify-center disabled:opacity-0 disabled:pointer-events-none transition-all hover:bg-white/5 rounded-full",
3238
- style: i,
3239
- children: /* @__PURE__ */ u(it, { size: 24 })
476
+ style: c,
477
+ children: /* @__PURE__ */ n(G, { size: 24 })
3240
478
  }
3241
479
  ),
3242
- /* @__PURE__ */ z(
3243
- I.button,
480
+ /* @__PURE__ */ m(
481
+ y.button,
3244
482
  {
3245
483
  onClick: t.nextStep,
3246
484
  whileHover: { scale: 1.02 },
3247
485
  whileTap: { scale: 0.98 },
3248
486
  className: "px-8 py-3 md:px-10 md:py-4 text-lg font-bold shadow-2xl flex items-center gap-3 transition-all rounded-lg",
3249
- style: d,
487
+ style: u,
3250
488
  children: [
3251
- /* @__PURE__ */ u("span", { children: t.currentStepId === e.questions[e.questions.length - 1].id ? r.submitText || n.submit : n.next }),
3252
- t.currentStepId !== e.questions[e.questions.length - 1].id && /* @__PURE__ */ u(lt, { size: 20, strokeWidth: 3 })
489
+ /* @__PURE__ */ n("span", { children: t.currentStepId === e.questions[e.questions.length - 1].id ? r.submitText || d.submit : d.next }),
490
+ t.currentStepId !== e.questions[e.questions.length - 1].id && /* @__PURE__ */ n(X, { size: 20, strokeWidth: 3 })
3253
491
  ]
3254
492
  }
3255
493
  )
@@ -3260,5 +498,5 @@ function dr({ schema: e, onSubmit: o }) {
3260
498
  ) });
3261
499
  }
3262
500
  export {
3263
- dr as FormRenderer
501
+ oe as FormRenderer
3264
502
  };