@ray-js/lamp-saturation-slider 1.1.4-beta-2 → 1.1.4-beta-3
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 +7 -6
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import React, { useRef, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { View } from '@ray-js/components';
|
|
5
5
|
import Slider from '@ray-js/components-ty-slider/lib/slider';
|
|
6
|
+
import { toStyle } from '@ray-js/components-ty-slider';
|
|
6
7
|
import { hsvToRgb } from './utils';
|
|
7
8
|
import { defaultProps } from './props';
|
|
8
9
|
function LampSaturationSlider(props) {
|
|
@@ -111,23 +112,23 @@ function LampSaturationSlider(props) {
|
|
|
111
112
|
onTouchEnd && onTouchEnd(detail.end);
|
|
112
113
|
endRefValue.current = detail.end;
|
|
113
114
|
},
|
|
114
|
-
trackStyle: _objectSpread(_objectSpread({
|
|
115
|
+
trackStyle: toStyle(_objectSpread(_objectSpread({
|
|
115
116
|
width: `${646}rpx`,
|
|
116
117
|
height: `${88}rpx`,
|
|
117
118
|
borderRadius: `${28}rpx`
|
|
118
119
|
}, trackStyle), {}, {
|
|
119
120
|
background: `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0.01) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`
|
|
120
|
-
}),
|
|
121
|
-
barStyle: {
|
|
121
|
+
})),
|
|
122
|
+
barStyle: toStyle({
|
|
122
123
|
background: 'transparent'
|
|
123
|
-
},
|
|
124
|
-
thumbStyle: _objectSpread({
|
|
124
|
+
}),
|
|
125
|
+
thumbStyle: toStyle(_objectSpread({
|
|
125
126
|
width: '32rpx',
|
|
126
127
|
height: '104rpx',
|
|
127
128
|
border: `9rpx solid #fff`,
|
|
128
129
|
borderRadius: '28rpx',
|
|
129
130
|
background: `${disable ? '#000' : 'transparent'}`
|
|
130
|
-
}, thumbStyle)
|
|
131
|
+
}, thumbStyle))
|
|
131
132
|
}));
|
|
132
133
|
}
|
|
133
134
|
LampSaturationSlider.defaultProps = defaultProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/lamp-saturation-slider",
|
|
3
|
-
"version": "1.1.4-beta-
|
|
3
|
+
"version": "1.1.4-beta-3",
|
|
4
4
|
"description": "照明色温Slider",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
13
13
|
"build": "ray build --type=component",
|
|
14
14
|
"watch": "ray start --type=component",
|
|
15
|
-
"build:tuya": "ray build ./example
|
|
15
|
+
"build:tuya": "ray build ./example",
|
|
16
16
|
"build:wechat": "ray build ./example --target=wechat",
|
|
17
17
|
"build:web": "ray build ./example --target=web",
|
|
18
18
|
"build:native": "ray build ./example --target=native",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@ray-js/components-ty-slider": "0.2.36-beta-
|
|
60
|
+
"@ray-js/components-ty-slider": "0.2.36-beta-3",
|
|
61
61
|
"@ray-js/panel-sdk": "^1.1.4"
|
|
62
62
|
},
|
|
63
63
|
"maintainers": [
|