@vaadin/field-base 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/field-base",
3
- "version": "24.8.0-alpha8",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -22,7 +22,9 @@
22
22
  "files": [
23
23
  "index.d.ts",
24
24
  "index.js",
25
- "src"
25
+ "src",
26
+ "!src/styles/*-base-styles.d.ts",
27
+ "!src/styles/*-base-styles.js"
26
28
  ],
27
29
  "keywords": [
28
30
  "Vaadin",
@@ -31,16 +33,15 @@
31
33
  ],
32
34
  "dependencies": {
33
35
  "@open-wc/dedupe-mixin": "^1.3.0",
34
- "@polymer/polymer": "^3.0.0",
35
- "@vaadin/a11y-base": "24.8.0-alpha8",
36
- "@vaadin/component-base": "24.8.0-alpha8",
36
+ "@vaadin/a11y-base": "25.0.0-alpha1",
37
+ "@vaadin/component-base": "25.0.0-alpha1",
37
38
  "lit": "^3.0.0"
38
39
  },
39
40
  "devDependencies": {
40
- "@vaadin/chai-plugins": "24.8.0-alpha8",
41
- "@vaadin/test-runner-commands": "24.8.0-alpha8",
41
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
42
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
42
43
  "@vaadin/testing-helpers": "^1.1.0",
43
44
  "sinon": "^18.0.0"
44
45
  },
45
- "gitHead": "d914bb8f669d7e3d1981feb8eac05688ab9870b4"
46
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
46
47
  }
@@ -3,7 +3,7 @@
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
- import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
6
+ import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
7
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
8
  import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';
9
9
  import { InputMixin } from './input-mixin.js';
@@ -16,7 +16,7 @@ import { InputMixin } from './input-mixin.js';
16
16
  * @mixes DisabledMixin
17
17
  * @mixes InputMixin
18
18
  */
19
- export const CheckedMixin = dedupingMixin(
19
+ export const CheckedMixin = dedupeMixin(
20
20
  (superclass) =>
21
21
  class CheckedMixinClass extends DelegateStateMixin(DisabledMixin(InputMixin(superclass))) {
22
22
  static get properties() {
@@ -5,7 +5,6 @@
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
8
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
9
8
  import type { InputMixinClass } from './input-mixin.js';
10
9
 
11
10
  /**
@@ -13,11 +12,7 @@ import type { InputMixinClass } from './input-mixin.js';
13
12
  */
14
13
  export declare function ClearButtonMixin<T extends Constructor<HTMLElement>>(
15
14
  base: T,
16
- ): Constructor<ClearButtonMixinClass> &
17
- Constructor<ControllerMixinClass> &
18
- Constructor<InputMixinClass> &
19
- Constructor<KeyboardMixinClass> &
20
- T;
15
+ ): Constructor<ClearButtonMixinClass> & Constructor<InputMixinClass> & Constructor<KeyboardMixinClass> & T;
21
16
 
22
17
  export declare class ClearButtonMixinClass {
23
18
  /**
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
8
7
  import type { LabelMixinClass } from './label-mixin.js';
9
8
  import type { ValidateMixinClass } from './validate-mixin.js';
10
9
 
@@ -13,11 +12,7 @@ import type { ValidateMixinClass } from './validate-mixin.js';
13
12
  */
14
13
  export declare function FieldMixin<T extends Constructor<HTMLElement>>(
15
14
  superclass: T,
16
- ): Constructor<ControllerMixinClass> &
17
- Constructor<FieldMixinClass> &
18
- Constructor<LabelMixinClass> &
19
- Constructor<ValidateMixinClass> &
20
- T;
15
+ ): Constructor<FieldMixinClass> & Constructor<LabelMixinClass> & Constructor<ValidateMixinClass> & T;
21
16
 
22
17
  export declare class FieldMixinClass {
23
18
  /**
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FieldAriaController } from '@vaadin/a11y-base/src/field-aria-controller.js';
7
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
8
7
  import { ErrorController } from './error-controller.js';
9
8
  import { HelperController } from './helper-controller.js';
10
9
  import { LabelMixin } from './label-mixin.js';
@@ -14,12 +13,11 @@ import { ValidateMixin } from './validate-mixin.js';
14
13
  * A mixin to provide common field logic: label, error message and helper text.
15
14
  *
16
15
  * @polymerMixin
17
- * @mixes ControllerMixin
18
16
  * @mixes LabelMixin
19
17
  * @mixes ValidateMixin
20
18
  */
21
19
  export const FieldMixin = (superclass) =>
22
- class FieldMixinClass extends ValidateMixin(LabelMixin(ControllerMixin(superclass))) {
20
+ class FieldMixinClass extends ValidateMixin(LabelMixin(superclass)) {
23
21
  static get properties() {
24
22
  return {
25
23
  /**
@@ -3,7 +3,7 @@
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
- import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
6
+ import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
7
  import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';
8
8
  import { InputMixin } from './input-mixin.js';
9
9
  import { ValidateMixin } from './validate-mixin.js';
@@ -16,7 +16,7 @@ import { ValidateMixin } from './validate-mixin.js';
16
16
  * @mixes InputMixin
17
17
  * @mixes ValidateMixin
18
18
  */
19
- export const InputConstraintsMixin = dedupingMixin(
19
+ export const InputConstraintsMixin = dedupeMixin(
20
20
  (superclass) =>
21
21
  class InputConstraintsMixinClass extends DelegateStateMixin(ValidateMixin(InputMixin(superclass))) {
22
22
  /**
@@ -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 './clear-button-mixin.js';
@@ -24,7 +23,6 @@ import type { ValidateMixinClass } from './validate-mixin.js';
24
23
  export declare function InputControlMixin<T extends Constructor<HTMLElement>>(
25
24
  base: T,
26
25
  ): Constructor<ClearButtonMixinClass> &
27
- Constructor<ControllerMixinClass> &
28
26
  Constructor<DelegateFocusMixinClass> &
29
27
  Constructor<DelegateStateMixinClass> &
30
28
  Constructor<DisabledMixinClass> &
@@ -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 './clear-button-mixin.js';
@@ -25,7 +24,6 @@ import type { ValidateMixinClass } from './validate-mixin.js';
25
24
  export declare function InputFieldMixin<T extends Constructor<HTMLElement>>(
26
25
  base: T,
27
26
  ): Constructor<ClearButtonMixinClass> &
28
- Constructor<ControllerMixinClass> &
29
27
  Constructor<DelegateFocusMixinClass> &
30
28
  Constructor<DelegateStateMixinClass> &
31
29
  Constructor<DisabledMixinClass> &
@@ -56,15 +56,6 @@ export const InputFieldMixin = (superclass) =>
56
56
  return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];
57
57
  }
58
58
 
59
- // Workaround for https://github.com/Polymer/polymer/issues/5259
60
- get __data() {
61
- return this.__dataValue || {};
62
- }
63
-
64
- set __data(value) {
65
- this.__dataValue = value;
66
- }
67
-
68
59
  /**
69
60
  * @param {HTMLElement} input
70
61
  * @protected
@@ -15,11 +15,8 @@ export declare class InputMixinClass {
15
15
  /**
16
16
  * A reference to the input element controlled by the mixin.
17
17
  * Any component implementing this mixin is expected to provide it
18
- * by using `this._setInputElement(input)` Polymer API.
19
- *
20
- * A typical case is using `InputController` that does this automatically.
21
- * However, the input element does not have to always be native <input>:
22
- * as an example, <vaadin-combo-box-light> accepts other components.
18
+ * by using `this._setInputElement(input)` API. A typical case is
19
+ * using `InputController` that does this automatically.
23
20
  */
24
21
  readonly inputElement: HTMLElement;
25
22
 
@@ -3,7 +3,7 @@
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
- import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
6
+ import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
7
 
8
8
  /**
9
9
  * A mixin to store the reference to an input element
@@ -11,7 +11,7 @@ import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
11
11
  *
12
12
  * @polymerMixin
13
13
  */
14
- export const InputMixin = dedupingMixin(
14
+ export const InputMixin = dedupeMixin(
15
15
  (superclass) =>
16
16
  class InputMixinClass extends superclass {
17
17
  static get properties() {
@@ -19,11 +19,8 @@ export const InputMixin = dedupingMixin(
19
19
  /**
20
20
  * A reference to the input element controlled by the mixin.
21
21
  * Any component implementing this mixin is expected to provide it
22
- * by using `this._setInputElement(input)` Polymer API.
23
- *
24
- * A typical case is using `InputController` that does this automatically.
25
- * However, the input element does not have to always be native <input>:
26
- * as an example, <vaadin-combo-box-light> accepts other components.
22
+ * by using `this._setInputElement(input)` API. A typical case is
23
+ * using `InputController` that does this automatically.
27
24
  *
28
25
  * @protected
29
26
  * @type {!HTMLElement}
@@ -3,19 +3,17 @@
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
- import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
7
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
6
+ import { dedupeMixin } from '@open-wc/dedupe-mixin';
8
7
  import { LabelController } from './label-controller.js';
9
8
 
10
9
  /**
11
10
  * A mixin to provide label via corresponding property or named slot.
12
11
  *
13
12
  * @polymerMixin
14
- * @mixes ControllerMixin
15
13
  */
16
- export const LabelMixin = dedupingMixin(
14
+ export const LabelMixin = dedupeMixin(
17
15
  (superclass) =>
18
- class LabelMixinClass extends ControllerMixin(superclass) {
16
+ class LabelMixinClass extends superclass {
19
17
  static get properties() {
20
18
  return {
21
19
  /**
@@ -5,4 +5,4 @@
5
5
  */
6
6
  import type { CSSResult } from 'lit';
7
7
 
8
- export const clearButton: CSSResult;
8
+ export const button: CSSResult;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { css } from 'lit';
7
7
 
8
- export const clearButton = css`
8
+ export const button = css`
9
9
  [part='clear-button'] {
10
10
  display: none;
11
11
  cursor: default;
@@ -5,4 +5,4 @@
5
5
  */
6
6
  import type { CSSResult } from 'lit';
7
7
 
8
- export const fieldShared: CSSResult;
8
+ export const container: CSSResult;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { css } from 'lit';
7
7
 
8
- export const inputFieldContainer = css`
8
+ export const container = css`
9
9
  [class$='container'] {
10
10
  display: flex;
11
11
  flex-direction: column;
@@ -5,4 +5,4 @@
5
5
  */
6
6
  import type { CSSResult } from 'lit';
7
7
 
8
- export const inputFieldContainer: CSSResult;
8
+ export const field: CSSResult;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { css } from 'lit';
7
7
 
8
- export const fieldShared = css`
8
+ export const field = css`
9
9
  :host {
10
10
  display: inline-flex;
11
11
  outline: none;
@@ -3,8 +3,8 @@
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
- import { clearButton } from './clear-button-styles.js';
7
- import { fieldShared } from './field-shared-styles.js';
8
- import { inputFieldContainer } from './input-field-container-styles.js';
6
+ import { button } from './button-core-styles.js';
7
+ import { container } from './container-core-styles.js';
8
+ import { field } from './field-core-styles.js';
9
9
 
10
- export const inputFieldShared = [fieldShared, inputFieldContainer, clearButton];
10
+ export const inputFieldShared = [field, container, button];
@@ -3,14 +3,14 @@
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
- import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
6
+ import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
7
 
8
8
  /**
9
9
  * A mixin to provide required state and validation logic.
10
10
  *
11
11
  * @polymerMixin
12
12
  */
13
- export const ValidateMixin = dedupingMixin(
13
+ export const ValidateMixin = dedupeMixin(
14
14
  (superclass) =>
15
15
  class ValidateMixinClass extends superclass {
16
16
  static get properties() {