smbls 0.8.19 → 0.8.22

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.19",
6
+ "version": "0.8.22",
7
7
  "repository": "https://github.com/rackai/symbols",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -69,12 +69,12 @@ export const Block = {
69
69
 
70
70
  aspectRatio: ({ props }) => props.aspectRatio && ({ aspectRatio: props.aspectRatio }),
71
71
 
72
- borderWidth: ({ props }) => mapBasedOnRatio(props, 'borderWidth'),
72
+ borderWidth: ({ props }) => props.borderWidth ? mapBasedOnRatio(props, 'borderWidth') : null,
73
73
 
74
- padding: ({ props }) => mapBasedOnRatio(props, 'padding'),
75
- margin: ({ props }) => mapBasedOnRatio(props, 'margin'),
74
+ padding: ({ props }) => props.padding ? mapBasedOnRatio(props, 'padding') : null,
75
+ margin: ({ props }) => props.margin ? mapBasedOnRatio(props, 'margin') : null,
76
76
 
77
- gap: ({ props }) => mapBasedOnRatio(props, 'gap'),
77
+ gap: ({ props }) => props.gap ? mapBasedOnRatio(props, 'gap') : null,
78
78
  gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
79
79
 
80
80
  flexFlow: ({ props }) => props.flexFlow && ({
package/src/Grid/index.js CHANGED
@@ -14,7 +14,7 @@ export const Grid = {
14
14
  area: ({ props }) => props.area ? ({ gridArea: props.area }) : null,
15
15
  template: ({ props }) => props.template ? ({ gridTemplate: props.template }) : null,
16
16
  templateAreas: ({ props }) => props.templateAreas ? ({ gridTemplateAreas: props.templateAreas }) : null,
17
- gap: ({ props }) => props.template ? mapBasedOnRatio(props, 'gap') : null,
17
+ gap: ({ props }) => props.gap ? mapBasedOnRatio(props, 'gap') : null,
18
18
  columnGap: ({ props }) => props.template ? mapBasedOnRatio(props, 'columnGap') : null,
19
19
  rowGap: ({ props }) => props.template ? mapBasedOnRatio(props, 'rowGap') : null
20
20
  }
@@ -8,10 +8,15 @@ export const IconText = {
8
8
  display: 'flex',
9
9
  alignItems: 'center',
10
10
  alignContent: 'center',
11
- lineHeight: 1
11
+ lineHeight: 1,
12
+ icon: 'noicon'
12
13
  },
13
14
 
14
- icon: { proto: Icon, if: ({ parent }) => parent.props.icon, props: ({ parent }) => ({ icon: parent.props.icon }) },
15
+ icon: {
16
+ proto: Icon,
17
+ if: ({ parent }) => parent.props.icon,
18
+ props: ({ parent }) => ({ icon: parent.props.icon })
19
+ },
15
20
 
16
21
  text: ({ props }) => props.text
17
22
  }
@@ -19,6 +19,14 @@ const diffBorder = (border, key = 'border') => {
19
19
  return obj
20
20
  }
21
21
 
22
+ const diffStroke = stroke => {
23
+ const WebkitTextStroke = stroke.split(', ').map(v => {
24
+ if (v.includes('px')) return v
25
+ else if (getColor(v)) return getColor(v)
26
+ }).join(' ')
27
+ return { WebkitTextStroke }
28
+ }
29
+
22
30
  export const Shape = {
23
31
  class: {
24
32
  default: style,
@@ -42,6 +50,8 @@ export const Shape = {
42
50
  background: ({ props }) => props.background ? ({ backgroundColor: getColor(props.background) }) : null,
43
51
  // border: ({ props }) => props.border ? ({ borderColor: getColor(props.border) }) : null,
44
52
 
53
+ textStroke: ({ props }) => props.textStroke ? diffStroke(props.textStroke) : null,
54
+
45
55
  border: ({ props }) => props.border ? diffBorder(props.border) : null,
46
56
  borderColor: ({ props }) => props.borderColor ? ({ borderColor: getColor(props.borderColor) }) : null,
47
57
  borderStyle: ({ props }) => props.borderStyle && ({ borderStyle: props.borderStyle }),