@latte-macchiat-io/latte-vanilla-components 0.0.449 → 0.0.451
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
|
}),
|
|
@@ -8,6 +8,8 @@ export const boxBase = style({
|
|
|
8
8
|
display: 'flex',
|
|
9
9
|
position: 'relative',
|
|
10
10
|
alignItems: 'stretch',
|
|
11
|
+
|
|
12
|
+
border: themeContract.box.border,
|
|
11
13
|
borderRadius: themeContract.box.borderRadius,
|
|
12
14
|
|
|
13
15
|
selectors: {
|
|
@@ -19,7 +21,7 @@ export const boxBase = style({
|
|
|
19
21
|
'@media': {
|
|
20
22
|
...generateResponsiveMedia({
|
|
21
23
|
gap: themeContract.box.gap,
|
|
22
|
-
paddingTop: themeContract.box.paddingTop,
|
|
24
|
+
paddingTop: themeContract.box.paddingTop.sm,
|
|
23
25
|
paddingLeft: themeContract.box.paddingLeft,
|
|
24
26
|
paddingRight: themeContract.box.paddingRight,
|
|
25
27
|
paddingBottom: themeContract.box.paddingBottom,
|
|
@@ -30,9 +32,9 @@ export const boxBase = style({
|
|
|
30
32
|
export const boxAdjacent = style({
|
|
31
33
|
selectors: {
|
|
32
34
|
[`${boxBase} + &`]: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
'@media': generateResponsiveMedia({
|
|
36
|
+
marginTop: themeContract.box.adjacent.marginTop,
|
|
37
|
+
}),
|
|
36
38
|
},
|
|
37
39
|
},
|
|
38
40
|
});
|
|
@@ -41,7 +43,7 @@ export const box = recipe({
|
|
|
41
43
|
base: [boxBase, boxAdjacent],
|
|
42
44
|
|
|
43
45
|
variants: {
|
|
44
|
-
|
|
46
|
+
variant: {
|
|
45
47
|
primary: {
|
|
46
48
|
backgroundColor: themeContract.section.variant.primary.backgroundColor,
|
|
47
49
|
},
|
|
@@ -89,14 +91,14 @@ export const box = recipe({
|
|
|
89
91
|
paddingTop: {
|
|
90
92
|
small: {},
|
|
91
93
|
medium: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
'@media': generateResponsiveMedia({
|
|
95
|
+
paddingTop: themeContract.box.paddingTop.md,
|
|
96
|
+
}),
|
|
95
97
|
},
|
|
96
98
|
large: {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
'@media': generateResponsiveMedia({
|
|
100
|
+
paddingTop: themeContract.box.paddingTop.lg,
|
|
101
|
+
}),
|
|
100
102
|
},
|
|
101
103
|
},
|
|
102
104
|
},
|
|
@@ -105,19 +107,10 @@ export const box = recipe({
|
|
|
105
107
|
align: 'left',
|
|
106
108
|
paddingTop: 'small',
|
|
107
109
|
direction: 'column',
|
|
108
|
-
|
|
110
|
+
variant: 'primary',
|
|
109
111
|
},
|
|
110
112
|
});
|
|
111
113
|
|
|
112
|
-
export const boxBackground = style({
|
|
113
|
-
top: 0,
|
|
114
|
-
left: 0,
|
|
115
|
-
right: 0,
|
|
116
|
-
bottom: 0,
|
|
117
|
-
zIndex: 0,
|
|
118
|
-
position: 'absolute',
|
|
119
|
-
});
|
|
120
|
-
|
|
121
114
|
export const boxContent = recipe({
|
|
122
115
|
base: [
|
|
123
116
|
{
|
|
@@ -149,31 +142,5 @@ export const boxContent = recipe({
|
|
|
149
142
|
},
|
|
150
143
|
});
|
|
151
144
|
|
|
152
|
-
export const boxVisual = style({
|
|
153
|
-
width: '100%',
|
|
154
|
-
height: '60vw',
|
|
155
|
-
display: 'flex',
|
|
156
|
-
position: 'relative',
|
|
157
|
-
|
|
158
|
-
'@media': {
|
|
159
|
-
[queries.md]: {
|
|
160
|
-
width: '45%',
|
|
161
|
-
height: 'auto',
|
|
162
|
-
minWidth: '40%',
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
export const boxVisualDefaultStyle = style({
|
|
168
|
-
margin: 'auto',
|
|
169
|
-
position: 'relative',
|
|
170
|
-
|
|
171
|
-
'@media': {
|
|
172
|
-
[queries.md]: {
|
|
173
|
-
height: '100%',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
|
|
178
145
|
export type BoxVariants = RecipeVariants<typeof box>;
|
|
179
146
|
export type BoxContentVariants = RecipeVariants<typeof boxContent>;
|
|
@@ -12,12 +12,9 @@ const themeBoxBase = {
|
|
|
12
12
|
'2xl': '50px',
|
|
13
13
|
},
|
|
14
14
|
paddingTop: {
|
|
15
|
-
mobile: '15px',
|
|
16
|
-
sm: '15px',
|
|
17
|
-
md: '30px',
|
|
18
|
-
lg: '30px',
|
|
19
|
-
xl: '50px',
|
|
20
|
-
'2xl': '50px',
|
|
15
|
+
sm: { mobile: '15px', sm: '15px', md: '30px', lg: '30px', xl: '50px', '2xl': '50px' },
|
|
16
|
+
md: { mobile: '15px', sm: '15px', md: '30px', lg: '30px', xl: '50px', '2xl': '50px' },
|
|
17
|
+
lg: { mobile: '15px', sm: '15px', md: '30px', lg: '30px', xl: '50px', '2xl': '50px' },
|
|
21
18
|
},
|
|
22
19
|
paddingLeft: {
|
|
23
20
|
mobile: '15px',
|
|
@@ -43,17 +40,50 @@ const themeBoxBase = {
|
|
|
43
40
|
xl: '50px',
|
|
44
41
|
'2xl': '50px',
|
|
45
42
|
},
|
|
43
|
+
|
|
44
|
+
adjacent: {
|
|
45
|
+
marginTop: {
|
|
46
|
+
mobile: '15px',
|
|
47
|
+
sm: '15px',
|
|
48
|
+
md: '30px',
|
|
49
|
+
lg: '30px',
|
|
50
|
+
xl: '50px',
|
|
51
|
+
'2xl': '50px',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
46
54
|
},
|
|
47
55
|
};
|
|
48
56
|
|
|
49
57
|
export const themeBoxLight = {
|
|
50
58
|
box: {
|
|
51
59
|
...themeBoxBase.box,
|
|
60
|
+
variant: {
|
|
61
|
+
transparent: {
|
|
62
|
+
backgroundColor: '',
|
|
63
|
+
},
|
|
64
|
+
primary: {
|
|
65
|
+
backgroundColor: '',
|
|
66
|
+
},
|
|
67
|
+
secondary: {
|
|
68
|
+
backgroundColor: '',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
52
71
|
},
|
|
53
72
|
};
|
|
54
73
|
|
|
55
74
|
export const themeBoxDark = {
|
|
56
75
|
box: {
|
|
57
76
|
...themeBoxBase.box,
|
|
77
|
+
variant: {
|
|
78
|
+
transparent: {
|
|
79
|
+
backgroundColor: '',
|
|
80
|
+
},
|
|
81
|
+
primary: {
|
|
82
|
+
backgroundColor: '',
|
|
83
|
+
},
|
|
84
|
+
secondary: {
|
|
85
|
+
backgroundColor: '',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
58
88
|
},
|
|
59
89
|
};
|
|
@@ -645,13 +645,42 @@ export const themeContract = createGlobalThemeContract({
|
|
|
645
645
|
xl: 'latte-box-gap-xl',
|
|
646
646
|
'2xl': 'latte-box-gap-2xl',
|
|
647
647
|
},
|
|
648
|
+
variant: {
|
|
649
|
+
transparent: {
|
|
650
|
+
backgroundColor: 'latte-box-variant-transparent-backgroundColor',
|
|
651
|
+
},
|
|
652
|
+
primary: {
|
|
653
|
+
backgroundColor: 'latte-box-variant-primary-backgroundColor',
|
|
654
|
+
},
|
|
655
|
+
secondary: {
|
|
656
|
+
backgroundColor: 'latte-box-variant-secondary-backgroundColor',
|
|
657
|
+
},
|
|
658
|
+
},
|
|
648
659
|
paddingTop: {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
660
|
+
sm: {
|
|
661
|
+
mobile: 'latte-box-paddingTop-sm-mobile',
|
|
662
|
+
sm: 'latte-box-paddingTop-sm-sm',
|
|
663
|
+
md: 'latte-box-paddingTop-sm-md',
|
|
664
|
+
lg: 'latte-box-paddingTop-sm-lg',
|
|
665
|
+
xl: 'latte-box-paddingTop-sm-xl',
|
|
666
|
+
'2xl': 'latte-box-paddingTop-sm-2xl',
|
|
667
|
+
},
|
|
668
|
+
md: {
|
|
669
|
+
mobile: 'latte-box-paddingTop-md-mobile',
|
|
670
|
+
sm: 'latte-box-paddingTop-md-sm',
|
|
671
|
+
md: 'latte-box-paddingTop-md-md',
|
|
672
|
+
lg: 'latte-box-paddingTop-md-lg',
|
|
673
|
+
xl: 'latte-box-paddingTop-md-xl',
|
|
674
|
+
'2xl': 'latte-box-paddingTop-md-2xl',
|
|
675
|
+
},
|
|
676
|
+
lg: {
|
|
677
|
+
mobile: 'latte-box-paddingTop-lg-mobile',
|
|
678
|
+
sm: 'latte-box-paddingTop-lg-sm',
|
|
679
|
+
md: 'latte-box-paddingTop-lg-md',
|
|
680
|
+
lg: 'latte-box-paddingTop-lg-lg',
|
|
681
|
+
xl: 'latte-box-paddingTop-lg-xl',
|
|
682
|
+
'2xl': 'latte-box-paddingTop-lg-xl',
|
|
683
|
+
},
|
|
655
684
|
},
|
|
656
685
|
paddingLeft: {
|
|
657
686
|
mobile: 'latte-box-paddingLeft-mobile',
|
|
@@ -677,6 +706,17 @@ export const themeContract = createGlobalThemeContract({
|
|
|
677
706
|
xl: 'latte-box-paddingBottom-xl',
|
|
678
707
|
'2xl': 'latte-box-paddingBottom-2xl',
|
|
679
708
|
},
|
|
709
|
+
|
|
710
|
+
adjacent: {
|
|
711
|
+
marginTop: {
|
|
712
|
+
mobile: 'latte-box-adjacent-marginTop-mobile',
|
|
713
|
+
sm: 'latte-box-adjacent-marginTop-sm',
|
|
714
|
+
md: 'latte-box-adjacent-marginTop-md',
|
|
715
|
+
lg: 'latte-box-adjacent-marginTop-lg',
|
|
716
|
+
xl: 'latte-box-adjacent-marginTop-xl',
|
|
717
|
+
'2xl': 'latte-box-adjacent-marginTop-2xl',
|
|
718
|
+
},
|
|
719
|
+
},
|
|
680
720
|
},
|
|
681
721
|
|
|
682
722
|
modal: {
|