mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
003fd2ae7e
commit
35cc50701d
1155 changed files with 62261 additions and 84 deletions
47
dashboard-ui/bower_components/iron-demo-helpers/.bower.json
vendored
Normal file
47
dashboard-ui/bower_components/iron-demo-helpers/.bower.json
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "iron-demo-helpers",
|
||||
"version": "1.0.3",
|
||||
"description": "Utility classes to make building demo pages easier",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"demo"
|
||||
],
|
||||
"main": "demo-snippet.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-demo-helpers.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-demo-helpers",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.1.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"marked-element": "polymerelements/marked-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.1.2",
|
||||
"paper-styles": "PolymerElements/paper-styles#1.0.0",
|
||||
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "dbcd14c318654f0e42d391af409efff9a8a241a2"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-demo-helpers.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-demo-helpers"
|
||||
}
|
1
dashboard-ui/bower_components/iron-demo-helpers/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/iron-demo-helpers/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bower_components/
|
72
dashboard-ui/bower_components/iron-demo-helpers/CONTRIBUTING.md
vendored
Normal file
72
dashboard-ui/bower_components/iron-demo-helpers/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
<!--
|
||||
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 :)
|
||||
-->
|
||||
# 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: [http://jsbin.com/cagaye](http://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 using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, #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!
|
38
dashboard-ui/bower_components/iron-demo-helpers/bower.json
vendored
Normal file
38
dashboard-ui/bower_components/iron-demo-helpers/bower.json
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"name": "iron-demo-helpers",
|
||||
"version": "1.0.3",
|
||||
"description": "Utility classes to make building demo pages easier",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"demo"
|
||||
],
|
||||
"main": "demo-snippet.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-demo-helpers.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-demo-helpers",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.1.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"marked-element": "polymerelements/marked-element#^1.0.0",
|
||||
"prism-element": "PolymerElements/prism-element#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.1.2",
|
||||
"paper-styles": "PolymerElements/paper-styles#1.0.0",
|
||||
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0"
|
||||
}
|
||||
}
|
80
dashboard-ui/bower_components/iron-demo-helpers/demo-pages-shared-styles.html
vendored
Normal file
80
dashboard-ui/bower_components/iron-demo-helpers/demo-pages-shared-styles.html
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
<!--
|
||||
@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="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-styles/typography.html">
|
||||
<link rel="import" href="../paper-styles/shadow.html">
|
||||
|
||||
<dom-module id="demo-pages-shared-styles">
|
||||
<template>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto', 'Noto', sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 24px;
|
||||
background-color: var(--paper-grey-50);
|
||||
}
|
||||
|
||||
.horizontal-section-container {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center-justified);
|
||||
@apply(--layout-wrap);
|
||||
}
|
||||
|
||||
.vertical-section-container {
|
||||
@apply(--layout-vertical);
|
||||
@apply(--center-justified);
|
||||
}
|
||||
|
||||
.horizontal-section {
|
||||
background-color: white;
|
||||
padding: 24px;
|
||||
margin-right: 24px;
|
||||
min-width: 200px;
|
||||
|
||||
@apply(--shadow-elevation-2dp);
|
||||
}
|
||||
|
||||
.vertical-section {
|
||||
background-color: white;
|
||||
padding: 24px;
|
||||
margin: 0 24px 24px 24px;
|
||||
|
||||
@apply(--shadow-elevation-2dp);
|
||||
}
|
||||
|
||||
.centered {
|
||||
max-width: 400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
code {
|
||||
color: var(--google-grey-700);
|
||||
}
|
||||
|
||||
demo-snippet {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
demo-snippet.centered-demo {
|
||||
--demo-snippet-demo: {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-wrap);
|
||||
@apply(--layout-center-justified);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
132
dashboard-ui/bower_components/iron-demo-helpers/demo-snippet.html
vendored
Normal file
132
dashboard-ui/bower_components/iron-demo-helpers/demo-snippet.html
vendored
Normal file
|
@ -0,0 +1,132 @@
|
|||
<!--
|
||||
@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="../prism-element/prism-highlighter.html">
|
||||
<link rel="import" href="../marked-element/marked-element.html">
|
||||
<link rel="import" href="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-styles/shadow.html">
|
||||
|
||||
|
||||
<!--
|
||||
`demo-snippet` is a helper element that displays the source of a code snippet and
|
||||
its rendered demo. It can be used for both native elements and
|
||||
Polymer elements.
|
||||
|
||||
Example of a native element demo
|
||||
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<input type="date">
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
Example of a Polymer <paper-checkbox> demo
|
||||
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<paper-checkbox>Checkbox</paper-checkbox>
|
||||
<paper-checkbox checked>Checkbox</paper-checkbox>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
### Styling
|
||||
|
||||
The following custom properties and mixins are available for styling:
|
||||
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--demo-snippet` | Mixin applied to the entire element | `{}`
|
||||
`--demo-snippet-demo` | Mixin applied to just the demo section | `{}`
|
||||
`--demo-snippet-code` | Mixin applied to just the code section | `{}`
|
||||
|
||||
@element demo-snippet
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="demo-snippet">
|
||||
<template>
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
@apply(--shadow-elevation-2dp);
|
||||
@apply(--demo-snippet);
|
||||
}
|
||||
|
||||
.demo {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: white;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
@apply(--demo-snippet-demo);
|
||||
}
|
||||
|
||||
.code {
|
||||
padding: 0 20px;
|
||||
margin: 0;
|
||||
background-color: #fafafa;
|
||||
font-size: 13px;
|
||||
overflow: auto;
|
||||
@apply(--demo-snippet-code);
|
||||
}
|
||||
|
||||
.code > pre {
|
||||
margin: 0;
|
||||
padding: 0 0 10px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<prism-highlighter></prism-highlighter>
|
||||
|
||||
<div class="demo">
|
||||
<content id="content"></content>
|
||||
</div>
|
||||
|
||||
<marked-element markdown=[[_markdown]] id="marked">
|
||||
<div class="markdown-html code"></div>
|
||||
</marked-element>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'demo-snippet',
|
||||
|
||||
properties: {
|
||||
_markdown: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
var template = Polymer.dom(this).queryDistributedElements('template')[0];
|
||||
|
||||
// If there's no template, render empty code.
|
||||
if (!template) {
|
||||
this._markdown = '```\n```';
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO(noms): When marked-element/issues/23 lands, this will become
|
||||
// a public method and will need to be updated.
|
||||
var snippet = this.$.marked._unindent(template.innerHTML);
|
||||
|
||||
// Boolean properties are displayed as checked="", so remove the ="" bit.
|
||||
snippet = snippet.replace(/=""/g, '');
|
||||
|
||||
this._markdown = '```\n' + snippet + '\n' + '```';
|
||||
|
||||
// Stamp the template.
|
||||
Polymer.dom(this).appendChild(document.importNode(template.content, true));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</dom-module>
|
80
dashboard-ui/bower_components/iron-demo-helpers/demo/index.html
vendored
Normal file
80
dashboard-ui/bower_components/iron-demo-helpers/demo/index.html
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
<!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 lang="en">
|
||||
<head>
|
||||
<title>demo-snippet demo</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../../paper-styles/color.html">
|
||||
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
|
||||
<link rel="import" href="../../paper-checkbox/paper-checkbox.html">
|
||||
<link rel="import" href="../demo-snippet.html">
|
||||
<link rel="import" href="../demo-pages-shared-styles.html">
|
||||
|
||||
<style is="custom-style" include="demo-pages-shared-styles">
|
||||
.vertical-section-container {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
paper-checkbox {
|
||||
display: block;
|
||||
margin-right: 24px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="vertical-section-container centered">
|
||||
<h4>Demo of a native element</h4>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<input type="date">
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Demo of a custom element</h4>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<paper-checkbox>Checkbox</paper-checkbox>
|
||||
<paper-checkbox checked>Checkbox</paper-checkbox>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Demo of an element with custom styles</h4>
|
||||
<demo-snippet class="centered-demo small-text">
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
paper-checkbox.blue {
|
||||
--paper-checkbox-checked-color: var(--paper-blue-500);
|
||||
--paper-checkbox-checked-ink-color: var(--paper-blue-500);
|
||||
--paper-checkbox-unchecked-color: var(--paper-blue-900);
|
||||
--paper-checkbox-unchecked-ink-color: var(--paper-blue-900);
|
||||
--paper-checkbox-label-color: var(--paper-blue-500);
|
||||
}
|
||||
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-label-color: var(--paper-red-500);
|
||||
}
|
||||
</style>
|
||||
|
||||
<paper-checkbox class="blue">Checkbox</paper-checkbox>
|
||||
<paper-checkbox checked class="red">Checkbox</paper-checkbox>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
28
dashboard-ui/bower_components/iron-demo-helpers/index.html
vendored
Normal file
28
dashboard-ui/bower_components/iron-demo-helpers/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-tooltip</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>
|
141
dashboard-ui/bower_components/iron-demo-helpers/test/basic.html
vendored
Normal file
141
dashboard-ui/bower_components/iron-demo-helpers/test/basic.html
vendored
Normal file
|
@ -0,0 +1,141 @@
|
|||
<!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>demo-snippet 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>
|
||||
<link rel="import" href="../demo-snippet.html">
|
||||
<script src="../../iron-test-helpers/test-helpers.js"></script>
|
||||
<link rel="import" href="../../paper-checkbox/paper-checkbox.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="empty-demo">
|
||||
<template>
|
||||
<demo-snippet></demo-snippet>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="native-demo">
|
||||
<template>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<input disabled>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="custom-demo">
|
||||
<template>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<paper-checkbox disabled></paper-checkbox>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="demo-with-attributes">
|
||||
<template>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<input disabled type="date">
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
|
||||
<script>
|
||||
// TODO(notwaldorf): Tests are currently very unhappy in IE
|
||||
function isNotIE() {
|
||||
return !navigator.userAgent.match(/MSIE/i);
|
||||
}
|
||||
|
||||
suite('display', function() {
|
||||
var emptyHeight;
|
||||
|
||||
setup(function() {
|
||||
var emptyDemo = fixture('empty-demo');
|
||||
emptyHeight = emptyDemo.getBoundingClientRect().height;
|
||||
});
|
||||
|
||||
test('can render native elements', skipUnless(isNotIE, function() {
|
||||
var element = fixture('native-demo');
|
||||
|
||||
// Render the distributed children.
|
||||
Polymer.dom.flush();
|
||||
|
||||
var rect = element.getBoundingClientRect();
|
||||
expect(rect.height).to.be.greaterThan(emptyHeight);
|
||||
|
||||
// The demo is rendered in the light dom, so it should exist, and
|
||||
// it should respect the demo element's attributes, and not make up
|
||||
// new ones.
|
||||
var input = Polymer.dom(element).querySelector('input')
|
||||
expect(input).to.be.ok;
|
||||
expect(input.disabled).to.be.true;
|
||||
expect(input.checked).to.be.false;
|
||||
|
||||
var markdownElement = element.$.marked;
|
||||
expect(markdownElement.markdown).to.be.equal('```\n\n<input disabled>\n\n```');
|
||||
}));
|
||||
|
||||
test('can render custom elements', skipUnless(isNotIE, function() {
|
||||
var element = fixture('custom-demo');
|
||||
|
||||
// Render the distributed children.
|
||||
Polymer.dom.flush();
|
||||
|
||||
var rect = element.getBoundingClientRect();
|
||||
expect(rect.height).to.be.greaterThan(emptyHeight);
|
||||
|
||||
// The demo is rendered in the light dom, so it should exist, and
|
||||
// it should respect the demo element's attributes, and not make up
|
||||
// new ones.
|
||||
var checkbox = Polymer.dom(element).querySelector('paper-checkbox')
|
||||
expect(checkbox).to.be.ok;
|
||||
expect(checkbox.disabled).to.be.true;
|
||||
expect(checkbox.checked).to.be.false;
|
||||
|
||||
var markdownElement = element.$.marked;
|
||||
expect(markdownElement.markdown).to.be.equal(
|
||||
'```\n\n<paper-checkbox disabled></paper-checkbox>\n\n```');
|
||||
}));
|
||||
});
|
||||
|
||||
suite('parsing', function() {
|
||||
var element;
|
||||
|
||||
setup(function() {
|
||||
var element = fixture('demo-with-attributes');
|
||||
});
|
||||
|
||||
test('preserves attributes', skipUnless(isNotIE, function() {
|
||||
var element = fixture('demo-with-attributes');
|
||||
|
||||
// Render the distributed children.
|
||||
Polymer.dom.flush();
|
||||
|
||||
var markdownElement = element.$.marked;
|
||||
expect(markdownElement.markdown).to.be.equal(
|
||||
'```\n\n<input disabled type="date">\n\n```');
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
26
dashboard-ui/bower_components/iron-demo-helpers/test/index.html
vendored
Normal file
26
dashboard-ui/bower_components/iron-demo-helpers/test/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.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>demo-snippet tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html',
|
||||
'basic.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue