terra-list
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -42,25 +42,1 @@ # Terra List Documentation | ||
``` | ||
## React Props | ||
The *ListItem* React component will have the following API: | ||
||Prop||Type||Description|| | ||
|`content`|Element|A react element.| | ||
|`isSelected`|Bool|The indicator if the item is selected.| | ||
|`itemSelectable`|Bool|The indicator if selection styles should be applied to list item.| | ||
|`hasChevron`|Bool|The indicator if a chevron should be displayed on the item.| | ||
The *List* React component will have the following API: | ||
||Prop||Type||Description|| | ||
|`isDivided`|Bool|The indicator if a border style should be applied to child items.| | ||
The *SingleSelectList* React component will have the following API: | ||
||Prop||Type||Description|| | ||
|`isDivided`|Bool|The indicator if a border style should be applied to child items.| | ||
|`hasChevrons`|Bool|The indicator if a chevron should be displayed on selectable items.| | ||
|`onChange`|Function|Common callback containing the event and index of selection.| | ||
The *MultiSelectList* React component will have the following API: | ||
||Prop||Type||Description|| | ||
|`isDivided`|Bool|The indicator if a border style should be applied to child items.| | ||
|`maxSelectionCount`|Number|The maximum number of selected items.| | ||
|`onChange`|Function|Common callback containing the event and index of selection.| |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _classnames = require('classnames'); | ||
@@ -34,7 +38,7 @@ | ||
*/ | ||
children: _react.PropTypes.node, | ||
children: _propTypes2.default.node, | ||
/** | ||
* Whether or not the child list items should have a border color applied. | ||
*/ | ||
isDivided: _react.PropTypes.bool | ||
isDivided: _propTypes2.default.bool | ||
}; | ||
@@ -41,0 +45,0 @@ |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _classnames = require('classnames'); | ||
@@ -34,15 +38,15 @@ | ||
*/ | ||
content: _react.PropTypes.element, | ||
content: _propTypes2.default.element, | ||
/** | ||
* Whether or not the list item should have selection styles applied. | ||
*/ | ||
isSelected: _react.PropTypes.bool, | ||
isSelected: _propTypes2.default.bool, | ||
/** | ||
* Whether or not the list item should have styles to indicate the item is selectable. | ||
*/ | ||
isSelectable: _react.PropTypes.bool, | ||
isSelectable: _propTypes2.default.bool, | ||
/** | ||
* Whether or not the list item has a disclosure indicator presented. | ||
*/ | ||
hasChevron: _react.PropTypes.bool | ||
hasChevron: _propTypes2.default.bool | ||
}; | ||
@@ -49,0 +53,0 @@ |
@@ -15,2 +15,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
require('terra-base/lib/baseStyles'); | ||
@@ -40,15 +44,15 @@ | ||
*/ | ||
children: _react.PropTypes.node, | ||
children: _propTypes2.default.node, | ||
/** | ||
* Whether or not the child list items should have a border color applied. | ||
*/ | ||
isDivided: _react.PropTypes.bool, | ||
isDivided: _propTypes2.default.bool, | ||
/** | ||
* A callback event that will be triggered when selection state changes. | ||
*/ | ||
onChange: _react.PropTypes.func, | ||
onChange: _propTypes2.default.func, | ||
/** | ||
* The maximum number of list items that can be selected. | ||
*/ | ||
maxSelectionCount: _react.PropTypes.number | ||
maxSelectionCount: _propTypes2.default.number | ||
}; | ||
@@ -55,0 +59,0 @@ |
@@ -15,2 +15,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
require('terra-base/lib/baseStyles'); | ||
@@ -40,15 +44,15 @@ | ||
*/ | ||
children: _react.PropTypes.node, | ||
children: _propTypes2.default.node, | ||
/** | ||
* Whether or not the child list items should have a border color applied. | ||
*/ | ||
isDivided: _react.PropTypes.bool, | ||
isDivided: _propTypes2.default.bool, | ||
/** | ||
* Whether or not the child list items has a disclosure indicator presented. | ||
*/ | ||
hasChevrons: _react.PropTypes.bool, | ||
hasChevrons: _propTypes2.default.bool, | ||
/** | ||
* A callback event that will be triggered when selection state changes. | ||
*/ | ||
onChange: _react.PropTypes.func | ||
onChange: _propTypes2.default.func | ||
}; | ||
@@ -55,0 +59,0 @@ |
{ | ||
"name": "terra-list", | ||
"main": "lib/List.js", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "terra-list", | ||
@@ -24,3 +24,3 @@ "repository": { | ||
"devDependencies": { | ||
"terra-toolkit": "^0.x" | ||
"terra-toolkit": "^0.3.0" | ||
}, | ||
@@ -30,11 +30,12 @@ "peerDependencies": { | ||
"react-dom": "^15.4.2", | ||
"terra-base": "^0.x", | ||
"terra-icon": "^0.x", | ||
"terra-mixins": "^1.0.0" | ||
"terra-base": "^0.4.0", | ||
"terra-icon": "^0.4.0", | ||
"terra-mixins": "^1.1.0" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.2.5", | ||
"terra-base": "^0.x", | ||
"terra-icon": "^0.x", | ||
"terra-mixins": "^1.0.0" | ||
"prop-types": "^15.5.8", | ||
"terra-base": "^0.4.0", | ||
"terra-icon": "^0.4.0", | ||
"terra-mixins": "^1.1.0" | ||
}, | ||
@@ -41,0 +42,0 @@ "scripts": { |
@@ -5,2 +5,10 @@ import React from 'react'; | ||
export default () => <List isDivided><List.Item /><List.Item /><List.Item /></List>; | ||
const list = () => ( | ||
<List isDivided> | ||
<List.Item content={<p>test 1</p>} key="123" /> | ||
<List.Item content={<p>test 2</p>} key="124" /> | ||
<List.Item content={<p>test 3</p>} key="125" /> | ||
</List> | ||
); | ||
export default list; |
@@ -5,2 +5,10 @@ import React from 'react'; | ||
export default () => <List><List.Item /><List.Item /><List.Item /></List>; | ||
const list = () => ( | ||
<List> | ||
<List.Item content={<p>test 1</p>} key="123" /> | ||
<List.Item content={<p>test 2</p>} key="124" /> | ||
<List.Item content={<p>test 3</p>} key="125" /> | ||
</List> | ||
); | ||
export default list; |
1216
1001852
10
+ Addedprop-types@^15.5.8
+ Addedterra-base@0.4.2(transitive)
+ Addedterra-icon@0.4.2(transitive)
- Removedhoist-non-react-statics@3.3.2(transitive)
- Removedintl@1.2.5(transitive)
- Removedintl-format-cache@2.2.9(transitive)
- Removedintl-messageformat@2.2.0(transitive)
- Removedintl-messageformat-parser@1.4.0(transitive)
- Removedintl-relativeformat@2.2.0(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedreact-intl@2.9.0(transitive)
- Removedterra-base@0.9.0(transitive)
- Removedterra-i18n@0.5.0(transitive)
- Removedterra-icon@0.9.0(transitive)
Updatedterra-base@^0.4.0
Updatedterra-icon@^0.4.0
Updatedterra-mixins@^1.1.0