@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.
- package/CHANGELOG.md +4 -0
- package/es/InlineSVG/InlineSVGLocator.js +2 -1
- package/es/InlineSVG/index.js +14 -37
- package/es/InlineSVG/props.js +1 -0
- package/es/InlineSVG/styles.js +1 -2
- package/es/InlineSVG/theme.js +3 -3
- package/es/SVGIcon/SVGIconLocator.js +2 -1
- package/es/SVGIcon/index.js +15 -28
- package/es/SVGIcon/props.js +2 -1
- package/es/SVGIcon/styles.js +2 -3
- package/es/SVGIcon/theme.js +2 -2
- package/es/index.js +1 -0
- package/lib/InlineSVG/InlineSVGLocator.js +1 -3
- package/lib/InlineSVG/index.js +14 -46
- package/lib/InlineSVG/locator.js +0 -2
- package/lib/InlineSVG/props.js +1 -3
- package/lib/InlineSVG/styles.js +1 -3
- package/lib/InlineSVG/theme.js +3 -4
- package/lib/SVGIcon/SVGIconLocator.js +1 -3
- package/lib/SVGIcon/index.js +15 -35
- package/lib/SVGIcon/locator.js +0 -2
- package/lib/SVGIcon/props.js +3 -5
- package/lib/SVGIcon/styles.js +2 -4
- package/lib/SVGIcon/theme.js +2 -3
- package/lib/index.js +0 -2
- package/package.json +11 -11
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -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;
|
package/lib/SVGIcon/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
package/lib/SVGIcon/locator.js
CHANGED
package/lib/SVGIcon/props.js
CHANGED
|
@@ -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
|
-
|
|
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']),
|
package/lib/SVGIcon/styles.js
CHANGED
|
@@ -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
|
-
|
|
45
|
-
|
|
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;
|
package/lib/SVGIcon/theme.js
CHANGED
|
@@ -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 {
|
|
44
|
+
return {
|
|
45
|
+
...componentVariables
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
|
|
49
48
|
var _default = generateComponentTheme;
|
|
50
49
|
exports.default = _default;
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-svg-images",
|
|
3
|
-
"version": "8.33.
|
|
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.
|
|
27
|
-
"@instructure/ui-test-locator": "8.33.
|
|
28
|
-
"@instructure/ui-test-utils": "8.33.
|
|
29
|
-
"@instructure/ui-themes": "8.33.
|
|
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.
|
|
34
|
-
"@instructure/shared-types": "8.33.
|
|
35
|
-
"@instructure/ui-react-utils": "8.33.
|
|
36
|
-
"@instructure/ui-testable": "8.33.
|
|
37
|
-
"@instructure/ui-utils": "8.33.
|
|
38
|
-
"@instructure/uid": "8.33.
|
|
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": {
|