@latte-macchiat-io/latte-vanilla-components 0.0.253 → 0.0.255

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.253",
3
+ "version": "0.0.255",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -64,8 +64,8 @@ export const headerOverlayRecipe = recipe(
64
64
  inset: 0,
65
65
  zIndex: 25,
66
66
  position: 'fixed',
67
- backgroundColor: 'rgba(0,0,0,0.6)',
68
- transition: 'opacity 0.3s ease-in-out, visibility 0.3s ease-in-out',
67
+ backgroundColor: themeContract.header.overlayBackgroundColor,
68
+ transition: themeContract.header.overlayBackgroundTransition,
69
69
  },
70
70
 
71
71
  variants: {
@@ -2,6 +2,8 @@ const themeHeaderBase = {
2
2
  header: {
3
3
  isFixed: 'true',
4
4
  fontSize: '1.2em',
5
+ overlayBackgroundTransition: 'opacity 0.3s ease-in-out, visibility 0.3s ease-in-out',
6
+
5
7
  height: {
6
8
  mobile: '15px',
7
9
  sm: '15px',
@@ -41,6 +43,7 @@ export const themeHeaderLight = {
41
43
  header: {
42
44
  ...themeHeaderBase.header,
43
45
  backgroundColor: '#FF7377',
46
+ overlayBackgroundColor: 'rgba(0,0,0,0.6)',
44
47
  },
45
48
  };
46
49
 
@@ -48,5 +51,6 @@ export const themeHeaderDark = {
48
51
  header: {
49
52
  ...themeHeaderBase.header,
50
53
  backgroundColor: '#FF7377',
54
+ overlayBackgroundColor: 'rgba(0,0,0,0.6)',
51
55
  },
52
56
  };
@@ -69,16 +69,8 @@ export const sectionRecipe = recipe(
69
69
  },
70
70
  },
71
71
  isHeaderFixed: {
72
- true: {
73
- '@media': {
74
- ...generateResponsiveMedia({
75
- minHeight: calcResponsiveSubtract('100vh', themeContract.header.height),
76
- }),
77
- },
78
- },
79
- false: {
80
- minHeight: '100vh',
81
- },
72
+ true: {},
73
+ false: {},
82
74
  },
83
75
  withPaddingTop: {
84
76
  true: {
@@ -102,6 +94,19 @@ export const sectionRecipe = recipe(
102
94
  },
103
95
  },
104
96
 
97
+ compoundVariants: [
98
+ {
99
+ variants: { isFullHeight: true, isHeaderFixed: true },
100
+ style: {
101
+ '@media': {
102
+ ...generateResponsiveMedia({
103
+ minHeight: calcResponsiveSubtract('100vh', themeContract.header.height),
104
+ }),
105
+ },
106
+ },
107
+ },
108
+ ],
109
+
105
110
  defaultVariants: {
106
111
  align: 'left',
107
112
  isDark: false,
@@ -152,6 +152,8 @@ export const themeContract = createGlobalThemeContract({
152
152
  isFixed: 'latte-header-isFixed',
153
153
  fontSize: 'latte-header-fontSize',
154
154
  backgroundColor: 'latte-header-backgroundColor',
155
+ overlayBackgroundColor: 'latte-header-overlayBackgroundColor',
156
+ overlayBackgroundTransition: 'latte-header-overlayBackgroundTransition',
155
157
  height: {
156
158
  mobile: 'latte-header-height-mobile',
157
159
  sm: 'latte-header-height-sm',