@latte-macchiat-io/latte-vanilla-components 0.0.171 → 0.0.173

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.
@@ -0,0 +1 @@
1
+ export declare const ToRemove: () => import("react").JSX.Element;
@@ -51,4 +51,5 @@ export { Input, type InputProps, type InputType as InputFieldType } from './comp
51
51
  export { type InputVariants } from './components/Form/TextField/Input/Input.css';
52
52
  export { Textarea, type TextareaProps } from './components/Form/TextField/Textarea/Textarea';
53
53
  export { type TextareaVariants } from './components/Form/TextField/Textarea/Textarea.css';
54
- export { createDarkTheme, createLightTheme, type ThemeOverrides } from './utils/theme';
54
+ export { ToRemove } from './components/ToRemove/ToRemove';
55
+ export { createDarkTheme, createLightTheme, type ThemeOverrides } from './utils/theme.css';
@@ -0,0 +1,173 @@
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
+ };
@@ -0,0 +1,129 @@
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latte-macchiat-io/latte-vanilla-components",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
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",
@@ -1,7 +1,7 @@
1
1
  import { style } from '@vanilla-extract/css';
2
2
  import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
3
- import { queries } from '../../styles/mediaqueries';
4
3
  import { themeContract } from '../../theme';
4
+ import { queries } from '../../styles/mediaqueries';
5
5
 
6
6
  const actionsBase = style({
7
7
  display: 'flex',
@@ -0,0 +1,129 @@
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
+ };
@@ -1,9 +0,0 @@
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);
@@ -1,17 +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?: Partial<typeof baseLightTheme.maxWidth>;
8
- fontSizes?: Partial<typeof baseLightTheme.fontSizes>;
9
- fontWeights?: Partial<typeof baseLightTheme.fontSizes>;
10
- lineHeights?: Partial<typeof baseLightTheme.fontSizes>;
11
- shadows?: Partial<typeof baseLightTheme.fontSizes>;
12
- section?: Partial<typeof baseLightTheme.fontSizes>;
13
- header?: Partial<typeof baseLightTheme.fontSizes>;
14
- footer?: Partial<typeof baseLightTheme.fontSizes>;
15
- };
16
- export declare const createLightTheme: (overrides?: ThemeOverrides) => void;
17
- export declare const createDarkTheme: (overrides?: ThemeOverrides) => void;
@@ -1,9 +0,0 @@
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);