@uiw/react-color-saturation
Advanced tools
Comparing version
@@ -22,2 +22,11 @@ "use strict"; | ||
}; | ||
var stylePointer = { | ||
'--saturation-pointer-box-shadow': 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px', | ||
width: 6, | ||
height: 6, | ||
transform: 'translate(-3px, -3px)', | ||
boxShadow: 'var(--saturation-pointer-box-shadow)', | ||
borderRadius: '50%', | ||
backgroundColor: color | ||
}; | ||
return (0, _react.useMemo)(function () { | ||
@@ -29,10 +38,3 @@ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
className: "".concat(prefixCls, "-fill"), | ||
style: { | ||
width: 6, | ||
height: 6, | ||
transform: 'translate(-3px, -3px)', | ||
boxShadow: BOXSHADOW, | ||
borderRadius: '50%', | ||
backgroundColor: color | ||
} | ||
style: stylePointer | ||
}) | ||
@@ -39,0 +41,0 @@ }); |
@@ -18,2 +18,11 @@ import React from 'react'; | ||
}; | ||
var stylePointer = { | ||
'--saturation-pointer-box-shadow': 'rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px', | ||
width: 6, | ||
height: 6, | ||
transform: 'translate(-3px, -3px)', | ||
boxShadow: 'var(--saturation-pointer-box-shadow)', | ||
borderRadius: '50%', | ||
backgroundColor: color | ||
}; | ||
return useMemo(() => /*#__PURE__*/_jsx("div", { | ||
@@ -24,12 +33,5 @@ className: prefixCls + "-pointer " + (className || ''), | ||
className: prefixCls + "-fill", | ||
style: { | ||
width: 6, | ||
height: 6, | ||
transform: 'translate(-3px, -3px)', | ||
boxShadow: BOXSHADOW, | ||
borderRadius: '50%', | ||
backgroundColor: color | ||
} | ||
style: stylePointer | ||
}) | ||
}), [top, left, color, className, prefixCls]); | ||
}; |
{ | ||
"name": "@uiw/react-color-saturation", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"description": "Color Saturation", | ||
@@ -38,4 +38,4 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/color-convert": "1.2.4", | ||
"@uiw/react-drag-event-interactive": "1.2.4" | ||
"@uiw/color-convert": "1.3.0", | ||
"@uiw/react-drag-event-interactive": "1.3.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
15275
3.64%337
1.2%+ Added
+ Added
- Removed
- Removed
Updated