@instructure/ui-svg-images 8.10.1 → 8.10.3-snapshot.12
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/LICENSE.md +27 -0
- package/es/InlineSVG/index.js +24 -14
- package/es/InlineSVG/props.js +3 -2
- package/es/SVGIcon/index.js +26 -13
- package/es/SVGIcon/props.js +1 -1
- package/lib/InlineSVG/index.js +24 -14
- package/lib/InlineSVG/props.js +3 -2
- package/lib/SVGIcon/index.js +26 -13
- package/lib/SVGIcon/props.js +1 -1
- package/package.json +13 -12
- package/src/InlineSVG/index.tsx +8 -2
- package/src/InlineSVG/props.ts +5 -2
- package/src/SVGIcon/index.tsx +9 -1
- package/src/SVGIcon/props.ts +1 -0
- package/types/InlineSVG/InlineSVGLocator.d.ts +64 -64
- package/types/InlineSVG/index.d.ts +2 -0
- package/types/InlineSVG/index.d.ts.map +1 -1
- package/types/InlineSVG/props.d.ts +1 -0
- package/types/InlineSVG/props.d.ts.map +1 -1
- package/types/SVGIcon/SVGIconLocator.d.ts +64 -64
- package/types/SVGIcon/index.d.ts +3 -1
- package/types/SVGIcon/index.d.ts.map +1 -1
- package/types/SVGIcon/props.d.ts.map +1 -1
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.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-svg-images
|
|
9
|
+
|
|
6
10
|
## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-svg-images
|
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/InlineSVG/index.js
CHANGED
|
@@ -45,20 +45,29 @@ category: components/utilities
|
|
|
45
45
|
let InlineSVG = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineSVG extends Component {
|
|
46
46
|
constructor() {
|
|
47
47
|
super();
|
|
48
|
+
this.ref = null;
|
|
49
|
+
|
|
50
|
+
this.handleRef = el => {
|
|
51
|
+
var _this$props$elementRe, _this$props;
|
|
52
|
+
|
|
53
|
+
this.ref = el;
|
|
54
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
55
|
+
};
|
|
56
|
+
|
|
48
57
|
this.titleId = uid('InlineSVG-title');
|
|
49
58
|
this.descId = uid('InlineSVG-desc');
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
componentDidMount() {
|
|
53
|
-
var _this$props$makeStyle, _this$
|
|
62
|
+
var _this$props$makeStyle, _this$props2;
|
|
54
63
|
|
|
55
|
-
(_this$props$makeStyle = (_this$
|
|
64
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
componentDidUpdate() {
|
|
59
|
-
var _this$props$makeStyle2, _this$
|
|
68
|
+
var _this$props$makeStyle2, _this$props3;
|
|
60
69
|
|
|
61
|
-
(_this$props$makeStyle2 = (_this$
|
|
70
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
get role() {
|
|
@@ -114,15 +123,15 @@ let InlineSVG = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
render() {
|
|
117
|
-
const _this$
|
|
118
|
-
style = _this$
|
|
119
|
-
title = _this$
|
|
120
|
-
description = _this$
|
|
121
|
-
focusable = _this$
|
|
122
|
-
children = _this$
|
|
123
|
-
src = _this$
|
|
124
|
-
styles = _this$
|
|
125
|
-
props = _objectWithoutProperties(_this$
|
|
126
|
+
const _this$props4 = this.props,
|
|
127
|
+
style = _this$props4.style,
|
|
128
|
+
title = _this$props4.title,
|
|
129
|
+
description = _this$props4.description,
|
|
130
|
+
focusable = _this$props4.focusable,
|
|
131
|
+
children = _this$props4.children,
|
|
132
|
+
src = _this$props4.src,
|
|
133
|
+
styles = _this$props4.styles,
|
|
134
|
+
props = _objectWithoutProperties(_this$props4, _excluded); // if width or height are 'auto', don't supply anything to the SVG
|
|
126
135
|
|
|
127
136
|
|
|
128
137
|
const width = this.props.width === 'auto' ? null : this.props.width;
|
|
@@ -139,7 +148,8 @@ let InlineSVG = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
139
148
|
role: this.role,
|
|
140
149
|
focusable: focusable ? 'true' : 'false',
|
|
141
150
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineSVG,
|
|
142
|
-
className: props.className
|
|
151
|
+
className: props.className,
|
|
152
|
+
ref: this.handleRef
|
|
143
153
|
}), this.renderTitle(), this.renderDesc(description), this.renderContent());
|
|
144
154
|
}
|
|
145
155
|
|
package/es/InlineSVG/props.js
CHANGED
|
@@ -39,7 +39,8 @@ const propTypes = {
|
|
|
39
39
|
*/
|
|
40
40
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
41
41
|
inline: PropTypes.bool,
|
|
42
|
-
color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'success', 'error', 'alert', 'warning', 'brand', 'auto'])
|
|
42
|
+
color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'success', 'error', 'alert', 'warning', 'brand', 'auto']),
|
|
43
|
+
elementRef: PropTypes.func
|
|
43
44
|
};
|
|
44
|
-
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color'];
|
|
45
|
+
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'elementRef'];
|
|
45
46
|
export { propTypes, allowedProps };
|
package/es/SVGIcon/index.js
CHANGED
|
@@ -42,32 +42,45 @@ category: components/utilities
|
|
|
42
42
|
**/
|
|
43
43
|
|
|
44
44
|
let SVGIcon = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class SVGIcon extends Component {
|
|
45
|
+
constructor(...args) {
|
|
46
|
+
super(...args);
|
|
47
|
+
this.ref = null;
|
|
48
|
+
|
|
49
|
+
this.handleRef = el => {
|
|
50
|
+
var _this$props$elementRe, _this$props;
|
|
51
|
+
|
|
52
|
+
this.ref = el;
|
|
53
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
componentDidMount() {
|
|
46
|
-
var _this$props$makeStyle, _this$
|
|
58
|
+
var _this$props$makeStyle, _this$props2;
|
|
47
59
|
|
|
48
|
-
(_this$props$makeStyle = (_this$
|
|
60
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
componentDidUpdate() {
|
|
52
|
-
var _this$props$makeStyle2, _this$
|
|
64
|
+
var _this$props$makeStyle2, _this$props3;
|
|
53
65
|
|
|
54
|
-
(_this$props$makeStyle2 = (_this$
|
|
66
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
55
67
|
}
|
|
56
68
|
|
|
57
69
|
render() {
|
|
58
|
-
const _this$
|
|
59
|
-
rotate = _this$
|
|
60
|
-
className = _this$
|
|
61
|
-
size = _this$
|
|
62
|
-
bidirectional = _this$
|
|
63
|
-
makeStyles = _this$
|
|
64
|
-
styles = _this$
|
|
65
|
-
props = _objectWithoutProperties(_this$
|
|
70
|
+
const _this$props4 = this.props,
|
|
71
|
+
rotate = _this$props4.rotate,
|
|
72
|
+
className = _this$props4.className,
|
|
73
|
+
size = _this$props4.size,
|
|
74
|
+
bidirectional = _this$props4.bidirectional,
|
|
75
|
+
makeStyles = _this$props4.makeStyles,
|
|
76
|
+
styles = _this$props4.styles,
|
|
77
|
+
props = _objectWithoutProperties(_this$props4, _excluded);
|
|
66
78
|
|
|
67
79
|
return jsx(InlineSVG, Object.assign({}, props, {
|
|
68
80
|
rotate: rotate,
|
|
69
81
|
css: styles === null || styles === void 0 ? void 0 : styles.svgIcon,
|
|
70
|
-
className: className
|
|
82
|
+
className: className,
|
|
83
|
+
elementRef: this.handleRef
|
|
71
84
|
}));
|
|
72
85
|
}
|
|
73
86
|
|
package/es/SVGIcon/props.js
CHANGED
|
@@ -29,5 +29,5 @@ const propTypes = { // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
|
29
29
|
size: PropTypes.oneOf(['x-small', 'small', 'medium', 'large', 'x-large']),
|
|
30
30
|
bidirectional: PropTypes.bool
|
|
31
31
|
};
|
|
32
|
-
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'rotate', 'size', 'bidirectional'];
|
|
32
|
+
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'elementRef', 'rotate', 'size', 'bidirectional'];
|
|
33
33
|
export { propTypes, allowedProps };
|
package/lib/InlineSVG/index.js
CHANGED
|
@@ -37,20 +37,29 @@ category: components/utilities
|
|
|
37
37
|
let InlineSVG = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineSVG extends _react.Component {
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
40
|
+
this.ref = null;
|
|
41
|
+
|
|
42
|
+
this.handleRef = el => {
|
|
43
|
+
var _this$props$elementRe, _this$props;
|
|
44
|
+
|
|
45
|
+
this.ref = el;
|
|
46
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
47
|
+
};
|
|
48
|
+
|
|
40
49
|
this.titleId = (0, _uid.uid)('InlineSVG-title');
|
|
41
50
|
this.descId = (0, _uid.uid)('InlineSVG-desc');
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
componentDidMount() {
|
|
45
|
-
var _this$props$makeStyle, _this$
|
|
54
|
+
var _this$props$makeStyle, _this$props2;
|
|
46
55
|
|
|
47
|
-
(_this$props$makeStyle = (_this$
|
|
56
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
componentDidUpdate() {
|
|
51
|
-
var _this$props$makeStyle2, _this$
|
|
60
|
+
var _this$props$makeStyle2, _this$props3;
|
|
52
61
|
|
|
53
|
-
(_this$props$makeStyle2 = (_this$
|
|
62
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
get role() {
|
|
@@ -106,15 +115,15 @@ let InlineSVG = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
render() {
|
|
109
|
-
const _this$
|
|
110
|
-
style = _this$
|
|
111
|
-
title = _this$
|
|
112
|
-
description = _this$
|
|
113
|
-
focusable = _this$
|
|
114
|
-
children = _this$
|
|
115
|
-
src = _this$
|
|
116
|
-
styles = _this$
|
|
117
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
118
|
+
const _this$props4 = this.props,
|
|
119
|
+
style = _this$props4.style,
|
|
120
|
+
title = _this$props4.title,
|
|
121
|
+
description = _this$props4.description,
|
|
122
|
+
focusable = _this$props4.focusable,
|
|
123
|
+
children = _this$props4.children,
|
|
124
|
+
src = _this$props4.src,
|
|
125
|
+
styles = _this$props4.styles,
|
|
126
|
+
props = (0, _objectWithoutProperties2.default)(_this$props4, _excluded); // if width or height are 'auto', don't supply anything to the SVG
|
|
118
127
|
|
|
119
128
|
const width = this.props.width === 'auto' ? null : this.props.width;
|
|
120
129
|
const height = this.props.height === 'auto' ? null : this.props.height;
|
|
@@ -130,7 +139,8 @@ let InlineSVG = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
130
139
|
role: this.role,
|
|
131
140
|
focusable: focusable ? 'true' : 'false',
|
|
132
141
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineSVG,
|
|
133
|
-
className: props.className
|
|
142
|
+
className: props.className,
|
|
143
|
+
ref: this.handleRef
|
|
134
144
|
}), this.renderTitle(), this.renderDesc(description), this.renderContent());
|
|
135
145
|
}
|
|
136
146
|
|
package/lib/InlineSVG/props.js
CHANGED
|
@@ -49,8 +49,9 @@ const propTypes = {
|
|
|
49
49
|
*/
|
|
50
50
|
height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
51
51
|
inline: _propTypes.default.bool,
|
|
52
|
-
color: _propTypes.default.oneOf(['inherit', 'primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'success', 'error', 'alert', 'warning', 'brand', 'auto'])
|
|
52
|
+
color: _propTypes.default.oneOf(['inherit', 'primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'success', 'error', 'alert', 'warning', 'brand', 'auto']),
|
|
53
|
+
elementRef: _propTypes.default.func
|
|
53
54
|
};
|
|
54
55
|
exports.propTypes = propTypes;
|
|
55
|
-
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color'];
|
|
56
|
+
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'elementRef'];
|
|
56
57
|
exports.allowedProps = allowedProps;
|
package/lib/SVGIcon/index.js
CHANGED
|
@@ -33,31 +33,44 @@ category: components/utilities
|
|
|
33
33
|
---
|
|
34
34
|
**/
|
|
35
35
|
let SVGIcon = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class SVGIcon extends _react.Component {
|
|
36
|
+
constructor(...args) {
|
|
37
|
+
super(...args);
|
|
38
|
+
this.ref = null;
|
|
39
|
+
|
|
40
|
+
this.handleRef = el => {
|
|
41
|
+
var _this$props$elementRe, _this$props;
|
|
42
|
+
|
|
43
|
+
this.ref = el;
|
|
44
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
36
48
|
componentDidMount() {
|
|
37
|
-
var _this$props$makeStyle, _this$
|
|
49
|
+
var _this$props$makeStyle, _this$props2;
|
|
38
50
|
|
|
39
|
-
(_this$props$makeStyle = (_this$
|
|
51
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
componentDidUpdate() {
|
|
43
|
-
var _this$props$makeStyle2, _this$
|
|
55
|
+
var _this$props$makeStyle2, _this$props3;
|
|
44
56
|
|
|
45
|
-
(_this$props$makeStyle2 = (_this$
|
|
57
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
46
58
|
}
|
|
47
59
|
|
|
48
60
|
render() {
|
|
49
|
-
const _this$
|
|
50
|
-
rotate = _this$
|
|
51
|
-
className = _this$
|
|
52
|
-
size = _this$
|
|
53
|
-
bidirectional = _this$
|
|
54
|
-
makeStyles = _this$
|
|
55
|
-
styles = _this$
|
|
56
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
61
|
+
const _this$props4 = this.props,
|
|
62
|
+
rotate = _this$props4.rotate,
|
|
63
|
+
className = _this$props4.className,
|
|
64
|
+
size = _this$props4.size,
|
|
65
|
+
bidirectional = _this$props4.bidirectional,
|
|
66
|
+
makeStyles = _this$props4.makeStyles,
|
|
67
|
+
styles = _this$props4.styles,
|
|
68
|
+
props = (0, _objectWithoutProperties2.default)(_this$props4, _excluded);
|
|
57
69
|
return (0, _emotion.jsx)(_InlineSVG.InlineSVG, Object.assign({}, props, {
|
|
58
70
|
rotate: rotate,
|
|
59
71
|
css: styles === null || styles === void 0 ? void 0 : styles.svgIcon,
|
|
60
|
-
className: className
|
|
72
|
+
className: className,
|
|
73
|
+
elementRef: this.handleRef
|
|
61
74
|
}));
|
|
62
75
|
}
|
|
63
76
|
|
package/lib/SVGIcon/props.js
CHANGED
|
@@ -41,5 +41,5 @@ const propTypes = { // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
|
41
41
|
bidirectional: _propTypes.default.bool
|
|
42
42
|
};
|
|
43
43
|
exports.propTypes = propTypes;
|
|
44
|
-
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'rotate', 'size', 'bidirectional'];
|
|
44
|
+
const allowedProps = ['children', 'src', 'title', 'description', 'focusable', 'width', 'height', 'inline', 'color', 'elementRef', 'rotate', 'size', 'bidirectional'];
|
|
45
45
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-svg-images",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.12+af470a237",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
28
|
-
"@instructure/ui-test-locator": "8.10.
|
|
29
|
-
"@instructure/ui-test-utils": "8.10.
|
|
30
|
-
"@instructure/ui-themes": "8.10.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.12+af470a237",
|
|
28
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.12+af470a237",
|
|
29
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.12+af470a237",
|
|
30
|
+
"@instructure/ui-themes": "8.10.3-snapshot.12+af470a237"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/emotion": "8.10.
|
|
35
|
-
"@instructure/shared-types": "8.10.
|
|
36
|
-
"@instructure/ui-react-utils": "8.10.
|
|
37
|
-
"@instructure/ui-testable": "8.10.
|
|
38
|
-
"@instructure/ui-utils": "8.10.
|
|
39
|
-
"@instructure/uid": "8.10.
|
|
34
|
+
"@instructure/emotion": "8.10.3-snapshot.12+af470a237",
|
|
35
|
+
"@instructure/shared-types": "8.10.3-snapshot.12+af470a237",
|
|
36
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.12+af470a237",
|
|
37
|
+
"@instructure/ui-testable": "8.10.3-snapshot.12+af470a237",
|
|
38
|
+
"@instructure/ui-utils": "8.10.3-snapshot.12+af470a237",
|
|
39
|
+
"@instructure/uid": "8.10.3-snapshot.12+af470a237",
|
|
40
40
|
"prop-types": "^15"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -45,5 +45,6 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"sideEffects": false
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"gitHead": "af470a2374463c265ed1304870b7890fc8bb09a4"
|
|
49
50
|
}
|
package/src/InlineSVG/index.tsx
CHANGED
|
@@ -61,6 +61,13 @@ class InlineSVG extends Component<InlineSVGProps> {
|
|
|
61
61
|
color: 'inherit'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
ref: Element | null = null
|
|
65
|
+
|
|
66
|
+
handleRef = (el: Element | null) => {
|
|
67
|
+
this.ref = el
|
|
68
|
+
this.props.elementRef?.(el)
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
constructor() {
|
|
65
72
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0.
|
|
66
73
|
super()
|
|
@@ -167,15 +174,14 @@ class InlineSVG extends Component<InlineSVGProps> {
|
|
|
167
174
|
width={width}
|
|
168
175
|
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string | number | null | undefined' is not a... Remove this comment to see the full error message
|
|
169
176
|
height={height}
|
|
170
|
-
// @ts-expect-error ts-migrate(2322) FIXME: Type '"true" | null' is not assignable to type 'bo... Remove this comment to see the full error message
|
|
171
177
|
aria-hidden={title ? null : 'true'}
|
|
172
|
-
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string | null' is not assignable to type 'st... Remove this comment to see the full error message
|
|
173
178
|
aria-labelledby={this.labelledBy}
|
|
174
179
|
role={this.role}
|
|
175
180
|
focusable={focusable ? 'true' : 'false'}
|
|
176
181
|
css={styles?.inlineSVG}
|
|
177
182
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'className' does not exist on type '{ mak... Remove this comment to see the full error message
|
|
178
183
|
className={props.className}
|
|
184
|
+
ref={this.handleRef}
|
|
179
185
|
>
|
|
180
186
|
{this.renderTitle()}
|
|
181
187
|
{this.renderDesc(description)}
|
package/src/InlineSVG/props.ts
CHANGED
|
@@ -48,6 +48,7 @@ type InlineSVGOwnProps = {
|
|
|
48
48
|
| 'brand'
|
|
49
49
|
| 'auto'
|
|
50
50
|
children?: React.ReactNode
|
|
51
|
+
elementRef?: (element: Element | null) => void
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
type PropKeys = keyof InlineSVGOwnProps
|
|
@@ -86,7 +87,8 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
86
87
|
'warning',
|
|
87
88
|
'brand',
|
|
88
89
|
'auto'
|
|
89
|
-
])
|
|
90
|
+
]),
|
|
91
|
+
elementRef: PropTypes.func
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
const allowedProps: AllowedPropKeys = [
|
|
@@ -98,7 +100,8 @@ const allowedProps: AllowedPropKeys = [
|
|
|
98
100
|
'width',
|
|
99
101
|
'height',
|
|
100
102
|
'inline',
|
|
101
|
-
'color'
|
|
103
|
+
'color',
|
|
104
|
+
'elementRef'
|
|
102
105
|
]
|
|
103
106
|
|
|
104
107
|
export type { InlineSVGProps, InlineSVGOwnProps, InlineSVGStyle }
|
package/src/SVGIcon/index.tsx
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/** @jsx jsx */
|
|
26
|
-
import { Component } from 'react'
|
|
26
|
+
import { Component, ReactInstance } from 'react'
|
|
27
27
|
|
|
28
28
|
import { testable } from '@instructure/ui-testable'
|
|
29
29
|
|
|
@@ -54,6 +54,13 @@ class SVGIcon extends Component<SVGIconProps> {
|
|
|
54
54
|
bidirectional: false
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
ref: ReactInstance | null = null
|
|
58
|
+
|
|
59
|
+
handleRef = (el: Element | null) => {
|
|
60
|
+
this.ref = el
|
|
61
|
+
this.props.elementRef?.(el)
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
componentDidMount() {
|
|
58
65
|
this.props.makeStyles?.()
|
|
59
66
|
}
|
|
@@ -83,6 +90,7 @@ class SVGIcon extends Component<SVGIconProps> {
|
|
|
83
90
|
rotate={rotate}
|
|
84
91
|
css={styles?.svgIcon}
|
|
85
92
|
className={className}
|
|
93
|
+
elementRef={this.handleRef}
|
|
86
94
|
/>
|
|
87
95
|
)
|
|
88
96
|
}
|
package/src/SVGIcon/props.ts
CHANGED
|
@@ -19,24 +19,28 @@ export declare const InlineSVGLocator: {
|
|
|
19
19
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
20
20
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
21
21
|
} & {
|
|
22
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
23
|
+
highlight: boolean;
|
|
24
|
+
} | undefined) => string;
|
|
25
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
26
|
+
children: (selector: string) => Element[];
|
|
27
|
+
title: () => string | null | undefined;
|
|
28
|
+
id: () => string;
|
|
29
|
+
tagName: () => string;
|
|
30
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
31
|
+
getBoundingClientRect: () => DOMRect;
|
|
32
|
+
matches: (selector: string | undefined) => boolean;
|
|
22
33
|
visible: () => boolean;
|
|
23
34
|
value: () => string | null;
|
|
24
35
|
disabled: () => string | null;
|
|
25
36
|
role: () => string | null;
|
|
26
|
-
id: () => string;
|
|
27
37
|
label: () => string | null | undefined;
|
|
28
|
-
title: () => string | null | undefined;
|
|
29
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
30
|
-
highlight: boolean;
|
|
31
|
-
} | undefined) => string;
|
|
32
38
|
getId: () => string;
|
|
33
39
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
34
40
|
getOwnerDocument: () => Document;
|
|
35
41
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
36
42
|
getTagName: () => string;
|
|
37
|
-
tagName: () => string;
|
|
38
43
|
typeIn: (text: string) => Promise<void>;
|
|
39
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
40
44
|
getDOMNode: () => Element;
|
|
41
45
|
node: () => Element;
|
|
42
46
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -44,9 +48,8 @@ export declare const InlineSVGLocator: {
|
|
|
44
48
|
} | undefined) => void;
|
|
45
49
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
46
50
|
getTextContent: () => string | null;
|
|
47
|
-
getParentNode: () =>
|
|
48
|
-
parent: () =>
|
|
49
|
-
getBoundingClientRect: () => DOMRect;
|
|
51
|
+
getParentNode: () => ParentNode | null;
|
|
52
|
+
parent: () => ParentNode | null;
|
|
50
53
|
rect: () => DOMRect;
|
|
51
54
|
hasClass: (classname: string) => boolean;
|
|
52
55
|
containsFocus: () => boolean;
|
|
@@ -58,19 +61,17 @@ export declare const InlineSVGLocator: {
|
|
|
58
61
|
exists: () => boolean;
|
|
59
62
|
text: () => string | null;
|
|
60
63
|
empty: () => boolean;
|
|
61
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
62
64
|
descendants: (selector: string) => Element[];
|
|
63
|
-
ancestors: (selector: string) =>
|
|
65
|
+
ancestors: (selector: string) => ParentNode[];
|
|
64
66
|
attribute: (qualifiedName: string) => string | null;
|
|
65
67
|
style: (property: string) => string;
|
|
66
68
|
classNames: () => string[];
|
|
67
|
-
matches: (selector: string | undefined) => boolean;
|
|
68
69
|
checked: () => any;
|
|
69
70
|
selected: () => any;
|
|
70
71
|
readonly: () => any;
|
|
71
|
-
|
|
72
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
72
|
+
parents: (selector: string) => ParentNode[];
|
|
73
73
|
} & {
|
|
74
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
74
75
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
75
76
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
76
77
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -108,7 +109,6 @@ export declare const InlineSVGLocator: {
|
|
|
108
109
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
109
110
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
110
111
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
111
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
112
112
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
113
113
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
114
114
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -158,24 +158,28 @@ export declare const InlineSVGLocator: {
|
|
|
158
158
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
159
159
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
160
160
|
} & {
|
|
161
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
162
|
+
highlight: boolean;
|
|
163
|
+
} | undefined) => string;
|
|
164
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
165
|
+
children: (selector: string) => Element[];
|
|
166
|
+
title: () => string | null | undefined;
|
|
167
|
+
id: () => string;
|
|
168
|
+
tagName: () => string;
|
|
169
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
170
|
+
getBoundingClientRect: () => DOMRect;
|
|
171
|
+
matches: (selector: string | undefined) => boolean;
|
|
161
172
|
visible: () => boolean;
|
|
162
173
|
value: () => string | null;
|
|
163
174
|
disabled: () => string | null;
|
|
164
175
|
role: () => string | null;
|
|
165
|
-
id: () => string;
|
|
166
176
|
label: () => string | null | undefined;
|
|
167
|
-
title: () => string | null | undefined;
|
|
168
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
169
|
-
highlight: boolean;
|
|
170
|
-
} | undefined) => string;
|
|
171
177
|
getId: () => string;
|
|
172
178
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
173
179
|
getOwnerDocument: () => Document;
|
|
174
180
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
175
181
|
getTagName: () => string;
|
|
176
|
-
tagName: () => string;
|
|
177
182
|
typeIn: (text: string) => Promise<void>;
|
|
178
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
179
183
|
getDOMNode: () => Element;
|
|
180
184
|
node: () => Element;
|
|
181
185
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -183,9 +187,8 @@ export declare const InlineSVGLocator: {
|
|
|
183
187
|
} | undefined) => void;
|
|
184
188
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
185
189
|
getTextContent: () => string | null;
|
|
186
|
-
getParentNode: () =>
|
|
187
|
-
parent: () =>
|
|
188
|
-
getBoundingClientRect: () => DOMRect;
|
|
190
|
+
getParentNode: () => ParentNode | null;
|
|
191
|
+
parent: () => ParentNode | null;
|
|
189
192
|
rect: () => DOMRect;
|
|
190
193
|
hasClass: (classname: string) => boolean;
|
|
191
194
|
containsFocus: () => boolean;
|
|
@@ -197,19 +200,17 @@ export declare const InlineSVGLocator: {
|
|
|
197
200
|
exists: () => boolean;
|
|
198
201
|
text: () => string | null;
|
|
199
202
|
empty: () => boolean;
|
|
200
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
201
203
|
descendants: (selector: string) => Element[];
|
|
202
|
-
ancestors: (selector: string) =>
|
|
204
|
+
ancestors: (selector: string) => ParentNode[];
|
|
203
205
|
attribute: (qualifiedName: string) => string | null;
|
|
204
206
|
style: (property: string) => string;
|
|
205
207
|
classNames: () => string[];
|
|
206
|
-
matches: (selector: string | undefined) => boolean;
|
|
207
208
|
checked: () => any;
|
|
208
209
|
selected: () => any;
|
|
209
210
|
readonly: () => any;
|
|
210
|
-
|
|
211
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
211
|
+
parents: (selector: string) => ParentNode[];
|
|
212
212
|
} & {
|
|
213
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
213
214
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
214
215
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
215
216
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -247,7 +248,6 @@ export declare const InlineSVGLocator: {
|
|
|
247
248
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
248
249
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
249
250
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
250
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
251
251
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
252
252
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
253
253
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -297,24 +297,28 @@ export declare const InlineSVGLocator: {
|
|
|
297
297
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
298
298
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
299
299
|
} & {
|
|
300
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
301
|
+
highlight: boolean;
|
|
302
|
+
} | undefined) => string;
|
|
303
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
304
|
+
children: (selector: string) => Element[];
|
|
305
|
+
title: () => string | null | undefined;
|
|
306
|
+
id: () => string;
|
|
307
|
+
tagName: () => string;
|
|
308
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
309
|
+
getBoundingClientRect: () => DOMRect;
|
|
310
|
+
matches: (selector: string | undefined) => boolean;
|
|
300
311
|
visible: () => boolean;
|
|
301
312
|
value: () => string | null;
|
|
302
313
|
disabled: () => string | null;
|
|
303
314
|
role: () => string | null;
|
|
304
|
-
id: () => string;
|
|
305
315
|
label: () => string | null | undefined;
|
|
306
|
-
title: () => string | null | undefined;
|
|
307
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
308
|
-
highlight: boolean;
|
|
309
|
-
} | undefined) => string;
|
|
310
316
|
getId: () => string;
|
|
311
317
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
312
318
|
getOwnerDocument: () => Document;
|
|
313
319
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
314
320
|
getTagName: () => string;
|
|
315
|
-
tagName: () => string;
|
|
316
321
|
typeIn: (text: string) => Promise<void>;
|
|
317
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
318
322
|
getDOMNode: () => Element;
|
|
319
323
|
node: () => Element;
|
|
320
324
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -322,9 +326,8 @@ export declare const InlineSVGLocator: {
|
|
|
322
326
|
} | undefined) => void;
|
|
323
327
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
324
328
|
getTextContent: () => string | null;
|
|
325
|
-
getParentNode: () =>
|
|
326
|
-
parent: () =>
|
|
327
|
-
getBoundingClientRect: () => DOMRect;
|
|
329
|
+
getParentNode: () => ParentNode | null;
|
|
330
|
+
parent: () => ParentNode | null;
|
|
328
331
|
rect: () => DOMRect;
|
|
329
332
|
hasClass: (classname: string) => boolean;
|
|
330
333
|
containsFocus: () => boolean;
|
|
@@ -336,19 +339,17 @@ export declare const InlineSVGLocator: {
|
|
|
336
339
|
exists: () => boolean;
|
|
337
340
|
text: () => string | null;
|
|
338
341
|
empty: () => boolean;
|
|
339
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
340
342
|
descendants: (selector: string) => Element[];
|
|
341
|
-
ancestors: (selector: string) =>
|
|
343
|
+
ancestors: (selector: string) => ParentNode[];
|
|
342
344
|
attribute: (qualifiedName: string) => string | null;
|
|
343
345
|
style: (property: string) => string;
|
|
344
346
|
classNames: () => string[];
|
|
345
|
-
matches: (selector: string | undefined) => boolean;
|
|
346
347
|
checked: () => any;
|
|
347
348
|
selected: () => any;
|
|
348
349
|
readonly: () => any;
|
|
349
|
-
|
|
350
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
350
|
+
parents: (selector: string) => ParentNode[];
|
|
351
351
|
} & {
|
|
352
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
352
353
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
353
354
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
354
355
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -386,7 +387,6 @@ export declare const InlineSVGLocator: {
|
|
|
386
387
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
387
388
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
388
389
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
389
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
390
390
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
391
391
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
392
392
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -436,24 +436,28 @@ export declare const InlineSVGLocator: {
|
|
|
436
436
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
437
437
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
438
438
|
} & {
|
|
439
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
440
|
+
highlight: boolean;
|
|
441
|
+
} | undefined) => string;
|
|
442
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
443
|
+
children: (selector: string) => Element[];
|
|
444
|
+
title: () => string | null | undefined;
|
|
445
|
+
id: () => string;
|
|
446
|
+
tagName: () => string;
|
|
447
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
448
|
+
getBoundingClientRect: () => DOMRect;
|
|
449
|
+
matches: (selector: string | undefined) => boolean;
|
|
439
450
|
visible: () => boolean;
|
|
440
451
|
value: () => string | null;
|
|
441
452
|
disabled: () => string | null;
|
|
442
453
|
role: () => string | null;
|
|
443
|
-
id: () => string;
|
|
444
454
|
label: () => string | null | undefined;
|
|
445
|
-
title: () => string | null | undefined;
|
|
446
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
447
|
-
highlight: boolean;
|
|
448
|
-
} | undefined) => string;
|
|
449
455
|
getId: () => string;
|
|
450
456
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
451
457
|
getOwnerDocument: () => Document;
|
|
452
458
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
453
459
|
getTagName: () => string;
|
|
454
|
-
tagName: () => string;
|
|
455
460
|
typeIn: (text: string) => Promise<void>;
|
|
456
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
457
461
|
getDOMNode: () => Element;
|
|
458
462
|
node: () => Element;
|
|
459
463
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -461,9 +465,8 @@ export declare const InlineSVGLocator: {
|
|
|
461
465
|
} | undefined) => void;
|
|
462
466
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
463
467
|
getTextContent: () => string | null;
|
|
464
|
-
getParentNode: () =>
|
|
465
|
-
parent: () =>
|
|
466
|
-
getBoundingClientRect: () => DOMRect;
|
|
468
|
+
getParentNode: () => ParentNode | null;
|
|
469
|
+
parent: () => ParentNode | null;
|
|
467
470
|
rect: () => DOMRect;
|
|
468
471
|
hasClass: (classname: string) => boolean;
|
|
469
472
|
containsFocus: () => boolean;
|
|
@@ -475,19 +478,17 @@ export declare const InlineSVGLocator: {
|
|
|
475
478
|
exists: () => boolean;
|
|
476
479
|
text: () => string | null;
|
|
477
480
|
empty: () => boolean;
|
|
478
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
479
481
|
descendants: (selector: string) => Element[];
|
|
480
|
-
ancestors: (selector: string) =>
|
|
482
|
+
ancestors: (selector: string) => ParentNode[];
|
|
481
483
|
attribute: (qualifiedName: string) => string | null;
|
|
482
484
|
style: (property: string) => string;
|
|
483
485
|
classNames: () => string[];
|
|
484
|
-
matches: (selector: string | undefined) => boolean;
|
|
485
486
|
checked: () => any;
|
|
486
487
|
selected: () => any;
|
|
487
488
|
readonly: () => any;
|
|
488
|
-
|
|
489
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
489
|
+
parents: (selector: string) => ParentNode[];
|
|
490
490
|
} & {
|
|
491
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
491
492
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
492
493
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
493
494
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -525,7 +526,6 @@ export declare const InlineSVGLocator: {
|
|
|
525
526
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
526
527
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
527
528
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
528
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
529
529
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
530
530
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
531
531
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InlineSVG/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C;;;;GAIG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,yDAAe;IAClC,MAAM,CAAC,SAAS,mHAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUlB;;IAYD,iBAAiB;IAIjB,kBAAkB;IAKlB,MAAM,CAAC,UAAU,oBAKhB;IAED,IAAI,IAAI,2BAMP;IAED,WAAW;IAOX,UAAU,CAAC,IAAI,KAAA;IAKf,IAAI,UAAU,kBAcb;IAED,aAAa;IAcb,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InlineSVG/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C;;;;GAIG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,yDAAe;IAClC,MAAM,CAAC,SAAS,mHAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAG9B;;IAYD,iBAAiB;IAIjB,kBAAkB;IAKlB,MAAM,CAAC,UAAU,oBAKhB;IAED,IAAI,IAAI,2BAMP;IAED,WAAW;IAOX,UAAU,CAAC,IAAI,KAAA;IAKf,IAAI,UAAU,kBAcb;IAED,aAAa;IAcb,MAAM;CA6CP;AA8BD,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -11,6 +11,7 @@ declare type InlineSVGOwnProps = {
|
|
|
11
11
|
inline?: boolean;
|
|
12
12
|
color?: 'inherit' | 'primary' | 'secondary' | 'primary-inverse' | 'secondary-inverse' | 'success' | 'error' | 'alert' | 'warning' | 'brand' | 'auto';
|
|
13
13
|
children?: React.ReactNode;
|
|
14
|
+
elementRef?: (element: Element | null) => void;
|
|
14
15
|
};
|
|
15
16
|
declare type PropKeys = keyof InlineSVGOwnProps;
|
|
16
17
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/InlineSVG/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,iBAAiB,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EACF,SAAS,GACT,SAAS,GACT,WAAW,GACX,iBAAiB,GACjB,mBAAmB,GACnB,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/InlineSVG/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,iBAAiB,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EACF,SAAS,GACT,SAAS,GACT,WAAW,GACX,iBAAiB,GACjB,mBAAmB,GACnB,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,iBAAiB,GACrC,cAAc,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;AAEjD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA6BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAWnB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -19,24 +19,28 @@ export declare const SVGIconLocator: {
|
|
|
19
19
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
20
20
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
21
21
|
} & {
|
|
22
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
23
|
+
highlight: boolean;
|
|
24
|
+
} | undefined) => string;
|
|
25
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
26
|
+
children: (selector: string) => Element[];
|
|
27
|
+
title: () => string | null | undefined;
|
|
28
|
+
id: () => string;
|
|
29
|
+
tagName: () => string;
|
|
30
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
31
|
+
getBoundingClientRect: () => DOMRect;
|
|
32
|
+
matches: (selector: string | undefined) => boolean;
|
|
22
33
|
visible: () => boolean;
|
|
23
34
|
value: () => string | null;
|
|
24
35
|
disabled: () => string | null;
|
|
25
36
|
role: () => string | null;
|
|
26
|
-
id: () => string;
|
|
27
37
|
label: () => string | null | undefined;
|
|
28
|
-
title: () => string | null | undefined;
|
|
29
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
30
|
-
highlight: boolean;
|
|
31
|
-
} | undefined) => string;
|
|
32
38
|
getId: () => string;
|
|
33
39
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
34
40
|
getOwnerDocument: () => Document;
|
|
35
41
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
36
42
|
getTagName: () => string;
|
|
37
|
-
tagName: () => string;
|
|
38
43
|
typeIn: (text: string) => Promise<void>;
|
|
39
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
40
44
|
getDOMNode: () => Element;
|
|
41
45
|
node: () => Element;
|
|
42
46
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -44,9 +48,8 @@ export declare const SVGIconLocator: {
|
|
|
44
48
|
} | undefined) => void;
|
|
45
49
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
46
50
|
getTextContent: () => string | null;
|
|
47
|
-
getParentNode: () =>
|
|
48
|
-
parent: () =>
|
|
49
|
-
getBoundingClientRect: () => DOMRect;
|
|
51
|
+
getParentNode: () => ParentNode | null;
|
|
52
|
+
parent: () => ParentNode | null;
|
|
50
53
|
rect: () => DOMRect;
|
|
51
54
|
hasClass: (classname: string) => boolean;
|
|
52
55
|
containsFocus: () => boolean;
|
|
@@ -58,19 +61,17 @@ export declare const SVGIconLocator: {
|
|
|
58
61
|
exists: () => boolean;
|
|
59
62
|
text: () => string | null;
|
|
60
63
|
empty: () => boolean;
|
|
61
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
62
64
|
descendants: (selector: string) => Element[];
|
|
63
|
-
ancestors: (selector: string) =>
|
|
65
|
+
ancestors: (selector: string) => ParentNode[];
|
|
64
66
|
attribute: (qualifiedName: string) => string | null;
|
|
65
67
|
style: (property: string) => string;
|
|
66
68
|
classNames: () => string[];
|
|
67
|
-
matches: (selector: string | undefined) => boolean;
|
|
68
69
|
checked: () => any;
|
|
69
70
|
selected: () => any;
|
|
70
71
|
readonly: () => any;
|
|
71
|
-
|
|
72
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
72
|
+
parents: (selector: string) => ParentNode[];
|
|
73
73
|
} & {
|
|
74
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
74
75
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
75
76
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
76
77
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -108,7 +109,6 @@ export declare const SVGIconLocator: {
|
|
|
108
109
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
109
110
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
110
111
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
111
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
112
112
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
113
113
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
114
114
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -158,24 +158,28 @@ export declare const SVGIconLocator: {
|
|
|
158
158
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
159
159
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
160
160
|
} & {
|
|
161
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
162
|
+
highlight: boolean;
|
|
163
|
+
} | undefined) => string;
|
|
164
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
165
|
+
children: (selector: string) => Element[];
|
|
166
|
+
title: () => string | null | undefined;
|
|
167
|
+
id: () => string;
|
|
168
|
+
tagName: () => string;
|
|
169
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
170
|
+
getBoundingClientRect: () => DOMRect;
|
|
171
|
+
matches: (selector: string | undefined) => boolean;
|
|
161
172
|
visible: () => boolean;
|
|
162
173
|
value: () => string | null;
|
|
163
174
|
disabled: () => string | null;
|
|
164
175
|
role: () => string | null;
|
|
165
|
-
id: () => string;
|
|
166
176
|
label: () => string | null | undefined;
|
|
167
|
-
title: () => string | null | undefined;
|
|
168
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
169
|
-
highlight: boolean;
|
|
170
|
-
} | undefined) => string;
|
|
171
177
|
getId: () => string;
|
|
172
178
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
173
179
|
getOwnerDocument: () => Document;
|
|
174
180
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
175
181
|
getTagName: () => string;
|
|
176
|
-
tagName: () => string;
|
|
177
182
|
typeIn: (text: string) => Promise<void>;
|
|
178
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
179
183
|
getDOMNode: () => Element;
|
|
180
184
|
node: () => Element;
|
|
181
185
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -183,9 +187,8 @@ export declare const SVGIconLocator: {
|
|
|
183
187
|
} | undefined) => void;
|
|
184
188
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
185
189
|
getTextContent: () => string | null;
|
|
186
|
-
getParentNode: () =>
|
|
187
|
-
parent: () =>
|
|
188
|
-
getBoundingClientRect: () => DOMRect;
|
|
190
|
+
getParentNode: () => ParentNode | null;
|
|
191
|
+
parent: () => ParentNode | null;
|
|
189
192
|
rect: () => DOMRect;
|
|
190
193
|
hasClass: (classname: string) => boolean;
|
|
191
194
|
containsFocus: () => boolean;
|
|
@@ -197,19 +200,17 @@ export declare const SVGIconLocator: {
|
|
|
197
200
|
exists: () => boolean;
|
|
198
201
|
text: () => string | null;
|
|
199
202
|
empty: () => boolean;
|
|
200
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
201
203
|
descendants: (selector: string) => Element[];
|
|
202
|
-
ancestors: (selector: string) =>
|
|
204
|
+
ancestors: (selector: string) => ParentNode[];
|
|
203
205
|
attribute: (qualifiedName: string) => string | null;
|
|
204
206
|
style: (property: string) => string;
|
|
205
207
|
classNames: () => string[];
|
|
206
|
-
matches: (selector: string | undefined) => boolean;
|
|
207
208
|
checked: () => any;
|
|
208
209
|
selected: () => any;
|
|
209
210
|
readonly: () => any;
|
|
210
|
-
|
|
211
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
211
|
+
parents: (selector: string) => ParentNode[];
|
|
212
212
|
} & {
|
|
213
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
213
214
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
214
215
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
215
216
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -247,7 +248,6 @@ export declare const SVGIconLocator: {
|
|
|
247
248
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
248
249
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
249
250
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
250
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
251
251
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
252
252
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
253
253
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -297,24 +297,28 @@ export declare const SVGIconLocator: {
|
|
|
297
297
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
298
298
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
299
299
|
} & {
|
|
300
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
301
|
+
highlight: boolean;
|
|
302
|
+
} | undefined) => string;
|
|
303
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
304
|
+
children: (selector: string) => Element[];
|
|
305
|
+
title: () => string | null | undefined;
|
|
306
|
+
id: () => string;
|
|
307
|
+
tagName: () => string;
|
|
308
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
309
|
+
getBoundingClientRect: () => DOMRect;
|
|
310
|
+
matches: (selector: string | undefined) => boolean;
|
|
300
311
|
visible: () => boolean;
|
|
301
312
|
value: () => string | null;
|
|
302
313
|
disabled: () => string | null;
|
|
303
314
|
role: () => string | null;
|
|
304
|
-
id: () => string;
|
|
305
315
|
label: () => string | null | undefined;
|
|
306
|
-
title: () => string | null | undefined;
|
|
307
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
308
|
-
highlight: boolean;
|
|
309
|
-
} | undefined) => string;
|
|
310
316
|
getId: () => string;
|
|
311
317
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
312
318
|
getOwnerDocument: () => Document;
|
|
313
319
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
314
320
|
getTagName: () => string;
|
|
315
|
-
tagName: () => string;
|
|
316
321
|
typeIn: (text: string) => Promise<void>;
|
|
317
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
318
322
|
getDOMNode: () => Element;
|
|
319
323
|
node: () => Element;
|
|
320
324
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -322,9 +326,8 @@ export declare const SVGIconLocator: {
|
|
|
322
326
|
} | undefined) => void;
|
|
323
327
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
324
328
|
getTextContent: () => string | null;
|
|
325
|
-
getParentNode: () =>
|
|
326
|
-
parent: () =>
|
|
327
|
-
getBoundingClientRect: () => DOMRect;
|
|
329
|
+
getParentNode: () => ParentNode | null;
|
|
330
|
+
parent: () => ParentNode | null;
|
|
328
331
|
rect: () => DOMRect;
|
|
329
332
|
hasClass: (classname: string) => boolean;
|
|
330
333
|
containsFocus: () => boolean;
|
|
@@ -336,19 +339,17 @@ export declare const SVGIconLocator: {
|
|
|
336
339
|
exists: () => boolean;
|
|
337
340
|
text: () => string | null;
|
|
338
341
|
empty: () => boolean;
|
|
339
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
340
342
|
descendants: (selector: string) => Element[];
|
|
341
|
-
ancestors: (selector: string) =>
|
|
343
|
+
ancestors: (selector: string) => ParentNode[];
|
|
342
344
|
attribute: (qualifiedName: string) => string | null;
|
|
343
345
|
style: (property: string) => string;
|
|
344
346
|
classNames: () => string[];
|
|
345
|
-
matches: (selector: string | undefined) => boolean;
|
|
346
347
|
checked: () => any;
|
|
347
348
|
selected: () => any;
|
|
348
349
|
readonly: () => any;
|
|
349
|
-
|
|
350
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
350
|
+
parents: (selector: string) => ParentNode[];
|
|
351
351
|
} & {
|
|
352
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
352
353
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
353
354
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
354
355
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -386,7 +387,6 @@ export declare const SVGIconLocator: {
|
|
|
386
387
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
387
388
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
388
389
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
389
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
390
390
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
391
391
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
392
392
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -436,24 +436,28 @@ export declare const SVGIconLocator: {
|
|
|
436
436
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
437
437
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
438
438
|
} & {
|
|
439
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
440
|
+
highlight: boolean;
|
|
441
|
+
} | undefined) => string;
|
|
442
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
443
|
+
children: (selector: string) => Element[];
|
|
444
|
+
title: () => string | null | undefined;
|
|
445
|
+
id: () => string;
|
|
446
|
+
tagName: () => string;
|
|
447
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
448
|
+
getBoundingClientRect: () => DOMRect;
|
|
449
|
+
matches: (selector: string | undefined) => boolean;
|
|
439
450
|
visible: () => boolean;
|
|
440
451
|
value: () => string | null;
|
|
441
452
|
disabled: () => string | null;
|
|
442
453
|
role: () => string | null;
|
|
443
|
-
id: () => string;
|
|
444
454
|
label: () => string | null | undefined;
|
|
445
|
-
title: () => string | null | undefined;
|
|
446
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
447
|
-
highlight: boolean;
|
|
448
|
-
} | undefined) => string;
|
|
449
455
|
getId: () => string;
|
|
450
456
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
451
457
|
getOwnerDocument: () => Document;
|
|
452
458
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
453
459
|
getTagName: () => string;
|
|
454
|
-
tagName: () => string;
|
|
455
460
|
typeIn: (text: string) => Promise<void>;
|
|
456
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
457
461
|
getDOMNode: () => Element;
|
|
458
462
|
node: () => Element;
|
|
459
463
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -461,9 +465,8 @@ export declare const SVGIconLocator: {
|
|
|
461
465
|
} | undefined) => void;
|
|
462
466
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
463
467
|
getTextContent: () => string | null;
|
|
464
|
-
getParentNode: () =>
|
|
465
|
-
parent: () =>
|
|
466
|
-
getBoundingClientRect: () => DOMRect;
|
|
468
|
+
getParentNode: () => ParentNode | null;
|
|
469
|
+
parent: () => ParentNode | null;
|
|
467
470
|
rect: () => DOMRect;
|
|
468
471
|
hasClass: (classname: string) => boolean;
|
|
469
472
|
containsFocus: () => boolean;
|
|
@@ -475,19 +478,17 @@ export declare const SVGIconLocator: {
|
|
|
475
478
|
exists: () => boolean;
|
|
476
479
|
text: () => string | null;
|
|
477
480
|
empty: () => boolean;
|
|
478
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
479
481
|
descendants: (selector: string) => Element[];
|
|
480
|
-
ancestors: (selector: string) =>
|
|
482
|
+
ancestors: (selector: string) => ParentNode[];
|
|
481
483
|
attribute: (qualifiedName: string) => string | null;
|
|
482
484
|
style: (property: string) => string;
|
|
483
485
|
classNames: () => string[];
|
|
484
|
-
matches: (selector: string | undefined) => boolean;
|
|
485
486
|
checked: () => any;
|
|
486
487
|
selected: () => any;
|
|
487
488
|
readonly: () => any;
|
|
488
|
-
|
|
489
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
489
|
+
parents: (selector: string) => ParentNode[];
|
|
490
490
|
} & {
|
|
491
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
491
492
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
492
493
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
493
494
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -525,7 +526,6 @@ export declare const SVGIconLocator: {
|
|
|
525
526
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
526
527
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
527
528
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
528
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
529
529
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
530
530
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
531
531
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
package/types/SVGIcon/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
2
|
+
import { Component, ReactInstance } from 'react';
|
|
3
3
|
import { jsx } from '@instructure/emotion';
|
|
4
4
|
import type { SVGIconProps } from './props';
|
|
5
5
|
/**
|
|
@@ -15,6 +15,8 @@ declare class SVGIcon extends Component<SVGIconProps> {
|
|
|
15
15
|
rotate: string;
|
|
16
16
|
bidirectional: boolean;
|
|
17
17
|
};
|
|
18
|
+
ref: ReactInstance | null;
|
|
19
|
+
handleRef: (el: Element | null) => void;
|
|
18
20
|
componentDidMount(): void;
|
|
19
21
|
componentDidUpdate(): void;
|
|
20
22
|
render(): jsx.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SVGIcon/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SVGIcon/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAMhD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C;;;;GAIG;AACH,cAEM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,aAAY;IAEvC,MAAM,CAAC,YAAY,0GAAe;IAClC,MAAM,CAAC,SAAS,oKAAY;IAE5B,MAAM,CAAC,YAAY;;;MAGlB;IAED,GAAG,EAAE,aAAa,GAAG,IAAI,CAAO;IAEhC,SAAS,OAAQ,OAAO,GAAG,IAAI,UAG9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAyBP;AAED,eAAe,OAAO,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/SVGIcon/props.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,aAAK,eAAe,GAAG,iBAAiB,GAAG;IACzC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAA;IACnC,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAEhF,aAAK,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,CAAA;AAE7C,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAMvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/SVGIcon/props.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,aAAK,eAAe,GAAG,iBAAiB,GAAG;IACzC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAA;IACnC,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;AAEhF,aAAK,YAAY,GAAG,cAAc,CAAC,SAAS,CAAC,CAAA;AAE7C,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAMvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|