Skip to content

Commit 3d4ef1b

Browse files
committed
first commit
0 parents  commit 3d4ef1b

26 files changed

+1279
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*.{js,css}]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*.iml
2+
*.log
3+
.idea/
4+
.ipr
5+
.iws
6+
*~
7+
~*
8+
*.diff
9+
*.patch
10+
*.bak
11+
.DS_Store
12+
Thumbs.db
13+
.project
14+
.*proj
15+
.svn/
16+
*.swp
17+
*.swo
18+
*.pyc
19+
*.pyo
20+
.build
21+
node_modules
22+
_site
23+
sea-modules
24+
spm_modules
25+
.cache
26+
dist
27+
assets/**/*.css

.jscsrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
3+
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
4+
"requireSpacesInFunctionExpression": {
5+
"beforeOpeningCurlyBrace": true
6+
},
7+
"disallowSpacesInsideArrayBrackets": true,
8+
"disallowSpacesInsideObjectBrackets": true,
9+
"disallowSpacesInsideParentheses": true,
10+
"disallowQuotedKeysInObjects": "allButReserved",
11+
"disallowSpaceAfterObjectKeys": true,
12+
"requireSpaceBeforeBinaryOperators": ["-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ],
13+
"requireSpacesInConditionalExpression": {
14+
"afterTest": true,
15+
"beforeConsequent": true,
16+
"afterConsequent": true,
17+
"beforeAlternate": true
18+
},
19+
"requireSpaceAfterBinaryOperators": ["/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
20+
"disallowKeywords": [ "with" ],
21+
"disallowSpaceAfterPrefixUnaryOperators": [ "!" , "++", "--", "+", "-", "~"],
22+
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--", ","],
23+
"disallowMultipleLineBreaks": true,
24+
"disallowKeywordsOnNewLine": ["else"],
25+
"safeContextKeyword": "self",
26+
"excludeFiles": ["lib/**/parser.js"]
27+
}

.jshintrc

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"camelcase": true,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"freeze": true,
6+
"indent": 4,
7+
"latedef": "nofunc",
8+
"quotmark": "false",
9+
"nonew": true,
10+
"newcap": false,
11+
"immed": true,
12+
"noarg": true,
13+
"eqnull": true,
14+
"trailing": true,
15+
"undef": true,
16+
"unused": true,
17+
"browser": true,
18+
"node": true,
19+
"esnext": true,
20+
"globals": {
21+
"describe": false,
22+
"expect": false,
23+
"beforeEach": false,
24+
"afterEach": false,
25+
"modulex": false,
26+
"it": false
27+
}
28+
}

.npmignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
bower_components/
2+
*.cfg
3+
node_modules/
4+
nohup.out
5+
*.iml
6+
.idea/
7+
.ipr
8+
.iws
9+
*~
10+
~*
11+
*.diff
12+
*.log
13+
*.patch
14+
*.bak
15+
.DS_Store
16+
Thumbs.db
17+
.project
18+
.*proj
19+
.svn/
20+
*.swp
21+
out/
22+
.build
23+
node_modules
24+
_site
25+
sea-modules
26+
spm_modules
27+
.cache
28+
dist

.spmignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
bower_components/
2+
node_modules/
3+
nohup.out
4+
*.iml
5+
.idea/
6+
.ipr
7+
.iws
8+
*~
9+
~*
10+
*.diff
11+
*.log
12+
*.patch
13+
*.bak
14+
.DS_Store
15+
Thumbs.db
16+
.project
17+
.*proj
18+
.svn/
19+
*.swp
20+
out/
21+
.build
22+
_site
23+
sea-modules
24+
spm_modules
25+
.cache
26+
dist
27+
assets/**/*.less
28+
tests/
29+
examples/

.travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
notifications:
3+
email:
4+
5+
node_js:
6+
- 0.11
7+
before_script:
8+
- npm start &
9+
- npm install mocha-phantomjs -g
10+
- phantomjs --version
11+
script:
12+
- npm test
13+
- npm run-script browser-test
14+
- npm run-script browser-test-cover

HISTORY.md

Whitespace-only changes.

README.md

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# rc-select
2+
---
3+
4+
select ui component for react
5+
6+
[![NPM version][npm-image]][npm-url]
7+
[![SPM version](http://spmjs.io/badge/rc-select)](http://spmjs.io/package/rc-select)
8+
[![build status][travis-image]][travis-url]
9+
[![Test coverage][coveralls-image]][coveralls-url]
10+
[![gemnasium deps][gemnasium-image]][gemnasium-url]
11+
[![node version][node-image]][node-url]
12+
[![npm download][download-image]][download-url]
13+
[![Sauce Test Status](https://saucelabs.com/buildstatus/rc-select)](https://saucelabs.com/u/rc-select)
14+
15+
[![Sauce Test Status](https://saucelabs.com/browser-matrix/rc-select.svg)](https://saucelabs.com/u/rc-select)
16+
17+
[npm-image]: http://img.shields.io/npm/v/rc-select.svg?style=flat-square
18+
[npm-url]: http://npmjs.org/package/rc-select
19+
[travis-image]: https://img.shields.io/travis/react-component/select.svg?style=flat-square
20+
[travis-url]: https://travis-ci.org/react-component/select
21+
[coveralls-image]: https://img.shields.io/coveralls/react-component/select.svg?style=flat-square
22+
[coveralls-url]: https://coveralls.io/r/react-component/select?branch=master
23+
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/select.svg?style=flat-square
24+
[gemnasium-url]: https://gemnasium.com/react-component/select
25+
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
26+
[node-url]: http://nodejs.org/download/
27+
[download-image]: https://img.shields.io/npm/dm/rc-select.svg?style=flat-square
28+
[download-url]: https://npmjs.org/package/rc-select
29+
30+
## Screenshots
31+
32+
<img src="" width="288"/>
33+
34+
35+
## Feature
36+
37+
* support ie8,ie8+,chrome,firefox,safari
38+
39+
### Keyboard
40+
41+
* Open select (focus input || focus and click)
42+
* Previous item (PageUp)
43+
* Next item (PageDown)
44+
45+
46+
## install
47+
48+
[![rc-select](https://nodei.co/npm/rc-select.png)](https://npmjs.org/package/rc-select)
49+
50+
## Usage
51+
52+
```js
53+
var React = require('react');
54+
var Select = require('../');
55+
var Option = Select.Option;
56+
57+
var c = (
58+
<Select>
59+
<Option value="1">jack</Option>
60+
<Option value="2">lucy</Option>
61+
<Option value="3">jim</Option>
62+
</Select>
63+
);
64+
React.render(c, container);
65+
```
66+
67+
## API
68+
69+
### Select props
70+
71+
<table class="table table-bordered table-striped">
72+
<thead>
73+
<tr>
74+
<th style="width: 100px;">name</th>
75+
<th style="width: 50px;">type</th>
76+
<th style="width: 50px;">default</th>
77+
<th>description</th>
78+
</tr>
79+
</thead>
80+
<tbody>
81+
<tr>
82+
<td>className</td>
83+
<td>String</td>
84+
<td></td>
85+
<td>additional css class of root dom node</td>
86+
</tr>
87+
</tbody>
88+
</table>
89+
90+
### Option props
91+
92+
<table class="table table-bordered table-striped">
93+
<thead>
94+
<tr>
95+
<th style="width: 100px;">name</th>
96+
<th style="width: 50px;">type</th>
97+
<th style="width: 50px;">default</th>
98+
<th>description</th>
99+
</tr>
100+
</thead>
101+
<tbody>
102+
<tr>
103+
<td>className</td>
104+
<td>String</td>
105+
<td></td>
106+
<td>additional css class of root dom node</td>
107+
</tr>
108+
<tr>
109+
<td>onSelect</td>
110+
<td>Function(key:String)</td>
111+
<th></th>
112+
<td>function called with selected menu item's key as param</td>
113+
</tr>
114+
</tbody>
115+
</table>
116+
117+
118+
online docs: http://spmjs.io/docs/rc-select/
119+
120+
## Development
121+
122+
```
123+
npm install
124+
npm start
125+
```
126+
127+
## Example
128+
129+
http://localhost:8003/examples/index.md
130+
131+
online example: http://spmjs.io/docs/rc-select/examples/
132+
133+
## Test Case
134+
135+
http://localhost:8003/tests/runner.html?coverage
136+
137+
## Coverage
138+
139+
http://localhost:8003/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8003/tests/runner.html?coverage
140+
141+
## License
142+
143+
rc-select is released under the MIT license.

0 commit comments

Comments
 (0)