OLD | NEW |
1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` | 1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` |
2 | 2 |
3 /// Dart API for the polymer element `paper_radio_group`. | 3 /// Dart API for the polymer element `paper_radio_group`. |
4 @HtmlImport('paper_radio_group_nodart.html') | 4 @HtmlImport('paper_radio_group_nodart.html') |
5 library polymer_elements.lib.src.paper_radio_group.paper_radio_group; | 5 library polymer_elements.lib.src.paper_radio_group.paper_radio_group; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'dart:js' show JsArray, JsObject; | 8 import 'dart:js' show JsArray, JsObject; |
9 import 'package:web_components/web_components.dart'; | 9 import 'package:web_components/web_components.dart'; |
10 import 'package:polymer_interop/polymer_interop.dart'; | 10 import 'package:polymer_interop/polymer_interop.dart'; |
11 import 'iron_a11y_keys_behavior.dart'; | 11 import 'iron_a11y_keys_behavior.dart'; |
12 import 'iron_selectable.dart'; | 12 import 'iron_selectable.dart'; |
13 import 'paper_radio_button.dart'; | 13 import 'paper_radio_button.dart'; |
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/component
s/selection-controls.html#selection-controls-radio-button) |
| 16 /// |
| 17 /// `paper-radio-group` allows user to select at most one radio button from a se
t. |
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 selec
ted: |
| 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 @CustomElementProxy('paper-radio-group') | 43 @CustomElementProxy('paper-radio-group') |
31 class PaperRadioGroup extends HtmlElement with CustomElementProxyMixin, PolymerB
ase, IronA11yKeysBehavior, IronSelectableBehavior { | 44 class PaperRadioGroup extends HtmlElement with CustomElementProxyMixin, PolymerB
ase, IronA11yKeysBehavior, IronSelectableBehavior { |
32 PaperRadioGroup.created() : super.created(); | 45 PaperRadioGroup.created() : super.created(); |
33 factory PaperRadioGroup() => new Element.tag('paper-radio-group'); | 46 factory PaperRadioGroup() => new Element.tag('paper-radio-group'); |
34 | 47 |
| 48 /// If true, radio-buttons can be deselected |
| 49 bool get allowEmptySelection => jsElement[r'allowEmptySelection']; |
| 50 set allowEmptySelection(bool value) { jsElement[r'allowEmptySelection'] = valu
e; } |
| 51 |
35 /// Overriden from Polymer.IronSelectableBehavior | 52 /// Overriden from Polymer.IronSelectableBehavior |
36 String get attrForSelected => jsElement[r'attrForSelected']; | 53 String get attrForSelected => jsElement[r'attrForSelected']; |
37 set attrForSelected(String value) { jsElement[r'attrForSelected'] = value; } | 54 set attrForSelected(String value) { jsElement[r'attrForSelected'] = value; } |
38 | 55 |
39 get keyBindings => jsElement[r'keyBindings']; | 56 get keyBindings => jsElement[r'keyBindings']; |
40 set keyBindings(value) { jsElement[r'keyBindings'] = (value is Map || (value i
s Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} | 57 set keyBindings(value) { jsElement[r'keyBindings'] = (value is Map || (value i
s Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} |
41 | 58 |
42 /// Overriden from Polymer.IronSelectableBehavior | 59 /// Overriden from Polymer.IronSelectableBehavior |
43 String get selectable => jsElement[r'selectable']; | 60 String get selectable => jsElement[r'selectable']; |
44 set selectable(String value) { jsElement[r'selectable'] = value; } | 61 set selectable(String value) { jsElement[r'selectable'] = value; } |
45 | 62 |
46 /// Overriden from Polymer.IronSelectableBehavior | 63 /// Overriden from Polymer.IronSelectableBehavior |
47 String get selectedAttribute => jsElement[r'selectedAttribute']; | 64 String get selectedAttribute => jsElement[r'selectedAttribute']; |
48 set selectedAttribute(String value) { jsElement[r'selectedAttribute'] = value;
} | 65 set selectedAttribute(String value) { jsElement[r'selectedAttribute'] = value;
} |
49 | 66 |
50 /// Selects the given value. | 67 /// Selects the given value. |
51 select(value) => | 68 select(value) => |
52 jsElement.callMethod('select', [value]); | 69 jsElement.callMethod('select', [value]); |
53 | 70 |
54 /// Selects the next item. If the next item is disabled, then it is | 71 /// Selects the next item. If the next item is disabled, then it is |
55 /// skipped, and the next item after it is selected. | 72 /// skipped, and the next item after it is selected. |
56 selectNext() => | 73 selectNext() => |
57 jsElement.callMethod('selectNext', []); | 74 jsElement.callMethod('selectNext', []); |
58 | 75 |
59 /// Selects the previous item. If the previous item is disabled, then it is | 76 /// Selects the previous item. If the previous item is disabled, then it is |
60 /// skipped, and its previous item is selected | 77 /// skipped, and its previous item is selected |
61 selectPrevious() => | 78 selectPrevious() => |
62 jsElement.callMethod('selectPrevious', []); | 79 jsElement.callMethod('selectPrevious', []); |
63 } | 80 } |
OLD | NEW |