smbls 0.8.6 → 0.8.9

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.6",
6
+ "version": "0.8.9",
7
7
  "repository": "https://github.com/rackai/symbols",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -87,6 +87,9 @@ export const Block = {
87
87
  },
88
88
  flex: ({ props }) => props.flex && ({ flex: props.flex }),
89
89
 
90
+ gridColumn: ({ props }) => props.gridColumn && ({ gridColumn: props.gridColumn }),
91
+ gridRow: ({ props }) => props.gridRow && ({ gridRow: props.gridRow }),
92
+
90
93
  size: ({ props }) => {
91
94
  // if (typeof props.size !== 'string') return
92
95
  // 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, 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, 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/Link/index.js CHANGED
@@ -10,10 +10,12 @@ 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
- href: element => exec(element.props.href, element),
18
+ href: element => exec(element.props.href, element) || exec(element.props, element).href,
17
19
  target: ({ props }) => props.target,
18
20
  'aria-label': ({ props }) => props.aria.label || props.text
19
21
  }
@@ -41,15 +41,16 @@ export const Responsive = {
41
41
  const selectorProps = {}
42
42
  const selectorName = screen.slice(1)
43
43
  const underSelectorProps = props[screen]
44
- const selectorKey = `&${selectorName}`
44
+ const selectorKey = `&${screen}`
45
+
45
46
 
46
47
  for (const prop in underSelectorProps) {
47
48
  const classProp = el.class[prop]
48
49
  if (typeof classProp !== 'function') continue
49
50
  let calculatedProp = classProp({ props: underSelectorProps })
50
51
 
51
- if (Array.isArray(underSelectorProps)) {
52
- underSelectorProps = Object.assign({}, ...underSelectorProps)
52
+ if (Array.isArray(calculatedProp)) {
53
+ calculatedProp = Object.assign({}, ...calculatedProp)
53
54
  }
54
55
 
55
56
  for (const finalProp in calculatedProp) {
package/src/Text/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { mapFontSize } from '@symbo.ls/scratch'
3
+ import { mapFontSize, getFontFamily, FONT_FAMILY } from '@symbo.ls/scratch'
4
4
 
5
5
  export const Text = {
6
6
  props: {},
@@ -9,6 +9,7 @@ export const Text = {
9
9
 
10
10
  class: {
11
11
  fontSize: ({ props }) => props.fontSize ? mapFontSize(props.fontSize) : null,
12
+ fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(FONT_FAMILY, props.fontFamily) || props.fontFamily }),
12
13
  lineHeight: ({ props }) => ({ lineHeight: props.lineHeight }),
13
14
  textDecoration: ({ props }) => ({ textDecoration: props.textDecoration }),
14
15
  textTransform: ({ props }) => ({ textTransform: props.textTransform }),
@@ -0,0 +1,11 @@
1
+ 'use strict'
2
+
3
+ export const Transition = {
4
+ class: {
5
+ transition: ({ props }) => ({ transition: props.transition }),
6
+ transitionProperty: ({ props }) => ({
7
+ transitionProperty: props.transitionProperty,
8
+ willChange: props.transitionProperty
9
+ })
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ 'use strict'
2
+
package/src/index.js CHANGED
@@ -13,6 +13,7 @@ export * from './Direction'
13
13
  export * from './Position'
14
14
  export * from './Overflow'
15
15
  export * from './Transform'
16
+ export * from './Transition'
16
17
  export * from './Responsive'
17
18
 
18
19
  export * from './Box'