@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.
Files changed (61) hide show
  1. package/dist/components/Actions/Actions.css.ts +113 -0
  2. package/dist/components/Button/Button.css.ts +119 -0
  3. package/dist/components/Carousel/Carousel.css.ts +180 -0
  4. package/dist/components/Columns/Columns.css.ts +185 -0
  5. package/dist/components/ConsentCookie/ConsentCookie.css.ts +167 -0
  6. package/dist/components/Footer/Footer.css.ts +108 -0
  7. package/dist/components/Form/Form.css.ts +64 -0
  8. package/dist/components/Form/Row/Row.css.ts +70 -0
  9. package/dist/components/Form/TextField/Input/Input.css.ts +106 -0
  10. package/dist/components/Form/TextField/Label/Label.css.ts +58 -0
  11. package/dist/components/Form/TextField/TextField.css.ts +139 -0
  12. package/dist/components/Form/TextField/Textarea/Textarea.css.ts +121 -0
  13. package/dist/components/Header/Header.css.ts +111 -0
  14. package/dist/components/Header/HeaderOverlay/styles.css.ts +33 -0
  15. package/dist/components/Header/ToggleNav/styles.css.ts +40 -0
  16. package/dist/components/Icon/Icon.css.ts +102 -0
  17. package/dist/components/KeyNumber/KeyNumber.css.ts +158 -0
  18. package/dist/components/LanguageSwitcher/LanguageSwitcher.css.ts +120 -0
  19. package/dist/components/Logo/Logo.css.ts +98 -0
  20. package/dist/components/Main/Main.css.ts +62 -0
  21. package/dist/components/Modal/Modal.css.ts +203 -0
  22. package/dist/components/Nav/Nav.css.ts +123 -0
  23. package/dist/components/NavLegal/NavLegal.css.ts +121 -0
  24. package/dist/components/NavSocial/NavSocial.css.ts +121 -0
  25. package/dist/components/Section/Section.css.ts +101 -0
  26. package/dist/components/Video/Video.css.ts +210 -0
  27. package/dist/components/VideoFullWidth/VideoFullWidth.css.ts +50 -0
  28. package/dist/styles/sprinkles.css.ts +82 -0
  29. package/dist/theme/contract.css.ts +83 -0
  30. package/dist/theme/default.css.ts +9 -0
  31. package/package.json +10 -9
  32. package/src/components/Actions/Actions.css.ts +113 -0
  33. package/src/components/Button/Button.css.ts +119 -0
  34. package/src/components/Carousel/Carousel.css.ts +180 -0
  35. package/src/components/Columns/Columns.css.ts +185 -0
  36. package/src/components/ConsentCookie/ConsentCookie.css.ts +167 -0
  37. package/src/components/Footer/Footer.css.ts +108 -0
  38. package/src/components/Form/Form.css.ts +64 -0
  39. package/src/components/Form/Row/Row.css.ts +70 -0
  40. package/src/components/Form/TextField/Input/Input.css.ts +106 -0
  41. package/src/components/Form/TextField/Label/Label.css.ts +58 -0
  42. package/src/components/Form/TextField/TextField.css.ts +139 -0
  43. package/src/components/Form/TextField/Textarea/Textarea.css.ts +121 -0
  44. package/src/components/Header/Header.css.ts +111 -0
  45. package/src/components/Header/HeaderOverlay/styles.css.ts +33 -0
  46. package/src/components/Header/ToggleNav/styles.css.ts +40 -0
  47. package/src/components/Icon/Icon.css.ts +102 -0
  48. package/src/components/KeyNumber/KeyNumber.css.ts +158 -0
  49. package/src/components/LanguageSwitcher/LanguageSwitcher.css.ts +120 -0
  50. package/src/components/Logo/Logo.css.ts +98 -0
  51. package/src/components/Main/Main.css.ts +62 -0
  52. package/src/components/Modal/Modal.css.ts +203 -0
  53. package/src/components/Nav/Nav.css.ts +123 -0
  54. package/src/components/NavLegal/NavLegal.css.ts +121 -0
  55. package/src/components/NavSocial/NavSocial.css.ts +121 -0
  56. package/src/components/Section/Section.css.ts +101 -0
  57. package/src/components/Video/Video.css.ts +210 -0
  58. package/src/components/VideoFullWidth/VideoFullWidth.css.ts +50 -0
  59. package/src/styles/sprinkles.css.ts +82 -0
  60. package/src/theme/contract.css.ts +83 -0
  61. package/src/theme/default.css.ts +9 -0
@@ -0,0 +1,83 @@
1
+ import { createThemeContract } from '@vanilla-extract/css';
2
+
3
+ // Define a theme contract with design tokens
4
+ // This contract can then be reused to create multiple themes or overrides on a global level
5
+ export const themeContract = createThemeContract({
6
+ colors: {
7
+ primary: null,
8
+ secondary: null,
9
+ accent: null,
10
+ background: null,
11
+ surface: null,
12
+ text: null,
13
+ textSecondary: null,
14
+ textLight: null,
15
+ border: null,
16
+ error: null,
17
+ warning: null,
18
+ success: null,
19
+ info: null,
20
+ },
21
+ space: {
22
+ none: null,
23
+ xs: null,
24
+ sm: null,
25
+ md: null,
26
+ lg: null,
27
+ xl: null,
28
+ '2xl': null,
29
+ },
30
+ radii: {
31
+ none: null,
32
+ sm: null,
33
+ md: null,
34
+ lg: null,
35
+ xl: null,
36
+ full: null,
37
+ },
38
+ fonts: {
39
+ body: null,
40
+ heading: null,
41
+ mono: null,
42
+ },
43
+ fontSizes: {
44
+ xs: null,
45
+ sm: null,
46
+ md: null,
47
+ lg: null,
48
+ xl: null,
49
+ '2xl': null,
50
+ '3xl': null,
51
+ '4xl': null,
52
+ },
53
+ fontWeights: {
54
+ light: null,
55
+ normal: null,
56
+ medium: null,
57
+ semibold: null,
58
+ bold: null,
59
+ },
60
+ lineHeights: {
61
+ tight: null,
62
+ normal: null,
63
+ relaxed: null,
64
+ },
65
+ shadows: {
66
+ none: null,
67
+ sm: null,
68
+ md: null,
69
+ lg: null,
70
+ xl: null,
71
+ },
72
+ maxWidth: null,
73
+ section: {
74
+ paddingTop: null,
75
+ paddingBottom: null,
76
+ },
77
+ header: {
78
+ height: null,
79
+ },
80
+ footer: {
81
+ height: null,
82
+ },
83
+ });
@@ -0,0 +1,9 @@
1
+ import { createGlobalTheme } from '@vanilla-extract/css';
2
+ import { baseDarkTheme, baseLightTheme } from './baseThemeValues';
3
+ import { themeContract } from './contract.css';
4
+
5
+ // Create the default light theme at the root
6
+ createGlobalTheme('html', themeContract, baseLightTheme);
7
+
8
+ // Apply dark theme when data-theme="dark"
9
+ createGlobalTheme('html[data-theme="dark"]', themeContract, baseDarkTheme);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latte-macchiat-io/latte-vanilla-components",
3
- "version": "0.0.167",
3
+ "version": "0.0.169",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -15,17 +15,17 @@
15
15
  },
16
16
  "files": [
17
17
  "dist",
18
- "dist/**/*.css"
18
+ "src/**/*.css.ts"
19
19
  ],
20
20
  "peerDependencies": {
21
- "framer-motion": "^12.4.7",
22
- "react-countup": "^6.5.3",
23
- "react-intersection-observer": "^9.16.0",
24
- "react": "^19.0.0",
25
- "react-dom": "^19.0.0",
26
21
  "@vanilla-extract/css": "^1.17.4",
27
22
  "@vanilla-extract/recipes": "^0.5.7",
28
- "@vanilla-extract/sprinkles": "^1.6.5"
23
+ "@vanilla-extract/sprinkles": "^1.6.5",
24
+ "framer-motion": "^12.4.7",
25
+ "react": "^19",
26
+ "react-countup": "^6.5.3",
27
+ "react-dom": "^19",
28
+ "react-intersection-observer": "^9.16.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@chromatic-com/storybook": "^3.2.4",
@@ -58,7 +58,8 @@
58
58
  "typescript": "5.6.3",
59
59
  "typescript-eslint": "^8.21.0",
60
60
  "vite": "^6.0.11",
61
- "vite-plugin-dts": "^4.5.0"
61
+ "vite-plugin-dts": "^4.5.0",
62
+ "vite-plugin-static-copy": "^3.1.2"
62
63
  },
63
64
  "engines": {
64
65
  "node": ">=20.9.0",
@@ -0,0 +1,113 @@
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 actionsBase = style({
7
+ display: 'flex',
8
+ flexWrap: 'wrap',
9
+
10
+ gap: themeContract.space.sm,
11
+ paddingTop: themeContract.space.sm,
12
+ width: '100%',
13
+
14
+ '@media': {
15
+ [queries.lg]: {
16
+ gap: themeContract.space.md,
17
+ paddingTop: themeContract.space.md,
18
+ },
19
+ },
20
+ });
21
+
22
+ export const actionsRecipe = recipe({
23
+ base: actionsBase,
24
+
25
+ variants: {
26
+ align: {
27
+ left: {
28
+ justifyContent: 'flex-start',
29
+ alignItems: 'flex-start',
30
+ },
31
+ center: {
32
+ justifyContent: 'center',
33
+ alignItems: 'center',
34
+ },
35
+ right: {
36
+ justifyContent: 'flex-end',
37
+ alignItems: 'flex-end',
38
+ },
39
+ },
40
+ direction: {
41
+ row: {
42
+ flexDirection: 'row',
43
+ },
44
+ column: {
45
+ flexDirection: 'column',
46
+ },
47
+ 'row-reverse': {
48
+ flexDirection: 'row-reverse',
49
+ },
50
+ 'column-reverse': {
51
+ flexDirection: 'column-reverse',
52
+ },
53
+ },
54
+ spacing: {
55
+ none: {
56
+ gap: '0',
57
+ paddingTop: '0',
58
+ },
59
+ xs: {
60
+ gap: themeContract.space.xs,
61
+ paddingTop: themeContract.space.xs,
62
+ },
63
+ sm: {
64
+ gap: themeContract.space.sm,
65
+ paddingTop: themeContract.space.sm,
66
+ },
67
+ md: {
68
+ gap: themeContract.space.md,
69
+ paddingTop: themeContract.space.md,
70
+ },
71
+ lg: {
72
+ gap: themeContract.space.lg,
73
+ paddingTop: themeContract.space.lg,
74
+ },
75
+ xl: {
76
+ gap: themeContract.space.xl,
77
+ paddingTop: themeContract.space.xl,
78
+ },
79
+ },
80
+ wrap: {
81
+ true: {
82
+ flexWrap: 'wrap',
83
+ },
84
+ false: {
85
+ flexWrap: 'nowrap',
86
+ },
87
+ },
88
+ fullWidth: {
89
+ true: {
90
+ width: '100%',
91
+
92
+ // selectors: {
93
+ // '& > *': {
94
+ // flex: '1',
95
+ // },
96
+ // },
97
+ },
98
+ false: {
99
+ width: 'auto',
100
+ },
101
+ },
102
+ },
103
+
104
+ defaultVariants: {
105
+ align: 'left',
106
+ direction: 'row',
107
+ spacing: 'sm',
108
+ wrap: true,
109
+ fullWidth: false,
110
+ },
111
+ });
112
+
113
+ export type ActionsVariants = RecipeVariants<typeof actionsRecipe>;
@@ -0,0 +1,119 @@
1
+ import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
2
+ import { themeContract } from '../../theme';
3
+
4
+ export const buttonRecipe = recipe({
5
+ base: {
6
+ display: 'inline-flex',
7
+ alignItems: 'center',
8
+ justifyContent: 'center',
9
+ padding: themeContract.space.md,
10
+ borderRadius: themeContract.radii.md,
11
+ border: 'none',
12
+ cursor: 'pointer',
13
+ fontFamily: themeContract.fonts.body,
14
+ fontSize: themeContract.fontSizes.md,
15
+ fontWeight: '500',
16
+ lineHeight: themeContract.lineHeights.tight,
17
+ textDecoration: 'none',
18
+ transition: 'all 0.2s ease-in-out',
19
+ outline: 'none',
20
+
21
+ ':hover': {
22
+ transform: 'translateY(-1px)',
23
+ boxShadow: themeContract.shadows.md,
24
+ },
25
+
26
+ ':active': {
27
+ transform: 'translateY(0)',
28
+ },
29
+
30
+ ':focus-visible': {
31
+ outline: '2px solid',
32
+ outlineColor: themeContract.colors.primary,
33
+ outlineOffset: '2px',
34
+ },
35
+
36
+ ':disabled': {
37
+ opacity: '0.5',
38
+ cursor: 'not-allowed',
39
+ transform: 'none',
40
+ boxShadow: 'none',
41
+ },
42
+ },
43
+
44
+ variants: {
45
+ variant: {
46
+ primary: {
47
+ backgroundColor: themeContract.colors.primary,
48
+ color: themeContract.colors.background,
49
+
50
+ ':hover': {
51
+ backgroundColor: themeContract.colors.accent,
52
+ },
53
+ },
54
+ secondary: {
55
+ backgroundColor: themeContract.colors.secondary,
56
+ color: themeContract.colors.text,
57
+
58
+ ':hover': {
59
+ backgroundColor: themeContract.colors.surface,
60
+ },
61
+ },
62
+ outline: {
63
+ backgroundColor: 'transparent',
64
+ color: themeContract.colors.text,
65
+ border: `1px solid ${themeContract.colors.border}`,
66
+
67
+ ':hover': {
68
+ backgroundColor: themeContract.colors.surface,
69
+ borderColor: themeContract.colors.primary,
70
+ },
71
+ },
72
+ ghost: {
73
+ backgroundColor: 'transparent',
74
+ color: themeContract.colors.text,
75
+
76
+ ':hover': {
77
+ backgroundColor: themeContract.colors.surface,
78
+ },
79
+ },
80
+ danger: {
81
+ backgroundColor: themeContract.colors.error,
82
+ color: themeContract.colors.background,
83
+
84
+ ':hover': {
85
+ opacity: '0.9',
86
+ },
87
+ },
88
+ },
89
+ size: {
90
+ sm: {
91
+ padding: `${themeContract.space.xs} ${themeContract.space.sm}`,
92
+ fontSize: themeContract.fontSizes.sm,
93
+ borderRadius: themeContract.radii.sm,
94
+ },
95
+ md: {
96
+ padding: `${themeContract.space.sm} ${themeContract.space.md}`,
97
+ fontSize: themeContract.fontSizes.md,
98
+ borderRadius: themeContract.radii.md,
99
+ },
100
+ lg: {
101
+ padding: `${themeContract.space.md} ${themeContract.space.lg}`,
102
+ fontSize: themeContract.fontSizes.lg,
103
+ borderRadius: themeContract.radii.lg,
104
+ },
105
+ },
106
+ fullWidth: {
107
+ true: {
108
+ width: '100%',
109
+ },
110
+ },
111
+ },
112
+
113
+ defaultVariants: {
114
+ variant: 'primary',
115
+ size: 'md',
116
+ },
117
+ });
118
+
119
+ export type ButtonVariants = RecipeVariants<typeof buttonRecipe>;
@@ -0,0 +1,180 @@
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 slideTransition = keyframes({
7
+ '0%': { transform: 'translateX(0)' },
8
+ '100%': { transform: 'translateX(var(--slide-offset))' },
9
+ });
10
+
11
+ const carouselBase = style({
12
+ position: 'relative',
13
+ overflow: 'hidden',
14
+ width: '100%',
15
+ });
16
+
17
+ const carouselContent = style({
18
+ width: '100%',
19
+ position: 'relative',
20
+ });
21
+
22
+ const carouselSlide = style({
23
+ display: 'flex',
24
+ position: 'relative',
25
+ transition: 'transform 0.3s ease-in-out',
26
+ willChange: 'transform',
27
+ });
28
+
29
+ const carouselItem = style({
30
+ width: '100%',
31
+ display: 'flex',
32
+ position: 'relative',
33
+ alignItems: 'stretch',
34
+ flexShrink: 0,
35
+ });
36
+
37
+ const carouselNav = style({
38
+ position: 'absolute',
39
+ bottom: 0,
40
+ left: 0,
41
+ right: 0,
42
+ zIndex: 30,
43
+ width: '100%',
44
+ maxWidth: themeContract.maxWidth,
45
+ display: 'flex',
46
+ justifyContent: 'flex-end',
47
+ pointerEvents: 'none',
48
+ gap: themeContract.space.sm,
49
+ padding: themeContract.space.md,
50
+ });
51
+
52
+ const carouselNavButton = style({
53
+ border: 'none',
54
+ borderRadius: themeContract.radii.full,
55
+ backgroundColor: themeContract.colors.background,
56
+ color: themeContract.colors.text,
57
+ padding: themeContract.space.sm,
58
+ cursor: 'pointer',
59
+ pointerEvents: 'auto',
60
+ transition: 'all 0.3s ease-in-out',
61
+ boxShadow: themeContract.shadows.md,
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ justifyContent: 'center',
65
+ width: '48px',
66
+ height: '48px',
67
+
68
+ // ':hover': {
69
+ // transform: 'scale(1.1)',
70
+ // backgroundColor: themeContract.colors.primary,
71
+ // color: themeContract.colors.background,
72
+ // },
73
+
74
+ // ':focus': {
75
+ // outline: '2px solid',
76
+ // outlineColor: themeContract.colors.primary,
77
+ // outlineOffset: '2px',
78
+ // },
79
+
80
+ // ':disabled': {
81
+ // opacity: '0.5',
82
+ // cursor: 'not-allowed',
83
+ // transform: 'none',
84
+ // },
85
+ // selectors: {
86
+ // ':disabled:hover': {
87
+ // transform: 'none',
88
+ // backgroundColor: themeContract.colors.background,
89
+ // color: themeContract.colors.text,
90
+ // },
91
+ // },
92
+ });
93
+
94
+ const carouselBullets = style({
95
+ display: 'flex',
96
+ alignItems: 'center',
97
+ justifyContent: 'center',
98
+ gap: themeContract.space.md,
99
+ marginTop: themeContract.space.lg,
100
+
101
+ '@media': {
102
+ [queries.lg]: {
103
+ marginTop: themeContract.space.xl,
104
+ },
105
+ },
106
+ });
107
+
108
+ const carouselBullet = style({
109
+ width: '12px',
110
+ height: '12px',
111
+ borderRadius: themeContract.radii.full,
112
+ backgroundColor: themeContract.colors.border,
113
+ cursor: 'pointer',
114
+ transition: 'all 0.3s ease-in-out',
115
+ border: 'none',
116
+
117
+ ':hover': {
118
+ transform: 'scale(1.2)',
119
+ backgroundColor: themeContract.colors.primary,
120
+ },
121
+
122
+ ':focus': {
123
+ outline: '2px solid',
124
+ outlineColor: themeContract.colors.primary,
125
+ outlineOffset: '2px',
126
+ },
127
+
128
+ '@media': {
129
+ [queries.md]: {
130
+ width: '16px',
131
+ height: '16px',
132
+ },
133
+ },
134
+ });
135
+
136
+ export const carouselRecipe = recipe({
137
+ base: carouselBase,
138
+
139
+ variants: {
140
+ fullWidth: {
141
+ true: {
142
+ width: '100vw',
143
+ marginLeft: `calc((100vw - ${themeContract.maxWidth}) / -2)`,
144
+ marginRight: `calc((100vw - ${themeContract.maxWidth}) / -2)`,
145
+
146
+ '@media': {
147
+ 'screen and (max-width: 1500px)': {
148
+ marginLeft: `calc(-1 * ${themeContract.space.md})`,
149
+ marginRight: `calc(-1 * ${themeContract.space.md})`,
150
+ },
151
+ [queries.md]: {
152
+ marginLeft: `calc(-1 * ${themeContract.space.lg})`,
153
+ marginRight: `calc(-1 * ${themeContract.space.lg})`,
154
+ },
155
+ [queries.lg]: {
156
+ marginLeft: `calc(-1 * ${themeContract.space.xl})`,
157
+ marginRight: `calc(-1 * ${themeContract.space.xl})`,
158
+ },
159
+ },
160
+ },
161
+ false: {
162
+ width: '100%',
163
+ },
164
+ },
165
+ },
166
+
167
+ defaultVariants: {
168
+ fullWidth: false,
169
+ },
170
+ });
171
+
172
+ const carouselBulletActive = style({
173
+ backgroundColor: themeContract.colors.primary,
174
+ pointerEvents: 'none',
175
+ opacity: 1,
176
+ });
177
+
178
+ export { carouselContent, carouselSlide, carouselItem, carouselNav, carouselNavButton, carouselBullets, carouselBullet, carouselBulletActive };
179
+
180
+ export type CarouselVariants = RecipeVariants<typeof carouselRecipe>;