smbls 0.15.2 → 0.15.4

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.2",
6
+ "version": "0.15.4",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -41,9 +41,6 @@ const aside = {
41
41
  fontSize: 'Z1'
42
42
  },
43
43
  text: ({ state }) => state.value
44
- },
45
- $setCollection: () => {
46
- return new Array(30).fill(undefined).map((_, i) => (2022 - i)).reverse()
47
44
  }
48
45
  }
49
46
 
@@ -59,7 +59,7 @@ export const Range = {
59
59
 
60
60
  const listenProp = (el, prop, def) => {
61
61
  const val = el.props && el.props[prop]
62
- const r = (isFunction(val) ? val() : val) || (def !== undefined ? def : 50)
62
+ const r = (isFunction(val) ? val(el, el.state) : val) || (def !== undefined ? def : 50)
63
63
  return r
64
64
  }
65
65
 
@@ -72,7 +72,7 @@ export const RangeWithButtons = {
72
72
  el.props && isFunction(el.props.onClick) && el.props.onClick(ev, el, s)
73
73
  const input = el.parent.input
74
74
  const props = input.props
75
- const value = isFunction(props.value) ? props.value() : props.value
75
+ const value = isFunction(props.value) ? props.value(el, s) : props.value
76
76
  input.node.value = value
77
77
  }
78
78
  }
@@ -107,7 +107,7 @@ export const RangeWithButtons = {
107
107
  el.props && isFunction(el.props.onClick) && el.props.onClick(ev, el, s)
108
108
  const input = el.parent.input
109
109
  const props = input.props
110
- const value = isFunction(props.value) ? props.value() : props.value
110
+ const value = isFunction(props.value) ? props.value(el, s) : props.value
111
111
  input.node.value = value
112
112
  }
113
113
  }