@lets-events/react 12.5.0 → 12.6.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 (91) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +24 -0
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +15402 -0
  5. package/dist/index.d.ts +15402 -0
  6. package/dist/index.js +13413 -0
  7. package/dist/index.mjs +13307 -0
  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 +125 -125
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +45 -45
  14. package/src/components/Button/styledComponents.ts +313 -313
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +148 -148
  17. package/src/components/Calendar/styledComponents.ts +259 -259
  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 +170 -170
  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 +95 -95
  37. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  38. package/src/components/FormFields/DoubleCalendarFormField.tsx +93 -93
  39. package/src/components/FormFields/EmailFormField.tsx +27 -27
  40. package/src/components/FormFields/Form.tsx +39 -39
  41. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +32 -32
  42. package/src/components/FormFields/MultiSelectFormField.tsx +64 -64
  43. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  44. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  45. package/src/components/FormFields/RichEditorFormField.tsx +103 -103
  46. package/src/components/FormFields/SelectFormField.tsx +93 -93
  47. package/src/components/FormFields/SwitchFormField.tsx +46 -46
  48. package/src/components/FormFields/TextAreaFormField.tsx +61 -59
  49. package/src/components/FormFields/TextFormField.tsx +112 -112
  50. package/src/components/FormFields/TimePickerFormField.tsx +88 -88
  51. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  52. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  53. package/src/components/FormFields/utils/validation.ts +23 -23
  54. package/src/components/Grid.tsx +137 -137
  55. package/src/components/Icon.tsx +47 -47
  56. package/src/components/MenuDropdown/index.tsx +38 -38
  57. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  58. package/src/components/Modal.tsx +110 -110
  59. package/src/components/MultiSelect/index.tsx +268 -243
  60. package/src/components/MultiSelect/styledComponents.ts +160 -160
  61. package/src/components/RadioGroup.tsx +210 -210
  62. package/src/components/RichEditor/QuillComponent.tsx +457 -457
  63. package/src/components/RichEditor/RichEditor.tsx +49 -49
  64. package/src/components/RichEditor/index.ts +2 -2
  65. package/src/components/RichEditor/styledComponents.ts +1151 -1151
  66. package/src/components/Section.tsx +33 -33
  67. package/src/components/Step.tsx +164 -164
  68. package/src/components/Switch.tsx +108 -108
  69. package/src/components/Text.tsx +38 -38
  70. package/src/components/TextField.tsx +372 -372
  71. package/src/components/TextareaField.tsx +116 -138
  72. package/src/components/TimePicker.tsx +328 -328
  73. package/src/components/Toast/components/ToastItem.tsx +41 -41
  74. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  75. package/src/components/Toast/hooks/useToast.ts +12 -12
  76. package/src/components/Toast/index.tsx +5 -5
  77. package/src/components/Toast/styles/index.ts +135 -135
  78. package/src/components/Toast/types/index.ts +46 -46
  79. package/src/components/Tooltip/index.tsx +66 -66
  80. package/src/components/Tooltip/styles.ts +77 -77
  81. package/src/hooks/useCountries.ts +41 -41
  82. package/src/hooks/useImageUpload.ts +139 -139
  83. package/src/hooks/useOnClickOutside.tsx +42 -42
  84. package/src/index.tsx +71 -71
  85. package/src/styles/index.ts +41 -41
  86. package/src/types/typographyValues.ts +178 -178
  87. package/src/utils/getNestedValue.ts +3 -3
  88. package/src/utils/states.ts +29 -29
  89. package/src/utils/uploadService.ts +180 -180
  90. package/tsconfig.json +3 -3
  91. package/tsup.config.ts +38 -38
@@ -1,211 +1,211 @@
1
- import { ComponentProps } from 'react'
2
- import { styled } from '../styles'
3
- import { RadioGroup as RadioGroupRadix } from "@radix-ui/themes";
4
- import { typographyLabelValues } from "../types/typographyValues";
5
-
6
- export const RadioGroupStyled = styled(RadioGroupRadix.Root, {
7
- fontFamily: '$default',
8
-
9
- 'label': {
10
- display: 'flex',
11
- alignItems: 'center',
12
- gap: '$8',
13
- cursor: 'pointer',
14
- '&:focus button, &:hover button': {
15
- transition: 'all 300ms ease-out',
16
- boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
17
- }
18
- },
19
- 'label button': {
20
- backgroundColor: '$white',
21
- borderRadius: '$full',
22
- height: '$16',
23
- width: '$16',
24
- position: 'relative',
25
- border: '2px solid $dark300',
26
- cursor: 'pointer',
27
- },
28
- 'label button[data-state=checked]:before': {
29
- backgroundColor: '$dark50',
30
- content: '',
31
- width: '8px',
32
- height: '8px',
33
- position: 'absolute',
34
- top: '2px',
35
- right: '2px',
36
- borderRadius: '$full',
37
- zIndex: 2,
38
- },
39
- 'label button[data-state=checked]:after': {
40
- backgroundColor: '$brand500',
41
- content: '',
42
- height: '$16',
43
- width: '$16',
44
- position: 'absolute',
45
- top: '-2px',
46
- right: '-2px',
47
- borderRadius: '$full',
48
- zIndex: 1,
49
- },
50
- variants: {
51
- color: {
52
- success: {
53
- 'label': {
54
- '&:focus button, &:hover button': {
55
- boxShadow: '0px 0px 0px 4px rgba(38, 167, 67, 0.50)',
56
- }
57
- },
58
- 'label button': {
59
- borderColor: '$green500',
60
- backgroundColor: '$dark50',
61
- },
62
- 'label button[data-state=checked]:after': {
63
- backgroundColor: '$green500',
64
- },
65
- },
66
- blue: {},
67
- error: {
68
- 'label': {
69
- '&:focus button, &:hover button': {
70
- boxShadow: '0px 0px 0px 4px rgba(225, 86, 98, 0.50)'
71
- }
72
- },
73
- 'label button': {
74
- borderColor: '$error400',
75
- backgroundColor: '$dark50',
76
- },
77
- 'label button[data-state=checked]:after': {
78
- backgroundColor: '$error600',
79
- },
80
- }
81
- },
82
- disabled: {
83
- true: {
84
- 'label': {
85
- cursor: 'not-allowed',
86
- opacity: 0.5,
87
- '&:focus button, &:hover button': {
88
- boxShadow: 'none',
89
- }
90
- },
91
- 'label button': {
92
- cursor: 'not-allowed',
93
- }
94
- },
95
- false: {}
96
- },
97
- typography: typographyLabelValues,
98
- fontWeight: {
99
- regular: { fontWeight: '$regular' },
100
- medium: { fontWeight: '$medium' },
101
- semibold: { fontWeight: '$semibold' },
102
- bold: { fontWeight: '$bold' },
103
- },
104
- },
105
-
106
- compoundVariants: [
107
- {
108
- color: 'blue',
109
- disabled: false,
110
- css: {
111
- 'label': {
112
- '&:focus button, &:hover button': {
113
- boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
114
- }
115
- },
116
- 'label button': {
117
- borderColor: '$dark300',
118
- },
119
- 'label button[data-state=checked]:after': {
120
- backgroundColor: '$brand500',
121
- },
122
- }
123
- },
124
-
125
- {
126
- color: 'blue',
127
- disabled: true,
128
- css: {
129
- 'label button': {
130
- borderColor: '$brand100',
131
- backgroundColor: '$dark50',
132
- },
133
- 'label button[data-state=checked]:after': {
134
- backgroundColor: '$brand100',
135
- },
136
- }
137
- },
138
-
139
- {
140
- color: 'success',
141
- disabled: true,
142
- css: {
143
- 'label button': {
144
- borderColor: '$success100',
145
- backgroundColor: '$dark50',
146
- },
147
- 'label button[data-state=checked]:after': {
148
- backgroundColor: '$success100',
149
- }
150
- }
151
- },
152
-
153
- {
154
- color: 'error',
155
- disabled: true,
156
- css: {
157
- 'label button': {
158
- borderColor: '$error100',
159
- backgroundColor: '$dark50',
160
- },
161
- 'label button[data-state=checked]:after': {
162
- backgroundColor: '$error100',
163
- }
164
- }
165
- }
166
- ],
167
- defaultVariants: {
168
- color: 'blue',
169
- disabled: false
170
- }
171
- })
172
-
173
- export type RadioGroupProps = ComponentProps<typeof RadioGroupStyled> & {
174
- placeholder?: string
175
- children?: React.ReactNode
176
- color?: string
177
- disabled?: boolean
178
- typography?: string
179
- fontWeight?: 'regular' | 'medium' | 'semibold' | 'bold',
180
- }
181
-
182
- export type RadioItemProps = {
183
- children?: React.ReactNode
184
- value: string
185
- }
186
-
187
- export function RadioGroup({
188
- children,
189
- disabled,
190
- ...props
191
- }: RadioGroupProps) {
192
- return (
193
- <RadioGroupStyled
194
- disabled={disabled}
195
- {...props}
196
- >
197
- {children}
198
- </RadioGroupStyled>
199
- )
200
- }
201
-
202
- export function RadioItem({
203
- children,
204
- ...props
205
- }: RadioItemProps) {
206
- return (
207
- <RadioGroupRadix.Item {...props}>
208
- {children}
209
- </RadioGroupRadix.Item>
210
- )
1
+ import { ComponentProps } from 'react'
2
+ import { styled } from '../styles'
3
+ import { RadioGroup as RadioGroupRadix } from "@radix-ui/themes";
4
+ import { typographyLabelValues } from "../types/typographyValues";
5
+
6
+ export const RadioGroupStyled = styled(RadioGroupRadix.Root, {
7
+ fontFamily: '$default',
8
+
9
+ 'label': {
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ gap: '$8',
13
+ cursor: 'pointer',
14
+ '&:focus button, &:hover button': {
15
+ transition: 'all 300ms ease-out',
16
+ boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
17
+ }
18
+ },
19
+ 'label button': {
20
+ backgroundColor: '$white',
21
+ borderRadius: '$full',
22
+ height: '$16',
23
+ width: '$16',
24
+ position: 'relative',
25
+ border: '2px solid $dark300',
26
+ cursor: 'pointer',
27
+ },
28
+ 'label button[data-state=checked]:before': {
29
+ backgroundColor: '$dark50',
30
+ content: '',
31
+ width: '8px',
32
+ height: '8px',
33
+ position: 'absolute',
34
+ top: '2px',
35
+ right: '2px',
36
+ borderRadius: '$full',
37
+ zIndex: 2,
38
+ },
39
+ 'label button[data-state=checked]:after': {
40
+ backgroundColor: '$brand500',
41
+ content: '',
42
+ height: '$16',
43
+ width: '$16',
44
+ position: 'absolute',
45
+ top: '-2px',
46
+ right: '-2px',
47
+ borderRadius: '$full',
48
+ zIndex: 1,
49
+ },
50
+ variants: {
51
+ color: {
52
+ success: {
53
+ 'label': {
54
+ '&:focus button, &:hover button': {
55
+ boxShadow: '0px 0px 0px 4px rgba(38, 167, 67, 0.50)',
56
+ }
57
+ },
58
+ 'label button': {
59
+ borderColor: '$green500',
60
+ backgroundColor: '$dark50',
61
+ },
62
+ 'label button[data-state=checked]:after': {
63
+ backgroundColor: '$green500',
64
+ },
65
+ },
66
+ blue: {},
67
+ error: {
68
+ 'label': {
69
+ '&:focus button, &:hover button': {
70
+ boxShadow: '0px 0px 0px 4px rgba(225, 86, 98, 0.50)'
71
+ }
72
+ },
73
+ 'label button': {
74
+ borderColor: '$error400',
75
+ backgroundColor: '$dark50',
76
+ },
77
+ 'label button[data-state=checked]:after': {
78
+ backgroundColor: '$error600',
79
+ },
80
+ }
81
+ },
82
+ disabled: {
83
+ true: {
84
+ 'label': {
85
+ cursor: 'not-allowed',
86
+ opacity: 0.5,
87
+ '&:focus button, &:hover button': {
88
+ boxShadow: 'none',
89
+ }
90
+ },
91
+ 'label button': {
92
+ cursor: 'not-allowed',
93
+ }
94
+ },
95
+ false: {}
96
+ },
97
+ typography: typographyLabelValues,
98
+ fontWeight: {
99
+ regular: { fontWeight: '$regular' },
100
+ medium: { fontWeight: '$medium' },
101
+ semibold: { fontWeight: '$semibold' },
102
+ bold: { fontWeight: '$bold' },
103
+ },
104
+ },
105
+
106
+ compoundVariants: [
107
+ {
108
+ color: 'blue',
109
+ disabled: false,
110
+ css: {
111
+ 'label': {
112
+ '&:focus button, &:hover button': {
113
+ boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
114
+ }
115
+ },
116
+ 'label button': {
117
+ borderColor: '$dark300',
118
+ },
119
+ 'label button[data-state=checked]:after': {
120
+ backgroundColor: '$brand500',
121
+ },
122
+ }
123
+ },
124
+
125
+ {
126
+ color: 'blue',
127
+ disabled: true,
128
+ css: {
129
+ 'label button': {
130
+ borderColor: '$brand100',
131
+ backgroundColor: '$dark50',
132
+ },
133
+ 'label button[data-state=checked]:after': {
134
+ backgroundColor: '$brand100',
135
+ },
136
+ }
137
+ },
138
+
139
+ {
140
+ color: 'success',
141
+ disabled: true,
142
+ css: {
143
+ 'label button': {
144
+ borderColor: '$success100',
145
+ backgroundColor: '$dark50',
146
+ },
147
+ 'label button[data-state=checked]:after': {
148
+ backgroundColor: '$success100',
149
+ }
150
+ }
151
+ },
152
+
153
+ {
154
+ color: 'error',
155
+ disabled: true,
156
+ css: {
157
+ 'label button': {
158
+ borderColor: '$error100',
159
+ backgroundColor: '$dark50',
160
+ },
161
+ 'label button[data-state=checked]:after': {
162
+ backgroundColor: '$error100',
163
+ }
164
+ }
165
+ }
166
+ ],
167
+ defaultVariants: {
168
+ color: 'blue',
169
+ disabled: false
170
+ }
171
+ })
172
+
173
+ export type RadioGroupProps = ComponentProps<typeof RadioGroupStyled> & {
174
+ placeholder?: string
175
+ children?: React.ReactNode
176
+ color?: string
177
+ disabled?: boolean
178
+ typography?: string
179
+ fontWeight?: 'regular' | 'medium' | 'semibold' | 'bold',
180
+ }
181
+
182
+ export type RadioItemProps = {
183
+ children?: React.ReactNode
184
+ value: string
185
+ }
186
+
187
+ export function RadioGroup({
188
+ children,
189
+ disabled,
190
+ ...props
191
+ }: RadioGroupProps) {
192
+ return (
193
+ <RadioGroupStyled
194
+ disabled={disabled}
195
+ {...props}
196
+ >
197
+ {children}
198
+ </RadioGroupStyled>
199
+ )
200
+ }
201
+
202
+ export function RadioItem({
203
+ children,
204
+ ...props
205
+ }: RadioItemProps) {
206
+ return (
207
+ <RadioGroupRadix.Item {...props}>
208
+ {children}
209
+ </RadioGroupRadix.Item>
210
+ )
211
211
  }