@polymer/paper-progress
Advanced tools
Comparing version 3.0.0-pre.21 to 3.0.0-pre.22
@@ -16,51 +16,23 @@ { | ||
"devDependencies": { | ||
"@polymer/gen-typescript-declarations": "^1.2.2", | ||
"bower": "^1.8.0", | ||
"webmat": "^0.2.0", | ||
"@polymer/iron-component-page": "^3.0.0-pre.21", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.21", | ||
"@polymer/paper-button": "^3.0.0-pre.21", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.20", | ||
"@polymer/paper-button": "^3.0.0-pre.20", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@webcomponents/webcomponentsjs": "^2.0.0" | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"@polymer/gen-typescript-declarations": "^1.5.0" | ||
}, | ||
"scripts": { | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir .", | ||
"format": "webmat && npm run update-types" | ||
"format": "webmat", | ||
"generate-types": "gen-typescript-declarations --deleteExisting --outDir .", | ||
"prepack": "npm run generate-types" | ||
}, | ||
"version": "3.0.0-pre.21", | ||
"resolutions": { | ||
"inherits": "2.0.3", | ||
"samsam": "1.1.3", | ||
"supports-color": "3.1.2", | ||
"type-detect": "1.0.0", | ||
"@webcomponents/webcomponentsjs": "2.0.0-beta.2" | ||
}, | ||
"version": "3.0.0-pre.22", | ||
"main": "paper-progress.js", | ||
"contributors": [ | ||
"T", | ||
"h", | ||
"e", | ||
" ", | ||
"P", | ||
"o", | ||
"l", | ||
"y", | ||
"m", | ||
"e", | ||
"r", | ||
" ", | ||
"A", | ||
"u", | ||
"t", | ||
"h", | ||
"o", | ||
"r", | ||
"s" | ||
], | ||
"author": "The Polymer Authors", | ||
"dependencies": { | ||
"@polymer/iron-flex-layout": "^3.0.0-pre.21", | ||
"@polymer/iron-range-behavior": "^3.0.0-pre.21", | ||
"@polymer/paper-styles": "^3.0.0-pre.21", | ||
"@polymer/iron-flex-layout": "^3.0.0-pre.20", | ||
"@polymer/iron-range-behavior": "^3.0.0-pre.20", | ||
"@polymer/paper-styles": "^3.0.0-pre.20", | ||
"@polymer/polymer": "^3.0.0" | ||
} | ||
} |
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
This code may only be used under the BSD style license found at | ||
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at | ||
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be | ||
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as | ||
part of the polymer project is also subject to an additional IP rights grant | ||
found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import '@polymer/iron-flex-layout/iron-flex-layout.js'; | ||
import '@polymer/paper-styles/color.js'; | ||
import {IronRangeBehavior} from '@polymer/iron-range-behavior/iron-range-behavior.js'; | ||
import {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import {html} from '@polymer/polymer/lib/utils/html-tag.js'; | ||
/** | ||
Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html) | ||
Material design: [Progress & | ||
activity](https://www.google.com/design/spec/components/progress-activity.html) | ||
@@ -65,33 +75,20 @@ The progress bars are for situations where the percentage completed can be | ||
Custom property | Description | Default | ||
-------------------------------------------------|---------------------------------------------|-------------- | ||
`--paper-progress-container` | Mixin applied to container | `{}` | ||
`--paper-progress-transition-duration` | Duration of the transition | `0.08s` | ||
`--paper-progress-transition-timing-function` | The timing function for the transition | `ease` | ||
`--paper-progress-transition-delay` | delay for the transition | `0s` | ||
`--paper-progress-container-color` | Color of the container | `--google-grey-300` | ||
`--paper-progress-active-color` | The color of the active bar | `--google-green-500` | ||
`--paper-progress-secondary-color` | The color of the secondary bar | `--google-green-100` | ||
`--paper-progress-disabled-active-color` | The color of the active bar if disabled | `--google-grey-500` | ||
`--paper-progress-disabled-secondary-color` | The color of the secondary bar if disabled | `--google-grey-300` | ||
`--paper-progress-height` | The height of the progress bar | `4px` | ||
`--paper-progress-indeterminate-cycle-duration` | Duration of an indeterminate cycle | `2s` | ||
Custom property | Description | Default | ||
----------------|-------------|--------- | ||
`--paper-progress-container` | Mixin applied to container | `{}` | ||
`--paper-progress-transition-duration` | Duration of the transition | `0.08s` | ||
`--paper-progress-transition-timing-function` | The timing function for the transition | `ease` | ||
`--paper-progress-transition-delay` | delay for the transition | `0s` | ||
`--paper-progress-container-color` | Color of the container | `--google-grey-300` | ||
`--paper-progress-active-color` | The color of the active bar | `--google-green-500` | ||
`--paper-progress-secondary-color` | The color of the secondary bar | `--google-green-100` | ||
`--paper-progress-disabled-active-color` | The color of the active bar if disabled | `--google-grey-500` | ||
`--paper-progress-disabled-secondary-color` | The color of the secondary bar if disabled | `--google-grey-300` | ||
`--paper-progress-height` | The height of the progress bar | `4px` | ||
`--paper-progress-indeterminate-cycle-duration` | Duration of an indeterminate cycle | `2s` | ||
@group Paper Elements | ||
@element paper-progress | ||
@hero hero.svg | ||
@demo demo/index.html | ||
*/ | ||
/* | ||
FIXME(polymer-modulizer): the above comments were extracted | ||
from HTML and may be out of place here. Review them and | ||
then delete this comment! | ||
*/ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import '@polymer/iron-flex-layout/iron-flex-layout.js'; | ||
import { IronRangeBehavior } from '@polymer/iron-range-behavior/iron-range-behavior.js'; | ||
import '@polymer/paper-styles/color.js'; | ||
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
Polymer({ | ||
@@ -98,0 +95,0 @@ _template: html` |
104
README.md
@@ -0,49 +1,77 @@ | ||
[![Published on NPM](https://img.shields.io/npm/v/@polymer/paper-progress.svg)](https://www.npmjs.com/package/@polymer/paper-progress) | ||
[![Build status](https://travis-ci.org/PolymerElements/paper-progress.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-progress) | ||
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/PolymerElements/paper-progress) | ||
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/@polymer/paper-progress) | ||
## <paper-progress> | ||
Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html) | ||
The progress bars are for situations where the percentage completed can be | ||
determined. They give users a quick sense of how much longer an operation | ||
will take. | ||
<!--- | ||
There is also a secondary progress which is useful for displaying intermediate | ||
progress, such as the buffer level during a streaming playback progress bar. | ||
See: [Documentation](https://www.webcomponents.org/element/@polymer/paper-progress), | ||
[Demo](https://www.webcomponents.org/element/@polymer/paper-progress/demo/demo/index.html). | ||
## Usage | ||
### Installation | ||
``` | ||
<custom-element-demo> | ||
<template> | ||
<script src="../webcomponentsjs/webcomponents-lite.js"></script> | ||
<link rel="import" href="../paper-styles/color.html"> | ||
<link rel="import" href="paper-progress.html"> | ||
<style is="custom-style"> | ||
paper-progress { | ||
display: block; | ||
width: 100%; | ||
margin: 20px 0; | ||
} | ||
paper-progress.slow { | ||
--paper-progress-indeterminate-cycle-duration: 5s; | ||
} | ||
paper-progress.blue { | ||
--paper-progress-active-color: var(--paper-light-blue-500); | ||
--paper-progress-secondary-color: var(--paper-light-blue-100); | ||
} | ||
paper-progress.red { | ||
--paper-progress-active-color: var(--paper-red-500); | ||
--paper-progress-secondary-color: var(--paper-red-100); | ||
} | ||
</style> | ||
<next-code-block></next-code-block> | ||
</template> | ||
</custom-element-demo> | ||
npm install --save @polymer/paper-progress | ||
``` | ||
--> | ||
### In an html file | ||
```html | ||
<paper-progress indeterminate class="blue"></paper-progress> | ||
<paper-progress indeterminate class="slow red"></paper-progress> | ||
<paper-progress value="40" secondary-progress="80"></paper-progress> | ||
<html> | ||
<head> | ||
<script type="module"> | ||
import '@polymer/paper-progress/paper-progress.js'; | ||
</script> | ||
</head> | ||
<body> | ||
<paper-progress indeterminate class="blue"></paper-progress> | ||
<paper-progress indeterminate class="slow red"></paper-progress> | ||
<paper-progress value="40" secondary-progress="80"></paper-progress> | ||
</body> | ||
</html> | ||
``` | ||
### In a Polymer 3 element | ||
```js | ||
import {PolymerElement, html} from '@polymer/polymer'; | ||
import '@polymer/paper-progress/paper-progress.js'; | ||
The progress bars are for situations where the percentage completed can be | ||
determined. They give users a quick sense of how much longer an operation | ||
will take. | ||
class SampleElement extends PolymerElement { | ||
static get template() { | ||
return html` | ||
<paper-progress indeterminate class="blue"></paper-progress> | ||
<paper-progress indeterminate class="slow red"></paper-progress> | ||
<paper-progress value="40" secondary-progress="80"></paper-progress> | ||
`; | ||
} | ||
} | ||
customElements.define('sample-element', SampleElement); | ||
``` | ||
There is also a secondary progress which is useful for displaying intermediate | ||
progress, such as the buffer level during a streaming playback progress bar. | ||
## Contributing | ||
If you want to send a PR to this element, here are | ||
the instructions for running the tests and demo locally: | ||
### Installation | ||
```sh | ||
git clone https://github.com/PolymerElements/paper-progress | ||
cd paper-progress | ||
npm install | ||
npm install -g polymer-cli | ||
``` | ||
### Running the demo locally | ||
```sh | ||
polymer serve --npm | ||
open http://127.0.0.1:<port>/demo/ | ||
``` | ||
### Running the tests | ||
```sh | ||
polymer test --npm | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
418
78
28004
8
1