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

@uiw/react-color-chrome

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.1.0 to 1.1.1

11

cjs/Arrow.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
Object.defineProperty(exports, "__esModule", {

@@ -11,16 +9,10 @@ value: true

exports["default"] = Arrow;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["style"];
function Arrow(props) {
var style = props.style,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var btn = (0, _react.useRef)(null);

@@ -58,4 +50,3 @@ var handleMouseEnter = (0, _react.useCallback)(function (evn) {

}
module.exports = exports.default;
//# sourceMappingURL=Arrow.js.map

52

cjs/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
Object.defineProperty(exports, "__esModule", {

@@ -11,35 +9,19 @@ value: true

exports["default"] = exports.ChromeInputType = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var _colorConvert = require("@uiw/color-convert");
var _reactColorGithub = _interopRequireWildcard(require("@uiw/react-color-github"));
var _reactColorSaturation = _interopRequireDefault(require("@uiw/react-color-saturation"));
var _reactColorHue = _interopRequireDefault(require("@uiw/react-color-hue"));
var _reactColorAlpha = _interopRequireDefault(require("@uiw/react-color-alpha"));
var _reactColorEditableInput = _interopRequireDefault(require("@uiw/react-color-editable-input"));
var _reactColorEditableInputRgba = _interopRequireDefault(require("@uiw/react-color-editable-input-rgba"));
var _reactColorEditableInputHsla = _interopRequireDefault(require("@uiw/react-color-editable-input-hsla"));
var _Arrow = _interopRequireDefault(require("./Arrow"));
var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["prefixCls", "className", "style", "color", "inputType", "rectProps", "onChange"];
var ChromeInputType;
exports.ChromeInputType = ChromeInputType;
(function (ChromeInputType) {

@@ -50,15 +32,14 @@ ChromeInputType["HEXA"] = "hexa";

})(ChromeInputType || (exports.ChromeInputType = ChromeInputType = {}));
var Chrome = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'w-color-chrome' : _props$prefixCls,
className = props.className,
style = props.style,
color = props.color,
_props$inputType = props.inputType,
inputType = _props$inputType === void 0 ? ChromeInputType.RGBA : _props$inputType,
_props$rectProps = props.rectProps,
rectProps = _props$rectProps === void 0 ? {} : _props$rectProps,
onChange = props.onChange,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
prefixCls = _props$prefixCls === void 0 ? 'w-color-chrome' : _props$prefixCls,
className = props.className,
style = props.style,
color = props.color,
_props$inputType = props.inputType,
inputType = _props$inputType === void 0 ? ChromeInputType.RGBA : _props$inputType,
_props$rectProps = props.rectProps,
rectProps = _props$rectProps === void 0 ? {} : _props$rectProps,
onChange = props.onChange,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var hsva = typeof color === 'string' && (0, _colorConvert.validHex)(color) ? (0, _colorConvert.hexToHsva)(color) : color || {

@@ -70,12 +51,9 @@ h: 0,

};
var handleChange = function handleChange(hsv) {
return onChange && onChange((0, _colorConvert.color)(hsv));
};
var _useState = (0, _react.useState)(inputType),
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
type = _useState2[0],
setType = _useState2[1];
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
type = _useState2[0],
setType = _useState2[1];
var handleClick = function handleClick() {

@@ -85,7 +63,5 @@ if (type === ChromeInputType.RGBA) {

}
if (type === ChromeInputType.HSLA) {
setType(ChromeInputType.HEXA);
}
if (type === ChromeInputType.HEXA) {

@@ -95,3 +71,2 @@ setType(ChromeInputType.RGBA);

};
var labelStyle = {

@@ -267,3 +242,2 @@ paddingTop: 6

});
Chrome.displayName = 'Chrome';

@@ -270,0 +244,0 @@ var _default = Chrome;

@@ -8,6 +8,5 @@ import _extends from "@babel/runtime/helpers/extends";

var {
style
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
style
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
var btn = useRef(null);

@@ -14,0 +13,0 @@ var handleMouseEnter = useCallback(evn => {

@@ -18,3 +18,2 @@ import _extends from "@babel/runtime/helpers/extends";

export var ChromeInputType;
(function (ChromeInputType) {

@@ -25,15 +24,13 @@ ChromeInputType["HEXA"] = "hexa";

})(ChromeInputType || (ChromeInputType = {}));
var Chrome = /*#__PURE__*/React.forwardRef((props, ref) => {
var {
prefixCls = 'w-color-chrome',
className,
style,
color,
inputType = ChromeInputType.RGBA,
rectProps = {},
onChange
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
prefixCls = 'w-color-chrome',
className,
style,
color,
inputType = ChromeInputType.RGBA,
rectProps = {},
onChange
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
var hsva = typeof color === 'string' && validHex(color) ? hexToHsva(color) : color || {

@@ -45,7 +42,4 @@ h: 0,

};
var handleChange = hsv => onChange && onChange(handleColor(hsv));
var [type, setType] = useState(inputType);
var handleClick = () => {

@@ -55,7 +49,5 @@ if (type === ChromeInputType.RGBA) {

}
if (type === ChromeInputType.HSLA) {
setType(ChromeInputType.HEXA);
}
if (type === ChromeInputType.HEXA) {

@@ -65,3 +57,2 @@ setType(ChromeInputType.RGBA);

};
var labelStyle = {

@@ -68,0 +59,0 @@ paddingTop: 6

{
"name": "@uiw/react-color-chrome",
"version": "1.1.0",
"version": "1.1.1",
"description": "Color Github Picker",

@@ -38,12 +38,12 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"dependencies": {
"@babel/runtime": "~7.18.0",
"@uiw/color-convert": "1.1.0",
"@uiw/react-color-alpha": "1.1.0",
"@uiw/react-color-editable-input": "1.1.0",
"@uiw/react-color-editable-input-hsla": "1.1.0",
"@uiw/react-color-editable-input-rgba": "1.1.0",
"@uiw/react-color-github": "1.1.0",
"@uiw/react-color-hue": "1.1.0",
"@uiw/react-color-saturation": "1.1.0"
"@babel/runtime": "~7.19.0",
"@uiw/color-convert": "1.1.1",
"@uiw/react-color-alpha": "1.1.1",
"@uiw/react-color-editable-input": "1.1.1",
"@uiw/react-color-editable-input-hsla": "1.1.1",
"@uiw/react-color-editable-input-rgba": "1.1.1",
"@uiw/react-color-github": "1.1.1",
"@uiw/react-color-hue": "1.1.1",
"@uiw/react-color-saturation": "1.1.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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