@vaadin/details 23.2.2 → 23.3.0-alpha2
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 +7 -7
- package/src/vaadin-details.d.ts +2 -1
- package/src/vaadin-details.js +11 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/details",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha2",
|
|
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": "
|
|
40
|
-
"@vaadin/field-base": "
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
42
|
-
"@vaadin/vaadin-material-styles": "
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
39
|
+
"@vaadin/component-base": "23.3.0-alpha2",
|
|
40
|
+
"@vaadin/field-base": "23.3.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha2",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
|
|
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": "
|
|
54
|
+
"gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
|
|
55
55
|
}
|
package/src/vaadin-details.d.ts
CHANGED
|
@@ -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
|
*/
|
package/src/vaadin-details.js
CHANGED
|
@@ -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