| OLD | NEW |
| (Empty) |
| 1 | |
| 2 | |
| 3 Polymer('paper-input', { | |
| 4 | |
| 5 publish: { | |
| 6 /** | |
| 7 * The label for this input. It normally appears as grey text inside | |
| 8 * the text input and disappears once the user enters text. | |
| 9 * | |
| 10 * @attribute label | |
| 11 * @type string | |
| 12 * @default '' | |
| 13 */ | |
| 14 label: '', | |
| 15 | |
| 16 /** | |
| 17 * If true, the label will "float" above the text input once the | |
| 18 * user enters text instead of disappearing. | |
| 19 * | |
| 20 * @attribute floatingLabel | |
| 21 * @type boolean | |
| 22 * @default false | |
| 23 */ | |
| 24 floatingLabel: false, | |
| 25 | |
| 26 /** | |
| 27 * Set to true to style the element as disabled. | |
| 28 * | |
| 29 * @attribute disabled | |
| 30 * @type boolean | |
| 31 * @default false | |
| 32 */ | |
| 33 disabled: {value: false, reflect: true}, | |
| 34 | |
| 35 /** | |
| 36 * The current value of the input. | |
| 37 * | |
| 38 * @attribute value | |
| 39 * @type String | |
| 40 * @default '' | |
| 41 */ | |
| 42 value: '', | |
| 43 | |
| 44 /** | |
| 45 * The most recently committed value of the input. | |
| 46 * | |
| 47 * @attribute committedValue | |
| 48 * @type String | |
| 49 * @default '' | |
| 50 */ | |
| 51 committedValue: '' | |
| 52 | |
| 53 }, | |
| 54 | |
| 55 valueChanged: function() { | |
| 56 this.$.decorator.updateLabelVisibility(this.value); | |
| 57 }, | |
| 58 | |
| 59 changeAction: function(e) { | |
| 60 if (!window.ShadowDOMPolyfill) { | |
| 61 // re-fire event that does not bubble across shadow roots | |
| 62 this.fire('change', null, this); | |
| 63 } | |
| 64 } | |
| 65 | |
| 66 }); | |
| 67 | |
| OLD | NEW |