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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
import { style, keyframes } from "@vanilla-extract/css"
import { themeContract } from "../styles/theme.css"
const spin = keyframes({
"0%": { transform: "rotate(0deg)" },
"100%": { transform: "rotate(360deg)" },
})
/**
* Dropdown container
*/
export const container = style({
position: "relative",
})
/**
* Main trigger button with gradient border effect
*/
export const trigger = style({
display: "flex",
alignItems: "center",
gap: themeContract.space[3],
paddingLeft: themeContract.space[4],
paddingRight: themeContract.space[4],
paddingTop: themeContract.space[3],
paddingBottom: themeContract.space[3],
borderRadius: themeContract.radii.xl,
border: "2px solid transparent",
backgroundImage:
"linear-gradient(#1a1f29, #1a1f29), linear-gradient(150.262deg, #A4E8F5 0%, #267FFA 26%, #464646 49%, #747474 70%, #A4E8F5 100%)",
backgroundOrigin: "border-box",
backgroundClip: "padding-box, border-box",
boxShadow: "inset 0px 2px 1px rgba(84, 84, 84, 0.15)",
backdropFilter: "blur(12px)",
WebkitBackdropFilter: "blur(12px)",
transition: themeContract.transitions.normal,
cursor: "pointer",
minWidth: "15rem", // min-w-60 = 240px = 15rem
selectors: {
"&:hover": {
boxShadow: "inset 0px 2px 1px rgba(84, 84, 84, 0.25)",
},
},
})
export const triggerIcon = style({
width: "1rem",
height: "1rem",
color: themeContract.colors.text.secondary,
})
export const triggerContent = style({
flex: 1,
textAlign: "left",
})
export const triggerLabel = style({
fontSize: themeContract.typography.fontSize.sm,
color: themeContract.colors.text.secondary,
fontWeight: themeContract.typography.fontWeight.medium,
})
export const triggerSubtext = style({
fontSize: themeContract.typography.fontSize.xs,
color: themeContract.colors.text.muted,
})
export const triggerChevron = style({
width: "1rem",
height: "1rem",
color: themeContract.colors.text.secondary,
transition: "transform 200ms ease",
})
export const triggerChevronOpen = style({
transform: "rotate(180deg)",
})
/**
* Dropdown menu
*/
export const dropdown = style({
position: "absolute",
top: "100%",
left: 0,
right: 0,
marginTop: themeContract.space[2],
background: "rgba(15, 23, 42, 0.95)", // slate-900/95
backdropFilter: "blur(12px)",
WebkitBackdropFilter: "blur(12px)",
border: "1px solid rgba(71, 85, 105, 0.4)", // slate-700/40
borderRadius: themeContract.radii.xl,
boxShadow:
"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)", // shadow-xl
zIndex: 20,
overflow: "hidden",
})
export const dropdownInner = style({
padding: themeContract.space[1],
})
/**
* Search container and form
*/
export const searchContainer = style({
display: "flex",
alignItems: "center",
gap: themeContract.space[2],
padding: themeContract.space[2],
borderBottom: "1px solid rgba(71, 85, 105, 0.4)", // slate-700/40
})
export const searchForm = style({
flex: 1,
display: "flex",
alignItems: "center",
gap: themeContract.space[2],
})
export const searchButton = style({
color: themeContract.colors.text.muted,
padding: themeContract.space[1],
cursor: "pointer",
border: "none",
background: "transparent",
transition: themeContract.transitions.normal,
selectors: {
"&:hover:not(:disabled)": {
color: themeContract.colors.text.secondary,
},
"&:disabled": {
opacity: 0.5,
cursor: "not-allowed",
},
},
})
export const searchIcon = style({
width: "1rem",
height: "1rem",
})
export const searchInput = style({
flex: 1,
backgroundColor: "transparent",
fontSize: themeContract.typography.fontSize.sm,
color: themeContract.colors.text.secondary,
border: "none",
outline: "none",
"::placeholder": {
color: themeContract.colors.text.muted,
},
})
export const searchSpinner = style({
width: "1rem",
height: "1rem",
borderRadius: "50%",
border: "2px solid rgba(148, 163, 184, 0.3)", // slate-400 with opacity
borderTopColor: "rgb(148, 163, 184)", // slate-400
animation: `${spin} 1s linear infinite`,
})
export const searchClearButton = style({
color: themeContract.colors.text.muted,
cursor: "pointer",
border: "none",
background: "transparent",
transition: themeContract.transitions.normal,
selectors: {
"&:hover": {
color: themeContract.colors.text.secondary,
},
},
})
/**
* Dropdown list container
*/
export const dropdownList = style({
maxHeight: "16rem", // max-h-64
overflowY: "auto",
})
/**
* Dropdown items
*/
const dropdownItemBase = style({
width: "100%",
display: "flex",
alignItems: "center",
justifyContent: "space-between",
paddingLeft: themeContract.space[3],
paddingRight: themeContract.space[3],
paddingTop: themeContract.space[2],
paddingBottom: themeContract.space[2],
borderRadius: themeContract.radii.lg,
textAlign: "left",
transition: themeContract.transitions.normal,
cursor: "pointer",
border: "none",
background: "transparent",
})
export const dropdownItem = style([
dropdownItemBase,
{
color: themeContract.colors.text.secondary,
selectors: {
"&:hover": {
backgroundColor: "rgba(51, 65, 85, 0.5)", // slate-700/50
},
},
},
])
export const dropdownItemActive = style([
dropdownItemBase,
{
backgroundColor: "rgba(59, 130, 246, 0.2)", // blue-500/20
color: "rgb(147, 197, 253)", // blue-300
},
])
export const dropdownItemHighlighted = style([
dropdownItemBase,
{
backgroundColor: "rgba(51, 65, 85, 0.7)", // slate-700/70
color: themeContract.colors.text.secondary,
},
])
export const dropdownItemLabel = style({
fontSize: themeContract.typography.fontSize.sm,
flex: 1,
})
export const dropdownItemLabelTruncate = style({
fontSize: themeContract.typography.fontSize.sm,
flex: 1,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
})
export const dropdownItemBadge = style({
backgroundColor: "rgba(51, 65, 85, 0.5)", // slate-700/50
color: themeContract.colors.text.secondary,
fontSize: themeContract.typography.fontSize.xs,
marginLeft: themeContract.space[2],
})
/**
* Empty state message
*/
export const emptyState = style({
paddingLeft: themeContract.space[3],
paddingRight: themeContract.space[3],
paddingTop: themeContract.space[2],
paddingBottom: themeContract.space[2],
fontSize: themeContract.typography.fontSize.sm,
color: themeContract.colors.text.muted,
textAlign: "center",
})
|