@lets-events/react 4.0.0 → 6.0.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/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +20 -18
- package/CHANGELOG.md +13 -0
- package/dist/index.d.mts +2855 -164
- package/dist/index.d.ts +2855 -164
- package/dist/index.js +1428 -403
- package/dist/index.mjs +1374 -369
- package/package.json +1 -1
- package/src/components/Alert.tsx +256 -0
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +129 -121
- package/src/components/Box.tsx +3 -3
- package/src/components/Button.tsx +328 -348
- package/src/components/ButtonGroup.tsx +484 -477
- package/src/components/CheckboxGroup.tsx +214 -208
- package/src/components/Container.tsx +40 -0
- package/src/components/Dropdown.tsx +167 -109
- package/src/components/Filter.tsx +164 -95
- package/src/components/Flex.tsx +118 -47
- package/src/components/Grid.tsx +138 -0
- package/src/components/Icon.tsx +47 -47
- package/src/components/Modal.tsx +109 -0
- package/src/components/RadioGroup.tsx +210 -203
- package/src/components/Section.tsx +34 -0
- package/src/components/Step.tsx +148 -0
- package/src/components/Switch.tsx +109 -0
- package/src/components/Text.tsx +32 -26
- package/src/components/TextField.tsx +241 -193
- package/src/index.tsx +27 -23
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +179 -0
- package/tsconfig.json +3 -3
- package/src/components/BadgeText.tsx +0 -29
- package/src/components/BodyText.tsx +0 -24
- package/src/components/CaptionText.tsx +0 -16
- package/src/components/DisplayText.tsx +0 -26
- package/src/components/Headline.tsx +0 -29
- package/src/components/Label.tsx +0 -28
- package/src/components/Subtitle.tsx +0 -26
- package/src/components/TooltipText.tsx +0 -15
|
@@ -1,349 +1,329 @@
|
|
|
1
|
-
import { ComponentProps } from 'react'
|
|
2
|
-
import { styled } from '../styles'
|
|
3
|
-
import { Button as ButtonRadix } from '@radix-ui/themes'
|
|
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
|
-
borderWidth: '$2',
|
|
66
|
-
borderStyle: 'solid',
|
|
67
|
-
},
|
|
68
|
-
'&:
|
|
69
|
-
borderWidth: '$
|
|
70
|
-
borderStyle: 'solid',
|
|
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
|
-
color: '$
|
|
124
|
-
'&:
|
|
125
|
-
'&:
|
|
126
|
-
'&:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
color: '$
|
|
135
|
-
'&:
|
|
136
|
-
'&:
|
|
137
|
-
'&:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
color: '$
|
|
146
|
-
'&:
|
|
147
|
-
'&:
|
|
148
|
-
'&:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
color: '$
|
|
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
|
-
backgroundColor: '$
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
backgroundColor: '$
|
|
203
|
-
},
|
|
204
|
-
'&:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
'&:
|
|
222
|
-
backgroundColor: '$
|
|
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
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
'
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
'
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
borderColor: '$purple300',
|
|
330
|
-
backgroundColor: '$grey50',
|
|
331
|
-
},
|
|
332
|
-
'&:disabled': {
|
|
333
|
-
borderColor: '$purple200',
|
|
334
|
-
backgroundColor: '$neutral200',
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
]
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
export interface ButtonProps extends ComponentProps<typeof ButtonStyled> {
|
|
343
|
-
asChild?: boolean,
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export function Button({ asChild, ...props }: ButtonProps) {
|
|
347
|
-
const Component = asChild ? ButtonRadix : 'button'
|
|
348
|
-
return <ButtonStyled as={Component} {...props} />
|
|
1
|
+
import { ComponentProps } from 'react'
|
|
2
|
+
import { styled } from '../styles'
|
|
3
|
+
import { Button as ButtonRadix } from '@radix-ui/themes'
|
|
4
|
+
import { typographyButtonValues } from '../types/typographyValues'
|
|
5
|
+
|
|
6
|
+
export const ButtonStyled = styled(ButtonRadix, {
|
|
7
|
+
fontFamily: '$default',
|
|
8
|
+
letterSpacing: 0,
|
|
9
|
+
border: 0,
|
|
10
|
+
transition: 'all 300ms ease-out',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
borderRadius: '$xs',
|
|
13
|
+
boxShadow: '0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
gap: '$10',
|
|
18
|
+
'&:disabled': {
|
|
19
|
+
cursor: 'not-allowed',
|
|
20
|
+
transition: 'none',
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
color: {
|
|
24
|
+
brand: {},
|
|
25
|
+
neutral: {},
|
|
26
|
+
purple: {},
|
|
27
|
+
},
|
|
28
|
+
variant: {
|
|
29
|
+
text: {
|
|
30
|
+
backgroundColor: 'transparent',
|
|
31
|
+
boxShadow: 'none',
|
|
32
|
+
padding: 0,
|
|
33
|
+
border: 0,
|
|
34
|
+
},
|
|
35
|
+
contained: {
|
|
36
|
+
'&:hover': {
|
|
37
|
+
borderWidth: '$2',
|
|
38
|
+
borderStyle: 'solid',
|
|
39
|
+
},
|
|
40
|
+
'&:focus': {
|
|
41
|
+
border: 0,
|
|
42
|
+
},
|
|
43
|
+
'&:active': {
|
|
44
|
+
borderWidth: '$4',
|
|
45
|
+
borderStyle: 'solid',
|
|
46
|
+
},
|
|
47
|
+
'&:disabled': {
|
|
48
|
+
borderWidth: '$1',
|
|
49
|
+
borderStyle: 'solid',
|
|
50
|
+
boxShadow: 'none',
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
outlined: {
|
|
54
|
+
borderWidth: '$1',
|
|
55
|
+
borderStyle: 'solid',
|
|
56
|
+
'&:hover': {
|
|
57
|
+
borderWidth: '$2',
|
|
58
|
+
borderStyle: 'solid',
|
|
59
|
+
},
|
|
60
|
+
'&:focus': {
|
|
61
|
+
borderWidth: '$2',
|
|
62
|
+
borderStyle: 'solid',
|
|
63
|
+
},
|
|
64
|
+
'&:active': {
|
|
65
|
+
borderWidth: '$2',
|
|
66
|
+
borderStyle: 'solid',
|
|
67
|
+
},
|
|
68
|
+
'&:disabled': {
|
|
69
|
+
borderWidth: '$1',
|
|
70
|
+
borderStyle: 'solid',
|
|
71
|
+
color: '$neutral400',
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
typography: typographyButtonValues,
|
|
76
|
+
fontWeight: {
|
|
77
|
+
regular: { fontWeight: '$regular' },
|
|
78
|
+
medium: { fontWeight: '$medium' },
|
|
79
|
+
semibold: { fontWeight: '$semibold' },
|
|
80
|
+
bold: { fontWeight: '$bold' },
|
|
81
|
+
},
|
|
82
|
+
radii: {
|
|
83
|
+
'full': {
|
|
84
|
+
borderRadius: '$full',
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
variant: 'contained',
|
|
91
|
+
typography: 'buttonMedium',
|
|
92
|
+
color: 'brand',
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
compoundVariants: [
|
|
96
|
+
{
|
|
97
|
+
variant: 'text',
|
|
98
|
+
color: 'brand',
|
|
99
|
+
css: {
|
|
100
|
+
color: '$brand500',
|
|
101
|
+
'&:hover': { color: '$brand600' },
|
|
102
|
+
'&:focus': { color: '$brand700' },
|
|
103
|
+
'&:active': { color: '$brand500' },
|
|
104
|
+
'&:disabled': { color: '$dark400' },
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
variant: 'text',
|
|
109
|
+
color: 'neutral',
|
|
110
|
+
css: {
|
|
111
|
+
color: '$neutral600',
|
|
112
|
+
'&:hover': { color: '$neutral700' },
|
|
113
|
+
'&:focus': { color: '$neutral800' },
|
|
114
|
+
'&:active': { color: '$neutral500' },
|
|
115
|
+
'&:disabled': { color: '$dark400' },
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
variant: 'text',
|
|
120
|
+
color: 'purple',
|
|
121
|
+
css: {
|
|
122
|
+
color: '$purple500',
|
|
123
|
+
'&:hover': { color: '$purple600' },
|
|
124
|
+
'&:focus': { color: '$purple700' },
|
|
125
|
+
'&:active': { color: '$purple500' },
|
|
126
|
+
'&:disabled': { color: '$dark400' },
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
variant: 'text',
|
|
131
|
+
color: 'green',
|
|
132
|
+
css: {
|
|
133
|
+
color: '$green500',
|
|
134
|
+
'&:hover': { color: '$green600' },
|
|
135
|
+
'&:focus': { color: '$green700' },
|
|
136
|
+
'&:active': { color: '$green500' },
|
|
137
|
+
'&:disabled': { color: '$dark400' },
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
variant: 'text',
|
|
142
|
+
color: 'blue',
|
|
143
|
+
css: {
|
|
144
|
+
color: '$blue500',
|
|
145
|
+
'&:hover': { color: '$blue600' },
|
|
146
|
+
'&:focus': { color: '$blue700' },
|
|
147
|
+
'&:active': { color: '$blue500' },
|
|
148
|
+
'&:disabled': { color: '$dark400' },
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
variant: 'text',
|
|
153
|
+
color: 'red',
|
|
154
|
+
css: {
|
|
155
|
+
color: '$red500',
|
|
156
|
+
'&:hover': { color: '$red600' },
|
|
157
|
+
'&:focus': { color: '$red700' },
|
|
158
|
+
'&:active': { color: '$red500' },
|
|
159
|
+
'&:disabled': { color: '$dark400' },
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
// contained
|
|
164
|
+
{
|
|
165
|
+
variant: 'contained',
|
|
166
|
+
color: 'brand',
|
|
167
|
+
css: {
|
|
168
|
+
color: '$grey50',
|
|
169
|
+
backgroundColor: '$brand500',
|
|
170
|
+
borderWidth: '$2',
|
|
171
|
+
borderStyle: 'solid',
|
|
172
|
+
borderColor: 'transparent',
|
|
173
|
+
'&:hover': {
|
|
174
|
+
borderColor: '$brand700',
|
|
175
|
+
backgroundColor: '$blue600',
|
|
176
|
+
},
|
|
177
|
+
'&:focus': {
|
|
178
|
+
backgroundColor: '$blue700',
|
|
179
|
+
},
|
|
180
|
+
'&:active': {
|
|
181
|
+
borderColor: '$brand300',
|
|
182
|
+
backgroundColor: '$blue500',
|
|
183
|
+
},
|
|
184
|
+
'&:disabled': {
|
|
185
|
+
borderColor: '$brand50',
|
|
186
|
+
backgroundColor: '$brand50',
|
|
187
|
+
color: '$neutral400',
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
variant: 'contained',
|
|
193
|
+
color: 'neutral',
|
|
194
|
+
css: {
|
|
195
|
+
backgroundColor: '$neutral600',
|
|
196
|
+
color: '$grey50',
|
|
197
|
+
'&:hover': {
|
|
198
|
+
backgroundColor: '$neutral700',
|
|
199
|
+
borderColor: '$neutral800',
|
|
200
|
+
},
|
|
201
|
+
'&:focus': {
|
|
202
|
+
backgroundColor: '$neutral800',
|
|
203
|
+
},
|
|
204
|
+
'&:active': {
|
|
205
|
+
backgroundColor: '$neutral500',
|
|
206
|
+
borderColor: '$neutral400',
|
|
207
|
+
},
|
|
208
|
+
'&:disabled': {
|
|
209
|
+
backgroundColor: '$neutral50',
|
|
210
|
+
borderColor: '$neutral200',
|
|
211
|
+
color: '$neutral400',
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
variant: 'contained',
|
|
217
|
+
color: 'purple',
|
|
218
|
+
css: {
|
|
219
|
+
backgroundColor: '$purple500',
|
|
220
|
+
color: '$grey50',
|
|
221
|
+
'&:hover': {
|
|
222
|
+
backgroundColor: '$purple600',
|
|
223
|
+
borderColor: '$purple700',
|
|
224
|
+
},
|
|
225
|
+
'&:focus': {
|
|
226
|
+
backgroundColor: '$purple700',
|
|
227
|
+
},
|
|
228
|
+
'&:active': {
|
|
229
|
+
borderColor: '$purple300',
|
|
230
|
+
backgroundColor: '$purple500',
|
|
231
|
+
},
|
|
232
|
+
'&:disabled': {
|
|
233
|
+
borderColor: '$purple200',
|
|
234
|
+
backgroundColor: '$purple200',
|
|
235
|
+
color: '$neutral400',
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
// outlined
|
|
243
|
+
{
|
|
244
|
+
variant: 'outlined',
|
|
245
|
+
color: 'brand',
|
|
246
|
+
css: {
|
|
247
|
+
color: '$brand500',
|
|
248
|
+
borderColor: '$brand300',
|
|
249
|
+
backgroundColor: '$grey50',
|
|
250
|
+
'&:hover': {
|
|
251
|
+
borderColor: '$brand400',
|
|
252
|
+
backgroundColor: '$brand50',
|
|
253
|
+
},
|
|
254
|
+
'&:focus': {
|
|
255
|
+
borderColor: '$brand400',
|
|
256
|
+
backgroundColor: '$brand50',
|
|
257
|
+
},
|
|
258
|
+
'&:active': {
|
|
259
|
+
borderColor: '$brand300',
|
|
260
|
+
backgroundColor: '$grey50',
|
|
261
|
+
},
|
|
262
|
+
'&:disabled': {
|
|
263
|
+
borderColor: '$brand200',
|
|
264
|
+
backgroundColor: '$neutral200',
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
variant: 'outlined',
|
|
270
|
+
color: 'neutral',
|
|
271
|
+
css: {
|
|
272
|
+
color: '$neutral600',
|
|
273
|
+
borderColor: '$neutral300',
|
|
274
|
+
backgroundColor: '$grey50',
|
|
275
|
+
'&:hover': {
|
|
276
|
+
borderColor: '$neutral400',
|
|
277
|
+
backgroundColor: '$grey100',
|
|
278
|
+
},
|
|
279
|
+
'&:focus': {
|
|
280
|
+
borderColor: '$neutral400',
|
|
281
|
+
backgroundColor: '$grey100',
|
|
282
|
+
},
|
|
283
|
+
'&:active': {
|
|
284
|
+
borderColor: '$neutral300',
|
|
285
|
+
backgroundColor: '$grey50',
|
|
286
|
+
},
|
|
287
|
+
'&:disabled': {
|
|
288
|
+
borderColor: '$neutral200',
|
|
289
|
+
backgroundColor: '$neutral200',
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
variant: 'outlined',
|
|
295
|
+
color: 'purple',
|
|
296
|
+
css: {
|
|
297
|
+
color: '$purple500',
|
|
298
|
+
borderColor: '$purple300',
|
|
299
|
+
backgroundColor: '$grey50',
|
|
300
|
+
'&:hover': {
|
|
301
|
+
borderColor: '$purple400',
|
|
302
|
+
backgroundColor: '$purple50',
|
|
303
|
+
},
|
|
304
|
+
'&:focus': {
|
|
305
|
+
borderColor: '$purple400',
|
|
306
|
+
backgroundColor: '$purple50',
|
|
307
|
+
},
|
|
308
|
+
'&:active': {
|
|
309
|
+
borderColor: '$purple300',
|
|
310
|
+
backgroundColor: '$grey50',
|
|
311
|
+
},
|
|
312
|
+
'&:disabled': {
|
|
313
|
+
borderColor: '$purple200',
|
|
314
|
+
backgroundColor: '$neutral200',
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
]
|
|
320
|
+
})
|
|
321
|
+
|
|
322
|
+
export interface ButtonProps extends ComponentProps<typeof ButtonStyled> {
|
|
323
|
+
asChild?: boolean,
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export function Button({ asChild, ...props }: ButtonProps) {
|
|
327
|
+
const Component = asChild ? ButtonRadix : 'button'
|
|
328
|
+
return <ButtonStyled as={Component} {...props} />
|
|
349
329
|
}
|