@latte-macchiat-io/latte-vanilla-components 0.0.167 → 0.0.169
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/components/Actions/Actions.css.ts +113 -0
- package/dist/components/Button/Button.css.ts +119 -0
- package/dist/components/Carousel/Carousel.css.ts +180 -0
- package/dist/components/Columns/Columns.css.ts +185 -0
- package/dist/components/ConsentCookie/ConsentCookie.css.ts +167 -0
- package/dist/components/Footer/Footer.css.ts +108 -0
- package/dist/components/Form/Form.css.ts +64 -0
- package/dist/components/Form/Row/Row.css.ts +70 -0
- package/dist/components/Form/TextField/Input/Input.css.ts +106 -0
- package/dist/components/Form/TextField/Label/Label.css.ts +58 -0
- package/dist/components/Form/TextField/TextField.css.ts +139 -0
- package/dist/components/Form/TextField/Textarea/Textarea.css.ts +121 -0
- package/dist/components/Header/Header.css.ts +111 -0
- package/dist/components/Header/HeaderOverlay/styles.css.ts +33 -0
- package/dist/components/Header/ToggleNav/styles.css.ts +40 -0
- package/dist/components/Icon/Icon.css.ts +102 -0
- package/dist/components/KeyNumber/KeyNumber.css.ts +158 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.css.ts +120 -0
- package/dist/components/Logo/Logo.css.ts +98 -0
- package/dist/components/Main/Main.css.ts +62 -0
- package/dist/components/Modal/Modal.css.ts +203 -0
- package/dist/components/Nav/Nav.css.ts +123 -0
- package/dist/components/NavLegal/NavLegal.css.ts +121 -0
- package/dist/components/NavSocial/NavSocial.css.ts +121 -0
- package/dist/components/Section/Section.css.ts +101 -0
- package/dist/components/Video/Video.css.ts +210 -0
- package/dist/components/VideoFullWidth/VideoFullWidth.css.ts +50 -0
- package/dist/styles/sprinkles.css.ts +82 -0
- package/dist/theme/contract.css.ts +83 -0
- package/dist/theme/default.css.ts +9 -0
- package/package.json +10 -9
- 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,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>;
|
@@ -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,210 @@
|
|
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 videoBase = style({
|
6
|
+
position: 'relative',
|
7
|
+
overflow: 'hidden',
|
8
|
+
backgroundColor: themeContract.colors.background,
|
9
|
+
});
|
10
|
+
|
11
|
+
const videoElement = style({
|
12
|
+
top: '50%',
|
13
|
+
left: '50%',
|
14
|
+
width: 'auto',
|
15
|
+
minWidth: '100%',
|
16
|
+
minHeight: '100%',
|
17
|
+
position: 'absolute',
|
18
|
+
transform: 'translate(-50%, -50%)',
|
19
|
+
});
|
20
|
+
|
21
|
+
const videoPoster = style({
|
22
|
+
top: 0,
|
23
|
+
left: 0,
|
24
|
+
width: '100%',
|
25
|
+
height: '100%',
|
26
|
+
position: 'absolute',
|
27
|
+
opacity: 1,
|
28
|
+
transition: 'opacity 0.3s ease-in-out',
|
29
|
+
pointerEvents: 'auto',
|
30
|
+
|
31
|
+
// selectors: {
|
32
|
+
// '&[data-playing="true"]': {
|
33
|
+
// opacity: 0,
|
34
|
+
// pointerEvents: 'none',
|
35
|
+
// },
|
36
|
+
// },
|
37
|
+
});
|
38
|
+
|
39
|
+
const posterImage = style({
|
40
|
+
width: '100%',
|
41
|
+
height: '100%',
|
42
|
+
minWidth: '100%',
|
43
|
+
minHeight: '100%',
|
44
|
+
objectFit: 'cover',
|
45
|
+
});
|
46
|
+
|
47
|
+
const playButton = style({
|
48
|
+
position: 'absolute',
|
49
|
+
top: '50%',
|
50
|
+
left: '50%',
|
51
|
+
transform: 'translate(-50%, -50%)',
|
52
|
+
border: 'none',
|
53
|
+
borderRadius: themeContract.radii.full,
|
54
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
55
|
+
color: themeContract.colors.background,
|
56
|
+
cursor: 'pointer',
|
57
|
+
transition: 'all 0.3s ease-in-out',
|
58
|
+
display: 'flex',
|
59
|
+
alignItems: 'center',
|
60
|
+
justifyContent: 'center',
|
61
|
+
opacity: 1,
|
62
|
+
pointerEvents: 'auto',
|
63
|
+
|
64
|
+
':hover': {
|
65
|
+
backgroundColor: 'rgba(0, 0, 0, 0.9)',
|
66
|
+
transform: 'translate(-50%, -50%) scale(1.1)',
|
67
|
+
},
|
68
|
+
|
69
|
+
':focus': {
|
70
|
+
outline: '2px solid',
|
71
|
+
outlineColor: themeContract.colors.primary,
|
72
|
+
outlineOffset: '2px',
|
73
|
+
},
|
74
|
+
|
75
|
+
// selectors: {
|
76
|
+
// '&[data-playing="true"]': {
|
77
|
+
// opacity: 0,
|
78
|
+
// pointerEvents: 'none',
|
79
|
+
// },
|
80
|
+
// '&[data-hidden="true"]': {
|
81
|
+
// display: 'none',
|
82
|
+
// },
|
83
|
+
// },
|
84
|
+
});
|
85
|
+
|
86
|
+
const controlButton = style({
|
87
|
+
position: 'absolute',
|
88
|
+
border: 'none',
|
89
|
+
borderRadius: themeContract.radii.md,
|
90
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
91
|
+
color: themeContract.colors.background,
|
92
|
+
cursor: 'pointer',
|
93
|
+
transition: 'all 0.3s ease-in-out',
|
94
|
+
display: 'flex',
|
95
|
+
alignItems: 'center',
|
96
|
+
justifyContent: 'center',
|
97
|
+
|
98
|
+
// ':hover': {
|
99
|
+
// backgroundColor: 'rgba(0, 0, 0, 0.9)',
|
100
|
+
// },
|
101
|
+
|
102
|
+
// ':focus': {
|
103
|
+
// outline: '2px solid',
|
104
|
+
// outlineColor: themeContract.colors.primary,
|
105
|
+
// outlineOffset: '2px',
|
106
|
+
// },
|
107
|
+
});
|
108
|
+
|
109
|
+
const closeButton = style([
|
110
|
+
controlButton,
|
111
|
+
{
|
112
|
+
top: themeContract.space.md,
|
113
|
+
right: themeContract.space.md,
|
114
|
+
width: '40px',
|
115
|
+
height: '40px',
|
116
|
+
|
117
|
+
'@media': {
|
118
|
+
'screen and (min-width: 768px)': {
|
119
|
+
width: '48px',
|
120
|
+
height: '48px',
|
121
|
+
top: themeContract.space.lg,
|
122
|
+
right: themeContract.space.lg,
|
123
|
+
},
|
124
|
+
},
|
125
|
+
},
|
126
|
+
]);
|
127
|
+
|
128
|
+
const pauseButton = style([
|
129
|
+
controlButton,
|
130
|
+
{
|
131
|
+
bottom: themeContract.space.md,
|
132
|
+
right: '80px',
|
133
|
+
width: '40px',
|
134
|
+
height: '40px',
|
135
|
+
|
136
|
+
'@media': {
|
137
|
+
'screen and (min-width: 768px)': {
|
138
|
+
width: '48px',
|
139
|
+
height: '48px',
|
140
|
+
bottom: themeContract.space.lg,
|
141
|
+
right: '100px',
|
142
|
+
},
|
143
|
+
},
|
144
|
+
},
|
145
|
+
]);
|
146
|
+
|
147
|
+
const soundButton = style([
|
148
|
+
controlButton,
|
149
|
+
{
|
150
|
+
bottom: themeContract.space.md,
|
151
|
+
right: themeContract.space.md,
|
152
|
+
width: '40px',
|
153
|
+
height: '40px',
|
154
|
+
|
155
|
+
'@media': {
|
156
|
+
'screen and (min-width: 768px)': {
|
157
|
+
width: '48px',
|
158
|
+
height: '48px',
|
159
|
+
bottom: themeContract.space.lg,
|
160
|
+
right: themeContract.space.lg,
|
161
|
+
},
|
162
|
+
},
|
163
|
+
},
|
164
|
+
]);
|
165
|
+
|
166
|
+
export const videoRecipe = recipe({
|
167
|
+
base: videoBase,
|
168
|
+
|
169
|
+
variants: {
|
170
|
+
size: {
|
171
|
+
sm: {
|
172
|
+
width: '300px',
|
173
|
+
height: '200px',
|
174
|
+
},
|
175
|
+
md: {
|
176
|
+
width: '500px',
|
177
|
+
height: '300px',
|
178
|
+
},
|
179
|
+
lg: {
|
180
|
+
width: '800px',
|
181
|
+
height: '450px',
|
182
|
+
},
|
183
|
+
fullWidth: {
|
184
|
+
width: '100vw',
|
185
|
+
height: 0,
|
186
|
+
paddingBottom: '56.25%', // 16:9 aspect ratio
|
187
|
+
position: 'relative',
|
188
|
+
},
|
189
|
+
},
|
190
|
+
aspectRatio: {
|
191
|
+
'16:9': {
|
192
|
+
aspectRatio: '16/9',
|
193
|
+
},
|
194
|
+
'4:3': {
|
195
|
+
aspectRatio: '4/3',
|
196
|
+
},
|
197
|
+
'1:1': {
|
198
|
+
aspectRatio: '1/1',
|
199
|
+
},
|
200
|
+
},
|
201
|
+
},
|
202
|
+
|
203
|
+
defaultVariants: {
|
204
|
+
size: 'md',
|
205
|
+
aspectRatio: '16:9',
|
206
|
+
},
|
207
|
+
});
|
208
|
+
|
209
|
+
export { videoElement, videoPoster, posterImage, playButton, closeButton, pauseButton, soundButton };
|
210
|
+
export type VideoVariants = RecipeVariants<typeof videoRecipe>;
|