Skip to content

Commit

Permalink
Release v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchin committed Apr 19, 2016
1 parent 0ae2fe6 commit 794e6de
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dist/react-input-range.js",
"dist/react-input-range.css"
],
"version": "0.6.2",
"version": "0.7.0",
"description": "React component for inputting numeric values within a range",
"homepage": "https://github.com/davidchin/react-input-range",
"authors": [
Expand Down
15 changes: 14 additions & 1 deletion dist/react-input-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ var _propTypes = require('./propTypes');
var internals = new WeakMap();

var KeyCode = {
DOWN_ARROW: 40,
LEFT_ARROW: 37,
RIGHT_ARROW: 39
RIGHT_ARROW: 39,
UP_ARROW: 38
};

function isWithinRange(inputRange, values) {
Expand Down Expand Up @@ -152,6 +154,8 @@ function renderSliders(inputRange) {
}

var slider = _react2['default'].createElement(_Slider2['default'], {
ariaLabelledby: inputRange.props.ariaLabelledby,
ariaControls: inputRange.props.ariaControls,
classNames: classNames,
key: key,
maxValue: maxValue,
Expand Down Expand Up @@ -316,10 +320,14 @@ var InputRange = (function (_React$Component) {

switch (event.keyCode) {
case KeyCode.LEFT_ARROW:
case KeyCode.DOWN_ARROW:
event.preventDefault();
this.decrementValue(key);
break;

case KeyCode.RIGHT_ARROW:
case KeyCode.UP_ARROW:
event.preventDefault();
this.incrementValue(key);
break;

Expand All @@ -334,6 +342,8 @@ var InputRange = (function (_React$Component) {
return;
}

event.preventDefault();

var key = getKeyByPosition(this, position);

this.updatePosition(key, position);
Expand Down Expand Up @@ -485,6 +495,7 @@ exports['default'] = InputRange;

InputRange.propTypes = {
ariaLabelledby: _react2['default'].PropTypes.string,
ariaControls: _react2['default'].PropTypes.string,
classNames: _react2['default'].PropTypes.objectOf(_react2['default'].PropTypes.string),
defaultValue: _propTypes.maxMinValuePropType,
disabled: _react2['default'].PropTypes.bool,
Expand Down Expand Up @@ -704,6 +715,7 @@ var Slider = (function (_React$Component) {
),
_react2['default'].createElement('a', {
'aria-labelledby': this.props.ariaLabelledby,
'aria-controls': this.props.ariaControls,
'aria-valuemax': this.props.maxValue,
'aria-valuemin': this.props.minValue,
'aria-valuenow': this.props.value,
Expand All @@ -726,6 +738,7 @@ exports['default'] = Slider;

Slider.propTypes = {
ariaLabelledby: _react2['default'].PropTypes.string,
ariaControls: _react2['default'].PropTypes.string,
classNames: _react2['default'].PropTypes.objectOf(_react2['default'].PropTypes.string),
maxValue: _react2['default'].PropTypes.number,
minValue: _react2['default'].PropTypes.number,
Expand Down
Loading

0 comments on commit 794e6de

Please sign in to comment.