@instructure/ui-spinner 8.17.1-snapshot.82 → 8.18.1-snapshot.1
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 +4 -0
- package/es/Spinner/index.js +12 -6
- package/es/Spinner/theme.js +4 -4
- package/lib/Spinner/index.js +12 -6
- package/lib/Spinner/theme.js +4 -4
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-spinner
|
|
9
|
+
|
|
6
10
|
# [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/es/Spinner/index.js
CHANGED
|
@@ -60,11 +60,15 @@ let Spinner = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, ge
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
componentDidMount() {
|
|
63
|
-
|
|
63
|
+
var _this$props$makeStyle, _this$props;
|
|
64
|
+
|
|
65
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
componentDidUpdate() {
|
|
67
|
-
|
|
69
|
+
var _this$props$makeStyle2, _this$props2;
|
|
70
|
+
|
|
71
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
radius() {
|
|
@@ -84,16 +88,18 @@ let Spinner = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, ge
|
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
render() {
|
|
91
|
+
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4;
|
|
92
|
+
|
|
87
93
|
const passthroughProps = View.omitViewProps(omitProps(this.props, Spinner.allowedProps), Spinner);
|
|
88
94
|
const hasTitle = this.props.renderTitle;
|
|
89
95
|
error(!!hasTitle, '[Spinner] The renderTitle prop is necessary for screen reader support.');
|
|
90
96
|
return jsx(View, Object.assign({}, passthroughProps, {
|
|
91
97
|
as: this.props.as,
|
|
92
98
|
elementRef: this.handleRef,
|
|
93
|
-
css: this.props.styles
|
|
99
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.spinner,
|
|
94
100
|
margin: this.props.margin
|
|
95
101
|
}), jsx("svg", {
|
|
96
|
-
css: this.props.styles
|
|
102
|
+
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.circle,
|
|
97
103
|
role: "img",
|
|
98
104
|
"aria-labelledby": this.titleId,
|
|
99
105
|
focusable: "false"
|
|
@@ -102,12 +108,12 @@ let Spinner = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, ge
|
|
|
102
108
|
}, callRenderProp(this.props.renderTitle)), jsx("g", {
|
|
103
109
|
role: "presentation"
|
|
104
110
|
}, this.props.variant !== 'inverse' && jsx("circle", {
|
|
105
|
-
css: this.props.styles
|
|
111
|
+
css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.circleTrack,
|
|
106
112
|
cx: "50%",
|
|
107
113
|
cy: "50%",
|
|
108
114
|
r: this.radius()
|
|
109
115
|
}), jsx("circle", {
|
|
110
|
-
css: this.props.styles
|
|
116
|
+
css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.circleSpin,
|
|
111
117
|
cx: "50%",
|
|
112
118
|
cy: "50%",
|
|
113
119
|
r: this.radius()
|
package/es/Spinner/theme.js
CHANGED
|
@@ -32,15 +32,15 @@ const generateComponentTheme = theme => {
|
|
|
32
32
|
themeName = theme.key;
|
|
33
33
|
const themeSpecificStyle = {
|
|
34
34
|
'canvas-high-contrast': {
|
|
35
|
-
inverseColor: colors
|
|
35
|
+
inverseColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
|
|
36
36
|
},
|
|
37
37
|
canvas: {
|
|
38
38
|
color: theme['ic-brand-primary']
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
const componentVariables = {
|
|
42
|
-
trackColor: colors
|
|
43
|
-
color: colors
|
|
42
|
+
trackColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLight,
|
|
43
|
+
color: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
|
|
44
44
|
xSmallSize: '1.5em',
|
|
45
45
|
xSmallBorderWidth: '0.25em',
|
|
46
46
|
smallSize: '3em',
|
|
@@ -49,7 +49,7 @@ const generateComponentTheme = theme => {
|
|
|
49
49
|
mediumBorderWidth: '0.5em',
|
|
50
50
|
largeSize: '7em',
|
|
51
51
|
largeBorderWidth: '0.75em',
|
|
52
|
-
inverseColor: colors
|
|
52
|
+
inverseColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand
|
|
53
53
|
};
|
|
54
54
|
return { ...componentVariables,
|
|
55
55
|
...themeSpecificStyle[themeName]
|
package/lib/Spinner/index.js
CHANGED
|
@@ -56,11 +56,15 @@ let Spinner = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
componentDidMount() {
|
|
59
|
-
|
|
59
|
+
var _this$props$makeStyle, _this$props;
|
|
60
|
+
|
|
61
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
componentDidUpdate() {
|
|
63
|
-
|
|
65
|
+
var _this$props$makeStyle2, _this$props2;
|
|
66
|
+
|
|
67
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
radius() {
|
|
@@ -80,6 +84,8 @@ let Spinner = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (
|
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
render() {
|
|
87
|
+
var _this$props$styles, _this$props$styles2, _this$props$styles3, _this$props$styles4;
|
|
88
|
+
|
|
83
89
|
const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Spinner.allowedProps), Spinner);
|
|
84
90
|
|
|
85
91
|
const hasTitle = this.props.renderTitle;
|
|
@@ -87,10 +93,10 @@ let Spinner = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (
|
|
|
87
93
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
|
|
88
94
|
as: this.props.as,
|
|
89
95
|
elementRef: this.handleRef,
|
|
90
|
-
css: this.props.styles
|
|
96
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.spinner,
|
|
91
97
|
margin: this.props.margin
|
|
92
98
|
}), (0, _emotion.jsx)("svg", {
|
|
93
|
-
css: this.props.styles
|
|
99
|
+
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.circle,
|
|
94
100
|
role: "img",
|
|
95
101
|
"aria-labelledby": this.titleId,
|
|
96
102
|
focusable: "false"
|
|
@@ -99,12 +105,12 @@ let Spinner = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (
|
|
|
99
105
|
}, (0, _callRenderProp.callRenderProp)(this.props.renderTitle)), (0, _emotion.jsx)("g", {
|
|
100
106
|
role: "presentation"
|
|
101
107
|
}, this.props.variant !== 'inverse' && (0, _emotion.jsx)("circle", {
|
|
102
|
-
css: this.props.styles
|
|
108
|
+
css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.circleTrack,
|
|
103
109
|
cx: "50%",
|
|
104
110
|
cy: "50%",
|
|
105
111
|
r: this.radius()
|
|
106
112
|
}), (0, _emotion.jsx)("circle", {
|
|
107
|
-
css: this.props.styles
|
|
113
|
+
css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.circleSpin,
|
|
108
114
|
cx: "50%",
|
|
109
115
|
cy: "50%",
|
|
110
116
|
r: this.radius()
|
package/lib/Spinner/theme.js
CHANGED
|
@@ -39,15 +39,15 @@ const generateComponentTheme = theme => {
|
|
|
39
39
|
themeName = theme.key;
|
|
40
40
|
const themeSpecificStyle = {
|
|
41
41
|
'canvas-high-contrast': {
|
|
42
|
-
inverseColor: colors
|
|
42
|
+
inverseColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
|
|
43
43
|
},
|
|
44
44
|
canvas: {
|
|
45
45
|
color: theme['ic-brand-primary']
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
const componentVariables = {
|
|
49
|
-
trackColor: colors
|
|
50
|
-
color: colors
|
|
49
|
+
trackColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLight,
|
|
50
|
+
color: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
|
|
51
51
|
xSmallSize: '1.5em',
|
|
52
52
|
xSmallBorderWidth: '0.25em',
|
|
53
53
|
smallSize: '3em',
|
|
@@ -56,7 +56,7 @@ const generateComponentTheme = theme => {
|
|
|
56
56
|
mediumBorderWidth: '0.5em',
|
|
57
57
|
largeSize: '7em',
|
|
58
58
|
largeBorderWidth: '0.75em',
|
|
59
|
-
inverseColor: colors
|
|
59
|
+
inverseColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand
|
|
60
60
|
};
|
|
61
61
|
return { ...componentVariables,
|
|
62
62
|
...themeSpecificStyle[themeName]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-spinner",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.1-snapshot.1+669aa5892",
|
|
4
4
|
"description": "A spinner/loading component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.13.10",
|
|
27
|
-
"@instructure/console": "8.
|
|
28
|
-
"@instructure/emotion": "8.
|
|
29
|
-
"@instructure/shared-types": "8.
|
|
30
|
-
"@instructure/ui-color-utils": "8.
|
|
31
|
-
"@instructure/ui-react-utils": "8.
|
|
32
|
-
"@instructure/ui-testable": "8.
|
|
33
|
-
"@instructure/ui-utils": "8.
|
|
34
|
-
"@instructure/ui-view": "8.
|
|
35
|
-
"@instructure/uid": "8.
|
|
27
|
+
"@instructure/console": "8.18.1-snapshot.1+669aa5892",
|
|
28
|
+
"@instructure/emotion": "8.18.1-snapshot.1+669aa5892",
|
|
29
|
+
"@instructure/shared-types": "8.18.1-snapshot.1+669aa5892",
|
|
30
|
+
"@instructure/ui-color-utils": "8.18.1-snapshot.1+669aa5892",
|
|
31
|
+
"@instructure/ui-react-utils": "8.18.1-snapshot.1+669aa5892",
|
|
32
|
+
"@instructure/ui-testable": "8.18.1-snapshot.1+669aa5892",
|
|
33
|
+
"@instructure/ui-utils": "8.18.1-snapshot.1+669aa5892",
|
|
34
|
+
"@instructure/ui-view": "8.18.1-snapshot.1+669aa5892",
|
|
35
|
+
"@instructure/uid": "8.18.1-snapshot.1+669aa5892",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.
|
|
40
|
-
"@instructure/ui-test-locator": "8.
|
|
41
|
-
"@instructure/ui-test-utils": "8.
|
|
42
|
-
"@instructure/ui-themes": "8.
|
|
39
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.1+669aa5892",
|
|
40
|
+
"@instructure/ui-test-locator": "8.18.1-snapshot.1+669aa5892",
|
|
41
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.1+669aa5892",
|
|
42
|
+
"@instructure/ui-themes": "8.18.1-snapshot.1+669aa5892"
|
|
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": "669aa58926b123028bcb9e39427d36910b78b0d1"
|
|
52
52
|
}
|