mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
8119b930e4
commit
cbb6337b41
74 changed files with 2195 additions and 1393 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-radio-button",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "A material design radio button",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -33,11 +33,11 @@
|
|||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.8",
|
||||
"_release": "1.0.9",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.8",
|
||||
"commit": "f6fcf203775984877bd97393ac4a9cb2da45597b"
|
||||
"tag": "v1.0.9",
|
||||
"commit": "708d1e611ad5a7c9600a128545a88e9991fe789e"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-radio-button.git",
|
||||
"_target": "~1.0.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-radio-button",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "A material design radio button",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -88,6 +88,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<paper-radio-button class="blue" checked>Calcium</paper-radio-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Noink </h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-radio-button noink>Oxygen</paper-radio-button>
|
||||
<paper-radio-button noink>Carbon</paper-radio-button>
|
||||
<paper-radio-button checked noink>Hydrogen</paper-radio-button>
|
||||
<paper-radio-button checked noink>Nitrogen</paper-radio-button>
|
||||
<paper-radio-button checked noink>Calcium</paper-radio-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!--
|
||||
@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
|
||||
|
@ -10,10 +11,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<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">
|
||||
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-checked-element-behavior.html">
|
||||
|
||||
<!--
|
||||
Material design: [Radio button](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button)
|
||||
|
||||
`paper-radio-button` is a button that can be either checked or unchecked.
|
||||
User can tap the radio button to check or uncheck it.
|
||||
|
||||
|
@ -46,7 +48,7 @@ Custom property | Description | Default
|
|||
-->
|
||||
|
||||
<dom-module id="paper-radio-button">
|
||||
<template>
|
||||
<template strip-whitespace>
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
|
@ -157,7 +159,6 @@ Custom property | Description | Default
|
|||
<div id="radioContainer">
|
||||
<div id="offRadio"></div>
|
||||
<div id="onRadio"></div>
|
||||
<paper-ripple id="ink" class="circle" center checked$="[[checked]]"></paper-ripple>
|
||||
</div>
|
||||
|
||||
<div id="radioLabel"><content></content></div>
|
||||
|
@ -169,8 +170,7 @@ Custom property | Description | Default
|
|||
is: 'paper-radio-button',
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperInkyFocusBehavior,
|
||||
Polymer.IronCheckedElementBehavior
|
||||
Polymer.PaperCheckedElementBehavior
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
|
@ -192,39 +192,16 @@ Custom property | Description | Default
|
|||
* @event iron-change
|
||||
*/
|
||||
|
||||
ariaActiveAttribute: {
|
||||
value: 'aria-checked'
|
||||
}
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
this._isReady = true;
|
||||
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (!this.getAttribute('aria-label')) {
|
||||
this.updateAriaLabel();
|
||||
ariaActiveAttribute: {
|
||||
type: String,
|
||||
value: 'aria-checked'
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the checkbox aria-label. This is a temporary workaround not
|
||||
* being able to observe changes in <content>
|
||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
||||
*
|
||||
* Call this if you manually change the contents of the checkbox
|
||||
* and want the aria-label to match the new contents.
|
||||
*/
|
||||
updateAriaLabel: function() {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
||||
},
|
||||
|
||||
_buttonStateChanged: function() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
if (this._isReady) {
|
||||
this.checked = this.active;
|
||||
}
|
||||
// create the element ripple inside the `radioContainer`
|
||||
_createRipple: function() {
|
||||
this._rippleContainer = this.$.radioContainer;
|
||||
return Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -99,11 +99,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
test('button with no label has no aria label', function() {
|
||||
assert.isTrue(!r1.getAttribute('aria-label'));
|
||||
});
|
||||
|
||||
test('button with a label sets an aria label', function() {
|
||||
assert.isTrue(r2.getAttribute('aria-label') == "Batman");
|
||||
});
|
||||
|
||||
|
||||
test('button respects the user set aria-label', function() {
|
||||
var c = fixture('AriaLabel');
|
||||
assert.isTrue(c.getAttribute('aria-label') == "Batman");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue