Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
demo
build
.happypack
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"plugins": [
"react"
],
Expand All @@ -11,6 +12,7 @@
"rules": {
"react/no-unused-prop-types": "off",
"react/forbid-prop-types": "off",
"react/prefer-stateless-function": "off",
"import/no-extraneous-dependencies": "off",
"jsx-a11y/label-has-for": "off",
"no-plusplus": [
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "style/kuma-base"]
path = style/kuma-base
url = git@github.com:uxcore/kuma-base.git
37 changes: 28 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
---
## uxcore-progress

## uxcore-progress [![Dependency Status](http://img.shields.io/david/uxcore/uxcore-progress.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-progress) [![devDependency Status](http://img.shields.io/david/dev/uxcore/uxcore-progress.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-progress#info=devDependencies)
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Dependency Status][dep-image]][dep-url]
[![devDependency Status][devdep-image]][devdep-url]
[![NPM downloads][downloads-image]][npm-url]

## TL;DR
[![Sauce Test Status][sauce-image]][sauce-url]

[npm-image]: http://img.shields.io/npm/v/uxcore-progress.svg?style=flat-square
[npm-url]: http://npmjs.org/package/uxcore-progress
[travis-image]: https://img.shields.io/travis/uxcore/uxcore-progress.svg?style=flat-square
[travis-url]: https://travis-ci.org/uxcore/uxcore-progress
[coveralls-image]: https://img.shields.io/coveralls/uxcore/uxcore-progress.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/uxcore/uxcore-progress?branch=master
[dep-image]: http://img.shields.io/david/uxcore/uxcore-progress.svg?style=flat-square
[dep-url]: https://david-dm.org/uxcore/uxcore-progress
[devdep-image]: http://img.shields.io/david/dev/uxcore/uxcore-progress.svg?style=flat-square
[devdep-url]: https://david-dm.org/uxcore/uxcore-progress#info=devDependencies
[downloads-image]: https://img.shields.io/npm/dm/uxcore-progress.svg
[sauce-image]: https://saucelabs.com/browser-matrix/uxcore-progress.svg
[sauce-url]: https://saucelabs.com/u/uxcore

uxcore-progress ui component for react

#### setup develop environment

```sh
$ git clone https://github.com/uxcore/uxcore-progress
$ cd uxcore-progress
$ npm install
$ gulp server
$ npm start
```

## Usage
```js
import {Line, Circle} from 'uxcore-progress';
ReactDOM.render(<Progress percent={30} />, target);
ReactDOM.render(<Line percent={30} />, target);
ReactDOM.render(<Circle status="active" />, target);
```

## demo
http://uxcore.github.io/uxcore/components/progress/
http://uxco.re/components/progress/

## API

Expand All @@ -34,7 +53,7 @@ http://uxcore.github.io/uxcore/components/progress/
|---|---|---|---|---|
|percent | 百分比 | number | 0 | |
|status | 状态,有两个值normal、exception、active三种状态 | string | normal | |
|strokeWidth | 进度条线的宽度,单位是px | number | 1 | |
|strokeWidth | 进度条线的宽度,单位是px | number | 10 | |
|showInfo | 是否显示进度数值和状态图标 | bool | true | |

### Circle
Expand All @@ -43,6 +62,6 @@ http://uxcore.github.io/uxcore/components/progress/
|---|---|---|---|---|
|percent | 百分比 | number | 0 | |
|status | 状态,有两个值normal、exception、active三种状态 | string | normal | |
|strokeWidth | 进度条线的宽度,单位是px | number | 1 | |
|strokeWidth | 进度条线的宽度,单位是px | number | 6 | |
|showInfo | 是否显示进度数值和状态图标 | bool | true | |
|size | 尺寸,相当于直径 | number | 156 | |
213 changes: 213 additions & 0 deletions coverage/lcov-report/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}

.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }

.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}

div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}

table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}

table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}

.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }

.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.medium .chart { border:1px solid #f9cd0b; }
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
/* light gray */
span.cline-neutral { background: #eaeaea; }

.cbranch-no { background: yellow !important; color: #111; }

.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }


.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }

.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}
Loading