react-bootstrap 0.31.1 → 0.31.5
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 +53 -0
- package/dist/react-bootstrap.js +4811 -4179
- package/dist/react-bootstrap.min.js +9 -9
- package/dist/react-bootstrap.min.js.map +1 -1
- package/es/ButtonToolbar.js +2 -3
- package/es/Carousel.js +85 -77
- package/es/Checkbox.js +2 -0
- package/es/CloseButton.js +1 -1
- package/es/Collapse.js +18 -18
- package/es/Dropdown.js +50 -50
- package/es/DropdownMenu.js +28 -28
- package/es/Fade.js +2 -2
- package/es/FormControl.js +1 -2
- package/es/MediaBody.js +15 -2
- package/es/Modal.js +23 -15
- package/es/Nav.js +44 -44
- package/es/Navbar.js +4 -4
- package/es/OverlayTrigger.js +39 -39
- package/es/Panel.js +44 -44
- package/es/Radio.js +2 -0
- package/es/SafeAnchor.js +15 -2
- package/es/TabContent.js +5 -5
- package/es/TabPane.js +16 -16
- package/es/Tabs.js +2 -2
- package/es/Thumbnail.js +2 -0
- package/es/ToggleButton.js +8 -0
- package/es/ToggleButtonGroup.js +11 -6
- package/es/index.js +4 -0
- package/es/utils/TransitionEvents.js +11 -10
- package/es/utils/ValidComponentChildren.js +1 -1
- package/es/utils/bootstrapUtils.js +2 -1
- package/lib/Accordion.js +9 -9
- package/lib/Alert.js +14 -14
- package/lib/Badge.js +13 -13
- package/lib/Breadcrumb.js +10 -10
- package/lib/BreadcrumbItem.js +14 -14
- package/lib/Button.js +20 -20
- package/lib/ButtonGroup.js +13 -13
- package/lib/ButtonToolbar.js +9 -13
- package/lib/Carousel.js +127 -119
- package/lib/CarouselCaption.js +10 -10
- package/lib/CarouselItem.js +16 -16
- package/lib/Checkbox.js +21 -21
- package/lib/Clearfix.js +15 -15
- package/lib/CloseButton.js +12 -14
- package/lib/Col.js +30 -30
- package/lib/Collapse.js +47 -47
- package/lib/ControlLabel.js +14 -14
- package/lib/Dropdown.js +92 -92
- package/lib/DropdownButton.js +22 -22
- package/lib/DropdownMenu.js +51 -51
- package/lib/DropdownToggle.js +16 -16
- package/lib/Fade.js +20 -20
- package/lib/Form.js +12 -12
- package/lib/FormControl.js +17 -17
- package/lib/FormControlFeedback.js +13 -13
- package/lib/FormControlStatic.js +10 -10
- package/lib/FormGroup.js +15 -15
- package/lib/Glyphicon.js +11 -11
- package/lib/Grid.js +11 -11
- package/lib/HelpBlock.js +9 -9
- package/lib/Image.js +13 -13
- package/lib/InputGroup.js +11 -11
- package/lib/InputGroupAddon.js +9 -9
- package/lib/InputGroupButton.js +9 -9
- package/lib/Jumbotron.js +10 -10
- package/lib/Label.js +12 -12
- package/lib/ListGroup.js +16 -16
- package/lib/ListGroupItem.js +22 -22
- package/lib/Media.js +16 -16
- package/lib/MediaBody.js +29 -10
- package/lib/MediaHeading.js +10 -10
- package/lib/MediaLeft.js +11 -11
- package/lib/MediaList.js +9 -9
- package/lib/MediaListItem.js +9 -9
- package/lib/MediaRight.js +11 -11
- package/lib/MenuItem.js +23 -23
- package/lib/Modal.js +73 -65
- package/lib/ModalBody.js +10 -10
- package/lib/ModalDialog.js +16 -16
- package/lib/ModalFooter.js +10 -10
- package/lib/ModalHeader.js +17 -17
- package/lib/ModalTitle.js +10 -10
- package/lib/Nav.js +81 -81
- package/lib/NavDropdown.js +25 -25
- package/lib/NavItem.js +18 -18
- package/lib/Navbar.js +47 -47
- 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 -25
- package/lib/OverlayTrigger.js +75 -75
- package/lib/PageHeader.js +11 -11
- package/lib/PageItem.js +2 -2
- package/lib/Pager.js +14 -14
- package/lib/PagerItem.js +17 -17
- package/lib/Pagination.js +52 -52
- package/lib/PaginationButton.js +20 -20
- package/lib/Panel.js +76 -76
- package/lib/PanelGroup.js +18 -18
- package/lib/Popover.js +22 -22
- package/lib/ProgressBar.js +29 -29
- package/lib/Radio.js +21 -21
- package/lib/ResponsiveEmbed.js +17 -17
- package/lib/Row.js +10 -10
- package/lib/SafeAnchor.js +31 -16
- package/lib/SplitButton.js +26 -26
- package/lib/SplitToggle.js +8 -8
- package/lib/Tab.js +15 -15
- package/lib/TabContainer.js +17 -17
- package/lib/TabContent.js +29 -29
- package/lib/TabPane.js +57 -57
- package/lib/Table.js +16 -16
- package/lib/Tabs.js +28 -28
- package/lib/Thumbnail.js +19 -19
- package/lib/ToggleButton.js +23 -16
- package/lib/ToggleButtonGroup.js +38 -26
- package/lib/Tooltip.js +20 -20
- package/lib/Well.js +9 -9
- package/lib/index.js +83 -73
- package/lib/utils/PropTypes.js +5 -5
- package/lib/utils/TransitionEvents.js +12 -11
- package/lib/utils/ValidComponentChildren.js +19 -19
- package/lib/utils/bootstrapUtils.js +11 -10
- 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 +20 -18
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,25 @@ 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
|
-
className: (0, _classnames2
|
|
80
|
+
(0, _extends3.default)({}, elementProps, {
|
|
81
|
+
className: (0, _classnames2.default)(className, classes)
|
|
82
82
|
}),
|
|
83
|
-
_ValidComponentChildren2
|
|
83
|
+
_ValidComponentChildren2.default.map(children, function (child) {
|
|
84
84
|
return (0, _react.cloneElement)(child, {
|
|
85
|
-
onSelect: (0, _createChainedFunction2
|
|
85
|
+
onSelect: (0, _createChainedFunction2.default)(child.props.onSelect, onSelect)
|
|
86
86
|
});
|
|
87
87
|
})
|
|
88
88
|
);
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
return Pager;
|
|
92
|
-
}(_react2
|
|
92
|
+
}(_react2.default.Component);
|
|
93
93
|
|
|
94
94
|
Pager.propTypes = propTypes;
|
|
95
95
|
|
|
96
|
-
Pager.Item = _PagerItem2
|
|
96
|
+
Pager.Item = _PagerItem2.default;
|
|
97
97
|
|
|
98
|
-
exports
|
|
98
|
+
exports.default = (0, _bootstrapUtils.bsClass)('pager', Pager);
|
|
99
99
|
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;
|
|
@@ -99,30 +99,30 @@ var PagerItem = function (_React$Component) {
|
|
|
99
99
|
onClick = _props2.onClick,
|
|
100
100
|
className = _props2.className,
|
|
101
101
|
style = _props2.style,
|
|
102
|
-
props = (0, _objectWithoutProperties3
|
|
102
|
+
props = (0, _objectWithoutProperties3.default)(_props2, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']);
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
delete props.onSelect;
|
|
106
106
|
delete props.eventKey;
|
|
107
107
|
|
|
108
|
-
return _react2
|
|
108
|
+
return _react2.default.createElement(
|
|
109
109
|
'li',
|
|
110
110
|
{
|
|
111
|
-
className: (0, _classnames2
|
|
111
|
+
className: (0, _classnames2.default)(className, { disabled: disabled, previous: previous, next: next }),
|
|
112
112
|
style: style
|
|
113
113
|
},
|
|
114
|
-
_react2
|
|
114
|
+
_react2.default.createElement(_SafeAnchor2.default, (0, _extends3.default)({}, props, {
|
|
115
115
|
disabled: disabled,
|
|
116
|
-
onClick: (0, _createChainedFunction2
|
|
116
|
+
onClick: (0, _createChainedFunction2.default)(onClick, this.handleSelect)
|
|
117
117
|
}))
|
|
118
118
|
);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
return PagerItem;
|
|
122
|
-
}(_react2
|
|
122
|
+
}(_react2.default.Component);
|
|
123
123
|
|
|
124
124
|
PagerItem.propTypes = propTypes;
|
|
125
125
|
PagerItem.defaultProps = defaultProps;
|
|
126
126
|
|
|
127
|
-
exports
|
|
127
|
+
exports.default = PagerItem;
|
|
128
128
|
module.exports = exports['default'];
|
package/lib/Pagination.js
CHANGED
|
@@ -44,55 +44,55 @@ var _PaginationButton2 = _interopRequireDefault(_PaginationButton);
|
|
|
44
44
|
|
|
45
45
|
var _bootstrapUtils = require('./utils/bootstrapUtils');
|
|
46
46
|
|
|
47
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
47
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
48
48
|
|
|
49
49
|
var propTypes = {
|
|
50
|
-
activePage: _propTypes2
|
|
51
|
-
items: _propTypes2
|
|
52
|
-
maxButtons: _propTypes2
|
|
50
|
+
activePage: _propTypes2.default.number,
|
|
51
|
+
items: _propTypes2.default.number,
|
|
52
|
+
maxButtons: _propTypes2.default.number,
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* When `true`, will display the first and the last button page when
|
|
56
56
|
* displaying ellipsis.
|
|
57
57
|
*/
|
|
58
|
-
boundaryLinks: _propTypes2
|
|
58
|
+
boundaryLinks: _propTypes2.default.bool,
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* When `true`, will display the default node value ('…').
|
|
62
62
|
* Otherwise, will display provided node (when specified).
|
|
63
63
|
*/
|
|
64
|
-
ellipsis: _propTypes2
|
|
64
|
+
ellipsis: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.node]),
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* When `true`, will display the default node value ('«').
|
|
68
68
|
* Otherwise, will display provided node (when specified).
|
|
69
69
|
*/
|
|
70
|
-
first: _propTypes2
|
|
70
|
+
first: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.node]),
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* When `true`, will display the default node value ('»').
|
|
74
74
|
* Otherwise, will display provided node (when specified).
|
|
75
75
|
*/
|
|
76
|
-
last: _propTypes2
|
|
76
|
+
last: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.node]),
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* When `true`, will display the default node value ('‹').
|
|
80
80
|
* Otherwise, will display provided node (when specified).
|
|
81
81
|
*/
|
|
82
|
-
prev: _propTypes2
|
|
82
|
+
prev: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.node]),
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* When `true`, will display the default node value ('›').
|
|
86
86
|
* Otherwise, will display provided node (when specified).
|
|
87
87
|
*/
|
|
88
|
-
next: _propTypes2
|
|
88
|
+
next: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.node]),
|
|
89
89
|
|
|
90
|
-
onSelect: _propTypes2
|
|
90
|
+
onSelect: _propTypes2.default.func,
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* You can use a custom element for the buttons
|
|
94
94
|
*/
|
|
95
|
-
buttonComponentClass: _elementType2
|
|
95
|
+
buttonComponentClass: _elementType2.default
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
var defaultProps = {
|
|
@@ -108,11 +108,11 @@ var defaultProps = {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
var Pagination = function (_React$Component) {
|
|
111
|
-
(0, _inherits3
|
|
111
|
+
(0, _inherits3.default)(Pagination, _React$Component);
|
|
112
112
|
|
|
113
113
|
function Pagination() {
|
|
114
|
-
(0, _classCallCheck3
|
|
115
|
-
return (0, _possibleConstructorReturn3
|
|
114
|
+
(0, _classCallCheck3.default)(this, Pagination);
|
|
115
|
+
return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
Pagination.prototype.renderPageButtons = function renderPageButtons(activePage, items, maxButtons, boundaryLinks, ellipsis, buttonProps) {
|
|
@@ -130,9 +130,9 @@ var Pagination = function (_React$Component) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
for (var page = startPage; page <= endPage; ++page) {
|
|
133
|
-
pageButtons.push(_react2
|
|
134
|
-
_PaginationButton2
|
|
135
|
-
(0, _extends3
|
|
133
|
+
pageButtons.push(_react2.default.createElement(
|
|
134
|
+
_PaginationButton2.default,
|
|
135
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
136
136
|
key: page,
|
|
137
137
|
eventKey: page,
|
|
138
138
|
active: page === activePage
|
|
@@ -143,14 +143,14 @@ var Pagination = function (_React$Component) {
|
|
|
143
143
|
|
|
144
144
|
if (ellipsis && boundaryLinks && startPage > 1) {
|
|
145
145
|
if (startPage > 2) {
|
|
146
|
-
pageButtons.unshift(_react2
|
|
147
|
-
_PaginationButton2
|
|
146
|
+
pageButtons.unshift(_react2.default.createElement(
|
|
147
|
+
_PaginationButton2.default,
|
|
148
148
|
{
|
|
149
149
|
key: 'ellipsisFirst',
|
|
150
150
|
disabled: true,
|
|
151
151
|
componentClass: buttonProps.componentClass
|
|
152
152
|
},
|
|
153
|
-
_react2
|
|
153
|
+
_react2.default.createElement(
|
|
154
154
|
'span',
|
|
155
155
|
{ 'aria-label': 'More' },
|
|
156
156
|
ellipsis === true ? '\u2026' : ellipsis
|
|
@@ -158,9 +158,9 @@ var Pagination = function (_React$Component) {
|
|
|
158
158
|
));
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
pageButtons.unshift(_react2
|
|
162
|
-
_PaginationButton2
|
|
163
|
-
(0, _extends3
|
|
161
|
+
pageButtons.unshift(_react2.default.createElement(
|
|
162
|
+
_PaginationButton2.default,
|
|
163
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
164
164
|
key: 1,
|
|
165
165
|
eventKey: 1,
|
|
166
166
|
active: false
|
|
@@ -171,14 +171,14 @@ var Pagination = function (_React$Component) {
|
|
|
171
171
|
|
|
172
172
|
if (ellipsis && endPage < items) {
|
|
173
173
|
if (!boundaryLinks || endPage < items - 1) {
|
|
174
|
-
pageButtons.push(_react2
|
|
175
|
-
_PaginationButton2
|
|
174
|
+
pageButtons.push(_react2.default.createElement(
|
|
175
|
+
_PaginationButton2.default,
|
|
176
176
|
{
|
|
177
177
|
key: 'ellipsis',
|
|
178
178
|
disabled: true,
|
|
179
179
|
componentClass: buttonProps.componentClass
|
|
180
180
|
},
|
|
181
|
-
_react2
|
|
181
|
+
_react2.default.createElement(
|
|
182
182
|
'span',
|
|
183
183
|
{ 'aria-label': 'More' },
|
|
184
184
|
ellipsis === true ? '\u2026' : ellipsis
|
|
@@ -187,9 +187,9 @@ var Pagination = function (_React$Component) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
if (boundaryLinks) {
|
|
190
|
-
pageButtons.push(_react2
|
|
191
|
-
_PaginationButton2
|
|
192
|
-
(0, _extends3
|
|
190
|
+
pageButtons.push(_react2.default.createElement(
|
|
191
|
+
_PaginationButton2.default,
|
|
192
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
193
193
|
key: items,
|
|
194
194
|
eventKey: items,
|
|
195
195
|
active: false
|
|
@@ -216,7 +216,7 @@ var Pagination = function (_React$Component) {
|
|
|
216
216
|
onSelect = _props.onSelect,
|
|
217
217
|
buttonComponentClass = _props.buttonComponentClass,
|
|
218
218
|
className = _props.className,
|
|
219
|
-
props = (0, _objectWithoutProperties3
|
|
219
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['activePage', 'items', 'maxButtons', 'boundaryLinks', 'ellipsis', 'first', 'last', 'prev', 'next', 'onSelect', 'buttonComponentClass', 'className']);
|
|
220
220
|
|
|
221
221
|
var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
|
|
222
222
|
bsProps = _splitBsProps[0],
|
|
@@ -229,55 +229,55 @@ var Pagination = function (_React$Component) {
|
|
|
229
229
|
componentClass: buttonComponentClass
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
return _react2
|
|
232
|
+
return _react2.default.createElement(
|
|
233
233
|
'ul',
|
|
234
|
-
(0, _extends3
|
|
235
|
-
className: (0, _classnames2
|
|
234
|
+
(0, _extends3.default)({}, elementProps, {
|
|
235
|
+
className: (0, _classnames2.default)(className, classes)
|
|
236
236
|
}),
|
|
237
|
-
first && _react2
|
|
238
|
-
_PaginationButton2
|
|
239
|
-
(0, _extends3
|
|
237
|
+
first && _react2.default.createElement(
|
|
238
|
+
_PaginationButton2.default,
|
|
239
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
240
240
|
eventKey: 1,
|
|
241
241
|
disabled: activePage === 1
|
|
242
242
|
}),
|
|
243
|
-
_react2
|
|
243
|
+
_react2.default.createElement(
|
|
244
244
|
'span',
|
|
245
245
|
{ 'aria-label': 'First' },
|
|
246
246
|
first === true ? '\xAB' : first
|
|
247
247
|
)
|
|
248
248
|
),
|
|
249
|
-
prev && _react2
|
|
250
|
-
_PaginationButton2
|
|
251
|
-
(0, _extends3
|
|
249
|
+
prev && _react2.default.createElement(
|
|
250
|
+
_PaginationButton2.default,
|
|
251
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
252
252
|
eventKey: activePage - 1,
|
|
253
253
|
disabled: activePage === 1
|
|
254
254
|
}),
|
|
255
|
-
_react2
|
|
255
|
+
_react2.default.createElement(
|
|
256
256
|
'span',
|
|
257
257
|
{ 'aria-label': 'Previous' },
|
|
258
258
|
prev === true ? '\u2039' : prev
|
|
259
259
|
)
|
|
260
260
|
),
|
|
261
261
|
this.renderPageButtons(activePage, items, maxButtons, boundaryLinks, ellipsis, buttonProps),
|
|
262
|
-
next && _react2
|
|
263
|
-
_PaginationButton2
|
|
264
|
-
(0, _extends3
|
|
262
|
+
next && _react2.default.createElement(
|
|
263
|
+
_PaginationButton2.default,
|
|
264
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
265
265
|
eventKey: activePage + 1,
|
|
266
266
|
disabled: activePage >= items
|
|
267
267
|
}),
|
|
268
|
-
_react2
|
|
268
|
+
_react2.default.createElement(
|
|
269
269
|
'span',
|
|
270
270
|
{ 'aria-label': 'Next' },
|
|
271
271
|
next === true ? '\u203A' : next
|
|
272
272
|
)
|
|
273
273
|
),
|
|
274
|
-
last && _react2
|
|
275
|
-
_PaginationButton2
|
|
276
|
-
(0, _extends3
|
|
274
|
+
last && _react2.default.createElement(
|
|
275
|
+
_PaginationButton2.default,
|
|
276
|
+
(0, _extends3.default)({}, buttonProps, {
|
|
277
277
|
eventKey: items,
|
|
278
278
|
disabled: activePage >= items
|
|
279
279
|
}),
|
|
280
|
-
_react2
|
|
280
|
+
_react2.default.createElement(
|
|
281
281
|
'span',
|
|
282
282
|
{ 'aria-label': 'Last' },
|
|
283
283
|
last === true ? '\xBB' : last
|
|
@@ -287,10 +287,10 @@ var Pagination = function (_React$Component) {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
return Pagination;
|
|
290
|
-
}(_react2
|
|
290
|
+
}(_react2.default.Component);
|
|
291
291
|
|
|
292
292
|
Pagination.propTypes = propTypes;
|
|
293
293
|
Pagination.defaultProps = defaultProps;
|
|
294
294
|
|
|
295
|
-
exports
|
|
295
|
+
exports.default = (0, _bootstrapUtils.bsClass)('pagination', Pagination);
|
|
296
296
|
module.exports = exports['default'];
|
package/lib/PaginationButton.js
CHANGED
|
@@ -46,35 +46,35 @@ var _createChainedFunction = require('./utils/createChainedFunction');
|
|
|
46
46
|
|
|
47
47
|
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
|
|
48
48
|
|
|
49
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
49
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
50
50
|
|
|
51
51
|
// TODO: This should be `<Pagination.Item>`.
|
|
52
52
|
|
|
53
53
|
// TODO: This should use `componentClass` like other components.
|
|
54
54
|
|
|
55
55
|
var propTypes = {
|
|
56
|
-
componentClass: _elementType2
|
|
57
|
-
className: _propTypes2
|
|
58
|
-
eventKey: _propTypes2
|
|
59
|
-
onSelect: _propTypes2
|
|
60
|
-
disabled: _propTypes2
|
|
61
|
-
active: _propTypes2
|
|
62
|
-
onClick: _propTypes2
|
|
56
|
+
componentClass: _elementType2.default,
|
|
57
|
+
className: _propTypes2.default.string,
|
|
58
|
+
eventKey: _propTypes2.default.any,
|
|
59
|
+
onSelect: _propTypes2.default.func,
|
|
60
|
+
disabled: _propTypes2.default.bool,
|
|
61
|
+
active: _propTypes2.default.bool,
|
|
62
|
+
onClick: _propTypes2.default.func
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
var defaultProps = {
|
|
66
|
-
componentClass: _SafeAnchor2
|
|
66
|
+
componentClass: _SafeAnchor2.default,
|
|
67
67
|
active: false,
|
|
68
68
|
disabled: false
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
var PaginationButton = function (_React$Component) {
|
|
72
|
-
(0, _inherits3
|
|
72
|
+
(0, _inherits3.default)(PaginationButton, _React$Component);
|
|
73
73
|
|
|
74
74
|
function PaginationButton(props, context) {
|
|
75
|
-
(0, _classCallCheck3
|
|
75
|
+
(0, _classCallCheck3.default)(this, PaginationButton);
|
|
76
76
|
|
|
77
|
-
var _this = (0, _possibleConstructorReturn3
|
|
77
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
|
|
78
78
|
|
|
79
79
|
_this.handleClick = _this.handleClick.bind(_this);
|
|
80
80
|
return _this;
|
|
@@ -104,34 +104,34 @@ var PaginationButton = function (_React$Component) {
|
|
|
104
104
|
onClick = _props2.onClick,
|
|
105
105
|
className = _props2.className,
|
|
106
106
|
style = _props2.style,
|
|
107
|
-
props = (0, _objectWithoutProperties3
|
|
107
|
+
props = (0, _objectWithoutProperties3.default)(_props2, ['componentClass', 'active', 'disabled', 'onClick', 'className', 'style']);
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
if (Component === _SafeAnchor2
|
|
110
|
+
if (Component === _SafeAnchor2.default) {
|
|
111
111
|
// Assume that custom components want `eventKey`.
|
|
112
112
|
delete props.eventKey;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
delete props.onSelect;
|
|
116
116
|
|
|
117
|
-
return _react2
|
|
117
|
+
return _react2.default.createElement(
|
|
118
118
|
'li',
|
|
119
119
|
{
|
|
120
|
-
className: (0, _classnames2
|
|
120
|
+
className: (0, _classnames2.default)(className, { active: active, disabled: disabled }),
|
|
121
121
|
style: style
|
|
122
122
|
},
|
|
123
|
-
_react2
|
|
123
|
+
_react2.default.createElement(Component, (0, _extends3.default)({}, props, {
|
|
124
124
|
disabled: disabled,
|
|
125
|
-
onClick: (0, _createChainedFunction2
|
|
125
|
+
onClick: (0, _createChainedFunction2.default)(onClick, this.handleClick)
|
|
126
126
|
}))
|
|
127
127
|
);
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
return PaginationButton;
|
|
131
|
-
}(_react2
|
|
131
|
+
}(_react2.default.Component);
|
|
132
132
|
|
|
133
133
|
PaginationButton.propTypes = propTypes;
|
|
134
134
|
PaginationButton.defaultProps = defaultProps;
|
|
135
135
|
|
|
136
|
-
exports
|
|
136
|
+
exports.default = PaginationButton;
|
|
137
137
|
module.exports = exports['default'];
|