mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update tv config
This commit is contained in:
parent
66d87717d9
commit
74fad00abe
37 changed files with 1783 additions and 71 deletions
46
dashboard-ui/bower_components/paper-toggle-button/.bower.json
vendored
Normal file
46
dashboard-ui/bower_components/paper-toggle-button/.bower.json
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "paper-toggle-button",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design toggle button control",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"toggle",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-toggle-button"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-toggle-button",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "9891ee6a4af756b198290c14137498f78d97593d"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-toggle-button.git",
|
||||
"_target": "~1.0.5",
|
||||
"_originalSource": "PolymerElements/paper-toggle-button",
|
||||
"_direct": true
|
||||
}
|
1
dashboard-ui/bower_components/paper-toggle-button/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/paper-toggle-button/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bower_components
|
36
dashboard-ui/bower_components/paper-toggle-button/bower.json
vendored
Normal file
36
dashboard-ui/bower_components/paper-toggle-button/bower.json
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "paper-toggle-button",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design toggle button control",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"toggle",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-toggle-button"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-toggle-button",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
105
dashboard-ui/bower_components/paper-toggle-button/demo/index.html
vendored
Normal file
105
dashboard-ui/bower_components/paper-toggle-button/demo/index.html
vendored
Normal file
|
@ -0,0 +1,105 @@
|
|||
<!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>
|
||||
<title>paper-toggle-button 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/demo-pages.html">
|
||||
<link rel="import" href="../paper-toggle-button.html">
|
||||
|
||||
<style is="custom-style">
|
||||
.line {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.line span {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
paper-toggle-button.blue {
|
||||
--paper-toggle-button-checked-bar-color: var(--paper-light-blue-500);
|
||||
--paper-toggle-button-checked-button-color: var(--paper-light-blue-500);
|
||||
--paper-toggle-button-checked-ink-color: var(--paper-light-blue-500);
|
||||
--paper-toggle-button-unchecked-bar-color: var(--paper-light-blue-900);
|
||||
--paper-toggle-button-unchecked-button-color: var(--paper-light-blue-900);
|
||||
--paper-toggle-button-unchecked-ink-color: var(--paper-light-blue-900);
|
||||
}
|
||||
|
||||
paper-toggle-button.red {
|
||||
--paper-toggle-button-checked-bar-color: var(--paper-red-500);
|
||||
--paper-toggle-button-checked-button-color: var(--paper-red-500);
|
||||
--paper-toggle-button-checked-ink-color: var(--paper-red-500);
|
||||
--paper-toggle-button-unchecked-bar-color: var(--paper-red-900);
|
||||
--paper-toggle-button-unchecked-button-color: var(--paper-red-900);
|
||||
--paper-toggle-button-unchecked-ink-color: var(--paper-red-900);
|
||||
}
|
||||
|
||||
paper-toggle-button.green {
|
||||
--paper-toggle-button-checked-bar-color: var(--paper-green-500);
|
||||
--paper-toggle-button-checked-button-color: var(--paper-green-500);
|
||||
--paper-toggle-button-checked-ink-color: var(--paper-green-500);
|
||||
--paper-toggle-button-unchecked-bar-color: var(--paper-green-900);
|
||||
--paper-toggle-button-unchecked-button-color: var(--paper-green-900);
|
||||
--paper-toggle-button-unchecked-ink-color: var(--paper-green-900);
|
||||
}
|
||||
|
||||
paper-toggle-button.orange {
|
||||
--paper-toggle-button-checked-bar-color: var(--paper-orange-500);
|
||||
--paper-toggle-button-checked-button-color: var(--paper-orange-500);
|
||||
--paper-toggle-button-checked-ink-color: var(--paper-orange-500);
|
||||
--paper-toggle-button-unchecked-bar-color: var(--paper-orange-900);
|
||||
--paper-toggle-button-unchecked-button-color: var(--paper-orange-900);
|
||||
--paper-toggle-button-unchecked-ink-color: var(--paper-orange-900);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="horizontal-section-container">
|
||||
<div>
|
||||
<h4>Enabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<div class="line"><paper-toggle-button></paper-toggle-button><span>Oxygen</span></div>
|
||||
<div class="line"><paper-toggle-button></paper-toggle-button><span>Carbon</span></div>
|
||||
<div class="line"><paper-toggle-button checked></paper-toggle-button><span>Hydrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked></paper-toggle-button><span>Nitrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked></paper-toggle-button><span>Calcium</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Disabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<div class="line"><paper-toggle-button disabled></paper-toggle-button><span>Oxygen</span></div>
|
||||
<div class="line"><paper-toggle-button disabled></paper-toggle-button><span>Carbon</span></div>
|
||||
<div class="line"><paper-toggle-button checked disabled></paper-toggle-button><span>Hydrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked disabled></paper-toggle-button><span>Nitrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked disabled></paper-toggle-button><span>Calcium</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<div class="line"><paper-toggle-button class="blue"></paper-toggle-button><span>Oxygen</span></div>
|
||||
<div class="line"><paper-toggle-button class="red"></paper-toggle-button><span>Carbon</span></div>
|
||||
<div class="line"><paper-toggle-button checked class="orange"></paper-toggle-button><span>Hydrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked class="green"></paper-toggle-button><span>Nitrogen</span></div>
|
||||
<div class="line"><paper-toggle-button checked class="blue"></paper-toggle-button><span>Calcium</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
22
dashboard-ui/bower_components/paper-toggle-button/hero.svg
vendored
Normal file
22
dashboard-ui/bower_components/paper-toggle-button/hero.svg
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?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">
|
||||
<g>
|
||||
<circle cx="123.8" cy="63" r="15.7"/>
|
||||
<path d="M123,77H98.5c-7.7,0-14-6.3-14-14s6.3-14,14-14H123c7.7,0,14,6.3,14,14S130.7,77,123,77z M98.5,51c-6.6,0-12,5.4-12,12
|
||||
s5.4,12,12,12H123c6.6,0,12-5.4,12-12s-5.4-12-12-12H98.5z"/>
|
||||
</g>
|
||||
<g id="ic_x5F_add_x0D_">
|
||||
</g>
|
||||
</g>
|
||||
<g id="Guides">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 872 B |
26
dashboard-ui/bower_components/paper-toggle-button/index.html
vendored
Normal file
26
dashboard-ui/bower_components/paper-toggle-button/index.html
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!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
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
|
||||
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
|
||||
-->
|
||||
<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>
|
109
dashboard-ui/bower_components/paper-toggle-button/paper-toggle-button.css
vendored
Normal file
109
dashboard-ui/bower_components/paper-toggle-button/paper-toggle-button.css
vendored
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
@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
|
||||
*/
|
||||
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline:none;
|
||||
}
|
||||
|
||||
:host .toggle-bar {
|
||||
background-color: var(--paper-toggle-button-unchecked-bar-color, #000000);
|
||||
}
|
||||
|
||||
:host .toggle-button {
|
||||
background-color: var(--paper-toggle-button-unchecked-button-color, --paper-grey-50);
|
||||
}
|
||||
|
||||
:host([checked]) .toggle-bar {
|
||||
background-color: var(--paper-toggle-button-checked-bar-color, --google-green-500);
|
||||
}
|
||||
|
||||
:host([checked]) .toggle-button {
|
||||
background-color: var(--paper-toggle-button-checked-button-color, --google-green-500);
|
||||
}
|
||||
|
||||
:host .toggle-ink {
|
||||
color: var(--paper-toggle-button-unchecked-ink-color, --primary-text-color);
|
||||
}
|
||||
|
||||
:host([checked]) .toggle-ink {
|
||||
color: var(--paper-toggle-button-checked-ink-color, --google-green-500);
|
||||
}
|
||||
|
||||
/* ID selectors should not be overriden by users. */
|
||||
|
||||
#toggleContainer {
|
||||
position: relative;
|
||||
width: 36px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
#toggleBar {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
pointer-events: none;
|
||||
opacity: 0.4;
|
||||
transition: background-color linear .08s;
|
||||
}
|
||||
|
||||
:host([checked]) #toggleBar {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
:host([disabled]) #toggleBar {
|
||||
background-color: #000;
|
||||
opacity: 0.12;
|
||||
}
|
||||
|
||||
#toggleButton {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);
|
||||
transition: -webkit-transform linear .08s, background-color linear .08s;
|
||||
transition: transform linear .08s, background-color linear .08s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
#toggleButton.dragging {
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
:host([checked]) #toggleButton {
|
||||
-webkit-transform: translate(16px, 0);
|
||||
transform: translate(16px, 0);
|
||||
}
|
||||
|
||||
:host([disabled]) #toggleButton {
|
||||
background-color: #bdbdbd;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#ink {
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
left: -14px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
174
dashboard-ui/bower_components/paper-toggle-button/paper-toggle-button.html
vendored
Normal file
174
dashboard-ui/bower_components/paper-toggle-button/paper-toggle-button.html
vendored
Normal file
|
@ -0,0 +1,174 @@
|
|||
<!--
|
||||
@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="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-styles/default-theme.html">
|
||||
<link rel="import" href="../paper-ripple/paper-ripple.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||
|
||||
<!--
|
||||
`paper-toggle-button` provides a ON/OFF switch that user can toggle the state
|
||||
by tapping or by dragging the switch.
|
||||
|
||||
Example:
|
||||
|
||||
<paper-toggle-button></paper-toggle-button>
|
||||
|
||||
### Styling
|
||||
|
||||
The following custom properties and mixins are available for styling:
|
||||
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--paper-toggle-button-unchecked-bar-color` | Slider color when the input is not checked | `#000000`
|
||||
`--paper-toggle-button-unchecked-button-color` | Button color when the input is not checked | `--paper-grey-50`
|
||||
`--paper-toggle-button-unchecked-ink-color` | Selected/focus ripple color when the input is not checked | `--dark-primary-color`
|
||||
`--paper-toggle-button-checked-bar-color` | Slider button color when the input is checked | `--google-green-500`
|
||||
`--paper-toggle-button-checked-button-color` | Button color when the input is checked | `--google-green-500`
|
||||
`--paper-toggle-button-checked-ink-color` | Selected/focus ripple color when the input is checked | `--google-green-500`
|
||||
|
||||
@group Paper Elements
|
||||
@element paper-toggle-button
|
||||
@hero hero.svg
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="paper-toggle-button">
|
||||
|
||||
<link rel="import" type="css" href="paper-toggle-button.css">
|
||||
|
||||
<template>
|
||||
|
||||
<div id="toggleContainer">
|
||||
<div id="toggleBar" class="toggle-bar"></div>
|
||||
<div id="toggleButton" class="toggle-button">
|
||||
<paper-ripple id="ink" class="toggle-ink circle" recenters></paper-ripple>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'paper-toggle-button',
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperInkyFocusBehavior
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
role: 'button',
|
||||
'aria-pressed': 'false',
|
||||
tabindex: 0
|
||||
},
|
||||
|
||||
properties: {
|
||||
/**
|
||||
* Fired when the checked state changes due to user interaction.
|
||||
*
|
||||
* @event change
|
||||
*/
|
||||
/**
|
||||
* Fired when the checked state changes.
|
||||
*
|
||||
* @event iron-change
|
||||
*/
|
||||
/**
|
||||
* Gets or sets the state, `true` is checked and `false` is unchecked.
|
||||
*
|
||||
* @attribute checked
|
||||
* @type boolean
|
||||
* @default false
|
||||
*/
|
||||
checked: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
reflectToAttribute: true,
|
||||
notify: true,
|
||||
observer: '_checkedChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the button toggles the active state with each tap or press
|
||||
* of the spacebar.
|
||||
*
|
||||
* @attribute toggles
|
||||
* @type boolean
|
||||
* @default true
|
||||
*/
|
||||
toggles: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
reflectToAttribute: true
|
||||
}
|
||||
},
|
||||
|
||||
listeners: {
|
||||
track: '_ontrack'
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this._isReady = true;
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
_buttonStateChanged: function() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
if (this._isReady) {
|
||||
this.checked = this.active;
|
||||
}
|
||||
},
|
||||
|
||||
_checkedChanged: function(checked) {
|
||||
this.active = this.checked;
|
||||
this.fire('iron-change');
|
||||
},
|
||||
|
||||
_ontrack: function(event) {
|
||||
var track = event.detail;
|
||||
if (track.state === 'start') {
|
||||
this._trackStart(track);
|
||||
} else if (track.state === 'track') {
|
||||
this._trackMove(track);
|
||||
} else if (track.state === 'end') {
|
||||
this._trackEnd(track);
|
||||
}
|
||||
},
|
||||
|
||||
_trackStart: function(track) {
|
||||
this._width = this.$.toggleBar.offsetWidth / 2;
|
||||
/*
|
||||
* keep an track-only check state to keep the dragging behavior smooth
|
||||
* while toggling activations
|
||||
*/
|
||||
this._trackChecked = this.checked;
|
||||
this.$.toggleButton.classList.add('dragging');
|
||||
},
|
||||
|
||||
_trackMove: function(track) {
|
||||
var dx = track.dx;
|
||||
this._x = Math.min(this._width,
|
||||
Math.max(0, this._trackChecked ? this._width + dx : dx));
|
||||
this.translate3d(this._x + 'px', 0, 0, this.$.toggleButton);
|
||||
this._userActivate(this._x > (this._width / 2));
|
||||
},
|
||||
|
||||
_trackEnd: function(track) {
|
||||
this.$.toggleButton.classList.remove('dragging');
|
||||
this.transform('', this.$.toggleButton);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</dom-module>
|
86
dashboard-ui/bower_components/paper-toggle-button/test/basic.html
vendored
Normal file
86
dashboard-ui/bower_components/paper-toggle-button/test/basic.html
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
<!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-toggle-button basic tests</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>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="../paper-toggle-button.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="Basic">
|
||||
<template>
|
||||
<paper-toggle-button id="button"></paper-toggle-button>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('defaults', function() {
|
||||
var b1;
|
||||
|
||||
setup(function() {
|
||||
b1 = fixture('Basic');
|
||||
});
|
||||
|
||||
test('check button via click', function() {
|
||||
b1.addEventListener('click', function() {
|
||||
assert.isTrue(b1.getAttribute('aria-checked'));
|
||||
assert.isTrue(b1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(b1);
|
||||
});
|
||||
|
||||
test('toggle button via click', function() {
|
||||
b1.checked = true;
|
||||
b1.addEventListener('click', function() {
|
||||
assert.isFalse(b1.getAttribute('aria-checked'));
|
||||
assert.isFalse(b1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(b1);
|
||||
});
|
||||
|
||||
test('disabled button cannot be clicked', function() {
|
||||
b1.disabled = true;
|
||||
b1.addEventListener('click', function() {
|
||||
assert.isTrue(b1.getAttribute('aria-checked'));
|
||||
assert.isTrue(b1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(b1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
var b1;
|
||||
|
||||
setup(function() {
|
||||
b1 = fixture('Basic');
|
||||
});
|
||||
|
||||
test('has aria role "button"', function() {
|
||||
console.log(b1.getAttribute('role'));
|
||||
assert.isTrue(b1.getAttribute('role') == 'button');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
25
dashboard-ui/bower_components/paper-toggle-button/test/index.html
vendored
Normal file
25
dashboard-ui/bower_components/paper-toggle-button/test/index.html
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!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>paper-toggle-button tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue