@uiw/react-color-chrome
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -22,2 +22,3 @@ "use strict"; | ||
var _Arrow = _interopRequireDefault(require("./Arrow")); | ||
var _EyeDropper = require("./EyeDropper"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -89,2 +90,6 @@ var _excluded = ["prefixCls", "className", "style", "color", "inputType", "rectProps", "onChange"]; | ||
}; | ||
var handleClickColor = function handleClickColor(hex) { | ||
var result = (0, _colorConvert.hexToHsva)(hex); | ||
handleChange((0, _objectSpread2["default"])({}, result)); | ||
}; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorGithub["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
@@ -114,11 +119,13 @@ ref: ref, | ||
display: 'flex', | ||
alignItems: 'center' | ||
alignItems: 'center', | ||
gap: 15 | ||
}, | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorAlpha["default"], { | ||
width: 24, | ||
height: 24, | ||
children: [_EyeDropper.isSupportEyeDropper && /*#__PURE__*/(0, _jsxRuntime.jsx)(_EyeDropper.EyeDropper, { | ||
onPickColor: handleClickColor | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorAlpha["default"], { | ||
width: 28, | ||
height: 28, | ||
hsva: hsva, | ||
radius: 2, | ||
style: { | ||
marginRight: 15, | ||
borderRadius: '50%' | ||
@@ -125,0 +132,0 @@ }, |
@@ -15,4 +15,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import Arrow from './Arrow'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { EyeDropper, isSupportEyeDropper } from './EyeDropper'; | ||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
export var ChromeInputType = /*#__PURE__*/function (ChromeInputType) { | ||
@@ -76,2 +76,6 @@ ChromeInputType["HEXA"] = "hexa"; | ||
}; | ||
var handleClickColor = hex => { | ||
var result = hexToHsva(hex); | ||
handleChange(_extends({}, result)); | ||
}; | ||
return /*#__PURE__*/_jsx(Github, _extends({ | ||
@@ -101,11 +105,13 @@ ref: ref, | ||
display: 'flex', | ||
alignItems: 'center' | ||
alignItems: 'center', | ||
gap: 15 | ||
}, | ||
children: [/*#__PURE__*/_jsx(Alpha, { | ||
width: 24, | ||
height: 24, | ||
children: [isSupportEyeDropper && /*#__PURE__*/_jsx(EyeDropper, { | ||
onPickColor: handleClickColor | ||
}), /*#__PURE__*/_jsx(Alpha, { | ||
width: 28, | ||
height: 28, | ||
hsva: hsva, | ||
radius: 2, | ||
style: { | ||
marginRight: 15, | ||
borderRadius: '50%' | ||
@@ -112,0 +118,0 @@ }, |
{ | ||
"name": "@uiw/react-color-chrome", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "Color Github Picker", | ||
@@ -40,10 +40,10 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/color-convert": "2.1.1", | ||
"@uiw/react-color-alpha": "2.1.1", | ||
"@uiw/react-color-editable-input": "2.1.1", | ||
"@uiw/react-color-editable-input-hsla": "2.1.1", | ||
"@uiw/react-color-editable-input-rgba": "2.1.1", | ||
"@uiw/react-color-github": "2.1.1", | ||
"@uiw/react-color-hue": "2.1.1", | ||
"@uiw/react-color-saturation": "2.1.1" | ||
"@uiw/color-convert": "2.2.0", | ||
"@uiw/react-color-alpha": "2.2.0", | ||
"@uiw/react-color-editable-input": "2.2.0", | ||
"@uiw/react-color-editable-input-hsla": "2.2.0", | ||
"@uiw/react-color-editable-input-rgba": "2.2.0", | ||
"@uiw/react-color-github": "2.2.0", | ||
"@uiw/react-color-hue": "2.2.0", | ||
"@uiw/react-color-saturation": "2.2.0" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
37416
17
896
+ Added@uiw/color-convert@2.2.0(transitive)
+ Added@uiw/react-color-alpha@2.2.0(transitive)
+ Added@uiw/react-color-editable-input@2.2.0(transitive)
+ Added@uiw/react-color-editable-input-hsla@2.2.0(transitive)
+ Added@uiw/react-color-editable-input-rgba@2.2.0(transitive)
+ Added@uiw/react-color-github@2.2.0(transitive)
+ Added@uiw/react-color-hue@2.2.0(transitive)
+ Added@uiw/react-color-saturation@2.2.0(transitive)
+ Added@uiw/react-color-swatch@2.2.0(transitive)
+ Added@uiw/react-drag-event-interactive@2.2.0(transitive)
- Removed@uiw/color-convert@2.1.1(transitive)
- Removed@uiw/react-color-alpha@2.1.1(transitive)
- Removed@uiw/react-color-editable-input@2.1.1(transitive)
- Removed@uiw/react-color-editable-input-hsla@2.1.1(transitive)
- Removed@uiw/react-color-editable-input-rgba@2.1.1(transitive)
- Removed@uiw/react-color-github@2.1.1(transitive)
- Removed@uiw/react-color-hue@2.1.1(transitive)
- Removed@uiw/react-color-saturation@2.1.1(transitive)
- Removed@uiw/react-color-swatch@2.1.1(transitive)
- Removed@uiw/react-drag-event-interactive@2.1.1(transitive)
Updated@uiw/color-convert@2.2.0
Updated@uiw/react-color-alpha@2.2.0
Updated@uiw/react-color-hue@2.2.0