@symbo.ls/range 2.11.16 → 2.11.132

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.
Files changed (2) hide show
  1. package/index.js +7 -7
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -104,22 +104,22 @@ export const RangeWithButtons = {
104
104
  value: {
105
105
  style: { width: '4ch' },
106
106
  tag: 'span',
107
- text: (el, s) => {
108
- const unit = listenProp(el.parent.input, 'unit', '')
109
- return '' + (s.value || 50) + unit
107
+ text: ({ state, parent }) => {
108
+ const unit = listenProp(parent.input, 'unit', '')
109
+ return '' + (state.value || 50) + unit
110
110
  }
111
111
  },
112
112
  input: {
113
113
  extend: Range,
114
114
  attr: {
115
- value: (el, s) => parseFloat(s.value),
115
+ value: (el, s) => parseFloat(el.state.value),
116
116
  min: (el, s) => listenProp(el, 'min', 0),
117
117
  max: (el, s) => listenProp(el, 'max', 100),
118
118
  step: (el, s) => listenProp(el, 'step', 1)
119
119
  },
120
120
  on: {
121
- input: (ev, el, s) => el.props && isFunction(el.props.onInput) && el.props.onInput(ev, el, s),
122
- change: (ev, el, s) => el.props && isFunction(el.props.onChange) && el.props.onChange(ev, el, s)
121
+ input: (ev, el, s) => el.props && isFunction(el.props.onInput) && el.props.onInput(ev, el, el.state),
122
+ change: (ev, el, s) => el.props && isFunction(el.props.onChange) && el.props.onChange(ev, el, el.state)
123
123
  }
124
124
  },
125
125
  plus: {
@@ -127,7 +127,7 @@ export const RangeWithButtons = {
127
127
  props: { theme: 'tertiary', icon: 'plus' },
128
128
  on: {
129
129
  click: (ev, el, s) => {
130
- el.props && isFunction(el.props.onClick) && el.props.onClick(ev, el, s)
130
+ el.props && isFunction(el.props.onClick) && el.props.onClick(ev, el, el.state)
131
131
  }
132
132
  }
133
133
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/range",
3
- "version": "2.11.16",
3
+ "version": "2.11.132",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "9d17c62d340b3ed3ecfba460d9f5656b324a5bbb",
6
+ "gitHead": "13027443598f113dd2b79ddf7aaf1adbd46d97d7",
7
7
  "dependencies": {
8
8
  "@domql/utils": "latest",
9
9
  "@symbo.ls/button": "latest",