form-field.ts
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const size = [
"xs",
"sm",
"md",
"lg",
"xl"
] as const
const orientation = [
"vertical",
"horizontal"
] as const
export default {
"slots": {
"root": "",
"wrapper": "",
"labelWrapper": "flex content-center items-center justify-between gap-1",
"label": "block font-medium text-default",
"container": "relative",
"description": "text-muted",
"error": "mt-2 text-error",
"hint": "text-muted",
"help": "mt-2 text-muted"
},
"variants": {
"size": {
"xs": {
"root": "text-xs"
},
"sm": {
"root": "text-xs"
},
"md": {
"root": "text-sm"
},
"lg": {
"root": "text-sm"
},
"xl": {
"root": "text-base"
}
},
"required": {
"true": {
"label": "after:content-['*'] after:ms-0.5 after:text-error"
}
},
"orientation": {
"vertical": {
"container": "mt-1"
},
"horizontal": {
"root": "flex justify-between place-items-baseline gap-2"
}
}
},
"defaultVariants": {
"size": "md" as typeof size[number],
"orientation": "vertical" as typeof orientation[number]
}
}