@instructure/ui-svg-images 8.33.1 → 8.33.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.
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SVGIconLocator = void 0;
7
-
8
7
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
9
-
10
8
  var _index = require("./index");
11
-
12
9
  /*
13
10
  * The MIT License (MIT)
14
11
  *
@@ -32,6 +29,7 @@ var _index = require("./index");
32
29
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
30
  * SOFTWARE.
34
31
  */
32
+
35
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
36
34
  const SVGIconLocator = (0, _locator.locator)(_index.SVGIcon.selector);
37
35
  exports.SVGIconLocator = SVGIconLocator;
@@ -1,33 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = exports.SVGIcon = void 0;
9
-
10
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
-
12
9
  var _react = require("react");
13
-
14
10
  var _testable = require("@instructure/ui-testable/lib/testable.js");
15
-
16
11
  var _emotion = require("@instructure/emotion");
17
-
18
12
  var _InlineSVG = require("../InlineSVG");
19
-
20
13
  var _styles = _interopRequireDefault(require("./styles"));
21
-
22
14
  var _theme = _interopRequireDefault(require("./theme"));
23
-
24
15
  var _props = require("./props");
25
-
26
16
  const _excluded = ["rotate", "className", "themeOverride", "size", "bidirectional", "makeStyles", "styles"],
27
- _excluded2 = ["sizeXSmall", "sizeSmall", "sizeMedium", "sizeLarge", "sizeXLarge"];
28
-
17
+ _excluded2 = ["sizeXSmall", "sizeSmall", "sizeMedium", "sizeLarge", "sizeXLarge"];
29
18
  var _dec, _dec2, _class, _class2;
30
-
31
19
  /**
32
20
  ---
33
21
  category: components/utilities
@@ -38,46 +26,39 @@ let SVGIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
38
26
  constructor() {
39
27
  super(...arguments);
40
28
  this.ref = null;
41
-
42
29
  this.handleRef = el => {
43
30
  const elementRef = this.props.elementRef;
44
31
  this.ref = el;
45
-
46
32
  if (typeof elementRef === 'function') {
47
33
  elementRef(el);
48
34
  }
49
35
  };
50
36
  }
51
-
52
37
  componentDidMount() {
53
38
  var _this$props$makeStyle, _this$props;
54
-
55
39
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
56
40
  }
57
-
58
41
  componentDidUpdate() {
59
42
  var _this$props$makeStyle2, _this$props2;
60
-
61
43
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
62
44
  }
63
-
64
45
  render() {
65
46
  const _this$props3 = this.props,
66
- rotate = _this$props3.rotate,
67
- className = _this$props3.className,
68
- themeOverride = _this$props3.themeOverride,
69
- size = _this$props3.size,
70
- bidirectional = _this$props3.bidirectional,
71
- makeStyles = _this$props3.makeStyles,
72
- styles = _this$props3.styles,
73
- props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
47
+ rotate = _this$props3.rotate,
48
+ className = _this$props3.className,
49
+ themeOverride = _this$props3.themeOverride,
50
+ size = _this$props3.size,
51
+ bidirectional = _this$props3.bidirectional,
52
+ makeStyles = _this$props3.makeStyles,
53
+ styles = _this$props3.styles,
54
+ props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
74
55
  const _ref = themeOverride,
75
- sizeXSmall = _ref.sizeXSmall,
76
- sizeSmall = _ref.sizeSmall,
77
- sizeMedium = _ref.sizeMedium,
78
- sizeLarge = _ref.sizeLarge,
79
- sizeXLarge = _ref.sizeXLarge,
80
- inlineSVGThemeOverrides = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
56
+ sizeXSmall = _ref.sizeXSmall,
57
+ sizeSmall = _ref.sizeSmall,
58
+ sizeMedium = _ref.sizeMedium,
59
+ sizeLarge = _ref.sizeLarge,
60
+ sizeXLarge = _ref.sizeXLarge,
61
+ inlineSVGThemeOverrides = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
81
62
  return (0, _emotion.jsx)(_InlineSVG.InlineSVG, Object.assign({}, props, {
82
63
  themeOverride: inlineSVGThemeOverrides,
83
64
  rotate: rotate,
@@ -86,7 +67,6 @@ let SVGIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
86
67
  elementRef: this.handleRef
87
68
  }));
88
69
  }
89
-
90
70
  }, _class2.displayName = "SVGIcon", _class2.componentId = 'SVGIcon', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
91
71
  rotate: '0',
92
72
  bidirectional: false
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "SVGIconLocator", {
10
10
  }
11
11
  });
12
12
  exports.default = void 0;
13
-
14
13
  var _SVGIconLocator = require("./SVGIconLocator");
15
-
16
14
  /*
17
15
  * The MIT License (MIT)
18
16
  *
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.propTypes = exports.allowedProps = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _InlineSVG = require("../InlineSVG");
13
-
14
10
  /*
15
11
  * The MIT License (MIT)
16
12
  *
@@ -34,7 +30,9 @@ var _InlineSVG = require("../InlineSVG");
34
30
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
31
  * SOFTWARE.
36
32
  */
37
- const propTypes = { // eslint-disable-next-line react/forbid-foreign-prop-types
33
+
34
+ const propTypes = {
35
+ // eslint-disable-next-line react/forbid-foreign-prop-types
38
36
  ..._InlineSVG.InlineSVG.propTypes,
39
37
  rotate: _propTypes.default.oneOf(['0', '90', '180', '270']),
40
38
  size: _propTypes.default.oneOf(['x-small', 'small', 'medium', 'large', 'x-large']),
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -41,8 +40,8 @@ exports.default = void 0;
41
40
  */
42
41
  const generateStyle = (componentTheme, props) => {
43
42
  const rotate = props.rotate,
44
- size = props.size,
45
- bidirectional = props.bidirectional;
43
+ size = props.size,
44
+ bidirectional = props.bidirectional;
46
45
  const rotateVariants = {
47
46
  0: {},
48
47
  90: {
@@ -101,6 +100,5 @@ const generateStyle = (componentTheme, props) => {
101
100
  }
102
101
  };
103
102
  };
104
-
105
103
  var _default = generateStyle;
106
104
  exports.default = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -42,9 +41,9 @@ const generateComponentTheme = () => {
42
41
  sizeLarge: '5rem',
43
42
  sizeXLarge: '10rem'
44
43
  };
45
- return { ...componentVariables
44
+ return {
45
+ ...componentVariables
46
46
  };
47
47
  };
48
-
49
48
  var _default = generateComponentTheme;
50
49
  exports.default = _default;
package/lib/index.js CHANGED
@@ -15,7 +15,5 @@ Object.defineProperty(exports, "SVGIcon", {
15
15
  return _SVGIcon.SVGIcon;
16
16
  }
17
17
  });
18
-
19
18
  var _InlineSVG = require("./InlineSVG");
20
-
21
19
  var _SVGIcon = require("./SVGIcon");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-svg-images",
3
- "version": "8.33.1",
3
+ "version": "8.33.2",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,19 +23,19 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.33.1",
27
- "@instructure/ui-test-locator": "8.33.1",
28
- "@instructure/ui-test-utils": "8.33.1",
29
- "@instructure/ui-themes": "8.33.1"
26
+ "@instructure/ui-babel-preset": "8.33.2",
27
+ "@instructure/ui-test-locator": "8.33.2",
28
+ "@instructure/ui-test-utils": "8.33.2",
29
+ "@instructure/ui-themes": "8.33.2"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/emotion": "8.33.1",
34
- "@instructure/shared-types": "8.33.1",
35
- "@instructure/ui-react-utils": "8.33.1",
36
- "@instructure/ui-testable": "8.33.1",
37
- "@instructure/ui-utils": "8.33.1",
38
- "@instructure/uid": "8.33.1",
33
+ "@instructure/emotion": "8.33.2",
34
+ "@instructure/shared-types": "8.33.2",
35
+ "@instructure/ui-react-utils": "8.33.2",
36
+ "@instructure/ui-testable": "8.33.2",
37
+ "@instructure/ui-utils": "8.33.2",
38
+ "@instructure/uid": "8.33.2",
39
39
  "prop-types": "^15"
40
40
  },
41
41
  "peerDependencies": {