From 7df1e8584d5e38fa058cc54646d5cab4b0cfb7e0 Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Tue, 5 May 2015 12:04:37 -0700 Subject: [PATCH] add paper-input-behavior --- paper-input-behavior.html | 123 ++++++++++++++++++++++++++++++++++++++ paper-input.html | 103 ++----------------------------- 2 files changed, 127 insertions(+), 99 deletions(-) create mode 100644 paper-input-behavior.html diff --git a/paper-input-behavior.html b/paper-input-behavior.html new file mode 100644 index 00000000..50c5cb08 --- /dev/null +++ b/paper-input-behavior.html @@ -0,0 +1,123 @@ + + + + + + diff --git a/paper-input.html b/paper-input.html index e4c48e44..c6ebb25a 100644 --- a/paper-input.html +++ b/paper-input.html @@ -9,6 +9,7 @@ --> + @@ -51,105 +52,9 @@ is: 'paper-input', - properties: { - - /** - * The label for this input. - */ - label: { - type: String - }, - - /** - * The value for this input. - */ - value: { - notify: true, - type: String - }, - - /** - * Set to true to prevent the user from entering invalid input. - */ - preventInvalidInput: { - type: Boolean - }, - - /** - * The type of the input. The supported types are `text`, `number` and `password`. - */ - type: { - type: String - }, - - /** - * A pattern to validate the `input` with. - */ - pattern: { - type: String - }, - - /** - * Set to true to mark the input as required. - */ - required: { - type: Boolean, - value: false - }, - - /** - * The maximum length of the input value. - */ - maxlength: { - type: Number - }, - - /** - * The error message to display when the input is invalid. - */ - errorMessage: { - type: String - }, - - /** - * Set to true to show a character counter. - */ - charCounter: { - type: Boolean, - value: false - }, - - /** - * Set to true to disable the floating label. - */ - noLabelFloat: { - type: Boolean, - value: false - }, - - /** - * Set to true to auto-validate the input value. - */ - autoValidate: { - type: Boolean, - value: false - }, - - /** - * Set to true to disable user interactions with the input. - */ - disabled: { - type: Boolean, - value: false - } - }, - - /** - * Returns a reference to the input element. - */ - get inputElement() { - return this.$.input; - } + behaviors: [ + Polymer.PaperInputBehavior + ] })