@vaadin/slider 25.1.0-alpha2 → 25.1.0-alpha3
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 +7 -7
- package/src/vaadin-range-slider.js +1 -1
- package/src/vaadin-slider-mixin.js +3 -1
- package/src/vaadin-slider.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/slider",
|
|
3
|
-
"version": "25.1.0-
|
|
3
|
+
"version": "25.1.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.1.0-
|
|
38
|
-
"@vaadin/component-base": "25.1.0-
|
|
39
|
-
"@vaadin/vaadin-themable-mixin": "25.1.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.1.0-alpha3",
|
|
38
|
+
"@vaadin/component-base": "25.1.0-alpha3",
|
|
39
|
+
"@vaadin/vaadin-themable-mixin": "25.1.0-alpha3",
|
|
40
40
|
"lit": "^3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@vaadin/chai-plugins": "25.1.0-
|
|
44
|
-
"@vaadin/test-runner-commands": "25.1.0-
|
|
43
|
+
"@vaadin/chai-plugins": "25.1.0-alpha3",
|
|
44
|
+
"@vaadin/test-runner-commands": "25.1.0-alpha3",
|
|
45
45
|
"@vaadin/testing-helpers": "^2.0.0"
|
|
46
46
|
},
|
|
47
47
|
"web-types": [
|
|
48
48
|
"web-types.json",
|
|
49
49
|
"web-types.lit.json"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "b3bb340cfd5e837cda8498aee1608950362e5177"
|
|
52
52
|
}
|
|
@@ -166,7 +166,7 @@ class RangeSlider extends SliderMixin(
|
|
|
166
166
|
updated(props) {
|
|
167
167
|
super.updated(props);
|
|
168
168
|
|
|
169
|
-
if (props.has('value') || props.has('min') || props.has('max')) {
|
|
169
|
+
if (props.has('value') || props.has('min') || props.has('max') || props.has('step')) {
|
|
170
170
|
const value = [...this.value];
|
|
171
171
|
value.forEach((v, idx) => {
|
|
172
172
|
this.__updateValue(v, idx, value);
|
|
@@ -102,7 +102,9 @@ export const SliderMixin = (superClass) =>
|
|
|
102
102
|
const nearestOffset = Math.round(offset / step) * step;
|
|
103
103
|
const nearestValue = minValue + nearestOffset;
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
// Ensure the last value matching step is used below the max limit.
|
|
106
|
+
// Example: max = 100, step = 1.5 - force maximum allowed value to 99.
|
|
107
|
+
const newValue = nearestValue <= maxValue ? nearestValue : nearestValue - step;
|
|
106
108
|
|
|
107
109
|
this.__value = fullValue.with(index, newValue);
|
|
108
110
|
}
|
package/src/vaadin-slider.js
CHANGED
|
@@ -146,7 +146,7 @@ class Slider extends SliderMixin(
|
|
|
146
146
|
updated(props) {
|
|
147
147
|
super.updated(props);
|
|
148
148
|
|
|
149
|
-
if (props.has('value') || props.has('min') || props.has('max')) {
|
|
149
|
+
if (props.has('value') || props.has('min') || props.has('max') || props.has('step')) {
|
|
150
150
|
this.__updateValue(this.value);
|
|
151
151
|
}
|
|
152
152
|
}
|
package/web-types.json
CHANGED