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
47
dashboard-ui/bower_components/paper-checkbox/.bower.json
vendored
Normal file
47
dashboard-ui/bower_components/paper-checkbox/.bower.json
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"paper",
|
||||
"checkbox",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-checkbox"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-checkbox",
|
||||
"ignore": [],
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^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"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "af864401daab761d2fb7e6eadddb3cd659be8f85"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||
"_target": "~1.0.5",
|
||||
"_originalSource": "PolymerElements/paper-checkbox",
|
||||
"_direct": true
|
||||
}
|
1
dashboard-ui/bower_components/paper-checkbox/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/paper-checkbox/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bower_components
|
37
dashboard-ui/bower_components/paper-checkbox/bower.json
vendored
Normal file
37
dashboard-ui/bower_components/paper-checkbox/bower.json
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"paper",
|
||||
"checkbox",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-checkbox"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-checkbox",
|
||||
"ignore": [],
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
93
dashboard-ui/bower_components/paper-checkbox/demo/index.html
vendored
Normal file
93
dashboard-ui/bower_components/paper-checkbox/demo/index.html
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
<!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-checkbox 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-checkbox.html">
|
||||
|
||||
<style is="custom-style">
|
||||
|
||||
paper-checkbox {
|
||||
display: block;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
paper-checkbox.blue {
|
||||
--paper-checkbox-checked-color: var(--paper-light-blue-500);
|
||||
--paper-checkbox-checked-ink-color: var(--paper-light-blue-500);
|
||||
--paper-checkbox-unchecked-color: var(--paper-light-blue-900);
|
||||
--paper-checkbox-unchecked-ink-color: var(--paper-light-blue-900);
|
||||
}
|
||||
|
||||
paper-checkbox.red {
|
||||
--paper-checkbox-checked-color: var(--paper-red-500);
|
||||
--paper-checkbox-checked-ink-color: var(--paper-red-500);
|
||||
--paper-checkbox-unchecked-color: var(--paper-red-900);
|
||||
--paper-checkbox-unchecked-ink-color: var(--paper-red-900);
|
||||
}
|
||||
|
||||
paper-checkbox.green {
|
||||
--paper-checkbox-checked-color: var(--paper-green-500);
|
||||
--paper-checkbox-checked-ink-color: var(--paper-green-500);
|
||||
--paper-checkbox-unchecked-color: var(--paper-green-900);
|
||||
--paper-checkbox-unchecked-ink-color: var(--paper-green-900);
|
||||
}
|
||||
|
||||
paper-checkbox.orange {
|
||||
--paper-checkbox-checked-color: var(--paper-orange-500);
|
||||
--paper-checkbox-checked-ink-color: var(--paper-orange-500);
|
||||
--paper-checkbox-unchecked-color: var(--paper-orange-900);
|
||||
--paper-checkbox-unchecked-ink-color: var(--paper-orange-900);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="horizontal-section-container">
|
||||
<div>
|
||||
<h4>Enabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-checkbox>Oxygen</paper-checkbox>
|
||||
<paper-checkbox>Carbon</paper-checkbox>
|
||||
<paper-checkbox checked>Hydrogen</paper-checkbox>
|
||||
<paper-checkbox checked>Nitrogen</paper-checkbox>
|
||||
<paper-checkbox checked>Calcium</paper-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Disabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-checkbox disabled>Oxygen</paper-checkbox>
|
||||
<paper-checkbox disabled>Carbon</paper-checkbox>
|
||||
<paper-checkbox checked disabled>Hydrogen</paper-checkbox>
|
||||
<paper-checkbox checked disabled>Nitrogen</paper-checkbox>
|
||||
<paper-checkbox checked disabled>Calcium</paper-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-checkbox class="blue" checked>Oxygen</paper-checkbox>
|
||||
<paper-checkbox class="red" checked>Carbon</paper-checkbox>
|
||||
<paper-checkbox class="orange" checked>Hydrogen</paper-checkbox>
|
||||
<paper-checkbox class="green" checked>Nitrogen</paper-checkbox>
|
||||
<paper-checkbox class="blue" checked>Calcium</paper-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
30
dashboard-ui/bower_components/paper-checkbox/index.html
vendored
Normal file
30
dashboard-ui/bower_components/paper-checkbox/index.html
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!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-checkbox</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
17
dashboard-ui/bower_components/paper-checkbox/metadata.html
vendored
Normal file
17
dashboard-ui/bower_components/paper-checkbox/metadata.html
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2014 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
|
||||
-->
|
||||
<x-meta id="paper-checkbox" label="Checkbox" group="Paper">
|
||||
<template>
|
||||
<paper-checkbox label="click me"></paper-checkbox>
|
||||
</template>
|
||||
<template id="imports">
|
||||
<link rel="import" href="paper-checkbox.html">
|
||||
</template>
|
||||
</x-meta>
|
151
dashboard-ui/bower_components/paper-checkbox/paper-checkbox.css
vendored
Normal file
151
dashboard-ui/bower_components/paper-checkbox/paper-checkbox.css
vendored
Normal file
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
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;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#checkboxContainer {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
-webkit-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
vertical-align: middle;
|
||||
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
||||
}
|
||||
|
||||
:host #ink {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
left: -15px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
color: var(--paper-checkbox-unchecked-ink-color, --primary-text-color);
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host #ink[checked] {
|
||||
color: var(--paper-checkbox-checked-ink-color, --default-primary-color);
|
||||
}
|
||||
|
||||
:host #checkbox {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
border: solid 2px;
|
||||
border-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
-webkit-transition: background-color 140ms, border-color 140ms;
|
||||
transition: background-color 140ms, border-color 140ms;
|
||||
}
|
||||
|
||||
/* checkbox checked animations */
|
||||
#checkbox.checked #checkmark {
|
||||
-webkit-animation: checkmark-expand 140ms ease-out forwards;
|
||||
animation: checkmark-expand 140ms ease-out forwards;
|
||||
}
|
||||
|
||||
@-webkit-keyframes checkmark-expand {
|
||||
0% {
|
||||
top: 9px;
|
||||
left: 6px;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
100% {
|
||||
top: -1px;
|
||||
left: 4px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes checkmark-expand {
|
||||
0% {
|
||||
top: 9px;
|
||||
left: 6px;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
100% {
|
||||
top: -1px;
|
||||
left: 4px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
:host #checkbox.checked {
|
||||
background-color: var(--paper-checkbox-checked-color, --default-primary-color);
|
||||
border-color: var(--paper-checkbox-checked-color, --default-primary-color);
|
||||
}
|
||||
|
||||
:host #checkmark {
|
||||
-webkit-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: 4px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
border-style: solid;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right-width: 2px;
|
||||
border-bottom-width: 2px;
|
||||
border-color: var(--paper-checkbox-checkmark-color, white);
|
||||
}
|
||||
|
||||
/* label */
|
||||
#checkboxLabel {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
padding-left: 8px;
|
||||
white-space: normal;
|
||||
pointer-events: none;
|
||||
color: var(--paper-checkbox-label-color, --primary-text-color);
|
||||
}
|
||||
|
||||
#checkboxLabel[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* disabled state */
|
||||
:host([disabled]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host([disabled]) #checkbox {
|
||||
opacity: 0.5;
|
||||
border-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||||
}
|
||||
|
||||
:host([disabled][checked]) #checkbox {
|
||||
background-color: var(--paper-checkbox-unchecked-color, --primary-text-color);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
:host([disabled]) #checkboxLabel {
|
||||
opacity: 0.65;
|
||||
}
|
153
dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html
vendored
Normal file
153
dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html
vendored
Normal file
|
@ -0,0 +1,153 @@
|
|||
<!--
|
||||
@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-ripple/paper-ripple.html">
|
||||
<link rel="import" href="../paper-styles/default-theme.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||
|
||||
<!--
|
||||
|
||||
`paper-checkbox` is a button that can be either checked or unchecked. User
|
||||
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
||||
to allow user to select multiple options from a set. If you have a single
|
||||
ON/OFF option, avoid using a single checkbox and use `paper-toggle-button`
|
||||
instead.
|
||||
|
||||
Example:
|
||||
|
||||
<paper-checkbox>label</paper-checkbox>
|
||||
|
||||
<paper-checkbox checked> label</paper-checkbox>
|
||||
|
||||
### Styling
|
||||
|
||||
The following custom properties and mixins are available for styling:
|
||||
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--paper-checkbox-unchecked-background-color` | Checkbox background color when the input is not checked | `transparent`
|
||||
`--paper-checkbox-unchecked-color` | Checkbox border color when the input is not checked | `--primary-text-color`
|
||||
`--paper-checkbox-unchecked-ink-color` | Selected/focus ripple color when the input is not checked | `--primary-text-color`
|
||||
`--paper-checkbox-checked-color` | Checkbox color when the input is checked | `--default-primary-color`
|
||||
`--paper-checkbox-checked-ink-color` | Selected/focus ripple color when the input is checked | `--default-primary-color`
|
||||
`--paper-checkbox-checkmark-color` | Checkmark color | `white`
|
||||
`--paper-checkbox-label-color` | Label color | `--primary-text-color`
|
||||
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="paper-checkbox">
|
||||
<link rel="import" type="css" href="paper-checkbox.css">
|
||||
|
||||
<template>
|
||||
|
||||
<div id="checkboxContainer">
|
||||
<paper-ripple id="ink" class="circle" center checked$="[[checked]]"></paper-ripple>
|
||||
<div id="checkbox" class$="[[_computeCheckboxClass(checked)]]">
|
||||
<div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="checkboxLabel" aria-hidden="true"><content></content></div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'paper-checkbox',
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperInkyFocusBehavior
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
role: 'checkbox',
|
||||
'aria-checked': 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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
toggles: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
reflectToAttribute: true
|
||||
}
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
if (Polymer.dom(this).textContent == '') {
|
||||
this.$.checkboxLabel.hidden = true;
|
||||
} else {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent);
|
||||
}
|
||||
this._isReady = true;
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
_buttonStateChanged: function() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
if (this._isReady) {
|
||||
this.checked = this.active;
|
||||
}
|
||||
},
|
||||
|
||||
_checkedChanged: function(checked) {
|
||||
this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
||||
this.active = this.checked;
|
||||
this.fire('iron-change');
|
||||
},
|
||||
|
||||
_computeCheckboxClass: function(checked) {
|
||||
if (checked) {
|
||||
return 'checked';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
||||
_computeCheckmarkClass: function(checked) {
|
||||
if (!checked) {
|
||||
return 'hidden';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
</dom-module>
|
99
dashboard-ui/bower_components/paper-checkbox/test/basic.html
vendored
Normal file
99
dashboard-ui/bower_components/paper-checkbox/test/basic.html
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
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-checkbox 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-checkbox.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="NoLabel">
|
||||
<template>
|
||||
<paper-checkbox id="check1"></paper-checkbox>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="WithLabel">
|
||||
<template>
|
||||
<paper-checkbox id="check2">Batman</paper-checkbox>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('defaults', function() {
|
||||
var c1;
|
||||
|
||||
setup(function() {
|
||||
c1 = fixture('NoLabel');
|
||||
});
|
||||
|
||||
test('check checkbox via click', function() {
|
||||
c1.addEventListener('click', function() {
|
||||
assert.isTrue(c1.getAttribute('aria-checked') == 'true');
|
||||
assert.isTrue(c1.checked);
|
||||
});
|
||||
MockInteractions.tap(c1);
|
||||
});
|
||||
|
||||
test('toggle checkbox via click', function() {
|
||||
c1.checked = true;
|
||||
c1.addEventListener('click', function() {
|
||||
assert.isFalse(c1.getAttribute('aria-checked') != 'false');
|
||||
assert.isFalse(c1.checked);
|
||||
});
|
||||
MockInteractions.tap(c1);
|
||||
});
|
||||
|
||||
test('disabled checkbox cannot be clicked', function() {
|
||||
c1.disabled = true;
|
||||
c1.checked = true;
|
||||
c1.addEventListener('click', function() {
|
||||
assert.isTrue(c1.getAttribute('aria-checked') == 'true');
|
||||
assert.isTrue(c1.checked);
|
||||
});
|
||||
MockInteractions.tap(c1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
var c1;
|
||||
var c2;
|
||||
|
||||
setup(function() {
|
||||
c1 = fixture('NoLabel');
|
||||
c2 = fixture('WithLabel');
|
||||
});
|
||||
|
||||
test('has aria role "checkbox"', function() {
|
||||
assert.isTrue(c1.getAttribute('role') == 'checkbox');
|
||||
assert.isTrue(c2.getAttribute('role') == 'checkbox');
|
||||
});
|
||||
|
||||
test('checkbox with no label has no aria label', function() {
|
||||
assert.isTrue(!c1.getAttribute('aria-label'));
|
||||
});
|
||||
|
||||
test('checkbox with a label sets an aria label', function() {
|
||||
assert.isTrue(c2.getAttribute('aria-label') == "Batman");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
24
dashboard-ui/bower_components/paper-checkbox/test/index.html
vendored
Normal file
24
dashboard-ui/bower_components/paper-checkbox/test/index.html
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
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-checkbox 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