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.
Files changed (131) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/react-bootstrap.js +4811 -4179
  3. package/dist/react-bootstrap.min.js +9 -9
  4. package/dist/react-bootstrap.min.js.map +1 -1
  5. package/es/ButtonToolbar.js +2 -3
  6. package/es/Carousel.js +85 -77
  7. package/es/Checkbox.js +2 -0
  8. package/es/CloseButton.js +1 -1
  9. package/es/Collapse.js +18 -18
  10. package/es/Dropdown.js +50 -50
  11. package/es/DropdownMenu.js +28 -28
  12. package/es/Fade.js +2 -2
  13. package/es/FormControl.js +1 -2
  14. package/es/MediaBody.js +15 -2
  15. package/es/Modal.js +23 -15
  16. package/es/Nav.js +44 -44
  17. package/es/Navbar.js +4 -4
  18. package/es/OverlayTrigger.js +39 -39
  19. package/es/Panel.js +44 -44
  20. package/es/Radio.js +2 -0
  21. package/es/SafeAnchor.js +15 -2
  22. package/es/TabContent.js +5 -5
  23. package/es/TabPane.js +16 -16
  24. package/es/Tabs.js +2 -2
  25. package/es/Thumbnail.js +2 -0
  26. package/es/ToggleButton.js +8 -0
  27. package/es/ToggleButtonGroup.js +11 -6
  28. package/es/index.js +4 -0
  29. package/es/utils/TransitionEvents.js +11 -10
  30. package/es/utils/ValidComponentChildren.js +1 -1
  31. package/es/utils/bootstrapUtils.js +2 -1
  32. package/lib/Accordion.js +9 -9
  33. package/lib/Alert.js +14 -14
  34. package/lib/Badge.js +13 -13
  35. package/lib/Breadcrumb.js +10 -10
  36. package/lib/BreadcrumbItem.js +14 -14
  37. package/lib/Button.js +20 -20
  38. package/lib/ButtonGroup.js +13 -13
  39. package/lib/ButtonToolbar.js +9 -13
  40. package/lib/Carousel.js +127 -119
  41. package/lib/CarouselCaption.js +10 -10
  42. package/lib/CarouselItem.js +16 -16
  43. package/lib/Checkbox.js +21 -21
  44. package/lib/Clearfix.js +15 -15
  45. package/lib/CloseButton.js +12 -14
  46. package/lib/Col.js +30 -30
  47. package/lib/Collapse.js +47 -47
  48. package/lib/ControlLabel.js +14 -14
  49. package/lib/Dropdown.js +92 -92
  50. package/lib/DropdownButton.js +22 -22
  51. package/lib/DropdownMenu.js +51 -51
  52. package/lib/DropdownToggle.js +16 -16
  53. package/lib/Fade.js +20 -20
  54. package/lib/Form.js +12 -12
  55. package/lib/FormControl.js +17 -17
  56. package/lib/FormControlFeedback.js +13 -13
  57. package/lib/FormControlStatic.js +10 -10
  58. package/lib/FormGroup.js +15 -15
  59. package/lib/Glyphicon.js +11 -11
  60. package/lib/Grid.js +11 -11
  61. package/lib/HelpBlock.js +9 -9
  62. package/lib/Image.js +13 -13
  63. package/lib/InputGroup.js +11 -11
  64. package/lib/InputGroupAddon.js +9 -9
  65. package/lib/InputGroupButton.js +9 -9
  66. package/lib/Jumbotron.js +10 -10
  67. package/lib/Label.js +12 -12
  68. package/lib/ListGroup.js +16 -16
  69. package/lib/ListGroupItem.js +22 -22
  70. package/lib/Media.js +16 -16
  71. package/lib/MediaBody.js +29 -10
  72. package/lib/MediaHeading.js +10 -10
  73. package/lib/MediaLeft.js +11 -11
  74. package/lib/MediaList.js +9 -9
  75. package/lib/MediaListItem.js +9 -9
  76. package/lib/MediaRight.js +11 -11
  77. package/lib/MenuItem.js +23 -23
  78. package/lib/Modal.js +73 -65
  79. package/lib/ModalBody.js +10 -10
  80. package/lib/ModalDialog.js +16 -16
  81. package/lib/ModalFooter.js +10 -10
  82. package/lib/ModalHeader.js +17 -17
  83. package/lib/ModalTitle.js +10 -10
  84. package/lib/Nav.js +81 -81
  85. package/lib/NavDropdown.js +25 -25
  86. package/lib/NavItem.js +18 -18
  87. package/lib/Navbar.js +47 -47
  88. package/lib/NavbarBrand.js +14 -14
  89. package/lib/NavbarCollapse.js +14 -14
  90. package/lib/NavbarHeader.js +10 -10
  91. package/lib/NavbarToggle.js +22 -22
  92. package/lib/Overlay.js +25 -25
  93. package/lib/OverlayTrigger.js +75 -75
  94. package/lib/PageHeader.js +11 -11
  95. package/lib/PageItem.js +2 -2
  96. package/lib/Pager.js +14 -14
  97. package/lib/PagerItem.js +17 -17
  98. package/lib/Pagination.js +52 -52
  99. package/lib/PaginationButton.js +20 -20
  100. package/lib/Panel.js +76 -76
  101. package/lib/PanelGroup.js +18 -18
  102. package/lib/Popover.js +22 -22
  103. package/lib/ProgressBar.js +29 -29
  104. package/lib/Radio.js +21 -21
  105. package/lib/ResponsiveEmbed.js +17 -17
  106. package/lib/Row.js +10 -10
  107. package/lib/SafeAnchor.js +31 -16
  108. package/lib/SplitButton.js +26 -26
  109. package/lib/SplitToggle.js +8 -8
  110. package/lib/Tab.js +15 -15
  111. package/lib/TabContainer.js +17 -17
  112. package/lib/TabContent.js +29 -29
  113. package/lib/TabPane.js +57 -57
  114. package/lib/Table.js +16 -16
  115. package/lib/Tabs.js +28 -28
  116. package/lib/Thumbnail.js +19 -19
  117. package/lib/ToggleButton.js +23 -16
  118. package/lib/ToggleButtonGroup.js +38 -26
  119. package/lib/Tooltip.js +20 -20
  120. package/lib/Well.js +9 -9
  121. package/lib/index.js +83 -73
  122. package/lib/utils/PropTypes.js +5 -5
  123. package/lib/utils/TransitionEvents.js +12 -11
  124. package/lib/utils/ValidComponentChildren.js +19 -19
  125. package/lib/utils/bootstrapUtils.js +11 -10
  126. package/lib/utils/capitalize.js +1 -1
  127. package/lib/utils/createChainedFunction.js +1 -1
  128. package/lib/utils/deprecationWarning.js +7 -7
  129. package/lib/utils/index.js +4 -4
  130. package/lib/utils/splitComponentProps.js +3 -3
  131. package/package.json +20 -18
package/lib/Panel.js CHANGED
@@ -46,29 +46,29 @@ var _bootstrapUtils = require('./utils/bootstrapUtils');
46
46
 
47
47
  var _StyleConfig = require('./utils/StyleConfig');
48
48
 
49
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
49
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
50
 
51
51
  // TODO: Use uncontrollable.
52
52
 
53
53
  var propTypes = {
54
- collapsible: _propTypes2['default'].bool,
55
- onSelect: _propTypes2['default'].func,
56
- header: _propTypes2['default'].node,
57
- id: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].number]),
58
- footer: _propTypes2['default'].node,
59
- defaultExpanded: _propTypes2['default'].bool,
60
- expanded: _propTypes2['default'].bool,
61
- eventKey: _propTypes2['default'].any,
62
- headerRole: _propTypes2['default'].string,
63
- panelRole: _propTypes2['default'].string,
54
+ collapsible: _propTypes2.default.bool,
55
+ onSelect: _propTypes2.default.func,
56
+ header: _propTypes2.default.node,
57
+ id: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
58
+ footer: _propTypes2.default.node,
59
+ defaultExpanded: _propTypes2.default.bool,
60
+ expanded: _propTypes2.default.bool,
61
+ eventKey: _propTypes2.default.any,
62
+ headerRole: _propTypes2.default.string,
63
+ panelRole: _propTypes2.default.string,
64
64
 
65
65
  // From Collapse.
66
- onEnter: _propTypes2['default'].func,
67
- onEntering: _propTypes2['default'].func,
68
- onEntered: _propTypes2['default'].func,
69
- onExit: _propTypes2['default'].func,
70
- onExiting: _propTypes2['default'].func,
71
- onExited: _propTypes2['default'].func
66
+ onEnter: _propTypes2.default.func,
67
+ onEntering: _propTypes2.default.func,
68
+ onEntered: _propTypes2.default.func,
69
+ onExit: _propTypes2.default.func,
70
+ onExiting: _propTypes2.default.func,
71
+ onExited: _propTypes2.default.func
72
72
  };
73
73
 
74
74
  var defaultProps = {
@@ -76,12 +76,12 @@ var defaultProps = {
76
76
  };
77
77
 
78
78
  var Panel = function (_React$Component) {
79
- (0, _inherits3['default'])(Panel, _React$Component);
79
+ (0, _inherits3.default)(Panel, _React$Component);
80
80
 
81
81
  function Panel(props, context) {
82
- (0, _classCallCheck3['default'])(this, Panel);
82
+ (0, _classCallCheck3.default)(this, Panel);
83
83
 
84
- var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props, context));
84
+ var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
85
85
 
86
86
  _this.handleClickTitle = _this.handleClickTitle.bind(_this);
87
87
 
@@ -107,35 +107,8 @@ var Panel = function (_React$Component) {
107
107
  }
108
108
  };
109
109
 
110
- Panel.prototype.renderHeader = function renderHeader(collapsible, header, id, role, expanded, bsProps) {
111
- var titleClassName = (0, _bootstrapUtils.prefix)(bsProps, 'title');
112
-
113
- if (!collapsible) {
114
- if (!_react2['default'].isValidElement(header)) {
115
- return header;
116
- }
117
-
118
- return (0, _react.cloneElement)(header, {
119
- className: (0, _classnames2['default'])(header.props.className, titleClassName)
120
- });
121
- }
122
-
123
- if (!_react2['default'].isValidElement(header)) {
124
- return _react2['default'].createElement(
125
- 'h4',
126
- { role: 'presentation', className: titleClassName },
127
- this.renderAnchor(header, id, role, expanded)
128
- );
129
- }
130
-
131
- return (0, _react.cloneElement)(header, {
132
- className: (0, _classnames2['default'])(header.props.className, titleClassName),
133
- children: this.renderAnchor(header.props.children, id, role, expanded)
134
- });
135
- };
136
-
137
110
  Panel.prototype.renderAnchor = function renderAnchor(header, id, role, expanded) {
138
- return _react2['default'].createElement(
111
+ return _react2.default.createElement(
139
112
  'a',
140
113
  {
141
114
  role: role,
@@ -150,23 +123,6 @@ var Panel = function (_React$Component) {
150
123
  );
151
124
  };
152
125
 
153
- Panel.prototype.renderCollapsibleBody = function renderCollapsibleBody(id, expanded, role, children, bsProps, animationHooks) {
154
- return _react2['default'].createElement(
155
- _Collapse2['default'],
156
- (0, _extends3['default'])({ 'in': expanded }, animationHooks),
157
- _react2['default'].createElement(
158
- 'div',
159
- {
160
- id: id,
161
- role: role,
162
- className: (0, _bootstrapUtils.prefix)(bsProps, 'collapse'),
163
- 'aria-hidden': !expanded
164
- },
165
- this.renderBody(children, bsProps)
166
- )
167
- );
168
- };
169
-
170
126
  Panel.prototype.renderBody = function renderBody(rawChildren, bsProps) {
171
127
  var children = [];
172
128
  var bodyChildren = [];
@@ -179,7 +135,7 @@ var Panel = function (_React$Component) {
179
135
  }
180
136
 
181
137
  // Derive the key from the index here, since we need to make one up.
182
- children.push(_react2['default'].createElement(
138
+ children.push(_react2.default.createElement(
183
139
  'div',
184
140
  { key: children.length, className: bodyClassName },
185
141
  bodyChildren
@@ -189,8 +145,8 @@ var Panel = function (_React$Component) {
189
145
  }
190
146
 
191
147
  // Convert to array so we can re-use keys.
192
- _react2['default'].Children.toArray(rawChildren).forEach(function (child) {
193
- if (_react2['default'].isValidElement(child) && child.props.fill) {
148
+ _react2.default.Children.toArray(rawChildren).forEach(function (child) {
149
+ if (_react2.default.isValidElement(child) && child.props.fill) {
194
150
  maybeAddBody();
195
151
 
196
152
  // Remove the child's unknown `fill` prop.
@@ -207,6 +163,50 @@ var Panel = function (_React$Component) {
207
163
  return children;
208
164
  };
209
165
 
166
+ Panel.prototype.renderCollapsibleBody = function renderCollapsibleBody(id, expanded, role, children, bsProps, animationHooks) {
167
+ return _react2.default.createElement(
168
+ _Collapse2.default,
169
+ (0, _extends3.default)({ 'in': expanded }, animationHooks),
170
+ _react2.default.createElement(
171
+ 'div',
172
+ {
173
+ id: id,
174
+ role: role,
175
+ className: (0, _bootstrapUtils.prefix)(bsProps, 'collapse'),
176
+ 'aria-hidden': !expanded
177
+ },
178
+ this.renderBody(children, bsProps)
179
+ )
180
+ );
181
+ };
182
+
183
+ Panel.prototype.renderHeader = function renderHeader(collapsible, header, id, role, expanded, bsProps) {
184
+ var titleClassName = (0, _bootstrapUtils.prefix)(bsProps, 'title');
185
+
186
+ if (!collapsible) {
187
+ if (!_react2.default.isValidElement(header)) {
188
+ return header;
189
+ }
190
+
191
+ return (0, _react.cloneElement)(header, {
192
+ className: (0, _classnames2.default)(header.props.className, titleClassName)
193
+ });
194
+ }
195
+
196
+ if (!_react2.default.isValidElement(header)) {
197
+ return _react2.default.createElement(
198
+ 'h4',
199
+ { role: 'presentation', className: titleClassName },
200
+ this.renderAnchor(header, id, role, expanded)
201
+ );
202
+ }
203
+
204
+ return (0, _react.cloneElement)(header, {
205
+ className: (0, _classnames2.default)(header.props.className, titleClassName),
206
+ children: this.renderAnchor(header.props.children, id, role, expanded)
207
+ });
208
+ };
209
+
210
210
  Panel.prototype.render = function render() {
211
211
  var _props = this.props,
212
212
  collapsible = _props.collapsible,
@@ -224,7 +224,7 @@ var Panel = function (_React$Component) {
224
224
  onExit = _props.onExit,
225
225
  onExiting = _props.onExiting,
226
226
  onExited = _props.onExited,
227
- props = (0, _objectWithoutProperties3['default'])(_props, ['collapsible', 'header', 'id', 'footer', 'expanded', 'headerRole', 'panelRole', 'className', 'children', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited']);
227
+ props = (0, _objectWithoutProperties3.default)(_props, ['collapsible', 'header', 'id', 'footer', 'expanded', 'headerRole', 'panelRole', 'className', 'children', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited']);
228
228
 
229
229
  var _splitBsPropsAndOmit = (0, _bootstrapUtils.splitBsPropsAndOmit)(props, ['defaultExpanded', 'eventKey', 'onSelect']),
230
230
  bsProps = _splitBsPropsAndOmit[0],
@@ -234,19 +234,19 @@ var Panel = function (_React$Component) {
234
234
 
235
235
  var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
236
236
 
237
- return _react2['default'].createElement(
237
+ return _react2.default.createElement(
238
238
  'div',
239
- (0, _extends3['default'])({}, elementProps, {
240
- className: (0, _classnames2['default'])(className, classes),
239
+ (0, _extends3.default)({}, elementProps, {
240
+ className: (0, _classnames2.default)(className, classes),
241
241
  id: collapsible ? null : id
242
242
  }),
243
- header && _react2['default'].createElement(
243
+ header && _react2.default.createElement(
244
244
  'div',
245
245
  { className: (0, _bootstrapUtils.prefix)(bsProps, 'heading') },
246
246
  this.renderHeader(collapsible, header, id, headerRole, expanded, bsProps)
247
247
  ),
248
248
  collapsible ? this.renderCollapsibleBody(id, expanded, panelRole, children, bsProps, { onEnter: onEnter, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited }) : this.renderBody(children, bsProps),
249
- footer && _react2['default'].createElement(
249
+ footer && _react2.default.createElement(
250
250
  'div',
251
251
  { className: (0, _bootstrapUtils.prefix)(bsProps, 'footer') },
252
252
  footer
@@ -255,10 +255,10 @@ var Panel = function (_React$Component) {
255
255
  };
256
256
 
257
257
  return Panel;
258
- }(_react2['default'].Component);
258
+ }(_react2.default.Component);
259
259
 
260
260
  Panel.propTypes = propTypes;
261
261
  Panel.defaultProps = defaultProps;
262
262
 
263
- exports['default'] = (0, _bootstrapUtils.bsClass)('panel', (0, _bootstrapUtils.bsStyles)([].concat((0, _values2['default'])(_StyleConfig.State), [_StyleConfig.Style.DEFAULT, _StyleConfig.Style.PRIMARY]), _StyleConfig.Style.DEFAULT, Panel));
263
+ exports.default = (0, _bootstrapUtils.bsClass)('panel', (0, _bootstrapUtils.bsStyles)([].concat((0, _values2.default)(_StyleConfig.State), [_StyleConfig.Style.DEFAULT, _StyleConfig.Style.PRIMARY]), _StyleConfig.Style.DEFAULT, Panel));
264
264
  module.exports = exports['default'];
package/lib/PanelGroup.js CHANGED
@@ -48,14 +48,14 @@ var _ValidComponentChildren = require('./utils/ValidComponentChildren');
48
48
 
49
49
  var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
50
50
 
51
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
51
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
52
52
 
53
53
  var propTypes = {
54
- accordion: _propTypes2['default'].bool,
55
- activeKey: _propTypes2['default'].any,
56
- defaultActiveKey: _propTypes2['default'].any,
57
- onSelect: _propTypes2['default'].func,
58
- role: _propTypes2['default'].string
54
+ accordion: _propTypes2.default.bool,
55
+ activeKey: _propTypes2.default.any,
56
+ defaultActiveKey: _propTypes2.default.any,
57
+ onSelect: _propTypes2.default.func,
58
+ role: _propTypes2.default.string
59
59
  };
60
60
 
61
61
  var defaultProps = {
@@ -65,12 +65,12 @@ var defaultProps = {
65
65
  // TODO: Use uncontrollable.
66
66
 
67
67
  var PanelGroup = function (_React$Component) {
68
- (0, _inherits3['default'])(PanelGroup, _React$Component);
68
+ (0, _inherits3.default)(PanelGroup, _React$Component);
69
69
 
70
70
  function PanelGroup(props, context) {
71
- (0, _classCallCheck3['default'])(this, PanelGroup);
71
+ (0, _classCallCheck3.default)(this, PanelGroup);
72
72
 
73
- var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props, context));
73
+ var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
74
74
 
75
75
  _this.handleSelect = _this.handleSelect.bind(_this);
76
76
 
@@ -102,7 +102,7 @@ var PanelGroup = function (_React$Component) {
102
102
  propsActiveKey = _props.activeKey,
103
103
  className = _props.className,
104
104
  children = _props.children,
105
- props = (0, _objectWithoutProperties3['default'])(_props, ['accordion', 'activeKey', 'className', 'children']);
105
+ props = (0, _objectWithoutProperties3.default)(_props, ['accordion', 'activeKey', 'className', 'children']);
106
106
 
107
107
  var _splitBsPropsAndOmit = (0, _bootstrapUtils.splitBsPropsAndOmit)(props, ['defaultActiveKey', 'onSelect']),
108
108
  bsProps = _splitBsPropsAndOmit[0],
@@ -116,23 +116,23 @@ var PanelGroup = function (_React$Component) {
116
116
 
117
117
  var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
118
118
 
119
- return _react2['default'].createElement(
119
+ return _react2.default.createElement(
120
120
  'div',
121
- (0, _extends3['default'])({}, elementProps, {
122
- className: (0, _classnames2['default'])(className, classes)
121
+ (0, _extends3.default)({}, elementProps, {
122
+ className: (0, _classnames2.default)(className, classes)
123
123
  }),
124
- _ValidComponentChildren2['default'].map(children, function (child) {
124
+ _ValidComponentChildren2.default.map(children, function (child) {
125
125
  var childProps = {
126
126
  bsStyle: child.props.bsStyle || bsProps.bsStyle
127
127
  };
128
128
 
129
129
  if (accordion) {
130
- (0, _assign2['default'])(childProps, {
130
+ (0, _assign2.default)(childProps, {
131
131
  headerRole: 'tab',
132
132
  panelRole: 'tabpanel',
133
133
  collapsible: true,
134
134
  expanded: child.props.eventKey === activeKey,
135
- onSelect: (0, _createChainedFunction2['default'])(_this2.handleSelect, child.props.onSelect)
135
+ onSelect: (0, _createChainedFunction2.default)(_this2.handleSelect, child.props.onSelect)
136
136
  });
137
137
  }
138
138
 
@@ -142,10 +142,10 @@ var PanelGroup = function (_React$Component) {
142
142
  };
143
143
 
144
144
  return PanelGroup;
145
- }(_react2['default'].Component);
145
+ }(_react2.default.Component);
146
146
 
147
147
  PanelGroup.propTypes = propTypes;
148
148
  PanelGroup.defaultProps = defaultProps;
149
149
 
150
- exports['default'] = (0, _bootstrapUtils.bsClass)('panel-group', PanelGroup);
150
+ exports.default = (0, _bootstrapUtils.bsClass)('panel-group', PanelGroup);
151
151
  module.exports = exports['default'];
package/lib/Popover.js CHANGED
@@ -40,7 +40,7 @@ var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y);
40
40
 
41
41
  var _bootstrapUtils = require('./utils/bootstrapUtils');
42
42
 
43
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
43
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44
44
 
45
45
  var propTypes = {
46
46
  /**
@@ -48,35 +48,35 @@ var propTypes = {
48
48
  * @type {string}
49
49
  * @required
50
50
  */
51
- id: (0, _isRequiredForA11y2['default'])(_propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].number])),
51
+ id: (0, _isRequiredForA11y2.default)(_propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number])),
52
52
 
53
53
  /**
54
54
  * Sets the direction the Popover is positioned towards.
55
55
  */
56
- placement: _propTypes2['default'].oneOf(['top', 'right', 'bottom', 'left']),
56
+ placement: _propTypes2.default.oneOf(['top', 'right', 'bottom', 'left']),
57
57
 
58
58
  /**
59
59
  * The "top" position value for the Popover.
60
60
  */
61
- positionTop: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
61
+ positionTop: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
62
62
  /**
63
63
  * The "left" position value for the Popover.
64
64
  */
65
- positionLeft: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
65
+ positionLeft: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
66
66
 
67
67
  /**
68
68
  * The "top" position value for the Popover arrow.
69
69
  */
70
- arrowOffsetTop: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
70
+ arrowOffsetTop: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
71
71
  /**
72
72
  * The "left" position value for the Popover arrow.
73
73
  */
74
- arrowOffsetLeft: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]),
74
+ arrowOffsetLeft: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
75
75
 
76
76
  /**
77
77
  * Title content
78
78
  */
79
- title: _propTypes2['default'].node
79
+ title: _propTypes2.default.node
80
80
  };
81
81
 
82
82
  var defaultProps = {
@@ -84,11 +84,11 @@ var defaultProps = {
84
84
  };
85
85
 
86
86
  var Popover = function (_React$Component) {
87
- (0, _inherits3['default'])(Popover, _React$Component);
87
+ (0, _inherits3.default)(Popover, _React$Component);
88
88
 
89
89
  function Popover() {
90
- (0, _classCallCheck3['default'])(this, Popover);
91
- return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
90
+ (0, _classCallCheck3.default)(this, Popover);
91
+ return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
92
92
  }
93
93
 
94
94
  Popover.prototype.render = function render() {
@@ -104,15 +104,15 @@ var Popover = function (_React$Component) {
104
104
  className = _props.className,
105
105
  style = _props.style,
106
106
  children = _props.children,
107
- props = (0, _objectWithoutProperties3['default'])(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'title', 'className', 'style', 'children']);
107
+ props = (0, _objectWithoutProperties3.default)(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'title', 'className', 'style', 'children']);
108
108
 
109
109
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
110
110
  bsProps = _splitBsProps[0],
111
111
  elementProps = _splitBsProps[1];
112
112
 
113
- var classes = (0, _extends4['default'])({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));
113
+ var classes = (0, _extends4.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));
114
114
 
115
- var outerStyle = (0, _extends4['default'])({
115
+ var outerStyle = (0, _extends4.default)({
116
116
  display: 'block',
117
117
  top: positionTop,
118
118
  left: positionLeft
@@ -123,20 +123,20 @@ var Popover = function (_React$Component) {
123
123
  left: arrowOffsetLeft
124
124
  };
125
125
 
126
- return _react2['default'].createElement(
126
+ return _react2.default.createElement(
127
127
  'div',
128
- (0, _extends4['default'])({}, elementProps, {
128
+ (0, _extends4.default)({}, elementProps, {
129
129
  role: 'tooltip',
130
- className: (0, _classnames2['default'])(className, classes),
130
+ className: (0, _classnames2.default)(className, classes),
131
131
  style: outerStyle
132
132
  }),
133
- _react2['default'].createElement('div', { className: 'arrow', style: arrowStyle }),
134
- title && _react2['default'].createElement(
133
+ _react2.default.createElement('div', { className: 'arrow', style: arrowStyle }),
134
+ title && _react2.default.createElement(
135
135
  'h3',
136
136
  { className: (0, _bootstrapUtils.prefix)(bsProps, 'title') },
137
137
  title
138
138
  ),
139
- _react2['default'].createElement(
139
+ _react2.default.createElement(
140
140
  'div',
141
141
  { className: (0, _bootstrapUtils.prefix)(bsProps, 'content') },
142
142
  children
@@ -145,10 +145,10 @@ var Popover = function (_React$Component) {
145
145
  };
146
146
 
147
147
  return Popover;
148
- }(_react2['default'].Component);
148
+ }(_react2.default.Component);
149
149
 
150
150
  Popover.propTypes = propTypes;
151
151
  Popover.defaultProps = defaultProps;
152
152
 
153
- exports['default'] = (0, _bootstrapUtils.bsClass)('popover', Popover);
153
+ exports.default = (0, _bootstrapUtils.bsClass)('popover', Popover);
154
154
  module.exports = exports['default'];
@@ -46,7 +46,7 @@ var _ValidComponentChildren = require('./utils/ValidComponentChildren');
46
46
 
47
47
  var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
48
48
 
49
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
49
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
50
 
51
51
  var ROUND_PRECISION = 1000;
52
52
 
@@ -61,7 +61,7 @@ function onlyProgressBar(props, propName, componentName) {
61
61
 
62
62
  var error = null;
63
63
 
64
- _react2['default'].Children.forEach(children, function (child) {
64
+ _react2.default.Children.forEach(children, function (child) {
65
65
  if (error) {
66
66
  return;
67
67
  }
@@ -71,7 +71,7 @@ function onlyProgressBar(props, propName, componentName) {
71
71
  return;
72
72
  }
73
73
 
74
- var childIdentifier = _react2['default'].isValidElement(child) ? child.type.displayName || child.type.name || child.type : child;
74
+ var childIdentifier = _react2.default.isValidElement(child) ? child.type.displayName || child.type.name || child.type : child;
75
75
  error = new Error('Children of ' + componentName + ' can contain only ProgressBar ' + ('components. Found ' + childIdentifier + '.'));
76
76
  });
77
77
 
@@ -79,19 +79,19 @@ function onlyProgressBar(props, propName, componentName) {
79
79
  }
80
80
 
81
81
  var propTypes = {
82
- min: _propTypes2['default'].number,
83
- now: _propTypes2['default'].number,
84
- max: _propTypes2['default'].number,
85
- label: _propTypes2['default'].node,
86
- srOnly: _propTypes2['default'].bool,
87
- striped: _propTypes2['default'].bool,
88
- active: _propTypes2['default'].bool,
82
+ min: _propTypes2.default.number,
83
+ now: _propTypes2.default.number,
84
+ max: _propTypes2.default.number,
85
+ label: _propTypes2.default.node,
86
+ srOnly: _propTypes2.default.bool,
87
+ striped: _propTypes2.default.bool,
88
+ active: _propTypes2.default.bool,
89
89
  children: onlyProgressBar,
90
90
 
91
91
  /**
92
92
  * @private
93
93
  */
94
- isChild: _propTypes2['default'].bool
94
+ isChild: _propTypes2.default.bool
95
95
  };
96
96
 
97
97
  var defaultProps = {
@@ -109,11 +109,11 @@ function getPercentage(now, min, max) {
109
109
  }
110
110
 
111
111
  var ProgressBar = function (_React$Component) {
112
- (0, _inherits3['default'])(ProgressBar, _React$Component);
112
+ (0, _inherits3.default)(ProgressBar, _React$Component);
113
113
 
114
114
  function ProgressBar() {
115
- (0, _classCallCheck3['default'])(this, ProgressBar);
116
- return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
115
+ (0, _classCallCheck3.default)(this, ProgressBar);
116
+ return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
117
117
  }
118
118
 
119
119
  ProgressBar.prototype.renderProgressBar = function renderProgressBar(_ref) {
@@ -128,27 +128,27 @@ var ProgressBar = function (_React$Component) {
128
128
  active = _ref.active,
129
129
  className = _ref.className,
130
130
  style = _ref.style,
131
- props = (0, _objectWithoutProperties3['default'])(_ref, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'className', 'style']);
131
+ props = (0, _objectWithoutProperties3.default)(_ref, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'className', 'style']);
132
132
 
133
133
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
134
134
  bsProps = _splitBsProps[0],
135
135
  elementProps = _splitBsProps[1];
136
136
 
137
- var classes = (0, _extends4['default'])({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {
137
+ var classes = (0, _extends4.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {
138
138
  active: active
139
139
  }, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'striped')] = active || striped, _extends2));
140
140
 
141
- return _react2['default'].createElement(
141
+ return _react2.default.createElement(
142
142
  'div',
143
- (0, _extends4['default'])({}, elementProps, {
143
+ (0, _extends4.default)({}, elementProps, {
144
144
  role: 'progressbar',
145
- className: (0, _classnames2['default'])(className, classes),
146
- style: (0, _extends4['default'])({ width: getPercentage(now, min, max) + '%' }, style),
145
+ className: (0, _classnames2.default)(className, classes),
146
+ style: (0, _extends4.default)({ width: getPercentage(now, min, max) + '%' }, style),
147
147
  'aria-valuenow': now,
148
148
  'aria-valuemin': min,
149
149
  'aria-valuemax': max
150
150
  }),
151
- srOnly ? _react2['default'].createElement(
151
+ srOnly ? _react2.default.createElement(
152
152
  'span',
153
153
  { className: 'sr-only' },
154
154
  label
@@ -159,7 +159,7 @@ var ProgressBar = function (_React$Component) {
159
159
  ProgressBar.prototype.render = function render() {
160
160
  var _props = this.props,
161
161
  isChild = _props.isChild,
162
- props = (0, _objectWithoutProperties3['default'])(_props, ['isChild']);
162
+ props = (0, _objectWithoutProperties3.default)(_props, ['isChild']);
163
163
 
164
164
 
165
165
  if (isChild) {
@@ -177,15 +177,15 @@ var ProgressBar = function (_React$Component) {
177
177
  bsStyle = props.bsStyle,
178
178
  className = props.className,
179
179
  children = props.children,
180
- wrapperProps = (0, _objectWithoutProperties3['default'])(props, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'bsClass', 'bsStyle', 'className', 'children']);
180
+ wrapperProps = (0, _objectWithoutProperties3.default)(props, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'bsClass', 'bsStyle', 'className', 'children']);
181
181
 
182
182
 
183
- return _react2['default'].createElement(
183
+ return _react2.default.createElement(
184
184
  'div',
185
- (0, _extends4['default'])({}, wrapperProps, {
186
- className: (0, _classnames2['default'])(className, 'progress')
185
+ (0, _extends4.default)({}, wrapperProps, {
186
+ className: (0, _classnames2.default)(className, 'progress')
187
187
  }),
188
- children ? _ValidComponentChildren2['default'].map(children, function (child) {
188
+ children ? _ValidComponentChildren2.default.map(children, function (child) {
189
189
  return (0, _react.cloneElement)(child, { isChild: true });
190
190
  }) : this.renderProgressBar({
191
191
  min: min, now: now, max: max, label: label, srOnly: srOnly, striped: striped, active: active, bsClass: bsClass, bsStyle: bsStyle
@@ -194,10 +194,10 @@ var ProgressBar = function (_React$Component) {
194
194
  };
195
195
 
196
196
  return ProgressBar;
197
- }(_react2['default'].Component);
197
+ }(_react2.default.Component);
198
198
 
199
199
  ProgressBar.propTypes = propTypes;
200
200
  ProgressBar.defaultProps = defaultProps;
201
201
 
202
- exports['default'] = (0, _bootstrapUtils.bsClass)('progress-bar', (0, _bootstrapUtils.bsStyles)((0, _values2['default'])(_StyleConfig.State), ProgressBar));
202
+ exports.default = (0, _bootstrapUtils.bsClass)('progress-bar', (0, _bootstrapUtils.bsStyles)((0, _values2.default)(_StyleConfig.State), ProgressBar));
203
203
  module.exports = exports['default'];