@vaadin/number-field 24.8.5 → 24.9.0-alpha1

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.8.5",
3
+ "version": "24.9.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,18 +36,18 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "~24.8.5",
40
- "@vaadin/component-base": "~24.8.5",
41
- "@vaadin/field-base": "~24.8.5",
42
- "@vaadin/input-container": "~24.8.5",
43
- "@vaadin/vaadin-lumo-styles": "~24.8.5",
44
- "@vaadin/vaadin-material-styles": "~24.8.5",
45
- "@vaadin/vaadin-themable-mixin": "~24.8.5",
39
+ "@vaadin/a11y-base": "24.9.0-alpha1",
40
+ "@vaadin/component-base": "24.9.0-alpha1",
41
+ "@vaadin/field-base": "24.9.0-alpha1",
42
+ "@vaadin/input-container": "24.9.0-alpha1",
43
+ "@vaadin/vaadin-lumo-styles": "24.9.0-alpha1",
44
+ "@vaadin/vaadin-material-styles": "24.9.0-alpha1",
45
+ "@vaadin/vaadin-themable-mixin": "24.9.0-alpha1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "~24.8.5",
50
- "@vaadin/test-runner-commands": "~24.8.5",
49
+ "@vaadin/chai-plugins": "24.9.0-alpha1",
50
+ "@vaadin/test-runner-commands": "24.9.0-alpha1",
51
51
  "@vaadin/testing-helpers": "^1.1.0",
52
52
  "sinon": "^18.0.0"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "a519b0d2b1d09d1ddaa4ff6829819f8a2be30ad8"
58
+ "gitHead": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
59
59
  }
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.8.5",
4
+ "version": "24.9.0-alpha1",
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.8.5/#/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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | -\n\nNote, there is currently no way to detect unparsable => unparsable changes because the browser\ndoesn't provide access to unparsable values of native [type=number] inputs.",
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.9.0-alpha1/#/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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | -\n\nNote, there is currently no way to detect unparsable => unparsable changes because the browser\ndoesn't provide access to unparsable values of native [type=number] inputs.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/number-field",
4
- "version": "24.8.5",
4
+ "version": "24.9.0-alpha1",
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.8.5/#/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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | -\n\nNote, there is currently no way to detect unparsable => unparsable changes because the browser\ndoesn't provide access to unparsable values of native [type=number] inputs.",
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.9.0-alpha1/#/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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | -\n\nNote, there is currently no way to detect unparsable => unparsable changes because the browser\ndoesn't provide access to unparsable values of native [type=number] inputs.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -1,91 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import '@vaadin/input-container/src/vaadin-lit-input-container.js';
7
- import { html, LitElement } from 'lit';
8
- import { ifDefined } from 'lit/directives/if-defined.js';
9
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
- import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
13
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
- import { numberFieldStyles } from './vaadin-number-field-core-styles.js';
15
- import { NumberFieldMixin } from './vaadin-number-field-mixin.js';
16
-
17
- /**
18
- * LitElement based version of `<vaadin-number-field>` web component.
19
- *
20
- * ## Disclaimer
21
- *
22
- * This component is an experiment and not yet a part of Vaadin platform.
23
- * There is no ETA regarding specific Vaadin version where it'll land.
24
- * Feel free to try this code in your apps as per Apache 2.0 license.
25
- */
26
- class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
27
- static get is() {
28
- return 'vaadin-number-field';
29
- }
30
-
31
- static get styles() {
32
- return [inputFieldShared, numberFieldStyles];
33
- }
34
-
35
- /** @protected */
36
- render() {
37
- return html`
38
- <div class="vaadin-field-container">
39
- <div part="label">
40
- <slot name="label"></slot>
41
- <span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
42
- </div>
43
-
44
- <vaadin-input-container
45
- part="input-field"
46
- .readonly="${this.readonly}"
47
- .disabled="${this.disabled}"
48
- .invalid="${this.invalid}"
49
- theme="${ifDefined(this._theme)}"
50
- >
51
- <div
52
- part="decrease-button"
53
- ?disabled="${!this._isButtonEnabled(-1, this.value, this.min, this.max, this.step)}"
54
- ?hidden="${!this.stepButtonsVisible}"
55
- @click="${this._onDecreaseButtonClick}"
56
- @touchend="${this._onDecreaseButtonTouchend}"
57
- aria-hidden="true"
58
- slot="prefix"
59
- ></div>
60
- <slot name="prefix" slot="prefix"></slot>
61
- <slot name="input"></slot>
62
- <slot name="suffix" slot="suffix"></slot>
63
- <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
64
- <div
65
- part="increase-button"
66
- ?disabled="${!this._isButtonEnabled(1, this.value, this.min, this.max, this.step)}"
67
- ?hidden="${!this.stepButtonsVisible}"
68
- @click="${this._onIncreaseButtonClick}"
69
- @touchend="${this._onIncreaseButtonTouchend}"
70
- aria-hidden="true"
71
- slot="suffix"
72
- ></div>
73
- </vaadin-input-container>
74
-
75
- <div part="helper-text">
76
- <slot name="helper"></slot>
77
- </div>
78
-
79
- <div part="error-message">
80
- <slot name="error-message"></slot>
81
- </div>
82
- </div>
83
-
84
- <slot name="tooltip"></slot>
85
- `;
86
- }
87
- }
88
-
89
- defineCustomElement(NumberField);
90
-
91
- export { NumberField };
@@ -1,2 +0,0 @@
1
- import './vaadin-number-field-styles.js';
2
- import '../../src/vaadin-lit-number-field.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-number-field-styles.js';
2
- import '../../src/vaadin-lit-number-field.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-number-field-styles.js';
2
- import '../../src/vaadin-lit-number-field.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-number-field-styles.js';
2
- import '../../src/vaadin-lit-number-field.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-number-field.js';
@@ -1,3 +0,0 @@
1
- import './theme/lumo/vaadin-lit-number-field.js';
2
-
3
- export * from './src/vaadin-lit-number-field.js';