@latte-macchiat-io/latte-vanilla-components 0.0.166 → 0.0.168
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.
- package/dist/Actions.css.ts +113 -0
- package/dist/Button.css.ts +119 -0
- package/dist/Carousel.css.ts +180 -0
- package/dist/Columns.css.ts +185 -0
- package/dist/ConsentCookie.css.ts +167 -0
- package/dist/Footer.css.ts +108 -0
- package/dist/Form.css.ts +64 -0
- package/dist/Header.css.ts +111 -0
- package/dist/Icon.css.ts +102 -0
- package/dist/Input.css.ts +106 -0
- package/dist/KeyNumber.css.ts +158 -0
- package/dist/Label.css.ts +58 -0
- package/dist/LanguageSwitcher.css.ts +120 -0
- package/dist/Logo.css.ts +98 -0
- package/dist/Main.css.ts +62 -0
- package/dist/Modal.css.ts +203 -0
- package/dist/Nav.css.ts +123 -0
- package/dist/NavLegal.css.ts +121 -0
- package/dist/NavSocial.css.ts +121 -0
- package/dist/Row.css.ts +70 -0
- package/dist/Section.css.ts +101 -0
- package/dist/TextField.css.ts +139 -0
- package/dist/Textarea.css.ts +121 -0
- package/dist/Video.css.ts +210 -0
- package/dist/VideoFullWidth.css.ts +50 -0
- package/dist/contract.css.ts +83 -0
- package/dist/default.css.ts +9 -0
- package/dist/sprinkles.css.ts +82 -0
- package/dist/styles.css.ts +40 -0
- package/dist/types/components/Section/Section.d.ts +1 -1
- package/dist/types/index.d.ts +25 -0
- package/package.json +4 -3
- package/src/components/Actions/Actions.css.ts +113 -0
- package/src/components/Button/Button.css.ts +119 -0
- package/src/components/Carousel/Carousel.css.ts +180 -0
- package/src/components/Columns/Columns.css.ts +185 -0
- package/src/components/ConsentCookie/ConsentCookie.css.ts +167 -0
- package/src/components/Footer/Footer.css.ts +108 -0
- package/src/components/Form/Form.css.ts +64 -0
- package/src/components/Form/Row/Row.css.ts +70 -0
- package/src/components/Form/TextField/Input/Input.css.ts +106 -0
- package/src/components/Form/TextField/Label/Label.css.ts +58 -0
- package/src/components/Form/TextField/TextField.css.ts +139 -0
- package/src/components/Form/TextField/Textarea/Textarea.css.ts +121 -0
- package/src/components/Header/Header.css.ts +111 -0
- package/src/components/Header/HeaderOverlay/styles.css.ts +33 -0
- package/src/components/Header/ToggleNav/styles.css.ts +40 -0
- package/src/components/Icon/Icon.css.ts +102 -0
- package/src/components/KeyNumber/KeyNumber.css.ts +158 -0
- package/src/components/LanguageSwitcher/LanguageSwitcher.css.ts +120 -0
- package/src/components/Logo/Logo.css.ts +98 -0
- package/src/components/Main/Main.css.ts +62 -0
- package/src/components/Modal/Modal.css.ts +203 -0
- package/src/components/Nav/Nav.css.ts +123 -0
- package/src/components/NavLegal/NavLegal.css.ts +121 -0
- package/src/components/NavSocial/NavSocial.css.ts +121 -0
- package/src/components/Section/Section.css.ts +101 -0
- package/src/components/Video/Video.css.ts +210 -0
- package/src/components/VideoFullWidth/VideoFullWidth.css.ts +50 -0
- package/src/styles/sprinkles.css.ts +82 -0
- package/src/theme/contract.css.ts +83 -0
- package/src/theme/default.css.ts +9 -0
- /package/dist/types/components/Section/{Section.recipe.d.ts → Section.css.d.ts} +0 -0
package/dist/Nav.css.ts
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { queries } from '../../styles/mediaqueries';
|
4
|
+
import { themeContract } from '../../theme';
|
5
|
+
|
6
|
+
const navBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
gap: themeContract.space.md,
|
10
|
+
flexDirection: 'column',
|
11
|
+
|
12
|
+
'@media': {
|
13
|
+
[queries.md]: {
|
14
|
+
flexDirection: 'row',
|
15
|
+
gap: themeContract.space.lg,
|
16
|
+
},
|
17
|
+
[queries.lg]: {
|
18
|
+
gap: themeContract.space.xl,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
|
22
|
+
// selectors: {
|
23
|
+
// '& a': {
|
24
|
+
// textDecoration: 'none',
|
25
|
+
// color: 'inherit',
|
26
|
+
// transition: 'all 0.3s ease-in-out',
|
27
|
+
// display: 'block',
|
28
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
29
|
+
// borderRadius: themeContract.radii.sm,
|
30
|
+
// },
|
31
|
+
// '& a:hover': {
|
32
|
+
// backgroundColor: themeContract.colors.surface,
|
33
|
+
// transform: 'translateY(-1px)',
|
34
|
+
// },
|
35
|
+
// '& a:focus': {
|
36
|
+
// outline: '2px solid',
|
37
|
+
// outlineColor: themeContract.colors.primary,
|
38
|
+
// outlineOffset: '2px',
|
39
|
+
// },
|
40
|
+
// '& a[aria-current="page"]': {
|
41
|
+
// backgroundColor: themeContract.colors.primary,
|
42
|
+
// color: themeContract.colors.background,
|
43
|
+
// },
|
44
|
+
// },
|
45
|
+
});
|
46
|
+
|
47
|
+
export const navRecipe = recipe({
|
48
|
+
base: navBase,
|
49
|
+
|
50
|
+
variants: {
|
51
|
+
orientation: {
|
52
|
+
horizontal: {
|
53
|
+
flexDirection: 'row',
|
54
|
+
alignItems: 'center',
|
55
|
+
},
|
56
|
+
vertical: {
|
57
|
+
flexDirection: 'column',
|
58
|
+
alignItems: 'flex-start',
|
59
|
+
},
|
60
|
+
responsive: {
|
61
|
+
flexDirection: 'column',
|
62
|
+
alignItems: 'flex-start',
|
63
|
+
|
64
|
+
'@media': {
|
65
|
+
[queries.md]: {
|
66
|
+
flexDirection: 'row',
|
67
|
+
alignItems: 'center',
|
68
|
+
},
|
69
|
+
},
|
70
|
+
},
|
71
|
+
},
|
72
|
+
variant: {
|
73
|
+
default: {
|
74
|
+
gap: themeContract.space.md,
|
75
|
+
},
|
76
|
+
compact: {
|
77
|
+
gap: themeContract.space.sm,
|
78
|
+
|
79
|
+
// selectors: {
|
80
|
+
// '& a': {
|
81
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.xs}`,
|
82
|
+
// fontSize: themeContract.fontSizes.sm,
|
83
|
+
// },
|
84
|
+
// },
|
85
|
+
},
|
86
|
+
spacious: {
|
87
|
+
gap: themeContract.space.lg,
|
88
|
+
|
89
|
+
// selectors: {
|
90
|
+
// '& a': {
|
91
|
+
// padding: `${themeContract.space.sm} ${themeContract.space.md}`,
|
92
|
+
// fontSize: themeContract.fontSizes.lg,
|
93
|
+
// },
|
94
|
+
// },
|
95
|
+
},
|
96
|
+
},
|
97
|
+
justify: {
|
98
|
+
start: {
|
99
|
+
justifyContent: 'flex-start',
|
100
|
+
},
|
101
|
+
center: {
|
102
|
+
justifyContent: 'center',
|
103
|
+
},
|
104
|
+
end: {
|
105
|
+
justifyContent: 'flex-end',
|
106
|
+
},
|
107
|
+
between: {
|
108
|
+
justifyContent: 'space-between',
|
109
|
+
},
|
110
|
+
around: {
|
111
|
+
justifyContent: 'space-around',
|
112
|
+
},
|
113
|
+
},
|
114
|
+
},
|
115
|
+
|
116
|
+
defaultVariants: {
|
117
|
+
orientation: 'responsive',
|
118
|
+
variant: 'default',
|
119
|
+
justify: 'start',
|
120
|
+
},
|
121
|
+
});
|
122
|
+
|
123
|
+
export type NavVariants = RecipeVariants<typeof navRecipe>;
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { queries } from '../../styles/mediaqueries';
|
4
|
+
import { themeContract } from '../../theme';
|
5
|
+
|
6
|
+
const navLegalBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
gap: themeContract.space.md,
|
10
|
+
fontSize: themeContract.fontSizes.sm,
|
11
|
+
color: themeContract.colors.textSecondary,
|
12
|
+
flexDirection: 'column',
|
13
|
+
|
14
|
+
'@media': {
|
15
|
+
[queries.md]: {
|
16
|
+
flexDirection: 'row',
|
17
|
+
gap: themeContract.space.lg,
|
18
|
+
},
|
19
|
+
},
|
20
|
+
|
21
|
+
// selectors: {
|
22
|
+
// '& a': {
|
23
|
+
// color: 'inherit',
|
24
|
+
// textDecoration: 'none',
|
25
|
+
// transition: 'all 0.3s ease-in-out',
|
26
|
+
// borderRadius: themeContract.radii.sm,
|
27
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
28
|
+
// },
|
29
|
+
// '& a:hover': {
|
30
|
+
// color: themeContract.colors.primary,
|
31
|
+
// backgroundColor: themeContract.colors.surface,
|
32
|
+
// },
|
33
|
+
// '& a:focus': {
|
34
|
+
// outline: '2px solid',
|
35
|
+
// outlineColor: themeContract.colors.primary,
|
36
|
+
// outlineOffset: '2px',
|
37
|
+
// },
|
38
|
+
// },
|
39
|
+
});
|
40
|
+
|
41
|
+
export const navLegalRecipe = recipe({
|
42
|
+
base: navLegalBase,
|
43
|
+
|
44
|
+
variants: {
|
45
|
+
orientation: {
|
46
|
+
horizontal: {
|
47
|
+
flexDirection: 'row',
|
48
|
+
},
|
49
|
+
vertical: {
|
50
|
+
flexDirection: 'column',
|
51
|
+
alignItems: 'flex-start',
|
52
|
+
},
|
53
|
+
responsive: {
|
54
|
+
flexDirection: 'column',
|
55
|
+
alignItems: 'flex-start',
|
56
|
+
|
57
|
+
'@media': {
|
58
|
+
[queries.md]: {
|
59
|
+
flexDirection: 'row',
|
60
|
+
alignItems: 'center',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
},
|
64
|
+
},
|
65
|
+
size: {
|
66
|
+
sm: {
|
67
|
+
fontSize: themeContract.fontSizes.xs,
|
68
|
+
gap: themeContract.space.sm,
|
69
|
+
},
|
70
|
+
md: {
|
71
|
+
fontSize: themeContract.fontSizes.sm,
|
72
|
+
gap: themeContract.space.md,
|
73
|
+
},
|
74
|
+
lg: {
|
75
|
+
fontSize: themeContract.fontSizes.md,
|
76
|
+
gap: themeContract.space.lg,
|
77
|
+
},
|
78
|
+
},
|
79
|
+
variant: {
|
80
|
+
default: {},
|
81
|
+
compact: {
|
82
|
+
gap: themeContract.space.sm,
|
83
|
+
|
84
|
+
// selectors: {
|
85
|
+
// '& a': {
|
86
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.xs}`,
|
87
|
+
// },
|
88
|
+
// },
|
89
|
+
},
|
90
|
+
spacious: {
|
91
|
+
gap: themeContract.space.xl,
|
92
|
+
|
93
|
+
// selectors: {
|
94
|
+
// '& a': {
|
95
|
+
// padding: `${themeContract.space.sm} ${themeContract.space.md}`,
|
96
|
+
// },
|
97
|
+
// },
|
98
|
+
},
|
99
|
+
},
|
100
|
+
align: {
|
101
|
+
left: {
|
102
|
+
justifyContent: 'flex-start',
|
103
|
+
},
|
104
|
+
center: {
|
105
|
+
justifyContent: 'center',
|
106
|
+
},
|
107
|
+
right: {
|
108
|
+
justifyContent: 'flex-end',
|
109
|
+
},
|
110
|
+
},
|
111
|
+
},
|
112
|
+
|
113
|
+
defaultVariants: {
|
114
|
+
orientation: 'responsive',
|
115
|
+
size: 'md',
|
116
|
+
variant: 'default',
|
117
|
+
align: 'left',
|
118
|
+
},
|
119
|
+
});
|
120
|
+
|
121
|
+
export type NavLegalVariants = RecipeVariants<typeof navLegalRecipe>;
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { queries } from '../../styles/mediaqueries';
|
4
|
+
import { themeContract } from '../../theme/contract.css';
|
5
|
+
|
6
|
+
const navSocialBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
gap: themeContract.space.md,
|
10
|
+
|
11
|
+
'@media': {
|
12
|
+
[queries.md]: {
|
13
|
+
gap: themeContract.space.lg,
|
14
|
+
},
|
15
|
+
},
|
16
|
+
});
|
17
|
+
|
18
|
+
const navSocialLink = style({
|
19
|
+
display: 'flex',
|
20
|
+
alignItems: 'center',
|
21
|
+
justifyContent: 'center',
|
22
|
+
textDecoration: 'none',
|
23
|
+
color: 'inherit',
|
24
|
+
transition: 'all 0.3s ease-in-out',
|
25
|
+
borderRadius: themeContract.radii.full,
|
26
|
+
padding: themeContract.space.xs,
|
27
|
+
|
28
|
+
// ':hover': {
|
29
|
+
// transform: 'translateY(-2px) scale(1.1)',
|
30
|
+
// color: themeContract.colors.primary,
|
31
|
+
// },
|
32
|
+
|
33
|
+
// ':focus': {
|
34
|
+
// outline: '2px solid',
|
35
|
+
// outlineColor: themeContract.colors.primary,
|
36
|
+
// outlineOffset: '2px',
|
37
|
+
// },
|
38
|
+
|
39
|
+
// ':active': {
|
40
|
+
// transform: 'translateY(0) scale(1.05)',
|
41
|
+
// },
|
42
|
+
});
|
43
|
+
|
44
|
+
export const navSocialRecipe = recipe({
|
45
|
+
base: navSocialBase,
|
46
|
+
|
47
|
+
variants: {
|
48
|
+
orientation: {
|
49
|
+
horizontal: {
|
50
|
+
flexDirection: 'row',
|
51
|
+
},
|
52
|
+
vertical: {
|
53
|
+
flexDirection: 'column',
|
54
|
+
},
|
55
|
+
},
|
56
|
+
size: {
|
57
|
+
sm: {
|
58
|
+
gap: themeContract.space.sm,
|
59
|
+
|
60
|
+
// selectors: {
|
61
|
+
// [`& .${navSocialLink}`]: {
|
62
|
+
// padding: themeContract.space.xs,
|
63
|
+
// },
|
64
|
+
// },
|
65
|
+
},
|
66
|
+
md: {
|
67
|
+
gap: themeContract.space.md,
|
68
|
+
},
|
69
|
+
lg: {
|
70
|
+
gap: themeContract.space.lg,
|
71
|
+
|
72
|
+
// selectors: {
|
73
|
+
// [`& .${navSocialLink}`]: {
|
74
|
+
// padding: themeContract.space.sm,
|
75
|
+
// },
|
76
|
+
// },
|
77
|
+
},
|
78
|
+
},
|
79
|
+
variant: {
|
80
|
+
default: {},
|
81
|
+
rounded: {
|
82
|
+
// selectors: {
|
83
|
+
// [`& .${navSocialLink}`]: {
|
84
|
+
// backgroundColor: themeContract.colors.surface,
|
85
|
+
// borderRadius: themeContract.radii.full,
|
86
|
+
// width: '40px',
|
87
|
+
// height: '40px',
|
88
|
+
// },
|
89
|
+
// [`& .${navSocialLink}:hover`]: {
|
90
|
+
// backgroundColor: themeContract.colors.primary,
|
91
|
+
// color: themeContract.colors.background,
|
92
|
+
// },
|
93
|
+
// },
|
94
|
+
},
|
95
|
+
outlined: {
|
96
|
+
// selectors: {
|
97
|
+
// [`& .${navSocialLink}`]: {
|
98
|
+
// border: `1px solid ${themeContract.colors.border}`,
|
99
|
+
// borderRadius: themeContract.radii.md,
|
100
|
+
// width: '40px',
|
101
|
+
// height: '40px',
|
102
|
+
// },
|
103
|
+
// [`& .${navSocialLink}:hover`]: {
|
104
|
+
// borderColor: themeContract.colors.primary,
|
105
|
+
// backgroundColor: themeContract.colors.primary,
|
106
|
+
// color: themeContract.colors.background,
|
107
|
+
// },
|
108
|
+
// },
|
109
|
+
},
|
110
|
+
},
|
111
|
+
},
|
112
|
+
|
113
|
+
defaultVariants: {
|
114
|
+
orientation: 'horizontal',
|
115
|
+
size: 'md',
|
116
|
+
variant: 'default',
|
117
|
+
},
|
118
|
+
});
|
119
|
+
|
120
|
+
export { navSocialLink };
|
121
|
+
export type NavSocialVariants = RecipeVariants<typeof navSocialRecipe>;
|
package/dist/Row.css.ts
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../../theme/contract.css';
|
4
|
+
|
5
|
+
const rowBase = style({
|
6
|
+
display: 'flex',
|
7
|
+
width: '100%',
|
8
|
+
});
|
9
|
+
|
10
|
+
export const rowRecipe = recipe({
|
11
|
+
base: rowBase,
|
12
|
+
|
13
|
+
variants: {
|
14
|
+
align: {
|
15
|
+
left: {
|
16
|
+
justifyContent: 'flex-start',
|
17
|
+
textAlign: 'left',
|
18
|
+
},
|
19
|
+
center: {
|
20
|
+
justifyContent: 'center',
|
21
|
+
textAlign: 'center',
|
22
|
+
},
|
23
|
+
right: {
|
24
|
+
justifyContent: 'flex-end',
|
25
|
+
textAlign: 'right',
|
26
|
+
},
|
27
|
+
},
|
28
|
+
variant: {
|
29
|
+
default: {
|
30
|
+
flexDirection: 'column',
|
31
|
+
gap: themeContract.space.sm,
|
32
|
+
},
|
33
|
+
actions: {
|
34
|
+
flexDirection: 'row',
|
35
|
+
alignItems: 'center',
|
36
|
+
gap: themeContract.space.md,
|
37
|
+
marginTop: themeContract.space.lg,
|
38
|
+
},
|
39
|
+
message: {
|
40
|
+
flexDirection: 'column',
|
41
|
+
padding: themeContract.space.md,
|
42
|
+
backgroundColor: themeContract.colors.surface,
|
43
|
+
borderRadius: themeContract.radii.md,
|
44
|
+
border: `1px solid ${themeContract.colors.border}`,
|
45
|
+
},
|
46
|
+
},
|
47
|
+
spacing: {
|
48
|
+
none: {
|
49
|
+
gap: 0,
|
50
|
+
},
|
51
|
+
sm: {
|
52
|
+
gap: themeContract.space.sm,
|
53
|
+
},
|
54
|
+
md: {
|
55
|
+
gap: themeContract.space.md,
|
56
|
+
},
|
57
|
+
lg: {
|
58
|
+
gap: themeContract.space.lg,
|
59
|
+
},
|
60
|
+
},
|
61
|
+
},
|
62
|
+
|
63
|
+
defaultVariants: {
|
64
|
+
align: 'left',
|
65
|
+
variant: 'default',
|
66
|
+
spacing: 'sm',
|
67
|
+
},
|
68
|
+
});
|
69
|
+
|
70
|
+
export type RowVariants = RecipeVariants<typeof rowRecipe>;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const sectionBase = style({
|
6
|
+
width: '100%',
|
7
|
+
display: 'flex',
|
8
|
+
flexDirection: 'column',
|
9
|
+
alignItems: 'center',
|
10
|
+
justifyContent: 'flex-start',
|
11
|
+
paddingTop: themeContract.section.paddingTop,
|
12
|
+
paddingBottom: themeContract.section.paddingBottom,
|
13
|
+
paddingLeft: themeContract.space.md,
|
14
|
+
paddingRight: themeContract.space.md,
|
15
|
+
maxWidth: themeContract.maxWidth,
|
16
|
+
margin: '0 auto',
|
17
|
+
position: 'relative',
|
18
|
+
|
19
|
+
'@media': {
|
20
|
+
'screen and (min-width: 768px)': {
|
21
|
+
paddingLeft: themeContract.space.lg,
|
22
|
+
paddingRight: themeContract.space.lg,
|
23
|
+
},
|
24
|
+
'screen and (min-width: 1024px)': {
|
25
|
+
paddingLeft: themeContract.space.xl,
|
26
|
+
paddingRight: themeContract.space.xl,
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
30
|
+
|
31
|
+
export const sectionRecipe = recipe({
|
32
|
+
base: sectionBase,
|
33
|
+
|
34
|
+
variants: {
|
35
|
+
align: {
|
36
|
+
left: {
|
37
|
+
textAlign: 'left',
|
38
|
+
alignItems: 'flex-start',
|
39
|
+
},
|
40
|
+
center: {
|
41
|
+
textAlign: 'center',
|
42
|
+
alignItems: 'center',
|
43
|
+
},
|
44
|
+
right: {
|
45
|
+
textAlign: 'right',
|
46
|
+
alignItems: 'flex-end',
|
47
|
+
},
|
48
|
+
},
|
49
|
+
isDark: {
|
50
|
+
true: {
|
51
|
+
backgroundColor: themeContract.colors.surface,
|
52
|
+
color: themeContract.colors.textLight,
|
53
|
+
},
|
54
|
+
false: {
|
55
|
+
backgroundColor: themeContract.colors.background,
|
56
|
+
color: themeContract.colors.text,
|
57
|
+
},
|
58
|
+
},
|
59
|
+
isFullHeight: {
|
60
|
+
true: {
|
61
|
+
minHeight: '100vh',
|
62
|
+
justifyContent: 'center',
|
63
|
+
},
|
64
|
+
false: {
|
65
|
+
minHeight: 'auto',
|
66
|
+
justifyContent: 'flex-start',
|
67
|
+
},
|
68
|
+
},
|
69
|
+
spacing: {
|
70
|
+
none: {
|
71
|
+
paddingTop: '0',
|
72
|
+
paddingBottom: '0',
|
73
|
+
},
|
74
|
+
sm: {
|
75
|
+
paddingTop: themeContract.space.md,
|
76
|
+
paddingBottom: themeContract.space.md,
|
77
|
+
},
|
78
|
+
md: {
|
79
|
+
paddingTop: themeContract.section.paddingTop,
|
80
|
+
paddingBottom: themeContract.section.paddingBottom,
|
81
|
+
},
|
82
|
+
lg: {
|
83
|
+
paddingTop: themeContract.space.xl,
|
84
|
+
paddingBottom: themeContract.space.xl,
|
85
|
+
},
|
86
|
+
xl: {
|
87
|
+
paddingTop: themeContract.space['2xl'],
|
88
|
+
paddingBottom: themeContract.space['2xl'],
|
89
|
+
},
|
90
|
+
},
|
91
|
+
},
|
92
|
+
|
93
|
+
defaultVariants: {
|
94
|
+
align: 'left',
|
95
|
+
isDark: false,
|
96
|
+
isFullHeight: false,
|
97
|
+
spacing: 'md',
|
98
|
+
},
|
99
|
+
});
|
100
|
+
|
101
|
+
export type SectionVariants = RecipeVariants<typeof sectionRecipe>;
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../../theme/contract.css';
|
4
|
+
|
5
|
+
const textFieldBase = style({
|
6
|
+
display: 'flex',
|
7
|
+
flexDirection: 'column',
|
8
|
+
width: '100%',
|
9
|
+
gap: themeContract.space.xs,
|
10
|
+
});
|
11
|
+
|
12
|
+
const labelBase = style({
|
13
|
+
fontFamily: themeContract.fonts.body,
|
14
|
+
fontSize: themeContract.fontSizes.sm,
|
15
|
+
fontWeight: themeContract.fontWeights.medium,
|
16
|
+
color: themeContract.colors.text,
|
17
|
+
lineHeight: themeContract.lineHeights.tight,
|
18
|
+
|
19
|
+
// selectors: {
|
20
|
+
// '&[data-required="true"]': {
|
21
|
+
// selectors: {
|
22
|
+
// '&::after': {
|
23
|
+
// content: ' *',
|
24
|
+
// color: themeContract.colors.error,
|
25
|
+
// },
|
26
|
+
// },
|
27
|
+
// },
|
28
|
+
// },
|
29
|
+
});
|
30
|
+
|
31
|
+
const inputBase = style({
|
32
|
+
appearance: 'none',
|
33
|
+
backgroundColor: themeContract.colors.background,
|
34
|
+
border: `1px solid ${themeContract.colors.border}`,
|
35
|
+
borderRadius: themeContract.radii.md,
|
36
|
+
color: themeContract.colors.text,
|
37
|
+
fontFamily: themeContract.fonts.body,
|
38
|
+
fontSize: themeContract.fontSizes.sm,
|
39
|
+
lineHeight: themeContract.lineHeights.normal,
|
40
|
+
padding: `${themeContract.space.sm} ${themeContract.space.md}`,
|
41
|
+
transition: 'all 0.2s ease-in-out',
|
42
|
+
width: '100%',
|
43
|
+
|
44
|
+
'::placeholder': {
|
45
|
+
color: themeContract.colors.textSecondary,
|
46
|
+
},
|
47
|
+
|
48
|
+
':hover': {
|
49
|
+
borderColor: themeContract.colors.primary,
|
50
|
+
},
|
51
|
+
|
52
|
+
':focus': {
|
53
|
+
outline: '2px solid',
|
54
|
+
outlineColor: themeContract.colors.primary,
|
55
|
+
outlineOffset: '2px',
|
56
|
+
borderColor: themeContract.colors.primary,
|
57
|
+
},
|
58
|
+
|
59
|
+
':disabled': {
|
60
|
+
backgroundColor: themeContract.colors.surface,
|
61
|
+
color: themeContract.colors.textSecondary,
|
62
|
+
cursor: 'not-allowed',
|
63
|
+
opacity: '0.6',
|
64
|
+
},
|
65
|
+
|
66
|
+
// selectors: {
|
67
|
+
// '&[data-error="true"]': {
|
68
|
+
// borderColor: themeContract.colors.error,
|
69
|
+
// },
|
70
|
+
// '&[data-error="true"]:focus': {
|
71
|
+
// outlineColor: themeContract.colors.error,
|
72
|
+
// borderColor: themeContract.colors.error,
|
73
|
+
// },
|
74
|
+
// },
|
75
|
+
});
|
76
|
+
|
77
|
+
const textareaBase = style([
|
78
|
+
inputBase,
|
79
|
+
{
|
80
|
+
resize: 'vertical',
|
81
|
+
minHeight: '80px',
|
82
|
+
},
|
83
|
+
]);
|
84
|
+
|
85
|
+
const messageContainer = style({
|
86
|
+
display: 'flex',
|
87
|
+
flexDirection: 'column',
|
88
|
+
gap: themeContract.space.xs,
|
89
|
+
});
|
90
|
+
|
91
|
+
const errorMessage = style({
|
92
|
+
color: themeContract.colors.error,
|
93
|
+
fontSize: themeContract.fontSizes.xs,
|
94
|
+
lineHeight: themeContract.lineHeights.tight,
|
95
|
+
fontFamily: themeContract.fonts.body,
|
96
|
+
});
|
97
|
+
|
98
|
+
export const textFieldRecipe = recipe({
|
99
|
+
base: textFieldBase,
|
100
|
+
|
101
|
+
variants: {
|
102
|
+
size: {
|
103
|
+
sm: {
|
104
|
+
gap: themeContract.space.xs,
|
105
|
+
|
106
|
+
// selectors: {
|
107
|
+
// [`& .${labelBase}`]: {
|
108
|
+
// fontSize: themeContract.fontSizes.xs,
|
109
|
+
// },
|
110
|
+
// [`& .${inputBase}`]: {
|
111
|
+
// fontSize: themeContract.fontSizes.xs,
|
112
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
113
|
+
// },
|
114
|
+
// },
|
115
|
+
},
|
116
|
+
md: {},
|
117
|
+
lg: {
|
118
|
+
gap: themeContract.space.sm,
|
119
|
+
|
120
|
+
// selectors: {
|
121
|
+
// [`& .${labelBase}`]: {
|
122
|
+
// fontSize: themeContract.fontSizes.md,
|
123
|
+
// },
|
124
|
+
// [`& .${inputBase}`]: {
|
125
|
+
// fontSize: themeContract.fontSizes.md,
|
126
|
+
// padding: `${themeContract.space.md} ${themeContract.space.lg}`,
|
127
|
+
// },
|
128
|
+
// },
|
129
|
+
},
|
130
|
+
},
|
131
|
+
},
|
132
|
+
|
133
|
+
defaultVariants: {
|
134
|
+
size: 'md',
|
135
|
+
},
|
136
|
+
});
|
137
|
+
|
138
|
+
export { labelBase, inputBase, textareaBase, messageContainer, errorMessage };
|
139
|
+
export type TextFieldVariants = RecipeVariants<typeof textFieldRecipe>;
|