@instructure/ui-avatar 8.10.3-snapshot.22 → 8.10.3-snapshot.23
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/Avatar/index.js +9 -7
- package/lib/Avatar/index.js +9 -7
- package/package.json +13 -13
- package/src/Avatar/index.tsx +6 -1
- package/src/Avatar/props.ts +1 -1
- package/types/Avatar/index.d.ts.map +1 -1
- package/types/Avatar/props.d.ts +1 -1
package/es/Avatar/index.js
CHANGED
|
@@ -52,10 +52,12 @@ let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
|
|
|
52
52
|
this.ref = null;
|
|
53
53
|
|
|
54
54
|
this.handleRef = el => {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const elementRef = this.props.elementRef;
|
|
57
56
|
this.ref = el;
|
|
58
|
-
|
|
57
|
+
|
|
58
|
+
if (typeof elementRef === 'function') {
|
|
59
|
+
elementRef(el);
|
|
60
|
+
}
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
this.handleImageLoaded = event => {
|
|
@@ -109,10 +111,10 @@ let Avatar = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = t
|
|
|
109
111
|
render() {
|
|
110
112
|
var _this$props$styles2;
|
|
111
113
|
|
|
112
|
-
const _this$
|
|
113
|
-
onImageLoaded = _this$
|
|
114
|
-
styles = _this$
|
|
115
|
-
props = _objectWithoutProperties(_this$
|
|
114
|
+
const _this$props = this.props,
|
|
115
|
+
onImageLoaded = _this$props.onImageLoaded,
|
|
116
|
+
styles = _this$props.styles,
|
|
117
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
116
118
|
|
|
117
119
|
return jsx(View, Object.assign({}, passthroughProps(props), {
|
|
118
120
|
"aria-label": this.props.alt ? this.props.alt : void 0,
|
package/lib/Avatar/index.js
CHANGED
|
@@ -44,10 +44,12 @@ let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
44
44
|
this.ref = null;
|
|
45
45
|
|
|
46
46
|
this.handleRef = el => {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const elementRef = this.props.elementRef;
|
|
49
48
|
this.ref = el;
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
if (typeof elementRef === 'function') {
|
|
51
|
+
elementRef(el);
|
|
52
|
+
}
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
this.handleImageLoaded = event => {
|
|
@@ -101,10 +103,10 @@ let Avatar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _
|
|
|
101
103
|
render() {
|
|
102
104
|
var _this$props$styles2;
|
|
103
105
|
|
|
104
|
-
const _this$
|
|
105
|
-
onImageLoaded = _this$
|
|
106
|
-
styles = _this$
|
|
107
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
106
|
+
const _this$props = this.props,
|
|
107
|
+
onImageLoaded = _this$props.onImageLoaded,
|
|
108
|
+
styles = _this$props.styles,
|
|
109
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
108
110
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
109
111
|
"aria-label": this.props.alt ? this.props.alt : void 0,
|
|
110
112
|
role: this.props.alt ? 'img' : void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-avatar",
|
|
3
|
-
"version": "8.10.3-snapshot.
|
|
3
|
+
"version": "8.10.3-snapshot.23+5aaa29662",
|
|
4
4
|
"description": "An image or letters that represents a user.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.10.3-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.10.3-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.10.3-snapshot.
|
|
31
|
-
"@instructure/ui-react-utils": "8.10.3-snapshot.
|
|
32
|
-
"@instructure/ui-testable": "8.10.3-snapshot.
|
|
33
|
-
"@instructure/ui-view": "8.10.3-snapshot.
|
|
28
|
+
"@instructure/console": "8.10.3-snapshot.23+5aaa29662",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.23+5aaa29662",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.23+5aaa29662",
|
|
31
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.23+5aaa29662",
|
|
32
|
+
"@instructure/ui-testable": "8.10.3-snapshot.23+5aaa29662",
|
|
33
|
+
"@instructure/ui-view": "8.10.3-snapshot.23+5aaa29662",
|
|
34
34
|
"prop-types": "^15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.10.3-snapshot.
|
|
38
|
-
"@instructure/ui-color-utils": "8.10.3-snapshot.
|
|
39
|
-
"@instructure/ui-test-locator": "8.10.3-snapshot.
|
|
40
|
-
"@instructure/ui-test-utils": "8.10.3-snapshot.
|
|
41
|
-
"@instructure/ui-themes": "8.10.3-snapshot.
|
|
37
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.23+5aaa29662",
|
|
38
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.23+5aaa29662",
|
|
39
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.23+5aaa29662",
|
|
40
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.23+5aaa29662",
|
|
41
|
+
"@instructure/ui-themes": "8.10.3-snapshot.23+5aaa29662"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "5aaa296621d72faebe1a809a8895a8185587008d"
|
|
51
51
|
}
|
package/src/Avatar/index.tsx
CHANGED
|
@@ -63,8 +63,13 @@ class Avatar extends Component<AvatarProps, AvatarState> {
|
|
|
63
63
|
ref: Element | null = null
|
|
64
64
|
|
|
65
65
|
handleRef = (el: Element | null) => {
|
|
66
|
+
const { elementRef } = this.props
|
|
67
|
+
|
|
66
68
|
this.ref = el
|
|
67
|
-
|
|
69
|
+
|
|
70
|
+
if (typeof elementRef === 'function') {
|
|
71
|
+
elementRef(el)
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
componentDidMount() {
|
package/src/Avatar/props.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAMjD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEvD;;;;;GAKG;AACH,cAEM,MAAO,SAAQ,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACtD,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;;QAXlB;;;;;WAKG;;;;;;;;;;;OAM2B;IAC5B,MAAM,CAAC,YAAY;;QAZrB;;;;;WAKG;;;;;;;;;;;SAOiC;IAClC,MAAM,CAAC,YAAY;;;;;yCAKO,cAAc;MAC9B;IAEV,KAAK;;MAAoB;IAEzB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,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