@latte-macchiat-io/latte-vanilla-components 0.0.182 → 0.0.184
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
CHANGED
package/src/index.ts
CHANGED
@@ -89,7 +89,8 @@ export { ToRemove } from './components/ToRemove/ToRemove';
|
|
89
89
|
// Theme utilities
|
90
90
|
export { createDarkTheme, createLightTheme, type ThemeOverrides } from './utils/theme';
|
91
91
|
export { createCustomLightTheme, createCustomDarkTheme, type ThemeOverrides as CustomThemeOverrides } from './utils/createCustomTheme';
|
92
|
-
export { createScopedTheme } from './utils/themeOverrides
|
92
|
+
export { createScopedTheme } from './utils/themeOverrides';
|
93
|
+
export { quickTheme, createQuickTheme } from './utils/quickTheme';
|
93
94
|
// Theme contract and values
|
94
95
|
export { themeContract } from './theme/contract.css';
|
95
96
|
export { baseLightTheme, baseDarkTheme } from './theme/baseThemeValues';
|
@@ -97,6 +98,7 @@ export { baseLightTheme, baseDarkTheme } from './theme/baseThemeValues';
|
|
97
98
|
// Pre-built themes (these actually generate CSS variables)
|
98
99
|
export { lightTheme } from './themes/light.css';
|
99
100
|
export { darkTheme } from './themes/dark.css';
|
101
|
+
export { defaultTheme } from './themes/default.css';
|
100
102
|
|
101
103
|
// Theme utilities
|
102
104
|
export { createThemeOverride, getThemeContract, getThemeValues, toggleTheme, setTheme, getCurrentTheme, type ThemeValues } from './theme/utils';
|
package/src/themes/dark.css.ts
CHANGED
@@ -8,7 +8,7 @@ export const darkTheme = createGlobalTheme('html[data-theme="dark"]', themeContr
|
|
8
8
|
space: baseDarkTheme.space,
|
9
9
|
radii: baseDarkTheme.radii,
|
10
10
|
fonts: baseDarkTheme.fonts,
|
11
|
-
maxWidth:
|
11
|
+
maxWidth: baseDarkTheme.maxWidth,
|
12
12
|
fontSizes: baseDarkTheme.fontSizes,
|
13
13
|
fontWeights: baseDarkTheme.fontWeights,
|
14
14
|
lineHeights: baseDarkTheme.lineHeights,
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { createGlobalTheme } from '@vanilla-extract/css';
|
2
|
+
import { themeContract } from '../theme/contract.css';
|
3
|
+
import { baseLightTheme } from '../theme/baseThemeValues';
|
4
|
+
|
5
|
+
// Create a default theme for quick usage and RAD (Rapid Application Development)
|
6
|
+
// This provides a ready-to-use theme without any customization needed
|
7
|
+
export const defaultTheme = 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
|
+
});
|
package/src/themes/light.css.ts
CHANGED
@@ -8,7 +8,7 @@ export const lightTheme = createGlobalTheme(':root', themeContract, {
|
|
8
8
|
space: baseLightTheme.space,
|
9
9
|
radii: baseLightTheme.radii,
|
10
10
|
fonts: baseLightTheme.fonts,
|
11
|
-
maxWidth:
|
11
|
+
maxWidth: baseLightTheme.maxWidth,
|
12
12
|
fontSizes: baseLightTheme.fontSizes,
|
13
13
|
fontWeights: baseLightTheme.fontWeights,
|
14
14
|
lineHeights: baseLightTheme.lineHeights,
|
@@ -0,0 +1,38 @@
|
|
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
|
+
};
|
File without changes
|