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/lib/PanelGroup.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 _createChainedFunction = require('./utils/createChainedFunction');
@@ -47,11 +51,11 @@ var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
47
51
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
48
52
 
49
53
  var propTypes = {
50
- accordion: _react2['default'].PropTypes.bool,
51
- activeKey: _react2['default'].PropTypes.any,
52
- defaultActiveKey: _react2['default'].PropTypes.any,
53
- onSelect: _react2['default'].PropTypes.func,
54
- role: _react2['default'].PropTypes.string
54
+ accordion: _propTypes2['default'].bool,
55
+ activeKey: _propTypes2['default'].any,
56
+ defaultActiveKey: _propTypes2['default'].any,
57
+ onSelect: _propTypes2['default'].func,
58
+ role: _propTypes2['default'].string
55
59
  };
56
60
 
57
61
  var defaultProps = {
package/lib/Popover.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 _isRequiredForA11y = require('react-prop-types/lib/isRequiredForA11y');
34
38
 
35
39
  var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y);
@@ -44,35 +48,35 @@ var propTypes = {
44
48
  * @type {string}
45
49
  * @required
46
50
  */
47
- id: (0, _isRequiredForA11y2['default'])(_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])),
51
+ id: (0, _isRequiredForA11y2['default'])(_propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].number])),
48
52
 
49
53
  /**
50
54
  * Sets the direction the Popover is positioned towards.
51
55
  */
52
- placement: _react2['default'].PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
56
+ placement: _propTypes2['default'].oneOf(['top', 'right', 'bottom', 'left']),
53
57
 
54
58
  /**
55
59
  * The "top" position value for the Popover.
56
60
  */
57
- positionTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
61
+ positionTop: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
58
62
  /**
59
63
  * The "left" position value for the Popover.
60
64
  */
61
- positionLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
65
+ positionLeft: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
62
66
 
63
67
  /**
64
68
  * The "top" position value for the Popover arrow.
65
69
  */
66
- arrowOffsetTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
70
+ arrowOffsetTop: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
67
71
  /**
68
72
  * The "left" position value for the Popover arrow.
69
73
  */
70
- arrowOffsetLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
74
+ arrowOffsetLeft: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
71
75
 
72
76
  /**
73
77
  * Title content
74
78
  */
75
- title: _react2['default'].PropTypes.node
79
+ title: _propTypes2['default'].node
76
80
  };
77
81
 
78
82
  var defaultProps = {
@@ -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');
@@ -75,19 +79,19 @@ function onlyProgressBar(props, propName, componentName) {
75
79
  }
76
80
 
77
81
  var propTypes = {
78
- min: _react.PropTypes.number,
79
- now: _react.PropTypes.number,
80
- max: _react.PropTypes.number,
81
- label: _react.PropTypes.node,
82
- srOnly: _react.PropTypes.bool,
83
- striped: _react.PropTypes.bool,
84
- active: _react.PropTypes.bool,
82
+ min: _propTypes2['default'].number,
83
+ now: _propTypes2['default'].number,
84
+ max: _propTypes2['default'].number,
85
+ label: _propTypes2['default'].node,
86
+ srOnly: _propTypes2['default'].bool,
87
+ striped: _propTypes2['default'].bool,
88
+ active: _propTypes2['default'].bool,
85
89
  children: onlyProgressBar,
86
90
 
87
91
  /**
88
92
  * @private
89
93
  */
90
- isChild: _react.PropTypes.bool
94
+ isChild: _propTypes2['default'].bool
91
95
  };
92
96
 
93
97
  var defaultProps = {
package/lib/Radio.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 _warning = require('warning');
34
38
 
35
39
  var _warning2 = _interopRequireDefault(_warning);
@@ -39,12 +43,12 @@ var _bootstrapUtils = require('./utils/bootstrapUtils');
39
43
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
40
44
 
41
45
  var propTypes = {
42
- inline: _react2['default'].PropTypes.bool,
43
- disabled: _react2['default'].PropTypes.bool,
46
+ inline: _propTypes2['default'].bool,
47
+ disabled: _propTypes2['default'].bool,
44
48
  /**
45
49
  * Only valid if `inline` is not set.
46
50
  */
47
- validationState: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']),
51
+ validationState: _propTypes2['default'].oneOf(['success', 'warning', 'error', null]),
48
52
  /**
49
53
  * Attaches a ref to the `<input>` element. Only functions can be used here.
50
54
  *
@@ -52,7 +56,7 @@ var propTypes = {
52
56
  * <Radio inputRef={ref => { this.input = ref; }} />
53
57
  * ```
54
58
  */
55
- inputRef: _react2['default'].PropTypes.func
59
+ inputRef: _propTypes2['default'].func
56
60
  };
57
61
 
58
62
  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 _warning = require('warning');
34
38
 
35
39
  var _warning2 = _interopRequireDefault(_warning);
@@ -44,15 +48,15 @@ var propTypes = {
44
48
  /**
45
49
  * This component requires a single child element
46
50
  */
47
- children: _react.PropTypes.element.isRequired,
51
+ children: _propTypes2['default'].element.isRequired,
48
52
  /**
49
53
  * 16by9 aspect ratio
50
54
  */
51
- a16by9: _react.PropTypes.bool,
55
+ a16by9: _propTypes2['default'].bool,
52
56
  /**
53
57
  * 4by3 aspect ratio
54
58
  */
55
- a4by3: _react.PropTypes.bool
59
+ a4by3: _propTypes2['default'].bool
56
60
  };
57
61
 
58
62
  var defaultProps = {
package/lib/SafeAnchor.js CHANGED
@@ -26,6 +26,10 @@ var _react = require('react');
26
26
 
27
27
  var _react2 = _interopRequireDefault(_react);
28
28
 
29
+ var _propTypes = require('prop-types');
30
+
31
+ var _propTypes2 = _interopRequireDefault(_propTypes);
32
+
29
33
  var _elementType = require('react-prop-types/lib/elementType');
30
34
 
31
35
  var _elementType2 = _interopRequireDefault(_elementType);
@@ -33,11 +37,11 @@ var _elementType2 = _interopRequireDefault(_elementType);
33
37
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
34
38
 
35
39
  var propTypes = {
36
- href: _react2['default'].PropTypes.string,
37
- onClick: _react2['default'].PropTypes.func,
38
- disabled: _react2['default'].PropTypes.bool,
39
- role: _react2['default'].PropTypes.string,
40
- tabIndex: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
40
+ href: _propTypes2['default'].string,
41
+ onClick: _propTypes2['default'].func,
42
+ disabled: _propTypes2['default'].bool,
43
+ role: _propTypes2['default'].string,
44
+ tabIndex: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
41
45
  /**
42
46
  * this is sort of silly but needed for Button
43
47
  */
@@ -26,6 +26,10 @@ var _react = require('react');
26
26
 
27
27
  var _react2 = _interopRequireDefault(_react);
28
28
 
29
+ var _propTypes = require('prop-types');
30
+
31
+ var _propTypes2 = _interopRequireDefault(_propTypes);
32
+
29
33
  var _Button = require('./Button');
30
34
 
31
35
  var _Button2 = _interopRequireDefault(_Button);
@@ -47,24 +51,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
47
51
  var propTypes = (0, _extends3['default'])({}, _Dropdown2['default'].propTypes, {
48
52
 
49
53
  // Toggle props.
50
- bsStyle: _react2['default'].PropTypes.string,
51
- bsSize: _react2['default'].PropTypes.string,
52
- href: _react2['default'].PropTypes.string,
53
- onClick: _react2['default'].PropTypes.func,
54
+ bsStyle: _propTypes2['default'].string,
55
+ bsSize: _propTypes2['default'].string,
56
+ href: _propTypes2['default'].string,
57
+ onClick: _propTypes2['default'].func,
54
58
  /**
55
59
  * The content of the split button.
56
60
  */
57
- title: _react2['default'].PropTypes.node.isRequired,
61
+ title: _propTypes2['default'].node.isRequired,
58
62
  /**
59
63
  * Accessible label for the toggle; the value of `title` if not specified.
60
64
  */
61
- toggleLabel: _react2['default'].PropTypes.string,
65
+ toggleLabel: _propTypes2['default'].string,
62
66
 
63
67
  // Override generated docs from <Dropdown>.
64
68
  /**
65
69
  * @private
66
70
  */
67
- children: _react2['default'].PropTypes.node
71
+ children: _propTypes2['default'].node
68
72
  });
69
73
 
70
74
  var SplitButton = function (_React$Component) {
package/lib/Tab.js CHANGED
@@ -22,6 +22,10 @@ var _react = require('react');
22
22
 
23
23
  var _react2 = _interopRequireDefault(_react);
24
24
 
25
+ var _propTypes = require('prop-types');
26
+
27
+ var _propTypes2 = _interopRequireDefault(_propTypes);
28
+
25
29
  var _TabContainer = require('./TabContainer');
26
30
 
27
31
  var _TabContainer2 = _interopRequireDefault(_TabContainer);
@@ -38,14 +42,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
38
42
 
39
43
  var propTypes = (0, _extends3['default'])({}, _TabPane2['default'].propTypes, {
40
44
 
41
- disabled: _react2['default'].PropTypes.bool,
45
+ disabled: _propTypes2['default'].bool,
42
46
 
43
- title: _react2['default'].PropTypes.node,
47
+ title: _propTypes2['default'].node,
44
48
 
45
49
  /**
46
50
  * tabClassName is used as className for the associated NavItem
47
51
  */
48
- tabClassName: _react2['default'].PropTypes.string
52
+ tabClassName: _propTypes2['default'].string
49
53
  });
50
54
 
51
55
  var Tab = function (_React$Component) {
@@ -22,6 +22,10 @@ var _react = require('react');
22
22
 
23
23
  var _react2 = _interopRequireDefault(_react);
24
24
 
25
+ var _propTypes = require('prop-types');
26
+
27
+ var _propTypes2 = _interopRequireDefault(_propTypes);
28
+
25
29
  var _uncontrollable = require('uncontrollable');
26
30
 
27
31
  var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
@@ -31,7 +35,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
31
35
  var TAB = 'tab';
32
36
  var PANE = 'pane';
33
37
 
34
- var idPropType = _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]);
38
+ var idPropType = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].number]);
35
39
 
36
40
  var propTypes = {
37
41
  /**
@@ -68,29 +72,29 @@ var propTypes = {
68
72
  *
69
73
  * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}`
70
74
  */
71
- generateChildId: _react.PropTypes.func,
75
+ generateChildId: _propTypes2['default'].func,
72
76
 
73
77
  /**
74
78
  * A callback fired when a tab is selected.
75
79
  *
76
80
  * @controllable activeKey
77
81
  */
78
- onSelect: _react.PropTypes.func,
82
+ onSelect: _propTypes2['default'].func,
79
83
 
80
84
  /**
81
85
  * The `eventKey` of the currently active tab.
82
86
  *
83
87
  * @controllable onSelect
84
88
  */
85
- activeKey: _react.PropTypes.any
89
+ activeKey: _propTypes2['default'].any
86
90
  };
87
91
 
88
92
  var childContextTypes = {
89
- $bs_tabContainer: _react2['default'].PropTypes.shape({
90
- activeKey: _react.PropTypes.any,
91
- onSelect: _react.PropTypes.func.isRequired,
92
- getTabId: _react.PropTypes.func.isRequired,
93
- getPaneId: _react.PropTypes.func.isRequired
93
+ $bs_tabContainer: _propTypes2['default'].shape({
94
+ activeKey: _propTypes2['default'].any,
95
+ onSelect: _propTypes2['default'].func.isRequired,
96
+ getTabId: _propTypes2['default'].func.isRequired,
97
+ getPaneId: _propTypes2['default'].func.isRequired
94
98
  })
95
99
  };
96
100
 
package/lib/TabContent.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 _elementType = require('react-prop-types/lib/elementType');
34
38
 
35
39
  var _elementType2 = _interopRequireDefault(_elementType);
@@ -46,35 +50,42 @@ var propTypes = {
46
50
  * `false` to disable, `true` to enable the default `<Fade>` animation or any
47
51
  * `<Transition>` component.
48
52
  */
49
- animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _elementType2['default']]),
53
+ animation: _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _elementType2['default']]),
54
+
55
+ /**
56
+ * Wait until the first "enter" transition to mount tabs (add them to the DOM)
57
+ */
58
+ mountOnEnter: _propTypes2['default'].bool,
50
59
 
51
60
  /**
52
61
  * Unmount tabs (remove it from the DOM) when they are no longer visible
53
62
  */
54
- unmountOnExit: _react.PropTypes.bool
63
+ unmountOnExit: _propTypes2['default'].bool
55
64
  };
56
65
 
57
66
  var defaultProps = {
58
67
  componentClass: 'div',
59
68
  animation: true,
69
+ mountOnEnter: false,
60
70
  unmountOnExit: false
61
71
  };
62
72
 
63
73
  var contextTypes = {
64
- $bs_tabContainer: _react.PropTypes.shape({
65
- activeKey: _react.PropTypes.any
74
+ $bs_tabContainer: _propTypes2['default'].shape({
75
+ activeKey: _propTypes2['default'].any
66
76
  })
67
77
  };
68
78
 
69
79
  var childContextTypes = {
70
- $bs_tabContent: _react.PropTypes.shape({
71
- bsClass: _react.PropTypes.string,
72
- animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _elementType2['default']]),
73
- activeKey: _react.PropTypes.any,
74
- unmountOnExit: _react.PropTypes.bool,
75
- onPaneEnter: _react.PropTypes.func.isRequired,
76
- onPaneExited: _react.PropTypes.func.isRequired,
77
- exiting: _react.PropTypes.bool.isRequired
80
+ $bs_tabContent: _propTypes2['default'].shape({
81
+ bsClass: _propTypes2['default'].string,
82
+ animation: _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _elementType2['default']]),
83
+ activeKey: _propTypes2['default'].any,
84
+ mountOnEnter: _propTypes2['default'].bool,
85
+ unmountOnExit: _propTypes2['default'].bool,
86
+ onPaneEnter: _propTypes2['default'].func.isRequired,
87
+ onPaneExited: _propTypes2['default'].func.isRequired,
88
+ exiting: _propTypes2['default'].bool.isRequired
78
89
  })
79
90
  };
80
91
 
@@ -103,6 +114,7 @@ var TabContent = function (_React$Component) {
103
114
  var _props = this.props,
104
115
  bsClass = _props.bsClass,
105
116
  animation = _props.animation,
117
+ mountOnEnter = _props.mountOnEnter,
106
118
  unmountOnExit = _props.unmountOnExit;
107
119
 
108
120
 
@@ -117,6 +129,7 @@ var TabContent = function (_React$Component) {
117
129
  bsClass: bsClass,
118
130
  animation: animation,
119
131
  activeKey: activeKey,
132
+ mountOnEnter: mountOnEnter,
120
133
  unmountOnExit: unmountOnExit,
121
134
  onPaneEnter: this.handlePaneEnter,
122
135
  onPaneExited: this.handlePaneExited,
@@ -184,7 +197,7 @@ var TabContent = function (_React$Component) {
184
197
  className = _props2.className,
185
198
  props = (0, _objectWithoutProperties3['default'])(_props2, ['componentClass', 'className']);
186
199
 
187
- var _splitBsPropsAndOmit = (0, _bootstrapUtils.splitBsPropsAndOmit)(props, ['animation', 'unmountOnExit']),
200
+ var _splitBsPropsAndOmit = (0, _bootstrapUtils.splitBsPropsAndOmit)(props, ['animation', 'mountOnEnter', 'unmountOnExit']),
188
201
  bsProps = _splitBsPropsAndOmit[0],
189
202
  elementProps = _splitBsPropsAndOmit[1];
190
203
 
package/lib/TabPane.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 _elementType = require('react-prop-types/lib/elementType');
34
38
 
35
39
  var _elementType2 = _interopRequireDefault(_elementType);
@@ -54,77 +58,83 @@ var propTypes = {
54
58
  /**
55
59
  * Uniquely identify the `<TabPane>` among its siblings.
56
60
  */
57
- eventKey: _react.PropTypes.any,
61
+ eventKey: _propTypes2['default'].any,
58
62
 
59
63
  /**
60
64
  * Use animation when showing or hiding `<TabPane>`s. Use `false` to disable,
61
65
  * `true` to enable the default `<Fade>` animation or any `<Transition>`
62
66
  * component.
63
67
  */
64
- animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _elementType2['default']]),
68
+ animation: _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _elementType2['default']]),
65
69
 
66
70
  /** @private **/
67
- id: _react.PropTypes.string,
71
+ id: _propTypes2['default'].string,
68
72
 
69
73
  /** @private **/
70
- 'aria-labelledby': _react.PropTypes.string,
74
+ 'aria-labelledby': _propTypes2['default'].string,
71
75
 
72
76
  /**
73
77
  * If not explicitly specified and rendered in the context of a
74
78
  * `<TabContent>`, the `bsClass` of the `<TabContent>` suffixed by `-pane`.
75
79
  * If otherwise not explicitly specified, `tab-pane`.
76
80
  */
77
- bsClass: _react2['default'].PropTypes.string,
81
+ bsClass: _propTypes2['default'].string,
78
82
 
79
83
  /**
80
84
  * Transition onEnter callback when animation is not `false`
81
85
  */
82
- onEnter: _react.PropTypes.func,
86
+ onEnter: _propTypes2['default'].func,
83
87
 
84
88
  /**
85
89
  * Transition onEntering callback when animation is not `false`
86
90
  */
87
- onEntering: _react.PropTypes.func,
91
+ onEntering: _propTypes2['default'].func,
88
92
 
89
93
  /**
90
94
  * Transition onEntered callback when animation is not `false`
91
95
  */
92
- onEntered: _react.PropTypes.func,
96
+ onEntered: _propTypes2['default'].func,
93
97
 
94
98
  /**
95
99
  * Transition onExit callback when animation is not `false`
96
100
  */
97
- onExit: _react.PropTypes.func,
101
+ onExit: _propTypes2['default'].func,
98
102
 
99
103
  /**
100
104
  * Transition onExiting callback when animation is not `false`
101
105
  */
102
- onExiting: _react.PropTypes.func,
106
+ onExiting: _propTypes2['default'].func,
103
107
 
104
108
  /**
105
109
  * Transition onExited callback when animation is not `false`
106
110
  */
107
- onExited: _react.PropTypes.func,
111
+ onExited: _propTypes2['default'].func,
112
+
113
+ /**
114
+ * Wait until the first "enter" transition to mount the tab (add it to the DOM)
115
+ */
116
+ mountOnEnter: _propTypes2['default'].bool,
108
117
 
109
118
  /**
110
119
  * Unmount the tab (remove it from the DOM) when it is no longer visible
111
120
  */
112
- unmountOnExit: _react.PropTypes.bool
121
+ unmountOnExit: _propTypes2['default'].bool
113
122
  };
114
123
 
115
124
  var contextTypes = {
116
- $bs_tabContainer: _react.PropTypes.shape({
117
- getId: _react.PropTypes.func,
118
- unmountOnExit: _react.PropTypes.bool
125
+ $bs_tabContainer: _propTypes2['default'].shape({
126
+ getTabId: _propTypes2['default'].func,
127
+ getPaneId: _propTypes2['default'].func
119
128
  }),
120
- $bs_tabContent: _react.PropTypes.shape({
121
- bsClass: _react.PropTypes.string,
122
- animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _elementType2['default']]),
123
- activeKey: _react.PropTypes.any,
124
- unmountOnExit: _react.PropTypes.bool,
125
- onPaneEnter: _react.PropTypes.func.isRequired,
126
- onPaneExited: _react.PropTypes.func.isRequired,
127
- exiting: _react.PropTypes.bool.isRequired
129
+ $bs_tabContent: _propTypes2['default'].shape({
130
+ bsClass: _propTypes2['default'].string,
131
+ animation: _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _elementType2['default']]),
132
+ activeKey: _propTypes2['default'].any,
133
+ mountOnEnter: _propTypes2['default'].bool,
134
+ unmountOnExit: _propTypes2['default'].bool,
135
+ onPaneEnter: _propTypes2['default'].func.isRequired,
136
+ onPaneExited: _propTypes2['default'].func.isRequired,
137
+ exiting: _propTypes2['default'].bool.isRequired
128
138
  })
129
139
  };
130
140
 
@@ -133,7 +143,7 @@ var contextTypes = {
133
143
  * conflict with the top level one.
134
144
  */
135
145
  var childContextTypes = {
136
- $bs_tabContainer: _react.PropTypes.oneOf([null])
146
+ $bs_tabContainer: _propTypes2['default'].oneOf([null])
137
147
  };
138
148
 
139
149
  var TabPane = function (_React$Component) {
@@ -232,8 +242,9 @@ var TabPane = function (_React$Component) {
232
242
  onExit = _props.onExit,
233
243
  onExiting = _props.onExiting,
234
244
  onExited = _props.onExited,
245
+ propsMountOnEnter = _props.mountOnEnter,
235
246
  propsUnmountOnExit = _props.unmountOnExit,
236
- props = (0, _objectWithoutProperties3['default'])(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'unmountOnExit']);
247
+ props = (0, _objectWithoutProperties3['default'])(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'mountOnEnter', 'unmountOnExit']);
237
248
  var _context = this.context,
238
249
  tabContent = _context.$bs_tabContent,
239
250
  tabContainer = _context.$bs_tabContainer;
@@ -245,6 +256,7 @@ var TabPane = function (_React$Component) {
245
256
  var active = this.isActive();
246
257
  var animation = this.getAnimation();
247
258
 
259
+ var mountOnEnter = propsMountOnEnter != null ? propsMountOnEnter : tabContent && tabContent.mountOnEnter;
248
260
  var unmountOnExit = propsUnmountOnExit != null ? propsUnmountOnExit : tabContent && tabContent.unmountOnExit;
249
261
 
250
262
  if (!active && !animation && unmountOnExit) {
@@ -287,6 +299,7 @@ var TabPane = function (_React$Component) {
287
299
  onExit: onExit,
288
300
  onExiting: onExiting,
289
301
  onExited: (0, _createChainedFunction2['default'])(this.handleExited, onExited),
302
+ mountOnEnter: mountOnEnter,
290
303
  unmountOnExit: unmountOnExit
291
304
  },
292
305
  pane
package/lib/Table.js CHANGED
@@ -30,16 +30,20 @@ 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 }; }
36
40
 
37
41
  var propTypes = {
38
- striped: _react2['default'].PropTypes.bool,
39
- bordered: _react2['default'].PropTypes.bool,
40
- condensed: _react2['default'].PropTypes.bool,
41
- hover: _react2['default'].PropTypes.bool,
42
- responsive: _react2['default'].PropTypes.bool
42
+ striped: _propTypes2['default'].bool,
43
+ bordered: _propTypes2['default'].bool,
44
+ condensed: _propTypes2['default'].bool,
45
+ hover: _propTypes2['default'].bool,
46
+ responsive: _propTypes2['default'].bool
43
47
  };
44
48
 
45
49
  var defaultProps = {