@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.
- package/package.json +12 -23
- package/src/assets/styles/default-theme.ts +312 -0
- package/src/components/Button/stories.ts +127 -0
- package/src/components/Columns/stories.ts +35 -0
- package/src/components/Icon/path.ts +36 -0
- package/src/components/Icon/stories.ts +29 -0
- package/src/components/Main/stories.ts +33 -0
- package/src/components/Section/stories.ts +64 -0
- package/{dist/types/index.d.ts → src/index.ts} +38 -0
- package/src/styles/mediaqueries.ts +17 -0
- package/src/theme/baseThemeValues.ts +160 -0
- package/src/theme/index.ts +6 -0
- package/src/theme/utils.ts +76 -0
- package/src/types/theme.ts +295 -0
- package/src/types/withClassName.ts +3 -0
- package/src/utils/cookie.ts +24 -0
- package/src/utils/deep-merge-objects.ts +15 -0
- package/src/utils/use-breakpoint-key.ts +30 -0
- package/src/utils/use-window-size.ts +37 -0
- package/dist/components/Actions/Actions.css.ts +0 -113
- package/dist/components/Button/Button.css.ts +0 -119
- package/dist/components/Carousel/Carousel.css.ts +0 -179
- package/dist/components/Columns/Columns.css.ts +0 -185
- package/dist/components/ConsentCookie/ConsentCookie.css.ts +0 -167
- package/dist/components/Footer/Footer.css.ts +0 -108
- package/dist/components/Form/Form.css.ts +0 -64
- package/dist/components/Form/Row/Row.css.ts +0 -70
- package/dist/components/Form/TextField/Input/Input.css.ts +0 -106
- package/dist/components/Form/TextField/Label/Label.css.ts +0 -58
- package/dist/components/Form/TextField/TextField.css.ts +0 -139
- package/dist/components/Form/TextField/Textarea/Textarea.css.ts +0 -121
- package/dist/components/Header/Header.css.ts +0 -111
- package/dist/components/Header/HeaderOverlay/styles.css.ts +0 -33
- package/dist/components/Header/ToggleNav/styles.css.ts +0 -40
- package/dist/components/Icon/Icon.css.ts +0 -102
- package/dist/components/KeyNumber/KeyNumber.css.ts +0 -158
- package/dist/components/LanguageSwitcher/LanguageSwitcher.css.ts +0 -120
- package/dist/components/Logo/Logo.css.ts +0 -98
- package/dist/components/Main/Main.css.ts +0 -62
- package/dist/components/Modal/Modal.css.ts +0 -203
- package/dist/components/Nav/Nav.css.ts +0 -123
- package/dist/components/NavLegal/NavLegal.css.ts +0 -121
- package/dist/components/NavSocial/NavSocial.css.ts +0 -121
- package/dist/components/Section/Section.css.ts +0 -101
- package/dist/components/Video/Video.css.ts +0 -210
- package/dist/components/VideoFullWidth/VideoFullWidth.css.ts +0 -50
- package/dist/index.cjs.js +0 -2
- package/dist/index.es.js +0 -6813
- package/dist/styles/sprinkles.css.ts +0 -84
- package/dist/theme/contract.css.ts +0 -83
- package/dist/types/components/Actions/Actions.css.d.ts +0 -74
- package/dist/types/components/Actions/Actions.d.ts +0 -7
- package/dist/types/components/Actions/export.d.ts +0 -0
- package/dist/types/components/Actions/stories.d.ts +0 -0
- package/dist/types/components/Button/Button.css.d.ts +0 -65
- package/dist/types/components/Button/Button.d.ts +0 -8
- package/dist/types/components/Button/export.d.ts +0 -0
- package/dist/types/components/Button/stories.d.ts +0 -0
- package/dist/types/components/Carousel/Carousel.css.d.ts +0 -33
- package/dist/types/components/Carousel/Carousel.d.ts +0 -15
- package/dist/types/components/Carousel/export.d.ts +0 -0
- package/dist/types/components/Columns/Columns.css.d.ts +0 -104
- package/dist/types/components/Columns/Columns.d.ts +0 -8
- package/dist/types/components/Columns/export.d.ts +0 -0
- package/dist/types/components/Columns/stories.d.ts +0 -0
- package/dist/types/components/ConsentCookie/ConsentCookie.css.d.ts +0 -15
- package/dist/types/components/ConsentCookie/ConsentCookie.d.ts +0 -17
- package/dist/types/components/ConsentCookie/export.d.ts +0 -0
- package/dist/types/components/ConsentCookie/stories.d.ts +0 -0
- package/dist/types/components/Footer/Footer.css.d.ts +0 -50
- package/dist/types/components/Footer/Footer.d.ts +0 -7
- package/dist/types/components/Footer/export.d.ts +0 -0
- package/dist/types/components/Footer/stories.d.ts +0 -6
- package/dist/types/components/Form/Form.css.d.ts +0 -46
- package/dist/types/components/Form/Form.d.ts +0 -7
- package/dist/types/components/Form/Row/Row.css.d.ts +0 -51
- package/dist/types/components/Form/Row/Row.d.ts +0 -9
- package/dist/types/components/Form/Row/index.d.ts +0 -0
- package/dist/types/components/Form/Row/stories.d.ts +0 -0
- package/dist/types/components/Form/TextField/Input/Input.css.d.ts +0 -32
- package/dist/types/components/Form/TextField/Input/Input.d.ts +0 -10
- package/dist/types/components/Form/TextField/Input/export.d.ts +0 -0
- package/dist/types/components/Form/TextField/Label/Label.css.d.ts +0 -23
- package/dist/types/components/Form/TextField/Label/Label.d.ts +0 -9
- package/dist/types/components/Form/TextField/Label/export.d.ts +0 -0
- package/dist/types/components/Form/TextField/TextField.css.d.ts +0 -19
- package/dist/types/components/Form/TextField/TextField.d.ts +0 -21
- package/dist/types/components/Form/TextField/Textarea/Textarea.css.d.ts +0 -56
- package/dist/types/components/Form/TextField/Textarea/Textarea.d.ts +0 -8
- package/dist/types/components/Form/TextField/Textarea/export.d.ts +0 -0
- package/dist/types/components/Form/TextField/Textarea/stories.d.ts +0 -0
- package/dist/types/components/Form/TextField/export.d.ts +0 -0
- package/dist/types/components/Form/export.d.ts +0 -0
- package/dist/types/components/Header/Header.css.d.ts +0 -36
- package/dist/types/components/Header/Header.d.ts +0 -11
- package/dist/types/components/Header/HeaderOverlay/index.d.ts +0 -7
- package/dist/types/components/Header/HeaderOverlay/styles.css.d.ts +0 -5
- package/dist/types/components/Header/ToggleNav/index.d.ts +0 -9
- package/dist/types/components/Header/ToggleNav/styles.css.d.ts +0 -5
- package/dist/types/components/Header/export.d.ts +0 -0
- package/dist/types/components/Header/stories.d.ts +0 -6
- package/dist/types/components/Icon/Icon.css.d.ts +0 -45
- package/dist/types/components/Icon/Icon.d.ts +0 -12
- package/dist/types/components/Icon/export.d.ts +0 -0
- package/dist/types/components/Icon/path.d.ts +0 -19
- package/dist/types/components/Icon/stories.d.ts +0 -0
- package/dist/types/components/KeyNumber/KeyNumber.css.d.ts +0 -40
- package/dist/types/components/KeyNumber/KeyNumber.d.ts +0 -15
- package/dist/types/components/KeyNumber/export.d.ts +0 -0
- package/dist/types/components/LanguageSwitcher/LanguageSwitcher.css.d.ts +0 -18
- package/dist/types/components/LanguageSwitcher/LanguageSwitcher.d.ts +0 -16
- package/dist/types/components/LanguageSwitcher/export.d.ts +0 -0
- package/dist/types/components/Logo/Logo.css.d.ts +0 -54
- package/dist/types/components/Logo/Logo.d.ts +0 -8
- package/dist/types/components/Logo/export.d.ts +0 -0
- package/dist/types/components/Logo/stories.d.ts +0 -6
- package/dist/types/components/Main/Main.css.d.ts +0 -32
- package/dist/types/components/Main/Main.d.ts +0 -7
- package/dist/types/components/Main/export.d.ts +0 -0
- package/dist/types/components/Main/stories.d.ts +0 -0
- package/dist/types/components/Modal/Modal.css.d.ts +0 -82
- package/dist/types/components/Modal/Modal.d.ts +0 -15
- package/dist/types/components/Modal/export.d.ts +0 -0
- package/dist/types/components/Modal/types.d.ts +0 -5
- package/dist/types/components/Nav/Nav.css.d.ts +0 -52
- package/dist/types/components/Nav/Nav.d.ts +0 -7
- package/dist/types/components/Nav/export.d.ts +0 -0
- package/dist/types/components/Nav/stories.d.ts +0 -6
- package/dist/types/components/NavLegal/NavLegal.css.d.ts +0 -57
- package/dist/types/components/NavLegal/NavLegal.d.ts +0 -7
- package/dist/types/components/NavLegal/export.d.ts +0 -0
- package/dist/types/components/NavLegal/stories.d.ts +0 -6
- package/dist/types/components/NavLegal/types.d.ts +0 -1
- package/dist/types/components/NavSocial/NavSocial.css.d.ts +0 -30
- package/dist/types/components/NavSocial/NavSocial.d.ts +0 -15
- package/dist/types/components/NavSocial/export.d.ts +0 -0
- package/dist/types/components/NavSocial/stories.d.ts +0 -0
- package/dist/types/components/NavSocial/types.d.ts +0 -1
- package/dist/types/components/Section/Section.css.d.ts +0 -60
- package/dist/types/components/Section/Section.d.ts +0 -7
- package/dist/types/components/Section/export.d.ts +0 -0
- package/dist/types/components/Section/stories.d.ts +0 -0
- package/dist/types/components/ToRemove/ToRemove.d.ts +0 -1
- package/dist/types/components/Video/Video.css.d.ts +0 -43
- package/dist/types/components/Video/Video.d.ts +0 -17
- package/dist/types/components/Video/export.d.ts +0 -0
- package/dist/types/components/VideoFullWidth/VideoFullWidth.css.d.ts +0 -18
- package/dist/types/components/VideoFullWidth/VideoFullWidth.d.ts +0 -14
- package/dist/types/components/VideoFullWidth/export.d.ts +0 -0
- package/dist/types/utils/cookie.d.ts +0 -2
- package/dist/types/utils/deep-merge-objects.d.ts +0 -2
- package/dist/types/utils/theme.css.d.ts +0 -173
- package/dist/types/utils/use-breakpoint-key.d.ts +0 -1
- package/dist/types/utils/use-window-size.d.ts +0 -5
- package/dist/utils/theme.css.ts +0 -129
@@ -1,173 +0,0 @@
|
|
1
|
-
import { baseLightTheme } from '../theme/baseThemeValues';
|
2
|
-
export type ThemeOverrides = {
|
3
|
-
colors?: Partial<typeof baseLightTheme.colors>;
|
4
|
-
space?: Partial<typeof baseLightTheme.space>;
|
5
|
-
radii?: Partial<typeof baseLightTheme.radii>;
|
6
|
-
fonts?: Partial<typeof baseLightTheme.fonts>;
|
7
|
-
maxWidth?: string;
|
8
|
-
fontSizes?: Partial<typeof baseLightTheme.fontSizes>;
|
9
|
-
fontWeights?: Partial<typeof baseLightTheme.fontWeights>;
|
10
|
-
lineHeights?: Partial<typeof baseLightTheme.lineHeights>;
|
11
|
-
shadows?: Partial<typeof baseLightTheme.shadows>;
|
12
|
-
section?: Partial<typeof baseLightTheme.section>;
|
13
|
-
header?: Partial<typeof baseLightTheme.header>;
|
14
|
-
footer?: Partial<typeof baseLightTheme.footer>;
|
15
|
-
};
|
16
|
-
export declare const createLightTheme: (overrides?: ThemeOverrides) => {
|
17
|
-
colors: {
|
18
|
-
primary: string;
|
19
|
-
secondary: string;
|
20
|
-
accent: string;
|
21
|
-
background: string;
|
22
|
-
surface: string;
|
23
|
-
text: string;
|
24
|
-
textSecondary: string;
|
25
|
-
textLight: string;
|
26
|
-
border: string;
|
27
|
-
error: string;
|
28
|
-
warning: string;
|
29
|
-
success: string;
|
30
|
-
info: string;
|
31
|
-
};
|
32
|
-
space: {
|
33
|
-
none: string;
|
34
|
-
xs: string;
|
35
|
-
sm: string;
|
36
|
-
md: string;
|
37
|
-
lg: string;
|
38
|
-
xl: string;
|
39
|
-
'2xl': string;
|
40
|
-
};
|
41
|
-
radii: {
|
42
|
-
none: string;
|
43
|
-
sm: string;
|
44
|
-
md: string;
|
45
|
-
lg: string;
|
46
|
-
xl: string;
|
47
|
-
full: string;
|
48
|
-
};
|
49
|
-
fonts: {
|
50
|
-
body: string;
|
51
|
-
heading: string;
|
52
|
-
mono: string;
|
53
|
-
};
|
54
|
-
maxWidth: string;
|
55
|
-
fontSizes: {
|
56
|
-
xs: string;
|
57
|
-
sm: string;
|
58
|
-
md: string;
|
59
|
-
lg: string;
|
60
|
-
xl: string;
|
61
|
-
'2xl': string;
|
62
|
-
'3xl': string;
|
63
|
-
'4xl': string;
|
64
|
-
};
|
65
|
-
fontWeights: {
|
66
|
-
light: string;
|
67
|
-
normal: string;
|
68
|
-
medium: string;
|
69
|
-
semibold: string;
|
70
|
-
bold: string;
|
71
|
-
};
|
72
|
-
lineHeights: {
|
73
|
-
tight: string;
|
74
|
-
normal: string;
|
75
|
-
relaxed: string;
|
76
|
-
};
|
77
|
-
shadows: {
|
78
|
-
none: string;
|
79
|
-
sm: string;
|
80
|
-
md: string;
|
81
|
-
lg: string;
|
82
|
-
xl: string;
|
83
|
-
};
|
84
|
-
section: {
|
85
|
-
paddingTop: string;
|
86
|
-
paddingBottom: string;
|
87
|
-
};
|
88
|
-
header: {
|
89
|
-
height: string;
|
90
|
-
};
|
91
|
-
footer: {
|
92
|
-
height: string;
|
93
|
-
};
|
94
|
-
};
|
95
|
-
export declare const createDarkTheme: (overrides?: ThemeOverrides) => {
|
96
|
-
colors: {
|
97
|
-
primary: string;
|
98
|
-
secondary: string;
|
99
|
-
accent: string;
|
100
|
-
background: string;
|
101
|
-
surface: string;
|
102
|
-
text: string;
|
103
|
-
textSecondary: string;
|
104
|
-
textLight: string;
|
105
|
-
border: string;
|
106
|
-
error: string;
|
107
|
-
warning: string;
|
108
|
-
success: string;
|
109
|
-
info: string;
|
110
|
-
};
|
111
|
-
space: {
|
112
|
-
none: string;
|
113
|
-
xs: string;
|
114
|
-
sm: string;
|
115
|
-
md: string;
|
116
|
-
lg: string;
|
117
|
-
xl: string;
|
118
|
-
'2xl': string;
|
119
|
-
};
|
120
|
-
radii: {
|
121
|
-
none: string;
|
122
|
-
sm: string;
|
123
|
-
md: string;
|
124
|
-
lg: string;
|
125
|
-
xl: string;
|
126
|
-
full: string;
|
127
|
-
};
|
128
|
-
fonts: {
|
129
|
-
body: string;
|
130
|
-
heading: string;
|
131
|
-
mono: string;
|
132
|
-
};
|
133
|
-
maxWidth: string;
|
134
|
-
fontSizes: {
|
135
|
-
xs: string;
|
136
|
-
sm: string;
|
137
|
-
md: string;
|
138
|
-
lg: string;
|
139
|
-
xl: string;
|
140
|
-
'2xl': string;
|
141
|
-
'3xl': string;
|
142
|
-
'4xl': string;
|
143
|
-
};
|
144
|
-
fontWeights: {
|
145
|
-
light: string;
|
146
|
-
normal: string;
|
147
|
-
medium: string;
|
148
|
-
semibold: string;
|
149
|
-
bold: string;
|
150
|
-
};
|
151
|
-
lineHeights: {
|
152
|
-
tight: string;
|
153
|
-
normal: string;
|
154
|
-
relaxed: string;
|
155
|
-
};
|
156
|
-
shadows: {
|
157
|
-
none: string;
|
158
|
-
sm: string;
|
159
|
-
md: string;
|
160
|
-
lg: string;
|
161
|
-
xl: string;
|
162
|
-
};
|
163
|
-
section: {
|
164
|
-
paddingTop: string;
|
165
|
-
paddingBottom: string;
|
166
|
-
};
|
167
|
-
header: {
|
168
|
-
height: string;
|
169
|
-
};
|
170
|
-
footer: {
|
171
|
-
height: string;
|
172
|
-
};
|
173
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function useBreakpointKey(): number;
|
package/dist/utils/theme.css.ts
DELETED
@@ -1,129 +0,0 @@
|
|
1
|
-
import { baseDarkTheme, baseLightTheme } from '../theme/baseThemeValues';
|
2
|
-
|
3
|
-
// Type for partial theme overrides
|
4
|
-
export type ThemeOverrides = {
|
5
|
-
colors?: Partial<typeof baseLightTheme.colors>;
|
6
|
-
space?: Partial<typeof baseLightTheme.space>;
|
7
|
-
radii?: Partial<typeof baseLightTheme.radii>;
|
8
|
-
fonts?: Partial<typeof baseLightTheme.fonts>;
|
9
|
-
maxWidth?: string;
|
10
|
-
fontSizes?: Partial<typeof baseLightTheme.fontSizes>;
|
11
|
-
fontWeights?: Partial<typeof baseLightTheme.fontWeights>;
|
12
|
-
lineHeights?: Partial<typeof baseLightTheme.lineHeights>;
|
13
|
-
shadows?: Partial<typeof baseLightTheme.shadows>;
|
14
|
-
section?: Partial<typeof baseLightTheme.section>;
|
15
|
-
header?: Partial<typeof baseLightTheme.header>;
|
16
|
-
footer?: Partial<typeof baseLightTheme.footer>;
|
17
|
-
};
|
18
|
-
|
19
|
-
// Utility to create a theme object with partial overrides over light theme base
|
20
|
-
const createAppTheme = (overrides: ThemeOverrides = {}) => {
|
21
|
-
return {
|
22
|
-
colors: {
|
23
|
-
...baseLightTheme.colors,
|
24
|
-
...overrides.colors,
|
25
|
-
},
|
26
|
-
space: {
|
27
|
-
...baseLightTheme.space,
|
28
|
-
...overrides.space,
|
29
|
-
},
|
30
|
-
radii: {
|
31
|
-
...baseLightTheme.radii,
|
32
|
-
...overrides.radii,
|
33
|
-
},
|
34
|
-
fonts: {
|
35
|
-
...baseLightTheme.fonts,
|
36
|
-
...overrides.fonts,
|
37
|
-
},
|
38
|
-
maxWidth: overrides.maxWidth || `${baseLightTheme.maxWidth}px`,
|
39
|
-
fontSizes: {
|
40
|
-
...baseLightTheme.fontSizes,
|
41
|
-
...overrides.fontSizes,
|
42
|
-
},
|
43
|
-
fontWeights: {
|
44
|
-
...baseLightTheme.fontWeights,
|
45
|
-
...overrides.fontWeights,
|
46
|
-
},
|
47
|
-
lineHeights: {
|
48
|
-
...baseLightTheme.lineHeights,
|
49
|
-
...overrides.lineHeights,
|
50
|
-
},
|
51
|
-
shadows: {
|
52
|
-
...baseLightTheme.shadows,
|
53
|
-
...overrides.shadows,
|
54
|
-
},
|
55
|
-
section: {
|
56
|
-
...baseLightTheme.section,
|
57
|
-
...overrides.section,
|
58
|
-
},
|
59
|
-
header: {
|
60
|
-
...baseLightTheme.header,
|
61
|
-
...overrides.header,
|
62
|
-
},
|
63
|
-
footer: {
|
64
|
-
...baseLightTheme.footer,
|
65
|
-
...overrides.footer,
|
66
|
-
},
|
67
|
-
};
|
68
|
-
};
|
69
|
-
|
70
|
-
// Utility to create a theme object with partial overrides over dark theme base
|
71
|
-
const createAppDarkTheme = (overrides: ThemeOverrides = {}) => {
|
72
|
-
return {
|
73
|
-
colors: {
|
74
|
-
...baseDarkTheme.colors,
|
75
|
-
...overrides.colors,
|
76
|
-
},
|
77
|
-
space: {
|
78
|
-
...baseDarkTheme.space,
|
79
|
-
...overrides.space,
|
80
|
-
},
|
81
|
-
radii: {
|
82
|
-
...baseDarkTheme.radii,
|
83
|
-
...overrides.radii,
|
84
|
-
},
|
85
|
-
fonts: {
|
86
|
-
...baseDarkTheme.fonts,
|
87
|
-
...overrides.fonts,
|
88
|
-
},
|
89
|
-
maxWidth: overrides.maxWidth || `${baseDarkTheme.maxWidth}px`,
|
90
|
-
fontSizes: {
|
91
|
-
...baseDarkTheme.fontSizes,
|
92
|
-
...overrides.fontSizes,
|
93
|
-
},
|
94
|
-
fontWeights: {
|
95
|
-
...baseDarkTheme.fontWeights,
|
96
|
-
...overrides.fontWeights,
|
97
|
-
},
|
98
|
-
lineHeights: {
|
99
|
-
...baseDarkTheme.lineHeights,
|
100
|
-
...overrides.lineHeights,
|
101
|
-
},
|
102
|
-
shadows: {
|
103
|
-
...baseDarkTheme.shadows,
|
104
|
-
...overrides.shadows,
|
105
|
-
},
|
106
|
-
section: {
|
107
|
-
...baseDarkTheme.section,
|
108
|
-
...overrides.section,
|
109
|
-
},
|
110
|
-
header: {
|
111
|
-
...baseDarkTheme.header,
|
112
|
-
...overrides.header,
|
113
|
-
},
|
114
|
-
footer: {
|
115
|
-
...baseDarkTheme.footer,
|
116
|
-
...overrides.footer,
|
117
|
-
},
|
118
|
-
};
|
119
|
-
};
|
120
|
-
|
121
|
-
// Returns theme object for light theme - consuming app must call createGlobalTheme
|
122
|
-
export const createLightTheme = (overrides: ThemeOverrides = {}) => {
|
123
|
-
return createAppTheme(overrides);
|
124
|
-
};
|
125
|
-
|
126
|
-
// Returns theme object for dark theme - consuming app must call createGlobalTheme
|
127
|
-
export const createDarkTheme = (overrides: ThemeOverrides = {}) => {
|
128
|
-
return createAppDarkTheme(overrides);
|
129
|
-
};
|