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,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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue