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/NavbarHeader.js
CHANGED
|
@@ -5,12 +5,13 @@ 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 { prefix } from './utils/bootstrapUtils';
|
|
10
11
|
|
|
11
12
|
var contextTypes = {
|
|
12
|
-
$bs_navbar:
|
|
13
|
-
bsClass:
|
|
13
|
+
$bs_navbar: PropTypes.shape({
|
|
14
|
+
bsClass: PropTypes.string
|
|
14
15
|
})
|
|
15
16
|
};
|
|
16
17
|
|
package/es/NavbarToggle.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
|
|
|
9
10
|
import { prefix } from './utils/bootstrapUtils';
|
|
10
11
|
import createChainedFunction from './utils/createChainedFunction';
|
package/es/Overlay.js
CHANGED
|
@@ -5,6 +5,7 @@ import _inherits from 'babel-runtime/helpers/inherits';
|
|
|
5
5
|
import _extends from 'babel-runtime/helpers/extends';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React, { cloneElement } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import BaseOverlay from 'react-overlays/lib/Overlay';
|
|
9
10
|
import elementType from 'react-prop-types/lib/elementType';
|
|
10
11
|
|
|
@@ -15,57 +16,63 @@ var propTypes = _extends({}, BaseOverlay.propTypes, {
|
|
|
15
16
|
/**
|
|
16
17
|
* Set the visibility of the Overlay
|
|
17
18
|
*/
|
|
18
|
-
show:
|
|
19
|
+
show: PropTypes.bool,
|
|
19
20
|
/**
|
|
20
21
|
* Specify whether the overlay should trigger onHide when the user clicks outside the overlay
|
|
21
22
|
*/
|
|
22
|
-
rootClose:
|
|
23
|
+
rootClose: PropTypes.bool,
|
|
23
24
|
/**
|
|
24
25
|
* A callback invoked by the overlay when it wishes to be hidden. Required if
|
|
25
26
|
* `rootClose` is specified.
|
|
26
27
|
*/
|
|
27
|
-
onHide:
|
|
28
|
+
onHide: PropTypes.func,
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Use animation
|
|
31
32
|
*/
|
|
32
|
-
animation:
|
|
33
|
+
animation: PropTypes.oneOfType([PropTypes.bool, elementType]),
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Callback fired before the Overlay transitions in
|
|
36
37
|
*/
|
|
37
|
-
onEnter:
|
|
38
|
+
onEnter: PropTypes.func,
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* Callback fired as the Overlay begins to transition in
|
|
41
42
|
*/
|
|
42
|
-
onEntering:
|
|
43
|
+
onEntering: PropTypes.func,
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* Callback fired after the Overlay finishes transitioning in
|
|
46
47
|
*/
|
|
47
|
-
onEntered:
|
|
48
|
+
onEntered: PropTypes.func,
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* Callback fired right before the Overlay transitions out
|
|
51
52
|
*/
|
|
52
|
-
onExit:
|
|
53
|
+
onExit: PropTypes.func,
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* Callback fired as the Overlay begins to transition out
|
|
56
57
|
*/
|
|
57
|
-
onExiting:
|
|
58
|
+
onExiting: PropTypes.func,
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Callback fired after the Overlay finishes transitioning out
|
|
61
62
|
*/
|
|
62
|
-
onExited:
|
|
63
|
+
onExited: PropTypes.func,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Sets the direction of the Overlay.
|
|
67
|
+
*/
|
|
68
|
+
placement: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])
|
|
63
69
|
});
|
|
64
70
|
|
|
65
71
|
var defaultProps = {
|
|
66
72
|
animation: Fade,
|
|
67
73
|
rootClose: false,
|
|
68
|
-
show: false
|
|
74
|
+
show: false,
|
|
75
|
+
placement: 'right'
|
|
69
76
|
};
|
|
70
77
|
|
|
71
78
|
var Overlay = function (_React$Component) {
|
package/es/OverlayTrigger.js
CHANGED
|
@@ -5,6 +5,7 @@ import _inherits from 'babel-runtime/helpers/inherits';
|
|
|
5
5
|
import _extends from 'babel-runtime/helpers/extends';
|
|
6
6
|
import contains from 'dom-helpers/query/contains';
|
|
7
7
|
import React, { cloneElement } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import ReactDOM from 'react-dom';
|
|
9
10
|
import warning from 'warning';
|
|
10
11
|
|
|
@@ -26,74 +27,74 @@ function isOneOf(one, of) {
|
|
|
26
27
|
return one === of;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
var triggerType =
|
|
30
|
+
var triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);
|
|
30
31
|
|
|
31
32
|
var propTypes = _extends({}, Overlay.propTypes, {
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
35
|
* Specify which action or actions trigger Overlay visibility
|
|
35
36
|
*/
|
|
36
|
-
trigger:
|
|
37
|
+
trigger: PropTypes.oneOfType([triggerType, PropTypes.arrayOf(triggerType)]),
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* A millisecond delay amount to show and hide the Overlay once triggered
|
|
40
41
|
*/
|
|
41
|
-
delay:
|
|
42
|
+
delay: PropTypes.number,
|
|
42
43
|
/**
|
|
43
44
|
* A millisecond delay amount before showing the Overlay once triggered.
|
|
44
45
|
*/
|
|
45
|
-
delayShow:
|
|
46
|
+
delayShow: PropTypes.number,
|
|
46
47
|
/**
|
|
47
48
|
* A millisecond delay amount before hiding the Overlay once triggered.
|
|
48
49
|
*/
|
|
49
|
-
delayHide:
|
|
50
|
+
delayHide: PropTypes.number,
|
|
50
51
|
|
|
51
52
|
// FIXME: This should be `defaultShow`.
|
|
52
53
|
/**
|
|
53
54
|
* The initial visibility state of the Overlay. For more nuanced visibility
|
|
54
55
|
* control, consider using the Overlay component directly.
|
|
55
56
|
*/
|
|
56
|
-
defaultOverlayShown:
|
|
57
|
+
defaultOverlayShown: PropTypes.bool,
|
|
57
58
|
|
|
58
59
|
/**
|
|
59
60
|
* An element or text to overlay next to the target.
|
|
60
61
|
*/
|
|
61
|
-
overlay:
|
|
62
|
+
overlay: PropTypes.node.isRequired,
|
|
62
63
|
|
|
63
64
|
/**
|
|
64
65
|
* @private
|
|
65
66
|
*/
|
|
66
|
-
onBlur:
|
|
67
|
+
onBlur: PropTypes.func,
|
|
67
68
|
/**
|
|
68
69
|
* @private
|
|
69
70
|
*/
|
|
70
|
-
onClick:
|
|
71
|
+
onClick: PropTypes.func,
|
|
71
72
|
/**
|
|
72
73
|
* @private
|
|
73
74
|
*/
|
|
74
|
-
onFocus:
|
|
75
|
+
onFocus: PropTypes.func,
|
|
75
76
|
/**
|
|
76
77
|
* @private
|
|
77
78
|
*/
|
|
78
|
-
onMouseOut:
|
|
79
|
+
onMouseOut: PropTypes.func,
|
|
79
80
|
/**
|
|
80
81
|
* @private
|
|
81
82
|
*/
|
|
82
|
-
onMouseOver:
|
|
83
|
+
onMouseOver: PropTypes.func,
|
|
83
84
|
|
|
84
85
|
// Overridden props from `<Overlay>`.
|
|
85
86
|
/**
|
|
86
87
|
* @private
|
|
87
88
|
*/
|
|
88
|
-
target:
|
|
89
|
+
target: PropTypes.oneOf([null]),
|
|
89
90
|
/**
|
|
90
91
|
* @private
|
|
91
92
|
*/
|
|
92
|
-
onHide:
|
|
93
|
+
onHide: PropTypes.oneOf([null]),
|
|
93
94
|
/**
|
|
94
95
|
* @private
|
|
95
96
|
*/
|
|
96
|
-
show:
|
|
97
|
+
show: PropTypes.oneOf([null])
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
var defaultProps = {
|
|
@@ -268,10 +269,11 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
268
269
|
|
|
269
270
|
var child = React.Children.only(children);
|
|
270
271
|
var childProps = child.props;
|
|
272
|
+
var triggerProps = {};
|
|
271
273
|
|
|
272
|
-
|
|
273
|
-
'aria-describedby'
|
|
274
|
-
}
|
|
274
|
+
if (this.state.show) {
|
|
275
|
+
triggerProps['aria-describedby'] = overlay.props.id;
|
|
276
|
+
}
|
|
275
277
|
|
|
276
278
|
// FIXME: The logic here for passing through handlers on this component is
|
|
277
279
|
// inconsistent. We shouldn't be passing any of these props through.
|
package/es/Pager.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, { cloneElement } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
|
|
9
10
|
import PagerItem from './PagerItem';
|
|
10
11
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -12,7 +13,7 @@ import createChainedFunction from './utils/createChainedFunction';
|
|
|
12
13
|
import ValidComponentChildren from './utils/ValidComponentChildren';
|
|
13
14
|
|
|
14
15
|
var propTypes = {
|
|
15
|
-
onSelect:
|
|
16
|
+
onSelect: PropTypes.func
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
var Pager = function (_React$Component) {
|
package/es/PagerItem.js
CHANGED
|
@@ -5,17 +5,18 @@ 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 createChainedFunction from './utils/createChainedFunction';
|
|
11
12
|
|
|
12
13
|
var propTypes = {
|
|
13
|
-
disabled:
|
|
14
|
-
previous:
|
|
15
|
-
next:
|
|
16
|
-
onClick:
|
|
17
|
-
onSelect:
|
|
18
|
-
eventKey:
|
|
14
|
+
disabled: PropTypes.bool,
|
|
15
|
+
previous: PropTypes.bool,
|
|
16
|
+
next: PropTypes.bool,
|
|
17
|
+
onClick: PropTypes.func,
|
|
18
|
+
onSelect: PropTypes.func,
|
|
19
|
+
eventKey: PropTypes.any
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
var defaultProps = {
|
package/es/Pagination.js
CHANGED
|
@@ -5,52 +5,54 @@ 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 elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
|
|
10
11
|
import PaginationButton from './PaginationButton';
|
|
11
12
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
12
13
|
|
|
13
14
|
var propTypes = {
|
|
14
|
-
activePage:
|
|
15
|
-
items:
|
|
16
|
-
maxButtons:
|
|
15
|
+
activePage: PropTypes.number,
|
|
16
|
+
items: PropTypes.number,
|
|
17
|
+
maxButtons: PropTypes.number,
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
|
-
* When `true`, will display the first and the last button page
|
|
20
|
+
* When `true`, will display the first and the last button page when
|
|
21
|
+
* displaying ellipsis.
|
|
20
22
|
*/
|
|
21
|
-
boundaryLinks:
|
|
23
|
+
boundaryLinks: PropTypes.bool,
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* When `true`, will display the default node value ('…').
|
|
25
27
|
* Otherwise, will display provided node (when specified).
|
|
26
28
|
*/
|
|
27
|
-
ellipsis:
|
|
29
|
+
ellipsis: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* When `true`, will display the default node value ('«').
|
|
31
33
|
* Otherwise, will display provided node (when specified).
|
|
32
34
|
*/
|
|
33
|
-
first:
|
|
35
|
+
first: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* When `true`, will display the default node value ('»').
|
|
37
39
|
* Otherwise, will display provided node (when specified).
|
|
38
40
|
*/
|
|
39
|
-
last:
|
|
41
|
+
last: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* When `true`, will display the default node value ('‹').
|
|
43
45
|
* Otherwise, will display provided node (when specified).
|
|
44
46
|
*/
|
|
45
|
-
prev:
|
|
47
|
+
prev: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
46
48
|
|
|
47
49
|
/**
|
|
48
50
|
* When `true`, will display the default node value ('›').
|
|
49
51
|
* Otherwise, will display provided node (when specified).
|
|
50
52
|
*/
|
|
51
|
-
next:
|
|
53
|
+
next: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
52
54
|
|
|
53
|
-
onSelect:
|
|
55
|
+
onSelect: PropTypes.func,
|
|
54
56
|
|
|
55
57
|
/**
|
|
56
58
|
* You can use a custom element for the buttons
|
|
@@ -84,53 +86,43 @@ var Pagination = function (_React$Component) {
|
|
|
84
86
|
|
|
85
87
|
var startPage = void 0;
|
|
86
88
|
var endPage = void 0;
|
|
87
|
-
var hasHiddenPagesAfter = void 0;
|
|
88
89
|
|
|
89
|
-
if (maxButtons) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
hasHiddenPagesAfter = items >= startPage + maxButtons;
|
|
93
|
-
|
|
94
|
-
if (!hasHiddenPagesAfter) {
|
|
95
|
-
endPage = items;
|
|
96
|
-
startPage = items - maxButtons + 1;
|
|
97
|
-
if (startPage < 1) {
|
|
98
|
-
startPage = 1;
|
|
99
|
-
}
|
|
100
|
-
} else {
|
|
101
|
-
endPage = startPage + maxButtons - 1;
|
|
102
|
-
}
|
|
90
|
+
if (maxButtons && maxButtons < items) {
|
|
91
|
+
startPage = Math.max(Math.min(activePage - Math.floor(maxButtons / 2, 10), items - maxButtons + 1), 1);
|
|
92
|
+
endPage = startPage + maxButtons - 1;
|
|
103
93
|
} else {
|
|
104
94
|
startPage = 1;
|
|
105
95
|
endPage = items;
|
|
106
96
|
}
|
|
107
97
|
|
|
108
|
-
for (var
|
|
98
|
+
for (var page = startPage; page <= endPage; ++page) {
|
|
109
99
|
pageButtons.push(React.createElement(
|
|
110
100
|
PaginationButton,
|
|
111
101
|
_extends({}, buttonProps, {
|
|
112
|
-
key:
|
|
113
|
-
eventKey:
|
|
114
|
-
active:
|
|
102
|
+
key: page,
|
|
103
|
+
eventKey: page,
|
|
104
|
+
active: page === activePage
|
|
115
105
|
}),
|
|
116
|
-
|
|
106
|
+
page
|
|
117
107
|
));
|
|
118
108
|
}
|
|
119
109
|
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
if (ellipsis && boundaryLinks && startPage > 1) {
|
|
111
|
+
if (startPage > 2) {
|
|
112
|
+
pageButtons.unshift(React.createElement(
|
|
113
|
+
PaginationButton,
|
|
114
|
+
{
|
|
115
|
+
key: 'ellipsisFirst',
|
|
116
|
+
disabled: true,
|
|
117
|
+
componentClass: buttonProps.componentClass
|
|
118
|
+
},
|
|
119
|
+
React.createElement(
|
|
120
|
+
'span',
|
|
121
|
+
{ 'aria-label': 'More' },
|
|
122
|
+
ellipsis === true ? '\u2026' : ellipsis
|
|
123
|
+
)
|
|
124
|
+
));
|
|
125
|
+
}
|
|
134
126
|
|
|
135
127
|
pageButtons.unshift(React.createElement(
|
|
136
128
|
PaginationButton,
|
|
@@ -143,22 +135,24 @@ var Pagination = function (_React$Component) {
|
|
|
143
135
|
));
|
|
144
136
|
}
|
|
145
137
|
|
|
146
|
-
if (
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
138
|
+
if (ellipsis && endPage < items) {
|
|
139
|
+
if (!boundaryLinks || endPage < items - 1) {
|
|
140
|
+
pageButtons.push(React.createElement(
|
|
141
|
+
PaginationButton,
|
|
142
|
+
{
|
|
143
|
+
key: 'ellipsis',
|
|
144
|
+
disabled: true,
|
|
145
|
+
componentClass: buttonProps.componentClass
|
|
146
|
+
},
|
|
147
|
+
React.createElement(
|
|
148
|
+
'span',
|
|
149
|
+
{ 'aria-label': 'More' },
|
|
150
|
+
ellipsis === true ? '\u2026' : ellipsis
|
|
151
|
+
)
|
|
152
|
+
));
|
|
153
|
+
}
|
|
160
154
|
|
|
161
|
-
if (boundaryLinks
|
|
155
|
+
if (boundaryLinks) {
|
|
162
156
|
pageButtons.push(React.createElement(
|
|
163
157
|
PaginationButton,
|
|
164
158
|
_extends({}, buttonProps, {
|
package/es/PaginationButton.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 elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
|
|
10
11
|
import SafeAnchor from './SafeAnchor';
|
|
@@ -16,12 +17,12 @@ import createChainedFunction from './utils/createChainedFunction';
|
|
|
16
17
|
|
|
17
18
|
var propTypes = {
|
|
18
19
|
componentClass: elementType,
|
|
19
|
-
className:
|
|
20
|
-
eventKey:
|
|
21
|
-
onSelect:
|
|
22
|
-
disabled:
|
|
23
|
-
active:
|
|
24
|
-
onClick:
|
|
20
|
+
className: PropTypes.string,
|
|
21
|
+
eventKey: PropTypes.any,
|
|
22
|
+
onSelect: PropTypes.func,
|
|
23
|
+
disabled: PropTypes.bool,
|
|
24
|
+
active: PropTypes.bool,
|
|
25
|
+
onClick: PropTypes.func
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
var defaultProps = {
|
package/es/Panel.js
CHANGED
|
@@ -6,6 +6,7 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
6
6
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React, { cloneElement } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
10
11
|
import Collapse from './Collapse';
|
|
11
12
|
import { bsStyles, bsClass, getClassSet, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';
|
|
@@ -14,24 +15,24 @@ import { State, Style } from './utils/StyleConfig';
|
|
|
14
15
|
// TODO: Use uncontrollable.
|
|
15
16
|
|
|
16
17
|
var propTypes = {
|
|
17
|
-
collapsible:
|
|
18
|
-
onSelect:
|
|
19
|
-
header:
|
|
20
|
-
id:
|
|
21
|
-
footer:
|
|
22
|
-
defaultExpanded:
|
|
23
|
-
expanded:
|
|
24
|
-
eventKey:
|
|
25
|
-
headerRole:
|
|
26
|
-
panelRole:
|
|
18
|
+
collapsible: PropTypes.bool,
|
|
19
|
+
onSelect: PropTypes.func,
|
|
20
|
+
header: PropTypes.node,
|
|
21
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
22
|
+
footer: PropTypes.node,
|
|
23
|
+
defaultExpanded: PropTypes.bool,
|
|
24
|
+
expanded: PropTypes.bool,
|
|
25
|
+
eventKey: PropTypes.any,
|
|
26
|
+
headerRole: PropTypes.string,
|
|
27
|
+
panelRole: PropTypes.string,
|
|
27
28
|
|
|
28
29
|
// From Collapse.
|
|
29
|
-
onEnter:
|
|
30
|
-
onEntering:
|
|
31
|
-
onEntered:
|
|
32
|
-
onExit:
|
|
33
|
-
onExiting:
|
|
34
|
-
onExited:
|
|
30
|
+
onEnter: PropTypes.func,
|
|
31
|
+
onEntering: PropTypes.func,
|
|
32
|
+
onEntered: PropTypes.func,
|
|
33
|
+
onExit: PropTypes.func,
|
|
34
|
+
onExiting: PropTypes.func,
|
|
35
|
+
onExited: PropTypes.func
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
var defaultProps = {
|
|
@@ -70,10 +71,6 @@ var Panel = function (_React$Component) {
|
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
|
|
73
|
-
Panel.prototype.shouldRenderFill = function shouldRenderFill(child) {
|
|
74
|
-
return React.isValidElement(child) && child.props.fill != null;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
74
|
Panel.prototype.renderHeader = function renderHeader(collapsible, header, id, role, expanded, bsProps) {
|
|
78
75
|
var titleClassName = prefix(bsProps, 'title');
|
|
79
76
|
|
package/es/PanelGroup.js
CHANGED
|
@@ -6,17 +6,18 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
6
6
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React, { cloneElement } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, splitBsPropsAndOmit } from './utils/bootstrapUtils';
|
|
11
12
|
import createChainedFunction from './utils/createChainedFunction';
|
|
12
13
|
import ValidComponentChildren from './utils/ValidComponentChildren';
|
|
13
14
|
|
|
14
15
|
var propTypes = {
|
|
15
|
-
accordion:
|
|
16
|
-
activeKey:
|
|
17
|
-
defaultActiveKey:
|
|
18
|
-
onSelect:
|
|
19
|
-
role:
|
|
16
|
+
accordion: PropTypes.bool,
|
|
17
|
+
activeKey: PropTypes.any,
|
|
18
|
+
defaultActiveKey: PropTypes.any,
|
|
19
|
+
onSelect: PropTypes.func,
|
|
20
|
+
role: PropTypes.string
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
var defaultProps = {
|
package/es/Popover.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,35 +16,35 @@ var propTypes = {
|
|
|
15
16
|
* @type {string}
|
|
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 Popover 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 Popover.
|
|
27
28
|
*/
|
|
28
|
-
positionTop:
|
|
29
|
+
positionTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
29
30
|
/**
|
|
30
31
|
* The "left" position value for the Popover.
|
|
31
32
|
*/
|
|
32
|
-
positionLeft:
|
|
33
|
+
positionLeft: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* The "top" position value for the Popover arrow.
|
|
36
37
|
*/
|
|
37
|
-
arrowOffsetTop:
|
|
38
|
+
arrowOffsetTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
38
39
|
/**
|
|
39
40
|
* The "left" position value for the Popover arrow.
|
|
40
41
|
*/
|
|
41
|
-
arrowOffsetLeft:
|
|
42
|
+
arrowOffsetLeft: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Title content
|
|
45
46
|
*/
|
|
46
|
-
title:
|
|
47
|
+
title: PropTypes.node
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
var defaultProps = {
|
package/es/ProgressBar.js
CHANGED
|
@@ -5,7 +5,8 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
|
|
5
5
|
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
6
6
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import React, { cloneElement
|
|
8
|
+
import React, { cloneElement } from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
10
11
|
import { bsClass as setBsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
11
12
|
import { State } from './utils/StyleConfig';
|
package/es/Radio.js
CHANGED
|
@@ -5,17 +5,18 @@ 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 warning from 'warning';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
11
12
|
|
|
12
13
|
var propTypes = {
|
|
13
|
-
inline:
|
|
14
|
-
disabled:
|
|
14
|
+
inline: PropTypes.bool,
|
|
15
|
+
disabled: PropTypes.bool,
|
|
15
16
|
/**
|
|
16
17
|
* Only valid if `inline` is not set.
|
|
17
18
|
*/
|
|
18
|
-
validationState:
|
|
19
|
+
validationState: PropTypes.oneOf(['success', 'warning', 'error', null]),
|
|
19
20
|
/**
|
|
20
21
|
* Attaches a ref to the `<input>` element. Only functions can be used here.
|
|
21
22
|
*
|
|
@@ -23,7 +24,7 @@ var propTypes = {
|
|
|
23
24
|
* <Radio inputRef={ref => { this.input = ref; }} />
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
|
-
inputRef:
|
|
27
|
+
inputRef: PropTypes.func
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
var defaultProps = {
|
package/es/ResponsiveEmbed.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, { cloneElement
|
|
7
|
+
import React, { cloneElement } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import warning from 'warning';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|