smbls 0.8.17 → 0.8.20

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.17",
6
+ "version": "0.8.20",
7
7
  "repository": "https://github.com/rackai/symbols",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -69,9 +69,13 @@ export const Block = {
69
69
 
70
70
  aspectRatio: ({ props }) => props.aspectRatio && ({ aspectRatio: props.aspectRatio }),
71
71
 
72
- padding: ({ props }) => mapBasedOnRatio(props, 'padding'),
73
- margin: ({ props }) => mapBasedOnRatio(props, 'margin'),
74
- gap: ({ props }) => mapBasedOnRatio(props, 'gap'),
72
+ borderWidth: ({ props }) => props.borderWidth ? mapBasedOnRatio(props, 'borderWidth') : null,
73
+
74
+ padding: ({ props }) => props.padding ? mapBasedOnRatio(props, 'padding') : null,
75
+ margin: ({ props }) => props.margin ? mapBasedOnRatio(props, 'margin') : null,
76
+
77
+ gap: ({ props }) => props.gap ? mapBasedOnRatio(props, 'gap') : null,
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
- // if (typeof props.size !== 'string') return
96
- // const [fontSize, padding, margin] = props.size.split(' ')
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
  }
@@ -31,9 +31,7 @@ export const SquareButton = {
31
31
  round: 'Z'
32
32
  },
33
33
  class: {
34
- squareButton: {
35
- boxSizing: 'content-box'
36
- }
34
+ squareButton: { boxSizing: 'content-box' }
37
35
  }
38
36
  }
39
37
 
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
- gap: ({ props }) => mapBasedOnRatio(props, 'gap'),
15
- columnGap: ({ props }) => mapBasedOnRatio(props, 'columnGap'),
16
- rowGap: ({ props }) => mapBasedOnRatio(props, 'rowGap')
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.gap ? 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
@@ -7,8 +7,6 @@ export const Link = {
7
7
  proto: [Shape, Text],
8
8
  tag: 'a',
9
9
  props: {
10
- href: '',
11
- target: '',
12
10
  theme: 'link',
13
11
  aria: {},
14
12
  fontWeight: 'bold',
@@ -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,