@sebgroup/green-react 3.29.1 → 3.29.2

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
@@ -2,7 +2,7 @@
2
2
  "name": "@sebgroup/green-react",
3
3
  "main": "./src/index.js",
4
4
  "module": "./src/index.js",
5
- "version": "3.29.1",
5
+ "version": "3.29.2",
6
6
  "peerDependencies": {
7
7
  "react": "^17 || ^18 || ^19",
8
8
  "react-dom": "^17 || ^18 || ^19"
@@ -66,7 +66,7 @@ function Slider(_ref2) {
66
66
  return;
67
67
  }
68
68
  var percent = 0;
69
- if (sliderValue !== undefined) percent = (sliderValue - min) / (max - min) * 100;
69
+ if (sliderValue !== undefined) percent = Math.round((sliderValue - min) / step) / ((max - min) / step) * 100;
70
70
  setBackground(getSliderTrackBackground(percent));
71
71
  }, [disabled, sliderValue]);
72
72
  var clamp = function clamp(unclamped) {
@@ -154,6 +154,7 @@ function Slider(_ref2) {
154
154
  onChange: function onChange(e) {
155
155
  return handleChange(e.currentTarget.value);
156
156
  },
157
+ "aria-valuenow": sliderValue || 0,
157
158
  style: {
158
159
  background: background
159
160
  }