@instructure/ui-list 8.56.2-pr-snapshot-1721749364069 → 8.56.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.
- package/CHANGELOG.md +1 -1
- package/lib/InlineList/InlineListItem/InlineListItemLocator.js +2 -2
- package/lib/InlineList/InlineListItem/index.js +5 -5
- package/lib/InlineList/InlineListLocator.js +2 -2
- package/lib/InlineList/index.js +7 -6
- package/lib/InlineList/props.js +2 -2
- package/lib/List/ListItem/index.js +5 -5
- package/lib/List/ListLocator.js +3 -3
- package/lib/List/index.js +7 -6
- package/lib/List/props.js +2 -2
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.56.2
|
|
6
|
+
## [8.56.2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2) (2024-08-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-list
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InlineListItemLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _InlineListLocator = require("../InlineListLocator");
|
|
9
9
|
var _index = require("./index");
|
|
10
10
|
/*
|
|
@@ -32,7 +32,7 @@ var _index = require("./index");
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
35
|
-
const InlineListItemLocator = exports.InlineListItemLocator = (0,
|
|
35
|
+
const InlineListItemLocator = exports.InlineListItemLocator = (0, _locator.locator)(_index.InlineListItem.selector, {
|
|
36
36
|
findNestedOptions: (...args) => {
|
|
37
37
|
return _InlineListLocator.InlineListLocator.find(...args);
|
|
38
38
|
}
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.InlineListItem = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
12
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
13
|
var _emotion = require("@instructure/emotion");
|
|
14
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
15
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -46,7 +46,7 @@ parent: InlineList
|
|
|
46
46
|
id: InlineList.Item
|
|
47
47
|
---
|
|
48
48
|
**/
|
|
49
|
-
let InlineListItem = exports.InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
49
|
+
let InlineListItem = exports.InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class InlineListItem extends _react.Component {
|
|
50
50
|
constructor(...args) {
|
|
51
51
|
super(...args);
|
|
52
52
|
this.ref = null;
|
|
@@ -77,7 +77,7 @@ let InlineListItem = exports.InlineListItem = (_dec = (0, _emotion.withStyle)(_s
|
|
|
77
77
|
spacing = _this$props3.spacing,
|
|
78
78
|
styles = _this$props3.styles,
|
|
79
79
|
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
80
|
-
return (0, _emotion.jsx)(
|
|
80
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
81
81
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
82
82
|
as: "li",
|
|
83
83
|
margin: margin,
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InlineListLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _index = require("./index");
|
|
9
9
|
var _InlineListItemLocator = require("./InlineListItem/InlineListItemLocator");
|
|
10
10
|
/*
|
|
@@ -32,7 +32,7 @@ var _InlineListItemLocator = require("./InlineListItem/InlineListItemLocator");
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
35
|
-
const InlineListLocator = exports.InlineListLocator = (0,
|
|
35
|
+
const InlineListLocator = exports.InlineListLocator = (0, _locator.locator)(_index.InlineList.selector, {
|
|
36
36
|
findAllItems: (...args) => {
|
|
37
37
|
return _InlineListItemLocator.InlineListItemLocator.findAll(...args);
|
|
38
38
|
},
|
package/lib/InlineList/index.js
CHANGED
|
@@ -8,9 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = exports.InlineList = void 0;
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
12
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
14
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
14
15
|
var _InlineListItem = require("./InlineListItem");
|
|
15
16
|
var _props = require("./props");
|
|
16
17
|
const _excluded = ["as", "margin", "elementRef"];
|
|
@@ -44,7 +45,7 @@ category: components
|
|
|
44
45
|
---
|
|
45
46
|
|
|
46
47
|
**/
|
|
47
|
-
let InlineList = exports.InlineList = (_dec = (0,
|
|
48
|
+
let InlineList = exports.InlineList = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 = class InlineList extends _react.Component {
|
|
48
49
|
constructor(...args) {
|
|
49
50
|
super(...args);
|
|
50
51
|
this.ref = null;
|
|
@@ -60,7 +61,7 @@ let InlineList = exports.InlineList = (_dec = (0, _uiTestable.testable)(), _dec(
|
|
|
60
61
|
return _react.Children.map(this.props.children, child => {
|
|
61
62
|
if (!child) return; // ignore null, falsy children
|
|
62
63
|
|
|
63
|
-
return (0,
|
|
64
|
+
return (0, _safeCloneElement.safeCloneElement)(child, {
|
|
64
65
|
delimiter: this.props.delimiter,
|
|
65
66
|
size: this.props.size,
|
|
66
67
|
spacing: this.props.itemSpacing
|
|
@@ -73,7 +74,7 @@ let InlineList = exports.InlineList = (_dec = (0, _uiTestable.testable)(), _dec(
|
|
|
73
74
|
margin = _this$props.margin,
|
|
74
75
|
elementRef = _this$props.elementRef,
|
|
75
76
|
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
77
78
|
as: as,
|
|
78
79
|
margin: margin,
|
|
79
80
|
padding: "0",
|
package/lib/InlineList/props.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
var _InlineListItem = require("./InlineListItem");
|
|
12
12
|
/*
|
|
@@ -34,7 +34,7 @@ var _InlineListItem = require("./InlineListItem");
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
const propTypes = exports.propTypes = {
|
|
37
|
-
children:
|
|
37
|
+
children: _Children.Children.oneOf([_InlineListItem.InlineListItem]),
|
|
38
38
|
as: _propTypes.default.oneOf(['ul', 'ol']),
|
|
39
39
|
margin: _emotion.ThemeablePropTypes.spacing,
|
|
40
40
|
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
@@ -7,9 +7,9 @@ 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
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
12
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
13
|
var _emotion = require("@instructure/emotion");
|
|
14
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
15
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -46,7 +46,7 @@ parent: List
|
|
|
46
46
|
id: List.Item
|
|
47
47
|
---
|
|
48
48
|
**/
|
|
49
|
-
let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
49
|
+
let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class ListItem extends _react.Component {
|
|
50
50
|
constructor(...args) {
|
|
51
51
|
super(...args);
|
|
52
52
|
this.ref = null;
|
|
@@ -77,7 +77,7 @@ let ListItem = exports.ListItem = (_dec = (0, _emotion.withStyle)(_styles.defaul
|
|
|
77
77
|
children = _this$props3.children,
|
|
78
78
|
styles = _this$props3.styles,
|
|
79
79
|
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
80
|
-
return (0, _emotion.jsx)(
|
|
80
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
81
81
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
82
82
|
as: "li",
|
|
83
83
|
margin: margin,
|
package/lib/List/ListLocator.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ListLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
8
8
|
var _index = require("./index");
|
|
9
9
|
/*
|
|
10
10
|
* The MIT License (MIT)
|
|
@@ -31,10 +31,10 @@ var _index = require("./index");
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
34
|
-
const ListItemLocator = (0,
|
|
34
|
+
const ListItemLocator = (0, _locator.locator)(_index.List.Item.selector);
|
|
35
35
|
|
|
36
36
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
37
|
-
const ListLocator = exports.ListLocator = (0,
|
|
37
|
+
const ListLocator = exports.ListLocator = (0, _locator.locator)(_index.List.selector, {
|
|
38
38
|
findAllItems: (...args) => {
|
|
39
39
|
return ListItemLocator.findAll(...args);
|
|
40
40
|
},
|
package/lib/List/index.js
CHANGED
|
@@ -14,9 +14,10 @@ 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
|
|
18
|
-
var
|
|
19
|
-
var
|
|
17
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
18
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
19
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
20
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
20
21
|
var _ListItem = require("./ListItem");
|
|
21
22
|
var _emotion = require("@instructure/emotion");
|
|
22
23
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -53,7 +54,7 @@ var _dec, _dec2, _class, _class2;
|
|
|
53
54
|
category: components
|
|
54
55
|
---
|
|
55
56
|
**/
|
|
56
|
-
let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
57
|
+
let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class List extends _react.Component {
|
|
57
58
|
constructor(...args) {
|
|
58
59
|
super(...args);
|
|
59
60
|
this.ref = null;
|
|
@@ -77,7 +78,7 @@ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
77
78
|
return _react.Children.map(this.props.children, child => {
|
|
78
79
|
if (!child) return; // ignore null, falsy children
|
|
79
80
|
|
|
80
|
-
return (0,
|
|
81
|
+
return (0, _safeCloneElement.safeCloneElement)(child, {
|
|
81
82
|
isUnstyled: this.props.isUnstyled,
|
|
82
83
|
delimiter: this.props.delimiter,
|
|
83
84
|
size: this.props.size,
|
|
@@ -93,7 +94,7 @@ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
93
94
|
elementRef = _this$props3.elementRef,
|
|
94
95
|
styles = _this$props3.styles,
|
|
95
96
|
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
96
|
-
return (0, _emotion.jsx)(
|
|
97
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
97
98
|
css: styles === null || styles === void 0 ? void 0 : styles.list,
|
|
98
99
|
as: as,
|
|
99
100
|
margin: margin,
|
package/lib/List/props.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
10
10
|
var _emotion = require("@instructure/emotion");
|
|
11
11
|
var _ListItem = require("./ListItem");
|
|
12
12
|
/*
|
|
@@ -34,7 +34,7 @@ var _ListItem = require("./ListItem");
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
const propTypes = exports.propTypes = {
|
|
37
|
-
children:
|
|
37
|
+
children: _Children.Children.oneOf([_ListItem.ListItem]),
|
|
38
38
|
as: _propTypes.default.oneOf(['ul', 'ol']),
|
|
39
39
|
delimiter: _propTypes.default.oneOf(['none', 'dashed', 'solid']),
|
|
40
40
|
isUnstyled: _propTypes.default.bool,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-list",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.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.23.2",
|
|
27
|
-
"@instructure/console": "8.56.2
|
|
28
|
-
"@instructure/emotion": "8.56.2
|
|
29
|
-
"@instructure/shared-types": "8.56.2
|
|
30
|
-
"@instructure/ui-prop-types": "8.56.2
|
|
31
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
32
|
-
"@instructure/ui-testable": "8.56.2
|
|
33
|
-
"@instructure/ui-view": "8.56.2
|
|
27
|
+
"@instructure/console": "8.56.2",
|
|
28
|
+
"@instructure/emotion": "8.56.2",
|
|
29
|
+
"@instructure/shared-types": "8.56.2",
|
|
30
|
+
"@instructure/ui-prop-types": "8.56.2",
|
|
31
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
32
|
+
"@instructure/ui-testable": "8.56.2",
|
|
33
|
+
"@instructure/ui-view": "8.56.2",
|
|
34
34
|
"prop-types": "^15.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
38
|
-
"@instructure/ui-color-utils": "8.56.2
|
|
39
|
-
"@instructure/ui-test-locator": "8.56.2
|
|
40
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
41
|
-
"@instructure/ui-themes": "8.56.2
|
|
37
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
38
|
+
"@instructure/ui-color-utils": "8.56.2",
|
|
39
|
+
"@instructure/ui-test-locator": "8.56.2",
|
|
40
|
+
"@instructure/ui-test-utils": "8.56.2",
|
|
41
|
+
"@instructure/ui-themes": "8.56.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8 <=18"
|