@vaadin/field-base 25.1.0-alpha2 → 25.1.0-alpha4

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": "25.1.0-alpha2",
3
+ "version": "25.1.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,16 +31,16 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@open-wc/dedupe-mixin": "^1.3.0",
34
- "@vaadin/a11y-base": "25.1.0-alpha2",
35
- "@vaadin/component-base": "25.1.0-alpha2",
34
+ "@vaadin/a11y-base": "25.1.0-alpha4",
35
+ "@vaadin/component-base": "25.1.0-alpha4",
36
36
  "lit": "^3.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@vaadin/chai-plugins": "25.1.0-alpha2",
40
- "@vaadin/input-container": "25.1.0-alpha2",
41
- "@vaadin/test-runner-commands": "25.1.0-alpha2",
39
+ "@vaadin/chai-plugins": "25.1.0-alpha4",
40
+ "@vaadin/input-container": "25.1.0-alpha4",
41
+ "@vaadin/test-runner-commands": "25.1.0-alpha4",
42
42
  "@vaadin/testing-helpers": "^2.0.0",
43
43
  "sinon": "^21.0.0"
44
44
  },
45
- "gitHead": "dfeb6e14643ec923e5505ca645f7354c6dc170ec"
45
+ "gitHead": "4fb917150617231c1acf27faabf386560dcd3bc5"
46
46
  }
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2021 - 2026 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
6
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
7
  import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';
9
8
  import { InputMixin } from './input-mixin.js';
@@ -16,43 +15,41 @@ import { InputMixin } from './input-mixin.js';
16
15
  * @mixes DisabledMixin
17
16
  * @mixes InputMixin
18
17
  */
19
- export const CheckedMixin = dedupeMixin(
20
- (superclass) =>
21
- class CheckedMixinClass extends DelegateStateMixin(DisabledMixin(InputMixin(superclass))) {
22
- static get properties() {
23
- return {
24
- /**
25
- * True if the element is checked.
26
- * @type {boolean}
27
- */
28
- checked: {
29
- type: Boolean,
30
- value: false,
31
- notify: true,
32
- reflectToAttribute: true,
33
- sync: true,
34
- },
35
- };
36
- }
18
+ export const CheckedMixin = (superclass) =>
19
+ class CheckedMixinClass extends DelegateStateMixin(DisabledMixin(InputMixin(superclass))) {
20
+ static get properties() {
21
+ return {
22
+ /**
23
+ * True if the element is checked.
24
+ * @type {boolean}
25
+ */
26
+ checked: {
27
+ type: Boolean,
28
+ value: false,
29
+ notify: true,
30
+ reflectToAttribute: true,
31
+ sync: true,
32
+ },
33
+ };
34
+ }
37
35
 
38
- static get delegateProps() {
39
- return [...super.delegateProps, 'checked'];
40
- }
36
+ static get delegateProps() {
37
+ return [...super.delegateProps, 'checked'];
38
+ }
41
39
 
42
- /**
43
- * @param {Event} event
44
- * @protected
45
- * @override
46
- */
47
- _onChange(event) {
48
- const input = event.target;
40
+ /**
41
+ * @param {Event} event
42
+ * @protected
43
+ * @override
44
+ */
45
+ _onChange(event) {
46
+ const input = event.target;
49
47
 
50
- this._toggleChecked(input.checked);
51
- }
48
+ this._toggleChecked(input.checked);
49
+ }
52
50
 
53
- /** @protected */
54
- _toggleChecked(checked) {
55
- this.checked = checked;
56
- }
57
- },
58
- );
51
+ /** @protected */
52
+ _toggleChecked(checked) {
53
+ this.checked = checked;
54
+ }
55
+ };
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2021 - 2026 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
6
  import { LabelController } from './label-controller.js';
8
7
 
9
8
  /**
@@ -11,53 +10,51 @@ import { LabelController } from './label-controller.js';
11
10
  *
12
11
  * @polymerMixin
13
12
  */
14
- export const LabelMixin = dedupeMixin(
15
- (superclass) =>
16
- class LabelMixinClass extends superclass {
17
- static get properties() {
18
- return {
19
- /**
20
- * The label text for the input node.
21
- * When no light dom defined via [slot=label], this value will be used.
22
- */
23
- label: {
24
- type: String,
25
- observer: '_labelChanged',
26
- },
27
- };
28
- }
29
-
30
- constructor() {
31
- super();
32
-
33
- this._labelController = new LabelController(this);
34
-
35
- this._labelController.addEventListener('slot-content-changed', (event) => {
36
- this.toggleAttribute('has-label', event.detail.hasContent);
37
- });
38
- }
39
-
40
- /** @protected */
41
- get _labelId() {
42
- const node = this._labelNode;
43
- return node && node.id;
44
- }
45
-
46
- /** @protected */
47
- get _labelNode() {
48
- return this._labelController.node;
49
- }
50
-
51
- /** @protected */
52
- ready() {
53
- super.ready();
54
-
55
- this.addController(this._labelController);
56
- }
57
-
58
- /** @protected */
59
- _labelChanged(label) {
60
- this._labelController.setLabel(label);
61
- }
62
- },
63
- );
13
+ export const LabelMixin = (superclass) =>
14
+ class LabelMixinClass extends superclass {
15
+ static get properties() {
16
+ return {
17
+ /**
18
+ * The label text for the input node.
19
+ * When no light dom defined via [slot=label], this value will be used.
20
+ */
21
+ label: {
22
+ type: String,
23
+ observer: '_labelChanged',
24
+ },
25
+ };
26
+ }
27
+
28
+ constructor() {
29
+ super();
30
+
31
+ this._labelController = new LabelController(this);
32
+
33
+ this._labelController.addEventListener('slot-content-changed', (event) => {
34
+ this.toggleAttribute('has-label', event.detail.hasContent);
35
+ });
36
+ }
37
+
38
+ /** @protected */
39
+ get _labelId() {
40
+ const node = this._labelNode;
41
+ return node && node.id;
42
+ }
43
+
44
+ /** @protected */
45
+ get _labelNode() {
46
+ return this._labelController.node;
47
+ }
48
+
49
+ /** @protected */
50
+ ready() {
51
+ super.ready();
52
+
53
+ this.addController(this._labelController);
54
+ }
55
+
56
+ /** @protected */
57
+ _labelChanged(label) {
58
+ this._labelController.setLabel(label);
59
+ }
60
+ };