Skip to content

Commit 4c147c1

Browse files
committed
Merge remote-tracking branch 'origin/master' into react-0.13
Conflicts: package.json src/NavItem.jsx src/Panel.jsx
2 parents 728c2b0 + 156a167 commit 4c147c1

28 files changed

Lines changed: 842 additions & 115 deletions

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sudo: false
12
language: node_js
23
node_js:
3-
- "0.10"
4+
- "0.10"

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
v0.17.0 - Tue, 17 Mar 2015 15:03:27 GMT
2+
---------------------------------------
3+
4+
- [4fae871](../../commit/4fae871) [added] CollapsableNav implements bootstrap markup for navbar-collapse
5+
- [befed83](../../commit/befed83) [fixed] All panel-* classes dynamic based on bsStyle prop
6+
- [de6f7dd](../../commit/de6f7dd) [fixed] CollapsableMixin fixed size
7+
- [7cc4747](../../commit/7cc4747) [fixed] Added role="button" to NavItem for aria compliance.
8+
- [3b6ba7a](../../commit/3b6ba7a) [fixed] Col Offset/Pull/Push of zero. Fixes #406
9+
- [66c439f](../../commit/66c439f) [fixed] OverlayTrigger improvement related to #353 . Helps reduce browser reflows for lots of multiple OverlayTriggers being rendered at once. Before: http://i.imgur.com/e4UZ5l6.png , http://i.imgur.com/Tw39F9t.png After: http://i.imgur.com/bU0f7VY.png
10+
11+
12+
v0.16.1 - Tue, 03 Mar 2015 23:04:19 GMT
13+
---------------------------------------
14+
15+
- [71ff264](../../commit/71ff264) [added] bsSize prop to Input, supporting input groups
16+
17+
118
v0.16.0 - Fri, 27 Feb 2015 14:01:37 GMT
219
---------------------------------------
320

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Bootstrap 3](http://getbootstrap.com) components built with [React](http://facebook.github.io/react/)
44

5-
[![Build Status](https://travis-ci.org/react-bootstrap/react-bootstrap.svg)](https://travis-ci.org/react-bootstrap/react-bootstrap) [![NPM version](https://badge.fury.io/js/react-bootstrap.svg)](http://badge.fury.io/js/react-bootstrap) [![Bower version](https://badge.fury.io/bo/react-bootstrap.svg)](http://badge.fury.io/bo/react-bootstrap) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-bootstrap/react-bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
[![Build Status](https://travis-ci.org/react-bootstrap/react-bootstrap.svg?branch=master)](https://travis-ci.org/react-bootstrap/react-bootstrap) [![NPM version](https://badge.fury.io/js/react-bootstrap.svg)](http://badge.fury.io/js/react-bootstrap) [![Bower version](https://badge.fury.io/bo/react-bootstrap.svg)](http://badge.fury.io/bo/react-bootstrap) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-bootstrap/react-bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

77
Under active development - APIs will change.
88

@@ -30,6 +30,5 @@ and many [contributors](https://github.com/react-bootstrap/react-bootstrap/graph
3030
Yes please!
3131

3232
- Run `npm install`, `npm run test-watch` to run tests while you develop (however this hides any build errors, you can see these with `grunt build`)
33-
- Add tests for any new or changed functionality
33+
- Review the [contributing guidelines](https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md)
3434
- See [issues](https://github.com/stevoland/react-bootstrap/issues) for some ideas
35-
- Follow existing style

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ $ cd react-bootstrap/docs
1616
$ npm install
1717
```
1818

19+
You must have previously run `grunt build` and `npm install` from the main directory.
20+
1921
### Instructions
2022

2123
#### Development

docs/examples/CollapsableNav.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var navbarInstance = (
2+
<Navbar brand="React-Bootstrap" toggleNavKey={0}>
3+
<CollapsableNav eventKey={0}> {/* This is the eventKey referenced */}
4+
<Nav navbar>
5+
<NavItem eventKey={1} href="#">Link</NavItem>
6+
<NavItem eventKey={2} href="#">Link</NavItem>
7+
<DropdownButton eventKey={3} title="Dropdown">
8+
<MenuItem eventKey="1">Action</MenuItem>
9+
<MenuItem eventKey="2">Another action</MenuItem>
10+
<MenuItem eventKey="3">Something else here</MenuItem>
11+
<MenuItem divider />
12+
<MenuItem eventKey="4">Separated link</MenuItem>
13+
</DropdownButton>
14+
</Nav>
15+
<Nav navbar right>
16+
<NavItem eventKey={1} href="#">Link Right</NavItem>
17+
<NavItem eventKey={2} href="#">Link Right</NavItem>
18+
</Nav>
19+
</CollapsableNav>
20+
</Navbar>
21+
);
22+
23+
React.render(navbarInstance, mountNode);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var CollapsableParagraph = React.createClass({
2+
mixins: [CollapsableMixin],
3+
4+
getCollapsableDOMNode: function(){
5+
return this.refs.panel.getDOMNode();
6+
},
7+
8+
getCollapsableDimensionValue: function(){
9+
return this.refs.panel.getDOMNode().scrollHeight;
10+
},
11+
12+
onHandleToggle: function(e){
13+
e.preventDefault();
14+
this.setState({expanded:!this.state.expanded});
15+
},
16+
17+
render: function(){
18+
var styles = this.getCollapsableClassSet();
19+
var text = this.isExpanded() ? 'Hide' : 'Show';
20+
return (
21+
<div>
22+
<Button onClick={this.onHandleToggle}>{text} Content</Button>
23+
<div ref="panel" className={classSet(styles)}>
24+
{this.props.children}
25+
</div>
26+
</div>
27+
);
28+
}
29+
});
30+
31+
var panelInstance = (
32+
<CollapsableParagraph>
33+
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
34+
</CollapsableParagraph>
35+
);
36+
37+
React.render(panelInstance, mountNode);

docs/src/ComponentsPage.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ var ComponentsPage = React.createClass({
207207
<h3 id="panels-accordion">Accordions</h3>
208208
<p><code>&lt;Accordion /&gt;</code> aliases <code>&lt;PanelGroup accordion /&gt;</code>.</p>
209209
<ReactPlayground codeText={fs.readFileSync(__dirname + '/../examples/PanelGroupAccordion.js', 'utf8')} />
210+
211+
<h3 id="panels-collapsable">Collapsable Mixin</h3>
212+
<p><code>CollapsableMixin</code> can be used to create your own components with collapse functionality.</p>
213+
<ReactPlayground codeText={fs.readFileSync(__dirname + '/../examples/CollapsableParagraph.js', 'utf8')} />
210214
</div>
211215

212216
<div className="bs-docs-section">
@@ -353,6 +357,16 @@ var ComponentsPage = React.createClass({
353357
</pre>
354358
</div>
355359
<ReactPlayground codeText={fs.readFileSync(__dirname + '/../examples/NavbarCollapsable.js', 'utf8')} />
360+
361+
<h3>Mobile Friendly (Multiple Nav Components)</h3>
362+
<p>To have a mobile friendly Navbar that handles multiple <code>Nav</code> components use <code>CollapsableNav</code>. The <code>toggleNavKey</code> must still be set, however, the corresponding <code>eventKey</code> must now be on the <code>CollapsableNav</code> component.</p>
363+
<div className="bs-callout bs-callout-info">
364+
<h4>Div collapse</h4>
365+
<p>The <code>navbar-collapse</code> div gets created as the collapsable element which follows the <a href="http://getbootstrap.com/components/#navbar-default">bootstrap</a> collapsable navbar documentation.</p>
366+
<pre>&lt;div class="collapse navbar-collapse"&gt;&lt;/div&gt;</pre>
367+
</div>
368+
369+
<ReactPlayground codeText={fs.readFileSync(__dirname + '/../examples/CollapsableNav.js', 'utf8')} />
356370
</div>
357371

358372
{/* Tabbed Areas */}

docs/src/GettingStartedPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var Page = React.createClass({
2323
<div className="col-md-9" role="main">
2424
<div className="bs-docs-section">
2525
<h2 id="setup" className="page-header">Setup</h2>
26-
<p className="lead">You can import the lib with as AMD modules, CommonJS modules as a global JS script.</p>
26+
<p className="lead">You can import the lib as AMD modules, CommonJS modules, or as a global JS script.</p>
2727

2828
<p>First add the Bootstrap CSS to your project; check <a href="http://getbootstrap.com/getting-started/" name="Bootstrap Docs">here</a> if you have not already done that. Then:</p>
2929

docs/src/ReactPlayground.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ var Badge = require('../../lib/Badge');
88
var Button = require('../../lib/Button');
99
var ButtonGroup = require('../../lib/ButtonGroup');
1010
var ButtonToolbar = require('../../lib/ButtonToolbar');
11+
var CollapsableMixin = require('../../lib/CollapsableMixin');
12+
var CollapsableNav = require('../../lib/CollapsableNav');
1113
var Carousel = require('../../lib/Carousel');
1214
var CarouselItem = require('../../lib/CarouselItem');
1315
var Col = require('../../lib/Col');

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-bootstrap",
3-
"version": "0.16.0",
3+
"version": "0.17.0",
44
"description": "Bootstrap 3 components build with React",
55
"repository": {
66
"type": "git",
@@ -65,4 +65,4 @@
6565
"dependencies": {
6666
"classnames": "^1.1.4"
6767
}
68-
}
68+
}

0 commit comments

Comments
 (0)