smbls 0.15.27 → 0.15.29

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.15.27",
6
+ "version": "0.15.29",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -1,12 +1,38 @@
1
1
  'use strict'
2
2
 
3
- import style from './style'
4
3
  import { opacify } from '@symbo.ls/scratch'
5
4
  import { isFunction } from '@domql/utils'
6
5
 
7
- import { SquareButton } from '..'
6
+ import { SquareButton } from '.'
7
+
8
+ const props = {
9
+ appearance: 'none',
10
+ width: '100%',
11
+ height: '2px',
12
+ outline: 'none',
13
+ flex: 1,
14
+
15
+ style: {
16
+ appearance: 'none'
17
+ },
18
+
19
+ '::-webkit-slider-thumb': {
20
+ boxSizing: 'content-box',
21
+ width: '8px',
22
+ height: '8px',
23
+ borderWidth: '2px',
24
+ borderStyle: 'solid',
25
+ borderRadius: '100%',
26
+ opacity: '.8',
27
+
28
+ style: {
29
+ appearance: 'none'
30
+ }
31
+ },
32
+
33
+ '::-webkit-slider-runnable-track': {
34
+ },
8
35
 
9
- const theme = {
10
36
  '@dark': {
11
37
  background: 'white 0.2',
12
38
 
@@ -27,6 +53,7 @@ const theme = {
27
53
  }
28
54
  }
29
55
  },
56
+
30
57
  '@light': {
31
58
  background: 'gray9',
32
59
 
@@ -50,8 +77,7 @@ const theme = {
50
77
  }
51
78
 
52
79
  export const Range = {
53
- style,
54
- props: theme,
80
+ props,
55
81
 
56
82
  tag: 'input',
57
83
  attr: { type: 'range' }
@@ -59,8 +85,8 @@ export const Range = {
59
85
 
60
86
  const listenProp = (el, prop, def) => {
61
87
  const val = el.props && el.props[prop]
62
- const r = (isFunction(val) ? val(el, el.state) : val) || (def !== undefined ? def : 50)
63
- return r
88
+ const r = (isFunction(val) ? val(el, el.state) : val !== undefined ? val : def !== undefined ? def : 50)
89
+ return r + ''
64
90
  }
65
91
 
66
92
  export const RangeWithButtons = {
@@ -3,8 +3,8 @@
3
3
  import { getTimingByKey, getTimingFunction } from '@symbo.ls/scratch'
4
4
  import { isObject } from '@domql/utils'
5
5
  import { convertPropsToClass } from './Media' // eslint-disable-line no-unused-vars
6
- import createEmotion from '@symbo.ls/create-emotion'
7
- const { keyframes } = createEmotion
6
+ import { emotion } from '@symbo.ls/create-emotion'
7
+ const { keyframes } = emotion
8
8
 
9
9
  const applyAnimationProps = (animation, element) => {
10
10
  if (isObject(animation)) return { animationName: keyframes(animation) }
@@ -23,7 +23,10 @@ export const Hoverable = {
23
23
  transform: 'scale(1.015)'
24
24
  },
25
25
  '.active': {
26
- opacity: 1
26
+ opacity: 1,
27
+ transform: 'scale(1.015)',
28
+
29
+ ':hover': { opacity: 1 }
27
30
  }
28
31
  }
29
32
  }
@@ -45,7 +45,8 @@ const convertPropsToClass = (props, result, element) => {
45
45
  }
46
46
 
47
47
  const applyMediaProps = (key, props, result, element) => {
48
- const { MEDIA } = element.context && element.context.SYSTEM
48
+ if (!element.context.SYSTEM || !element.context.SYSTEM.MEDIA) { return }
49
+ const { MEDIA } = element.context.SYSTEM
49
50
  const mediaName = MEDIA[key.slice(1)]
50
51
  const generatedClass = convertPropsToClass(props, result, element)
51
52
 
package/src/atoms/Text.js CHANGED
@@ -12,10 +12,11 @@ export const Text = {
12
12
  textDecoration: ({ props }) => props.textDecoration && ({ textDecoration: props.textDecoration }),
13
13
  textTransform: ({ props }) => props.textTransform && ({ textTransform: props.textTransform }),
14
14
  whiteSpace: ({ props }) => props.whiteSpace && ({ whiteSpace: props.whiteSpace }),
15
+ letterSpacing: ({ props }) => props.letterSpacing && ({ letterSpacing: props.letterSpacing }),
15
16
  textAlign: ({ props }) => props.textAlign && ({ textAlign: props.textAlign }),
16
17
  fontWeight: ({ props }) => props.fontWeight && ({
17
18
  fontWeight: props.fontWeight,
18
- fontVariationSettings: '"wdth" ' + props.fontWeight
19
+ fontVariationSettings: '"wght" ' + props.fontWeight
19
20
  })
20
21
  }
21
22
  }
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- appearance: 'none',
5
- width: '100%',
6
- height: '2px',
7
- outline: 'none',
8
- flex: 1,
9
- '&::-webkit-slider-thumb': {
10
- boxSizing: 'content-box',
11
- appearance: 'none',
12
- width: '8px',
13
- height: '8px',
14
- borderWidth: '2px',
15
- borderStyle: 'solid',
16
- borderRadius: '100%',
17
- opacity: '.8'
18
- }
19
- }