Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/number-field

Package Overview
Dependencies
Maintainers
19
Versions
411
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 22.0.0-alpha6 to 22.0.0-alpha7

53

package.json
{
"name": "@vaadin/number-field",
"version": "22.0.0-alpha6",
"version": "22.0.0-alpha7",
"publishConfig": {
"access": "public"
},
"description": "vaadin-number-field",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/vaadin/web-components.git",
"directory": "packages/number-field"
},
"author": "Vaadin Ltd",
"homepage": "https://vaadin.com/components",
"bugs": {
"url": "https://github.com/vaadin/web-components/issues"
},
"main": "vaadin-number-field.js",
"module": "vaadin-number-field.js",
"repository": "vaadin/web-components",
"files": [
"src",
"theme",
"vaadin-*.d.ts",
"vaadin-*.js"
],
"keywords": [

@@ -14,23 +33,10 @@ "Vaadin",

],
"author": "Vaadin Ltd",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/vaadin/web-components/issues"
},
"homepage": "https://vaadin.com/components",
"files": [
"vaadin-*.d.ts",
"vaadin-*.js",
"src",
"theme"
],
"dependencies": {
"@polymer/polymer": "^3.0.0",
"@vaadin/field-base": "^22.0.0-alpha6",
"@vaadin/input-container": "^22.0.0-alpha6",
"@vaadin/text-field": "^22.0.0-alpha6",
"@vaadin/vaadin-element-mixin": "^22.0.0-alpha6",
"@vaadin/vaadin-lumo-styles": "^22.0.0-alpha6",
"@vaadin/vaadin-material-styles": "^22.0.0-alpha6",
"@vaadin/vaadin-themable-mixin": "^22.0.0-alpha6"
"@vaadin/component-base": "22.0.0-alpha7",
"@vaadin/field-base": "22.0.0-alpha7",
"@vaadin/input-container": "22.0.0-alpha7",
"@vaadin/vaadin-lumo-styles": "22.0.0-alpha7",
"@vaadin/vaadin-material-styles": "22.0.0-alpha7",
"@vaadin/vaadin-themable-mixin": "22.0.0-alpha7"
},

@@ -42,6 +48,3 @@ "devDependencies": {

},
"publishConfig": {
"access": "public"
},
"gitHead": "4b136b1c7da8942960e7255f40c27859125b3a45"
"gitHead": "8e89419c6b44a1d225d5859e180d7b35e47ddb52"
}

@@ -6,5 +6,4 @@ /**

*/
import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';
import { InputSlotMixin } from '@vaadin/field-base/src/input-slot-mixin.js';
import { SlotStylesMixin } from '@vaadin/field-base/src/slot-styles-mixin.js';

@@ -70,5 +69,3 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

*/
declare class NumberField extends InputFieldMixin(
SlotStylesMixin(InputSlotMixin(ThemableMixin(ElementMixin(HTMLElement))))
) {
declare class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(ElementMixin(HTMLElement)))) {
/**

@@ -75,0 +72,0 @@ * Set to true to display value increase/decrease controls.

@@ -7,10 +7,14 @@ /**

import { PolymerElement, html } from '@polymer/polymer';
import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { AriaLabelController } from '@vaadin/field-base/src/aria-label-controller.js';
import { InputController } from '@vaadin/field-base/src/input-controller.js';
import { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';
import { InputSlotMixin } from '@vaadin/field-base/src/input-slot-mixin.js';
import { SlotStylesMixin } from '@vaadin/field-base/src/slot-styles-mixin.js';
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import '@vaadin/input-container/src/vaadin-input-container.js';
import '@vaadin/text-field/src/vaadin-input-field-shared-styles.js';
registerStyles('vaadin-number-field', inputFieldShared, { moduleId: 'vaadin-number-field-styles' });
/**

@@ -57,9 +61,7 @@ * `<vaadin-number-field>` is an input field web component that only accepts numeric input.

* @mixes InputFieldMixin
* @mixes InputSlotMixin
* @mixes SlotStylesMixin
* @mixes ElementMixin
* @mixes ThemableMixin
*/
export class NumberField extends InputFieldMixin(
SlotStylesMixin(InputSlotMixin(ThemableMixin(ElementMixin(PolymerElement))))
) {
export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(ElementMixin(PolymerElement)))) {
static get is() {

@@ -71,3 +73,3 @@ return 'vaadin-number-field';

return html`
<style include="vaadin-input-field-shared-styles">
<style>
:host([readonly]) [part$='button'] {

@@ -97,6 +99,6 @@ pointer-events: none;

<div part="container">
<div class="vaadin-field-container">
<div part="label" on-click="focus">
<slot name="label"></slot>
<span part="indicator" aria-hidden="true"></span>
<span part="required-indicator" aria-hidden="true"></span>
</div>

@@ -238,2 +240,17 @@

/** @protected */
ready() {
super.ready();
this.addController(
new InputController(this, (input) => {
this._setInputElement(input);
this._setFocusElement(input);
this.stateTarget = input;
this.ariaTarget = input;
})
);
this.addController(new AriaLabelController(this.inputElement, this._labelNode));
}
/** @private */

@@ -240,0 +257,0 @@ _decreaseButtonTouchend(e) {

@@ -9,3 +9,3 @@ /**

import { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';
import { inputFieldShared } from '@vaadin/text-field/theme/lumo/vaadin-input-field-shared-styles.js';
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';

@@ -37,7 +37,15 @@ const numberField = css`

[part\$='button']::before {
margin-top: 0.2em;
margin-top: 0.3em;
}
[part='decrease-button']::before {
content: var(--lumo-icons-minus);
}
[part='increase-button']::before {
content: var(--lumo-icons-plus);
}
/* RTL specific styles */
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
:host([dir='rtl']:not([theme~='align-right'])) ::slotted(input) {
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);

@@ -44,0 +52,0 @@ }

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

import { fieldButton } from '@vaadin/vaadin-material-styles/mixins/field-button.js';
import { inputFieldShared } from '@vaadin/text-field/theme/material/vaadin-input-field-shared-styles.js';
import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';

@@ -11,0 +11,0 @@ const numberField = css`

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