| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --><html><head><link rel="import" href="../polymer/polymer.html"> | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
| 10 <link rel="import" href="../iron-selector/iron-selectable.html"> | 10 <link rel="import" href="../iron-selector/iron-selectable.html"> |
| 11 <link rel="import" href="../paper-radio-button/paper-radio-button.html"> | 11 <link rel="import" href="../paper-radio-button/paper-radio-button.html"> |
| 12 <link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
"> | 12 <link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
"> |
| 13 | 13 |
| 14 <!-- | 14 <!-- |
| 15 `paper-radio-group` allows user to select only one radio button from a set. | 15 Material design: [Radio button](https://www.google.com/design/spec/components/se
lection-controls.html#selection-controls-radio-button) |
| 16 |
| 17 `paper-radio-group` allows user to select at most one radio button from a set. |
| 16 Checking one radio button that belongs to a radio group unchecks any | 18 Checking one radio button that belongs to a radio group unchecks any |
| 17 previously checked radio button within the same group. Use | 19 previously checked radio button within the same group. Use |
| 18 `selected` to get or set the selected radio button. | 20 `selected` to get or set the selected radio button. |
| 19 | 21 |
| 22 The <paper-radio-buttons> inside the group must have the `name` attribute |
| 23 set. |
| 24 |
| 20 Example: | 25 Example: |
| 21 | 26 |
| 22 <paper-radio-group selected="small"> | 27 <paper-radio-group selected="small"> |
| 23 <paper-radio-button name="small">Small</paper-radio-button> | 28 <paper-radio-button name="small">Small</paper-radio-button> |
| 24 <paper-radio-button name="medium">Medium</paper-radio-button> | 29 <paper-radio-button name="medium">Medium</paper-radio-button> |
| 25 <paper-radio-button name="large">Large</paper-radio-button> | 30 <paper-radio-button name="large">Large</paper-radio-button> |
| 26 </paper-radio-group> | 31 </paper-radio-group> |
| 27 | 32 |
| 28 See <a href="paper-radio-button.html">paper-radio-button</a> for more | 33 Radio-button-groups can be made optional, and allow zero buttons to be selected: |
| 34 |
| 35 <paper-radio-group selected="small" allow-empty-selection> |
| 36 <paper-radio-button name="small">Small</paper-radio-button> |
| 37 <paper-radio-button name="medium">Medium</paper-radio-button> |
| 38 <paper-radio-button name="large">Large</paper-radio-button> |
| 39 </paper-radio-group> |
| 40 |
| 41 See <a href="paper-radio-button">paper-radio-button</a> for more |
| 29 information about `paper-radio-button`. | 42 information about `paper-radio-button`. |
| 30 | 43 |
| 31 @group Paper Elements | 44 @group Paper Elements |
| 32 @element paper-radio-group | 45 @element paper-radio-group |
| 33 @hero hero.svg | 46 @hero hero.svg |
| 34 @demo demo/index.html | 47 @demo demo/index.html |
| 35 --> | 48 --> |
| 36 | 49 |
| 37 </head><body><dom-module name="paper-radio-group"> | 50 </head><body><dom-module id="paper-radio-group"> |
| 38 <style> | 51 <style> |
| 39 :host { | 52 :host { |
| 40 display: inline-block; | 53 display: inline-block; |
| 41 } | 54 } |
| 42 | 55 |
| 43 :host ::content > * { | 56 :host ::content > * { |
| 44 padding: 12px; | 57 padding: 12px; |
| 45 } | 58 } |
| 46 </style> | 59 </style> |
| 47 | 60 |
| 48 <template> | 61 <template> |
| 49 <content id="items" select="*"></content> | 62 <content id="items" select="*"></content> |
| 50 </template> | 63 </template> |
| 51 | 64 |
| 52 </dom-module> | 65 </dom-module> |
| 53 | 66 |
| 54 <script src="paper-radio-group-extracted.js"></script></body></html> | 67 <script src="paper-radio-group-extracted.js"></script></body></html> |
| OLD | NEW |