@latte-macchiat-io/latte-vanilla-components 0.0.183 → 0.0.185

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latte-macchiat-io/latte-vanilla-components",
3
- "version": "0.0.183",
3
+ "version": "0.0.185",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/index.ts CHANGED
@@ -90,6 +90,7 @@ export { ToRemove } from './components/ToRemove/ToRemove';
90
90
  export { createDarkTheme, createLightTheme, type ThemeOverrides } from './utils/theme';
91
91
  export { createCustomLightTheme, createCustomDarkTheme, type ThemeOverrides as CustomThemeOverrides } from './utils/createCustomTheme';
92
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';
@@ -4,80 +4,80 @@ import { createGlobalThemeContract } from '@vanilla-extract/css';
4
4
  // This enables predictable CSS variable names for external consumption and runtime overrides
5
5
  export const themeContract = createGlobalThemeContract({
6
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,
7
+ primary: 'latte-colors-primary',
8
+ secondary: 'latte-colors-secondary',
9
+ accent: 'latte-colors-accent',
10
+ background: 'latte-colors-background',
11
+ surface: 'latte-colors-surface',
12
+ text: 'latte-colors-text',
13
+ textSecondary: 'latte-colors-textSecondary',
14
+ textLight: 'latte-colors-textLight',
15
+ border: 'latte-colors-border',
16
+ error: 'latte-colors-error',
17
+ warning: 'latte-colors-warning',
18
+ success: 'latte-colors-success',
19
+ info: 'latte-colors-info',
20
20
  },
21
21
  space: {
22
- none: null,
23
- xs: null,
24
- sm: null,
25
- md: null,
26
- lg: null,
27
- xl: null,
28
- '2xl': null,
22
+ none: 'latte-space-none',
23
+ xs: 'latte-space-xs',
24
+ sm: 'latte-space-sm',
25
+ md: 'latte-space-md',
26
+ lg: 'latte-space-lg',
27
+ xl: 'latte-space-xl',
28
+ '2xl': 'latte-space-2xl',
29
29
  },
30
30
  radii: {
31
- none: null,
32
- sm: null,
33
- md: null,
34
- lg: null,
35
- xl: null,
36
- full: null,
31
+ none: 'latte-radii-none',
32
+ sm: 'latte-radii-sm',
33
+ md: 'latte-radii-md',
34
+ lg: 'latte-radii-lg',
35
+ xl: 'latte-radii-xl',
36
+ full: 'latte-radii-full',
37
37
  },
38
38
  fonts: {
39
- body: null,
40
- heading: null,
41
- mono: null,
39
+ body: 'latte-fonts-body',
40
+ heading: 'latte-fonts-heading',
41
+ mono: 'latte-fonts-mono',
42
42
  },
43
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,
44
+ xs: 'latte-fontSizes-xs',
45
+ sm: 'latte-fontSizes-sm',
46
+ md: 'latte-fontSizes-md',
47
+ lg: 'latte-fontSizes-lg',
48
+ xl: 'latte-fontSizes-xl',
49
+ '2xl': 'latte-fontSizes-2xl',
50
+ '3xl': 'latte-fontSizes-3xl',
51
+ '4xl': 'latte-fontSizes-4xl',
52
52
  },
53
53
  fontWeights: {
54
- light: null,
55
- normal: null,
56
- medium: null,
57
- semibold: null,
58
- bold: null,
54
+ light: 'latte-fontWeights-light',
55
+ normal: 'latte-fontWeights-normal',
56
+ medium: 'latte-fontWeights-medium',
57
+ semibold: 'latte-fontWeights-semibold',
58
+ bold: 'latte-fontWeights-bold',
59
59
  },
60
60
  lineHeights: {
61
- tight: null,
62
- normal: null,
63
- relaxed: null,
61
+ tight: 'latte-lineHeights-tight',
62
+ normal: 'latte-lineHeights-normal',
63
+ relaxed: 'latte-lineHeights-relaxed',
64
64
  },
65
65
  shadows: {
66
- none: null,
67
- sm: null,
68
- md: null,
69
- lg: null,
70
- xl: null,
66
+ none: 'latte-shadows-none',
67
+ sm: 'latte-shadows-sm',
68
+ md: 'latte-shadows-md',
69
+ lg: 'latte-shadows-lg',
70
+ xl: 'latte-shadows-xl',
71
71
  },
72
- maxWidth: null,
72
+ maxWidth: 'latte-maxWidth',
73
73
  section: {
74
- paddingTop: null,
75
- paddingBottom: null,
74
+ paddingTop: 'latte-section-paddingTop',
75
+ paddingBottom: 'latte-section-paddingBottom',
76
76
  },
77
77
  header: {
78
- height: null,
78
+ height: 'latte-header-height',
79
79
  },
80
80
  footer: {
81
- height: null,
81
+ height: 'latte-footer-height',
82
82
  },
83
- }, (value) => `latte-${value}`);
83
+ });
@@ -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: `${baseDarkTheme.maxWidth}px`,
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
+ });
@@ -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: `${baseLightTheme.maxWidth}px`,
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
+ };