@uiw/react-color-slider
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,31 +8,22 @@ 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 _colorConvert = require("@uiw/color-convert"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["prefixCls", "className", "style", "onChange", "color", "lightness"]; | ||
var Slider = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) { | ||
var _props$prefixCls = props.prefixCls, | ||
prefixCls = _props$prefixCls === void 0 ? 'w-color-slider' : _props$prefixCls, | ||
className = props.className, | ||
style = props.style, | ||
onChange = props.onChange, | ||
color = props.color, | ||
_props$lightness = props.lightness, | ||
lightness = _props$lightness === void 0 ? [80, 65, 50, 35, 20] : _props$lightness, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
prefixCls = _props$prefixCls === void 0 ? 'w-color-slider' : _props$prefixCls, | ||
className = props.className, | ||
style = props.style, | ||
onChange = props.onChange, | ||
color = props.color, | ||
_props$lightness = props.lightness, | ||
lightness = _props$lightness === void 0 ? [80, 65, 50, 35, 20] : _props$lightness, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
var hsva = typeof color === 'string' && (0, _colorConvert.validHex)(color) ? (0, _colorConvert.hexToHsva)(color) : color || {}; | ||
var handleClick = function handleClick(hslStr, evn) { | ||
onChange && onChange((0, _colorConvert.color)((0, _colorConvert.hslStringToHsva)(hslStr)), evn); | ||
}; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
@@ -73,3 +63,2 @@ ref: ref, | ||
}); | ||
Slider.displayName = 'Slider'; | ||
@@ -76,0 +65,0 @@ var _default = Slider; |
@@ -9,17 +9,14 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
var { | ||
prefixCls = 'w-color-slider', | ||
className, | ||
style, | ||
onChange, | ||
color, | ||
lightness = [80, 65, 50, 35, 20] | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
prefixCls = 'w-color-slider', | ||
className, | ||
style, | ||
onChange, | ||
color, | ||
lightness = [80, 65, 50, 35, 20] | ||
} = props, | ||
other = _objectWithoutPropertiesLoose(props, _excluded); | ||
var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {}; | ||
var handleClick = (hslStr, evn) => { | ||
onChange && onChange(handleColor(hslStringToHsva(hslStr)), evn); | ||
}; | ||
return /*#__PURE__*/_jsx("div", _extends({ | ||
@@ -26,0 +23,0 @@ ref: ref, |
{ | ||
"name": "@uiw/react-color-slider", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Color Slider component for React.", | ||
@@ -37,6 +37,6 @@ "homepage": "https://uiwjs.github.io/react-color/#/slider", | ||
"dependencies": { | ||
"@babel/runtime": "~7.18.0", | ||
"@uiw/color-convert": "1.1.0", | ||
"@uiw/react-color-alpha": "1.1.0" | ||
"@babel/runtime": "~7.19.0", | ||
"@uiw/color-convert": "1.1.1", | ||
"@uiw/react-color-alpha": "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
19262
+ Added@babel/runtime@7.19.4(transitive)
+ Added@uiw/color-convert@1.1.1(transitive)
+ Added@uiw/react-color-alpha@1.1.1(transitive)
+ Added@uiw/react-drag-event-interactive@1.1.1(transitive)
- Removed@babel/runtime@7.18.9(transitive)
- Removed@uiw/color-convert@1.1.0(transitive)
- Removed@uiw/react-color-alpha@1.1.0(transitive)
- Removed@uiw/react-drag-event-interactive@1.1.0(transitive)
Updated@babel/runtime@~7.19.0
Updated@uiw/color-convert@1.1.1
Updated@uiw/react-color-alpha@1.1.1