@instructure/ui-img 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/Img/index.js +23 -19
- package/lib/Img/index.js +23 -19
- package/package.json +12 -12
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-img
|
|
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/Img/index.js
CHANGED
|
@@ -59,34 +59,38 @@ let Img = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
componentDidMount() {
|
|
62
|
-
|
|
62
|
+
var _this$props$makeStyle, _this$props;
|
|
63
|
+
|
|
64
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
componentDidUpdate() {
|
|
66
|
-
|
|
68
|
+
var _this$props$makeStyle2, _this$props2;
|
|
69
|
+
|
|
70
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
render() {
|
|
70
|
-
const _this$
|
|
71
|
-
src = _this$
|
|
72
|
-
alt = _this$
|
|
73
|
-
margin = _this$
|
|
74
|
-
display = _this$
|
|
75
|
-
overlay = _this$
|
|
76
|
-
withGrayscale = _this$
|
|
77
|
-
withBlur = _this$
|
|
78
|
-
constrain = _this$
|
|
79
|
-
width = _this$
|
|
80
|
-
height = _this$
|
|
81
|
-
elementRef = _this$
|
|
82
|
-
styles = _this$
|
|
83
|
-
props = _objectWithoutProperties(_this$
|
|
74
|
+
const _this$props3 = this.props,
|
|
75
|
+
src = _this$props3.src,
|
|
76
|
+
alt = _this$props3.alt,
|
|
77
|
+
margin = _this$props3.margin,
|
|
78
|
+
display = _this$props3.display,
|
|
79
|
+
overlay = _this$props3.overlay,
|
|
80
|
+
withGrayscale = _this$props3.withGrayscale,
|
|
81
|
+
withBlur = _this$props3.withBlur,
|
|
82
|
+
constrain = _this$props3.constrain,
|
|
83
|
+
width = _this$props3.width,
|
|
84
|
+
height = _this$props3.height,
|
|
85
|
+
elementRef = _this$props3.elementRef,
|
|
86
|
+
styles = _this$props3.styles,
|
|
87
|
+
props = _objectWithoutProperties(_this$props3, _excluded);
|
|
84
88
|
|
|
85
89
|
const a11yProps = {
|
|
86
90
|
alt: alt || ''
|
|
87
91
|
};
|
|
88
92
|
const imageProps = {
|
|
89
|
-
css: styles
|
|
93
|
+
css: styles === null || styles === void 0 ? void 0 : styles.img,
|
|
90
94
|
src
|
|
91
95
|
};
|
|
92
96
|
const containerProps = { ...passthroughProps(props),
|
|
@@ -103,10 +107,10 @@ let Img = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
|
|
|
103
107
|
};
|
|
104
108
|
return jsx(View, Object.assign({}, rootProps, {
|
|
105
109
|
as: "span",
|
|
106
|
-
css: styles
|
|
110
|
+
css: styles === null || styles === void 0 ? void 0 : styles.container
|
|
107
111
|
}), jsx("img", Object.assign({}, imageProps, a11yProps)) // eslint-disable-line jsx-a11y/alt-text
|
|
108
112
|
, overlay && jsx("span", {
|
|
109
|
-
css: styles
|
|
113
|
+
css: styles === null || styles === void 0 ? void 0 : styles.overlay
|
|
110
114
|
}));
|
|
111
115
|
} else {
|
|
112
116
|
return jsx(View, Object.assign({}, containerProps, imageProps, a11yProps, {
|
package/lib/Img/index.js
CHANGED
|
@@ -51,33 +51,37 @@ let Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
componentDidMount() {
|
|
54
|
-
|
|
54
|
+
var _this$props$makeStyle, _this$props;
|
|
55
|
+
|
|
56
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
componentDidUpdate() {
|
|
58
|
-
|
|
60
|
+
var _this$props$makeStyle2, _this$props2;
|
|
61
|
+
|
|
62
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
render() {
|
|
62
|
-
const _this$
|
|
63
|
-
src = _this$
|
|
64
|
-
alt = _this$
|
|
65
|
-
margin = _this$
|
|
66
|
-
display = _this$
|
|
67
|
-
overlay = _this$
|
|
68
|
-
withGrayscale = _this$
|
|
69
|
-
withBlur = _this$
|
|
70
|
-
constrain = _this$
|
|
71
|
-
width = _this$
|
|
72
|
-
height = _this$
|
|
73
|
-
elementRef = _this$
|
|
74
|
-
styles = _this$
|
|
75
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
66
|
+
const _this$props3 = this.props,
|
|
67
|
+
src = _this$props3.src,
|
|
68
|
+
alt = _this$props3.alt,
|
|
69
|
+
margin = _this$props3.margin,
|
|
70
|
+
display = _this$props3.display,
|
|
71
|
+
overlay = _this$props3.overlay,
|
|
72
|
+
withGrayscale = _this$props3.withGrayscale,
|
|
73
|
+
withBlur = _this$props3.withBlur,
|
|
74
|
+
constrain = _this$props3.constrain,
|
|
75
|
+
width = _this$props3.width,
|
|
76
|
+
height = _this$props3.height,
|
|
77
|
+
elementRef = _this$props3.elementRef,
|
|
78
|
+
styles = _this$props3.styles,
|
|
79
|
+
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
76
80
|
const a11yProps = {
|
|
77
81
|
alt: alt || ''
|
|
78
82
|
};
|
|
79
83
|
const imageProps = {
|
|
80
|
-
css: styles
|
|
84
|
+
css: styles === null || styles === void 0 ? void 0 : styles.img,
|
|
81
85
|
src
|
|
82
86
|
};
|
|
83
87
|
const containerProps = { ...(0, _passthroughProps.passthroughProps)(props),
|
|
@@ -94,10 +98,10 @@ let Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
|
|
|
94
98
|
};
|
|
95
99
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, rootProps, {
|
|
96
100
|
as: "span",
|
|
97
|
-
css: styles
|
|
101
|
+
css: styles === null || styles === void 0 ? void 0 : styles.container
|
|
98
102
|
}), (0, _emotion.jsx)("img", Object.assign({}, imageProps, a11yProps)) // eslint-disable-line jsx-a11y/alt-text
|
|
99
103
|
, overlay && (0, _emotion.jsx)("span", {
|
|
100
|
-
css: styles
|
|
104
|
+
css: styles === null || styles === void 0 ? void 0 : styles.overlay
|
|
101
105
|
}));
|
|
102
106
|
} else {
|
|
103
107
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, containerProps, imageProps, a11yProps, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-img",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.1-snapshot.1+669aa5892",
|
|
4
4
|
"description": "An accessible image component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,19 +24,19 @@
|
|
|
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-dom-utils": "8.
|
|
31
|
-
"@instructure/ui-react-utils": "8.
|
|
32
|
-
"@instructure/ui-testable": "8.
|
|
33
|
-
"@instructure/ui-view": "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-dom-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-view": "8.18.1-snapshot.1+669aa5892",
|
|
34
34
|
"prop-types": "^15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.
|
|
38
|
-
"@instructure/ui-test-locator": "8.
|
|
39
|
-
"@instructure/ui-test-utils": "8.
|
|
37
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.1+669aa5892",
|
|
38
|
+
"@instructure/ui-test-locator": "8.18.1-snapshot.1+669aa5892",
|
|
39
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.1+669aa5892"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8 <=17"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "669aa58926b123028bcb9e39427d36910b78b0d1"
|
|
49
49
|
}
|