forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request react-bootstrap#1212 from taion/merge-v0.25
Merge v0.25
- Loading branch information
Showing
98 changed files
with
3,462 additions
and
3,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Oops, something went wrong.