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_input`. | 3 /// Dart API for the polymer element `paper_input`. |
4 @HtmlImport('paper_input_nodart.html') | 4 @HtmlImport('paper_input_nodart.html') |
5 library polymer_elements.lib.src.paper_input.paper_input; | 5 library polymer_elements.lib.src.paper_input.paper_input; |
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_form_element_behavior.dart'; | 11 import 'iron_form_element_behavior.dart'; |
12 import 'paper_input_behavior.dart'; | 12 import 'paper_input_behavior.dart'; |
13 import 'iron_control_state.dart'; | 13 import 'iron_control_state.dart'; |
14 import 'iron_input.dart'; | 14 import 'iron_input.dart'; |
15 import 'paper_input_container.dart'; | 15 import 'paper_input_container.dart'; |
16 import 'paper_input_error.dart'; | 16 import 'paper_input_error.dart'; |
17 import 'paper_input_char_counter.dart'; | 17 import 'paper_input_char_counter.dart'; |
18 | 18 |
| 19 /// Material design: [Text fields](https://www.google.com/design/spec/components
/text-fields.html) |
| 20 /// |
19 /// `<paper-input>` is a single-line text field with Material Design styling. | 21 /// `<paper-input>` is a single-line text field with Material Design styling. |
20 /// | 22 /// |
21 /// <paper-input label="Input label"></paper-input> | 23 /// <paper-input label="Input label"></paper-input> |
22 /// | 24 /// |
23 /// It may include an optional error message or character counter. | 25 /// It may include an optional error message or character counter. |
24 /// | 26 /// |
25 /// <paper-input error-message="Invalid input!" label="Input label"></paper-
input> | 27 /// <paper-input error-message="Invalid input!" label="Input label"></paper-
input> |
26 /// <paper-input char-counter label="Input label"></paper-input> | 28 /// <paper-input char-counter label="Input label"></paper-input> |
27 /// | 29 /// |
28 /// It can also include custom prefix or suffix elements, which are displayed | 30 /// It can also include custom prefix or suffix elements, which are displayed |
29 /// before or after the text input itself. In order for an element to be | 31 /// before or after the text input itself. In order for an element to be |
30 /// considered as a prefix, it must have the `prefix` attribute (and similarly | 32 /// considered as a prefix, it must have the `prefix` attribute (and similarly |
31 /// for `suffix`). | 33 /// for `suffix`). |
32 /// | 34 /// |
33 /// <paper-input label="total"> | 35 /// <paper-input label="total"> |
34 /// <div prefix>$</div> | 36 /// <div prefix>$</div> |
35 /// <paper-icon-button suffix icon="clear"></paper-icon-button> | 37 /// <paper-icon-button suffix icon="clear"></paper-icon-button> |
36 /// </paper-input> | 38 /// </paper-input> |
37 /// | 39 /// |
| 40 /// A `paper-input` can use the native `type=search` or `type=file` features. |
| 41 /// However, since we can't control the native styling of the input, in these ca
ses |
| 42 /// it's recommended to use a placeholder text, or `always-float-label`, |
| 43 /// as to not overlap the native UI (search icon, file button, etc.). |
| 44 /// |
| 45 /// <paper-input label="search!" type="search" |
| 46 /// placeholder="search for cats" autosave="test" results="5"> |
| 47 /// </paper-input> |
| 48 /// |
38 /// See `Polymer.PaperInputBehavior` for more API docs. | 49 /// See `Polymer.PaperInputBehavior` for more API docs. |
39 /// | 50 /// |
40 /// ### Styling | 51 /// ### Styling |
41 /// | 52 /// |
42 /// See `Polymer.PaperInputContainer` for a list of custom properties used to | 53 /// See `Polymer.PaperInputContainer` for a list of custom properties used to |
43 /// style this element. | 54 /// style this element. |
44 @CustomElementProxy('paper-input') | 55 @CustomElementProxy('paper-input') |
45 class PaperInput extends HtmlElement with CustomElementProxyMixin, PolymerBase,
IronFormElementBehavior, IronControlState, PaperInputBehavior, IronControlState
{ | 56 class PaperInput extends HtmlElement with CustomElementProxyMixin, PolymerBase,
IronFormElementBehavior, IronControlState, PaperInputBehavior, IronControlState
{ |
46 PaperInput.created() : super.created(); | 57 PaperInput.created() : super.created(); |
47 factory PaperInput() => new Element.tag('paper-input'); | 58 factory PaperInput() => new Element.tag('paper-input'); |
48 } | 59 } |
OLD | NEW |