@lets-events/react 6.1.0 → 7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "6.1.0",
3
+ "version": "7.0.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -4,6 +4,11 @@ import { typographyButtonValues } from '../../types/typographyValues'
4
4
  import { styled } from "../../styles"
5
5
 
6
6
  export const ButtonStyled = styled(ButtonRadix, {
7
+ $$buttonColor: 'inherit',
8
+ $$buttonBgColor: '$colors$grey50',
9
+ $$buttonBorderColor: 'inherit',
10
+ $$buttonOutlinedColor: 'inherit',
11
+
7
12
  fontFamily: '$default',
8
13
  letterSpacing: 0,
9
14
  border: 0,
@@ -22,338 +27,224 @@ export const ButtonStyled = styled(ButtonRadix, {
22
27
  },
23
28
  variants: {
24
29
  color: {
25
- brand: {},
26
- neutral: {},
27
- purple: {},
28
- },
29
- variant: {
30
- text: {
31
- backgroundColor: 'transparent',
32
- boxShadow: 'none',
33
- padding: 0,
34
- border: 0,
35
- },
36
- contained: {
30
+ brand: {
31
+ $$buttonColor: '$colors$brand500',
32
+ $$buttonBorderColor: '$colors$brand600',
33
+ $$buttonOutlinedColor: '$$buttonColor',
37
34
  '&:hover': {
38
- borderWidth: '1px',
39
- borderStyle: 'solid',
35
+ $$buttonColor: '$colors$brand600',
36
+ $$buttonBorderColor: '$colors$brand700',
37
+ },
38
+ '&:focus': {
39
+ $$buttonColor: '$colors$brand400',
40
+ $$buttonBorderColor: '$colors$brand300',
41
+ $$buttonBgColor: '$colors$grey200',
40
42
  },
41
-
42
43
  '&:active': {
43
- borderWidth: '2px',
44
+ $$buttonColor: '$colors$brand500',
45
+ $$buttonBorderColor: '$colors$brand700',
46
+ $$buttonBgColor: '$colors$grey200',
44
47
  },
45
- '&:disabled': {
46
- boxShadow: 'none',
47
- }
48
48
  },
49
- outlined: {
50
- borderWidth: '1px',
51
- borderStyle: 'solid',
52
- '&:disabled': {
53
- color: '$neutral400',
54
- boxShadow: 'none',
55
- }
56
- }
57
- },
58
- typography: typographyButtonValues,
59
- fontWeight: {
60
- regular: { fontWeight: '$regular' },
61
- medium: { fontWeight: '$medium' },
62
- semibold: { fontWeight: '$semibold' },
63
- bold: { fontWeight: '$bold' },
64
- },
65
- outlinedBgColor: {
66
- neutral: {},
67
- transparent: {},
68
- },
69
- radii: {
70
- 'full': {
71
- borderRadius: '$full',
72
- }
73
- },
74
- },
75
-
76
- defaultVariants: {
77
- variant: 'contained',
78
- typography: 'buttonMedium',
79
- color: 'brand',
80
- },
81
-
82
- compoundVariants: [
83
- {
84
- variant: 'text',
85
- color: 'brand',
86
- css: {
87
- color: '$brand500',
88
- '&:hover': { color: '$brand600' },
89
- '&:focus': { color: '$brand700' },
90
- '&:active': { color: '$brand500' },
91
- '&:disabled': { color: '$dark400' },
92
- }
93
- },
94
- {
95
- variant: 'text',
96
- color: 'neutral',
97
- css: {
98
- color: '$neutral600',
99
- '&:hover': { color: '$neutral700' },
100
- '&:focus': { color: '$neutral800' },
101
- '&:active': { color: '$neutral500' },
102
- '&:disabled': { color: '$dark400' },
103
- }
104
- },
105
- {
106
- variant: 'text',
107
- color: 'purple',
108
- css: {
109
- color: '$purple500',
110
- '&:hover': { color: '$purple600' },
111
- '&:focus': { color: '$purple700' },
112
- '&:active': { color: '$purple500' },
113
- '&:disabled': { color: '$dark400' },
114
- }
115
- },
116
- {
117
- variant: 'text',
118
- color: 'green',
119
- css: {
120
- color: '$green500',
121
- '&:hover': { color: '$green600' },
122
- '&:focus': { color: '$green700' },
123
- '&:active': { color: '$green500' },
124
- '&:disabled': { color: '$dark400' },
125
- }
126
- },
127
- {
128
- variant: 'text',
129
- color: 'blue',
130
- css: {
131
- color: '$blue500',
132
- '&:hover': { color: '$blue600' },
133
- '&:focus': { color: '$blue700' },
134
- '&:active': { color: '$blue500' },
135
- '&:disabled': { color: '$dark400' },
136
- }
137
- },
138
- {
139
- variant: 'text',
140
- color: 'red',
141
- css: {
142
- color: '$red500',
143
- '&:hover': { color: '$red600' },
144
- '&:focus': { color: '$red700' },
145
- '&:active': { color: '$red500' },
146
- '&:disabled': { color: '$dark400' },
147
- }
148
- },
149
-
150
- // contained
151
- {
152
- variant: 'contained',
153
- color: 'brand',
154
- css: {
155
- color: '$grey50',
156
- backgroundColor: '$brand500',
157
- borderWidth: '2px',
158
- borderStyle: 'solid',
159
- borderColor: 'transparent',
49
+ purple: {
50
+ $$buttonColor: '$colors$purple500',
51
+ $$buttonBorderColor: '$colors$purple300',
52
+ $$buttonOutlinedColor: '$$buttonColor',
160
53
  '&:hover': {
161
- borderColor: '$brand700',
162
- backgroundColor: '$blue600',
54
+ $$buttonColor: '$colors$purple600',
55
+ $$buttonBorderColor: '$colors$purple700',
56
+ $$buttonOutlinedColor: '$colors$purple500',
57
+ $$buttonBgColor: '$colors$purple50',
163
58
  },
164
59
  '&:focus': {
165
- backgroundColor: '$blue700',
60
+ $$buttonColor: '$colors$purple700',
61
+ $$buttonOutlinedColor: '$colors$purple500',
62
+ $$buttonBgColor: '$colors$purple200',
63
+ $$buttonBorderColor: '$colors$purple400',
166
64
  },
167
65
  '&:active': {
168
- borderColor: '$brand300',
169
- backgroundColor: '$blue500',
66
+ $$buttonColor: '$colors$purple500',
67
+ $$buttonOutlinedColor: '$colors$purple500',
68
+ $$buttonBgColor: '$colors$purple100',
69
+ $$buttonBorderColor: '$colors$purple300',
170
70
  },
171
- '&:disabled': {
172
- borderColor: '$brand50',
173
- backgroundColor: '$brand50',
174
- color: '$neutral400',
175
- }
176
- }
177
- },
178
- {
179
- variant: 'contained',
180
- color: 'neutral',
181
- css: {
182
- backgroundColor: '$neutral600',
183
- color: '$grey50',
71
+ },
72
+ error: {
73
+ $$buttonColor: '$colors$error600',
74
+ $$buttonBorderColor: '$colors$error500',
75
+ $$buttonOutlinedColor: ' $colors$error500',
184
76
  '&:hover': {
185
- backgroundColor: '$neutral700',
186
- borderColor: '$neutral800',
77
+ $$buttonColor: '$colors$error600',
78
+ $$buttonBorderColor: '$colors$error700',
79
+ $$buttonBgColor: '$colors$error50'
187
80
  },
188
81
  '&:focus': {
189
- backgroundColor: '$neutral800',
82
+ $$buttonColor: '$colors$error400',
83
+ $$buttonBorderColor: '$colors$error300',
84
+ $$buttonBgColor: '$colors$error200'
190
85
  },
191
86
  '&:active': {
192
- backgroundColor: '$neutral500',
193
- borderColor: '$neutral400',
87
+ $$buttonColor: '$colors$error700',
88
+ $$buttonBorderColor: '$colors$error700',
89
+ $$buttonBgColor: '$colors$re1050'
194
90
  },
195
- '&:disabled': {
196
- backgroundColor: '$neutral50',
197
- borderColor: '$neutral200',
198
- color: '$neutral400',
199
- }
200
- }
201
- },
202
- {
203
- variant: 'contained',
204
- color: 'purple',
205
- css: {
206
- backgroundColor: '$purple500',
207
- color: '$grey50',
91
+ },
92
+ info: {
93
+ $$buttonColor: '$colors$info500',
94
+ $$buttonBorderColor: '$colors$info600',
95
+ $$buttonOutlinedColor: '$$buttonColor',
208
96
  '&:hover': {
209
- backgroundColor: '$purple600',
210
- borderColor: '$purple700',
97
+ $$buttonColor: '$colors$info600',
98
+ $$buttonBorderColor: '$colors$info700',
99
+ $$buttonBgColor: '$colors$info50'
211
100
  },
212
101
  '&:focus': {
213
- backgroundColor: '$purple700',
102
+ $$buttonColor: '$colors$info400',
103
+ $$buttonBorderColor: '$colors$info600',
104
+ $$buttonBgColor: '$colors$info200'
214
105
  },
215
106
  '&:active': {
216
- borderColor: '$purple300',
217
- backgroundColor: '$purple500',
107
+ $$buttonColor: '$colors$info700',
108
+ $$buttonBorderColor: '$colors$info700',
109
+ $$buttonBgColor: '$colors$info100'
218
110
  },
219
- '&:disabled': {
220
- borderColor: '$purple200',
221
- backgroundColor: '$purple200',
222
- color: '$neutral400',
223
- }
224
- }
225
- },
226
-
227
-
228
-
229
- // outlined
230
- {
231
- variant: 'outlined',
232
- color: 'brand',
233
- outlinedBgColor: 'neutral',
234
- css: {
235
- color: '$brand500',
236
- border: '1px solid $brand300',
237
- backgroundColor: '$grey50',
111
+ },
112
+ success: {
113
+ $$buttonColor: '$colors$success500',
114
+ $$buttonBorderColor: '$colors$success600',
115
+ $$buttonOutlinedColor: '$$buttonColor',
238
116
  '&:hover': {
239
- borderColor: '$brand400',
240
- backgroundColor: '$brand50',
117
+ $$buttonColor: '$colors$success600',
118
+ $$buttonBorderColor: '$colors$success700',
119
+ $$buttonBgColor: '$colors$success50'
241
120
  },
242
121
  '&:focus': {
243
- borderColor: '$brand400',
244
- backgroundColor: '$brand50',
122
+ $$buttonColor: '$colors$success400',
123
+ $$buttonBorderColor: '$colors$success600',
124
+ $$buttonBgColor: '$colors$success200'
245
125
  },
246
- '&:disabled': {
247
- borderColor: '$brand200',
248
- backgroundColor: '$neutral200',
249
- }
250
- }
251
- },
252
- {
253
- variant: 'outlined',
254
- color: 'neutral',
255
- outlinedBgColor: 'neutral',
256
- css: {
257
- color: '$neutral600',
258
- border: '1px solid $neutral300',
259
- backgroundColor: '$grey50',
126
+ '&:active': {
127
+ $$buttonColor: '$colors$success700',
128
+ $$buttonBorderColor: '$colors$success700',
129
+ $$buttonBgColor: '$colors$success100'
130
+ },
131
+ },
132
+ warning: {
133
+ $$buttonColor: '$colors$warning500',
134
+ $$buttonBorderColor: '$colors$warning600',
135
+ $$buttonOutlinedColor: '$$buttonColor',
260
136
  '&:hover': {
261
- borderColor: '$neutral400',
262
- backgroundColor: '$grey100',
137
+ $$buttonColor: '$colors$warning600',
138
+ $$buttonBorderColor: '$colors$warning700',
139
+ $$buttonBgColor: '$colors$warning50'
263
140
  },
264
141
  '&:focus': {
265
- borderColor: '$neutral400',
266
- backgroundColor: '$grey100',
142
+ $$buttonColor: '$colors$warning400',
143
+ $$buttonBorderColor: '$colors$warning600',
144
+ $$buttonBgColor: '$colors$warning200'
145
+
267
146
  },
268
- '&:disabled': {
269
- borderColor: '$neutral200',
270
- backgroundColor: '$neutral200',
271
- }
272
- }
273
- },
274
- {
275
- variant: 'outlined',
276
- color: 'purple',
277
- outlinedBgColor: 'neutral',
278
- css: {
279
- color: '$purple500',
280
- backgroundColor: '$grey50',
281
- border: '1px solid $purple300',
147
+ '&:active': {
148
+ $$buttonColor: '$colors$warning700',
149
+ $$buttonBorderColor: '$colors$warning700',
150
+ $$buttonBgColor: '$colors$warning100'
151
+
152
+ },
153
+ },
154
+ neutral: {
155
+ $$buttonColor: '$colors$neutral600',
156
+ $$buttonBorderColor: '$colors$neutral300',
157
+ $$buttonOutlinedColor: '$$buttonColor',
282
158
  '&:hover': {
283
- borderColor: '$purple400',
284
- backgroundColor: '$purple50',
159
+ $$buttonColor: '$colors$neutral700',
160
+ $$buttonBgColor: '$colors$neutral100',
161
+ $$buttonBorderColor: '$colors$neutral300',
285
162
  },
286
163
  '&:focus': {
287
- borderColor: '$purple400',
288
- backgroundColor: '$purple50',
164
+ $$buttonColor: '$colors$neutral800',
165
+ $$buttonBgColor: '$colors$neutral300',
166
+ $$buttonBorderColor: '$colors$neutral400',
289
167
  },
290
- '&:disabled': {
291
- borderColor: '$purple200',
292
- backgroundColor: '$neutral200',
293
- }
294
- }
295
- },
296
- // outlined transparent
297
- {
298
- variant: 'outlined',
299
- color: 'brand',
300
- outlinedBgColor: 'transparent',
301
- css: {
302
- color: '$brand500',
303
- border: '1px solid $brand300',
304
- backgroundColor: 'transparent',
168
+ '&:active': {
169
+ $$buttonColor: '$colors$neutral500',
170
+ $$buttonBgColor: '$colors$neutral300',
171
+ $$buttonBorderColor: '$colors$neutral400',
172
+ },
173
+ },
174
+ white: {
175
+ $$buttonColor: '$colors$neutral50',
176
+ $$buttonBorderColor: '$colors$neutral300',
177
+ $$buttonOutlinedColor: '$colors$neutral50',
305
178
  '&:hover': {
306
- borderColor: '$brand400',
307
- opacity: '0.8',
179
+ $$buttonColor: '$colors$neutral100',
180
+ $$buttonBorderColor: '$colors$neutral300',
181
+ $$buttonBgColor: '$colors$neutral100'
308
182
  },
309
183
  '&:focus': {
310
- borderColor: '$brand400',
184
+ $$buttonBorderColor: '$colors$neutral400',
185
+ $$buttonColor: '$colors$neutral300',
186
+ $$buttonBgColor: '$colors$neutral200'
311
187
  },
312
- '&:disabled': {
313
- borderColor: '$brand200',
314
- }
315
- }
188
+ '&:active': {
189
+ $$buttonColor: '$colors$neutral400',
190
+ $$buttonBorderColor: '$colors$neutral500',
191
+ $$buttonBgColor: '$colors$neutral300'
192
+ },
193
+ },
316
194
  },
317
- {
318
- variant: 'outlined',
319
- color: 'neutral',
320
- outlinedBgColor: 'transparent',
321
- css: {
322
- color: '$neutral600',
323
- border: '1px solid $neutral300',
195
+ variant: {
196
+ text: {
324
197
  backgroundColor: 'transparent',
325
- '&:hover': {
326
- borderColor: '$neutral400',
327
- opacity: '0.8',
328
- },
329
- '&:focus': {
330
- borderColor: '$neutral400',
331
- },
198
+ boxShadow: 'none',
199
+ padding: 0,
200
+ border: 0,
201
+ color: '$$buttonColor',
202
+ },
203
+ contained: {
204
+ color: '$grey50',
205
+ backgroundColor: '$$buttonColor',
206
+ border: '1px solid $$buttonBorderColor',
332
207
  '&:disabled': {
333
- borderColor: '$neutral200',
208
+ boxShadow: 'none',
209
+ color: '$neutral400',
210
+ backgroundColor: '$neutral200',
211
+ $$buttonBorderColor: '$colors$neutral100'
212
+ }
213
+ },
214
+ outlined: {
215
+ color: '$$buttonOutlinedColor',
216
+ border: '1px solid $$buttonOutlinedColor',
217
+ backgroundColor: '$$buttonBgColor',
218
+ '&:disabled': {
219
+ boxShadow: 'none',
220
+ borderColor: '$colors$neutral100',
221
+ $$buttonColor: '$colors$neutral300'
334
222
  }
335
223
  }
336
224
  },
337
- {
338
- variant: 'outlined',
339
- color: 'purple',
340
- outlinedBgColor: 'transparent',
341
- css: {
342
- color: '$purple500',
225
+ typography: typographyButtonValues,
226
+ fontWeight: {
227
+ regular: { fontWeight: '$regular' },
228
+ medium: { fontWeight: '$medium' },
229
+ semibold: { fontWeight: '$semibold' },
230
+ bold: { fontWeight: '$bold' },
231
+ },
232
+ outlinedBgColor: {
233
+ neutral: {},
234
+ transparent: {
343
235
  backgroundColor: 'transparent',
344
- border: '1px solid $purple300',
345
- '&:hover': {
346
- borderColor: '$purple400',
347
- opacity: '0.8',
348
- },
349
- '&:focus': {
350
- borderColor: '$purple400',
351
- },
352
- '&:disabled': {
353
- borderColor: '$purple200',
354
- }
236
+ },
237
+ },
238
+ radii: {
239
+ 'full': {
240
+ borderRadius: '$full',
355
241
  }
356
242
  },
357
- ]
358
- })
243
+ },
359
244
 
245
+ defaultVariants: {
246
+ variant: 'contained',
247
+ typography: 'buttonMedium',
248
+ color: 'brand',
249
+ },
250
+ })