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

react-slider

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-slider - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

6

package.json
{
"name": "react-slider",
"version": "0.7.0",
"version": "0.8.0",
"description": "Slider component for React",

@@ -32,4 +32,6 @@ "main": "react-slider.js",

"peerDependencies": {
"react": ">=0.14 || ^15.0.0"
"react": ">=0.14 || ^15.4",
"prop-types": "^15.4",
"create-react-class": "^15.4"
}
}
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['react'], factory);
define(['react','prop-types','create-react-class'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('react'));
module.exports = factory(require('react'),require('prop-types'),require('create-react-class'));
} else {
root.ReactSlider = factory(root.React);
root.ReactSlider = factory(root.React,root.PropTypes,root.createReactClass);
}
}(this, function (React) {
}(this, function (React, PropTypes, createReactClass) {

@@ -47,3 +47,3 @@ /**

var ReactSlider = React.createClass({
var ReactSlider = createReactClass({
displayName: 'ReactSlider',

@@ -56,3 +56,3 @@

*/
min: React.PropTypes.number,
min: PropTypes.number,

@@ -62,3 +62,3 @@ /**

*/
max: React.PropTypes.number,
max: PropTypes.number,

@@ -70,3 +70,3 @@ /**

*/
step: React.PropTypes.number,
step: PropTypes.number,

@@ -77,3 +77,3 @@ /**

*/
minDistance: React.PropTypes.number,
minDistance: PropTypes.number,

@@ -88,5 +88,5 @@ /**

*/
defaultValue: React.PropTypes.oneOfType([
React.PropTypes.number,
React.PropTypes.arrayOf(React.PropTypes.number)
defaultValue: PropTypes.oneOfType([
PropTypes.number,
PropTypes.arrayOf(PropTypes.number)
]),

@@ -97,5 +97,5 @@

*/
value: React.PropTypes.oneOfType([
React.PropTypes.number,
React.PropTypes.arrayOf(React.PropTypes.number)
value: PropTypes.oneOfType([
PropTypes.number,
PropTypes.arrayOf(PropTypes.number)
]),

@@ -106,3 +106,3 @@

*/
orientation: React.PropTypes.oneOf(['horizontal', 'vertical']),
orientation: PropTypes.oneOf(['horizontal', 'vertical']),

@@ -112,3 +112,3 @@ /**

*/
className: React.PropTypes.string,
className: PropTypes.string,

@@ -121,3 +121,3 @@ /**

*/
handleClassName: React.PropTypes.string,
handleClassName: PropTypes.string,

@@ -127,3 +127,3 @@ /**

*/
handleActiveClassName: React.PropTypes.string,
handleActiveClassName: PropTypes.string,

@@ -133,3 +133,3 @@ /**

*/
withBars: React.PropTypes.bool,
withBars: PropTypes.bool,

@@ -141,3 +141,3 @@ /**

*/
barClassName: React.PropTypes.string,
barClassName: PropTypes.string,

@@ -148,3 +148,3 @@ /**

*/
pearling: React.PropTypes.bool,
pearling: PropTypes.bool,

@@ -154,3 +154,3 @@ /**

*/
disabled: React.PropTypes.bool,
disabled: PropTypes.bool,

@@ -160,3 +160,3 @@ /**

*/
snapDragDisabled: React.PropTypes.bool,
snapDragDisabled: PropTypes.bool,

@@ -166,3 +166,3 @@ /**

*/
invert: React.PropTypes.bool,
invert: PropTypes.bool,

@@ -172,3 +172,3 @@ /**

*/
onBeforeChange: React.PropTypes.func,
onBeforeChange: PropTypes.func,

@@ -178,3 +178,3 @@ /**

*/
onChange: React.PropTypes.func,
onChange: PropTypes.func,

@@ -184,3 +184,3 @@ /**

*/
onAfterChange: React.PropTypes.func,
onAfterChange: PropTypes.func,

@@ -191,3 +191,3 @@ /**

*/
onSliderClick: React.PropTypes.func
onSliderClick: PropTypes.func
},

@@ -333,3 +333,7 @@

_calcOffset: function (value) {
var ratio = (value - this.props.min) / (this.props.max - this.props.min);
var range = this.props.max - this.props.min;
if (range === 0) {
return 0;
}
var ratio = (value - this.props.min) / range;
return ratio * this.state.upperBound;

@@ -475,3 +479,3 @@ },

if (document.activeElement && document.activeElement != document.body) {
document.activeElement.blur();
document.activeElement.blur && document.activeElement.blur();
}

@@ -478,0 +482,0 @@

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