@symbo.ls/range 2.11.16 → 2.11.126
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/index.js +7 -7
- 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: (
|
|
108
|
-
const unit = listenProp(
|
|
109
|
-
return '' + (
|
|
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(
|
|
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,
|
|
122
|
-
change: (ev, el, s) => el.props && isFunction(el.props.onChange) && el.props.onChange(ev, el,
|
|
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,
|
|
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.
|
|
3
|
+
"version": "2.11.126",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "463c4925df4dfbed4611feafe34c6f011d3ba287",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/utils": "latest",
|
|
9
9
|
"@symbo.ls/button": "latest",
|