@vaadin/integer-field 22.0.0-alpha9 → 22.0.0
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/README.md +13 -7
- package/package.json +6 -6
- package/src/vaadin-integer-field.d.ts +8 -19
- package/src/vaadin-integer-field.js +8 -19
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# @vaadin/integer-field
|
|
2
2
|
|
|
3
|
-
An extension of
|
|
3
|
+
An extension of [`<vaadin-number-field>`](https://www.npmjs.com/package/@vaadin/number-field) component that only allows entering integer numbers.
|
|
4
4
|
|
|
5
|
-
[Live Demo ↗](https://vaadin.com/docs/latest/ds/components/number-field/#integer-field)
|
|
5
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/number-field/#integer-field)
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@vaadin/integer-field)
|
|
8
|
+
[](https://discord.gg/PHmkCKC)
|
|
6
9
|
|
|
7
10
|
```html
|
|
8
11
|
<vaadin-integer-field label="X"></vaadin-integer-field>
|
|
@@ -13,7 +16,7 @@ An extension of `vaadin-number-field` component that only accepts entering integ
|
|
|
13
16
|
Install the component:
|
|
14
17
|
|
|
15
18
|
```sh
|
|
16
|
-
npm i @vaadin/integer-field
|
|
19
|
+
npm i @vaadin/integer-field
|
|
17
20
|
```
|
|
18
21
|
|
|
19
22
|
Once installed, import the component in your application:
|
|
@@ -24,9 +27,8 @@ import '@vaadin/integer-field';
|
|
|
24
27
|
|
|
25
28
|
## Themes
|
|
26
29
|
|
|
27
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes),
|
|
28
|
-
|
|
29
|
-
of the package uses Lumo theme.
|
|
30
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material.
|
|
31
|
+
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/integer-field/vaadin-integer-field.js) of the package uses Lumo theme.
|
|
30
32
|
|
|
31
33
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
32
34
|
|
|
@@ -46,9 +48,13 @@ Finally, you can import the un-themed component from the `src` folder to get a m
|
|
|
46
48
|
import '@vaadin/integer-field/src/vaadin-integer-field.js';
|
|
47
49
|
```
|
|
48
50
|
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
54
|
+
|
|
49
55
|
## License
|
|
50
56
|
|
|
51
57
|
Apache License 2.0
|
|
52
58
|
|
|
53
|
-
Vaadin collects development time
|
|
59
|
+
Vaadin collects usage statistics at development time to improve this product.
|
|
54
60
|
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/integer-field",
|
|
3
|
-
"version": "22.0.0
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/number-field": "22.0.0
|
|
36
|
-
"@vaadin/vaadin-lumo-styles": "22.0.0
|
|
37
|
-
"@vaadin/vaadin-material-styles": "22.0.0
|
|
35
|
+
"@vaadin/number-field": "^22.0.0",
|
|
36
|
+
"@vaadin/vaadin-lumo-styles": "^22.0.0",
|
|
37
|
+
"@vaadin/vaadin-material-styles": "^22.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@esm-bundle/chai": "^4.3.4",
|
|
41
|
-
"@vaadin/testing-helpers": "^0.3.
|
|
41
|
+
"@vaadin/testing-helpers": "^0.3.2",
|
|
42
42
|
"sinon": "^9.2.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b668e9b1a975227fbe34beb70d1cd5b03dce2348"
|
|
45
45
|
}
|
|
@@ -32,28 +32,17 @@ export interface IntegerFieldEventMap extends HTMLElementEventMap, IntegerFieldC
|
|
|
32
32
|
*
|
|
33
33
|
* ### Styling
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
* `<vaadin-integer-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
36
|
+
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
|
|
36
37
|
*
|
|
37
|
-
*
|
|
38
|
-
* ----------------|----------------
|
|
39
|
-
* `label` | The label element wrapper
|
|
40
|
-
* `input-field` | The element that wraps prefix, textarea and suffix
|
|
41
|
-
* `error-message` | The error message element wrapper
|
|
42
|
-
* `helper-text` | The helper text element wrapper
|
|
38
|
+
* In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
|
|
43
39
|
*
|
|
44
|
-
*
|
|
40
|
+
* Part name | Description
|
|
41
|
+
* ------------------|-------------------------
|
|
42
|
+
* `increase-button` | Increase ("plus") button
|
|
43
|
+
* `decrease-button` | Decrease ("minus") button
|
|
45
44
|
*
|
|
46
|
-
*
|
|
47
|
-
* --------------------|-------------------------------------------|----------
|
|
48
|
-
* `disabled` | Set when the element is disabled | :host
|
|
49
|
-
* `has-value` | Set when the element has a value | :host
|
|
50
|
-
* `has-label` | Set when the element has a label | :host
|
|
51
|
-
* `has-helper` | Set when the element has helper text | :host
|
|
52
|
-
* `has-error-message` | Set when the element has an error message | :host
|
|
53
|
-
* `invalid` | Set when the element is invalid | :host
|
|
54
|
-
* `focused` | Set when the element is focused | :host
|
|
55
|
-
* `focus-ring` | Set when the element is keyboard focused | :host
|
|
56
|
-
* `readonly` | Set when the element is readonly | :host
|
|
45
|
+
* Note, the `input-prevented` state attribute is not supported by `<vaadin-integer-field>`.
|
|
57
46
|
*
|
|
58
47
|
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
59
48
|
*
|
|
@@ -14,28 +14,17 @@ import { NumberField } from '@vaadin/number-field/src/vaadin-number-field.js';
|
|
|
14
14
|
*
|
|
15
15
|
* ### Styling
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* `<vaadin-integer-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
18
|
+
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
* ----------------|----------------
|
|
21
|
-
* `label` | The label element wrapper
|
|
22
|
-
* `input-field` | The element that wraps prefix, textarea and suffix
|
|
23
|
-
* `error-message` | The error message element wrapper
|
|
24
|
-
* `helper-text` | The helper text element wrapper
|
|
20
|
+
* In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
|
|
25
21
|
*
|
|
26
|
-
*
|
|
22
|
+
* Part name | Description
|
|
23
|
+
* ------------------|-------------------------
|
|
24
|
+
* `increase-button` | Increase ("plus") button
|
|
25
|
+
* `decrease-button` | Decrease ("minus") button
|
|
27
26
|
*
|
|
28
|
-
*
|
|
29
|
-
* --------------------|-------------------------------------------|----------
|
|
30
|
-
* `disabled` | Set when the element is disabled | :host
|
|
31
|
-
* `has-value` | Set when the element has a value | :host
|
|
32
|
-
* `has-label` | Set when the element has a label | :host
|
|
33
|
-
* `has-helper` | Set when the element has helper text | :host
|
|
34
|
-
* `has-error-message` | Set when the element has an error message | :host
|
|
35
|
-
* `invalid` | Set when the element is invalid | :host
|
|
36
|
-
* `focused` | Set when the element is focused | :host
|
|
37
|
-
* `focus-ring` | Set when the element is keyboard focused | :host
|
|
38
|
-
* `readonly` | Set when the element is readonly | :host
|
|
27
|
+
* Note, the `input-prevented` state attribute is not supported by `<vaadin-integer-field>`.
|
|
39
28
|
*
|
|
40
29
|
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
41
30
|
*
|