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

react-color

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-color - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

.flowconfig

6

docs/components/home/HomeFeature.jsx

@@ -130,5 +130,5 @@ 'use strict';

componentDidMount() {
var container = React.findDOMNode(this.refs.container);
var over = React.findDOMNode(this.refs.over);
var under = React.findDOMNode(this.refs.under);
var container = this.refs.container;
var over = this.refs.over;
var under = this.refs.under;
var containerHeight = container.getBoundingClientRect().top + container.clientHeight;

@@ -135,0 +135,0 @@ var overHeight = over.getBoundingClientRect().top + over.clientHeight;

'use strict';
var React = require('react');
var ReactDOM = require('react-dom');

@@ -11,3 +12,3 @@ var Home = require('./components/home/Home');

if (typeof document !== 'undefined') {
React.render(
ReactDOM.render(
React.createElement(Home),

@@ -14,0 +15,0 @@ document.getElementById('root')

@@ -1,114 +0,3 @@

var gulp = require('gulp');
var gutil = require('gulp-util');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
var babel = require('gulp-babel');
var mapStyles = require('react-map-styles');
var modify = require('gulp-modify');
gulp.task('docs', function(callback) {
var port = 9100;
var docs = Object.create(webpackConfig);
docs.entry = ['webpack-dev-server/client?http://localhost:' + port, 'webpack/hot/dev-server', docs.entry[0]];
docs.module.loaders[0].loaders.unshift('react-hot-loader');
docs.module.loaders[1].loaders.unshift('react-hot-loader');
docs.devtool = 'eval';
docs.debug = true;
new WebpackDevServer(webpack(docs), {
publicPath: '/' + docs.output.publicPath,
hot: true,
stats: {
cached: false,
cachedAssets: false,
colors: true,
exclude: ['node_modules', 'components'],
},
}).listen(port, 'localhost', function(err) {
if (err) throw new gutil.PluginError('webpack-dev-server', err);
gutil.log('[webpack-dev-server]', 'http://localhost:' + port + '/');
});
});
gulp.task('build', function(done) {
var build = Object.create(webpackConfig);
build.plugins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new webpack.optimize.DedupePlugin(),
];
webpack(build, function(err, stats) {
if (err) {
throw new Error(err);
}
done();
});
});
gulp.task('bundle', function(done) {
return gulp.src('./src/**/*')
.pipe(modify({
fileModifier: function(file, contents) {
return mapStyles(contents);
},
}))
.pipe(babel())
.pipe(gulp.dest('lib'));
});
gulp.task('bundle-material', function(done) {
return gulp.src('./modules/react-material-design/src/**/*')
.pipe(modify({
fileModifier: function(file, contents) {
return mapStyles(contents);
},
}))
.pipe(babel())
.pipe(gulp.dest('./modules/react-material-design/lib'));
});
gulp.task('bundle-docs', function(done) {
return gulp.src('./modules/react-docs/src/**/*')
.pipe(modify({
fileModifier: function(file, contents) {
return mapStyles(contents);
},
}))
.pipe(babel())
.pipe(gulp.dest('./modules/react-docs/lib'));
});
gulp.task('bundle-layout', function(done) {
return gulp.src('./modules/react-basic-layout/src/**/*')
.pipe(modify({
fileModifier: function(file, contents) {
return mapStyles(contents);
},
}))
.pipe(babel())
.pipe(gulp.dest('./modules/react-basic-layout/lib'));
});
gulp.task('bundle-move', function(done) {
return gulp.src('./modules/react-move/src/**/*')
.pipe(modify({
fileModifier: function(file, contents) {
return mapStyles(contents);
},
}))
.pipe(babel())
.pipe(gulp.dest('./modules/react-move/lib'));
});
gulp.task('prod', ['build', 'bundle', 'bundle-material', 'bundle-docs', 'bundle-layout', 'bundle-move']);
require('babel/register');
require('require-dir')('./gulp');
require('gulp').task('dist', ['docs:dist', 'lib:dist', 'modules:dist']);
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -178,3 +177,3 @@

value: function showHighlight() {
React.findDOMNode(this.refs.iconHighlight).style.display = 'block';
this.refs.iconHighlight.style.display = 'block';
}

@@ -184,3 +183,3 @@ }, {

value: function hideHighlight() {
React.findDOMNode(this.refs.iconHighlight).style.display = 'none';
this.refs.iconHighlight.style.display = 'none';
}

@@ -187,0 +186,0 @@ }, {

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -35,3 +34,3 @@

this.state = merge(color.toState(props.color), {
this.state = merge(color.toState(props.color, 0), {
visible: props.display

@@ -38,0 +37,0 @@ });

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -75,3 +74,3 @@

!skip && e.preventDefault();
var container = React.findDOMNode(this.refs.container);
var container = this.refs.container;
var containerWidth = container.clientWidth;

@@ -78,0 +77,0 @@ var left = (e.pageX || e.touches[0].pageX) - (container.getBoundingClientRect().left + window.pageXOffset);

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -59,3 +58,3 @@

value: function componentWillReceiveProps(nextProps) {
var input = React.findDOMNode(this.refs.input);
var input = this.refs.input;
if (nextProps.value !== this.state.value) {

@@ -62,0 +61,0 @@ if (input === document.activeElement) {

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -73,3 +72,3 @@

!skip && e.preventDefault();
var container = React.findDOMNode(this.refs.container);
var container = this.refs.container;
var containerWidth = container.clientWidth;

@@ -76,0 +75,0 @@ var containerHeight = container.clientHeight;

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -72,3 +71,3 @@

!skip && e.preventDefault();
var container = React.findDOMNode(this.refs.container);
var container = this.refs.container;
var containerWidth = container.clientWidth;

@@ -75,0 +74,0 @@ var containerHeight = container.clientHeight;

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -4,0 +3,0 @@

@@ -53,3 +53,3 @@ 'use strict';

var domFiles = React.findDOMNode(this.refs.files) && React.findDOMNode(this.refs.files).children;
var domFiles = this.refs.files && this.refs.files.children;

@@ -80,3 +80,3 @@ if (domFiles) {

value: function attachSidebar() {
var sidebarTop = React.findDOMNode(this.refs.sidebar).getBoundingClientRect().top;
var sidebarTop = this.refs.sidebar.getBoundingClientRect().top;

@@ -83,0 +83,0 @@ if (sidebarTop <= 0 && this.state.sidebarFixed === false) {

@@ -37,3 +37,3 @@ 'use strict';

var domFiles = React.findDOMNode(this.refs.files) && React.findDOMNode(this.refs.files).children;
var domFiles = this.refs.files && this.refs.files.children;

@@ -61,3 +61,3 @@ if (domFiles) {

attachSidebar() {
var sidebarTop = React.findDOMNode(this.refs.sidebar).getBoundingClientRect().top;
var sidebarTop = this.refs.sidebar.getBoundingClientRect().top;

@@ -64,0 +64,0 @@ if (sidebarTop <= 0 && this.state.sidebarFixed === false) {

@@ -163,3 +163,3 @@ 'use strict';

// slide the indicator
var indicator = React.findDOMNode(this.refs.indicator);
var indicator = this.refs.indicator;
indicator.style.left = selectedLeft + 'px';

@@ -166,0 +166,0 @@ indicator.style.width = selectedNode.offsetWidth + 'px';

@@ -145,3 +145,3 @@ 'use strict';

// slide the indicator
var indicator = React.findDOMNode(this.refs.indicator);
var indicator = this.refs.indicator;
indicator.style.left = selectedLeft + 'px';

@@ -148,0 +148,0 @@ indicator.style.width = selectedNode.offsetWidth + 'px';

@@ -39,3 +39,3 @@ 'use strict';

value: function componentDidMount() {
var animate = React.findDOMNode(this.refs.outer);
var animate = this.refs.outer;

@@ -42,0 +42,0 @@ setTimeout((function () {

@@ -21,3 +21,3 @@ 'use strict';

componentDidMount() {
var animate = React.findDOMNode(this.refs.outer);
var animate = this.refs.outer;

@@ -24,0 +24,0 @@ setTimeout((function() {

{
"name": "react-color",
"version": "1.1.2",
"version": "1.2.0",
"description": "A Collection of Color Pickers from Sketch, Photoshop, Chrome & more",

@@ -32,3 +32,4 @@ "main": "lib/index.js",

"merge": "^1.2.0",
"react": "^0.13.3",
"react": "^0.14.0",
"react-dom": "^0.14.0",
"reactcss": "^0.3.2",

@@ -42,2 +43,3 @@ "tinycolor2": "^1.1.2"

"css-loader": "^0.15.6",
"event-stream": "^3.3.1",
"gulp": "^3.9.0",

@@ -55,2 +57,3 @@ "gulp-babel": "^5.2.0",

"remarkable": "^1.6.0",
"require-dir": "^0.3.0",
"style-loader": "^0.12.3",

@@ -57,0 +60,0 @@ "webpack": "^1.11.0",

@@ -1,2 +0,2 @@

'use strict';
'use strict'; /* @flow */

@@ -7,3 +7,3 @@ var tinycolor = require('../../modules/tinycolor2');

simpleCheckForValidColor: function(data) {
simpleCheckForValidColor: function(data: any): any {
var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'a', 'v'];

@@ -27,3 +27,3 @@ var checked = 0;

toState: function(data, oldHue) {
toState: function(data: any, oldHue: number): any {
var color = tinycolor(data);

@@ -46,3 +46,3 @@ var hsl = color.toHsl();

isValidHex: function(hex) {
isValidHex: function(hex: string): boolean {
return tinycolor(hex).isValid();

@@ -49,0 +49,0 @@ },

@@ -21,3 +21,3 @@ var path = require('path');

exclude: [/node_modules/, /modules/],
loaders: ['babel-loader'],
loaders: ['babel-loader', 'react-map-styles'],
}, {

@@ -24,0 +24,0 @@ test: /\.jsx$/,

Sorry, the diff of this file is too big to display

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