UNPKG

@haxtheweb/haxcms-nodejs

Version:

HAXcms single and multisite nodejs server, api, and administration

71 lines (60 loc) 2.67 kB
/** @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 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 */ import"../polymer/polymer-legacy.js";import"../iron-icon/iron-icon.js";import"../paper-styles/default-theme.js";import{PaperInkyFocusBehavior as e}from"../paper-behaviors/paper-inky-focus-behavior.js";import{Polymer as t}from"../polymer/lib/legacy/polymer-fn.js";import{html as o}from"../polymer/lib/utils/html-tag.js";t({is:"paper-icon-button",_template:o` <style> :host { display: inline-block; position: relative; padding: 8px; outline: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; z-index: 0; line-height: 1; width: 40px; height: 40px; /* NOTE: Both values are needed, since some phones require the value to be \`transparent\`. */ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: transparent; /* Because of polymer/2558, this style has lower specificity than * */ box-sizing: border-box !important; @apply --paper-icon-button; } :host #ink { color: var(--paper-icon-button-ink-color, var(--primary-text-color)); opacity: 0.6; } :host([disabled]) { color: var(--paper-icon-button-disabled-text, var(--disabled-text-color)); pointer-events: none; cursor: auto; @apply --paper-icon-button-disabled; } :host([hidden]) { display: none !important; } :host(:hover) { @apply --paper-icon-button-hover; } iron-icon { --iron-icon-width: 100%; --iron-icon-height: 100%; } </style> <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon> `,hostAttributes:{role:"button",tabindex:"0"},behaviors:[e],registered:function(){this._template.setAttribute("strip-whitespace","")},properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(e,t){var o=this.getAttribute("aria-label");o&&t!=o||this.setAttribute("aria-label",e)}});