@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,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,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>;
|
@@ -0,0 +1,121 @@
|
|
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 textareaBase = 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
|
+
resize: 'vertical',
|
18
|
+
minHeight: '80px',
|
19
|
+
|
20
|
+
'::placeholder': {
|
21
|
+
color: themeContract.colors.textSecondary,
|
22
|
+
},
|
23
|
+
|
24
|
+
':hover': {
|
25
|
+
borderColor: themeContract.colors.primary,
|
26
|
+
},
|
27
|
+
|
28
|
+
':focus': {
|
29
|
+
outline: '2px solid',
|
30
|
+
outlineColor: themeContract.colors.primary,
|
31
|
+
outlineOffset: '2px',
|
32
|
+
borderColor: themeContract.colors.primary,
|
33
|
+
},
|
34
|
+
|
35
|
+
':disabled': {
|
36
|
+
backgroundColor: themeContract.colors.surface,
|
37
|
+
color: themeContract.colors.textSecondary,
|
38
|
+
cursor: 'not-allowed',
|
39
|
+
opacity: '0.6',
|
40
|
+
resize: 'none',
|
41
|
+
},
|
42
|
+
|
43
|
+
selectors: {
|
44
|
+
'&[data-error="true"]': {
|
45
|
+
borderColor: themeContract.colors.error,
|
46
|
+
},
|
47
|
+
'&[data-error="true"]:focus': {
|
48
|
+
outlineColor: themeContract.colors.error,
|
49
|
+
borderColor: themeContract.colors.error,
|
50
|
+
},
|
51
|
+
},
|
52
|
+
});
|
53
|
+
|
54
|
+
export const textareaRecipe = recipe({
|
55
|
+
base: textareaBase,
|
56
|
+
|
57
|
+
variants: {
|
58
|
+
size: {
|
59
|
+
sm: {
|
60
|
+
fontSize: themeContract.fontSizes.xs,
|
61
|
+
padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
|
62
|
+
minHeight: '60px',
|
63
|
+
},
|
64
|
+
md: {},
|
65
|
+
lg: {
|
66
|
+
fontSize: themeContract.fontSizes.md,
|
67
|
+
padding: `${themeContract.space.md} ${themeContract.space.lg}`,
|
68
|
+
minHeight: '100px',
|
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
|
+
resize: {
|
99
|
+
vertical: {
|
100
|
+
resize: 'vertical',
|
101
|
+
},
|
102
|
+
horizontal: {
|
103
|
+
resize: 'horizontal',
|
104
|
+
},
|
105
|
+
both: {
|
106
|
+
resize: 'both',
|
107
|
+
},
|
108
|
+
none: {
|
109
|
+
resize: 'none',
|
110
|
+
},
|
111
|
+
},
|
112
|
+
},
|
113
|
+
|
114
|
+
defaultVariants: {
|
115
|
+
size: 'md',
|
116
|
+
variant: 'default',
|
117
|
+
resize: 'vertical',
|
118
|
+
},
|
119
|
+
});
|
120
|
+
|
121
|
+
export type TextareaVariants = RecipeVariants<typeof textareaRecipe>;
|
@@ -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>;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { createVar, style, CSSProperties } from '@vanilla-extract/css';
|
2
|
+
import { mq } from '../../../assets/styles/mediaqueries';
|
3
|
+
|
4
|
+
export const vars = {
|
5
|
+
overlayBottom: createVar(),
|
6
|
+
overlayTransform: createVar(),
|
7
|
+
};
|
8
|
+
|
9
|
+
export const headerOverlayStyle = style({
|
10
|
+
top: 0,
|
11
|
+
left: 0,
|
12
|
+
zIndex: 40,
|
13
|
+
width: '100vw',
|
14
|
+
display: 'flex',
|
15
|
+
height: '100vh',
|
16
|
+
position: 'fixed',
|
17
|
+
overflow: 'hidden',
|
18
|
+
textAlign: 'center',
|
19
|
+
alignItems: 'center',
|
20
|
+
flexDirection: 'column',
|
21
|
+
transformOrigin: '0% 0%',
|
22
|
+
justifyContent: 'center',
|
23
|
+
gap: 'var(--overlayGap, 20px)', // valeur par défaut, à remplacer via assignInlineVars si nécessaire
|
24
|
+
bottom: vars.overlayBottom,
|
25
|
+
transform: vars.overlayTransform,
|
26
|
+
transition: 'transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0)',
|
27
|
+
|
28
|
+
'@media': {
|
29
|
+
[mq[0]]: { gap: 'var(--overlayGap0, 20px)' },
|
30
|
+
[mq[1]]: { gap: 'var(--overlayGap1, 30px)' },
|
31
|
+
[mq[2]]: { gap: 'var(--overlayGap2, 40px)' },
|
32
|
+
},
|
33
|
+
});
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { createVar, style, globalStyle } from '@vanilla-extract/css';
|
2
|
+
|
3
|
+
export const vars = {
|
4
|
+
displayOnDesktop: createVar(),
|
5
|
+
};
|
6
|
+
|
7
|
+
export const toggleNavStyle = style({
|
8
|
+
border: 0,
|
9
|
+
width: '25px',
|
10
|
+
height: '12px',
|
11
|
+
zIndex: 60,
|
12
|
+
marginLeft: 0,
|
13
|
+
cursor: 'pointer',
|
14
|
+
position: 'relative',
|
15
|
+
|
16
|
+
'@media': {
|
17
|
+
'screen and (min-width: 1024px)': {
|
18
|
+
display: vars.displayOnDesktop,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
});
|
22
|
+
|
23
|
+
export const toggleNavBarStyle = style({
|
24
|
+
height: '2px',
|
25
|
+
width: '25px',
|
26
|
+
marginBottom: '8px',
|
27
|
+
display: 'block',
|
28
|
+
position: 'relative',
|
29
|
+
transformOrigin: 'center center',
|
30
|
+
transition: 'all 0.5s ease-in-out',
|
31
|
+
});
|
32
|
+
|
33
|
+
// Style dynamique pour chaque ligne via data attribute
|
34
|
+
globalStyle(`${toggleNavBarStyle}[data-open="true"]:nth-of-type(1)`, {
|
35
|
+
transform: 'rotate(45deg) translate(4px, 3px)',
|
36
|
+
});
|
37
|
+
|
38
|
+
globalStyle(`${toggleNavBarStyle}[data-open="true"]:nth-of-type(2)`, {
|
39
|
+
transform: 'rotate(-45deg) translate(4px, -3px)',
|
40
|
+
});
|
@@ -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>;
|