@instructure/ui-list 11.7.3-snapshot-7 → 11.7.3-snapshot-26

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 +5 -2
  2. package/es/InlineList/v1/InlineListItem/index.js +39 -39
  3. package/es/InlineList/v1/InlineListItem/styles.js +5 -3
  4. package/es/InlineList/v1/InlineListItem/theme.js +27 -26
  5. package/es/InlineList/v1/index.js +26 -28
  6. package/es/InlineList/v2/InlineListItem/index.js +39 -39
  7. package/es/InlineList/v2/InlineListItem/styles.js +5 -3
  8. package/es/InlineList/v2/index.js +26 -28
  9. package/es/List/v1/ListItem/index.js +36 -36
  10. package/es/List/v1/ListItem/styles.js +5 -3
  11. package/es/List/v1/ListItem/theme.js +24 -23
  12. package/es/List/v1/index.js +35 -34
  13. package/es/List/v1/styles.js +4 -2
  14. package/es/List/v1/theme.js +7 -5
  15. package/es/List/v2/ListItem/index.js +36 -36
  16. package/es/List/v2/ListItem/styles.js +5 -3
  17. package/es/List/v2/index.js +35 -34
  18. package/es/List/v2/styles.js +4 -2
  19. package/lib/InlineList/v1/InlineListItem/index.js +39 -39
  20. package/lib/InlineList/v1/InlineListItem/styles.js +5 -3
  21. package/lib/InlineList/v1/InlineListItem/theme.js +27 -26
  22. package/lib/InlineList/v1/index.js +27 -29
  23. package/lib/InlineList/v2/InlineListItem/index.js +39 -39
  24. package/lib/InlineList/v2/InlineListItem/styles.js +5 -3
  25. package/lib/InlineList/v2/index.js +27 -29
  26. package/lib/List/v1/ListItem/index.js +36 -36
  27. package/lib/List/v1/ListItem/styles.js +5 -3
  28. package/lib/List/v1/ListItem/theme.js +24 -23
  29. package/lib/List/v1/index.js +35 -34
  30. package/lib/List/v1/styles.js +4 -2
  31. package/lib/List/v1/theme.js +7 -5
  32. package/lib/List/v2/ListItem/index.js +36 -36
  33. package/lib/List/v2/ListItem/styles.js +5 -3
  34. package/lib/List/v2/index.js +35 -34
  35. package/lib/List/v2/styles.js +4 -2
  36. package/package.json +11 -11
  37. package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -3,9 +3,12 @@
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
- ## [11.7.3-snapshot-7](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-7) (2026-04-29)
6
+ ## [11.7.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-26) (2026-05-05)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-list
8
+
9
+ ### Bug Fixes
10
+
11
+ * **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
9
12
 
10
13
 
11
14
 
@@ -1,6 +1,4 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["delimiter", "size", "margin", "padding", "elementRef", "children", "spacing", "styles", "lastPlaceholder"];
3
- var _dec, _class, _InlineListItem;
1
+ var _dec, _class;
4
2
  /*
5
3
  * The MIT License (MIT)
6
4
  *
@@ -39,41 +37,49 @@ parent: InlineList
39
37
  id: InlineList.Item
40
38
  ---
41
39
  **/
42
- let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_InlineListItem = class InlineListItem extends Component {
43
- constructor(...args) {
44
- super(...args);
45
- this.ref = null;
46
- this.handleRef = el => {
47
- const elementRef = this.props.elementRef;
48
- this.ref = el;
49
- if (typeof elementRef === 'function') {
50
- elementRef(el);
51
- }
52
- };
53
- }
40
+ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class InlineListItem extends Component {
41
+ static displayName = "InlineListItem";
42
+ static componentId = 'InlineList.Item';
43
+ static allowedProps = allowedProps;
44
+ static defaultProps = {
45
+ padding: 'none',
46
+ spacing: 'none',
47
+ delimiter: 'none',
48
+ size: 'medium',
49
+ lastPlaceholder: false
50
+ };
51
+ ref = null;
52
+ handleRef = el => {
53
+ const {
54
+ elementRef
55
+ } = this.props;
56
+ this.ref = el;
57
+ if (typeof elementRef === 'function') {
58
+ elementRef(el);
59
+ }
60
+ };
54
61
  componentDidMount() {
55
- var _this$props$makeStyle, _this$props;
56
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
62
+ this.props.makeStyles?.();
57
63
  }
58
64
  componentDidUpdate() {
59
- var _this$props$makeStyle2, _this$props2;
60
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
65
+ this.props.makeStyles?.();
61
66
  }
62
67
  render() {
63
- const _this$props3 = this.props,
64
- delimiter = _this$props3.delimiter,
65
- size = _this$props3.size,
66
- margin = _this$props3.margin,
67
- padding = _this$props3.padding,
68
- elementRef = _this$props3.elementRef,
69
- children = _this$props3.children,
70
- spacing = _this$props3.spacing,
71
- styles = _this$props3.styles,
72
- lastPlaceholder = _this$props3.lastPlaceholder,
73
- rest = _objectWithoutProperties(_this$props3, _excluded);
68
+ const {
69
+ delimiter,
70
+ size,
71
+ margin,
72
+ padding,
73
+ elementRef,
74
+ children,
75
+ spacing,
76
+ styles,
77
+ lastPlaceholder,
78
+ ...rest
79
+ } = this.props;
74
80
  return _jsxs(View, {
75
81
  ...passthroughProps(rest),
76
- css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
82
+ css: styles?.inlineListItem,
77
83
  as: "li",
78
84
  margin: margin,
79
85
  padding: padding,
@@ -82,17 +88,11 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
82
88
  elementRef: this.handleRef,
83
89
  "data-cid": "InlineListItem",
84
90
  children: [children, !lastPlaceholder && _jsx("span", {
85
- css: styles === null || styles === void 0 ? void 0 : styles.delimiter,
91
+ css: styles?.delimiter,
86
92
  "aria-hidden": "true"
87
93
  })]
88
94
  });
89
95
  }
90
- }, _InlineListItem.displayName = "InlineListItem", _InlineListItem.componentId = 'InlineList.Item', _InlineListItem.allowedProps = allowedProps, _InlineListItem.defaultProps = {
91
- padding: 'none',
92
- spacing: 'none',
93
- delimiter: 'none',
94
- size: 'medium',
95
- lastPlaceholder: false
96
- }, _InlineListItem)) || _class);
96
+ }) || _class);
97
97
  export default InlineListItem;
98
98
  export { InlineListItem };
@@ -36,9 +36,11 @@ import { logError as error } from '@instructure/console';
36
36
  * @return {Object} The final style object, which will be used in the component
37
37
  */
38
38
  const generateStyle = (componentTheme, props) => {
39
- const size = props.size,
40
- delimiter = props.delimiter,
41
- spacing = props.spacing;
39
+ const {
40
+ size,
41
+ delimiter,
42
+ spacing
43
+ } = props;
42
44
  const withDelimiter = delimiter !== 'none';
43
45
  const withSpacing = spacing !== 'none';
44
46
  error(!(withDelimiter && withSpacing), `[InlineList] \`itemSpacing\` has no effect inside Lists with the \`delimiter\` prop set to anything other than \`none\`.`);
@@ -28,38 +28,39 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
- var _colors$contrasts, _colors$contrasts2;
32
- const colors = theme.colors,
33
- spacing = theme.spacing,
34
- typography = theme.typography,
35
- themeName = theme.key;
31
+ const {
32
+ colors,
33
+ spacing,
34
+ typography,
35
+ key: themeName
36
+ } = theme;
36
37
  const themeSpecificStyle = {
37
38
  canvas: {
38
39
  color: theme['ic-brand-font-color-dark']
39
40
  }
40
41
  };
41
42
  const componentVariables = {
42
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
44
- fontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
45
- fontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
46
- fontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
47
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570,
48
- delimiterColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
49
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
50
- noneSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
51
- pipeSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
52
- slashSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
53
- arrowSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
54
- marginBottomDefault: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
55
- spacingXXXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
56
- spacingXXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
57
- spacingXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
58
- spacingSmall: spacing === null || spacing === void 0 ? void 0 : spacing.small,
59
- spacingMedium: spacing === null || spacing === void 0 ? void 0 : spacing.medium,
60
- spacingLarge: spacing === null || spacing === void 0 ? void 0 : spacing.large,
61
- spacingXLarge: spacing === null || spacing === void 0 ? void 0 : spacing.xLarge,
62
- spacingXXLarge: spacing === null || spacing === void 0 ? void 0 : spacing.xxLarge
43
+ fontFamily: typography?.fontFamily,
44
+ fontWeight: typography?.fontWeightNormal,
45
+ fontSizeSmall: typography?.fontSizeSmall,
46
+ fontSizeMedium: typography?.fontSizeMedium,
47
+ fontSizeLarge: typography?.fontSizeLarge,
48
+ color: colors?.contrasts?.grey4570,
49
+ delimiterColor: colors?.contrasts?.grey125125,
50
+ lineHeight: typography?.lineHeightCondensed,
51
+ noneSpacing: spacing?.xSmall,
52
+ pipeSpacing: spacing?.xSmall,
53
+ slashSpacing: spacing?.xSmall,
54
+ arrowSpacing: spacing?.xSmall,
55
+ marginBottomDefault: spacing?.xxxSmall,
56
+ spacingXXXSmall: spacing?.xxxSmall,
57
+ spacingXXSmall: spacing?.xxSmall,
58
+ spacingXSmall: spacing?.xSmall,
59
+ spacingSmall: spacing?.small,
60
+ spacingMedium: spacing?.medium,
61
+ spacingLarge: spacing?.large,
62
+ spacingXLarge: spacing?.xLarge,
63
+ spacingXXLarge: spacing?.xxLarge
63
64
  };
64
65
  return {
65
66
  ...componentVariables,
@@ -1,5 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["as", "margin", "elementRef"];
3
1
  /*
4
2
  * The MIT License (MIT)
5
3
  *
@@ -36,17 +34,26 @@ category: components
36
34
 
37
35
  **/
38
36
  class InlineList extends Component {
39
- constructor(...args) {
40
- super(...args);
41
- this.ref = null;
42
- this.handleRef = el => {
43
- const elementRef = this.props.elementRef;
44
- this.ref = el;
45
- if (typeof elementRef === 'function') {
46
- elementRef(el);
47
- }
48
- };
49
- }
37
+ static displayName = "InlineList";
38
+ static allowedProps = allowedProps;
39
+ static defaultProps = {
40
+ itemSpacing: 'none',
41
+ as: 'ul',
42
+ margin: 'none',
43
+ delimiter: 'none',
44
+ size: 'medium'
45
+ };
46
+ static Item = InlineListItem;
47
+ ref = null;
48
+ handleRef = el => {
49
+ const {
50
+ elementRef
51
+ } = this.props;
52
+ this.ref = el;
53
+ if (typeof elementRef === 'function') {
54
+ elementRef(el);
55
+ }
56
+ };
50
57
  renderChildren() {
51
58
  const childrenArray = Children.toArray(this.props.children);
52
59
  const lastIndex = childrenArray.length - 1;
@@ -62,11 +69,12 @@ class InlineList extends Component {
62
69
  });
63
70
  }
64
71
  render() {
65
- const _this$props = this.props,
66
- as = _this$props.as,
67
- margin = _this$props.margin,
68
- elementRef = _this$props.elementRef,
69
- rest = _objectWithoutProperties(_this$props, _excluded);
72
+ const {
73
+ as,
74
+ margin,
75
+ elementRef,
76
+ ...rest
77
+ } = this.props;
70
78
  return _jsx(View, {
71
79
  ...passthroughProps(rest),
72
80
  as: as,
@@ -79,15 +87,5 @@ class InlineList extends Component {
79
87
  });
80
88
  }
81
89
  }
82
- InlineList.displayName = "InlineList";
83
- InlineList.allowedProps = allowedProps;
84
- InlineList.defaultProps = {
85
- itemSpacing: 'none',
86
- as: 'ul',
87
- margin: 'none',
88
- delimiter: 'none',
89
- size: 'medium'
90
- };
91
- InlineList.Item = InlineListItem;
92
90
  export default InlineList;
93
91
  export { InlineList };
@@ -1,6 +1,4 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["delimiter", "size", "margin", "padding", "elementRef", "children", "spacing", "styles", "lastPlaceholder"];
3
- var _dec, _class, _InlineListItem;
1
+ var _dec, _class;
4
2
  /*
5
3
  * The MIT License (MIT)
6
4
  *
@@ -38,41 +36,49 @@ parent: InlineList
38
36
  id: InlineList.Item
39
37
  ---
40
38
  **/
41
- let InlineListItem = (_dec = withStyle(generateStyle), _dec(_class = (_InlineListItem = class InlineListItem extends Component {
42
- constructor(...args) {
43
- super(...args);
44
- this.ref = null;
45
- this.handleRef = el => {
46
- const elementRef = this.props.elementRef;
47
- this.ref = el;
48
- if (typeof elementRef === 'function') {
49
- elementRef(el);
50
- }
51
- };
52
- }
39
+ let InlineListItem = (_dec = withStyle(generateStyle), _dec(_class = class InlineListItem extends Component {
40
+ static displayName = "InlineListItem";
41
+ static componentId = 'InlineList.Item';
42
+ static allowedProps = allowedProps;
43
+ static defaultProps = {
44
+ padding: 'none',
45
+ spacing: 'none',
46
+ delimiter: 'none',
47
+ size: 'medium',
48
+ lastPlaceholder: false
49
+ };
50
+ ref = null;
51
+ handleRef = el => {
52
+ const {
53
+ elementRef
54
+ } = this.props;
55
+ this.ref = el;
56
+ if (typeof elementRef === 'function') {
57
+ elementRef(el);
58
+ }
59
+ };
53
60
  componentDidMount() {
54
- var _this$props$makeStyle, _this$props;
55
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
61
+ this.props.makeStyles?.();
56
62
  }
57
63
  componentDidUpdate() {
58
- var _this$props$makeStyle2, _this$props2;
59
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
64
+ this.props.makeStyles?.();
60
65
  }
61
66
  render() {
62
- const _this$props3 = this.props,
63
- delimiter = _this$props3.delimiter,
64
- size = _this$props3.size,
65
- margin = _this$props3.margin,
66
- padding = _this$props3.padding,
67
- elementRef = _this$props3.elementRef,
68
- children = _this$props3.children,
69
- spacing = _this$props3.spacing,
70
- styles = _this$props3.styles,
71
- lastPlaceholder = _this$props3.lastPlaceholder,
72
- rest = _objectWithoutProperties(_this$props3, _excluded);
67
+ const {
68
+ delimiter,
69
+ size,
70
+ margin,
71
+ padding,
72
+ elementRef,
73
+ children,
74
+ spacing,
75
+ styles,
76
+ lastPlaceholder,
77
+ ...rest
78
+ } = this.props;
73
79
  return _jsxs(View, {
74
80
  ...passthroughProps(rest),
75
- css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
81
+ css: styles?.inlineListItem,
76
82
  as: "li",
77
83
  margin: margin,
78
84
  padding: padding,
@@ -81,17 +87,11 @@ let InlineListItem = (_dec = withStyle(generateStyle), _dec(_class = (_InlineLis
81
87
  elementRef: this.handleRef,
82
88
  "data-cid": "InlineListItem",
83
89
  children: [children, !lastPlaceholder && _jsx("span", {
84
- css: styles === null || styles === void 0 ? void 0 : styles.delimiter,
90
+ css: styles?.delimiter,
85
91
  "aria-hidden": "true"
86
92
  })]
87
93
  });
88
94
  }
89
- }, _InlineListItem.displayName = "InlineListItem", _InlineListItem.componentId = 'InlineList.Item', _InlineListItem.allowedProps = allowedProps, _InlineListItem.defaultProps = {
90
- padding: 'none',
91
- spacing: 'none',
92
- delimiter: 'none',
93
- size: 'medium',
94
- lastPlaceholder: false
95
- }, _InlineListItem)) || _class);
95
+ }) || _class);
96
96
  export default InlineListItem;
97
97
  export { InlineListItem };
@@ -33,9 +33,11 @@ import { logError as error } from '@instructure/console';
33
33
  * @return {Object} The final style object, which will be used in the component
34
34
  */
35
35
  const generateStyle = (componentTheme, props) => {
36
- const size = props.size,
37
- delimiter = props.delimiter,
38
- spacing = props.spacing;
36
+ const {
37
+ size,
38
+ delimiter,
39
+ spacing
40
+ } = props;
39
41
  const withDelimiter = delimiter !== 'none';
40
42
  const withSpacing = spacing !== 'none';
41
43
  error(!(withDelimiter && withSpacing), `[InlineList] \`itemSpacing\` has no effect inside Lists with the \`delimiter\` prop set to anything other than \`none\`.`);
@@ -1,5 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["as", "margin", "elementRef"];
3
1
  /*
4
2
  * The MIT License (MIT)
5
3
  *
@@ -36,17 +34,26 @@ category: components
36
34
 
37
35
  **/
38
36
  class InlineList extends Component {
39
- constructor(...args) {
40
- super(...args);
41
- this.ref = null;
42
- this.handleRef = el => {
43
- const elementRef = this.props.elementRef;
44
- this.ref = el;
45
- if (typeof elementRef === 'function') {
46
- elementRef(el);
47
- }
48
- };
49
- }
37
+ static displayName = "InlineList";
38
+ static allowedProps = allowedProps;
39
+ static defaultProps = {
40
+ itemSpacing: 'none',
41
+ as: 'ul',
42
+ margin: 'none',
43
+ delimiter: 'none',
44
+ size: 'medium'
45
+ };
46
+ static Item = InlineListItem;
47
+ ref = null;
48
+ handleRef = el => {
49
+ const {
50
+ elementRef
51
+ } = this.props;
52
+ this.ref = el;
53
+ if (typeof elementRef === 'function') {
54
+ elementRef(el);
55
+ }
56
+ };
50
57
  renderChildren() {
51
58
  const childrenArray = Children.toArray(this.props.children);
52
59
  const lastIndex = childrenArray.length - 1;
@@ -62,11 +69,12 @@ class InlineList extends Component {
62
69
  });
63
70
  }
64
71
  render() {
65
- const _this$props = this.props,
66
- as = _this$props.as,
67
- margin = _this$props.margin,
68
- elementRef = _this$props.elementRef,
69
- rest = _objectWithoutProperties(_this$props, _excluded);
72
+ const {
73
+ as,
74
+ margin,
75
+ elementRef,
76
+ ...rest
77
+ } = this.props;
70
78
  return _jsx(View, {
71
79
  ...passthroughProps(rest),
72
80
  as: as,
@@ -79,15 +87,5 @@ class InlineList extends Component {
79
87
  });
80
88
  }
81
89
  }
82
- InlineList.displayName = "InlineList";
83
- InlineList.allowedProps = allowedProps;
84
- InlineList.defaultProps = {
85
- itemSpacing: 'none',
86
- as: 'ul',
87
- margin: 'none',
88
- delimiter: 'none',
89
- size: 'medium'
90
- };
91
- InlineList.Item = InlineListItem;
92
90
  export default InlineList;
93
91
  export { InlineList };
@@ -1,6 +1,4 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["delimiter", "spacing", "size", "margin", "padding", "elementRef", "children", "styles"];
3
- var _dec, _class, _ListItem;
1
+ var _dec, _class;
4
2
  /*
5
3
  * The MIT License (MIT)
6
4
  *
@@ -39,40 +37,47 @@ parent: List
39
37
  id: List.Item
40
38
  ---
41
39
  **/
42
- let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_ListItem = class ListItem extends Component {
43
- constructor(...args) {
44
- super(...args);
45
- this.ref = null;
46
- this.handleRef = el => {
47
- const elementRef = this.props.elementRef;
48
- this.ref = el;
49
- if (typeof elementRef === 'function') {
50
- elementRef(el);
51
- }
52
- };
53
- }
40
+ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ListItem extends Component {
41
+ static displayName = "ListItem";
42
+ static componentId = 'List.Item';
43
+ static allowedProps = allowedProps;
44
+ static defaultProps = {
45
+ padding: 'none',
46
+ spacing: 'none',
47
+ delimiter: 'none',
48
+ size: 'medium'
49
+ };
50
+ ref = null;
51
+ handleRef = el => {
52
+ const {
53
+ elementRef
54
+ } = this.props;
55
+ this.ref = el;
56
+ if (typeof elementRef === 'function') {
57
+ elementRef(el);
58
+ }
59
+ };
54
60
  componentDidMount() {
55
- var _this$props$makeStyle, _this$props;
56
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
61
+ this.props.makeStyles?.();
57
62
  }
58
63
  componentDidUpdate() {
59
- var _this$props$makeStyle2, _this$props2;
60
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
64
+ this.props.makeStyles?.();
61
65
  }
62
66
  render() {
63
- const _this$props3 = this.props,
64
- delimiter = _this$props3.delimiter,
65
- spacing = _this$props3.spacing,
66
- size = _this$props3.size,
67
- margin = _this$props3.margin,
68
- padding = _this$props3.padding,
69
- elementRef = _this$props3.elementRef,
70
- children = _this$props3.children,
71
- styles = _this$props3.styles,
72
- rest = _objectWithoutProperties(_this$props3, _excluded);
67
+ const {
68
+ delimiter,
69
+ spacing,
70
+ size,
71
+ margin,
72
+ padding,
73
+ elementRef,
74
+ children,
75
+ styles,
76
+ ...rest
77
+ } = this.props;
73
78
  return _jsx(View, {
74
79
  ...passthroughProps(rest),
75
- css: styles === null || styles === void 0 ? void 0 : styles.listItem,
80
+ css: styles?.listItem,
76
81
  as: "li",
77
82
  margin: margin,
78
83
  padding: padding,
@@ -82,11 +87,6 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_c
82
87
  children: children
83
88
  });
84
89
  }
85
- }, _ListItem.displayName = "ListItem", _ListItem.componentId = 'List.Item', _ListItem.allowedProps = allowedProps, _ListItem.defaultProps = {
86
- padding: 'none',
87
- spacing: 'none',
88
- delimiter: 'none',
89
- size: 'medium'
90
- }, _ListItem)) || _class);
90
+ }) || _class);
91
91
  export default ListItem;
92
92
  export { ListItem };
@@ -36,9 +36,11 @@ import { logError as error } from '@instructure/console';
36
36
  * @return {Object} The final style object, which will be used in the component
37
37
  */
38
38
  const generateStyle = (componentTheme, props) => {
39
- const size = props.size,
40
- delimiter = props.delimiter,
41
- spacing = props.spacing;
39
+ const {
40
+ size,
41
+ delimiter,
42
+ spacing
43
+ } = props;
42
44
  const withDelimiter = delimiter !== 'none';
43
45
  const withSpacing = spacing !== 'none';
44
46
  error(!(withDelimiter && withSpacing), `[List] \`itemSpacing\` has no effect inside Lists with the \`delimiter\` prop set to anything other than \`none\`.`);
@@ -28,35 +28,36 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
- var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
32
- const borders = theme.borders,
33
- colors = theme.colors,
34
- spacing = theme.spacing,
35
- typography = theme.typography,
36
- themeName = theme.key;
31
+ const {
32
+ borders,
33
+ colors,
34
+ spacing,
35
+ typography,
36
+ key: themeName
37
+ } = theme;
37
38
  const themeSpecificStyle = {
38
39
  canvas: {
39
40
  color: theme['ic-brand-font-color-dark']
40
41
  }
41
42
  };
42
43
  const componentVariables = {
43
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
44
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
45
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeight,
46
- fontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
47
- fontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
48
- fontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
49
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
50
- spacingXXXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
51
- spacingXXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
52
- spacingXSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
53
- spacingSmall: spacing === null || spacing === void 0 ? void 0 : spacing.small,
54
- spacingMedium: spacing === null || spacing === void 0 ? void 0 : spacing.medium,
55
- spacingLarge: spacing === null || spacing === void 0 ? void 0 : spacing.large,
56
- spacingXLarge: spacing === null || spacing === void 0 ? void 0 : spacing.xLarge,
57
- spacingXXLarge: spacing === null || spacing === void 0 ? void 0 : spacing.xxLarge,
58
- delimiterDashedBorder: `${borders === null || borders === void 0 ? void 0 : borders.widthSmall} dashed ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1214}`,
59
- delimiterSolidBorder: `${borders === null || borders === void 0 ? void 0 : borders.widthSmall} solid ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1214}`
44
+ fontFamily: typography?.fontFamily,
45
+ fontWeight: typography?.fontWeightNormal,
46
+ lineHeight: typography?.lineHeight,
47
+ fontSizeSmall: typography?.fontSizeSmall,
48
+ fontSizeMedium: typography?.fontSizeMedium,
49
+ fontSizeLarge: typography?.fontSizeLarge,
50
+ color: colors?.contrasts?.grey125125,
51
+ spacingXXXSmall: spacing?.xxxSmall,
52
+ spacingXXSmall: spacing?.xxSmall,
53
+ spacingXSmall: spacing?.xSmall,
54
+ spacingSmall: spacing?.small,
55
+ spacingMedium: spacing?.medium,
56
+ spacingLarge: spacing?.large,
57
+ spacingXLarge: spacing?.xLarge,
58
+ spacingXXLarge: spacing?.xxLarge,
59
+ delimiterDashedBorder: `${borders?.widthSmall} dashed ${colors?.contrasts?.grey1214}`,
60
+ delimiterSolidBorder: `${borders?.widthSmall} solid ${colors?.contrasts?.grey1214}`
60
61
  };
61
62
  return {
62
63
  ...componentVariables,