@lets-events/react 4.0.0 → 6.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 (40) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +20 -18
  3. package/CHANGELOG.md +13 -0
  4. package/dist/index.d.mts +2855 -164
  5. package/dist/index.d.ts +2855 -164
  6. package/dist/index.js +1428 -403
  7. package/dist/index.mjs +1374 -369
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +256 -0
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +129 -121
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button.tsx +328 -348
  14. package/src/components/ButtonGroup.tsx +484 -477
  15. package/src/components/CheckboxGroup.tsx +214 -208
  16. package/src/components/Container.tsx +40 -0
  17. package/src/components/Dropdown.tsx +167 -109
  18. package/src/components/Filter.tsx +164 -95
  19. package/src/components/Flex.tsx +118 -47
  20. package/src/components/Grid.tsx +138 -0
  21. package/src/components/Icon.tsx +47 -47
  22. package/src/components/Modal.tsx +109 -0
  23. package/src/components/RadioGroup.tsx +210 -203
  24. package/src/components/Section.tsx +34 -0
  25. package/src/components/Step.tsx +148 -0
  26. package/src/components/Switch.tsx +109 -0
  27. package/src/components/Text.tsx +32 -26
  28. package/src/components/TextField.tsx +241 -193
  29. package/src/index.tsx +27 -23
  30. package/src/styles/index.ts +38 -38
  31. package/src/types/typographyValues.ts +179 -0
  32. package/tsconfig.json +3 -3
  33. package/src/components/BadgeText.tsx +0 -29
  34. package/src/components/BodyText.tsx +0 -24
  35. package/src/components/CaptionText.tsx +0 -16
  36. package/src/components/DisplayText.tsx +0 -26
  37. package/src/components/Headline.tsx +0 -29
  38. package/src/components/Label.tsx +0 -28
  39. package/src/components/Subtitle.tsx +0 -26
  40. package/src/components/TooltipText.tsx +0 -15
@@ -1,38 +1,38 @@
1
- import {
2
- colors,
3
- fontSizes,
4
- fontWeights,
5
- fonts,
6
- lineHeights,
7
- radii,
8
- space,
9
- } from '@lets-events/tokens'
10
-
11
- import { createStitches, defaultThemeMap } from '@stitches/react'
12
-
13
- export const {
14
- styled,
15
- css,
16
- globalCss,
17
- keyframes,
18
- getCssText,
19
- theme,
20
- createTheme,
21
- config,
22
- } = createStitches({
23
- themeMap: {
24
- ...defaultThemeMap,
25
- height: 'space',
26
- width: 'space',
27
- gap: 'space'
28
- },
29
- theme: {
30
- colors,
31
- fontSizes,
32
- fonts,
33
- fontWeights,
34
- lineHeights,
35
- radii,
36
- space,
37
- },
38
- })
1
+ import {
2
+ colors,
3
+ fontSizes,
4
+ fontWeights,
5
+ fonts,
6
+ lineHeights,
7
+ radii,
8
+ space,
9
+ } from '@lets-events/tokens'
10
+
11
+ import { createStitches, defaultThemeMap } from '@stitches/react'
12
+
13
+ export const {
14
+ styled,
15
+ css,
16
+ globalCss,
17
+ keyframes,
18
+ getCssText,
19
+ theme,
20
+ createTheme,
21
+ config,
22
+ } = createStitches({
23
+ themeMap: {
24
+ ...defaultThemeMap,
25
+ height: 'space',
26
+ width: 'space',
27
+ gap: 'space'
28
+ },
29
+ theme: {
30
+ colors,
31
+ fontSizes,
32
+ fonts,
33
+ fontWeights,
34
+ lineHeights,
35
+ radii,
36
+ space,
37
+ },
38
+ })
@@ -0,0 +1,179 @@
1
+ export const typographyValues = {
2
+ displayLarge: {
3
+ fontSize: '$displayLarge',
4
+ lineHeight: '$displayLarge',
5
+ letterSpacing: '$displayLarge',
6
+
7
+ },
8
+ displayMedium: {
9
+ fontSize: '$displayMedium',
10
+ lineHeight: '$displayMedium',
11
+ letterSpacing: '$displayMedium',
12
+ },
13
+ displaySmall: {
14
+ fontSize: '$displaySmall',
15
+ lineHeight: '$displaySmall',
16
+ letterSpacing: '$displaySmall',
17
+ },
18
+ headline1: {
19
+ fontSize: '$headline1',
20
+ lineHeight: '$headline1',
21
+ },
22
+ headline2: {
23
+ fontSize: '$headline2',
24
+ lineHeight: '$headline2',
25
+ },
26
+ headline3: {
27
+ fontSize: '$headline3',
28
+ lineHeight: '$headline3',
29
+ },
30
+ headline4: {
31
+ fontSize: '$headline4',
32
+ lineHeight: '$headline4',
33
+ },
34
+ headline5: {
35
+ fontSize: '$headline5',
36
+ lineHeight: '$headline5',
37
+ },
38
+ headline6: {
39
+ fontSize: '$headline6',
40
+ lineHeight: '$headline6',
41
+ },
42
+ headline7: {
43
+ fontSize: '$headline7',
44
+ lineHeight: '$headline7',
45
+ },
46
+ headline8: {
47
+ fontSize: '$headline8',
48
+ lineHeight: '$headline8',
49
+ },
50
+ bodyXL: {
51
+ fontSize: '$bodyXL',
52
+ lineHeight: '$bodyXL',
53
+ },
54
+ bodyL: {
55
+ fontSize: '$bodyL',
56
+ lineHeight: '$bodyL',
57
+ },
58
+ bodyM: {
59
+ fontSize: '$bodyM',
60
+ lineHeight: '$bodyM',
61
+ },
62
+ bodyS: {
63
+ fontSize: '$bodyS',
64
+ lineHeight: '$bodyS',
65
+ },
66
+ bodyXS: {
67
+ fontSize: '$bodyXS',
68
+ lineHeight: '$bodyXS',
69
+ },
70
+ bodyXXS: {
71
+ fontSize: '$bodyXXS',
72
+ lineHeight: '$bodyXXS',
73
+ },
74
+ badgeLarge: {
75
+ fontSize: '$badgeLarge',
76
+ lineHeight: '$badgeLarge',
77
+ },
78
+ badgeMedium: {
79
+ fontSize: '$badgeMedium',
80
+ lineHeight: '$badgeMedium',
81
+ },
82
+ badgeSmall: {
83
+ fontSize: '$badgeSmall',
84
+ lineHeight: '$badgeSmall',
85
+ },
86
+ badgeExtraSmall: {
87
+ fontSize: '$badgeExtraSmall',
88
+ lineHeight: '$badgeExtraSmall',
89
+ },
90
+ tooltip: {
91
+ fontSize: '$tooltip',
92
+ lineHeight: '$tooltip',
93
+ },
94
+ popoversRegular: {
95
+ fontSize: '$popoversRegular',
96
+ lineHeight: '$popoversRegular',
97
+ },
98
+ captionLarge: {
99
+ fontSize: '$captionLarge',
100
+ lineHeight: '$captionLarge',
101
+ },
102
+ captionMedium: {
103
+ fontSize: '$captionMedium',
104
+ lineHeight: '$captionMedium',
105
+ },
106
+ captionSmall: {
107
+ fontSize: '$captionSmall',
108
+ lineHeight: '$captionSmall',
109
+ },
110
+ buttonLarge: {
111
+ fontSize: '$buttonLarge',
112
+ lineHeight: '$buttonLarge',
113
+ },
114
+ buttonMedium: {
115
+ fontSize: '$buttonMedium',
116
+ lineHeight: '$buttonMedium',
117
+ },
118
+ buttonSmall: {
119
+ fontSize: '$buttonSmall',
120
+ lineHeight: '$buttonSmall',
121
+ },
122
+ buttonExtraSmall: {
123
+ fontSize: '$buttonExtraSmall',
124
+ lineHeight: '$buttonExtraSmall',
125
+ },
126
+ labelLarge: {
127
+ fontSize: '$labelLarge',
128
+ lineHeight: '$labelLarge',
129
+ },
130
+ labelMedium: {
131
+ fontSize: '$labelMedium',
132
+ lineHeight: '$labelMedium',
133
+ },
134
+ labelSmall: {
135
+ fontSize: '$labelSmall',
136
+ lineHeight: '$labelSmall',
137
+ },
138
+ labelExtraSmall: {
139
+ fontSize: '$labelExtraSmall',
140
+ lineHeight: '$labelExtraSmall',
141
+ },
142
+
143
+ }
144
+ export const typographyButtonValues = {
145
+ buttonLarge: {
146
+ fontSize: '$buttonLarge',
147
+ lineHeight: '$buttonLarge',
148
+ },
149
+ buttonMedium: {
150
+ fontSize: '$buttonMedium',
151
+ lineHeight: '$buttonMedium',
152
+ },
153
+ buttonSmall: {
154
+ fontSize: '$buttonSmall',
155
+ lineHeight: '$buttonSmall',
156
+ },
157
+ buttonExtraSmall: {
158
+ fontSize: '$buttonExtraSmall',
159
+ lineHeight: '$buttonExtraSmall',
160
+ },
161
+ }
162
+ export const typographyLabelValues = {
163
+ labelLarge: {
164
+ fontSize: '$labelLarge',
165
+ lineHeight: '$labelLarge',
166
+ },
167
+ labelMedium: {
168
+ fontSize: '$labelMedium',
169
+ lineHeight: '$labelMedium',
170
+ },
171
+ labelSmall: {
172
+ fontSize: '$labelSmall',
173
+ lineHeight: '$labelSmall',
174
+ },
175
+ labelExtraSmall: {
176
+ fontSize: '$labelExtraSmall',
177
+ lineHeight: '$labelExtraSmall',
178
+ },
179
+ }
package/tsconfig.json CHANGED
@@ -1,4 +1,4 @@
1
- {
2
- "extends": "@lets-events/ts-config/react.json",
3
- "include": ["src"]
1
+ {
2
+ "extends": "@lets-events/ts-config/react.json",
3
+ "include": ["src"]
4
4
  }
@@ -1,29 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from "@radix-ui/themes";
4
- export const BadgeText = styled(Text, {
5
- fontFamily: '$default',
6
- color: '$gray100',
7
- letterSpacing: '0px',
8
- variants: {
9
- size: {
10
- 1: { fontSize: '$16', lineHeight: '$16', fontWeight: '$regular' },
11
- 2: { fontSize: '$14', lineHeight: '$14', fontWeight: '$regular' },
12
- 3: { fontSize: '$12', lineHeight: '$12', fontWeight: '$regular' },
13
- 4: { fontSize: '$10', lineHeight: '$10', fontWeight: '$regular' },
14
- 'xs': { fontSize: '$10', lineHeight: '$10', fontWeight: '$regular' },
15
- 'sm': { fontSize: '$12', lineHeight: '$12', fontWeight: '$regular' },
16
- 'md': { fontSize: '$14', lineHeight: '$14', fontWeight: '$regular' },
17
- 'xl': { fontSize: '$16', lineHeight: '$16', fontWeight: '$regular' },
18
- },
19
-
20
- },
21
-
22
- defaultVariants: {
23
- size: '1',
24
- },
25
- })
26
-
27
- export type BadgeTextProps = ComponentProps<typeof BadgeText> & {
28
- as?: ElementType
29
- }
@@ -1,24 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from "@radix-ui/themes";
4
- export const BodyText = styled(Text, {
5
- fontFamily: '$default',
6
- color: '$gray100',
7
- fontWeight: '$regular',
8
- variants: {
9
- size: {
10
- 1: { fontSize: '$16', lineHeight: '$24' },
11
- 2: { fontSize: '$14', lineHeight: '$24' },
12
- 3: { fontSize: '$13', lineHeight: '$24' },
13
- 4: { fontSize: '$12', lineHeight: '$16' },
14
- },
15
- },
16
-
17
- defaultVariants: {
18
- size: '1',
19
- },
20
- })
21
-
22
- export type BodyTextProps = ComponentProps<typeof BodyText> & {
23
- as?: ElementType
24
- }
@@ -1,16 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from '@radix-ui/themes'
4
-
5
- export const CaptionText = styled(Text, {
6
- fontFamily: '$default',
7
- color: '$gray100',
8
- letterSpacing: '0px',
9
- fontSize: '$14',
10
- lineHeight: '$16',
11
- fontWeight: '$regular',
12
- })
13
-
14
- export type CaptionTextProps = ComponentProps<typeof CaptionText> & {
15
- as?: ElementType
16
- }
@@ -1,26 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from '@radix-ui/themes'
4
-
5
- export const DisplayText = styled('p', {
6
- fontFamily: '$default',
7
- lineHeight: '$base',
8
- color: '$gray100',
9
- letterSpacing: '$2',
10
- fontWeight: '$semibold',
11
- variants: {
12
- size: {
13
- lg: { fontSize: '$56' },
14
- md: { fontSize: '$48' },
15
- sm: { fontSize: '$36' },
16
- },
17
- },
18
-
19
- defaultVariants: {
20
- size: 'md',
21
- },
22
- })
23
-
24
- export type DisplayTextProps = ComponentProps<typeof DisplayText> & {
25
- as?: ElementType
26
- }
@@ -1,29 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Heading } from '@radix-ui/themes'
4
-
5
- export const Headline = styled(Heading, {
6
- fontFamily: '$default',
7
- color: '$gray100',
8
- letterSpacing: '0px',
9
- variants: {
10
- size: {
11
- 1: { fontSize: '$48', lineHeight: '$64', fontWeight: '$semibold' },
12
- 2: { fontSize: '$32', lineHeight: '$48', fontWeight: '$semibold' },
13
- 3: { fontSize: '$24', lineHeight: '$40', fontWeight: '$semibold' },
14
- 4: { fontSize: '$20', lineHeight: '$36', fontWeight: '$semibold' },
15
- 5: { fontSize: '$18', lineHeight: '$24', fontWeight: '$semibold' },
16
- 6: { fontSize: '$18', lineHeight: '$34', fontWeight: '$medium' },
17
- 7: { fontSize: '$16', lineHeight: '$32', fontWeight: '$semibold' },
18
- 8: { fontSize: '$16', lineHeight: '$32', fontWeight: '$medium' },
19
- },
20
- },
21
-
22
- defaultVariants: {
23
- size: 1,
24
- },
25
- })
26
-
27
- export type HeadlineProps = ComponentProps<typeof Headline> & {
28
- as?: ElementType
29
- }
@@ -1,28 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from '@radix-ui/themes'
4
-
5
- export const Label = styled(Text, {
6
- fontFamily: '$default',
7
- color: '$gray100',
8
- letterSpacing: '0px',
9
- variants: {
10
- size: {
11
- 1: { fontSize: '$18', lineHeight: '$22', fontWeight: '$semibold' },
12
- 2: { fontSize: '$14', lineHeight: '$16', fontWeight: '$medium' },
13
- 3: { fontSize: '$14', lineHeight: '$16', fontWeight: '$regular' },
14
- 4: { fontSize: '$13', lineHeight: '$16', fontWeight: '$semibold', letterSpacing: '2px' },
15
- 5: { fontSize: '$13', lineHeight: '$16', fontWeight: '$medium' },
16
- 6: { fontSize: '$13', lineHeight: '$16', fontWeight: '$regular' },
17
- 7: { fontSize: '$12', lineHeight: '$12', fontWeight: '$regular' },
18
- },
19
- },
20
-
21
- defaultVariants: {
22
- size: '1',
23
- },
24
- })
25
-
26
- export type LabelProps = ComponentProps<typeof Label> & {
27
- as?: ElementType
28
- }
@@ -1,26 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
- import { Text } from '@radix-ui/themes'
4
-
5
- export const Subtitle = styled(Text, {
6
- fontFamily: '$default',
7
- color: '$gray100',
8
- letterSpacing: '0px',
9
- variants: {
10
- size: {
11
- 1: { fontSize: '$20', lineHeight: '$36', fontWeight: '$regular' },
12
- 2: { fontSize: '$18', lineHeight: '$34', fontWeight: '$regular' },
13
- 3: { fontSize: '$16', lineHeight: '$32', fontWeight: '$regular' },
14
- 4: { fontSize: '$14', lineHeight: '$24', fontWeight: '$regular' },
15
- 5: { fontSize: '$14', lineHeight: '$16', fontWeight: '$semibold' },
16
- },
17
- },
18
-
19
- defaultVariants: {
20
- size: 1,
21
- },
22
- })
23
-
24
- export type SubtitleProps = ComponentProps<typeof Subtitle> & {
25
- as?: ElementType
26
- }
@@ -1,15 +0,0 @@
1
- import { ComponentProps, ElementType } from 'react'
2
- import { styled } from '../styles'
3
-
4
- export const TooltipText = styled('span', {
5
- fontFamily: '$default',
6
- color: '$gray100',
7
- letterSpacing: '0px',
8
- fontSize: '$13',
9
- lineHeight: '$16',
10
- fontWeight: '$regular',
11
- })
12
-
13
- export interface TooltipTextProps extends ComponentProps<typeof TooltipText> {
14
- as?: ElementType
15
- }