@vaadin/details 24.2.0-alpha9 → 24.2.0-beta2

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/details",
3
- "version": "24.2.0-alpha9",
3
+ "version": "24.2.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -41,12 +41,12 @@
41
41
  "dependencies": {
42
42
  "@open-wc/dedupe-mixin": "^1.3.0",
43
43
  "@polymer/polymer": "^3.0.0",
44
- "@vaadin/a11y-base": "24.2.0-alpha9",
45
- "@vaadin/button": "24.2.0-alpha9",
46
- "@vaadin/component-base": "24.2.0-alpha9",
47
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha9",
48
- "@vaadin/vaadin-material-styles": "24.2.0-alpha9",
49
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha9"
44
+ "@vaadin/a11y-base": "24.2.0-beta2",
45
+ "@vaadin/button": "24.2.0-beta2",
46
+ "@vaadin/component-base": "24.2.0-beta2",
47
+ "@vaadin/vaadin-lumo-styles": "24.2.0-beta2",
48
+ "@vaadin/vaadin-material-styles": "24.2.0-beta2",
49
+ "@vaadin/vaadin-themable-mixin": "24.2.0-beta2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@esm-bundle/chai": "^4.3.4",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "e9765733fea96542e379e02e6f42b07145893140"
60
+ "gitHead": "4b852f9a12d4dade7f0fb3c73b7212436cebf310"
61
61
  }
@@ -64,6 +64,15 @@ export const CollapsibleMixin = (superClass) =>
64
64
  // Only handle click and not keydown, because `vaadin-details-summary` uses `ButtonMixin`
65
65
  // that already covers this logic, and `vaadin-accordion-heading` uses native `<button>`.
66
66
  this.addEventListener('click', ({ target }) => {
67
+ if (this.disabled) {
68
+ return;
69
+ }
70
+
71
+ // Do not change opened on link click
72
+ if (target.localName === 'a') {
73
+ return;
74
+ }
75
+
67
76
  const summary = this.focusElement;
68
77
 
69
78
  if (summary && (target === summary || summary.contains(target))) {
@@ -5,6 +5,9 @@
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
8
+ import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
+ import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
10
+ import type { TabindexMixinClass } from '@vaadin/a11y-base/src/tabindex-mixin.js';
8
11
  import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
9
12
  import type { CollapsibleMixinClass } from './collapsible-mixin.js';
10
13
 
@@ -14,6 +17,9 @@ export declare function DetailsBaseMixin<T extends Constructor<HTMLElement>>(
14
17
  Constructor<DelegateFocusMixinClass> &
15
18
  Constructor<DelegateStateMixinClass> &
16
19
  Constructor<DetailsBaseMixinClass> &
20
+ Constructor<DisabledMixinClass> &
21
+ Constructor<FocusMixinClass> &
22
+ Constructor<TabindexMixinClass> &
17
23
  T;
18
24
 
19
25
  export declare class DetailsBaseMixinClass {
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
7
  import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
8
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
9
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
10
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
 
@@ -32,6 +33,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
32
33
  *
33
34
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
34
35
  *
36
+ * @customElement
35
37
  * @extends HTMLElement
36
38
  * @mixes ButtonMixin
37
39
  * @mixes DirMixin
@@ -80,4 +82,4 @@ class DetailsSummary extends ButtonMixin(DirMixin(ThemableMixin(PolymerElement))
80
82
  }
81
83
  }
82
84
 
83
- customElements.define(DetailsSummary.is, DetailsSummary);
85
+ defineCustomElement(DetailsSummary);
@@ -6,6 +6,7 @@
6
6
  import './vaadin-details-summary.js';
7
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
8
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
12
  import { DetailsBaseMixin } from './vaadin-details-base-mixin.js';
@@ -44,6 +45,7 @@ import { DetailsBaseMixin } from './vaadin-details-base-mixin.js';
44
45
  *
45
46
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
46
47
  *
48
+ * @customElement
47
49
  * @extends HTMLElement
48
50
  * @mixes ControllerMixin
49
51
  * @mixes DetailsBaseMixin
@@ -86,6 +88,6 @@ class Details extends DetailsBaseMixin(ElementMixin(ThemableMixin(ControllerMixi
86
88
  }
87
89
  }
88
90
 
89
- customElements.define(Details.is, Details);
91
+ defineCustomElement(Details);
90
92
 
91
93
  export { Details };
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/details",
4
- "version": "24.2.0-alpha9",
4
+ "version": "24.2.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/details",
4
- "version": "24.2.0-alpha9",
4
+ "version": "24.2.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {