@vaadin/number-field 24.0.0-alpha8 → 24.0.0-beta1
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": "24.0.0-
|
|
3
|
+
"version": "24.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "24.0.0-
|
|
39
|
-
"@vaadin/field-base": "24.0.0-
|
|
40
|
-
"@vaadin/input-container": "24.0.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
38
|
+
"@vaadin/component-base": "24.0.0-beta1",
|
|
39
|
+
"@vaadin/field-base": "24.0.0-beta1",
|
|
40
|
+
"@vaadin/input-container": "24.0.0-beta1",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-beta1",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "24.0.0-beta1",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-beta1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
|
-
"@vaadin/testing-helpers": "^0.
|
|
47
|
+
"@vaadin/testing-helpers": "^0.4.0",
|
|
48
48
|
"sinon": "^13.0.2"
|
|
49
49
|
},
|
|
50
50
|
"web-types": [
|
|
51
51
|
"web-types.json",
|
|
52
52
|
"web-types.lit.json"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c5b48921a62482746df8e46994b37e1490fec27e"
|
|
55
55
|
}
|
|
@@ -63,7 +63,7 @@ export class NumberField extends InputFieldMixin(ThemableMixin(ElementMixin(Poly
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
[part='decrease-button']::before {
|
|
66
|
-
content: '
|
|
66
|
+
content: '\\2212';
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
[part='increase-button']::before {
|
|
@@ -241,17 +241,19 @@ export class NumberField extends InputFieldMixin(ThemableMixin(ElementMixin(Poly
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
|
-
* Override
|
|
245
|
-
* to
|
|
244
|
+
* Override the method from `InputConstraintsMixin`
|
|
245
|
+
* to enforce HTML constraint validation even if
|
|
246
|
+
* the user didn't add any constraints explicitly:
|
|
247
|
+
* the field has to be regardless checked for bad input.
|
|
246
248
|
*
|
|
247
249
|
* @override
|
|
248
250
|
*/
|
|
249
251
|
checkValidity() {
|
|
250
|
-
if (this.inputElement
|
|
251
|
-
return
|
|
252
|
+
if (this.inputElement) {
|
|
253
|
+
return this.inputElement.checkValidity();
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
return
|
|
256
|
+
return !this.invalid;
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
/** @private */
|
|
@@ -9,10 +9,6 @@ import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-
|
|
|
9
9
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
10
|
|
|
11
11
|
const numberField = css`
|
|
12
|
-
:host {
|
|
13
|
-
width: 8em;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
:host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {
|
|
17
13
|
text-align: center;
|
|
18
14
|
}
|
|
@@ -8,10 +8,6 @@ import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-fi
|
|
|
8
8
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
9
|
|
|
10
10
|
const numberField = css`
|
|
11
|
-
:host {
|
|
12
|
-
width: 8em;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
11
|
:host([step-buttons-visible]) ::slotted(input) {
|
|
16
12
|
text-align: center;
|
|
17
13
|
}
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/number-field",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-number-field",
|
|
11
|
-
"description": "`<vaadin-number-field>` is an input field web component that only accepts numeric input.\n\n```html\n<vaadin-number-field label=\"Balance\"></vaadin-number-field>\n```\n\n### Styling\n\n`<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
11
|
+
"description": "`<vaadin-number-field>` is an input field web component that only accepts numeric input.\n\n```html\n<vaadin-number-field label=\"Balance\"></vaadin-number-field>\n```\n\n### Styling\n\n`<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n------------------|-------------------------\n`increase-button` | Increase (\"plus\") button\n`decrease-button` | Decrease (\"minus\") button\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/number-field",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-number-field",
|
|
19
|
-
"description": "`<vaadin-number-field>` is an input field web component that only accepts numeric input.\n\n```html\n<vaadin-number-field label=\"Balance\"></vaadin-number-field>\n```\n\n### Styling\n\n`<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
19
|
+
"description": "`<vaadin-number-field>` is an input field web component that only accepts numeric input.\n\n```html\n<vaadin-number-field label=\"Balance\"></vaadin-number-field>\n```\n\n### Styling\n\n`<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n------------------|-------------------------\n`increase-button` | Increase (\"plus\") button\n`decrease-button` | Decrease (\"minus\") button\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|