Skip to content

Commit d3c2eca

Browse files
committed
Merge tag 'v0.23.2' into v0.24-rc
v0.23.2 Conflicts: package.json
2 parents 3146dee + f2da250 commit d3c2eca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+904
-655
lines changed

.eslintrc

+14-14
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
"react"
1212
],
1313
"rules": {
14-
"comma-spacing": 1,
14+
"comma-spacing": 2,
1515
"key-spacing": 0,
1616
"no-underscore-dangle": 0,
17-
"no-unused-vars": [1, { "vars": "all", "args": "none" }],
17+
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
1818
"no-var": 2,
19-
"object-shorthand": 1,
20-
"quotes": [1, "single", "avoid-escape"],
19+
"object-shorthand": 2,
20+
"quotes": [2, "single", "avoid-escape"],
2121
"react/display-name": 0,
22-
"react/jsx-no-undef": 1,
23-
"react/jsx-uses-react": 1,
24-
"react/no-did-mount-set-state": 1,
25-
"react/no-did-update-set-state": 1,
26-
"react/no-multi-comp": 1,
27-
"react/prop-types": [1, { ignore: [children, className] }],
28-
"react/react-in-jsx-scope": 1,
29-
"react/self-closing-comp": 1,
30-
"react/wrap-multilines": 1,
31-
"react/jsx-uses-vars": 1,
22+
"react/jsx-no-undef": 2,
23+
"react/jsx-uses-react": 2,
24+
"react/no-did-mount-set-state": 2,
25+
"react/no-did-update-set-state": 2,
26+
"react/no-multi-comp": 2,
27+
"react/prop-types": [2, { ignore: [children, className] }],
28+
"react/react-in-jsx-scope": 2,
29+
"react/self-closing-comp": 2,
30+
"react/wrap-multilines": 2,
31+
"react/jsx-uses-vars": 2,
3232
"strict": 0
3333
}
3434
}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ lib/
99
dist/
1010
!tools/dist/
1111
docs-built/
12-
ie8/bundle.js
1312
tmp-bower-repo/
1413
tmp-docs-repo/
1514
.babel-cache/

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
v0.23.2 - Mon, 08 Jun 2015 18:56:48 GMT
2+
---------------------------------------
3+
4+
- [7211dcb](../../commit/7211dcb) [added] Add prevIcon and nextIcon props as node proptypes to Carousel
5+
- [5734ec3](../../commit/5734ec3) [added] Pagination component
6+
- [2f8c454](../../commit/2f8c454) [changed] Assert ProgressBar children can be ProgressBar only.
7+
- [2c46820](../../commit/2c46820) [added] `createSelectedEvent` for consistent onSelect handling
8+
- [c2ff9ad](../../commit/c2ff9ad) [added] property disabled on MenuItem
9+
10+
11+
112
v0.23.1 - Tue, 02 Jun 2015 16:57:57 GMT
213
---------------------------------------
314

MAINTAINING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ helping out.
5151

5252
GitHub by default does not publicly state that you are a member of the
5353
organization. Please feel free to change that setting for yourself so others
54-
will know who's helping out. That can be configured on [organization
54+
will know who's helping out. That can be configured on the [organization
5555
list](https://github.com/orgs/react-bootstrap/people) page.
5656

5757
Being a maintainer is not an obligation. You can help when you have time and be
@@ -77,7 +77,7 @@ Example usages of the release script:
7777
$ ./tools/release patch
7878
$ ./tools/release minor
7979
$ ./tools/release major
80-
$ ./tools/release minor --pre beta
80+
$ ./tools/release minor --preid beta
8181
```
8282

8383
Note that the above commands will bump the [semver](http://semver.org) version

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
[Bootstrap 3][bootstrap] components built with [React][react]
44

55
[![Travis Build Status][build-badge]][build]
6-
[![NPM version][npm-badge]][npm]
7-
[![Bower version][bower-badge]][bower]
6+
[![Build status][appveyor-badge]][appveyor]
7+
88
[![HuBoard][huboard-badge]][huboard]
99
[![Gitter][gitter-badge]][gitter]
1010

11+
[![NPM version][npm-badge]][npm]
12+
[![Bower version][bower-badge]][bower]
13+
1114
[![Dependency Status][deps-badge]][deps]
1215
[![devDependency Status][dev-deps-badge]][dev-deps]
1316
[![peerDependency Status][peer-deps-badge]][peer-deps]
@@ -73,4 +76,4 @@ Yes please! See the [contributing guidelines][contributing] for details.
7376
[huboard]: https://huboard.com/react-bootstrap/react-bootstrap
7477

7578
[appveyor-badge]: https://ci.appveyor.com/api/projects/status/ylitpyo6n5yq1s6i/branch/master?svg=true
76-
[appveyor]: https://ci.appveyor.com/project/mtscout6/react-bootstrap/branch/master
79+
[appveyor]: https://ci.appveyor.com/project/react-bootstrap/react-bootstrap/branch/master

appveyor.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: '{build}'
2+
3+
# Install scripts. (runs after repo cloning)
4+
install:
5+
# Get the latest stable version of io.js
6+
- ps: Install-Product node ''
7+
- npm -g install npm@latest
8+
- set PATH=%APPDATA%\npm;%PATH%
9+
- node --version
10+
- npm --version
11+
- npm install
12+
13+
# No need for MSBuild on this project
14+
build: off
15+
16+
test_script:
17+
- npm test

appveyor.yml.tmp

-28
This file was deleted.

docs/assets/docs.css

+9
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Responsive tests
3030
* Glyphicons
3131
* Customizer
32+
* MenuItem
3233
* Miscellaneous
3334
*/
3435

@@ -1127,6 +1128,14 @@ h1[id] {
11271128
overflow: auto;
11281129
}
11291130

1131+
/* MenuItem */
1132+
.bs-example .dropdown-menu.open {
1133+
position: static;
1134+
display: block;
1135+
margin-bottom: 5px;
1136+
clear: left;
1137+
}
1138+
11301139

11311140
/*
11321141
* Code snippets

docs/examples/.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"PageHeader",
4040
"PageItem",
4141
"Pager",
42+
"Pagination",
4243
"Panel",
4344
"PanelGroup",
4445
"Popover",

docs/examples/MenuItem.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
function onSelectAlert(eventKey, href, target) {
2+
alert('Alert from menu item.\neventKey: "' + eventKey + '"\nhref: "' + href + '"');
3+
}
4+
5+
function preventDefault() {}
6+
7+
const MenuItems = (
8+
<div className="clearfix">
9+
<ul className="dropdown-menu open">
10+
<MenuItem header>Header</MenuItem>
11+
<MenuItem onSelect={preventDefault}>link</MenuItem>
12+
<MenuItem divider/>
13+
<MenuItem header>Header</MenuItem>
14+
<MenuItem onSelect={preventDefault}>link</MenuItem>
15+
<MenuItem disabled>disabled</MenuItem>
16+
<MenuItem title="See? I have a title." onSelect={preventDefault}>
17+
link with title
18+
</MenuItem>
19+
<MenuItem eventKey={1} href="#someHref" onSelect={onSelectAlert}>
20+
link that alerts
21+
</MenuItem>
22+
</ul>
23+
</div>
24+
);
25+
26+
React.render(MenuItems, mountNode);

docs/examples/PaginationAdvanced.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const PaginationAdvanced = React.createClass({
2+
getInitialState() {
3+
return {
4+
activePage: 1
5+
};
6+
},
7+
8+
handleSelect(event, selectedEvent) {
9+
this.setState({
10+
activePage: selectedEvent.eventKey
11+
});
12+
},
13+
14+
render() {
15+
return (
16+
<Pagination
17+
prev={true}
18+
next={true}
19+
first={true}
20+
last={true}
21+
ellipsis={true}
22+
items={20}
23+
maxButtons={5}
24+
activePage={this.state.activePage}
25+
onSelect={this.handleSelect} />
26+
);
27+
}
28+
});
29+
30+
React.render(<PaginationAdvanced />, mountNode);

docs/examples/PaginationBasic.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const PaginationBasic = React.createClass({
2+
getInitialState() {
3+
return {
4+
activePage: 1
5+
};
6+
},
7+
8+
handleSelect(event, selectedEvent){
9+
this.setState({
10+
activePage: selectedEvent.eventKey
11+
});
12+
},
13+
14+
render() {
15+
return (
16+
<div>
17+
<Pagination
18+
bsSize='large'
19+
items={10}
20+
activePage={this.state.activePage}
21+
onSelect={this.handleSelect} />
22+
<br />
23+
24+
<Pagination
25+
bsSize='medium'
26+
items={10}
27+
activePage={this.state.activePage}
28+
onSelect={this.handleSelect} />
29+
<br />
30+
31+
<Pagination
32+
bsSize='small'
33+
items={10}
34+
activePage={this.state.activePage}
35+
onSelect={this.handleSelect} />
36+
</div>
37+
);
38+
}
39+
});
40+
41+
React.render(<PaginationBasic />, mountNode);

docs/src/ComponentsPage.js

+48-13
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,25 @@ const ComponentsPage = React.createClass({
170170
<ReactPlayground codeText={Samples.SplitButtonRight} />
171171
</div>
172172

173+
{/* Menu Item */}
174+
<div className='bs-docs-section'>
175+
<h1 id='menu-item' className='page-header'>Menu Item <small> MenudItem</small></h1>
176+
<p>This is a component used in other components (see <a href="buttons">Buttons</a>, <a href="#navbars">Navbars</a>).</p>
177+
<p>It supports the basic anchor properties <code>href</code>, <code>target</code>, <code>title</code>.</p>
178+
<p>It also supports different properties of the normal Bootstrap MenuItem.
179+
<ul>
180+
<li><code>header</code>: To add a header label to sections</li>
181+
<li><code>divider</code>: Adds an horizontal divider between sections</li>
182+
<li><code>disabled</code>: shows the item as disabled, and prevents the onclick</li>
183+
<li><code>eventKey</code>: passed to the callback</li>
184+
<li><code>onSelect</code>: a callback that is called when the user clicks the item.</li>
185+
</ul>
186+
<p>The callback is called with the following arguments: <code>eventKey</code>, <code>href</code> and <code>target</code></p>
187+
</p>
188+
<ReactPlayground codeText={Samples.MenuItem} />
189+
</div>
190+
191+
{/* Panels */}
173192
<div className='bs-docs-section'>
174193
<h1 id='panels' className='page-header'>Panels <small>Panel, PanelGroup, Accordion</small></h1>
175194

@@ -426,6 +445,19 @@ const ComponentsPage = React.createClass({
426445
<ReactPlayground codeText={Samples.PagerDisabled} />
427446
</div>
428447

448+
{/* Pagination */}
449+
<div className='bs-docs-section'>
450+
<h1 id='pagination' className='page-header'>Pagination <small>Pagination</small></h1>
451+
<h2 id='pagination-examples'>Example pagination</h2>
452+
453+
<p>Provide pagination links for your site or app with the multi-page pagination component. Set <code>items</code> to the number of pages. <code>activePage</code> prop dictates which page is active</p>
454+
<ReactPlayground codeText={Samples.PaginationBasic} />
455+
456+
<p>More options such as <code>first</code>, <code>last</code>, <code>previous</code>, <code>next</code> and <code>ellipsis</code>.</p>
457+
<ReactPlayground codeText={Samples.PaginationAdvanced} />
458+
459+
</div>
460+
429461
{/* Alerts */}
430462
<div className='bs-docs-section'>
431463
<h1 id='alerts' className='page-header'>Alert messages <small>Alert</small></h1>
@@ -607,6 +639,7 @@ const ComponentsPage = React.createClass({
607639
<code>getValue()</code> will not work when used this way.</p>
608640
<ReactPlayground codeText={Samples.InputWrapper} />
609641
</div>
642+
610643
</div>
611644

612645
<div className='col-md-3'>
@@ -623,6 +656,7 @@ const ComponentsPage = React.createClass({
623656
<SubNav href='#buttons' key={1} text='Buttons'>
624657
<NavItem href='#btn-groups' key={2}>Button groups</NavItem>
625658
<NavItem href='#btn-dropdowns' key={3}>Button dropdowns</NavItem>
659+
<NavItem href='#menu-item' key={25}>Menu Item</NavItem>
626660
</SubNav>
627661
<NavItem href='#panels' key={4}>Panels</NavItem>
628662
<NavItem href='#modals' key={5}>Modals</NavItem>
@@ -633,19 +667,20 @@ const ComponentsPage = React.createClass({
633667
<NavItem href='#navbars' key={10}>Navbars</NavItem>
634668
<NavItem href='#tabs' key={11}>Togglable tabs</NavItem>
635669
<NavItem href='#pager' key={12}>Pager</NavItem>
636-
<NavItem href='#alerts' key={13}>Alerts</NavItem>
637-
<NavItem href='#carousels' key={14}>Carousels</NavItem>
638-
<NavItem href='#grids' key={15}>Grids</NavItem>
639-
<NavItem href='#thumbnail' key={16}>Thumbnail</NavItem>
640-
<NavItem href='#listgroup' key={17}>List group</NavItem>
641-
<NavItem href='#labels' key={18}>Labels</NavItem>
642-
<NavItem href='#badges' key={19}>Badges</NavItem>
643-
<NavItem href='#jumbotron' key={20}>Jumbotron</NavItem>
644-
<NavItem href='#page-header' key={21}>Page Header</NavItem>
645-
<NavItem href='#wells' key={22}>Wells</NavItem>
646-
<NavItem href='#glyphicons' key={23}>Glyphicons</NavItem>
647-
<NavItem href='#tables' key={24}>Tables</NavItem>
648-
<NavItem href='#input' key={25}>Input</NavItem>
670+
<NavItem href='#pagination' key={13}>Pagination</NavItem>
671+
<NavItem href='#alerts' key={14}>Alerts</NavItem>
672+
<NavItem href='#carousels' key={15}>Carousels</NavItem>
673+
<NavItem href='#grids' key={16}>Grids</NavItem>
674+
<NavItem href='#thumbnail' key={17}>Thumbnail</NavItem>
675+
<NavItem href='#listgroup' key={18}>List group</NavItem>
676+
<NavItem href='#labels' key={19}>Labels</NavItem>
677+
<NavItem href='#badges' key={20}>Badges</NavItem>
678+
<NavItem href='#jumbotron' key={21}>Jumbotron</NavItem>
679+
<NavItem href='#page-header' key={22}>Page Header</NavItem>
680+
<NavItem href='#wells' key={23}>Wells</NavItem>
681+
<NavItem href='#glyphicons' key={24}>Glyphicons</NavItem>
682+
<NavItem href='#tables' key={25}>Tables</NavItem>
683+
<NavItem href='#input' key={26}>Input</NavItem>
649684
</Nav>
650685
<a className='back-to-top' href='#top'>
651686
Back to top

docs/src/PageFooter.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import React from 'react';
22
import packageJSON from '../../package.json';
33

4+
let version = packageJSON.version;
5+
6+
if (/docs/.test(version)) {
7+
version = version.split('-')[0];
8+
}
9+
410
const PageHeader = React.createClass({
511
render() {
612
return (
@@ -36,7 +42,7 @@ const PageHeader = React.createClass({
3642
</div>
3743
<p>Code licensed under <a href='https://github.com/react-bootstrap/react-bootstrap/blob/master/LICENSE' target='_blank'>MIT</a>.</p>
3844
<ul className='bs-docs-footer-links muted'>
39-
<li>Currently v{packageJSON.version}</li>
45+
<li>Currently v{version}</li>
4046
<li>·</li>
4147
<li><a href='https://github.com/react-bootstrap/react-bootstrap/'>GitHub</a></li>
4248
<li>·</li>

0 commit comments

Comments
 (0)