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/es/Modal.js
CHANGED
|
@@ -136,6 +136,17 @@ var childContextTypes = {
|
|
|
136
136
|
})
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
+
/* eslint-disable no-use-before-define, react/no-multi-comp */
|
|
140
|
+
function DialogTransition(props) {
|
|
141
|
+
return React.createElement(Fade, _extends({}, props, { timeout: Modal.TRANSITION_DURATION }));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function BackdropTransition(props) {
|
|
145
|
+
return React.createElement(Fade, _extends({}, props, { timeout: Modal.BACKDROP_TRANSITION_DURATION }));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* eslint-enable no-use-before-define */
|
|
149
|
+
|
|
139
150
|
var Modal = function (_React$Component) {
|
|
140
151
|
_inherits(Modal, _React$Component);
|
|
141
152
|
|
|
@@ -148,6 +159,7 @@ var Modal = function (_React$Component) {
|
|
|
148
159
|
_this.handleExited = _this.handleExited.bind(_this);
|
|
149
160
|
_this.handleWindowResize = _this.handleWindowResize.bind(_this);
|
|
150
161
|
_this.handleDialogClick = _this.handleDialogClick.bind(_this);
|
|
162
|
+
_this.setModalRef = _this.setModalRef.bind(_this);
|
|
151
163
|
|
|
152
164
|
_this.state = {
|
|
153
165
|
style: {}
|
|
@@ -168,6 +180,18 @@ var Modal = function (_React$Component) {
|
|
|
168
180
|
this.handleExited();
|
|
169
181
|
};
|
|
170
182
|
|
|
183
|
+
Modal.prototype.setModalRef = function setModalRef(ref) {
|
|
184
|
+
this._modal = ref;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
Modal.prototype.handleDialogClick = function handleDialogClick(e) {
|
|
188
|
+
if (e.target !== e.currentTarget) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
this.props.onHide();
|
|
193
|
+
};
|
|
194
|
+
|
|
171
195
|
Modal.prototype.handleEntering = function handleEntering() {
|
|
172
196
|
// FIXME: This should work even when animation is disabled.
|
|
173
197
|
events.on(window, 'resize', this.handleWindowResize);
|
|
@@ -183,14 +207,6 @@ var Modal = function (_React$Component) {
|
|
|
183
207
|
this.updateStyle();
|
|
184
208
|
};
|
|
185
209
|
|
|
186
|
-
Modal.prototype.handleDialogClick = function handleDialogClick(e) {
|
|
187
|
-
if (e.target !== e.currentTarget) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
this.props.onHide();
|
|
192
|
-
};
|
|
193
|
-
|
|
194
210
|
Modal.prototype.updateStyle = function updateStyle() {
|
|
195
211
|
if (!canUseDOM) {
|
|
196
212
|
return;
|
|
@@ -212,8 +228,6 @@ var Modal = function (_React$Component) {
|
|
|
212
228
|
};
|
|
213
229
|
|
|
214
230
|
Modal.prototype.render = function render() {
|
|
215
|
-
var _this2 = this;
|
|
216
|
-
|
|
217
231
|
var _props = this.props,
|
|
218
232
|
backdrop = _props.backdrop,
|
|
219
233
|
backdropClassName = _props.backdropClassName,
|
|
@@ -236,18 +250,15 @@ var Modal = function (_React$Component) {
|
|
|
236
250
|
return React.createElement(
|
|
237
251
|
BaseModal,
|
|
238
252
|
_extends({}, baseModalProps, {
|
|
239
|
-
ref:
|
|
240
|
-
_this2._modal = c;
|
|
241
|
-
},
|
|
253
|
+
ref: this.setModalRef,
|
|
242
254
|
show: show,
|
|
243
|
-
|
|
244
|
-
|
|
255
|
+
containerClassName: prefix(props, 'open'),
|
|
256
|
+
transition: animation ? DialogTransition : undefined,
|
|
245
257
|
backdrop: backdrop,
|
|
258
|
+
backdropTransition: animation ? BackdropTransition : undefined,
|
|
246
259
|
backdropClassName: classNames(prefix(props, 'backdrop'), backdropClassName, inClassName),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
dialogTransitionTimeout: Modal.TRANSITION_DURATION,
|
|
250
|
-
backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
|
|
260
|
+
onEntering: createChainedFunction(onEntering, this.handleEntering),
|
|
261
|
+
onExited: createChainedFunction(onExited, this.handleExited)
|
|
251
262
|
}),
|
|
252
263
|
React.createElement(
|
|
253
264
|
Dialog,
|
package/es/ModalBody.js
CHANGED
|
@@ -38,9 +38,7 @@ var ModalBody = function (_React$Component) {
|
|
|
38
38
|
|
|
39
39
|
var classes = getClassSet(bsProps);
|
|
40
40
|
|
|
41
|
-
return React.createElement(Component, _extends({}, elementProps, {
|
|
42
|
-
className: classNames(className, classes)
|
|
43
|
-
}));
|
|
41
|
+
return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
return ModalBody;
|
package/es/ModalFooter.js
CHANGED
|
@@ -38,9 +38,7 @@ var ModalFooter = function (_React$Component) {
|
|
|
38
38
|
|
|
39
39
|
var classes = getClassSet(bsProps);
|
|
40
40
|
|
|
41
|
-
return React.createElement(Component, _extends({}, elementProps, {
|
|
42
|
-
className: classNames(className, classes)
|
|
43
|
-
}));
|
|
41
|
+
return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
return ModalFooter;
|
package/es/ModalHeader.js
CHANGED
|
@@ -4,8 +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 from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
11
|
import createChainedFunction from './utils/createChainedFunction';
|
|
@@ -73,9 +73,7 @@ var ModalHeader = function (_React$Component) {
|
|
|
73
73
|
|
|
74
74
|
return React.createElement(
|
|
75
75
|
'div',
|
|
76
|
-
_extends({}, elementProps, {
|
|
77
|
-
className: classNames(className, classes)
|
|
78
|
-
}),
|
|
76
|
+
_extends({}, elementProps, { className: classNames(className, classes) }),
|
|
79
77
|
closeButton && React.createElement(CloseButton, {
|
|
80
78
|
label: closeLabel,
|
|
81
79
|
onClick: createChainedFunction(modal && modal.onHide, onHide)
|
package/es/ModalTitle.js
CHANGED
|
@@ -38,9 +38,7 @@ var ModalTitle = function (_React$Component) {
|
|
|
38
38
|
|
|
39
39
|
var classes = getClassSet(bsProps);
|
|
40
40
|
|
|
41
|
-
return React.createElement(Component, _extends({}, elementProps, {
|
|
42
|
-
className: classNames(className, classes)
|
|
43
|
-
}));
|
|
41
|
+
return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
return ModalTitle;
|
package/es/Nav.js
CHANGED
|
@@ -50,8 +50,8 @@ var propTypes = {
|
|
|
50
50
|
*
|
|
51
51
|
* ```js
|
|
52
52
|
* function (
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* Any eventKey,
|
|
54
|
+
* SyntheticEvent event?
|
|
55
55
|
* )
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
@@ -148,30 +148,16 @@ var Nav = function (_React$Component) {
|
|
|
148
148
|
activeNode.firstChild.focus();
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
Nav.prototype.
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
switch (event.keyCode) {
|
|
155
|
-
case keycode.codes.left:
|
|
156
|
-
case keycode.codes.up:
|
|
157
|
-
nextActiveChild = this.getNextActiveChild(-1);
|
|
158
|
-
break;
|
|
159
|
-
case keycode.codes.right:
|
|
160
|
-
case keycode.codes.down:
|
|
161
|
-
nextActiveChild = this.getNextActiveChild(1);
|
|
162
|
-
break;
|
|
163
|
-
default:
|
|
164
|
-
// It was a different key; don't handle this keypress.
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
151
|
+
Nav.prototype.getActiveProps = function getActiveProps() {
|
|
152
|
+
var tabContainer = this.context.$bs_tabContainer;
|
|
167
153
|
|
|
168
|
-
|
|
154
|
+
if (tabContainer) {
|
|
155
|
+
process.env.NODE_ENV !== 'production' ? warning(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;
|
|
169
156
|
|
|
170
|
-
|
|
171
|
-
onSelect(nextActiveChild.props.eventKey);
|
|
157
|
+
return tabContainer;
|
|
172
158
|
}
|
|
173
159
|
|
|
174
|
-
this.
|
|
160
|
+
return this.props;
|
|
175
161
|
};
|
|
176
162
|
|
|
177
163
|
Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) {
|
|
@@ -210,28 +196,6 @@ var Nav = function (_React$Component) {
|
|
|
210
196
|
return validChildren[nextIndex];
|
|
211
197
|
};
|
|
212
198
|
|
|
213
|
-
Nav.prototype.getActiveProps = function getActiveProps() {
|
|
214
|
-
var tabContainer = this.context.$bs_tabContainer;
|
|
215
|
-
|
|
216
|
-
if (tabContainer) {
|
|
217
|
-
process.env.NODE_ENV !== 'production' ? warning(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;
|
|
218
|
-
|
|
219
|
-
return tabContainer;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return this.props;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
|
|
226
|
-
var props = _ref2.props;
|
|
227
|
-
|
|
228
|
-
if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return props.active;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
199
|
Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {
|
|
236
200
|
var _this4 = this;
|
|
237
201
|
|
|
@@ -273,6 +237,42 @@ var Nav = function (_React$Component) {
|
|
|
273
237
|
};
|
|
274
238
|
};
|
|
275
239
|
|
|
240
|
+
Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
|
|
241
|
+
var nextActiveChild = void 0;
|
|
242
|
+
|
|
243
|
+
switch (event.keyCode) {
|
|
244
|
+
case keycode.codes.left:
|
|
245
|
+
case keycode.codes.up:
|
|
246
|
+
nextActiveChild = this.getNextActiveChild(-1);
|
|
247
|
+
break;
|
|
248
|
+
case keycode.codes.right:
|
|
249
|
+
case keycode.codes.down:
|
|
250
|
+
nextActiveChild = this.getNextActiveChild(1);
|
|
251
|
+
break;
|
|
252
|
+
default:
|
|
253
|
+
// It was a different key; don't handle this keypress.
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
event.preventDefault();
|
|
258
|
+
|
|
259
|
+
if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {
|
|
260
|
+
onSelect(nextActiveChild.props.eventKey);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
this._needsRefocus = true;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
|
|
267
|
+
var props = _ref2.props;
|
|
268
|
+
|
|
269
|
+
if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
|
|
270
|
+
return true;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return props.active;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
276
|
Nav.prototype.render = function render() {
|
|
277
277
|
var _extends2,
|
|
278
278
|
_this5 = this;
|
package/es/NavDropdown.js
CHANGED
|
@@ -17,6 +17,8 @@ var propTypes = _extends({}, Dropdown.propTypes, {
|
|
|
17
17
|
title: PropTypes.node.isRequired,
|
|
18
18
|
noCaret: PropTypes.bool,
|
|
19
19
|
active: PropTypes.bool,
|
|
20
|
+
activeKey: PropTypes.any,
|
|
21
|
+
activeHref: PropTypes.string,
|
|
20
22
|
|
|
21
23
|
// Override generated docs from <Dropdown>.
|
|
22
24
|
/**
|
package/es/NavItem.js
CHANGED
|
@@ -38,12 +38,13 @@ var NavItem = function (_React$Component) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
NavItem.prototype.handleClick = function handleClick(e) {
|
|
41
|
-
if (this.props.
|
|
41
|
+
if (this.props.disabled) {
|
|
42
42
|
e.preventDefault();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
46
|
+
if (this.props.onSelect) {
|
|
47
|
+
this.props.onSelect(this.props.eventKey, e);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
|
package/es/Navbar.js
CHANGED
|
@@ -52,10 +52,10 @@ var propTypes = {
|
|
|
52
52
|
componentClass: elementType,
|
|
53
53
|
/**
|
|
54
54
|
* A callback fired when the `<Navbar>` body collapses or expands. Fired when
|
|
55
|
-
* a `<Navbar.Toggle>` is clicked and called with the new `
|
|
55
|
+
* a `<Navbar.Toggle>` is clicked and called with the new `expanded`
|
|
56
56
|
* boolean value.
|
|
57
57
|
*
|
|
58
|
-
* @controllable
|
|
58
|
+
* @controllable expanded
|
|
59
59
|
*/
|
|
60
60
|
onToggle: PropTypes.func,
|
|
61
61
|
/**
|
|
@@ -67,8 +67,8 @@ var propTypes = {
|
|
|
67
67
|
*
|
|
68
68
|
* ```js
|
|
69
69
|
* function (
|
|
70
|
-
*
|
|
71
|
-
*
|
|
70
|
+
* Any eventKey,
|
|
71
|
+
* SyntheticEvent event?
|
|
72
72
|
* )
|
|
73
73
|
* ```
|
|
74
74
|
*
|
|
@@ -203,9 +203,7 @@ var Navbar = function (_React$Component) {
|
|
|
203
203
|
|
|
204
204
|
return React.createElement(
|
|
205
205
|
Component,
|
|
206
|
-
_extends({}, elementProps, {
|
|
207
|
-
className: classNames(className, classes)
|
|
208
|
-
}),
|
|
206
|
+
_extends({}, elementProps, { className: classNames(className, classes) }),
|
|
209
207
|
React.createElement(
|
|
210
208
|
Grid,
|
|
211
209
|
{ fluid: fluid },
|
package/es/Overlay.js
CHANGED
package/es/OverlayTrigger.js
CHANGED
|
@@ -32,8 +32,8 @@ var triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);
|
|
|
32
32
|
var propTypes = _extends({}, Overlay.propTypes, {
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* Specify which action or actions trigger Overlay visibility
|
|
36
|
+
*/
|
|
37
37
|
trigger: PropTypes.oneOfType([triggerType, PropTypes.arrayOf(triggerType)]),
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -88,8 +88,8 @@ var propTypes = _extends({}, Overlay.propTypes, {
|
|
|
88
88
|
*/
|
|
89
89
|
target: PropTypes.oneOf([null]),
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
93
|
onHide: PropTypes.oneOf([null]),
|
|
94
94
|
/**
|
|
95
95
|
* @private
|
|
@@ -116,10 +116,10 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
116
116
|
_this.handleHide = _this.handleHide.bind(_this);
|
|
117
117
|
|
|
118
118
|
_this.handleMouseOver = function (e) {
|
|
119
|
-
return _this.handleMouseOverOut(_this.handleDelayedShow, e);
|
|
119
|
+
return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement');
|
|
120
120
|
};
|
|
121
121
|
_this.handleMouseOut = function (e) {
|
|
122
|
-
return _this.handleMouseOverOut(_this.handleDelayedHide, e);
|
|
122
|
+
return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement');
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
_this._mountNode = null;
|
|
@@ -147,87 +147,83 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
147
147
|
clearTimeout(this._hoverHideDelay);
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
OverlayTrigger.prototype.
|
|
151
|
-
if (this.state.show) {
|
|
152
|
-
this.hide();
|
|
153
|
-
} else {
|
|
154
|
-
this.show();
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
|
|
150
|
+
OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
|
|
159
151
|
var _this2 = this;
|
|
160
152
|
|
|
161
|
-
if (this.
|
|
162
|
-
clearTimeout(this.
|
|
163
|
-
this.
|
|
153
|
+
if (this._hoverShowDelay != null) {
|
|
154
|
+
clearTimeout(this._hoverShowDelay);
|
|
155
|
+
this._hoverShowDelay = null;
|
|
164
156
|
return;
|
|
165
157
|
}
|
|
166
158
|
|
|
167
|
-
if (this.state.show || this.
|
|
159
|
+
if (!this.state.show || this._hoverHideDelay != null) {
|
|
168
160
|
return;
|
|
169
161
|
}
|
|
170
162
|
|
|
171
|
-
var delay = this.props.
|
|
163
|
+
var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
|
|
172
164
|
|
|
173
165
|
if (!delay) {
|
|
174
|
-
this.
|
|
166
|
+
this.hide();
|
|
175
167
|
return;
|
|
176
168
|
}
|
|
177
169
|
|
|
178
|
-
this.
|
|
179
|
-
_this2.
|
|
180
|
-
_this2.
|
|
170
|
+
this._hoverHideDelay = setTimeout(function () {
|
|
171
|
+
_this2._hoverHideDelay = null;
|
|
172
|
+
_this2.hide();
|
|
181
173
|
}, delay);
|
|
182
174
|
};
|
|
183
175
|
|
|
184
|
-
OverlayTrigger.prototype.
|
|
176
|
+
OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
|
|
185
177
|
var _this3 = this;
|
|
186
178
|
|
|
187
|
-
if (this.
|
|
188
|
-
clearTimeout(this.
|
|
189
|
-
this.
|
|
179
|
+
if (this._hoverHideDelay != null) {
|
|
180
|
+
clearTimeout(this._hoverHideDelay);
|
|
181
|
+
this._hoverHideDelay = null;
|
|
190
182
|
return;
|
|
191
183
|
}
|
|
192
184
|
|
|
193
|
-
if (
|
|
185
|
+
if (this.state.show || this._hoverShowDelay != null) {
|
|
194
186
|
return;
|
|
195
187
|
}
|
|
196
188
|
|
|
197
|
-
var delay = this.props.
|
|
189
|
+
var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
|
|
198
190
|
|
|
199
191
|
if (!delay) {
|
|
200
|
-
this.
|
|
192
|
+
this.show();
|
|
201
193
|
return;
|
|
202
194
|
}
|
|
203
195
|
|
|
204
|
-
this.
|
|
205
|
-
_this3.
|
|
206
|
-
_this3.
|
|
196
|
+
this._hoverShowDelay = setTimeout(function () {
|
|
197
|
+
_this3._hoverShowDelay = null;
|
|
198
|
+
_this3.show();
|
|
207
199
|
}, delay);
|
|
208
200
|
};
|
|
209
201
|
|
|
202
|
+
OverlayTrigger.prototype.handleHide = function handleHide() {
|
|
203
|
+
this.hide();
|
|
204
|
+
};
|
|
205
|
+
|
|
210
206
|
// Simple implementation of mouseEnter and mouseLeave.
|
|
211
207
|
// React's built version is broken: https://github.com/facebook/react/issues/4251
|
|
212
208
|
// for cases when the trigger is disabled and mouseOut/Over can cause flicker
|
|
213
209
|
// moving from one child element to another.
|
|
214
210
|
|
|
215
211
|
|
|
216
|
-
OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {
|
|
212
|
+
OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
|
|
217
213
|
var target = e.currentTarget;
|
|
218
|
-
var related = e.relatedTarget || e.nativeEvent
|
|
214
|
+
var related = e.relatedTarget || e.nativeEvent[relatedNative];
|
|
219
215
|
|
|
220
|
-
if (!related || related !== target && !contains(target, related)) {
|
|
216
|
+
if ((!related || related !== target) && !contains(target, related)) {
|
|
221
217
|
handler(e);
|
|
222
218
|
}
|
|
223
219
|
};
|
|
224
220
|
|
|
225
|
-
OverlayTrigger.prototype.
|
|
226
|
-
this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
221
|
+
OverlayTrigger.prototype.handleToggle = function handleToggle() {
|
|
222
|
+
if (this.state.show) {
|
|
223
|
+
this.hide();
|
|
224
|
+
} else {
|
|
225
|
+
this.show();
|
|
226
|
+
}
|
|
231
227
|
};
|
|
232
228
|
|
|
233
229
|
OverlayTrigger.prototype.hide = function hide() {
|
|
@@ -246,6 +242,10 @@ var OverlayTrigger = function (_React$Component) {
|
|
|
246
242
|
);
|
|
247
243
|
};
|
|
248
244
|
|
|
245
|
+
OverlayTrigger.prototype.show = function show() {
|
|
246
|
+
this.setState({ show: true });
|
|
247
|
+
};
|
|
248
|
+
|
|
249
249
|
OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
|
|
250
250
|
ReactDOM.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
|
|
251
251
|
};
|
package/es/PageHeader.js
CHANGED
|
@@ -31,9 +31,7 @@ var PageHeader = function (_React$Component) {
|
|
|
31
31
|
|
|
32
32
|
return React.createElement(
|
|
33
33
|
'div',
|
|
34
|
-
_extends({}, elementProps, {
|
|
35
|
-
className: classNames(className, classes)
|
|
36
|
-
}),
|
|
34
|
+
_extends({}, elementProps, { className: classNames(className, classes) }),
|
|
37
35
|
React.createElement(
|
|
38
36
|
'h1',
|
|
39
37
|
null,
|
package/es/Pager.js
CHANGED
|
@@ -40,9 +40,7 @@ var Pager = function (_React$Component) {
|
|
|
40
40
|
|
|
41
41
|
return React.createElement(
|
|
42
42
|
'ul',
|
|
43
|
-
_extends({}, elementProps, {
|
|
44
|
-
className: classNames(className, classes)
|
|
45
|
-
}),
|
|
43
|
+
_extends({}, elementProps, { className: classNames(className, classes) }),
|
|
46
44
|
ValidComponentChildren.map(children, function (child) {
|
|
47
45
|
return cloneElement(child, {
|
|
48
46
|
onSelect: createChainedFunction(child.props.onSelect, onSelect)
|