@instructure/ui-list 8.13.1-snapshot.9 → 8.14.1-snapshot.15
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 +4 -0
- package/es/InlineList/InlineListItem/InlineListItemLocator.js +2 -1
- package/es/InlineList/InlineListItem/index.js +19 -15
- package/es/InlineList/InlineListItem/props.js +0 -24
- package/es/InlineList/InlineListLocator.js +2 -1
- package/es/InlineList/__examples__/InlineList.examples.js +1 -1
- package/es/InlineList/index.js +1 -2
- package/es/InlineList/props.js +0 -17
- package/es/List/ListItem/index.js +19 -15
- package/es/List/ListItem/props.js +0 -24
- package/es/List/ListLocator.js +4 -2
- package/es/List/__examples__/List.examples.js +1 -1
- package/es/List/index.js +16 -13
- package/es/List/props.js +0 -25
- package/lib/InlineList/InlineListItem/InlineListItemLocator.js +1 -0
- package/lib/InlineList/InlineListItem/index.js +19 -15
- package/lib/InlineList/InlineListItem/props.js +0 -24
- package/lib/InlineList/InlineListLocator.js +1 -0
- package/lib/InlineList/__examples__/InlineList.examples.js +1 -1
- package/lib/InlineList/index.js +1 -2
- package/lib/InlineList/props.js +0 -17
- package/lib/List/ListItem/index.js +19 -15
- package/lib/List/ListItem/props.js +0 -24
- package/lib/List/ListLocator.js +3 -1
- package/lib/List/__examples__/List.examples.js +1 -1
- package/lib/List/index.js +16 -13
- package/lib/List/props.js +0 -25
- package/package.json +14 -14
- package/src/InlineList/InlineListItem/index.tsx +5 -9
- package/src/InlineList/InlineListItem/props.ts +20 -20
- package/src/InlineList/__examples__/InlineList.examples.tsx +7 -4
- package/src/InlineList/index.tsx +1 -3
- package/src/InlineList/props.ts +16 -15
- package/src/List/ListItem/index.tsx +5 -9
- package/src/List/ListItem/props.ts +20 -20
- package/src/List/__examples__/List.examples.tsx +8 -5
- package/src/List/index.tsx +5 -10
- package/src/List/props.ts +20 -20
- package/tsconfig.build.json +18 -2
- package/tsconfig.build.tsbuildinfo +1 -0
- package/types/InlineList/InlineListItem/InlineListItemLocator.d.ts +52 -52
- package/types/InlineList/InlineListItem/index.d.ts +4 -4
- package/types/InlineList/InlineListItem/index.d.ts.map +1 -1
- package/types/InlineList/InlineListItem/props.d.ts +20 -1
- package/types/InlineList/InlineListItem/props.d.ts.map +1 -1
- package/types/InlineList/InlineListLocator.d.ts +182 -182
- package/types/InlineList/__examples__/InlineList.examples.d.ts +3 -8
- package/types/InlineList/__examples__/InlineList.examples.d.ts.map +1 -1
- package/types/InlineList/index.d.ts +1 -2
- package/types/InlineList/index.d.ts.map +1 -1
- package/types/InlineList/props.d.ts +14 -0
- package/types/InlineList/props.d.ts.map +1 -1
- package/types/List/ListItem/index.d.ts +4 -4
- package/types/List/ListItem/index.d.ts.map +1 -1
- package/types/List/ListItem/props.d.ts +20 -1
- package/types/List/ListItem/props.d.ts.map +1 -1
- package/types/List/ListLocator.d.ts +182 -182
- package/types/List/__examples__/List.examples.d.ts +3 -8
- package/types/List/__examples__/List.examples.d.ts.map +1 -1
- package/types/List/index.d.ts +2 -3
- package/types/List/index.d.ts.map +1 -1
- package/types/List/props.d.ts +20 -0
- package/types/List/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.14.0](https://github.com/instructure/instructure-ui/compare/v8.13.0...v8.14.0) (2021-12-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-list
|
|
9
|
+
|
|
6
10
|
# [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-list
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
25
|
import { InlineListLocator } from '../InlineListLocator';
|
|
26
|
-
import { InlineListItem } from './index';
|
|
26
|
+
import { InlineListItem } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
27
|
+
|
|
27
28
|
export const InlineListItemLocator = locator(InlineListItem.selector, {
|
|
28
29
|
findNestedOptions: function () {
|
|
29
30
|
return InlineListLocator.find(...arguments);
|
|
@@ -42,6 +42,7 @@ import { propTypes, allowedProps } from './props';
|
|
|
42
42
|
parent: InlineList
|
|
43
43
|
id: InlineList.Item
|
|
44
44
|
---
|
|
45
|
+
@tsProps
|
|
45
46
|
**/
|
|
46
47
|
let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineListItem extends Component {
|
|
47
48
|
constructor() {
|
|
@@ -59,24 +60,28 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
componentDidMount() {
|
|
62
|
-
|
|
63
|
+
var _this$props$makeStyle, _this$props;
|
|
64
|
+
|
|
65
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
componentDidUpdate(
|
|
66
|
-
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
var _this$props$makeStyle2, _this$props2;
|
|
70
|
+
|
|
71
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
render() {
|
|
70
|
-
const _this$
|
|
71
|
-
delimiter = _this$
|
|
72
|
-
size = _this$
|
|
73
|
-
margin = _this$
|
|
74
|
-
padding = _this$
|
|
75
|
-
elementRef = _this$
|
|
76
|
-
children = _this$
|
|
77
|
-
spacing = _this$
|
|
78
|
-
styles = _this$
|
|
79
|
-
rest = _objectWithoutProperties(_this$
|
|
75
|
+
const _this$props3 = this.props,
|
|
76
|
+
delimiter = _this$props3.delimiter,
|
|
77
|
+
size = _this$props3.size,
|
|
78
|
+
margin = _this$props3.margin,
|
|
79
|
+
padding = _this$props3.padding,
|
|
80
|
+
elementRef = _this$props3.elementRef,
|
|
81
|
+
children = _this$props3.children,
|
|
82
|
+
spacing = _this$props3.spacing,
|
|
83
|
+
styles = _this$props3.styles,
|
|
84
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
80
85
|
|
|
81
86
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
82
87
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
@@ -96,8 +101,7 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
96
101
|
padding: 'none',
|
|
97
102
|
spacing: 'none',
|
|
98
103
|
delimiter: 'none',
|
|
99
|
-
size: 'medium'
|
|
100
|
-
elementRef: el => {}
|
|
104
|
+
size: 'medium'
|
|
101
105
|
}, _temp)) || _class) || _class);
|
|
102
106
|
export default InlineListItem;
|
|
103
107
|
export { InlineListItem };
|
|
@@ -25,35 +25,11 @@ import PropTypes from 'prop-types';
|
|
|
25
25
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
|
26
26
|
const propTypes = {
|
|
27
27
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Inherits delimiter from the parent InlineList component
|
|
31
|
-
*/
|
|
32
28
|
delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
|
|
33
29
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
37
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
38
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
39
|
-
*/
|
|
40
30
|
margin: ThemeablePropTypes.spacing,
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
|
|
44
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
45
|
-
* familiar CSS-like shorthand. For example: `padding="small x-large large"`.
|
|
46
|
-
*/
|
|
47
31
|
padding: ThemeablePropTypes.spacing,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Inherits itemSpacing from the parent InlineList component
|
|
51
|
-
*/
|
|
52
32
|
spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* provides a reference to the underlying html root element
|
|
56
|
-
*/
|
|
57
33
|
elementRef: PropTypes.func
|
|
58
34
|
};
|
|
59
35
|
const allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
25
|
import { InlineList } from './index';
|
|
26
|
-
import { InlineListItemLocator } from './InlineListItem/InlineListItemLocator';
|
|
26
|
+
import { InlineListItemLocator } from './InlineListItem/InlineListItemLocator'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
27
|
+
|
|
27
28
|
export const InlineListLocator = locator(InlineList.selector, {
|
|
28
29
|
findAllItems: function () {
|
|
29
30
|
return InlineListItemLocator.findAll(...arguments);
|
|
@@ -27,7 +27,7 @@ import React from 'react';
|
|
|
27
27
|
import { InlineList } from '../index';
|
|
28
28
|
export default {
|
|
29
29
|
sectionProp: 'size',
|
|
30
|
-
getComponentProps:
|
|
30
|
+
getComponentProps: () => {
|
|
31
31
|
return {
|
|
32
32
|
children: [_InlineList$Item || (_InlineList$Item = /*#__PURE__*/React.createElement(InlineList.Item, {
|
|
33
33
|
key: "1"
|
package/es/InlineList/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import { propTypes, allowedProps } from './props';
|
|
|
37
37
|
---
|
|
38
38
|
category: components
|
|
39
39
|
---
|
|
40
|
+
@tsProps
|
|
40
41
|
**/
|
|
41
42
|
let InlineList = (_dec = testable(), _dec(_class = (_temp = _class2 = class InlineList extends Component {
|
|
42
43
|
constructor() {
|
|
@@ -82,9 +83,7 @@ let InlineList = (_dec = testable(), _dec(_class = (_temp = _class2 = class Inli
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
}, _class2.displayName = "InlineList", _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
|
|
85
|
-
children: null,
|
|
86
86
|
itemSpacing: 'none',
|
|
87
|
-
elementRef: el => {},
|
|
88
87
|
as: 'ul',
|
|
89
88
|
margin: 'none',
|
|
90
89
|
delimiter: 'none',
|
package/es/InlineList/props.js
CHANGED
|
@@ -26,29 +26,12 @@ import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
|
26
26
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
|
27
27
|
import { InlineListItem } from './InlineListItem';
|
|
28
28
|
const propTypes = {
|
|
29
|
-
/**
|
|
30
|
-
* Only accepts `<InlineList.Item>` as a child
|
|
31
|
-
*/
|
|
32
29
|
children: ChildrenPropTypes.oneOf([InlineListItem]),
|
|
33
30
|
as: PropTypes.oneOf(['ul', 'ol']),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
37
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
38
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
39
|
-
*/
|
|
40
31
|
margin: ThemeablePropTypes.spacing,
|
|
41
32
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
42
33
|
delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Sets the margin separating each ListItem.
|
|
46
|
-
*/
|
|
47
34
|
itemSpacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* provides a reference to the underlying html root element
|
|
51
|
-
*/
|
|
52
35
|
elementRef: PropTypes.func
|
|
53
36
|
};
|
|
54
37
|
const allowedProps = ['children', 'as', 'margin', 'size', 'delimiter', 'itemSpacing', 'elementRef'];
|
|
@@ -42,6 +42,7 @@ import { propTypes, allowedProps } from './props';
|
|
|
42
42
|
parent: List
|
|
43
43
|
id: List.Item
|
|
44
44
|
---
|
|
45
|
+
@tsProps
|
|
45
46
|
**/
|
|
46
47
|
let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class ListItem extends Component {
|
|
47
48
|
constructor() {
|
|
@@ -59,24 +60,28 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
componentDidMount() {
|
|
62
|
-
|
|
63
|
+
var _this$props$makeStyle, _this$props;
|
|
64
|
+
|
|
65
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
componentDidUpdate(
|
|
66
|
-
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
var _this$props$makeStyle2, _this$props2;
|
|
70
|
+
|
|
71
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
render() {
|
|
70
|
-
const _this$
|
|
71
|
-
delimiter = _this$
|
|
72
|
-
spacing = _this$
|
|
73
|
-
size = _this$
|
|
74
|
-
margin = _this$
|
|
75
|
-
padding = _this$
|
|
76
|
-
elementRef = _this$
|
|
77
|
-
children = _this$
|
|
78
|
-
styles = _this$
|
|
79
|
-
rest = _objectWithoutProperties(_this$
|
|
75
|
+
const _this$props3 = this.props,
|
|
76
|
+
delimiter = _this$props3.delimiter,
|
|
77
|
+
spacing = _this$props3.spacing,
|
|
78
|
+
size = _this$props3.size,
|
|
79
|
+
margin = _this$props3.margin,
|
|
80
|
+
padding = _this$props3.padding,
|
|
81
|
+
elementRef = _this$props3.elementRef,
|
|
82
|
+
children = _this$props3.children,
|
|
83
|
+
styles = _this$props3.styles,
|
|
84
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
80
85
|
|
|
81
86
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
82
87
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
@@ -92,8 +97,7 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
92
97
|
padding: 'none',
|
|
93
98
|
spacing: 'none',
|
|
94
99
|
delimiter: 'none',
|
|
95
|
-
size: 'medium'
|
|
96
|
-
elementRef: el => {}
|
|
100
|
+
size: 'medium'
|
|
97
101
|
}, _temp)) || _class) || _class);
|
|
98
102
|
export default ListItem;
|
|
99
103
|
export { ListItem };
|
|
@@ -25,35 +25,11 @@ import PropTypes from 'prop-types';
|
|
|
25
25
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
|
26
26
|
const propTypes = {
|
|
27
27
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Inherits delimiter from the parent List component.
|
|
31
|
-
*/
|
|
32
28
|
delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
|
|
33
29
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
37
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
38
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
39
|
-
*/
|
|
40
30
|
margin: ThemeablePropTypes.spacing,
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
|
|
44
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
45
|
-
* familiar CSS-like shorthand. For example: `padding="small x-large large"`.
|
|
46
|
-
*/
|
|
47
31
|
padding: ThemeablePropTypes.spacing,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Inherits itemSpacing from the parent List component
|
|
51
|
-
*/
|
|
52
32
|
spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* provides a reference to the underlying html root element
|
|
56
|
-
*/
|
|
57
33
|
elementRef: PropTypes.func
|
|
58
34
|
};
|
|
59
35
|
const allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
|
package/es/List/ListLocator.js
CHANGED
|
@@ -22,8 +22,10 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
|
-
import { List } from './index';
|
|
26
|
-
|
|
25
|
+
import { List } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
26
|
+
|
|
27
|
+
const ListItemLocator = locator(List.Item.selector); // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
28
|
+
|
|
27
29
|
export const ListLocator = locator(List.selector, {
|
|
28
30
|
findAllItems: function () {
|
|
29
31
|
return ListItemLocator.findAll(...arguments);
|
|
@@ -27,7 +27,7 @@ import React from 'react';
|
|
|
27
27
|
import { List } from '../index';
|
|
28
28
|
export default {
|
|
29
29
|
sectionProp: 'size',
|
|
30
|
-
getComponentProps:
|
|
30
|
+
getComponentProps: () => {
|
|
31
31
|
return {
|
|
32
32
|
children: [_List$Item || (_List$Item = /*#__PURE__*/React.createElement(List.Item, {
|
|
33
33
|
key: "1"
|
package/es/List/index.js
CHANGED
|
@@ -42,6 +42,7 @@ import { propTypes, allowedProps } from './props';
|
|
|
42
42
|
---
|
|
43
43
|
category: components
|
|
44
44
|
---
|
|
45
|
+
@tsProps
|
|
45
46
|
**/
|
|
46
47
|
let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class List extends Component {
|
|
47
48
|
constructor() {
|
|
@@ -59,11 +60,15 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
componentDidMount() {
|
|
62
|
-
|
|
63
|
+
var _this$props$makeStyle, _this$props;
|
|
64
|
+
|
|
65
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
componentDidUpdate(
|
|
66
|
-
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
var _this$props$makeStyle2, _this$props2;
|
|
70
|
+
|
|
71
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
renderChildren() {
|
|
@@ -80,13 +85,13 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
render() {
|
|
83
|
-
const _this$
|
|
84
|
-
as = _this$
|
|
85
|
-
margin = _this$
|
|
86
|
-
isUnstyled = _this$
|
|
87
|
-
elementRef = _this$
|
|
88
|
-
styles = _this$
|
|
89
|
-
rest = _objectWithoutProperties(_this$
|
|
88
|
+
const _this$props3 = this.props,
|
|
89
|
+
as = _this$props3.as,
|
|
90
|
+
margin = _this$props3.margin,
|
|
91
|
+
isUnstyled = _this$props3.isUnstyled,
|
|
92
|
+
elementRef = _this$props3.elementRef,
|
|
93
|
+
styles = _this$props3.styles,
|
|
94
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
90
95
|
|
|
91
96
|
return jsx(View, Object.assign({}, passthroughProps(rest), {
|
|
92
97
|
css: styles === null || styles === void 0 ? void 0 : styles.list,
|
|
@@ -98,13 +103,11 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
|
|
|
98
103
|
}
|
|
99
104
|
|
|
100
105
|
}, _class2.displayName = "List", _class2.componentId = 'List', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
|
|
101
|
-
children: null,
|
|
102
106
|
as: 'ul',
|
|
103
107
|
delimiter: 'none',
|
|
104
108
|
isUnstyled: false,
|
|
105
109
|
size: 'medium',
|
|
106
|
-
itemSpacing: 'none'
|
|
107
|
-
elementRef: el => {}
|
|
110
|
+
itemSpacing: 'none'
|
|
108
111
|
}, _class2.Item = ListItem, _temp)) || _class) || _class);
|
|
109
112
|
export default List;
|
|
110
113
|
export { List, ListItem };
|
package/es/List/props.js
CHANGED
|
@@ -26,38 +26,13 @@ import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
|
26
26
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
|
27
27
|
import { ListItem } from './ListItem';
|
|
28
28
|
const propTypes = {
|
|
29
|
-
/**
|
|
30
|
-
* Only accepts `<List.Item>` as a child
|
|
31
|
-
*/
|
|
32
29
|
children: ChildrenPropTypes.oneOf([ListItem]),
|
|
33
30
|
as: PropTypes.oneOf(['ul', 'ol']),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* One of: none, dashed, solid
|
|
37
|
-
*/
|
|
38
31
|
delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* When set, renders the List Items without a list style type.
|
|
42
|
-
*/
|
|
43
32
|
isUnstyled: PropTypes.bool,
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
47
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
48
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
49
|
-
*/
|
|
50
33
|
margin: ThemeablePropTypes.spacing,
|
|
51
34
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Sets the margin separating each ListItem.
|
|
55
|
-
*/
|
|
56
35
|
itemSpacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* provides a reference to the underlying html root element
|
|
60
|
-
*/
|
|
61
36
|
elementRef: PropTypes.func
|
|
62
37
|
};
|
|
63
38
|
const allowedProps = ['children', 'as', 'delimiter', 'isUnstyled', 'margin', 'size', 'itemSpacing', 'elementRef'];
|
|
@@ -34,6 +34,7 @@ var _index = require("./index");
|
|
|
34
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
|
+
// @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
38
|
const InlineListItemLocator = (0, _locator.locator)(_index.InlineListItem.selector, {
|
|
38
39
|
findNestedOptions: function () {
|
|
39
40
|
return _InlineListLocator.InlineListLocator.find(...arguments);
|
|
@@ -34,6 +34,7 @@ var _dec, _dec2, _class, _class2, _temp;
|
|
|
34
34
|
parent: InlineList
|
|
35
35
|
id: InlineList.Item
|
|
36
36
|
---
|
|
37
|
+
@tsProps
|
|
37
38
|
**/
|
|
38
39
|
let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class InlineListItem extends _react.Component {
|
|
39
40
|
constructor() {
|
|
@@ -51,24 +52,28 @@ let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
componentDidMount() {
|
|
54
|
-
|
|
55
|
+
var _this$props$makeStyle, _this$props;
|
|
56
|
+
|
|
57
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
componentDidUpdate(
|
|
58
|
-
|
|
60
|
+
componentDidUpdate() {
|
|
61
|
+
var _this$props$makeStyle2, _this$props2;
|
|
62
|
+
|
|
63
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
render() {
|
|
62
|
-
const _this$
|
|
63
|
-
delimiter = _this$
|
|
64
|
-
size = _this$
|
|
65
|
-
margin = _this$
|
|
66
|
-
padding = _this$
|
|
67
|
-
elementRef = _this$
|
|
68
|
-
children = _this$
|
|
69
|
-
spacing = _this$
|
|
70
|
-
styles = _this$
|
|
71
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
67
|
+
const _this$props3 = this.props,
|
|
68
|
+
delimiter = _this$props3.delimiter,
|
|
69
|
+
size = _this$props3.size,
|
|
70
|
+
margin = _this$props3.margin,
|
|
71
|
+
padding = _this$props3.padding,
|
|
72
|
+
elementRef = _this$props3.elementRef,
|
|
73
|
+
children = _this$props3.children,
|
|
74
|
+
spacing = _this$props3.spacing,
|
|
75
|
+
styles = _this$props3.styles,
|
|
76
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
72
77
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
73
78
|
css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
|
|
74
79
|
as: "li",
|
|
@@ -87,8 +92,7 @@ let InlineListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
87
92
|
padding: 'none',
|
|
88
93
|
spacing: 'none',
|
|
89
94
|
delimiter: 'none',
|
|
90
|
-
size: 'medium'
|
|
91
|
-
elementRef: el => {}
|
|
95
|
+
size: 'medium'
|
|
92
96
|
}, _temp)) || _class) || _class);
|
|
93
97
|
exports.InlineListItem = InlineListItem;
|
|
94
98
|
var _default = InlineListItem;
|
|
@@ -36,35 +36,11 @@ var _emotion = require("@instructure/emotion");
|
|
|
36
36
|
*/
|
|
37
37
|
const propTypes = {
|
|
38
38
|
children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Inherits delimiter from the parent InlineList component
|
|
42
|
-
*/
|
|
43
39
|
delimiter: _propTypes.default.oneOf(['none', 'pipe', 'slash', 'arrow']),
|
|
44
40
|
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
48
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
49
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
50
|
-
*/
|
|
51
41
|
margin: _emotion.ThemeablePropTypes.spacing,
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
|
|
55
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
56
|
-
* familiar CSS-like shorthand. For example: `padding="small x-large large"`.
|
|
57
|
-
*/
|
|
58
42
|
padding: _emotion.ThemeablePropTypes.spacing,
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Inherits itemSpacing from the parent InlineList component
|
|
62
|
-
*/
|
|
63
43
|
spacing: _propTypes.default.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* provides a reference to the underlying html root element
|
|
67
|
-
*/
|
|
68
44
|
elementRef: _propTypes.default.func
|
|
69
45
|
};
|
|
70
46
|
exports.propTypes = propTypes;
|
|
@@ -34,6 +34,7 @@ var _InlineListItemLocator = require("./InlineListItem/InlineListItemLocator");
|
|
|
34
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
|
+
// @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
38
|
const InlineListLocator = (0, _locator.locator)(_index.InlineList.selector, {
|
|
38
39
|
findAllItems: function () {
|
|
39
40
|
return _InlineListItemLocator.InlineListItemLocator.findAll(...arguments);
|
|
@@ -15,7 +15,7 @@ var _InlineList$Item, _InlineList$Item2, _InlineList$Item3;
|
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
17
|
sectionProp: 'size',
|
|
18
|
-
getComponentProps:
|
|
18
|
+
getComponentProps: () => {
|
|
19
19
|
return {
|
|
20
20
|
children: [_InlineList$Item || (_InlineList$Item = /*#__PURE__*/_react.default.createElement(_index.InlineList.Item, {
|
|
21
21
|
key: "1"
|
package/lib/InlineList/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var _dec, _class, _class2, _temp;
|
|
|
33
33
|
---
|
|
34
34
|
category: components
|
|
35
35
|
---
|
|
36
|
+
@tsProps
|
|
36
37
|
**/
|
|
37
38
|
let InlineList = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _class2 = class InlineList extends _react.Component {
|
|
38
39
|
constructor() {
|
|
@@ -77,9 +78,7 @@ let InlineList = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
}, _class2.displayName = "InlineList", _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
|
|
80
|
-
children: null,
|
|
81
81
|
itemSpacing: 'none',
|
|
82
|
-
elementRef: el => {},
|
|
83
82
|
as: 'ul',
|
|
84
83
|
margin: 'none',
|
|
85
84
|
delimiter: 'none',
|
package/lib/InlineList/props.js
CHANGED
|
@@ -39,29 +39,12 @@ var _InlineListItem = require("./InlineListItem");
|
|
|
39
39
|
* SOFTWARE.
|
|
40
40
|
*/
|
|
41
41
|
const propTypes = {
|
|
42
|
-
/**
|
|
43
|
-
* Only accepts `<InlineList.Item>` as a child
|
|
44
|
-
*/
|
|
45
42
|
children: _Children.Children.oneOf([_InlineListItem.InlineListItem]),
|
|
46
43
|
as: _propTypes.default.oneOf(['ul', 'ol']),
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
|
|
50
|
-
* `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
|
|
51
|
-
* familiar CSS-like shorthand. For example: `margin="small auto large"`.
|
|
52
|
-
*/
|
|
53
44
|
margin: _emotion.ThemeablePropTypes.spacing,
|
|
54
45
|
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
55
46
|
delimiter: _propTypes.default.oneOf(['none', 'pipe', 'slash', 'arrow']),
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Sets the margin separating each ListItem.
|
|
59
|
-
*/
|
|
60
47
|
itemSpacing: _propTypes.default.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* provides a reference to the underlying html root element
|
|
64
|
-
*/
|
|
65
48
|
elementRef: _propTypes.default.func
|
|
66
49
|
};
|
|
67
50
|
exports.propTypes = propTypes;
|
|
@@ -34,6 +34,7 @@ var _dec, _dec2, _class, _class2, _temp;
|
|
|
34
34
|
parent: List
|
|
35
35
|
id: List.Item
|
|
36
36
|
---
|
|
37
|
+
@tsProps
|
|
37
38
|
**/
|
|
38
39
|
let ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class ListItem extends _react.Component {
|
|
39
40
|
constructor() {
|
|
@@ -51,24 +52,28 @@ let ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
componentDidMount() {
|
|
54
|
-
|
|
55
|
+
var _this$props$makeStyle, _this$props;
|
|
56
|
+
|
|
57
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
componentDidUpdate(
|
|
58
|
-
|
|
60
|
+
componentDidUpdate() {
|
|
61
|
+
var _this$props$makeStyle2, _this$props2;
|
|
62
|
+
|
|
63
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
render() {
|
|
62
|
-
const _this$
|
|
63
|
-
delimiter = _this$
|
|
64
|
-
spacing = _this$
|
|
65
|
-
size = _this$
|
|
66
|
-
margin = _this$
|
|
67
|
-
padding = _this$
|
|
68
|
-
elementRef = _this$
|
|
69
|
-
children = _this$
|
|
70
|
-
styles = _this$
|
|
71
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
67
|
+
const _this$props3 = this.props,
|
|
68
|
+
delimiter = _this$props3.delimiter,
|
|
69
|
+
spacing = _this$props3.spacing,
|
|
70
|
+
size = _this$props3.size,
|
|
71
|
+
margin = _this$props3.margin,
|
|
72
|
+
padding = _this$props3.padding,
|
|
73
|
+
elementRef = _this$props3.elementRef,
|
|
74
|
+
children = _this$props3.children,
|
|
75
|
+
styles = _this$props3.styles,
|
|
76
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
72
77
|
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(rest), {
|
|
73
78
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
74
79
|
as: "li",
|
|
@@ -83,8 +88,7 @@ let ListItem = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
83
88
|
padding: 'none',
|
|
84
89
|
spacing: 'none',
|
|
85
90
|
delimiter: 'none',
|
|
86
|
-
size: 'medium'
|
|
87
|
-
elementRef: el => {}
|
|
91
|
+
size: 'medium'
|
|
88
92
|
}, _temp)) || _class) || _class);
|
|
89
93
|
exports.ListItem = ListItem;
|
|
90
94
|
var _default = ListItem;
|