New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/number-field

Package Overview
Dependencies
Maintainers
12
Versions
421
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/number-field - npm Package Compare versions

Comparing version 24.2.0-alpha9 to 24.2.0-beta1

18

package.json
{
"name": "@vaadin/number-field",
"version": "24.2.0-alpha9",
"version": "24.2.0-beta1",
"publishConfig": {

@@ -41,9 +41,9 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "24.2.0-alpha9",
"@vaadin/component-base": "24.2.0-alpha9",
"@vaadin/field-base": "24.2.0-alpha9",
"@vaadin/input-container": "24.2.0-alpha9",
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha9",
"@vaadin/vaadin-material-styles": "24.2.0-alpha9",
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha9",
"@vaadin/a11y-base": "24.2.0-beta1",
"@vaadin/component-base": "24.2.0-beta1",
"@vaadin/field-base": "24.2.0-beta1",
"@vaadin/input-container": "24.2.0-beta1",
"@vaadin/vaadin-lumo-styles": "24.2.0-beta1",
"@vaadin/vaadin-material-styles": "24.2.0-beta1",
"@vaadin/vaadin-themable-mixin": "24.2.0-beta1",
"lit": "^2.0.0"

@@ -60,3 +60,3 @@ },

],
"gitHead": "e9765733fea96542e379e02e6f42b07145893140"
"gitHead": "67c8eef57d1c59e7476e29adaf003cf4548878f2"
}

@@ -13,2 +13,3 @@ /**

import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';

@@ -21,3 +22,2 @@ import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';

import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
import type { SlotStylesMixinClass } from '@vaadin/field-base/src/slot-styles-mixin.js';
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';

@@ -24,0 +24,0 @@

@@ -69,2 +69,3 @@ /**

this._setType('number');
this.__onWheel = this.__onWheel.bind(this);
}

@@ -138,2 +139,46 @@

/**
* Override the method from `InputMixin` to add
* a wheel event listener to the input element.
*
* @param {HTMLElement} input
* @override
* @protected
*/
_addInputListeners(input) {
super._addInputListeners(input);
input.addEventListener('wheel', this.__onWheel);
}
/**
* Override the method from `InputMixin` to remove
* the wheel event listener from the input element.
*
* @param {HTMLElement} input
* @override
* @protected
*/
_removeInputListeners(input) {
super._removeInputListeners(input);
input.removeEventListener('wheel', this.__onWheel);
}
/**
* Prevents default browser behavior for wheel events on the input element
* when it's focused. More precisely, this prevents the browser from attempting
* to increment or decrement the value when the mouse wheel is used within
* the input element.
*
* CAVEAT: As a side-effect, this also prevents page scrolling when
* the pointer is positioned over the field and the field is focused.
*
* @param {WheelEvent} event
* @private
*/
__onWheel(event) {
if (this.hasAttribute('focused')) {
event.preventDefault();
}
}
/** @protected */

@@ -222,2 +267,3 @@ _onDecreaseButtonTouchend(e) {

this.value = this.inputElement.value = String(parseFloat(value));
this.validate();
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));

@@ -224,0 +270,0 @@ }

@@ -8,2 +8,3 @@ /**

import { html, PolymerElement } from '@polymer/polymer';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';

@@ -49,2 +50,3 @@ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';

*
* @customElement
* @extends HTMLElement

@@ -119,5 +121,6 @@ * @mixes NumberFieldMixin

this._tooltipController.setPosition('top');
this._tooltipController.setAriaTarget(this.inputElement);
}
}
customElements.define(NumberField.is, NumberField);
defineCustomElement(NumberField);
{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/number-field",
"version": "24.2.0-alpha9",
"version": "24.2.0-beta1",
"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.2.0-alpha9/#/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.",
"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.2.0-beta1/#/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.",
"attributes": [

@@ -14,0 +14,0 @@ {

{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/number-field",
"version": "24.2.0-alpha9",
"version": "24.2.0-beta1",
"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.2.0-alpha9/#/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.",
"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.2.0-beta1/#/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.",
"extension": true,

@@ -22,0 +22,0 @@ "attributes": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc