@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 +9 -8
- package/src/checked-mixin.js +2 -2
- package/src/clear-button-mixin.d.ts +1 -6
- package/src/field-mixin.d.ts +1 -6
- package/src/field-mixin.js +1 -3
- package/src/input-constraints-mixin.js +2 -2
- package/src/input-control-mixin.d.ts +0 -2
- package/src/input-field-mixin.d.ts +0 -2
- package/src/input-field-mixin.js +0 -9
- package/src/input-mixin.d.ts +2 -5
- package/src/input-mixin.js +4 -7
- package/src/label-mixin.js +3 -5
- package/src/styles/{clear-button-styles.d.ts → button-core-styles.d.ts} +1 -1
- package/src/styles/{clear-button-styles.js → button-core-styles.js} +1 -1
- package/src/styles/{field-shared-styles.d.ts → container-core-styles.d.ts} +1 -1
- package/src/styles/{input-field-container-styles.js → container-core-styles.js} +1 -1
- package/src/styles/{input-field-container-styles.d.ts → field-core-styles.d.ts} +1 -1
- package/src/styles/{field-shared-styles.js → field-core-styles.js} +1 -1
- package/src/styles/input-field-shared-styles.js +4 -4
- package/src/validate-mixin.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/field-base",
|
|
3
|
-
"version": "
|
|
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
|
-
"@
|
|
35
|
-
"@vaadin/
|
|
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": "
|
|
41
|
-
"@vaadin/test-runner-commands": "
|
|
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": "
|
|
46
|
+
"gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
|
|
46
47
|
}
|
package/src/checked-mixin.js
CHANGED
|
@@ -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 {
|
|
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 =
|
|
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
|
/**
|
package/src/field-mixin.d.ts
CHANGED
|
@@ -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<
|
|
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
|
/**
|
package/src/field-mixin.js
CHANGED
|
@@ -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(
|
|
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 {
|
|
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 =
|
|
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> &
|
package/src/input-field-mixin.js
CHANGED
|
@@ -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
|
package/src/input-mixin.d.ts
CHANGED
|
@@ -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)`
|
|
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
|
|
package/src/input-mixin.js
CHANGED
|
@@ -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 {
|
|
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 =
|
|
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)`
|
|
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}
|
package/src/label-mixin.js
CHANGED
|
@@ -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 {
|
|
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 =
|
|
14
|
+
export const LabelMixin = dedupeMixin(
|
|
17
15
|
(superclass) =>
|
|
18
|
-
class LabelMixinClass extends
|
|
16
|
+
class LabelMixinClass extends superclass {
|
|
19
17
|
static get properties() {
|
|
20
18
|
return {
|
|
21
19
|
/**
|
|
@@ -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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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 = [
|
|
10
|
+
export const inputFieldShared = [field, container, button];
|
package/src/validate-mixin.js
CHANGED
|
@@ -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 {
|
|
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 =
|
|
13
|
+
export const ValidateMixin = dedupeMixin(
|
|
14
14
|
(superclass) =>
|
|
15
15
|
class ValidateMixinClass extends superclass {
|
|
16
16
|
static get properties() {
|