Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1221 from AlexKVal/25to26
Browse files Browse the repository at this point in the history
Merge v0.25 changes to v0.26-rc branch
  • Loading branch information
taion committed Aug 26, 2015
2 parents 4a8129c + b8e8615 commit 757aa97
Show file tree
Hide file tree
Showing 131 changed files with 3,774 additions and 3,604 deletions.
2 changes: 2 additions & 0 deletions .ackrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--ignore-dir=.coverage
--ignore-dir=lib
--ignore-dir=dist
--ignore-dir=amd
Expand All @@ -7,3 +8,4 @@
--ignore-dir=tmp-bower-repo
--ignore-file=match:test_bundle.js
--ignore-file=match:components.html
--ignore-file=match:.orig
29 changes: 26 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["defaults"],
"extends": ["eslint-config-airbnb"],
"env": {
"browser": true,
"node": true
Expand All @@ -13,31 +13,54 @@
"babel"
],
"rules": {
"brace-style": 0,
"constructor-super": 2,
"comma-dangle": 0,
"comma-spacing": 2,
"comma-style": [2, "last"],
"default-case": 0,
"func-names": 0,
"guard-for-in": 0,
"indent": 0,
"one-var": [2, { "initialized": "never" }],
"padded-blocks": 0,
"prefer-const": 0,
"key-spacing": 0,
"no-eq-null": 0,
"no-else-return": 0,
"no-multiple-empty-lines": 0,
"no-nested-ternary": 0,
"no-param-reassign": 0,
"no-this-before-super": 2,
"no-throw-literal": 0,
"no-underscore-dangle": 0,
"no-undef": 2,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-use-before-define": 0,
"no-var": 2,
"babel/object-shorthand": 2,
"quotes": [2, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-boolean-value": [2, "never"],
"react/jsx-quotes": 0,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 2,
"react/prop-types": [2, { "ignore": [ "children", "className" ] }],
"react/prop-types": [2, { "ignore": [ "children", "className", "style" ] }],
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 0,
"react/wrap-multilines": 2,
"react/jsx-uses-vars": 2,
"space-after-keywords": 0,
"space-before-blocks": 0,
"space-before-function-paren": 0,
"space-infix-ops": 2,
"strict": [2, "never"]
"spaced-comment": 0,
"strict": [2, "never"],
"vars-on-top": 0
}
}
4 changes: 4 additions & 0 deletions .projections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"src/*.js": { "alternate": "test/{}Spec.js" },
"test/*Spec.js": { "alternate": "src/{}.js" }
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
v0.25.0 - Tue, 25 Aug 2015 18:56:33 GMT
---------------------------------------

- [8776128](../../commit/8776128) [fixed] Affix in IE10 - scrollHeight #1073
- [adad32e](../../commit/adad32e) [added] PropType validation for headerRole and panelRole
- [346501e](../../commit/346501e) [changed] DropdownButton, SplitButton, DropdownMenu, MenuItem completely rewritten
- [653d2ff](../../commit/653d2ff) [changed] deprecate domUtils as a public API
- [769781d](../../commit/769781d) [added] accessibility props for PanelGroup and Panels.
- [5f0ac64](../../commit/5f0ac64) [added] Implements a generalized left-aligned version of tabs
- [628d586](../../commit/628d586) [changed] deprecated Position, Transition, Portal
- [03a6a61](../../commit/03a6a61) [changed] deprecated the Transition duration prop
- [459ab0c](../../commit/459ab0c) [added] #460 ListGroupItem outputs <button> when an onClick handler is set.
- [e482ede](../../commit/e482ede) [fixed] wrong tabs switching animation for 'Tabs' component
- [b62e1f5](../../commit/b62e1f5) [fixed] wrong tabs switching animation for 'TabbedArea' component
- [d0ff625](../../commit/d0ff625) [added] aria role "tablist" to the Nav on Tabs
- [e7cf455](../../commit/e7cf455) [changed] New Tabs API
- [f6d32c4](../../commit/f6d32c4) [changed] deprecate 'utils/CustomPropTypes' exporting
- [caff9a0](../../commit/caff9a0) [removed] Factory support



v0.24.5 - Fri, 14 Aug 2015 18:02:13 GMT
---------------------------------------

- [dc2a07a](../../commit/dc2a07a) [fixed] Collapse exported as Fade
- [f53bcf5](../../commit/f53bcf5) [fixed] 'bsSize' and 'bsStyle' properties has been removed from 'Glyphicon'



v0.24.4 - Mon, 10 Aug 2015 19:33:35 GMT
---------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions docs/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"plugins": [
"lodash"
],
"rules": {
"comma-spacing": 0,
"lodash/import": 2,
"react/no-multi-comp": 0,
"react/prop-types": 0
},
Expand Down
35 changes: 34 additions & 1 deletion docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ body {
}
}

.navbar>.container .navbar-brand, .navbar>.container-fluid .navbar-brand {
.bs-docs-nav .navbar-brand {
color: #00d8ff;
}

Expand Down Expand Up @@ -173,6 +173,29 @@ body {

}

.bs-example .super-colors {
background: -moz-linear-gradient( top ,
rgba(255, 0, 0, 1) 0%,
rgba(255, 255, 0, 1) 15%,
rgba(0, 255, 0, 1) 30%,
rgba(0, 255, 255, 1) 50%,
rgba(0, 0, 255, 1) 65%,
rgba(255, 0, 255, 1) 80%,
rgba(255, 0, 0, 1) 100%);
background: -webkit-gradient(linear, left top, left bottom,
color-stop(0%, rgba(255, 0, 0, 1)),
color-stop(15%, rgba(255, 255, 0, 1)),
color-stop(30%, rgba(0, 255, 0, 1)),
color-stop(50%, rgba(0, 255, 255, 1)),
color-stop(65%, rgba(0, 0, 255, 1)),
color-stop(80%, rgba(255, 0, 255, 1)),
color-stop(100%, rgba(255, 0, 0, 1)));
}

/*.bs-example .custom-menu > ul > li {
padding: 0 20px;
}*/

.anchor,
.anchor:hover,
.anchor:active,
Expand All @@ -199,3 +222,13 @@ h4:hover .anchor-icon,
h4 a:focus .anchor-icon {
opacity: 0.5;
}

.prop-desc pre {
border-radius: 0;
border-width: 0;
border-left-width: 3px;
}

.prop-desc-heading {
margin-bottom: 10px;
}
4 changes: 2 additions & 2 deletions docs/dev-run
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ portfinder.getPorts(2, {}, (portFinderErr, [docsPort, webpackPort]) => {
process.exit(1);
}

runCmd('webpack-dev-server', `nodemon --watch webpack --watch webpack.docs.js --watch node_modules --exec webpack-dev-server -- --config webpack.docs.js --color --port ${webpackPort} --debug --hot --host ${ip.address()}`);
runCmd('webpack-dev-server', `nodemon --watch webpack --watch webpack.docs.js --exec webpack-dev-server -- --config webpack.docs.js --color --port ${webpackPort} --debug --hot --host ${ip.address()}`);

runCmd('docs-server', 'nodemon --watch docs --watch src --watch node_modules --exec babel-node docs/server.js', {
runCmd('docs-server', 'nodemon --watch docs --watch src --exec babel-node docs/server.js', {
env: {
PORT: docsPort,
WEBPACK_DEV_PORT: webpackPort,
Expand Down
9 changes: 5 additions & 4 deletions docs/examples/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"Carousel",
"CarouselItem",
"Col",
"Dropdown",
"DropdownButton",
"DropdownMenu",
"FormControls",
"Glyphicon",
"Grid",
Expand All @@ -30,12 +32,11 @@
"ListGroupItem",
"Nav",
"Navbar",
"NavDropdown",
"NavItem",
"MenuItem",
"Modal",
"ModalTrigger",
"OverlayTrigger",
"OverlayMixin",
"Overlay",
"PageHeader",
"PageItem",
Expand All @@ -47,9 +48,9 @@
"ProgressBar",
"Row",
"SplitButton",
"TabbedArea",
"Tab",
"Table",
"TabPane",
"Tabs",
"Tooltip",
"Well",
"Thumbnail",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ButtonGroupJustified.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const buttonGroupInstance = (
<ButtonGroup justified>
<Button href='#'>Left</Button>
<Button href='#'>Middle</Button>
<DropdownButton title='Dropdown'>
<DropdownButton title='Dropdown' id='bg-justified-dropdown'>
<MenuItem eventKey='1'>Dropdown link</MenuItem>
<MenuItem eventKey='2'>Dropdown link</MenuItem>
</DropdownButton>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ButtonGroupNested.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const buttonGroupInstance = (
<ButtonGroup>
<Button>1</Button>
<Button>2</Button>
<DropdownButton title='Dropdown'>
<DropdownButton title='Dropdown' id='bg-nested-dropdown'>
<MenuItem eventKey='1'>Dropdown link</MenuItem>
<MenuItem eventKey='2'>Dropdown link</MenuItem>
</DropdownButton>
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/ButtonGroupVertical.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ const buttonGroupInstance = (
<ButtonGroup vertical>
<Button>Button</Button>
<Button>Button</Button>
<DropdownButton title='Dropdown'>
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-1'>
<MenuItem eventKey='1'>Dropdown link</MenuItem>
<MenuItem eventKey='2'>Dropdown link</MenuItem>
</DropdownButton>
<Button>Button</Button>
<Button>Button</Button>
<DropdownButton title='Dropdown'>
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-2'>
<MenuItem eventKey='1'>Dropdown link</MenuItem>
<MenuItem eventKey='2'>Dropdown link</MenuItem>
</DropdownButton>
<DropdownButton title='Dropdown'>
<DropdownButton title='Dropdown' id='bg-vertical-dropdown-3'>
<MenuItem eventKey='1'>Dropdown link</MenuItem>
<MenuItem eventKey='2'>Dropdown link</MenuItem>
</DropdownButton>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/CollapsibleNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const navbarInstance = (
<Nav navbar>
<NavItem eventKey={1} href='#'>Link</NavItem>
<NavItem eventKey={2} href='#'>Link</NavItem>
<DropdownButton eventKey={3} title='Dropdown'>
<NavDropdown eventKey={3} title='Dropdown' id='collapsible-nav-dropdown'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3'>Something else here</MenuItem>
<MenuItem divider />
<MenuItem eventKey='4'>Separated link</MenuItem>
</DropdownButton>
</NavDropdown>
</Nav>
<Nav navbar right>
<NavItem eventKey={1} href='#'>Link Right</NavItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/DropdownButtonBasic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const BUTTONS = ['Default', 'Primary', 'Success', 'Info', 'Warning', 'Danger', '

function renderDropdownButton (title, i) {
return (
<DropdownButton bsStyle={title.toLowerCase()} title={title} key={i}>
<DropdownButton bsStyle={title.toLowerCase()} title={title} key={i} id={`dropdown-basic-${i}`}>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3' active>Active Item</MenuItem>
Expand Down
35 changes: 35 additions & 0 deletions docs/examples/DropdownButtonCustom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

const dropdownInstance = (
<ButtonToolbar>
<Dropdown id='dropdown-custom-1'>
<Dropdown.Toggle>
<Glyphicon glyph='star' />
Pow! Zoom!
</Dropdown.Toggle>
<Dropdown.Menu className='super-colors'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3' active>Active Item</MenuItem>
<MenuItem divider />
<MenuItem eventKey='4'>Separated link</MenuItem>
</Dropdown.Menu>
</Dropdown>

<Dropdown id='dropdown-custom-2'>
<Button bsStyle='info'>
mix it up style-wise
</Button>
<Dropdown.Toggle bsStyle='success'/>
<Dropdown.Menu className='super-colors'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3' active>Active Item</MenuItem>
<MenuItem divider />
<MenuItem eventKey='4'>Separated link</MenuItem>
</Dropdown.Menu>
</Dropdown>

</ButtonToolbar>
);

React.render(dropdownInstance, mountNode);
75 changes: 75 additions & 0 deletions docs/examples/DropdownButtonCustomMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

class CustomMenu extends React.Component {

constructor(...args){
super(...args);
this.state = { value: '' };
this.onChange = e => this.setState({ value: e.target.value });
}

render(){
let { className, ...props } = this.props;

return (
<div
className={'dropdown-menu'}
style={{ padding: '5px 10px'}}
>
<input
ref={input => this.input = input}
type='text'
className='form-control'
placeholder='type to filter...'
onChange={this.onChange}
value={this.state.value}
/>
<ul className='list-unstyled'>
{ this.filterChildren() }
</ul>
</div>
);
}

filterChildren(){
let { children } = this.props;
let { value } = this.state;
let filtered = [];

let matches = child => child.props.children.indexOf(value) !== -1;

React.Children.forEach(children, child => {
if (!value.trim() || matches(child)) {
filtered.push(child);
}
});

return filtered;
}

focusNext() {
let input = React.findDOMNode(this.input);

if (input) {
input.focus();
}
}
}

let preventDefault = e => e.preventDefault();

let dropdownExample = (
<Dropdown id='dropdown-custom-menu'>
<a href='#' bsRole='toggle' onClick={preventDefault}>
custom Toggle
</a>

<CustomMenu bsRole='menu'>
<MenuItem eventKey='1'>Red</MenuItem>
<MenuItem eventKey='2'>Blue</MenuItem>
<MenuItem eventKey='3' active>Orange</MenuItem>
<MenuItem eventKey='1'>Red-Orange</MenuItem>
</CustomMenu>
</Dropdown>
);

React.render(dropdownExample, mountNode);
Loading

0 comments on commit 757aa97

Please sign in to comment.