Skip to content

Commit

Permalink
lib/dist: latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed May 3, 2017
1 parent 9a027e2 commit 6ed5e9f
Show file tree
Hide file tree
Showing 10 changed files with 18,882 additions and 14,539 deletions.
59 changes: 33 additions & 26 deletions dist/react-tappable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports.Mixin = TappableMixin;
(function (global){
'use strict';

var PropTypes = (typeof window !== "undefined" ? window['PropTypes'] : typeof global !== "undefined" ? global['PropTypes'] : null);
var React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null);
var ReactDOM = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null);

Expand All @@ -33,24 +34,24 @@ function getTouchProps(touch) {

var Mixin = {
propTypes: {
moveThreshold: React.PropTypes.number, // pixels to move before cancelling tap
activeDelay: React.PropTypes.number, // ms to wait before adding the `-active` class
pressDelay: React.PropTypes.number, // ms to wait before detecting a press
pressMoveThreshold: React.PropTypes.number, // pixels to move before cancelling press
preventDefault: React.PropTypes.bool, // whether to preventDefault on all events
stopPropagation: React.PropTypes.bool, // whether to stopPropagation on all events

onTap: React.PropTypes.func, // fires when a tap is detected
onPress: React.PropTypes.func, // fires when a press is detected
onTouchStart: React.PropTypes.func, // pass-through touch event
onTouchMove: React.PropTypes.func, // pass-through touch event
onTouchEnd: React.PropTypes.func, // pass-through touch event
onMouseDown: React.PropTypes.func, // pass-through mouse event
onMouseUp: React.PropTypes.func, // pass-through mouse event
onMouseMove: React.PropTypes.func, // pass-through mouse event
onMouseOut: React.PropTypes.func, // pass-through mouse event
onKeyDown: React.PropTypes.func, // pass-through key event
onKeyUp: React.PropTypes.func },
moveThreshold: PropTypes.number, // pixels to move before cancelling tap
activeDelay: PropTypes.number, // ms to wait before adding the `-active` class
pressDelay: PropTypes.number, // ms to wait before detecting a press
pressMoveThreshold: PropTypes.number, // pixels to move before cancelling press
preventDefault: PropTypes.bool, // whether to preventDefault on all events
stopPropagation: PropTypes.bool, // whether to stopPropagation on all events

onTap: PropTypes.func, // fires when a tap is detected
onPress: PropTypes.func, // fires when a press is detected
onTouchStart: PropTypes.func, // pass-through touch event
onTouchMove: PropTypes.func, // pass-through touch event
onTouchEnd: PropTypes.func, // pass-through touch event
onMouseDown: PropTypes.func, // pass-through mouse event
onMouseUp: PropTypes.func, // pass-through mouse event
onMouseMove: PropTypes.func, // pass-through mouse event
onMouseOut: PropTypes.func, // pass-through mouse event
onKeyDown: PropTypes.func, // pass-through key event
onKeyUp: PropTypes.func },

// pass-through key event
getDefaultProps: function getDefaultProps() {
Expand Down Expand Up @@ -90,7 +91,11 @@ var Mixin = {
this.initScrollDetection();
this.initPressDetection(event, this.endTouch);
this.initTouchmoveDetection();
this._activeTimeout = setTimeout(this.makeActive, this.props.activeDelay);
if (this.props.activeDelay > 0) {
this._activeTimeout = setTimeout(this.makeActive, this.props.activeDelay);
} else {
this.makeActive();
}
} else if (this.onPinchStart && (this.props.onPinchStart || this.props.onPinchMove || this.props.onPinchEnd) && event.touches.length === 2) {
this.onPinchStart(event);
}
Expand Down Expand Up @@ -366,6 +371,8 @@ module.exports = Mixin;

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; };

var createReactClass = (typeof window !== "undefined" ? window['createReactClass'] : typeof global !== "undefined" ? global['createReactClass'] : null);
var PropTypes = (typeof window !== "undefined" ? window['PropTypes'] : typeof global !== "undefined" ? global['PropTypes'] : null);
var React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null);
var touchStyles = require('./touchStyles');

Expand All @@ -374,18 +381,18 @@ var touchStyles = require('./touchStyles');
* ==================
*/
module.exports = function (mixins) {
return React.createClass({
return createReactClass({
displayName: 'Tappable',

mixins: mixins,

propTypes: {
component: React.PropTypes.any, // component to create
className: React.PropTypes.string, // optional className
classBase: React.PropTypes.string, // base for generated classNames
classes: React.PropTypes.object, // object containing the active and inactive class names
style: React.PropTypes.object, // additional style properties for the component
disabled: React.PropTypes.bool // only applies to buttons
component: PropTypes.any, // component to create
className: PropTypes.string, // optional className
classBase: PropTypes.string, // base for generated classNames
classes: PropTypes.object, // object containing the active and inactive class names
style: PropTypes.object, // additional style properties for the component
disabled: PropTypes.bool // only applies to buttons
},

getDefaultProps: function getDefaultProps() {
Expand Down
2 changes: 1 addition & 1 deletion dist/react-tappable.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6ed5e9f

Please sign in to comment.