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

update components

This commit is contained in:
Luke Pulverenti 2016-04-16 12:51:35 -04:00
parent 3e61abaf71
commit 73b495f48c
62 changed files with 875 additions and 512 deletions

View file

@ -1,6 +1,6 @@
{
"name": "paper-input",
"version": "1.1.10",
"version": "1.1.11",
"description": "Material design text fields",
"authors": [
"The Polymer Authors"
@ -33,7 +33,7 @@
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
"iron-input": "PolymerElements/iron-input#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.4",
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
},
"devDependencies": {
@ -48,11 +48,11 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.1.10",
"_release": "1.1.11",
"_resolution": {
"type": "version",
"tag": "v1.1.10",
"commit": "d8e201099b4b2987bea1dbcf5804c0383544bbfd"
"tag": "v1.1.11",
"commit": "8cfe5c5bf8c2e40d243443d046a94b6fe371983c"
},
"_source": "git://github.com/polymerelements/paper-input.git",
"_target": "^1.0.9",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/paper-input/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -1,15 +1,14 @@
language: node_js
sudo: false
sudo: required
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc=
- secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA=
node_js: 4
node_js: stable
addons:
firefox: latest
apt:
@ -17,6 +16,8 @@ addons:
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
dist: trusty

View file

@ -1,6 +1,6 @@
{
"name": "paper-input",
"version": "1.1.10",
"version": "1.1.11",
"description": "Material design text fields",
"authors": [
"The Polymer Authors"
@ -33,7 +33,7 @@
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
"iron-input": "PolymerElements/iron-input#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.4",
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
},
"devDependencies": {

View file

@ -13,6 +13,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../iron-behaviors/iron-control-state.html">
<script>
// Generate unique, monotonically increasing IDs for labels (needed by
// aria-labelledby) and add-ons.
Polymer.PaperInputHelper = {};
Polymer.PaperInputHelper.NextLabelID = 1;
Polymer.PaperInputHelper.NextAddonID = 1;
/**
* Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-container>`. This
* behavior is implemented by `<paper-input>`. It exposes a number of properties from
@ -24,6 +31,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @polymerBehavior Polymer.PaperInputBehavior
*/
Polymer.PaperInputBehaviorImpl = {
properties: {
/**
* Fired when the input changes due to user interaction.
@ -419,7 +427,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
if (target.id) {
this._ariaDescribedBy = this._appendStringWithSpace(this._ariaDescribedBy, target.id);
} else {
var id = 'paper-input-add-on-' + Math.floor((Math.random() * 100000));
var id = 'paper-input-add-on-' + Polymer.PaperInputHelper.NextAddonID++;
target.id = id;
this._ariaDescribedBy = this._appendStringWithSpace(this._ariaDescribedBy, id);
}
@ -507,7 +515,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
if (label.id) {
labelledBy = label.id;
} else {
labelledBy = 'paper-input-label-' + new Date().getUTCMilliseconds();
labelledBy = 'paper-input-label-' + Polymer.PaperInputHelper.NextLabelID++;
label.id = labelledBy;
}
this._ariaLabelledBy = labelledBy;
@ -525,7 +533,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
}
}
};
}
/** @polymerBehavior */
Polymer.PaperInputBehavior = [

View file

@ -25,7 +25,7 @@ For example:
<input is="iron-input">
</paper-input-container>
Do not wrap <paper-input-contanter> around elements that already include it, such as <paper-input>.
Do not wrap `<paper-input-container>` around elements that already include it, such as `<paper-input>`.
Doing so may cause events to bounce infintely between the container and its contained element.
### Listening for input changes

View file

@ -1,4 +1,5 @@
<!DOCTYPE html><!--
@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

View file

@ -1,5 +1,6 @@
<!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

View file

@ -1,5 +1,6 @@
<!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

View file

@ -1,5 +1,6 @@
<!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

View file

@ -1,5 +1,6 @@
<!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
@ -108,6 +109,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="multiple-inputs">
<template>
<paper-input label="one"></paper-input>
<paper-input label="two"></paper-input>
<paper-input label="three"></paper-input>
<paper-input label="four"></paper-input>
</template>
</test-fixture>
<script>
suite('basic', function() {
@ -274,11 +284,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
suite('a11y', function() {
test('has aria-labelledby, which is monotonically increasing', function() {
var inputs = fixture('multiple-inputs');
test('has aria-labelledby', function() {
var input = fixture('label');
assert.isTrue(input.inputElement.hasAttribute('aria-labelledby'))
assert.equal(input.inputElement.getAttribute('aria-labelledby'), Polymer.dom(input.root).querySelector('label').id, 'aria-labelledby points to the label');
// Find the first index of the input in this fixture. Since the label
// ids monotonically increase every time a new input is created, and
// this fixture isn't the first one in the document, we're going to start
// at an ID > 1.
var firstLabel = Polymer.dom(inputs[0].root).querySelector('label').id;
var index = parseInt(firstLabel.substr(firstLabel.lastIndexOf('-') + 1));
for (var i = 0; i < inputs.length; i++ ) {
var input = inputs[i].inputElement;
var label = Polymer.dom(inputs[i].root).querySelector('label').id;
assert.isTrue(input.hasAttribute('aria-labelledby'));
assert.equal(label, 'paper-input-label-' + (index++));
assert.equal(input.getAttribute('aria-labelledby'), label);
}
});
test('has aria-describedby for error message', function() {

View file

@ -1,5 +1,6 @@
<!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