| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * `cr-input` is a single-line text field for user input. It is a convenience | 7 * `cr-input` is a single-line text field for user input. It is a convenience |
| 8 * element wrapping `paper-input`. | 8 * element wrapping `paper-input`. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 /** | 21 /** |
| 22 * The label for this input. It normally appears as grey text inside | 22 * The label for this input. It normally appears as grey text inside |
| 23 * the text input and disappears once the user enters text. | 23 * the text input and disappears once the user enters text. |
| 24 */ | 24 */ |
| 25 label: { | 25 label: { |
| 26 type: String, | 26 type: String, |
| 27 value: '' | 27 value: '' |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Propagate the no-label-float property. |
| 32 */ |
| 33 noLabelFloat: { |
| 34 type: Boolean, |
| 35 value: false |
| 36 }, |
| 37 |
| 38 /** |
| 31 * Set to true to mark the input as required. | 39 * Set to true to mark the input as required. |
| 32 */ | 40 */ |
| 33 required: { | 41 required: { |
| 34 type: Boolean, | 42 type: Boolean, |
| 35 value: false | 43 value: false |
| 36 }, | 44 }, |
| 37 | 45 |
| 38 /** | 46 /** |
| 39 * Set to true to disable editing the input. | 47 * Set to true to disable editing the input. |
| 40 */ | 48 */ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 */ | 87 */ |
| 80 focus: function() { | 88 focus: function() { |
| 81 this.$.input.focus(); | 89 this.$.input.focus(); |
| 82 }, | 90 }, |
| 83 | 91 |
| 84 /** @override */ | 92 /** @override */ |
| 85 ready: function() { | 93 ready: function() { |
| 86 this.$.events.forward(this.$.input, ['change']); | 94 this.$.events.forward(this.$.input, ['change']); |
| 87 }, | 95 }, |
| 88 }); | 96 }); |
| OLD | NEW |