uiuiui-color
Advanced tools
Comparing version 0.2.10 to 0.2.11
@@ -288,2 +288,14 @@ 'use strict'; | ||
}, { | ||
key: 'cancel', | ||
value: function cancel() { | ||
var _this4 = this; | ||
this.setState({ | ||
interacting: false, | ||
value: this.props.value | ||
}, function () { | ||
_this4.props.onCancel(); | ||
}); | ||
} | ||
}, { | ||
key: 'register', | ||
@@ -299,2 +311,5 @@ value: function register(el) { | ||
this.end(); | ||
} else if (this.props.shouldKeyDownCancelInteraction(e)) { | ||
e.stopImmediatePropagation(); | ||
this.cancel(); | ||
} | ||
@@ -308,2 +323,5 @@ } | ||
this.end(); | ||
} else if (this.props.shouldKeyUpCancelInteraction(e)) { | ||
e.stopImmediatePropagation(); | ||
this.cancel(); | ||
} | ||
@@ -314,3 +332,3 @@ } | ||
value: function render() { | ||
var _this4 = this; | ||
var _this5 = this; | ||
@@ -357,3 +375,3 @@ var _state = this.state, | ||
value: value, | ||
onChange: _this4.change | ||
onChange: _this5.change | ||
}); | ||
@@ -375,4 +393,7 @@ }) | ||
onEnd: noop, | ||
onCancel: noop, | ||
shouldKeyDownEndInteraction: noop, | ||
shouldKeyUpEndInteraction: noop, | ||
shouldKeyDownCancelInteraction: noop, | ||
shouldKeyUpCancelInteraction: noop, | ||
current: invariant | ||
@@ -379,0 +400,0 @@ }; |
@@ -280,2 +280,14 @@ import React from 'react'; | ||
}, { | ||
key: 'cancel', | ||
value: function cancel() { | ||
var _this4 = this; | ||
this.setState({ | ||
interacting: false, | ||
value: this.props.value | ||
}, function () { | ||
_this4.props.onCancel(); | ||
}); | ||
} | ||
}, { | ||
key: 'register', | ||
@@ -291,2 +303,5 @@ value: function register(el) { | ||
this.end(); | ||
} else if (this.props.shouldKeyDownCancelInteraction(e)) { | ||
e.stopImmediatePropagation(); | ||
this.cancel(); | ||
} | ||
@@ -300,2 +315,5 @@ } | ||
this.end(); | ||
} else if (this.props.shouldKeyUpCancelInteraction(e)) { | ||
e.stopImmediatePropagation(); | ||
this.cancel(); | ||
} | ||
@@ -306,3 +324,3 @@ } | ||
value: function render() { | ||
var _this4 = this; | ||
var _this5 = this; | ||
@@ -349,3 +367,3 @@ var _state = this.state, | ||
value: value, | ||
onChange: _this4.change | ||
onChange: _this5.change | ||
}); | ||
@@ -367,4 +385,7 @@ }) | ||
onEnd: noop, | ||
onCancel: noop, | ||
shouldKeyDownEndInteraction: noop, | ||
shouldKeyUpEndInteraction: noop, | ||
shouldKeyDownCancelInteraction: noop, | ||
shouldKeyUpCancelInteraction: noop, | ||
current: invariant | ||
@@ -371,0 +392,0 @@ }; |
{ | ||
"name": "uiuiui-color", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"main": "build/uiuiui-color.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "build/uiuiui-color.esm.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
321978
10047