@latte-macchiat-io/latte-vanilla-components 0.0.187 → 0.0.188
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/package.json +2 -1
- package/src/components/Actions/Actions.css.ts +1 -1
- package/src/components/Button/Button.css.ts +1 -1
- package/src/components/Button/stories.tsx +9 -17
- package/src/components/Carousel/Carousel.css.ts +1 -1
- package/src/components/Columns/Columns.css.ts +1 -1
- package/src/components/ConsentCookie/ConsentCookie.css.ts +1 -1
- package/src/components/Footer/Footer.css.ts +1 -1
- package/src/components/Form/Form.css.ts +1 -1
- package/src/components/Form/Row/Row.css.ts +1 -1
- package/src/components/Form/TextField/Input/Input.css.ts +1 -1
- package/src/components/Form/TextField/Label/Label.css.ts +1 -1
- package/src/components/Form/TextField/TextField.css.ts +1 -1
- package/src/components/Form/TextField/Textarea/Textarea.css.ts +1 -1
- package/src/components/Header/Header.css.ts +1 -1
- package/src/components/Header/HeaderOverlay/index.tsx +1 -1
- package/src/components/Header/HeaderOverlay/styles.css.ts +7 -7
- package/src/components/Header/ToggleNav/index.tsx +2 -5
- package/src/components/Icon/Icon.css.ts +0 -1
- package/src/components/KeyNumber/KeyNumber.css.ts +1 -1
- package/src/components/LanguageSwitcher/LanguageSwitcher.css.ts +1 -1
- package/src/components/Logo/Logo.css.ts +1 -1
- package/src/components/Main/Main.css.ts +1 -1
- package/src/components/Modal/Modal.css.ts +1 -1
- package/src/components/Modal/stories.tsx +54 -89
- package/src/components/Nav/Nav.css.ts +1 -1
- package/src/components/Nav/Nav.tsx +1 -0
- package/src/components/NavLegal/NavLegal.css.ts +1 -1
- package/src/components/NavSocial/NavSocial.css.ts +1 -1
- package/src/components/Section/Section.css.ts +1 -1
- package/src/components/Section/stories.tsx +60 -61
- package/src/components/Video/Video.css.ts +1 -1
- package/src/components/VideoFullWidth/VideoFullWidth.css.ts +1 -1
- package/src/index.ts +9 -22
- package/src/styles/sprinkles.css.ts +1 -1
- package/src/themes/createTheme.css.ts +65 -0
- package/src/themes/dark.css.ts +4 -3
- package/src/themes/light.css.ts +3 -3
- package/src/types/withClassName.ts +1 -0
- package/src/assets/styles/default-theme.ts +0 -312
- package/src/assets/styles/mediaqueries.tsx +0 -24
- package/src/components/ToRemove/ToRemove.tsx +0 -3
- package/src/theme/index.ts +0 -6
- package/src/theme/utils.ts +0 -76
- package/src/types/theme.ts +0 -295
- package/src/utils/quickTheme.ts +0 -38
- package/src/utils/theme.ts +0 -131
- /package/src/{theme → themes}/baseThemeValues.ts +0 -0
- /package/src/{theme → themes}/contract.css.ts +0 -0
package/src/utils/quickTheme.ts
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import { createGlobalTheme } from '@vanilla-extract/css';
|
2
|
-
import { themeContract } from '../theme/contract.css';
|
3
|
-
import { baseLightTheme } from '../theme/baseThemeValues';
|
4
|
-
|
5
|
-
// Quick theme utility for RAD (Rapid Application Development)
|
6
|
-
// Just import this to get a working theme instantly
|
7
|
-
export const quickTheme = createGlobalTheme(':root', themeContract, {
|
8
|
-
colors: baseLightTheme.colors,
|
9
|
-
space: baseLightTheme.space,
|
10
|
-
radii: baseLightTheme.radii,
|
11
|
-
fonts: baseLightTheme.fonts,
|
12
|
-
maxWidth: baseLightTheme.maxWidth,
|
13
|
-
fontSizes: baseLightTheme.fontSizes,
|
14
|
-
fontWeights: baseLightTheme.fontWeights,
|
15
|
-
lineHeights: baseLightTheme.lineHeights,
|
16
|
-
shadows: baseLightTheme.shadows,
|
17
|
-
section: baseLightTheme.section,
|
18
|
-
header: baseLightTheme.header,
|
19
|
-
footer: baseLightTheme.footer,
|
20
|
-
});
|
21
|
-
|
22
|
-
// Helper function to create quick override themes
|
23
|
-
export const createQuickTheme = (overrides: Partial<typeof baseLightTheme> = {}) => {
|
24
|
-
return createGlobalTheme(':root', themeContract, {
|
25
|
-
colors: { ...baseLightTheme.colors, ...overrides.colors },
|
26
|
-
space: { ...baseLightTheme.space, ...overrides.space },
|
27
|
-
radii: { ...baseLightTheme.radii, ...overrides.radii },
|
28
|
-
fonts: { ...baseLightTheme.fonts, ...overrides.fonts },
|
29
|
-
maxWidth: overrides.maxWidth || baseLightTheme.maxWidth,
|
30
|
-
fontSizes: { ...baseLightTheme.fontSizes, ...overrides.fontSizes },
|
31
|
-
fontWeights: { ...baseLightTheme.fontWeights, ...overrides.fontWeights },
|
32
|
-
lineHeights: { ...baseLightTheme.lineHeights, ...overrides.lineHeights },
|
33
|
-
shadows: { ...baseLightTheme.shadows, ...overrides.shadows },
|
34
|
-
section: { ...baseLightTheme.section, ...overrides.section },
|
35
|
-
header: { ...baseLightTheme.header, ...overrides.header },
|
36
|
-
footer: { ...baseLightTheme.footer, ...overrides.footer },
|
37
|
-
});
|
38
|
-
};
|
package/src/utils/theme.ts
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
import { createGlobalTheme } from '@vanilla-extract/css';
|
2
|
-
import { baseDarkTheme, baseLightTheme } from '../theme/baseThemeValues';
|
3
|
-
import { themeContract } from '../theme/contract.css';
|
4
|
-
|
5
|
-
// Type for partial theme overrides
|
6
|
-
export type ThemeOverrides = {
|
7
|
-
colors?: Partial<typeof baseLightTheme.colors>;
|
8
|
-
space?: Partial<typeof baseLightTheme.space>;
|
9
|
-
radii?: Partial<typeof baseLightTheme.radii>;
|
10
|
-
fonts?: Partial<typeof baseLightTheme.fonts>;
|
11
|
-
maxWidth?: Partial<typeof baseLightTheme.maxWidth>;
|
12
|
-
fontSizes?: Partial<typeof baseLightTheme.fontSizes>;
|
13
|
-
fontWeights?: Partial<typeof baseLightTheme.fontSizes>;
|
14
|
-
lineHeights?: Partial<typeof baseLightTheme.fontSizes>;
|
15
|
-
shadows?: Partial<typeof baseLightTheme.fontSizes>;
|
16
|
-
section?: Partial<typeof baseLightTheme.fontSizes>;
|
17
|
-
header?: Partial<typeof baseLightTheme.fontSizes>;
|
18
|
-
footer?: Partial<typeof baseLightTheme.fontSizes>;
|
19
|
-
};
|
20
|
-
|
21
|
-
// Utility to create a theme with partial overrides over light theme base
|
22
|
-
const createAppTheme = (selector: string, overrides: ThemeOverrides = {}) => {
|
23
|
-
return createGlobalTheme(selector, themeContract, {
|
24
|
-
colors: {
|
25
|
-
...baseLightTheme.colors,
|
26
|
-
...overrides.colors,
|
27
|
-
},
|
28
|
-
space: {
|
29
|
-
...baseLightTheme.space,
|
30
|
-
...overrides.space,
|
31
|
-
},
|
32
|
-
radii: {
|
33
|
-
...baseLightTheme.radii,
|
34
|
-
...overrides.radii,
|
35
|
-
},
|
36
|
-
fonts: {
|
37
|
-
...baseLightTheme.fonts,
|
38
|
-
...overrides.fonts,
|
39
|
-
},
|
40
|
-
maxWidth: `${baseLightTheme.maxWidth || overrides.maxWidth}`,
|
41
|
-
fontSizes: {
|
42
|
-
...baseLightTheme.fontSizes,
|
43
|
-
...overrides.fontSizes,
|
44
|
-
},
|
45
|
-
fontWeights: {
|
46
|
-
...baseLightTheme.fontWeights,
|
47
|
-
...overrides.fontWeights,
|
48
|
-
},
|
49
|
-
lineHeights: {
|
50
|
-
...baseLightTheme.lineHeights,
|
51
|
-
...overrides.lineHeights,
|
52
|
-
},
|
53
|
-
shadows: {
|
54
|
-
...baseLightTheme.shadows,
|
55
|
-
...overrides.shadows,
|
56
|
-
},
|
57
|
-
section: {
|
58
|
-
...baseLightTheme.section,
|
59
|
-
...overrides.section,
|
60
|
-
},
|
61
|
-
header: {
|
62
|
-
...baseLightTheme.header,
|
63
|
-
...overrides.header,
|
64
|
-
},
|
65
|
-
footer: {
|
66
|
-
...baseLightTheme.footer,
|
67
|
-
...overrides.footer,
|
68
|
-
},
|
69
|
-
});
|
70
|
-
};
|
71
|
-
|
72
|
-
// Utility to create a theme with partial overrides over dark theme base
|
73
|
-
const createAppDarkTheme = (selector: string, overrides: ThemeOverrides = {}) => {
|
74
|
-
return createGlobalTheme(selector, themeContract, {
|
75
|
-
colors: {
|
76
|
-
...baseDarkTheme.colors,
|
77
|
-
...overrides.colors,
|
78
|
-
},
|
79
|
-
space: {
|
80
|
-
...baseDarkTheme.space,
|
81
|
-
...overrides.space,
|
82
|
-
},
|
83
|
-
radii: {
|
84
|
-
...baseDarkTheme.radii,
|
85
|
-
...overrides.radii,
|
86
|
-
},
|
87
|
-
fonts: {
|
88
|
-
...baseDarkTheme.fonts,
|
89
|
-
...overrides.fonts,
|
90
|
-
},
|
91
|
-
maxWidth: overrides.maxWidth || `${baseDarkTheme.maxWidth}px`,
|
92
|
-
fontSizes: {
|
93
|
-
...baseDarkTheme.fontSizes,
|
94
|
-
...overrides.fontSizes,
|
95
|
-
},
|
96
|
-
fontWeights: {
|
97
|
-
...baseDarkTheme.fontWeights,
|
98
|
-
...overrides.fontWeights,
|
99
|
-
},
|
100
|
-
lineHeights: {
|
101
|
-
...baseDarkTheme.lineHeights,
|
102
|
-
...overrides.lineHeights,
|
103
|
-
},
|
104
|
-
shadows: {
|
105
|
-
...baseDarkTheme.shadows,
|
106
|
-
...overrides.shadows,
|
107
|
-
},
|
108
|
-
section: {
|
109
|
-
...baseDarkTheme.section,
|
110
|
-
...overrides.section,
|
111
|
-
},
|
112
|
-
header: {
|
113
|
-
...baseDarkTheme.header,
|
114
|
-
...overrides.header,
|
115
|
-
},
|
116
|
-
footer: {
|
117
|
-
...baseDarkTheme.footer,
|
118
|
-
...overrides.footer,
|
119
|
-
},
|
120
|
-
});
|
121
|
-
};
|
122
|
-
|
123
|
-
// Convenience function for light theme (extends base light theme)
|
124
|
-
export const createLightTheme = (overrides: ThemeOverrides = {}) => {
|
125
|
-
return createAppTheme('html', overrides);
|
126
|
-
};
|
127
|
-
|
128
|
-
// Convenience function for dark theme (extends base dark theme)
|
129
|
-
export const createDarkTheme = (overrides: ThemeOverrides = {}) => {
|
130
|
-
return createAppDarkTheme('html[data-theme="dark"]', overrides);
|
131
|
-
};
|
File without changes
|
File without changes
|