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/MenuItem.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 all from 'react-prop-types/lib/all';
9
10
 
10
11
  import SafeAnchor from './SafeAnchor';
@@ -15,18 +16,18 @@ var propTypes = {
15
16
  /**
16
17
  * Highlight the menu item as active.
17
18
  */
18
- active: React.PropTypes.bool,
19
+ active: PropTypes.bool,
19
20
 
20
21
  /**
21
22
  * Disable the menu item, making it unselectable.
22
23
  */
23
- disabled: React.PropTypes.bool,
24
+ disabled: PropTypes.bool,
24
25
 
25
26
  /**
26
27
  * Styles the menu item as a horizontal rule, providing visual separation between
27
28
  * groups of menu items.
28
29
  */
29
- divider: all(React.PropTypes.bool, function (_ref) {
30
+ divider: all(PropTypes.bool, function (_ref) {
30
31
  var divider = _ref.divider,
31
32
  children = _ref.children;
32
33
  return divider && children ? new Error('Children will not be rendered for dividers') : null;
@@ -35,22 +36,22 @@ var propTypes = {
35
36
  /**
36
37
  * Value passed to the `onSelect` handler, useful for identifying the selected menu item.
37
38
  */
38
- eventKey: React.PropTypes.any,
39
+ eventKey: PropTypes.any,
39
40
 
40
41
  /**
41
42
  * Styles the menu item as a header label, useful for describing a group of menu items.
42
43
  */
43
- header: React.PropTypes.bool,
44
+ header: PropTypes.bool,
44
45
 
45
46
  /**
46
47
  * HTML `href` attribute corresponding to `a.href`.
47
48
  */
48
- href: React.PropTypes.string,
49
+ href: PropTypes.string,
49
50
 
50
51
  /**
51
52
  * Callback fired when the menu item is clicked.
52
53
  */
53
- onClick: React.PropTypes.func,
54
+ onClick: PropTypes.func,
54
55
 
55
56
  /**
56
57
  * Callback fired when the menu item is selected.
@@ -59,7 +60,7 @@ var propTypes = {
59
60
  * (eventKey: any, event: Object) => any
60
61
  * ```
61
62
  */
62
- onSelect: React.PropTypes.func
63
+ onSelect: PropTypes.func
63
64
  };
64
65
 
65
66
  var defaultProps = {
package/es/Modal.js CHANGED
@@ -9,6 +9,7 @@ import ownerDocument from 'dom-helpers/ownerDocument';
9
9
  import canUseDOM from 'dom-helpers/util/inDOM';
10
10
  import getScrollbarSize from 'dom-helpers/util/scrollbarSize';
11
11
  import React from 'react';
12
+ import PropTypes from 'prop-types';
12
13
  import ReactDOM from 'react-dom';
13
14
  import BaseModal from 'react-overlays/lib/Modal';
14
15
  import isOverflowing from 'react-overlays/lib/utils/isOverflowing';
@@ -31,17 +32,17 @@ var propTypes = _extends({}, BaseModal.propTypes, ModalDialog.propTypes, {
31
32
  * Include a backdrop component. Specify 'static' for a backdrop that doesn't
32
33
  * trigger an "onHide" when clicked.
33
34
  */
34
- backdrop: React.PropTypes.oneOf(['static', true, false]),
35
+ backdrop: PropTypes.oneOf(['static', true, false]),
35
36
 
36
37
  /**
37
38
  * Close the modal when escape key is pressed
38
39
  */
39
- keyboard: React.PropTypes.bool,
40
+ keyboard: PropTypes.bool,
40
41
 
41
42
  /**
42
43
  * Open and close the Modal with a slide and fade animation.
43
44
  */
44
- animation: React.PropTypes.bool,
45
+ animation: PropTypes.bool,
45
46
 
46
47
  /**
47
48
  * A Component type that provides the modal content Markup. This is a useful
@@ -56,55 +57,61 @@ var propTypes = _extends({}, BaseModal.propTypes, ModalDialog.propTypes, {
56
57
  * Generally this should never be set to false as it makes the Modal less
57
58
  * accessible to assistive technologies, like screen-readers.
58
59
  */
59
- autoFocus: React.PropTypes.bool,
60
+ autoFocus: PropTypes.bool,
60
61
 
61
62
  /**
62
63
  * When `true` The modal will prevent focus from leaving the Modal while
63
64
  * open. Consider leaving the default value here, as it is necessary to make
64
65
  * the Modal work well with assistive technologies, such as screen readers.
65
66
  */
66
- enforceFocus: React.PropTypes.bool,
67
+ enforceFocus: PropTypes.bool,
68
+
69
+ /**
70
+ * When `true` The modal will restore focus to previously focused element once
71
+ * modal is hidden
72
+ */
73
+ restoreFocus: PropTypes.bool,
67
74
 
68
75
  /**
69
76
  * When `true` The modal will show itself.
70
77
  */
71
- show: React.PropTypes.bool,
78
+ show: PropTypes.bool,
72
79
 
73
80
  /**
74
81
  * A callback fired when the header closeButton or non-static backdrop is
75
82
  * clicked. Required if either are specified.
76
83
  */
77
- onHide: React.PropTypes.func,
84
+ onHide: PropTypes.func,
78
85
 
79
86
  /**
80
87
  * Callback fired before the Modal transitions in
81
88
  */
82
- onEnter: React.PropTypes.func,
89
+ onEnter: PropTypes.func,
83
90
 
84
91
  /**
85
92
  * Callback fired as the Modal begins to transition in
86
93
  */
87
- onEntering: React.PropTypes.func,
94
+ onEntering: PropTypes.func,
88
95
 
89
96
  /**
90
97
  * Callback fired after the Modal finishes transitioning in
91
98
  */
92
- onEntered: React.PropTypes.func,
99
+ onEntered: PropTypes.func,
93
100
 
94
101
  /**
95
102
  * Callback fired right before the Modal transitions out
96
103
  */
97
- onExit: React.PropTypes.func,
104
+ onExit: PropTypes.func,
98
105
 
99
106
  /**
100
107
  * Callback fired as the Modal begins to transition out
101
108
  */
102
- onExiting: React.PropTypes.func,
109
+ onExiting: PropTypes.func,
103
110
 
104
111
  /**
105
112
  * Callback fired after the Modal finishes transitioning out
106
113
  */
107
- onExited: React.PropTypes.func,
114
+ onExited: PropTypes.func,
108
115
 
109
116
  /**
110
117
  * @private
@@ -118,8 +125,8 @@ var defaultProps = _extends({}, BaseModal.defaultProps, {
118
125
  });
119
126
 
120
127
  var childContextTypes = {
121
- $bs_modal: React.PropTypes.shape({
122
- onHide: React.PropTypes.func
128
+ $bs_modal: PropTypes.shape({
129
+ onHide: PropTypes.func
123
130
  })
124
131
  };
125
132
 
package/es/ModalBody.js CHANGED
@@ -5,9 +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 elementType from 'react-prop-types/lib/elementType';
8
9
 
9
10
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
11
 
12
+ var propTypes = {
13
+ componentClass: elementType
14
+ };
15
+
16
+ var defaultProps = {
17
+ componentClass: 'div'
18
+ };
19
+
11
20
  var ModalBody = function (_React$Component) {
12
21
  _inherits(ModalBody, _React$Component);
13
22
 
@@ -19,8 +28,9 @@ var ModalBody = function (_React$Component) {
19
28
 
20
29
  ModalBody.prototype.render = function render() {
21
30
  var _props = this.props,
31
+ Component = _props.componentClass,
22
32
  className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
33
+ props = _objectWithoutProperties(_props, ['componentClass', 'className']);
24
34
 
25
35
  var _splitBsProps = splitBsProps(props),
26
36
  bsProps = _splitBsProps[0],
@@ -28,7 +38,7 @@ var ModalBody = function (_React$Component) {
28
38
 
29
39
  var classes = getClassSet(bsProps);
30
40
 
31
- return React.createElement('div', _extends({}, elementProps, {
41
+ return React.createElement(Component, _extends({}, elementProps, {
32
42
  className: classNames(className, classes)
33
43
  }));
34
44
  };
@@ -36,4 +46,7 @@ var ModalBody = function (_React$Component) {
36
46
  return ModalBody;
37
47
  }(React.Component);
38
48
 
49
+ ModalBody.propTypes = propTypes;
50
+ ModalBody.defaultProps = defaultProps;
51
+
39
52
  export default bsClass('modal-body', ModalBody);
package/es/ModalDialog.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
 
9
10
  import { bsClass, bsSizes, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
10
11
  import { Size } from './utils/StyleConfig';
@@ -13,7 +14,7 @@ var propTypes = {
13
14
  /**
14
15
  * A css class to apply to the Modal dialog DOM node.
15
16
  */
16
- dialogClassName: React.PropTypes.string
17
+ dialogClassName: PropTypes.string
17
18
  };
18
19
 
19
20
  var ModalDialog = function (_React$Component) {
package/es/ModalFooter.js CHANGED
@@ -5,9 +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 elementType from 'react-prop-types/lib/elementType';
8
9
 
9
10
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
11
 
12
+ var propTypes = {
13
+ componentClass: elementType
14
+ };
15
+
16
+ var defaultProps = {
17
+ componentClass: 'div'
18
+ };
19
+
11
20
  var ModalFooter = function (_React$Component) {
12
21
  _inherits(ModalFooter, _React$Component);
13
22
 
@@ -19,8 +28,9 @@ var ModalFooter = function (_React$Component) {
19
28
 
20
29
  ModalFooter.prototype.render = function render() {
21
30
  var _props = this.props,
31
+ Component = _props.componentClass,
22
32
  className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
33
+ props = _objectWithoutProperties(_props, ['componentClass', 'className']);
24
34
 
25
35
  var _splitBsProps = splitBsProps(props),
26
36
  bsProps = _splitBsProps[0],
@@ -28,7 +38,7 @@ var ModalFooter = function (_React$Component) {
28
38
 
29
39
  var classes = getClassSet(bsProps);
30
40
 
31
- return React.createElement('div', _extends({}, elementProps, {
41
+ return React.createElement(Component, _extends({}, elementProps, {
32
42
  className: classNames(className, classes)
33
43
  }));
34
44
  };
@@ -36,4 +46,7 @@ var ModalFooter = function (_React$Component) {
36
46
  return ModalFooter;
37
47
  }(React.Component);
38
48
 
49
+ ModalFooter.propTypes = propTypes;
50
+ ModalFooter.defaultProps = defaultProps;
51
+
39
52
  export default bsClass('modal-footer', ModalFooter);
package/es/ModalHeader.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
 
9
10
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
11
  import createChainedFunction from './utils/createChainedFunction';
@@ -17,19 +18,19 @@ var propTypes = {
17
18
  * button. It is used for Assistive Technology when the label text is not
18
19
  * readable.
19
20
  */
20
- 'aria-label': React.PropTypes.string,
21
+ 'aria-label': PropTypes.string,
21
22
 
22
23
  /**
23
24
  * Specify whether the Component should contain a close button
24
25
  */
25
- closeButton: React.PropTypes.bool,
26
+ closeButton: PropTypes.bool,
26
27
 
27
28
  /**
28
29
  * A Callback fired when the close button is clicked. If used directly inside
29
30
  * a Modal component, the onHide will automatically be propagated up to the
30
31
  * parent Modal `onHide`.
31
32
  */
32
- onHide: React.PropTypes.func
33
+ onHide: PropTypes.func
33
34
  };
34
35
 
35
36
  var defaultProps = {
@@ -38,8 +39,8 @@ var defaultProps = {
38
39
  };
39
40
 
40
41
  var contextTypes = {
41
- $bs_modal: React.PropTypes.shape({
42
- onHide: React.PropTypes.func
42
+ $bs_modal: PropTypes.shape({
43
+ onHide: PropTypes.func
43
44
  })
44
45
  };
45
46
 
@@ -80,7 +81,7 @@ var ModalHeader = function (_React$Component) {
80
81
  type: 'button',
81
82
  className: 'close',
82
83
  'aria-label': label,
83
- onClick: createChainedFunction(modal.onHide, onHide)
84
+ onClick: createChainedFunction(modal && modal.onHide, onHide)
84
85
  },
85
86
  React.createElement(
86
87
  'span',
package/es/ModalTitle.js CHANGED
@@ -5,9 +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 elementType from 'react-prop-types/lib/elementType';
8
9
 
9
10
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
11
 
12
+ var propTypes = {
13
+ componentClass: elementType
14
+ };
15
+
16
+ var defaultProps = {
17
+ componentClass: 'h4'
18
+ };
19
+
11
20
  var ModalTitle = function (_React$Component) {
12
21
  _inherits(ModalTitle, _React$Component);
13
22
 
@@ -19,8 +28,9 @@ var ModalTitle = function (_React$Component) {
19
28
 
20
29
  ModalTitle.prototype.render = function render() {
21
30
  var _props = this.props,
31
+ Component = _props.componentClass,
22
32
  className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
33
+ props = _objectWithoutProperties(_props, ['componentClass', 'className']);
24
34
 
25
35
  var _splitBsProps = splitBsProps(props),
26
36
  bsProps = _splitBsProps[0],
@@ -28,7 +38,7 @@ var ModalTitle = function (_React$Component) {
28
38
 
29
39
  var classes = getClassSet(bsProps);
30
40
 
31
- return React.createElement('h4', _extends({}, elementProps, {
41
+ return React.createElement(Component, _extends({}, elementProps, {
32
42
  className: classNames(className, classes)
33
43
  }));
34
44
  };
@@ -36,4 +46,7 @@ var ModalTitle = function (_React$Component) {
36
46
  return ModalTitle;
37
47
  }(React.Component);
38
48
 
49
+ ModalTitle.propTypes = propTypes;
50
+ ModalTitle.defaultProps = defaultProps;
51
+
39
52
  export default bsClass('modal-title', ModalTitle);
package/es/Nav.js CHANGED
@@ -6,6 +6,7 @@ import _inherits from 'babel-runtime/helpers/inherits';
6
6
  import classNames from 'classnames';
7
7
  import keycode from 'keycode';
8
8
  import React, { cloneElement } from 'react';
9
+ import PropTypes from 'prop-types';
9
10
  import ReactDOM from 'react-dom';
10
11
  import all from 'react-prop-types/lib/all';
11
12
  import warning from 'warning';
@@ -26,19 +27,19 @@ var propTypes = {
26
27
  * Marks the NavItem with a matching `eventKey` as active. Has a
27
28
  * higher precedence over `activeHref`.
28
29
  */
29
- activeKey: React.PropTypes.any,
30
+ activeKey: PropTypes.any,
30
31
 
31
32
  /**
32
33
  * Marks the child NavItem with a matching `href` prop as active.
33
34
  */
34
- activeHref: React.PropTypes.string,
35
+ activeHref: PropTypes.string,
35
36
 
36
37
  /**
37
38
  * NavItems are be positioned vertically.
38
39
  */
39
- stacked: React.PropTypes.bool,
40
+ stacked: PropTypes.bool,
40
41
 
41
- justified: all(React.PropTypes.bool, function (_ref) {
42
+ justified: all(PropTypes.bool, function (_ref) {
42
43
  var justified = _ref.justified,
43
44
  navbar = _ref.navbar;
44
45
  return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;
@@ -54,7 +55,7 @@ var propTypes = {
54
55
  * )
55
56
  * ```
56
57
  */
57
- onSelect: React.PropTypes.func,
58
+ onSelect: PropTypes.func,
58
59
 
59
60
  /**
60
61
  * ARIA role for the Nav, in the context of a TabContainer, the default will
@@ -64,25 +65,25 @@ var propTypes = {
64
65
  * the ARIA authoring practices for tabs:
65
66
  * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
66
67
  */
67
- role: React.PropTypes.string,
68
+ role: PropTypes.string,
68
69
 
69
70
  /**
70
71
  * Apply styling an alignment for use in a Navbar. This prop will be set
71
72
  * automatically when the Nav is used inside a Navbar.
72
73
  */
73
- navbar: React.PropTypes.bool,
74
+ navbar: PropTypes.bool,
74
75
 
75
76
  /**
76
77
  * Float the Nav to the right. When `navbar` is `true` the appropriate
77
78
  * contextual classes are added as well.
78
79
  */
79
- pullRight: React.PropTypes.bool,
80
+ pullRight: PropTypes.bool,
80
81
 
81
82
  /**
82
83
  * Float the Nav to the left. When `navbar` is `true` the appropriate
83
84
  * contextual classes are added as well.
84
85
  */
85
- pullLeft: React.PropTypes.bool
86
+ pullLeft: PropTypes.bool
86
87
  };
87
88
 
88
89
  var defaultProps = {
@@ -93,16 +94,16 @@ var defaultProps = {
93
94
  };
94
95
 
95
96
  var contextTypes = {
96
- $bs_navbar: React.PropTypes.shape({
97
- bsClass: React.PropTypes.string,
98
- onSelect: React.PropTypes.func
97
+ $bs_navbar: PropTypes.shape({
98
+ bsClass: PropTypes.string,
99
+ onSelect: PropTypes.func
99
100
  }),
100
101
 
101
- $bs_tabContainer: React.PropTypes.shape({
102
- activeKey: React.PropTypes.any,
103
- onSelect: React.PropTypes.func.isRequired,
104
- getTabId: React.PropTypes.func.isRequired,
105
- getPaneId: React.PropTypes.func.isRequired
102
+ $bs_tabContainer: PropTypes.shape({
103
+ activeKey: PropTypes.any,
104
+ onSelect: PropTypes.func.isRequired,
105
+ getTabId: PropTypes.func.isRequired,
106
+ getPaneId: PropTypes.func.isRequired
106
107
  })
107
108
  };
108
109
 
@@ -166,7 +167,7 @@ var Nav = function (_React$Component) {
166
167
 
167
168
  event.preventDefault();
168
169
 
169
- if (onSelect && nextActiveChild && nextActiveChild.props.eventKey) {
170
+ if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {
170
171
  onSelect(nextActiveChild.props.eventKey);
171
172
  }
172
173
 
@@ -179,7 +180,7 @@ var Nav = function (_React$Component) {
179
180
  var children = this.props.children;
180
181
 
181
182
  var validChildren = children.filter(function (child) {
182
- return child.props.eventKey && !child.props.disabled;
183
+ return child.props.eventKey != null && !child.props.disabled;
183
184
  });
184
185
 
185
186
  var _getActiveProps2 = this.getActiveProps(),
package/es/NavDropdown.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 from 'react';
8
+ import PropTypes from 'prop-types';
8
9
 
9
10
  import Dropdown from './Dropdown';
10
11
  import splitComponentProps from './utils/splitComponentProps';
@@ -13,15 +14,15 @@ import ValidComponentChildren from './utils/ValidComponentChildren';
13
14
  var propTypes = _extends({}, Dropdown.propTypes, {
14
15
 
15
16
  // Toggle props.
16
- title: React.PropTypes.node.isRequired,
17
- noCaret: React.PropTypes.bool,
18
- active: React.PropTypes.bool,
17
+ title: PropTypes.node.isRequired,
18
+ noCaret: PropTypes.bool,
19
+ active: PropTypes.bool,
19
20
 
20
21
  // Override generated docs from <Dropdown>.
21
22
  /**
22
23
  * @private
23
24
  */
24
- children: React.PropTypes.node
25
+ children: PropTypes.node
25
26
  });
26
27
 
27
28
  var NavDropdown = function (_React$Component) {
package/es/NavItem.js CHANGED
@@ -5,18 +5,19 @@ 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
- active: React.PropTypes.bool,
14
- disabled: React.PropTypes.bool,
15
- role: React.PropTypes.string,
16
- href: React.PropTypes.string,
17
- onClick: React.PropTypes.func,
18
- onSelect: React.PropTypes.func,
19
- eventKey: React.PropTypes.any
14
+ active: PropTypes.bool,
15
+ disabled: PropTypes.bool,
16
+ role: PropTypes.string,
17
+ href: PropTypes.string,
18
+ onClick: PropTypes.func,
19
+ onSelect: PropTypes.func,
20
+ eventKey: PropTypes.any
20
21
  };
21
22
 
22
23
  var defaultProps = {
package/es/Navbar.js CHANGED
@@ -7,7 +7,8 @@ import _inherits from 'babel-runtime/helpers/inherits';
7
7
  /* eslint-disable react/no-multi-comp */
8
8
 
9
9
  import classNames from 'classnames';
10
- import React, { PropTypes } from 'react';
10
+ import React from 'react';
11
+ import PropTypes from 'prop-types';
11
12
  import elementType from 'react-prop-types/lib/elementType';
12
13
  import uncontrollable from 'uncontrollable';
13
14
 
@@ -25,25 +26,25 @@ var propTypes = {
25
26
  * Create a fixed navbar along the top of the screen, that scrolls with the
26
27
  * page
27
28
  */
28
- fixedTop: React.PropTypes.bool,
29
+ fixedTop: PropTypes.bool,
29
30
  /**
30
31
  * Create a fixed navbar along the bottom of the screen, that scrolls with
31
32
  * the page
32
33
  */
33
- fixedBottom: React.PropTypes.bool,
34
+ fixedBottom: PropTypes.bool,
34
35
  /**
35
36
  * Create a full-width navbar that scrolls away with the page
36
37
  */
37
- staticTop: React.PropTypes.bool,
38
+ staticTop: PropTypes.bool,
38
39
  /**
39
40
  * An alternative dark visual style for the Navbar
40
41
  */
41
- inverse: React.PropTypes.bool,
42
+ inverse: PropTypes.bool,
42
43
  /**
43
44
  * Allow the Navbar to fluidly adjust to the page or container width, instead
44
45
  * of at the predefined screen breakpoints
45
46
  */
46
- fluid: React.PropTypes.bool,
47
+ fluid: PropTypes.bool,
47
48
 
48
49
  /**
49
50
  * Set a custom element for this component.
@@ -56,7 +57,7 @@ var propTypes = {
56
57
  *
57
58
  * @controllable navExpanded
58
59
  */
59
- onToggle: React.PropTypes.func,
60
+ onToggle: PropTypes.func,
60
61
  /**
61
62
  * A callback fired when a descendant of a child `<Nav>` is selected. Should
62
63
  * be used to execute complex closing or other miscellaneous actions desired
@@ -78,7 +79,7 @@ var propTypes = {
78
79
  * ensure that you are setting `expanded` to false and not *toggling* between
79
80
  * true and false.
80
81
  */
81
- onSelect: React.PropTypes.func,
82
+ onSelect: PropTypes.func,
82
83
  /**
83
84
  * Sets `expanded` to `false` after the onSelect event of a descendant of a
84
85
  * child `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
@@ -86,15 +87,15 @@ var propTypes = {
86
87
  * The onSelect callback should be used instead for more complex operations
87
88
  * that need to be executed after the `select` event of `<Nav>` descendants.
88
89
  */
89
- collapseOnSelect: React.PropTypes.bool,
90
+ collapseOnSelect: PropTypes.bool,
90
91
  /**
91
92
  * Explicitly set the visiblity of the navbar body
92
93
  *
93
94
  * @controllable onToggle
94
95
  */
95
- expanded: React.PropTypes.bool,
96
+ expanded: PropTypes.bool,
96
97
 
97
- role: React.PropTypes.string
98
+ role: PropTypes.string
98
99
  };
99
100
 
100
101
  var defaultProps = {
@@ -226,14 +227,15 @@ var UncontrollableNavbar = uncontrollable(Navbar, { expanded: 'onToggle' });
226
227
 
227
228
  function createSimpleWrapper(tag, suffix, displayName) {
228
229
  var Wrapper = function Wrapper(_ref, _ref2) {
230
+ var _ref2$$bs_navbar = _ref2.$bs_navbar,
231
+ navbarProps = _ref2$$bs_navbar === undefined ? { bsClass: 'navbar' } : _ref2$$bs_navbar;
232
+
229
233
  var Component = _ref.componentClass,
230
234
  className = _ref.className,
231
235
  pullRight = _ref.pullRight,
232
236
  pullLeft = _ref.pullLeft,
233
237
  props = _objectWithoutProperties(_ref, ['componentClass', 'className', 'pullRight', 'pullLeft']);
234
238
 
235
- var _ref2$$bs_navbar = _ref2.$bs_navbar,
236
- navbarProps = _ref2$$bs_navbar === undefined ? { bsClass: 'navbar' } : _ref2$$bs_navbar;
237
239
  return React.createElement(Component, _extends({}, props, {
238
240
  className: classNames(className, prefix(navbarProps, suffix), pullRight && prefix(navbarProps, 'right'), pullLeft && prefix(navbarProps, 'left'))
239
241
  }));
@@ -243,8 +245,8 @@ function createSimpleWrapper(tag, suffix, displayName) {
243
245
 
244
246
  Wrapper.propTypes = {
245
247
  componentClass: elementType,
246
- pullRight: React.PropTypes.bool,
247
- pullLeft: React.PropTypes.bool
248
+ pullRight: PropTypes.bool,
249
+ pullLeft: PropTypes.bool
248
250
  };
249
251
 
250
252
  Wrapper.defaultProps = {
package/es/NavbarBrand.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: React.PropTypes.shape({
13
- bsClass: React.PropTypes.string
13
+ $bs_navbar: PropTypes.shape({
14
+ bsClass: PropTypes.string
14
15
  })
15
16
  };
16
17
 
@@ -3,7 +3,8 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutPropert
3
3
  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
- import React, { PropTypes } from 'react';
6
+ import React from 'react';
7
+ import PropTypes from 'prop-types';
7
8
 
8
9
  import Collapse from './Collapse';
9
10
  import { prefix } from './utils/bootstrapUtils';