@instructure/ui-spinner 8.18.0 → 8.18.1-snapshot.2

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/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -60,11 +60,15 @@ let Spinner = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, ge
60
60
  }
61
61
 
62
62
  componentDidMount() {
63
- this.props.makeStyles?.();
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
- this.props.makeStyles?.();
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?.spinner,
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?.circle,
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?.circleTrack,
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?.circleSpin,
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()
@@ -32,15 +32,15 @@ const generateComponentTheme = theme => {
32
32
  themeName = theme.key;
33
33
  const themeSpecificStyle = {
34
34
  'canvas-high-contrast': {
35
- inverseColor: colors?.backgroundLightest
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?.backgroundLight,
43
- color: colors?.backgroundBrand,
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?.backgroundBrand
52
+ inverseColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand
53
53
  };
54
54
  return { ...componentVariables,
55
55
  ...themeSpecificStyle[themeName]
@@ -56,11 +56,15 @@ let Spinner = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (
56
56
  }
57
57
 
58
58
  componentDidMount() {
59
- this.props.makeStyles?.();
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
- this.props.makeStyles?.();
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?.spinner,
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?.circle,
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?.circleTrack,
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?.circleSpin,
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()
@@ -39,15 +39,15 @@ const generateComponentTheme = theme => {
39
39
  themeName = theme.key;
40
40
  const themeSpecificStyle = {
41
41
  'canvas-high-contrast': {
42
- inverseColor: colors?.backgroundLightest
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?.backgroundLight,
50
- color: colors?.backgroundBrand,
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?.backgroundBrand
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.18.0",
3
+ "version": "8.18.1-snapshot.2+ca4c1ff9d",
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.18.0",
28
- "@instructure/emotion": "8.18.0",
29
- "@instructure/shared-types": "8.18.0",
30
- "@instructure/ui-color-utils": "8.18.0",
31
- "@instructure/ui-react-utils": "8.18.0",
32
- "@instructure/ui-testable": "8.18.0",
33
- "@instructure/ui-utils": "8.18.0",
34
- "@instructure/ui-view": "8.18.0",
35
- "@instructure/uid": "8.18.0",
27
+ "@instructure/console": "8.18.1-snapshot.2+ca4c1ff9d",
28
+ "@instructure/emotion": "8.18.1-snapshot.2+ca4c1ff9d",
29
+ "@instructure/shared-types": "8.18.1-snapshot.2+ca4c1ff9d",
30
+ "@instructure/ui-color-utils": "8.18.1-snapshot.2+ca4c1ff9d",
31
+ "@instructure/ui-react-utils": "8.18.1-snapshot.2+ca4c1ff9d",
32
+ "@instructure/ui-testable": "8.18.1-snapshot.2+ca4c1ff9d",
33
+ "@instructure/ui-utils": "8.18.1-snapshot.2+ca4c1ff9d",
34
+ "@instructure/ui-view": "8.18.1-snapshot.2+ca4c1ff9d",
35
+ "@instructure/uid": "8.18.1-snapshot.2+ca4c1ff9d",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.18.0",
40
- "@instructure/ui-test-locator": "8.18.0",
41
- "@instructure/ui-test-utils": "8.18.0",
42
- "@instructure/ui-themes": "8.18.0"
39
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
40
+ "@instructure/ui-test-locator": "8.18.1-snapshot.2+ca4c1ff9d",
41
+ "@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d",
42
+ "@instructure/ui-themes": "8.18.1-snapshot.2+ca4c1ff9d"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"
@@ -47,5 +47,6 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "sideEffects": false
50
+ "sideEffects": false,
51
+ "gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
51
52
  }