@spectrum-web-components/tooltip 0.11.13 → 0.11.14-overlay.33
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 +3 -3
- package/src/Tooltip.d.ts +7 -30
- package/src/Tooltip.dev.js +72 -163
- package/src/Tooltip.dev.js.map +3 -3
- package/src/Tooltip.js +23 -5
- package/src/Tooltip.js.map +3 -3
- package/src/spectrum-config.js +1 -0
- package/src/spectrum-tooltip.css.dev.js +10 -10
- package/src/spectrum-tooltip.css.dev.js.map +1 -1
- package/src/spectrum-tooltip.css.js +10 -10
- package/src/spectrum-tooltip.css.js.map +1 -1
- package/src/tooltip.css.dev.js +11 -11
- package/src/tooltip.css.dev.js.map +1 -1
- package/src/tooltip.css.js +11 -11
- package/src/tooltip.css.js.map +1 -1
- package/stories/tooltip.stories.js +27 -16
- package/stories/tooltip.stories.js.map +2 -2
- package/test/tooltip.test.js +12 -54
- package/test/tooltip.test.js.map +2 -2
- package/custom-elements.json +0 -374
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/tooltip",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.14-overlay.33+499d5fe96",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@spectrum-web-components/base": "^0.7.4",
|
|
61
|
-
"@spectrum-web-components/overlay": "^0.19.
|
|
61
|
+
"@spectrum-web-components/overlay": "^0.19.2-overlay.33+499d5fe96"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@spectrum-css/tooltip": "^4.0.10"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"./sp-*.js",
|
|
70
70
|
"./**/*.dev.js"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "499d5fe966f35eb862c1983eb3a42641f213ac6a"
|
|
73
73
|
}
|
package/src/Tooltip.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { CSSResultArray,
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
disconnectedCallback(): void;
|
|
5
|
-
}
|
|
1
|
+
import { CSSResultArray, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
|
+
import type { Placement } from '@spectrum-web-components/overlay';
|
|
3
|
+
import '@spectrum-web-components/overlay/sp-overlay.js';
|
|
6
4
|
/**
|
|
7
5
|
* @element sp-tooltip
|
|
8
6
|
*
|
|
@@ -15,41 +13,20 @@ export declare class Tooltip extends SpectrumElement {
|
|
|
15
13
|
* @private
|
|
16
14
|
*/
|
|
17
15
|
static instanceCount: number;
|
|
18
|
-
private _tooltipId;
|
|
19
16
|
selfManaged: boolean;
|
|
20
17
|
offset: number;
|
|
21
|
-
private hadTooltipId;
|
|
22
18
|
open: boolean;
|
|
23
19
|
/**
|
|
24
20
|
* @type {"auto" | "auto-start" | "auto-end" | "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | "none"}
|
|
25
21
|
* @attr
|
|
26
22
|
*/
|
|
27
23
|
placement: Placement;
|
|
28
|
-
|
|
24
|
+
tipElement: HTMLSpanElement;
|
|
29
25
|
private _variant;
|
|
30
26
|
get variant(): string;
|
|
31
27
|
set variant(variant: string);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
private generateProxy;
|
|
36
|
-
overlayWillOpenCallback({ trigger, }: {
|
|
37
|
-
trigger: HTMLElement;
|
|
38
|
-
}): void;
|
|
39
|
-
overlayOpenCancelledCallback({ trigger, }: {
|
|
40
|
-
trigger: HTMLElement;
|
|
41
|
-
}): void;
|
|
42
|
-
overlayCloseCallback({ trigger }: {
|
|
43
|
-
trigger: HTMLElement;
|
|
44
|
-
}): void;
|
|
45
|
-
private removeProxy;
|
|
46
|
-
private closeOverlayCallback?;
|
|
47
|
-
private abortOverlay;
|
|
48
|
-
private openOverlay;
|
|
49
|
-
private closeOverlay;
|
|
50
|
-
private previousSlot?;
|
|
51
|
-
private manageTooltip;
|
|
28
|
+
private handleOpenOverlay;
|
|
29
|
+
protected handleCloseOverlay: () => void;
|
|
30
|
+
protected handleTransitionend(): void;
|
|
52
31
|
render(): TemplateResult;
|
|
53
|
-
protected update(changed: PropertyValues<this>): Promise<void>;
|
|
54
|
-
protected updated(changed: PropertyValues<this>): void;
|
|
55
32
|
}
|
package/src/Tooltip.dev.js
CHANGED
|
@@ -18,69 +18,56 @@ import {
|
|
|
18
18
|
property,
|
|
19
19
|
query
|
|
20
20
|
} from "@spectrum-web-components/base/src/decorators.js";
|
|
21
|
-
import
|
|
21
|
+
import "@spectrum-web-components/overlay/sp-overlay.js";
|
|
22
22
|
import tooltipStyles from "./tooltip.css.js";
|
|
23
|
-
export class
|
|
24
|
-
disconnectedCallback() {
|
|
25
|
-
this.dispatchEvent(new Event("disconnected"));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
customElements.define("tooltip-proxy", TooltipProxy);
|
|
29
|
-
const _Tooltip = class extends SpectrumElement {
|
|
23
|
+
export class Tooltip extends SpectrumElement {
|
|
30
24
|
constructor() {
|
|
31
|
-
super();
|
|
32
|
-
this._tooltipId = `sp-tooltip-describedby-helper-${_Tooltip.instanceCount++}`;
|
|
25
|
+
super(...arguments);
|
|
33
26
|
this.selfManaged = false;
|
|
34
27
|
this.offset = 6;
|
|
35
|
-
this.hadTooltipId = false;
|
|
36
28
|
this.open = false;
|
|
37
29
|
this.placement = "top";
|
|
38
30
|
/* Ensure that a '' value for `variant` removes the attribute instead of a blank value */
|
|
39
31
|
this._variant = "";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
// public overlayWillOpenCallback({
|
|
33
|
+
// trigger,
|
|
34
|
+
// }: {
|
|
35
|
+
// trigger: HTMLElement;
|
|
36
|
+
// }): void {
|
|
37
|
+
// this.setAttribute('aria-hidden', 'true');
|
|
38
|
+
// const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';
|
|
39
|
+
// this.hadTooltipId = ariaDescribedby.search(this._tooltipId) > -1;
|
|
40
|
+
// if (this.hadTooltipId) return;
|
|
41
|
+
// if (ariaDescribedby) {
|
|
42
|
+
// trigger.setAttribute(
|
|
43
|
+
// 'aria-describedby',
|
|
44
|
+
// `${ariaDescribedby} ${this._tooltipId}`
|
|
45
|
+
// );
|
|
46
|
+
// } else {
|
|
47
|
+
// trigger.setAttribute('aria-describedby', `${this._tooltipId}`);
|
|
48
|
+
// }
|
|
49
|
+
// }
|
|
50
|
+
// public overlayCloseCallback({ trigger }: { trigger: HTMLElement }): void {
|
|
51
|
+
// const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';
|
|
52
|
+
// let descriptors = ariaDescribedby.split(/\s+/);
|
|
53
|
+
// if (!this.hadTooltipId) {
|
|
54
|
+
// descriptors = descriptors.filter(
|
|
55
|
+
// (descriptor) => descriptor !== this._tooltipId
|
|
56
|
+
// );
|
|
57
|
+
// }
|
|
58
|
+
// if (descriptors.length) {
|
|
59
|
+
// trigger.setAttribute('aria-describedby', descriptors.join(' '));
|
|
60
|
+
// } else {
|
|
61
|
+
// trigger.removeAttribute('aria-describedby');
|
|
62
|
+
// }
|
|
63
|
+
// this.removeAttribute('aria-hidden');
|
|
64
|
+
// }
|
|
65
|
+
this.handleOpenOverlay = () => {
|
|
66
|
+
this.open = true;
|
|
59
67
|
};
|
|
60
|
-
this.
|
|
61
|
-
|
|
62
|
-
if (pointerIsEnteringTooltip) {
|
|
63
|
-
this.addEventListener(
|
|
64
|
-
"pointerleave",
|
|
65
|
-
(event2) => {
|
|
66
|
-
const pointerIsEnteringParnet = event2.relatedTarget === this.parentElement;
|
|
67
|
-
if (pointerIsEnteringParnet) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.closeOverlay(event2);
|
|
71
|
-
},
|
|
72
|
-
{ once: true }
|
|
73
|
-
);
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (this.abortOverlay)
|
|
77
|
-
this.abortOverlay(true);
|
|
78
|
-
if (!this.closeOverlayCallback)
|
|
79
|
-
return;
|
|
80
|
-
(await this.closeOverlayCallback)();
|
|
81
|
-
delete this.closeOverlayCallback;
|
|
68
|
+
this.handleCloseOverlay = () => {
|
|
69
|
+
this.open = false;
|
|
82
70
|
};
|
|
83
|
-
this.addEventListener("sp-overlay-query", this.onOverlayQuery);
|
|
84
71
|
}
|
|
85
72
|
static get styles() {
|
|
86
73
|
return [tooltipStyles];
|
|
@@ -100,121 +87,43 @@ const _Tooltip = class extends SpectrumElement {
|
|
|
100
87
|
this.removeAttribute("variant");
|
|
101
88
|
this._variant = "";
|
|
102
89
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return;
|
|
109
|
-
event.detail.overlayContentTipElement = this.tipElement;
|
|
110
|
-
}
|
|
111
|
-
generateProxy() {
|
|
112
|
-
if (this._proxy) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
this._proxy = document.createElement("tooltip-proxy");
|
|
116
|
-
this._proxy.id = this._tooltipId;
|
|
117
|
-
this._proxy.hidden = true;
|
|
118
|
-
this._proxy.slot = "hidden-tooltip-content";
|
|
119
|
-
this._proxy.setAttribute("role", "tooltip");
|
|
120
|
-
this._proxy.addEventListener("disconnected", this.closeOverlay);
|
|
121
|
-
}
|
|
122
|
-
overlayWillOpenCallback({
|
|
123
|
-
trigger
|
|
124
|
-
}) {
|
|
125
|
-
this.setAttribute("aria-hidden", "true");
|
|
126
|
-
this.generateProxy();
|
|
127
|
-
this._proxy.textContent = this.textContent;
|
|
128
|
-
const ariaDescribedby = trigger.getAttribute("aria-describedby") || "";
|
|
129
|
-
this.hadTooltipId = ariaDescribedby.search(this._tooltipId) > -1;
|
|
130
|
-
this.insertAdjacentElement("beforebegin", this._proxy);
|
|
131
|
-
if (this.hadTooltipId)
|
|
132
|
-
return;
|
|
133
|
-
if (ariaDescribedby) {
|
|
134
|
-
trigger.setAttribute(
|
|
135
|
-
"aria-describedby",
|
|
136
|
-
`${ariaDescribedby} ${this._tooltipId}`
|
|
137
|
-
);
|
|
138
|
-
} else {
|
|
139
|
-
trigger.setAttribute("aria-describedby", `${this._tooltipId}`);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
overlayOpenCancelledCallback({
|
|
143
|
-
trigger
|
|
144
|
-
}) {
|
|
145
|
-
this.overlayCloseCallback({ trigger });
|
|
146
|
-
}
|
|
147
|
-
overlayCloseCallback({ trigger }) {
|
|
148
|
-
const ariaDescribedby = trigger.getAttribute("aria-describedby") || "";
|
|
149
|
-
let descriptors = ariaDescribedby.split(/\s+/);
|
|
150
|
-
if (!this.hadTooltipId) {
|
|
151
|
-
descriptors = descriptors.filter(
|
|
152
|
-
(descriptor) => descriptor !== this._tooltipId
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
if (descriptors.length) {
|
|
156
|
-
trigger.setAttribute("aria-describedby", descriptors.join(" "));
|
|
157
|
-
} else {
|
|
158
|
-
trigger.removeAttribute("aria-describedby");
|
|
159
|
-
}
|
|
160
|
-
this.removeAttribute("aria-hidden");
|
|
161
|
-
this.removeProxy();
|
|
162
|
-
}
|
|
163
|
-
removeProxy() {
|
|
164
|
-
this._proxy.remove();
|
|
165
|
-
}
|
|
166
|
-
manageTooltip() {
|
|
167
|
-
const parentElement = this.parentElement;
|
|
168
|
-
if (this.selfManaged) {
|
|
169
|
-
if (this.slot) {
|
|
170
|
-
this.previousSlot = this.slot;
|
|
171
|
-
}
|
|
172
|
-
this.slot = "self-managed-tooltip";
|
|
173
|
-
parentElement.addEventListener("pointerenter", this.openOverlay);
|
|
174
|
-
parentElement.addEventListener("focusin", this.openOverlay);
|
|
175
|
-
parentElement.addEventListener("pointerleave", this.closeOverlay);
|
|
176
|
-
parentElement.addEventListener("focusout", this.closeOverlay);
|
|
177
|
-
} else {
|
|
178
|
-
if (this.previousSlot) {
|
|
179
|
-
this.slot = this.previousSlot;
|
|
180
|
-
} else if (this.slot === "self-managed-tooltip") {
|
|
181
|
-
this.removeAttribute("slot");
|
|
182
|
-
}
|
|
183
|
-
parentElement.removeEventListener("pointerenter", this.openOverlay);
|
|
184
|
-
parentElement.removeEventListener("focusin", this.openOverlay);
|
|
185
|
-
parentElement.removeEventListener(
|
|
186
|
-
"pointerleave",
|
|
187
|
-
this.closeOverlay
|
|
188
|
-
);
|
|
189
|
-
parentElement.removeEventListener("focusout", this.closeOverlay);
|
|
190
|
-
}
|
|
90
|
+
handleTransitionend() {
|
|
91
|
+
this.dispatchEvent(new Event("transitionend", {
|
|
92
|
+
bubbles: true,
|
|
93
|
+
composed: true
|
|
94
|
+
}));
|
|
191
95
|
}
|
|
192
96
|
render() {
|
|
193
|
-
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
97
|
+
const tooltip = html`
|
|
98
|
+
<span
|
|
99
|
+
id="tooltip"
|
|
100
|
+
@transitionend=${this.handleTransitionend}
|
|
101
|
+
>
|
|
102
|
+
<slot name="icon"></slot>
|
|
103
|
+
<span id="label"><slot></slot></span>
|
|
104
|
+
<span id="tip"></span>
|
|
105
|
+
</span>
|
|
197
106
|
`;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
107
|
+
if (this.selfManaged) {
|
|
108
|
+
return html`
|
|
109
|
+
<sp-overlay
|
|
110
|
+
?open=${this.open}
|
|
111
|
+
offset=${this.offset}
|
|
112
|
+
type="hint"
|
|
113
|
+
.placement=${this.placement}
|
|
114
|
+
.triggerElement=${this.parentElement}
|
|
115
|
+
.triggerInteraction=${"hover"}
|
|
116
|
+
@sp-opened=${this.handleOpenOverlay}
|
|
117
|
+
@sp-closed=${this.handleCloseOverlay}
|
|
118
|
+
>
|
|
119
|
+
${tooltip}
|
|
120
|
+
</sp-overlay>
|
|
121
|
+
`;
|
|
122
|
+
} else {
|
|
123
|
+
return tooltip;
|
|
214
124
|
}
|
|
215
125
|
}
|
|
216
|
-
}
|
|
217
|
-
export let Tooltip = _Tooltip;
|
|
126
|
+
}
|
|
218
127
|
/**
|
|
219
128
|
* @private
|
|
220
129
|
*/
|
package/src/Tooltip.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Tooltip.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport type { Placement } from '@spectrum-web-components/overlay';\nimport '@spectrum-web-components/overlay/sp-overlay.js';\n\nimport tooltipStyles from './tooltip.css.js';\n\n/**\n * @element sp-tooltip\n *\n * @slot icon - the icon element appearing at the start of the label\n * @slot - the text label of the Tooltip\n */\n\nexport class Tooltip extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [tooltipStyles];\n }\n\n /**\n * @private\n */\n static instanceCount = 0;\n\n // private _tooltipId = `sp-tooltip-describedby-helper-${Tooltip.instanceCount++}`;\n\n @property({ type: Boolean, attribute: 'self-managed' })\n public selfManaged = false;\n\n @property({ type: Number, reflect: true })\n public offset = 6;\n // private hadTooltipId = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * @type {\"auto\" | \"auto-start\" | \"auto-end\" | \"top\" | \"bottom\" | \"right\" | \"left\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\" | \"none\"}\n * @attr\n */\n @property({ reflect: true })\n public placement: Placement = 'top';\n\n @query('#tip')\n public tipElement!: HTMLSpanElement;\n\n /* Ensure that a '' value for `variant` removes the attribute instead of a blank value */\n private _variant = '';\n\n @property({ type: String })\n public get variant(): string {\n return this._variant;\n }\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (['info', 'positive', 'negative'].includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n // public overlayWillOpenCallback({\n // trigger,\n // }: {\n // trigger: HTMLElement;\n // }): void {\n // this.setAttribute('aria-hidden', 'true');\n // const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';\n // this.hadTooltipId = ariaDescribedby.search(this._tooltipId) > -1;\n\n // if (this.hadTooltipId) return;\n\n // if (ariaDescribedby) {\n // trigger.setAttribute(\n // 'aria-describedby',\n // `${ariaDescribedby} ${this._tooltipId}`\n // );\n // } else {\n // trigger.setAttribute('aria-describedby', `${this._tooltipId}`);\n // }\n // }\n\n // public overlayCloseCallback({ trigger }: { trigger: HTMLElement }): void {\n // const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';\n // let descriptors = ariaDescribedby.split(/\\s+/);\n\n // if (!this.hadTooltipId) {\n // descriptors = descriptors.filter(\n // (descriptor) => descriptor !== this._tooltipId\n // );\n // }\n // if (descriptors.length) {\n // trigger.setAttribute('aria-describedby', descriptors.join(' '));\n // } else {\n // trigger.removeAttribute('aria-describedby');\n // }\n\n // this.removeAttribute('aria-hidden');\n // }\n\n private handleOpenOverlay = (): void => {\n this.open = true;\n };\n\n protected handleCloseOverlay = (): void => {\n this.open = false;\n };\n\n protected handleTransitionend(): void {\n this.dispatchEvent(new Event('transitionend', {\n bubbles: true,\n composed: true,\n }));\n }\n\n override render(): TemplateResult {\n const tooltip = html`\n <span\n id=\"tooltip\"\n @transitionend=${this.handleTransitionend}\n >\n <slot name=\"icon\"></slot>\n <span id=\"label\"><slot></slot></span>\n <span id=\"tip\"></span>\n </span>\n `;\n if (this.selfManaged) {\n return html`\n <sp-overlay\n ?open=${this.open}\n offset=${this.offset}\n type=\"hint\"\n .placement=${this.placement}\n .triggerElement=${this.parentElement}\n .triggerInteraction=${'hover'}\n @sp-opened=${this.handleOpenOverlay}\n @sp-closed=${this.handleCloseOverlay}\n >\n ${tooltip}\n </sp-overlay>\n `;\n } else {\n return tooltip;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO;AAEP,OAAO,mBAAmB;AASnB,aAAM,gBAAgB,gBAAgB;AAAA,EAAtC;AAAA;AAaH,SAAO,cAAc;AAGrB,SAAO,SAAS;AAIhB,SAAO,OAAO;AAOd,SAAO,YAAuB;AAM9B;AAAA,SAAQ,WAAW;AA0DnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAQ,oBAAoB,MAAY;AACpC,WAAK,OAAO;AAAA,IAChB;AAEA,SAAU,qBAAqB,MAAY;AACvC,WAAK,OAAO;AAAA,IAChB;AAAA;AAAA,EAhGA,WAA2B,SAAyB;AAChD,WAAO,CAAC,aAAa;AAAA,EACzB;AAAA,EAiCA,IAAW,UAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA,EACA,IAAW,QAAQ,SAAiB;AAChC,QAAI,YAAY,KAAK,SAAS;AAC1B;AAAA,IACJ;AACA,QAAI,CAAC,QAAQ,YAAY,UAAU,EAAE,SAAS,OAAO,GAAG;AACpD,WAAK,aAAa,WAAW,OAAO;AACpC,WAAK,WAAW;AAChB;AAAA,IACJ;AACA,SAAK,gBAAgB,SAAS;AAC9B,SAAK,WAAW;AAAA,EACpB;AAAA,EAiDU,sBAA4B;AAClC,SAAK,cAAc,IAAI,MAAM,iBAAiB;AAAA,MAC1C,SAAS;AAAA,MACT,UAAU;AAAA,IACd,CAAC,CAAC;AAAA,EACN;AAAA,EAES,SAAyB;AAC9B,UAAM,UAAU;AAAA;AAAA;AAAA,iCAGS,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9B,QAAI,KAAK,aAAa;AAClB,aAAO;AAAA;AAAA,4BAES,KAAK;AAAA,6BACJ,KAAK;AAAA;AAAA,iCAED,KAAK;AAAA,sCACA,KAAK;AAAA,0CACD;AAAA,iCACT,KAAK;AAAA,iCACL,KAAK;AAAA;AAAA,sBAEhB;AAAA;AAAA;AAAA,IAGd,OAAO;AACH,aAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAAA;AAAA;AAAA;AAxIa,QAQF,gBAAgB;AAKhB;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,WAAW,eAAe,CAAC;AAAA,GAZ7C,QAaF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAfhC,QAgBF;AAIA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAnBjC,QAoBF;AAOA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA1BlB,QA2BF;AAGA;AAAA,EADN,MAAM,MAAM;AAAA,GA7BJ,QA8BF;AAMI;AAAA,EADV,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAnCjB,QAoCE;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/src/Tooltip.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var n=(a,r,e,s)=>{for(var t=s>1?void 0:s?c(r,e):r,l=a.length-1,p;l>=0;l--)(p=a[l])&&(t=(s?p(r,e,t):p(t))||t);return s&&t&&u(r,e,t),t};import{html as o,SpectrumElement as d}from"@spectrum-web-components/base";import{property as i,query as m}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/overlay/sp-overlay.js";import h from"./tooltip.css.js";export class Tooltip extends d{constructor(){super(...arguments);this.selfManaged=!1;this.offset=6;this.open=!1;this.placement="top";this._variant="";this.handleOpenOverlay=()=>{this.open=!0};this.handleCloseOverlay=()=>{this.open=!1}}static get styles(){return[h]}get variant(){return this._variant}set variant(e){if(e!==this.variant){if(["info","positive","negative"].includes(e)){this.setAttribute("variant",e),this._variant=e;return}this.removeAttribute("variant"),this._variant=""}}handleTransitionend(){this.dispatchEvent(new Event("transitionend",{bubbles:!0,composed:!0}))}render(){const e=o`
|
|
2
|
+
<span
|
|
3
|
+
id="tooltip"
|
|
4
|
+
@transitionend=${this.handleTransitionend}
|
|
5
|
+
>
|
|
6
|
+
<slot name="icon"></slot>
|
|
7
|
+
<span id="label"><slot></slot></span>
|
|
8
|
+
<span id="tip"></span>
|
|
9
|
+
</span>
|
|
10
|
+
`;return this.selfManaged?o`
|
|
11
|
+
<sp-overlay
|
|
12
|
+
?open=${this.open}
|
|
13
|
+
offset=${this.offset}
|
|
14
|
+
type="hint"
|
|
15
|
+
.placement=${this.placement}
|
|
16
|
+
.triggerElement=${this.parentElement}
|
|
17
|
+
.triggerInteraction=${"hover"}
|
|
18
|
+
@sp-opened=${this.handleOpenOverlay}
|
|
19
|
+
@sp-closed=${this.handleCloseOverlay}
|
|
20
|
+
>
|
|
21
|
+
${e}
|
|
22
|
+
</sp-overlay>
|
|
23
|
+
`:e}}Tooltip.instanceCount=0,n([i({type:Boolean,attribute:"self-managed"})],Tooltip.prototype,"selfManaged",2),n([i({type:Number,reflect:!0})],Tooltip.prototype,"offset",2),n([i({type:Boolean,reflect:!0})],Tooltip.prototype,"open",2),n([i({reflect:!0})],Tooltip.prototype,"placement",2),n([m("#tip")],Tooltip.prototype,"tipElement",2),n([i({type:String})],Tooltip.prototype,"variant",1);
|
|
6
24
|
//# sourceMappingURL=Tooltip.js.map
|
package/src/Tooltip.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Tooltip.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n
|
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,
|
|
6
|
-
"names": ["html", "SpectrumElement", "property", "query", "
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport type { Placement } from '@spectrum-web-components/overlay';\nimport '@spectrum-web-components/overlay/sp-overlay.js';\n\nimport tooltipStyles from './tooltip.css.js';\n\n/**\n * @element sp-tooltip\n *\n * @slot icon - the icon element appearing at the start of the label\n * @slot - the text label of the Tooltip\n */\n\nexport class Tooltip extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [tooltipStyles];\n }\n\n /**\n * @private\n */\n static instanceCount = 0;\n\n // private _tooltipId = `sp-tooltip-describedby-helper-${Tooltip.instanceCount++}`;\n\n @property({ type: Boolean, attribute: 'self-managed' })\n public selfManaged = false;\n\n @property({ type: Number, reflect: true })\n public offset = 6;\n // private hadTooltipId = false;\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * @type {\"auto\" | \"auto-start\" | \"auto-end\" | \"top\" | \"bottom\" | \"right\" | \"left\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\" | \"none\"}\n * @attr\n */\n @property({ reflect: true })\n public placement: Placement = 'top';\n\n @query('#tip')\n public tipElement!: HTMLSpanElement;\n\n /* Ensure that a '' value for `variant` removes the attribute instead of a blank value */\n private _variant = '';\n\n @property({ type: String })\n public get variant(): string {\n return this._variant;\n }\n public set variant(variant: string) {\n if (variant === this.variant) {\n return;\n }\n if (['info', 'positive', 'negative'].includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n return;\n }\n this.removeAttribute('variant');\n this._variant = '';\n }\n\n // public overlayWillOpenCallback({\n // trigger,\n // }: {\n // trigger: HTMLElement;\n // }): void {\n // this.setAttribute('aria-hidden', 'true');\n // const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';\n // this.hadTooltipId = ariaDescribedby.search(this._tooltipId) > -1;\n\n // if (this.hadTooltipId) return;\n\n // if (ariaDescribedby) {\n // trigger.setAttribute(\n // 'aria-describedby',\n // `${ariaDescribedby} ${this._tooltipId}`\n // );\n // } else {\n // trigger.setAttribute('aria-describedby', `${this._tooltipId}`);\n // }\n // }\n\n // public overlayCloseCallback({ trigger }: { trigger: HTMLElement }): void {\n // const ariaDescribedby = trigger.getAttribute('aria-describedby') || '';\n // let descriptors = ariaDescribedby.split(/\\s+/);\n\n // if (!this.hadTooltipId) {\n // descriptors = descriptors.filter(\n // (descriptor) => descriptor !== this._tooltipId\n // );\n // }\n // if (descriptors.length) {\n // trigger.setAttribute('aria-describedby', descriptors.join(' '));\n // } else {\n // trigger.removeAttribute('aria-describedby');\n // }\n\n // this.removeAttribute('aria-hidden');\n // }\n\n private handleOpenOverlay = (): void => {\n this.open = true;\n };\n\n protected handleCloseOverlay = (): void => {\n this.open = false;\n };\n\n protected handleTransitionend(): void {\n this.dispatchEvent(new Event('transitionend', {\n bubbles: true,\n composed: true,\n }));\n }\n\n override render(): TemplateResult {\n const tooltip = html`\n <span\n id=\"tooltip\"\n @transitionend=${this.handleTransitionend}\n >\n <slot name=\"icon\"></slot>\n <span id=\"label\"><slot></slot></span>\n <span id=\"tip\"></span>\n </span>\n `;\n if (this.selfManaged) {\n return html`\n <sp-overlay\n ?open=${this.open}\n offset=${this.offset}\n type=\"hint\"\n .placement=${this.placement}\n .triggerElement=${this.parentElement}\n .triggerInteraction=${'hover'}\n @sp-opened=${this.handleOpenOverlay}\n @sp-closed=${this.handleCloseOverlay}\n >\n ${tooltip}\n </sp-overlay>\n `;\n } else {\n return tooltip;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OACI,YAAAC,EACA,SAAAC,MACG,kDAEP,MAAO,iDAEP,OAAOC,MAAmB,mBASnB,aAAM,gBAAgBH,CAAgB,CAAtC,kCAaH,KAAO,YAAc,GAGrB,KAAO,OAAS,EAIhB,KAAO,KAAO,GAOd,KAAO,UAAuB,MAM9B,KAAQ,SAAW,GA0DnB,KAAQ,kBAAoB,IAAY,CACpC,KAAK,KAAO,EAChB,EAEA,KAAU,mBAAqB,IAAY,CACvC,KAAK,KAAO,EAChB,EAhGA,WAA2B,QAAyB,CAChD,MAAO,CAACG,CAAa,CACzB,CAiCA,IAAW,SAAkB,CACzB,OAAO,KAAK,QAChB,CACA,IAAW,QAAQC,EAAiB,CAChC,GAAIA,IAAY,KAAK,QAGrB,IAAI,CAAC,OAAQ,WAAY,UAAU,EAAE,SAASA,CAAO,EAAG,CACpD,KAAK,aAAa,UAAWA,CAAO,EACpC,KAAK,SAAWA,EAChB,MACJ,CACA,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,GACpB,CAiDU,qBAA4B,CAClC,KAAK,cAAc,IAAI,MAAM,gBAAiB,CAC1C,QAAS,GACT,SAAU,EACd,CAAC,CAAC,CACN,CAES,QAAyB,CAC9B,MAAMC,EAAUN;AAAA;AAAA;AAAA,iCAGS,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAO9B,OAAI,KAAK,YACEA;AAAA;AAAA,4BAES,KAAK;AAAA,6BACJ,KAAK;AAAA;AAAA,iCAED,KAAK;AAAA,sCACA,KAAK;AAAA,0CACD;AAAA,iCACT,KAAK;AAAA,iCACL,KAAK;AAAA;AAAA,sBAEhBM;AAAA;AAAA,cAIHA,CAEf,CACJ,CAxIa,QAQF,cAAgB,EAKhBC,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,CAAC,GAZ7C,QAaF,2BAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAfhC,QAgBF,sBAIAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAnBjC,QAoBF,oBAOAK,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GA1BlB,QA2BF,yBAGAK,EAAA,CADNJ,EAAM,MAAM,GA7BJ,QA8BF,0BAMII,EAAA,CADVL,EAAS,CAAE,KAAM,MAAO,CAAC,GAnCjB,QAoCE",
|
|
6
|
+
"names": ["html", "SpectrumElement", "property", "query", "tooltipStyles", "variant", "tooltip", "__decorateClass"]
|
|
7
7
|
}
|
package/src/spectrum-config.js
CHANGED
|
@@ -3,7 +3,7 @@ import { css } from "@spectrum-web-components/base";
|
|
|
3
3
|
const styles = css`
|
|
4
4
|
:host{--spectrum-overlay-animation-distance:6px;--spectrum-overlay-animation-duration:var(
|
|
5
5
|
--spectrum-animation-duration-100
|
|
6
|
-
)
|
|
6
|
+
)}#tooltip{opacity:0;pointer-events:none;transition:transform var(--spectrum-overlay-animation-duration) ease-in-out,opacity var(--spectrum-overlay-animation-duration) ease-in-out,visibility 0ms linear var(--spectrum-overlay-animation-duration);visibility:hidden}:host([open]) #tooltip{opacity:1;pointer-events:auto;transition-delay:0ms;visibility:visible}:host([open]) .spectrum-Tooltip--bottom-end,:host([open]) .spectrum-Tooltip--bottom-left,:host([open]) .spectrum-Tooltip--bottom-right,:host([open]) .spectrum-Tooltip--bottom-start,:host([placement*=bottom][open]) #tooltip{--spectrum-overlay-animation-distance:6px;transform:translateY(var(--spectrum-overlay-animation-distance))}:host([open]) #tooltip,:host([open]) .spectrum-Tooltip--top-end,:host([open]) .spectrum-Tooltip--top-left,:host([open]) .spectrum-Tooltip--top-right,:host([open]) .spectrum-Tooltip--top-start,:host([placement*=top][open]) #tooltip{--spectrum-overlay-animation-distance:6px;transform:translateY(calc(var(--spectrum-overlay-animation-distance)*-1))}:host([dir=rtl][open]) .spectrum-Tooltip--start,:host([dir=rtl][open]) .spectrum-Tooltip--start-bottom,:host([dir=rtl][open]) .spectrum-Tooltip--start-top,:host([open]) .spectrum-Tooltip--end,:host([open]) .spectrum-Tooltip--end-bottom,:host([open]) .spectrum-Tooltip--end-top,:host([open]) .spectrum-Tooltip--right-bottom,:host([open]) .spectrum-Tooltip--right-top,:host([placement*=right][open]) #tooltip{--spectrum-overlay-animation-distance:6px;transform:translateX(var(--spectrum-overlay-animation-distance))}:host([dir=rtl][open]) .spectrum-Tooltip--end,:host([dir=rtl][open]) .spectrum-Tooltip--end-bottom,:host([dir=rtl][open]) .spectrum-Tooltip--end-top,:host([open]) .spectrum-Tooltip--left-bottom,:host([open]) .spectrum-Tooltip--left-top,:host([open]) .spectrum-Tooltip--start,:host([open]) .spectrum-Tooltip--start-bottom,:host([open]) .spectrum-Tooltip--start-top,:host([placement*=left][open]) #tooltip{--spectrum-overlay-animation-distance:6px;transform:translateX(calc(var(--spectrum-overlay-animation-distance)*-1))}:host{--spectrum-tooltip-animation-duration:var(
|
|
7
7
|
--spectrum-animation-duration-100
|
|
8
8
|
);--spectrum-tooltip-animation-distance:var(--spectrum-spacing-75);--spectrum-tooltip-margin:0px;--spectrum-tooltip-height:var(--spectrum-component-height-75);--spectrum-tooltip-max-inline-size:var(--spectrum-tooltip-maximum-width);--spectrum-tooltip-border-radius:var(--spectrum-corner-radius-100);--spectrum-tooltip-icon-width:var(--spectrum-workflow-icon-size-50);--spectrum-tooltip-icon-height:var(--spectrum-workflow-icon-size-50);--spectrum-tooltip-font-size:var(--spectrum-font-size-75);--spectrum-tooltip-line-height:var(--spectrum-line-height-100);--spectrum-tooltip-cjk-line-height:var(--spectrum-line-height-cjk-100);--spectrum-tooltip-font-weight:var(--spectrum-font-weight-regular);--spectrum-tooltip-spacing-inline:var(
|
|
9
9
|
--spectrum-component-edge-to-text-75
|
|
@@ -27,7 +27,7 @@ const styles = css`
|
|
|
27
27
|
--spectrum-corner-radius-100
|
|
28
28
|
);--spectrum-tooltip-background-color-default:var(
|
|
29
29
|
--spectrum-tooltip-backgound-color-default-neutral
|
|
30
|
-
)}@media (forced-colors:active){
|
|
30
|
+
)}@media (forced-colors:active){#tooltip{border:1px solid transparent}#tip{--highcontrast-tooltip-background-color-default:CanvasText;--highcontrast-tooltip-background-color-informative:CanvasText;--highcontrast-tooltip-background-color-positive:CanvasText;--highcontrast-tooltip-background-color-negative:CanvasText;forced-color-adjust:none}}#tooltip{-webkit-font-smoothing:antialiased;align-items:center;background-color:var(
|
|
31
31
|
--highcontrast-tooltip-background-color-default,var(
|
|
32
32
|
--mod-tooltip-background-color-default,var(--spectrum-tooltip-background-color-default)
|
|
33
33
|
)
|
|
@@ -43,17 +43,17 @@ const styles = css`
|
|
|
43
43
|
--mod-tooltip-max-inline-size,var(--spectrum-tooltip-max-inline-size)
|
|
44
44
|
);min-block-size:var(--mod-tooltip-height,var(--spectrum-tooltip-height));padding-inline:var(
|
|
45
45
|
--mod-tooltip-spacing-inline,var(--spectrum-tooltip-spacing-inline)
|
|
46
|
-
);position:relative;vertical-align:top;width:auto;word-break:break-word}:
|
|
46
|
+
);position:relative;vertical-align:top;width:auto;word-break:break-word}#tooltip:lang(ja),#tooltip:lang(ko),#tooltip:lang(zh){line-height:var(
|
|
47
47
|
--mod-tooltip-cjk-line-height,var(--spectrum-tooltip-cjk-line-height)
|
|
48
|
-
)}
|
|
48
|
+
)}#tooltip{cursor:default;-webkit-user-select:none;user-select:none}p{margin:0}:host([variant=info]) #tooltip{background-color:var(
|
|
49
49
|
--highcontrast-tooltip-background-color-informative,var(
|
|
50
50
|
--mod-tooltip-background-color-informative,var(--spectrum-tooltip-background-color-informative)
|
|
51
51
|
)
|
|
52
|
-
)}:host([variant=positive]){background-color:var(
|
|
52
|
+
)}:host([variant=positive]) #tooltip{background-color:var(
|
|
53
53
|
--highcontrast-tooltip-background-color-positive,var(
|
|
54
54
|
--mod-tooltip-background-color-positive,var(--spectrum-tooltip-background-color-positive)
|
|
55
55
|
)
|
|
56
|
-
)}:host([variant=negative]){background-color:var(
|
|
56
|
+
)}:host([variant=negative]) #tooltip{background-color:var(
|
|
57
57
|
--highcontrast-tooltip-background-color-negative,var(
|
|
58
58
|
--mod-tooltip-background-color-negative,var(--spectrum-tooltip-background-color-negative)
|
|
59
59
|
)
|
|
@@ -122,16 +122,16 @@ var(--spectrum-tooltip-spacing-inline)
|
|
|
122
122
|
--mod-tooltip-spacing-block-end,var(--spectrum-tooltip-spacing-block-end)
|
|
123
123
|
);margin-block-start:var(
|
|
124
124
|
--mod-tooltip-spacing-block-start,var(--spectrum-tooltip-spacing-block-start)
|
|
125
|
-
)}
|
|
125
|
+
)}#tooltip,.spectrum-Tooltip--top-end,.spectrum-Tooltip--top-left,.spectrum-Tooltip--top-right,.spectrum-Tooltip--top-start,:host([placement*=top]) #tooltip{margin-bottom:calc(var(
|
|
126
126
|
--mod-tooltip-tip-block-size,
|
|
127
127
|
var(--spectrum-tooltip-tip-block-size)
|
|
128
|
-
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--bottom-end,.spectrum-Tooltip--bottom-left,.spectrum-Tooltip--bottom-right,.spectrum-Tooltip--bottom-start,:host([placement*=bottom]){margin-top:calc(var(
|
|
128
|
+
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--bottom-end,.spectrum-Tooltip--bottom-left,.spectrum-Tooltip--bottom-right,.spectrum-Tooltip--bottom-start,:host([placement*=bottom]) #tooltip{margin-top:calc(var(
|
|
129
129
|
--mod-tooltip-tip-block-size,
|
|
130
130
|
var(--spectrum-tooltip-tip-block-size)
|
|
131
|
-
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--right-bottom,.spectrum-Tooltip--right-top,:host([placement*=right]){margin-left:calc(var(
|
|
131
|
+
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--right-bottom,.spectrum-Tooltip--right-top,:host([placement*=right]) #tooltip{margin-left:calc(var(
|
|
132
132
|
--mod-tooltip-tip-block-size,
|
|
133
133
|
var(--spectrum-tooltip-tip-block-size)
|
|
134
|
-
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--left-bottom,.spectrum-Tooltip--left-top,:host([placement*=left]){margin-right:calc(var(
|
|
134
|
+
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--left-bottom,.spectrum-Tooltip--left-top,:host([placement*=left]) #tooltip{margin-right:calc(var(
|
|
135
135
|
--mod-tooltip-tip-block-size,
|
|
136
136
|
var(--spectrum-tooltip-tip-block-size)
|
|
137
137
|
) + var(--mod-tooltip-margin, var(--spectrum-tooltip-margin)))}.spectrum-Tooltip--start,.spectrum-Tooltip--start-bottom,.spectrum-Tooltip--start-top{margin-inline-end:calc(var(
|