@latte-macchiat-io/latte-vanilla-components 0.0.448 → 0.0.450
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
|
@@ -15,14 +15,14 @@ export type BoxProps = React.HTMLAttributes<HTMLDivElement> &
|
|
|
15
15
|
background?: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export const Box = ({ align, vAlign, children,
|
|
18
|
+
export const Box = ({ align, vAlign, children, variant, isLight, className, direction, isReversed, paddingTop }: BoxProps) => {
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
21
|
className={cn(
|
|
22
22
|
box({
|
|
23
23
|
align,
|
|
24
24
|
direction,
|
|
25
|
-
|
|
25
|
+
variant,
|
|
26
26
|
isReversed,
|
|
27
27
|
paddingTop,
|
|
28
28
|
}),
|
|
@@ -41,7 +41,7 @@ export const box = recipe({
|
|
|
41
41
|
base: [boxBase, boxAdjacent],
|
|
42
42
|
|
|
43
43
|
variants: {
|
|
44
|
-
|
|
44
|
+
variant: {
|
|
45
45
|
primary: {
|
|
46
46
|
backgroundColor: themeContract.section.variant.primary.backgroundColor,
|
|
47
47
|
},
|
|
@@ -105,7 +105,7 @@ export const box = recipe({
|
|
|
105
105
|
align: 'left',
|
|
106
106
|
paddingTop: 'small',
|
|
107
107
|
direction: 'column',
|
|
108
|
-
|
|
108
|
+
variant: 'primary',
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
111
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { themeActionsDark, themeActionsLight } from '../components/Actions/theme';
|
|
2
|
+
import { themeBoxDark, themeBoxLight } from '../components/Box/theme';
|
|
2
3
|
import { themeButtonDark, themeButtonLight } from '../components/Button/theme';
|
|
3
4
|
import { themeCarouselDark, themeCarouselLight } from '../components/Carousel/theme';
|
|
4
5
|
import { themeColumnsDark, themeColumnsLight } from '../components/Columns/theme';
|
|
@@ -151,6 +152,7 @@ export const baseLightTheme = {
|
|
|
151
152
|
|
|
152
153
|
...themeLogoLight,
|
|
153
154
|
...themeConsentCookieLight,
|
|
155
|
+
...themeBoxLight,
|
|
154
156
|
|
|
155
157
|
form: {
|
|
156
158
|
...themeFormLight.form,
|
|
@@ -290,6 +292,7 @@ export const baseDarkTheme = {
|
|
|
290
292
|
...themeLogoDark,
|
|
291
293
|
|
|
292
294
|
...themeConsentCookieDark,
|
|
295
|
+
...themeBoxDark,
|
|
293
296
|
|
|
294
297
|
form: {
|
|
295
298
|
...themeFormDark.form,
|
package/src/theme/createTheme.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type ThemeOverrides = {
|
|
|
34
34
|
carousel?: Partial<typeof baseLightTheme.carousel>;
|
|
35
35
|
form?: Partial<typeof baseLightTheme.form>;
|
|
36
36
|
logo?: Partial<typeof baseLightTheme.logo>;
|
|
37
|
+
box?: Partial<typeof baseLightTheme.box>;
|
|
37
38
|
consentCookie?: Partial<typeof baseLightTheme.consentCookie>;
|
|
38
39
|
};
|
|
39
40
|
|
|
@@ -70,6 +71,7 @@ const createAppTheme = (selector: string, overrides: ThemeOverrides = {}) => {
|
|
|
70
71
|
carousel: { ...baseLightTheme.carousel, ...overrides.carousel },
|
|
71
72
|
form: { ...baseLightTheme.form, ...overrides.form },
|
|
72
73
|
logo: { ...baseLightTheme.logo, ...overrides.logo },
|
|
74
|
+
box: { ...baseLightTheme.box, ...overrides.box },
|
|
73
75
|
consentCookie: { ...baseLightTheme.consentCookie, ...overrides.consentCookie },
|
|
74
76
|
});
|
|
75
77
|
};
|
|
@@ -107,6 +109,7 @@ const createAppDarkTheme = (selector: string, overrides: ThemeOverrides = {}) =>
|
|
|
107
109
|
carousel: { ...baseDarkTheme.carousel, ...overrides.carousel },
|
|
108
110
|
form: { ...baseDarkTheme.form, ...overrides.form },
|
|
109
111
|
logo: { ...baseDarkTheme.logo, ...overrides.logo },
|
|
112
|
+
box: { ...baseDarkTheme.box, ...overrides.box },
|
|
110
113
|
consentCookie: { ...baseDarkTheme.consentCookie, ...overrides.consentCookie },
|
|
111
114
|
});
|
|
112
115
|
};
|