smbls 0.8.16 → 0.8.19
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 +1 -1
- package/src/Block/index.js +14 -2
- package/src/Box/index.js +5 -4
- package/src/Button/index.js +1 -3
- package/src/Grid/index.js +8 -5
- package/src/Link/index.js +0 -2
- package/src/Shape/index.js +3 -0
package/package.json
CHANGED
package/src/Block/index.js
CHANGED
|
@@ -69,9 +69,13 @@ export const Block = {
|
|
|
69
69
|
|
|
70
70
|
aspectRatio: ({ props }) => props.aspectRatio && ({ aspectRatio: props.aspectRatio }),
|
|
71
71
|
|
|
72
|
+
borderWidth: ({ props }) => mapBasedOnRatio(props, 'borderWidth'),
|
|
73
|
+
|
|
72
74
|
padding: ({ props }) => mapBasedOnRatio(props, 'padding'),
|
|
73
75
|
margin: ({ props }) => mapBasedOnRatio(props, 'margin'),
|
|
76
|
+
|
|
74
77
|
gap: ({ props }) => mapBasedOnRatio(props, 'gap'),
|
|
78
|
+
gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
|
|
75
79
|
|
|
76
80
|
flexFlow: ({ props }) => props.flexFlow && ({
|
|
77
81
|
display: 'flex',
|
|
@@ -86,14 +90,22 @@ export const Block = {
|
|
|
86
90
|
justifyContent: justifyContent
|
|
87
91
|
}
|
|
88
92
|
},
|
|
93
|
+
|
|
89
94
|
flex: ({ props }) => props.flex && ({ flex: props.flex }),
|
|
95
|
+
alignItems: ({ props }) => props.alignItems && ({ alignItems: props.alignItems }),
|
|
96
|
+
alignContent: ({ props }) => props.alignContent && ({ alignContent: props.alignContent }),
|
|
97
|
+
justifyContent: ({ props }) => props.justifyContent && ({ justifyContent: props.justifyContent }),
|
|
90
98
|
|
|
91
99
|
gridColumn: ({ props }) => props.gridColumn && ({ gridColumn: props.gridColumn }),
|
|
92
100
|
gridRow: ({ props }) => props.gridRow && ({ gridRow: props.gridRow }),
|
|
93
101
|
|
|
94
102
|
size: ({ props }) => {
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
if (typeof props.heightRange !== 'string') return
|
|
104
|
+
const [minHeight, maxHeight] = props.heightRange.split(' ')
|
|
105
|
+
return {
|
|
106
|
+
...mapSpacing(minHeight, 'minHeight'),
|
|
107
|
+
...mapSpacing(maxHeight, 'maxHeight')
|
|
108
|
+
}
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
}
|
package/src/Box/index.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { Shape, Position, Block, Text, Overflow, Transition, Transform, Responsive } from '..'
|
|
4
4
|
|
|
5
|
+
const PropsCSS = {
|
|
6
|
+
class: { propsCSS: ({ props }) => props && props.css }
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
export const Box = {
|
|
6
|
-
proto: [Shape, Position, Block, Text, Overflow, Transition, Transform, Responsive],
|
|
7
|
-
class: {
|
|
8
|
-
fromProps: ({ props }) => props && props.css
|
|
9
|
-
}
|
|
10
|
+
proto: [Shape, Position, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS],
|
|
10
11
|
}
|
package/src/Button/index.js
CHANGED
package/src/Grid/index.js
CHANGED
|
@@ -9,10 +9,13 @@ export const Grid = {
|
|
|
9
9
|
props: {},
|
|
10
10
|
|
|
11
11
|
class: {
|
|
12
|
-
columns: ({ props }) => ({ gridTemplateColumns: props.columns }),
|
|
13
|
-
rows: ({ props }) => ({ gridTemplateRows: props.rows }),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
columns: ({ props }) => props.columns ? ({ gridTemplateColumns: props.columns }) : null,
|
|
13
|
+
rows: ({ props }) => props.rows ? ({ gridTemplateRows: props.rows }) : null,
|
|
14
|
+
area: ({ props }) => props.area ? ({ gridArea: props.area }) : null,
|
|
15
|
+
template: ({ props }) => props.template ? ({ gridTemplate: props.template }) : null,
|
|
16
|
+
templateAreas: ({ props }) => props.templateAreas ? ({ gridTemplateAreas: props.templateAreas }) : null,
|
|
17
|
+
gap: ({ props }) => props.template ? mapBasedOnRatio(props, 'gap') : null,
|
|
18
|
+
columnGap: ({ props }) => props.template ? mapBasedOnRatio(props, 'columnGap') : null,
|
|
19
|
+
rowGap: ({ props }) => props.template ? mapBasedOnRatio(props, 'rowGap') : null
|
|
17
20
|
}
|
|
18
21
|
}
|
package/src/Link/index.js
CHANGED
package/src/Shape/index.js
CHANGED
|
@@ -43,6 +43,9 @@ export const Shape = {
|
|
|
43
43
|
// border: ({ props }) => props.border ? ({ borderColor: getColor(props.border) }) : null,
|
|
44
44
|
|
|
45
45
|
border: ({ props }) => props.border ? diffBorder(props.border) : null,
|
|
46
|
+
borderColor: ({ props }) => props.borderColor ? ({ borderColor: getColor(props.borderColor) }) : null,
|
|
47
|
+
borderStyle: ({ props }) => props.borderStyle && ({ borderStyle: props.borderStyle }),
|
|
48
|
+
|
|
46
49
|
borderLeft: ({ props }) => props.borderLeft ? diffBorder(props.borderLeft, 'borderLeft') : null,
|
|
47
50
|
borderTop: ({ props }) => props.borderTop ? diffBorder(props.borderTop, 'borderTop') : null,
|
|
48
51
|
borderRight: ({ props }) => props.borderRight ? diffBorder(props.borderRight, 'borderRight') : null,
|