@latte-macchiat-io/latte-vanilla-components 0.0.252 → 0.0.254
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,7 @@
|
|
1
1
|
import { clsx } from 'clsx';
|
2
2
|
|
3
3
|
import { sectionContent, sectionRecipe, type SectionVariants } from './styles.css';
|
4
|
+
import { themeContract } from '../../theme/contract.css';
|
4
5
|
|
5
6
|
export type SectionProps = React.HTMLAttributes<HTMLDivElement> &
|
6
7
|
SectionVariants & {
|
@@ -8,7 +9,9 @@ export type SectionProps = React.HTMLAttributes<HTMLDivElement> &
|
|
8
9
|
};
|
9
10
|
|
10
11
|
export const Section = ({ align, isDark, variant, isFullHeight, withPaddingTop, withPaddingBottom, className, children, style }: SectionProps) => (
|
11
|
-
<section
|
12
|
+
<section
|
13
|
+
style={style}
|
14
|
+
className={clsx(sectionRecipe({ align, isDark, variant, isFullHeight, withPaddingTop, withPaddingBottom, isHeaderFixed: true }), className)}>
|
12
15
|
<div className={sectionContent}>{children}</div>
|
13
16
|
</section>
|
14
17
|
);
|
@@ -69,16 +69,8 @@ export const sectionRecipe = recipe(
|
|
69
69
|
},
|
70
70
|
},
|
71
71
|
isHeaderFixed: {
|
72
|
-
true: {
|
73
|
-
|
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,11 +94,24 @@ 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,
|
108
113
|
isFullHeight: false,
|
109
|
-
isHeaderFixed:
|
114
|
+
isHeaderFixed: false,
|
110
115
|
withPaddingTop: true,
|
111
116
|
withPaddingBottom: true,
|
112
117
|
variant: 'transparent',
|