1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -1,6 +1,6 @@
{
"name": "paper-button",
"version": "1.0.8",
"version": "1.0.11",
"description": "Material design button",
"authors": [
"The Polymer Authors"
@ -29,19 +29,21 @@
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0"
},
"_release": "1.0.8",
"ignore": [],
"_release": "1.0.11",
"_resolution": {
"type": "version",
"tag": "v1.0.8",
"commit": "08553a8c5e4d27fc6180bbcfb952f86b38b51345"
"tag": "v1.0.11",
"commit": "7d0f75300372d91835ae7298593d50987d4a610f"
},
"_source": "git://github.com/PolymerElements/paper-button.git",
"_target": "~1.0.1",

View file

@ -0,0 +1,22 @@
language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
env:
global:
- secure: geFs7Ipj7/9knSKT2FEYAB7b/zbmgWFXCgZm7cEcrG71EX/HB1do3spANGOlRly77xaZtNNF1OGYBHIP36DSyMEHRYj6TYtTrPIr2ySeHvoOv0nzYakXdscxBvfI5HJrNiFpld80KoGl8vKfroLNpVLallgumX3diydypolvW1I=
- secure: IILEhg3m49exN5hpxbPP1JA/q+s4v/QpOMbDiXVRV4Uz1XwOPGLCyrAB0ENjwzMCyeOah1Z2MyQSUiPisLheHKvZifhviNqizWN//8EDkg1gkU0R6egGdotD5mBb3UpCD0CNZ8+D0FYwOpdCWCruwr7N+zDUN+6r5H07KP/VeUU=
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"

View 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 users 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 dont be afraid to ask us if you need help with that!

View file

@ -1,6 +1,6 @@
{
"name": "paper-button",
"version": "1.0.8",
"version": "1.0.11",
"description": "Material design button",
"authors": [
"The Polymer Authors"
@ -29,12 +29,14 @@
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*",
"web-component-tester": "polymer/web-component-tester#^3.4.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0"
}
},
"ignore": []
}

View file

@ -19,136 +19,104 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<title>paper-button demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../paper-styles/color.html">
<link rel="import" href="../../paper-styles/demo-pages.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="../../iron-icons/iron-icons.html">
<link rel="import" href="../../paper-styles/color.html">
<link rel="import" href="../paper-button.html">
<style is="custom-style">
.horizontal-section {
min-width: 130px;
<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 500px;
}
paper-button {
display: block;
margin-bottom: 24px;
margin-left: 10px;
margin-right: 10px;
}
paper-button.colorful {
color: #4285f4;
}
paper-button[raised].colorful {
background: #4285f4;
color: #fff;
}
paper-button[toggles] {
transition: all 0.3s;
}
paper-button[toggles][active] {
background-color: rgba(0, 0, 0, 0.25);
}
paper-button[toggles][active].colorful {
background-color: rgba(66, 133, 244, 0.25);
}
paper-button[toggles][active][raised].colorful {
background-color: rgba(66, 133, 244, 0.75);
}
paper-button.blue {
color: var(--paper-light-blue-500);
--paper-button-flat-focus-color: var(--paper-light-blue-50);
}
paper-button.blue:hover {
background: var(--paper-light-blue-50);
}
paper-button.red {
color: var(--paper-red-500);
--paper-button-flat-focus-color: var(--paper-red-50);
}
paper-button.red:hover {
background: var(--paper-red-50);
}
paper-button.green {
color: var(--paper-green-500);
--paper-button-flat-focus-color: var(--paper-green-50);
}
paper-button.green:hover {
background: var(--paper-green-50);
}
paper-button.orange {
color: var(--paper-orange-500);
--paper-button-flat-focus-color: var(--paper-orange-50);
}
paper-button.orange:hover {
background: var(--paper-orange-50);
}
paper-button.hover:hover {
background: #eee;
}
paper-button.ripple {
--paper-button-ink-color: var(--paper-pink-a200);
}
</style>
</head>
<body unresolved>
<div class="horizontal-section-container">
<div>
<h4>Flat</h4>
<div class="horizontal-section">
<paper-button tabindex="0">button</paper-button>
<paper-button tabindex="0" class="colorful">colorful</paper-button>
<paper-button tabindex="0" disabled>disabled</paper-button>
<paper-button tabindex="0" noink>noink</paper-button>
<paper-button tabindex="0" class="colorful custom"><iron-icon icon="check"></iron-icon>ok</paper-button>
<paper-button tabindex="0" class="custom"><iron-icon icon="clear"></iron-icon>cancel</paper-button>
<div class="vertical-section-container centered">
<h3>Buttons can be flat, raised, toggleable, or disabled</h3>
<demo-snippet class="centered-demo">
<template>
<paper-button>link</paper-button>
<paper-button raised>raised</paper-button>
<paper-button toggles raised>toggles</paper-button>
<paper-button disabled>disabled</paper-button>
</template>
</demo-snippet>
</div>
</div>
<h3>Buttons can have icons</h3>
<demo-snippet class="centered-demo">
<template>
<paper-button><iron-icon icon="check"></iron-icon>link</paper-button>
<paper-button raised><iron-icon icon="file-download"></iron-icon>raised</paper-button>
<paper-button toggles raised><iron-icon icon="favorite"></iron-icon>toggles</paper-button>
<paper-button disabled><iron-icon icon="block"></iron-icon>disabled</paper-button>
</template>
</demo-snippet>
<div>
<h4>Raised</h4>
<div class="horizontal-section">
<paper-button tabindex="0" raised>button</paper-button>
<paper-button tabindex="0" raised class="colorful">colorful</paper-button>
<paper-button tabindex="0" raised disabled>disabled</paper-button>
<paper-button tabindex="0" raised noink>noink</paper-button>
<paper-button tabindex="0" raised class="colorful custom"><iron-icon icon="check"></iron-icon>ok</paper-button>
<paper-button tabindex="0" raised class="custom"><iron-icon icon="clear"></iron-icon>cancel</paper-button>
</div>
</div>
<h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
<demo-snippet class="centered-demo">
<template>
<paper-button noink>link</paper-button>
<paper-button raised noink>raised</paper-button>
<paper-button toggles raised noink>toggles</paper-button>
<paper-button disabled noink>disabled</paper-button>
</template>
</demo-snippet>
<div>
<h4>Toggleable</h4>
<div class="horizontal-section">
<paper-button tabindex="0" toggles>button</paper-button>
<paper-button tabindex="0" toggles raised noink>noink</paper-button>
<paper-button tabindex="0" toggles active class="colorful">colorful</paper-button>
<paper-button tabindex="0" toggles raised active class="colorful">colorful</paper-button>
<paper-button tabindex="0" toggles class="colorful custom"><iron-icon icon="check"></iron-icon>ok</paper-button>
<paper-button tabindex="0" toggles class="custom"><iron-icon icon="clear"></iron-icon>cancel</paper-button>
</div>
</div>
<h3>Buttons can be styled using custom properties</h3>
<demo-snippet class="centered-demo">
<template>
<paper-button class="custom pink">link</paper-button>
<paper-button raised class="custom indigo">raised</paper-button>
<paper-button toggles raised class="custom green">toggles</paper-button>
<paper-button disabled class="custom disabled">disabled</paper-button>
<div>
<h4>Color</h4>
<div class="horizontal-section">
<paper-button tabindex="0" class="blue ripple">button</paper-button>
<paper-button tabindex="0" class="red ripple">noink</paper-button>
<paper-button tabindex="0" class="orange ripple">colorful</paper-button>
<paper-button tabindex="0" class="green ripple">colorful</paper-button>
<paper-button tabindex="0" class="red ripple"><iron-icon icon="check"></iron-icon>ok</paper-button>
<paper-button tabindex="0" class="blue ripple"><iron-icon icon="clear"></iron-icon>cancel</paper-button>
</div>
</div>
<style is="custom-style">
paper-button.custom {
--paper-button-ink-color: var(--paper-pink-a200);
/* These could also be individually defined for each of the
specific css classes, but we'll just do it once as an example */
--paper-button-flat-keyboard-focus: {
background-color: var(--paper-pink-a200);
color: white !important;
};
--paper-button-raised-keyboard-focus: {
background-color: var(--paper-pink-a200) !important;
color: white !important;
};
}
paper-button.custom:hover {
background-color: var(--paper-indigo-100);
}
paper-button.pink {
color: var(--paper-pink-a200);
}
paper-button.indigo {
background-color: var(--paper-indigo-500);
color: white;
--paper-button-raised-keyboard-focus: {
background-color: var(--paper-pink-a200) !important;
color: white !important;
};
}
paper-button.green {
background-color: var(--paper-green-500);
color: white;
}
paper-button.green[active] {
background-color: var(--paper-red-500);
}
paper-button.disabled {
color: white;
}
</style>
</template>
</demo-snippet>
</div>
</body>
</html>

View file

@ -2,11 +2,11 @@
<!--
@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
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
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>

View file

@ -1,11 +1,11 @@
<!--
@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
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
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
@ -154,10 +154,19 @@ Custom property | Description | Default
_calculateElevation: function() {
if (!this.raised) {
this.elevation = 0;
this._setElevation(0);
} else {
Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this);
}
}
/**
Fired when the animation finishes.
This is useful if you want to wait until
the ripple animation finishes to perform some action.
@event transitionend
@param {{node: Object}} detail Contains the animated node.
*/
});
</script>

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!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
@ -7,9 +6,7 @@ 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>
--><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-button tests</title>
@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body>
<script>
WCT.loadSuites([
'paper-button.html'
'paper-button.html',
'paper-button.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -16,11 +16,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<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="../paper-button.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
</head>
<body>
@ -54,6 +52,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, 1);
});
test('can be unraised after being raised imperatively', function(done) {
button.raised = true;
expect(button.hasAttribute('raised')).to.be.eql(true);
Polymer.Base.async(function() {
expect(button.elevation).to.be.eql(1);
button.raised = false;
expect(button.hasAttribute('raised')).to.be.eql(false);
Polymer.Base.async(function() {
expect(button.elevation).to.be.eql(0);
done();
}, 1);
}, 1);
});
test('can be disabled imperatively', function() {
button.disabled = true;
expect(button.getAttribute('aria-disabled')).to.be.eql('true');
@ -85,7 +99,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('has aria role "button"', function() {
expect(button.getAttribute('role')).to.be.eql('button');
});
a11ySuite('TrivialButton');
});