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
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: React.PropTypes.string,
11
- onClick: React.PropTypes.func,
12
- disabled: React.PropTypes.bool,
13
- role: React.PropTypes.string,
14
- tabIndex: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
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: React.PropTypes.string,
17
- bsSize: React.PropTypes.string,
18
- href: React.PropTypes.string,
19
- onClick: React.PropTypes.func,
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: React.PropTypes.node.isRequired,
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: React.PropTypes.string,
28
+ toggleLabel: PropTypes.string,
28
29
 
29
30
  // Override generated docs from <Dropdown>.
30
31
  /**
31
32
  * @private
32
33
  */
33
- children: React.PropTypes.node
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: React.PropTypes.bool,
14
+ disabled: PropTypes.bool,
14
15
 
15
- title: React.PropTypes.node,
16
+ title: PropTypes.node,
16
17
 
17
18
  /**
18
19
  * tabClassName is used as className for the associated NavItem
19
20
  */
20
- tabClassName: React.PropTypes.string
21
+ tabClassName: PropTypes.string
21
22
  });
22
23
 
23
24
  var Tab = function (_React$Component) {
@@ -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, { PropTypes } from '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: React.PropTypes.shape({
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, { PropTypes } from '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, { PropTypes } from '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: React.PropTypes.string,
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
- getId: PropTypes.func,
81
- unmountOnExit: PropTypes.bool
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: React.PropTypes.bool,
13
- bordered: React.PropTypes.bool,
14
- condensed: React.PropTypes.bool,
15
- hover: React.PropTypes.bool,
16
- responsive: React.PropTypes.bool
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: React.PropTypes.any,
26
+ activeKey: PropTypes.any,
26
27
 
27
28
  /**
28
29
  * Navigation style
29
30
  */
30
- bsStyle: React.PropTypes.oneOf(['tabs', 'pills']),
31
+ bsStyle: PropTypes.oneOf(['tabs', 'pills']),
31
32
 
32
- animation: React.PropTypes.bool,
33
+ animation: PropTypes.bool,
33
34
 
34
- id: requiredForA11y(React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number])),
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: React.PropTypes.func,
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: React.PropTypes.bool
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: React.PropTypes.string,
14
- alt: React.PropTypes.string,
15
- href: React.PropTypes.string
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(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 Tooltip 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 Tooltip.
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 Tooltip.
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 Tooltip 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 Tooltip 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
  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 { PropTypes } from 'react';
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: _react2['default'].PropTypes.func,
45
- closeLabel: _react2['default'].PropTypes.string
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: _react2['default'].PropTypes.bool
44
+ pullRight: _propTypes2['default'].bool
41
45
  };
42
46
 
43
47
  var defaultProps = {
@@ -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: _react2['default'].PropTypes.bool,
47
+ active: _propTypes2['default'].bool,
44
48
  /**
45
49
  * `href` attribute for the inner `a` element
46
50
  */
47
- href: _react2['default'].PropTypes.string,
51
+ href: _propTypes2['default'].string,
48
52
  /**
49
53
  * `title` attribute for the inner `a` element
50
54
  */
51
- title: _react2['default'].PropTypes.node,
55
+ title: _propTypes2['default'].node,
52
56
  /**
53
57
  * `target` attribute for the inner `a` element
54
58
  */
55
- target: _react2['default'].PropTypes.string
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: _react2['default'].PropTypes.bool,
53
- disabled: _react2['default'].PropTypes.bool,
54
- block: _react2['default'].PropTypes.bool,
55
- onClick: _react2['default'].PropTypes.func,
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: _react2['default'].PropTypes.string,
61
+ href: _propTypes2['default'].string,
58
62
  /**
59
63
  * Defines HTML button type attribute
60
64
  * @defaultValue 'button'
61
65
  */
62
- type: _react2['default'].PropTypes.oneOf(['button', 'reset', 'submit'])
66
+ type: _propTypes2['default'].oneOf(['button', 'reset', 'submit'])
63
67
  };
64
68
 
65
69
  var defaultProps = {
@@ -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: _react2['default'].PropTypes.bool,
47
- justified: _react2['default'].PropTypes.bool,
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'])(_react2['default'].PropTypes.bool, function (_ref) {
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: _react2['default'].PropTypes.bool,
63
- indicators: _react2['default'].PropTypes.bool,
64
- interval: _react2['default'].PropTypes.number,
65
- controls: _react2['default'].PropTypes.bool,
66
- pauseOnHover: _react2['default'].PropTypes.bool,
67
- wrap: _react2['default'].PropTypes.bool,
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: _react2['default'].PropTypes.func,
80
- onSlideEnd: _react2['default'].PropTypes.func,
81
- activeIndex: _react2['default'].PropTypes.number,
82
- defaultActiveIndex: _react2['default'].PropTypes.number,
83
- direction: _react2['default'].PropTypes.oneOf(['prev', 'next']),
84
- prevIcon: _react2['default'].PropTypes.node,
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: _react2['default'].PropTypes.string,
91
- nextIcon: _react2['default'].PropTypes.node,
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: _react2['default'].PropTypes.string
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;