@vaadin/number-field 24.8.0-alpha8 → 25.0.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/README.md CHANGED
@@ -24,29 +24,6 @@ Once installed, import the component in your application:
24
24
  import '@vaadin/number-field';
25
25
  ```
26
26
 
27
- ## Themes
28
-
29
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
30
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/number-field/vaadin-number-field.js) of the package uses Lumo theme.
31
-
32
- To use the Material theme, import the component from the `theme/material` folder:
33
-
34
- ```js
35
- import '@vaadin/number-field/theme/material/vaadin-number-field.js';
36
- ```
37
-
38
- You can also import the Lumo version of the component explicitly:
39
-
40
- ```js
41
- import '@vaadin/number-field/theme/lumo/vaadin-number-field.js';
42
- ```
43
-
44
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
45
-
46
- ```js
47
- import '@vaadin/number-field/src/vaadin-number-field.js';
48
- ```
49
-
50
27
  ## Contributing
51
28
 
52
29
  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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/number-field",
3
- "version": "24.8.0-alpha8",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/*-base-styles.d.ts",
25
+ "!src/*-base-styles.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -35,19 +37,17 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.8.0-alpha8",
40
- "@vaadin/component-base": "24.8.0-alpha8",
41
- "@vaadin/field-base": "24.8.0-alpha8",
42
- "@vaadin/input-container": "24.8.0-alpha8",
43
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha8",
44
- "@vaadin/vaadin-material-styles": "24.8.0-alpha8",
45
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha8",
40
+ "@vaadin/a11y-base": "25.0.0-alpha1",
41
+ "@vaadin/component-base": "25.0.0-alpha1",
42
+ "@vaadin/field-base": "25.0.0-alpha1",
43
+ "@vaadin/input-container": "25.0.0-alpha1",
44
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
45
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "24.8.0-alpha8",
50
- "@vaadin/test-runner-commands": "24.8.0-alpha8",
49
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
50
+ "@vaadin/test-runner-commands": "25.0.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": "d914bb8f669d7e3d1981feb8eac05688ab9870b4"
58
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
59
59
  }
@@ -0,0 +1,31 @@
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/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const numberFieldStyles = css`
10
+ @layer base {
11
+ :host([step-buttons-visible]) ::slotted(input) {
12
+ text-align: center;
13
+ }
14
+
15
+ [part='decrease-button']::before {
16
+ mask-image: var(--_vaadin-icon-minus);
17
+ }
18
+
19
+ [part='increase-button']::before {
20
+ mask-image: var(--_vaadin-icon-plus);
21
+ }
22
+
23
+ :host([dir='rtl']) [part='input-field'] {
24
+ direction: ltr;
25
+ }
26
+
27
+ :host([readonly]) [part$='button'] {
28
+ pointer-events: none;
29
+ }
30
+ }
31
+ `;
@@ -3,4 +3,6 @@
3
3
  * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- export * from './vaadin-number-field.js';
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const numberFieldStyles: CSSResult;
@@ -8,7 +8,6 @@ import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-foc
8
8
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
9
  import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
10
10
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
11
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
12
11
  import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
13
12
  import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
14
13
  import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
@@ -26,7 +25,6 @@ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.j
26
25
  export declare function NumberFieldMixin<T extends Constructor<HTMLElement>>(
27
26
  base: T,
28
27
  ): Constructor<ClearButtonMixinClass> &
29
- Constructor<ControllerMixinClass> &
30
28
  Constructor<DelegateFocusMixinClass> &
31
29
  Constructor<DelegateStateMixinClass> &
32
30
  Constructor<DisabledMixinClass> &
@@ -4,17 +4,15 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/input-container/src/vaadin-input-container.js';
7
- import { html, PolymerElement } from '@polymer/polymer';
7
+ import { html, LitElement } from 'lit';
8
+ import { ifDefined } from 'lit/directives/if-defined.js';
8
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
12
  import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
11
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
+ import { numberFieldStyles } from './vaadin-number-field-core-styles.js';
12
15
  import { NumberFieldMixin } from './vaadin-number-field-mixin.js';
13
- import { numberFieldStyles } from './vaadin-number-field-styles.js';
14
-
15
- registerStyles('vaadin-number-field', [inputFieldShared, numberFieldStyles], {
16
- moduleId: 'vaadin-number-field-styles',
17
- });
18
16
 
19
17
  /**
20
18
  * `<vaadin-number-field>` is an input field web component that only accepts numeric input.
@@ -71,32 +69,37 @@ registerStyles('vaadin-number-field', [inputFieldShared, numberFieldStyles], {
71
69
  * @mixes ElementMixin
72
70
  * @mixes ThemableMixin
73
71
  */
74
- export class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {
72
+ class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
75
73
  static get is() {
76
74
  return 'vaadin-number-field';
77
75
  }
78
76
 
79
- static get template() {
77
+ static get styles() {
78
+ return [inputFieldShared, numberFieldStyles];
79
+ }
80
+
81
+ /** @protected */
82
+ render() {
80
83
  return html`
81
84
  <div class="vaadin-field-container">
82
85
  <div part="label">
83
86
  <slot name="label"></slot>
84
- <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
87
+ <span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
85
88
  </div>
86
89
 
87
90
  <vaadin-input-container
88
91
  part="input-field"
89
- readonly="[[readonly]]"
90
- disabled="[[disabled]]"
91
- invalid="[[invalid]]"
92
- theme$="[[_theme]]"
92
+ .readonly="${this.readonly}"
93
+ .disabled="${this.disabled}"
94
+ .invalid="${this.invalid}"
95
+ theme="${ifDefined(this._theme)}"
93
96
  >
94
97
  <div
95
- disabled$="[[!_isButtonEnabled(-1, value, min, max, step)]]"
96
98
  part="decrease-button"
97
- on-click="_onDecreaseButtonClick"
98
- on-touchend="_onDecreaseButtonTouchend"
99
- hidden$="[[!stepButtonsVisible]]"
99
+ ?disabled="${!this._isButtonEnabled(-1, this.value, this.min, this.max, this.step)}"
100
+ ?hidden="${!this.stepButtonsVisible}"
101
+ @click="${this._onDecreaseButtonClick}"
102
+ @touchend="${this._onDecreaseButtonTouchend}"
100
103
  aria-hidden="true"
101
104
  slot="prefix"
102
105
  ></div>
@@ -105,11 +108,11 @@ export class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(Pol
105
108
  <slot name="suffix" slot="suffix"></slot>
106
109
  <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
107
110
  <div
108
- disabled$="[[!_isButtonEnabled(1, value, min, max, step)]]"
109
111
  part="increase-button"
110
- on-click="_onIncreaseButtonClick"
111
- on-touchend="_onIncreaseButtonTouchend"
112
- hidden$="[[!stepButtonsVisible]]"
112
+ ?disabled="${!this._isButtonEnabled(1, this.value, this.min, this.max, this.step)}"
113
+ ?hidden="${!this.stepButtonsVisible}"
114
+ @click="${this._onIncreaseButtonClick}"
115
+ @touchend="${this._onIncreaseButtonTouchend}"
113
116
  aria-hidden="true"
114
117
  slot="suffix"
115
118
  ></div>
@@ -130,3 +133,5 @@ export class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(Pol
130
133
  }
131
134
 
132
135
  defineCustomElement(NumberField);
136
+
137
+ export { NumberField };
@@ -21,15 +21,16 @@ const numberField = css`
21
21
  padding: 0;
22
22
  }
23
23
 
24
- [part$='button'] {
24
+ [part='decrease-button'],
25
+ [part='increase-button'] {
25
26
  cursor: pointer;
26
- font-size: var(--lumo-icon-size-s);
27
- width: 1.6em;
28
- height: 1.6em;
27
+ width: 1.5em;
28
+ height: 1.5em;
29
29
  }
30
30
 
31
- [part$='button']::before {
32
- margin-top: 0.3em;
31
+ [part='decrease-button']::before,
32
+ [part='increase-button']::before {
33
+ margin-top: 0.25em;
33
34
  }
34
35
 
35
36
  [part='decrease-button']::before {
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.0-alpha8",
4
+ "version": "25.0.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.0-alpha8/#/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/25.0.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.0-alpha8",
4
+ "version": "25.0.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.0-alpha8/#/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/25.0.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 { NumberFieldMixin } from './vaadin-number-field-mixin.js';
15
- import { numberFieldStyles } from './vaadin-number-field-styles.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,6 +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/theme/material/vaadin-input-container-styles.js';
@@ -1,28 +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/theme/material/vaadin-input-container-styles.js';
7
- import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
8
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
-
10
- const numberField = css`
11
- :host([step-buttons-visible]) ::slotted(input) {
12
- text-align: center;
13
- }
14
-
15
- :host(:not([disabled])) [part$='button'][disabled] {
16
- opacity: 0.2;
17
- }
18
-
19
- [part$='decrease-button'] {
20
- cursor: pointer;
21
- font-size: var(--material-body-font-size);
22
- padding-bottom: 0.21em;
23
- }
24
- `;
25
-
26
- registerStyles('vaadin-number-field', [inputFieldShared, numberField], {
27
- moduleId: 'material-number-field',
28
- });
@@ -1,7 +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-number-field-styles.js';
7
- import '../../src/vaadin-number-field.js';
@@ -1,7 +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-number-field-styles.js';
7
- import '../../src/vaadin-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';