@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
@@ -0,0 +1,167 @@
|
|
1
|
+
import { keyframes, 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 fadeIn = keyframes({
|
7
|
+
from: { opacity: '0' },
|
8
|
+
to: { opacity: '1' },
|
9
|
+
});
|
10
|
+
|
11
|
+
const slideUp = keyframes({
|
12
|
+
from: {
|
13
|
+
opacity: '0',
|
14
|
+
transform: 'translateY(100%)',
|
15
|
+
},
|
16
|
+
to: {
|
17
|
+
opacity: '1',
|
18
|
+
transform: 'translateY(0)',
|
19
|
+
},
|
20
|
+
});
|
21
|
+
|
22
|
+
const consentOverlay = style({
|
23
|
+
position: 'fixed',
|
24
|
+
top: 0,
|
25
|
+
left: 0,
|
26
|
+
right: 0,
|
27
|
+
bottom: 0,
|
28
|
+
zIndex: 100,
|
29
|
+
animation: `${fadeIn} 0.3s ease-out`,
|
30
|
+
|
31
|
+
'::before': {
|
32
|
+
content: '""',
|
33
|
+
position: 'fixed',
|
34
|
+
top: 0,
|
35
|
+
left: 0,
|
36
|
+
right: 0,
|
37
|
+
bottom: 0,
|
38
|
+
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
39
|
+
backdropFilter: 'blur(2px)',
|
40
|
+
opacity: 0.8,
|
41
|
+
},
|
42
|
+
});
|
43
|
+
|
44
|
+
const consentContent = style({
|
45
|
+
// position: 'fixed',
|
46
|
+
bottom: themeContract.space.md,
|
47
|
+
right: themeContract.space.md,
|
48
|
+
zIndex: 20,
|
49
|
+
display: 'flex',
|
50
|
+
flexDirection: 'column',
|
51
|
+
backgroundColor: themeContract.colors.background,
|
52
|
+
border: `1px solid ${themeContract.colors.border}`,
|
53
|
+
borderRadius: themeContract.radii.lg,
|
54
|
+
boxShadow: themeContract.shadows.xl,
|
55
|
+
padding: themeContract.space.lg,
|
56
|
+
width: '300px',
|
57
|
+
maxWidth: 'calc(100vw - 32px)',
|
58
|
+
animation: `${slideUp} 0.3s ease-out`,
|
59
|
+
|
60
|
+
'@media': {
|
61
|
+
[queries.sm]: {
|
62
|
+
width: '400px',
|
63
|
+
},
|
64
|
+
[queries.md]: {
|
65
|
+
width: '500px',
|
66
|
+
padding: themeContract.space.xl,
|
67
|
+
},
|
68
|
+
},
|
69
|
+
});
|
70
|
+
|
71
|
+
const consentActions = style({
|
72
|
+
display: 'flex',
|
73
|
+
alignItems: 'center',
|
74
|
+
justifyContent: 'flex-end',
|
75
|
+
gap: themeContract.space.md,
|
76
|
+
marginTop: themeContract.space.lg,
|
77
|
+
flexWrap: 'wrap',
|
78
|
+
|
79
|
+
'@media': {
|
80
|
+
[queries.sm]: {
|
81
|
+
flexWrap: 'nowrap',
|
82
|
+
},
|
83
|
+
},
|
84
|
+
});
|
85
|
+
|
86
|
+
export const consentRecipe = recipe({
|
87
|
+
base: consentOverlay,
|
88
|
+
|
89
|
+
variants: {
|
90
|
+
// position: {
|
91
|
+
// 'bottom-right': {},
|
92
|
+
// 'bottom-left': {
|
93
|
+
// // selectors: {
|
94
|
+
// // '& > div': {
|
95
|
+
// // left: themeContract.space.md,
|
96
|
+
// // right: 'auto',
|
97
|
+
// // },
|
98
|
+
// // },
|
99
|
+
// },
|
100
|
+
// 'bottom-center': {
|
101
|
+
// // selectors: {
|
102
|
+
// // '& > div': {
|
103
|
+
// // left: '50%',
|
104
|
+
// // right: 'auto',
|
105
|
+
// // transform: 'translateX(-50%)',
|
106
|
+
// // },
|
107
|
+
// // },
|
108
|
+
// },
|
109
|
+
// 'top-right': {
|
110
|
+
// // selectors: {
|
111
|
+
// // '& > div': {
|
112
|
+
// // top: themeContract.space.md,
|
113
|
+
// // bottom: 'auto',
|
114
|
+
// // },
|
115
|
+
// // },
|
116
|
+
// },
|
117
|
+
// 'top-left': {
|
118
|
+
// // selectors: {
|
119
|
+
// // '& > div': {
|
120
|
+
// // top: themeContract.space.md,
|
121
|
+
// // bottom: 'auto',
|
122
|
+
// // left: themeContract.space.md,
|
123
|
+
// // right: 'auto',
|
124
|
+
// // },
|
125
|
+
// // },
|
126
|
+
// },
|
127
|
+
// 'top-center': {
|
128
|
+
// // selectors: {
|
129
|
+
// // '& > div': {
|
130
|
+
// // top: themeContract.space.md,
|
131
|
+
// // bottom: 'auto',
|
132
|
+
// // left: '50%',
|
133
|
+
// // right: 'auto',
|
134
|
+
// // transform: 'translateX(-50%)',
|
135
|
+
// // },
|
136
|
+
// // },
|
137
|
+
// },
|
138
|
+
// },
|
139
|
+
variant: {
|
140
|
+
modal: {},
|
141
|
+
banner: {
|
142
|
+
'::before': {
|
143
|
+
display: 'none',
|
144
|
+
},
|
145
|
+
|
146
|
+
// selectors: {
|
147
|
+
// '& > div': {
|
148
|
+
// position: 'static',
|
149
|
+
// width: '100%',
|
150
|
+
// maxWidth: 'none',
|
151
|
+
// borderRadius: 0,
|
152
|
+
// bottom: 'auto',
|
153
|
+
// right: 'auto',
|
154
|
+
// },
|
155
|
+
// },
|
156
|
+
},
|
157
|
+
},
|
158
|
+
},
|
159
|
+
|
160
|
+
defaultVariants: {
|
161
|
+
// position: 'bottom-right',
|
162
|
+
variant: 'modal',
|
163
|
+
},
|
164
|
+
});
|
165
|
+
|
166
|
+
export { consentContent, consentActions };
|
167
|
+
export type ConsentCookieVariants = RecipeVariants<typeof consentRecipe>;
|
@@ -0,0 +1,108 @@
|
|
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 footerBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
justifyContent: 'space-between',
|
10
|
+
flexDirection: 'column',
|
11
|
+
backgroundColor: themeContract.colors.background,
|
12
|
+
color: themeContract.colors.text,
|
13
|
+
zIndex: 20,
|
14
|
+
paddingLeft: themeContract.space.md,
|
15
|
+
paddingRight: themeContract.space.md,
|
16
|
+
paddingTop: themeContract.space.lg,
|
17
|
+
paddingBottom: themeContract.space.lg,
|
18
|
+
gap: themeContract.space.md,
|
19
|
+
fontSize: themeContract.fontSizes.sm,
|
20
|
+
borderTop: `1px solid ${themeContract.colors.border}`,
|
21
|
+
|
22
|
+
'@media': {
|
23
|
+
[queries.md]: {
|
24
|
+
paddingLeft: themeContract.space.lg,
|
25
|
+
paddingRight: themeContract.space.lg,
|
26
|
+
gap: themeContract.space.lg,
|
27
|
+
},
|
28
|
+
[queries.lg]: {
|
29
|
+
flexDirection: 'row',
|
30
|
+
paddingLeft: themeContract.space.xl,
|
31
|
+
paddingRight: themeContract.space.xl,
|
32
|
+
gap: themeContract.space.xl,
|
33
|
+
},
|
34
|
+
},
|
35
|
+
|
36
|
+
// selectors: {
|
37
|
+
// '& a': {
|
38
|
+
// transition: 'all 0.3s ease-in-out',
|
39
|
+
// textDecoration: 'none',
|
40
|
+
// color: 'inherit',
|
41
|
+
// },
|
42
|
+
// '& a:hover': {
|
43
|
+
// opacity: '0.7',
|
44
|
+
// transform: 'translateY(-1px)',
|
45
|
+
// },
|
46
|
+
// },
|
47
|
+
});
|
48
|
+
|
49
|
+
export const footerRecipe = recipe({
|
50
|
+
base: footerBase,
|
51
|
+
|
52
|
+
variants: {
|
53
|
+
variant: {
|
54
|
+
default: {
|
55
|
+
backgroundColor: themeContract.colors.background,
|
56
|
+
borderTop: `1px solid ${themeContract.colors.border}`,
|
57
|
+
},
|
58
|
+
dark: {
|
59
|
+
backgroundColor: themeContract.colors.surface,
|
60
|
+
color: themeContract.colors.textLight,
|
61
|
+
borderTop: `1px solid ${themeContract.colors.border}`,
|
62
|
+
},
|
63
|
+
minimal: {
|
64
|
+
backgroundColor: 'transparent',
|
65
|
+
borderTop: 'none',
|
66
|
+
},
|
67
|
+
},
|
68
|
+
size: {
|
69
|
+
sm: {
|
70
|
+
paddingTop: themeContract.space.md,
|
71
|
+
paddingBottom: themeContract.space.md,
|
72
|
+
fontSize: themeContract.fontSizes.xs,
|
73
|
+
},
|
74
|
+
md: {
|
75
|
+
paddingTop: themeContract.space.lg,
|
76
|
+
paddingBottom: themeContract.space.lg,
|
77
|
+
fontSize: themeContract.fontSizes.sm,
|
78
|
+
},
|
79
|
+
lg: {
|
80
|
+
paddingTop: themeContract.space.xl,
|
81
|
+
paddingBottom: themeContract.space.xl,
|
82
|
+
fontSize: themeContract.fontSizes.md,
|
83
|
+
},
|
84
|
+
},
|
85
|
+
layout: {
|
86
|
+
stacked: {
|
87
|
+
flexDirection: 'column',
|
88
|
+
textAlign: 'center',
|
89
|
+
},
|
90
|
+
horizontal: {
|
91
|
+
'@media': {
|
92
|
+
[queries.sm]: {
|
93
|
+
flexDirection: 'row',
|
94
|
+
textAlign: 'left',
|
95
|
+
},
|
96
|
+
},
|
97
|
+
},
|
98
|
+
},
|
99
|
+
},
|
100
|
+
|
101
|
+
defaultVariants: {
|
102
|
+
variant: 'default',
|
103
|
+
size: 'md',
|
104
|
+
layout: 'horizontal',
|
105
|
+
},
|
106
|
+
});
|
107
|
+
|
108
|
+
export type FooterVariants = RecipeVariants<typeof footerRecipe>;
|
package/dist/Form.css.ts
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const formBase = style({
|
6
|
+
width: '100%',
|
7
|
+
backgroundColor: 'transparent',
|
8
|
+
});
|
9
|
+
|
10
|
+
export const formRecipe = recipe({
|
11
|
+
base: formBase,
|
12
|
+
|
13
|
+
variants: {
|
14
|
+
spacing: {
|
15
|
+
none: {
|
16
|
+
gap: 0,
|
17
|
+
},
|
18
|
+
sm: {
|
19
|
+
display: 'flex',
|
20
|
+
flexDirection: 'column',
|
21
|
+
gap: themeContract.space.sm,
|
22
|
+
},
|
23
|
+
md: {
|
24
|
+
display: 'flex',
|
25
|
+
flexDirection: 'column',
|
26
|
+
gap: themeContract.space.md,
|
27
|
+
},
|
28
|
+
lg: {
|
29
|
+
display: 'flex',
|
30
|
+
flexDirection: 'column',
|
31
|
+
gap: themeContract.space.lg,
|
32
|
+
},
|
33
|
+
xl: {
|
34
|
+
display: 'flex',
|
35
|
+
flexDirection: 'column',
|
36
|
+
gap: themeContract.space.xl,
|
37
|
+
},
|
38
|
+
},
|
39
|
+
layout: {
|
40
|
+
stacked: {
|
41
|
+
display: 'flex',
|
42
|
+
flexDirection: 'column',
|
43
|
+
},
|
44
|
+
inline: {
|
45
|
+
display: 'flex',
|
46
|
+
flexDirection: 'row',
|
47
|
+
flexWrap: 'wrap',
|
48
|
+
alignItems: 'flex-end',
|
49
|
+
},
|
50
|
+
grid: {
|
51
|
+
display: 'grid',
|
52
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))',
|
53
|
+
gap: themeContract.space.md,
|
54
|
+
},
|
55
|
+
},
|
56
|
+
},
|
57
|
+
|
58
|
+
defaultVariants: {
|
59
|
+
spacing: 'md',
|
60
|
+
layout: 'stacked',
|
61
|
+
},
|
62
|
+
});
|
63
|
+
|
64
|
+
export type FormVariants = RecipeVariants<typeof formRecipe>;
|
@@ -0,0 +1,111 @@
|
|
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 headerBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
justifyContent: 'space-between',
|
10
|
+
width: '100%',
|
11
|
+
height: themeContract.header.height,
|
12
|
+
backgroundColor: themeContract.colors.background,
|
13
|
+
color: themeContract.colors.text,
|
14
|
+
zIndex: 30,
|
15
|
+
paddingLeft: themeContract.space.md,
|
16
|
+
paddingRight: themeContract.space.md,
|
17
|
+
paddingTop: themeContract.space.sm,
|
18
|
+
paddingBottom: themeContract.space.sm,
|
19
|
+
gap: themeContract.space.md,
|
20
|
+
|
21
|
+
'@media': {
|
22
|
+
[queries.md]: {
|
23
|
+
paddingLeft: themeContract.space.lg,
|
24
|
+
paddingRight: themeContract.space.lg,
|
25
|
+
gap: themeContract.space.lg,
|
26
|
+
},
|
27
|
+
[queries.lg]: {
|
28
|
+
paddingLeft: themeContract.space.xl,
|
29
|
+
paddingRight: themeContract.space.xl,
|
30
|
+
gap: themeContract.space.xl,
|
31
|
+
},
|
32
|
+
},
|
33
|
+
|
34
|
+
// selectors: {
|
35
|
+
// '& a': {
|
36
|
+
// transition: 'all 0.3s ease-in-out',
|
37
|
+
// textDecoration: 'none',
|
38
|
+
// color: 'inherit',
|
39
|
+
// },
|
40
|
+
// '& a:hover': {
|
41
|
+
// opacity: '0.7',
|
42
|
+
// transform: 'translateY(-1px)',
|
43
|
+
// },
|
44
|
+
// },
|
45
|
+
});
|
46
|
+
|
47
|
+
export const headerRecipe = recipe({
|
48
|
+
base: headerBase,
|
49
|
+
|
50
|
+
variants: {
|
51
|
+
// position: {
|
52
|
+
// relative: {
|
53
|
+
// position: 'relative',
|
54
|
+
// },
|
55
|
+
// fixed: {
|
56
|
+
// position: 'fixed',
|
57
|
+
// top: 0,
|
58
|
+
// left: 0,
|
59
|
+
// right: 0,
|
60
|
+
// },
|
61
|
+
// sticky: {
|
62
|
+
// position: 'sticky',
|
63
|
+
// top: 0,
|
64
|
+
// },
|
65
|
+
// },
|
66
|
+
variant: {
|
67
|
+
default: {
|
68
|
+
backgroundColor: themeContract.colors.background,
|
69
|
+
borderBottom: `1px solid ${themeContract.colors.border}`,
|
70
|
+
},
|
71
|
+
transparent: {
|
72
|
+
backgroundColor: 'transparent',
|
73
|
+
borderBottom: 'none',
|
74
|
+
},
|
75
|
+
dark: {
|
76
|
+
backgroundColor: themeContract.colors.surface,
|
77
|
+
color: themeContract.colors.textLight,
|
78
|
+
},
|
79
|
+
},
|
80
|
+
size: {
|
81
|
+
sm: {
|
82
|
+
height: '60px',
|
83
|
+
paddingTop: themeContract.space.xs,
|
84
|
+
paddingBottom: themeContract.space.xs,
|
85
|
+
},
|
86
|
+
md: {
|
87
|
+
height: themeContract.header.height,
|
88
|
+
paddingTop: themeContract.space.sm,
|
89
|
+
paddingBottom: themeContract.space.sm,
|
90
|
+
},
|
91
|
+
lg: {
|
92
|
+
height: '100px',
|
93
|
+
paddingTop: themeContract.space.md,
|
94
|
+
paddingBottom: themeContract.space.md,
|
95
|
+
},
|
96
|
+
},
|
97
|
+
},
|
98
|
+
|
99
|
+
defaultVariants: {
|
100
|
+
// position: 'relative',
|
101
|
+
variant: 'default',
|
102
|
+
size: 'md',
|
103
|
+
},
|
104
|
+
});
|
105
|
+
|
106
|
+
export const headerPlaceholder = style({
|
107
|
+
height: themeContract.header.height,
|
108
|
+
width: '100%',
|
109
|
+
});
|
110
|
+
|
111
|
+
export type HeaderVariants = RecipeVariants<typeof headerRecipe>;
|
package/dist/Icon.css.ts
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const iconBase = style({
|
6
|
+
display: 'inline-block',
|
7
|
+
verticalAlign: 'middle',
|
8
|
+
fill: 'currentColor',
|
9
|
+
flexShrink: 0,
|
10
|
+
transition: 'all 0.3s ease-in-out',
|
11
|
+
});
|
12
|
+
|
13
|
+
const iconPath = style({
|
14
|
+
transition: 'fill 0.3s ease-in-out',
|
15
|
+
});
|
16
|
+
|
17
|
+
export const iconRecipe = recipe({
|
18
|
+
base: iconBase,
|
19
|
+
|
20
|
+
variants: {
|
21
|
+
size: {
|
22
|
+
xs: {
|
23
|
+
width: '12px',
|
24
|
+
height: '12px',
|
25
|
+
},
|
26
|
+
sm: {
|
27
|
+
width: '16px',
|
28
|
+
height: '16px',
|
29
|
+
},
|
30
|
+
md: {
|
31
|
+
width: '24px',
|
32
|
+
height: '24px',
|
33
|
+
},
|
34
|
+
lg: {
|
35
|
+
width: '32px',
|
36
|
+
height: '32px',
|
37
|
+
},
|
38
|
+
xl: {
|
39
|
+
width: '48px',
|
40
|
+
height: '48px',
|
41
|
+
},
|
42
|
+
'2xl': {
|
43
|
+
width: '64px',
|
44
|
+
height: '64px',
|
45
|
+
},
|
46
|
+
},
|
47
|
+
// color: {
|
48
|
+
// current: {
|
49
|
+
// fill: 'currentColor',
|
50
|
+
// },
|
51
|
+
// primary: {
|
52
|
+
// fill: themeContract.colors.primary,
|
53
|
+
// },
|
54
|
+
// secondary: {
|
55
|
+
// fill: themeContract.colors.secondary,
|
56
|
+
// },
|
57
|
+
// accent: {
|
58
|
+
// fill: themeContract.colors.accent,
|
59
|
+
// },
|
60
|
+
// text: {
|
61
|
+
// fill: themeContract.colors.text,
|
62
|
+
// },
|
63
|
+
// textSecondary: {
|
64
|
+
// fill: themeContract.colors.textSecondary,
|
65
|
+
// },
|
66
|
+
// error: {
|
67
|
+
// fill: themeContract.colors.error,
|
68
|
+
// },
|
69
|
+
// success: {
|
70
|
+
// fill: themeContract.colors.success,
|
71
|
+
// },
|
72
|
+
// warning: {
|
73
|
+
// fill: themeContract.colors.warning,
|
74
|
+
// },
|
75
|
+
// info: {
|
76
|
+
// fill: themeContract.colors.info,
|
77
|
+
// },
|
78
|
+
// },
|
79
|
+
interactive: {
|
80
|
+
true: {
|
81
|
+
cursor: 'pointer',
|
82
|
+
':hover': {
|
83
|
+
transform: 'scale(1.1)',
|
84
|
+
opacity: 0.8,
|
85
|
+
},
|
86
|
+
':active': {
|
87
|
+
transform: 'scale(0.95)',
|
88
|
+
},
|
89
|
+
},
|
90
|
+
false: {},
|
91
|
+
},
|
92
|
+
},
|
93
|
+
|
94
|
+
defaultVariants: {
|
95
|
+
size: 'md',
|
96
|
+
// color: 'current',
|
97
|
+
interactive: false,
|
98
|
+
},
|
99
|
+
});
|
100
|
+
|
101
|
+
export { iconPath };
|
102
|
+
export type IconVariants = RecipeVariants<typeof iconRecipe>;
|
@@ -0,0 +1,106 @@
|
|
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 inputBase = style({
|
6
|
+
appearance: 'none',
|
7
|
+
backgroundColor: themeContract.colors.background,
|
8
|
+
border: `1px solid ${themeContract.colors.border}`,
|
9
|
+
borderRadius: themeContract.radii.md,
|
10
|
+
color: themeContract.colors.text,
|
11
|
+
fontFamily: themeContract.fonts.body,
|
12
|
+
fontSize: themeContract.fontSizes.sm,
|
13
|
+
lineHeight: themeContract.lineHeights.normal,
|
14
|
+
padding: `${themeContract.space.sm} ${themeContract.space.md}`,
|
15
|
+
transition: 'all 0.2s ease-in-out',
|
16
|
+
width: '100%',
|
17
|
+
|
18
|
+
// '::placeholder': {
|
19
|
+
// color: themeContract.colors.textSecondary,
|
20
|
+
// },
|
21
|
+
|
22
|
+
// ':hover': {
|
23
|
+
// borderColor: themeContract.colors.primary,
|
24
|
+
// },
|
25
|
+
|
26
|
+
// ':focus': {
|
27
|
+
// outline: '2px solid',
|
28
|
+
// outlineColor: themeContract.colors.primary,
|
29
|
+
// outlineOffset: '2px',
|
30
|
+
// borderColor: themeContract.colors.primary,
|
31
|
+
// },
|
32
|
+
|
33
|
+
// ':disabled': {
|
34
|
+
// backgroundColor: themeContract.colors.surface,
|
35
|
+
// color: themeContract.colors.textSecondary,
|
36
|
+
// cursor: 'not-allowed',
|
37
|
+
// opacity: '0.6',
|
38
|
+
// },
|
39
|
+
|
40
|
+
// selectors: {
|
41
|
+
// '&[data-error="true"]': {
|
42
|
+
// borderColor: themeContract.colors.error,
|
43
|
+
// },
|
44
|
+
// '&[data-error="true"]:focus': {
|
45
|
+
// outlineColor: themeContract.colors.error,
|
46
|
+
// borderColor: themeContract.colors.error,
|
47
|
+
// },
|
48
|
+
// // WebKit autofill styles
|
49
|
+
// '&:-webkit-autofill': {
|
50
|
+
// WebkitTextFillColor: themeContract.colors.text,
|
51
|
+
// WebkitBoxShadow: `0 0 0px 1000px ${themeContract.colors.background} inset`,
|
52
|
+
// },
|
53
|
+
// },
|
54
|
+
});
|
55
|
+
|
56
|
+
export const inputRecipe = recipe({
|
57
|
+
base: inputBase,
|
58
|
+
|
59
|
+
variants: {
|
60
|
+
size: {
|
61
|
+
sm: {
|
62
|
+
fontSize: themeContract.fontSizes.xs,
|
63
|
+
padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
64
|
+
},
|
65
|
+
md: {},
|
66
|
+
lg: {
|
67
|
+
fontSize: themeContract.fontSizes.md,
|
68
|
+
padding: `${themeContract.space.md} ${themeContract.space.lg}`,
|
69
|
+
},
|
70
|
+
},
|
71
|
+
variant: {
|
72
|
+
default: {},
|
73
|
+
filled: {
|
74
|
+
backgroundColor: themeContract.colors.surface,
|
75
|
+
border: 'none',
|
76
|
+
|
77
|
+
// ':focus': {
|
78
|
+
// backgroundColor: themeContract.colors.background,
|
79
|
+
// border: `1px solid ${themeContract.colors.primary}`,
|
80
|
+
// },
|
81
|
+
},
|
82
|
+
outlined: {
|
83
|
+
backgroundColor: 'transparent',
|
84
|
+
},
|
85
|
+
underlined: {
|
86
|
+
backgroundColor: 'transparent',
|
87
|
+
border: 'none',
|
88
|
+
borderBottom: `1px solid ${themeContract.colors.border}`,
|
89
|
+
borderRadius: 0,
|
90
|
+
padding: `${themeContract.space.sm} 0`,
|
91
|
+
|
92
|
+
// ':focus': {
|
93
|
+
// borderBottom: `2px solid ${themeContract.colors.primary}`,
|
94
|
+
// outline: 'none',
|
95
|
+
// },
|
96
|
+
},
|
97
|
+
},
|
98
|
+
},
|
99
|
+
|
100
|
+
defaultVariants: {
|
101
|
+
size: 'md',
|
102
|
+
variant: 'default',
|
103
|
+
},
|
104
|
+
});
|
105
|
+
|
106
|
+
export type InputVariants = RecipeVariants<typeof inputRecipe>;
|