@lets-events/react 12.9.3 → 12.10.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.
Files changed (94) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -19
  3. package/CHANGELOG.md +6 -0
  4. package/dist/index.d.mts +15 -2
  5. package/dist/index.d.ts +15 -2
  6. package/dist/index.js +296 -200
  7. package/dist/index.mjs +264 -169
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +123 -123
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +74 -62
  14. package/src/components/Button/styledComponents.ts +361 -320
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +168 -168
  17. package/src/components/Calendar/styledComponents.ts +480 -480
  18. package/src/components/Card.tsx +67 -67
  19. package/src/components/CheckboxGroup.tsx +176 -176
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Divider.tsx +7 -7
  22. package/src/components/DoubleCalendar/index.tsx +182 -182
  23. package/src/components/Drawer/index.tsx +100 -100
  24. package/src/components/Drawer/styledComponents.ts +103 -103
  25. package/src/components/Dropdown.tsx +302 -302
  26. package/src/components/Filter.tsx +164 -164
  27. package/src/components/Flex.tsx +118 -118
  28. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  29. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  30. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  31. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  32. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  33. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  34. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  35. package/src/components/FormFields/CPFFormField.tsx +78 -78
  36. package/src/components/FormFields/CalendarFormField.tsx +98 -98
  37. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  38. package/src/components/FormFields/DateAndTimeFormField.tsx +217 -217
  39. package/src/components/FormFields/DoubleCalendarFormField.tsx +96 -96
  40. package/src/components/FormFields/EmailFormField.tsx +27 -27
  41. package/src/components/FormFields/Form.tsx +39 -39
  42. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
  43. package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
  44. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  45. package/src/components/FormFields/RadioGroupFormField.tsx +86 -86
  46. package/src/components/FormFields/RichEditorFormField.tsx +103 -103
  47. package/src/components/FormFields/SelectFormField.tsx +113 -113
  48. package/src/components/FormFields/SwitchFormField.tsx +46 -46
  49. package/src/components/FormFields/TextAreaFormField.tsx +61 -61
  50. package/src/components/FormFields/TextFormField.tsx +112 -112
  51. package/src/components/FormFields/TimePickerFormField.tsx +88 -88
  52. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  53. package/src/components/FormFields/subComponents/FormLabel.tsx +36 -36
  54. package/src/components/FormFields/utils/validation.ts +23 -23
  55. package/src/components/Grid.tsx +137 -137
  56. package/src/components/Icon.tsx +47 -47
  57. package/src/components/MenuDropdown/index.tsx +38 -38
  58. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  59. package/src/components/Modal.tsx +110 -110
  60. package/src/components/MultiSelect/index.tsx +305 -305
  61. package/src/components/MultiSelect/styledComponents.ts +160 -160
  62. package/src/components/RadioGroup.tsx +210 -210
  63. package/src/components/RichEditor/QuillComponent.tsx +468 -468
  64. package/src/components/RichEditor/RichEditor.tsx +49 -49
  65. package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
  66. package/src/components/RichEditor/index.ts +3 -3
  67. package/src/components/RichEditor/styledComponents.ts +1170 -1170
  68. package/src/components/Section.tsx +33 -33
  69. package/src/components/Step.tsx +164 -164
  70. package/src/components/Switch.tsx +108 -108
  71. package/src/components/Text.tsx +38 -38
  72. package/src/components/TextField.tsx +372 -372
  73. package/src/components/TextareaField.tsx +116 -116
  74. package/src/components/TimePicker.tsx +357 -357
  75. package/src/components/Toast/components/ToastItem.tsx +41 -41
  76. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  77. package/src/components/Toast/hooks/useToast.ts +12 -12
  78. package/src/components/Toast/index.tsx +5 -5
  79. package/src/components/Toast/styles/index.ts +135 -135
  80. package/src/components/Toast/types/index.ts +46 -46
  81. package/src/components/ToggleElement/index.tsx +58 -0
  82. package/src/components/Tooltip/index.tsx +73 -73
  83. package/src/components/Tooltip/styles.ts +77 -77
  84. package/src/hooks/useCountries.ts +41 -41
  85. package/src/hooks/useImageUpload.ts +139 -139
  86. package/src/hooks/useOnClickOutside.tsx +42 -42
  87. package/src/index.tsx +72 -72
  88. package/src/styles/index.ts +41 -41
  89. package/src/types/typographyValues.ts +178 -178
  90. package/src/utils/getNestedValue.ts +3 -3
  91. package/src/utils/states.ts +29 -29
  92. package/src/utils/uploadService.ts +180 -180
  93. package/tsconfig.json +3 -3
  94. package/tsup.config.ts +38 -38
@@ -1,320 +1,361 @@
1
- import { Button as ButtonRadix } from "@radix-ui/themes";
2
-
3
- import { styled, keyframes } from "../../styles";
4
-
5
- export const ButtonStyled = styled(ButtonRadix, {
6
- $$buttonColor: "inherit",
7
- $$buttonBgColor: "$colors$grey50",
8
- $$buttonBorderColor: "inherit",
9
- $$buttonOutlinedColor: "inherit",
10
- fontFamily: "$default",
11
- letterSpacing: 0,
12
- border: 0,
13
- transition: "all 300ms ease-out",
14
- cursor: "pointer",
15
- borderRadius: "$xs",
16
- boxShadow:
17
- "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
18
- display: "flex",
19
- alignItems: "center",
20
- justifyContent: "center",
21
- gap: "$10",
22
- padding: "$6 $12",
23
- "&:disabled": {
24
- cursor: "not-allowed",
25
- transition: "none",
26
- },
27
- variants: {
28
- color: {
29
- brand: {
30
- $$buttonColor: "$colors$brand500",
31
- $$buttonBorderColor: "$colors$brand600",
32
- $$buttonOutlinedColor: "$$buttonColor",
33
- "&:hover": {
34
- $$buttonColor: "$colors$brand600",
35
- $$buttonBorderColor: "$colors$brand700",
36
- },
37
- "&:focus": {
38
- $$buttonColor: "$colors$brand400",
39
- $$buttonBorderColor: "$colors$brand300",
40
- $$buttonBgColor: "$colors$grey200",
41
- },
42
- "&:active": {
43
- $$buttonColor: "$colors$brand500",
44
- $$buttonBorderColor: "$colors$brand700",
45
- $$buttonBgColor: "$colors$grey200",
46
- },
47
- },
48
- purple: {
49
- $$buttonColor: "$colors$purple500",
50
- $$buttonBorderColor: "$colors$purple300",
51
- $$buttonOutlinedColor: "$$buttonColor",
52
- "&:hover": {
53
- $$buttonColor: "$colors$purple600",
54
- $$buttonBorderColor: "$colors$purple700",
55
- $$buttonOutlinedColor: "$colors$purple500",
56
- $$buttonBgColor: "$colors$purple50",
57
- },
58
- "&:focus": {
59
- $$buttonColor: "$colors$purple700",
60
- $$buttonOutlinedColor: "$colors$purple500",
61
- $$buttonBgColor: "$colors$purple200",
62
- $$buttonBorderColor: "$colors$purple400",
63
- },
64
- "&:active": {
65
- $$buttonColor: "$colors$purple500",
66
- $$buttonOutlinedColor: "$colors$purple500",
67
- $$buttonBgColor: "$colors$purple100",
68
- $$buttonBorderColor: "$colors$purple300",
69
- },
70
- },
71
- error: {
72
- $$buttonColor: "$colors$error600",
73
- $$buttonBorderColor: "$colors$error500",
74
- $$buttonOutlinedColor: " $colors$error500",
75
- "&:hover": {
76
- $$buttonColor: "$colors$error600",
77
- $$buttonBorderColor: "$colors$error700",
78
- $$buttonBgColor: "$colors$error50",
79
- },
80
- "&:focus": {
81
- $$buttonColor: "$colors$error400",
82
- $$buttonBorderColor: "$colors$error300",
83
- $$buttonBgColor: "$colors$error200",
84
- },
85
- "&:active": {
86
- $$buttonColor: "$colors$error700",
87
- $$buttonBorderColor: "$colors$error700",
88
- $$buttonBgColor: "$colors$re1050",
89
- },
90
- },
91
- info: {
92
- $$buttonColor: "$colors$info500",
93
- $$buttonBorderColor: "$colors$info600",
94
- $$buttonOutlinedColor: "$$buttonColor",
95
- "&:hover": {
96
- $$buttonColor: "$colors$info600",
97
- $$buttonBorderColor: "$colors$info700",
98
- $$buttonBgColor: "$colors$info50",
99
- },
100
- "&:focus": {
101
- $$buttonColor: "$colors$info400",
102
- $$buttonBorderColor: "$colors$info600",
103
- $$buttonBgColor: "$colors$info200",
104
- },
105
- "&:active": {
106
- $$buttonColor: "$colors$info700",
107
- $$buttonBorderColor: "$colors$info700",
108
- $$buttonBgColor: "$colors$info100",
109
- },
110
- },
111
- success: {
112
- $$buttonColor: "$colors$success500",
113
- $$buttonBorderColor: "$colors$success600",
114
- $$buttonOutlinedColor: "$$buttonColor",
115
- "&:hover": {
116
- $$buttonColor: "$colors$success600",
117
- $$buttonBorderColor: "$colors$success700",
118
- $$buttonBgColor: "$colors$success50",
119
- },
120
- "&:focus": {
121
- $$buttonColor: "$colors$success400",
122
- $$buttonBorderColor: "$colors$success600",
123
- $$buttonBgColor: "$colors$success200",
124
- },
125
- "&:active": {
126
- $$buttonColor: "$colors$success700",
127
- $$buttonBorderColor: "$colors$success700",
128
- $$buttonBgColor: "$colors$success100",
129
- },
130
- },
131
- warning: {
132
- $$buttonColor: "$colors$warning500",
133
- $$buttonBorderColor: "$colors$warning600",
134
- $$buttonOutlinedColor: "$$buttonColor",
135
- "&:hover": {
136
- $$buttonColor: "$colors$warning600",
137
- $$buttonBorderColor: "$colors$warning700",
138
- $$buttonBgColor: "$colors$warning50",
139
- },
140
- "&:focus": {
141
- $$buttonColor: "$colors$warning400",
142
- $$buttonBorderColor: "$colors$warning600",
143
- $$buttonBgColor: "$colors$warning200",
144
- },
145
- "&:active": {
146
- $$buttonColor: "$colors$warning700",
147
- $$buttonBorderColor: "$colors$warning700",
148
- $$buttonBgColor: "$colors$warning100",
149
- },
150
- },
151
- neutral: {
152
- $$buttonColor: "$colors$neutral600",
153
- $$buttonBorderColor: "$colors$neutral300",
154
- $$buttonOutlinedColor: "$$buttonColor",
155
- "&:hover": {
156
- $$buttonColor: "$colors$neutral700",
157
- $$buttonBgColor: "$colors$neutral100",
158
- $$buttonBorderColor: "$colors$neutral300",
159
- },
160
- "&:focus": {
161
- $$buttonColor: "$colors$neutral800",
162
- $$buttonBgColor: "$colors$neutral300",
163
- $$buttonBorderColor: "$colors$neutral400",
164
- },
165
- "&:active": {
166
- $$buttonColor: "$colors$neutral500",
167
- $$buttonBgColor: "$colors$neutral300",
168
- $$buttonBorderColor: "$colors$neutral400",
169
- },
170
- },
171
- white: {
172
- $$buttonColor: "$colors$neutral50",
173
- $$buttonBorderColor: "$colors$neutral300",
174
- $$buttonOutlinedColor: "$colors$neutral50",
175
- "&:hover": {
176
- $$buttonColor: "$colors$neutral100",
177
- $$buttonBorderColor: "$colors$neutral300",
178
- $$buttonBgColor: "$colors$neutral100",
179
- },
180
- "&:focus": {
181
- $$buttonBorderColor: "$colors$neutral400",
182
- $$buttonColor: "$colors$neutral300",
183
- $$buttonBgColor: "$colors$neutral200",
184
- },
185
- "&:active": {
186
- $$buttonColor: "$colors$neutral400",
187
- $$buttonBorderColor: "$colors$neutral500",
188
- $$buttonBgColor: "$colors$neutral300",
189
- },
190
- },
191
- },
192
- size: {
193
- extraSmall: {
194
- height: "$24",
195
- fontSize: "$buttonExtraSmall",
196
- lineHeight: "$buttonExtraSmall",
197
- padding: "0 $12",
198
- },
199
- small: {
200
- height: "30px",
201
- fontSize: "$buttonSmall",
202
- lineHeight: "$buttonSmall",
203
- padding: "0 $14",
204
- },
205
- medium: {
206
- height: "40px",
207
- fontSize: "$buttonMedium",
208
- lineHeight: "$buttonMedium",
209
- padding: "0 $16",
210
- },
211
- large: {
212
- height: "48px",
213
- fontSize: "$buttonLarge",
214
- lineHeight: "$buttonLarge",
215
- padding: "0 $20",
216
- },
217
- },
218
- variant: {
219
- text: {
220
- backgroundColor: "transparent",
221
- boxShadow: "none",
222
- padding: 0,
223
- border: 0,
224
- height: "unset",
225
- color: "$$buttonColor",
226
- },
227
- contained: {
228
- color: "$grey50",
229
- backgroundColor: "$$buttonColor",
230
- border: "1px solid $$buttonBorderColor",
231
- "&:disabled": {
232
- boxShadow: "none",
233
- color: "$neutral400",
234
- backgroundColor: "$neutral200",
235
- $$buttonBorderColor: "$colors$neutral100",
236
- },
237
- },
238
- outlined: {
239
- color: "$$buttonOutlinedColor",
240
- border: "1px solid $$buttonOutlinedColor",
241
- backgroundColor: "$$buttonBgColor",
242
- boxShadow: "none",
243
- "&:disabled": {
244
- boxShadow: "none",
245
- borderColor: "$colors$neutral100",
246
- $$buttonColor: "$colors$neutral300",
247
- },
248
- },
249
- menuDropdownItem: {
250
- backgroundColor: "transparent",
251
- boxShadow: "none",
252
- padding: "0.25rem 0.5rem",
253
- border: 0,
254
- height: "unset",
255
- color: "$$buttonColor",
256
- width: "100%",
257
- borderRadius: 0,
258
- whiteSpace: "nowrap",
259
- "&:hover": {
260
- backgroundColor: "$dark100",
261
- },
262
- },
263
- },
264
- fontWeight: {
265
- regular: { fontWeight: "$regular" },
266
- medium: { fontWeight: "$medium" },
267
- semibold: { fontWeight: "$semibold" },
268
- bold: { fontWeight: "$bold" },
269
- },
270
- outlinedBgColor: {
271
- neutral: {},
272
- transparent: {
273
- $$buttonBgColor: "transparent",
274
- },
275
- },
276
- radii: {
277
- full: {
278
- borderRadius: "$full",
279
- },
280
- },
281
- isCircle: {
282
- true: {
283
- borderRadius: "$full",
284
- padding: 0,
285
- aspectRatio: "1",
286
- },
287
- },
288
- },
289
-
290
- compoundVariants: [
291
- {
292
- color: "neutral",
293
- variant: "outlined",
294
- css: {
295
- border: "1px solid $$buttonBorderColor",
296
- },
297
- },
298
- ],
299
-
300
- defaultVariants: {
301
- variant: "contained",
302
- color: "brand",
303
- size: "medium",
304
- fontWeight: "medium",
305
- outlinedBgColor: "transparent",
306
- },
307
- });
308
-
309
- const spin = keyframes({
310
- "0%": { transform: "rotate(0deg)" },
311
- "100%": { transform: "rotate(360deg)" },
312
- });
313
-
314
- export const SpinningDiv = styled("div", {
315
- display: "inline-flex",
316
- alignItems: "center",
317
- justifyContent: "center",
318
- animation: `${spin} 1s linear infinite`,
319
- transformOrigin: "center center",
320
- });
1
+ import { Button as ButtonRadix } from "@radix-ui/themes";
2
+
3
+ import { styled, keyframes } from "../../styles";
4
+
5
+ export const ButtonStyled = styled(ButtonRadix, {
6
+ $$buttonColor: "inherit",
7
+ $$buttonBgColor: "$colors$grey50",
8
+ $$buttonBorderColor: "inherit",
9
+ $$buttonOutlinedColor: "inherit",
10
+ $$buttonToggleBgColor: "transparent",
11
+ fontFamily: "$default",
12
+ letterSpacing: 0,
13
+ border: 0,
14
+ transition: "all 300ms ease-out",
15
+ cursor: "pointer",
16
+ borderRadius: "$xs",
17
+ boxShadow:
18
+ "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
19
+ display: "flex",
20
+ alignItems: "center",
21
+ justifyContent: "center",
22
+ gap: "$10",
23
+ padding: "$6 $12",
24
+ "&:disabled": {
25
+ cursor: "not-allowed",
26
+ transition: "none",
27
+ },
28
+ variants: {
29
+ color: {
30
+ brand: {
31
+ $$buttonColor: "$colors$brand500",
32
+ $$buttonBorderColor: "$colors$brand600",
33
+ $$buttonOutlinedColor: "$$buttonColor",
34
+ $$buttonToggleBgColor: "rgba(0, 78, 210, 0.2)",
35
+ "&:hover": {
36
+ $$buttonColor: "$colors$brand600",
37
+ $$buttonBorderColor: "$colors$brand700",
38
+ },
39
+ "&:focus": {
40
+ $$buttonColor: "$colors$brand400",
41
+ $$buttonBorderColor: "$colors$brand300",
42
+ $$buttonBgColor: "$colors$grey200",
43
+ },
44
+ "&:active": {
45
+ $$buttonColor: "$colors$brand500",
46
+ $$buttonBorderColor: "$colors$brand700",
47
+ $$buttonBgColor: "$colors$grey200",
48
+ },
49
+ },
50
+ purple: {
51
+ $$buttonColor: "$colors$purple500",
52
+ $$buttonBorderColor: "$colors$purple300",
53
+ $$buttonOutlinedColor: "$$buttonColor",
54
+ $$buttonToggleBgColor: "rgba(137, 97, 216, 0.2)",
55
+ "&:hover": {
56
+ $$buttonColor: "$colors$purple600",
57
+ $$buttonBorderColor: "$colors$purple700",
58
+ $$buttonOutlinedColor: "$colors$purple500",
59
+ $$buttonBgColor: "$colors$purple50",
60
+ },
61
+ "&:focus": {
62
+ $$buttonColor: "$colors$purple700",
63
+ $$buttonOutlinedColor: "$colors$purple500",
64
+ $$buttonBgColor: "$colors$purple200",
65
+ $$buttonBorderColor: "$colors$purple400",
66
+ },
67
+ "&:active": {
68
+ $$buttonColor: "$colors$purple500",
69
+ $$buttonOutlinedColor: "$colors$purple500",
70
+ $$buttonBgColor: "$colors$purple100",
71
+ $$buttonBorderColor: "$colors$purple300",
72
+ },
73
+ },
74
+ error: {
75
+ $$buttonColor: "$colors$error600",
76
+ $$buttonBorderColor: "$colors$error500",
77
+ $$buttonOutlinedColor: " $colors$error500",
78
+ $$buttonToggleBgColor: "rgba(219, 54, 68, 0.2)",
79
+ "&:hover": {
80
+ $$buttonColor: "$colors$error600",
81
+ $$buttonBorderColor: "$colors$error700",
82
+ $$buttonBgColor: "$colors$error50",
83
+ },
84
+ "&:focus": {
85
+ $$buttonColor: "$colors$error400",
86
+ $$buttonBorderColor: "$colors$error300",
87
+ $$buttonBgColor: "$colors$error200",
88
+ },
89
+ "&:active": {
90
+ $$buttonColor: "$colors$error700",
91
+ $$buttonBorderColor: "$colors$error700",
92
+ $$buttonBgColor: "$colors$re1050",
93
+ },
94
+ },
95
+ info: {
96
+ $$buttonColor: "$colors$info500",
97
+ $$buttonBorderColor: "$colors$info600",
98
+ $$buttonOutlinedColor: "$$buttonColor",
99
+ $$buttonToggleBgColor: "rgba(2, 120, 254, 0.2)",
100
+ "&:hover": {
101
+ $$buttonColor: "$colors$info600",
102
+ $$buttonBorderColor: "$colors$info700",
103
+ $$buttonBgColor: "$colors$info50",
104
+ },
105
+ "&:focus": {
106
+ $$buttonColor: "$colors$info400",
107
+ $$buttonBorderColor: "$colors$info600",
108
+ $$buttonBgColor: "$colors$info200",
109
+ },
110
+ "&:active": {
111
+ $$buttonColor: "$colors$info700",
112
+ $$buttonBorderColor: "$colors$info700",
113
+ $$buttonBgColor: "$colors$info100",
114
+ },
115
+ },
116
+ success: {
117
+ $$buttonColor: "$colors$success500",
118
+ $$buttonBorderColor: "$colors$success600",
119
+ $$buttonOutlinedColor: "$$buttonColor",
120
+ $$buttonToggleBgColor: "rgba(38, 167, 67, 0.2)",
121
+ "&:hover": {
122
+ $$buttonColor: "$colors$success600",
123
+ $$buttonBorderColor: "$colors$success700",
124
+ $$buttonBgColor: "$colors$success50",
125
+ },
126
+ "&:focus": {
127
+ $$buttonColor: "$colors$success400",
128
+ $$buttonBorderColor: "$colors$success600",
129
+ $$buttonBgColor: "$colors$success200",
130
+ },
131
+ "&:active": {
132
+ $$buttonColor: "$colors$success700",
133
+ $$buttonBorderColor: "$colors$success700",
134
+ $$buttonBgColor: "$colors$success100",
135
+ },
136
+ },
137
+ warning: {
138
+ $$buttonColor: "$colors$warning500",
139
+ $$buttonBorderColor: "$colors$warning600",
140
+ $$buttonOutlinedColor: "$$buttonColor",
141
+ $$buttonToggleBgColor: "rgba(255, 193, 7, 0.2)",
142
+ "&:hover": {
143
+ $$buttonColor: "$colors$warning600",
144
+ $$buttonBorderColor: "$colors$warning700",
145
+ $$buttonBgColor: "$colors$warning50",
146
+ },
147
+ "&:focus": {
148
+ $$buttonColor: "$colors$warning400",
149
+ $$buttonBorderColor: "$colors$warning600",
150
+ $$buttonBgColor: "$colors$warning200",
151
+ },
152
+ "&:active": {
153
+ $$buttonColor: "$colors$warning700",
154
+ $$buttonBorderColor: "$colors$warning700",
155
+ $$buttonBgColor: "$colors$warning100",
156
+ },
157
+ },
158
+ neutral: {
159
+ $$buttonColor: "$colors$neutral600",
160
+ $$buttonBorderColor: "$colors$neutral300",
161
+ $$buttonOutlinedColor: "$$buttonColor",
162
+ $$buttonToggleBgColor: "rgba(76, 79, 84, 0.2)",
163
+ "&:hover": {
164
+ $$buttonColor: "$colors$neutral700",
165
+ $$buttonBgColor: "$colors$neutral100",
166
+ $$buttonBorderColor: "$colors$neutral300",
167
+ },
168
+ "&:focus": {
169
+ $$buttonColor: "$colors$neutral800",
170
+ $$buttonBgColor: "$colors$neutral300",
171
+ $$buttonBorderColor: "$colors$neutral400",
172
+ },
173
+ "&:active": {
174
+ $$buttonColor: "$colors$neutral500",
175
+ $$buttonBgColor: "$colors$neutral300",
176
+ $$buttonBorderColor: "$colors$neutral400",
177
+ },
178
+ },
179
+ white: {
180
+ $$buttonColor: "$colors$neutral50",
181
+ $$buttonBorderColor: "$colors$neutral300",
182
+ $$buttonOutlinedColor: "$colors$neutral50",
183
+ $$buttonToggleBgColor: "rgba(255, 255, 255, 0.2)",
184
+ "&:hover": {
185
+ $$buttonColor: "$colors$neutral100",
186
+ $$buttonBorderColor: "$colors$neutral300",
187
+ $$buttonBgColor: "$colors$neutral100",
188
+ },
189
+ "&:focus": {
190
+ $$buttonBorderColor: "$colors$neutral400",
191
+ $$buttonColor: "$colors$neutral300",
192
+ $$buttonBgColor: "$colors$neutral200",
193
+ },
194
+ "&:active": {
195
+ $$buttonColor: "$colors$neutral400",
196
+ $$buttonBorderColor: "$colors$neutral500",
197
+ $$buttonBgColor: "$colors$neutral300",
198
+ },
199
+ },
200
+ },
201
+ size: {
202
+ extraSmall: {
203
+ height: "$24",
204
+ fontSize: "$buttonExtraSmall",
205
+ lineHeight: "$buttonExtraSmall",
206
+ padding: "0 $12",
207
+ },
208
+ small: {
209
+ height: "30px",
210
+ fontSize: "$buttonSmall",
211
+ lineHeight: "$buttonSmall",
212
+ padding: "0 $14",
213
+ },
214
+ medium: {
215
+ height: "40px",
216
+ fontSize: "$buttonMedium",
217
+ lineHeight: "$buttonMedium",
218
+ padding: "0 $16",
219
+ },
220
+ large: {
221
+ height: "48px",
222
+ fontSize: "$buttonLarge",
223
+ lineHeight: "$buttonLarge",
224
+ padding: "0 $20",
225
+ },
226
+ },
227
+ variant: {
228
+ text: {
229
+ backgroundColor: "transparent",
230
+ boxShadow: "none",
231
+ padding: 0,
232
+ border: 0,
233
+ height: "unset",
234
+ color: "$$buttonColor",
235
+ },
236
+ toggle: {
237
+ backgroundColor: "transparent",
238
+ boxShadow: "none",
239
+ padding: "$6 $12",
240
+ border: 0,
241
+ height: "2rem",
242
+ color: "$$buttonColor",
243
+ borderRadius: ".5rem",
244
+ "&:hover": {
245
+ backgroundColor: "$$buttonToggleBgColor",
246
+ },
247
+ },
248
+ contained: {
249
+ color: "$grey50",
250
+ backgroundColor: "$$buttonColor",
251
+ border: "1px solid $$buttonBorderColor",
252
+ "&:disabled": {
253
+ boxShadow: "none",
254
+ color: "$neutral400",
255
+ backgroundColor: "$neutral200",
256
+ $$buttonBorderColor: "$colors$neutral100",
257
+ },
258
+ },
259
+ outlined: {
260
+ color: "$$buttonOutlinedColor",
261
+ border: "1px solid $$buttonOutlinedColor",
262
+ backgroundColor: "$$buttonBgColor",
263
+ boxShadow: "none",
264
+ "&:disabled": {
265
+ boxShadow: "none",
266
+ borderColor: "$colors$neutral100",
267
+ $$buttonColor: "$colors$neutral300",
268
+ },
269
+ },
270
+ menuDropdownItem: {
271
+ backgroundColor: "transparent",
272
+ boxShadow: "none",
273
+ padding: "0.5rem 1rem",
274
+ border: 0,
275
+ height: "unset",
276
+ color: "$$buttonColor",
277
+ width: "100%",
278
+ borderRadius: 0,
279
+ whiteSpace: "nowrap",
280
+ "&:hover": {
281
+ backgroundColor: "$dark100",
282
+ },
283
+ },
284
+ menuDropdownItemDelete: {
285
+ backgroundColor: "transparent",
286
+ boxShadow: "none",
287
+ padding: "0.5rem 1rem",
288
+ border: 0,
289
+ height: "unset",
290
+ color: "$$buttonColor",
291
+ width: "100%",
292
+ borderRadius: 0,
293
+ whiteSpace: "nowrap",
294
+ "&:hover": {
295
+ backgroundColor: "$red100",
296
+ },
297
+ }
298
+ },
299
+ fontWeight: {
300
+ regular: { fontWeight: "$regular" },
301
+ medium: { fontWeight: "$medium" },
302
+ semibold: { fontWeight: "$semibold" },
303
+ bold: { fontWeight: "$bold" },
304
+ },
305
+ textAlign: {
306
+ center: { textAlign: "center", justifyContent: "center" },
307
+ left: { textAlign: "left", justifyContent: "flex-start" },
308
+ right: { textAlign: "right", justifyContent: "flex-end" },
309
+ },
310
+ outlinedBgColor: {
311
+ neutral: {},
312
+ transparent: {
313
+ $$buttonBgColor: "transparent",
314
+ },
315
+ },
316
+ radii: {
317
+ full: {
318
+ borderRadius: "$full",
319
+ },
320
+ },
321
+ isCircle: {
322
+ true: {
323
+ borderRadius: "$full",
324
+ padding: 0,
325
+ aspectRatio: "1",
326
+ },
327
+ },
328
+ },
329
+
330
+ compoundVariants: [
331
+ {
332
+ color: "neutral",
333
+ variant: "outlined",
334
+ css: {
335
+ border: "1px solid $$buttonBorderColor",
336
+ },
337
+ },
338
+ ],
339
+
340
+ defaultVariants: {
341
+ variant: "contained",
342
+ color: "brand",
343
+ size: "medium",
344
+ fontWeight: "medium",
345
+ textAlign: "center",
346
+ outlinedBgColor: "transparent",
347
+ },
348
+ });
349
+
350
+ const spin = keyframes({
351
+ "0%": { transform: "rotate(0deg)" },
352
+ "100%": { transform: "rotate(360deg)" },
353
+ });
354
+
355
+ export const SpinningDiv = styled("div", {
356
+ display: "inline-flex",
357
+ alignItems: "center",
358
+ justifyContent: "center",
359
+ animation: `${spin} 1s linear infinite`,
360
+ transformOrigin: "center center",
361
+ });