@lets-events/react 12.10.17 → 12.11.1

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 (98) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -19
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +19 -7
  5. package/dist/index.d.ts +19 -7
  6. package/dist/index.js +422 -264
  7. package/dist/index.mjs +432 -274
  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 +132 -132
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +85 -85
  14. package/src/components/Button/styledComponents.ts +361 -361
  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 +74 -74
  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 +204 -204
  23. package/src/components/Drawer/index.tsx +113 -113
  24. package/src/components/Drawer/styledComponents.ts +97 -97
  25. package/src/components/Dropdown.tsx +302 -302
  26. package/src/components/Filter.tsx +164 -164
  27. package/src/components/Flex.tsx +130 -130
  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 +88 -88
  46. package/src/components/FormFields/RichEditorFormField.tsx +128 -128
  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 +131 -114
  60. package/src/components/MultiSelect/index.tsx +417 -305
  61. package/src/components/MultiSelect/styledComponents.ts +176 -160
  62. package/src/components/RadioGroup.tsx +210 -210
  63. package/src/components/RichEditor/QuillComponent.tsx +419 -419
  64. package/src/components/RichEditor/RichEditor.tsx +53 -53
  65. package/src/components/RichEditor/RichTextPresenter.tsx +18 -18
  66. package/src/components/RichEditor/editorConfig.ts +149 -149
  67. package/src/components/RichEditor/index.ts +3 -3
  68. package/src/components/RichEditor/styledComponents.ts +1175 -1175
  69. package/src/components/RichEditor/types.ts +12 -12
  70. package/src/components/Section.tsx +33 -33
  71. package/src/components/Step.tsx +164 -164
  72. package/src/components/Switch.tsx +108 -108
  73. package/src/components/Text.tsx +54 -54
  74. package/src/components/TextField.tsx +423 -423
  75. package/src/components/TextareaField.tsx +116 -116
  76. package/src/components/TimePicker.tsx +357 -357
  77. package/src/components/Toast/components/ToastItem.tsx +41 -41
  78. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  79. package/src/components/Toast/hooks/useToast.ts +12 -12
  80. package/src/components/Toast/index.tsx +5 -5
  81. package/src/components/Toast/styles/index.ts +135 -135
  82. package/src/components/Toast/types/index.ts +46 -46
  83. package/src/components/ToggleElement/index.tsx +58 -58
  84. package/src/components/Tooltip/index.tsx +126 -73
  85. package/src/components/Tooltip/styles.ts +77 -77
  86. package/src/hooks/useCountries.ts +41 -41
  87. package/src/hooks/useHasHover.ts +21 -0
  88. package/src/hooks/useImageUpload.ts +139 -139
  89. package/src/hooks/useMediaQuery.ts +19 -0
  90. package/src/hooks/useOnClickOutside.tsx +42 -42
  91. package/src/index.tsx +72 -72
  92. package/src/styles/index.ts +41 -41
  93. package/src/types/typographyValues.ts +178 -178
  94. package/src/utils/getNestedValue.ts +3 -3
  95. package/src/utils/states.ts +29 -29
  96. package/src/utils/uploadService.ts +180 -180
  97. package/tsconfig.json +3 -3
  98. package/tsup.config.ts +38 -38
@@ -1,165 +1,165 @@
1
- import { styled } from '../styles'
2
- import { ComponentProps, ElementType } from 'react'
3
- import { Theme, DropdownMenu } from '@radix-ui/themes'
4
- import { CheckboxGroup, CheckboxItem } from './CheckboxGroup'
5
- import { Icon } from './Icon'
6
- import { typographyLabelValues } from '../types/typographyValues'
7
-
8
- const FilterContentStyled = styled(DropdownMenu.Content, {
9
- background: 'white',
10
- padding: '$8 $12',
11
- border: '1px solid $dark300',
12
- borderRadius: '$xs',
13
- boxShadow: '0px 4px 4px 0px rgba(35, 53, 67, 0.08)',
14
- width: 'calc(var(--radix-popper-anchor-width) - 24px);',
15
- minWidth: '100%',
16
- marginTop: '3px',
17
- fontFamily: '$default',
18
- variants: {
19
- typography: typographyLabelValues,
20
- fontWeight: {
21
- regular: {
22
- fontWeight: '$regular'
23
- },
24
- medium: {
25
- fontWeight: '$medium'
26
- },
27
- semibold: {
28
- fontWeight: '$semibold'
29
- },
30
- bold: {
31
- fontWeight: '$bold'
32
- },
33
- },
34
- },
35
- })
36
- const FilterStyled = styled('div', {
37
- fontFamily: '$default',
38
- color: '$dark600',
39
- letterSpacing: '0px',
40
- cursor: 'pointer',
41
- border: '1px solid $dark300',
42
- borderRadius: '$xs',
43
- padding: '$8 $12',
44
- width: 'calc(100% - 24px)',
45
- display: 'flex',
46
- 'button': {
47
- fontFamily: '$default',
48
- color: '$dark600',
49
- letterSpacing: '0px',
50
- backgroundColor: 'transparent',
51
- border: 'none',
52
- width: '100%',
53
- outline: 'none',
54
- display: 'flex',
55
- alignItems: 'center',
56
- gap: '$8',
57
- cursor: 'pointer',
58
- 'svg:last-child': {
59
- marginLeft: 'auto',
60
- }
61
- },
62
- variants: {
63
- typography: {
64
- labelLarge: {
65
- 'span': {
66
- fontSize: '$labelLarge',
67
- lineHeight: '$labelLarge',
68
- }
69
- },
70
- labelMedium: {
71
- 'span': {
72
- fontSize: '$labelMedium',
73
- lineHeight: '$labelMedium',
74
- }
75
- },
76
- labelSmall: {
77
- 'span': {
78
- fontSize: '$labelSmall',
79
- lineHeight: '$labelSmall',
80
- }
81
- },
82
- labelExtraSmall: {
83
- 'span': {
84
- fontSize: '$labelExtraSmall',
85
- lineHeight: '$labelExtraSmall',
86
- }
87
- },
88
- },
89
- fontWeight: {
90
- regular: {
91
- 'span': { fontWeight: '$regular' }
92
- },
93
- medium: {
94
- 'span': { fontWeight: '$medium' }
95
- },
96
- semibold: {
97
- 'span': { fontWeight: '$semibold' }
98
- },
99
- bold: {
100
- 'span': { fontWeight: '$bold' }
101
- },
102
- },
103
- }
104
- })
105
-
106
-
107
- export type FilterProps = ComponentProps<typeof DropdownMenu.Root> & {
108
- as?: ElementType,
109
- placeholder?: string,
110
- fontWeight: 'regular' | 'medium' | 'semibold' | 'bold',
111
- typography: 'labelExtraSmall' | 'labelSmall' | 'labelMedium' | 'labelLarge',
112
- }
113
- export type FilterItemProps = ComponentProps<typeof CheckboxItem> & {
114
- as?: ElementType,
115
- value: string,
116
- typography: FilterProps['typography'],
117
- fontWeight: FilterProps['fontWeight'],
118
- }
119
-
120
-
121
- export function Filter({
122
- children,
123
- placeholder,
124
- typography,
125
- fontWeight,
126
- ...props
127
- }: FilterProps) {
128
- return (
129
- <Theme>
130
- <DropdownMenu.Root {...props}>
131
- <FilterStyled typography={typography} fontWeight={fontWeight}>
132
- <DropdownMenu.Trigger>
133
- <button aria-label={placeholder || 'Fitrar'}>
134
- <Icon name='filter' />
135
- <span>{placeholder || 'Fitrar'}</span>
136
- <DropdownMenu.TriggerIcon />
137
- </button>
138
- </DropdownMenu.Trigger>
139
- <FilterContentStyled avoidCollisions={false}
140
- align="start"
141
- alignOffset={-14}
142
- typography={typography}
143
- fontWeight={fontWeight}
144
- >
145
- <CheckboxGroup>
146
- {children}
147
- </CheckboxGroup>
148
- </FilterContentStyled>
149
- </FilterStyled>
150
- </DropdownMenu.Root>
151
- </Theme>
152
- )
153
- }
154
-
155
-
156
- export function FilterItem({
157
- children,
158
- ...props
159
- }: FilterItemProps) {
160
- return (
161
- <CheckboxItem {...props} style={{ padding: '8px 12px' }}>
162
- {children}
163
- </CheckboxItem>
164
- )
1
+ import { styled } from '../styles'
2
+ import { ComponentProps, ElementType } from 'react'
3
+ import { Theme, DropdownMenu } from '@radix-ui/themes'
4
+ import { CheckboxGroup, CheckboxItem } from './CheckboxGroup'
5
+ import { Icon } from './Icon'
6
+ import { typographyLabelValues } from '../types/typographyValues'
7
+
8
+ const FilterContentStyled = styled(DropdownMenu.Content, {
9
+ background: 'white',
10
+ padding: '$8 $12',
11
+ border: '1px solid $dark300',
12
+ borderRadius: '$xs',
13
+ boxShadow: '0px 4px 4px 0px rgba(35, 53, 67, 0.08)',
14
+ width: 'calc(var(--radix-popper-anchor-width) - 24px);',
15
+ minWidth: '100%',
16
+ marginTop: '3px',
17
+ fontFamily: '$default',
18
+ variants: {
19
+ typography: typographyLabelValues,
20
+ fontWeight: {
21
+ regular: {
22
+ fontWeight: '$regular'
23
+ },
24
+ medium: {
25
+ fontWeight: '$medium'
26
+ },
27
+ semibold: {
28
+ fontWeight: '$semibold'
29
+ },
30
+ bold: {
31
+ fontWeight: '$bold'
32
+ },
33
+ },
34
+ },
35
+ })
36
+ const FilterStyled = styled('div', {
37
+ fontFamily: '$default',
38
+ color: '$dark600',
39
+ letterSpacing: '0px',
40
+ cursor: 'pointer',
41
+ border: '1px solid $dark300',
42
+ borderRadius: '$xs',
43
+ padding: '$8 $12',
44
+ width: 'calc(100% - 24px)',
45
+ display: 'flex',
46
+ 'button': {
47
+ fontFamily: '$default',
48
+ color: '$dark600',
49
+ letterSpacing: '0px',
50
+ backgroundColor: 'transparent',
51
+ border: 'none',
52
+ width: '100%',
53
+ outline: 'none',
54
+ display: 'flex',
55
+ alignItems: 'center',
56
+ gap: '$8',
57
+ cursor: 'pointer',
58
+ 'svg:last-child': {
59
+ marginLeft: 'auto',
60
+ }
61
+ },
62
+ variants: {
63
+ typography: {
64
+ labelLarge: {
65
+ 'span': {
66
+ fontSize: '$labelLarge',
67
+ lineHeight: '$labelLarge',
68
+ }
69
+ },
70
+ labelMedium: {
71
+ 'span': {
72
+ fontSize: '$labelMedium',
73
+ lineHeight: '$labelMedium',
74
+ }
75
+ },
76
+ labelSmall: {
77
+ 'span': {
78
+ fontSize: '$labelSmall',
79
+ lineHeight: '$labelSmall',
80
+ }
81
+ },
82
+ labelExtraSmall: {
83
+ 'span': {
84
+ fontSize: '$labelExtraSmall',
85
+ lineHeight: '$labelExtraSmall',
86
+ }
87
+ },
88
+ },
89
+ fontWeight: {
90
+ regular: {
91
+ 'span': { fontWeight: '$regular' }
92
+ },
93
+ medium: {
94
+ 'span': { fontWeight: '$medium' }
95
+ },
96
+ semibold: {
97
+ 'span': { fontWeight: '$semibold' }
98
+ },
99
+ bold: {
100
+ 'span': { fontWeight: '$bold' }
101
+ },
102
+ },
103
+ }
104
+ })
105
+
106
+
107
+ export type FilterProps = ComponentProps<typeof DropdownMenu.Root> & {
108
+ as?: ElementType,
109
+ placeholder?: string,
110
+ fontWeight: 'regular' | 'medium' | 'semibold' | 'bold',
111
+ typography: 'labelExtraSmall' | 'labelSmall' | 'labelMedium' | 'labelLarge',
112
+ }
113
+ export type FilterItemProps = ComponentProps<typeof CheckboxItem> & {
114
+ as?: ElementType,
115
+ value: string,
116
+ typography: FilterProps['typography'],
117
+ fontWeight: FilterProps['fontWeight'],
118
+ }
119
+
120
+
121
+ export function Filter({
122
+ children,
123
+ placeholder,
124
+ typography,
125
+ fontWeight,
126
+ ...props
127
+ }: FilterProps) {
128
+ return (
129
+ <Theme>
130
+ <DropdownMenu.Root {...props}>
131
+ <FilterStyled typography={typography} fontWeight={fontWeight}>
132
+ <DropdownMenu.Trigger>
133
+ <button aria-label={placeholder || 'Fitrar'}>
134
+ <Icon name='filter' />
135
+ <span>{placeholder || 'Fitrar'}</span>
136
+ <DropdownMenu.TriggerIcon />
137
+ </button>
138
+ </DropdownMenu.Trigger>
139
+ <FilterContentStyled avoidCollisions={false}
140
+ align="start"
141
+ alignOffset={-14}
142
+ typography={typography}
143
+ fontWeight={fontWeight}
144
+ >
145
+ <CheckboxGroup>
146
+ {children}
147
+ </CheckboxGroup>
148
+ </FilterContentStyled>
149
+ </FilterStyled>
150
+ </DropdownMenu.Root>
151
+ </Theme>
152
+ )
153
+ }
154
+
155
+
156
+ export function FilterItem({
157
+ children,
158
+ ...props
159
+ }: FilterItemProps) {
160
+ return (
161
+ <CheckboxItem {...props} style={{ padding: '8px 12px' }}>
162
+ {children}
163
+ </CheckboxItem>
164
+ )
165
165
  }
@@ -1,131 +1,131 @@
1
- import { ComponentProps, CSSProperties, ElementType, ReactNode } from 'react';
2
- import type { CSS } from '@stitches/react';
3
- import { styled, config } from '../styles'
4
- import { Flex as FlexRadix } from "@radix-ui/themes";
5
- export const FlexStyled = styled(FlexRadix, {
6
- variants: {
7
- display: {
8
- 'flex': { display: 'flex' },
9
- 'inline-flex': { display: 'inline-flex' }
10
- },
11
- align: {
12
- start: { alignItems: 'flex-start' },
13
- center: { alignItems: 'center' },
14
- end: { alignItems: 'flex-end' },
15
- stretch: { alignItems: 'stretch' },
16
- baseline: { alignItems: 'baseline' },
17
- },
18
- justify: {
19
- start: { justifyContent: 'flex-start' },
20
- center: { justifyContent: 'center' },
21
- end: { justifyContent: 'flex-end' },
22
- between: { justifyContent: 'space-between' },
23
- around: { justifyContent: 'space-around' },
24
- evenly: { justifyContent: 'space-evenly' },
25
- },
26
- direction: {
27
- row: { flexDirection: 'row' },
28
- column: { flexDirection: 'column' },
29
- 'row-reverse': { flexDirection: 'row-reverse' },
30
- 'column-reverse': { flexDirection: 'column-reverse' },
31
- },
32
- gap: {
33
- 0: { gap: '0px' },
34
- 2: { gap: '$2' },
35
- 4: { gap: '$4' },
36
- 6: { gap: '$6' },
37
- 8: { gap: '$8' },
38
- 10: { gap: '$10' },
39
- 12: { gap: '$12' },
40
- 14: { gap: '$14' },
41
- 16: { gap: '$16' },
42
- 20: { gap: '$20' },
43
- 22: { gap: '$22' },
44
- 24: { gap: '$24' },
45
- 32: { gap: '$32' },
46
- 36: { gap: '$36' },
47
- 40: { gap: '$40' },
48
- 48: { gap: '$48' },
49
- 56: { gap: '$56' },
50
- 64: { gap: '$64' },
51
- 72: { gap: '$72' },
52
- 80: { gap: '$80' },
53
- full: { gap: '$full' },
54
- },
55
- gapY: {
56
- 2: { gap: '$2' },
57
- 4: { gap: '$4' },
58
- 6: { gap: '$6' },
59
- 8: { gap: '$8' },
60
- 10: { gap: '$10' },
61
- 12: { gap: '$12' },
62
- 14: { gap: '$14' },
63
- 16: { gap: '$16' },
64
- 20: { gap: '$20' },
65
- 22: { gap: '$22' },
66
- 24: { gap: '$24' },
67
- 32: { gap: '$32' },
68
- 36: { gap: '$36' },
69
- 40: { gap: '$40' },
70
- 48: { gap: '$48' },
71
- 56: { gap: '$56' },
72
- 64: { gap: '$64' },
73
- 72: { gap: '$72' },
74
- 80: { gap: '$80' },
75
- full: { gap: '$full' },
76
- },
77
- gapX: {
78
- 2: { gap: '$2' },
79
- 4: { gap: '$4' },
80
- 6: { gap: '$6' },
81
- 8: { gap: '$8' },
82
- 10: { gap: '$10' },
83
- 12: { gap: '$12' },
84
- 14: { gap: '$14' },
85
- 16: { gap: '$16' },
86
- 20: { gap: '$20' },
87
- 22: { gap: '$22' },
88
- 24: { gap: '$24' },
89
- 32: { gap: '$32' },
90
- 36: { gap: '$36' },
91
- 40: { gap: '$40' },
92
- 48: { gap: '$48' },
93
- 56: { gap: '$56' },
94
- 64: { gap: '$64' },
95
- 72: { gap: '$72' },
96
- 80: { gap: '$80' },
97
- full: { gap: '$full' },
98
- }
99
- },
100
- defaultVariants: {
101
- display: 'flex',
102
- direction: 'row',
103
- gap: 10,
104
- }
105
-
106
- })
107
-
108
- type GapValue = NonNullable<ComponentProps<typeof FlexStyled>['gap']>;
109
-
110
- export type FlexProps = {
111
- as?: ElementType;
112
- children: ReactNode;
113
- display?: 'flex' | 'inline-flex';
114
- align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
115
- justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
116
- direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
117
- gap?: GapValue;
118
- gapX?: Exclude<GapValue, 0 | '0'>;
119
- gapY?: Exclude<GapValue, 0 | '0'>;
120
- className?: string;
121
- style?: CSSProperties;
122
- css?: CSS<typeof config>;
123
- };
124
-
125
- export function Flex({ children, ...props }: FlexProps) {
126
- return (
127
- <FlexStyled {...(props as ComponentProps<typeof FlexStyled>)}>
128
- {children}
129
- </FlexStyled>
130
- )
1
+ import { ComponentProps, CSSProperties, ElementType, ReactNode } from 'react';
2
+ import type { CSS } from '@stitches/react';
3
+ import { styled, config } from '../styles'
4
+ import { Flex as FlexRadix } from "@radix-ui/themes";
5
+ export const FlexStyled = styled(FlexRadix, {
6
+ variants: {
7
+ display: {
8
+ 'flex': { display: 'flex' },
9
+ 'inline-flex': { display: 'inline-flex' }
10
+ },
11
+ align: {
12
+ start: { alignItems: 'flex-start' },
13
+ center: { alignItems: 'center' },
14
+ end: { alignItems: 'flex-end' },
15
+ stretch: { alignItems: 'stretch' },
16
+ baseline: { alignItems: 'baseline' },
17
+ },
18
+ justify: {
19
+ start: { justifyContent: 'flex-start' },
20
+ center: { justifyContent: 'center' },
21
+ end: { justifyContent: 'flex-end' },
22
+ between: { justifyContent: 'space-between' },
23
+ around: { justifyContent: 'space-around' },
24
+ evenly: { justifyContent: 'space-evenly' },
25
+ },
26
+ direction: {
27
+ row: { flexDirection: 'row' },
28
+ column: { flexDirection: 'column' },
29
+ 'row-reverse': { flexDirection: 'row-reverse' },
30
+ 'column-reverse': { flexDirection: 'column-reverse' },
31
+ },
32
+ gap: {
33
+ 0: { gap: '0px' },
34
+ 2: { gap: '$2' },
35
+ 4: { gap: '$4' },
36
+ 6: { gap: '$6' },
37
+ 8: { gap: '$8' },
38
+ 10: { gap: '$10' },
39
+ 12: { gap: '$12' },
40
+ 14: { gap: '$14' },
41
+ 16: { gap: '$16' },
42
+ 20: { gap: '$20' },
43
+ 22: { gap: '$22' },
44
+ 24: { gap: '$24' },
45
+ 32: { gap: '$32' },
46
+ 36: { gap: '$36' },
47
+ 40: { gap: '$40' },
48
+ 48: { gap: '$48' },
49
+ 56: { gap: '$56' },
50
+ 64: { gap: '$64' },
51
+ 72: { gap: '$72' },
52
+ 80: { gap: '$80' },
53
+ full: { gap: '$full' },
54
+ },
55
+ gapY: {
56
+ 2: { gap: '$2' },
57
+ 4: { gap: '$4' },
58
+ 6: { gap: '$6' },
59
+ 8: { gap: '$8' },
60
+ 10: { gap: '$10' },
61
+ 12: { gap: '$12' },
62
+ 14: { gap: '$14' },
63
+ 16: { gap: '$16' },
64
+ 20: { gap: '$20' },
65
+ 22: { gap: '$22' },
66
+ 24: { gap: '$24' },
67
+ 32: { gap: '$32' },
68
+ 36: { gap: '$36' },
69
+ 40: { gap: '$40' },
70
+ 48: { gap: '$48' },
71
+ 56: { gap: '$56' },
72
+ 64: { gap: '$64' },
73
+ 72: { gap: '$72' },
74
+ 80: { gap: '$80' },
75
+ full: { gap: '$full' },
76
+ },
77
+ gapX: {
78
+ 2: { gap: '$2' },
79
+ 4: { gap: '$4' },
80
+ 6: { gap: '$6' },
81
+ 8: { gap: '$8' },
82
+ 10: { gap: '$10' },
83
+ 12: { gap: '$12' },
84
+ 14: { gap: '$14' },
85
+ 16: { gap: '$16' },
86
+ 20: { gap: '$20' },
87
+ 22: { gap: '$22' },
88
+ 24: { gap: '$24' },
89
+ 32: { gap: '$32' },
90
+ 36: { gap: '$36' },
91
+ 40: { gap: '$40' },
92
+ 48: { gap: '$48' },
93
+ 56: { gap: '$56' },
94
+ 64: { gap: '$64' },
95
+ 72: { gap: '$72' },
96
+ 80: { gap: '$80' },
97
+ full: { gap: '$full' },
98
+ }
99
+ },
100
+ defaultVariants: {
101
+ display: 'flex',
102
+ direction: 'row',
103
+ gap: 10,
104
+ }
105
+
106
+ })
107
+
108
+ type GapValue = NonNullable<ComponentProps<typeof FlexStyled>['gap']>;
109
+
110
+ export type FlexProps = {
111
+ as?: ElementType;
112
+ children: ReactNode;
113
+ display?: 'flex' | 'inline-flex';
114
+ align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
115
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
116
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
117
+ gap?: GapValue;
118
+ gapX?: Exclude<GapValue, 0 | '0'>;
119
+ gapY?: Exclude<GapValue, 0 | '0'>;
120
+ className?: string;
121
+ style?: CSSProperties;
122
+ css?: CSS<typeof config>;
123
+ };
124
+
125
+ export function Flex({ children, ...props }: FlexProps) {
126
+ return (
127
+ <FlexStyled {...(props as ComponentProps<typeof FlexStyled>)}>
128
+ {children}
129
+ </FlexStyled>
130
+ )
131
131
  }