@lets-events/react 12.3.9 → 12.3.10

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 (88) 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.js +2 -1
  5. package/dist/index.mjs +2 -1
  6. package/package.json +1 -1
  7. package/src/components/Alert.tsx +303 -303
  8. package/src/components/Avatar.tsx +55 -55
  9. package/src/components/Badge.tsx +125 -125
  10. package/src/components/Box.tsx +3 -3
  11. package/src/components/Button/index.tsx +45 -45
  12. package/src/components/Button/styledComponents.ts +313 -313
  13. package/src/components/ButtonGroup.tsx +484 -484
  14. package/src/components/Calendar/index.tsx +148 -148
  15. package/src/components/Calendar/styledComponents.ts +250 -250
  16. package/src/components/Card.tsx +67 -67
  17. package/src/components/CheckboxGroup.tsx +176 -176
  18. package/src/components/Container.tsx +39 -39
  19. package/src/components/Divider.tsx +7 -7
  20. package/src/components/Drawer/index.tsx +98 -97
  21. package/src/components/Drawer/styledComponents.ts +103 -103
  22. package/src/components/Dropdown.tsx +302 -302
  23. package/src/components/Filter.tsx +164 -164
  24. package/src/components/Flex.tsx +118 -118
  25. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  26. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  27. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  28. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  29. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  30. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  31. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  32. package/src/components/FormFields/CPFFormField.tsx +78 -78
  33. package/src/components/FormFields/CalendarFormField.tsx +95 -95
  34. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  35. package/src/components/FormFields/EmailFormField.tsx +27 -27
  36. package/src/components/FormFields/Form.tsx +39 -39
  37. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
  38. package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
  39. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  40. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  41. package/src/components/FormFields/RichEditorFormField.tsx +103 -103
  42. package/src/components/FormFields/SelectFormField.tsx +93 -93
  43. package/src/components/FormFields/SwitchFormField.tsx +46 -46
  44. package/src/components/FormFields/TextAreaFormField.tsx +57 -57
  45. package/src/components/FormFields/TextFormField.tsx +112 -112
  46. package/src/components/FormFields/TimePickerFormField.tsx +88 -88
  47. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  48. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  49. package/src/components/FormFields/utils/validation.ts +23 -23
  50. package/src/components/Grid.tsx +137 -137
  51. package/src/components/Icon.tsx +47 -47
  52. package/src/components/MenuDropdown/index.tsx +38 -38
  53. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  54. package/src/components/Modal.tsx +110 -110
  55. package/src/components/MultiSelect/index.tsx +243 -243
  56. package/src/components/MultiSelect/styledComponents.ts +160 -160
  57. package/src/components/RadioGroup.tsx +210 -210
  58. package/src/components/RichEditor/QuillComponent.tsx +457 -457
  59. package/src/components/RichEditor/RichEditor.tsx +49 -49
  60. package/src/components/RichEditor/index.ts +2 -2
  61. package/src/components/RichEditor/styledComponents.ts +1151 -1151
  62. package/src/components/Section.tsx +33 -33
  63. package/src/components/Step.tsx +164 -164
  64. package/src/components/Switch.tsx +108 -108
  65. package/src/components/Text.tsx +38 -38
  66. package/src/components/TextField.tsx +372 -372
  67. package/src/components/TextareaField.tsx +127 -127
  68. package/src/components/TimePicker.tsx +328 -328
  69. package/src/components/Toast/components/ToastItem.tsx +41 -41
  70. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  71. package/src/components/Toast/hooks/useToast.ts +12 -12
  72. package/src/components/Toast/index.tsx +5 -5
  73. package/src/components/Toast/styles/index.ts +135 -135
  74. package/src/components/Toast/types/index.ts +46 -46
  75. package/src/components/Tooltip/index.tsx +66 -66
  76. package/src/components/Tooltip/styles.ts +77 -77
  77. package/src/hooks/useCountries.ts +41 -41
  78. package/src/hooks/useImageUpload.ts +139 -139
  79. package/src/hooks/useOnClickOutside.tsx +42 -42
  80. package/src/index.tsx +69 -69
  81. package/src/styles/index.ts +41 -41
  82. package/src/types/typographyValues.ts +178 -178
  83. package/src/utils/getNestedValue.ts +3 -3
  84. package/src/utils/states.ts +29 -29
  85. package/src/utils/uploadService.ts +180 -180
  86. package/tsconfig.json +3 -3
  87. package/tsup.config.ts +38 -38
  88. package/dist/index.css +0 -171
@@ -1,303 +1,303 @@
1
- import { styled } from "../styles";
2
- import { Theme, AlertDialog } from "@radix-ui/themes";
3
- import { Button } from "./Button";
4
- import { Flex } from "./Flex";
5
- import Icon from "./Icon";
6
- import { Text } from "./Text";
7
-
8
- export const AlertDialogSimpleStyled = styled(AlertDialog.Content, {
9
- fontFamily: "$default",
10
- lineHeight: "$base",
11
- fontSize: "$13",
12
- padding: "$16",
13
- borderRadius: "$sm",
14
- display: "flex",
15
- alignItems: "center",
16
- justifyContent: "space-between",
17
- gap: "$10",
18
- marginTop: "$10",
19
- variants: {
20
- color: {
21
- error: {
22
- backgroundColor: "$error50",
23
- border: "1px solid $error600",
24
- color: "$error600",
25
- svg: {
26
- color: "$error600",
27
- },
28
- },
29
- warning: {
30
- backgroundColor: "$warning50",
31
- border: "1px solid $warning600",
32
- color: "$warning600",
33
- svg: {
34
- color: "$warning600",
35
- },
36
- },
37
- success: {
38
- backgroundColor: "$success50",
39
- border: "1px solid $success600",
40
- color: "$success600",
41
- svg: {
42
- color: "$success600",
43
- },
44
- },
45
- info: {
46
- backgroundColor: "$info50",
47
- border: "1px solid $info600",
48
- color: "$info600",
49
- svg: {
50
- color: "$info600",
51
- },
52
- },
53
- },
54
- },
55
- defaultVariants: {
56
- color: "success",
57
- },
58
- });
59
-
60
- export const AlertDialogCompleteStyled = styled(AlertDialog.Content, {
61
- fontFamily: "$default",
62
- lineHeight: "$base",
63
- fontSize: "$13",
64
- borderRadius: "$sm",
65
- marginTop: "$10",
66
- maxWidth: "440px",
67
- width: "100%",
68
- boxShadow: "0px 0px 15px 5px rgba(0, 0, 0, 0.05)",
69
- border: "1px solid $neutral200",
70
- ".le-alert-dialog-row": {
71
- display: "flex",
72
- flexDirection: "column",
73
- flexWrap: "wrap",
74
- alignItems: "center",
75
- textAlign: "center",
76
- justifyContent: "space-between",
77
- gap: "$10",
78
- },
79
- variants: {
80
- color: {},
81
- },
82
- });
83
-
84
- export const AlertDialogDescriptionStyled = styled(AlertDialog.Description, {
85
- padding: 0,
86
- margin: 0,
87
- });
88
-
89
- export const AlertDialogTitleStyled = styled(AlertDialog.Title, {
90
- fontFamily: "$default",
91
- lineHeight: "$base",
92
- fontSize: "$20",
93
- fontWeight: "$semibold",
94
- padding: 0,
95
- margin: 0,
96
- });
97
-
98
- export const AlertDialogSubtitleStyled = styled(Text, {
99
- margin: 0,
100
- fontSize: "$48",
101
- color: "$gray100",
102
- fontWeight: "$semibold",
103
- });
104
-
105
- export const AlertDialogRowStyled = styled("div", {
106
- padding: "$32 $24",
107
- });
108
-
109
- export const AlertDialoghrStyled = styled("hr", {
110
- margin: 0,
111
- padding: 0,
112
- border: "none",
113
- borderTop: "1px solid $neutral200",
114
- });
115
-
116
- export type AlertProps = {
117
- trigger: React.ReactNode;
118
- color?: "error" | "warning" | "success" | "info";
119
- simpleAlert?: {
120
- description: string;
121
- cancel: boolean;
122
- };
123
- completAlert?: {
124
- title?: string;
125
- subtitle?: string;
126
- description: string;
127
- cancel: boolean;
128
- cancelText?: string;
129
- actionText?: string;
130
- onAction?: () => void;
131
- };
132
- };
133
-
134
- export function Alert({
135
- color,
136
- trigger,
137
- completAlert,
138
- simpleAlert,
139
- ...props
140
- }: AlertProps) {
141
- return (
142
- <>
143
- {simpleAlert && (
144
- <Theme>
145
- <AlertDialog.Root>
146
- <AlertDialog.Trigger>{trigger}</AlertDialog.Trigger>
147
- <>
148
- <AlertDialogSimpleStyled {...props}>
149
- <AlertDialogDescriptionStyled>
150
- {simpleAlert.description}
151
- </AlertDialogDescriptionStyled>
152
- {simpleAlert.cancel && (
153
- <AlertDialog.Cancel>
154
- <Button variant="text">
155
- <Icon name="close" />
156
- </Button>
157
- </AlertDialog.Cancel>
158
- )}
159
- </AlertDialogSimpleStyled>
160
- </>
161
- </AlertDialog.Root>
162
- </Theme>
163
- )}
164
- {completAlert && (
165
- <Theme>
166
- <AlertDialog.Root>
167
- <AlertDialog.Trigger>{trigger}</AlertDialog.Trigger>
168
- <AlertDialogCompleteStyled>
169
- <AlertDialogRowStyled className="le-alert-dialog-row">
170
- {color === "success" && (
171
- <svg
172
- width="56"
173
- height="56"
174
- viewBox="0 0 56 56"
175
- fill="none"
176
- xmlns="http://www.w3.org/2000/svg"
177
- >
178
- <g clipPath="url(#clip0_1428_9995)">
179
- <path
180
- d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM40.3594 22.8594L26.3594 36.8594C25.3312 37.8875 23.6688 37.8875 22.6516 36.8594L15.6516 29.8594C14.6234 28.8312 14.6234 27.1688 15.6516 26.1516C16.6797 25.1344 18.3422 25.1234 19.3594 26.1516L24.5 31.2922L36.6406 19.1406C37.6688 18.1125 39.3312 18.1125 40.3484 19.1406C41.3656 20.1688 41.3766 21.8312 40.3484 22.8484L40.3594 22.8594Z"
181
- fill="#1E8535"
182
- />
183
- </g>
184
- <defs>
185
- <clipPath id="clip0_1428_9995">
186
- <rect width="56" height="56" fill="white" />
187
- </clipPath>
188
- </defs>
189
- </svg>
190
- )}
191
- {color === "error" && (
192
- <svg
193
- width="56"
194
- height="56"
195
- viewBox="0 0 56 56"
196
- fill="none"
197
- xmlns="http://www.w3.org/2000/svg"
198
- >
199
- <g clipPath="url(#clip0_1428_10022)">
200
- <path
201
- d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM19.1406 19.1406C20.1687 18.1125 21.8312 18.1125 22.8484 19.1406L27.9891 24.2812L33.1297 19.1406C34.1578 18.1125 35.8203 18.1125 36.8375 19.1406C37.8547 20.1687 37.8656 21.8312 36.8375 22.8484L31.6969 27.9891L36.8375 33.1297C37.8656 34.1578 37.8656 35.8203 36.8375 36.8375C35.8094 37.8547 34.1469 37.8656 33.1297 36.8375L27.9891 31.6969L22.8484 36.8375C21.8203 37.8656 20.1578 37.8656 19.1406 36.8375C18.1234 35.8094 18.1125 34.1469 19.1406 33.1297L24.2812 27.9891L19.1406 22.8484C18.1125 21.8203 18.1125 20.1578 19.1406 19.1406Z"
202
- fill="#AD1F2B"
203
- />
204
- </g>
205
- <defs>
206
- <clipPath id="clip0_1428_10022">
207
- <rect width="56" height="56" fill="white" />
208
- </clipPath>
209
- </defs>
210
- </svg>
211
- )}
212
- {color === "warning" && (
213
- <svg
214
- width="56"
215
- height="56"
216
- viewBox="0 0 56 56"
217
- fill="none"
218
- xmlns="http://www.w3.org/2000/svg"
219
- >
220
- <g clipPath="url(#clip0_1428_10038)">
221
- <path
222
- d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM28 14C29.4547 14 30.625 15.1703 30.625 16.625V28.875C30.625 30.3297 29.4547 31.5 28 31.5C26.5453 31.5 25.375 30.3297 25.375 28.875V16.625C25.375 15.1703 26.5453 14 28 14ZM24.5 38.5C24.5 37.5717 24.8687 36.6815 25.5251 36.0251C26.1815 35.3688 27.0717 35 28 35C28.9283 35 29.8185 35.3688 30.4749 36.0251C31.1313 36.6815 31.5 37.5717 31.5 38.5C31.5 39.4283 31.1313 40.3185 30.4749 40.9749C29.8185 41.6312 28.9283 42 28 42C27.0717 42 26.1815 41.6312 25.5251 40.9749C24.8687 40.3185 24.5 39.4283 24.5 38.5Z"
223
- fill="#CC9A06"
224
- />
225
- </g>
226
- <defs>
227
- <clipPath id="clip0_1428_10038">
228
- <rect width="56" height="56" fill="white" />
229
- </clipPath>
230
- </defs>
231
- </svg>
232
- )}
233
- {color === "info" && (
234
- <svg
235
- width="40"
236
- height="40"
237
- viewBox="0 0 40 40"
238
- fill="none"
239
- xmlns="http://www.w3.org/2000/svg"
240
- >
241
- <g clipPath="url(#clip0_1645_46)">
242
- <path
243
- d="M20 40C25.3043 40 30.3914 37.8929 34.1421 34.1421C37.8929 30.3914 40 25.3043 40 20C40 14.6957 37.8929 9.60859 34.1421 5.85786C30.3914 2.10714 25.3043 0 20 0C14.6957 0 9.60859 2.10714 5.85786 5.85786C2.10714 9.60859 0 14.6957 0 20C0 25.3043 2.10714 30.3914 5.85786 34.1421C9.60859 37.8929 14.6957 40 20 40ZM20 10C21.0391 10 21.875 10.8359 21.875 11.875V20.625C21.875 21.6641 21.0391 22.5 20 22.5C18.9609 22.5 18.125 21.6641 18.125 20.625V11.875C18.125 10.8359 18.9609 10 20 10ZM17.5 27.5C17.5 26.837 17.7634 26.2011 18.2322 25.7322C18.7011 25.2634 19.337 25 20 25C20.663 25 21.2989 25.2634 21.7678 25.7322C22.2366 26.2011 22.5 26.837 22.5 27.5C22.5 28.163 22.2366 28.7989 21.7678 29.2678C21.2989 29.7366 20.663 30 20 30C19.337 30 18.7011 29.7366 18.2322 29.2678C17.7634 28.7989 17.5 28.163 17.5 27.5Z"
244
- fill="#9FB6C7"
245
- />
246
- </g>
247
- <defs>
248
- <clipPath id="clip0_1645_46">
249
- <rect width="40" height="40" fill="white" />
250
- </clipPath>
251
- </defs>
252
- </svg>
253
- )}
254
- {completAlert.title && (
255
- <AlertDialogTitleStyled>
256
- {completAlert.title}
257
- </AlertDialogTitleStyled>
258
- )}
259
- <AlertDialogDescriptionStyled>
260
- {completAlert.subtitle && (
261
- <Text
262
- css={{
263
- fontSize: "$16",
264
- }}
265
- asChild
266
- >
267
- <h2>{completAlert.subtitle}</h2>
268
- </Text>
269
- )}
270
- {completAlert.description}
271
- </AlertDialogDescriptionStyled>
272
- </AlertDialogRowStyled>
273
- {completAlert.onAction || completAlert.cancel ? (
274
- <AlertDialoghrStyled />
275
- ) : null}
276
- <AlertDialogRowStyled>
277
- <Flex gap="10" justify="end" width={"100%"}>
278
- {completAlert.onAction && (
279
- <AlertDialog.Action>
280
- <Button
281
- variant="contained"
282
- onClick={completAlert.onAction}
283
- >
284
- {completAlert.actionText || "Salvar"}
285
- </Button>
286
- </AlertDialog.Action>
287
- )}
288
- {completAlert.cancel && (
289
- <AlertDialog.Cancel>
290
- <Button variant="outlined" color={"neutral"}>
291
- {completAlert.cancelText || "Cancelar"}
292
- </Button>
293
- </AlertDialog.Cancel>
294
- )}
295
- </Flex>
296
- </AlertDialogRowStyled>
297
- </AlertDialogCompleteStyled>
298
- </AlertDialog.Root>
299
- </Theme>
300
- )}
301
- </>
302
- );
303
- }
1
+ import { styled } from "../styles";
2
+ import { Theme, AlertDialog } from "@radix-ui/themes";
3
+ import { Button } from "./Button";
4
+ import { Flex } from "./Flex";
5
+ import Icon from "./Icon";
6
+ import { Text } from "./Text";
7
+
8
+ export const AlertDialogSimpleStyled = styled(AlertDialog.Content, {
9
+ fontFamily: "$default",
10
+ lineHeight: "$base",
11
+ fontSize: "$13",
12
+ padding: "$16",
13
+ borderRadius: "$sm",
14
+ display: "flex",
15
+ alignItems: "center",
16
+ justifyContent: "space-between",
17
+ gap: "$10",
18
+ marginTop: "$10",
19
+ variants: {
20
+ color: {
21
+ error: {
22
+ backgroundColor: "$error50",
23
+ border: "1px solid $error600",
24
+ color: "$error600",
25
+ svg: {
26
+ color: "$error600",
27
+ },
28
+ },
29
+ warning: {
30
+ backgroundColor: "$warning50",
31
+ border: "1px solid $warning600",
32
+ color: "$warning600",
33
+ svg: {
34
+ color: "$warning600",
35
+ },
36
+ },
37
+ success: {
38
+ backgroundColor: "$success50",
39
+ border: "1px solid $success600",
40
+ color: "$success600",
41
+ svg: {
42
+ color: "$success600",
43
+ },
44
+ },
45
+ info: {
46
+ backgroundColor: "$info50",
47
+ border: "1px solid $info600",
48
+ color: "$info600",
49
+ svg: {
50
+ color: "$info600",
51
+ },
52
+ },
53
+ },
54
+ },
55
+ defaultVariants: {
56
+ color: "success",
57
+ },
58
+ });
59
+
60
+ export const AlertDialogCompleteStyled = styled(AlertDialog.Content, {
61
+ fontFamily: "$default",
62
+ lineHeight: "$base",
63
+ fontSize: "$13",
64
+ borderRadius: "$sm",
65
+ marginTop: "$10",
66
+ maxWidth: "440px",
67
+ width: "100%",
68
+ boxShadow: "0px 0px 15px 5px rgba(0, 0, 0, 0.05)",
69
+ border: "1px solid $neutral200",
70
+ ".le-alert-dialog-row": {
71
+ display: "flex",
72
+ flexDirection: "column",
73
+ flexWrap: "wrap",
74
+ alignItems: "center",
75
+ textAlign: "center",
76
+ justifyContent: "space-between",
77
+ gap: "$10",
78
+ },
79
+ variants: {
80
+ color: {},
81
+ },
82
+ });
83
+
84
+ export const AlertDialogDescriptionStyled = styled(AlertDialog.Description, {
85
+ padding: 0,
86
+ margin: 0,
87
+ });
88
+
89
+ export const AlertDialogTitleStyled = styled(AlertDialog.Title, {
90
+ fontFamily: "$default",
91
+ lineHeight: "$base",
92
+ fontSize: "$20",
93
+ fontWeight: "$semibold",
94
+ padding: 0,
95
+ margin: 0,
96
+ });
97
+
98
+ export const AlertDialogSubtitleStyled = styled(Text, {
99
+ margin: 0,
100
+ fontSize: "$48",
101
+ color: "$gray100",
102
+ fontWeight: "$semibold",
103
+ });
104
+
105
+ export const AlertDialogRowStyled = styled("div", {
106
+ padding: "$32 $24",
107
+ });
108
+
109
+ export const AlertDialoghrStyled = styled("hr", {
110
+ margin: 0,
111
+ padding: 0,
112
+ border: "none",
113
+ borderTop: "1px solid $neutral200",
114
+ });
115
+
116
+ export type AlertProps = {
117
+ trigger: React.ReactNode;
118
+ color?: "error" | "warning" | "success" | "info";
119
+ simpleAlert?: {
120
+ description: string;
121
+ cancel: boolean;
122
+ };
123
+ completAlert?: {
124
+ title?: string;
125
+ subtitle?: string;
126
+ description: string;
127
+ cancel: boolean;
128
+ cancelText?: string;
129
+ actionText?: string;
130
+ onAction?: () => void;
131
+ };
132
+ };
133
+
134
+ export function Alert({
135
+ color,
136
+ trigger,
137
+ completAlert,
138
+ simpleAlert,
139
+ ...props
140
+ }: AlertProps) {
141
+ return (
142
+ <>
143
+ {simpleAlert && (
144
+ <Theme>
145
+ <AlertDialog.Root>
146
+ <AlertDialog.Trigger>{trigger}</AlertDialog.Trigger>
147
+ <>
148
+ <AlertDialogSimpleStyled {...props}>
149
+ <AlertDialogDescriptionStyled>
150
+ {simpleAlert.description}
151
+ </AlertDialogDescriptionStyled>
152
+ {simpleAlert.cancel && (
153
+ <AlertDialog.Cancel>
154
+ <Button variant="text">
155
+ <Icon name="close" />
156
+ </Button>
157
+ </AlertDialog.Cancel>
158
+ )}
159
+ </AlertDialogSimpleStyled>
160
+ </>
161
+ </AlertDialog.Root>
162
+ </Theme>
163
+ )}
164
+ {completAlert && (
165
+ <Theme>
166
+ <AlertDialog.Root>
167
+ <AlertDialog.Trigger>{trigger}</AlertDialog.Trigger>
168
+ <AlertDialogCompleteStyled>
169
+ <AlertDialogRowStyled className="le-alert-dialog-row">
170
+ {color === "success" && (
171
+ <svg
172
+ width="56"
173
+ height="56"
174
+ viewBox="0 0 56 56"
175
+ fill="none"
176
+ xmlns="http://www.w3.org/2000/svg"
177
+ >
178
+ <g clipPath="url(#clip0_1428_9995)">
179
+ <path
180
+ d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM40.3594 22.8594L26.3594 36.8594C25.3312 37.8875 23.6688 37.8875 22.6516 36.8594L15.6516 29.8594C14.6234 28.8312 14.6234 27.1688 15.6516 26.1516C16.6797 25.1344 18.3422 25.1234 19.3594 26.1516L24.5 31.2922L36.6406 19.1406C37.6688 18.1125 39.3312 18.1125 40.3484 19.1406C41.3656 20.1688 41.3766 21.8312 40.3484 22.8484L40.3594 22.8594Z"
181
+ fill="#1E8535"
182
+ />
183
+ </g>
184
+ <defs>
185
+ <clipPath id="clip0_1428_9995">
186
+ <rect width="56" height="56" fill="white" />
187
+ </clipPath>
188
+ </defs>
189
+ </svg>
190
+ )}
191
+ {color === "error" && (
192
+ <svg
193
+ width="56"
194
+ height="56"
195
+ viewBox="0 0 56 56"
196
+ fill="none"
197
+ xmlns="http://www.w3.org/2000/svg"
198
+ >
199
+ <g clipPath="url(#clip0_1428_10022)">
200
+ <path
201
+ d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM19.1406 19.1406C20.1687 18.1125 21.8312 18.1125 22.8484 19.1406L27.9891 24.2812L33.1297 19.1406C34.1578 18.1125 35.8203 18.1125 36.8375 19.1406C37.8547 20.1687 37.8656 21.8312 36.8375 22.8484L31.6969 27.9891L36.8375 33.1297C37.8656 34.1578 37.8656 35.8203 36.8375 36.8375C35.8094 37.8547 34.1469 37.8656 33.1297 36.8375L27.9891 31.6969L22.8484 36.8375C21.8203 37.8656 20.1578 37.8656 19.1406 36.8375C18.1234 35.8094 18.1125 34.1469 19.1406 33.1297L24.2812 27.9891L19.1406 22.8484C18.1125 21.8203 18.1125 20.1578 19.1406 19.1406Z"
202
+ fill="#AD1F2B"
203
+ />
204
+ </g>
205
+ <defs>
206
+ <clipPath id="clip0_1428_10022">
207
+ <rect width="56" height="56" fill="white" />
208
+ </clipPath>
209
+ </defs>
210
+ </svg>
211
+ )}
212
+ {color === "warning" && (
213
+ <svg
214
+ width="56"
215
+ height="56"
216
+ viewBox="0 0 56 56"
217
+ fill="none"
218
+ xmlns="http://www.w3.org/2000/svg"
219
+ >
220
+ <g clipPath="url(#clip0_1428_10038)">
221
+ <path
222
+ d="M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM28 14C29.4547 14 30.625 15.1703 30.625 16.625V28.875C30.625 30.3297 29.4547 31.5 28 31.5C26.5453 31.5 25.375 30.3297 25.375 28.875V16.625C25.375 15.1703 26.5453 14 28 14ZM24.5 38.5C24.5 37.5717 24.8687 36.6815 25.5251 36.0251C26.1815 35.3688 27.0717 35 28 35C28.9283 35 29.8185 35.3688 30.4749 36.0251C31.1313 36.6815 31.5 37.5717 31.5 38.5C31.5 39.4283 31.1313 40.3185 30.4749 40.9749C29.8185 41.6312 28.9283 42 28 42C27.0717 42 26.1815 41.6312 25.5251 40.9749C24.8687 40.3185 24.5 39.4283 24.5 38.5Z"
223
+ fill="#CC9A06"
224
+ />
225
+ </g>
226
+ <defs>
227
+ <clipPath id="clip0_1428_10038">
228
+ <rect width="56" height="56" fill="white" />
229
+ </clipPath>
230
+ </defs>
231
+ </svg>
232
+ )}
233
+ {color === "info" && (
234
+ <svg
235
+ width="40"
236
+ height="40"
237
+ viewBox="0 0 40 40"
238
+ fill="none"
239
+ xmlns="http://www.w3.org/2000/svg"
240
+ >
241
+ <g clipPath="url(#clip0_1645_46)">
242
+ <path
243
+ d="M20 40C25.3043 40 30.3914 37.8929 34.1421 34.1421C37.8929 30.3914 40 25.3043 40 20C40 14.6957 37.8929 9.60859 34.1421 5.85786C30.3914 2.10714 25.3043 0 20 0C14.6957 0 9.60859 2.10714 5.85786 5.85786C2.10714 9.60859 0 14.6957 0 20C0 25.3043 2.10714 30.3914 5.85786 34.1421C9.60859 37.8929 14.6957 40 20 40ZM20 10C21.0391 10 21.875 10.8359 21.875 11.875V20.625C21.875 21.6641 21.0391 22.5 20 22.5C18.9609 22.5 18.125 21.6641 18.125 20.625V11.875C18.125 10.8359 18.9609 10 20 10ZM17.5 27.5C17.5 26.837 17.7634 26.2011 18.2322 25.7322C18.7011 25.2634 19.337 25 20 25C20.663 25 21.2989 25.2634 21.7678 25.7322C22.2366 26.2011 22.5 26.837 22.5 27.5C22.5 28.163 22.2366 28.7989 21.7678 29.2678C21.2989 29.7366 20.663 30 20 30C19.337 30 18.7011 29.7366 18.2322 29.2678C17.7634 28.7989 17.5 28.163 17.5 27.5Z"
244
+ fill="#9FB6C7"
245
+ />
246
+ </g>
247
+ <defs>
248
+ <clipPath id="clip0_1645_46">
249
+ <rect width="40" height="40" fill="white" />
250
+ </clipPath>
251
+ </defs>
252
+ </svg>
253
+ )}
254
+ {completAlert.title && (
255
+ <AlertDialogTitleStyled>
256
+ {completAlert.title}
257
+ </AlertDialogTitleStyled>
258
+ )}
259
+ <AlertDialogDescriptionStyled>
260
+ {completAlert.subtitle && (
261
+ <Text
262
+ css={{
263
+ fontSize: "$16",
264
+ }}
265
+ asChild
266
+ >
267
+ <h2>{completAlert.subtitle}</h2>
268
+ </Text>
269
+ )}
270
+ {completAlert.description}
271
+ </AlertDialogDescriptionStyled>
272
+ </AlertDialogRowStyled>
273
+ {completAlert.onAction || completAlert.cancel ? (
274
+ <AlertDialoghrStyled />
275
+ ) : null}
276
+ <AlertDialogRowStyled>
277
+ <Flex gap="10" justify="end" width={"100%"}>
278
+ {completAlert.onAction && (
279
+ <AlertDialog.Action>
280
+ <Button
281
+ variant="contained"
282
+ onClick={completAlert.onAction}
283
+ >
284
+ {completAlert.actionText || "Salvar"}
285
+ </Button>
286
+ </AlertDialog.Action>
287
+ )}
288
+ {completAlert.cancel && (
289
+ <AlertDialog.Cancel>
290
+ <Button variant="outlined" color={"neutral"}>
291
+ {completAlert.cancelText || "Cancelar"}
292
+ </Button>
293
+ </AlertDialog.Cancel>
294
+ )}
295
+ </Flex>
296
+ </AlertDialogRowStyled>
297
+ </AlertDialogCompleteStyled>
298
+ </AlertDialog.Root>
299
+ </Theme>
300
+ )}
301
+ </>
302
+ );
303
+ }