mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix paper progress
This commit is contained in:
parent
6ac142f61a
commit
b1cca31fa5
29 changed files with 1519 additions and 9 deletions
|
@ -70,13 +70,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
[is="emby-button"].fab.mini {
|
[is="emby-button"].fab.mini {
|
||||||
padding: .4em;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[is="emby-button"].fab.mini i {
|
[is="emby-button"].fab.mini i {
|
||||||
height: 2.4vh !important;
|
height: 24px !important;
|
||||||
width: 2.4vh !important;
|
width: 24px !important;
|
||||||
font-size: 2.4vh !important;
|
font-size: 24px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[is="emby-button"].fab iron-icon {
|
[is="emby-button"].fab iron-icon {
|
||||||
|
|
39
dashboard-ui/bower_components/iron-range-behavior/.bower.json
vendored
Normal file
39
dashboard-ui/bower_components/iron-range-behavior/.bower.json
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"name": "iron-range-behavior",
|
||||||
|
"version": "1.0.5",
|
||||||
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
"description": "Provides a behavior for something with a minimum and maximum value",
|
||||||
|
"authors": "The Polymer Authors",
|
||||||
|
"keywords": [
|
||||||
|
"web-components",
|
||||||
|
"polymer",
|
||||||
|
"behavior"
|
||||||
|
],
|
||||||
|
"main": "iron-range-behavior.html",
|
||||||
|
"private": true,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/PolymerElements/iron-range-behavior.git"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"polymer": "Polymer/polymer#^1.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
|
"iron-input": "PolymerElements/iron-input#^1.0.0",
|
||||||
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
|
"web-component-tester": "^4.0.0",
|
||||||
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
|
},
|
||||||
|
"ignore": [],
|
||||||
|
"homepage": "https://github.com/PolymerElements/iron-range-behavior",
|
||||||
|
"_release": "1.0.5",
|
||||||
|
"_resolution": {
|
||||||
|
"type": "version",
|
||||||
|
"tag": "v1.0.5",
|
||||||
|
"commit": "645ffc6b39ae4fb0efd23b97016a9c4aac777978"
|
||||||
|
},
|
||||||
|
"_source": "git://github.com/PolymerElements/iron-range-behavior.git",
|
||||||
|
"_target": "^1.0.0",
|
||||||
|
"_originalSource": "PolymerElements/iron-range-behavior"
|
||||||
|
}
|
33
dashboard-ui/bower_components/iron-range-behavior/.github/ISSUE_TEMPLATE.md
vendored
Normal file
33
dashboard-ui/bower_components/iron-range-behavior/.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<!-- Instructions: https://github.com/PolymerElements/iron-range-behavior/CONTRIBUTING.md#filing-issues -->
|
||||||
|
### Description
|
||||||
|
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
|
||||||
|
|
||||||
|
### Expected outcome
|
||||||
|
|
||||||
|
<!-- Example: The page stays the same color. -->
|
||||||
|
|
||||||
|
### Actual outcome
|
||||||
|
|
||||||
|
<!-- Example: The page turns pink. -->
|
||||||
|
|
||||||
|
### Live Demo
|
||||||
|
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
|
<!-- Example
|
||||||
|
1. Put a `paper-foo` element in the page.
|
||||||
|
2. Open the page in a web browser.
|
||||||
|
3. Click the `paper-foo` element.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Browsers Affected
|
||||||
|
<!-- Check all that apply -->
|
||||||
|
- [ ] Chrome
|
||||||
|
- [ ] Firefox
|
||||||
|
- [ ] Safari 9
|
||||||
|
- [ ] Safari 8
|
||||||
|
- [ ] Safari 7
|
||||||
|
- [ ] Edge
|
||||||
|
- [ ] IE 11
|
||||||
|
- [ ] IE 10
|
1
dashboard-ui/bower_components/iron-range-behavior/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/iron-range-behavior/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
bower_components
|
23
dashboard-ui/bower_components/iron-range-behavior/.travis.yml
vendored
Normal file
23
dashboard-ui/bower_components/iron-range-behavior/.travis.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
language: node_js
|
||||||
|
sudo: required
|
||||||
|
before_script:
|
||||||
|
- npm install -g bower polylint web-component-tester
|
||||||
|
- bower install
|
||||||
|
- polylint
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- secure: IsCzwFlF0UR02RUnxyo+Gk4cdZMLDOVdy3X0qE7JCe3Lo/SJXjULrJMUZmHrKV9yQTu8bke5lhJdMe/8kuO7chLekQv4AF5bR2m3x7Kg4oJGQJE30WpBWXz6XSYuwnmOINmaNqNZKil692W28LFr97N2+TxEbE64lTd5cGcgJDI=
|
||||||
|
- secure: TmQz2J5KMg/5dOi/7VDMWIxLoHjC5K7yCQAQOkcrq9M8PTBQE2wlCVe4wb6EqfiAofBv5e4heO9B3F0EOWWp2Sasa9ZQIcs0Lg/1SU6wv5Vt9XCONu/ZLI9oqG3SJ8pMMhcexMxmygX0wsytuI6LOI3sMMpOek2cdae1ntPT9IE=
|
||||||
|
node_js: stable
|
||||||
|
addons:
|
||||||
|
firefox: latest
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- google-chrome
|
||||||
|
packages:
|
||||||
|
- google-chrome-stable
|
||||||
|
sauce_connect: true
|
||||||
|
script:
|
||||||
|
- xvfb-run wct
|
||||||
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
|
dist: trusty
|
77
dashboard-ui/bower_components/iron-range-behavior/CONTRIBUTING.md
vendored
Normal file
77
dashboard-ui/bower_components/iron-range-behavior/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
<!--
|
||||||
|
This file is autogenerated based on
|
||||||
|
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||||
|
|
||||||
|
If you edit that file, it will get updated everywhere else.
|
||||||
|
If you edit this file, your changes will get overridden :)
|
||||||
|
|
||||||
|
You can however override the jsbin link with one that's customized to this
|
||||||
|
specific element:
|
||||||
|
|
||||||
|
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Polymer Elements
|
||||||
|
## Guide for Contributors
|
||||||
|
|
||||||
|
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||||
|
|
||||||
|
### Filing Issues
|
||||||
|
|
||||||
|
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||||
|
|
||||||
|
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||||
|
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||||
|
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||||
|
|
||||||
|
**If you are filing an issue to report a bug**, please provide:
|
||||||
|
|
||||||
|
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
The `paper-foo` element causes the page to turn pink when clicked.
|
||||||
|
|
||||||
|
## Expected outcome
|
||||||
|
|
||||||
|
The page stays the same color.
|
||||||
|
|
||||||
|
## Actual outcome
|
||||||
|
|
||||||
|
The page turns pink.
|
||||||
|
|
||||||
|
## Steps to reproduce
|
||||||
|
|
||||||
|
1. Put a `paper-foo` element in the page.
|
||||||
|
2. Open the page in a web browser.
|
||||||
|
3. Click the `paper-foo` element.
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||||
|
|
||||||
|
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||||
|
|
||||||
|
### Submitting Pull Requests
|
||||||
|
|
||||||
|
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||||
|
|
||||||
|
When submitting pull requests, please provide:
|
||||||
|
|
||||||
|
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
(For a single issue)
|
||||||
|
Fixes #20
|
||||||
|
|
||||||
|
(For multiple issues)
|
||||||
|
Fixes #32, fixes #40
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||||
|
|
||||||
|
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
29
dashboard-ui/bower_components/iron-range-behavior/bower.json
vendored
Normal file
29
dashboard-ui/bower_components/iron-range-behavior/bower.json
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"name": "iron-range-behavior",
|
||||||
|
"version": "1.0.5",
|
||||||
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
"description": "Provides a behavior for something with a minimum and maximum value",
|
||||||
|
"authors": "The Polymer Authors",
|
||||||
|
"keywords": [
|
||||||
|
"web-components",
|
||||||
|
"polymer",
|
||||||
|
"behavior"
|
||||||
|
],
|
||||||
|
"main": "iron-range-behavior.html",
|
||||||
|
"private": true,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/PolymerElements/iron-range-behavior.git"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"polymer": "Polymer/polymer#^1.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
|
"iron-input": "PolymerElements/iron-input#^1.0.0",
|
||||||
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
|
"web-component-tester": "^4.0.0",
|
||||||
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
|
},
|
||||||
|
"ignore": []
|
||||||
|
}
|
79
dashboard-ui/bower_components/iron-range-behavior/demo/index.html
vendored
Normal file
79
dashboard-ui/bower_components/iron-range-behavior/demo/index.html
vendored
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>iron-range-behavior demo</title>
|
||||||
|
|
||||||
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
|
||||||
|
<link rel="import" href="../iron-range-behavior.html">
|
||||||
|
<link rel="import" href="../../iron-input/iron-input.html">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body unresolved>
|
||||||
|
|
||||||
|
<dom-module id="x-progressbar">
|
||||||
|
<style>
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #555;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px;
|
||||||
|
box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background-color: #999;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-value {
|
||||||
|
padding: 0 8px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<div class="progress" horizontal center layout style$="{{_computeStyle(ratio)}}">
|
||||||
|
<div class="progress-value"><span>{{ratio}}</span>%</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</dom-module>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
HTMLImports.whenReady(function() {
|
||||||
|
Polymer({
|
||||||
|
is: 'x-progressbar',
|
||||||
|
|
||||||
|
behaviors: [Polymer.IronRangeBehavior],
|
||||||
|
|
||||||
|
_computeStyle: function(ratio) {
|
||||||
|
return 'width: ' + ratio + '%;';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<x-progressbar min="0" max="200" value="120"></x-progressbar>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
24
dashboard-ui/bower_components/iron-range-behavior/index.html
vendored
Normal file
24
dashboard-ui/bower_components/iron-range-behavior/index.html
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!doctype html>
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<iron-component-page></iron-component-page>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
121
dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html
vendored
Normal file
121
dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html
vendored
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<link rel="import" href="../polymer/polymer.html">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `iron-range-behavior` provides the behavior for something with a minimum to maximum range.
|
||||||
|
*
|
||||||
|
* @demo demo/index.html
|
||||||
|
* @polymerBehavior
|
||||||
|
*/
|
||||||
|
Polymer.IronRangeBehavior = {
|
||||||
|
|
||||||
|
properties: {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number that represents the current value.
|
||||||
|
*/
|
||||||
|
value: {
|
||||||
|
type: Number,
|
||||||
|
value: 0,
|
||||||
|
notify: true,
|
||||||
|
reflectToAttribute: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number that indicates the minimum value of the range.
|
||||||
|
*/
|
||||||
|
min: {
|
||||||
|
type: Number,
|
||||||
|
value: 0,
|
||||||
|
notify: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number that indicates the maximum value of the range.
|
||||||
|
*/
|
||||||
|
max: {
|
||||||
|
type: Number,
|
||||||
|
value: 100,
|
||||||
|
notify: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the value granularity of the range's value.
|
||||||
|
*/
|
||||||
|
step: {
|
||||||
|
type: Number,
|
||||||
|
value: 1,
|
||||||
|
notify: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the ratio of the value.
|
||||||
|
*/
|
||||||
|
ratio: {
|
||||||
|
type: Number,
|
||||||
|
value: 0,
|
||||||
|
readOnly: true,
|
||||||
|
notify: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
observers: [
|
||||||
|
'_update(value, min, max, step)'
|
||||||
|
],
|
||||||
|
|
||||||
|
_calcRatio: function(value) {
|
||||||
|
return (this._clampValue(value) - this.min) / (this.max - this.min);
|
||||||
|
},
|
||||||
|
|
||||||
|
_clampValue: function(value) {
|
||||||
|
return Math.min(this.max, Math.max(this.min, this._calcStep(value)));
|
||||||
|
},
|
||||||
|
|
||||||
|
_calcStep: function(value) {
|
||||||
|
// polymer/issues/2493
|
||||||
|
value = parseFloat(value);
|
||||||
|
|
||||||
|
if (!this.step) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
var numSteps = Math.round((value - this.min) / this.step);
|
||||||
|
if (this.step < 1) {
|
||||||
|
/**
|
||||||
|
* For small values of this.step, if we calculate the step using
|
||||||
|
* `Math.round(value / step) * step` we may hit a precision point issue
|
||||||
|
* eg. 0.1 * 0.2 = 0.020000000000000004
|
||||||
|
* http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
|
||||||
|
*
|
||||||
|
* as a work around we can divide by the reciprocal of `step`
|
||||||
|
*/
|
||||||
|
return numSteps / (1 / this.step) + this.min;
|
||||||
|
} else {
|
||||||
|
return numSteps * this.step + this.min;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_validateValue: function() {
|
||||||
|
var v = this._clampValue(this.value);
|
||||||
|
this.value = this.oldValue = isNaN(v) ? this.oldValue : v;
|
||||||
|
return this.value !== v;
|
||||||
|
},
|
||||||
|
|
||||||
|
_update: function() {
|
||||||
|
this._validateValue();
|
||||||
|
this._setRatio(this._calcRatio(this.value) * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
180
dashboard-ui/bower_components/iron-range-behavior/test/basic.html
vendored
Normal file
180
dashboard-ui/bower_components/iron-range-behavior/test/basic.html
vendored
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
<!doctype html>
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>iron-range-behavior</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
|
||||||
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
<script src="../../web-component-tester/browser.js"></script>
|
||||||
|
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||||
|
|
||||||
|
<link rel="import" href="x-progressbar.html">
|
||||||
|
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<test-fixture id="trivialRange">
|
||||||
|
<template>
|
||||||
|
<x-progressbar></x-progressbar>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
suite('<x-progressbar>', function() {
|
||||||
|
var range;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
range = fixture('trivialRange');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('check default', function() {
|
||||||
|
assert.equal(range.min, 0);
|
||||||
|
assert.equal(range.max, 100);
|
||||||
|
assert.equal(range.value, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set value', function(done) {
|
||||||
|
range.value = 50;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 50);
|
||||||
|
// test clamp value
|
||||||
|
range.value = 60.1;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 60);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set max', function(done) {
|
||||||
|
range.max = 10;
|
||||||
|
range.value = 11;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, range.max);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('test ratio', function(done) {
|
||||||
|
range.max = 10;
|
||||||
|
range.value = 5;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.ratio, 50);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set min', function(done) {
|
||||||
|
range.min = 10
|
||||||
|
range.max = 50;
|
||||||
|
range.value = 30;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.ratio, 50);
|
||||||
|
range.value = 0;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, range.min);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set step', function(done) {
|
||||||
|
range.min = 0;
|
||||||
|
range.max = 10;
|
||||||
|
range.value = 5.1;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 5);
|
||||||
|
range.step = 0.1;
|
||||||
|
range.value = 5.1;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 5.1);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set large step', function(done) {
|
||||||
|
// PolymerElements/paper-slider#135
|
||||||
|
range.min = 0;
|
||||||
|
range.max = 2625;
|
||||||
|
range.step = 875;
|
||||||
|
range.value = 875;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 875);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set step with min', function(done) {
|
||||||
|
range.min = -0.9;
|
||||||
|
range.max = 1.1;
|
||||||
|
range.step = 0.5;
|
||||||
|
range.value = -0.5;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, -0.4);
|
||||||
|
range.value = 0.7;
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 0.6);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('odd values', function(done) {
|
||||||
|
range.min = 1;
|
||||||
|
range.max = 7;
|
||||||
|
range.step = 2;
|
||||||
|
range.value = 3;
|
||||||
|
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 3);
|
||||||
|
|
||||||
|
range.value += range.step;
|
||||||
|
assert.equal(range.value, 5);
|
||||||
|
|
||||||
|
range.value += range.step;
|
||||||
|
assert.equal(range.value, 7);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('negative values should round up', function(done) {
|
||||||
|
range.min = -10;
|
||||||
|
range.max = 10;
|
||||||
|
range.step = 0.1;
|
||||||
|
range.value = -8.4252;
|
||||||
|
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, -8.4);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('positive values should round up', function(done) {
|
||||||
|
range.min = 10;
|
||||||
|
range.max = 100;
|
||||||
|
range.step = 0.25;
|
||||||
|
range.value = 19.34567;
|
||||||
|
|
||||||
|
flush(function() {
|
||||||
|
assert.equal(range.value, 19.25);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
24
dashboard-ui/bower_components/iron-range-behavior/test/index.html
vendored
Normal file
24
dashboard-ui/bower_components/iron-range-behavior/test/index.html
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html><!--
|
||||||
|
@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
|
||||||
|
--><html><head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||||
|
<title>Tests</title>
|
||||||
|
<script src="../../web-component-tester/browser.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
WCT.loadSuites([
|
||||||
|
'basic.html',
|
||||||
|
'basic.html?dom=shadow'
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
19
dashboard-ui/bower_components/iron-range-behavior/test/x-progressbar.html
vendored
Normal file
19
dashboard-ui/bower_components/iron-range-behavior/test/x-progressbar.html
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<link rel="import" href="../iron-range-behavior.html">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
Polymer({
|
||||||
|
is: 'x-progressbar',
|
||||||
|
|
||||||
|
behaviors: [Polymer.IronRangeBehavior]
|
||||||
|
});
|
||||||
|
</script>
|
43
dashboard-ui/bower_components/paper-progress/.bower.json
vendored
Normal file
43
dashboard-ui/bower_components/paper-progress/.bower.json
vendored
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"name": "paper-progress",
|
||||||
|
"version": "1.0.9",
|
||||||
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
"description": "A material design progress bar",
|
||||||
|
"authors": "The Polymer Authors",
|
||||||
|
"keywords": [
|
||||||
|
"web-components",
|
||||||
|
"polymer",
|
||||||
|
"progress"
|
||||||
|
],
|
||||||
|
"main": "paper-progress.html",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/PolymerElements/paper-progress.git"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||||
|
"iron-range-behavior": "PolymerElements/iron-range-behavior#^1.0.0",
|
||||||
|
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||||
|
"polymer": "Polymer/polymer#^1.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
|
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||||
|
"paper-button": "PolymerElements/paper-button#^1.0.0",
|
||||||
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
|
"web-component-tester": "^4.0.0",
|
||||||
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
|
},
|
||||||
|
"ignore": [],
|
||||||
|
"homepage": "https://github.com/PolymerElements/paper-progress",
|
||||||
|
"_release": "1.0.9",
|
||||||
|
"_resolution": {
|
||||||
|
"type": "version",
|
||||||
|
"tag": "v1.0.9",
|
||||||
|
"commit": "389e717d2e600bb44c6cb1537ee12b203b55fca1"
|
||||||
|
},
|
||||||
|
"_source": "git://github.com/PolymerElements/paper-progress.git",
|
||||||
|
"_target": "^1.0.9",
|
||||||
|
"_originalSource": "PolymerElements/paper-progress",
|
||||||
|
"_direct": true
|
||||||
|
}
|
1
dashboard-ui/bower_components/paper-progress/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/paper-progress/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
bower_components
|
25
dashboard-ui/bower_components/paper-progress/.travis.yml
vendored
Normal file
25
dashboard-ui/bower_components/paper-progress/.travis.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
language: node_js
|
||||||
|
sudo: false
|
||||||
|
before_script:
|
||||||
|
- npm install -g bower polylint web-component-tester
|
||||||
|
- bower install
|
||||||
|
- polylint
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- secure: fmp2kJysxTcVsouaQfEkPCJYPzbsuGCeq5RqvttDaYdue92n5912OR/WI476PPGpX2owvxq97saVX9CqXweVtgrmdhONsrGy31eULpW0vUonuhbjkKU87E0aAmHu478uuJnc4hU7oN7wuNEtqWmpFG+oqMqHKwUyAWLk+V4XY0nseuFYQLX52qfglD+CqipQsoe84nIM0JxQxpDw1njYZbKQzZVttyLQVv13Ahh+5v75EqqwggoD2mgU1xQIH1GarbnZpmE9BL4ETbaJwJ7Fon/Pxsrs1Zs9hEStJCwo5aTiyPJibRQBCk9Cj+PJY3TkqfE3zIwhbW1/aSCIuUg5egsh6Of6clqrDE2wWPyIURUBFcE3UXsqBEXh56K9WQh+KNIgJYoQ/tzhD2VlgQhM89geTKZc6ysSTWcukv9tw9h9gaG2gD1e+uRQ/rMyt6vlh2DNI/J8oAv1WifZwuUKRkwm7SUBP55sukFryJIQEXEMqjT0WVbjTWP+2VNiHFPo7wGdVZ8X7y4bwA7lmnlC4AnNd8L6BE0tStZUBAKv3LhzRvd+DrRvaiSPdFhGBbAiMzytKGgxfD7nhMntV7GREjfQCB/hch5anePK7Cuw58kF8PiZX9aVk8Se3VP0+rdUkzVgWTW5THhdpw2nnuIyK5QDtL4/L3l/oJhl9Jbmak4=
|
||||||
|
- secure: WzzECDnm17AwL4VDbMJD0E1cdi11p2YLahJRPi/+GZ9BFNIV3I2WZFc5l0WEiGDMB4igx5DdXHzDFk7HF2z2qRpf2skhWDTd/Ie5+exZlY9/D/tED8dJepGtV40UTuWr+vHsDJeNkXteYNpNU7ZHfNbXl14/x25ccaLYSX5yRNLBRMn9KToRNBhXA0YH/Q9AnWNKGFWb0YBfjSRywSvVuVRQr/tL43JUCTEEwjdGHVTUlvWPE5XHDs6yqjJlTI70GVvQb5WPZdQJugiolG9Z66ZRWEEuawJgzTCdlaKwBQX0UAXLdfUsQKwrcxvLnDibMHVG6hNOBw4Un73YL0klD7nKoPlhCiDHtPWoNUCvpNGxPWozw2KC50YX4MZSFKAWCkIA4/oiIhMvSUOWcrOpfHZNpJNNBCFHvv6JS5PwEiNlqM2BjqfS4Vy/03Fy0h6CyNX8o5wDAjZvJKCyZQHGy4tFWNPpyZ6SbwsnzH+bjqXSDURI6hCUNiujlIRzUT95H8rIega1mWT8sffvb4qK72iXAqf7hoQbi1Ldhjq/b0iO0PRdpjX5vusLN797KxPNrxDZc9LoaIgVMAFD5AJmwF/DilvwsW6sI4o5cpAw58/g1wpB7iX0YFWXNzXv/hZh2o4gW81Y2afM//gIgCFSitRO10bOqw+pEcGCnLrz/BQ=
|
||||||
|
- CXX=g++-4.8
|
||||||
|
node_js: stable
|
||||||
|
addons:
|
||||||
|
firefox: latest
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- google-chrome
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- google-chrome-stable
|
||||||
|
- g++-4.8
|
||||||
|
sauce_connect: true
|
||||||
|
script:
|
||||||
|
- xvfb-run wct
|
||||||
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
dashboard-ui/bower_components/paper-progress/CONTRIBUTING.md
vendored
Normal file
77
dashboard-ui/bower_components/paper-progress/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This file is autogenerated based on
|
||||||
|
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||||
|
|
||||||
|
If you edit that file, it will get updated everywhere else.
|
||||||
|
If you edit this file, your changes will get overridden :)
|
||||||
|
|
||||||
|
You can however override the jsbin link with one that's customized to this
|
||||||
|
specific element:
|
||||||
|
|
||||||
|
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||||
|
-->
|
||||||
|
# Polymer Elements
|
||||||
|
## Guide for Contributors
|
||||||
|
|
||||||
|
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||||
|
|
||||||
|
### Filing Issues
|
||||||
|
|
||||||
|
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||||
|
|
||||||
|
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||||
|
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||||
|
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||||
|
|
||||||
|
**If you are filing an issue to report a bug**, please provide:
|
||||||
|
|
||||||
|
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
The `paper-foo` element causes the page to turn pink when clicked.
|
||||||
|
|
||||||
|
## Expected outcome
|
||||||
|
|
||||||
|
The page stays the same color.
|
||||||
|
|
||||||
|
## Actual outcome
|
||||||
|
|
||||||
|
The page turns pink.
|
||||||
|
|
||||||
|
## Steps to reproduce
|
||||||
|
|
||||||
|
1. Put a `paper-foo` element in the page.
|
||||||
|
2. Open the page in a web browser.
|
||||||
|
3. Click the `paper-foo` element.
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||||
|
|
||||||
|
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||||
|
|
||||||
|
### Submitting Pull Requests
|
||||||
|
|
||||||
|
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||||
|
|
||||||
|
When submitting pull requests, please provide:
|
||||||
|
|
||||||
|
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
(For a single issue)
|
||||||
|
Fixes #20
|
||||||
|
|
||||||
|
(For multiple issues)
|
||||||
|
Fixes #32, fixes #40
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||||
|
|
||||||
|
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
32
dashboard-ui/bower_components/paper-progress/bower.json
vendored
Normal file
32
dashboard-ui/bower_components/paper-progress/bower.json
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "paper-progress",
|
||||||
|
"version": "1.0.9",
|
||||||
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
"description": "A material design progress bar",
|
||||||
|
"authors": "The Polymer Authors",
|
||||||
|
"keywords": [
|
||||||
|
"web-components",
|
||||||
|
"polymer",
|
||||||
|
"progress"
|
||||||
|
],
|
||||||
|
"main": "paper-progress.html",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/PolymerElements/paper-progress.git"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||||
|
"iron-range-behavior": "PolymerElements/iron-range-behavior#^1.0.0",
|
||||||
|
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||||
|
"polymer": "Polymer/polymer#^1.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
|
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||||
|
"paper-button": "PolymerElements/paper-button#^1.0.0",
|
||||||
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
|
"web-component-tester": "^4.0.0",
|
||||||
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
|
},
|
||||||
|
"ignore": []
|
||||||
|
}
|
122
dashboard-ui/bower_components/paper-progress/demo/index.html
vendored
Normal file
122
dashboard-ui/bower_components/paper-progress/demo/index.html
vendored
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>paper-progress demo</title>
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
|
||||||
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
<link rel="import" href="../../paper-styles/color.html">
|
||||||
|
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||||
|
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
||||||
|
<link rel="import" href="../paper-progress.html">
|
||||||
|
<link rel="import" href="../../paper-button/paper-button.html">
|
||||||
|
|
||||||
|
<style is="custom-style" include="demo-pages-shared-styles">
|
||||||
|
paper-progress {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
paper-button {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body unresolved>
|
||||||
|
<div class="vertical-section-container centered">
|
||||||
|
<h3>paper-progress can be imperatively controlled</h3>
|
||||||
|
<demo-snippet class="centered-demo">
|
||||||
|
<template>
|
||||||
|
<p>Once started, loops 5 times before stopping.
|
||||||
|
<!-- View the source code to see the contents of startProgress() -->
|
||||||
|
<paper-button raised onclick="startProgress();" id="start">Start</paper-button>
|
||||||
|
</p>
|
||||||
|
<paper-progress id="progress"></paper-progress>
|
||||||
|
</template>
|
||||||
|
</demo-snippet>
|
||||||
|
|
||||||
|
<h3>paper-progress can be indeterminate</h3>
|
||||||
|
<demo-snippet class="centered-demo">
|
||||||
|
<template>
|
||||||
|
<paper-progress indeterminate></paper-progress>
|
||||||
|
<paper-progress indeterminate value="800" min="100" max="1000"></paper-progress>
|
||||||
|
</template>
|
||||||
|
</demo-snippet>
|
||||||
|
|
||||||
|
<h3>It can be styled using custom properties</h3>
|
||||||
|
<demo-snippet class="centered-demo">
|
||||||
|
<template>
|
||||||
|
<style is="custom-style">
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
paper-progress.green {
|
||||||
|
--paper-progress-active-color: var(--paper-light-green-500);
|
||||||
|
--paper-progress-secondary-color: var(--paper-light-green-100);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<paper-progress value="800" min="100" max="1000" class="red"></paper-progress>
|
||||||
|
<paper-progress value="60" class="green"></paper-progress>
|
||||||
|
<paper-progress value="40" secondary-progress="80" class="blue"></paper-progress>
|
||||||
|
</template>
|
||||||
|
</demo-snippet>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var progress, button, animationFrame;
|
||||||
|
var repeat, maxRepeat = 5, animating = false;
|
||||||
|
|
||||||
|
function nextProgress() {
|
||||||
|
animating = true;
|
||||||
|
if (progress.value < progress.max) {
|
||||||
|
progress.value += (progress.step || 1);
|
||||||
|
} else {
|
||||||
|
if (++repeat >= maxRepeat) {
|
||||||
|
animating = false;
|
||||||
|
button.disabled = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
progress.value = progress.min;
|
||||||
|
}
|
||||||
|
var animationFrame = requestAnimationFrame(nextProgress);
|
||||||
|
}
|
||||||
|
|
||||||
|
function startProgress() {
|
||||||
|
repeat = 0;
|
||||||
|
progress.value = progress.min;
|
||||||
|
button.disabled = true;
|
||||||
|
if (!animating) {
|
||||||
|
nextProgress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('WebComponentsReady', function() {
|
||||||
|
progress = document.querySelector('paper-progress');
|
||||||
|
button = document.querySelector('paper-button');
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
21
dashboard-ui/bower_components/paper-progress/hero.svg
vendored
Normal file
21
dashboard-ui/bower_components/paper-progress/hero.svg
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
||||||
|
<g id="background" display="none">
|
||||||
|
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
||||||
|
</g>
|
||||||
|
<g id="label">
|
||||||
|
</g>
|
||||||
|
<g id="art">
|
||||||
|
<rect x="57" y="59" width="20" height="2"/>
|
||||||
|
<rect x="38" y="59" width="11" height="2"/>
|
||||||
|
<rect x="84" y="59" width="40" height="2"/>
|
||||||
|
<rect x="133" y="59" width="54" height="2"/>
|
||||||
|
<g id="ic_x5F_add_x0D_">
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g id="Guides">
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 813 B |
28
dashboard-ui/bower_components/paper-progress/index.html
vendored
Normal file
28
dashboard-ui/bower_components/paper-progress/index.html
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!doctype html>
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<title>paper-progress</title>
|
||||||
|
|
||||||
|
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<iron-component-page></iron-component-page>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
341
dashboard-ui/bower_components/paper-progress/paper-progress.html
vendored
Normal file
341
dashboard-ui/bower_components/paper-progress/paper-progress.html
vendored
Normal file
|
@ -0,0 +1,341 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<link rel="import" href="../polymer/polymer.html">
|
||||||
|
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
|
||||||
|
<link rel="import" href="../iron-range-behavior/iron-range-behavior.html">
|
||||||
|
<link rel="import" href="../paper-styles/color.html">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<paper-progress value="10"></paper-progress>
|
||||||
|
|
||||||
|
There is also a secondary progress which is useful for displaying intermediate
|
||||||
|
progress, such as the buffer level during a streaming playback progress bar.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<paper-progress value="10" secondary-progress="30"></paper-progress>
|
||||||
|
|
||||||
|
### Styling progress bar:
|
||||||
|
|
||||||
|
To change the active progress bar color:
|
||||||
|
|
||||||
|
paper-progress {
|
||||||
|
--paper-progress-active-color: #e91e63;
|
||||||
|
}
|
||||||
|
|
||||||
|
To change the secondary progress bar color:
|
||||||
|
|
||||||
|
paper-progress {
|
||||||
|
--paper-progress-secondary-color: #f8bbd0;
|
||||||
|
}
|
||||||
|
|
||||||
|
To change the progress bar background color:
|
||||||
|
|
||||||
|
paper-progress {
|
||||||
|
--paper-progress-container-color: #64ffda;
|
||||||
|
}
|
||||||
|
|
||||||
|
Add the class `transiting` to a paper-progress to animate the progress bar when
|
||||||
|
the value changed. You can also customize the transition:
|
||||||
|
|
||||||
|
paper-progress {
|
||||||
|
--paper-progress-transition-duration: 0.08s;
|
||||||
|
--paper-progress-transition-timing-function: ease;
|
||||||
|
--paper-progress-transition-transition-delay: 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
The following mixins are available for styling:
|
||||||
|
|
||||||
|
Custom property | Description | Default
|
||||||
|
----------------------------------------------|---------------------------------------------|--------------
|
||||||
|
`--paper-progress-container-color` | Mixin applied to container | `--google-grey-300`
|
||||||
|
`--paper-progress-transition-duration` | Duration of the transition | `0.008s`
|
||||||
|
`--paper-progress-transition-timing-function` | The timing function for the transition | `ease`
|
||||||
|
`--paper-progress-transition-delay` | delay for the transition | `0s`
|
||||||
|
`--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`
|
||||||
|
|
||||||
|
@group Paper Elements
|
||||||
|
@element paper-progress
|
||||||
|
@hero hero.svg
|
||||||
|
@demo demo/index.html
|
||||||
|
-->
|
||||||
|
|
||||||
|
<dom-module id="paper-progress">
|
||||||
|
<template>
|
||||||
|
<style>
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progressContainer {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progressContainer,
|
||||||
|
/* the stripe for the indeterminate animation*/
|
||||||
|
.indeterminate::after {
|
||||||
|
height: var(--paper-progress-height, 4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
#primaryProgress,
|
||||||
|
#secondaryProgress,
|
||||||
|
.indeterminate::after {
|
||||||
|
@apply(--layout-fit);
|
||||||
|
}
|
||||||
|
|
||||||
|
#progressContainer,
|
||||||
|
.indeterminate::after {
|
||||||
|
background: var(--paper-progress-container-color, --google-grey-300);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(.transiting) #primaryProgress,
|
||||||
|
:host(.transiting) #secondaryProgress {
|
||||||
|
-webkit-transition-property: -webkit-transform;
|
||||||
|
transition-property: transform;
|
||||||
|
|
||||||
|
/* Duration */
|
||||||
|
-webkit-transition-duration: var(--paper-progress-transition-duration, 0.08s);
|
||||||
|
transition-duration: var(--paper-progress-transition-duration, 0.08s);
|
||||||
|
|
||||||
|
/* Timing function */
|
||||||
|
-webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
|
||||||
|
transition-timing-function: var(--paper-progress-transition-timing-function, ease);
|
||||||
|
|
||||||
|
/* Delay */
|
||||||
|
-webkit-transition-delay: var(--paper-progress-transition-delay, 0s);
|
||||||
|
transition-delay: var(--paper-progress-transition-delay, 0s);
|
||||||
|
}
|
||||||
|
|
||||||
|
#primaryProgress,
|
||||||
|
#secondaryProgress {
|
||||||
|
@apply(--layout-fit);
|
||||||
|
-webkit-transform-origin: left center;
|
||||||
|
transform-origin: left center;
|
||||||
|
-webkit-transform: scaleX(0);
|
||||||
|
transform: scaleX(0);
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
#primaryProgress {
|
||||||
|
background: var(--paper-progress-active-color, --google-green-500);
|
||||||
|
}
|
||||||
|
|
||||||
|
#secondaryProgress {
|
||||||
|
background: var(--paper-progress-secondary-color, --google-green-100);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host([disabled]) #primaryProgress {
|
||||||
|
background: var(--paper-progress-disabled-active-color, --google-grey-500);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host([disabled]) #secondaryProgress {
|
||||||
|
background: var(--paper-progress-disabled-secondary-color, --google-grey-300);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(:not([disabled])) #primaryProgress.indeterminate {
|
||||||
|
-webkit-transform-origin: right center;
|
||||||
|
transform-origin: right center;
|
||||||
|
-webkit-animation: indeterminate-bar 2s linear infinite;
|
||||||
|
animation: indeterminate-bar 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(:not([disabled])) #primaryProgress.indeterminate::after {
|
||||||
|
content: "";
|
||||||
|
-webkit-transform-origin: center center;
|
||||||
|
transform-origin: center center;
|
||||||
|
|
||||||
|
-webkit-animation: indeterminate-splitter 2s linear infinite;
|
||||||
|
animation: indeterminate-splitter 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes indeterminate-bar {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: scaleX(1) translateX(-100%);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: scaleX(1) translateX(0%);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: scaleX(1) translateX(0%);
|
||||||
|
-webkit-animation-timing-function: cubic-bezier(.28,.62,.37,.91);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: scaleX(0) translateX(0%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes indeterminate-splitter {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: scaleX(.75) translateX(-125%);
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
-webkit-transform: scaleX(.75) translateX(-125%);
|
||||||
|
-webkit-animation-timing-function: cubic-bezier(.42,0,.6,.8);
|
||||||
|
}
|
||||||
|
90% {
|
||||||
|
-webkit-transform: scaleX(.75) translateX(125%);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: scaleX(.75) translateX(125%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes indeterminate-bar {
|
||||||
|
0% {
|
||||||
|
transform: scaleX(1) translateX(-100%);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scaleX(1) translateX(0%);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: scaleX(1) translateX(0%);
|
||||||
|
animation-timing-function: cubic-bezier(.28,.62,.37,.91);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scaleX(0) translateX(0%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes indeterminate-splitter {
|
||||||
|
0% {
|
||||||
|
transform: scaleX(.75) translateX(-125%);
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
transform: scaleX(.75) translateX(-125%);
|
||||||
|
animation-timing-function: cubic-bezier(.42,0,.6,.8);
|
||||||
|
}
|
||||||
|
90% {
|
||||||
|
transform: scaleX(.75) translateX(125%);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scaleX(.75) translateX(125%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="progressContainer">
|
||||||
|
<div id="secondaryProgress" hidden$="[[_hideSecondaryProgress(secondaryRatio)]]"></div>
|
||||||
|
<div id="primaryProgress"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</dom-module>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
Polymer({
|
||||||
|
is: 'paper-progress',
|
||||||
|
|
||||||
|
behaviors: [
|
||||||
|
Polymer.IronRangeBehavior
|
||||||
|
],
|
||||||
|
|
||||||
|
properties: {
|
||||||
|
/**
|
||||||
|
* The number that represents the current secondary progress.
|
||||||
|
*/
|
||||||
|
secondaryProgress: {
|
||||||
|
type: Number,
|
||||||
|
value: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The secondary ratio
|
||||||
|
*/
|
||||||
|
secondaryRatio: {
|
||||||
|
type: Number,
|
||||||
|
value: 0,
|
||||||
|
readOnly: true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use an indeterminate progress indicator.
|
||||||
|
*/
|
||||||
|
indeterminate: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false,
|
||||||
|
observer: '_toggleIndeterminate'
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if the progress is disabled.
|
||||||
|
*/
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false,
|
||||||
|
reflectToAttribute: true,
|
||||||
|
observer: '_disabledChanged'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
observers: [
|
||||||
|
'_progressChanged(secondaryProgress, value, min, max)'
|
||||||
|
],
|
||||||
|
|
||||||
|
hostAttributes: {
|
||||||
|
role: 'progressbar'
|
||||||
|
},
|
||||||
|
|
||||||
|
_toggleIndeterminate: function(indeterminate) {
|
||||||
|
// If we use attribute/class binding, the animation sometimes doesn't translate properly
|
||||||
|
// on Safari 7.1. So instead, we toggle the class here in the update method.
|
||||||
|
this.toggleClass('indeterminate', indeterminate, this.$.primaryProgress);
|
||||||
|
},
|
||||||
|
|
||||||
|
_transformProgress: function(progress, ratio) {
|
||||||
|
var transform = 'scaleX(' + (ratio / 100) + ')';
|
||||||
|
progress.style.transform = progress.style.webkitTransform = transform;
|
||||||
|
},
|
||||||
|
|
||||||
|
_mainRatioChanged: function(ratio) {
|
||||||
|
this._transformProgress(this.$.primaryProgress, ratio);
|
||||||
|
},
|
||||||
|
|
||||||
|
_progressChanged: function(secondaryProgress, value, min, max) {
|
||||||
|
secondaryProgress = this._clampValue(secondaryProgress);
|
||||||
|
value = this._clampValue(value);
|
||||||
|
|
||||||
|
var secondaryRatio = this._calcRatio(secondaryProgress) * 100;
|
||||||
|
var mainRatio = this._calcRatio(value) * 100;
|
||||||
|
|
||||||
|
this._setSecondaryRatio(secondaryRatio);
|
||||||
|
this._transformProgress(this.$.secondaryProgress, secondaryRatio);
|
||||||
|
this._transformProgress(this.$.primaryProgress, mainRatio);
|
||||||
|
|
||||||
|
this.secondaryProgress = secondaryProgress;
|
||||||
|
|
||||||
|
this.setAttribute('aria-valuenow', value);
|
||||||
|
this.setAttribute('aria-valuemin', min);
|
||||||
|
this.setAttribute('aria-valuemax', max);
|
||||||
|
},
|
||||||
|
|
||||||
|
_disabledChanged: function(disabled) {
|
||||||
|
this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
|
||||||
|
},
|
||||||
|
|
||||||
|
_hideSecondaryProgress: function(secondaryRatio) {
|
||||||
|
return secondaryRatio === 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
148
dashboard-ui/bower_components/paper-progress/test/basic.html
vendored
Normal file
148
dashboard-ui/bower_components/paper-progress/test/basic.html
vendored
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
<!doctype html>
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>paper-progress test</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
|
||||||
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||||
|
<script src="../../web-component-tester/browser.js"></script>
|
||||||
|
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||||
|
|
||||||
|
<link rel="import" href="../paper-progress.html">
|
||||||
|
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<test-fixture id="trivialProgress">
|
||||||
|
<template>
|
||||||
|
<paper-progress></paper-progress>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="transitingProgress">
|
||||||
|
<template>
|
||||||
|
<paper-progress class="transiting"></paper-progress>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
suite('basic features', function() {
|
||||||
|
var progress;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
progress = fixture('trivialProgress');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('check default', function() {
|
||||||
|
assert.equal(progress.min, 0);
|
||||||
|
assert.equal(progress.max, 100);
|
||||||
|
assert.equal(progress.value, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set value', function(done) {
|
||||||
|
progress.value = 50;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, 50);
|
||||||
|
// test clamp value
|
||||||
|
progress.value = 60.1;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, 60);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set max', function(done) {
|
||||||
|
progress.max = 10;
|
||||||
|
progress.value = 11;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, progress.max);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('test ratio', function(done) {
|
||||||
|
progress.max = 10;
|
||||||
|
progress.value = 5;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.ratio, 50);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('test secondary ratio', function(done) {
|
||||||
|
progress.max = 10;
|
||||||
|
progress.secondaryProgress = 5;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.secondaryRatio, 50);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set min', function(done) {
|
||||||
|
progress.min = 10
|
||||||
|
progress.max = 50;
|
||||||
|
progress.value = 30;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.ratio, 50);
|
||||||
|
progress.value = 0;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, progress.min);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set step', function(done) {
|
||||||
|
progress.min = 0;
|
||||||
|
progress.max = 10;
|
||||||
|
progress.value = 5.1;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, 5);
|
||||||
|
progress.step = 0.1;
|
||||||
|
progress.value = 5.1;
|
||||||
|
asyncPlatformFlush(function() {
|
||||||
|
assert.equal(progress.value, 5.1);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
suite('transiting class', function() {
|
||||||
|
var progress;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
progress = fixture('transitingProgress');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('progress bars', function() {
|
||||||
|
var stylesForPrimaryProgress = window.getComputedStyle(progress.$.primaryProgress);
|
||||||
|
var stylesForSecondaryProgress = window.getComputedStyle(progress.$.secondaryProgress);
|
||||||
|
var transitionProp = stylesForPrimaryProgress['transition-property'];
|
||||||
|
|
||||||
|
assert.isTrue(transitionProp === 'transform' || transitionProp === '-webkit-transform');
|
||||||
|
assert.equal(stylesForPrimaryProgress['transition-duration'], '0.08s');
|
||||||
|
|
||||||
|
transitionProp = stylesForSecondaryProgress['transition-property'];
|
||||||
|
|
||||||
|
assert.isTrue(transitionProp === 'transform' || transitionProp === '-webkit-transform');
|
||||||
|
assert.equal(stylesForSecondaryProgress['transition-duration'], '0.08s');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
24
dashboard-ui/bower_components/paper-progress/test/index.html
vendored
Normal file
24
dashboard-ui/bower_components/paper-progress/test/index.html
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html><!--
|
||||||
|
@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
|
||||||
|
--><html><head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||||
|
<title>Tests</title>
|
||||||
|
<script src="../../web-component-tester/browser.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
WCT.loadSuites([
|
||||||
|
'basic.html',
|
||||||
|
'basic.html?dom=shadow'
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
.scrollContainer {
|
.scrollContainer {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tmla-mask {
|
.tmla-mask {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['browser', 'hammer', 'css!./navdrawer'], function (browser, Hammer) {
|
define(['browser', 'hammer', 'css!./navdrawer', 'scrollStyles'], function (browser, Hammer) {
|
||||||
|
|
||||||
return function (options) {
|
return function (options) {
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
var draggingY;
|
var draggingY;
|
||||||
|
|
||||||
var scrollContainer = options.target.querySelector('.scrollContainer');
|
var scrollContainer = options.target.querySelector('.scrollContainer');
|
||||||
|
scrollContainer.classList.add('smoothScrollY');
|
||||||
|
|
||||||
var TouchMenuLA = function () {
|
var TouchMenuLA = function () {
|
||||||
self = this;
|
self = this;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
contain: style;
|
contain: style;
|
||||||
|
|
||||||
/*box-shadow: 0 1px 4px 0 rgba(0,0,0,0.37);*/
|
/*box-shadow: 0 1px 4px 0 rgba(0,0,0,0.37);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
query: {
|
query: {
|
||||||
SortBy: "SortName",
|
SortBy: "SortName",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
IncludeItemTypes: "Audio,MusicVideo,MusicAlbum",
|
IncludeItemTypes: "Audio,MusicAlbum",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "DateCreated,SyncInfo,ItemCounts",
|
Fields: "DateCreated,SyncInfo,ItemCounts",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
background: #e1f5f3;
|
background: #e1f5f3;
|
||||||
}
|
}
|
||||||
|
|
||||||
button[is="emby-button"].fab.blue {
|
button[is="emby-button"].fab.blue, paper-fab.blue {
|
||||||
background: #03a9f4;
|
background: #03a9f4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue