@lets-events/react 7.2.1 → 9.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.
Files changed (39) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -19
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +6 -5
  5. package/dist/index.d.ts +6 -5
  6. package/dist/index.js +227 -719
  7. package/dist/index.mjs +164 -656
  8. package/package.json +3 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +128 -128
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +12 -12
  14. package/src/components/Button/styledComponents.ts +250 -250
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +136 -136
  17. package/src/components/Calendar/styledComponents.ts +208 -208
  18. package/src/components/Card.tsx +69 -69
  19. package/src/components/CheckboxGroup.tsx +214 -214
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Dropdown.tsx +167 -167
  22. package/src/components/Filter.tsx +164 -164
  23. package/src/components/Flex.tsx +118 -118
  24. package/src/components/Grid.tsx +137 -137
  25. package/src/components/Icon.tsx +47 -47
  26. package/src/components/Modal.tsx +103 -109
  27. package/src/components/RadioGroup.tsx +210 -210
  28. package/src/components/Section.tsx +33 -33
  29. package/src/components/Step.tsx +164 -164
  30. package/src/components/Switch.tsx +108 -108
  31. package/src/components/Text.tsx +30 -30
  32. package/src/components/TextField.tsx +299 -299
  33. package/src/components/TextareaField.tsx +101 -101
  34. package/src/components/TimePicker.tsx +239 -239
  35. package/src/hooks/useOnClickOutside.tsx +20 -20
  36. package/src/index.tsx +31 -31
  37. package/src/styles/index.ts +38 -38
  38. package/src/types/typographyValues.ts +178 -178
  39. package/tsconfig.json +3 -3
@@ -1,214 +1,214 @@
1
- import { ComponentProps } from 'react'
2
- import { styled } from '../styles'
3
- import { CheckboxGroup as CheckboxGroupRadix } from "@radix-ui/themes";
4
- import { typographyLabelValues } from "../types/typographyValues";
5
-
6
- export const CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
7
- fontFamily: '$default',
8
- 'svg': {
9
- display: 'none'
10
- },
11
- 'label': {
12
- display: 'flex',
13
- alignItems: 'center',
14
- gap: '$8',
15
- cursor: 'pointer',
16
- '&:focus button, &:hover button': {
17
- transition: 'all 300ms ease-out',
18
- boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
19
- }
20
- },
21
- 'label button': {
22
- backgroundColor: '$white',
23
- borderRadius: '2px',
24
- height: '$16',
25
- width: '$16',
26
- position: 'relative',
27
- border: '2px solid $dark300',
28
- cursor: 'pointer',
29
- },
30
- 'label button[data-state=checked]:before': {
31
- backgroundColor: '$dark50',
32
- content: '',
33
- width: '8px',
34
- height: '8px',
35
- position: 'absolute',
36
- top: '2px',
37
- right: '2px',
38
- zIndex: 2,
39
- },
40
- 'label button[data-state=checked]:after': {
41
- backgroundColor: '$brand500',
42
- content: '',
43
- height: '$16',
44
- width: '$16',
45
- position: 'absolute',
46
- top: '-2px',
47
- right: '-2px',
48
- borderRadius: '2px',
49
- zIndex: 1,
50
- },
51
-
52
- variants: {
53
- color: {
54
- success: {
55
- 'label': {
56
- '&:focus button, &:hover button': {
57
- boxShadow: '0px 0px 0px 4px rgba(38, 167, 67, 0.50)',
58
- }
59
- },
60
- 'label button': {
61
- borderColor: '$green500',
62
- backgroundColor: '$dark50',
63
- },
64
- 'label button[data-state=checked]:after': {
65
- backgroundColor: '$green500',
66
- },
67
- },
68
- blue: {},
69
- error: {
70
- 'label': {
71
- '&:focus button, &:hover button': {
72
- boxShadow: '0px 0px 0px 4px rgba(225, 86, 98, 0.50)'
73
- }
74
- },
75
- 'label button': {
76
- borderColor: '$error400',
77
- backgroundColor: '$dark50',
78
- },
79
- 'label button[data-state=checked]:after': {
80
- backgroundColor: '$error600',
81
- },
82
- }
83
- },
84
- disabled: {
85
- true: {
86
- 'label': {
87
- cursor: 'not-allowed',
88
- opacity: 0.5,
89
- '&:focus button, &:hover button': {
90
- boxShadow: 'none',
91
- }
92
- },
93
- 'label button': {
94
- cursor: 'not-allowed',
95
- }
96
- },
97
- false: {}
98
- },
99
- typography: typographyLabelValues,
100
- fontWeight: {
101
- regular: { fontWeight: '$regular' },
102
- medium: { fontWeight: '$medium' },
103
- semibold: { fontWeight: '$semibold' },
104
- bold: { fontWeight: '$bold' },
105
- },
106
- },
107
-
108
- compoundVariants: [
109
-
110
- {
111
- color: 'blue',
112
- disabled: false,
113
- css: {
114
- 'label': {
115
- '&:focus button, &:hover button': {
116
- boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
117
- }
118
- },
119
- 'label button': {
120
- borderColor: '$dark300',
121
- },
122
- 'label button[data-state=checked]:after': {
123
- backgroundColor: '$brand500',
124
- },
125
- }
126
- },
127
-
128
- {
129
- color: 'blue',
130
- disabled: true,
131
- css: {
132
- 'label button': {
133
- borderColor: '$brand100',
134
- backgroundColor: '$dark50',
135
- },
136
- 'label button[data-state=checked]:after': {
137
- backgroundColor: '$brand100',
138
- },
139
- }
140
- },
141
-
142
- {
143
- color: 'success',
144
- disabled: true,
145
- css: {
146
- 'label button': {
147
- borderColor: '$success100',
148
- backgroundColor: '$dark50',
149
- },
150
- 'label button[data-state=checked]:after': {
151
- backgroundColor: '$success100',
152
- }
153
- }
154
- },
155
-
156
- {
157
- color: 'error',
158
- disabled: true,
159
- css: {
160
- 'label button': {
161
- borderColor: '$error100',
162
- backgroundColor: '$dark50',
163
- },
164
- 'label button[data-state=checked]:after': {
165
- backgroundColor: '$error100',
166
- }
167
- }
168
- }
169
- ],
170
- defaultVariants: {
171
- color: 'blue',
172
- disabled: false
173
- }
174
- })
175
-
176
- export type CheckboxGroupProps = ComponentProps<typeof CheckboxGroupStyled> & {
177
- placeholder?: string
178
- children?: React.ReactNode
179
- color?: string
180
- disabled?: boolean
181
- }
182
-
183
- export type CheckboxItemProps = {
184
- children?: React.ReactNode
185
- value: string,
186
- style?: React.CSSProperties
187
- }
188
-
189
- export function CheckboxGroup({
190
- children,
191
-
192
- ...props
193
- }: CheckboxGroupProps) {
194
- return (
195
- <CheckboxGroupStyled {...props}>
196
- {children}
197
- </CheckboxGroupStyled>
198
- )
199
- }
200
-
201
-
202
- export function CheckboxItem({
203
- children,
204
-
205
- ...props
206
- }: CheckboxItemProps) {
207
- return (
208
- <CheckboxGroupRadix.Item {...props}>
209
- {children}
210
- </CheckboxGroupRadix.Item>
211
- )
212
- }
213
-
214
-
1
+ import { ComponentProps } from 'react'
2
+ import { styled } from '../styles'
3
+ import { CheckboxGroup as CheckboxGroupRadix } from "@radix-ui/themes";
4
+ import { typographyLabelValues } from "../types/typographyValues";
5
+
6
+ export const CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
7
+ fontFamily: '$default',
8
+ 'svg': {
9
+ display: 'none'
10
+ },
11
+ 'label': {
12
+ display: 'flex',
13
+ alignItems: 'center',
14
+ gap: '$8',
15
+ cursor: 'pointer',
16
+ '&:focus button, &:hover button': {
17
+ transition: 'all 300ms ease-out',
18
+ boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
19
+ }
20
+ },
21
+ 'label button': {
22
+ backgroundColor: '$white',
23
+ borderRadius: '2px',
24
+ height: '$16',
25
+ width: '$16',
26
+ position: 'relative',
27
+ border: '2px solid $dark300',
28
+ cursor: 'pointer',
29
+ },
30
+ 'label button[data-state=checked]:before': {
31
+ backgroundColor: '$dark50',
32
+ content: '',
33
+ width: '8px',
34
+ height: '8px',
35
+ position: 'absolute',
36
+ top: '2px',
37
+ right: '2px',
38
+ zIndex: 2,
39
+ },
40
+ 'label button[data-state=checked]:after': {
41
+ backgroundColor: '$brand500',
42
+ content: '',
43
+ height: '$16',
44
+ width: '$16',
45
+ position: 'absolute',
46
+ top: '-2px',
47
+ right: '-2px',
48
+ borderRadius: '2px',
49
+ zIndex: 1,
50
+ },
51
+
52
+ variants: {
53
+ color: {
54
+ success: {
55
+ 'label': {
56
+ '&:focus button, &:hover button': {
57
+ boxShadow: '0px 0px 0px 4px rgba(38, 167, 67, 0.50)',
58
+ }
59
+ },
60
+ 'label button': {
61
+ borderColor: '$green500',
62
+ backgroundColor: '$dark50',
63
+ },
64
+ 'label button[data-state=checked]:after': {
65
+ backgroundColor: '$green500',
66
+ },
67
+ },
68
+ blue: {},
69
+ error: {
70
+ 'label': {
71
+ '&:focus button, &:hover button': {
72
+ boxShadow: '0px 0px 0px 4px rgba(225, 86, 98, 0.50)'
73
+ }
74
+ },
75
+ 'label button': {
76
+ borderColor: '$error400',
77
+ backgroundColor: '$dark50',
78
+ },
79
+ 'label button[data-state=checked]:after': {
80
+ backgroundColor: '$error600',
81
+ },
82
+ }
83
+ },
84
+ disabled: {
85
+ true: {
86
+ 'label': {
87
+ cursor: 'not-allowed',
88
+ opacity: 0.5,
89
+ '&:focus button, &:hover button': {
90
+ boxShadow: 'none',
91
+ }
92
+ },
93
+ 'label button': {
94
+ cursor: 'not-allowed',
95
+ }
96
+ },
97
+ false: {}
98
+ },
99
+ typography: typographyLabelValues,
100
+ fontWeight: {
101
+ regular: { fontWeight: '$regular' },
102
+ medium: { fontWeight: '$medium' },
103
+ semibold: { fontWeight: '$semibold' },
104
+ bold: { fontWeight: '$bold' },
105
+ },
106
+ },
107
+
108
+ compoundVariants: [
109
+
110
+ {
111
+ color: 'blue',
112
+ disabled: false,
113
+ css: {
114
+ 'label': {
115
+ '&:focus button, &:hover button': {
116
+ boxShadow: '0px 0px 0px 4px rgba(56, 129, 255, 0.50)'
117
+ }
118
+ },
119
+ 'label button': {
120
+ borderColor: '$dark300',
121
+ },
122
+ 'label button[data-state=checked]:after': {
123
+ backgroundColor: '$brand500',
124
+ },
125
+ }
126
+ },
127
+
128
+ {
129
+ color: 'blue',
130
+ disabled: true,
131
+ css: {
132
+ 'label button': {
133
+ borderColor: '$brand100',
134
+ backgroundColor: '$dark50',
135
+ },
136
+ 'label button[data-state=checked]:after': {
137
+ backgroundColor: '$brand100',
138
+ },
139
+ }
140
+ },
141
+
142
+ {
143
+ color: 'success',
144
+ disabled: true,
145
+ css: {
146
+ 'label button': {
147
+ borderColor: '$success100',
148
+ backgroundColor: '$dark50',
149
+ },
150
+ 'label button[data-state=checked]:after': {
151
+ backgroundColor: '$success100',
152
+ }
153
+ }
154
+ },
155
+
156
+ {
157
+ color: 'error',
158
+ disabled: true,
159
+ css: {
160
+ 'label button': {
161
+ borderColor: '$error100',
162
+ backgroundColor: '$dark50',
163
+ },
164
+ 'label button[data-state=checked]:after': {
165
+ backgroundColor: '$error100',
166
+ }
167
+ }
168
+ }
169
+ ],
170
+ defaultVariants: {
171
+ color: 'blue',
172
+ disabled: false
173
+ }
174
+ })
175
+
176
+ export type CheckboxGroupProps = ComponentProps<typeof CheckboxGroupStyled> & {
177
+ placeholder?: string
178
+ children?: React.ReactNode
179
+ color?: string
180
+ disabled?: boolean
181
+ }
182
+
183
+ export type CheckboxItemProps = {
184
+ children?: React.ReactNode
185
+ value: string,
186
+ style?: React.CSSProperties
187
+ }
188
+
189
+ export function CheckboxGroup({
190
+ children,
191
+
192
+ ...props
193
+ }: CheckboxGroupProps) {
194
+ return (
195
+ <CheckboxGroupStyled {...props}>
196
+ {children}
197
+ </CheckboxGroupStyled>
198
+ )
199
+ }
200
+
201
+
202
+ export function CheckboxItem({
203
+ children,
204
+
205
+ ...props
206
+ }: CheckboxItemProps) {
207
+ return (
208
+ <CheckboxGroupRadix.Item {...props}>
209
+ {children}
210
+ </CheckboxGroupRadix.Item>
211
+ )
212
+ }
213
+
214
+
@@ -1,40 +1,40 @@
1
- import { ComponentProps, ElementType } from 'react';
2
- import { styled } from '../styles';
3
- import { Container as ContainerRadix } from '@radix-ui/themes';
4
-
5
- export const ContainerStyled = styled(ContainerRadix, {
6
- variants: {
7
- size: {
8
- xs: { maxWidth: '576px' },
9
- sm: { minWidth: '577px', maxWidth: '767px' },
10
- md: { mixWidth: '768px', maxWidth: '991px' },
11
- lg: { mixWidth: '992px', maxWidth: '1199px' },
12
- xl: { mixWidth: '1200px', maxWidth: '1399px' },
13
- xxl: { mixWidth: '1400px' },
14
- responsive: { width: '100%', maxWidth: '100%', minWidth: '100%' }
15
- },
16
- display: {
17
- none: { display: 'none' },
18
- initial: { display: 'initial' },
19
- },
20
- align: {
21
- left: { marginLeft: 0, marginRight: 'auto' },
22
- center: { marginLeft: 'auto', marginRight: 'auto' },
23
- right: { marginLeft: 'auto', marginRight: 0 },
24
- },
25
- },
26
- defaultVariants: {
27
- size: 'md',
28
- align: 'left',
29
- display: 'initial'
30
- },
31
- });
32
-
33
- export type ContainerProps = ComponentProps<typeof ContainerStyled> & {
34
- as?: ElementType;
35
- children: React.ReactNode;
36
- };
37
-
38
- export function Container({ children, ...props }: ContainerProps) {
39
- return <ContainerStyled {...props}>{children}</ContainerStyled>;
1
+ import { ComponentProps, ElementType } from 'react';
2
+ import { styled } from '../styles';
3
+ import { Container as ContainerRadix } from '@radix-ui/themes';
4
+
5
+ export const ContainerStyled = styled(ContainerRadix, {
6
+ variants: {
7
+ size: {
8
+ xs: { maxWidth: '576px' },
9
+ sm: { minWidth: '577px', maxWidth: '767px' },
10
+ md: { mixWidth: '768px', maxWidth: '991px' },
11
+ lg: { mixWidth: '992px', maxWidth: '1199px' },
12
+ xl: { mixWidth: '1200px', maxWidth: '1399px' },
13
+ xxl: { mixWidth: '1400px' },
14
+ responsive: { width: '100%', maxWidth: '100%', minWidth: '100%' }
15
+ },
16
+ display: {
17
+ none: { display: 'none' },
18
+ initial: { display: 'initial' },
19
+ },
20
+ align: {
21
+ left: { marginLeft: 0, marginRight: 'auto' },
22
+ center: { marginLeft: 'auto', marginRight: 'auto' },
23
+ right: { marginLeft: 'auto', marginRight: 0 },
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ size: 'md',
28
+ align: 'left',
29
+ display: 'initial'
30
+ },
31
+ });
32
+
33
+ export type ContainerProps = ComponentProps<typeof ContainerStyled> & {
34
+ as?: ElementType;
35
+ children: React.ReactNode;
36
+ };
37
+
38
+ export function Container({ children, ...props }: ContainerProps) {
39
+ return <ContainerStyled {...props}>{children}</ContainerStyled>;
40
40
  }