@instructure/ui-list 10.13.0 → 10.13.1-pr-snapshot-1741357986437
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 +8 -0
- package/lib/InlineList/InlineListItem/index.js +5 -5
- package/lib/InlineList/__new-tests__/InlineList.test.js +2 -2
- package/lib/InlineList/index.js +6 -7
- package/lib/InlineList/props.js +2 -2
- package/lib/List/ListItem/index.js +5 -5
- package/lib/List/__new-tests__/List.test.js +2 -2
- package/lib/List/index.js +6 -7
- package/lib/List/props.js +2 -2
- package/package.json +13 -13
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
|
+
## [10.13.1-pr-snapshot-1741357986437](https://github.com/instructure/instructure-ui/compare/v10.13.0...v10.13.1-pr-snapshot-1741357986437) (2025-03-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-list
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [10.13.0](https://github.com/instructure/instructure-ui/compare/v10.12.0...v10.13.0) (2025-03-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-list
|
|
@@ -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 _uiView = require("@instructure/ui-view");
|
|
11
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
12
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
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, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_InlineListItem = 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)(_uiView.View, Object.assign({}, (0, _uiReactUtils.passthroughProps)(rest), {
|
|
81
81
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
82
82
|
as: "li",
|
|
83
83
|
margin: margin,
|
|
@@ -6,7 +6,7 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
var _react2 = require("@testing-library/react");
|
|
7
7
|
var _vitest = require("vitest");
|
|
8
8
|
var _index = require("../index");
|
|
9
|
-
var
|
|
9
|
+
var _uiAxeCheck = require("@instructure/ui-axe-check");
|
|
10
10
|
var _InlineList, _InlineList2, _InlineList3, _InlineList4, _InlineList5;
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -77,7 +77,7 @@ describe('<InlineList />', () => {
|
|
|
77
77
|
it('should meet a11y standards', async () => {
|
|
78
78
|
const _render2 = (0, _react2.render)(_InlineList5 || (_InlineList5 = /*#__PURE__*/_react.default.createElement(_index.InlineList, null, /*#__PURE__*/_react.default.createElement(_index.InlineList.Item, null, "List item 1"), /*#__PURE__*/_react.default.createElement(_index.InlineList.Item, null, "List item 2"), /*#__PURE__*/_react.default.createElement(_index.InlineList.Item, null, "List item 3"), /*#__PURE__*/_react.default.createElement(_index.InlineList.Item, null, "List item 4")))),
|
|
79
79
|
container = _render2.container;
|
|
80
|
-
const axeCheck = await (0,
|
|
80
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
81
81
|
expect(axeCheck).toBe(true);
|
|
82
82
|
});
|
|
83
83
|
});
|
package/lib/InlineList/index.js
CHANGED
|
@@ -8,10 +8,9 @@ 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
|
|
14
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
11
|
+
var _uiView = require("@instructure/ui-view");
|
|
12
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
13
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
15
14
|
var _InlineListItem = require("./InlineListItem");
|
|
16
15
|
var _props = require("./props");
|
|
17
16
|
const _excluded = ["as", "margin", "elementRef"];
|
|
@@ -45,7 +44,7 @@ category: components
|
|
|
45
44
|
---
|
|
46
45
|
|
|
47
46
|
**/
|
|
48
|
-
let InlineList = exports.InlineList = (_dec = (0,
|
|
47
|
+
let InlineList = exports.InlineList = (_dec = (0, _uiTestable.testable)(), _dec(_class = (_InlineList = class InlineList extends _react.Component {
|
|
49
48
|
constructor(...args) {
|
|
50
49
|
super(...args);
|
|
51
50
|
this.ref = null;
|
|
@@ -61,7 +60,7 @@ let InlineList = exports.InlineList = (_dec = (0, _testable.testable)(), _dec(_c
|
|
|
61
60
|
return _react.Children.map(this.props.children, child => {
|
|
62
61
|
if (!child) return; // ignore null, falsy children
|
|
63
62
|
|
|
64
|
-
return (0,
|
|
63
|
+
return (0, _uiReactUtils.safeCloneElement)(child, {
|
|
65
64
|
delimiter: this.props.delimiter,
|
|
66
65
|
size: this.props.size,
|
|
67
66
|
spacing: this.props.itemSpacing
|
|
@@ -74,7 +73,7 @@ let InlineList = exports.InlineList = (_dec = (0, _testable.testable)(), _dec(_c
|
|
|
74
73
|
margin = _this$props.margin,
|
|
75
74
|
elementRef = _this$props.elementRef,
|
|
76
75
|
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_uiView.View, Object.assign({}, (0, _uiReactUtils.passthroughProps)(rest), {
|
|
78
77
|
as: as,
|
|
79
78
|
margin: margin,
|
|
80
79
|
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 _uiPropTypes = require("@instructure/ui-prop-types");
|
|
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: _uiPropTypes.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 _uiView = require("@instructure/ui-view");
|
|
11
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
12
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
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, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_ListItem = 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)(_uiView.View, Object.assign({}, (0, _uiReactUtils.passthroughProps)(rest), {
|
|
81
81
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
82
82
|
as: "li",
|
|
83
83
|
margin: margin,
|
|
@@ -6,7 +6,7 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
var _react2 = require("@testing-library/react");
|
|
7
7
|
var _vitest = require("vitest");
|
|
8
8
|
var _index = require("../index");
|
|
9
|
-
var
|
|
9
|
+
var _uiAxeCheck = require("@instructure/ui-axe-check");
|
|
10
10
|
var _List, _List2, _List3, _List4;
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -66,7 +66,7 @@ describe('<List />', () => {
|
|
|
66
66
|
it('should meet a11y standards', async () => {
|
|
67
67
|
const _render = (0, _react2.render)(_List4 || (_List4 = /*#__PURE__*/_react.default.createElement(_index.List, null, /*#__PURE__*/_react.default.createElement(_index.List.Item, null, "List item 1"), /*#__PURE__*/_react.default.createElement(_index.List.Item, null, "List item 2"), /*#__PURE__*/_react.default.createElement(_index.List.Item, null, "List item 3"), /*#__PURE__*/_react.default.createElement(_index.List.Item, null, "List item 4")))),
|
|
68
68
|
container = _render.container;
|
|
69
|
-
const axeCheck = await (0,
|
|
69
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
70
70
|
expect(axeCheck).toBe(true);
|
|
71
71
|
});
|
|
72
72
|
});
|
package/lib/List/index.js
CHANGED
|
@@ -14,10 +14,9 @@ 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
|
|
20
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
17
|
+
var _uiView = require("@instructure/ui-view");
|
|
18
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
19
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
21
20
|
var _ListItem = require("./ListItem");
|
|
22
21
|
var _emotion = require("@instructure/emotion");
|
|
23
22
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -54,7 +53,7 @@ var _dec, _dec2, _class, _List;
|
|
|
54
53
|
category: components
|
|
55
54
|
---
|
|
56
55
|
**/
|
|
57
|
-
let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
56
|
+
let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_List = class List extends _react.Component {
|
|
58
57
|
constructor(...args) {
|
|
59
58
|
super(...args);
|
|
60
59
|
this.ref = null;
|
|
@@ -78,7 +77,7 @@ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
78
77
|
return _react.Children.map(this.props.children, child => {
|
|
79
78
|
if (!child) return; // ignore null, falsy children
|
|
80
79
|
|
|
81
|
-
return (0,
|
|
80
|
+
return (0, _uiReactUtils.safeCloneElement)(child, {
|
|
82
81
|
isUnstyled: this.props.isUnstyled,
|
|
83
82
|
delimiter: this.props.delimiter,
|
|
84
83
|
size: this.props.size,
|
|
@@ -94,7 +93,7 @@ let List = exports.List = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
94
93
|
elementRef = _this$props3.elementRef,
|
|
95
94
|
styles = _this$props3.styles,
|
|
96
95
|
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
97
|
-
return (0, _emotion.jsx)(
|
|
96
|
+
return (0, _emotion.jsx)(_uiView.View, Object.assign({}, (0, _uiReactUtils.passthroughProps)(rest), {
|
|
98
97
|
css: styles === null || styles === void 0 ? void 0 : styles.list,
|
|
99
98
|
as: as,
|
|
100
99
|
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 _uiPropTypes = require("@instructure/ui-prop-types");
|
|
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: _uiPropTypes.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": "10.13.
|
|
3
|
+
"version": "10.13.1-pr-snapshot-1741357986437",
|
|
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.26.0",
|
|
27
|
-
"@instructure/console": "10.13.
|
|
28
|
-
"@instructure/emotion": "10.13.
|
|
29
|
-
"@instructure/shared-types": "10.13.
|
|
30
|
-
"@instructure/ui-prop-types": "10.13.
|
|
31
|
-
"@instructure/ui-react-utils": "10.13.
|
|
32
|
-
"@instructure/ui-testable": "10.13.
|
|
33
|
-
"@instructure/ui-view": "10.13.
|
|
27
|
+
"@instructure/console": "10.13.1-pr-snapshot-1741357986437",
|
|
28
|
+
"@instructure/emotion": "10.13.1-pr-snapshot-1741357986437",
|
|
29
|
+
"@instructure/shared-types": "10.13.1-pr-snapshot-1741357986437",
|
|
30
|
+
"@instructure/ui-prop-types": "10.13.1-pr-snapshot-1741357986437",
|
|
31
|
+
"@instructure/ui-react-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
32
|
+
"@instructure/ui-testable": "10.13.1-pr-snapshot-1741357986437",
|
|
33
|
+
"@instructure/ui-view": "10.13.1-pr-snapshot-1741357986437",
|
|
34
34
|
"prop-types": "^15.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-axe-check": "10.13.
|
|
38
|
-
"@instructure/ui-babel-preset": "10.13.
|
|
39
|
-
"@instructure/ui-color-utils": "10.13.
|
|
40
|
-
"@instructure/ui-test-utils": "10.13.
|
|
41
|
-
"@instructure/ui-themes": "10.13.
|
|
37
|
+
"@instructure/ui-axe-check": "10.13.1-pr-snapshot-1741357986437",
|
|
38
|
+
"@instructure/ui-babel-preset": "10.13.1-pr-snapshot-1741357986437",
|
|
39
|
+
"@instructure/ui-color-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
40
|
+
"@instructure/ui-test-utils": "10.13.1-pr-snapshot-1741357986437",
|
|
41
|
+
"@instructure/ui-themes": "10.13.1-pr-snapshot-1741357986437",
|
|
42
42
|
"@testing-library/jest-dom": "^6.6.3",
|
|
43
43
|
"@testing-library/react": "^16.0.1",
|
|
44
44
|
"vitest": "^2.1.8"
|