@sawabona/forms 0.1.0 → 0.2.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.
- package/README.md +15 -18
- package/dist/components/QuestionRenderer.d.ts.map +1 -1
- package/dist/sawabona-forms.es.js +125 -122
- package/dist/sawabona-forms.umd.js +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
**Uma biblioteca de formulários poderosa, customizável e animada para React.**
|
|
9
|
-
*
|
|
9
|
+
*Feita com tecnologias modernas: baseada em schema, acessível e performática.*
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -14,23 +14,20 @@
|
|
|
14
14
|
|
|
15
15
|
## 🌍 Por que @sawabona/forms?
|
|
16
16
|
|
|
17
|
-
O **Sawabona Forms**
|
|
17
|
+
O **Sawabona Forms** nasceu para facilitar a criação de formulários conversacionais de alta qualidade. Enquanto muitas ferramentas de mercado são caras ou presas a ecossistemas fechados, o `@sawabona/forms` oferece uma **base open-source e focada no desenvolvedor** para criar experiências de coleta de dados que realmente engajam.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Capture leads, receba feedbacks ou faça o onboarding de usuários com uma interface que parece uma conversa, e não um interrogatório chato.
|
|
20
20
|
|
|
21
21
|
### Principais Recursos
|
|
22
22
|
|
|
23
|
-
- 🚀 **Arquitetura Baseada em Schema**: Defina formulários complexos com um JSON simples
|
|
24
|
-
- 🎨 **
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- 🎭 **Animações Fluidas**: Transições suaves nativas, impulsionadas pelo `framer-motion`.
|
|
30
|
-
- 📱 **Mobile-First**: Otimizado para toque e layout responsivo para uma experiência superior em celulares e tablets.
|
|
31
|
-
- 🛡️ **Segurança Integrada**: Sanitização de input, proteção contra DoS e regras de validação estritas prontas para uso.
|
|
23
|
+
- 🚀 **Arquitetura Baseada em Schema**: Defina formulários complexos com um JSON simples.
|
|
24
|
+
- 🎨 **100% Personalizável (White-Label)**: Controle total de cores, fontes e bordas para combinar com sua marca.
|
|
25
|
+
- 💬 **Interpolação de Variáveis**: Crie conversas dinâmicas citando respostas anteriores (ex: "Prazer, {{nome}}!").
|
|
26
|
+
- 🎭 **Animações Suaves**: Transições fluidas nativas, impulsionadas pelo `framer-motion`.
|
|
27
|
+
- 📱 **Mobile-First**: Experiência de uso perfeita em celulares e tablets.
|
|
28
|
+
- 🛡️ **Segurança Integrada**: Sanitização de input, proteção contra DoS e validações prontas para uso.
|
|
32
29
|
- 🔄 **Reinício Automático**: Modo Kiosk para eventos, reiniciando o formulário automaticamente após o envio.
|
|
33
|
-
- ⌨️ **Acessível**:
|
|
30
|
+
- ⌨️ **Acessível**: Navegação otimizada para teclado e leitores de tela.
|
|
34
31
|
|
|
35
32
|
---
|
|
36
33
|
|
|
@@ -39,9 +36,9 @@ Identifique leads, colete feedbacks ou faça o onboarding de usuários com uma i
|
|
|
39
36
|
Instale o pacote e suas dependências via npm, yarn ou pnpm.
|
|
40
37
|
|
|
41
38
|
```bash
|
|
42
|
-
npm install @sawabona/forms
|
|
39
|
+
npm install @sawabona/forms
|
|
43
40
|
# ou
|
|
44
|
-
yarn add @sawabona/forms
|
|
41
|
+
yarn add @sawabona/forms
|
|
45
42
|
```
|
|
46
43
|
|
|
47
44
|
---
|
|
@@ -49,14 +46,14 @@ yarn add @sawabona/forms framer-motion lucide-react clsx tailwind-merge
|
|
|
49
46
|
## 🚀 Começando
|
|
50
47
|
|
|
51
48
|
### 1. Importe os Estilos
|
|
52
|
-
A biblioteca vem com um arquivo CSS zero-config. Importe-o uma vez no seu componente raiz (`_app.tsx`, `layout.tsx` ou `main.tsx`).
|
|
49
|
+
A biblioteca vem com um arquivo CSS zero-config. O CSS é essencial para o layout funcionar corretamente. Importe-o uma vez no seu componente raiz (`_app.tsx`, `layout.tsx` ou `main.tsx`).
|
|
53
50
|
|
|
54
51
|
```tsx
|
|
55
52
|
import '@sawabona/forms/dist/sawabona-forms.css';
|
|
56
53
|
```
|
|
57
54
|
|
|
58
|
-
### 2. Crie
|
|
59
|
-
Defina a estrutura do seu formulário. Sem JSX complexo.
|
|
55
|
+
### 2. Crie o Schema
|
|
56
|
+
Defina a estrutura do seu formulário. Sem JSX complexo, apenas descritivo.
|
|
60
57
|
|
|
61
58
|
```tsx
|
|
62
59
|
import { FormSchema } from '@sawabona/forms';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionRenderer.d.ts","sourceRoot":"","sources":["../../src/lib/components/QuestionRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAO9C,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"QuestionRenderer.d.ts","sourceRoot":"","sources":["../../src/lib/components/QuestionRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAO9C,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,2CAyEpE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Je = Object.defineProperty, Ze = Object.defineProperties;
|
|
2
2
|
var qe = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var re = Object.getOwnPropertySymbols;
|
|
4
4
|
var Se = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
|
|
5
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
6
|
for (var t in o || (o = {}))
|
|
7
7
|
Se.call(o, t) && Ce(e, t, o[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (re)
|
|
9
|
+
for (var t of re(o))
|
|
10
10
|
Ne.call(o, t) && Ce(e, t, o[t]);
|
|
11
11
|
return e;
|
|
12
12
|
}, P = (e, o) => Ze(e, qe(o));
|
|
@@ -14,8 +14,8 @@ var ze = (e) => typeof e == "symbol" ? e : e + "", Ae = (e, o) => {
|
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var r in e)
|
|
16
16
|
Se.call(e, r) && o.indexOf(r) < 0 && (t[r] = e[r]);
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var r of
|
|
17
|
+
if (e != null && re)
|
|
18
|
+
for (var r of re(e))
|
|
19
19
|
o.indexOf(r) < 0 && Ne.call(e, r) && (t[r] = e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
@@ -63,7 +63,7 @@ function ct({ schema: e, onSubmit: o }) {
|
|
|
63
63
|
}, [s, t.answers, d, e.i18n]), f = j((p) => {
|
|
64
64
|
const y = e.questions.findIndex((w) => w.id === p.id);
|
|
65
65
|
return y < e.questions.length - 1 ? e.questions[y + 1].id : "submit";
|
|
66
|
-
}, [e.questions]),
|
|
66
|
+
}, [e.questions]), g = j(() => {
|
|
67
67
|
if (!i()) return;
|
|
68
68
|
const p = f(s);
|
|
69
69
|
p === "submit" ? (r((y) => P(A({}, y), { isCompleted: !0 })), o == null || o(t.answers)) : r((y) => P(A({}, y), {
|
|
@@ -99,7 +99,7 @@ function ct({ schema: e, onSubmit: o }) {
|
|
|
99
99
|
}, [e.questions]);
|
|
100
100
|
return P(A({}, t), {
|
|
101
101
|
setAnswer: a,
|
|
102
|
-
nextStep:
|
|
102
|
+
nextStep: g,
|
|
103
103
|
prevStep: x,
|
|
104
104
|
jumpToStep: v,
|
|
105
105
|
submitForm: () => o == null ? void 0 : o(t.answers),
|
|
@@ -109,24 +109,24 @@ function ct({ schema: e, onSubmit: o }) {
|
|
|
109
109
|
progress: n / e.questions.length * 100
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
const Fe = rt(void 0),
|
|
112
|
+
const Fe = rt(void 0), X = () => {
|
|
113
113
|
const e = ot(Fe);
|
|
114
114
|
if (!e)
|
|
115
115
|
throw new Error("useFormContext must be used within a FormProvider");
|
|
116
116
|
return e;
|
|
117
117
|
};
|
|
118
118
|
function dt({ question: e }) {
|
|
119
|
-
const { answers: o, setAnswer: t, nextStep: r } =
|
|
119
|
+
const { answers: o, setAnswer: t, nextStep: r } = X(), n = o[e.id], s = n != null ? String(n) : "", a = nt(null);
|
|
120
120
|
pe(() => {
|
|
121
|
-
const
|
|
121
|
+
const g = setTimeout(() => {
|
|
122
122
|
var x;
|
|
123
123
|
(x = a.current) == null || x.focus();
|
|
124
124
|
}, 500);
|
|
125
|
-
return () => clearTimeout(
|
|
125
|
+
return () => clearTimeout(g);
|
|
126
126
|
}, [e.id]);
|
|
127
|
-
const d = (
|
|
127
|
+
const d = (g) => {
|
|
128
128
|
var S;
|
|
129
|
-
let x =
|
|
129
|
+
let x = g.target.value;
|
|
130
130
|
const v = ((S = e.validation) == null ? void 0 : S.maxLength) || 2048;
|
|
131
131
|
if (x.length > v && (x = x.slice(0, v)), e.type === "number") {
|
|
132
132
|
const k = x === "" ? "" : parseFloat(x);
|
|
@@ -134,8 +134,8 @@ function dt({ question: e }) {
|
|
|
134
134
|
} else
|
|
135
135
|
t(e.id, x);
|
|
136
136
|
}, i = () => {
|
|
137
|
-
var
|
|
138
|
-
if ((
|
|
137
|
+
var g, x, v, S, k;
|
|
138
|
+
if ((g = e.validation) != null && g.required && !s) return !1;
|
|
139
139
|
if (s) {
|
|
140
140
|
if ((x = e.validation) != null && x.minLength && s.length < e.validation.minLength || e.type === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)) return !1;
|
|
141
141
|
if ((v = e.validation) != null && v.pattern)
|
|
@@ -151,9 +151,9 @@ function dt({ question: e }) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
return !0;
|
|
154
|
-
}, f = (
|
|
155
|
-
if (
|
|
156
|
-
if (
|
|
154
|
+
}, f = (g) => {
|
|
155
|
+
if (g.key === "Enter" && !g.shiftKey) {
|
|
156
|
+
if (g.preventDefault(), !i()) {
|
|
157
157
|
const x = document.querySelector(".sawabona-form-container") || document.body;
|
|
158
158
|
x.classList.add("shake-animation"), setTimeout(() => x.classList.remove("shake-animation"), 500);
|
|
159
159
|
return;
|
|
@@ -217,7 +217,7 @@ const pt = (e, o) => {
|
|
|
217
217
|
nextPart: e,
|
|
218
218
|
validators: o,
|
|
219
219
|
classGroupId: t
|
|
220
|
-
}),
|
|
220
|
+
}), se = "-", Ie = [], ft = "arbitrary..", gt = (e) => {
|
|
221
221
|
const o = ht(e), {
|
|
222
222
|
conflictingClassGroups: t,
|
|
223
223
|
conflictingClassGroupModifiers: r
|
|
@@ -226,7 +226,7 @@ const pt = (e, o) => {
|
|
|
226
226
|
getClassGroupId: (a) => {
|
|
227
227
|
if (a.startsWith("[") && a.endsWith("]"))
|
|
228
228
|
return bt(a);
|
|
229
|
-
const d = a.split(
|
|
229
|
+
const d = a.split(se), i = d[0] === "" && d.length > 1 ? 1 : 0;
|
|
230
230
|
return Oe(d, i, o);
|
|
231
231
|
},
|
|
232
232
|
getConflictingClassGroupIds: (a, d) => {
|
|
@@ -248,11 +248,11 @@ const pt = (e, o) => {
|
|
|
248
248
|
const a = t.validators;
|
|
249
249
|
if (a === null)
|
|
250
250
|
return;
|
|
251
|
-
const d = o === 0 ? e.join(
|
|
251
|
+
const d = o === 0 ? e.join(se) : e.slice(o).join(se), i = a.length;
|
|
252
252
|
for (let f = 0; f < i; f++) {
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
253
|
+
const g = a[f];
|
|
254
|
+
if (g.validator(d))
|
|
255
|
+
return g.classGroupId;
|
|
256
256
|
}
|
|
257
257
|
}, bt = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
258
258
|
const o = e.slice(1, -1), t = o.indexOf(":"), r = o.slice(0, t);
|
|
@@ -303,7 +303,7 @@ const pt = (e, o) => {
|
|
|
303
303
|
}
|
|
304
304
|
}, Ve = (e, o) => {
|
|
305
305
|
let t = e;
|
|
306
|
-
const r = o.split(
|
|
306
|
+
const r = o.split(se), n = r.length;
|
|
307
307
|
for (let s = 0; s < n; s++) {
|
|
308
308
|
const a = r[s];
|
|
309
309
|
let d = t.nextPart.get(a);
|
|
@@ -348,8 +348,8 @@ const pt = (e, o) => {
|
|
|
348
348
|
let r = (n) => {
|
|
349
349
|
const s = [];
|
|
350
350
|
let a = 0, d = 0, i = 0, f;
|
|
351
|
-
const
|
|
352
|
-
for (let p = 0; p <
|
|
351
|
+
const g = n.length;
|
|
352
|
+
for (let p = 0; p < g; p++) {
|
|
353
353
|
const y = n[p];
|
|
354
354
|
if (a === 0 && d === 0) {
|
|
355
355
|
if (y === Re) {
|
|
@@ -413,25 +413,25 @@ const pt = (e, o) => {
|
|
|
413
413
|
} = o, a = [], d = e.trim().split(Rt);
|
|
414
414
|
let i = "";
|
|
415
415
|
for (let f = d.length - 1; f >= 0; f -= 1) {
|
|
416
|
-
const
|
|
416
|
+
const g = d[f], {
|
|
417
417
|
isExternal: x,
|
|
418
418
|
modifiers: v,
|
|
419
419
|
hasImportantModifier: S,
|
|
420
420
|
baseClassName: k,
|
|
421
421
|
maybePostfixModifierPosition: p
|
|
422
|
-
} = t(
|
|
422
|
+
} = t(g);
|
|
423
423
|
if (x) {
|
|
424
|
-
i =
|
|
424
|
+
i = g + (i.length > 0 ? " " + i : i);
|
|
425
425
|
continue;
|
|
426
426
|
}
|
|
427
427
|
let y = !!p, w = r(y ? k.substring(0, p) : k);
|
|
428
428
|
if (!w) {
|
|
429
429
|
if (!y) {
|
|
430
|
-
i =
|
|
430
|
+
i = g + (i.length > 0 ? " " + i : i);
|
|
431
431
|
continue;
|
|
432
432
|
}
|
|
433
433
|
if (w = r(k), !w) {
|
|
434
|
-
i =
|
|
434
|
+
i = g + (i.length > 0 ? " " + i : i);
|
|
435
435
|
continue;
|
|
436
436
|
}
|
|
437
437
|
y = !1;
|
|
@@ -445,7 +445,7 @@ const pt = (e, o) => {
|
|
|
445
445
|
const K = U[W];
|
|
446
446
|
a.push(D + K);
|
|
447
447
|
}
|
|
448
|
-
i =
|
|
448
|
+
i = g + (i.length > 0 ? " " + i : i);
|
|
449
449
|
}
|
|
450
450
|
return i;
|
|
451
451
|
}, Pt = (...e) => {
|
|
@@ -463,14 +463,14 @@ const pt = (e, o) => {
|
|
|
463
463
|
}, Mt = (e, ...o) => {
|
|
464
464
|
let t, r, n, s;
|
|
465
465
|
const a = (i) => {
|
|
466
|
-
const f = o.reduce((
|
|
466
|
+
const f = o.reduce((g, x) => x(g), e());
|
|
467
467
|
return t = It(f), r = t.cache.get, n = t.cache.set, s = d, d(i);
|
|
468
468
|
}, d = (i) => {
|
|
469
469
|
const f = r(i);
|
|
470
470
|
if (f)
|
|
471
471
|
return f;
|
|
472
|
-
const
|
|
473
|
-
return n(i,
|
|
472
|
+
const g = Tt(i, t);
|
|
473
|
+
return n(i, g), g;
|
|
474
474
|
};
|
|
475
475
|
return s = a, (...i) => s(Pt(...i));
|
|
476
476
|
}, Et = [], C = (e) => {
|
|
@@ -481,14 +481,14 @@ const pt = (e, o) => {
|
|
|
481
481
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
482
482
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
483
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),
|
|
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
485
|
const r = _e.exec(e);
|
|
486
486
|
return r ? r[1] ? o(r[1]) : t(r[2]) : !1;
|
|
487
487
|
}, $ = (e, o, t = !1) => {
|
|
488
488
|
const r = Be.exec(e);
|
|
489
489
|
return r ? r[1] ? o(r[1]) : t : !1;
|
|
490
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"),
|
|
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
492
|
"center",
|
|
493
493
|
"top",
|
|
494
494
|
"bottom",
|
|
@@ -506,9 +506,9 @@ const pt = (e, o) => {
|
|
|
506
506
|
"bottom-left",
|
|
507
507
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
508
508
|
"left-bottom"
|
|
509
|
-
], U = () => [...F(), c, l], W = () => ["auto", "hidden", "clip", "visible", "scroll"], K = () => ["auto", "contain", "none"],
|
|
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
510
|
span: ["full", G, c, l]
|
|
511
|
-
}, 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
512
|
position: [c, l]
|
|
513
513
|
}], ye = () => ["no-repeat", {
|
|
514
514
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -522,14 +522,14 @@ const pt = (e, o) => {
|
|
|
522
522
|
f,
|
|
523
523
|
c,
|
|
524
524
|
l
|
|
525
|
-
], T = () => ["", h, Y, B],
|
|
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
526
|
// Deprecated since Tailwind CSS v4.0.0
|
|
527
527
|
"",
|
|
528
528
|
"none",
|
|
529
529
|
k,
|
|
530
530
|
c,
|
|
531
531
|
l
|
|
532
|
-
],
|
|
532
|
+
], q = () => ["none", h, c, l], ee = () => ["none", h, c, l], le = () => [h, c, l], te = () => [Q, "full", ...b()];
|
|
533
533
|
return {
|
|
534
534
|
cacheSize: 500,
|
|
535
535
|
theme: {
|
|
@@ -785,7 +785,7 @@ const pt = (e, o) => {
|
|
|
785
785
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
786
786
|
*/
|
|
787
787
|
basis: [{
|
|
788
|
-
basis: [Q, "full", "auto", d, ...
|
|
788
|
+
basis: [Q, "full", "auto", d, ...b()]
|
|
789
789
|
}],
|
|
790
790
|
/**
|
|
791
791
|
* Flex Direction
|
|
@@ -848,14 +848,14 @@ const pt = (e, o) => {
|
|
|
848
848
|
* @see https://tailwindcss.com/docs/grid-column
|
|
849
849
|
*/
|
|
850
850
|
"col-start": [{
|
|
851
|
-
"col-start":
|
|
851
|
+
"col-start": J()
|
|
852
852
|
}],
|
|
853
853
|
/**
|
|
854
854
|
* Grid Column End
|
|
855
855
|
* @see https://tailwindcss.com/docs/grid-column
|
|
856
856
|
*/
|
|
857
857
|
"col-end": [{
|
|
858
|
-
"col-end":
|
|
858
|
+
"col-end": J()
|
|
859
859
|
}],
|
|
860
860
|
/**
|
|
861
861
|
* Grid Template Rows
|
|
@@ -876,14 +876,14 @@ const pt = (e, o) => {
|
|
|
876
876
|
* @see https://tailwindcss.com/docs/grid-row
|
|
877
877
|
*/
|
|
878
878
|
"row-start": [{
|
|
879
|
-
"row-start":
|
|
879
|
+
"row-start": J()
|
|
880
880
|
}],
|
|
881
881
|
/**
|
|
882
882
|
* Grid Row End
|
|
883
883
|
* @see https://tailwindcss.com/docs/grid-row
|
|
884
884
|
*/
|
|
885
885
|
"row-end": [{
|
|
886
|
-
"row-end":
|
|
886
|
+
"row-end": J()
|
|
887
887
|
}],
|
|
888
888
|
/**
|
|
889
889
|
* Grid Auto Flow
|
|
@@ -911,21 +911,21 @@ const pt = (e, o) => {
|
|
|
911
911
|
* @see https://tailwindcss.com/docs/gap
|
|
912
912
|
*/
|
|
913
913
|
gap: [{
|
|
914
|
-
gap:
|
|
914
|
+
gap: b()
|
|
915
915
|
}],
|
|
916
916
|
/**
|
|
917
917
|
* Gap X
|
|
918
918
|
* @see https://tailwindcss.com/docs/gap
|
|
919
919
|
*/
|
|
920
920
|
"gap-x": [{
|
|
921
|
-
"gap-x":
|
|
921
|
+
"gap-x": b()
|
|
922
922
|
}],
|
|
923
923
|
/**
|
|
924
924
|
* Gap Y
|
|
925
925
|
* @see https://tailwindcss.com/docs/gap
|
|
926
926
|
*/
|
|
927
927
|
"gap-y": [{
|
|
928
|
-
"gap-y":
|
|
928
|
+
"gap-y": b()
|
|
929
929
|
}],
|
|
930
930
|
/**
|
|
931
931
|
* Justify Content
|
|
@@ -1000,63 +1000,63 @@ const pt = (e, o) => {
|
|
|
1000
1000
|
* @see https://tailwindcss.com/docs/padding
|
|
1001
1001
|
*/
|
|
1002
1002
|
p: [{
|
|
1003
|
-
p:
|
|
1003
|
+
p: b()
|
|
1004
1004
|
}],
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Padding X
|
|
1007
1007
|
* @see https://tailwindcss.com/docs/padding
|
|
1008
1008
|
*/
|
|
1009
1009
|
px: [{
|
|
1010
|
-
px:
|
|
1010
|
+
px: b()
|
|
1011
1011
|
}],
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Padding Y
|
|
1014
1014
|
* @see https://tailwindcss.com/docs/padding
|
|
1015
1015
|
*/
|
|
1016
1016
|
py: [{
|
|
1017
|
-
py:
|
|
1017
|
+
py: b()
|
|
1018
1018
|
}],
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Padding Start
|
|
1021
1021
|
* @see https://tailwindcss.com/docs/padding
|
|
1022
1022
|
*/
|
|
1023
1023
|
ps: [{
|
|
1024
|
-
ps:
|
|
1024
|
+
ps: b()
|
|
1025
1025
|
}],
|
|
1026
1026
|
/**
|
|
1027
1027
|
* Padding End
|
|
1028
1028
|
* @see https://tailwindcss.com/docs/padding
|
|
1029
1029
|
*/
|
|
1030
1030
|
pe: [{
|
|
1031
|
-
pe:
|
|
1031
|
+
pe: b()
|
|
1032
1032
|
}],
|
|
1033
1033
|
/**
|
|
1034
1034
|
* Padding Top
|
|
1035
1035
|
* @see https://tailwindcss.com/docs/padding
|
|
1036
1036
|
*/
|
|
1037
1037
|
pt: [{
|
|
1038
|
-
pt:
|
|
1038
|
+
pt: b()
|
|
1039
1039
|
}],
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Padding Right
|
|
1042
1042
|
* @see https://tailwindcss.com/docs/padding
|
|
1043
1043
|
*/
|
|
1044
1044
|
pr: [{
|
|
1045
|
-
pr:
|
|
1045
|
+
pr: b()
|
|
1046
1046
|
}],
|
|
1047
1047
|
/**
|
|
1048
1048
|
* Padding Bottom
|
|
1049
1049
|
* @see https://tailwindcss.com/docs/padding
|
|
1050
1050
|
*/
|
|
1051
1051
|
pb: [{
|
|
1052
|
-
pb:
|
|
1052
|
+
pb: b()
|
|
1053
1053
|
}],
|
|
1054
1054
|
/**
|
|
1055
1055
|
* Padding Left
|
|
1056
1056
|
* @see https://tailwindcss.com/docs/padding
|
|
1057
1057
|
*/
|
|
1058
1058
|
pl: [{
|
|
1059
|
-
pl:
|
|
1059
|
+
pl: b()
|
|
1060
1060
|
}],
|
|
1061
1061
|
/**
|
|
1062
1062
|
* Margin
|
|
@@ -1126,7 +1126,7 @@ const pt = (e, o) => {
|
|
|
1126
1126
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1127
1127
|
*/
|
|
1128
1128
|
"space-x": [{
|
|
1129
|
-
"space-x":
|
|
1129
|
+
"space-x": b()
|
|
1130
1130
|
}],
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Space Between X Reverse
|
|
@@ -1138,7 +1138,7 @@ const pt = (e, o) => {
|
|
|
1138
1138
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1139
1139
|
*/
|
|
1140
1140
|
"space-y": [{
|
|
1141
|
-
"space-y":
|
|
1141
|
+
"space-y": b()
|
|
1142
1142
|
}],
|
|
1143
1143
|
/**
|
|
1144
1144
|
* Space Between Y Reverse
|
|
@@ -1307,7 +1307,7 @@ const pt = (e, o) => {
|
|
|
1307
1307
|
leading: [
|
|
1308
1308
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1309
1309
|
s,
|
|
1310
|
-
...
|
|
1310
|
+
...b()
|
|
1311
1311
|
]
|
|
1312
1312
|
}],
|
|
1313
1313
|
/**
|
|
@@ -1363,7 +1363,7 @@ const pt = (e, o) => {
|
|
|
1363
1363
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1364
1364
|
*/
|
|
1365
1365
|
"text-decoration-style": [{
|
|
1366
|
-
decoration: [...
|
|
1366
|
+
decoration: [...Z(), "wavy"]
|
|
1367
1367
|
}],
|
|
1368
1368
|
/**
|
|
1369
1369
|
* Text Decoration Thickness
|
|
@@ -1408,7 +1408,7 @@ const pt = (e, o) => {
|
|
|
1408
1408
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1409
1409
|
*/
|
|
1410
1410
|
indent: [{
|
|
1411
|
-
indent:
|
|
1411
|
+
indent: b()
|
|
1412
1412
|
}],
|
|
1413
1413
|
/**
|
|
1414
1414
|
* Vertical Alignment
|
|
@@ -1759,14 +1759,14 @@ const pt = (e, o) => {
|
|
|
1759
1759
|
* @see https://tailwindcss.com/docs/border-style
|
|
1760
1760
|
*/
|
|
1761
1761
|
"border-style": [{
|
|
1762
|
-
border: [...
|
|
1762
|
+
border: [...Z(), "hidden", "none"]
|
|
1763
1763
|
}],
|
|
1764
1764
|
/**
|
|
1765
1765
|
* Divide Style
|
|
1766
1766
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
1767
1767
|
*/
|
|
1768
1768
|
"divide-style": [{
|
|
1769
|
-
divide: [...
|
|
1769
|
+
divide: [...Z(), "hidden", "none"]
|
|
1770
1770
|
}],
|
|
1771
1771
|
/**
|
|
1772
1772
|
* Border Color
|
|
@@ -1843,7 +1843,7 @@ const pt = (e, o) => {
|
|
|
1843
1843
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1844
1844
|
*/
|
|
1845
1845
|
"outline-style": [{
|
|
1846
|
-
outline: [...
|
|
1846
|
+
outline: [...Z(), "none", "hidden"]
|
|
1847
1847
|
}],
|
|
1848
1848
|
/**
|
|
1849
1849
|
* Outline Offset
|
|
@@ -1878,9 +1878,9 @@ const pt = (e, o) => {
|
|
|
1878
1878
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1879
1879
|
"",
|
|
1880
1880
|
"none",
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1881
|
+
g,
|
|
1882
|
+
ne,
|
|
1883
|
+
oe
|
|
1884
1884
|
]
|
|
1885
1885
|
}],
|
|
1886
1886
|
/**
|
|
@@ -1895,7 +1895,7 @@ const pt = (e, o) => {
|
|
|
1895
1895
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
1896
1896
|
*/
|
|
1897
1897
|
"inset-shadow": [{
|
|
1898
|
-
"inset-shadow": ["none", x,
|
|
1898
|
+
"inset-shadow": ["none", x, ne, oe]
|
|
1899
1899
|
}],
|
|
1900
1900
|
/**
|
|
1901
1901
|
* Inset Box Shadow Color
|
|
@@ -1962,7 +1962,7 @@ const pt = (e, o) => {
|
|
|
1962
1962
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
1963
1963
|
*/
|
|
1964
1964
|
"text-shadow": [{
|
|
1965
|
-
"text-shadow": ["none", v,
|
|
1965
|
+
"text-shadow": ["none", v, ne, oe]
|
|
1966
1966
|
}],
|
|
1967
1967
|
/**
|
|
1968
1968
|
* Text Shadow Color
|
|
@@ -2235,8 +2235,8 @@ const pt = (e, o) => {
|
|
|
2235
2235
|
"",
|
|
2236
2236
|
"none",
|
|
2237
2237
|
S,
|
|
2238
|
-
|
|
2239
|
-
|
|
2238
|
+
ne,
|
|
2239
|
+
oe
|
|
2240
2240
|
]
|
|
2241
2241
|
}],
|
|
2242
2242
|
/**
|
|
@@ -2372,21 +2372,21 @@ const pt = (e, o) => {
|
|
|
2372
2372
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2373
2373
|
*/
|
|
2374
2374
|
"border-spacing": [{
|
|
2375
|
-
"border-spacing":
|
|
2375
|
+
"border-spacing": b()
|
|
2376
2376
|
}],
|
|
2377
2377
|
/**
|
|
2378
2378
|
* Border Spacing X
|
|
2379
2379
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2380
2380
|
*/
|
|
2381
2381
|
"border-spacing-x": [{
|
|
2382
|
-
"border-spacing-x":
|
|
2382
|
+
"border-spacing-x": b()
|
|
2383
2383
|
}],
|
|
2384
2384
|
/**
|
|
2385
2385
|
* Border Spacing Y
|
|
2386
2386
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
2387
2387
|
*/
|
|
2388
2388
|
"border-spacing-y": [{
|
|
2389
|
-
"border-spacing-y":
|
|
2389
|
+
"border-spacing-y": b()
|
|
2390
2390
|
}],
|
|
2391
2391
|
/**
|
|
2392
2392
|
* Table Layout
|
|
@@ -2476,56 +2476,56 @@ const pt = (e, o) => {
|
|
|
2476
2476
|
* @see https://tailwindcss.com/docs/rotate
|
|
2477
2477
|
*/
|
|
2478
2478
|
rotate: [{
|
|
2479
|
-
rotate:
|
|
2479
|
+
rotate: q()
|
|
2480
2480
|
}],
|
|
2481
2481
|
/**
|
|
2482
2482
|
* Rotate X
|
|
2483
2483
|
* @see https://tailwindcss.com/docs/rotate
|
|
2484
2484
|
*/
|
|
2485
2485
|
"rotate-x": [{
|
|
2486
|
-
"rotate-x":
|
|
2486
|
+
"rotate-x": q()
|
|
2487
2487
|
}],
|
|
2488
2488
|
/**
|
|
2489
2489
|
* Rotate Y
|
|
2490
2490
|
* @see https://tailwindcss.com/docs/rotate
|
|
2491
2491
|
*/
|
|
2492
2492
|
"rotate-y": [{
|
|
2493
|
-
"rotate-y":
|
|
2493
|
+
"rotate-y": q()
|
|
2494
2494
|
}],
|
|
2495
2495
|
/**
|
|
2496
2496
|
* Rotate Z
|
|
2497
2497
|
* @see https://tailwindcss.com/docs/rotate
|
|
2498
2498
|
*/
|
|
2499
2499
|
"rotate-z": [{
|
|
2500
|
-
"rotate-z":
|
|
2500
|
+
"rotate-z": q()
|
|
2501
2501
|
}],
|
|
2502
2502
|
/**
|
|
2503
2503
|
* Scale
|
|
2504
2504
|
* @see https://tailwindcss.com/docs/scale
|
|
2505
2505
|
*/
|
|
2506
2506
|
scale: [{
|
|
2507
|
-
scale:
|
|
2507
|
+
scale: ee()
|
|
2508
2508
|
}],
|
|
2509
2509
|
/**
|
|
2510
2510
|
* Scale X
|
|
2511
2511
|
* @see https://tailwindcss.com/docs/scale
|
|
2512
2512
|
*/
|
|
2513
2513
|
"scale-x": [{
|
|
2514
|
-
"scale-x":
|
|
2514
|
+
"scale-x": ee()
|
|
2515
2515
|
}],
|
|
2516
2516
|
/**
|
|
2517
2517
|
* Scale Y
|
|
2518
2518
|
* @see https://tailwindcss.com/docs/scale
|
|
2519
2519
|
*/
|
|
2520
2520
|
"scale-y": [{
|
|
2521
|
-
"scale-y":
|
|
2521
|
+
"scale-y": ee()
|
|
2522
2522
|
}],
|
|
2523
2523
|
/**
|
|
2524
2524
|
* Scale Z
|
|
2525
2525
|
* @see https://tailwindcss.com/docs/scale
|
|
2526
2526
|
*/
|
|
2527
2527
|
"scale-z": [{
|
|
2528
|
-
"scale-z":
|
|
2528
|
+
"scale-z": ee()
|
|
2529
2529
|
}],
|
|
2530
2530
|
/**
|
|
2531
2531
|
* Scale 3D
|
|
@@ -2579,28 +2579,28 @@ const pt = (e, o) => {
|
|
|
2579
2579
|
* @see https://tailwindcss.com/docs/translate
|
|
2580
2580
|
*/
|
|
2581
2581
|
translate: [{
|
|
2582
|
-
translate:
|
|
2582
|
+
translate: te()
|
|
2583
2583
|
}],
|
|
2584
2584
|
/**
|
|
2585
2585
|
* Translate X
|
|
2586
2586
|
* @see https://tailwindcss.com/docs/translate
|
|
2587
2587
|
*/
|
|
2588
2588
|
"translate-x": [{
|
|
2589
|
-
"translate-x":
|
|
2589
|
+
"translate-x": te()
|
|
2590
2590
|
}],
|
|
2591
2591
|
/**
|
|
2592
2592
|
* Translate Y
|
|
2593
2593
|
* @see https://tailwindcss.com/docs/translate
|
|
2594
2594
|
*/
|
|
2595
2595
|
"translate-y": [{
|
|
2596
|
-
"translate-y":
|
|
2596
|
+
"translate-y": te()
|
|
2597
2597
|
}],
|
|
2598
2598
|
/**
|
|
2599
2599
|
* Translate Z
|
|
2600
2600
|
* @see https://tailwindcss.com/docs/translate
|
|
2601
2601
|
*/
|
|
2602
2602
|
"translate-z": [{
|
|
2603
|
-
"translate-z":
|
|
2603
|
+
"translate-z": te()
|
|
2604
2604
|
}],
|
|
2605
2605
|
/**
|
|
2606
2606
|
* Translate None
|
|
@@ -2678,126 +2678,126 @@ const pt = (e, o) => {
|
|
|
2678
2678
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2679
2679
|
*/
|
|
2680
2680
|
"scroll-m": [{
|
|
2681
|
-
"scroll-m":
|
|
2681
|
+
"scroll-m": b()
|
|
2682
2682
|
}],
|
|
2683
2683
|
/**
|
|
2684
2684
|
* Scroll Margin X
|
|
2685
2685
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2686
2686
|
*/
|
|
2687
2687
|
"scroll-mx": [{
|
|
2688
|
-
"scroll-mx":
|
|
2688
|
+
"scroll-mx": b()
|
|
2689
2689
|
}],
|
|
2690
2690
|
/**
|
|
2691
2691
|
* Scroll Margin Y
|
|
2692
2692
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2693
2693
|
*/
|
|
2694
2694
|
"scroll-my": [{
|
|
2695
|
-
"scroll-my":
|
|
2695
|
+
"scroll-my": b()
|
|
2696
2696
|
}],
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Scroll Margin Start
|
|
2699
2699
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2700
2700
|
*/
|
|
2701
2701
|
"scroll-ms": [{
|
|
2702
|
-
"scroll-ms":
|
|
2702
|
+
"scroll-ms": b()
|
|
2703
2703
|
}],
|
|
2704
2704
|
/**
|
|
2705
2705
|
* Scroll Margin End
|
|
2706
2706
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2707
2707
|
*/
|
|
2708
2708
|
"scroll-me": [{
|
|
2709
|
-
"scroll-me":
|
|
2709
|
+
"scroll-me": b()
|
|
2710
2710
|
}],
|
|
2711
2711
|
/**
|
|
2712
2712
|
* Scroll Margin Top
|
|
2713
2713
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2714
2714
|
*/
|
|
2715
2715
|
"scroll-mt": [{
|
|
2716
|
-
"scroll-mt":
|
|
2716
|
+
"scroll-mt": b()
|
|
2717
2717
|
}],
|
|
2718
2718
|
/**
|
|
2719
2719
|
* Scroll Margin Right
|
|
2720
2720
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2721
2721
|
*/
|
|
2722
2722
|
"scroll-mr": [{
|
|
2723
|
-
"scroll-mr":
|
|
2723
|
+
"scroll-mr": b()
|
|
2724
2724
|
}],
|
|
2725
2725
|
/**
|
|
2726
2726
|
* Scroll Margin Bottom
|
|
2727
2727
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2728
2728
|
*/
|
|
2729
2729
|
"scroll-mb": [{
|
|
2730
|
-
"scroll-mb":
|
|
2730
|
+
"scroll-mb": b()
|
|
2731
2731
|
}],
|
|
2732
2732
|
/**
|
|
2733
2733
|
* Scroll Margin Left
|
|
2734
2734
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2735
2735
|
*/
|
|
2736
2736
|
"scroll-ml": [{
|
|
2737
|
-
"scroll-ml":
|
|
2737
|
+
"scroll-ml": b()
|
|
2738
2738
|
}],
|
|
2739
2739
|
/**
|
|
2740
2740
|
* Scroll Padding
|
|
2741
2741
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2742
2742
|
*/
|
|
2743
2743
|
"scroll-p": [{
|
|
2744
|
-
"scroll-p":
|
|
2744
|
+
"scroll-p": b()
|
|
2745
2745
|
}],
|
|
2746
2746
|
/**
|
|
2747
2747
|
* Scroll Padding X
|
|
2748
2748
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2749
2749
|
*/
|
|
2750
2750
|
"scroll-px": [{
|
|
2751
|
-
"scroll-px":
|
|
2751
|
+
"scroll-px": b()
|
|
2752
2752
|
}],
|
|
2753
2753
|
/**
|
|
2754
2754
|
* Scroll Padding Y
|
|
2755
2755
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2756
2756
|
*/
|
|
2757
2757
|
"scroll-py": [{
|
|
2758
|
-
"scroll-py":
|
|
2758
|
+
"scroll-py": b()
|
|
2759
2759
|
}],
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Scroll Padding Start
|
|
2762
2762
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2763
2763
|
*/
|
|
2764
2764
|
"scroll-ps": [{
|
|
2765
|
-
"scroll-ps":
|
|
2765
|
+
"scroll-ps": b()
|
|
2766
2766
|
}],
|
|
2767
2767
|
/**
|
|
2768
2768
|
* Scroll Padding End
|
|
2769
2769
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2770
2770
|
*/
|
|
2771
2771
|
"scroll-pe": [{
|
|
2772
|
-
"scroll-pe":
|
|
2772
|
+
"scroll-pe": b()
|
|
2773
2773
|
}],
|
|
2774
2774
|
/**
|
|
2775
2775
|
* Scroll Padding Top
|
|
2776
2776
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2777
2777
|
*/
|
|
2778
2778
|
"scroll-pt": [{
|
|
2779
|
-
"scroll-pt":
|
|
2779
|
+
"scroll-pt": b()
|
|
2780
2780
|
}],
|
|
2781
2781
|
/**
|
|
2782
2782
|
* Scroll Padding Right
|
|
2783
2783
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2784
2784
|
*/
|
|
2785
2785
|
"scroll-pr": [{
|
|
2786
|
-
"scroll-pr":
|
|
2786
|
+
"scroll-pr": b()
|
|
2787
2787
|
}],
|
|
2788
2788
|
/**
|
|
2789
2789
|
* Scroll Padding Bottom
|
|
2790
2790
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2791
2791
|
*/
|
|
2792
2792
|
"scroll-pb": [{
|
|
2793
|
-
"scroll-pb":
|
|
2793
|
+
"scroll-pb": b()
|
|
2794
2794
|
}],
|
|
2795
2795
|
/**
|
|
2796
2796
|
* Scroll Padding Left
|
|
2797
2797
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2798
2798
|
*/
|
|
2799
2799
|
"scroll-pl": [{
|
|
2800
|
-
"scroll-pl":
|
|
2800
|
+
"scroll-pl": b()
|
|
2801
2801
|
}],
|
|
2802
2802
|
/**
|
|
2803
2803
|
* Scroll Snap Align
|
|
@@ -2963,18 +2963,18 @@ function me(...e) {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
function tr({ question: e }) {
|
|
2965
2965
|
var d;
|
|
2966
|
-
const { answers: o, setAnswer: t, nextStep: r } =
|
|
2966
|
+
const { answers: o, setAnswer: t, nextStep: r } = X(), n = o[e.id] || "", s = (i) => {
|
|
2967
2967
|
t(e.id, i), setTimeout(() => r(), 400);
|
|
2968
2968
|
}, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2969
2969
|
return pe(() => {
|
|
2970
2970
|
const i = (f) => {
|
|
2971
2971
|
var v;
|
|
2972
|
-
const
|
|
2972
|
+
const g = f.key.toUpperCase(), x = a.indexOf(g);
|
|
2973
2973
|
x >= 0 && x < (((v = e.options) == null ? void 0 : v.length) || 0) && s(e.options[x].value);
|
|
2974
2974
|
};
|
|
2975
2975
|
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
2976
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
|
|
2977
|
+
const g = n === i.value;
|
|
2978
2978
|
return /* @__PURE__ */ z(
|
|
2979
2979
|
I.button,
|
|
2980
2980
|
{
|
|
@@ -2986,15 +2986,15 @@ function tr({ question: e }) {
|
|
|
2986
2986
|
whileTap: { scale: 0.98 },
|
|
2987
2987
|
className: me(
|
|
2988
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
|
-
|
|
2989
|
+
g ? "border-primary bg-primary/10 text-primary shadow-lg" : "border-muted-foreground/20 hover:border-primary/50 hover:bg-white/5"
|
|
2990
2990
|
),
|
|
2991
2991
|
children: [
|
|
2992
2992
|
/* @__PURE__ */ u("div", { className: me(
|
|
2993
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
|
-
|
|
2994
|
+
g ? "bg-primary text-secondary border-primary" : "border-muted-foreground/30 text-muted-foreground group-hover:border-primary group-hover:text-primary"
|
|
2995
2995
|
), children: a[f] }),
|
|
2996
2996
|
/* @__PURE__ */ u("span", { className: "text-xl md:text-2xl font-medium flex-1", children: i.label }),
|
|
2997
|
-
|
|
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" }) })
|
|
2998
2998
|
]
|
|
2999
2999
|
},
|
|
3000
3000
|
String(i.value)
|
|
@@ -3003,7 +3003,7 @@ function tr({ question: e }) {
|
|
|
3003
3003
|
}
|
|
3004
3004
|
function rr({ question: e }) {
|
|
3005
3005
|
var s;
|
|
3006
|
-
const { answers: o, setAnswer: t } =
|
|
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
3007
|
return /* @__PURE__ */ z("div", { className: "flex flex-col gap-6", children: [
|
|
3008
3008
|
/* @__PURE__ */ u("div", { className: "flex gap-4 flex-wrap", children: Array.from({ length: n }).map((a, d) => {
|
|
3009
3009
|
const i = d + 1, f = i <= r;
|
|
@@ -3048,10 +3048,13 @@ function rr({ question: e }) {
|
|
|
3048
3048
|
] });
|
|
3049
3049
|
}
|
|
3050
3050
|
function or({ question: e }) {
|
|
3051
|
-
const { schema: o } =
|
|
3051
|
+
const { schema: o } = X(), t = o.questions.findIndex((d) => d.id === e.id) + 1, r = o.questions.length, n = {
|
|
3052
3052
|
hidden: { opacity: 0, y: 20 },
|
|
3053
3053
|
visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] } }
|
|
3054
|
-
}
|
|
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();
|
|
3055
3058
|
return /* @__PURE__ */ z(
|
|
3056
3059
|
I.div,
|
|
3057
3060
|
{
|
|
@@ -3074,7 +3077,7 @@ function or({ question: e }) {
|
|
|
3074
3077
|
variants: n,
|
|
3075
3078
|
className: "text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2",
|
|
3076
3079
|
children: [
|
|
3077
|
-
e.title,
|
|
3080
|
+
s(e.title),
|
|
3078
3081
|
" ",
|
|
3079
3082
|
/* @__PURE__ */ u("span", { className: "text-primary", children: "*" })
|
|
3080
3083
|
]
|
|
@@ -3085,7 +3088,7 @@ function or({ question: e }) {
|
|
|
3085
3088
|
{
|
|
3086
3089
|
variants: n,
|
|
3087
3090
|
className: "text-lg md:text-xl text-muted-foreground font-normal leading-relaxed max-w-2xl mt-2",
|
|
3088
|
-
children: e.description
|
|
3091
|
+
children: s(e.description)
|
|
3089
3092
|
}
|
|
3090
3093
|
)
|
|
3091
3094
|
] }),
|
|
@@ -3131,15 +3134,15 @@ function dr({ schema: e, onSubmit: o }) {
|
|
|
3131
3134
|
color: r.primaryColor,
|
|
3132
3135
|
borderRadius: r.borderRadius || "8px",
|
|
3133
3136
|
fontWeight: 600
|
|
3134
|
-
}, { autoReload: f, reloadDelay:
|
|
3137
|
+
}, { autoReload: f, reloadDelay: g = 3e3 } = e;
|
|
3135
3138
|
if (pe(() => {
|
|
3136
3139
|
if (t.isCompleted && f) {
|
|
3137
3140
|
const k = setTimeout(() => {
|
|
3138
3141
|
t.resetForm();
|
|
3139
|
-
},
|
|
3142
|
+
}, g);
|
|
3140
3143
|
return () => clearTimeout(k);
|
|
3141
3144
|
}
|
|
3142
|
-
}, [t.isCompleted, f,
|
|
3145
|
+
}, [t.isCompleted, f, g, t.resetForm]), t.isCompleted)
|
|
3143
3146
|
return /* @__PURE__ */ z(
|
|
3144
3147
|
"div",
|
|
3145
3148
|
{
|
|
@@ -3151,7 +3154,7 @@ function dr({ schema: e, onSubmit: o }) {
|
|
|
3151
3154
|
{
|
|
3152
3155
|
initial: { width: "0%" },
|
|
3153
3156
|
animate: { width: "100%" },
|
|
3154
|
-
transition: { duration:
|
|
3157
|
+
transition: { duration: g / 1e3, ease: "linear" },
|
|
3155
3158
|
className: "absolute top-0 left-0 h-1 bg-green-500 z-50"
|
|
3156
3159
|
}
|
|
3157
3160
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(w,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("react/jsx-runtime"),require("react"),require("framer-motion"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","framer-motion","lucide-react"],s):(w=typeof globalThis!="undefined"?globalThis:w||self,s(w.SawabonaForms={},w.jsxRuntime,w.React,w.Motion,w.Lucide))})(this,(function(w,s,v,k,Y){"use strict";var Qt=Object.defineProperty,Kt=Object.defineProperties;var Yt=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var He=(w,s,v)=>s in w?Qt(w,s,{enumerable:!0,configurable:!0,writable:!0,value:v}):w[s]=v,T=(w,s)=>{for(var v in s||(s={}))Qe.call(s,v)&&He(w,v,s[v]);if(ae)for(var v of ae(s))Ke.call(s,v)&&He(w,v,s[v]);return w},j=(w,s)=>Kt(w,Yt(s));var Ye=w=>typeof w=="symbol"?w:w+"",Xe=(w,s)=>{var v={};for(var k in w)Qe.call(w,k)&&s.indexOf(k)<0&&(v[k]=w[k]);if(w!=null&&ae)for(var k of ae(w))s.indexOf(k)<0&&Ke.call(w,k)&&(v[k]=w[k]);return v};function Je({schema:e,onSubmit:o}){var N;const[r,t]=v.useState({answers:{},currentStepId:((N=e.questions[0])==null?void 0:N.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1}),n=v.useMemo(()=>e.questions.findIndex(u=>u.id===r.currentStepId),[e.questions,r.currentStepId]),a=e.questions[n],i=v.useCallback((u,y)=>{t(C=>j(T({},C),{answers:j(T({},C.answers),{[u]:y}),errors:j(T({},C.errors),{[u]:""})}))},[]),m=v.useCallback((u,y)=>{t(C=>{if(y===null){const B=C.errors,{[u]:H}=B,V=Xe(B,[Ye(u)]);return j(T({},C),{errors:V})}return j(T({},C),{errors:j(T({},C.errors),{[u]:y})})})},[]),l=v.useCallback(()=>{var C;if(!a)return!0;const u=r.answers[a.id],y=a.validation;return y&&y.required&&(u===void 0||u===""||Array.isArray(u)&&u.length===0)?(m(a.id,((C=e.i18n)==null?void 0:C.required)||"This field is required"),!1):!0},[a,r.answers,m,e.i18n]),f=v.useCallback(u=>{const y=e.questions.findIndex(C=>C.id===u.id);return y<e.questions.length-1?e.questions[y+1].id:"submit"},[e.questions]),b=v.useCallback(()=>{if(!l())return;const u=f(a);u==="submit"?(t(y=>j(T({},y),{isCompleted:!0})),o==null||o(r.answers)):t(y=>j(T({},y),{history:[...y.history,y.currentStepId],currentStepId:u}))},[a,r.answers,l,f,o]),x=v.useCallback(()=>{if(r.history.length===0)return;const u=r.history[r.history.length-1];t(y=>j(T({},y),{history:y.history.slice(0,-1),currentStepId:u}))},[r.history]),S=v.useCallback(u=>{if(!e.questions.some(C=>C.id===u)){console.warn(`Step ${u} does not exist`);return}t(C=>j(T({},C),{history:[...C.history,C.currentStepId],currentStepId:u}))},[e.questions]),A=v.useCallback(()=>{var u;t({answers:{},currentStepId:((u=e.questions[0])==null?void 0:u.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1})},[e.questions]);return j(T({},r),{setAnswer:i,nextStep:b,prevStep:x,jumpToStep:S,submitForm:()=>o==null?void 0:o(r.answers),resetForm:A,registerError:m,progress:n/e.questions.length*100})}const ge=v.createContext(void 0),Z=()=>{const e=v.useContext(ge);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e};function Ze({question:e}){const{answers:o,setAnswer:r,nextStep:t}=Z(),n=o[e.id],a=n!=null?String(n):"",i=v.useRef(null);v.useEffect(()=>{const b=setTimeout(()=>{var x;(x=i.current)==null||x.focus()},500);return()=>clearTimeout(b)},[e.id]);const m=b=>{var A;let x=b.target.value;const S=((A=e.validation)==null?void 0:A.maxLength)||2048;if(x.length>S&&(x=x.slice(0,S)),e.type==="number"){const N=x===""?"":parseFloat(x);r(e.id,N)}else r(e.id,x)},l=()=>{var b,x,S,A,N;if((b=e.validation)!=null&&b.required&&!a)return!1;if(a){if((x=e.validation)!=null&&x.minLength&&a.length<e.validation.minLength||e.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a))return!1;if((S=e.validation)!=null&&S.pattern)try{if(!new RegExp(e.validation.pattern).test(a))return!1}catch(u){console.error("Invalid regex pattern in schema",u)}if(e.type==="number"){const u=parseFloat(a);if(!isNaN(u)&&(((A=e.validation)==null?void 0:A.min)!==void 0&&u<e.validation.min||((N=e.validation)==null?void 0:N.max)!==void 0&&u>e.validation.max))return!1}}return!0},f=b=>{if(b.key==="Enter"&&!b.shiftKey){if(b.preventDefault(),!l()){const x=document.querySelector(".sawabona-form-container")||document.body;x.classList.add("shake-animation"),setTimeout(()=>x.classList.remove("shake-animation"),500);return}t()}};return s.jsxs("div",{className:"w-full relative group",children:[s.jsx("input",{ref:i,type:e.type,value:a,onChange:m,onKeyDown:f,placeholder:e.placeholder||"Type your answer...",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"}),s.jsx(k.motion.div,{initial:{width:"0%"},animate:{width:a?"100%":"0%"},transition:{duration:.3},className:"absolute bottom-0 left-0 h-[2px] bg-primary"}),s.jsx("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:s.jsxs("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:[s.jsx("span",{children:"Pressione"}),s.jsx("span",{className:"font-bold border border-primary/30 rounded px-1 min-w-[20px] text-center",children:"↵"}),s.jsx("span",{children:"Enter"})]})})]})}function be(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(r=be(e[o]))&&(t&&(t+=" "),t+=r)}else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function qe(){for(var e,o,r=0,t="",n=arguments.length;r<n;r++)(e=arguments[r])&&(o=be(e))&&(t&&(t+=" "),t+=o);return t}const Re=(e,o)=>{const r=new Array(e.length+o.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let t=0;t<o.length;t++)r[e.length+t]=o[t];return r},et=(e,o)=>({classGroupId:e,validator:o}),he=(e=new Map,o=null,r)=>({nextPart:e,validators:o,classGroupId:r}),q="-",xe=[],tt="arbitrary..",rt=e=>{const o=st(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ot(i);const m=i.split(q),l=m[0]===""&&m.length>1?1:0;return ye(m,l,o)},getConflictingClassGroupIds:(i,m)=>{if(m){const l=t[i],f=r[i];return l?f?Re(f,l):l:f||xe}return r[i]||xe}}},ye=(e,o,r)=>{if(e.length-o===0)return r.classGroupId;const n=e[o],a=r.nextPart.get(n);if(a){const f=ye(e,o+1,a);if(f)return f}const i=r.validators;if(i===null)return;const m=o===0?e.join(q):e.slice(o).join(q),l=i.length;for(let f=0;f<l;f++){const b=i[f];if(b.validator(m))return b.classGroupId}},ot=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),r=o.indexOf(":"),t=o.slice(0,r);return t?tt+t:void 0})(),st=e=>{const{theme:o,classGroups:r}=e;return nt(r,o)},nt=(e,o)=>{const r=he();for(const t in e){const n=e[t];ie(n,r,t,o)}return r},ie=(e,o,r,t)=>{const n=e.length;for(let a=0;a<n;a++){const i=e[a];at(i,o,r,t)}},at=(e,o,r,t)=>{if(typeof e=="string"){it(e,o,r);return}if(typeof e=="function"){lt(e,o,r,t);return}ct(e,o,r,t)},it=(e,o,r)=>{const t=e===""?o:we(o,e);t.classGroupId=r},lt=(e,o,r,t)=>{if(dt(e)){ie(e(t),o,r,t);return}o.validators===null&&(o.validators=[]),o.validators.push(et(r,e))},ct=(e,o,r,t)=>{const n=Object.entries(e),a=n.length;for(let i=0;i<a;i++){const[m,l]=n[i];ie(l,we(o,m),r,t)}},we=(e,o)=>{let r=e;const t=o.split(q),n=t.length;for(let a=0;a<n;a++){const i=t[a];let m=r.nextPart.get(i);m||(m=he(),r.nextPart.set(i,m)),r=m}return r},dt=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,r=Object.create(null),t=Object.create(null);const n=(a,i)=>{r[a]=i,o++,o>e&&(o=0,t=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=t[a])!==void 0)return n(a,i),i},set(a,i){a in r?r[a]=i:n(a,i)}}},le="!",ve=":",pt=[],ke=(e,o,r,t,n)=>({modifiers:e,hasImportantModifier:o,baseClassName:r,maybePostfixModifierPosition:t,isExternal:n}),ut=e=>{const{prefix:o,experimentalParseClassName:r}=e;let t=n=>{const a=[];let i=0,m=0,l=0,f;const b=n.length;for(let u=0;u<b;u++){const y=n[u];if(i===0&&m===0){if(y===ve){a.push(n.slice(l,u)),l=u+1;continue}if(y==="/"){f=u;continue}}y==="["?i++:y==="]"?i--:y==="("?m++:y===")"&&m--}const x=a.length===0?n:n.slice(l);let S=x,A=!1;x.endsWith(le)?(S=x.slice(0,-1),A=!0):x.startsWith(le)&&(S=x.slice(1),A=!0);const N=f&&f>l?f-l:void 0;return ke(a,A,S,N)};if(o){const n=o+ve,a=t;t=i=>i.startsWith(n)?a(i.slice(n.length)):ke(pt,!1,i,void 0,!0)}if(r){const n=t;t=a=>r({className:a,parseClassName:n})}return t},ft=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((r,t)=>{o.set(r,1e6+t)}),r=>{const t=[];let n=[];for(let a=0;a<r.length;a++){const i=r[a],m=i[0]==="[",l=o.has(i);m||l?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(i)):n.push(i)}return n.length>0&&(n.sort(),t.push(...n)),t}},gt=e=>T({cache:mt(e.cacheSize),parseClassName:ut(e),sortModifiers:ft(e)},rt(e)),bt=/\s+/,ht=(e,o)=>{const{parseClassName:r,getClassGroupId:t,getConflictingClassGroupIds:n,sortModifiers:a}=o,i=[],m=e.trim().split(bt);let l="";for(let f=m.length-1;f>=0;f-=1){const b=m[f],{isExternal:x,modifiers:S,hasImportantModifier:A,baseClassName:N,maybePostfixModifierPosition:u}=r(b);if(x){l=b+(l.length>0?" "+l:l);continue}let y=!!u,C=t(y?N.substring(0,u):N);if(!C){if(!y){l=b+(l.length>0?" "+l:l);continue}if(C=t(N),!C){l=b+(l.length>0?" "+l:l);continue}y=!1}const B=S.length===0?"":S.length===1?S[0]:a(S).join(":"),H=A?B+le:B,V=H+C;if(i.indexOf(V)>-1)continue;i.push(V);const Q=n(C,y);for(let D=0;D<Q.length;++D){const J=Q[D];i.push(H+J)}l=b+(l.length>0?" "+l:l)}return l},xt=(...e)=>{let o=0,r,t,n="";for(;o<e.length;)(r=e[o++])&&(t=Ce(r))&&(n&&(n+=" "),n+=t);return n},Ce=e=>{if(typeof e=="string")return e;let o,r="";for(let t=0;t<e.length;t++)e[t]&&(o=Ce(e[t]))&&(r&&(r+=" "),r+=o);return r},yt=(e,...o)=>{let r,t,n,a;const i=l=>{const f=o.reduce((b,x)=>x(b),e());return r=gt(f),t=r.cache.get,n=r.cache.set,a=m,m(l)},m=l=>{const f=t(l);if(f)return f;const b=ht(l,r);return n(l,b),b};return a=i,(...l)=>a(xt(...l))},wt=[],z=e=>{const o=r=>r[e]||wt;return o.isThemeGetter=!0,o},Se=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vt=/^\d+\/\d+$/,kt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ct=/\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$/,St=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,U=e=>vt.test(e),h=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith("%")&&h(e.slice(0,-1)),F=e=>kt.test(e),ze=()=>!0,At=e=>Ct.test(e)&&!St.test(e),de=()=>!1,It=e=>Nt.test(e),Tt=e=>zt.test(e),Pt=e=>!c(e)&&!d(e),Et=e=>M(e,je,de),c=e=>Se.test(e),W=e=>M(e,Fe,At),Ae=e=>M(e,Wt,h),jt=e=>M(e,Ge,ze),Ft=e=>M(e,Le,de),Ie=e=>M(e,Pe,de),Lt=e=>M(e,Ee,Tt),R=e=>M(e,Oe,It),d=e=>Ne.test(e),X=e=>_(e,Fe),Gt=e=>_(e,Le),Te=e=>_(e,Pe),Ot=e=>_(e,je),Mt=e=>_(e,Ee),ee=e=>_(e,Oe,!0),Vt=e=>_(e,Ge,!0),M=(e,o,r)=>{const t=Se.exec(e);return t?t[1]?o(t[1]):r(t[2]):!1},_=(e,o,r=!1)=>{const t=Ne.exec(e);return t?t[1]?o(t[1]):r:!1},Pe=e=>e==="position"||e==="percentage",Ee=e=>e==="image"||e==="url",je=e=>e==="length"||e==="size"||e==="bg-size",Fe=e=>e==="length",Wt=e=>e==="number",Le=e=>e==="family-name",Ge=e=>e==="number"||e==="weight",Oe=e=>e==="shadow",_t=yt(()=>{const e=z("color"),o=z("font"),r=z("text"),t=z("font-weight"),n=z("tracking"),a=z("leading"),i=z("breakpoint"),m=z("container"),l=z("spacing"),f=z("radius"),b=z("shadow"),x=z("inset-shadow"),S=z("text-shadow"),A=z("drop-shadow"),N=z("blur"),u=z("perspective"),y=z("aspect"),C=z("ease"),B=z("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...V(),d,c],D=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],g=()=>[d,c,l],L=()=>[U,"full","auto",...g()],Me=()=>[O,"none","subgrid",d,c],Ve=()=>["auto",{span:["full",O,d,c]},O,d,c],te=()=>[O,"auto",d,c],We=()=>["auto","min","max","fr",d,c],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...g()],$=()=>[U,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],p=()=>[e,d,c],_e=()=>[...V(),Te,Ie,{position:[d,c]}],Be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],De=()=>["auto","cover","contain",Ot,Et,{size:[d,c]}],ue=()=>[ce,X,W],P=()=>["","none","full",f,d,c],E=()=>["",h,X,W],re=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[h,ce,Te,Ie],Ue=()=>["","none",N,d,c],oe=()=>["none",h,d,c],se=()=>["none",h,d,c],fe=()=>[h,d,c],ne=()=>[U,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[F],breakpoint:[F],color:[ze],container:[F],"drop-shadow":[F],ease:["in","out","in-out"],font:[Pt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[F],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[F],shadow:[F],spacing:["px",h],text:[F],"text-shadow":[F],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",U,c,d,y]}],container:["container"],columns:[{columns:[h,c,d,m]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",d,c]}],basis:[{basis:[U,"full","auto",m,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[h,U,"auto","initial","none",c]}],grow:[{grow:["",h,d,c]}],shrink:[{shrink:["",h,d,c]}],order:[{order:[O,"first","last","none",d,c]}],"grid-cols":[{"grid-cols":Me()}],"col-start-end":[{col:Ve()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":Me()}],"row-start-end":[{row:Ve()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":We()}],"auto-rows":[{"auto-rows":We()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[m,"screen",...$()]}],"min-w":[{"min-w":[m,"screen","none",...$()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,X,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,Vt,jt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ce,c]}],"font-family":[{font:[Gt,Ft,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,d,c]}],"line-clamp":[{"line-clamp":[h,"none",d,Ae]}],leading:[{leading:[a,...g()]}],"list-image":[{"list-image":["none",d,c]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",d,c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:p()}],"text-color":[{text:p()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[h,"from-font","auto",d,W]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[h,"auto",d,c]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d,c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d,c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:Be()}],"bg-size":[{bg:De()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,d,c],radial:["",d,c],conic:[O,d,c]},Mt,Lt]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:E()}],"border-w-x":[{"border-x":E()}],"border-w-y":[{"border-y":E()}],"border-w-s":[{"border-s":E()}],"border-w-e":[{"border-e":E()}],"border-w-t":[{"border-t":E()}],"border-w-r":[{"border-r":E()}],"border-w-b":[{"border-b":E()}],"border-w-l":[{"border-l":E()}],"divide-x":[{"divide-x":E()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":E()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:p()}],"border-color-x":[{"border-x":p()}],"border-color-y":[{"border-y":p()}],"border-color-s":[{"border-s":p()}],"border-color-e":[{"border-e":p()}],"border-color-t":[{"border-t":p()}],"border-color-r":[{"border-r":p()}],"border-color-b":[{"border-b":p()}],"border-color-l":[{"border-l":p()}],"divide-color":[{divide:p()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[h,d,c]}],"outline-w":[{outline:["",h,X,W]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",b,ee,R]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",x,ee,R]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[h,W]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":E()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",S,ee,R]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[h,d,c]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[h]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":p()}],"mask-image-linear-to-color":[{"mask-linear-to":p()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":p()}],"mask-image-t-to-color":[{"mask-t-to":p()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":p()}],"mask-image-r-to-color":[{"mask-r-to":p()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":p()}],"mask-image-b-to-color":[{"mask-b-to":p()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":p()}],"mask-image-l-to-color":[{"mask-l-to":p()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":p()}],"mask-image-x-to-color":[{"mask-x-to":p()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[d,c]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":p()}],"mask-image-radial-to-color":[{"mask-radial-to":p()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[h]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":p()}],"mask-image-conic-to-color":[{"mask-conic-to":p()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:Be()}],"mask-size":[{mask:De()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",d,c]}],filter:[{filter:["","none",d,c]}],blur:[{blur:Ue()}],brightness:[{brightness:[h,d,c]}],contrast:[{contrast:[h,d,c]}],"drop-shadow":[{"drop-shadow":["","none",A,ee,R]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",h,d,c]}],"hue-rotate":[{"hue-rotate":[h,d,c]}],invert:[{invert:["",h,d,c]}],saturate:[{saturate:[h,d,c]}],sepia:[{sepia:["",h,d,c]}],"backdrop-filter":[{"backdrop-filter":["","none",d,c]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[h,d,c]}],"backdrop-contrast":[{"backdrop-contrast":[h,d,c]}],"backdrop-grayscale":[{"backdrop-grayscale":["",h,d,c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h,d,c]}],"backdrop-invert":[{"backdrop-invert":["",h,d,c]}],"backdrop-opacity":[{"backdrop-opacity":[h,d,c]}],"backdrop-saturate":[{"backdrop-saturate":[h,d,c]}],"backdrop-sepia":[{"backdrop-sepia":["",h,d,c]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",d,c]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[h,"initial",d,c]}],ease:[{ease:["linear","initial",C,d,c]}],delay:[{delay:[h,d,c]}],animate:[{animate:["none",B,d,c]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[u,d,c]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[d,c,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:p()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:p()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{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",d,c]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d,c]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[h,X,W,Ae]}],stroke:[{stroke:["none",...p()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"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"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"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"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function me(...e){return _t(qe(e))}function Bt({question:e}){var m;const{answers:o,setAnswer:r,nextStep:t}=Z(),n=o[e.id]||"",a=l=>{r(e.id,l),setTimeout(()=>t(),400)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return v.useEffect(()=>{const l=f=>{var S;const b=f.key.toUpperCase(),x=i.indexOf(b);x>=0&&x<(((S=e.options)==null?void 0:S.length)||0)&&a(e.options[x].value)};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e.options,e.id]),s.jsx("div",{className:"flex flex-col gap-3 w-full max-w-xl",children:(m=e.options)==null?void 0:m.map((l,f)=>{const b=n===l.value;return s.jsxs(k.motion.button,{onClick:()=>a(l.value),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:f*.1,duration:.4},whileHover:{scale:1.02,x:5,transition:{duration:.2}},whileTap:{scale:.98},className:me("group flex items-center gap-4 p-4 md:p-6 rounded-lg border-2 text-left transition-all duration-200 outline-none",b?"border-primary bg-primary/10 text-primary shadow-lg":"border-muted-foreground/20 hover:border-primary/50 hover:bg-white/5"),children:[s.jsx("div",{className:me("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",b?"bg-primary text-secondary border-primary":"border-muted-foreground/30 text-muted-foreground group-hover:border-primary group-hover:text-primary"),children:i[f]}),s.jsx("span",{className:"text-xl md:text-2xl font-medium flex-1",children:l.label}),b&&s.jsx(k.motion.div,{initial:{scale:0},animate:{scale:1},children:s.jsx(Y.Check,{className:"w-6 h-6 md:w-8 md:h-8"})})]},String(l.value))})})}function Dt({question:e}){var a;const{answers:o,setAnswer:r}=Z(),t=o[e.id]||0,n=Math.min(((a=e.validation)==null?void 0:a.max)||5,20);return s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{className:"flex gap-4 flex-wrap",children:Array.from({length:n}).map((i,m)=>{const l=m+1,f=l<=t;return s.jsx(k.motion.button,{type:"button",className:"focus:outline-none",onClick:()=>r(e.id,l),whileHover:{scale:1.2,rotate:5},whileTap:{scale:.9},initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:m*.05},children:s.jsx(Y.Star,{className:me("w-12 h-12 md:w-16 md:h-16 transition-all duration-300",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"),strokeWidth:1.5})},m)})}),s.jsxs("div",{className:"flex justify-between w-full max-w-[300px] md:max-w-[400px] px-2 items-center",children:[s.jsx("span",{className:"text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide",children:e.minLabel||"Poor"}),s.jsx(k.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:t?1:0,scale:t?1:.8},className:"font-bold text-primary text-xl",children:t?`${t} / ${n}`:""}),s.jsx("span",{className:"text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide",children:e.maxLabel||"Excellent"})]})]})}function $t({question:e}){const{schema:o}=Z(),r=o.questions.findIndex(a=>a.id===e.id)+1,t=o.questions.length,n={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.22,1,.36,1]}}};return s.jsxs(k.motion.div,{className:"flex flex-col gap-8 w-full max-w-4xl mx-auto",initial:"hidden",animate:"visible",variants:{visible:{transition:{staggerChildren:.1}}},children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(k.motion.div,{variants:n,className:"flex gap-4 items-baseline",children:s.jsxs("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:[s.jsx("span",{children:r}),s.jsx("span",{className:"opacity-40 text-xs",children:"/"}),s.jsx("span",{className:"opacity-60",children:t})]})}),s.jsxs(k.motion.h2,{variants:n,className:"text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2",children:[e.title," ",s.jsx("span",{className:"text-primary",children:"*"})]}),e.description&&s.jsx(k.motion.p,{variants:n,className:"text-lg md:text-xl text-muted-foreground font-normal leading-relaxed max-w-2xl mt-2",children:e.description})]}),s.jsx(k.motion.div,{variants:n,className:"w-full mt-6",children:e.type==="text"||e.type==="email"||e.type==="number"||e.type==="url"?s.jsx(Ze,{question:e}):e.type==="select"?s.jsx(Bt,{question:e}):e.type==="rating"?s.jsx(Dt,{question:e}):s.jsxs("div",{className:"p-4 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 rounded",children:["Unsupported question type: ",e.type," (ID: ",e.id,")"]})})]})}const Ut={next:"Next",back:"Back",submit:"Submit",required:"Required",optional:"Optional",stepInfo:"Question {{current}} of {{total}}"};function Ht({schema:e,onSubmit:o}){var A;const r=Je({schema:e,onSubmit:o}),t=e.theme||{backgroundColor:"#ffffff",textColor:"#000000",primaryColor:"#000000",borderRadius:"8px",fontFamily:"sans-serif"},n=T(T({},Ut),e.i18n),a={backgroundColor:t.backgroundColor,color:t.textColor,fontFamily:t.fontFamily},i=t.buttonVariant==="outline",m={backgroundColor:i?"transparent":t.primaryColor,color:i?t.primaryColor:t.textColor,border:i?`2px solid ${t.primaryColor}`:"none",borderRadius:t.borderRadius||"8px",fontWeight:600},l={color:t.primaryColor,borderRadius:t.borderRadius||"8px",fontWeight:600},{autoReload:f,reloadDelay:b=3e3}=e;if(v.useEffect(()=>{if(r.isCompleted&&f){const N=setTimeout(()=>{r.resetForm()},b);return()=>clearTimeout(N)}},[r.isCompleted,f,b,r.resetForm]),r.isCompleted)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8 text-center relative overflow-hidden",style:a,children:[f&&s.jsx(k.motion.div,{initial:{width:"0%"},animate:{width:"100%"},transition:{duration:b/1e3,ease:"linear"},className:"absolute top-0 left-0 h-1 bg-green-500 z-50"}),s.jsxs(k.motion.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},transition:{duration:.6,ease:[.22,1,.36,1]},className:"flex flex-col items-center",children:[s.jsx("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:s.jsx(Y.Check,{size:48})}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 tracking-tight",children:"Obrigado!"}),s.jsx("p",{className:"text-xl opacity-70 max-w-md leading-relaxed",children:"Suas respostas foram enviadas com sucesso."})]})]});const x=e.questions.find(N=>N.id===r.currentStepId),S=(e.questions.findIndex(N=>N.id===r.currentStepId)+1)/e.questions.length*100;return s.jsx(ge.Provider,{value:j(T({},r),{schema:e}),children:s.jsxs("div",{className:"w-full h-full flex flex-col relative overflow-hidden transition-colors duration-700",style:a,children:[s.jsxs("div",{className:"absolute top-0 left-0 w-full h-1 z-50",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-current opacity-10"}),s.jsx(k.motion.div,{className:"h-full relative z-10",initial:{width:0},animate:{width:`${S}%`},transition:{duration:.5,ease:"easeInOut"},style:{backgroundColor:t.primaryColor}})]}),s.jsx("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:s.jsx(k.AnimatePresence,{mode:"wait",children:x&&s.jsx(k.motion.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.5,ease:[.22,1,.36,1]},className:"w-full",children:s.jsx($t,{question:x})},x.id)})}),s.jsxs("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:[t.showPoweredBy!==!1&&s.jsxs("a",{href:"#",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",children:[s.jsx("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"}),s.jsx("span",{className:"text-[10px] md:text-xs font-mono font-bold tracking-[0.2em] uppercase transition-colors shadow-primary",style:{color:t.brandColor||t.primaryColor},children:((A=t.poweredBy)==null?void 0:A.replace("Powered by ",""))||"SAWABONA TECH"})]}),s.jsxs("div",{className:"flex items-center gap-4 order-2 md:order-3 ml-auto",children:[s.jsx(k.motion.button,{onClick:r.prevStep,disabled:r.history.length===0,whileHover:{scale:1.05},whileTap:{scale:.95},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",style:l,children:s.jsx(Y.ChevronLeft,{size:24})}),s.jsxs(k.motion.button,{onClick:r.nextStep,whileHover:{scale:1.02},whileTap:{scale:.98},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",style:m,children:[s.jsx("span",{children:r.currentStepId===e.questions[e.questions.length-1].id?t.submitText||n.submit:n.next}),r.currentStepId!==e.questions[e.questions.length-1].id&&s.jsx(Y.ChevronRight,{size:20,strokeWidth:3})]})]})]})]})})}w.FormRenderer=Ht,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(w,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("react/jsx-runtime"),require("react"),require("framer-motion"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","framer-motion","lucide-react"],s):(w=typeof globalThis!="undefined"?globalThis:w||self,s(w.SawabonaForms={},w.jsxRuntime,w.React,w.Motion,w.Lucide))})(this,(function(w,s,v,k,Y){"use strict";var Qt=Object.defineProperty,Kt=Object.defineProperties;var Yt=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var He=(w,s,v)=>s in w?Qt(w,s,{enumerable:!0,configurable:!0,writable:!0,value:v}):w[s]=v,T=(w,s)=>{for(var v in s||(s={}))Qe.call(s,v)&&He(w,v,s[v]);if(ae)for(var v of ae(s))Ke.call(s,v)&&He(w,v,s[v]);return w},j=(w,s)=>Kt(w,Yt(s));var Ye=w=>typeof w=="symbol"?w:w+"",Xe=(w,s)=>{var v={};for(var k in w)Qe.call(w,k)&&s.indexOf(k)<0&&(v[k]=w[k]);if(w!=null&&ae)for(var k of ae(w))s.indexOf(k)<0&&Ke.call(w,k)&&(v[k]=w[k]);return v};function Je({schema:e,onSubmit:o}){var N;const[r,t]=v.useState({answers:{},currentStepId:((N=e.questions[0])==null?void 0:N.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1}),n=v.useMemo(()=>e.questions.findIndex(u=>u.id===r.currentStepId),[e.questions,r.currentStepId]),a=e.questions[n],i=v.useCallback((u,y)=>{t(C=>j(T({},C),{answers:j(T({},C.answers),{[u]:y}),errors:j(T({},C.errors),{[u]:""})}))},[]),m=v.useCallback((u,y)=>{t(C=>{if(y===null){const B=C.errors,{[u]:H}=B,V=Xe(B,[Ye(u)]);return j(T({},C),{errors:V})}return j(T({},C),{errors:j(T({},C.errors),{[u]:y})})})},[]),l=v.useCallback(()=>{var C;if(!a)return!0;const u=r.answers[a.id],y=a.validation;return y&&y.required&&(u===void 0||u===""||Array.isArray(u)&&u.length===0)?(m(a.id,((C=e.i18n)==null?void 0:C.required)||"This field is required"),!1):!0},[a,r.answers,m,e.i18n]),f=v.useCallback(u=>{const y=e.questions.findIndex(C=>C.id===u.id);return y<e.questions.length-1?e.questions[y+1].id:"submit"},[e.questions]),g=v.useCallback(()=>{if(!l())return;const u=f(a);u==="submit"?(t(y=>j(T({},y),{isCompleted:!0})),o==null||o(r.answers)):t(y=>j(T({},y),{history:[...y.history,y.currentStepId],currentStepId:u}))},[a,r.answers,l,f,o]),x=v.useCallback(()=>{if(r.history.length===0)return;const u=r.history[r.history.length-1];t(y=>j(T({},y),{history:y.history.slice(0,-1),currentStepId:u}))},[r.history]),S=v.useCallback(u=>{if(!e.questions.some(C=>C.id===u)){console.warn(`Step ${u} does not exist`);return}t(C=>j(T({},C),{history:[...C.history,C.currentStepId],currentStepId:u}))},[e.questions]),A=v.useCallback(()=>{var u;t({answers:{},currentStepId:((u=e.questions[0])==null?void 0:u.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1})},[e.questions]);return j(T({},r),{setAnswer:i,nextStep:g,prevStep:x,jumpToStep:S,submitForm:()=>o==null?void 0:o(r.answers),resetForm:A,registerError:m,progress:n/e.questions.length*100})}const ge=v.createContext(void 0),X=()=>{const e=v.useContext(ge);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e};function Ze({question:e}){const{answers:o,setAnswer:r,nextStep:t}=X(),n=o[e.id],a=n!=null?String(n):"",i=v.useRef(null);v.useEffect(()=>{const g=setTimeout(()=>{var x;(x=i.current)==null||x.focus()},500);return()=>clearTimeout(g)},[e.id]);const m=g=>{var A;let x=g.target.value;const S=((A=e.validation)==null?void 0:A.maxLength)||2048;if(x.length>S&&(x=x.slice(0,S)),e.type==="number"){const N=x===""?"":parseFloat(x);r(e.id,N)}else r(e.id,x)},l=()=>{var g,x,S,A,N;if((g=e.validation)!=null&&g.required&&!a)return!1;if(a){if((x=e.validation)!=null&&x.minLength&&a.length<e.validation.minLength||e.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a))return!1;if((S=e.validation)!=null&&S.pattern)try{if(!new RegExp(e.validation.pattern).test(a))return!1}catch(u){console.error("Invalid regex pattern in schema",u)}if(e.type==="number"){const u=parseFloat(a);if(!isNaN(u)&&(((A=e.validation)==null?void 0:A.min)!==void 0&&u<e.validation.min||((N=e.validation)==null?void 0:N.max)!==void 0&&u>e.validation.max))return!1}}return!0},f=g=>{if(g.key==="Enter"&&!g.shiftKey){if(g.preventDefault(),!l()){const x=document.querySelector(".sawabona-form-container")||document.body;x.classList.add("shake-animation"),setTimeout(()=>x.classList.remove("shake-animation"),500);return}t()}};return s.jsxs("div",{className:"w-full relative group",children:[s.jsx("input",{ref:i,type:e.type,value:a,onChange:m,onKeyDown:f,placeholder:e.placeholder||"Type your answer...",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"}),s.jsx(k.motion.div,{initial:{width:"0%"},animate:{width:a?"100%":"0%"},transition:{duration:.3},className:"absolute bottom-0 left-0 h-[2px] bg-primary"}),s.jsx("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:s.jsxs("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:[s.jsx("span",{children:"Pressione"}),s.jsx("span",{className:"font-bold border border-primary/30 rounded px-1 min-w-[20px] text-center",children:"↵"}),s.jsx("span",{children:"Enter"})]})})]})}function be(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(r=be(e[o]))&&(t&&(t+=" "),t+=r)}else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function qe(){for(var e,o,r=0,t="",n=arguments.length;r<n;r++)(e=arguments[r])&&(o=be(e))&&(t&&(t+=" "),t+=o);return t}const Re=(e,o)=>{const r=new Array(e.length+o.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let t=0;t<o.length;t++)r[e.length+t]=o[t];return r},et=(e,o)=>({classGroupId:e,validator:o}),he=(e=new Map,o=null,r)=>({nextPart:e,validators:o,classGroupId:r}),q="-",xe=[],tt="arbitrary..",rt=e=>{const o=st(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ot(i);const m=i.split(q),l=m[0]===""&&m.length>1?1:0;return ye(m,l,o)},getConflictingClassGroupIds:(i,m)=>{if(m){const l=t[i],f=r[i];return l?f?Re(f,l):l:f||xe}return r[i]||xe}}},ye=(e,o,r)=>{if(e.length-o===0)return r.classGroupId;const n=e[o],a=r.nextPart.get(n);if(a){const f=ye(e,o+1,a);if(f)return f}const i=r.validators;if(i===null)return;const m=o===0?e.join(q):e.slice(o).join(q),l=i.length;for(let f=0;f<l;f++){const g=i[f];if(g.validator(m))return g.classGroupId}},ot=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),r=o.indexOf(":"),t=o.slice(0,r);return t?tt+t:void 0})(),st=e=>{const{theme:o,classGroups:r}=e;return nt(r,o)},nt=(e,o)=>{const r=he();for(const t in e){const n=e[t];ie(n,r,t,o)}return r},ie=(e,o,r,t)=>{const n=e.length;for(let a=0;a<n;a++){const i=e[a];at(i,o,r,t)}},at=(e,o,r,t)=>{if(typeof e=="string"){it(e,o,r);return}if(typeof e=="function"){lt(e,o,r,t);return}ct(e,o,r,t)},it=(e,o,r)=>{const t=e===""?o:we(o,e);t.classGroupId=r},lt=(e,o,r,t)=>{if(dt(e)){ie(e(t),o,r,t);return}o.validators===null&&(o.validators=[]),o.validators.push(et(r,e))},ct=(e,o,r,t)=>{const n=Object.entries(e),a=n.length;for(let i=0;i<a;i++){const[m,l]=n[i];ie(l,we(o,m),r,t)}},we=(e,o)=>{let r=e;const t=o.split(q),n=t.length;for(let a=0;a<n;a++){const i=t[a];let m=r.nextPart.get(i);m||(m=he(),r.nextPart.set(i,m)),r=m}return r},dt=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,r=Object.create(null),t=Object.create(null);const n=(a,i)=>{r[a]=i,o++,o>e&&(o=0,t=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=t[a])!==void 0)return n(a,i),i},set(a,i){a in r?r[a]=i:n(a,i)}}},le="!",ve=":",pt=[],ke=(e,o,r,t,n)=>({modifiers:e,hasImportantModifier:o,baseClassName:r,maybePostfixModifierPosition:t,isExternal:n}),ut=e=>{const{prefix:o,experimentalParseClassName:r}=e;let t=n=>{const a=[];let i=0,m=0,l=0,f;const g=n.length;for(let u=0;u<g;u++){const y=n[u];if(i===0&&m===0){if(y===ve){a.push(n.slice(l,u)),l=u+1;continue}if(y==="/"){f=u;continue}}y==="["?i++:y==="]"?i--:y==="("?m++:y===")"&&m--}const x=a.length===0?n:n.slice(l);let S=x,A=!1;x.endsWith(le)?(S=x.slice(0,-1),A=!0):x.startsWith(le)&&(S=x.slice(1),A=!0);const N=f&&f>l?f-l:void 0;return ke(a,A,S,N)};if(o){const n=o+ve,a=t;t=i=>i.startsWith(n)?a(i.slice(n.length)):ke(pt,!1,i,void 0,!0)}if(r){const n=t;t=a=>r({className:a,parseClassName:n})}return t},ft=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((r,t)=>{o.set(r,1e6+t)}),r=>{const t=[];let n=[];for(let a=0;a<r.length;a++){const i=r[a],m=i[0]==="[",l=o.has(i);m||l?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(i)):n.push(i)}return n.length>0&&(n.sort(),t.push(...n)),t}},gt=e=>T({cache:mt(e.cacheSize),parseClassName:ut(e),sortModifiers:ft(e)},rt(e)),bt=/\s+/,ht=(e,o)=>{const{parseClassName:r,getClassGroupId:t,getConflictingClassGroupIds:n,sortModifiers:a}=o,i=[],m=e.trim().split(bt);let l="";for(let f=m.length-1;f>=0;f-=1){const g=m[f],{isExternal:x,modifiers:S,hasImportantModifier:A,baseClassName:N,maybePostfixModifierPosition:u}=r(g);if(x){l=g+(l.length>0?" "+l:l);continue}let y=!!u,C=t(y?N.substring(0,u):N);if(!C){if(!y){l=g+(l.length>0?" "+l:l);continue}if(C=t(N),!C){l=g+(l.length>0?" "+l:l);continue}y=!1}const B=S.length===0?"":S.length===1?S[0]:a(S).join(":"),H=A?B+le:B,V=H+C;if(i.indexOf(V)>-1)continue;i.push(V);const Q=n(C,y);for(let D=0;D<Q.length;++D){const Z=Q[D];i.push(H+Z)}l=g+(l.length>0?" "+l:l)}return l},xt=(...e)=>{let o=0,r,t,n="";for(;o<e.length;)(r=e[o++])&&(t=Ce(r))&&(n&&(n+=" "),n+=t);return n},Ce=e=>{if(typeof e=="string")return e;let o,r="";for(let t=0;t<e.length;t++)e[t]&&(o=Ce(e[t]))&&(r&&(r+=" "),r+=o);return r},yt=(e,...o)=>{let r,t,n,a;const i=l=>{const f=o.reduce((g,x)=>x(g),e());return r=gt(f),t=r.cache.get,n=r.cache.set,a=m,m(l)},m=l=>{const f=t(l);if(f)return f;const g=ht(l,r);return n(l,g),g};return a=i,(...l)=>a(xt(...l))},wt=[],z=e=>{const o=r=>r[e]||wt;return o.isThemeGetter=!0,o},Se=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vt=/^\d+\/\d+$/,kt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ct=/\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$/,St=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,U=e=>vt.test(e),h=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith("%")&&h(e.slice(0,-1)),F=e=>kt.test(e),ze=()=>!0,At=e=>Ct.test(e)&&!St.test(e),de=()=>!1,It=e=>Nt.test(e),Tt=e=>zt.test(e),Pt=e=>!c(e)&&!d(e),Et=e=>M(e,je,de),c=e=>Se.test(e),W=e=>M(e,Fe,At),Ae=e=>M(e,Wt,h),jt=e=>M(e,Ge,ze),Ft=e=>M(e,Le,de),Ie=e=>M(e,Pe,de),Lt=e=>M(e,Ee,Tt),R=e=>M(e,Oe,It),d=e=>Ne.test(e),J=e=>_(e,Fe),Gt=e=>_(e,Le),Te=e=>_(e,Pe),Ot=e=>_(e,je),Mt=e=>_(e,Ee),ee=e=>_(e,Oe,!0),Vt=e=>_(e,Ge,!0),M=(e,o,r)=>{const t=Se.exec(e);return t?t[1]?o(t[1]):r(t[2]):!1},_=(e,o,r=!1)=>{const t=Ne.exec(e);return t?t[1]?o(t[1]):r:!1},Pe=e=>e==="position"||e==="percentage",Ee=e=>e==="image"||e==="url",je=e=>e==="length"||e==="size"||e==="bg-size",Fe=e=>e==="length",Wt=e=>e==="number",Le=e=>e==="family-name",Ge=e=>e==="number"||e==="weight",Oe=e=>e==="shadow",_t=yt(()=>{const e=z("color"),o=z("font"),r=z("text"),t=z("font-weight"),n=z("tracking"),a=z("leading"),i=z("breakpoint"),m=z("container"),l=z("spacing"),f=z("radius"),g=z("shadow"),x=z("inset-shadow"),S=z("text-shadow"),A=z("drop-shadow"),N=z("blur"),u=z("perspective"),y=z("aspect"),C=z("ease"),B=z("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...V(),d,c],D=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],b=()=>[d,c,l],L=()=>[U,"full","auto",...b()],Me=()=>[O,"none","subgrid",d,c],Ve=()=>["auto",{span:["full",O,d,c]},O,d,c],te=()=>[O,"auto",d,c],We=()=>["auto","min","max","fr",d,c],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...b()],$=()=>[U,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],p=()=>[e,d,c],_e=()=>[...V(),Te,Ie,{position:[d,c]}],Be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],De=()=>["auto","cover","contain",Ot,Et,{size:[d,c]}],ue=()=>[ce,J,W],P=()=>["","none","full",f,d,c],E=()=>["",h,J,W],re=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[h,ce,Te,Ie],Ue=()=>["","none",N,d,c],oe=()=>["none",h,d,c],se=()=>["none",h,d,c],fe=()=>[h,d,c],ne=()=>[U,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[F],breakpoint:[F],color:[ze],container:[F],"drop-shadow":[F],ease:["in","out","in-out"],font:[Pt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[F],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[F],shadow:[F],spacing:["px",h],text:[F],"text-shadow":[F],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",U,c,d,y]}],container:["container"],columns:[{columns:[h,c,d,m]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",d,c]}],basis:[{basis:[U,"full","auto",m,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[h,U,"auto","initial","none",c]}],grow:[{grow:["",h,d,c]}],shrink:[{shrink:["",h,d,c]}],order:[{order:[O,"first","last","none",d,c]}],"grid-cols":[{"grid-cols":Me()}],"col-start-end":[{col:Ve()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":Me()}],"row-start-end":[{row:Ve()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":We()}],"auto-rows":[{"auto-rows":We()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[m,"screen",...$()]}],"min-w":[{"min-w":[m,"screen","none",...$()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,J,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,Vt,jt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ce,c]}],"font-family":[{font:[Gt,Ft,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,d,c]}],"line-clamp":[{"line-clamp":[h,"none",d,Ae]}],leading:[{leading:[a,...b()]}],"list-image":[{"list-image":["none",d,c]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",d,c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:p()}],"text-color":[{text:p()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[h,"from-font","auto",d,W]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[h,"auto",d,c]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d,c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d,c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:Be()}],"bg-size":[{bg:De()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,d,c],radial:["",d,c],conic:[O,d,c]},Mt,Lt]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:E()}],"border-w-x":[{"border-x":E()}],"border-w-y":[{"border-y":E()}],"border-w-s":[{"border-s":E()}],"border-w-e":[{"border-e":E()}],"border-w-t":[{"border-t":E()}],"border-w-r":[{"border-r":E()}],"border-w-b":[{"border-b":E()}],"border-w-l":[{"border-l":E()}],"divide-x":[{"divide-x":E()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":E()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:p()}],"border-color-x":[{"border-x":p()}],"border-color-y":[{"border-y":p()}],"border-color-s":[{"border-s":p()}],"border-color-e":[{"border-e":p()}],"border-color-t":[{"border-t":p()}],"border-color-r":[{"border-r":p()}],"border-color-b":[{"border-b":p()}],"border-color-l":[{"border-l":p()}],"divide-color":[{divide:p()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[h,d,c]}],"outline-w":[{outline:["",h,J,W]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",g,ee,R]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",x,ee,R]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[h,W]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":E()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",S,ee,R]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[h,d,c]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[h]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":p()}],"mask-image-linear-to-color":[{"mask-linear-to":p()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":p()}],"mask-image-t-to-color":[{"mask-t-to":p()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":p()}],"mask-image-r-to-color":[{"mask-r-to":p()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":p()}],"mask-image-b-to-color":[{"mask-b-to":p()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":p()}],"mask-image-l-to-color":[{"mask-l-to":p()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":p()}],"mask-image-x-to-color":[{"mask-x-to":p()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[d,c]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":p()}],"mask-image-radial-to-color":[{"mask-radial-to":p()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[h]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":p()}],"mask-image-conic-to-color":[{"mask-conic-to":p()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:Be()}],"mask-size":[{mask:De()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",d,c]}],filter:[{filter:["","none",d,c]}],blur:[{blur:Ue()}],brightness:[{brightness:[h,d,c]}],contrast:[{contrast:[h,d,c]}],"drop-shadow":[{"drop-shadow":["","none",A,ee,R]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",h,d,c]}],"hue-rotate":[{"hue-rotate":[h,d,c]}],invert:[{invert:["",h,d,c]}],saturate:[{saturate:[h,d,c]}],sepia:[{sepia:["",h,d,c]}],"backdrop-filter":[{"backdrop-filter":["","none",d,c]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[h,d,c]}],"backdrop-contrast":[{"backdrop-contrast":[h,d,c]}],"backdrop-grayscale":[{"backdrop-grayscale":["",h,d,c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h,d,c]}],"backdrop-invert":[{"backdrop-invert":["",h,d,c]}],"backdrop-opacity":[{"backdrop-opacity":[h,d,c]}],"backdrop-saturate":[{"backdrop-saturate":[h,d,c]}],"backdrop-sepia":[{"backdrop-sepia":["",h,d,c]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",d,c]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[h,"initial",d,c]}],ease:[{ease:["linear","initial",C,d,c]}],delay:[{delay:[h,d,c]}],animate:[{animate:["none",B,d,c]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[u,d,c]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[d,c,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:p()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:p()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{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",d,c]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d,c]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[h,J,W,Ae]}],stroke:[{stroke:["none",...p()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"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"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"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"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function me(...e){return _t(qe(e))}function Bt({question:e}){var m;const{answers:o,setAnswer:r,nextStep:t}=X(),n=o[e.id]||"",a=l=>{r(e.id,l),setTimeout(()=>t(),400)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return v.useEffect(()=>{const l=f=>{var S;const g=f.key.toUpperCase(),x=i.indexOf(g);x>=0&&x<(((S=e.options)==null?void 0:S.length)||0)&&a(e.options[x].value)};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e.options,e.id]),s.jsx("div",{className:"flex flex-col gap-3 w-full max-w-xl",children:(m=e.options)==null?void 0:m.map((l,f)=>{const g=n===l.value;return s.jsxs(k.motion.button,{onClick:()=>a(l.value),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:f*.1,duration:.4},whileHover:{scale:1.02,x:5,transition:{duration:.2}},whileTap:{scale:.98},className:me("group flex items-center gap-4 p-4 md:p-6 rounded-lg border-2 text-left transition-all duration-200 outline-none",g?"border-primary bg-primary/10 text-primary shadow-lg":"border-muted-foreground/20 hover:border-primary/50 hover:bg-white/5"),children:[s.jsx("div",{className:me("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",g?"bg-primary text-secondary border-primary":"border-muted-foreground/30 text-muted-foreground group-hover:border-primary group-hover:text-primary"),children:i[f]}),s.jsx("span",{className:"text-xl md:text-2xl font-medium flex-1",children:l.label}),g&&s.jsx(k.motion.div,{initial:{scale:0},animate:{scale:1},children:s.jsx(Y.Check,{className:"w-6 h-6 md:w-8 md:h-8"})})]},String(l.value))})})}function Dt({question:e}){var a;const{answers:o,setAnswer:r}=X(),t=o[e.id]||0,n=Math.min(((a=e.validation)==null?void 0:a.max)||5,20);return s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{className:"flex gap-4 flex-wrap",children:Array.from({length:n}).map((i,m)=>{const l=m+1,f=l<=t;return s.jsx(k.motion.button,{type:"button",className:"focus:outline-none",onClick:()=>r(e.id,l),whileHover:{scale:1.2,rotate:5},whileTap:{scale:.9},initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:m*.05},children:s.jsx(Y.Star,{className:me("w-12 h-12 md:w-16 md:h-16 transition-all duration-300",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"),strokeWidth:1.5})},m)})}),s.jsxs("div",{className:"flex justify-between w-full max-w-[300px] md:max-w-[400px] px-2 items-center",children:[s.jsx("span",{className:"text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide",children:e.minLabel||"Poor"}),s.jsx(k.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:t?1:0,scale:t?1:.8},className:"font-bold text-primary text-xl",children:t?`${t} / ${n}`:""}),s.jsx("span",{className:"text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide",children:e.maxLabel||"Excellent"})]})]})}function $t({question:e}){const{schema:o}=X(),r=o.questions.findIndex(m=>m.id===e.id)+1,t=o.questions.length,n={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.22,1,.36,1]}}},a=m=>m&&m.replace(/\{\{(\w+)\}\}/g,(l,f)=>{const g=i.answers[f];return g!=null?String(g):""}),i=X();return s.jsxs(k.motion.div,{className:"flex flex-col gap-8 w-full max-w-4xl mx-auto",initial:"hidden",animate:"visible",variants:{visible:{transition:{staggerChildren:.1}}},children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(k.motion.div,{variants:n,className:"flex gap-4 items-baseline",children:s.jsxs("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:[s.jsx("span",{children:r}),s.jsx("span",{className:"opacity-40 text-xs",children:"/"}),s.jsx("span",{className:"opacity-60",children:t})]})}),s.jsxs(k.motion.h2,{variants:n,className:"text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2",children:[a(e.title)," ",s.jsx("span",{className:"text-primary",children:"*"})]}),e.description&&s.jsx(k.motion.p,{variants:n,className:"text-lg md:text-xl text-muted-foreground font-normal leading-relaxed max-w-2xl mt-2",children:a(e.description)})]}),s.jsx(k.motion.div,{variants:n,className:"w-full mt-6",children:e.type==="text"||e.type==="email"||e.type==="number"||e.type==="url"?s.jsx(Ze,{question:e}):e.type==="select"?s.jsx(Bt,{question:e}):e.type==="rating"?s.jsx(Dt,{question:e}):s.jsxs("div",{className:"p-4 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 rounded",children:["Unsupported question type: ",e.type," (ID: ",e.id,")"]})})]})}const Ut={next:"Next",back:"Back",submit:"Submit",required:"Required",optional:"Optional",stepInfo:"Question {{current}} of {{total}}"};function Ht({schema:e,onSubmit:o}){var A;const r=Je({schema:e,onSubmit:o}),t=e.theme||{backgroundColor:"#ffffff",textColor:"#000000",primaryColor:"#000000",borderRadius:"8px",fontFamily:"sans-serif"},n=T(T({},Ut),e.i18n),a={backgroundColor:t.backgroundColor,color:t.textColor,fontFamily:t.fontFamily},i=t.buttonVariant==="outline",m={backgroundColor:i?"transparent":t.primaryColor,color:i?t.primaryColor:t.textColor,border:i?`2px solid ${t.primaryColor}`:"none",borderRadius:t.borderRadius||"8px",fontWeight:600},l={color:t.primaryColor,borderRadius:t.borderRadius||"8px",fontWeight:600},{autoReload:f,reloadDelay:g=3e3}=e;if(v.useEffect(()=>{if(r.isCompleted&&f){const N=setTimeout(()=>{r.resetForm()},g);return()=>clearTimeout(N)}},[r.isCompleted,f,g,r.resetForm]),r.isCompleted)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8 text-center relative overflow-hidden",style:a,children:[f&&s.jsx(k.motion.div,{initial:{width:"0%"},animate:{width:"100%"},transition:{duration:g/1e3,ease:"linear"},className:"absolute top-0 left-0 h-1 bg-green-500 z-50"}),s.jsxs(k.motion.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},transition:{duration:.6,ease:[.22,1,.36,1]},className:"flex flex-col items-center",children:[s.jsx("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:s.jsx(Y.Check,{size:48})}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 tracking-tight",children:"Obrigado!"}),s.jsx("p",{className:"text-xl opacity-70 max-w-md leading-relaxed",children:"Suas respostas foram enviadas com sucesso."})]})]});const x=e.questions.find(N=>N.id===r.currentStepId),S=(e.questions.findIndex(N=>N.id===r.currentStepId)+1)/e.questions.length*100;return s.jsx(ge.Provider,{value:j(T({},r),{schema:e}),children:s.jsxs("div",{className:"w-full h-full flex flex-col relative overflow-hidden transition-colors duration-700",style:a,children:[s.jsxs("div",{className:"absolute top-0 left-0 w-full h-1 z-50",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-current opacity-10"}),s.jsx(k.motion.div,{className:"h-full relative z-10",initial:{width:0},animate:{width:`${S}%`},transition:{duration:.5,ease:"easeInOut"},style:{backgroundColor:t.primaryColor}})]}),s.jsx("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:s.jsx(k.AnimatePresence,{mode:"wait",children:x&&s.jsx(k.motion.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.5,ease:[.22,1,.36,1]},className:"w-full",children:s.jsx($t,{question:x})},x.id)})}),s.jsxs("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:[t.showPoweredBy!==!1&&s.jsxs("a",{href:"#",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",children:[s.jsx("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"}),s.jsx("span",{className:"text-[10px] md:text-xs font-mono font-bold tracking-[0.2em] uppercase transition-colors shadow-primary",style:{color:t.brandColor||t.primaryColor},children:((A=t.poweredBy)==null?void 0:A.replace("Powered by ",""))||"SAWABONA TECH"})]}),s.jsxs("div",{className:"flex items-center gap-4 order-2 md:order-3 ml-auto",children:[s.jsx(k.motion.button,{onClick:r.prevStep,disabled:r.history.length===0,whileHover:{scale:1.05},whileTap:{scale:.95},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",style:l,children:s.jsx(Y.ChevronLeft,{size:24})}),s.jsxs(k.motion.button,{onClick:r.nextStep,whileHover:{scale:1.02},whileTap:{scale:.98},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",style:m,children:[s.jsx("span",{children:r.currentStepId===e.questions[e.questions.length-1].id?t.submitText||n.submit:n.next}),r.currentStepId!==e.questions[e.questions.length-1].id&&s.jsx(Y.ChevronRight,{size:20,strokeWidth:3})]})]})]})]})})}w.FormRenderer=Ht,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sawabona/forms",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/sawabona-forms.umd.js",
|
|
7
7
|
"module": "./dist/sawabona-forms.es.js",
|
|
@@ -25,11 +25,15 @@
|
|
|
25
25
|
"lint": "eslint .",
|
|
26
26
|
"preview": "vite preview"
|
|
27
27
|
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"clsx": "^2.1.1",
|
|
30
|
+
"framer-motion": "^12.0.0",
|
|
31
|
+
"lucide-react": "^0.475.0",
|
|
32
|
+
"tailwind-merge": "^3.4.1"
|
|
33
|
+
},
|
|
28
34
|
"peerDependencies": {
|
|
29
35
|
"react": "^19.2.0",
|
|
30
|
-
"react-dom": "^19.2.0"
|
|
31
|
-
"framer-motion": "^12.0.0",
|
|
32
|
-
"lucide-react": "^0.475.0"
|
|
36
|
+
"react-dom": "^19.2.0"
|
|
33
37
|
},
|
|
34
38
|
"devDependencies": {
|
|
35
39
|
"@eslint/js": "^9.39.1",
|
|
@@ -44,17 +48,14 @@
|
|
|
44
48
|
"autoprefixer": "^10.4.24",
|
|
45
49
|
"browserslist": "^4.28.1",
|
|
46
50
|
"class-variance-authority": "^0.7.1",
|
|
47
|
-
"clsx": "^2.1.1",
|
|
48
51
|
"eslint": "^9.39.1",
|
|
49
52
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
50
53
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
51
|
-
"framer-motion": "^12.34.1",
|
|
52
54
|
"globals": "^16.5.0",
|
|
53
55
|
"gray-matter": "^4.0.3",
|
|
54
56
|
"highlight.js": "^11.11.1",
|
|
55
57
|
"i18next": "^25.8.10",
|
|
56
58
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
57
|
-
"lucide-react": "^0.574.0",
|
|
58
59
|
"postcss": "^8.5.6",
|
|
59
60
|
"postcss-preset-env": "^11.1.3",
|
|
60
61
|
"react-i18next": "^16.5.4",
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
"rehype-highlight": "^7.0.2",
|
|
64
65
|
"remark-gfm": "^4.0.1",
|
|
65
66
|
"sonner": "^2.0.7",
|
|
66
|
-
"tailwind-merge": "^3.4.1",
|
|
67
67
|
"tailwindcss": "^4.1.18",
|
|
68
68
|
"typescript": "~5.9.3",
|
|
69
69
|
"typescript-eslint": "^8.48.0",
|