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

@uiw/react-color-alpha

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.1.3 to 1.1.4

7

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", {

@@ -14,3 +13,3 @@ value: true

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var _react = _interopRequireDefault(require("react"));
var _colorConvert = require("@uiw/color-convert");

@@ -55,7 +54,7 @@ var _reactDragEventInteractive = _interopRequireDefault(require("@uiw/react-drag-event-interactive"));

other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var handleChange = (0, _react.useCallback)(function (offset) {
var handleChange = function handleChange(offset) {
onChange && onChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, hsva), {}, {
a: direction === 'horizontal' ? offset.left : offset.top
}), offset);
}, [hsva]);
};
var colorTo = (0, _colorConvert.hsvaToHslaString)(Object.assign({}, hsva, {

@@ -62,0 +61,0 @@ a: 1

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"];
import React, { useCallback } from 'react';
import React from 'react';
import { hsvaToHslaString } from '@uiw/color-convert';

@@ -29,7 +29,7 @@ import Interactive from '@uiw/react-drag-event-interactive';

other = _objectWithoutPropertiesLoose(props, _excluded);
var handleChange = useCallback(offset => {
var handleChange = offset => {
onChange && onChange(_extends({}, hsva, {
a: direction === 'horizontal' ? offset.left : offset.top
}), offset);
}, [hsva]);
};
var colorTo = hsvaToHslaString(Object.assign({}, hsva, {

@@ -36,0 +36,0 @@ a: 1

{
"name": "@uiw/react-color-alpha",
"version": "1.1.3",
"version": "1.1.4",
"description": "Color alpha",

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

"dependencies": {
"@uiw/color-convert": "1.1.3",
"@uiw/react-drag-event-interactive": "1.1.3"
"@uiw/color-convert": "1.1.4",
"@uiw/react-drag-event-interactive": "1.1.4"
},

@@ -42,0 +42,0 @@ "devDependencies": {

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