├── .gitignore ├── README.md ├── bower.json ├── demo └── index.html ├── index.html ├── s-circle-progress.html └── test └── s-circle-progress_test.html /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Published on webcomponents.org][webcomponents-image]][webcomponents-url] 2 | 3 | # \ 4 | 5 | Polymer-based web component displaying a circular progress bar. 6 | 7 | Inspired by element [\](https://github.com/tehapo/progress-bubble). 8 | 9 | ## Demo 10 | 11 | [Full demo][webcomponents-demo] 12 | 13 | ## Usage 14 | 15 | 26 | ```html 27 | 28 | 60% 29 | 30 | 31 | 32 | 30s 33 | 34 | ``` 35 | 36 | ### Styling 37 | 38 | The following custom properties and mixins are available for styling: 39 | 40 | Custom property | Description | Default 41 | ----------------|-------------|---------- 42 | `--s-circle-progress-bg-stroke-color` | The background color of the circle | `--paper-grey-100` 43 | `--s-circle-progress-stroke-color` | The stroke color of the circle | `--accent-color` 44 | `--s-circle-progress-stroke-linecap` | The stroke-linecap svg attribute of the circle | `round` 45 | 46 | ## Installation 47 | 48 | `bower i s-circle-progress -S` 49 | 50 | ## Install the Polymer-CLI 51 | 52 | First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your application locally. 53 | 54 | ## Viewing Your Application 55 | 56 | ``` 57 | $ polymer serve 58 | ``` 59 | 60 | ## Building Your Application 61 | 62 | ``` 63 | $ polymer build 64 | ``` 65 | 66 | This will create a `build/` folder with `bundled/` and `unbundled/` sub-folders 67 | containing a bundled (Vulcanized) and unbundled builds, both run through HTML, 68 | CSS, and JS optimizers. 69 | 70 | You can serve the built versions by giving `polymer serve` a folder to serve 71 | from: 72 | 73 | ``` 74 | $ polymer serve build/bundled 75 | ``` 76 | 77 | ## Running Tests 78 | 79 | ``` 80 | $ polymer test 81 | ``` 82 | 83 | Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally. 84 | 85 | ## License 86 | 87 | MIT: [StartPolymer/license](https://github.com/StartPolymer/license) 88 | 89 | [webcomponents-image]: https://img.shields.io/badge/webcomponents.org-published-blue.svg 90 | [webcomponents-url]: https://beta.webcomponents.org/element/StartPolymer/s-circle-progress 91 | [webcomponents-demo]: https://beta.webcomponents.org/element/StartPolymer/s-circle-progress/demo/demo/index.html 92 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "s-circle-progress", 3 | "description": "Polymer-based web component displaying a circular progress bar.", 4 | "authors": [ 5 | "The StartPolymer Project Authors (https://github.com/StartPolymer/authors)" 6 | ], 7 | "license": "MIT", 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "circle", 12 | "progress" 13 | ], 14 | "main": "s-circle-progress.html", 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/StartPolymer/s-circle-progress.git" 18 | }, 19 | "dependencies": { 20 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.3.1", 21 | "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.5", 22 | "paper-styles": "PolymerElements/paper-styles#^1.1.5", 23 | "polymer": "Polymer/polymer#^1.4.0" 24 | }, 25 | "devDependencies": { 26 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 27 | "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", 28 | "web-component-tester": "^4.0.0", 29 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | s-circle-progress demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 |
20 |

Basic s-circle-progress demo

21 | 22 | 31 | 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | s-circle-progress 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /s-circle-progress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 72 | 175 | 176 | -------------------------------------------------------------------------------- /test/s-circle-progress_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | s-circle-progress test 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 29 | 30 | 31 | --------------------------------------------------------------------------------