@instructure/ui-avatar 8.25.1-snapshot-10 → 8.25.1-snapshot-13

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-13](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-13) (2022-06-22)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-avatar
9
9
 
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["onImageLoaded", "styles"];
3
3
 
4
- var _dec, _dec2, _class;
4
+ var _dec, _dec2, _class, _class2;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -43,31 +43,30 @@ category: components
43
43
  ---
44
44
  @tsProps
45
45
  **/
46
- let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class Avatar extends Component {
47
- static displayName = "Avatar";
48
- static componentId = 'Avatar';
49
- static propTypes = propTypes;
50
- static allowedProps = allowedProps;
51
- static defaultProps = {
52
- size: 'medium',
53
- color: 'default',
54
- hasInverseColor: false,
55
- shape: 'circle',
56
- display: 'inline-block',
57
- onImageLoaded: _event => {}
58
- };
59
- state = {
60
- loaded: false
61
- };
62
- ref = null;
63
- handleRef = el => {
64
- const elementRef = this.props.elementRef;
65
- this.ref = el;
66
-
67
- if (typeof elementRef === 'function') {
68
- elementRef(el);
69
- }
70
- };
46
+ let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class Avatar extends Component {
47
+ constructor() {
48
+ super(...arguments);
49
+ this.state = {
50
+ loaded: false
51
+ };
52
+ this.ref = null;
53
+
54
+ this.handleRef = el => {
55
+ const elementRef = this.props.elementRef;
56
+ this.ref = el;
57
+
58
+ if (typeof elementRef === 'function') {
59
+ elementRef(el);
60
+ }
61
+ };
62
+
63
+ this.handleImageLoaded = event => {
64
+ this.setState({
65
+ loaded: true
66
+ });
67
+ this.props.onImageLoaded(event);
68
+ };
69
+ }
71
70
 
72
71
  componentDidMount() {
73
72
  var _this$props$makeStyle, _this$props;
@@ -108,13 +107,6 @@ let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
108
107
  }
109
108
  }
110
109
 
111
- handleImageLoaded = event => {
112
- this.setState({
113
- loaded: true
114
- });
115
- this.props.onImageLoaded(event);
116
- };
117
-
118
110
  renderInitials() {
119
111
  var _this$props$styles;
120
112
 
@@ -164,6 +156,13 @@ let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
164
156
  }), !this.state.loaded && this.renderContent());
165
157
  }
166
158
 
167
- }) || _class) || _class);
159
+ }, _class2.displayName = "Avatar", _class2.componentId = 'Avatar', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
160
+ size: 'medium',
161
+ color: 'default',
162
+ hasInverseColor: false,
163
+ shape: 'circle',
164
+ display: 'inline-block',
165
+ onImageLoaded: _event => {}
166
+ }, _class2)) || _class) || _class);
168
167
  export default Avatar;
169
168
  export { Avatar };
@@ -29,7 +29,7 @@ var _props = require("./props");
29
29
 
30
30
  const _excluded = ["onImageLoaded", "styles"];
31
31
 
32
- var _dec, _dec2, _class;
32
+ var _dec, _dec2, _class, _class2;
33
33
 
34
34
  /**
35
35
  ---
@@ -37,31 +37,30 @@ category: components
37
37
  ---
38
38
  @tsProps
39
39
  **/
40
- let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = class Avatar extends _react.Component {
41
- static displayName = "Avatar";
42
- static componentId = 'Avatar';
43
- static propTypes = _props.propTypes;
44
- static allowedProps = _props.allowedProps;
45
- static defaultProps = {
46
- size: 'medium',
47
- color: 'default',
48
- hasInverseColor: false,
49
- shape: 'circle',
50
- display: 'inline-block',
51
- onImageLoaded: _event => {}
52
- };
53
- state = {
54
- loaded: false
55
- };
56
- ref = null;
57
- handleRef = el => {
58
- const elementRef = this.props.elementRef;
59
- this.ref = el;
60
-
61
- if (typeof elementRef === 'function') {
62
- elementRef(el);
63
- }
64
- };
40
+ let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Avatar extends _react.Component {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.state = {
44
+ loaded: false
45
+ };
46
+ this.ref = null;
47
+
48
+ this.handleRef = el => {
49
+ const elementRef = this.props.elementRef;
50
+ this.ref = el;
51
+
52
+ if (typeof elementRef === 'function') {
53
+ elementRef(el);
54
+ }
55
+ };
56
+
57
+ this.handleImageLoaded = event => {
58
+ this.setState({
59
+ loaded: true
60
+ });
61
+ this.props.onImageLoaded(event);
62
+ };
63
+ }
65
64
 
66
65
  componentDidMount() {
67
66
  var _this$props$makeStyle, _this$props;
@@ -102,13 +101,6 @@ let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
102
101
  }
103
102
  }
104
103
 
105
- handleImageLoaded = event => {
106
- this.setState({
107
- loaded: true
108
- });
109
- this.props.onImageLoaded(event);
110
- };
111
-
112
104
  renderInitials() {
113
105
  var _this$props$styles;
114
106
 
@@ -157,7 +149,14 @@ let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
157
149
  }), !this.state.loaded && this.renderContent());
158
150
  }
159
151
 
160
- }) || _class) || _class);
152
+ }, _class2.displayName = "Avatar", _class2.componentId = 'Avatar', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
153
+ size: 'medium',
154
+ color: 'default',
155
+ hasInverseColor: false,
156
+ shape: 'circle',
157
+ display: 'inline-block',
158
+ onImageLoaded: _event => {}
159
+ }, _class2)) || _class) || _class);
161
160
  exports.Avatar = Avatar;
162
161
  var _default = Avatar;
163
162
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-avatar",
3
- "version": "8.25.1-snapshot-10",
3
+ "version": "8.25.1-snapshot-13",
4
4
  "description": "An image or letters that represents a user.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,21 +24,21 @@
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-icons": "8.25.1-snapshot-10",
31
- "@instructure/ui-react-utils": "8.25.1-snapshot-10",
32
- "@instructure/ui-testable": "8.25.1-snapshot-10",
33
- "@instructure/ui-view": "8.25.1-snapshot-10",
27
+ "@instructure/console": "8.25.1-snapshot-13",
28
+ "@instructure/emotion": "8.25.1-snapshot-13",
29
+ "@instructure/shared-types": "8.25.1-snapshot-13",
30
+ "@instructure/ui-icons": "8.25.1-snapshot-13",
31
+ "@instructure/ui-react-utils": "8.25.1-snapshot-13",
32
+ "@instructure/ui-testable": "8.25.1-snapshot-13",
33
+ "@instructure/ui-view": "8.25.1-snapshot-13",
34
34
  "prop-types": "^15"
35
35
  },
36
36
  "devDependencies": {
37
- "@instructure/ui-babel-preset": "8.25.1-snapshot-10",
38
- "@instructure/ui-color-utils": "8.25.1-snapshot-10",
39
- "@instructure/ui-test-locator": "8.25.1-snapshot-10",
40
- "@instructure/ui-test-utils": "8.25.1-snapshot-10",
41
- "@instructure/ui-themes": "8.25.1-snapshot-10"
37
+ "@instructure/ui-babel-preset": "8.25.1-snapshot-13",
38
+ "@instructure/ui-color-utils": "8.25.1-snapshot-13",
39
+ "@instructure/ui-test-locator": "8.25.1-snapshot-13",
40
+ "@instructure/ui-test-utils": "8.25.1-snapshot-13",
41
+ "@instructure/ui-themes": "8.25.1-snapshot-13"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.8 <=17"