@instructure/ui-list 11.6.0 → 11.6.1-snapshot-129

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 (159) hide show
  1. package/CHANGELOG.md +38 -288
  2. package/es/InlineList/{InlineListItem → v1/InlineListItem}/index.js +2 -2
  3. package/es/InlineList/{index.js → v1/index.js} +1 -1
  4. package/es/InlineList/v2/InlineListItem/index.js +97 -0
  5. package/es/InlineList/v2/InlineListItem/styles.js +143 -0
  6. package/es/InlineList/v2/index.js +93 -0
  7. package/es/{index.js → InlineList/v2/props.js} +3 -3
  8. package/es/List/{ListItem → v1/ListItem}/index.js +2 -2
  9. package/es/List/v1/ListItem/props.js +28 -0
  10. package/es/List/{index.js → v1/index.js} +2 -2
  11. package/es/List/v2/ListItem/index.js +91 -0
  12. package/es/List/v2/ListItem/props.js +28 -0
  13. package/es/List/v2/ListItem/styles.js +131 -0
  14. package/es/List/v2/index.js +100 -0
  15. package/es/List/v2/props.js +26 -0
  16. package/es/List/v2/styles.js +66 -0
  17. package/es/exports/a.js +26 -0
  18. package/es/exports/b.js +26 -0
  19. package/lib/InlineList/{InlineListItem → v1/InlineListItem}/index.js +3 -3
  20. package/lib/InlineList/{index.js → v1/index.js} +2 -2
  21. package/lib/InlineList/v2/InlineListItem/index.js +102 -0
  22. package/lib/InlineList/v2/InlineListItem/styles.js +149 -0
  23. package/lib/InlineList/v2/index.js +101 -0
  24. package/lib/InlineList/v2/props.js +31 -0
  25. package/lib/List/{ListItem → v1/ListItem}/index.js +3 -3
  26. package/lib/List/v1/ListItem/props.js +33 -0
  27. package/lib/List/v1/index.js +114 -0
  28. package/lib/List/v2/ListItem/index.js +96 -0
  29. package/lib/List/v2/ListItem/props.js +33 -0
  30. package/lib/List/v2/ListItem/styles.js +137 -0
  31. package/lib/List/{index.js → v2/index.js} +4 -5
  32. package/lib/List/v2/props.js +31 -0
  33. package/lib/List/v2/styles.js +72 -0
  34. package/lib/{index.js → exports/a.js} +6 -6
  35. package/lib/exports/b.js +32 -0
  36. package/package.json +39 -17
  37. package/src/InlineList/{InlineListItem → v1/InlineListItem}/index.tsx +2 -2
  38. package/src/InlineList/{index.tsx → v1/index.tsx} +1 -1
  39. package/src/InlineList/v2/InlineListItem/index.tsx +110 -0
  40. package/src/InlineList/v2/InlineListItem/props.ts +99 -0
  41. package/src/InlineList/v2/InlineListItem/styles.ts +142 -0
  42. package/src/InlineList/v2/README.md +146 -0
  43. package/src/InlineList/v2/index.tsx +102 -0
  44. package/src/InlineList/v2/props.ts +80 -0
  45. package/src/List/{ListItem → v1/ListItem}/index.tsx +2 -2
  46. package/src/List/{index.tsx → v1/index.tsx} +2 -2
  47. package/src/List/v2/ListItem/index.tsx +104 -0
  48. package/src/List/v2/ListItem/props.ts +94 -0
  49. package/src/List/v2/ListItem/styles.ts +136 -0
  50. package/src/List/v2/README.md +142 -0
  51. package/src/List/v2/index.tsx +109 -0
  52. package/src/List/v2/props.ts +95 -0
  53. package/src/List/v2/styles.ts +77 -0
  54. package/src/exports/a.ts +32 -0
  55. package/src/exports/b.ts +32 -0
  56. package/tsconfig.build.tsbuildinfo +1 -1
  57. package/types/InlineList/v1/InlineListItem/index.d.ts.map +1 -0
  58. package/types/InlineList/v1/InlineListItem/props.d.ts.map +1 -0
  59. package/types/InlineList/v1/InlineListItem/styles.d.ts.map +1 -0
  60. package/types/InlineList/v1/InlineListItem/theme.d.ts.map +1 -0
  61. package/types/InlineList/v1/index.d.ts.map +1 -0
  62. package/types/InlineList/v1/props.d.ts.map +1 -0
  63. package/types/InlineList/v2/InlineListItem/index.d.ts +27 -0
  64. package/types/InlineList/v2/InlineListItem/index.d.ts.map +1 -0
  65. package/types/InlineList/v2/InlineListItem/props.d.ts +42 -0
  66. package/types/InlineList/v2/InlineListItem/props.d.ts.map +1 -0
  67. package/types/InlineList/v2/InlineListItem/styles.d.ts +14 -0
  68. package/types/InlineList/v2/InlineListItem/styles.d.ts.map +1 -0
  69. package/types/InlineList/v2/index.d.ts +35 -0
  70. package/types/InlineList/v2/index.d.ts.map +1 -0
  71. package/types/InlineList/v2/props.d.ts +33 -0
  72. package/types/InlineList/v2/props.d.ts.map +1 -0
  73. package/types/List/v1/ListItem/index.d.ts.map +1 -0
  74. package/types/List/v1/ListItem/props.d.ts.map +1 -0
  75. package/types/List/v1/ListItem/styles.d.ts.map +1 -0
  76. package/types/List/v1/ListItem/theme.d.ts.map +1 -0
  77. package/types/List/v1/index.d.ts.map +1 -0
  78. package/types/List/v1/props.d.ts.map +1 -0
  79. package/types/List/v1/styles.d.ts.map +1 -0
  80. package/types/List/v1/theme.d.ts.map +1 -0
  81. package/types/List/v2/ListItem/index.d.ts +26 -0
  82. package/types/List/v2/ListItem/index.d.ts.map +1 -0
  83. package/types/List/v2/ListItem/props.d.ts +38 -0
  84. package/types/List/v2/ListItem/props.d.ts.map +1 -0
  85. package/types/List/v2/ListItem/styles.d.ts +14 -0
  86. package/types/List/v2/ListItem/styles.d.ts.map +1 -0
  87. package/types/List/v2/index.d.ts +38 -0
  88. package/types/List/v2/index.d.ts.map +1 -0
  89. package/types/List/v2/props.d.ts +41 -0
  90. package/types/List/v2/props.d.ts.map +1 -0
  91. package/types/List/v2/styles.d.ts +15 -0
  92. package/types/List/v2/styles.d.ts.map +1 -0
  93. package/types/exports/a.d.ts +8 -0
  94. package/types/exports/a.d.ts.map +1 -0
  95. package/types/exports/b.d.ts +8 -0
  96. package/types/exports/b.d.ts.map +1 -0
  97. package/src/index.ts +0 -32
  98. package/types/InlineList/InlineListItem/index.d.ts.map +0 -1
  99. package/types/InlineList/InlineListItem/props.d.ts.map +0 -1
  100. package/types/InlineList/InlineListItem/styles.d.ts.map +0 -1
  101. package/types/InlineList/InlineListItem/theme.d.ts.map +0 -1
  102. package/types/InlineList/index.d.ts.map +0 -1
  103. package/types/InlineList/props.d.ts.map +0 -1
  104. package/types/List/ListItem/index.d.ts.map +0 -1
  105. package/types/List/ListItem/props.d.ts.map +0 -1
  106. package/types/List/ListItem/styles.d.ts.map +0 -1
  107. package/types/List/ListItem/theme.d.ts.map +0 -1
  108. package/types/List/index.d.ts.map +0 -1
  109. package/types/List/props.d.ts.map +0 -1
  110. package/types/List/styles.d.ts.map +0 -1
  111. package/types/List/theme.d.ts.map +0 -1
  112. package/types/index.d.ts +0 -8
  113. package/types/index.d.ts.map +0 -1
  114. /package/es/InlineList/{InlineListItem → v1/InlineListItem}/props.js +0 -0
  115. /package/es/InlineList/{InlineListItem → v1/InlineListItem}/styles.js +0 -0
  116. /package/es/InlineList/{InlineListItem → v1/InlineListItem}/theme.js +0 -0
  117. /package/es/InlineList/{props.js → v1/props.js} +0 -0
  118. /package/es/{List/ListItem → InlineList/v2/InlineListItem}/props.js +0 -0
  119. /package/es/List/{ListItem → v1/ListItem}/styles.js +0 -0
  120. /package/es/List/{ListItem → v1/ListItem}/theme.js +0 -0
  121. /package/es/List/{props.js → v1/props.js} +0 -0
  122. /package/es/List/{styles.js → v1/styles.js} +0 -0
  123. /package/es/List/{theme.js → v1/theme.js} +0 -0
  124. /package/lib/InlineList/{InlineListItem → v1/InlineListItem}/props.js +0 -0
  125. /package/lib/InlineList/{InlineListItem → v1/InlineListItem}/styles.js +0 -0
  126. /package/lib/InlineList/{InlineListItem → v1/InlineListItem}/theme.js +0 -0
  127. /package/lib/InlineList/{props.js → v1/props.js} +0 -0
  128. /package/lib/{List/ListItem → InlineList/v2/InlineListItem}/props.js +0 -0
  129. /package/lib/List/{ListItem → v1/ListItem}/styles.js +0 -0
  130. /package/lib/List/{ListItem → v1/ListItem}/theme.js +0 -0
  131. /package/lib/List/{props.js → v1/props.js} +0 -0
  132. /package/lib/List/{styles.js → v1/styles.js} +0 -0
  133. /package/lib/List/{theme.js → v1/theme.js} +0 -0
  134. /package/src/InlineList/{InlineListItem → v1/InlineListItem}/props.ts +0 -0
  135. /package/src/InlineList/{InlineListItem → v1/InlineListItem}/styles.ts +0 -0
  136. /package/src/InlineList/{InlineListItem → v1/InlineListItem}/theme.ts +0 -0
  137. /package/src/InlineList/{README.md → v1/README.md} +0 -0
  138. /package/src/InlineList/{props.ts → v1/props.ts} +0 -0
  139. /package/src/List/{ListItem → v1/ListItem}/props.ts +0 -0
  140. /package/src/List/{ListItem → v1/ListItem}/styles.ts +0 -0
  141. /package/src/List/{ListItem → v1/ListItem}/theme.ts +0 -0
  142. /package/src/List/{README.md → v1/README.md} +0 -0
  143. /package/src/List/{props.ts → v1/props.ts} +0 -0
  144. /package/src/List/{styles.ts → v1/styles.ts} +0 -0
  145. /package/src/List/{theme.ts → v1/theme.ts} +0 -0
  146. /package/types/InlineList/{InlineListItem → v1/InlineListItem}/index.d.ts +0 -0
  147. /package/types/InlineList/{InlineListItem → v1/InlineListItem}/props.d.ts +0 -0
  148. /package/types/InlineList/{InlineListItem → v1/InlineListItem}/styles.d.ts +0 -0
  149. /package/types/InlineList/{InlineListItem → v1/InlineListItem}/theme.d.ts +0 -0
  150. /package/types/InlineList/{index.d.ts → v1/index.d.ts} +0 -0
  151. /package/types/InlineList/{props.d.ts → v1/props.d.ts} +0 -0
  152. /package/types/List/{ListItem → v1/ListItem}/index.d.ts +0 -0
  153. /package/types/List/{ListItem → v1/ListItem}/props.d.ts +0 -0
  154. /package/types/List/{ListItem → v1/ListItem}/styles.d.ts +0 -0
  155. /package/types/List/{ListItem → v1/ListItem}/theme.d.ts +0 -0
  156. /package/types/List/{index.d.ts → v1/index.d.ts} +0 -0
  157. /package/types/List/{props.d.ts → v1/props.d.ts} +0 -0
  158. /package/types/List/{styles.d.ts → v1/styles.d.ts} +0 -0
  159. /package/types/List/{theme.d.ts → v1/theme.d.ts} +0 -0
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.ListItem = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _react = require("react");
10
- var _View = require("@instructure/ui-view/lib/View");
10
+ var _v11_ = require("@instructure/ui-view/v11_6");
11
11
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
12
12
  var _emotion = require("@instructure/emotion");
13
13
  var _styles = _interopRequireDefault(require("./styles"));
@@ -45,7 +45,7 @@ parent: List
45
45
  id: List.Item
46
46
  ---
47
47
  **/
48
- let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_ListItem = class ListItem extends _react.Component {
48
+ let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_ListItem = class ListItem extends _react.Component {
49
49
  constructor(...args) {
50
50
  super(...args);
51
51
  this.ref = null;
@@ -76,7 +76,7 @@ let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.defaul
76
76
  children = _this$props3.children,
77
77
  styles = _this$props3.styles,
78
78
  rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
79
- return (0, _jsxRuntime.jsx)(_View.View, {
79
+ return (0, _jsxRuntime.jsx)(_v11_.View, {
80
80
  ...(0, _passthroughProps.passthroughProps)(rest),
81
81
  css: styles === null || styles === void 0 ? void 0 : styles.listItem,
82
82
  as: "li",
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.allowedProps = void 0;
7
+ /*
8
+ * The MIT License (MIT)
9
+ *
10
+ * Copyright (c) 2015 - present Instructure, Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+
31
+ // <unknown> is needed for React 17 compatibility
32
+
33
+ const allowedProps = exports.allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.List = void 0;
8
+ Object.defineProperty(exports, "ListItem", {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _ListItem.ListItem;
12
+ }
13
+ });
14
+ exports.default = void 0;
15
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
+ var _react = require("react");
17
+ var _v11_ = require("@instructure/ui-view/v11_6");
18
+ var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
19
+ var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
20
+ var _ListItem = require("./ListItem");
21
+ var _emotion = require("@instructure/emotion");
22
+ var _styles = _interopRequireDefault(require("./styles"));
23
+ var _theme = _interopRequireDefault(require("./theme"));
24
+ var _props = require("./props");
25
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
26
+ const _excluded = ["as", "margin", "isUnstyled", "elementRef", "styles"];
27
+ var _dec, _class, _List;
28
+ /*
29
+ * The MIT License (MIT)
30
+ *
31
+ * Copyright (c) 2015 - present Instructure, Inc.
32
+ *
33
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
34
+ * of this software and associated documentation files (the "Software"), to deal
35
+ * in the Software without restriction, including without limitation the rights
36
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37
+ * copies of the Software, and to permit persons to whom the Software is
38
+ * furnished to do so, subject to the following conditions:
39
+ *
40
+ * The above copyright notice and this permission notice shall be included in all
41
+ * copies or substantial portions of the Software.
42
+ *
43
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49
+ * SOFTWARE.
50
+ */
51
+ /**
52
+ ---
53
+ category: components
54
+ ---
55
+ **/
56
+ let List = exports.List = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_List = class List extends _react.Component {
57
+ constructor(...args) {
58
+ super(...args);
59
+ this.ref = null;
60
+ this.handleRef = el => {
61
+ const elementRef = this.props.elementRef;
62
+ this.ref = el;
63
+ if (typeof elementRef === 'function') {
64
+ elementRef(el);
65
+ }
66
+ };
67
+ }
68
+ componentDidMount() {
69
+ var _this$props$makeStyle, _this$props;
70
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
71
+ }
72
+ componentDidUpdate() {
73
+ var _this$props$makeStyle2, _this$props2;
74
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
75
+ }
76
+ renderChildren() {
77
+ return _react.Children.map(this.props.children, child => {
78
+ if (!child) return; // ignore null, falsy children
79
+
80
+ return (0, _safeCloneElement.safeCloneElement)(child, {
81
+ isUnstyled: this.props.isUnstyled,
82
+ delimiter: this.props.delimiter,
83
+ size: this.props.size,
84
+ spacing: this.props.itemSpacing
85
+ });
86
+ });
87
+ }
88
+ render() {
89
+ const _this$props3 = this.props,
90
+ as = _this$props3.as,
91
+ margin = _this$props3.margin,
92
+ isUnstyled = _this$props3.isUnstyled,
93
+ elementRef = _this$props3.elementRef,
94
+ styles = _this$props3.styles,
95
+ rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
96
+ return (0, _jsxRuntime.jsx)(_v11_.View, {
97
+ ...(0, _passthroughProps.passthroughProps)(rest),
98
+ css: styles === null || styles === void 0 ? void 0 : styles.list,
99
+ as: as,
100
+ margin: margin,
101
+ elementRef: this.handleRef,
102
+ display: "block",
103
+ "data-cid": "List",
104
+ children: this.renderChildren()
105
+ });
106
+ }
107
+ }, _List.displayName = "List", _List.componentId = 'List', _List.allowedProps = _props.allowedProps, _List.defaultProps = {
108
+ as: 'ul',
109
+ delimiter: 'none',
110
+ isUnstyled: false,
111
+ size: 'medium',
112
+ itemSpacing: 'none'
113
+ }, _List.Item = _ListItem.ListItem, _List)) || _class);
114
+ var _default = exports.default = List;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.ListItem = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _react = require("react");
10
+ var _latest = require("@instructure/ui-view/latest");
11
+ var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
12
+ var _emotion = require("@instructure/emotion");
13
+ var _styles = _interopRequireDefault(require("./styles"));
14
+ var _props = require("./props");
15
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
16
+ const _excluded = ["delimiter", "spacing", "size", "margin", "padding", "elementRef", "children", "styles"];
17
+ var _dec, _class, _ListItem;
18
+ /*
19
+ * The MIT License (MIT)
20
+ *
21
+ * Copyright (c) 2015 - present Instructure, Inc.
22
+ *
23
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ * of this software and associated documentation files (the "Software"), to deal
25
+ * in the Software without restriction, including without limitation the rights
26
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ * copies of the Software, and to permit persons to whom the Software is
28
+ * furnished to do so, subject to the following conditions:
29
+ *
30
+ * The above copyright notice and this permission notice shall be included in all
31
+ * copies or substantial portions of the Software.
32
+ *
33
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ * SOFTWARE.
40
+ */
41
+ /**
42
+ ---
43
+ parent: List
44
+ id: List.Item
45
+ ---
46
+ **/
47
+ let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.default), _dec(_class = (_ListItem = class ListItem extends _react.Component {
48
+ constructor(...args) {
49
+ super(...args);
50
+ this.ref = null;
51
+ this.handleRef = el => {
52
+ const elementRef = this.props.elementRef;
53
+ this.ref = el;
54
+ if (typeof elementRef === 'function') {
55
+ elementRef(el);
56
+ }
57
+ };
58
+ }
59
+ componentDidMount() {
60
+ var _this$props$makeStyle, _this$props;
61
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
62
+ }
63
+ componentDidUpdate() {
64
+ var _this$props$makeStyle2, _this$props2;
65
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
66
+ }
67
+ render() {
68
+ const _this$props3 = this.props,
69
+ delimiter = _this$props3.delimiter,
70
+ spacing = _this$props3.spacing,
71
+ size = _this$props3.size,
72
+ margin = _this$props3.margin,
73
+ padding = _this$props3.padding,
74
+ elementRef = _this$props3.elementRef,
75
+ children = _this$props3.children,
76
+ styles = _this$props3.styles,
77
+ rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
78
+ return (0, _jsxRuntime.jsx)(_latest.View, {
79
+ ...(0, _passthroughProps.passthroughProps)(rest),
80
+ css: styles === null || styles === void 0 ? void 0 : styles.listItem,
81
+ as: "li",
82
+ margin: margin,
83
+ padding: padding,
84
+ maxWidth: "100%",
85
+ elementRef: this.handleRef,
86
+ "data-cid": "ListItem",
87
+ children: children
88
+ });
89
+ }
90
+ }, _ListItem.displayName = "ListItem", _ListItem.componentId = 'List.Item', _ListItem.allowedProps = _props.allowedProps, _ListItem.defaultProps = {
91
+ padding: 'none',
92
+ spacing: 'none',
93
+ delimiter: 'none',
94
+ size: 'medium'
95
+ }, _ListItem)) || _class);
96
+ var _default = exports.default = ListItem;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.allowedProps = void 0;
7
+ /*
8
+ * The MIT License (MIT)
9
+ *
10
+ * Copyright (c) 2015 - present Instructure, Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+
31
+ // <unknown> is needed for React 17 compatibility
32
+
33
+ const allowedProps = exports.allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _console = require("@instructure/console");
8
+ /*
9
+ * The MIT License (MIT)
10
+ *
11
+ * Copyright (c) 2015 - present Instructure, Inc.
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ * copies of the Software, and to permit persons to whom the Software is
18
+ * furnished to do so, subject to the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be included in all
21
+ * copies or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ * SOFTWARE.
30
+ */
31
+
32
+ /**
33
+ * ---
34
+ * private: true
35
+ * ---
36
+ * Generates the style object from the theme and provided additional information
37
+ * @param {Object} componentTheme The theme variable object.
38
+ * @param {Object} props the props of the component, the style is applied to
39
+ * @return {Object} The final style object, which will be used in the component
40
+ */
41
+ const generateStyle = (componentTheme, props) => {
42
+ const size = props.size,
43
+ delimiter = props.delimiter,
44
+ spacing = props.spacing;
45
+ const withDelimiter = delimiter !== 'none';
46
+ const withSpacing = spacing !== 'none';
47
+ (0, _console.logError)(!(withDelimiter && withSpacing), `[List] \`itemSpacing\` has no effect inside Lists with the \`delimiter\` prop set to anything other than \`none\`.`);
48
+ const sizeVariants = {
49
+ small: {
50
+ fontSize: componentTheme.fontSizeSmall
51
+ },
52
+ medium: {
53
+ fontSize: componentTheme.fontSizeMedium
54
+ },
55
+ large: {
56
+ fontSize: componentTheme.fontSizeLarge
57
+ }
58
+ };
59
+ const spacingVariants = {
60
+ 'xxx-small': {
61
+ marginTop: componentTheme.spacingXXXSmall,
62
+ marginBottom: componentTheme.spacingXXXSmall
63
+ },
64
+ 'xx-small': {
65
+ marginTop: componentTheme.spacingXXSmall,
66
+ marginBottom: componentTheme.spacingXXSmall
67
+ },
68
+ 'x-small': {
69
+ marginTop: componentTheme.spacingXSmall,
70
+ marginBottom: componentTheme.spacingXSmall
71
+ },
72
+ small: {
73
+ marginTop: componentTheme.spacingSmall,
74
+ marginBottom: componentTheme.spacingSmall
75
+ },
76
+ medium: {
77
+ marginTop: componentTheme.spacingMedium,
78
+ marginBottom: componentTheme.spacingMedium
79
+ },
80
+ large: {
81
+ marginTop: componentTheme.spacingLarge,
82
+ marginBottom: componentTheme.spacingLarge
83
+ },
84
+ 'x-large': {
85
+ marginTop: componentTheme.spacingXLarge,
86
+ marginBottom: componentTheme.spacingXLarge
87
+ },
88
+ 'xx-large': {
89
+ marginTop: componentTheme.spacingXXLarge,
90
+ marginBottom: componentTheme.spacingXXLarge
91
+ },
92
+ none: {}
93
+ };
94
+ const delimiterVariants = {
95
+ dashed: {
96
+ listStylePosition: 'inside',
97
+ '&:not(:first-of-type)': {
98
+ borderTop: `
99
+ ${componentTheme.delimiterDashedBorder.width}
100
+ ${componentTheme.delimiterDashedBorder.style}
101
+ ${componentTheme.delimiterDashedBorder.color}
102
+ `
103
+ }
104
+ },
105
+ solid: {
106
+ listStylePosition: 'inside',
107
+ '&:not(:first-of-type)': {
108
+ borderTop: `
109
+ ${componentTheme.delimiterSolidBorder.width}
110
+ ${componentTheme.delimiterSolidBorder.style}
111
+ ${componentTheme.delimiterSolidBorder.color}
112
+ `
113
+ }
114
+ },
115
+ none: {}
116
+ };
117
+ return {
118
+ listItem: {
119
+ label: 'listItem',
120
+ fontWeight: componentTheme.fontWeight,
121
+ fontFamily: componentTheme.fontFamily,
122
+ lineHeight: componentTheme.lineHeight,
123
+ color: componentTheme.color,
124
+ padding: 0,
125
+ ...sizeVariants[size],
126
+ ...(withSpacing && !withDelimiter && spacingVariants[spacing]),
127
+ ...(withDelimiter && delimiterVariants[delimiter]),
128
+ '&:first-of-type': {
129
+ marginTop: '0'
130
+ },
131
+ '&:last-of-type': {
132
+ marginBottom: '0'
133
+ }
134
+ }
135
+ };
136
+ };
137
+ var _default = exports.default = generateStyle;
@@ -14,13 +14,12 @@ Object.defineProperty(exports, "ListItem", {
14
14
  exports.default = void 0;
15
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
16
  var _react = require("react");
17
- var _View = require("@instructure/ui-view/lib/View");
17
+ var _latest = require("@instructure/ui-view/latest");
18
18
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
19
19
  var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
20
- var _ListItem = require("./ListItem");
21
20
  var _emotion = require("@instructure/emotion");
21
+ var _ListItem = require("./ListItem");
22
22
  var _styles = _interopRequireDefault(require("./styles"));
23
- var _theme = _interopRequireDefault(require("./theme"));
24
23
  var _props = require("./props");
25
24
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
26
25
  const _excluded = ["as", "margin", "isUnstyled", "elementRef", "styles"];
@@ -53,7 +52,7 @@ var _dec, _class, _List;
53
52
  category: components
54
53
  ---
55
54
  **/
56
- let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_List = class List extends _react.Component {
55
+ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default), _dec(_class = (_List = class List extends _react.Component {
57
56
  constructor(...args) {
58
57
  super(...args);
59
58
  this.ref = null;
@@ -93,7 +92,7 @@ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _them
93
92
  elementRef = _this$props3.elementRef,
94
93
  styles = _this$props3.styles,
95
94
  rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
96
- return (0, _jsxRuntime.jsx)(_View.View, {
95
+ return (0, _jsxRuntime.jsx)(_latest.View, {
97
96
  ...(0, _passthroughProps.passthroughProps)(rest),
98
97
  css: styles === null || styles === void 0 ? void 0 : styles.list,
99
98
  as: as,
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.allowedProps = void 0;
7
+ /*
8
+ * The MIT License (MIT)
9
+ *
10
+ * Copyright (c) 2015 - present Instructure, Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+
31
+ const allowedProps = exports.allowedProps = ['children', 'as', 'delimiter', 'isUnstyled', 'margin', 'size', 'itemSpacing', 'elementRef'];
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /*
8
+ * The MIT License (MIT)
9
+ *
10
+ * Copyright (c) 2015 - present Instructure, Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+
31
+ /**
32
+ * ---
33
+ * private: true
34
+ * ---
35
+ * Generates the style object from the theme and provided additional information
36
+ * @param {Object} componentTheme The theme variable object.
37
+ * @param {Object} props the props of the component, the style is applied to
38
+ * @param {Object} state the state of the component, the style is applied to
39
+ * @return {Object} The final style object, which will be used in the component
40
+ */
41
+ const generateStyle = (componentTheme, props) => {
42
+ const isUnstyled = props.isUnstyled,
43
+ as = props.as;
44
+ const ordered = as === 'ol';
45
+ return {
46
+ list: {
47
+ label: 'list',
48
+ paddingInlineStart: componentTheme.listPadding,
49
+ paddingInlineEnd: 0,
50
+ ...(ordered && {
51
+ listStyleType: 'none',
52
+ // 1.3 rem is removed to have the ordered list start at the same point
53
+ // as the unordered vertically
54
+ paddingInlineStart: `calc(${componentTheme.listPadding} - 1.3rem)`,
55
+ paddingInlineEnd: 0,
56
+ counterReset: 'ol-counter',
57
+ '&>li::before': {
58
+ fontWeight: componentTheme.orderedNumberFontWeight,
59
+ counterIncrement: 'ol-counter',
60
+ content: 'counters(ol-counter, ".") "."',
61
+ marginInlineEnd: componentTheme.orderedNumberMargin,
62
+ marginInlineStart: 0
63
+ }
64
+ }),
65
+ ...(isUnstyled && {
66
+ listStyleType: 'none',
67
+ paddingInlineStart: 0
68
+ })
69
+ }
70
+ };
71
+ };
72
+ var _default = exports.default = generateStyle;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "InlineList", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _InlineList.InlineList;
9
+ return _v.InlineList;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "InlineListItem", {
@@ -18,15 +18,15 @@ Object.defineProperty(exports, "InlineListItem", {
18
18
  Object.defineProperty(exports, "List", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _List.List;
21
+ return _v2.List;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "ListItem", {
25
25
  enumerable: true,
26
26
  get: function () {
27
- return _List.ListItem;
27
+ return _v2.ListItem;
28
28
  }
29
29
  });
30
- var _InlineList = require("./InlineList");
31
- var _List = require("./List");
32
- var _InlineListItem = require("./InlineList/InlineListItem");
30
+ var _v = require("../InlineList/v1");
31
+ var _v2 = require("../List/v1");
32
+ var _InlineListItem = require("../InlineList/v1/InlineListItem");
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "InlineList", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _v.InlineList;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "InlineListItem", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _InlineListItem.InlineListItem;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "List", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _v2.List;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "ListItem", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _v2.ListItem;
28
+ }
29
+ });
30
+ var _v = require("../InlineList/v2");
31
+ var _v2 = require("../List/v2");
32
+ var _InlineListItem = require("../InlineList/v2/InlineListItem");