smbls 0.8.7 → 0.8.10
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 +7 -2
- package/src/Box/index.js +2 -2
- package/src/Flex/index.js +6 -6
- package/src/Link/index.js +3 -1
- package/src/Overflow/index.js +1 -1
- package/src/Text/index.js +5 -5
- package/src/Transform/index.js +1 -1
- package/src/Transition/index.js +5 -2
package/package.json
CHANGED
package/src/Block/index.js
CHANGED
|
@@ -31,7 +31,9 @@ export const Block = {
|
|
|
31
31
|
props: {},
|
|
32
32
|
|
|
33
33
|
class: {
|
|
34
|
-
display: ({ props }) => ({ display: props.display }),
|
|
34
|
+
display: ({ props }) => props.display && ({ display: props.display }),
|
|
35
|
+
|
|
36
|
+
hide: ({ props }) => props.hide && ({ display: 'none' }),
|
|
35
37
|
|
|
36
38
|
width: ({ props }) => props.width && mapBasedOnRatio(props, 'width'),
|
|
37
39
|
height: ({ props }) => props.height && mapBasedOnRatio(props, 'height'),
|
|
@@ -66,7 +68,7 @@ export const Block = {
|
|
|
66
68
|
}
|
|
67
69
|
},
|
|
68
70
|
|
|
69
|
-
aspectRatio: ({ props }) => ({ aspectRatio: props.aspectRatio }),
|
|
71
|
+
aspectRatio: ({ props }) => props.aspectRatio && ({ aspectRatio: props.aspectRatio }),
|
|
70
72
|
|
|
71
73
|
padding: ({ props }) => mapBasedOnRatio(props, 'padding'),
|
|
72
74
|
margin: ({ props }) => mapBasedOnRatio(props, 'margin'),
|
|
@@ -87,6 +89,9 @@ export const Block = {
|
|
|
87
89
|
},
|
|
88
90
|
flex: ({ props }) => props.flex && ({ flex: props.flex }),
|
|
89
91
|
|
|
92
|
+
gridColumn: ({ props }) => props.gridColumn && ({ gridColumn: props.gridColumn }),
|
|
93
|
+
gridRow: ({ props }) => props.gridRow && ({ gridRow: props.gridRow }),
|
|
94
|
+
|
|
90
95
|
size: ({ props }) => {
|
|
91
96
|
// if (typeof props.size !== 'string') return
|
|
92
97
|
// const [fontSize, padding, margin] = props.size.split(' ')
|
package/src/Box/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Shape, Position, Block, Text, Overflow, Transition, Responsive } from '..'
|
|
3
|
+
import { Shape, Position, Block, Text, Overflow, Transition, Transform, Responsive } from '..'
|
|
4
4
|
|
|
5
5
|
export const Box = {
|
|
6
|
-
proto: [Shape, Position, Block, Text, Overflow, Transition, Responsive],
|
|
6
|
+
proto: [Shape, Position, Block, Text, Overflow, Transition, Transform, Responsive],
|
|
7
7
|
class: {
|
|
8
8
|
fromProps: ({ props }) => props && props.css
|
|
9
9
|
}
|
package/src/Flex/index.js
CHANGED
|
@@ -11,11 +11,11 @@ export const Flex = {
|
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
class: {
|
|
14
|
-
flow: ({ props }) => ({ flexFlow: props.flow }),
|
|
15
|
-
flexDirection: ({ props }) => ({ flexDirection: props.flexDirection }),
|
|
16
|
-
alignItems: ({ props }) => ({ alignItems: props.alignItems }),
|
|
17
|
-
alignContent: ({ props }) => ({ alignContent: props.alignContent }),
|
|
18
|
-
justifyContent: ({ props }) => ({ justifyContent: props.justifyContent }),
|
|
19
|
-
gap: ({ props }) => mapBasedOnRatio(props, 'gap')
|
|
14
|
+
flow: ({ props }) => props.flow && ({ flexFlow: props.flow }),
|
|
15
|
+
flexDirection: ({ props }) => props.flexDirection && ({ flexDirection: props.flexDirection }),
|
|
16
|
+
alignItems: ({ props }) => props.alignItems && ({ alignItems: props.alignItems }),
|
|
17
|
+
alignContent: ({ props }) => props.alignContent && ({ alignContent: props.alignContent }),
|
|
18
|
+
justifyContent: ({ props }) => props.justifyContent && ({ justifyContent: props.justifyContent }),
|
|
19
|
+
gap: ({ props }) => props.gap && mapBasedOnRatio(props, 'gap')
|
|
20
20
|
}
|
|
21
21
|
}
|
package/src/Link/index.js
CHANGED
package/src/Overflow/index.js
CHANGED
package/src/Text/index.js
CHANGED
|
@@ -10,10 +10,10 @@ export const Text = {
|
|
|
10
10
|
class: {
|
|
11
11
|
fontSize: ({ props }) => props.fontSize ? mapFontSize(props.fontSize) : null,
|
|
12
12
|
fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(FONT_FAMILY, props.fontFamily) || props.fontFamily }),
|
|
13
|
-
lineHeight: ({ props }) => ({ lineHeight: props.lineHeight }),
|
|
14
|
-
textDecoration: ({ props }) => ({ textDecoration: props.textDecoration }),
|
|
15
|
-
textTransform: ({ props }) => ({ textTransform: props.textTransform }),
|
|
16
|
-
textAlign: ({ props }) => ({ textAlign: props.textAlign }),
|
|
17
|
-
fontWeight: ({ props }) => ({ fontWeight: props.fontWeight })
|
|
13
|
+
lineHeight: ({ props }) => props.lineHeight && ({ lineHeight: props.lineHeight }),
|
|
14
|
+
textDecoration: ({ props }) => props.textDecoration && ({ textDecoration: props.textDecoration }),
|
|
15
|
+
textTransform: ({ props }) => props.textTransform && ({ textTransform: props.textTransform }),
|
|
16
|
+
textAlign: ({ props }) => props.textAlign && ({ textAlign: props.textAlign }),
|
|
17
|
+
fontWeight: ({ props }) => props.fontWeight && ({ fontWeight: props.fontWeight })
|
|
18
18
|
}
|
|
19
19
|
}
|
package/src/Transform/index.js
CHANGED
package/src/Transition/index.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
export const Transition = {
|
|
4
4
|
class: {
|
|
5
|
-
transition: ({ props }) => ({ transition: props.transition }),
|
|
6
|
-
transitionProperty: ({ props }) =>
|
|
5
|
+
transition: ({ props }) => props.transition && ({ transition: props.transition }),
|
|
6
|
+
transitionProperty: ({ props }) => props.transitionProperty && ({
|
|
7
|
+
transitionProperty: props.transitionProperty,
|
|
8
|
+
willChange: props.transitionProperty
|
|
9
|
+
})
|
|
7
10
|
}
|
|
8
11
|
}
|