@instructure/ui-list 8.33.1 → 8.33.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/es/InlineList/InlineListItem/InlineListItemLocator.js +2 -1
  3. package/es/InlineList/InlineListItem/index.js +9 -22
  4. package/es/InlineList/InlineListItem/props.js +1 -0
  5. package/es/InlineList/InlineListItem/styles.js +3 -4
  6. package/es/InlineList/InlineListItem/theme.js +5 -5
  7. package/es/InlineList/InlineListLocator.js +2 -1
  8. package/es/InlineList/__examples__/InlineList.examples.js +3 -2
  9. package/es/InlineList/index.js +4 -13
  10. package/es/InlineList/props.js +1 -0
  11. package/es/List/ListItem/index.js +9 -21
  12. package/es/List/ListItem/props.js +1 -0
  13. package/es/List/ListItem/styles.js +3 -4
  14. package/es/List/ListItem/theme.js +6 -6
  15. package/es/List/ListLocator.js +5 -2
  16. package/es/List/__examples__/List.examples.js +1 -1
  17. package/es/List/index.js +6 -19
  18. package/es/List/locator.js +1 -0
  19. package/es/List/props.js +1 -0
  20. package/es/List/styles.js +1 -2
  21. package/es/List/theme.js +3 -3
  22. package/es/index.js +1 -0
  23. package/lib/InlineList/InlineListItem/InlineListItemLocator.js +1 -4
  24. package/lib/InlineList/InlineListItem/index.js +9 -30
  25. package/lib/InlineList/InlineListItem/locator.js +0 -2
  26. package/lib/InlineList/InlineListItem/props.js +1 -4
  27. package/lib/InlineList/InlineListItem/styles.js +2 -5
  28. package/lib/InlineList/InlineListItem/theme.js +5 -6
  29. package/lib/InlineList/InlineListLocator.js +1 -4
  30. package/lib/InlineList/__examples__/InlineList.examples.js +2 -6
  31. package/lib/InlineList/index.js +4 -22
  32. package/lib/InlineList/locator.js +0 -2
  33. package/lib/InlineList/props.js +1 -6
  34. package/lib/List/ListItem/index.js +9 -30
  35. package/lib/List/ListItem/props.js +1 -4
  36. package/lib/List/ListItem/styles.js +2 -5
  37. package/lib/List/ListItem/theme.js +6 -7
  38. package/lib/List/ListLocator.js +3 -4
  39. package/lib/List/__examples__/List.examples.js +0 -5
  40. package/lib/List/index.js +6 -30
  41. package/lib/List/locator.js +0 -2
  42. package/lib/List/props.js +1 -6
  43. package/lib/List/styles.js +1 -3
  44. package/lib/List/theme.js +3 -4
  45. package/lib/index.js +0 -2
  46. package/package.json +13 -13
  47. package/tsconfig.build.tsbuildinfo +1 -1
package/lib/List/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -13,33 +12,19 @@ Object.defineProperty(exports, "ListItem", {
13
12
  }
14
13
  });
15
14
  exports.default = void 0;
16
-
17
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
18
-
19
16
  var _react = require("react");
20
-
21
17
  var _View = require("@instructure/ui-view/lib/View");
22
-
23
18
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
24
-
25
19
  var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
26
-
27
20
  var _testable = require("@instructure/ui-testable/lib/testable.js");
28
-
29
21
  var _ListItem = require("./ListItem");
30
-
31
22
  var _emotion = require("@instructure/emotion");
32
-
33
23
  var _styles = _interopRequireDefault(require("./styles"));
34
-
35
24
  var _theme = _interopRequireDefault(require("./theme"));
36
-
37
25
  var _props = require("./props");
38
-
39
26
  const _excluded = ["as", "margin", "isUnstyled", "elementRef", "styles"];
40
-
41
27
  var _dec, _dec2, _class, _class2;
42
-
43
28
  /**
44
29
  ---
45
30
  category: components
@@ -50,29 +35,22 @@ let List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
50
35
  constructor() {
51
36
  super(...arguments);
52
37
  this.ref = null;
53
-
54
38
  this.handleRef = el => {
55
39
  const elementRef = this.props.elementRef;
56
40
  this.ref = el;
57
-
58
41
  if (typeof elementRef === 'function') {
59
42
  elementRef(el);
60
43
  }
61
44
  };
62
45
  }
63
-
64
46
  componentDidMount() {
65
47
  var _this$props$makeStyle, _this$props;
66
-
67
48
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
68
49
  }
69
-
70
50
  componentDidUpdate() {
71
51
  var _this$props$makeStyle2, _this$props2;
72
-
73
52
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
74
53
  }
75
-
76
54
  renderChildren() {
77
55
  return _react.Children.map(this.props.children, child => {
78
56
  if (!child) return; // ignore null, falsy children
@@ -85,15 +63,14 @@ let List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
85
63
  });
86
64
  });
87
65
  }
88
-
89
66
  render() {
90
67
  const _this$props3 = this.props,
91
- as = _this$props3.as,
92
- margin = _this$props3.margin,
93
- isUnstyled = _this$props3.isUnstyled,
94
- elementRef = _this$props3.elementRef,
95
- styles = _this$props3.styles,
96
- rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
68
+ as = _this$props3.as,
69
+ margin = _this$props3.margin,
70
+ isUnstyled = _this$props3.isUnstyled,
71
+ elementRef = _this$props3.elementRef,
72
+ styles = _this$props3.styles,
73
+ rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
97
74
  return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
98
75
  css: styles === null || styles === void 0 ? void 0 : styles.list,
99
76
  as: as,
@@ -102,7 +79,6 @@ let List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
102
79
  display: "block"
103
80
  }), this.renderChildren());
104
81
  }
105
-
106
82
  }, _class2.displayName = "List", _class2.componentId = 'List', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
107
83
  as: 'ul',
108
84
  delimiter: 'none',
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "ListLocator", {
10
10
  }
11
11
  });
12
12
  exports.default = void 0;
13
-
14
13
  var _ListLocator = require("./ListLocator");
15
-
16
14
  /*
17
15
  * The MIT License (MIT)
18
16
  *
package/lib/List/props.js CHANGED
@@ -1,20 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.propTypes = exports.allowedProps = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _Children = require("@instructure/ui-prop-types/lib/Children.js");
13
-
14
10
  var _emotion = require("@instructure/emotion");
15
-
16
11
  var _ListItem = require("./ListItem");
17
-
18
12
  /*
19
13
  * The MIT License (MIT)
20
14
  *
@@ -38,6 +32,7 @@ var _ListItem = require("./ListItem");
38
32
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
33
  * SOFTWARE.
40
34
  */
35
+
41
36
  const propTypes = {
42
37
  children: _Children.Children.oneOf([_ListItem.ListItem]),
43
38
  as: _propTypes.default.oneOf(['ul', 'ol']),
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -41,7 +40,7 @@ exports.default = void 0;
41
40
  */
42
41
  const generateStyle = (componentTheme, props) => {
43
42
  const isUnstyled = props.isUnstyled,
44
- as = props.as;
43
+ as = props.as;
45
44
  const ordered = as === 'ol';
46
45
  return {
47
46
  list: {
@@ -68,6 +67,5 @@ const generateStyle = (componentTheme, props) => {
68
67
  }
69
68
  };
70
69
  };
71
-
72
70
  var _default = generateStyle;
73
71
  exports.default = _default;
package/lib/List/theme.js CHANGED
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -36,15 +35,15 @@ exports.default = void 0;
36
35
  */
37
36
  const generateComponentTheme = theme => {
38
37
  const spacing = theme.spacing,
39
- typography = theme.typography;
38
+ typography = theme.typography;
40
39
  const componentVariables = {
41
40
  listPadding: spacing === null || spacing === void 0 ? void 0 : spacing.large,
42
41
  orderedNumberFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
43
42
  orderedNumberMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
44
43
  };
45
- return { ...componentVariables
44
+ return {
45
+ ...componentVariables
46
46
  };
47
47
  };
48
-
49
48
  var _default = generateComponentTheme;
50
49
  exports.default = _default;
package/lib/index.js CHANGED
@@ -21,7 +21,5 @@ Object.defineProperty(exports, "ListItem", {
21
21
  return _List.ListItem;
22
22
  }
23
23
  });
24
-
25
24
  var _InlineList = require("./InlineList");
26
-
27
25
  var _List = require("./List");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-list",
3
- "version": "8.33.1",
3
+ "version": "8.33.2",
4
4
  "description": "Components for displaying vertical or horizontal lists.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,21 +24,21 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.33.1",
28
- "@instructure/emotion": "8.33.1",
29
- "@instructure/shared-types": "8.33.1",
30
- "@instructure/ui-prop-types": "8.33.1",
31
- "@instructure/ui-react-utils": "8.33.1",
32
- "@instructure/ui-testable": "8.33.1",
33
- "@instructure/ui-view": "8.33.1",
27
+ "@instructure/console": "8.33.2",
28
+ "@instructure/emotion": "8.33.2",
29
+ "@instructure/shared-types": "8.33.2",
30
+ "@instructure/ui-prop-types": "8.33.2",
31
+ "@instructure/ui-react-utils": "8.33.2",
32
+ "@instructure/ui-testable": "8.33.2",
33
+ "@instructure/ui-view": "8.33.2",
34
34
  "prop-types": "^15"
35
35
  },
36
36
  "devDependencies": {
37
- "@instructure/ui-babel-preset": "8.33.1",
38
- "@instructure/ui-color-utils": "8.33.1",
39
- "@instructure/ui-test-locator": "8.33.1",
40
- "@instructure/ui-test-utils": "8.33.1",
41
- "@instructure/ui-themes": "8.33.1"
37
+ "@instructure/ui-babel-preset": "8.33.2",
38
+ "@instructure/ui-color-utils": "8.33.2",
39
+ "@instructure/ui-test-locator": "8.33.2",
40
+ "@instructure/ui-test-utils": "8.33.2",
41
+ "@instructure/ui-themes": "8.33.2"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.8 <=18"