smbls 0.9.4 → 0.9.7

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.9.4",
6
+ "version": "0.9.7",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
package/src/Button.js CHANGED
@@ -23,6 +23,7 @@ export const Button = {
23
23
  lineHeight: '1',
24
24
  whiteSpace: 'nowrap',
25
25
  padding: 'Z A1',
26
+ fontFamily: 'inherit',
26
27
  round: 'C2',
27
28
  style
28
29
  },
package/src/Flex.js CHANGED
@@ -12,7 +12,7 @@ export const Flex = {
12
12
  flow: ({ props }) => props.flow && ({ flexFlow: props.flow }),
13
13
  flexDirection: ({ props }) => props.flexDirection && ({ flexDirection: props.flexDirection }),
14
14
  alignItems: ({ props }) => props.alignItems && ({ alignItems: props.alignItems }),
15
- wrap: ({ props }) => props.wrap && ({ wrap: props.wrap }),
15
+ wrap: ({ props }) => props.wrap && ({ flexWrap: props.wrap }),
16
16
  alignContent: ({ props }) => props.alignContent && ({ alignContent: props.alignContent }),
17
17
  justifyContent: ({ props }) => props.justifyContent && ({ justifyContent: props.justifyContent }),
18
18
  gap: ({ props }) => props.gap && mapBasedOnRatio(props, 'gap'),
package/src/Media.js CHANGED
@@ -21,6 +21,9 @@ const execClass = (key, props, result, element) => {
21
21
  classExec = classExec.reduce((a, c) => merge(a, c), {})
22
22
  }
23
23
 
24
+ if (key === 'style') {
25
+ }
26
+
24
27
  for (const finalProp in classExec) {
25
28
  result[finalProp] = classExec[finalProp]
26
29
  }
package/src/Transition.js CHANGED
@@ -2,25 +2,31 @@
2
2
 
3
3
  import { mapTiming } from '@symbo.ls/scratch'
4
4
 
5
- const diffTransition = (transition, key = 'transition') => {
5
+ const diffTransition = transition => {
6
6
  const arr = transition.split(' ')
7
7
 
8
- if (!arr.length) return { transition: props.transition }
8
+ if (!arr.length) return transition
9
9
 
10
+ return arr.map(v => {
11
+ if (v.length < 3 || v.includes('ms')) {
12
+ const mapWithSequence = mapTiming(v)
13
+ return mapWithSequence.duration
14
+ }
15
+ return v
16
+ }).join(' ')
17
+ }
18
+
19
+ const splitTransition = transition => {
20
+ const arr = transition.split(',')
21
+ if (!arr.length) return
10
22
  return {
11
- transition: arr.map(v => {
12
- if (v.length < 3 || v.includes('ms')) {
13
- const mapWithSequence = mapTiming(v)
14
- return mapWithSequence.duration
15
- }
16
- return v
17
- }).join(' ')
23
+ transition: arr.map(diffTransition).join(',')
18
24
  }
19
25
  }
20
26
 
21
27
  export const Transition = {
22
28
  class: {
23
- transition: ({ props }) => props.transition && diffTransition(props.transition),
29
+ transition: ({ props }) => props.transition && splitTransition(props.transition),
24
30
  transitionProperty: ({ props }) => props.transitionProperty && ({
25
31
  transitionProperty: props.transitionProperty,
26
32
  willChange: props.transitionProperty