Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1212 from taion/merge-v0.25
Browse files Browse the repository at this point in the history
Merge v0.25
  • Loading branch information
jquense committed Aug 25, 2015
2 parents 5455c94 + 877eb1f commit ee9d9ba
Show file tree
Hide file tree
Showing 98 changed files with 3,462 additions and 3,263 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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"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,
Expand Down
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" }
}
16 changes: 16 additions & 0 deletions CHANGELOG-alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
v0.25.0-alpha.1 - Mon, 10 Aug 2015 19:41:20 GMT
-----------------------------------------------

- [b688014](../../commit/b688014) [added] custom feedback icons for Input
- [83cdaa3](../../commit/83cdaa3) [added] formControlFeedback prop to Glyphicon
- [2ecac68](../../commit/2ecac68) [fixed] Modal uses provided className again
- [47bd7f6](../../commit/47bd7f6) [fixed] disabled pagination buttons should not fire 'onSelect'
- [c60dc03](../../commit/c60dc03) [fixed] only add aria-expanded to Collapse when an ARIA role is present



v0.25.0-alpha.0 - Fri, 31 Jul 2015 19:37:39 GMT
-----------------------------------------------

- [f6d32c4](../../commit/f6d32c4) [changed] deprecate 'utils/CustomPropTypes' exporting
- [caff9a0](../../commit/caff9a0) [removed] Factory support
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;
}
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);
2 changes: 1 addition & 1 deletion docs/examples/DropdownButtonNoCaret.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const buttonInstance = (
<ButtonToolbar>
<DropdownButton bsStyle='default' title='No caret' noCaret>
<DropdownButton bsStyle='default' title='No caret' noCaret id='dropdown-no-caret'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3'>Something else here</MenuItem>
Expand Down
16 changes: 13 additions & 3 deletions docs/examples/DropdownButtonSizes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const buttonsInstance = (
<div>
<ButtonToolbar>
<DropdownButton bsSize='large' title='Large button'>
<DropdownButton bsSize='large' title='Large button' id='dropdown-size-large'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3'>Something else here</MenuItem>
Expand All @@ -11,7 +11,7 @@ const buttonsInstance = (
</ButtonToolbar>

<ButtonToolbar>
<DropdownButton bsSize='small' title='Small button'>
<DropdownButton bsSize='medium' title='Small button' id='dropdown-size-medium'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3'>Something else here</MenuItem>
Expand All @@ -21,7 +21,17 @@ const buttonsInstance = (
</ButtonToolbar>

<ButtonToolbar>
<DropdownButton bsSize='xsmall' title='Extra small button'>
<DropdownButton bsSize='small' title='Small button' id='dropdown-size-small'>
<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>
</ButtonToolbar>

<ButtonToolbar>
<DropdownButton bsSize='xsmall' title='Extra small button' id='dropdown-size-extra-small'>
<MenuItem eventKey='1'>Action</MenuItem>
<MenuItem eventKey='2'>Another action</MenuItem>
<MenuItem eventKey='3'>Something else here</MenuItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/InputAddons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const innerGlyphicon = <Glyphicon glyph='music' />;
const innerButton = <Button>Before</Button>;
const innerDropdown = (
<DropdownButton title='Action'>
<DropdownButton title='Action' id='input-dropdown-addon'>
<MenuItem key='1'>Item</MenuItem>
</DropdownButton>
);
Expand Down
9 changes: 9 additions & 0 deletions docs/examples/LeftTabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const tabsInstance = (
<Tabs defaultActiveKey={2} position='left' tabWidth={3}>
<Tab eventKey={1} title='Tab 1'>Tab 1 content</Tab>
<Tab eventKey={2} title='Tab 2'>Tab 2 content</Tab>
<Tab eventKey={3} title='Tab 3' disabled>Tab 3 content</Tab>
</Tabs>
);

React.render(tabsInstance, mountNode);
Loading

0 comments on commit ee9d9ba

Please sign in to comment.