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

update polymer

This commit is contained in:
Luke Pulverenti 2015-10-07 21:49:40 -04:00
parent 8119b930e4
commit cbb6337b41
74 changed files with 2195 additions and 1393 deletions

View file

@ -1,7 +1,7 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.0.3",
"version": "1.0.4",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": "paper-icon-button.html",
@ -20,26 +20,26 @@
"url": "git://github.com/PolymerElements/paper-icon-button.git"
},
"dependencies": {
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
"paper-ripple": "polymerelements/paper-ripple#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
"polymer": "Polymer/polymer#^1.1.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0"
},
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
},
"homepage": "https://github.com/PolymerElements/paper-icon-button",
"_release": "1.0.3",
"_release": "1.0.4",
"_resolution": {
"type": "version",
"tag": "v1.0.3",
"commit": "9f183bdae3ff419aeae78a51a05fcc4d0100e5a3"
"tag": "v1.0.4",
"commit": "50cef0a41abe586110ee0ac9720cea70f0b2f5e1"
},
"_source": "git://github.com/PolymerElements/paper-icon-button.git",
"_target": "~1.0.2",

View file

@ -1,7 +1,7 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.0.3",
"version": "1.0.4",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": "paper-icon-button.html",
@ -20,18 +20,18 @@
"url": "git://github.com/PolymerElements/paper-icon-button.git"
},
"dependencies": {
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
"paper-ripple": "polymerelements/paper-ripple#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
"polymer": "Polymer/polymer#^1.1.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0"
},
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
}
}

View file

@ -27,7 +27,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
paper-icon-button {
margin-left: 30px;
display: block;
width: 24px;
text-align: center;
}
@ -70,18 +69,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
paper-icon-button.huge {
margin-left: 0px;
width: 100px;
height: 100px;
--paper-icon-button-ink-color: var(--paper-indigo-500);
}
paper-icon-button.huge::shadow #icon {
width: 100px;
height: 100px;
}
paper-icon-button.huge #icon {
width: 100px;
height: 100px;
}
</style>
</head>
@ -136,6 +126,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<paper-icon-button icon="polymer" alt="polymer" class="huge"></paper-icon-button>
</div>
</div>
<div>
<h4>Noink</h4>
<div class="horizontal-section">
<paper-icon-button noink icon="favorite" alt="heart"></paper-icon-button>
<br><br><br>
<paper-icon-button noink icon="polymer" alt="polymer"></paper-icon-button>
</div>
</div>
</div>
<script>

View file

@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../paper-ripple/paper-ripple.html">
<!--
Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
Material design: [Icon toggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)
`paper-icon-button` is a button with an image placed at the center. When the user touches
the button, a ripple effect emanates from the center of the button.
@ -37,7 +37,7 @@ Example:
<paper-icon-button icon="favorite"></paper-icon-button>
<paper-icon-button src="star.png"></paper-icon-button>
###Styling
### Styling
Style the button with CSS as you would a normal DOM element. If you are using the icons
provided by `iron-icons`, they will inherit the foreground color of the button.
@ -46,21 +46,14 @@ provided by `iron-icons`, they will inherit the foreground color of the button.
<paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
By default, the ripple is the same color as the foreground at 25% opacity. You may
customize the color using this selector:
/* make #my-button use a blue ripple instead of foreground color */
#my-button::shadow #ripple {
color: blue;
}
The opacity of the ripple is not customizable via CSS.
customize the color using the `--paper-icon-button-ink-color` custom property.
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-icon-button-disabled-text` | The color of the disabled button | `--primary-text-color`
`--paper-icon-button-ink-color` | Selected/focus ripple color | `--default-primary-color`
`--paper-icon-button-disabled-text` | The color of the disabled button | `--disabled-text-color`
`--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color`
`--paper-icon-button` | Mixin for a button | `{}`
`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`
@ -70,88 +63,93 @@ Custom property | Description | Default
-->
<dom-module id="paper-icon-button">
<style>
<template strip-whitespace>
<style>
:host {
display: inline-block;
position: relative;
padding: 8px;
outline: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
z-index: 0;
:host {
display: inline-block;
position: relative;
padding: 8px;
outline: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
z-index: 0;
width: 24px;
@apply(--paper-icon-button);
}
@apply(--paper-icon-button);
}
:host #ink {
color: var(--paper-icon-button-ink-color, --primary-text-color);
opacity: 0.6;
}
:host #ink {
color: var(--paper-icon-button-ink-color, --primary-text-color);
opacity: 0.6;
}
:host([disabled]) {
color: var(--paper-icon-button-disabled-text, --disabled-text-color);
pointer-events: none;
cursor: auto;
@apply(--paper-icon-button-disabled);
}
:host([disabled]) {
color: var(--paper-icon-button-disabled-text, --disabled-text-color);
pointer-events: none;
cursor: auto;
@apply(--paper-icon-button-disabled);
}
</style>
<template>
<paper-ripple id="ink" class="circle" center></paper-ripple>
iron-icon {
--iron-icon-width: 100%;
--iron-icon-height: 100%;
}
</style>
<iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
</template>
<script>
Polymer({
is: 'paper-icon-button',
hostAttributes: {
role: 'button',
tabindex: '0'
},
behaviors: [
Polymer.PaperInkyFocusBehavior
],
properties: {
/**
* The URL of an image for the icon. If the src property is specified,
* the icon property should not be.
*/
src: {
type: String
},
/**
* Specifies the icon name or index in the set of icons available in
* the icon's icon set. If the icon property is specified,
* the src property should not be.
*/
icon: {
type: String
},
/**
* Specifies the alternate text for the button, for accessibility.
*/
alt: {
type: String,
observer: "_altChanged"
}
},
_altChanged: function(newValue, oldValue) {
var label = this.getAttribute('aria-label');
// Don't stomp over a user-set aria-label.
if (!label || oldValue == label) {
this.setAttribute('aria-label', newValue);
}
}
});
</script>
</dom-module>
<script>
Polymer({
is: 'paper-icon-button',
hostAttributes: {
role: 'button',
tabindex: '0'
},
behaviors: [
Polymer.PaperInkyFocusBehavior
],
properties: {
/**
* The URL of an image for the icon. If the src property is specified,
* the icon property should not be.
*/
src: {
type: String
},
/**
* Specifies the icon name or index in the set of icons available in
* the icon's icon set. If the icon property is specified,
* the src property should not be.
*/
icon: {
type: String
},
/**
* Specifies the alternate text for the button, for accessibility.
*/
alt: {
type: String,
observer: "_altChanged"
}
},
_altChanged: function(newValue, oldValue) {
var label = this.getAttribute('aria-label');
// Don't stomp over a user-set aria-label.
if (!label || oldValue == label) {
this.setAttribute('aria-label', newValue);
}
}
});
</script>