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
1
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.0.0 to 1.0.1

18

lib/Arrow.js

@@ -7,8 +7,10 @@ "use strict";

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = Arrow;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

@@ -23,3 +25,3 @@ var _react = _interopRequireWildcard(require("react"));

var style = props.style,
other = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var btn = (0, _react.useRef)(null);

@@ -32,5 +34,5 @@ var handleMouseEnter = (0, _react.useCallback)(function (evn) {

}, []);
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2["default"])({
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
ref: btn,
style: (0, _extends2["default"])({
style: (0, _objectSpread2["default"])({
marginLeft: 5,

@@ -41,3 +43,3 @@ cursor: 'pointer',

}, style)
}, other, {
}, other), {}, {
onMouseEnter: handleMouseEnter,

@@ -59,4 +61,2 @@ onMouseLeave: handleMouseLeave,

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

@@ -7,9 +7,13 @@ "use strict";

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.ChromeInputType = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));

@@ -58,3 +62,3 @@

onChange = props.onChange,
other = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var hsva = typeof color === 'string' && (0, _colorConvert.validHex)(color) ? (0, _colorConvert.hexToHsva)(color) : color || {

@@ -72,4 +76,5 @@ h: 0,

var _useState = (0, _react.useState)(inputType),
type = _useState[0],
setType = _useState[1];
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
type = _useState2[0],
setType = _useState2[1];

@@ -98,3 +103,3 @@ var handleClick = function handleClick() {

};
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorGithub["default"], (0, _extends2["default"])({
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorGithub["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
ref: ref,

@@ -111,3 +116,3 @@ color: hsva,

placement: _reactColorGithub.GithubPlacement.TopLeft
}, other, {
}, other), {}, {
addonAfter: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {

@@ -121,3 +126,3 @@ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorSaturation["default"], {

onChange: function onChange(newColor) {
handleChange((0, _extends2["default"])({}, hsva, newColor, {
handleChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, hsva), newColor), {}, {
a: hsva.a

@@ -171,3 +176,3 @@ }));

onChange: function onChange(newHue) {
handleChange((0, _extends2["default"])({}, hsva, newHue));
handleChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, hsva), newHue));
}

@@ -185,3 +190,3 @@ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColorAlpha["default"], {

onChange: function onChange(newAlpha) {
handleChange((0, _extends2["default"])({}, hsva, newAlpha));
handleChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, hsva), newAlpha));
}

@@ -229,3 +234,3 @@ })]

if (typeof value === 'string') {
handleChange((0, _colorConvert.hexToHsva)(/^#/.test(value) ? value : "#" + value));
handleChange((0, _colorConvert.hexToHsva)(/^#/.test(value) ? value : "#".concat(value)));
}

@@ -232,0 +237,0 @@ }

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

@@ -33,14 +33,14 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"dependencies": {
"@babel/runtime": "7.15.3",
"@babel/runtime": "7.15.4",
"@uiw/color-convert": "^1.0.0",
"@uiw/react-color-alpha": "^1.0.0",
"@uiw/react-color-editable-input": "^1.0.0",
"@uiw/react-color-editable-input-hsla": "^1.0.0",
"@uiw/react-color-editable-input-rgba": "^1.0.0",
"@uiw/react-color-github": "^1.0.0",
"@uiw/react-color-hue": "^1.0.0",
"@uiw/react-color-saturation": "^1.0.0"
"@uiw/react-color-alpha": "^1.0.1",
"@uiw/react-color-editable-input": "^1.0.1",
"@uiw/react-color-editable-input-hsla": "^1.0.1",
"@uiw/react-color-editable-input-rgba": "^1.0.1",
"@uiw/react-color-github": "^1.0.1",
"@uiw/react-color-hue": "^1.0.1",
"@uiw/react-color-saturation": "^1.0.1"
},
"devDependencies": {
"@types/react": "17.0.19",
"@types/react": "17.0.20",
"@types/react-dom": "17.0.9",

@@ -47,0 +47,0 @@ "@types/react-test-renderer": "17.0.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