OLD | NEW |
(Empty) | |
| 1 |
| 2 |
| 3 (function() { |
| 4 |
| 5 Polymer({ |
| 6 |
| 7 is: 'paper-input', |
| 8 |
| 9 properties: { |
| 10 |
| 11 /** |
| 12 * The label for this input. |
| 13 */ |
| 14 label: { |
| 15 type: String |
| 16 }, |
| 17 |
| 18 /** |
| 19 * The value for this input. |
| 20 */ |
| 21 value: { |
| 22 notify: true, |
| 23 type: String |
| 24 }, |
| 25 |
| 26 /** |
| 27 * Set to true to prevent the user from entering invalid input. |
| 28 */ |
| 29 preventInvalidInput: { |
| 30 type: Boolean |
| 31 }, |
| 32 |
| 33 /** |
| 34 * The type of the input. The supported types are `text`, `number` and `pa
ssword`. |
| 35 */ |
| 36 type: { |
| 37 type: String |
| 38 }, |
| 39 |
| 40 /** |
| 41 * A pattern to validate the `input` with. |
| 42 */ |
| 43 pattern: { |
| 44 type: String |
| 45 }, |
| 46 |
| 47 /** |
| 48 * Set to true to mark the input as required. |
| 49 */ |
| 50 required: { |
| 51 type: Boolean, |
| 52 value: false |
| 53 }, |
| 54 |
| 55 /** |
| 56 * The maximum length of the input value. |
| 57 */ |
| 58 maxlength: { |
| 59 type: Number |
| 60 }, |
| 61 |
| 62 /** |
| 63 * The error message to display when the input is invalid. |
| 64 */ |
| 65 errorMessage: { |
| 66 type: String |
| 67 }, |
| 68 |
| 69 /** |
| 70 * Set to true to show a character counter. |
| 71 */ |
| 72 charCounter: { |
| 73 type: Boolean, |
| 74 value: false |
| 75 }, |
| 76 |
| 77 /** |
| 78 * Set to true to disable the floating label. |
| 79 */ |
| 80 noLabelFloat: { |
| 81 type: Boolean, |
| 82 value: false |
| 83 }, |
| 84 |
| 85 /** |
| 86 * Set to true to auto-validate the input value. |
| 87 */ |
| 88 autoValidate: { |
| 89 type: Boolean, |
| 90 value: false |
| 91 } |
| 92 |
| 93 }, |
| 94 |
| 95 /** |
| 96 * Returns a reference to the input element. |
| 97 */ |
| 98 get inputElement() { |
| 99 return this.$.input; |
| 100 } |
| 101 |
| 102 }) |
| 103 |
| 104 })(); |
| 105 |
OLD | NEW |