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

Unified Diff: third_party/polymer/v1_0/components/paper-radio-group/paper-radio-group.html

Issue 1269803005: Remove third_party/polymer from .gitignore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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: third_party/polymer/v1_0/components/paper-radio-group/paper-radio-group.html
diff --git a/third_party/polymer/v1_0/components/paper-radio-group/paper-radio-group.html b/third_party/polymer/v1_0/components/paper-radio-group/paper-radio-group.html
deleted file mode 100644
index 93088923c2a3b4d0eea4a58790743a6d33651ffe..0000000000000000000000000000000000000000
--- a/third_party/polymer/v1_0/components/paper-radio-group/paper-radio-group.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!--
-@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="../iron-selector/iron-selectable.html">
-<link rel="import" href="../paper-radio-button/paper-radio-button.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-
-<!--
-`paper-radio-group` allows user to select only one radio button from a set.
-Checking one radio button that belongs to a radio group unchecks any
-previously checked radio button within the same group. Use
-`selected` to get or set the selected radio button.
-
-Example:
-
- <paper-radio-group selected="small">
- <paper-radio-button name="small">Small</paper-radio-button>
- <paper-radio-button name="medium">Medium</paper-radio-button>
- <paper-radio-button name="large">Large</paper-radio-button>
- </paper-radio-group>
-
-See <a href="paper-radio-button.html">paper-radio-button</a> for more
-information about `paper-radio-button`.
-
-@group Paper Elements
-@element paper-radio-group
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module name="paper-radio-group">
- <style>
- :host {
- display: inline-block;
- }
-
- :host ::content > * {
- padding: 12px;
- }
- </style>
-
- <template>
- <content id="items" select="*"></content>
- </template>
-
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-radio-group',
-
- behaviors: [
- Polymer.IronA11yKeysBehavior,
- Polymer.IronSelectableBehavior
- ],
-
- hostAttributes: {
- role: 'radiogroup',
- tabindex: 0
- },
-
- properties: {
- /**
- * Overriden from Polymer.IronSelectableBehavior
- */
- attrForSelected: {
- type: String,
- value: 'name'
- },
-
- /**
- * Overriden from Polymer.IronSelectableBehavior
- */
- selectedAttribute: {
- type: String,
- value: 'checked'
- },
-
- /**
- * Overriden from Polymer.IronSelectableBehavior
- */
- selectable: {
- type: String,
- value: 'paper-radio-button'
- }
- },
-
- keyBindings: {
- 'left up': 'selectPrevious',
- 'right down': 'selectNext',
- },
-
- /**
- * Selects the given value.
- */
- select: function(value) {
- if (this.selected) {
- var oldItem = this._valueToItem(this.selected);
-
- // Do not allow unchecking the selected item.
- if (this.selected == value) {
- oldItem.checked = true;
- return;
- }
-
- if (oldItem)
- oldItem.checked = false;
- }
-
- Polymer.IronSelectableBehavior.select.apply(this, [value]);
- this.fire('paper-radio-group-changed');
- },
-
- /**
- * Selects the previous item. If the previous item is disabled, then it is
- * skipped, and its previous item is selected
- */
- selectPrevious: function() {
- var length = this.items.length;
- var newIndex = Number(this._valueToIndex(this.selected));
-
- do {
- newIndex = (newIndex - 1 + length) % length;
- } while (this.items[newIndex].disabled)
-
- this.select(this._indexToValue(newIndex));
- },
-
- /**
- * Selects the next item. If the next item is disabled, then it is
- * skipped, and the next item after it is selected.
- */
- selectNext: function() {
- var length = this.items.length;
- var newIndex = Number(this._valueToIndex(this.selected));
-
- do {
- newIndex = (newIndex + 1 + length) % length;
- } while (this.items[newIndex].disabled)
-
- this.select(this._indexToValue(newIndex));
- },
- });
-</script>

Powered by Google App Engine
This is Rietveld 408576698