@instructure/ui-img 8.56.2-pr-snapshot-1721749364069 → 8.56.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/CHANGELOG.md +1 -1
- package/lib/Img/ImgLocator.js +2 -2
- package/lib/Img/index.js +7 -7
- package/package.json +11 -11
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.56.2
|
|
6
|
+
## [8.56.2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2) (2024-08-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-img
|
|
9
9
|
|
package/lib/Img/ImgLocator.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ImgLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _index = require("./index");
|
|
9
9
|
/*
|
|
10
10
|
* The MIT License (MIT)
|
|
@@ -31,4 +31,4 @@ var _index = require("./index");
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
34
|
-
const ImgLocator = exports.ImgLocator = (0,
|
|
34
|
+
const ImgLocator = exports.ImgLocator = (0, _locator.locator)(_index.Img.selector);
|
package/lib/Img/index.js
CHANGED
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Img = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
12
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
13
13
|
var _emotion = require("@instructure/emotion");
|
|
14
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
15
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +45,7 @@ var _dec, _dec2, _class, _class2;
|
|
|
45
45
|
category: components
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
|
-
let Img = exports.Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
48
|
+
let Img = exports.Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Img extends _react.Component {
|
|
49
49
|
constructor(...args) {
|
|
50
50
|
super(...args);
|
|
51
51
|
this.ref = null;
|
|
@@ -90,7 +90,7 @@ let Img = exports.Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
90
90
|
loading
|
|
91
91
|
};
|
|
92
92
|
const containerProps = {
|
|
93
|
-
...(0,
|
|
93
|
+
...(0, _passthroughProps.passthroughProps)(props),
|
|
94
94
|
width,
|
|
95
95
|
height,
|
|
96
96
|
margin,
|
|
@@ -102,7 +102,7 @@ let Img = exports.Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
102
102
|
const rootProps = {
|
|
103
103
|
...containerProps
|
|
104
104
|
};
|
|
105
|
-
return (0, _emotion.jsx)(
|
|
105
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, rootProps, {
|
|
106
106
|
as: "span",
|
|
107
107
|
css: styles === null || styles === void 0 ? void 0 : styles.container
|
|
108
108
|
}), (0, _emotion.jsx)("img", Object.assign({}, imageProps, a11yProps)) // eslint-disable-line jsx-a11y/alt-text
|
|
@@ -110,7 +110,7 @@ let Img = exports.Img = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
110
110
|
css: styles === null || styles === void 0 ? void 0 : styles.overlay
|
|
111
111
|
}));
|
|
112
112
|
} else {
|
|
113
|
-
return (0, _emotion.jsx)(
|
|
113
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, containerProps, imageProps, a11yProps, {
|
|
114
114
|
as: "img"
|
|
115
115
|
}));
|
|
116
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-img",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.2",
|
|
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.23.2",
|
|
27
|
-
"@instructure/console": "8.56.2
|
|
28
|
-
"@instructure/emotion": "8.56.2
|
|
29
|
-
"@instructure/shared-types": "8.56.2
|
|
30
|
-
"@instructure/ui-dom-utils": "8.56.2
|
|
31
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
32
|
-
"@instructure/ui-testable": "8.56.2
|
|
33
|
-
"@instructure/ui-view": "8.56.2
|
|
27
|
+
"@instructure/console": "8.56.2",
|
|
28
|
+
"@instructure/emotion": "8.56.2",
|
|
29
|
+
"@instructure/shared-types": "8.56.2",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.56.2",
|
|
31
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
32
|
+
"@instructure/ui-testable": "8.56.2",
|
|
33
|
+
"@instructure/ui-view": "8.56.2",
|
|
34
34
|
"prop-types": "^15.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
38
|
-
"@instructure/ui-test-locator": "8.56.2
|
|
39
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
37
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
38
|
+
"@instructure/ui-test-locator": "8.56.2",
|
|
39
|
+
"@instructure/ui-test-utils": "8.56.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8 <=18"
|