@vaadin/number-field 23.2.0-alpha2 → 23.2.0-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/number-field",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polymer/polymer": "^3.0.0",
|
|
36
|
-
"@vaadin/component-base": "23.2.0-
|
|
37
|
-
"@vaadin/field-base": "23.2.0-
|
|
38
|
-
"@vaadin/input-container": "23.2.0-
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0-
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.2.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
36
|
+
"@vaadin/component-base": "23.2.0-alpha3",
|
|
37
|
+
"@vaadin/field-base": "23.2.0-alpha3",
|
|
38
|
+
"@vaadin/input-container": "23.2.0-alpha3",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha3",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.2.0-alpha3",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
46
|
"sinon": "^13.0.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "06e5875be93ca50da2846dafc65a8531010c0576"
|
|
49
49
|
}
|
|
@@ -25,10 +25,17 @@ export type NumberFieldInvalidChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
25
25
|
*/
|
|
26
26
|
export type NumberFieldValueChangedEvent = CustomEvent<{ value: string }>;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Fired whenever the field is validated.
|
|
30
|
+
*/
|
|
31
|
+
export type NumberFieldValidatedEvent = CustomEvent<{ valid: boolean }>;
|
|
32
|
+
|
|
28
33
|
export interface NumberFieldCustomEventMap {
|
|
29
34
|
'invalid-changed': NumberFieldInvalidChangedEvent;
|
|
30
35
|
|
|
31
36
|
'value-changed': NumberFieldValueChangedEvent;
|
|
37
|
+
|
|
38
|
+
validated: NumberFieldValidatedEvent;
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
export interface NumberFieldEventMap extends HTMLElementEventMap, NumberFieldCustomEventMap {
|
|
@@ -60,6 +67,7 @@ export interface NumberFieldEventMap extends HTMLElementEventMap, NumberFieldCus
|
|
|
60
67
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
61
68
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
62
69
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
70
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
63
71
|
*/
|
|
64
72
|
declare class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(ElementMixin(HTMLElement)))) {
|
|
65
73
|
/**
|
|
@@ -42,6 +42,7 @@ registerStyles('vaadin-number-field', inputFieldShared, { moduleId: 'vaadin-numb
|
|
|
42
42
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
43
43
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
44
44
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
45
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
45
46
|
*
|
|
46
47
|
* @extends HTMLElement
|
|
47
48
|
* @mixes InputFieldMixin
|
|
@@ -259,7 +260,7 @@ export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(E
|
|
|
259
260
|
if (!isNumUnset(min) || !isNumUnset(max)) {
|
|
260
261
|
this.validate();
|
|
261
262
|
} else if (!required) {
|
|
262
|
-
this.
|
|
263
|
+
this._setInvalid(false);
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
|