react-bootstrap
Advanced tools
Comparing version 0.13.3 to 0.14.0
@@ -44,2 +44,3 @@ module.exports = { | ||
'euro', | ||
'eur', | ||
'minus', | ||
@@ -241,4 +242,62 @@ 'cloud', | ||
'tree-conifer', | ||
'tree-deciduous' | ||
'tree-deciduous', | ||
'cd', | ||
'save-file', | ||
'open-file', | ||
'level-up', | ||
'copy', | ||
'paste', | ||
'alert', | ||
'equalizer', | ||
'king', | ||
'queen', | ||
'pawn', | ||
'bishop', | ||
'knight', | ||
'baby-formula', | ||
'tent', | ||
'blackboard', | ||
'bed', | ||
'apple', | ||
'erase', | ||
'hourglass', | ||
'lamp', | ||
'duplicate', | ||
'piggy-bank', | ||
'scissors', | ||
'bitcoin', | ||
'yen', | ||
'ruble', | ||
'scale', | ||
'ice-lolly', | ||
'ice-lolly-tasted', | ||
'education', | ||
'option-horizontal', | ||
'option-vertical', | ||
'menu-hamburger', | ||
'modal-window', | ||
'oil', | ||
'grain', | ||
'sunglasses', | ||
'text-size', | ||
'text-color', | ||
'text-background', | ||
'object-align-top', | ||
'object-align-bottom', | ||
'object-align-horizontal', | ||
'object-align-left', | ||
'object-align-vertical', | ||
'object-align-right', | ||
'triangle-right', | ||
'triangle-left', | ||
'triangle-bottom', | ||
'triangle-top', | ||
'console', | ||
'superscript', | ||
'subscript', | ||
'menu-left', | ||
'menu-right', | ||
'menu-down', | ||
'menu-up' | ||
] | ||
}; |
@@ -25,3 +25,4 @@ var React = require('react'); | ||
onSelect: React.PropTypes.func, | ||
navItem: React.PropTypes.bool | ||
navItem: React.PropTypes.bool, | ||
noCaret: React.PropTypes.bool | ||
}, | ||
@@ -35,2 +36,5 @@ | ||
var caret = this.props.noCaret ? | ||
null : (React.createElement("span", {className: "caret"})); | ||
return this[renderMethod]([ | ||
@@ -49,3 +53,3 @@ React.createElement(Button, React.__spread({}, | ||
this.props.title, ' ', | ||
React.createElement("span", {className: "caret"}) | ||
caret | ||
), | ||
@@ -52,0 +56,0 @@ React.createElement(DropdownMenu, { |
23
Input.js
@@ -40,3 +40,7 @@ var React = require('react'); | ||
else if (this.props.type) { | ||
return this.getInputDOMNode().value; | ||
if (this.props.type == "select" && this.props.multiple) { | ||
return this.getSelectedOptions(); | ||
} else { | ||
return this.getInputDOMNode().value; | ||
} | ||
} | ||
@@ -52,2 +56,19 @@ else { | ||
getSelectedOptions: function () { | ||
var values = []; | ||
Array.prototype.forEach.call( | ||
this.getInputDOMNode().getElementsByTagName('option'), | ||
function (option) { | ||
if (option.selected) { | ||
var value = option.getAttribute('value') || option.innerHTML; | ||
values.push(value); | ||
} | ||
} | ||
); | ||
return values; | ||
}, | ||
isCheckboxOrRadio: function () { | ||
@@ -54,0 +75,0 @@ return this.props.type === 'radio' || this.props.type === 'checkbox'; |
{ | ||
"name": "react-bootstrap", | ||
"version": "0.13.3", | ||
"version": "0.14.0", | ||
"description": "Bootstrap 3 components build with React", | ||
@@ -5,0 +5,0 @@ "homepage": "http://react-bootstrap.github.io/", |
54
Panel.js
@@ -45,3 +45,3 @@ var React = require('react'); | ||
getCollapsableDimensionValue: function () { | ||
return this.refs.body.getDOMNode().offsetHeight; | ||
return this.refs.panel.getDOMNode().scrollHeight; | ||
}, | ||
@@ -80,7 +80,47 @@ | ||
renderBody: function () { | ||
return ( | ||
React.createElement("div", {className: "panel-body", ref: "body"}, | ||
this.props.children | ||
) | ||
); | ||
var allChildren = this.props.children; | ||
var bodyElements = []; | ||
function getProps() { | ||
return {key: bodyElements.length}; | ||
} | ||
function addPanelBody (children) { | ||
bodyElements.push( | ||
React.createElement("div", React.__spread({className: "panel-body"}, getProps()), | ||
children | ||
) | ||
); | ||
} | ||
// Handle edge cases where we should not iterate through children. | ||
if (!Array.isArray(allChildren) || allChildren.length == 0) { | ||
addPanelBody(allChildren); | ||
} else { | ||
var panelBodyChildren = []; | ||
function maybeRenderPanelBody () { | ||
if (panelBodyChildren.length == 0) { | ||
return; | ||
} | ||
addPanelBody(panelBodyChildren); | ||
panelBodyChildren = []; | ||
} | ||
allChildren.forEach(function(child) { | ||
if (React.isValidElement(child) && child.props.fill != null) { | ||
maybeRenderPanelBody(); | ||
// Separately add the filled element. | ||
bodyElements.push(cloneWithProps(child, getProps())); | ||
} else { | ||
panelBodyChildren.push(child); | ||
} | ||
}); | ||
maybeRenderPanelBody(); | ||
} | ||
return bodyElements; | ||
}, | ||
@@ -148,2 +188,2 @@ | ||
module.exports = Panel; | ||
module.exports = Panel; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134977
4277