react-bootstrap 0.31.3 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +1 -0
- package/dist/react-bootstrap.js +14493 -17076
- package/dist/react-bootstrap.min.js +18479 -16
- package/es/Alert.js +1 -4
- package/es/Badge.js +1 -3
- package/es/ButtonGroup.js +1 -3
- package/es/Carousel.js +79 -79
- package/es/CarouselCaption.js +1 -3
- package/es/CarouselItem.js +3 -9
- package/es/Checkbox.js +7 -1
- package/es/Clearfix.js +1 -3
- package/es/CloseButton.js +1 -5
- package/es/Col.js +1 -3
- package/es/Collapse.js +58 -65
- package/es/Dropdown.js +66 -55
- package/es/DropdownButton.js +2 -8
- package/es/DropdownMenu.js +28 -28
- package/es/Fade.js +25 -10
- package/es/Form.js +1 -3
- package/es/FormControl.js +1 -2
- package/es/FormControlStatic.js +1 -3
- package/es/FormGroup.js +1 -3
- package/es/Glyphicon.js +1 -3
- package/es/Grid.js +1 -3
- package/es/HelpBlock.js +1 -3
- package/es/InputGroup.js +1 -3
- package/es/InputGroupAddon.js +1 -3
- package/es/InputGroupButton.js +1 -3
- package/es/Jumbotron.js +1 -3
- package/es/Label.js +1 -3
- package/es/ListGroup.js +1 -3
- package/es/Media.js +1 -3
- package/es/MediaBody.js +16 -5
- package/es/MediaHeading.js +1 -3
- package/es/MediaLeft.js +1 -3
- package/es/MediaList.js +1 -3
- package/es/MediaListItem.js +1 -3
- package/es/MediaRight.js +1 -3
- package/es/Modal.js +30 -19
- package/es/ModalBody.js +1 -3
- package/es/ModalFooter.js +1 -3
- package/es/ModalHeader.js +2 -4
- package/es/ModalTitle.js +1 -3
- package/es/Nav.js +44 -44
- package/es/NavDropdown.js +2 -0
- package/es/NavItem.js +5 -4
- package/es/Navbar.js +5 -7
- package/es/Overlay.js +1 -3
- package/es/OverlayTrigger.js +43 -43
- package/es/PageHeader.js +1 -3
- package/es/Pager.js +1 -3
- package/es/PagerItem.js +1 -4
- package/es/Pagination.js +15 -224
- package/es/PaginationItem.js +102 -0
- package/es/Panel.js +114 -173
- package/es/PanelBody.js +84 -0
- package/es/PanelCollapse.js +94 -0
- package/es/PanelFooter.js +53 -0
- package/es/PanelGroup.js +95 -52
- package/es/PanelHeading.js +75 -0
- package/es/PanelTitle.js +83 -0
- package/es/PanelToggle.js +94 -0
- package/es/ProgressBar.js +12 -8
- package/es/Radio.js +7 -1
- package/es/Row.js +1 -3
- package/es/SplitButton.js +1 -4
- package/es/SplitToggle.js +1 -4
- package/es/TabContent.js +7 -7
- package/es/TabPane.js +18 -18
- package/es/Table.js +1 -3
- package/es/Tabs.js +4 -10
- package/es/Thumbnail.js +3 -3
- package/es/ToggleButton.js +1 -4
- package/es/Well.js +1 -3
- package/es/index.js +0 -2
- package/es/utils/PropTypes.js +26 -4
- package/es/utils/ValidComponentChildren.js +1 -1
- package/es/utils/bootstrapUtils.js +5 -3
- package/lib/Accordion.js +9 -9
- package/lib/Alert.js +14 -17
- package/lib/Badge.js +12 -14
- package/lib/Breadcrumb.js +10 -10
- package/lib/BreadcrumbItem.js +14 -14
- package/lib/Button.js +20 -20
- package/lib/ButtonGroup.js +12 -14
- package/lib/ButtonToolbar.js +9 -9
- package/lib/Carousel.js +121 -121
- package/lib/CarouselCaption.js +9 -11
- package/lib/CarouselItem.js +17 -22
- package/lib/Checkbox.js +25 -21
- package/lib/Clearfix.js +14 -16
- package/lib/CloseButton.js +12 -16
- package/lib/Col.js +29 -31
- package/lib/Collapse.js +84 -92
- package/lib/ControlLabel.js +14 -14
- package/lib/Dropdown.js +106 -95
- package/lib/DropdownButton.js +22 -28
- package/lib/DropdownMenu.js +51 -51
- package/lib/DropdownToggle.js +16 -16
- package/lib/Fade.js +43 -25
- package/lib/Form.js +11 -13
- package/lib/FormControl.js +17 -17
- package/lib/FormControlFeedback.js +13 -13
- package/lib/FormControlStatic.js +9 -11
- package/lib/FormGroup.js +14 -16
- package/lib/Glyphicon.js +10 -12
- package/lib/Grid.js +10 -12
- package/lib/HelpBlock.js +8 -10
- package/lib/Image.js +13 -13
- package/lib/InputGroup.js +10 -12
- package/lib/InputGroupAddon.js +8 -10
- package/lib/InputGroupButton.js +8 -10
- package/lib/Jumbotron.js +9 -11
- package/lib/Label.js +11 -13
- package/lib/ListGroup.js +15 -17
- package/lib/ListGroupItem.js +22 -22
- package/lib/Media.js +15 -17
- package/lib/MediaBody.js +28 -11
- package/lib/MediaHeading.js +9 -11
- package/lib/MediaLeft.js +10 -12
- package/lib/MediaList.js +8 -10
- package/lib/MediaListItem.js +8 -10
- package/lib/MediaRight.js +10 -12
- package/lib/MenuItem.js +23 -23
- package/lib/Modal.js +80 -69
- package/lib/ModalBody.js +9 -11
- package/lib/ModalDialog.js +16 -16
- package/lib/ModalFooter.js +9 -11
- package/lib/ModalHeader.js +20 -22
- package/lib/ModalTitle.js +9 -11
- package/lib/Nav.js +81 -81
- package/lib/NavDropdown.js +27 -25
- package/lib/NavItem.js +23 -22
- package/lib/Navbar.js +46 -48
- package/lib/NavbarBrand.js +14 -14
- package/lib/NavbarCollapse.js +14 -14
- package/lib/NavbarHeader.js +10 -10
- package/lib/NavbarToggle.js +22 -22
- package/lib/Overlay.js +25 -27
- package/lib/OverlayTrigger.js +79 -79
- package/lib/PageHeader.js +10 -12
- package/lib/PageItem.js +2 -2
- package/lib/Pager.js +13 -15
- package/lib/PagerItem.js +18 -21
- package/lib/Pagination.js +25 -240
- package/lib/PaginationItem.js +135 -0
- package/lib/Panel.js +142 -180
- package/lib/PanelBody.js +114 -0
- package/lib/PanelCollapse.js +120 -0
- package/lib/PanelFooter.js +80 -0
- package/lib/PanelGroup.js +111 -70
- package/lib/PanelHeading.js +107 -0
- package/lib/PanelTitle.js +118 -0
- package/lib/PanelToggle.js +130 -0
- package/lib/Popover.js +22 -22
- package/lib/ProgressBar.js +39 -35
- package/lib/Radio.js +25 -21
- package/lib/ResponsiveEmbed.js +17 -17
- package/lib/Row.js +9 -11
- package/lib/SafeAnchor.js +17 -17
- package/lib/SplitButton.js +26 -29
- package/lib/SplitToggle.js +8 -11
- package/lib/Tab.js +15 -15
- package/lib/TabContainer.js +17 -17
- package/lib/TabContent.js +31 -31
- package/lib/TabPane.js +59 -59
- package/lib/Table.js +15 -17
- package/lib/Tabs.js +29 -35
- package/lib/Thumbnail.js +18 -20
- package/lib/ToggleButton.js +17 -20
- package/lib/ToggleButtonGroup.js +20 -20
- package/lib/Tooltip.js +20 -20
- package/lib/Well.js +8 -10
- package/lib/index.js +74 -79
- package/lib/utils/PropTypes.js +35 -9
- package/lib/utils/ValidComponentChildren.js +19 -19
- package/lib/utils/bootstrapUtils.js +13 -11
- package/lib/utils/capitalize.js +1 -1
- package/lib/utils/createChainedFunction.js +1 -1
- package/lib/utils/deprecationWarning.js +7 -7
- package/lib/utils/index.js +4 -4
- package/lib/utils/splitComponentProps.js +3 -3
- package/package.json +54 -64
- package/dist/react-bootstrap.min.js.map +0 -1
- package/es/PaginationButton.js +0 -98
- package/es/utils/TransitionEvents.js +0 -109
- package/lib/PaginationButton.js +0 -137
- package/lib/utils/TransitionEvents.js +0 -113
package/lib/OverlayTrigger.js
CHANGED
|
@@ -50,7 +50,7 @@ var _createChainedFunction = require('./utils/createChainedFunction');
|
|
|
50
50
|
|
|
51
51
|
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
|
|
52
52
|
|
|
53
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
53
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if value one is inside or equal to the of value
|
|
@@ -66,74 +66,74 @@ function isOneOf(one, of) {
|
|
|
66
66
|
return one === of;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
var triggerType = _propTypes2
|
|
69
|
+
var triggerType = _propTypes2.default.oneOf(['click', 'hover', 'focus']);
|
|
70
70
|
|
|
71
|
-
var propTypes = (0, _extends3
|
|
71
|
+
var propTypes = (0, _extends3.default)({}, _Overlay2.default.propTypes, {
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
trigger: _propTypes2
|
|
74
|
+
* Specify which action or actions trigger Overlay visibility
|
|
75
|
+
*/
|
|
76
|
+
trigger: _propTypes2.default.oneOfType([triggerType, _propTypes2.default.arrayOf(triggerType)]),
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* A millisecond delay amount to show and hide the Overlay once triggered
|
|
80
80
|
*/
|
|
81
|
-
delay: _propTypes2
|
|
81
|
+
delay: _propTypes2.default.number,
|
|
82
82
|
/**
|
|
83
83
|
* A millisecond delay amount before showing the Overlay once triggered.
|
|
84
84
|
*/
|
|
85
|
-
delayShow: _propTypes2
|
|
85
|
+
delayShow: _propTypes2.default.number,
|
|
86
86
|
/**
|
|
87
87
|
* A millisecond delay amount before hiding the Overlay once triggered.
|
|
88
88
|
*/
|
|
89
|
-
delayHide: _propTypes2
|
|
89
|
+
delayHide: _propTypes2.default.number,
|
|
90
90
|
|
|
91
91
|
// FIXME: This should be `defaultShow`.
|
|
92
92
|
/**
|
|
93
93
|
* The initial visibility state of the Overlay. For more nuanced visibility
|
|
94
94
|
* control, consider using the Overlay component directly.
|
|
95
95
|
*/
|
|
96
|
-
defaultOverlayShown: _propTypes2
|
|
96
|
+
defaultOverlayShown: _propTypes2.default.bool,
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* An element or text to overlay next to the target.
|
|
100
100
|
*/
|
|
101
|
-
overlay: _propTypes2
|
|
101
|
+
overlay: _propTypes2.default.node.isRequired,
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* @private
|
|
105
105
|
*/
|
|
106
|
-
onBlur: _propTypes2
|
|
106
|
+
onBlur: _propTypes2.default.func,
|
|
107
107
|
/**
|
|
108
108
|
* @private
|
|
109
109
|
*/
|
|
110
|
-
onClick: _propTypes2
|
|
110
|
+
onClick: _propTypes2.default.func,
|
|
111
111
|
/**
|
|
112
112
|
* @private
|
|
113
113
|
*/
|
|
114
|
-
onFocus: _propTypes2
|
|
114
|
+
onFocus: _propTypes2.default.func,
|
|
115
115
|
/**
|
|
116
116
|
* @private
|
|
117
117
|
*/
|
|
118
|
-
onMouseOut: _propTypes2
|
|
118
|
+
onMouseOut: _propTypes2.default.func,
|
|
119
119
|
/**
|
|
120
120
|
* @private
|
|
121
121
|
*/
|
|
122
|
-
onMouseOver: _propTypes2
|
|
122
|
+
onMouseOver: _propTypes2.default.func,
|
|
123
123
|
|
|
124
124
|
// Overridden props from `<Overlay>`.
|
|
125
125
|
/**
|
|
126
126
|
* @private
|
|
127
127
|
*/
|
|
128
|
-
target: _propTypes2
|
|
128
|
+
target: _propTypes2.default.oneOf([null]),
|
|
129
129
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
onHide: _propTypes2
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
onHide: _propTypes2.default.oneOf([null]),
|
|
133
133
|
/**
|
|
134
134
|
* @private
|
|
135
135
|
*/
|
|
136
|
-
show: _propTypes2
|
|
136
|
+
show: _propTypes2.default.oneOf([null])
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
var defaultProps = {
|
|
@@ -142,12 +142,12 @@ var defaultProps = {
|
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
var OverlayTrigger = function (_React$Component) {
|
|
145
|
-
(0, _inherits3
|
|
145
|
+
(0, _inherits3.default)(OverlayTrigger, _React$Component);
|
|
146
146
|
|
|
147
147
|
function OverlayTrigger(props, context) {
|
|
148
|
-
(0, _classCallCheck3
|
|
148
|
+
(0, _classCallCheck3.default)(this, OverlayTrigger);
|
|
149
149
|
|
|
150
|
-
var _this = (0, _possibleConstructorReturn3
|
|
150
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
|
|
151
151
|
|
|
152
152
|
_this.handleToggle = _this.handleToggle.bind(_this);
|
|
153
153
|
_this.handleDelayedShow = _this.handleDelayedShow.bind(_this);
|
|
@@ -155,10 +155,10 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
155
155
|
_this.handleHide = _this.handleHide.bind(_this);
|
|
156
156
|
|
|
157
157
|
_this.handleMouseOver = function (e) {
|
|
158
|
-
return _this.handleMouseOverOut(_this.handleDelayedShow, e);
|
|
158
|
+
return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement');
|
|
159
159
|
};
|
|
160
160
|
_this.handleMouseOut = function (e) {
|
|
161
|
-
return _this.handleMouseOverOut(_this.handleDelayedHide, e);
|
|
161
|
+
return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement');
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
_this._mountNode = null;
|
|
@@ -179,94 +179,90 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
182
|
-
_reactDom2
|
|
182
|
+
_reactDom2.default.unmountComponentAtNode(this._mountNode);
|
|
183
183
|
this._mountNode = null;
|
|
184
184
|
|
|
185
185
|
clearTimeout(this._hoverShowDelay);
|
|
186
186
|
clearTimeout(this._hoverHideDelay);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
OverlayTrigger.prototype.
|
|
190
|
-
if (this.state.show) {
|
|
191
|
-
this.hide();
|
|
192
|
-
} else {
|
|
193
|
-
this.show();
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
|
|
189
|
+
OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
|
|
198
190
|
var _this2 = this;
|
|
199
191
|
|
|
200
|
-
if (this.
|
|
201
|
-
clearTimeout(this.
|
|
202
|
-
this.
|
|
192
|
+
if (this._hoverShowDelay != null) {
|
|
193
|
+
clearTimeout(this._hoverShowDelay);
|
|
194
|
+
this._hoverShowDelay = null;
|
|
203
195
|
return;
|
|
204
196
|
}
|
|
205
197
|
|
|
206
|
-
if (this.state.show || this.
|
|
198
|
+
if (!this.state.show || this._hoverHideDelay != null) {
|
|
207
199
|
return;
|
|
208
200
|
}
|
|
209
201
|
|
|
210
|
-
var delay = this.props.
|
|
202
|
+
var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
|
|
211
203
|
|
|
212
204
|
if (!delay) {
|
|
213
|
-
this.
|
|
205
|
+
this.hide();
|
|
214
206
|
return;
|
|
215
207
|
}
|
|
216
208
|
|
|
217
|
-
this.
|
|
218
|
-
_this2.
|
|
219
|
-
_this2.
|
|
209
|
+
this._hoverHideDelay = setTimeout(function () {
|
|
210
|
+
_this2._hoverHideDelay = null;
|
|
211
|
+
_this2.hide();
|
|
220
212
|
}, delay);
|
|
221
213
|
};
|
|
222
214
|
|
|
223
|
-
OverlayTrigger.prototype.
|
|
215
|
+
OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
|
|
224
216
|
var _this3 = this;
|
|
225
217
|
|
|
226
|
-
if (this.
|
|
227
|
-
clearTimeout(this.
|
|
228
|
-
this.
|
|
218
|
+
if (this._hoverHideDelay != null) {
|
|
219
|
+
clearTimeout(this._hoverHideDelay);
|
|
220
|
+
this._hoverHideDelay = null;
|
|
229
221
|
return;
|
|
230
222
|
}
|
|
231
223
|
|
|
232
|
-
if (
|
|
224
|
+
if (this.state.show || this._hoverShowDelay != null) {
|
|
233
225
|
return;
|
|
234
226
|
}
|
|
235
227
|
|
|
236
|
-
var delay = this.props.
|
|
228
|
+
var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
|
|
237
229
|
|
|
238
230
|
if (!delay) {
|
|
239
|
-
this.
|
|
231
|
+
this.show();
|
|
240
232
|
return;
|
|
241
233
|
}
|
|
242
234
|
|
|
243
|
-
this.
|
|
244
|
-
_this3.
|
|
245
|
-
_this3.
|
|
235
|
+
this._hoverShowDelay = setTimeout(function () {
|
|
236
|
+
_this3._hoverShowDelay = null;
|
|
237
|
+
_this3.show();
|
|
246
238
|
}, delay);
|
|
247
239
|
};
|
|
248
240
|
|
|
241
|
+
OverlayTrigger.prototype.handleHide = function handleHide() {
|
|
242
|
+
this.hide();
|
|
243
|
+
};
|
|
244
|
+
|
|
249
245
|
// Simple implementation of mouseEnter and mouseLeave.
|
|
250
246
|
// React's built version is broken: https://github.com/facebook/react/issues/4251
|
|
251
247
|
// for cases when the trigger is disabled and mouseOut/Over can cause flicker
|
|
252
248
|
// moving from one child element to another.
|
|
253
249
|
|
|
254
250
|
|
|
255
|
-
OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {
|
|
251
|
+
OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
|
|
256
252
|
var target = e.currentTarget;
|
|
257
|
-
var related = e.relatedTarget || e.nativeEvent
|
|
253
|
+
var related = e.relatedTarget || e.nativeEvent[relatedNative];
|
|
258
254
|
|
|
259
|
-
if (!related || related !== target && !(0, _contains2
|
|
255
|
+
if ((!related || related !== target) && !(0, _contains2.default)(target, related)) {
|
|
260
256
|
handler(e);
|
|
261
257
|
}
|
|
262
258
|
};
|
|
263
259
|
|
|
264
|
-
OverlayTrigger.prototype.
|
|
265
|
-
this.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
260
|
+
OverlayTrigger.prototype.handleToggle = function handleToggle() {
|
|
261
|
+
if (this.state.show) {
|
|
262
|
+
this.hide();
|
|
263
|
+
} else {
|
|
264
|
+
this.show();
|
|
265
|
+
}
|
|
270
266
|
};
|
|
271
267
|
|
|
272
268
|
OverlayTrigger.prototype.hide = function hide() {
|
|
@@ -274,9 +270,9 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
274
270
|
};
|
|
275
271
|
|
|
276
272
|
OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {
|
|
277
|
-
return _react2
|
|
278
|
-
_Overlay2
|
|
279
|
-
(0, _extends3
|
|
273
|
+
return _react2.default.createElement(
|
|
274
|
+
_Overlay2.default,
|
|
275
|
+
(0, _extends3.default)({}, props, {
|
|
280
276
|
show: this.state.show,
|
|
281
277
|
onHide: this.handleHide,
|
|
282
278
|
target: this
|
|
@@ -285,8 +281,12 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
285
281
|
);
|
|
286
282
|
};
|
|
287
283
|
|
|
284
|
+
OverlayTrigger.prototype.show = function show() {
|
|
285
|
+
this.setState({ show: true });
|
|
286
|
+
};
|
|
287
|
+
|
|
288
288
|
OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
|
|
289
|
-
_reactDom2
|
|
289
|
+
_reactDom2.default.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
|
|
290
290
|
};
|
|
291
291
|
|
|
292
292
|
OverlayTrigger.prototype.render = function render() {
|
|
@@ -299,7 +299,7 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
299
299
|
onFocus = _props.onFocus,
|
|
300
300
|
onMouseOut = _props.onMouseOut,
|
|
301
301
|
onMouseOver = _props.onMouseOver,
|
|
302
|
-
props = (0, _objectWithoutProperties3
|
|
302
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
delete props.delay;
|
|
@@ -307,7 +307,7 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
307
307
|
delete props.delayHide;
|
|
308
308
|
delete props.defaultOverlayShown;
|
|
309
309
|
|
|
310
|
-
var child = _react2
|
|
310
|
+
var child = _react2.default.Children.only(children);
|
|
311
311
|
var childProps = child.props;
|
|
312
312
|
var triggerProps = {};
|
|
313
313
|
|
|
@@ -318,22 +318,22 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
318
318
|
// FIXME: The logic here for passing through handlers on this component is
|
|
319
319
|
// inconsistent. We shouldn't be passing any of these props through.
|
|
320
320
|
|
|
321
|
-
triggerProps.onClick = (0, _createChainedFunction2
|
|
321
|
+
triggerProps.onClick = (0, _createChainedFunction2.default)(childProps.onClick, onClick);
|
|
322
322
|
|
|
323
323
|
if (isOneOf('click', trigger)) {
|
|
324
|
-
triggerProps.onClick = (0, _createChainedFunction2
|
|
324
|
+
triggerProps.onClick = (0, _createChainedFunction2.default)(triggerProps.onClick, this.handleToggle);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
if (isOneOf('hover', trigger)) {
|
|
328
|
-
process.env.NODE_ENV !== 'production' ? (0, _warning2
|
|
328
|
+
process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0;
|
|
329
329
|
|
|
330
|
-
triggerProps.onMouseOver = (0, _createChainedFunction2
|
|
331
|
-
triggerProps.onMouseOut = (0, _createChainedFunction2
|
|
330
|
+
triggerProps.onMouseOver = (0, _createChainedFunction2.default)(childProps.onMouseOver, onMouseOver, this.handleMouseOver);
|
|
331
|
+
triggerProps.onMouseOut = (0, _createChainedFunction2.default)(childProps.onMouseOut, onMouseOut, this.handleMouseOut);
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
if (isOneOf('focus', trigger)) {
|
|
335
|
-
triggerProps.onFocus = (0, _createChainedFunction2
|
|
336
|
-
triggerProps.onBlur = (0, _createChainedFunction2
|
|
335
|
+
triggerProps.onFocus = (0, _createChainedFunction2.default)(childProps.onFocus, onFocus, this.handleDelayedShow);
|
|
336
|
+
triggerProps.onBlur = (0, _createChainedFunction2.default)(childProps.onBlur, onBlur, this.handleDelayedHide);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
this._overlay = this.makeOverlay(overlay, props);
|
|
@@ -342,10 +342,10 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
342
342
|
};
|
|
343
343
|
|
|
344
344
|
return OverlayTrigger;
|
|
345
|
-
}(_react2
|
|
345
|
+
}(_react2.default.Component);
|
|
346
346
|
|
|
347
347
|
OverlayTrigger.propTypes = propTypes;
|
|
348
348
|
OverlayTrigger.defaultProps = defaultProps;
|
|
349
349
|
|
|
350
|
-
exports
|
|
350
|
+
exports.default = OverlayTrigger;
|
|
351
351
|
module.exports = exports['default'];
|
package/lib/PageHeader.js
CHANGED
|
@@ -32,21 +32,21 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
32
32
|
|
|
33
33
|
var _bootstrapUtils = require('./utils/bootstrapUtils');
|
|
34
34
|
|
|
35
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
35
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
36
|
|
|
37
37
|
var PageHeader = function (_React$Component) {
|
|
38
|
-
(0, _inherits3
|
|
38
|
+
(0, _inherits3.default)(PageHeader, _React$Component);
|
|
39
39
|
|
|
40
40
|
function PageHeader() {
|
|
41
|
-
(0, _classCallCheck3
|
|
42
|
-
return (0, _possibleConstructorReturn3
|
|
41
|
+
(0, _classCallCheck3.default)(this, PageHeader);
|
|
42
|
+
return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
PageHeader.prototype.render = function render() {
|
|
46
46
|
var _props = this.props,
|
|
47
47
|
className = _props.className,
|
|
48
48
|
children = _props.children,
|
|
49
|
-
props = (0, _objectWithoutProperties3
|
|
49
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['className', 'children']);
|
|
50
50
|
|
|
51
51
|
var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
|
|
52
52
|
bsProps = _splitBsProps[0],
|
|
@@ -54,12 +54,10 @@ var PageHeader = function (_React$Component) {
|
|
|
54
54
|
|
|
55
55
|
var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
|
|
56
56
|
|
|
57
|
-
return _react2
|
|
57
|
+
return _react2.default.createElement(
|
|
58
58
|
'div',
|
|
59
|
-
(0, _extends3
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
_react2['default'].createElement(
|
|
59
|
+
(0, _extends3.default)({}, elementProps, { className: (0, _classnames2.default)(className, classes) }),
|
|
60
|
+
_react2.default.createElement(
|
|
63
61
|
'h1',
|
|
64
62
|
null,
|
|
65
63
|
children
|
|
@@ -68,7 +66,7 @@ var PageHeader = function (_React$Component) {
|
|
|
68
66
|
};
|
|
69
67
|
|
|
70
68
|
return PageHeader;
|
|
71
|
-
}(_react2
|
|
69
|
+
}(_react2.default.Component);
|
|
72
70
|
|
|
73
|
-
exports
|
|
71
|
+
exports.default = (0, _bootstrapUtils.bsClass)('page-header', PageHeader);
|
|
74
72
|
module.exports = exports['default'];
|
package/lib/PageItem.js
CHANGED
|
@@ -10,7 +10,7 @@ var _deprecationWarning = require('./utils/deprecationWarning');
|
|
|
10
10
|
|
|
11
11
|
var _deprecationWarning2 = _interopRequireDefault(_deprecationWarning);
|
|
12
12
|
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
|
|
15
|
-
exports
|
|
15
|
+
exports.default = _deprecationWarning2.default.wrapper(_PagerItem2.default, '`<PageItem>`', '`<Pager.Item>`');
|
|
16
16
|
module.exports = exports['default'];
|
package/lib/Pager.js
CHANGED
|
@@ -48,18 +48,18 @@ var _ValidComponentChildren = require('./utils/ValidComponentChildren');
|
|
|
48
48
|
|
|
49
49
|
var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
|
|
50
50
|
|
|
51
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
51
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
52
52
|
|
|
53
53
|
var propTypes = {
|
|
54
|
-
onSelect: _propTypes2
|
|
54
|
+
onSelect: _propTypes2.default.func
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
var Pager = function (_React$Component) {
|
|
58
|
-
(0, _inherits3
|
|
58
|
+
(0, _inherits3.default)(Pager, _React$Component);
|
|
59
59
|
|
|
60
60
|
function Pager() {
|
|
61
|
-
(0, _classCallCheck3
|
|
62
|
-
return (0, _possibleConstructorReturn3
|
|
61
|
+
(0, _classCallCheck3.default)(this, Pager);
|
|
62
|
+
return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
Pager.prototype.render = function render() {
|
|
@@ -67,7 +67,7 @@ var Pager = function (_React$Component) {
|
|
|
67
67
|
onSelect = _props.onSelect,
|
|
68
68
|
className = _props.className,
|
|
69
69
|
children = _props.children,
|
|
70
|
-
props = (0, _objectWithoutProperties3
|
|
70
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['onSelect', 'className', 'children']);
|
|
71
71
|
|
|
72
72
|
var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
|
|
73
73
|
bsProps = _splitBsProps[0],
|
|
@@ -75,25 +75,23 @@ var Pager = function (_React$Component) {
|
|
|
75
75
|
|
|
76
76
|
var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
|
|
77
77
|
|
|
78
|
-
return _react2
|
|
78
|
+
return _react2.default.createElement(
|
|
79
79
|
'ul',
|
|
80
|
-
(0, _extends3
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
_ValidComponentChildren2['default'].map(children, function (child) {
|
|
80
|
+
(0, _extends3.default)({}, elementProps, { className: (0, _classnames2.default)(className, classes) }),
|
|
81
|
+
_ValidComponentChildren2.default.map(children, function (child) {
|
|
84
82
|
return (0, _react.cloneElement)(child, {
|
|
85
|
-
onSelect: (0, _createChainedFunction2
|
|
83
|
+
onSelect: (0, _createChainedFunction2.default)(child.props.onSelect, onSelect)
|
|
86
84
|
});
|
|
87
85
|
})
|
|
88
86
|
);
|
|
89
87
|
};
|
|
90
88
|
|
|
91
89
|
return Pager;
|
|
92
|
-
}(_react2
|
|
90
|
+
}(_react2.default.Component);
|
|
93
91
|
|
|
94
92
|
Pager.propTypes = propTypes;
|
|
95
93
|
|
|
96
|
-
Pager.Item = _PagerItem2
|
|
94
|
+
Pager.Item = _PagerItem2.default;
|
|
97
95
|
|
|
98
|
-
exports
|
|
96
|
+
exports.default = (0, _bootstrapUtils.bsClass)('pager', Pager);
|
|
99
97
|
module.exports = exports['default'];
|
package/lib/PagerItem.js
CHANGED
|
@@ -42,15 +42,15 @@ var _createChainedFunction = require('./utils/createChainedFunction');
|
|
|
42
42
|
|
|
43
43
|
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
|
|
44
44
|
|
|
45
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
45
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
46
46
|
|
|
47
47
|
var propTypes = {
|
|
48
|
-
disabled: _propTypes2
|
|
49
|
-
previous: _propTypes2
|
|
50
|
-
next: _propTypes2
|
|
51
|
-
onClick: _propTypes2
|
|
52
|
-
onSelect: _propTypes2
|
|
53
|
-
eventKey: _propTypes2
|
|
48
|
+
disabled: _propTypes2.default.bool,
|
|
49
|
+
previous: _propTypes2.default.bool,
|
|
50
|
+
next: _propTypes2.default.bool,
|
|
51
|
+
onClick: _propTypes2.default.func,
|
|
52
|
+
onSelect: _propTypes2.default.func,
|
|
53
|
+
eventKey: _propTypes2.default.any
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
var defaultProps = {
|
|
@@ -60,12 +60,12 @@ var defaultProps = {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
var PagerItem = function (_React$Component) {
|
|
63
|
-
(0, _inherits3
|
|
63
|
+
(0, _inherits3.default)(PagerItem, _React$Component);
|
|
64
64
|
|
|
65
65
|
function PagerItem(props, context) {
|
|
66
|
-
(0, _classCallCheck3
|
|
66
|
+
(0, _classCallCheck3.default)(this, PagerItem);
|
|
67
67
|
|
|
68
|
-
var _this = (0, _possibleConstructorReturn3
|
|
68
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
|
|
69
69
|
|
|
70
70
|
_this.handleSelect = _this.handleSelect.bind(_this);
|
|
71
71
|
return _this;
|
|
@@ -78,11 +78,8 @@ var PagerItem = function (_React$Component) {
|
|
|
78
78
|
eventKey = _props.eventKey;
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
if (onSelect || disabled) {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
81
|
if (disabled) {
|
|
82
|
+
e.preventDefault();
|
|
86
83
|
return;
|
|
87
84
|
}
|
|
88
85
|
|
|
@@ -99,30 +96,30 @@ var PagerItem = function (_React$Component) {
|
|
|
99
96
|
onClick = _props2.onClick,
|
|
100
97
|
className = _props2.className,
|
|
101
98
|
style = _props2.style,
|
|
102
|
-
props = (0, _objectWithoutProperties3
|
|
99
|
+
props = (0, _objectWithoutProperties3.default)(_props2, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']);
|
|
103
100
|
|
|
104
101
|
|
|
105
102
|
delete props.onSelect;
|
|
106
103
|
delete props.eventKey;
|
|
107
104
|
|
|
108
|
-
return _react2
|
|
105
|
+
return _react2.default.createElement(
|
|
109
106
|
'li',
|
|
110
107
|
{
|
|
111
|
-
className: (0, _classnames2
|
|
108
|
+
className: (0, _classnames2.default)(className, { disabled: disabled, previous: previous, next: next }),
|
|
112
109
|
style: style
|
|
113
110
|
},
|
|
114
|
-
_react2
|
|
111
|
+
_react2.default.createElement(_SafeAnchor2.default, (0, _extends3.default)({}, props, {
|
|
115
112
|
disabled: disabled,
|
|
116
|
-
onClick: (0, _createChainedFunction2
|
|
113
|
+
onClick: (0, _createChainedFunction2.default)(onClick, this.handleSelect)
|
|
117
114
|
}))
|
|
118
115
|
);
|
|
119
116
|
};
|
|
120
117
|
|
|
121
118
|
return PagerItem;
|
|
122
|
-
}(_react2
|
|
119
|
+
}(_react2.default.Component);
|
|
123
120
|
|
|
124
121
|
PagerItem.propTypes = propTypes;
|
|
125
122
|
PagerItem.defaultProps = defaultProps;
|
|
126
123
|
|
|
127
|
-
exports
|
|
124
|
+
exports.default = PagerItem;
|
|
128
125
|
module.exports = exports['default'];
|