@vaadin/details 23.2.0 → 23.3.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/details",
3
- "version": "23.2.0",
3
+ "version": "23.3.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,11 +36,11 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "^23.2.0",
40
- "@vaadin/field-base": "^23.2.0",
41
- "@vaadin/vaadin-lumo-styles": "^23.2.0",
42
- "@vaadin/vaadin-material-styles": "^23.2.0",
43
- "@vaadin/vaadin-themable-mixin": "^23.2.0"
39
+ "@vaadin/component-base": "23.3.0-alpha1",
40
+ "@vaadin/field-base": "23.3.0-alpha1",
41
+ "@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
42
+ "@vaadin/vaadin-material-styles": "23.3.0-alpha1",
43
+ "@vaadin/vaadin-themable-mixin": "23.3.0-alpha1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
@@ -51,5 +51,5 @@
51
51
  "web-types.json",
52
52
  "web-types.lit.json"
53
53
  ],
54
- "gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
54
+ "gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
55
55
  }
@@ -3,6 +3,7 @@
3
3
  * Copyright (c) 2019 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
6
7
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
8
  import { ShadowFocusMixin } from '@vaadin/field-base/src/shadow-focus-mixin.js';
8
9
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -53,7 +54,7 @@ export type DetailsEventMap = DetailsCustomEventMap & HTMLElementEventMap;
53
54
  *
54
55
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
55
56
  */
56
- declare class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(HTMLElement))) {
57
+ declare class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {
57
58
  /**
58
59
  * If true, the details content is visible.
59
60
  */
@@ -4,7 +4,9 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
7
8
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
+ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
8
10
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
9
11
  import { ShadowFocusMixin } from '@vaadin/field-base/src/shadow-focus-mixin.js';
10
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -45,11 +47,12 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
45
47
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
46
48
  *
47
49
  * @extends HTMLElement
50
+ * @mixes ControllerMixin
48
51
  * @mixes ShadowFocusMixin
49
52
  * @mixes ElementMixin
50
53
  * @mixes ThemableMixin
51
54
  */
52
- class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
55
+ class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {
53
56
  static get template() {
54
57
  return html`
55
58
  <style>
@@ -88,6 +91,7 @@ class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(PolymerElement
88
91
  <span part="toggle" aria-hidden="true"></span>
89
92
  <span part="summary-content"><slot name="summary"></slot></span>
90
93
  </div>
94
+ <slot name="tooltip"></slot>
91
95
  </div>
92
96
  <section id$="[[_contentId]]" part="content" aria-hidden$="[[_getAriaHidden(opened)]]">
93
97
  <slot></slot>
@@ -142,6 +146,12 @@ class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(PolymerElement
142
146
  e.stopPropagation();
143
147
  }
144
148
  });
149
+
150
+ this._tooltipController = new TooltipController(this);
151
+ this.addController(this._tooltipController);
152
+
153
+ this._tooltipController.setTarget(this.focusElement);
154
+ this._tooltipController.setPosition('bottom-start');
145
155
  }
146
156
 
147
157
  /** @private */
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": "23.2.0",
4
+ "version": "23.3.0-alpha1",
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": "23.2.0",
4
+ "version": "23.3.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {