Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: polymer_1.0.4/bower_components/paper-behaviors/demo/paper-radio-button.html

Issue 1205703007: Add polymer 1.0 to npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Renamed folder to 1.0.4 Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: polymer_1.0.4/bower_components/paper-behaviors/demo/paper-radio-button.html
diff --git a/polymer_1.0.4/bower_components/paper-behaviors/demo/paper-radio-button.html b/polymer_1.0.4/bower_components/paper-behaviors/demo/paper-radio-button.html
new file mode 100644
index 0000000000000000000000000000000000000000..93af1752b5401c44dcc8e80befb073d49a552e9b
--- /dev/null
+++ b/polymer_1.0.4/bower_components/paper-behaviors/demo/paper-radio-button.html
@@ -0,0 +1,116 @@
+<!--
+@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
+-->
+
+<link rel="import" href="../../polymer/polymer.html">
+<link rel="import" href="../../paper-ripple/paper-ripple.html">
+<link rel="import" href="../paper-inky-focus-behavior.html">
+
+<dom-module id="paper-radio-button">
+
+ <style>
+ :host {
+ display: inline-block;
+ white-space: nowrap;
+ }
+
+ :host(:focus) {
+ outline: none
+ }
+
+ #radioContainer {
+ display: inline-block;
+ position: relative;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ vertical-align: middle;
+ }
+
+ #offRadio {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ border: solid 2px;
+ border-color: black;
+ transition: border-color 0.28s;
+ }
+
+ #onRadio {
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background-color: red;
+ -webkit-transform: scale(0);
+ transform: scale(0);
+ transition: -webkit-transform ease 0.28s;
+ transition: transform ease 0.28s;
+ }
+
+ :host([disabled]) {
+ opacity: 0.3;
+ pointer-events: none;
+ }
+
+ :host([pressed]) #offRadio,
+ :host([active]) #offRadio {
+ border-color: red;
+ }
+
+ :host([pressed]) #onRadio,
+ :host([active]) #onRadio {
+ -webkit-transform: scale(1);
+ transform: scale(1);
+ }
+
+ #ink {
+ position: absolute;
+ top: -16px;
+ left: -16px;
+ width: 48px;
+ height: 48px;
+ }
+
+ </style>
+
+ <template>
+ <div id="radioContainer">
+ <div id="offRadio"></div>
+ <div id="onRadio"></div>
+ <paper-ripple id="ink" class="circle" center></paper-ripple>
+ </div>
+ </template>
+
+ <script>
+
+ Polymer({
+
+ behaviors: [
+ Polymer.PaperInkyFocusBehavior
+ ],
+
+ hostAttributes: {
+ role: 'radio'
+ },
+
+ ready: function() {
+ this.toggles = true;
+ }
+
+ });
+
+ </script>
+
+</dom-module>

Powered by Google App Engine
This is Rietveld 408576698