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.
Files changed (138) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +2 -2
  3. package/dist/react-bootstrap.js +3161 -1664
  4. package/dist/react-bootstrap.min.js +9 -9
  5. package/dist/react-bootstrap.min.js.map +1 -1
  6. package/es/Alert.js +3 -2
  7. package/es/Badge.js +2 -1
  8. package/es/BreadcrumbItem.js +5 -4
  9. package/es/Button.js +7 -6
  10. package/es/ButtonGroup.js +4 -3
  11. package/es/Carousel.js +17 -16
  12. package/es/CarouselItem.js +7 -6
  13. package/es/Checkbox.js +5 -4
  14. package/es/Clearfix.js +5 -4
  15. package/es/Col.js +21 -20
  16. package/es/Collapse.js +20 -13
  17. package/es/ControlLabel.js +4 -3
  18. package/es/Dropdown.js +34 -22
  19. package/es/DropdownButton.js +6 -5
  20. package/es/DropdownMenu.js +19 -14
  21. package/es/DropdownToggle.js +5 -4
  22. package/es/Fade.js +17 -10
  23. package/es/Form.js +3 -2
  24. package/es/FormControl.js +27 -6
  25. package/es/FormControlFeedback.js +2 -1
  26. package/es/FormGroup.js +4 -3
  27. package/es/Glyphicon.js +3 -2
  28. package/es/Grid.js +2 -1
  29. package/es/Image.js +5 -4
  30. package/es/ListGroupItem.js +8 -7
  31. package/es/MediaLeft.js +2 -1
  32. package/es/MediaRight.js +2 -1
  33. package/es/MenuItem.js +9 -8
  34. package/es/Modal.js +22 -15
  35. package/es/ModalBody.js +15 -2
  36. package/es/ModalDialog.js +2 -1
  37. package/es/ModalFooter.js +15 -2
  38. package/es/ModalHeader.js +7 -6
  39. package/es/ModalTitle.js +15 -2
  40. package/es/Nav.js +20 -19
  41. package/es/NavDropdown.js +5 -4
  42. package/es/NavItem.js +8 -7
  43. package/es/Navbar.js +17 -15
  44. package/es/NavbarBrand.js +3 -2
  45. package/es/NavbarCollapse.js +2 -1
  46. package/es/NavbarHeader.js +3 -2
  47. package/es/NavbarToggle.js +2 -1
  48. package/es/Overlay.js +18 -11
  49. package/es/OverlayTrigger.js +20 -18
  50. package/es/Pager.js +2 -1
  51. package/es/PagerItem.js +7 -6
  52. package/es/Pagination.js +54 -60
  53. package/es/PaginationButton.js +7 -6
  54. package/es/Panel.js +17 -20
  55. package/es/PanelGroup.js +6 -5
  56. package/es/Popover.js +8 -7
  57. package/es/ProgressBar.js +2 -1
  58. package/es/Radio.js +5 -4
  59. package/es/ResponsiveEmbed.js +2 -1
  60. package/es/SafeAnchor.js +6 -5
  61. package/es/SplitButton.js +8 -7
  62. package/es/Tab.js +4 -3
  63. package/es/TabContainer.js +3 -2
  64. package/es/TabContent.js +12 -2
  65. package/es/TabPane.js +15 -5
  66. package/es/Table.js +6 -5
  67. package/es/Tabs.js +16 -7
  68. package/es/Thumbnail.js +4 -3
  69. package/es/Tooltip.js +7 -6
  70. package/es/index.js +2 -0
  71. package/es/utils/bootstrapUtils.js +1 -1
  72. package/lib/Alert.js +6 -2
  73. package/lib/Badge.js +5 -1
  74. package/lib/BreadcrumbItem.js +8 -4
  75. package/lib/Button.js +10 -6
  76. package/lib/ButtonGroup.js +7 -3
  77. package/lib/Carousel.js +20 -16
  78. package/lib/CarouselItem.js +10 -6
  79. package/lib/Checkbox.js +8 -4
  80. package/lib/Clearfix.js +8 -4
  81. package/lib/Col.js +24 -20
  82. package/lib/Collapse.js +23 -13
  83. package/lib/ControlLabel.js +7 -3
  84. package/lib/Dropdown.js +37 -22
  85. package/lib/DropdownButton.js +9 -5
  86. package/lib/DropdownMenu.js +21 -13
  87. package/lib/DropdownToggle.js +8 -4
  88. package/lib/Fade.js +20 -10
  89. package/lib/Form.js +6 -2
  90. package/lib/FormControl.js +29 -5
  91. package/lib/FormControlFeedback.js +5 -1
  92. package/lib/FormGroup.js +7 -3
  93. package/lib/Glyphicon.js +6 -2
  94. package/lib/Grid.js +5 -1
  95. package/lib/Image.js +8 -4
  96. package/lib/ListGroupItem.js +11 -7
  97. package/lib/MediaLeft.js +5 -1
  98. package/lib/MediaRight.js +5 -1
  99. package/lib/MenuItem.js +12 -8
  100. package/lib/Modal.js +25 -15
  101. package/lib/ModalBody.js +18 -2
  102. package/lib/ModalDialog.js +5 -1
  103. package/lib/ModalFooter.js +18 -2
  104. package/lib/ModalHeader.js +10 -6
  105. package/lib/ModalTitle.js +18 -2
  106. package/lib/Nav.js +23 -19
  107. package/lib/NavDropdown.js +8 -4
  108. package/lib/NavItem.js +11 -7
  109. package/lib/Navbar.js +27 -25
  110. package/lib/NavbarBrand.js +6 -2
  111. package/lib/NavbarCollapse.js +7 -3
  112. package/lib/NavbarHeader.js +6 -2
  113. package/lib/NavbarToggle.js +10 -6
  114. package/lib/Overlay.js +21 -11
  115. package/lib/OverlayTrigger.js +23 -18
  116. package/lib/Pager.js +5 -1
  117. package/lib/PagerItem.js +10 -6
  118. package/lib/Pagination.js +58 -61
  119. package/lib/PaginationButton.js +10 -6
  120. package/lib/Panel.js +20 -20
  121. package/lib/PanelGroup.js +9 -5
  122. package/lib/Popover.js +11 -7
  123. package/lib/ProgressBar.js +12 -8
  124. package/lib/Radio.js +8 -4
  125. package/lib/ResponsiveEmbed.js +7 -3
  126. package/lib/SafeAnchor.js +9 -5
  127. package/lib/SplitButton.js +11 -7
  128. package/lib/Tab.js +7 -3
  129. package/lib/TabContainer.js +13 -9
  130. package/lib/TabContent.js +26 -13
  131. package/lib/TabPane.js +38 -25
  132. package/lib/Table.js +9 -5
  133. package/lib/Tabs.js +19 -7
  134. package/lib/Thumbnail.js +7 -3
  135. package/lib/Tooltip.js +10 -6
  136. package/lib/index.js +6 -1
  137. package/lib/utils/bootstrapUtils.js +6 -4
  138. package/package.json +10 -8
@@ -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: React.PropTypes.shape({
13
- bsClass: React.PropTypes.string
13
+ $bs_navbar: PropTypes.shape({
14
+ bsClass: PropTypes.string
14
15
  })
15
16
  };
16
17
 
@@ -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, { PropTypes } from '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: React.PropTypes.bool,
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: React.PropTypes.bool,
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: React.PropTypes.func,
28
+ onHide: PropTypes.func,
28
29
 
29
30
  /**
30
31
  * Use animation
31
32
  */
32
- animation: React.PropTypes.oneOfType([React.PropTypes.bool, elementType]),
33
+ animation: PropTypes.oneOfType([PropTypes.bool, elementType]),
33
34
 
34
35
  /**
35
36
  * Callback fired before the Overlay transitions in
36
37
  */
37
- onEnter: React.PropTypes.func,
38
+ onEnter: PropTypes.func,
38
39
 
39
40
  /**
40
41
  * Callback fired as the Overlay begins to transition in
41
42
  */
42
- onEntering: React.PropTypes.func,
43
+ onEntering: PropTypes.func,
43
44
 
44
45
  /**
45
46
  * Callback fired after the Overlay finishes transitioning in
46
47
  */
47
- onEntered: React.PropTypes.func,
48
+ onEntered: PropTypes.func,
48
49
 
49
50
  /**
50
51
  * Callback fired right before the Overlay transitions out
51
52
  */
52
- onExit: React.PropTypes.func,
53
+ onExit: PropTypes.func,
53
54
 
54
55
  /**
55
56
  * Callback fired as the Overlay begins to transition out
56
57
  */
57
- onExiting: React.PropTypes.func,
58
+ onExiting: PropTypes.func,
58
59
 
59
60
  /**
60
61
  * Callback fired after the Overlay finishes transitioning out
61
62
  */
62
- onExited: React.PropTypes.func
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) {
@@ -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 = React.PropTypes.oneOf(['click', 'hover', 'focus']);
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: React.PropTypes.oneOfType([triggerType, React.PropTypes.arrayOf(triggerType)]),
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: React.PropTypes.number,
42
+ delay: PropTypes.number,
42
43
  /**
43
44
  * A millisecond delay amount before showing the Overlay once triggered.
44
45
  */
45
- delayShow: React.PropTypes.number,
46
+ delayShow: PropTypes.number,
46
47
  /**
47
48
  * A millisecond delay amount before hiding the Overlay once triggered.
48
49
  */
49
- delayHide: React.PropTypes.number,
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: React.PropTypes.bool,
57
+ defaultOverlayShown: PropTypes.bool,
57
58
 
58
59
  /**
59
60
  * An element or text to overlay next to the target.
60
61
  */
61
- overlay: React.PropTypes.node.isRequired,
62
+ overlay: PropTypes.node.isRequired,
62
63
 
63
64
  /**
64
65
  * @private
65
66
  */
66
- onBlur: React.PropTypes.func,
67
+ onBlur: PropTypes.func,
67
68
  /**
68
69
  * @private
69
70
  */
70
- onClick: React.PropTypes.func,
71
+ onClick: PropTypes.func,
71
72
  /**
72
73
  * @private
73
74
  */
74
- onFocus: React.PropTypes.func,
75
+ onFocus: PropTypes.func,
75
76
  /**
76
77
  * @private
77
78
  */
78
- onMouseOut: React.PropTypes.func,
79
+ onMouseOut: PropTypes.func,
79
80
  /**
80
81
  * @private
81
82
  */
82
- onMouseOver: React.PropTypes.func,
83
+ onMouseOver: PropTypes.func,
83
84
 
84
85
  // Overridden props from `<Overlay>`.
85
86
  /**
86
87
  * @private
87
88
  */
88
- target: React.PropTypes.oneOf([null]),
89
+ target: PropTypes.oneOf([null]),
89
90
  /**
90
91
  * @private
91
92
  */
92
- onHide: React.PropTypes.oneOf([null]),
93
+ onHide: PropTypes.oneOf([null]),
93
94
  /**
94
95
  * @private
95
96
  */
96
- show: React.PropTypes.oneOf([null])
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
- var triggerProps = {
273
- 'aria-describedby': overlay.props.id
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: React.PropTypes.func
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: React.PropTypes.bool,
14
- previous: React.PropTypes.bool,
15
- next: React.PropTypes.bool,
16
- onClick: React.PropTypes.func,
17
- onSelect: React.PropTypes.func,
18
- eventKey: React.PropTypes.any
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: React.PropTypes.number,
15
- items: React.PropTypes.number,
16
- maxButtons: React.PropTypes.number,
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: React.PropTypes.bool,
23
+ boundaryLinks: PropTypes.bool,
22
24
 
23
25
  /**
24
26
  * When `true`, will display the default node value ('&hellip;').
25
27
  * Otherwise, will display provided node (when specified).
26
28
  */
27
- ellipsis: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.node]),
29
+ ellipsis: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
28
30
 
29
31
  /**
30
32
  * When `true`, will display the default node value ('&laquo;').
31
33
  * Otherwise, will display provided node (when specified).
32
34
  */
33
- first: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.node]),
35
+ first: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
34
36
 
35
37
  /**
36
38
  * When `true`, will display the default node value ('&raquo;').
37
39
  * Otherwise, will display provided node (when specified).
38
40
  */
39
- last: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.node]),
41
+ last: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
40
42
 
41
43
  /**
42
44
  * When `true`, will display the default node value ('&lsaquo;').
43
45
  * Otherwise, will display provided node (when specified).
44
46
  */
45
- prev: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.node]),
47
+ prev: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
46
48
 
47
49
  /**
48
50
  * When `true`, will display the default node value ('&rsaquo;').
49
51
  * Otherwise, will display provided node (when specified).
50
52
  */
51
- next: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.node]),
53
+ next: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
52
54
 
53
- onSelect: React.PropTypes.func,
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
- var hiddenPagesBefore = activePage - parseInt(maxButtons / 2, 10);
91
- startPage = Math.max(hiddenPagesBefore, 1);
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 pagenumber = startPage; pagenumber <= endPage; pagenumber++) {
98
+ for (var page = startPage; page <= endPage; ++page) {
109
99
  pageButtons.push(React.createElement(
110
100
  PaginationButton,
111
101
  _extends({}, buttonProps, {
112
- key: pagenumber,
113
- eventKey: pagenumber,
114
- active: pagenumber === activePage
102
+ key: page,
103
+ eventKey: page,
104
+ active: page === activePage
115
105
  }),
116
- pagenumber
106
+ page
117
107
  ));
118
108
  }
119
109
 
120
- if (boundaryLinks && ellipsis && startPage !== 1) {
121
- pageButtons.unshift(React.createElement(
122
- PaginationButton,
123
- {
124
- key: 'ellipsisFirst',
125
- disabled: true,
126
- componentClass: buttonProps.componentClass
127
- },
128
- React.createElement(
129
- 'span',
130
- { 'aria-label': 'More' },
131
- ellipsis === true ? '\u2026' : ellipsis
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 (maxButtons && hasHiddenPagesAfter && ellipsis) {
147
- pageButtons.push(React.createElement(
148
- PaginationButton,
149
- {
150
- key: 'ellipsis',
151
- disabled: true,
152
- componentClass: buttonProps.componentClass
153
- },
154
- React.createElement(
155
- 'span',
156
- { 'aria-label': 'More' },
157
- ellipsis === true ? '\u2026' : ellipsis
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 && endPage !== items) {
155
+ if (boundaryLinks) {
162
156
  pageButtons.push(React.createElement(
163
157
  PaginationButton,
164
158
  _extends({}, buttonProps, {
@@ -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: React.PropTypes.string,
20
- eventKey: React.PropTypes.any,
21
- onSelect: React.PropTypes.func,
22
- disabled: React.PropTypes.bool,
23
- active: React.PropTypes.bool,
24
- onClick: React.PropTypes.func
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: React.PropTypes.bool,
18
- onSelect: React.PropTypes.func,
19
- header: React.PropTypes.node,
20
- id: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]),
21
- footer: React.PropTypes.node,
22
- defaultExpanded: React.PropTypes.bool,
23
- expanded: React.PropTypes.bool,
24
- eventKey: React.PropTypes.any,
25
- headerRole: React.PropTypes.string,
26
- panelRole: React.PropTypes.string,
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: React.PropTypes.func,
30
- onEntering: React.PropTypes.func,
31
- onEntered: React.PropTypes.func,
32
- onExit: React.PropTypes.func,
33
- onExiting: React.PropTypes.func,
34
- onExited: React.PropTypes.func
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: React.PropTypes.bool,
16
- activeKey: React.PropTypes.any,
17
- defaultActiveKey: React.PropTypes.any,
18
- onSelect: React.PropTypes.func,
19
- role: React.PropTypes.string
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(React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number])),
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: React.PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
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: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
29
+ positionTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
29
30
  /**
30
31
  * The "left" position value for the Popover.
31
32
  */
32
- positionLeft: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
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: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
38
+ arrowOffsetTop: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
38
39
  /**
39
40
  * The "left" position value for the Popover arrow.
40
41
  */
41
- arrowOffsetLeft: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
42
+ arrowOffsetLeft: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
42
43
 
43
44
  /**
44
45
  * Title content
45
46
  */
46
- title: React.PropTypes.node
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, PropTypes } from 'react';
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: React.PropTypes.bool,
14
- disabled: React.PropTypes.bool,
14
+ inline: PropTypes.bool,
15
+ disabled: PropTypes.bool,
15
16
  /**
16
17
  * Only valid if `inline` is not set.
17
18
  */
18
- validationState: React.PropTypes.oneOf(['success', 'warning', 'error']),
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: React.PropTypes.func
27
+ inputRef: PropTypes.func
27
28
  };
28
29
 
29
30
  var defaultProps = {
@@ -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, PropTypes } from 'react';
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';