Socket
Socket
Sign inDemoInstall

rc-rate

Package Overview
Dependencies
4
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 2.4.1

4

es/Rate.js

@@ -119,2 +119,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

index: index,
count: count,
disabled: disabled,

@@ -141,3 +142,4 @@ prefixCls: prefixCls + '-star',

onKeyDown: disabled ? null : this.onKeyDown,
ref: this.saveRate
ref: this.saveRate,
role: 'radiogroup'
},

@@ -144,0 +146,0 @@ stars

@@ -34,2 +34,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

onClick(e, index);
}, _this.onKeyDown = function (e) {
var _this$props3 = _this.props,
onClick = _this$props3.onClick,
index = _this$props3.index;
if (e.keyCode === 13) {
onClick(e, index);
}
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -66,7 +74,11 @@ }

var onHover = this.onHover,
onClick = this.onClick;
onClick = this.onClick,
onKeyDown = this.onKeyDown;
var _props2 = this.props,
disabled = _props2.disabled,
prefixCls = _props2.prefixCls,
character = _props2.character;
character = _props2.character,
index = _props2.index,
count = _props2.count,
value = _props2.value;

@@ -78,3 +90,9 @@ return React.createElement(

onClick: disabled ? null : onClick,
onMouseMove: disabled ? null : onHover
onKeyDown: disabled ? null : onKeyDown,
onMouseMove: disabled ? null : onHover,
role: 'radio',
'aria-checked': value > index ? 'true' : 'false',
'aria-posinset': index,
'aria-setsize': count,
tabIndex: 0
},

@@ -106,4 +124,5 @@ React.createElement(

character: PropTypes.node,
focused: PropTypes.bool
focused: PropTypes.bool,
count: PropTypes.number
};
export default Star;

@@ -0,1 +1,5 @@

## 2.4.1
- Better accessibility support.
## 2.4.0

@@ -2,0 +6,0 @@

@@ -143,2 +143,3 @@ 'use strict';

index: index,
count: count,
disabled: disabled,

@@ -165,3 +166,4 @@ prefixCls: prefixCls + '-star',

onKeyDown: disabled ? null : this.onKeyDown,
ref: this.saveRate
ref: this.saveRate,
role: 'radiogroup'
},

@@ -168,0 +170,0 @@ stars

@@ -45,2 +45,10 @@ 'use strict';

onClick(e, index);
}, _this.onKeyDown = function (e) {
var _this$props3 = _this.props,
onClick = _this$props3.onClick,
index = _this$props3.index;
if (e.keyCode === 13) {
onClick(e, index);
}
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -77,7 +85,11 @@ }

var onHover = this.onHover,
onClick = this.onClick;
onClick = this.onClick,
onKeyDown = this.onKeyDown;
var _props2 = this.props,
disabled = _props2.disabled,
prefixCls = _props2.prefixCls,
character = _props2.character;
character = _props2.character,
index = _props2.index,
count = _props2.count,
value = _props2.value;

@@ -89,3 +101,9 @@ return _react2['default'].createElement(

onClick: disabled ? null : onClick,
onMouseMove: disabled ? null : onHover
onKeyDown: disabled ? null : onKeyDown,
onMouseMove: disabled ? null : onHover,
role: 'radio',
'aria-checked': value > index ? 'true' : 'false',
'aria-posinset': index,
'aria-setsize': count,
tabIndex: 0
},

@@ -117,5 +135,6 @@ _react2['default'].createElement(

character: _propTypes2['default'].node,
focused: _propTypes2['default'].bool
focused: _propTypes2['default'].bool,
count: _propTypes2['default'].number
};
exports['default'] = Star;
module.exports = exports['default'];
{
"name": "rc-rate",
"version": "2.4.0",
"version": "2.4.1",
"description": "React Star Rate Component",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc