@instructure/ui-img 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.
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
- this.props.makeStyles?.();
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
- this.props.makeStyles?.();
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$props = this.props,
71
- src = _this$props.src,
72
- alt = _this$props.alt,
73
- margin = _this$props.margin,
74
- display = _this$props.display,
75
- overlay = _this$props.overlay,
76
- withGrayscale = _this$props.withGrayscale,
77
- withBlur = _this$props.withBlur,
78
- constrain = _this$props.constrain,
79
- width = _this$props.width,
80
- height = _this$props.height,
81
- elementRef = _this$props.elementRef,
82
- styles = _this$props.styles,
83
- props = _objectWithoutProperties(_this$props, _excluded);
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?.img,
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?.container
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?.overlay
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
- this.props.makeStyles?.();
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
- this.props.makeStyles?.();
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$props = this.props,
63
- src = _this$props.src,
64
- alt = _this$props.alt,
65
- margin = _this$props.margin,
66
- display = _this$props.display,
67
- overlay = _this$props.overlay,
68
- withGrayscale = _this$props.withGrayscale,
69
- withBlur = _this$props.withBlur,
70
- constrain = _this$props.constrain,
71
- width = _this$props.width,
72
- height = _this$props.height,
73
- elementRef = _this$props.elementRef,
74
- styles = _this$props.styles,
75
- props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
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?.img,
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?.container
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?.overlay
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.18.0",
3
+ "version": "8.18.1-snapshot.2+ca4c1ff9d",
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.18.0",
28
- "@instructure/emotion": "8.18.0",
29
- "@instructure/shared-types": "8.18.0",
30
- "@instructure/ui-dom-utils": "8.18.0",
31
- "@instructure/ui-react-utils": "8.18.0",
32
- "@instructure/ui-testable": "8.18.0",
33
- "@instructure/ui-view": "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-dom-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-view": "8.18.1-snapshot.2+ca4c1ff9d",
34
34
  "prop-types": "^15"
35
35
  },
36
36
  "devDependencies": {
37
- "@instructure/ui-babel-preset": "8.18.0",
38
- "@instructure/ui-test-locator": "8.18.0",
39
- "@instructure/ui-test-utils": "8.18.0"
37
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
38
+ "@instructure/ui-test-locator": "8.18.1-snapshot.2+ca4c1ff9d",
39
+ "@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8 <=17"
@@ -44,5 +44,6 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "sideEffects": false
47
+ "sideEffects": false,
48
+ "gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
48
49
  }