tree.ts
3.94 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
const color = [
"primary",
"secondary",
"success",
"info",
"warning",
"error",
"neutral"
] as const
const size = [
"xs",
"sm",
"md",
"lg",
"xl"
] as const
export default {
"slots": {
"root": "relative isolate",
"item": "w-full",
"listWithChildren": "border-s border-default",
"itemWithChildren": "ps-1.5 -ms-px",
"link": "relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
"linkLeadingIcon": "shrink-0 relative",
"linkLabel": "truncate",
"linkTrailing": "ms-auto inline-flex gap-1.5 items-center",
"linkTrailingIcon": "shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"
},
"variants": {
"virtualize": {
"true": {
"root": "overflow-y-auto"
}
},
"color": {
"primary": {
"link": "focus-visible:before:ring-primary"
},
"secondary": {
"link": "focus-visible:before:ring-secondary"
},
"success": {
"link": "focus-visible:before:ring-success"
},
"info": {
"link": "focus-visible:before:ring-info"
},
"warning": {
"link": "focus-visible:before:ring-warning"
},
"error": {
"link": "focus-visible:before:ring-error"
},
"neutral": {
"link": "focus-visible:before:ring-inverted"
}
},
"size": {
"xs": {
"listWithChildren": "ms-4",
"link": "px-2 py-1 text-xs gap-1",
"linkLeadingIcon": "size-4",
"linkTrailingIcon": "size-4"
},
"sm": {
"listWithChildren": "ms-4.5",
"link": "px-2.5 py-1.5 text-xs gap-1.5",
"linkLeadingIcon": "size-4",
"linkTrailingIcon": "size-4"
},
"md": {
"listWithChildren": "ms-5",
"link": "px-2.5 py-1.5 text-sm gap-1.5",
"linkLeadingIcon": "size-5",
"linkTrailingIcon": "size-5"
},
"lg": {
"listWithChildren": "ms-5.5",
"link": "px-3 py-2 text-sm gap-2",
"linkLeadingIcon": "size-5",
"linkTrailingIcon": "size-5"
},
"xl": {
"listWithChildren": "ms-6",
"link": "px-3 py-2 text-base gap-2",
"linkLeadingIcon": "size-6",
"linkTrailingIcon": "size-6"
}
},
"selected": {
"true": {
"link": "before:bg-elevated"
}
},
"disabled": {
"true": {
"link": "cursor-not-allowed opacity-75"
}
}
},
"compoundVariants": [
{
"color": "primary" as typeof color[number],
"selected": true,
"class": {
"link": "text-primary"
}
},
{
"color": "secondary" as typeof color[number],
"selected": true,
"class": {
"link": "text-secondary"
}
},
{
"color": "success" as typeof color[number],
"selected": true,
"class": {
"link": "text-success"
}
},
{
"color": "info" as typeof color[number],
"selected": true,
"class": {
"link": "text-info"
}
},
{
"color": "warning" as typeof color[number],
"selected": true,
"class": {
"link": "text-warning"
}
},
{
"color": "error" as typeof color[number],
"selected": true,
"class": {
"link": "text-error"
}
},
{
"color": "neutral" as typeof color[number],
"selected": true,
"class": {
"link": "text-highlighted"
}
},
{
"selected": false,
"disabled": false,
"class": {
"link": [
"hover:text-highlighted hover:before:bg-elevated/50",
"transition-colors before:transition-colors"
]
}
}
],
"defaultVariants": {
"color": "primary" as typeof color[number],
"size": "md" as typeof size[number]
}
}