@instructure/ui-list 8.8.0 → 8.8.1-snapshot.63

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 (78) hide show
  1. package/LICENSE.md +27 -0
  2. package/es/InlineList/InlineListItem/index.js +5 -38
  3. package/es/InlineList/InlineListItem/props.js +56 -0
  4. package/es/InlineList/index.js +2 -25
  5. package/{src/InlineList/InlineListItem/types.ts → es/InlineList/props.js} +26 -20
  6. package/es/List/ListItem/index.js +4 -37
  7. package/es/List/ListItem/props.js +56 -0
  8. package/es/List/index.js +4 -41
  9. package/es/List/props.js +60 -0
  10. package/lib/InlineList/InlineListItem/index.js +5 -38
  11. package/lib/InlineList/InlineListItem/props.js +68 -0
  12. package/lib/InlineList/index.js +3 -28
  13. package/lib/InlineList/props.js +65 -0
  14. package/lib/List/ListItem/index.js +4 -37
  15. package/lib/List/ListItem/props.js +68 -0
  16. package/lib/List/index.js +4 -42
  17. package/lib/List/props.js +74 -0
  18. package/package.json +15 -14
  19. package/src/InlineList/InlineListItem/index.tsx +8 -46
  20. package/src/InlineList/InlineListItem/props.ts +105 -0
  21. package/src/InlineList/InlineListItem/styles.ts +1 -1
  22. package/src/InlineList/InlineListItem/theme.ts +1 -1
  23. package/src/InlineList/index.tsx +5 -35
  24. package/src/InlineList/props.ts +102 -0
  25. package/src/List/ListItem/index.tsx +7 -45
  26. package/src/List/ListItem/props.ts +105 -0
  27. package/src/List/ListItem/styles.ts +1 -1
  28. package/src/List/ListItem/theme.ts +1 -1
  29. package/src/List/index.tsx +7 -48
  30. package/src/List/props.ts +111 -0
  31. package/src/List/styles.ts +1 -1
  32. package/src/List/theme.ts +1 -1
  33. package/src/index.ts +4 -4
  34. package/types/InlineList/InlineListItem/index.d.ts +19 -30
  35. package/types/InlineList/InlineListItem/index.d.ts.map +1 -1
  36. package/types/InlineList/InlineListItem/props.d.ts +20 -0
  37. package/types/InlineList/InlineListItem/props.d.ts.map +1 -0
  38. package/types/InlineList/InlineListItem/styles.d.ts +1 -1
  39. package/types/InlineList/InlineListItem/theme.d.ts +1 -1
  40. package/types/InlineList/InlineListItem/theme.d.ts.map +1 -1
  41. package/types/InlineList/index.d.ts +27 -23
  42. package/types/InlineList/index.d.ts.map +1 -1
  43. package/types/InlineList/props.d.ts +20 -0
  44. package/types/InlineList/props.d.ts.map +1 -0
  45. package/types/List/ListItem/index.d.ts +19 -30
  46. package/types/List/ListItem/index.d.ts.map +1 -1
  47. package/types/List/ListItem/props.d.ts +20 -0
  48. package/types/List/ListItem/props.d.ts.map +1 -0
  49. package/types/List/ListItem/styles.d.ts +1 -1
  50. package/types/List/ListItem/theme.d.ts +1 -1
  51. package/types/List/ListItem/theme.d.ts.map +1 -1
  52. package/types/List/index.d.ts +21 -35
  53. package/types/List/index.d.ts.map +1 -1
  54. package/types/List/props.d.ts +21 -0
  55. package/types/List/props.d.ts.map +1 -0
  56. package/types/List/styles.d.ts +1 -1
  57. package/types/List/theme.d.ts +1 -1
  58. package/types/List/theme.d.ts.map +1 -1
  59. package/types/index.d.ts +4 -4
  60. package/es/InlineList/InlineListItem/types.js +0 -1
  61. package/es/InlineList/types.js +0 -1
  62. package/es/List/ListItem/types.js +0 -1
  63. package/es/List/types.js +0 -1
  64. package/lib/InlineList/InlineListItem/types.js +0 -1
  65. package/lib/InlineList/types.js +0 -1
  66. package/lib/List/ListItem/types.js +0 -1
  67. package/lib/List/types.js +0 -1
  68. package/src/InlineList/types.ts +0 -43
  69. package/src/List/ListItem/types.ts +0 -45
  70. package/src/List/types.ts +0 -46
  71. package/types/InlineList/InlineListItem/types.d.ts +0 -12
  72. package/types/InlineList/InlineListItem/types.d.ts.map +0 -1
  73. package/types/InlineList/types.d.ts +0 -10
  74. package/types/InlineList/types.d.ts.map +0 -1
  75. package/types/List/ListItem/types.d.ts +0 -12
  76. package/types/List/ListItem/types.d.ts.map +0 -1
  77. package/types/List/types.d.ts +0 -13
  78. package/types/List/types.d.ts.map +0 -1
package/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -29,13 +29,13 @@ var _dec, _dec2, _class, _class2, _temp;
29
29
 
30
30
  /** @jsx jsx */
31
31
  import { Component } from 'react';
32
- import PropTypes from 'prop-types';
33
32
  import { View } from '@instructure/ui-view';
34
33
  import { testable } from '@instructure/ui-testable';
35
34
  import { passthroughProps } from '@instructure/ui-react-utils';
36
- import { withStyle, jsx, ThemeablePropTypes } from '@instructure/emotion';
35
+ import { withStyle, jsx } from '@instructure/emotion';
37
36
  import generateStyle from './styles';
38
37
  import generateComponentTheme from './theme';
38
+ import { propTypes, allowedProps } from './props';
39
39
 
40
40
  /**
41
41
  ---
@@ -65,7 +65,7 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
65
65
  rest = _objectWithoutProperties(_this$props, _excluded);
66
66
 
67
67
  return jsx(View, Object.assign({}, passthroughProps(rest), {
68
- css: styles.inlineListItem,
68
+ css: styles === null || styles === void 0 ? void 0 : styles.inlineListItem,
69
69
  as: "li",
70
70
  margin: margin,
71
71
  padding: padding,
@@ -73,46 +73,13 @@ let InlineListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _
73
73
  maxWidth: "100%",
74
74
  elementRef: elementRef
75
75
  }), children, jsx("span", {
76
- css: styles.delimiter,
76
+ css: styles === null || styles === void 0 ? void 0 : styles.delimiter,
77
77
  "aria-hidden": "true"
78
78
  }));
79
79
  }
80
80
 
81
- }, _class2.displayName = "InlineListItem", _class2.componentId = 'InlineList.Item', _class2.propTypes = {
82
- // eslint-disable-next-line react/require-default-props
83
- makeStyles: PropTypes.func,
84
- // eslint-disable-next-line react/require-default-props
85
- styles: PropTypes.object,
86
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
87
-
88
- /**
89
- * Inherits delimiter from the parent InlineList component
90
- */
91
- delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
92
- size: PropTypes.oneOf(['small', 'medium', 'large']),
93
-
94
- /**
95
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
96
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
97
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
98
- */
99
- margin: ThemeablePropTypes.spacing,
100
-
101
- /**
102
- * Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
103
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
104
- * familiar CSS-like shorthand. For example: `padding="small x-large large"`.
105
- */
106
- padding: ThemeablePropTypes.spacing,
107
-
108
- /**
109
- * Inherits itemSpacing from the parent InlineList component
110
- */
111
- spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
112
- elementRef: PropTypes.func
113
- }, _class2.defaultProps = {
81
+ }, _class2.displayName = "InlineListItem", _class2.componentId = 'InlineList.Item', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
114
82
  padding: 'none',
115
- margin: void 0,
116
83
  spacing: 'none',
117
84
  delimiter: 'none',
118
85
  size: 'medium',
@@ -0,0 +1,56 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ import { ThemeablePropTypes } from '@instructure/emotion';
26
+ const propTypes = {
27
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
28
+
29
+ /**
30
+ * Inherits delimiter from the parent InlineList component
31
+ */
32
+ delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
33
+ 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
+ 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
+ padding: ThemeablePropTypes.spacing,
48
+
49
+ /**
50
+ * Inherits itemSpacing from the parent InlineList component
51
+ */
52
+ spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
53
+ elementRef: PropTypes.func
54
+ };
55
+ const allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
56
+ export { propTypes, allowedProps };
@@ -27,13 +27,11 @@ var _dec, _class, _class2, _temp;
27
27
  * SOFTWARE.
28
28
  */
29
29
  import React, { Children, Component } from 'react';
30
- import PropTypes from 'prop-types';
31
30
  import { View } from '@instructure/ui-view';
32
- import { ThemeablePropTypes } from '@instructure/emotion';
33
31
  import { passthroughProps, safeCloneElement } from '@instructure/ui-react-utils';
34
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
35
32
  import { testable } from '@instructure/ui-testable';
36
33
  import { InlineListItem } from './InlineListItem';
34
+ import { propTypes, allowedProps } from './props';
37
35
 
38
36
  /**
39
37
  ---
@@ -69,28 +67,7 @@ let InlineList = (_dec = testable(), _dec(_class = (_temp = _class2 = class Inli
69
67
  }), this.renderChildren());
70
68
  }
71
69
 
72
- }, _class2.displayName = "InlineList", _class2.propTypes = {
73
- /**
74
- * Only accepts `<InlineList.Item>` as a child
75
- */
76
- children: ChildrenPropTypes.oneOf([InlineListItem]),
77
- as: PropTypes.oneOf(['ul', 'ol']),
78
-
79
- /**
80
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
81
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
82
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
83
- */
84
- margin: ThemeablePropTypes.spacing,
85
- size: PropTypes.oneOf(['small', 'medium', 'large']),
86
- delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
87
-
88
- /**
89
- * Sets the margin separating each ListItem.
90
- */
91
- itemSpacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
92
- elementRef: PropTypes.func
93
- }, _class2.defaultProps = {
70
+ }, _class2.displayName = "InlineList", _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
94
71
  children: null,
95
72
  itemSpacing: 'none',
96
73
  elementRef: el => {},
@@ -21,25 +21,31 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+ import PropTypes from 'prop-types';
25
+ import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
26
+ import { ThemeablePropTypes } from '@instructure/emotion';
27
+ import { InlineListItem } from './InlineListItem';
28
+ const propTypes = {
29
+ /**
30
+ * Only accepts `<InlineList.Item>` as a child
31
+ */
32
+ children: ChildrenPropTypes.oneOf([InlineListItem]),
33
+ as: PropTypes.oneOf(['ul', 'ol']),
24
34
 
25
- import { Spacing } from '@instructure/emotion'
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
+ margin: ThemeablePropTypes.spacing,
41
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
42
+ delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
26
43
 
27
- export type InlineListItemProps = {
28
- makeStyles?: (...args: any[]) => any
29
- styles?: any
30
- delimiter?: 'none' | 'pipe' | 'slash' | 'arrow'
31
- size?: 'small' | 'medium' | 'large'
32
- margin?: Spacing
33
- padding?: Spacing
34
- spacing?:
35
- | 'none'
36
- | 'xxx-small'
37
- | 'xx-small'
38
- | 'x-small'
39
- | 'small'
40
- | 'medium'
41
- | 'large'
42
- | 'x-large'
43
- | 'xx-large'
44
- elementRef?: (...args: any[]) => any
45
- }
44
+ /**
45
+ * Sets the margin separating each ListItem.
46
+ */
47
+ itemSpacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
48
+ elementRef: PropTypes.func
49
+ };
50
+ const allowedProps = ['children', 'as', 'margin', 'size', 'delimiter', 'itemSpacing', 'elementRef'];
51
+ export { propTypes, allowedProps };
@@ -29,13 +29,13 @@ var _dec, _dec2, _class, _class2, _temp;
29
29
 
30
30
  /** @jsx jsx */
31
31
  import { Component } from 'react';
32
- import PropTypes from 'prop-types';
33
32
  import { View } from '@instructure/ui-view';
34
33
  import { testable } from '@instructure/ui-testable';
35
34
  import { passthroughProps } from '@instructure/ui-react-utils';
36
- import { withStyle, jsx, ThemeablePropTypes } from '@instructure/emotion';
35
+ import { withStyle, jsx } from '@instructure/emotion';
37
36
  import generateStyle from './styles';
38
37
  import generateComponentTheme from './theme';
38
+ import { propTypes, allowedProps } from './props';
39
39
 
40
40
  /**
41
41
  ---
@@ -65,7 +65,7 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
65
65
  rest = _objectWithoutProperties(_this$props, _excluded);
66
66
 
67
67
  return jsx(View, Object.assign({}, passthroughProps(rest), {
68
- css: styles.listItem,
68
+ css: styles === null || styles === void 0 ? void 0 : styles.listItem,
69
69
  as: "li",
70
70
  margin: margin,
71
71
  padding: padding,
@@ -74,41 +74,8 @@ let ListItem = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
74
74
  }), children);
75
75
  }
76
76
 
77
- }, _class2.displayName = "ListItem", _class2.componentId = 'List.Item', _class2.propTypes = {
78
- // eslint-disable-next-line react/require-default-props
79
- makeStyles: PropTypes.func,
80
- // eslint-disable-next-line react/require-default-props
81
- styles: PropTypes.object,
82
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
83
-
84
- /**
85
- * Inherits delimiter from the parent List component.
86
- */
87
- delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
88
- size: PropTypes.oneOf(['small', 'medium', 'large']),
89
-
90
- /**
91
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
92
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
93
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
94
- */
95
- margin: ThemeablePropTypes.spacing,
96
-
97
- /**
98
- * Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,
99
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
100
- * familiar CSS-like shorthand. For example: `padding="small x-large large"`.
101
- */
102
- padding: ThemeablePropTypes.spacing,
103
-
104
- /**
105
- * Inherits itemSpacing from the parent List component
106
- */
107
- spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
108
- elementRef: PropTypes.func
109
- }, _class2.defaultProps = {
77
+ }, _class2.displayName = "ListItem", _class2.componentId = 'List.Item', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
110
78
  padding: 'none',
111
- margin: void 0,
112
79
  spacing: 'none',
113
80
  delimiter: 'none',
114
81
  size: 'medium',
@@ -0,0 +1,56 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ import { ThemeablePropTypes } from '@instructure/emotion';
26
+ const propTypes = {
27
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
28
+
29
+ /**
30
+ * Inherits delimiter from the parent List component.
31
+ */
32
+ delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
33
+ 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
+ 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
+ padding: ThemeablePropTypes.spacing,
48
+
49
+ /**
50
+ * Inherits itemSpacing from the parent List component
51
+ */
52
+ spacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
53
+ elementRef: PropTypes.func
54
+ };
55
+ const allowedProps = ['children', 'delimiter', 'size', 'margin', 'padding', 'spacing', 'elementRef'];
56
+ export { propTypes, allowedProps };
package/es/List/index.js CHANGED
@@ -29,15 +29,14 @@ var _dec, _dec2, _class, _class2, _temp;
29
29
 
30
30
  /** @jsx jsx */
31
31
  import { Children, Component } from 'react';
32
- import PropTypes from 'prop-types';
33
32
  import { View } from '@instructure/ui-view';
34
33
  import { passthroughProps, safeCloneElement } from '@instructure/ui-react-utils';
35
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
36
34
  import { testable } from '@instructure/ui-testable';
37
35
  import { ListItem } from './ListItem';
38
- import { withStyle, jsx, ThemeablePropTypes } from '@instructure/emotion';
36
+ import { withStyle, jsx } from '@instructure/emotion';
39
37
  import generateStyle from './styles';
40
38
  import generateComponentTheme from './theme';
39
+ import { propTypes, allowedProps } from './props';
41
40
 
42
41
  /**
43
42
  ---
@@ -76,7 +75,7 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
76
75
  rest = _objectWithoutProperties(_this$props, _excluded);
77
76
 
78
77
  return jsx(View, Object.assign({}, passthroughProps(rest), {
79
- css: styles.list,
78
+ css: styles === null || styles === void 0 ? void 0 : styles.list,
80
79
  as: as,
81
80
  margin: margin,
82
81
  elementRef: elementRef,
@@ -84,47 +83,11 @@ let List = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
84
83
  }), this.renderChildren());
85
84
  }
86
85
 
87
- }, _class2.displayName = "List", _class2.componentId = 'List', _class2.propTypes = {
88
- // eslint-disable-next-line react/require-default-props
89
- makeStyles: PropTypes.func,
90
- // eslint-disable-next-line react/require-default-props
91
- styles: PropTypes.object,
92
-
93
- /**
94
- * Only accepts `<List.Item>` as a child
95
- */
96
- children: ChildrenPropTypes.oneOf([ListItem]),
97
- as: PropTypes.oneOf(['ul', 'ol']),
98
-
99
- /**
100
- * One of: none, dashed, solid
101
- */
102
- delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
103
-
104
- /**
105
- * When set, renders the List Items without a list style type.
106
- */
107
- isUnstyled: PropTypes.bool,
108
-
109
- /**
110
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
111
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
112
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
113
- */
114
- margin: ThemeablePropTypes.spacing,
115
- size: PropTypes.oneOf(['small', 'medium', 'large']),
116
-
117
- /**
118
- * Sets the margin separating each ListItem.
119
- */
120
- itemSpacing: PropTypes.oneOf(['none', 'xxx-small', 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']),
121
- elementRef: PropTypes.func
122
- }, _class2.defaultProps = {
86
+ }, _class2.displayName = "List", _class2.componentId = 'List', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
123
87
  children: null,
124
88
  as: 'ul',
125
89
  delimiter: 'none',
126
90
  isUnstyled: false,
127
- margin: void 0,
128
91
  size: 'medium',
129
92
  itemSpacing: 'none',
130
93
  elementRef: el => {}