Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-color-slider

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-color-slider - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

27

cjs/index.js
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc