@instructure/ui-progress 8.12.1-snapshot.45 → 8.12.1-snapshot.51
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/es/ProgressBar/__examples__/ProgressBar.examples.js +5 -4
- package/es/ProgressBar/index.js +12 -10
- package/es/ProgressCircle/__examples__/ProgressCircle.examples.js +5 -4
- package/es/ProgressCircle/index.js +10 -8
- package/lib/ProgressBar/__examples__/ProgressBar.examples.js +5 -4
- package/lib/ProgressBar/index.js +13 -11
- package/lib/ProgressBar/props.js +1 -1
- package/lib/ProgressCircle/__examples__/ProgressCircle.examples.js +5 -4
- package/lib/ProgressCircle/index.js +11 -9
- package/lib/ProgressCircle/props.js +1 -1
- package/package.json +14 -14
|
@@ -28,10 +28,11 @@ export default {
|
|
|
28
28
|
propValues: {
|
|
29
29
|
valueNow: [0, 40, 80, 100],
|
|
30
30
|
renderValue: [null, // eslint-disable-next-line react/display-name
|
|
31
|
-
|
|
32
|
-
valueNow,
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
_ref => {
|
|
32
|
+
let valueNow = _ref.valueNow,
|
|
33
|
+
valueMax = _ref.valueMax;
|
|
34
|
+
return /*#__PURE__*/React.createElement("span", null, Math.round(valueNow / valueMax * 100));
|
|
35
|
+
}]
|
|
35
36
|
},
|
|
36
37
|
getComponentProps: props => {
|
|
37
38
|
return {
|
package/es/ProgressBar/index.js
CHANGED
|
@@ -43,8 +43,8 @@ category: components
|
|
|
43
43
|
**/
|
|
44
44
|
|
|
45
45
|
let ProgressBar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class ProgressBar extends Component {
|
|
46
|
-
constructor(
|
|
47
|
-
super(...
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
48
|
this.ref = null;
|
|
49
49
|
|
|
50
50
|
this.handleRef = el => {
|
|
@@ -122,20 +122,22 @@ let ProgressBar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
}, _class2.displayName = "ProgressBar", _class2.componentId = 'ProgressBar', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
|
125
|
-
formatScreenReaderValue:
|
|
126
|
-
valueNow,
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
formatScreenReaderValue: _ref => {
|
|
126
|
+
let valueNow = _ref.valueNow,
|
|
127
|
+
valueMax = _ref.valueMax;
|
|
128
|
+
return `${valueNow} / ${valueMax}`;
|
|
129
|
+
},
|
|
129
130
|
size: 'medium',
|
|
130
131
|
valueMax: 100,
|
|
131
132
|
valueNow: 0,
|
|
132
133
|
as: 'div',
|
|
133
134
|
color: 'primary',
|
|
134
135
|
// default to showing `success` color on completion
|
|
135
|
-
meterColor:
|
|
136
|
-
valueNow,
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
meterColor: _ref2 => {
|
|
137
|
+
let valueNow = _ref2.valueNow,
|
|
138
|
+
valueMax = _ref2.valueMax;
|
|
139
|
+
return valueNow / valueMax >= 1 ? 'success' : 'brand';
|
|
140
|
+
}
|
|
139
141
|
}, _temp)) || _class) || _class);
|
|
140
142
|
export default ProgressBar;
|
|
141
143
|
export { ProgressBar };
|
|
@@ -28,10 +28,11 @@ export default {
|
|
|
28
28
|
propValues: {
|
|
29
29
|
valueNow: [0, 40, 80, 100],
|
|
30
30
|
renderValue: [null, // eslint-disable-next-line react/display-name
|
|
31
|
-
|
|
32
|
-
valueNow,
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
_ref => {
|
|
32
|
+
let valueNow = _ref.valueNow,
|
|
33
|
+
valueMax = _ref.valueMax;
|
|
34
|
+
return /*#__PURE__*/React.createElement("span", null, Math.round(valueNow / valueMax * 100));
|
|
35
|
+
}]
|
|
35
36
|
},
|
|
36
37
|
getComponentProps: props => {
|
|
37
38
|
return {
|
|
@@ -167,10 +167,11 @@ let ProgressCircle = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
}, _class2.displayName = "ProgressCircle", _class2.componentId = 'ProgressCircle', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
|
170
|
-
formatScreenReaderValue:
|
|
171
|
-
valueNow,
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
formatScreenReaderValue: _ref => {
|
|
171
|
+
let valueNow = _ref.valueNow,
|
|
172
|
+
valueMax = _ref.valueMax;
|
|
173
|
+
return `${valueNow} / ${valueMax}`;
|
|
174
|
+
},
|
|
174
175
|
size: 'medium',
|
|
175
176
|
valueMax: 100,
|
|
176
177
|
valueNow: 0,
|
|
@@ -178,10 +179,11 @@ let ProgressCircle = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
178
179
|
color: 'primary',
|
|
179
180
|
shouldAnimateOnMount: false,
|
|
180
181
|
// default to showing `success` color on completion
|
|
181
|
-
meterColor:
|
|
182
|
-
valueNow,
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
meterColor: _ref2 => {
|
|
183
|
+
let valueNow = _ref2.valueNow,
|
|
184
|
+
valueMax = _ref2.valueMax;
|
|
185
|
+
return valueNow / valueMax >= 1 ? 'success' : 'brand';
|
|
186
|
+
}
|
|
185
187
|
}, _temp)) || _class) || _class);
|
|
186
188
|
export default ProgressCircle;
|
|
187
189
|
export { ProgressCircle };
|
|
@@ -38,10 +38,11 @@ var _default = {
|
|
|
38
38
|
propValues: {
|
|
39
39
|
valueNow: [0, 40, 80, 100],
|
|
40
40
|
renderValue: [null, // eslint-disable-next-line react/display-name
|
|
41
|
-
|
|
42
|
-
valueNow,
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
_ref => {
|
|
42
|
+
let valueNow = _ref.valueNow,
|
|
43
|
+
valueMax = _ref.valueMax;
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement("span", null, Math.round(valueNow / valueMax * 100));
|
|
45
|
+
}]
|
|
45
46
|
},
|
|
46
47
|
getComponentProps: props => {
|
|
47
48
|
return {
|
package/lib/ProgressBar/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = exports.ProgressBar = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
|
|
@@ -37,8 +37,8 @@ category: components
|
|
|
37
37
|
---
|
|
38
38
|
**/
|
|
39
39
|
let ProgressBar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class ProgressBar extends _react.Component {
|
|
40
|
-
constructor(
|
|
41
|
-
super(...
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
42
|
this.ref = null;
|
|
43
43
|
|
|
44
44
|
this.handleRef = el => {
|
|
@@ -115,20 +115,22 @@ let ProgressBar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
}, _class2.displayName = "ProgressBar", _class2.componentId = 'ProgressBar', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
|
118
|
-
formatScreenReaderValue:
|
|
119
|
-
valueNow,
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
formatScreenReaderValue: _ref => {
|
|
119
|
+
let valueNow = _ref.valueNow,
|
|
120
|
+
valueMax = _ref.valueMax;
|
|
121
|
+
return `${valueNow} / ${valueMax}`;
|
|
122
|
+
},
|
|
122
123
|
size: 'medium',
|
|
123
124
|
valueMax: 100,
|
|
124
125
|
valueNow: 0,
|
|
125
126
|
as: 'div',
|
|
126
127
|
color: 'primary',
|
|
127
128
|
// default to showing `success` color on completion
|
|
128
|
-
meterColor:
|
|
129
|
-
valueNow,
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
meterColor: _ref2 => {
|
|
130
|
+
let valueNow = _ref2.valueNow,
|
|
131
|
+
valueMax = _ref2.valueMax;
|
|
132
|
+
return valueNow / valueMax >= 1 ? 'success' : 'brand';
|
|
133
|
+
}
|
|
132
134
|
}, _temp)) || _class) || _class);
|
|
133
135
|
exports.ProgressBar = ProgressBar;
|
|
134
136
|
var _default = ProgressBar;
|
package/lib/ProgressBar/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -38,10 +38,11 @@ var _default = {
|
|
|
38
38
|
propValues: {
|
|
39
39
|
valueNow: [0, 40, 80, 100],
|
|
40
40
|
renderValue: [null, // eslint-disable-next-line react/display-name
|
|
41
|
-
|
|
42
|
-
valueNow,
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
_ref => {
|
|
42
|
+
let valueNow = _ref.valueNow,
|
|
43
|
+
valueMax = _ref.valueMax;
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement("span", null, Math.round(valueNow / valueMax * 100));
|
|
45
|
+
}]
|
|
45
46
|
},
|
|
46
47
|
getComponentProps: props => {
|
|
47
48
|
return {
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = exports.ProgressCircle = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
|
|
@@ -161,10 +161,11 @@ let ProgressCircle = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
}, _class2.displayName = "ProgressCircle", _class2.componentId = 'ProgressCircle', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
|
164
|
-
formatScreenReaderValue:
|
|
165
|
-
valueNow,
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
formatScreenReaderValue: _ref => {
|
|
165
|
+
let valueNow = _ref.valueNow,
|
|
166
|
+
valueMax = _ref.valueMax;
|
|
167
|
+
return `${valueNow} / ${valueMax}`;
|
|
168
|
+
},
|
|
168
169
|
size: 'medium',
|
|
169
170
|
valueMax: 100,
|
|
170
171
|
valueNow: 0,
|
|
@@ -172,10 +173,11 @@ let ProgressCircle = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
172
173
|
color: 'primary',
|
|
173
174
|
shouldAnimateOnMount: false,
|
|
174
175
|
// default to showing `success` color on completion
|
|
175
|
-
meterColor:
|
|
176
|
-
valueNow,
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
meterColor: _ref2 => {
|
|
177
|
+
let valueNow = _ref2.valueNow,
|
|
178
|
+
valueMax = _ref2.valueMax;
|
|
179
|
+
return valueNow / valueMax >= 1 ? 'success' : 'brand';
|
|
180
|
+
}
|
|
179
181
|
}, _temp)) || _class) || _class);
|
|
180
182
|
exports.ProgressCircle = ProgressCircle;
|
|
181
183
|
var _default = ProgressCircle;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-progress",
|
|
3
|
-
"version": "8.12.1-snapshot.
|
|
3
|
+
"version": "8.12.1-snapshot.51+4d3697334",
|
|
4
4
|
"description": "Styled HTML <progress /> elements for showing completion of a task",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.12.1-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.12.1-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.12.1-snapshot.
|
|
31
|
-
"@instructure/ui-a11y-content": "8.12.1-snapshot.
|
|
32
|
-
"@instructure/ui-color-utils": "8.12.1-snapshot.
|
|
33
|
-
"@instructure/ui-react-utils": "8.12.1-snapshot.
|
|
34
|
-
"@instructure/ui-testable": "8.12.1-snapshot.
|
|
35
|
-
"@instructure/ui-view": "8.12.1-snapshot.
|
|
28
|
+
"@instructure/console": "8.12.1-snapshot.51+4d3697334",
|
|
29
|
+
"@instructure/emotion": "8.12.1-snapshot.51+4d3697334",
|
|
30
|
+
"@instructure/shared-types": "8.12.1-snapshot.51+4d3697334",
|
|
31
|
+
"@instructure/ui-a11y-content": "8.12.1-snapshot.51+4d3697334",
|
|
32
|
+
"@instructure/ui-color-utils": "8.12.1-snapshot.51+4d3697334",
|
|
33
|
+
"@instructure/ui-react-utils": "8.12.1-snapshot.51+4d3697334",
|
|
34
|
+
"@instructure/ui-testable": "8.12.1-snapshot.51+4d3697334",
|
|
35
|
+
"@instructure/ui-view": "8.12.1-snapshot.51+4d3697334",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.12.1-snapshot.
|
|
40
|
-
"@instructure/ui-test-locator": "8.12.1-snapshot.
|
|
41
|
-
"@instructure/ui-test-utils": "8.12.1-snapshot.
|
|
42
|
-
"@instructure/ui-themes": "8.12.1-snapshot.
|
|
39
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.51+4d3697334",
|
|
40
|
+
"@instructure/ui-test-locator": "8.12.1-snapshot.51+4d3697334",
|
|
41
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.51+4d3697334",
|
|
42
|
+
"@instructure/ui-themes": "8.12.1-snapshot.51+4d3697334"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "4d369733414715a70bae0628378e8d82214eab3e"
|
|
52
52
|
}
|