diff options
Diffstat (limited to 'third_party/polymer/components/paper-button')
9 files changed, 0 insertions, 628 deletions
diff --git a/third_party/polymer/components/paper-button/.bower.json b/third_party/polymer/components/paper-button/.bower.json deleted file mode 100644 index bf90392..0000000 --- a/third_party/polymer/components/paper-button/.bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "paper-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1ca7459275aa5ae511153a1d06931239577f1677" - }, - "_source": "git://github.com/Polymer/paper-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/README.md b/third_party/polymer/components/paper-button/README.md deleted file mode 100644 index 75919a5..0000000 --- a/third_party/polymer/components/paper-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-button -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-button) for more information. diff --git a/third_party/polymer/components/paper-button/bower.json b/third_party/polymer/components/paper-button/bower.json deleted file mode 100644 index 951e47d..0000000 --- a/third_party/polymer/components/paper-button/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "paper-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/demo.html b/third_party/polymer/components/paper-button/demo.html deleted file mode 100644 index fb71815..0000000 --- a/third_party/polymer/components/paper-button/demo.html +++ /dev/null @@ -1,99 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>paper-button</title> - - <script src="../platform/platform.js"></script> - - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="paper-button.html" rel="import"> - - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - transform: translateZ(0); - -webkit-transform: translateZ(0); - } - - section { - padding: 20px 0; - } - - section > div { - padding: 14px;:width; - } - - paper-button { - margin: 1em; - width: 10em; - } - - paper-button.colored { - color: #4285f4; - fill: #4285f4; - } - - paper-button[raisedButton].colored { - background: #4285f4; - color: #fff; - } - - paper-button[raisedButton].colored #ripple, - paper-button[raisedButton].colored::shadow #ripple { - color: #2a56c6; - } - - paper-button[raisedButton].colored #focusBg, - paper-button[raisedButton].colored::shadow #focusBg { - background: #3367d6; - } - - </style> -</head> -<body unresolved> - - <section> - - <div>Flat buttons</div> - - <paper-button label="button"></paper-button> - <paper-button class="colored" label="colored"></paper-button> - <!-- <paper-button focused label="focused"></paper-button> --> - <paper-button disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> - - </section> - - <br> - - <section> - - <div>Raised buttons</div> - - <paper-button raisedButton label="button"></paper-button> - <paper-button raisedButton class="colored" label="colored"></paper-button> - <!-- <paper-button raisedButton focused label="focused"></paper-button> --> - <paper-button raisedButton disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/demo2.html b/third_party/polymer/components/paper-button/demo2.html deleted file mode 100644 index 29cbb32..0000000 --- a/third_party/polymer/components/paper-button/demo2.html +++ /dev/null @@ -1,136 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-button</title> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="paper-button.html" rel="import"> - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - font-size: 14px; - text-align: center; - padding: 1em 2em; - transform: translateZ(0); - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - h1 { - margin-bottom: 2em; - } - - section { - display: inline-block; - background: #f7f7f7; - border-radius: 3px; - width: 25%; - text-align: center; - margin: 1%; - padding: 1em; - } - - paper-button { - margin: 1em; - width: 10em; - } - - paper-button.colored { - color: #4285f4; - fill: #4285f4; - } - - paper-button[raisedButton].colored { - background: #4285f4; - color: #fff; - } - paper-button[raisedButton].colored.hover:hover { - background: #3367d6; - } - paper-button[raisedButton].colored::shadow #ripple { - color: #2a56c6; - } - paper-button[raisedButton].colored::shadow #focusBg { - background: #3367d6; - } - - .label { - text-align: left; - color: #bbb; - font-size: 12px; - margin-top: 2em; - } - </style> -</head> -<body unresolved> - - <h1><paper-button></h1> - - <section> - <paper-button label="button"></paper-button> - <br> - <paper-button class="colored" label="colored"></paper-button> - <br> - <paper-button disabled label="disabled"></paper-button> - <br> - <div class="label">flat</div> - </section> - - <section> - <paper-button raisedButton label="button"></paper-button> - <br> - <paper-button raisedButton class="colored" label="colored"></paper-button> - <br> - <paper-button raisedButton disabled label="disabled"></paper-button> - <br> - <div class="label">raised</div> - </section> - - <br> - <br> - - <section> - <paper-button class="hover" label="button"></paper-button> - <br> - <paper-button class="colored hover" label="colored"></paper-button> - <br> - <div class="label">flat + hover state</div> - </section> - - <section> - <paper-button raisedButton class="hover" label="button"></paper-button> - <br> - <paper-button raisedButton class="colored hover" label="colored"></paper-button> - <br> - <div class="label">raised + hover state</div> - </section> - - <br> - <br> - - <section> - <paper-button focused label="button"></paper-button> - <br> - <paper-button focused class="colored" label="colored"></paper-button> - <br> - <div class="label">flat + focused</div> - </section> - - <section> - <paper-button raisedButton focused label="button"></paper-button> - <br> - <paper-button raisedButton focused class="colored" label="colored"></paper-button> - <br> - <div class="label">raised + focused</div> - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/index.html b/third_party/polymer/components/paper-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -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 -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/metadata.html b/third_party/polymer/components/paper-button/metadata.html deleted file mode 100644 index a532812..0000000 --- a/third_party/polymer/components/paper-button/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-button" label="Button" group="Paper" isContainer> - <template> - <paper-button label="Paper Button"></paper-button> - </template> - <template id="imports"> - <link rel="import" href="paper-button.html"> - </template> -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/paper-button.css b/third_party/polymer/components/paper-button/paper-button.css deleted file mode 100644 index e8954ac..0000000 --- a/third_party/polymer/components/paper-button/paper-button.css +++ /dev/null @@ -1,115 +0,0 @@ -:host { - display: inline-block; - position: relative; - border: 0; - background: transparent; - text-align: center; - font: inherit; - text-transform: uppercase; - outline: none; - border-radius: 3px; - -webkit-user-select: none; - user-select: none; - cursor: pointer; -} - -:host(.hover:hover) { - background: #e4e4e4; -} - -:host([raisedButton]) { - background: #dfdfdf; -} - -:host([raisedButton].hover:hover) { - background: #d6d6d6; -} - -:host([disabled]) { - background: #eaeaea !important; - color: #a8a8a8 !important; - cursor: auto; -} - -#shadow-container { - border-radius: inherit; -} - -#clip { - position: relative; - border-radius: inherit; - overflow: hidden; -} - -/* -#focusBg { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - opacity: 0; - border-radius: inherit; - background: #c3c3c3; - -webkit-transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -:host([focused]) #focusBg { - -webkit-transition: none; - transition: none; - -webkit-animation: focus-fade 0.7s infinite alternate; - animation: focus-fade 0.7s infinite alternate; -} - -@-webkit-keyframes focus-fade { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} - -@keyframes focus-fade { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} -*/ - -#ripple { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - color: #d1d1d1; - pointer-events: none; -} - -:host([raisedButton]) #ripple { - color: #cecece; -} - -#ripple::shadow canvas { - top: 0; - left: 0; -} - -#content { - /* needed to position the ink behind the content */ - position: relative; -} - -#icon { - margin: 8px; -} - -#content > span { - display: inline-block; - margin: 0.5em; -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/paper-button.html b/third_party/polymer/components/paper-button/paper-button.html deleted file mode 100644 index 87dbef7..0000000 --- a/third_party/polymer/components/paper-button/paper-button.html +++ /dev/null @@ -1,211 +0,0 @@ -<!-- -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 -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 ---> - -<!-- -@group Paper Elements - -`paper-button` is a button containing text or an image. When the user touches -the button, a ripple effect emanates from the point of contact. - -A `paper-button` may be flat or raised. A raised button behaves like a piece -of paper resting on another sheet, and lifts up upon press. Flat buttons do -not raise up. Add the `raisedButton` attribute to make a raised button. - -Example: - - <paper-button label="flat button"></paper-button> - <paper-button label="raised button" raisedButton></paper-button> - -A button should be styled with a background color, text color, ripple color -and hover color. - -To style the background, text and hover color, apply the `background` and -`color` CSS properties to the button. To style the ripple color, apply the -`color` CSS property to the `#ripple` element in the button's shadow root: - - /* Style #my-button blue with white text and darker blue ink. */ - #my-button { - background: #4285f4; - color: #fff; - } - - #my-button:hover { - background: #2a56c6; - } - - #my-button::shadow #ripple { - color: #2a56c6; - } - -@element paper-button -@extends paper-focusable ---> - -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../paper-focusable/paper-focusable.html" rel="import"> -<link href="../paper-ripple/paper-ripple.html" rel="import"> -<link href="../paper-shadow/paper-shadow.html" rel="import"> - -<polymer-element name="paper-button" extends="paper-focusable" attributes="label raisedButton iconSrc icon" -role="button"> - - <template> - - <link href="paper-button.css" rel="stylesheet"> - - <template if="{{raisedButton}}"> - <div fit id="shadow-container"> - <paper-shadow id="shadow" z="{{z}}" animated></paper-shadow> - </div> - </template> - - <div id="clip"> - <!-- <div id="focusBg"></div> --> - <paper-ripple id="ripple"></paper-ripple> - <div id="content"> - <template if="{{iconSrc || icon}}"> - <core-icon id="icon" src="{{iconSrc}}" icon="{{icon}}"></core-icon> - </template> - <template if="{{label}}"> - <span>{{label}}</span> - </template> - </div> - </div> - - </template> - - <script> - Polymer('paper-button', { - - publish: { - - /** - * The label of the button. - * - * @attribute label - * @type string - * @default '' - */ - label: '', - - /** - * If true, the button will be styled as a "raised" button. - * - * @attribute raisedButton - * @type boolean - * @default false - */ - raisedButton: {value: false, reflect: true}, - - /** - * (optional) The URL of an image for an icon to use in the button. - * Should not use `icon` property if you are using this property. - * - * @attribute iconSrc - * @type string - * @default '' - */ - iconSrc: '', - - /** - * (optional) Specifies the icon name or index in the set of icons - * available in the icon set. If using this property, load the icon - * set separately where the icon is used. Should not use `src` - * if you are using this property. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '' - - }, - - z: 1, - - attached: function() { - if (this.textContent && !this.textContent.match(/\s+/)) { - console.warn('Using textContent to label the button is deprecated. Use the "label" property instead'); - this.label = this.textContent; - } - }, - - activeChanged: function() { - this.super(); - - if (this.active) { - // FIXME: remove when paper-ripple can have a default 'down' state. - if (!this.lastEvent) { - var rect = this.getBoundingClientRect(); - this.lastEvent = { - x: rect.left + rect.width / 2, - y: rect.top + rect.height / 2 - } - } - this.$.ripple.downAction(this.lastEvent); - } else { - this.$.ripple.upAction(); - } - this.adjustZ(); - }, - - focusedChanged: function() { - this.super(); - this.adjustZ(); - }, - - disabledChanged: function() { - this.super(); - this.adjustZ(); - }, - - // waitForSpillCompleted: function(callback) { - // this.async(callback, null, (this.$.ink.spillCompleted ? 0 : this.duration)); - // }, - - // resetInk: function() { - // this.active = false; - // this.$.ink.reset(); - // }, - - insideButton: function(x, y) { - var rect = this.getBoundingClientRect(); - return (rect.left <= x) && (x <= rect.right) && (rect.top <= y) && (y <= rect.bottom); - }, - - adjustZ: function() { - if (this.focused) { - this.classList.add('paper-shadow-animate-z-1-z-2'); - } else { - this.classList.remove('paper-shadow-animate-z-1-z-2'); - - if (this.active) { - this.z = 2; - } else if (this.disabled) { - this.z = 0; - } else { - this.z = 1; - } - - } - }, - - downAction: function(e) { - this.super(e); - this.lastEvent = e; - }, - - labelChanged: function() { - this.setAttribute('aria-label', this.label); - } - - }); - </script> -</polymer-element> |