@instructure/ui-list 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/InlineList/InlineListItem/index.js +23 -11
- package/es/InlineList/index.js +18 -6
- package/es/List/ListItem/index.js +23 -11
- package/es/List/index.js +20 -8
- package/lib/InlineList/InlineListItem/index.js +23 -11
- package/lib/InlineList/index.js +18 -6
- package/lib/List/ListItem/index.js +23 -11
- package/lib/List/index.js +20 -8
- package/package.json +15 -14
- package/src/InlineList/InlineListItem/index.tsx +8 -1
- package/src/InlineList/InlineListItem/props.ts +1 -1
- package/src/InlineList/index.tsx +8 -1
- package/src/InlineList/props.ts +1 -1
- package/src/List/ListItem/index.tsx +8 -1
- package/src/List/ListItem/props.ts +1 -1
- package/src/List/index.tsx +8 -1
- package/src/List/props.ts +1 -1
- package/types/InlineList/InlineListItem/InlineListItemLocator.d.ts +64 -64
- package/types/InlineList/InlineListItem/index.d.ts +4 -2
- package/types/InlineList/InlineListItem/index.d.ts.map +1 -1
- package/types/InlineList/InlineListItem/props.d.ts +1 -1
- package/types/InlineList/InlineListItem/props.d.ts.map +1 -1
- package/types/InlineList/InlineListLocator.d.ts +224 -224
- package/types/InlineList/index.d.ts +4 -2
- package/types/InlineList/index.d.ts.map +1 -1
- package/types/InlineList/props.d.ts +1 -1
- package/types/InlineList/props.d.ts.map +1 -1
- package/types/List/ListItem/index.d.ts +4 -2
- package/types/List/ListItem/index.d.ts.map +1 -1
- package/types/List/ListItem/props.d.ts +1 -1
- package/types/List/ListItem/props.d.ts.map +1 -1
- package/types/List/ListLocator.d.ts +224 -224
- package/types/List/index.d.ts +4 -2
- package/types/List/index.d.ts.map +1 -1
- package/types/List/props.d.ts +1 -1
- package/types/List/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-list
|
|
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-list
|
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.
|
|
@@ -44,6 +44,18 @@ id: InlineList.Item
|
|
|
44
44
|
---
|
|
45
45
|
**/
|
|
46
46
|
let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineListItem extends Component {
|
|
47
|
+
constructor(...args) {
|
|
48
|
+
super(...args);
|
|
49
|
+
this.ref = null;
|
|
50
|
+
|
|
51
|
+
this.handleRef = el => {
|
|
52
|
+
var _this$props$elementRe, _this$props;
|
|
53
|
+
|
|
54
|
+
this.ref = el;
|
|
55
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
47
59
|
componentDidMount() {
|
|
48
60
|
this.props.makeStyles();
|
|
49
61
|
}
|
|
@@ -53,16 +65,16 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
render() {
|
|
56
|
-
const _this$
|
|
57
|
-
delimiter = _this$
|
|
58
|
-
size = _this$
|
|
59
|
-
margin = _this$
|
|
60
|
-
padding = _this$
|
|
61
|
-
elementRef = _this$
|
|
62
|
-
children = _this$
|
|
63
|
-
spacing = _this$
|
|
64
|
-
styles = _this$
|
|
65
|
-
rest = _objectWithoutProperties(_this$
|
|
68
|
+
const _this$props2 = this.props,
|
|
69
|
+
delimiter = _this$props2.delimiter,
|
|
70
|
+
size = _this$props2.size,
|
|
71
|
+
margin = _this$props2.margin,
|
|
72
|
+
padding = _this$props2.padding,
|
|
73
|
+
elementRef = _this$props2.elementRef,
|
|
74
|
+
children = _this$props2.children,
|
|
75
|
+
spacing = _this$props2.spacing,
|
|
76
|
+
styles = _this$props2.styles,
|
|
77
|
+
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
66
78
|
|
|
67
79
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
68
80
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
@@ -71,7 +83,7 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
71
83
|
padding: padding,
|
|
72
84
|
display: "inline-block",
|
|
73
85
|
maxWidth: "100%",
|
|
74
|
-
elementRef:
|
|
86
|
+
elementRef: this.handleRef
|
|
75
87
|
}), children, jsx("span", {
|
|
76
88
|
css: styles === null || styles === void 0 ? void 0 : styles.delimiter,
|
|
77
89
|
"aria-hidden": "true"
|
package/es/InlineList/index.js
CHANGED
|
@@ -39,6 +39,18 @@ category: components
|
|
|
39
39
|
---
|
|
40
40
|
**/
|
|
41
41
|
let InlineList = (_dec = testable(), _dec(_class = (_temp = _class2 = class InlineList extends Component {
|
|
42
|
+
constructor(...args) {
|
|
43
|
+
super(...args);
|
|
44
|
+
this.ref = null;
|
|
45
|
+
|
|
46
|
+
this.handleRef = el => {
|
|
47
|
+
var _this$props$elementRe, _this$props;
|
|
48
|
+
|
|
49
|
+
this.ref = el;
|
|
50
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
renderChildren() {
|
|
43
55
|
return Children.map(this.props.children, child => {
|
|
44
56
|
if (!child) return; // ignore null, falsy children
|
|
@@ -52,17 +64,17 @@ let InlineList = (_dec = testable(), _dec(_class = (_temp = _class2 = class Inli
|
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
render() {
|
|
55
|
-
const _this$
|
|
56
|
-
as = _this$
|
|
57
|
-
margin = _this$
|
|
58
|
-
elementRef = _this$
|
|
59
|
-
rest = _objectWithoutProperties(_this$
|
|
67
|
+
const _this$props2 = this.props,
|
|
68
|
+
as = _this$props2.as,
|
|
69
|
+
margin = _this$props2.margin,
|
|
70
|
+
elementRef = _this$props2.elementRef,
|
|
71
|
+
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
60
72
|
|
|
61
73
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, passthroughProps(rest), {
|
|
62
74
|
as: as,
|
|
63
75
|
margin: margin,
|
|
64
76
|
padding: "0",
|
|
65
|
-
elementRef:
|
|
77
|
+
elementRef: this.handleRef,
|
|
66
78
|
display: "block"
|
|
67
79
|
}), this.renderChildren());
|
|
68
80
|
}
|
|
@@ -44,6 +44,18 @@ id: List.Item
|
|
|
44
44
|
---
|
|
45
45
|
**/
|
|
46
46
|
let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class ListItem extends Component {
|
|
47
|
+
constructor(...args) {
|
|
48
|
+
super(...args);
|
|
49
|
+
this.ref = null;
|
|
50
|
+
|
|
51
|
+
this.handleRef = el => {
|
|
52
|
+
var _this$props$elementRe, _this$props;
|
|
53
|
+
|
|
54
|
+
this.ref = el;
|
|
55
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
47
59
|
componentDidMount() {
|
|
48
60
|
this.props.makeStyles();
|
|
49
61
|
}
|
|
@@ -53,16 +65,16 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
render() {
|
|
56
|
-
const _this$
|
|
57
|
-
delimiter = _this$
|
|
58
|
-
spacing = _this$
|
|
59
|
-
size = _this$
|
|
60
|
-
margin = _this$
|
|
61
|
-
padding = _this$
|
|
62
|
-
elementRef = _this$
|
|
63
|
-
children = _this$
|
|
64
|
-
styles = _this$
|
|
65
|
-
rest = _objectWithoutProperties(_this$
|
|
68
|
+
const _this$props2 = this.props,
|
|
69
|
+
delimiter = _this$props2.delimiter,
|
|
70
|
+
spacing = _this$props2.spacing,
|
|
71
|
+
size = _this$props2.size,
|
|
72
|
+
margin = _this$props2.margin,
|
|
73
|
+
padding = _this$props2.padding,
|
|
74
|
+
elementRef = _this$props2.elementRef,
|
|
75
|
+
children = _this$props2.children,
|
|
76
|
+
styles = _this$props2.styles,
|
|
77
|
+
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
66
78
|
|
|
67
79
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
68
80
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
@@ -70,7 +82,7 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
70
82
|
margin: margin,
|
|
71
83
|
padding: padding,
|
|
72
84
|
maxWidth: "100%",
|
|
73
|
-
elementRef:
|
|
85
|
+
elementRef: this.handleRef
|
|
74
86
|
}), children);
|
|
75
87
|
}
|
|
76
88
|
|
package/es/List/index.js
CHANGED
|
@@ -44,6 +44,18 @@ category: components
|
|
|
44
44
|
---
|
|
45
45
|
**/
|
|
46
46
|
let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class List extends Component {
|
|
47
|
+
constructor(...args) {
|
|
48
|
+
super(...args);
|
|
49
|
+
this.ref = null;
|
|
50
|
+
|
|
51
|
+
this.handleRef = el => {
|
|
52
|
+
var _this$props$elementRe, _this$props;
|
|
53
|
+
|
|
54
|
+
this.ref = el;
|
|
55
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
47
59
|
componentDidMount() {
|
|
48
60
|
this.props.makeStyles();
|
|
49
61
|
}
|
|
@@ -66,19 +78,19 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
66
78
|
}
|
|
67
79
|
|
|
68
80
|
render() {
|
|
69
|
-
const _this$
|
|
70
|
-
as = _this$
|
|
71
|
-
margin = _this$
|
|
72
|
-
isUnstyled = _this$
|
|
73
|
-
elementRef = _this$
|
|
74
|
-
styles = _this$
|
|
75
|
-
rest = _objectWithoutProperties(_this$
|
|
81
|
+
const _this$props2 = this.props,
|
|
82
|
+
as = _this$props2.as,
|
|
83
|
+
margin = _this$props2.margin,
|
|
84
|
+
isUnstyled = _this$props2.isUnstyled,
|
|
85
|
+
elementRef = _this$props2.elementRef,
|
|
86
|
+
styles = _this$props2.styles,
|
|
87
|
+
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
76
88
|
|
|
77
89
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
78
90
|
css: styles === null || styles === void 0 ? void 0 : styles.list,
|
|
79
91
|
as: as,
|
|
80
92
|
margin: margin,
|
|
81
|
-
elementRef:
|
|
93
|
+
elementRef: this.handleRef,
|
|
82
94
|
display: "block"
|
|
83
95
|
}), this.renderChildren());
|
|
84
96
|
}
|
|
@@ -36,6 +36,18 @@ id: InlineList.Item
|
|
|
36
36
|
---
|
|
37
37
|
**/
|
|
38
38
|
let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineListItem extends _react.Component {
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
this.ref = null;
|
|
42
|
+
|
|
43
|
+
this.handleRef = el => {
|
|
44
|
+
var _this$props$elementRe, _this$props;
|
|
45
|
+
|
|
46
|
+
this.ref = el;
|
|
47
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
39
51
|
componentDidMount() {
|
|
40
52
|
this.props.makeStyles();
|
|
41
53
|
}
|
|
@@ -45,16 +57,16 @@ let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
render() {
|
|
48
|
-
const _this$
|
|
49
|
-
delimiter = _this$
|
|
50
|
-
size = _this$
|
|
51
|
-
margin = _this$
|
|
52
|
-
padding = _this$
|
|
53
|
-
elementRef = _this$
|
|
54
|
-
children = _this$
|
|
55
|
-
spacing = _this$
|
|
56
|
-
styles = _this$
|
|
57
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
60
|
+
const _this$props2 = this.props,
|
|
61
|
+
delimiter = _this$props2.delimiter,
|
|
62
|
+
size = _this$props2.size,
|
|
63
|
+
margin = _this$props2.margin,
|
|
64
|
+
padding = _this$props2.padding,
|
|
65
|
+
elementRef = _this$props2.elementRef,
|
|
66
|
+
children = _this$props2.children,
|
|
67
|
+
spacing = _this$props2.spacing,
|
|
68
|
+
styles = _this$props2.styles,
|
|
69
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
58
70
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
59
71
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
60
72
|
as: "li",
|
|
@@ -62,7 +74,7 @@ let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
62
74
|
padding: padding,
|
|
63
75
|
display: "inline-block",
|
|
64
76
|
maxWidth: "100%",
|
|
65
|
-
elementRef:
|
|
77
|
+
elementRef: this.handleRef
|
|
66
78
|
}), children, (0, _emotion.jsx)("span", {
|
|
67
79
|
css: styles === null || styles === void 0 ? void 0 : styles.delimiter,
|
|
68
80
|
"aria-hidden": "true"
|
package/lib/InlineList/index.js
CHANGED
|
@@ -35,6 +35,18 @@ category: components
|
|
|
35
35
|
---
|
|
36
36
|
**/
|
|
37
37
|
let InlineList = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _class2 = class InlineList extends _react.Component {
|
|
38
|
+
constructor(...args) {
|
|
39
|
+
super(...args);
|
|
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
|
+
}
|
|
49
|
+
|
|
38
50
|
renderChildren() {
|
|
39
51
|
return _react.Children.map(this.props.children, child => {
|
|
40
52
|
if (!child) return; // ignore null, falsy children
|
|
@@ -48,16 +60,16 @@ let InlineList = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
|
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
render() {
|
|
51
|
-
const _this$
|
|
52
|
-
as = _this$
|
|
53
|
-
margin = _this$
|
|
54
|
-
elementRef = _this$
|
|
55
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
63
|
+
const _this$props2 = this.props,
|
|
64
|
+
as = _this$props2.as,
|
|
65
|
+
margin = _this$props2.margin,
|
|
66
|
+
elementRef = _this$props2.elementRef,
|
|
67
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
56
68
|
return /*#__PURE__*/_react.default.createElement(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
57
69
|
as: as,
|
|
58
70
|
margin: margin,
|
|
59
71
|
padding: "0",
|
|
60
|
-
elementRef:
|
|
72
|
+
elementRef: this.handleRef,
|
|
61
73
|
display: "block"
|
|
62
74
|
}), this.renderChildren());
|
|
63
75
|
}
|
|
@@ -36,6 +36,18 @@ id: List.Item
|
|
|
36
36
|
---
|
|
37
37
|
**/
|
|
38
38
|
let ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class ListItem extends _react.Component {
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
this.ref = null;
|
|
42
|
+
|
|
43
|
+
this.handleRef = el => {
|
|
44
|
+
var _this$props$elementRe, _this$props;
|
|
45
|
+
|
|
46
|
+
this.ref = el;
|
|
47
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
39
51
|
componentDidMount() {
|
|
40
52
|
this.props.makeStyles();
|
|
41
53
|
}
|
|
@@ -45,23 +57,23 @@ let ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
render() {
|
|
48
|
-
const _this$
|
|
49
|
-
delimiter = _this$
|
|
50
|
-
spacing = _this$
|
|
51
|
-
size = _this$
|
|
52
|
-
margin = _this$
|
|
53
|
-
padding = _this$
|
|
54
|
-
elementRef = _this$
|
|
55
|
-
children = _this$
|
|
56
|
-
styles = _this$
|
|
57
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
60
|
+
const _this$props2 = this.props,
|
|
61
|
+
delimiter = _this$props2.delimiter,
|
|
62
|
+
spacing = _this$props2.spacing,
|
|
63
|
+
size = _this$props2.size,
|
|
64
|
+
margin = _this$props2.margin,
|
|
65
|
+
padding = _this$props2.padding,
|
|
66
|
+
elementRef = _this$props2.elementRef,
|
|
67
|
+
children = _this$props2.children,
|
|
68
|
+
styles = _this$props2.styles,
|
|
69
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
58
70
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
59
71
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
60
72
|
as: "li",
|
|
61
73
|
margin: margin,
|
|
62
74
|
padding: padding,
|
|
63
75
|
maxWidth: "100%",
|
|
64
|
-
elementRef:
|
|
76
|
+
elementRef: this.handleRef
|
|
65
77
|
}), children);
|
|
66
78
|
}
|
|
67
79
|
|
package/lib/List/index.js
CHANGED
|
@@ -45,6 +45,18 @@ category: components
|
|
|
45
45
|
---
|
|
46
46
|
**/
|
|
47
47
|
let List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class List extends _react.Component {
|
|
48
|
+
constructor(...args) {
|
|
49
|
+
super(...args);
|
|
50
|
+
this.ref = null;
|
|
51
|
+
|
|
52
|
+
this.handleRef = el => {
|
|
53
|
+
var _this$props$elementRe, _this$props;
|
|
54
|
+
|
|
55
|
+
this.ref = el;
|
|
56
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
48
60
|
componentDidMount() {
|
|
49
61
|
this.props.makeStyles();
|
|
50
62
|
}
|
|
@@ -67,18 +79,18 @@ let List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
render() {
|
|
70
|
-
const _this$
|
|
71
|
-
as = _this$
|
|
72
|
-
margin = _this$
|
|
73
|
-
isUnstyled = _this$
|
|
74
|
-
elementRef = _this$
|
|
75
|
-
styles = _this$
|
|
76
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
82
|
+
const _this$props2 = this.props,
|
|
83
|
+
as = _this$props2.as,
|
|
84
|
+
margin = _this$props2.margin,
|
|
85
|
+
isUnstyled = _this$props2.isUnstyled,
|
|
86
|
+
elementRef = _this$props2.elementRef,
|
|
87
|
+
styles = _this$props2.styles,
|
|
88
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
77
89
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
78
90
|
css: styles === null || styles === void 0 ? void 0 : styles.list,
|
|
79
91
|
as: as,
|
|
80
92
|
margin: margin,
|
|
81
|
-
elementRef:
|
|
93
|
+
elementRef: this.handleRef,
|
|
82
94
|
display: "block"
|
|
83
95
|
}), this.renderChildren());
|
|
84
96
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-list",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.12+af470a237",
|
|
4
4
|
"description": "Components for displaying vertical or horizontal lists.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.10.
|
|
29
|
-
"@instructure/emotion": "8.10.
|
|
30
|
-
"@instructure/shared-types": "8.10.
|
|
31
|
-
"@instructure/ui-prop-types": "8.10.
|
|
32
|
-
"@instructure/ui-react-utils": "8.10.
|
|
33
|
-
"@instructure/ui-testable": "8.10.
|
|
34
|
-
"@instructure/ui-view": "8.10.
|
|
28
|
+
"@instructure/console": "8.10.3-snapshot.12+af470a237",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.12+af470a237",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.12+af470a237",
|
|
31
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.12+af470a237",
|
|
32
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.12+af470a237",
|
|
33
|
+
"@instructure/ui-testable": "8.10.3-snapshot.12+af470a237",
|
|
34
|
+
"@instructure/ui-view": "8.10.3-snapshot.12+af470a237",
|
|
35
35
|
"prop-types": "^15"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
39
|
-
"@instructure/ui-color-utils": "8.10.
|
|
40
|
-
"@instructure/ui-test-locator": "8.10.
|
|
41
|
-
"@instructure/ui-test-utils": "8.10.
|
|
42
|
-
"@instructure/ui-themes": "8.10.
|
|
38
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.12+af470a237",
|
|
39
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.12+af470a237",
|
|
40
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.12+af470a237",
|
|
41
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.12+af470a237",
|
|
42
|
+
"@instructure/ui-themes": "8.10.3-snapshot.12+af470a237"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"sideEffects": false
|
|
50
|
+
"sideEffects": false,
|
|
51
|
+
"gitHead": "af470a2374463c265ed1304870b7890fc8bb09a4"
|
|
51
52
|
}
|
|
@@ -58,6 +58,13 @@ class InlineListItem extends Component<InlineListItemProps> {
|
|
|
58
58
|
elementRef: (el) => {}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
ref: Element | null = null
|
|
62
|
+
|
|
63
|
+
handleRef = (el: Element | null) => {
|
|
64
|
+
this.ref = el
|
|
65
|
+
this.props.elementRef?.(el)
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
componentDidMount() {
|
|
62
69
|
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
63
70
|
this.props.makeStyles()
|
|
@@ -91,7 +98,7 @@ class InlineListItem extends Component<InlineListItemProps> {
|
|
|
91
98
|
padding={padding}
|
|
92
99
|
display="inline-block"
|
|
93
100
|
maxWidth="100%"
|
|
94
|
-
elementRef={
|
|
101
|
+
elementRef={this.handleRef}
|
|
95
102
|
>
|
|
96
103
|
{children}
|
|
97
104
|
<span css={styles?.delimiter} aria-hidden="true" />
|
package/src/InlineList/index.tsx
CHANGED
|
@@ -54,6 +54,13 @@ class InlineList extends Component<InlineListProps> {
|
|
|
54
54
|
|
|
55
55
|
static Item = InlineListItem
|
|
56
56
|
|
|
57
|
+
ref: Element | null = null
|
|
58
|
+
|
|
59
|
+
handleRef = (el: Element | null) => {
|
|
60
|
+
this.ref = el
|
|
61
|
+
this.props.elementRef?.(el)
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
renderChildren() {
|
|
58
65
|
return Children.map(this.props.children, (child) => {
|
|
59
66
|
if (!child) return // ignore null, falsy children
|
|
@@ -75,7 +82,7 @@ class InlineList extends Component<InlineListProps> {
|
|
|
75
82
|
as={as}
|
|
76
83
|
margin={margin}
|
|
77
84
|
padding="0"
|
|
78
|
-
elementRef={
|
|
85
|
+
elementRef={this.handleRef}
|
|
79
86
|
display="block"
|
|
80
87
|
>
|
|
81
88
|
{this.renderChildren()}
|
package/src/InlineList/props.ts
CHANGED
|
@@ -59,6 +59,13 @@ class ListItem extends Component<ListItemProps> {
|
|
|
59
59
|
elementRef: (el) => {}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
ref: Element | null = null
|
|
63
|
+
|
|
64
|
+
handleRef = (el: Element | null) => {
|
|
65
|
+
this.ref = el
|
|
66
|
+
this.props.elementRef?.(el)
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
componentDidMount() {
|
|
63
70
|
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
64
71
|
this.props.makeStyles()
|
|
@@ -91,7 +98,7 @@ class ListItem extends Component<ListItemProps> {
|
|
|
91
98
|
margin={margin}
|
|
92
99
|
padding={padding}
|
|
93
100
|
maxWidth="100%"
|
|
94
|
-
elementRef={
|
|
101
|
+
elementRef={this.handleRef}
|
|
95
102
|
>
|
|
96
103
|
{children}
|
|
97
104
|
</View>
|
package/src/List/index.tsx
CHANGED
|
@@ -64,6 +64,13 @@ class List extends Component<ListProps> {
|
|
|
64
64
|
|
|
65
65
|
static Item = ListItem
|
|
66
66
|
|
|
67
|
+
ref: Element | null = null
|
|
68
|
+
|
|
69
|
+
handleRef = (el: Element | null) => {
|
|
70
|
+
this.ref = el
|
|
71
|
+
this.props.elementRef?.(el)
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
componentDidMount() {
|
|
68
75
|
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
69
76
|
this.props.makeStyles()
|
|
@@ -97,7 +104,7 @@ class List extends Component<ListProps> {
|
|
|
97
104
|
css={styles?.list}
|
|
98
105
|
as={as}
|
|
99
106
|
margin={margin}
|
|
100
|
-
elementRef={
|
|
107
|
+
elementRef={this.handleRef}
|
|
101
108
|
display="block"
|
|
102
109
|
>
|
|
103
110
|
{this.renderChildren()}
|