@latte-macchiat-io/latte-vanilla-components 0.0.175 → 0.0.177

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.
Files changed (155) hide show
  1. package/package.json +12 -23
  2. package/src/assets/styles/default-theme.ts +312 -0
  3. package/src/components/Button/stories.ts +127 -0
  4. package/src/components/Columns/stories.ts +35 -0
  5. package/src/components/Icon/path.ts +36 -0
  6. package/src/components/Icon/stories.ts +29 -0
  7. package/src/components/Main/stories.ts +33 -0
  8. package/src/components/Section/stories.ts +64 -0
  9. package/{dist/types/index.d.ts → src/index.ts} +38 -0
  10. package/src/styles/mediaqueries.ts +17 -0
  11. package/src/theme/baseThemeValues.ts +160 -0
  12. package/src/theme/index.ts +6 -0
  13. package/src/theme/utils.ts +76 -0
  14. package/src/types/theme.ts +295 -0
  15. package/src/types/withClassName.ts +3 -0
  16. package/src/utils/cookie.ts +24 -0
  17. package/src/utils/deep-merge-objects.ts +15 -0
  18. package/src/utils/use-breakpoint-key.ts +30 -0
  19. package/src/utils/use-window-size.ts +37 -0
  20. package/dist/components/Actions/Actions.css.ts +0 -113
  21. package/dist/components/Button/Button.css.ts +0 -119
  22. package/dist/components/Carousel/Carousel.css.ts +0 -179
  23. package/dist/components/Columns/Columns.css.ts +0 -185
  24. package/dist/components/ConsentCookie/ConsentCookie.css.ts +0 -167
  25. package/dist/components/Footer/Footer.css.ts +0 -108
  26. package/dist/components/Form/Form.css.ts +0 -64
  27. package/dist/components/Form/Row/Row.css.ts +0 -70
  28. package/dist/components/Form/TextField/Input/Input.css.ts +0 -106
  29. package/dist/components/Form/TextField/Label/Label.css.ts +0 -58
  30. package/dist/components/Form/TextField/TextField.css.ts +0 -139
  31. package/dist/components/Form/TextField/Textarea/Textarea.css.ts +0 -121
  32. package/dist/components/Header/Header.css.ts +0 -111
  33. package/dist/components/Header/HeaderOverlay/styles.css.ts +0 -33
  34. package/dist/components/Header/ToggleNav/styles.css.ts +0 -40
  35. package/dist/components/Icon/Icon.css.ts +0 -102
  36. package/dist/components/KeyNumber/KeyNumber.css.ts +0 -158
  37. package/dist/components/LanguageSwitcher/LanguageSwitcher.css.ts +0 -120
  38. package/dist/components/Logo/Logo.css.ts +0 -98
  39. package/dist/components/Main/Main.css.ts +0 -62
  40. package/dist/components/Modal/Modal.css.ts +0 -203
  41. package/dist/components/Nav/Nav.css.ts +0 -123
  42. package/dist/components/NavLegal/NavLegal.css.ts +0 -121
  43. package/dist/components/NavSocial/NavSocial.css.ts +0 -121
  44. package/dist/components/Section/Section.css.ts +0 -101
  45. package/dist/components/Video/Video.css.ts +0 -210
  46. package/dist/components/VideoFullWidth/VideoFullWidth.css.ts +0 -50
  47. package/dist/index.cjs.js +0 -2
  48. package/dist/index.es.js +0 -6813
  49. package/dist/styles/sprinkles.css.ts +0 -84
  50. package/dist/theme/contract.css.ts +0 -83
  51. package/dist/types/components/Actions/Actions.css.d.ts +0 -74
  52. package/dist/types/components/Actions/Actions.d.ts +0 -7
  53. package/dist/types/components/Actions/export.d.ts +0 -0
  54. package/dist/types/components/Actions/stories.d.ts +0 -0
  55. package/dist/types/components/Button/Button.css.d.ts +0 -65
  56. package/dist/types/components/Button/Button.d.ts +0 -8
  57. package/dist/types/components/Button/export.d.ts +0 -0
  58. package/dist/types/components/Button/stories.d.ts +0 -0
  59. package/dist/types/components/Carousel/Carousel.css.d.ts +0 -33
  60. package/dist/types/components/Carousel/Carousel.d.ts +0 -15
  61. package/dist/types/components/Carousel/export.d.ts +0 -0
  62. package/dist/types/components/Columns/Columns.css.d.ts +0 -104
  63. package/dist/types/components/Columns/Columns.d.ts +0 -8
  64. package/dist/types/components/Columns/export.d.ts +0 -0
  65. package/dist/types/components/Columns/stories.d.ts +0 -0
  66. package/dist/types/components/ConsentCookie/ConsentCookie.css.d.ts +0 -15
  67. package/dist/types/components/ConsentCookie/ConsentCookie.d.ts +0 -17
  68. package/dist/types/components/ConsentCookie/export.d.ts +0 -0
  69. package/dist/types/components/ConsentCookie/stories.d.ts +0 -0
  70. package/dist/types/components/Footer/Footer.css.d.ts +0 -50
  71. package/dist/types/components/Footer/Footer.d.ts +0 -7
  72. package/dist/types/components/Footer/export.d.ts +0 -0
  73. package/dist/types/components/Footer/stories.d.ts +0 -6
  74. package/dist/types/components/Form/Form.css.d.ts +0 -46
  75. package/dist/types/components/Form/Form.d.ts +0 -7
  76. package/dist/types/components/Form/Row/Row.css.d.ts +0 -51
  77. package/dist/types/components/Form/Row/Row.d.ts +0 -9
  78. package/dist/types/components/Form/Row/index.d.ts +0 -0
  79. package/dist/types/components/Form/Row/stories.d.ts +0 -0
  80. package/dist/types/components/Form/TextField/Input/Input.css.d.ts +0 -32
  81. package/dist/types/components/Form/TextField/Input/Input.d.ts +0 -10
  82. package/dist/types/components/Form/TextField/Input/export.d.ts +0 -0
  83. package/dist/types/components/Form/TextField/Label/Label.css.d.ts +0 -23
  84. package/dist/types/components/Form/TextField/Label/Label.d.ts +0 -9
  85. package/dist/types/components/Form/TextField/Label/export.d.ts +0 -0
  86. package/dist/types/components/Form/TextField/TextField.css.d.ts +0 -19
  87. package/dist/types/components/Form/TextField/TextField.d.ts +0 -21
  88. package/dist/types/components/Form/TextField/Textarea/Textarea.css.d.ts +0 -56
  89. package/dist/types/components/Form/TextField/Textarea/Textarea.d.ts +0 -8
  90. package/dist/types/components/Form/TextField/Textarea/export.d.ts +0 -0
  91. package/dist/types/components/Form/TextField/Textarea/stories.d.ts +0 -0
  92. package/dist/types/components/Form/TextField/export.d.ts +0 -0
  93. package/dist/types/components/Form/export.d.ts +0 -0
  94. package/dist/types/components/Header/Header.css.d.ts +0 -36
  95. package/dist/types/components/Header/Header.d.ts +0 -11
  96. package/dist/types/components/Header/HeaderOverlay/index.d.ts +0 -7
  97. package/dist/types/components/Header/HeaderOverlay/styles.css.d.ts +0 -5
  98. package/dist/types/components/Header/ToggleNav/index.d.ts +0 -9
  99. package/dist/types/components/Header/ToggleNav/styles.css.d.ts +0 -5
  100. package/dist/types/components/Header/export.d.ts +0 -0
  101. package/dist/types/components/Header/stories.d.ts +0 -6
  102. package/dist/types/components/Icon/Icon.css.d.ts +0 -45
  103. package/dist/types/components/Icon/Icon.d.ts +0 -12
  104. package/dist/types/components/Icon/export.d.ts +0 -0
  105. package/dist/types/components/Icon/path.d.ts +0 -19
  106. package/dist/types/components/Icon/stories.d.ts +0 -0
  107. package/dist/types/components/KeyNumber/KeyNumber.css.d.ts +0 -40
  108. package/dist/types/components/KeyNumber/KeyNumber.d.ts +0 -15
  109. package/dist/types/components/KeyNumber/export.d.ts +0 -0
  110. package/dist/types/components/LanguageSwitcher/LanguageSwitcher.css.d.ts +0 -18
  111. package/dist/types/components/LanguageSwitcher/LanguageSwitcher.d.ts +0 -16
  112. package/dist/types/components/LanguageSwitcher/export.d.ts +0 -0
  113. package/dist/types/components/Logo/Logo.css.d.ts +0 -54
  114. package/dist/types/components/Logo/Logo.d.ts +0 -8
  115. package/dist/types/components/Logo/export.d.ts +0 -0
  116. package/dist/types/components/Logo/stories.d.ts +0 -6
  117. package/dist/types/components/Main/Main.css.d.ts +0 -32
  118. package/dist/types/components/Main/Main.d.ts +0 -7
  119. package/dist/types/components/Main/export.d.ts +0 -0
  120. package/dist/types/components/Main/stories.d.ts +0 -0
  121. package/dist/types/components/Modal/Modal.css.d.ts +0 -82
  122. package/dist/types/components/Modal/Modal.d.ts +0 -15
  123. package/dist/types/components/Modal/export.d.ts +0 -0
  124. package/dist/types/components/Modal/types.d.ts +0 -5
  125. package/dist/types/components/Nav/Nav.css.d.ts +0 -52
  126. package/dist/types/components/Nav/Nav.d.ts +0 -7
  127. package/dist/types/components/Nav/export.d.ts +0 -0
  128. package/dist/types/components/Nav/stories.d.ts +0 -6
  129. package/dist/types/components/NavLegal/NavLegal.css.d.ts +0 -57
  130. package/dist/types/components/NavLegal/NavLegal.d.ts +0 -7
  131. package/dist/types/components/NavLegal/export.d.ts +0 -0
  132. package/dist/types/components/NavLegal/stories.d.ts +0 -6
  133. package/dist/types/components/NavLegal/types.d.ts +0 -1
  134. package/dist/types/components/NavSocial/NavSocial.css.d.ts +0 -30
  135. package/dist/types/components/NavSocial/NavSocial.d.ts +0 -15
  136. package/dist/types/components/NavSocial/export.d.ts +0 -0
  137. package/dist/types/components/NavSocial/stories.d.ts +0 -0
  138. package/dist/types/components/NavSocial/types.d.ts +0 -1
  139. package/dist/types/components/Section/Section.css.d.ts +0 -60
  140. package/dist/types/components/Section/Section.d.ts +0 -7
  141. package/dist/types/components/Section/export.d.ts +0 -0
  142. package/dist/types/components/Section/stories.d.ts +0 -0
  143. package/dist/types/components/ToRemove/ToRemove.d.ts +0 -1
  144. package/dist/types/components/Video/Video.css.d.ts +0 -43
  145. package/dist/types/components/Video/Video.d.ts +0 -17
  146. package/dist/types/components/Video/export.d.ts +0 -0
  147. package/dist/types/components/VideoFullWidth/VideoFullWidth.css.d.ts +0 -18
  148. package/dist/types/components/VideoFullWidth/VideoFullWidth.d.ts +0 -14
  149. package/dist/types/components/VideoFullWidth/export.d.ts +0 -0
  150. package/dist/types/utils/cookie.d.ts +0 -2
  151. package/dist/types/utils/deep-merge-objects.d.ts +0 -2
  152. package/dist/types/utils/theme.css.d.ts +0 -173
  153. package/dist/types/utils/use-breakpoint-key.d.ts +0 -1
  154. package/dist/types/utils/use-window-size.d.ts +0 -5
  155. package/dist/utils/theme.css.ts +0 -129
@@ -1,70 +0,0 @@
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>;
@@ -1,106 +0,0 @@
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>;
@@ -1,58 +0,0 @@
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>;
@@ -1,139 +0,0 @@
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>;
@@ -1,121 +0,0 @@
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>;
@@ -1,111 +0,0 @@
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>;
@@ -1,33 +0,0 @@
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
- });
@@ -1,40 +0,0 @@
1
- import { createVar, globalStyle, style } 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
- });