@vaadin/number-field
Advanced tools
Comparing version 24.5.0-alpha1 to 24.5.0-alpha10
{ | ||
"name": "@vaadin/number-field", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"publishConfig": { | ||
@@ -41,15 +41,15 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.5.0-alpha1", | ||
"@vaadin/component-base": "24.5.0-alpha1", | ||
"@vaadin/field-base": "24.5.0-alpha1", | ||
"@vaadin/input-container": "24.5.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha1", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha1", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha1", | ||
"@vaadin/a11y-base": "24.5.0-alpha10", | ||
"@vaadin/component-base": "24.5.0-alpha10", | ||
"@vaadin/field-base": "24.5.0-alpha10", | ||
"@vaadin/input-container": "24.5.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha10", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/testing-helpers": "^0.6.0", | ||
"sinon": "^13.0.2" | ||
"@vaadin/chai-plugins": "24.5.0-alpha10", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
"sinon": "^18.0.0" | ||
}, | ||
@@ -60,3 +60,3 @@ "web-types": [ | ||
], | ||
"gitHead": "57806caac5468532a3b4e3dbdda730cd0fca193a" | ||
"gitHead": "6f9c37308031af872a98017bfab4de89aeacda51" | ||
} |
@@ -52,3 +52,3 @@ # @vaadin/number-field | ||
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components. | ||
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components. | ||
@@ -55,0 +55,0 @@ ## License |
@@ -6,2 +6,3 @@ /** | ||
*/ | ||
import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js'; | ||
import { InputController } from '@vaadin/field-base/src/input-controller.js'; | ||
@@ -198,2 +199,3 @@ import { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js'; | ||
e.preventDefault(); | ||
this.__blurActiveElement(); | ||
this._decreaseValue(); | ||
@@ -209,2 +211,3 @@ } | ||
e.preventDefault(); | ||
this.__blurActiveElement(); | ||
this._increaseValue(); | ||
@@ -214,2 +217,13 @@ } | ||
/** @private */ | ||
__blurActiveElement() { | ||
// If another element is focused, blur it on step button touch to hide | ||
// the mobile keyboard that might still be open for the other element. | ||
// See https://github.com/vaadin/web-components/issues/7494 | ||
const activeElement = getDeepActiveElement(); | ||
if (activeElement && activeElement !== this.inputElement) { | ||
activeElement.blur(); | ||
} | ||
} | ||
/** @protected */ | ||
@@ -216,0 +230,0 @@ _onDecreaseButtonClick() { |
@@ -25,3 +25,3 @@ /** | ||
[part\$='button'] { | ||
[part$='button'] { | ||
cursor: pointer; | ||
@@ -33,3 +33,3 @@ font-size: var(--lumo-icon-size-s); | ||
[part\$='button']::before { | ||
[part$='button']::before { | ||
margin-top: 0.3em; | ||
@@ -36,0 +36,0 @@ } |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/number-field", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-number-field", | ||
"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.5.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.", | ||
"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.5.0-alpha10/#/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.", | ||
"attributes": [ | ||
@@ -14,0 +14,0 @@ { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/number-field", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -19,3 +19,3 @@ "framework": "lit", | ||
"name": "vaadin-number-field", | ||
"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.5.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.", | ||
"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.5.0-alpha10/#/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.", | ||
"extension": true, | ||
@@ -22,0 +22,0 @@ "attributes": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77726
1734
+ Added@vaadin/a11y-base@24.5.0-alpha10(transitive)
+ Added@vaadin/component-base@24.5.0-alpha10(transitive)
+ Added@vaadin/field-base@24.5.0-alpha10(transitive)
+ Added@vaadin/icon@24.5.0-alpha10(transitive)
+ Added@vaadin/input-container@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-material-styles@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.5.0-alpha10(transitive)
- Removed@vaadin/a11y-base@24.5.0-alpha1(transitive)
- Removed@vaadin/component-base@24.5.0-alpha1(transitive)
- Removed@vaadin/field-base@24.5.0-alpha1(transitive)
- Removed@vaadin/icon@24.5.0-alpha1(transitive)
- Removed@vaadin/input-container@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-material-styles@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.5.0-alpha1(transitive)