forked from react-component/select
-
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.
- Loading branch information
0 parents
commit 3d4ef1b
Showing
26 changed files
with
1,279 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*.{js,css}] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 |
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,27 @@ | ||
*.iml | ||
*.log | ||
.idea/ | ||
.ipr | ||
.iws | ||
*~ | ||
~* | ||
*.diff | ||
*.patch | ||
*.bak | ||
.DS_Store | ||
Thumbs.db | ||
.project | ||
.*proj | ||
.svn/ | ||
*.swp | ||
*.swo | ||
*.pyc | ||
*.pyo | ||
.build | ||
node_modules | ||
_site | ||
sea-modules | ||
spm_modules | ||
.cache | ||
dist | ||
assets/**/*.css |
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,27 @@ | ||
{ | ||
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], | ||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], | ||
"requireSpacesInFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInsideArrayBrackets": true, | ||
"disallowSpacesInsideObjectBrackets": true, | ||
"disallowSpacesInsideParentheses": true, | ||
"disallowQuotedKeysInObjects": "allButReserved", | ||
"disallowSpaceAfterObjectKeys": true, | ||
"requireSpaceBeforeBinaryOperators": ["-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ], | ||
"requireSpacesInConditionalExpression": { | ||
"afterTest": true, | ||
"beforeConsequent": true, | ||
"afterConsequent": true, | ||
"beforeAlternate": true | ||
}, | ||
"requireSpaceAfterBinaryOperators": ["/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], | ||
"disallowKeywords": [ "with" ], | ||
"disallowSpaceAfterPrefixUnaryOperators": [ "!" , "++", "--", "+", "-", "~"], | ||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--", ","], | ||
"disallowMultipleLineBreaks": true, | ||
"disallowKeywordsOnNewLine": ["else"], | ||
"safeContextKeyword": "self", | ||
"excludeFiles": ["lib/**/parser.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,28 @@ | ||
{ | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"freeze": true, | ||
"indent": 4, | ||
"latedef": "nofunc", | ||
"quotmark": "false", | ||
"nonew": true, | ||
"newcap": false, | ||
"immed": true, | ||
"noarg": true, | ||
"eqnull": true, | ||
"trailing": true, | ||
"undef": true, | ||
"unused": true, | ||
"browser": true, | ||
"node": true, | ||
"esnext": true, | ||
"globals": { | ||
"describe": false, | ||
"expect": false, | ||
"beforeEach": false, | ||
"afterEach": false, | ||
"modulex": false, | ||
"it": false | ||
} | ||
} |
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,28 @@ | ||
bower_components/ | ||
*.cfg | ||
node_modules/ | ||
nohup.out | ||
*.iml | ||
.idea/ | ||
.ipr | ||
.iws | ||
*~ | ||
~* | ||
*.diff | ||
*.log | ||
*.patch | ||
*.bak | ||
.DS_Store | ||
Thumbs.db | ||
.project | ||
.*proj | ||
.svn/ | ||
*.swp | ||
out/ | ||
.build | ||
node_modules | ||
_site | ||
sea-modules | ||
spm_modules | ||
.cache | ||
dist |
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,29 @@ | ||
bower_components/ | ||
node_modules/ | ||
nohup.out | ||
*.iml | ||
.idea/ | ||
.ipr | ||
.iws | ||
*~ | ||
~* | ||
*.diff | ||
*.log | ||
*.patch | ||
*.bak | ||
.DS_Store | ||
Thumbs.db | ||
.project | ||
.*proj | ||
.svn/ | ||
*.swp | ||
out/ | ||
.build | ||
_site | ||
sea-modules | ||
spm_modules | ||
.cache | ||
dist | ||
assets/**/*.less | ||
tests/ | ||
examples/ |
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,14 @@ | ||
language: node_js | ||
notifications: | ||
email: | ||
- [email protected] | ||
node_js: | ||
- 0.11 | ||
before_script: | ||
- npm start & | ||
- npm install mocha-phantomjs -g | ||
- phantomjs --version | ||
script: | ||
- npm test | ||
- npm run-script browser-test | ||
- npm run-script browser-test-cover |
Empty file.
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,143 @@ | ||
# rc-select | ||
--- | ||
|
||
select ui component for react | ||
|
||
[![NPM version][npm-image]][npm-url] | ||
[![SPM version](http://spmjs.io/badge/rc-select)](http://spmjs.io/package/rc-select) | ||
[![build status][travis-image]][travis-url] | ||
[![Test coverage][coveralls-image]][coveralls-url] | ||
[![gemnasium deps][gemnasium-image]][gemnasium-url] | ||
[![node version][node-image]][node-url] | ||
[![npm download][download-image]][download-url] | ||
[![Sauce Test Status](https://saucelabs.com/buildstatus/rc-select)](https://saucelabs.com/u/rc-select) | ||
|
||
[![Sauce Test Status](https://saucelabs.com/browser-matrix/rc-select.svg)](https://saucelabs.com/u/rc-select) | ||
|
||
[npm-image]: http://img.shields.io/npm/v/rc-select.svg?style=flat-square | ||
[npm-url]: http://npmjs.org/package/rc-select | ||
[travis-image]: https://img.shields.io/travis/react-component/select.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/react-component/select | ||
[coveralls-image]: https://img.shields.io/coveralls/react-component/select.svg?style=flat-square | ||
[coveralls-url]: https://coveralls.io/r/react-component/select?branch=master | ||
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/select.svg?style=flat-square | ||
[gemnasium-url]: https://gemnasium.com/react-component/select | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
[download-image]: https://img.shields.io/npm/dm/rc-select.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/rc-select | ||
|
||
## Screenshots | ||
|
||
<img src="" width="288"/> | ||
|
||
|
||
## Feature | ||
|
||
* support ie8,ie8+,chrome,firefox,safari | ||
|
||
### Keyboard | ||
|
||
* Open select (focus input || focus and click) | ||
* Previous item (PageUp) | ||
* Next item (PageDown) | ||
|
||
|
||
## install | ||
|
||
[![rc-select](https://nodei.co/npm/rc-select.png)](https://npmjs.org/package/rc-select) | ||
|
||
## Usage | ||
|
||
```js | ||
var React = require('react'); | ||
var Select = require('../'); | ||
var Option = Select.Option; | ||
|
||
var c = ( | ||
<Select> | ||
<Option value="1">jack</Option> | ||
<Option value="2">lucy</Option> | ||
<Option value="3">jim</Option> | ||
</Select> | ||
); | ||
React.render(c, container); | ||
``` | ||
|
||
## API | ||
|
||
### Select props | ||
|
||
<table class="table table-bordered table-striped"> | ||
<thead> | ||
<tr> | ||
<th style="width: 100px;">name</th> | ||
<th style="width: 50px;">type</th> | ||
<th style="width: 50px;">default</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>className</td> | ||
<td>String</td> | ||
<td></td> | ||
<td>additional css class of root dom node</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
### Option props | ||
|
||
<table class="table table-bordered table-striped"> | ||
<thead> | ||
<tr> | ||
<th style="width: 100px;">name</th> | ||
<th style="width: 50px;">type</th> | ||
<th style="width: 50px;">default</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>className</td> | ||
<td>String</td> | ||
<td></td> | ||
<td>additional css class of root dom node</td> | ||
</tr> | ||
<tr> | ||
<td>onSelect</td> | ||
<td>Function(key:String)</td> | ||
<th></th> | ||
<td>function called with selected menu item's key as param</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
|
||
online docs: http://spmjs.io/docs/rc-select/ | ||
|
||
## Development | ||
|
||
``` | ||
npm install | ||
npm start | ||
``` | ||
|
||
## Example | ||
|
||
http://localhost:8003/examples/index.md | ||
|
||
online example: http://spmjs.io/docs/rc-select/examples/ | ||
|
||
## Test Case | ||
|
||
http://localhost:8003/tests/runner.html?coverage | ||
|
||
## Coverage | ||
|
||
http://localhost:8003/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8003/tests/runner.html?coverage | ||
|
||
## License | ||
|
||
rc-select is released under the MIT license. |
Oops, something went wrong.