@instructure/ui-rating 8.25.1-snapshot-10 → 8.25.1-snapshot-15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
6
+ ## [8.25.1-snapshot-15](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-15) (2022-06-23)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-rating
9
9
 
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class;
1
+ var _dec, _dec2, _class, _class2;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -41,23 +41,15 @@ category: components
41
41
  @tsProps
42
42
  **/
43
43
 
44
- let Rating = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class = class Rating extends Component {
45
- static displayName = "Rating";
46
- static componentId = 'Rating';
47
- static allowedProps = allowedProps;
48
- static propTypes = propTypes;
49
- static defaultProps = {
50
- animateFill: false,
51
- formatValueText: (filled, iconCount) => `${filled} / ${iconCount}`,
52
- iconCount: 3,
53
- size: 'medium',
54
- valueNow: 0
55
- };
56
- static Icon = RatingIcon;
57
- ref = null;
58
- handleRef = el => {
59
- this.ref = el;
60
- };
44
+ let Rating = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class Rating extends Component {
45
+ constructor() {
46
+ super(...arguments);
47
+ this.ref = null;
48
+
49
+ this.handleRef = el => {
50
+ this.ref = el;
51
+ };
52
+ }
61
53
 
62
54
  componentDidMount() {
63
55
  var _this$props$makeStyle, _this$props;
@@ -120,6 +112,12 @@ let Rating = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_c
120
112
  })));
121
113
  }
122
114
 
123
- }) || _class) || _class);
115
+ }, _class2.displayName = "Rating", _class2.componentId = 'Rating', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
116
+ animateFill: false,
117
+ formatValueText: (filled, iconCount) => `${filled} / ${iconCount}`,
118
+ iconCount: 3,
119
+ size: 'medium',
120
+ valueNow: 0
121
+ }, _class2.Icon = RatingIcon, _class2)) || _class) || _class);
124
122
  export default Rating;
125
123
  export { Rating };
@@ -1,4 +1,4 @@
1
- var _dec, _class;
1
+ var _dec, _class, _class2;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -41,29 +41,32 @@ id: Rating.Icon
41
41
  @tsProps
42
42
  **/
43
43
 
44
- let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class RatingIcon extends Component {
45
- static displayName = "RatingIcon";
46
- static componentId = 'Rating.Icon';
47
- static allowedProps = allowedProps;
48
- static propTypes = propTypes;
49
- static defaultProps = {
50
- animationDelay: 200,
51
- animateFill: false,
52
- filled: false,
53
- size: 'medium'
54
- };
55
- ref = null;
56
-
44
+ let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class RatingIcon extends Component {
57
45
  constructor(props) {
58
46
  super(props);
47
+ this.ref = null;
48
+ this._timeouts = [];
49
+ this._animation = void 0;
50
+
51
+ this.makeStyleProps = () => {
52
+ return {
53
+ filled: this.state.filled
54
+ };
55
+ };
56
+
57
+ this.fill = () => {
58
+ this._animation = requestAnimationFrame(() => {
59
+ this.setState({
60
+ filled: true
61
+ });
62
+ });
63
+ };
64
+
59
65
  this.state = {
60
66
  filled: props.filled && !props.animateFill
61
67
  };
62
68
  }
63
69
 
64
- _timeouts = [];
65
- _animation;
66
-
67
70
  componentDidMount() {
68
71
  var _this$props$makeStyle, _this$props;
69
72
 
@@ -90,19 +93,6 @@ let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
90
93
  this._timeouts.forEach(timeout => clearTimeout(timeout));
91
94
  }
92
95
 
93
- makeStyleProps = () => {
94
- return {
95
- filled: this.state.filled
96
- };
97
- };
98
- fill = () => {
99
- this._animation = requestAnimationFrame(() => {
100
- this.setState({
101
- filled: true
102
- });
103
- });
104
- };
105
-
106
96
  render() {
107
97
  var _this$props$styles, _this$props$styles2, _this$props$styles3;
108
98
 
@@ -124,6 +114,11 @@ let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
124
114
  })));
125
115
  }
126
116
 
127
- }) || _class);
117
+ }, _class2.displayName = "RatingIcon", _class2.componentId = 'Rating.Icon', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
118
+ animationDelay: 200,
119
+ animateFill: false,
120
+ filled: false,
121
+ size: 'medium'
122
+ }, _class2)) || _class);
128
123
  export default RatingIcon;
129
124
  export { RatingIcon };
@@ -25,7 +25,7 @@ var _styles = _interopRequireDefault(require("./styles"));
25
25
 
26
26
  var _props = require("./props");
27
27
 
28
- var _dec, _dec2, _class;
28
+ var _dec, _dec2, _class, _class2;
29
29
 
30
30
  /**
31
31
  ---
@@ -33,23 +33,15 @@ category: components
33
33
  ---
34
34
  @tsProps
35
35
  **/
36
- let Rating = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = class Rating extends _react.Component {
37
- static displayName = "Rating";
38
- static componentId = 'Rating';
39
- static allowedProps = _props.allowedProps;
40
- static propTypes = _props.propTypes;
41
- static defaultProps = {
42
- animateFill: false,
43
- formatValueText: (filled, iconCount) => `${filled} / ${iconCount}`,
44
- iconCount: 3,
45
- size: 'medium',
46
- valueNow: 0
47
- };
48
- static Icon = _RatingIcon.RatingIcon;
49
- ref = null;
50
- handleRef = el => {
51
- this.ref = el;
52
- };
36
+ let Rating = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Rating extends _react.Component {
37
+ constructor() {
38
+ super(...arguments);
39
+ this.ref = null;
40
+
41
+ this.handleRef = el => {
42
+ this.ref = el;
43
+ };
44
+ }
53
45
 
54
46
  componentDidMount() {
55
47
  var _this$props$makeStyle, _this$props;
@@ -114,7 +106,13 @@ let Rating = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 = (0,
114
106
  })));
115
107
  }
116
108
 
117
- }) || _class) || _class);
109
+ }, _class2.displayName = "Rating", _class2.componentId = 'Rating', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
110
+ animateFill: false,
111
+ formatValueText: (filled, iconCount) => `${filled} / ${iconCount}`,
112
+ iconCount: 3,
113
+ size: 'medium',
114
+ valueNow: 0
115
+ }, _class2.Icon = _RatingIcon.RatingIcon, _class2)) || _class) || _class);
118
116
  exports.Rating = Rating;
119
117
  var _default = Rating;
120
118
  exports.default = _default;
@@ -25,7 +25,7 @@ var _theme = _interopRequireDefault(require("./theme"));
25
25
 
26
26
  var _props = require("./props");
27
27
 
28
- var _dec, _class;
28
+ var _dec, _class, _class2;
29
29
 
30
30
  /**
31
31
  ---
@@ -34,29 +34,32 @@ id: Rating.Icon
34
34
  ---
35
35
  @tsProps
36
36
  **/
37
- let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class RatingIcon extends _react.Component {
38
- static displayName = "RatingIcon";
39
- static componentId = 'Rating.Icon';
40
- static allowedProps = _props.allowedProps;
41
- static propTypes = _props.propTypes;
42
- static defaultProps = {
43
- animationDelay: 200,
44
- animateFill: false,
45
- filled: false,
46
- size: 'medium'
47
- };
48
- ref = null;
49
-
37
+ let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class RatingIcon extends _react.Component {
50
38
  constructor(props) {
51
39
  super(props);
40
+ this.ref = null;
41
+ this._timeouts = [];
42
+ this._animation = void 0;
43
+
44
+ this.makeStyleProps = () => {
45
+ return {
46
+ filled: this.state.filled
47
+ };
48
+ };
49
+
50
+ this.fill = () => {
51
+ this._animation = (0, _requestAnimationFrame.requestAnimationFrame)(() => {
52
+ this.setState({
53
+ filled: true
54
+ });
55
+ });
56
+ };
57
+
52
58
  this.state = {
53
59
  filled: props.filled && !props.animateFill
54
60
  };
55
61
  }
56
62
 
57
- _timeouts = [];
58
- _animation;
59
-
60
63
  componentDidMount() {
61
64
  var _this$props$makeStyle, _this$props;
62
65
 
@@ -83,19 +86,6 @@ let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
83
86
  this._timeouts.forEach(timeout => clearTimeout(timeout));
84
87
  }
85
88
 
86
- makeStyleProps = () => {
87
- return {
88
- filled: this.state.filled
89
- };
90
- };
91
- fill = () => {
92
- this._animation = (0, _requestAnimationFrame.requestAnimationFrame)(() => {
93
- this.setState({
94
- filled: true
95
- });
96
- });
97
- };
98
-
99
89
  render() {
100
90
  var _this$props$styles, _this$props$styles2, _this$props$styles3;
101
91
 
@@ -117,7 +107,12 @@ let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
117
107
  })));
118
108
  }
119
109
 
120
- }) || _class);
110
+ }, _class2.displayName = "RatingIcon", _class2.componentId = 'Rating.Icon', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
111
+ animationDelay: 200,
112
+ animateFill: false,
113
+ filled: false,
114
+ size: 'medium'
115
+ }, _class2)) || _class);
121
116
  exports.RatingIcon = RatingIcon;
122
117
  var _default = RatingIcon;
123
118
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-rating",
3
- "version": "8.25.1-snapshot-10",
3
+ "version": "8.25.1-snapshot-15",
4
4
  "description": "A static rating component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,23 +24,23 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.25.1-snapshot-10",
28
- "@instructure/emotion": "8.25.1-snapshot-10",
29
- "@instructure/shared-types": "8.25.1-snapshot-10",
30
- "@instructure/ui-a11y-content": "8.25.1-snapshot-10",
31
- "@instructure/ui-dom-utils": "8.25.1-snapshot-10",
32
- "@instructure/ui-icons": "8.25.1-snapshot-10",
33
- "@instructure/ui-motion": "8.25.1-snapshot-10",
34
- "@instructure/ui-react-utils": "8.25.1-snapshot-10",
35
- "@instructure/ui-testable": "8.25.1-snapshot-10",
36
- "@instructure/ui-view": "8.25.1-snapshot-10",
27
+ "@instructure/console": "8.25.1-snapshot-15",
28
+ "@instructure/emotion": "8.25.1-snapshot-15",
29
+ "@instructure/shared-types": "8.25.1-snapshot-15",
30
+ "@instructure/ui-a11y-content": "8.25.1-snapshot-15",
31
+ "@instructure/ui-dom-utils": "8.25.1-snapshot-15",
32
+ "@instructure/ui-icons": "8.25.1-snapshot-15",
33
+ "@instructure/ui-motion": "8.25.1-snapshot-15",
34
+ "@instructure/ui-react-utils": "8.25.1-snapshot-15",
35
+ "@instructure/ui-testable": "8.25.1-snapshot-15",
36
+ "@instructure/ui-view": "8.25.1-snapshot-15",
37
37
  "prop-types": "^15"
38
38
  },
39
39
  "devDependencies": {
40
- "@instructure/ui-babel-preset": "8.25.1-snapshot-10",
41
- "@instructure/ui-test-locator": "8.25.1-snapshot-10",
42
- "@instructure/ui-test-utils": "8.25.1-snapshot-10",
43
- "@instructure/ui-themes": "8.25.1-snapshot-10"
40
+ "@instructure/ui-babel-preset": "8.25.1-snapshot-15",
41
+ "@instructure/ui-test-locator": "8.25.1-snapshot-15",
42
+ "@instructure/ui-test-utils": "8.25.1-snapshot-15",
43
+ "@instructure/ui-themes": "8.25.1-snapshot-15"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.8 <=17"