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.
- package/CHANGELOG.md +64 -0
- package/LICENSE +2 -2
- package/dist/react-bootstrap.js +3161 -1664
- package/dist/react-bootstrap.min.js +9 -9
- package/dist/react-bootstrap.min.js.map +1 -1
- package/es/Alert.js +3 -2
- package/es/Badge.js +2 -1
- package/es/BreadcrumbItem.js +5 -4
- package/es/Button.js +7 -6
- package/es/ButtonGroup.js +4 -3
- package/es/Carousel.js +17 -16
- package/es/CarouselItem.js +7 -6
- package/es/Checkbox.js +5 -4
- package/es/Clearfix.js +5 -4
- package/es/Col.js +21 -20
- package/es/Collapse.js +20 -13
- package/es/ControlLabel.js +4 -3
- package/es/Dropdown.js +34 -22
- package/es/DropdownButton.js +6 -5
- package/es/DropdownMenu.js +19 -14
- package/es/DropdownToggle.js +5 -4
- package/es/Fade.js +17 -10
- package/es/Form.js +3 -2
- package/es/FormControl.js +27 -6
- package/es/FormControlFeedback.js +2 -1
- package/es/FormGroup.js +4 -3
- package/es/Glyphicon.js +3 -2
- package/es/Grid.js +2 -1
- package/es/Image.js +5 -4
- package/es/ListGroupItem.js +8 -7
- package/es/MediaLeft.js +2 -1
- package/es/MediaRight.js +2 -1
- package/es/MenuItem.js +9 -8
- package/es/Modal.js +22 -15
- package/es/ModalBody.js +15 -2
- package/es/ModalDialog.js +2 -1
- package/es/ModalFooter.js +15 -2
- package/es/ModalHeader.js +7 -6
- package/es/ModalTitle.js +15 -2
- package/es/Nav.js +20 -19
- package/es/NavDropdown.js +5 -4
- package/es/NavItem.js +8 -7
- package/es/Navbar.js +17 -15
- package/es/NavbarBrand.js +3 -2
- package/es/NavbarCollapse.js +2 -1
- package/es/NavbarHeader.js +3 -2
- package/es/NavbarToggle.js +2 -1
- package/es/Overlay.js +18 -11
- package/es/OverlayTrigger.js +20 -18
- package/es/Pager.js +2 -1
- package/es/PagerItem.js +7 -6
- package/es/Pagination.js +54 -60
- package/es/PaginationButton.js +7 -6
- package/es/Panel.js +17 -20
- package/es/PanelGroup.js +6 -5
- package/es/Popover.js +8 -7
- package/es/ProgressBar.js +2 -1
- package/es/Radio.js +5 -4
- package/es/ResponsiveEmbed.js +2 -1
- package/es/SafeAnchor.js +6 -5
- package/es/SplitButton.js +8 -7
- package/es/Tab.js +4 -3
- package/es/TabContainer.js +3 -2
- package/es/TabContent.js +12 -2
- package/es/TabPane.js +15 -5
- package/es/Table.js +6 -5
- package/es/Tabs.js +16 -7
- package/es/Thumbnail.js +4 -3
- package/es/Tooltip.js +7 -6
- package/es/index.js +2 -0
- package/es/utils/bootstrapUtils.js +1 -1
- package/lib/Alert.js +6 -2
- package/lib/Badge.js +5 -1
- package/lib/BreadcrumbItem.js +8 -4
- package/lib/Button.js +10 -6
- package/lib/ButtonGroup.js +7 -3
- package/lib/Carousel.js +20 -16
- package/lib/CarouselItem.js +10 -6
- package/lib/Checkbox.js +8 -4
- package/lib/Clearfix.js +8 -4
- package/lib/Col.js +24 -20
- package/lib/Collapse.js +23 -13
- package/lib/ControlLabel.js +7 -3
- package/lib/Dropdown.js +37 -22
- package/lib/DropdownButton.js +9 -5
- package/lib/DropdownMenu.js +21 -13
- package/lib/DropdownToggle.js +8 -4
- package/lib/Fade.js +20 -10
- package/lib/Form.js +6 -2
- package/lib/FormControl.js +29 -5
- package/lib/FormControlFeedback.js +5 -1
- package/lib/FormGroup.js +7 -3
- package/lib/Glyphicon.js +6 -2
- package/lib/Grid.js +5 -1
- package/lib/Image.js +8 -4
- package/lib/ListGroupItem.js +11 -7
- package/lib/MediaLeft.js +5 -1
- package/lib/MediaRight.js +5 -1
- package/lib/MenuItem.js +12 -8
- package/lib/Modal.js +25 -15
- package/lib/ModalBody.js +18 -2
- package/lib/ModalDialog.js +5 -1
- package/lib/ModalFooter.js +18 -2
- package/lib/ModalHeader.js +10 -6
- package/lib/ModalTitle.js +18 -2
- package/lib/Nav.js +23 -19
- package/lib/NavDropdown.js +8 -4
- package/lib/NavItem.js +11 -7
- package/lib/Navbar.js +27 -25
- package/lib/NavbarBrand.js +6 -2
- package/lib/NavbarCollapse.js +7 -3
- package/lib/NavbarHeader.js +6 -2
- package/lib/NavbarToggle.js +10 -6
- package/lib/Overlay.js +21 -11
- package/lib/OverlayTrigger.js +23 -18
- package/lib/Pager.js +5 -1
- package/lib/PagerItem.js +10 -6
- package/lib/Pagination.js +58 -61
- package/lib/PaginationButton.js +10 -6
- package/lib/Panel.js +20 -20
- package/lib/PanelGroup.js +9 -5
- package/lib/Popover.js +11 -7
- package/lib/ProgressBar.js +12 -8
- package/lib/Radio.js +8 -4
- package/lib/ResponsiveEmbed.js +7 -3
- package/lib/SafeAnchor.js +9 -5
- package/lib/SplitButton.js +11 -7
- package/lib/Tab.js +7 -3
- package/lib/TabContainer.js +13 -9
- package/lib/TabContent.js +26 -13
- package/lib/TabPane.js +38 -25
- package/lib/Table.js +9 -5
- package/lib/Tabs.js +19 -7
- package/lib/Thumbnail.js +7 -3
- package/lib/Tooltip.js +10 -6
- package/lib/index.js +6 -1
- package/lib/utils/bootstrapUtils.js +6 -4
- package/package.json +10 -8
package/es/Alert.js
CHANGED
|
@@ -6,13 +6,14 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
6
6
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
10
11
|
import { bsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
11
12
|
import { State } from './utils/StyleConfig';
|
|
12
13
|
|
|
13
14
|
var propTypes = {
|
|
14
|
-
onDismiss:
|
|
15
|
-
closeLabel:
|
|
15
|
+
onDismiss: PropTypes.func,
|
|
16
|
+
closeLabel: PropTypes.string
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
var defaultProps = {
|
package/es/Badge.js
CHANGED
|
@@ -5,13 +5,14 @@ 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
|
|
|
11
12
|
// TODO: `pullRight` doesn't belong here. There's no special handling here.
|
|
12
13
|
|
|
13
14
|
var propTypes = {
|
|
14
|
-
pullRight:
|
|
15
|
+
pullRight: PropTypes.bool
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
var defaultProps = {
|
package/es/BreadcrumbItem.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 SafeAnchor from './SafeAnchor';
|
|
10
11
|
|
|
@@ -12,19 +13,19 @@ var propTypes = {
|
|
|
12
13
|
/**
|
|
13
14
|
* If set to true, renders `span` instead of `a`
|
|
14
15
|
*/
|
|
15
|
-
active:
|
|
16
|
+
active: PropTypes.bool,
|
|
16
17
|
/**
|
|
17
18
|
* `href` attribute for the inner `a` element
|
|
18
19
|
*/
|
|
19
|
-
href:
|
|
20
|
+
href: PropTypes.string,
|
|
20
21
|
/**
|
|
21
22
|
* `title` attribute for the inner `a` element
|
|
22
23
|
*/
|
|
23
|
-
title:
|
|
24
|
+
title: PropTypes.node,
|
|
24
25
|
/**
|
|
25
26
|
* `target` attribute for the inner `a` element
|
|
26
27
|
*/
|
|
27
|
-
target:
|
|
28
|
+
target: PropTypes.string
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
var defaultProps = {
|
package/es/Button.js
CHANGED
|
@@ -6,6 +6,7 @@ import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructo
|
|
|
6
6
|
import _inherits from 'babel-runtime/helpers/inherits';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
import elementType from 'react-prop-types/lib/elementType';
|
|
10
11
|
|
|
11
12
|
import { bsClass, bsSizes, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -14,17 +15,17 @@ import { Size, State, Style } from './utils/StyleConfig';
|
|
|
14
15
|
import SafeAnchor from './SafeAnchor';
|
|
15
16
|
|
|
16
17
|
var propTypes = {
|
|
17
|
-
active:
|
|
18
|
-
disabled:
|
|
19
|
-
block:
|
|
20
|
-
onClick:
|
|
18
|
+
active: PropTypes.bool,
|
|
19
|
+
disabled: PropTypes.bool,
|
|
20
|
+
block: PropTypes.bool,
|
|
21
|
+
onClick: PropTypes.func,
|
|
21
22
|
componentClass: elementType,
|
|
22
|
-
href:
|
|
23
|
+
href: PropTypes.string,
|
|
23
24
|
/**
|
|
24
25
|
* Defines HTML button type attribute
|
|
25
26
|
* @defaultValue 'button'
|
|
26
27
|
*/
|
|
27
|
-
type:
|
|
28
|
+
type: PropTypes.oneOf(['button', 'reset', 'submit'])
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
var defaultProps = {
|
package/es/ButtonGroup.js
CHANGED
|
@@ -5,20 +5,21 @@ 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 Button from './Button';
|
|
11
12
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
12
13
|
|
|
13
14
|
var propTypes = {
|
|
14
|
-
vertical:
|
|
15
|
-
justified:
|
|
15
|
+
vertical: PropTypes.bool,
|
|
16
|
+
justified: PropTypes.bool,
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Display block buttons; only useful when used with the "vertical" prop.
|
|
19
20
|
* @type {bool}
|
|
20
21
|
*/
|
|
21
|
-
block: all(
|
|
22
|
+
block: all(PropTypes.bool, function (_ref) {
|
|
22
23
|
var block = _ref.block,
|
|
23
24
|
vertical = _ref.vertical;
|
|
24
25
|
return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null;
|
package/es/Carousel.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, { cloneElement } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
|
|
9
10
|
import CarouselCaption from './CarouselCaption';
|
|
10
11
|
import CarouselItem from './CarouselItem';
|
|
@@ -18,12 +19,12 @@ import ValidComponentChildren from './utils/ValidComponentChildren';
|
|
|
18
19
|
// TODO: Use uncontrollable.
|
|
19
20
|
|
|
20
21
|
var propTypes = {
|
|
21
|
-
slide:
|
|
22
|
-
indicators:
|
|
23
|
-
interval:
|
|
24
|
-
controls:
|
|
25
|
-
pauseOnHover:
|
|
26
|
-
wrap:
|
|
22
|
+
slide: PropTypes.bool,
|
|
23
|
+
indicators: PropTypes.bool,
|
|
24
|
+
interval: PropTypes.number,
|
|
25
|
+
controls: PropTypes.bool,
|
|
26
|
+
pauseOnHover: PropTypes.bool,
|
|
27
|
+
wrap: PropTypes.bool,
|
|
27
28
|
/**
|
|
28
29
|
* Callback fired when the active item changes.
|
|
29
30
|
*
|
|
@@ -35,25 +36,25 @@ var propTypes = {
|
|
|
35
36
|
* be a persisted event object with `direction` set to the direction of the
|
|
36
37
|
* transition.
|
|
37
38
|
*/
|
|
38
|
-
onSelect:
|
|
39
|
-
onSlideEnd:
|
|
40
|
-
activeIndex:
|
|
41
|
-
defaultActiveIndex:
|
|
42
|
-
direction:
|
|
43
|
-
prevIcon:
|
|
39
|
+
onSelect: PropTypes.func,
|
|
40
|
+
onSlideEnd: PropTypes.func,
|
|
41
|
+
activeIndex: PropTypes.number,
|
|
42
|
+
defaultActiveIndex: PropTypes.number,
|
|
43
|
+
direction: PropTypes.oneOf(['prev', 'next']),
|
|
44
|
+
prevIcon: PropTypes.node,
|
|
44
45
|
/**
|
|
45
46
|
* Label shown to screen readers only, can be used to show the previous element
|
|
46
47
|
* in the carousel.
|
|
47
48
|
* Set to null to deactivate.
|
|
48
49
|
*/
|
|
49
|
-
prevLabel:
|
|
50
|
-
nextIcon:
|
|
50
|
+
prevLabel: PropTypes.string,
|
|
51
|
+
nextIcon: PropTypes.node,
|
|
51
52
|
/**
|
|
52
53
|
* Label shown to screen readers only, can be used to show the next element
|
|
53
54
|
* in the carousel.
|
|
54
55
|
* Set to null to deactivate.
|
|
55
56
|
*/
|
|
56
|
-
nextLabel:
|
|
57
|
+
nextLabel: PropTypes.string
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
var defaultProps = {
|
|
@@ -194,7 +195,7 @@ var Carousel = function (_React$Component) {
|
|
|
194
195
|
return;
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
var previousActiveIndex = this.getActiveIndex();
|
|
198
|
+
var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;
|
|
198
199
|
direction = direction || this.getDirection(previousActiveIndex, index);
|
|
199
200
|
|
|
200
201
|
var onSelect = this.props.onSelect;
|
package/es/CarouselItem.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 ReactDOM from 'react-dom';
|
|
9
10
|
|
|
10
11
|
import TransitionEvents from './utils/TransitionEvents';
|
|
@@ -13,12 +14,12 @@ import TransitionEvents from './utils/TransitionEvents';
|
|
|
13
14
|
// not wait until transition end to trigger continuing animations.
|
|
14
15
|
|
|
15
16
|
var propTypes = {
|
|
16
|
-
direction:
|
|
17
|
-
onAnimateOutEnd:
|
|
18
|
-
active:
|
|
19
|
-
animateIn:
|
|
20
|
-
animateOut:
|
|
21
|
-
index:
|
|
17
|
+
direction: PropTypes.oneOf(['prev', 'next']),
|
|
18
|
+
onAnimateOutEnd: PropTypes.func,
|
|
19
|
+
active: PropTypes.bool,
|
|
20
|
+
animateIn: PropTypes.bool,
|
|
21
|
+
animateOut: PropTypes.bool,
|
|
22
|
+
index: PropTypes.number
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
var defaultProps = {
|
package/es/Checkbox.js
CHANGED
|
@@ -5,17 +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 PropTypes from 'prop-types';
|
|
8
9
|
import warning from 'warning';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
11
12
|
|
|
12
13
|
var propTypes = {
|
|
13
|
-
inline:
|
|
14
|
-
disabled:
|
|
14
|
+
inline: PropTypes.bool,
|
|
15
|
+
disabled: PropTypes.bool,
|
|
15
16
|
/**
|
|
16
17
|
* Only valid if `inline` is not set.
|
|
17
18
|
*/
|
|
18
|
-
validationState:
|
|
19
|
+
validationState: PropTypes.oneOf(['success', 'warning', 'error', null]),
|
|
19
20
|
/**
|
|
20
21
|
* Attaches a ref to the `<input>` element. Only functions can be used here.
|
|
21
22
|
*
|
|
@@ -23,7 +24,7 @@ var propTypes = {
|
|
|
23
24
|
* <Checkbox inputRef={ref => { this.input = ref; }} />
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
|
-
inputRef:
|
|
27
|
+
inputRef: PropTypes.func
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
var defaultProps = {
|
package/es/Clearfix.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 elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -21,7 +22,7 @@ var propTypes = {
|
|
|
21
22
|
*
|
|
22
23
|
* adds class `visible-xs-block`
|
|
23
24
|
*/
|
|
24
|
-
visibleXsBlock:
|
|
25
|
+
visibleXsBlock: PropTypes.bool,
|
|
25
26
|
/**
|
|
26
27
|
* Apply clearfix
|
|
27
28
|
*
|
|
@@ -29,7 +30,7 @@ var propTypes = {
|
|
|
29
30
|
*
|
|
30
31
|
* adds class `visible-sm-block`
|
|
31
32
|
*/
|
|
32
|
-
visibleSmBlock:
|
|
33
|
+
visibleSmBlock: PropTypes.bool,
|
|
33
34
|
/**
|
|
34
35
|
* Apply clearfix
|
|
35
36
|
*
|
|
@@ -37,7 +38,7 @@ var propTypes = {
|
|
|
37
38
|
*
|
|
38
39
|
* adds class `visible-md-block`
|
|
39
40
|
*/
|
|
40
|
-
visibleMdBlock:
|
|
41
|
+
visibleMdBlock: PropTypes.bool,
|
|
41
42
|
/**
|
|
42
43
|
* Apply clearfix
|
|
43
44
|
*
|
|
@@ -45,7 +46,7 @@ var propTypes = {
|
|
|
45
46
|
*
|
|
46
47
|
* adds class `visible-lg-block`
|
|
47
48
|
*/
|
|
48
|
-
visibleLgBlock:
|
|
49
|
+
visibleLgBlock: PropTypes.bool
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
var defaultProps = {
|
package/es/Col.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 elementType from 'react-prop-types/lib/elementType';
|
|
9
10
|
|
|
10
11
|
import { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -20,7 +21,7 @@ var propTypes = {
|
|
|
20
21
|
*
|
|
21
22
|
* class-prefix `col-xs-`
|
|
22
23
|
*/
|
|
23
|
-
xs:
|
|
24
|
+
xs: PropTypes.number,
|
|
24
25
|
/**
|
|
25
26
|
* The number of columns you wish to span
|
|
26
27
|
*
|
|
@@ -28,7 +29,7 @@ var propTypes = {
|
|
|
28
29
|
*
|
|
29
30
|
* class-prefix `col-sm-`
|
|
30
31
|
*/
|
|
31
|
-
sm:
|
|
32
|
+
sm: PropTypes.number,
|
|
32
33
|
/**
|
|
33
34
|
* The number of columns you wish to span
|
|
34
35
|
*
|
|
@@ -36,7 +37,7 @@ var propTypes = {
|
|
|
36
37
|
*
|
|
37
38
|
* class-prefix `col-md-`
|
|
38
39
|
*/
|
|
39
|
-
md:
|
|
40
|
+
md: PropTypes.number,
|
|
40
41
|
/**
|
|
41
42
|
* The number of columns you wish to span
|
|
42
43
|
*
|
|
@@ -44,7 +45,7 @@ var propTypes = {
|
|
|
44
45
|
*
|
|
45
46
|
* class-prefix `col-lg-`
|
|
46
47
|
*/
|
|
47
|
-
lg:
|
|
48
|
+
lg: PropTypes.number,
|
|
48
49
|
/**
|
|
49
50
|
* Hide column
|
|
50
51
|
*
|
|
@@ -52,7 +53,7 @@ var propTypes = {
|
|
|
52
53
|
*
|
|
53
54
|
* adds class `hidden-xs`
|
|
54
55
|
*/
|
|
55
|
-
xsHidden:
|
|
56
|
+
xsHidden: PropTypes.bool,
|
|
56
57
|
/**
|
|
57
58
|
* Hide column
|
|
58
59
|
*
|
|
@@ -60,7 +61,7 @@ var propTypes = {
|
|
|
60
61
|
*
|
|
61
62
|
* adds class `hidden-sm`
|
|
62
63
|
*/
|
|
63
|
-
smHidden:
|
|
64
|
+
smHidden: PropTypes.bool,
|
|
64
65
|
/**
|
|
65
66
|
* Hide column
|
|
66
67
|
*
|
|
@@ -68,7 +69,7 @@ var propTypes = {
|
|
|
68
69
|
*
|
|
69
70
|
* adds class `hidden-md`
|
|
70
71
|
*/
|
|
71
|
-
mdHidden:
|
|
72
|
+
mdHidden: PropTypes.bool,
|
|
72
73
|
/**
|
|
73
74
|
* Hide column
|
|
74
75
|
*
|
|
@@ -76,7 +77,7 @@ var propTypes = {
|
|
|
76
77
|
*
|
|
77
78
|
* adds class `hidden-lg`
|
|
78
79
|
*/
|
|
79
|
-
lgHidden:
|
|
80
|
+
lgHidden: PropTypes.bool,
|
|
80
81
|
/**
|
|
81
82
|
* Move columns to the right
|
|
82
83
|
*
|
|
@@ -84,7 +85,7 @@ var propTypes = {
|
|
|
84
85
|
*
|
|
85
86
|
* class-prefix `col-xs-offset-`
|
|
86
87
|
*/
|
|
87
|
-
xsOffset:
|
|
88
|
+
xsOffset: PropTypes.number,
|
|
88
89
|
/**
|
|
89
90
|
* Move columns to the right
|
|
90
91
|
*
|
|
@@ -92,7 +93,7 @@ var propTypes = {
|
|
|
92
93
|
*
|
|
93
94
|
* class-prefix `col-sm-offset-`
|
|
94
95
|
*/
|
|
95
|
-
smOffset:
|
|
96
|
+
smOffset: PropTypes.number,
|
|
96
97
|
/**
|
|
97
98
|
* Move columns to the right
|
|
98
99
|
*
|
|
@@ -100,7 +101,7 @@ var propTypes = {
|
|
|
100
101
|
*
|
|
101
102
|
* class-prefix `col-md-offset-`
|
|
102
103
|
*/
|
|
103
|
-
mdOffset:
|
|
104
|
+
mdOffset: PropTypes.number,
|
|
104
105
|
/**
|
|
105
106
|
* Move columns to the right
|
|
106
107
|
*
|
|
@@ -108,7 +109,7 @@ var propTypes = {
|
|
|
108
109
|
*
|
|
109
110
|
* class-prefix `col-lg-offset-`
|
|
110
111
|
*/
|
|
111
|
-
lgOffset:
|
|
112
|
+
lgOffset: PropTypes.number,
|
|
112
113
|
/**
|
|
113
114
|
* Change the order of grid columns to the right
|
|
114
115
|
*
|
|
@@ -116,7 +117,7 @@ var propTypes = {
|
|
|
116
117
|
*
|
|
117
118
|
* class-prefix `col-xs-push-`
|
|
118
119
|
*/
|
|
119
|
-
xsPush:
|
|
120
|
+
xsPush: PropTypes.number,
|
|
120
121
|
/**
|
|
121
122
|
* Change the order of grid columns to the right
|
|
122
123
|
*
|
|
@@ -124,7 +125,7 @@ var propTypes = {
|
|
|
124
125
|
*
|
|
125
126
|
* class-prefix `col-sm-push-`
|
|
126
127
|
*/
|
|
127
|
-
smPush:
|
|
128
|
+
smPush: PropTypes.number,
|
|
128
129
|
/**
|
|
129
130
|
* Change the order of grid columns to the right
|
|
130
131
|
*
|
|
@@ -132,7 +133,7 @@ var propTypes = {
|
|
|
132
133
|
*
|
|
133
134
|
* class-prefix `col-md-push-`
|
|
134
135
|
*/
|
|
135
|
-
mdPush:
|
|
136
|
+
mdPush: PropTypes.number,
|
|
136
137
|
/**
|
|
137
138
|
* Change the order of grid columns to the right
|
|
138
139
|
*
|
|
@@ -140,7 +141,7 @@ var propTypes = {
|
|
|
140
141
|
*
|
|
141
142
|
* class-prefix `col-lg-push-`
|
|
142
143
|
*/
|
|
143
|
-
lgPush:
|
|
144
|
+
lgPush: PropTypes.number,
|
|
144
145
|
/**
|
|
145
146
|
* Change the order of grid columns to the left
|
|
146
147
|
*
|
|
@@ -148,7 +149,7 @@ var propTypes = {
|
|
|
148
149
|
*
|
|
149
150
|
* class-prefix `col-xs-pull-`
|
|
150
151
|
*/
|
|
151
|
-
xsPull:
|
|
152
|
+
xsPull: PropTypes.number,
|
|
152
153
|
/**
|
|
153
154
|
* Change the order of grid columns to the left
|
|
154
155
|
*
|
|
@@ -156,7 +157,7 @@ var propTypes = {
|
|
|
156
157
|
*
|
|
157
158
|
* class-prefix `col-sm-pull-`
|
|
158
159
|
*/
|
|
159
|
-
smPull:
|
|
160
|
+
smPull: PropTypes.number,
|
|
160
161
|
/**
|
|
161
162
|
* Change the order of grid columns to the left
|
|
162
163
|
*
|
|
@@ -164,7 +165,7 @@ var propTypes = {
|
|
|
164
165
|
*
|
|
165
166
|
* class-prefix `col-md-pull-`
|
|
166
167
|
*/
|
|
167
|
-
mdPull:
|
|
168
|
+
mdPull: PropTypes.number,
|
|
168
169
|
/**
|
|
169
170
|
* Change the order of grid columns to the left
|
|
170
171
|
*
|
|
@@ -172,7 +173,7 @@ var propTypes = {
|
|
|
172
173
|
*
|
|
173
174
|
* class-prefix `col-lg-pull-`
|
|
174
175
|
*/
|
|
175
|
-
lgPull:
|
|
176
|
+
lgPull: PropTypes.number
|
|
176
177
|
};
|
|
177
178
|
|
|
178
179
|
var defaultProps = {
|
package/es/Collapse.js
CHANGED
|
@@ -6,6 +6,7 @@ import _inherits from 'babel-runtime/helpers/inherits';
|
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import css from 'dom-helpers/style';
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
9
10
|
import Transition from 'react-overlays/lib/Transition';
|
|
10
11
|
|
|
11
12
|
import capitalize from './utils/capitalize';
|
|
@@ -33,50 +34,55 @@ var propTypes = {
|
|
|
33
34
|
/**
|
|
34
35
|
* Show the component; triggers the expand or collapse animation
|
|
35
36
|
*/
|
|
36
|
-
'in':
|
|
37
|
+
'in': PropTypes.bool,
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Wait until the first "enter" transition to mount the component (add it to the DOM)
|
|
41
|
+
*/
|
|
42
|
+
mountOnEnter: PropTypes.bool,
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* Unmount the component (remove it from the DOM) when it is collapsed
|
|
40
46
|
*/
|
|
41
|
-
unmountOnExit:
|
|
47
|
+
unmountOnExit: PropTypes.bool,
|
|
42
48
|
|
|
43
49
|
/**
|
|
44
50
|
* Run the expand animation when the component mounts, if it is initially
|
|
45
51
|
* shown
|
|
46
52
|
*/
|
|
47
|
-
transitionAppear:
|
|
53
|
+
transitionAppear: PropTypes.bool,
|
|
48
54
|
|
|
49
55
|
/**
|
|
50
56
|
* Duration of the collapse animation in milliseconds, to ensure that
|
|
51
57
|
* finishing callbacks are fired even if the original browser transition end
|
|
52
58
|
* events are canceled
|
|
53
59
|
*/
|
|
54
|
-
timeout:
|
|
60
|
+
timeout: PropTypes.number,
|
|
55
61
|
|
|
56
62
|
/**
|
|
57
63
|
* Callback fired before the component expands
|
|
58
64
|
*/
|
|
59
|
-
onEnter:
|
|
65
|
+
onEnter: PropTypes.func,
|
|
60
66
|
/**
|
|
61
67
|
* Callback fired after the component starts to expand
|
|
62
68
|
*/
|
|
63
|
-
onEntering:
|
|
69
|
+
onEntering: PropTypes.func,
|
|
64
70
|
/**
|
|
65
71
|
* Callback fired after the component has expanded
|
|
66
72
|
*/
|
|
67
|
-
onEntered:
|
|
73
|
+
onEntered: PropTypes.func,
|
|
68
74
|
/**
|
|
69
75
|
* Callback fired before the component collapses
|
|
70
76
|
*/
|
|
71
|
-
onExit:
|
|
77
|
+
onExit: PropTypes.func,
|
|
72
78
|
/**
|
|
73
79
|
* Callback fired after the component starts to collapse
|
|
74
80
|
*/
|
|
75
|
-
onExiting:
|
|
81
|
+
onExiting: PropTypes.func,
|
|
76
82
|
/**
|
|
77
83
|
* Callback fired after the component has collapsed
|
|
78
84
|
*/
|
|
79
|
-
onExited:
|
|
85
|
+
onExited: PropTypes.func,
|
|
80
86
|
|
|
81
87
|
/**
|
|
82
88
|
* The dimension used when collapsing, or a function that returns the
|
|
@@ -85,7 +91,7 @@ var propTypes = {
|
|
|
85
91
|
* _Note: Bootstrap only partially supports 'width'!
|
|
86
92
|
* You will need to supply your own CSS animation for the `.width` CSS class._
|
|
87
93
|
*/
|
|
88
|
-
dimension:
|
|
94
|
+
dimension: PropTypes.oneOfType([PropTypes.oneOf(['height', 'width']), PropTypes.func]),
|
|
89
95
|
|
|
90
96
|
/**
|
|
91
97
|
* Function that returns the height or width of the animating DOM node
|
|
@@ -94,17 +100,18 @@ var propTypes = {
|
|
|
94
100
|
* should animate in its specified dimension. Called with the current
|
|
95
101
|
* dimension prop value and the DOM node.
|
|
96
102
|
*/
|
|
97
|
-
getDimensionValue:
|
|
103
|
+
getDimensionValue: PropTypes.func,
|
|
98
104
|
|
|
99
105
|
/**
|
|
100
106
|
* ARIA role of collapsible element
|
|
101
107
|
*/
|
|
102
|
-
role:
|
|
108
|
+
role: PropTypes.string
|
|
103
109
|
};
|
|
104
110
|
|
|
105
111
|
var defaultProps = {
|
|
106
112
|
'in': false,
|
|
107
113
|
timeout: 300,
|
|
114
|
+
mountOnEnter: false,
|
|
108
115
|
unmountOnExit: false,
|
|
109
116
|
transitionAppear: false,
|
|
110
117
|
|
package/es/ControlLabel.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 warning from 'warning';
|
|
9
10
|
|
|
10
11
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
@@ -13,8 +14,8 @@ var propTypes = {
|
|
|
13
14
|
/**
|
|
14
15
|
* Uses `controlId` from `<FormGroup>` if not explicitly specified.
|
|
15
16
|
*/
|
|
16
|
-
htmlFor:
|
|
17
|
-
srOnly:
|
|
17
|
+
htmlFor: PropTypes.string,
|
|
18
|
+
srOnly: PropTypes.bool
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
var defaultProps = {
|
|
@@ -22,7 +23,7 @@ var defaultProps = {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
var contextTypes = {
|
|
25
|
-
$bs_formGroup:
|
|
26
|
+
$bs_formGroup: PropTypes.object
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
var ControlLabel = function (_React$Component) {
|