update globalize
This commit is contained in:
parent
3d3df5717d
commit
7fb95d0419
21 changed files with 142 additions and 90 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-input",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "Material design text fields",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -44,11 +44,11 @@
|
|||
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
||||
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.9",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.9",
|
||||
"commit": "39ab833e7597fabfac9ff98d4825a6ae7b3c89c4"
|
||||
"tag": "v1.0.10",
|
||||
"commit": "902279329e0259de5487d6f1fa1f438be0e0802e"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-input.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-input",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "Material design text fields",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -109,14 +109,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum length of the input value. Bind this to the `<input is="iron-input">`'s
|
||||
* `maxlength` property.
|
||||
*/
|
||||
maxlength: {
|
||||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The error message to display when the input is invalid. Bind this to the
|
||||
* `<paper-input-error>`'s content, if using.
|
||||
|
@ -199,6 +191,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum length of the input value. Bind this to the `<input is="iron-input">`'s
|
||||
* `maxlength` property.
|
||||
*/
|
||||
maxlength: {
|
||||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum (numeric or date-time) input value.
|
||||
* Bind this to the `<input is="iron-input">`'s `min` property.
|
||||
*/
|
||||
min: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum (numeric or date-time) input value.
|
||||
* Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`).
|
||||
* Bind this to the `<input is="iron-input">`'s `max` property.
|
||||
*/
|
||||
max: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* Limits the numeric or date-time increments.
|
||||
* Bind this to the `<input is="iron-input">`'s `step` property.
|
||||
*/
|
||||
step: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* Bind this to the `<input is="iron-input">`'s `name` property.
|
||||
*/
|
||||
|
|
|
@ -93,12 +93,15 @@ style this element.
|
|||
validator="[[validator]]"
|
||||
type$="[[type]]"
|
||||
pattern$="[[pattern]]"
|
||||
maxlength$="[[maxlength]]"
|
||||
required$="[[required]]"
|
||||
autocomplete$="[[autocomplete]]"
|
||||
autofocus$="[[autofocus]]"
|
||||
inputmode$="[[inputmode]]"
|
||||
minlength$="[[minlength]]"
|
||||
maxlength$="[[maxlength]]"
|
||||
min$="[[min]]"
|
||||
max$="[[max]]"
|
||||
step$="[[step]]"
|
||||
name$="[[name]]"
|
||||
placeholder$="[[placeholder]]"
|
||||
readonly$="[[readonly]]"
|
||||
|
|
|
@ -176,26 +176,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
input = fixture('basic');
|
||||
});
|
||||
|
||||
test('focus/blur events fired on host element', function(done) {
|
||||
test('focus/blur events fired on host element', function() {
|
||||
var nFocusEvents = 0;
|
||||
var nBlurEvents = 0;
|
||||
input.addEventListener('focus', function() {
|
||||
input.addEventListener('focus', function(event) {
|
||||
nFocusEvents += 1;
|
||||
// setTimeout to wait for potentially more, erroneous events
|
||||
setTimeout(function() {
|
||||
assert.equal(nFocusEvents, 1, 'one focus event fired');
|
||||
MockInteractions.blur(input.inputElement);
|
||||
});
|
||||
assert(input.focused, 'input is focused');
|
||||
MockInteractions.blur(input.inputElement);
|
||||
});
|
||||
input.addEventListener('blur', function() {
|
||||
nBlurEvents += 1;
|
||||
// setTimeout to wait for potentially more, erroneous events
|
||||
setTimeout(function() {
|
||||
assert.equal(nBlurEvents, 1, 'one blur event fired');
|
||||
done();
|
||||
});
|
||||
assert(!input.focused, 'input is blurred');
|
||||
});
|
||||
MockInteractions.focus(input.inputElement);
|
||||
assert.isTrue(nFocusEvents >= 1, 'focus event fired');
|
||||
assert.isTrue(nBlurEvents >= 1, 'blur event fired');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -138,20 +138,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
input = fixture('basic');
|
||||
});
|
||||
|
||||
test('focus/blur events fired on host element', function(done) {
|
||||
test('focus/blur events fired on host element', function() {
|
||||
var nFocusEvents = 0;
|
||||
var nBlurEvents = 0;
|
||||
input.addEventListener('focus', function(event) {
|
||||
nFocusEvents += 1;
|
||||
assert(input.focused, 'input is focused');
|
||||
MockInteractions.blur(input.inputElement.textarea);
|
||||
});
|
||||
input.addEventListener('blur', function() {
|
||||
nBlurEvents += 1;
|
||||
assert.isTrue(nFocusEvents >= 1, 'focus event fired');
|
||||
assert.isTrue(nBlurEvents >= 1, 'blur event fired');
|
||||
done();
|
||||
assert(!input.focused, 'input is blurred');
|
||||
});
|
||||
MockInteractions.focus(input.inputElement.textarea);
|
||||
assert.isTrue(nFocusEvents >= 1, 'focus event fired');
|
||||
assert.isTrue(nBlurEvents >= 1, 'blur event fired')
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue