react-bootstrap 0.30.6 → 0.30.10
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 +64 -0
- package/LICENSE +2 -2
- package/dist/react-bootstrap.js +3161 -1664
- package/dist/react-bootstrap.min.js +9 -9
- package/dist/react-bootstrap.min.js.map +1 -1
- package/es/Alert.js +3 -2
- package/es/Badge.js +2 -1
- package/es/BreadcrumbItem.js +5 -4
- package/es/Button.js +7 -6
- package/es/ButtonGroup.js +4 -3
- package/es/Carousel.js +17 -16
- package/es/CarouselItem.js +7 -6
- package/es/Checkbox.js +5 -4
- package/es/Clearfix.js +5 -4
- package/es/Col.js +21 -20
- package/es/Collapse.js +20 -13
- package/es/ControlLabel.js +4 -3
- package/es/Dropdown.js +34 -22
- package/es/DropdownButton.js +6 -5
- package/es/DropdownMenu.js +19 -14
- package/es/DropdownToggle.js +5 -4
- package/es/Fade.js +17 -10
- package/es/Form.js +3 -2
- package/es/FormControl.js +27 -6
- package/es/FormControlFeedback.js +2 -1
- package/es/FormGroup.js +4 -3
- package/es/Glyphicon.js +3 -2
- package/es/Grid.js +2 -1
- package/es/Image.js +5 -4
- package/es/ListGroupItem.js +8 -7
- package/es/MediaLeft.js +2 -1
- package/es/MediaRight.js +2 -1
- package/es/MenuItem.js +9 -8
- package/es/Modal.js +22 -15
- package/es/ModalBody.js +15 -2
- package/es/ModalDialog.js +2 -1
- package/es/ModalFooter.js +15 -2
- package/es/ModalHeader.js +7 -6
- package/es/ModalTitle.js +15 -2
- package/es/Nav.js +20 -19
- package/es/NavDropdown.js +5 -4
- package/es/NavItem.js +8 -7
- package/es/Navbar.js +17 -15
- package/es/NavbarBrand.js +3 -2
- package/es/NavbarCollapse.js +2 -1
- package/es/NavbarHeader.js +3 -2
- package/es/NavbarToggle.js +2 -1
- package/es/Overlay.js +18 -11
- package/es/OverlayTrigger.js +20 -18
- package/es/Pager.js +2 -1
- package/es/PagerItem.js +7 -6
- package/es/Pagination.js +54 -60
- package/es/PaginationButton.js +7 -6
- package/es/Panel.js +17 -20
- package/es/PanelGroup.js +6 -5
- package/es/Popover.js +8 -7
- package/es/ProgressBar.js +2 -1
- package/es/Radio.js +5 -4
- package/es/ResponsiveEmbed.js +2 -1
- package/es/SafeAnchor.js +6 -5
- package/es/SplitButton.js +8 -7
- package/es/Tab.js +4 -3
- package/es/TabContainer.js +3 -2
- package/es/TabContent.js +12 -2
- package/es/TabPane.js +15 -5
- package/es/Table.js +6 -5
- package/es/Tabs.js +16 -7
- package/es/Thumbnail.js +4 -3
- package/es/Tooltip.js +7 -6
- package/es/index.js +2 -0
- package/es/utils/bootstrapUtils.js +1 -1
- package/lib/Alert.js +6 -2
- package/lib/Badge.js +5 -1
- package/lib/BreadcrumbItem.js +8 -4
- package/lib/Button.js +10 -6
- package/lib/ButtonGroup.js +7 -3
- package/lib/Carousel.js +20 -16
- package/lib/CarouselItem.js +10 -6
- package/lib/Checkbox.js +8 -4
- package/lib/Clearfix.js +8 -4
- package/lib/Col.js +24 -20
- package/lib/Collapse.js +23 -13
- package/lib/ControlLabel.js +7 -3
- package/lib/Dropdown.js +37 -22
- package/lib/DropdownButton.js +9 -5
- package/lib/DropdownMenu.js +21 -13
- package/lib/DropdownToggle.js +8 -4
- package/lib/Fade.js +20 -10
- package/lib/Form.js +6 -2
- package/lib/FormControl.js +29 -5
- package/lib/FormControlFeedback.js +5 -1
- package/lib/FormGroup.js +7 -3
- package/lib/Glyphicon.js +6 -2
- package/lib/Grid.js +5 -1
- package/lib/Image.js +8 -4
- package/lib/ListGroupItem.js +11 -7
- package/lib/MediaLeft.js +5 -1
- package/lib/MediaRight.js +5 -1
- package/lib/MenuItem.js +12 -8
- package/lib/Modal.js +25 -15
- package/lib/ModalBody.js +18 -2
- package/lib/ModalDialog.js +5 -1
- package/lib/ModalFooter.js +18 -2
- package/lib/ModalHeader.js +10 -6
- package/lib/ModalTitle.js +18 -2
- package/lib/Nav.js +23 -19
- package/lib/NavDropdown.js +8 -4
- package/lib/NavItem.js +11 -7
- package/lib/Navbar.js +27 -25
- package/lib/NavbarBrand.js +6 -2
- package/lib/NavbarCollapse.js +7 -3
- package/lib/NavbarHeader.js +6 -2
- package/lib/NavbarToggle.js +10 -6
- package/lib/Overlay.js +21 -11
- package/lib/OverlayTrigger.js +23 -18
- package/lib/Pager.js +5 -1
- package/lib/PagerItem.js +10 -6
- package/lib/Pagination.js +58 -61
- package/lib/PaginationButton.js +10 -6
- package/lib/Panel.js +20 -20
- package/lib/PanelGroup.js +9 -5
- package/lib/Popover.js +11 -7
- package/lib/ProgressBar.js +12 -8
- package/lib/Radio.js +8 -4
- package/lib/ResponsiveEmbed.js +7 -3
- package/lib/SafeAnchor.js +9 -5
- package/lib/SplitButton.js +11 -7
- package/lib/Tab.js +7 -3
- package/lib/TabContainer.js +13 -9
- package/lib/TabContent.js +26 -13
- package/lib/TabPane.js +38 -25
- package/lib/Table.js +9 -5
- package/lib/Tabs.js +19 -7
- package/lib/Thumbnail.js +7 -3
- package/lib/Tooltip.js +10 -6
- package/lib/index.js +6 -1
- package/lib/utils/bootstrapUtils.js +6 -4
- package/package.json +10 -8
package/es/SafeAnchor.js
CHANGED
|
@@ -4,14 +4,15 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import elementType from 'react-prop-types/lib/elementType';
|
|
8
9
|
|
|
9
10
|
var propTypes = {
|
|
10
|
-
href:
|
|
11
|
-
onClick:
|
|
12
|
-
disabled:
|
|
13
|
-
role:
|
|
14
|
-
tabIndex:
|
|
11
|
+
href: PropTypes.string,
|
|
12
|
+
onClick: PropTypes.func,
|
|
13
|
+
disabled: PropTypes.bool,
|
|
14
|
+
role: PropTypes.string,
|
|
15
|
+
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
15
16
|
/**
|
|
16
17
|
* this is sort of silly but needed for Button
|
|
17
18
|
*/
|
package/es/SplitButton.js
CHANGED
|
@@ -4,6 +4,7 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
4
4
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
5
5
|
import _extends from 'babel-runtime/helpers/extends';
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
|
|
8
9
|
import Button from './Button';
|
|
9
10
|
import Dropdown from './Dropdown';
|
|
@@ -13,24 +14,24 @@ import splitComponentProps from './utils/splitComponentProps';
|
|
|
13
14
|
var propTypes = _extends({}, Dropdown.propTypes, {
|
|
14
15
|
|
|
15
16
|
// Toggle props.
|
|
16
|
-
bsStyle:
|
|
17
|
-
bsSize:
|
|
18
|
-
href:
|
|
19
|
-
onClick:
|
|
17
|
+
bsStyle: PropTypes.string,
|
|
18
|
+
bsSize: PropTypes.string,
|
|
19
|
+
href: PropTypes.string,
|
|
20
|
+
onClick: PropTypes.func,
|
|
20
21
|
/**
|
|
21
22
|
* The content of the split button.
|
|
22
23
|
*/
|
|
23
|
-
title:
|
|
24
|
+
title: PropTypes.node.isRequired,
|
|
24
25
|
/**
|
|
25
26
|
* Accessible label for the toggle; the value of `title` if not specified.
|
|
26
27
|
*/
|
|
27
|
-
toggleLabel:
|
|
28
|
+
toggleLabel: PropTypes.string,
|
|
28
29
|
|
|
29
30
|
// Override generated docs from <Dropdown>.
|
|
30
31
|
/**
|
|
31
32
|
* @private
|
|
32
33
|
*/
|
|
33
|
-
children:
|
|
34
|
+
children: PropTypes.node
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
var SplitButton = function (_React$Component) {
|
package/es/Tab.js
CHANGED
|
@@ -3,6 +3,7 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
3
3
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
4
4
|
import _extends from 'babel-runtime/helpers/extends';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
6
7
|
|
|
7
8
|
import TabContainer from './TabContainer';
|
|
8
9
|
import TabContent from './TabContent';
|
|
@@ -10,14 +11,14 @@ import TabPane from './TabPane';
|
|
|
10
11
|
|
|
11
12
|
var propTypes = _extends({}, TabPane.propTypes, {
|
|
12
13
|
|
|
13
|
-
disabled:
|
|
14
|
+
disabled: PropTypes.bool,
|
|
14
15
|
|
|
15
|
-
title:
|
|
16
|
+
title: PropTypes.node,
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* tabClassName is used as className for the associated NavItem
|
|
19
20
|
*/
|
|
20
|
-
tabClassName:
|
|
21
|
+
tabClassName: PropTypes.string
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
var Tab = function (_React$Component) {
|
package/es/TabContainer.js
CHANGED
|
@@ -2,7 +2,8 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutPropert
|
|
|
2
2
|
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
3
3
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
4
4
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
6
7
|
import uncontrollable from 'uncontrollable';
|
|
7
8
|
|
|
8
9
|
var TAB = 'tab';
|
|
@@ -63,7 +64,7 @@ var propTypes = {
|
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
var childContextTypes = {
|
|
66
|
-
$bs_tabContainer:
|
|
67
|
+
$bs_tabContainer: PropTypes.shape({
|
|
67
68
|
activeKey: PropTypes.any,
|
|
68
69
|
onSelect: PropTypes.func.isRequired,
|
|
69
70
|
getTabId: PropTypes.func.isRequired,
|
package/es/TabContent.js
CHANGED
|
@@ -4,7 +4,8 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
|
|
10
11
|
import { bsClass as setBsClass, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';
|
|
@@ -19,6 +20,11 @@ var propTypes = {
|
|
|
19
20
|
*/
|
|
20
21
|
animation: PropTypes.oneOfType([PropTypes.bool, elementType]),
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Wait until the first "enter" transition to mount tabs (add them to the DOM)
|
|
25
|
+
*/
|
|
26
|
+
mountOnEnter: PropTypes.bool,
|
|
27
|
+
|
|
22
28
|
/**
|
|
23
29
|
* Unmount tabs (remove it from the DOM) when they are no longer visible
|
|
24
30
|
*/
|
|
@@ -28,6 +34,7 @@ var propTypes = {
|
|
|
28
34
|
var defaultProps = {
|
|
29
35
|
componentClass: 'div',
|
|
30
36
|
animation: true,
|
|
37
|
+
mountOnEnter: false,
|
|
31
38
|
unmountOnExit: false
|
|
32
39
|
};
|
|
33
40
|
|
|
@@ -42,6 +49,7 @@ var childContextTypes = {
|
|
|
42
49
|
bsClass: PropTypes.string,
|
|
43
50
|
animation: PropTypes.oneOfType([PropTypes.bool, elementType]),
|
|
44
51
|
activeKey: PropTypes.any,
|
|
52
|
+
mountOnEnter: PropTypes.bool,
|
|
45
53
|
unmountOnExit: PropTypes.bool,
|
|
46
54
|
onPaneEnter: PropTypes.func.isRequired,
|
|
47
55
|
onPaneExited: PropTypes.func.isRequired,
|
|
@@ -74,6 +82,7 @@ var TabContent = function (_React$Component) {
|
|
|
74
82
|
var _props = this.props,
|
|
75
83
|
bsClass = _props.bsClass,
|
|
76
84
|
animation = _props.animation,
|
|
85
|
+
mountOnEnter = _props.mountOnEnter,
|
|
77
86
|
unmountOnExit = _props.unmountOnExit;
|
|
78
87
|
|
|
79
88
|
|
|
@@ -88,6 +97,7 @@ var TabContent = function (_React$Component) {
|
|
|
88
97
|
bsClass: bsClass,
|
|
89
98
|
animation: animation,
|
|
90
99
|
activeKey: activeKey,
|
|
100
|
+
mountOnEnter: mountOnEnter,
|
|
91
101
|
unmountOnExit: unmountOnExit,
|
|
92
102
|
onPaneEnter: this.handlePaneEnter,
|
|
93
103
|
onPaneExited: this.handlePaneExited,
|
|
@@ -155,7 +165,7 @@ var TabContent = function (_React$Component) {
|
|
|
155
165
|
className = _props2.className,
|
|
156
166
|
props = _objectWithoutProperties(_props2, ['componentClass', 'className']);
|
|
157
167
|
|
|
158
|
-
var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['animation', 'unmountOnExit']),
|
|
168
|
+
var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['animation', 'mountOnEnter', 'unmountOnExit']),
|
|
159
169
|
bsProps = _splitBsPropsAndOmit[0],
|
|
160
170
|
elementProps = _splitBsPropsAndOmit[1];
|
|
161
171
|
|
package/es/TabPane.js
CHANGED
|
@@ -4,7 +4,8 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
import warning from 'warning';
|
|
10
11
|
|
|
@@ -37,7 +38,7 @@ var propTypes = {
|
|
|
37
38
|
* `<TabContent>`, the `bsClass` of the `<TabContent>` suffixed by `-pane`.
|
|
38
39
|
* If otherwise not explicitly specified, `tab-pane`.
|
|
39
40
|
*/
|
|
40
|
-
bsClass:
|
|
41
|
+
bsClass: PropTypes.string,
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Transition onEnter callback when animation is not `false`
|
|
@@ -69,6 +70,11 @@ var propTypes = {
|
|
|
69
70
|
*/
|
|
70
71
|
onExited: PropTypes.func,
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Wait until the first "enter" transition to mount the tab (add it to the DOM)
|
|
75
|
+
*/
|
|
76
|
+
mountOnEnter: PropTypes.bool,
|
|
77
|
+
|
|
72
78
|
/**
|
|
73
79
|
* Unmount the tab (remove it from the DOM) when it is no longer visible
|
|
74
80
|
*/
|
|
@@ -77,13 +83,14 @@ var propTypes = {
|
|
|
77
83
|
|
|
78
84
|
var contextTypes = {
|
|
79
85
|
$bs_tabContainer: PropTypes.shape({
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
getTabId: PropTypes.func,
|
|
87
|
+
getPaneId: PropTypes.func
|
|
82
88
|
}),
|
|
83
89
|
$bs_tabContent: PropTypes.shape({
|
|
84
90
|
bsClass: PropTypes.string,
|
|
85
91
|
animation: PropTypes.oneOfType([PropTypes.bool, elementType]),
|
|
86
92
|
activeKey: PropTypes.any,
|
|
93
|
+
mountOnEnter: PropTypes.bool,
|
|
87
94
|
unmountOnExit: PropTypes.bool,
|
|
88
95
|
onPaneEnter: PropTypes.func.isRequired,
|
|
89
96
|
onPaneExited: PropTypes.func.isRequired,
|
|
@@ -195,8 +202,9 @@ var TabPane = function (_React$Component) {
|
|
|
195
202
|
onExit = _props.onExit,
|
|
196
203
|
onExiting = _props.onExiting,
|
|
197
204
|
onExited = _props.onExited,
|
|
205
|
+
propsMountOnEnter = _props.mountOnEnter,
|
|
198
206
|
propsUnmountOnExit = _props.unmountOnExit,
|
|
199
|
-
props = _objectWithoutProperties(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'unmountOnExit']);
|
|
207
|
+
props = _objectWithoutProperties(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'mountOnEnter', 'unmountOnExit']);
|
|
200
208
|
|
|
201
209
|
var _context = this.context,
|
|
202
210
|
tabContent = _context.$bs_tabContent,
|
|
@@ -209,6 +217,7 @@ var TabPane = function (_React$Component) {
|
|
|
209
217
|
var active = this.isActive();
|
|
210
218
|
var animation = this.getAnimation();
|
|
211
219
|
|
|
220
|
+
var mountOnEnter = propsMountOnEnter != null ? propsMountOnEnter : tabContent && tabContent.mountOnEnter;
|
|
212
221
|
var unmountOnExit = propsUnmountOnExit != null ? propsUnmountOnExit : tabContent && tabContent.unmountOnExit;
|
|
213
222
|
|
|
214
223
|
if (!active && !animation && unmountOnExit) {
|
|
@@ -251,6 +260,7 @@ var TabPane = function (_React$Component) {
|
|
|
251
260
|
onExit: onExit,
|
|
252
261
|
onExiting: onExiting,
|
|
253
262
|
onExited: createChainedFunction(this.handleExited, onExited),
|
|
263
|
+
mountOnEnter: mountOnEnter,
|
|
254
264
|
unmountOnExit: unmountOnExit
|
|
255
265
|
},
|
|
256
266
|
pane
|
package/es/Table.js
CHANGED
|
@@ -5,15 +5,16 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
|
|
9
10
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
10
11
|
|
|
11
12
|
var propTypes = {
|
|
12
|
-
striped:
|
|
13
|
-
bordered:
|
|
14
|
-
condensed:
|
|
15
|
-
hover:
|
|
16
|
-
responsive:
|
|
13
|
+
striped: PropTypes.bool,
|
|
14
|
+
bordered: PropTypes.bool,
|
|
15
|
+
condensed: PropTypes.bool,
|
|
16
|
+
hover: PropTypes.bool,
|
|
17
|
+
responsive: PropTypes.bool
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
var defaultProps = {
|
package/es/Tabs.js
CHANGED
|
@@ -4,6 +4,7 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import requiredForA11y from 'react-prop-types/lib/isRequiredForA11y';
|
|
8
9
|
import uncontrollable from 'uncontrollable';
|
|
9
10
|
|
|
@@ -22,16 +23,16 @@ var propTypes = {
|
|
|
22
23
|
*
|
|
23
24
|
* @controllable onSelect
|
|
24
25
|
*/
|
|
25
|
-
activeKey:
|
|
26
|
+
activeKey: PropTypes.any,
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Navigation style
|
|
29
30
|
*/
|
|
30
|
-
bsStyle:
|
|
31
|
+
bsStyle: PropTypes.oneOf(['tabs', 'pills']),
|
|
31
32
|
|
|
32
|
-
animation:
|
|
33
|
+
animation: PropTypes.bool,
|
|
33
34
|
|
|
34
|
-
id: requiredForA11y(
|
|
35
|
+
id: requiredForA11y(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
38
|
* Callback fired when a Tab is selected.
|
|
@@ -45,17 +46,23 @@ var propTypes = {
|
|
|
45
46
|
*
|
|
46
47
|
* @controllable activeKey
|
|
47
48
|
*/
|
|
48
|
-
onSelect:
|
|
49
|
+
onSelect: PropTypes.func,
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Wait until the first "enter" transition to mount tabs (add them to the DOM)
|
|
53
|
+
*/
|
|
54
|
+
mountOnEnter: PropTypes.bool,
|
|
49
55
|
|
|
50
56
|
/**
|
|
51
57
|
* Unmount tabs (remove it from the DOM) when it is no longer visible
|
|
52
58
|
*/
|
|
53
|
-
unmountOnExit:
|
|
59
|
+
unmountOnExit: PropTypes.bool
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
var defaultProps = {
|
|
57
63
|
bsStyle: 'tabs',
|
|
58
64
|
animation: true,
|
|
65
|
+
mountOnEnter: false,
|
|
59
66
|
unmountOnExit: false
|
|
60
67
|
};
|
|
61
68
|
|
|
@@ -106,6 +113,7 @@ var Tabs = function (_React$Component) {
|
|
|
106
113
|
id = _props.id,
|
|
107
114
|
onSelect = _props.onSelect,
|
|
108
115
|
animation = _props.animation,
|
|
116
|
+
mountOnEnter = _props.mountOnEnter,
|
|
109
117
|
unmountOnExit = _props.unmountOnExit,
|
|
110
118
|
bsClass = _props.bsClass,
|
|
111
119
|
className = _props.className,
|
|
@@ -113,7 +121,7 @@ var Tabs = function (_React$Component) {
|
|
|
113
121
|
children = _props.children,
|
|
114
122
|
_props$activeKey = _props.activeKey,
|
|
115
123
|
activeKey = _props$activeKey === undefined ? getDefaultActiveKey(children) : _props$activeKey,
|
|
116
|
-
props = _objectWithoutProperties(_props, ['id', 'onSelect', 'animation', 'unmountOnExit', 'bsClass', 'className', 'style', 'children', 'activeKey']);
|
|
124
|
+
props = _objectWithoutProperties(_props, ['id', 'onSelect', 'animation', 'mountOnEnter', 'unmountOnExit', 'bsClass', 'className', 'style', 'children', 'activeKey']);
|
|
117
125
|
|
|
118
126
|
return React.createElement(
|
|
119
127
|
TabContainer,
|
|
@@ -139,6 +147,7 @@ var Tabs = function (_React$Component) {
|
|
|
139
147
|
{
|
|
140
148
|
bsClass: bsClass,
|
|
141
149
|
animation: animation,
|
|
150
|
+
mountOnEnter: mountOnEnter,
|
|
142
151
|
unmountOnExit: unmountOnExit
|
|
143
152
|
},
|
|
144
153
|
children
|
package/es/Thumbnail.js
CHANGED
|
@@ -5,14 +5,15 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
|
|
9
10
|
import SafeAnchor from './SafeAnchor';
|
|
10
11
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
12
|
|
|
12
13
|
var propTypes = {
|
|
13
|
-
src:
|
|
14
|
-
alt:
|
|
15
|
-
href:
|
|
14
|
+
src: PropTypes.string,
|
|
15
|
+
alt: PropTypes.string,
|
|
16
|
+
href: PropTypes.string
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
var Thumbnail = function (_React$Component) {
|
package/es/Tooltip.js
CHANGED
|
@@ -5,6 +5,7 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
5
5
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import isRequiredForA11y from 'react-prop-types/lib/isRequiredForA11y';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -15,30 +16,30 @@ var propTypes = {
|
|
|
15
16
|
* @type {string|number}
|
|
16
17
|
* @required
|
|
17
18
|
*/
|
|
18
|
-
id: isRequiredForA11y(
|
|
19
|
+
id: isRequiredForA11y(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Sets the direction the Tooltip is positioned towards.
|
|
22
23
|
*/
|
|
23
|
-
placement:
|
|
24
|
+
placement: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* The "top" position value for the Tooltip.
|
|
27
28
|
*/
|
|
28
|
-
positionTop:
|
|
29
|
+
positionTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
29
30
|
/**
|
|
30
31
|
* The "left" position value for the Tooltip.
|
|
31
32
|
*/
|
|
32
|
-
positionLeft:
|
|
33
|
+
positionLeft: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* The "top" position value for the Tooltip arrow.
|
|
36
37
|
*/
|
|
37
|
-
arrowOffsetTop:
|
|
38
|
+
arrowOffsetTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
38
39
|
/**
|
|
39
40
|
* The "left" position value for the Tooltip arrow.
|
|
40
41
|
*/
|
|
41
|
-
arrowOffsetLeft:
|
|
42
|
+
arrowOffsetLeft: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
var defaultProps = {
|
package/es/index.js
CHANGED
|
@@ -94,6 +94,8 @@ import _Pager from './Pager';
|
|
|
94
94
|
export { _Pager as Pager };
|
|
95
95
|
import _Pagination from './Pagination';
|
|
96
96
|
export { _Pagination as Pagination };
|
|
97
|
+
import _PaginationButton from './PaginationButton';
|
|
98
|
+
export { _PaginationButton as PaginationButton };
|
|
97
99
|
import _Panel from './Panel';
|
|
98
100
|
export { _Panel as Panel };
|
|
99
101
|
import _PanelGroup from './PanelGroup';
|
|
@@ -3,7 +3,7 @@ import _extends from 'babel-runtime/helpers/extends';
|
|
|
3
3
|
// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.
|
|
4
4
|
|
|
5
5
|
import invariant from 'invariant';
|
|
6
|
-
import
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
7
|
|
|
8
8
|
import { SIZE_MAP } from './StyleConfig';
|
|
9
9
|
|
package/lib/Alert.js
CHANGED
|
@@ -34,6 +34,10 @@ var _react = require('react');
|
|
|
34
34
|
|
|
35
35
|
var _react2 = _interopRequireDefault(_react);
|
|
36
36
|
|
|
37
|
+
var _propTypes = require('prop-types');
|
|
38
|
+
|
|
39
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
40
|
+
|
|
37
41
|
var _bootstrapUtils = require('./utils/bootstrapUtils');
|
|
38
42
|
|
|
39
43
|
var _StyleConfig = require('./utils/StyleConfig');
|
|
@@ -41,8 +45,8 @@ var _StyleConfig = require('./utils/StyleConfig');
|
|
|
41
45
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
42
46
|
|
|
43
47
|
var propTypes = {
|
|
44
|
-
onDismiss:
|
|
45
|
-
closeLabel:
|
|
48
|
+
onDismiss: _propTypes2['default'].func,
|
|
49
|
+
closeLabel: _propTypes2['default'].string
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
var defaultProps = {
|
package/lib/Badge.js
CHANGED
|
@@ -30,6 +30,10 @@ var _react = require('react');
|
|
|
30
30
|
|
|
31
31
|
var _react2 = _interopRequireDefault(_react);
|
|
32
32
|
|
|
33
|
+
var _propTypes = require('prop-types');
|
|
34
|
+
|
|
35
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
36
|
+
|
|
33
37
|
var _bootstrapUtils = require('./utils/bootstrapUtils');
|
|
34
38
|
|
|
35
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
@@ -37,7 +41,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
|
|
|
37
41
|
// TODO: `pullRight` doesn't belong here. There's no special handling here.
|
|
38
42
|
|
|
39
43
|
var propTypes = {
|
|
40
|
-
pullRight:
|
|
44
|
+
pullRight: _propTypes2['default'].bool
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
var defaultProps = {
|
package/lib/BreadcrumbItem.js
CHANGED
|
@@ -30,6 +30,10 @@ var _react = require('react');
|
|
|
30
30
|
|
|
31
31
|
var _react2 = _interopRequireDefault(_react);
|
|
32
32
|
|
|
33
|
+
var _propTypes = require('prop-types');
|
|
34
|
+
|
|
35
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
36
|
+
|
|
33
37
|
var _SafeAnchor = require('./SafeAnchor');
|
|
34
38
|
|
|
35
39
|
var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
|
|
@@ -40,19 +44,19 @@ var propTypes = {
|
|
|
40
44
|
/**
|
|
41
45
|
* If set to true, renders `span` instead of `a`
|
|
42
46
|
*/
|
|
43
|
-
active:
|
|
47
|
+
active: _propTypes2['default'].bool,
|
|
44
48
|
/**
|
|
45
49
|
* `href` attribute for the inner `a` element
|
|
46
50
|
*/
|
|
47
|
-
href:
|
|
51
|
+
href: _propTypes2['default'].string,
|
|
48
52
|
/**
|
|
49
53
|
* `title` attribute for the inner `a` element
|
|
50
54
|
*/
|
|
51
|
-
title:
|
|
55
|
+
title: _propTypes2['default'].node,
|
|
52
56
|
/**
|
|
53
57
|
* `target` attribute for the inner `a` element
|
|
54
58
|
*/
|
|
55
|
-
target:
|
|
59
|
+
target: _propTypes2['default'].string
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
var defaultProps = {
|
package/lib/Button.js
CHANGED
|
@@ -34,6 +34,10 @@ var _react = require('react');
|
|
|
34
34
|
|
|
35
35
|
var _react2 = _interopRequireDefault(_react);
|
|
36
36
|
|
|
37
|
+
var _propTypes = require('prop-types');
|
|
38
|
+
|
|
39
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
40
|
+
|
|
37
41
|
var _elementType = require('react-prop-types/lib/elementType');
|
|
38
42
|
|
|
39
43
|
var _elementType2 = _interopRequireDefault(_elementType);
|
|
@@ -49,17 +53,17 @@ var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
|
|
|
49
53
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
50
54
|
|
|
51
55
|
var propTypes = {
|
|
52
|
-
active:
|
|
53
|
-
disabled:
|
|
54
|
-
block:
|
|
55
|
-
onClick:
|
|
56
|
+
active: _propTypes2['default'].bool,
|
|
57
|
+
disabled: _propTypes2['default'].bool,
|
|
58
|
+
block: _propTypes2['default'].bool,
|
|
59
|
+
onClick: _propTypes2['default'].func,
|
|
56
60
|
componentClass: _elementType2['default'],
|
|
57
|
-
href:
|
|
61
|
+
href: _propTypes2['default'].string,
|
|
58
62
|
/**
|
|
59
63
|
* Defines HTML button type attribute
|
|
60
64
|
* @defaultValue 'button'
|
|
61
65
|
*/
|
|
62
|
-
type:
|
|
66
|
+
type: _propTypes2['default'].oneOf(['button', 'reset', 'submit'])
|
|
63
67
|
};
|
|
64
68
|
|
|
65
69
|
var defaultProps = {
|
package/lib/ButtonGroup.js
CHANGED
|
@@ -30,6 +30,10 @@ var _react = require('react');
|
|
|
30
30
|
|
|
31
31
|
var _react2 = _interopRequireDefault(_react);
|
|
32
32
|
|
|
33
|
+
var _propTypes = require('prop-types');
|
|
34
|
+
|
|
35
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
36
|
+
|
|
33
37
|
var _all = require('react-prop-types/lib/all');
|
|
34
38
|
|
|
35
39
|
var _all2 = _interopRequireDefault(_all);
|
|
@@ -43,14 +47,14 @@ var _bootstrapUtils = require('./utils/bootstrapUtils');
|
|
|
43
47
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
44
48
|
|
|
45
49
|
var propTypes = {
|
|
46
|
-
vertical:
|
|
47
|
-
justified:
|
|
50
|
+
vertical: _propTypes2['default'].bool,
|
|
51
|
+
justified: _propTypes2['default'].bool,
|
|
48
52
|
|
|
49
53
|
/**
|
|
50
54
|
* Display block buttons; only useful when used with the "vertical" prop.
|
|
51
55
|
* @type {bool}
|
|
52
56
|
*/
|
|
53
|
-
block: (0, _all2['default'])(
|
|
57
|
+
block: (0, _all2['default'])(_propTypes2['default'].bool, function (_ref) {
|
|
54
58
|
var block = _ref.block,
|
|
55
59
|
vertical = _ref.vertical;
|
|
56
60
|
return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null;
|
package/lib/Carousel.js
CHANGED
|
@@ -30,6 +30,10 @@ var _react = require('react');
|
|
|
30
30
|
|
|
31
31
|
var _react2 = _interopRequireDefault(_react);
|
|
32
32
|
|
|
33
|
+
var _propTypes = require('prop-types');
|
|
34
|
+
|
|
35
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
36
|
+
|
|
33
37
|
var _CarouselCaption = require('./CarouselCaption');
|
|
34
38
|
|
|
35
39
|
var _CarouselCaption2 = _interopRequireDefault(_CarouselCaption);
|
|
@@ -59,12 +63,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
|
|
|
59
63
|
// TODO: Use uncontrollable.
|
|
60
64
|
|
|
61
65
|
var propTypes = {
|
|
62
|
-
slide:
|
|
63
|
-
indicators:
|
|
64
|
-
interval:
|
|
65
|
-
controls:
|
|
66
|
-
pauseOnHover:
|
|
67
|
-
wrap:
|
|
66
|
+
slide: _propTypes2['default'].bool,
|
|
67
|
+
indicators: _propTypes2['default'].bool,
|
|
68
|
+
interval: _propTypes2['default'].number,
|
|
69
|
+
controls: _propTypes2['default'].bool,
|
|
70
|
+
pauseOnHover: _propTypes2['default'].bool,
|
|
71
|
+
wrap: _propTypes2['default'].bool,
|
|
68
72
|
/**
|
|
69
73
|
* Callback fired when the active item changes.
|
|
70
74
|
*
|
|
@@ -76,25 +80,25 @@ var propTypes = {
|
|
|
76
80
|
* be a persisted event object with `direction` set to the direction of the
|
|
77
81
|
* transition.
|
|
78
82
|
*/
|
|
79
|
-
onSelect:
|
|
80
|
-
onSlideEnd:
|
|
81
|
-
activeIndex:
|
|
82
|
-
defaultActiveIndex:
|
|
83
|
-
direction:
|
|
84
|
-
prevIcon:
|
|
83
|
+
onSelect: _propTypes2['default'].func,
|
|
84
|
+
onSlideEnd: _propTypes2['default'].func,
|
|
85
|
+
activeIndex: _propTypes2['default'].number,
|
|
86
|
+
defaultActiveIndex: _propTypes2['default'].number,
|
|
87
|
+
direction: _propTypes2['default'].oneOf(['prev', 'next']),
|
|
88
|
+
prevIcon: _propTypes2['default'].node,
|
|
85
89
|
/**
|
|
86
90
|
* Label shown to screen readers only, can be used to show the previous element
|
|
87
91
|
* in the carousel.
|
|
88
92
|
* Set to null to deactivate.
|
|
89
93
|
*/
|
|
90
|
-
prevLabel:
|
|
91
|
-
nextIcon:
|
|
94
|
+
prevLabel: _propTypes2['default'].string,
|
|
95
|
+
nextIcon: _propTypes2['default'].node,
|
|
92
96
|
/**
|
|
93
97
|
* Label shown to screen readers only, can be used to show the next element
|
|
94
98
|
* in the carousel.
|
|
95
99
|
* Set to null to deactivate.
|
|
96
100
|
*/
|
|
97
|
-
nextLabel:
|
|
101
|
+
nextLabel: _propTypes2['default'].string
|
|
98
102
|
};
|
|
99
103
|
|
|
100
104
|
var defaultProps = {
|
|
@@ -235,7 +239,7 @@ var Carousel = function (_React$Component) {
|
|
|
235
239
|
return;
|
|
236
240
|
}
|
|
237
241
|
|
|
238
|
-
var previousActiveIndex = this.getActiveIndex();
|
|
242
|
+
var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;
|
|
239
243
|
direction = direction || this.getDirection(previousActiveIndex, index);
|
|
240
244
|
|
|
241
245
|
var onSelect = this.props.onSelect;
|