@uiw/react-color-alpha
Advanced tools
Comparing version 1.1.3 to 1.1.4
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -14,3 +13,3 @@ value: true | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _colorConvert = require("@uiw/color-convert"); | ||
@@ -55,7 +54,7 @@ var _reactDragEventInteractive = _interopRequireDefault(require("@uiw/react-drag-event-interactive")); | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
var handleChange = (0, _react.useCallback)(function (offset) { | ||
var handleChange = function handleChange(offset) { | ||
onChange && onChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, hsva), {}, { | ||
a: direction === 'horizontal' ? offset.left : offset.top | ||
}), offset); | ||
}, [hsva]); | ||
}; | ||
var colorTo = (0, _colorConvert.hsvaToHslaString)(Object.assign({}, hsva, { | ||
@@ -62,0 +61,0 @@ a: 1 |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"]; | ||
import React, { useCallback } from 'react'; | ||
import React from 'react'; | ||
import { hsvaToHslaString } from '@uiw/color-convert'; | ||
@@ -29,7 +29,7 @@ import Interactive from '@uiw/react-drag-event-interactive'; | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
var handleChange = useCallback(offset => { | ||
var handleChange = offset => { | ||
onChange && onChange(_extends({}, hsva, { | ||
a: direction === 'horizontal' ? offset.left : offset.top | ||
}), offset); | ||
}, [hsva]); | ||
}; | ||
var colorTo = hsvaToHslaString(Object.assign({}, hsva, { | ||
@@ -36,0 +36,0 @@ a: 1 |
{ | ||
"name": "@uiw/react-color-alpha", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Color alpha", | ||
@@ -38,4 +38,4 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/color-convert": "1.1.3", | ||
"@uiw/react-drag-event-interactive": "1.1.3" | ||
"@uiw/color-convert": "1.1.4", | ||
"@uiw/react-drag-event-interactive": "1.1.4" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21505
463
+ Added@uiw/color-convert@1.1.4(transitive)
+ Added@uiw/react-drag-event-interactive@1.1.4(transitive)
- Removed@uiw/color-convert@1.1.3(transitive)
- Removed@uiw/react-drag-event-interactive@1.1.3(transitive)
Updated@uiw/color-convert@1.1.4