@latte-macchiat-io/latte-vanilla-components 0.0.167 → 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/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
@@ -0,0 +1,158 @@
|
|
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 keyNumberBase = style({
|
7
|
+
display: 'flex',
|
8
|
+
flexDirection: 'column',
|
9
|
+
alignItems: 'center',
|
10
|
+
textAlign: 'center',
|
11
|
+
color: themeContract.colors.text,
|
12
|
+
});
|
13
|
+
|
14
|
+
const keyNumberValue = style({
|
15
|
+
fontSize: themeContract.fontSizes.lg,
|
16
|
+
paddingBottom: themeContract.space.md,
|
17
|
+
fontWeight: '400',
|
18
|
+
|
19
|
+
'@media': {
|
20
|
+
[queries.lg]: {
|
21
|
+
paddingBottom: themeContract.space.lg,
|
22
|
+
},
|
23
|
+
},
|
24
|
+
|
25
|
+
// selectors: {
|
26
|
+
// '& span': {
|
27
|
+
// fontSize: themeContract.fontSizes['4xl'],
|
28
|
+
// lineHeight: themeContract.lineHeights.tight,
|
29
|
+
// fontWeight: 'bold',
|
30
|
+
// display: 'inline-block',
|
31
|
+
|
32
|
+
// '@media': {
|
33
|
+
// [queries.md]: {
|
34
|
+
// fontSize: '3rem',
|
35
|
+
// },
|
36
|
+
// [queries.lg]: {
|
37
|
+
// fontSize: '4rem',
|
38
|
+
// },
|
39
|
+
// },
|
40
|
+
// },
|
41
|
+
// },
|
42
|
+
});
|
43
|
+
|
44
|
+
const keyNumberLabel = style({
|
45
|
+
fontSize: themeContract.fontSizes.md,
|
46
|
+
color: themeContract.colors.textSecondary,
|
47
|
+
lineHeight: themeContract.lineHeights.normal,
|
48
|
+
margin: 0,
|
49
|
+
|
50
|
+
'@media': {
|
51
|
+
[queries.md]: {
|
52
|
+
fontSize: themeContract.fontSizes.lg,
|
53
|
+
},
|
54
|
+
},
|
55
|
+
});
|
56
|
+
|
57
|
+
export const keyNumberRecipe = recipe({
|
58
|
+
base: keyNumberBase,
|
59
|
+
|
60
|
+
variants: {
|
61
|
+
size: {
|
62
|
+
sm: {
|
63
|
+
// selectors: {
|
64
|
+
// [`& .${keyNumberValue}`]: {
|
65
|
+
// fontSize: themeContract.fontSizes.md,
|
66
|
+
// },
|
67
|
+
// [`& .${keyNumberValue} span`]: {
|
68
|
+
// fontSize: themeContract.fontSizes['2xl'],
|
69
|
+
// },
|
70
|
+
// [`& .${keyNumberLabel}`]: {
|
71
|
+
// fontSize: themeContract.fontSizes.sm,
|
72
|
+
// },
|
73
|
+
// },
|
74
|
+
},
|
75
|
+
md: {},
|
76
|
+
lg: {
|
77
|
+
// selectors: {
|
78
|
+
// [`& .${keyNumberValue}`]: {
|
79
|
+
// fontSize: themeContract.fontSizes.xl,
|
80
|
+
// },
|
81
|
+
// [`& .${keyNumberValue} span`]: {
|
82
|
+
// fontSize: '5rem',
|
83
|
+
// '@media': {
|
84
|
+
// [queries.lg]: {
|
85
|
+
// fontSize: '6rem',
|
86
|
+
// },
|
87
|
+
// },
|
88
|
+
// },
|
89
|
+
// [`& .${keyNumberLabel}`]: {
|
90
|
+
// fontSize: themeContract.fontSizes.xl,
|
91
|
+
// },
|
92
|
+
// },
|
93
|
+
},
|
94
|
+
},
|
95
|
+
variant: {
|
96
|
+
default: {},
|
97
|
+
highlighted: {
|
98
|
+
padding: themeContract.space.lg,
|
99
|
+
backgroundColor: themeContract.colors.surface,
|
100
|
+
borderRadius: themeContract.radii.lg,
|
101
|
+
boxShadow: themeContract.shadows.md,
|
102
|
+
},
|
103
|
+
outlined: {
|
104
|
+
padding: themeContract.space.lg,
|
105
|
+
border: `2px solid ${themeContract.colors.border}`,
|
106
|
+
borderRadius: themeContract.radii.lg,
|
107
|
+
},
|
108
|
+
},
|
109
|
+
align: {
|
110
|
+
left: {
|
111
|
+
alignItems: 'flex-start',
|
112
|
+
textAlign: 'left',
|
113
|
+
},
|
114
|
+
center: {
|
115
|
+
alignItems: 'center',
|
116
|
+
textAlign: 'center',
|
117
|
+
},
|
118
|
+
right: {
|
119
|
+
alignItems: 'flex-end',
|
120
|
+
textAlign: 'right',
|
121
|
+
},
|
122
|
+
},
|
123
|
+
// color: {
|
124
|
+
// default: {},
|
125
|
+
// primary: {
|
126
|
+
// // selectors: {
|
127
|
+
// // [`& .${keyNumberValue} span`]: {
|
128
|
+
// // color: themeContract.colors.primary,
|
129
|
+
// // },
|
130
|
+
// // },
|
131
|
+
// },
|
132
|
+
// accent: {
|
133
|
+
// // selectors: {
|
134
|
+
// // [`& .${keyNumberValue} span`]: {
|
135
|
+
// // color: themeContract.colors.accent,
|
136
|
+
// // },
|
137
|
+
// // },
|
138
|
+
// },
|
139
|
+
// success: {
|
140
|
+
// // selectors: {
|
141
|
+
// // [`& .${keyNumberValue} span`]: {
|
142
|
+
// // color: themeContract.colors.success,
|
143
|
+
// // },
|
144
|
+
// // },
|
145
|
+
// },
|
146
|
+
// },
|
147
|
+
},
|
148
|
+
|
149
|
+
defaultVariants: {
|
150
|
+
size: 'md',
|
151
|
+
variant: 'default',
|
152
|
+
align: 'center',
|
153
|
+
// color: 'default',
|
154
|
+
},
|
155
|
+
});
|
156
|
+
|
157
|
+
export { keyNumberValue, keyNumberLabel };
|
158
|
+
export type KeyNumberVariants = RecipeVariants<typeof keyNumberRecipe>;
|
@@ -0,0 +1,58 @@
|
|
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 labelBase = style({
|
6
|
+
fontFamily: themeContract.fonts.body,
|
7
|
+
fontSize: themeContract.fontSizes.sm,
|
8
|
+
fontWeight: themeContract.fontWeights.medium,
|
9
|
+
color: themeContract.colors.text,
|
10
|
+
lineHeight: themeContract.lineHeights.tight,
|
11
|
+
width: '100%',
|
12
|
+
textAlign: 'left',
|
13
|
+
paddingBottom: themeContract.space.xs,
|
14
|
+
|
15
|
+
// selectors: {
|
16
|
+
// '&[data-required="true"]': {
|
17
|
+
// selectors: {
|
18
|
+
// '&::after': {
|
19
|
+
// content: ' *',
|
20
|
+
// color: themeContract.colors.error,
|
21
|
+
// },
|
22
|
+
// },
|
23
|
+
// },
|
24
|
+
// },
|
25
|
+
});
|
26
|
+
|
27
|
+
export const labelRecipe = recipe({
|
28
|
+
base: labelBase,
|
29
|
+
|
30
|
+
variants: {
|
31
|
+
size: {
|
32
|
+
sm: {
|
33
|
+
fontSize: themeContract.fontSizes.xs,
|
34
|
+
paddingBottom: themeContract.space.xs,
|
35
|
+
},
|
36
|
+
md: {},
|
37
|
+
lg: {
|
38
|
+
fontSize: themeContract.fontSizes.md,
|
39
|
+
paddingBottom: themeContract.space.sm,
|
40
|
+
},
|
41
|
+
},
|
42
|
+
variant: {
|
43
|
+
default: {},
|
44
|
+
inline: {
|
45
|
+
display: 'inline-block',
|
46
|
+
marginRight: themeContract.space.sm,
|
47
|
+
paddingBottom: 0,
|
48
|
+
},
|
49
|
+
},
|
50
|
+
},
|
51
|
+
|
52
|
+
defaultVariants: {
|
53
|
+
size: 'md',
|
54
|
+
variant: 'default',
|
55
|
+
},
|
56
|
+
});
|
57
|
+
|
58
|
+
export type LabelVariants = RecipeVariants<typeof labelRecipe>;
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const languageSwitcherBase = style({
|
6
|
+
position: 'relative',
|
7
|
+
display: 'inline-flex',
|
8
|
+
alignItems: 'center',
|
9
|
+
});
|
10
|
+
|
11
|
+
const languageSwitcherSelect = style({
|
12
|
+
appearance: 'none',
|
13
|
+
background: 'transparent',
|
14
|
+
border: `1px solid ${themeContract.colors.border}`,
|
15
|
+
borderRadius: themeContract.radii.md,
|
16
|
+
padding: `${themeContract.space.sm} ${themeContract.space.md}`,
|
17
|
+
paddingRight: themeContract.space.xl,
|
18
|
+
fontSize: themeContract.fontSizes.sm,
|
19
|
+
fontFamily: themeContract.fonts.body,
|
20
|
+
color: themeContract.colors.text,
|
21
|
+
cursor: 'pointer',
|
22
|
+
transition: 'all 0.3s ease-in-out',
|
23
|
+
minWidth: '120px',
|
24
|
+
|
25
|
+
// ':hover': {
|
26
|
+
// borderColor: themeContract.colors.primary,
|
27
|
+
// backgroundColor: themeContract.colors.surface,
|
28
|
+
// },
|
29
|
+
|
30
|
+
// ':focus': {
|
31
|
+
// outline: '2px solid',
|
32
|
+
// outlineColor: themeContract.colors.primary,
|
33
|
+
// outlineOffset: '2px',
|
34
|
+
// borderColor: themeContract.colors.primary,
|
35
|
+
// },
|
36
|
+
|
37
|
+
// ':disabled': {
|
38
|
+
// opacity: '0.5',
|
39
|
+
// cursor: 'not-allowed',
|
40
|
+
// },
|
41
|
+
});
|
42
|
+
|
43
|
+
const languageSwitcherIcon = style({
|
44
|
+
position: 'absolute',
|
45
|
+
right: themeContract.space.sm,
|
46
|
+
top: '50%',
|
47
|
+
transform: 'translateY(-50%)',
|
48
|
+
pointerEvents: 'none',
|
49
|
+
color: themeContract.colors.textSecondary,
|
50
|
+
transition: 'transform 0.2s ease-in-out',
|
51
|
+
|
52
|
+
// selectors: {
|
53
|
+
// [`${languageSwitcherSelect}:focus + &`]: {
|
54
|
+
// color: themeContract.colors.primary,
|
55
|
+
// transform: 'translateY(-50%) rotate(180deg)',
|
56
|
+
// },
|
57
|
+
// },
|
58
|
+
});
|
59
|
+
|
60
|
+
export const languageSwitcherRecipe = recipe({
|
61
|
+
base: languageSwitcherBase,
|
62
|
+
|
63
|
+
variants: {
|
64
|
+
variant: {
|
65
|
+
default: {},
|
66
|
+
minimal: {
|
67
|
+
// selectors: {
|
68
|
+
// [`& .${languageSwitcherSelect}`]: {
|
69
|
+
// border: 'none',
|
70
|
+
// borderRadius: 0,
|
71
|
+
// borderBottom: `1px solid ${themeContract.colors.border}`,
|
72
|
+
// paddingLeft: 0,
|
73
|
+
// paddingRight: themeContract.space.lg,
|
74
|
+
// backgroundColor: 'transparent',
|
75
|
+
// },
|
76
|
+
// },
|
77
|
+
},
|
78
|
+
outlined: {},
|
79
|
+
filled: {
|
80
|
+
// selectors: {
|
81
|
+
// [`& .${languageSwitcherSelect}`]: {
|
82
|
+
// backgroundColor: themeContract.colors.surface,
|
83
|
+
// border: 'none',
|
84
|
+
// },
|
85
|
+
// },
|
86
|
+
},
|
87
|
+
},
|
88
|
+
size: {
|
89
|
+
sm: {
|
90
|
+
// selectors: {
|
91
|
+
// [`& .${languageSwitcherSelect}`]: {
|
92
|
+
// padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
93
|
+
// paddingRight: themeContract.space.lg,
|
94
|
+
// fontSize: themeContract.fontSizes.xs,
|
95
|
+
// minWidth: '100px',
|
96
|
+
// },
|
97
|
+
// },
|
98
|
+
},
|
99
|
+
md: {},
|
100
|
+
lg: {
|
101
|
+
// selectors: {
|
102
|
+
// [`& .${languageSwitcherSelect}`]: {
|
103
|
+
// padding: `${themeContract.space.md} ${themeContract.space.lg}`,
|
104
|
+
// paddingRight: '48px',
|
105
|
+
// fontSize: themeContract.fontSizes.md,
|
106
|
+
// minWidth: '140px',
|
107
|
+
// },
|
108
|
+
// },
|
109
|
+
},
|
110
|
+
},
|
111
|
+
},
|
112
|
+
|
113
|
+
defaultVariants: {
|
114
|
+
variant: 'default',
|
115
|
+
size: 'md',
|
116
|
+
},
|
117
|
+
});
|
118
|
+
|
119
|
+
export { languageSwitcherSelect, languageSwitcherIcon };
|
120
|
+
export type LanguageSwitcherVariants = RecipeVariants<typeof languageSwitcherRecipe>;
|
package/dist/Logo.css.ts
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const logoBase = style({
|
6
|
+
display: 'inline-block',
|
7
|
+
|
8
|
+
// selectors: {
|
9
|
+
// '& img': {
|
10
|
+
// width: '100%',
|
11
|
+
// height: 'auto',
|
12
|
+
// maxWidth: '100%',
|
13
|
+
// display: 'block',
|
14
|
+
// },
|
15
|
+
// '& svg': {
|
16
|
+
// width: '100%',
|
17
|
+
// height: 'auto',
|
18
|
+
// maxWidth: '100%',
|
19
|
+
// display: 'block',
|
20
|
+
// fill: 'currentColor',
|
21
|
+
// },
|
22
|
+
// },
|
23
|
+
});
|
24
|
+
|
25
|
+
export const logoRecipe = recipe({
|
26
|
+
base: logoBase,
|
27
|
+
|
28
|
+
variants: {
|
29
|
+
size: {
|
30
|
+
xs: {
|
31
|
+
width: '80px',
|
32
|
+
height: 'auto',
|
33
|
+
},
|
34
|
+
sm: {
|
35
|
+
width: '120px',
|
36
|
+
height: 'auto',
|
37
|
+
},
|
38
|
+
md: {
|
39
|
+
width: '160px',
|
40
|
+
height: 'auto',
|
41
|
+
},
|
42
|
+
lg: {
|
43
|
+
width: '200px',
|
44
|
+
height: 'auto',
|
45
|
+
},
|
46
|
+
xl: {
|
47
|
+
width: '240px',
|
48
|
+
height: 'auto',
|
49
|
+
},
|
50
|
+
auto: {
|
51
|
+
width: 'auto',
|
52
|
+
height: 'auto',
|
53
|
+
},
|
54
|
+
},
|
55
|
+
variant: {
|
56
|
+
default: {},
|
57
|
+
link: {
|
58
|
+
cursor: 'pointer',
|
59
|
+
transition: 'all 0.3s ease-in-out',
|
60
|
+
|
61
|
+
':hover': {
|
62
|
+
opacity: '0.8',
|
63
|
+
transform: 'scale(1.05)',
|
64
|
+
},
|
65
|
+
|
66
|
+
':focus': {
|
67
|
+
outline: '2px solid',
|
68
|
+
outlineColor: themeContract.colors.primary,
|
69
|
+
outlineOffset: '2px',
|
70
|
+
borderRadius: themeContract.radii.sm,
|
71
|
+
},
|
72
|
+
},
|
73
|
+
},
|
74
|
+
responsive: {
|
75
|
+
true: {
|
76
|
+
maxWidth: '100%',
|
77
|
+
height: 'auto',
|
78
|
+
|
79
|
+
// selectors: {
|
80
|
+
// '& img, & svg': {
|
81
|
+
// width: '100%',
|
82
|
+
// height: 'auto',
|
83
|
+
// maxWidth: '100%',
|
84
|
+
// },
|
85
|
+
// },
|
86
|
+
},
|
87
|
+
false: {},
|
88
|
+
},
|
89
|
+
},
|
90
|
+
|
91
|
+
defaultVariants: {
|
92
|
+
size: 'md',
|
93
|
+
variant: 'default',
|
94
|
+
responsive: true,
|
95
|
+
},
|
96
|
+
});
|
97
|
+
|
98
|
+
export type LogoVariants = RecipeVariants<typeof logoRecipe>;
|
package/dist/Main.css.ts
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
2
|
+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
3
|
+
import { themeContract } from '../../theme';
|
4
|
+
|
5
|
+
const mainBase = style({
|
6
|
+
display: 'flex',
|
7
|
+
flexDirection: 'column',
|
8
|
+
alignItems: 'center',
|
9
|
+
justifyContent: 'flex-start',
|
10
|
+
width: '100%',
|
11
|
+
minHeight: '100vh',
|
12
|
+
maxWidth: themeContract.maxWidth,
|
13
|
+
margin: '0 auto',
|
14
|
+
paddingTop: themeContract.header.height,
|
15
|
+
paddingBottom: themeContract.footer.height,
|
16
|
+
backgroundColor: themeContract.colors.background,
|
17
|
+
color: themeContract.colors.text,
|
18
|
+
fontFamily: themeContract.fonts.body,
|
19
|
+
});
|
20
|
+
|
21
|
+
export const mainRecipe = recipe({
|
22
|
+
base: mainBase,
|
23
|
+
|
24
|
+
variants: {
|
25
|
+
centered: {
|
26
|
+
true: {
|
27
|
+
justifyContent: 'center',
|
28
|
+
alignItems: 'center',
|
29
|
+
},
|
30
|
+
false: {
|
31
|
+
justifyContent: 'flex-start',
|
32
|
+
alignItems: 'stretch',
|
33
|
+
},
|
34
|
+
},
|
35
|
+
fullWidth: {
|
36
|
+
true: {
|
37
|
+
maxWidth: '100%',
|
38
|
+
},
|
39
|
+
false: {
|
40
|
+
maxWidth: themeContract.maxWidth,
|
41
|
+
},
|
42
|
+
},
|
43
|
+
noPadding: {
|
44
|
+
true: {
|
45
|
+
paddingTop: '0',
|
46
|
+
paddingBottom: '0',
|
47
|
+
},
|
48
|
+
false: {
|
49
|
+
paddingTop: themeContract.header.height,
|
50
|
+
paddingBottom: themeContract.footer.height,
|
51
|
+
},
|
52
|
+
},
|
53
|
+
},
|
54
|
+
|
55
|
+
defaultVariants: {
|
56
|
+
centered: false,
|
57
|
+
fullWidth: false,
|
58
|
+
noPadding: false,
|
59
|
+
},
|
60
|
+
});
|
61
|
+
|
62
|
+
export type MainVariants = RecipeVariants<typeof mainRecipe>;
|
@@ -0,0 +1,203 @@
|
|
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';
|
5
|
+
|
6
|
+
const fadeIn = keyframes({
|
7
|
+
from: { opacity: '0' },
|
8
|
+
to: { opacity: '1' },
|
9
|
+
});
|
10
|
+
|
11
|
+
const slideIn = keyframes({
|
12
|
+
from: {
|
13
|
+
opacity: '0',
|
14
|
+
transform: 'translate(-50%, -60%) scale(0.95)',
|
15
|
+
},
|
16
|
+
to: {
|
17
|
+
opacity: '1',
|
18
|
+
transform: 'translate(-50%, -50%) scale(1)',
|
19
|
+
},
|
20
|
+
});
|
21
|
+
|
22
|
+
const modalOverlay = style({
|
23
|
+
position: 'fixed',
|
24
|
+
top: 0,
|
25
|
+
left: 0,
|
26
|
+
right: 0,
|
27
|
+
bottom: 0,
|
28
|
+
zIndex: 50,
|
29
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
30
|
+
backdropFilter: 'blur(4px)',
|
31
|
+
animation: `${fadeIn} 0.2s ease-out`,
|
32
|
+
display: 'flex',
|
33
|
+
alignItems: 'center',
|
34
|
+
justifyContent: 'center',
|
35
|
+
padding: themeContract.space.md,
|
36
|
+
overflowY: 'auto',
|
37
|
+
});
|
38
|
+
|
39
|
+
const modalContent = style({
|
40
|
+
position: 'relative',
|
41
|
+
backgroundColor: themeContract.colors.background,
|
42
|
+
borderRadius: themeContract.radii.lg,
|
43
|
+
boxShadow: themeContract.shadows.xl,
|
44
|
+
border: `1px solid ${themeContract.colors.border}`,
|
45
|
+
maxHeight: '90vh',
|
46
|
+
maxWidth: '90vw',
|
47
|
+
width: '100%',
|
48
|
+
overflowY: 'auto',
|
49
|
+
animation: `${slideIn} 0.3s ease-out`,
|
50
|
+
|
51
|
+
'@media': {
|
52
|
+
[queries.sm]: {
|
53
|
+
maxWidth: '500px',
|
54
|
+
},
|
55
|
+
[queries.md]: {
|
56
|
+
maxWidth: '600px',
|
57
|
+
},
|
58
|
+
[queries.lg]: {
|
59
|
+
maxWidth: '800px',
|
60
|
+
},
|
61
|
+
},
|
62
|
+
});
|
63
|
+
|
64
|
+
const modalCloseButton = style({
|
65
|
+
position: 'absolute',
|
66
|
+
top: themeContract.space.md,
|
67
|
+
right: themeContract.space.md,
|
68
|
+
zIndex: 10,
|
69
|
+
display: 'flex',
|
70
|
+
alignItems: 'center',
|
71
|
+
justifyContent: 'center',
|
72
|
+
width: '32px',
|
73
|
+
height: '32px',
|
74
|
+
border: 'none',
|
75
|
+
borderRadius: themeContract.radii.full,
|
76
|
+
backgroundColor: themeContract.colors.surface,
|
77
|
+
color: themeContract.colors.text,
|
78
|
+
cursor: 'pointer',
|
79
|
+
transition: 'all 0.2s ease-in-out',
|
80
|
+
|
81
|
+
// ':hover': {
|
82
|
+
// backgroundColor: themeContract.colors.error,
|
83
|
+
// color: themeContract.colors.background,
|
84
|
+
// transform: 'scale(1.1)',
|
85
|
+
// },
|
86
|
+
|
87
|
+
// ':focus': {
|
88
|
+
// outline: '2px solid',
|
89
|
+
// outlineColor: themeContract.colors.primary,
|
90
|
+
// outlineOffset: '2px',
|
91
|
+
// },
|
92
|
+
});
|
93
|
+
|
94
|
+
export const modalRecipe = recipe({
|
95
|
+
base: modalOverlay,
|
96
|
+
|
97
|
+
variants: {
|
98
|
+
size: {
|
99
|
+
sm: {},
|
100
|
+
md: {},
|
101
|
+
lg: {},
|
102
|
+
xl: {},
|
103
|
+
full: {
|
104
|
+
padding: 0,
|
105
|
+
|
106
|
+
// selectors: {
|
107
|
+
// '& > div': {
|
108
|
+
// width: '100vw',
|
109
|
+
// height: '100vh',
|
110
|
+
// maxWidth: 'none',
|
111
|
+
// maxHeight: 'none',
|
112
|
+
// borderRadius: 0,
|
113
|
+
// },
|
114
|
+
// },
|
115
|
+
},
|
116
|
+
},
|
117
|
+
centered: {
|
118
|
+
true: {
|
119
|
+
alignItems: 'center',
|
120
|
+
justifyContent: 'center',
|
121
|
+
},
|
122
|
+
false: {
|
123
|
+
alignItems: 'flex-start',
|
124
|
+
justifyContent: 'center',
|
125
|
+
paddingTop: '5vh',
|
126
|
+
},
|
127
|
+
},
|
128
|
+
},
|
129
|
+
|
130
|
+
defaultVariants: {
|
131
|
+
size: 'md',
|
132
|
+
centered: true,
|
133
|
+
},
|
134
|
+
});
|
135
|
+
|
136
|
+
export const modalContentRecipe = recipe({
|
137
|
+
base: modalContent,
|
138
|
+
|
139
|
+
variants: {
|
140
|
+
size: {
|
141
|
+
sm: {
|
142
|
+
padding: themeContract.space.md,
|
143
|
+
'@media': {
|
144
|
+
[queries.sm]: {
|
145
|
+
maxWidth: '400px',
|
146
|
+
},
|
147
|
+
},
|
148
|
+
},
|
149
|
+
md: {
|
150
|
+
padding: themeContract.space.lg,
|
151
|
+
'@media': {
|
152
|
+
[queries.sm]: {
|
153
|
+
maxWidth: '500px',
|
154
|
+
},
|
155
|
+
},
|
156
|
+
},
|
157
|
+
lg: {
|
158
|
+
padding: themeContract.space.xl,
|
159
|
+
'@media': {
|
160
|
+
[queries.md]: {
|
161
|
+
maxWidth: '700px',
|
162
|
+
},
|
163
|
+
},
|
164
|
+
},
|
165
|
+
xl: {
|
166
|
+
padding: themeContract.space.xl,
|
167
|
+
'@media': {
|
168
|
+
[queries.lg]: {
|
169
|
+
maxWidth: '900px',
|
170
|
+
},
|
171
|
+
},
|
172
|
+
},
|
173
|
+
full: {
|
174
|
+
width: '100vw',
|
175
|
+
height: '100vh',
|
176
|
+
maxWidth: 'none',
|
177
|
+
maxHeight: 'none',
|
178
|
+
borderRadius: 0,
|
179
|
+
padding: themeContract.space.xl,
|
180
|
+
},
|
181
|
+
},
|
182
|
+
align: {
|
183
|
+
left: {
|
184
|
+
textAlign: 'left',
|
185
|
+
},
|
186
|
+
center: {
|
187
|
+
textAlign: 'center',
|
188
|
+
},
|
189
|
+
right: {
|
190
|
+
textAlign: 'right',
|
191
|
+
},
|
192
|
+
},
|
193
|
+
},
|
194
|
+
|
195
|
+
defaultVariants: {
|
196
|
+
size: 'md',
|
197
|
+
align: 'left',
|
198
|
+
},
|
199
|
+
});
|
200
|
+
|
201
|
+
export { modalCloseButton };
|
202
|
+
export type ModalVariants = RecipeVariants<typeof modalRecipe>;
|
203
|
+
export type ModalContentVariants = RecipeVariants<typeof modalContentRecipe>;
|