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 CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "0.8.7",
6
+ "version": "0.8.10",
7
7
  "repository": "https://github.com/rackai/symbols",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -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
@@ -10,7 +10,9 @@ export const Link = {
10
10
  href: '',
11
11
  target: '',
12
12
  theme: 'link',
13
- aria: {}
13
+ aria: {},
14
+ fontWeight: 'bold',
15
+ textDecoration: 'none'
14
16
  },
15
17
  attr: {
16
18
  href: element => exec(element.props.href, element) || exec(element.props, element).href,
@@ -2,6 +2,6 @@
2
2
 
3
3
  export const Overflow = {
4
4
  class: {
5
- overflow: ({ props }) => ({ overflow: props.overflow }),
5
+ overflow: ({ props }) => props.overflow && ({ overflow: props.overflow }),
6
6
  }
7
7
  }
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
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  export const Transform = {
4
4
  class: {
5
- transform: ({ props }) => ({
5
+ transform: ({ props }) => props.transform && ({
6
6
  transform: props.transform
7
7
  }),
8
8
  }
@@ -2,7 +2,10 @@
2
2
 
3
3
  export const Transition = {
4
4
  class: {
5
- transition: ({ props }) => ({ transition: props.transition }),
6
- transitionProperty: ({ props }) => ({ transitionProperty: props.transitionProperty })
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
  }