@vaadin/number-field
Advanced tools
Comparing version 22.0.0-alpha6 to 22.0.0-alpha7
{ | ||
"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` |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
34072
7
619
0
+ Added@vaadin/component-base@22.0.0-alpha7(transitive)
+ Added@vaadin/field-base@22.0.0-alpha7(transitive)
+ Added@vaadin/icon@22.0.0-alpha7(transitive)
+ Added@vaadin/input-container@22.0.0-alpha7(transitive)
+ Added@vaadin/vaadin-lumo-styles@22.0.0-alpha7(transitive)
+ Added@vaadin/vaadin-material-styles@22.0.0-alpha7(transitive)
+ Added@vaadin/vaadin-themable-mixin@22.0.0-alpha7(transitive)
- Removed@vaadin/text-field@^22.0.0-alpha6
- Removed@open-wc/dedupe-mixin@1.4.0(transitive)
- Removed@vaadin/component-base@22.1.0(transitive)
- Removed@vaadin/field-base@22.1.0(transitive)
- Removed@vaadin/icon@22.1.0(transitive)
- Removed@vaadin/input-container@22.1.0(transitive)
- Removed@vaadin/text-field@22.1.0(transitive)
- Removed@vaadin/vaadin-element-mixin@22.0.0-alpha6(transitive)
- Removed@vaadin/vaadin-lumo-styles@22.1.0(transitive)
- Removed@vaadin/vaadin-material-styles@22.1.0(transitive)
- Removed@vaadin/vaadin-themable-mixin@22.1.0(transitive)