@uiw/react-color-editable-input-hsla
Advanced tools
Comparing version 1.1.0 to 1.1.1
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,32 +8,24 @@ value: true | ||
exports["default"] = void 0; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _reactColorEditableInputRgba = _interopRequireDefault(require("@uiw/react-color-editable-input-rgba")); | ||
var _colorConvert = require("@uiw/color-convert"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["prefixCls", "hsva", "hProps", "sProps", "lProps", "aProps", "className", "onChange"]; | ||
var EditableInputHSLA = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) { | ||
var _props$prefixCls = props.prefixCls, | ||
prefixCls = _props$prefixCls === void 0 ? 'w-color-editable-input-hsla' : _props$prefixCls, | ||
hsva = props.hsva, | ||
_props$hProps = props.hProps, | ||
hProps = _props$hProps === void 0 ? {} : _props$hProps, | ||
_props$sProps = props.sProps, | ||
sProps = _props$sProps === void 0 ? {} : _props$sProps, | ||
_props$lProps = props.lProps, | ||
lProps = _props$lProps === void 0 ? {} : _props$lProps, | ||
_props$aProps = props.aProps, | ||
aProps = _props$aProps === void 0 ? {} : _props$aProps, | ||
className = props.className, | ||
onChange = props.onChange, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
prefixCls = _props$prefixCls === void 0 ? 'w-color-editable-input-hsla' : _props$prefixCls, | ||
hsva = props.hsva, | ||
_props$hProps = props.hProps, | ||
hProps = _props$hProps === void 0 ? {} : _props$hProps, | ||
_props$sProps = props.sProps, | ||
sProps = _props$sProps === void 0 ? {} : _props$sProps, | ||
_props$lProps = props.lProps, | ||
lProps = _props$lProps === void 0 ? {} : _props$lProps, | ||
_props$aProps = props.aProps, | ||
aProps = _props$aProps === void 0 ? {} : _props$aProps, | ||
className = props.className, | ||
onChange = props.onChange, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
var hsla = hsva ? (0, _colorConvert.hsvaToHsla)(hsva) : { | ||
@@ -46,3 +37,2 @@ h: 0, | ||
}; | ||
var handleChange = function handleChange(value, type, evn) { | ||
@@ -57,3 +47,2 @@ if (typeof value === 'number') { | ||
} | ||
if (type === 's') { | ||
@@ -66,3 +55,2 @@ if (value < 0) value = 0; | ||
} | ||
if (type === 'l') { | ||
@@ -75,3 +63,2 @@ if (value < 0) value = 0; | ||
} | ||
if (type === 'a') { | ||
@@ -86,3 +73,2 @@ if (value < 0) value = 0; | ||
}; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorEditableInputRgba["default"], (0, _objectSpread2["default"])({ | ||
@@ -126,3 +112,2 @@ ref: ref, | ||
}); | ||
EditableInputHSLA.displayName = 'EditableInputHSLA'; | ||
@@ -129,0 +114,0 @@ var _default = EditableInputHSLA; |
@@ -10,13 +10,12 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
var { | ||
prefixCls = 'w-color-editable-input-hsla', | ||
hsva, | ||
hProps = {}, | ||
sProps = {}, | ||
lProps = {}, | ||
aProps = {}, | ||
className, | ||
onChange | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
prefixCls = 'w-color-editable-input-hsla', | ||
hsva, | ||
hProps = {}, | ||
sProps = {}, | ||
lProps = {}, | ||
aProps = {}, | ||
className, | ||
onChange | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
var hsla = hsva ? hsvaToHsla(hsva) : { | ||
@@ -28,3 +27,2 @@ h: 0, | ||
}; | ||
var handleChange = (value, type, evn) => { | ||
@@ -39,3 +37,2 @@ if (typeof value === 'number') { | ||
} | ||
if (type === 's') { | ||
@@ -48,3 +45,2 @@ if (value < 0) value = 0; | ||
} | ||
if (type === 'l') { | ||
@@ -57,3 +53,2 @@ if (value < 0) value = 0; | ||
} | ||
if (type === 'a') { | ||
@@ -68,3 +63,2 @@ if (value < 0) value = 0; | ||
}; | ||
return /*#__PURE__*/_jsx(EditableInputRGBA, _extends({ | ||
@@ -71,0 +65,0 @@ ref: ref, |
{ | ||
"name": "@uiw/react-color-editable-input-hsla", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Color Editable Input HSLA", | ||
@@ -40,6 +40,6 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@babel/runtime": "~7.18.0", | ||
"@uiw/color-convert": "1.1.0", | ||
"@uiw/react-color-editable-input-rgba": "1.1.0" | ||
"@babel/runtime": "~7.19.0", | ||
"@uiw/color-convert": "1.1.1", | ||
"@uiw/react-color-editable-input-rgba": "1.1.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
26353
+ Added@babel/runtime@7.19.4(transitive)
+ Added@uiw/color-convert@1.1.1(transitive)
+ Added@uiw/react-color-editable-input@1.1.1(transitive)
+ Added@uiw/react-color-editable-input-rgba@1.1.1(transitive)
- Removed@babel/runtime@7.18.9(transitive)
- Removed@uiw/color-convert@1.1.0(transitive)
- Removed@uiw/react-color-editable-input@1.1.0(transitive)
- Removed@uiw/react-color-editable-input-rgba@1.1.0(transitive)
Updated@babel/runtime@~7.19.0
Updated@uiw/color-convert@1.1.1