@ray-js/lamp-saturation-slider 1.1.6 → 1.1.7
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/lib/index.js +4 -3
- package/lib/props.d.ts +6 -0
- package/lib/props.js +3 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -21,7 +21,8 @@ function LampSaturationSlider(props) {
|
|
|
21
21
|
onTouchStart,
|
|
22
22
|
onTouchMove,
|
|
23
23
|
onTouchEnd,
|
|
24
|
-
enableTouch = true
|
|
24
|
+
enableTouch = true,
|
|
25
|
+
max = 1000
|
|
25
26
|
} = props;
|
|
26
27
|
const startRefValue = useRef(-1);
|
|
27
28
|
const endRefValue = useRef(-1);
|
|
@@ -48,7 +49,7 @@ function LampSaturationSlider(props) {
|
|
|
48
49
|
}, /*#__PURE__*/React.createElement(Slider, {
|
|
49
50
|
instanceId: props.instanceId || instanceId.current,
|
|
50
51
|
min: 0,
|
|
51
|
-
max:
|
|
52
|
+
max: max,
|
|
52
53
|
disable: disable,
|
|
53
54
|
end: controllerSaturation,
|
|
54
55
|
enableTouch: enableTouch,
|
|
@@ -132,7 +133,7 @@ function LampSaturationSlider(props) {
|
|
|
132
133
|
thumbStyleRenderFormatter: {
|
|
133
134
|
background: `hsl(${props.hue}deg 100% value%)`
|
|
134
135
|
},
|
|
135
|
-
thumbStyleRenderValueScale:
|
|
136
|
+
thumbStyleRenderValueScale: 50 / max,
|
|
136
137
|
thumbStyleRenderValueStart: 50,
|
|
137
138
|
thumbStyleRenderValueReverse: true
|
|
138
139
|
}));
|
package/lib/props.d.ts
CHANGED
package/lib/props.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/lamp-saturation-slider",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "照明色温Slider",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@ray-js/components-ty-slider": "^0.2.
|
|
63
|
+
"@ray-js/components-ty-slider": "^0.2.52"
|
|
64
64
|
},
|
|
65
65
|
"maintainers": [
|
|
66
66
|
{
|