@instructure/ui-rating 8.25.1-snapshot-7 → 8.25.1-snapshot-10
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 +1 -1
- package/es/Rating/index.js +19 -17
- package/es/RatingIcon/index.js +31 -26
- package/lib/Rating/index.js +19 -17
- package/lib/RatingIcon/index.js +31 -26
- package/package.json +15 -15
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Rating/RatingLocator.d.ts +4 -4
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-
|
|
6
|
+
## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-rating
|
|
9
9
|
|
package/es/Rating/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2, _class
|
|
1
|
+
var _dec, _dec2, _class;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The MIT License (MIT)
|
|
@@ -41,15 +41,23 @@ category: components
|
|
|
41
41
|
@tsProps
|
|
42
42
|
**/
|
|
43
43
|
|
|
44
|
-
let Rating = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
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
|
+
};
|
|
53
61
|
|
|
54
62
|
componentDidMount() {
|
|
55
63
|
var _this$props$makeStyle, _this$props;
|
|
@@ -112,12 +120,6 @@ let Rating = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_c
|
|
|
112
120
|
})));
|
|
113
121
|
}
|
|
114
122
|
|
|
115
|
-
}
|
|
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);
|
|
123
|
+
}) || _class) || _class);
|
|
122
124
|
export default Rating;
|
|
123
125
|
export { Rating };
|
package/es/RatingIcon/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _class
|
|
1
|
+
var _dec, _class;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The MIT License (MIT)
|
|
@@ -41,32 +41,29 @@ id: Rating.Icon
|
|
|
41
41
|
@tsProps
|
|
42
42
|
**/
|
|
43
43
|
|
|
44
|
-
let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
|
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
|
+
|
|
45
57
|
constructor(props) {
|
|
46
58
|
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
|
-
|
|
65
59
|
this.state = {
|
|
66
60
|
filled: props.filled && !props.animateFill
|
|
67
61
|
};
|
|
68
62
|
}
|
|
69
63
|
|
|
64
|
+
_timeouts = [];
|
|
65
|
+
_animation;
|
|
66
|
+
|
|
70
67
|
componentDidMount() {
|
|
71
68
|
var _this$props$makeStyle, _this$props;
|
|
72
69
|
|
|
@@ -93,6 +90,19 @@ let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
|
|
|
93
90
|
this._timeouts.forEach(timeout => clearTimeout(timeout));
|
|
94
91
|
}
|
|
95
92
|
|
|
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
|
+
|
|
96
106
|
render() {
|
|
97
107
|
var _this$props$styles, _this$props$styles2, _this$props$styles3;
|
|
98
108
|
|
|
@@ -114,11 +124,6 @@ let RatingIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(
|
|
|
114
124
|
})));
|
|
115
125
|
}
|
|
116
126
|
|
|
117
|
-
}
|
|
118
|
-
animationDelay: 200,
|
|
119
|
-
animateFill: false,
|
|
120
|
-
filled: false,
|
|
121
|
-
size: 'medium'
|
|
122
|
-
}, _class2)) || _class);
|
|
127
|
+
}) || _class);
|
|
123
128
|
export default RatingIcon;
|
|
124
129
|
export { RatingIcon };
|
package/lib/Rating/index.js
CHANGED
|
@@ -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;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
---
|
|
@@ -33,15 +33,23 @@ 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 =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
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
|
+
};
|
|
45
53
|
|
|
46
54
|
componentDidMount() {
|
|
47
55
|
var _this$props$makeStyle, _this$props;
|
|
@@ -106,13 +114,7 @@ let Rating = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 = (0,
|
|
|
106
114
|
})));
|
|
107
115
|
}
|
|
108
116
|
|
|
109
|
-
}
|
|
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);
|
|
117
|
+
}) || _class) || _class);
|
|
116
118
|
exports.Rating = Rating;
|
|
117
119
|
var _default = Rating;
|
|
118
120
|
exports.default = _default;
|
package/lib/RatingIcon/index.js
CHANGED
|
@@ -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;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
---
|
|
@@ -34,32 +34,29 @@ id: Rating.Icon
|
|
|
34
34
|
---
|
|
35
35
|
@tsProps
|
|
36
36
|
**/
|
|
37
|
-
let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
|
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
|
+
|
|
38
50
|
constructor(props) {
|
|
39
51
|
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
|
-
|
|
58
52
|
this.state = {
|
|
59
53
|
filled: props.filled && !props.animateFill
|
|
60
54
|
};
|
|
61
55
|
}
|
|
62
56
|
|
|
57
|
+
_timeouts = [];
|
|
58
|
+
_animation;
|
|
59
|
+
|
|
63
60
|
componentDidMount() {
|
|
64
61
|
var _this$props$makeStyle, _this$props;
|
|
65
62
|
|
|
@@ -86,6 +83,19 @@ let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
86
83
|
this._timeouts.forEach(timeout => clearTimeout(timeout));
|
|
87
84
|
}
|
|
88
85
|
|
|
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
|
+
|
|
89
99
|
render() {
|
|
90
100
|
var _this$props$styles, _this$props$styles2, _this$props$styles3;
|
|
91
101
|
|
|
@@ -107,12 +117,7 @@ let RatingIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
107
117
|
})));
|
|
108
118
|
}
|
|
109
119
|
|
|
110
|
-
}
|
|
111
|
-
animationDelay: 200,
|
|
112
|
-
animateFill: false,
|
|
113
|
-
filled: false,
|
|
114
|
-
size: 'medium'
|
|
115
|
-
}, _class2)) || _class);
|
|
120
|
+
}) || _class);
|
|
116
121
|
exports.RatingIcon = RatingIcon;
|
|
117
122
|
var _default = RatingIcon;
|
|
118
123
|
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-
|
|
3
|
+
"version": "8.25.1-snapshot-10",
|
|
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-
|
|
28
|
-
"@instructure/emotion": "8.25.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.25.1-snapshot-
|
|
30
|
-
"@instructure/ui-a11y-content": "8.25.1-snapshot-
|
|
31
|
-
"@instructure/ui-dom-utils": "8.25.1-snapshot-
|
|
32
|
-
"@instructure/ui-icons": "8.25.1-snapshot-
|
|
33
|
-
"@instructure/ui-motion": "8.25.1-snapshot-
|
|
34
|
-
"@instructure/ui-react-utils": "8.25.1-snapshot-
|
|
35
|
-
"@instructure/ui-testable": "8.25.1-snapshot-
|
|
36
|
-
"@instructure/ui-view": "8.25.1-snapshot-
|
|
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",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.25.1-snapshot-
|
|
41
|
-
"@instructure/ui-test-locator": "8.25.1-snapshot-
|
|
42
|
-
"@instructure/ui-test-utils": "8.25.1-snapshot-
|
|
43
|
-
"@instructure/ui-themes": "8.25.1-snapshot-
|
|
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"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.8 <=17"
|