@instructure/ui-list 8.10.1-snapshot.9 → 8.10.3-snapshot.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/es/InlineList/InlineListItem/index.js +23 -11
  3. package/es/InlineList/index.js +18 -6
  4. package/es/List/ListItem/index.js +23 -11
  5. package/es/List/index.js +20 -8
  6. package/lib/InlineList/InlineListItem/index.js +23 -11
  7. package/lib/InlineList/index.js +18 -6
  8. package/lib/List/ListItem/index.js +23 -11
  9. package/lib/List/index.js +20 -8
  10. package/package.json +14 -14
  11. package/src/InlineList/InlineListItem/index.tsx +8 -1
  12. package/src/InlineList/InlineListItem/props.ts +1 -1
  13. package/src/InlineList/index.tsx +8 -1
  14. package/src/InlineList/props.ts +1 -1
  15. package/src/List/ListItem/index.tsx +8 -1
  16. package/src/List/ListItem/props.ts +1 -1
  17. package/src/List/index.tsx +8 -1
  18. package/src/List/props.ts +1 -1
  19. package/types/InlineList/InlineListItem/InlineListItemLocator.d.ts +64 -64
  20. package/types/InlineList/InlineListItem/index.d.ts +4 -2
  21. package/types/InlineList/InlineListItem/index.d.ts.map +1 -1
  22. package/types/InlineList/InlineListItem/props.d.ts +1 -1
  23. package/types/InlineList/InlineListItem/props.d.ts.map +1 -1
  24. package/types/InlineList/InlineListLocator.d.ts +224 -224
  25. package/types/InlineList/index.d.ts +4 -2
  26. package/types/InlineList/index.d.ts.map +1 -1
  27. package/types/InlineList/props.d.ts +1 -1
  28. package/types/InlineList/props.d.ts.map +1 -1
  29. package/types/List/ListItem/index.d.ts +4 -2
  30. package/types/List/ListItem/index.d.ts.map +1 -1
  31. package/types/List/ListItem/props.d.ts +1 -1
  32. package/types/List/ListItem/props.d.ts.map +1 -1
  33. package/types/List/ListLocator.d.ts +224 -224
  34. package/types/List/index.d.ts +4 -2
  35. package/types/List/index.d.ts.map +1 -1
  36. package/types/List/props.d.ts +1 -1
  37. package/types/List/props.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+
10
+ ## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
11
+
12
+ **Note:** Version bump only for package @instructure/ui-list
13
+
6
14
  # [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-list
@@ -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$props = this.props,
57
- delimiter = _this$props.delimiter,
58
- size = _this$props.size,
59
- margin = _this$props.margin,
60
- padding = _this$props.padding,
61
- elementRef = _this$props.elementRef,
62
- children = _this$props.children,
63
- spacing = _this$props.spacing,
64
- styles = _this$props.styles,
65
- rest = _objectWithoutProperties(_this$props, _excluded);
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: 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"
@@ -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$props = this.props,
56
- as = _this$props.as,
57
- margin = _this$props.margin,
58
- elementRef = _this$props.elementRef,
59
- rest = _objectWithoutProperties(_this$props, _excluded);
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: 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$props = this.props,
57
- delimiter = _this$props.delimiter,
58
- spacing = _this$props.spacing,
59
- size = _this$props.size,
60
- margin = _this$props.margin,
61
- padding = _this$props.padding,
62
- elementRef = _this$props.elementRef,
63
- children = _this$props.children,
64
- styles = _this$props.styles,
65
- rest = _objectWithoutProperties(_this$props, _excluded);
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: 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$props = this.props,
70
- as = _this$props.as,
71
- margin = _this$props.margin,
72
- isUnstyled = _this$props.isUnstyled,
73
- elementRef = _this$props.elementRef,
74
- styles = _this$props.styles,
75
- rest = _objectWithoutProperties(_this$props, _excluded);
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: 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$props = this.props,
49
- delimiter = _this$props.delimiter,
50
- size = _this$props.size,
51
- margin = _this$props.margin,
52
- padding = _this$props.padding,
53
- elementRef = _this$props.elementRef,
54
- children = _this$props.children,
55
- spacing = _this$props.spacing,
56
- styles = _this$props.styles,
57
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
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: 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"
@@ -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$props = this.props,
52
- as = _this$props.as,
53
- margin = _this$props.margin,
54
- elementRef = _this$props.elementRef,
55
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
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: 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$props = this.props,
49
- delimiter = _this$props.delimiter,
50
- spacing = _this$props.spacing,
51
- size = _this$props.size,
52
- margin = _this$props.margin,
53
- padding = _this$props.padding,
54
- elementRef = _this$props.elementRef,
55
- children = _this$props.children,
56
- styles = _this$props.styles,
57
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
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: 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$props = this.props,
71
- as = _this$props.as,
72
- margin = _this$props.margin,
73
- isUnstyled = _this$props.isUnstyled,
74
- elementRef = _this$props.elementRef,
75
- styles = _this$props.styles,
76
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
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: 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.1-snapshot.9+93b506fe0",
3
+ "version": "8.10.3-snapshot.2+ccdf8f43b",
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.1-snapshot.9+93b506fe0",
29
- "@instructure/emotion": "8.10.1-snapshot.9+93b506fe0",
30
- "@instructure/shared-types": "8.10.1-snapshot.9+93b506fe0",
31
- "@instructure/ui-prop-types": "8.10.1-snapshot.9+93b506fe0",
32
- "@instructure/ui-react-utils": "8.10.1-snapshot.9+93b506fe0",
33
- "@instructure/ui-testable": "8.10.1-snapshot.9+93b506fe0",
34
- "@instructure/ui-view": "8.10.1-snapshot.9+93b506fe0",
28
+ "@instructure/console": "8.10.3-snapshot.2+ccdf8f43b",
29
+ "@instructure/emotion": "8.10.3-snapshot.2+ccdf8f43b",
30
+ "@instructure/shared-types": "8.10.3-snapshot.2+ccdf8f43b",
31
+ "@instructure/ui-prop-types": "8.10.3-snapshot.2+ccdf8f43b",
32
+ "@instructure/ui-react-utils": "8.10.3-snapshot.2+ccdf8f43b",
33
+ "@instructure/ui-testable": "8.10.3-snapshot.2+ccdf8f43b",
34
+ "@instructure/ui-view": "8.10.3-snapshot.2+ccdf8f43b",
35
35
  "prop-types": "^15"
36
36
  },
37
37
  "devDependencies": {
38
- "@instructure/ui-babel-preset": "8.10.1-snapshot.9+93b506fe0",
39
- "@instructure/ui-color-utils": "8.10.1-snapshot.9+93b506fe0",
40
- "@instructure/ui-test-locator": "8.10.1-snapshot.9+93b506fe0",
41
- "@instructure/ui-test-utils": "8.10.1-snapshot.9+93b506fe0",
42
- "@instructure/ui-themes": "8.10.1-snapshot.9+93b506fe0"
38
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.2+ccdf8f43b",
39
+ "@instructure/ui-color-utils": "8.10.3-snapshot.2+ccdf8f43b",
40
+ "@instructure/ui-test-locator": "8.10.3-snapshot.2+ccdf8f43b",
41
+ "@instructure/ui-test-utils": "8.10.3-snapshot.2+ccdf8f43b",
42
+ "@instructure/ui-themes": "8.10.3-snapshot.2+ccdf8f43b"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "sideEffects": false,
51
- "gitHead": "93b506fe0860718ebe2cc2729fd023e3e7489231"
51
+ "gitHead": "ccdf8f43b56a8edef32600281692dfeb436d5a01"
52
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={elementRef}
101
+ elementRef={this.handleRef}
95
102
  >
96
103
  {children}
97
104
  <span css={styles?.delimiter} aria-hidden="true" />
@@ -53,7 +53,7 @@ type InlineListItemOwnProps = {
53
53
  | 'large'
54
54
  | 'x-large'
55
55
  | 'xx-large'
56
- elementRef?: (...args: any[]) => any
56
+ elementRef?: (element: Element | null) => void
57
57
  }
58
58
 
59
59
  type PropKeys = keyof InlineListItemOwnProps
@@ -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={elementRef}
85
+ elementRef={this.handleRef}
79
86
  display="block"
80
87
  >
81
88
  {this.renderChildren()}
@@ -48,7 +48,7 @@ type InlineListOwnProps = {
48
48
  | 'large'
49
49
  | 'x-large'
50
50
  | 'xx-large'
51
- elementRef?: (...args: any[]) => any
51
+ elementRef?: (element: Element | null) => void
52
52
  }
53
53
 
54
54
  type PropKeys = keyof InlineListOwnProps
@@ -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={elementRef}
101
+ elementRef={this.handleRef}
95
102
  >
96
103
  {children}
97
104
  </View>
@@ -50,7 +50,7 @@ type ListItemOwnProps = {
50
50
  | 'large'
51
51
  | 'x-large'
52
52
  | 'xx-large'
53
- elementRef?: (...args: any[]) => any
53
+ elementRef?: (element: Element | null) => void
54
54
  }
55
55
 
56
56
  type PropKeys = keyof ListItemOwnProps
@@ -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={elementRef}
107
+ elementRef={this.handleRef}
101
108
  display="block"
102
109
  >
103
110
  {this.renderChildren()}
package/src/List/props.ts CHANGED
@@ -54,7 +54,7 @@ type ListOwnProps = {
54
54
  | 'large'
55
55
  | 'x-large'
56
56
  | 'xx-large'
57
- elementRef?: (...args: any[]) => any
57
+ elementRef?: (element: Element | null) => void
58
58
  }
59
59
 
60
60
  type PropKeys = keyof ListOwnProps