@spectrum-web-components/tooltip 0.11.18-overlay.18 → 0.30.0

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.
@@ -0,0 +1,356 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "sp-tooltip.js",
8
+ "declarations": [],
9
+ "exports": []
10
+ },
11
+ {
12
+ "kind": "javascript-module",
13
+ "path": "src/Tooltip.js",
14
+ "declarations": [
15
+ {
16
+ "kind": "class",
17
+ "description": "",
18
+ "name": "TooltipProxy",
19
+ "events": [
20
+ {
21
+ "name": "disconnected",
22
+ "type": {
23
+ "text": "Event"
24
+ }
25
+ }
26
+ ],
27
+ "superclass": {
28
+ "name": "HTMLElement"
29
+ },
30
+ "customElement": true
31
+ },
32
+ {
33
+ "kind": "class",
34
+ "description": "",
35
+ "name": "Tooltip",
36
+ "slots": [
37
+ {
38
+ "description": "the icon element appearing at the start of the label",
39
+ "name": "icon"
40
+ },
41
+ {
42
+ "description": "the text label of the Tooltip",
43
+ "name": ""
44
+ }
45
+ ],
46
+ "members": [
47
+ {
48
+ "kind": "field",
49
+ "name": "instanceCount",
50
+ "type": {
51
+ "text": "number"
52
+ },
53
+ "static": true,
54
+ "default": "0",
55
+ "privacy": "private"
56
+ },
57
+ {
58
+ "kind": "field",
59
+ "name": "_tooltipId",
60
+ "privacy": "private",
61
+ "default": "`sp-tooltip-describedby-helper-${Tooltip.instanceCount++}`"
62
+ },
63
+ {
64
+ "kind": "field",
65
+ "name": "selfManaged",
66
+ "type": {
67
+ "text": "boolean"
68
+ },
69
+ "privacy": "public",
70
+ "default": "false",
71
+ "attribute": "self-managed"
72
+ },
73
+ {
74
+ "kind": "field",
75
+ "name": "offset",
76
+ "type": {
77
+ "text": "number"
78
+ },
79
+ "privacy": "public",
80
+ "default": "6",
81
+ "attribute": "offset",
82
+ "reflects": true
83
+ },
84
+ {
85
+ "kind": "field",
86
+ "name": "hadTooltipId",
87
+ "type": {
88
+ "text": "boolean"
89
+ },
90
+ "privacy": "private",
91
+ "default": "false"
92
+ },
93
+ {
94
+ "kind": "field",
95
+ "name": "open",
96
+ "type": {
97
+ "text": "boolean"
98
+ },
99
+ "privacy": "public",
100
+ "default": "false",
101
+ "attribute": "open",
102
+ "reflects": true
103
+ },
104
+ {
105
+ "kind": "field",
106
+ "name": "placement",
107
+ "type": {
108
+ "text": "\"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\""
109
+ },
110
+ "privacy": "public",
111
+ "default": "'top'",
112
+ "attribute": "placement",
113
+ "reflects": true
114
+ },
115
+ {
116
+ "kind": "field",
117
+ "name": "tipElement",
118
+ "type": {
119
+ "text": "HTMLSpanElement"
120
+ },
121
+ "privacy": "private"
122
+ },
123
+ {
124
+ "kind": "field",
125
+ "name": "_variant",
126
+ "type": {
127
+ "text": "string"
128
+ },
129
+ "privacy": "private",
130
+ "default": "''"
131
+ },
132
+ {
133
+ "kind": "field",
134
+ "name": "variant",
135
+ "type": {
136
+ "text": "string"
137
+ },
138
+ "privacy": "public",
139
+ "attribute": "variant"
140
+ },
141
+ {
142
+ "kind": "method",
143
+ "name": "onOverlayQuery",
144
+ "privacy": "public",
145
+ "return": {
146
+ "type": {
147
+ "text": "void"
148
+ }
149
+ },
150
+ "parameters": [
151
+ {
152
+ "name": "event",
153
+ "type": {
154
+ "text": "CustomEvent<OverlayDisplayQueryDetail>"
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ {
160
+ "kind": "field",
161
+ "name": "_proxy",
162
+ "type": {
163
+ "text": "HTMLElement"
164
+ },
165
+ "privacy": "private"
166
+ },
167
+ {
168
+ "kind": "method",
169
+ "name": "generateProxy",
170
+ "privacy": "private",
171
+ "return": {
172
+ "type": {
173
+ "text": "void"
174
+ }
175
+ }
176
+ },
177
+ {
178
+ "kind": "method",
179
+ "name": "overlayWillOpenCallback",
180
+ "privacy": "public",
181
+ "return": {
182
+ "type": {
183
+ "text": "void"
184
+ }
185
+ },
186
+ "parameters": [
187
+ {
188
+ "name": "{\n trigger,\n }",
189
+ "type": {
190
+ "text": "{\n trigger: HTMLElement;\n }"
191
+ }
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "kind": "method",
197
+ "name": "overlayOpenCancelledCallback",
198
+ "privacy": "public",
199
+ "return": {
200
+ "type": {
201
+ "text": "void"
202
+ }
203
+ },
204
+ "parameters": [
205
+ {
206
+ "name": "{\n trigger,\n }",
207
+ "type": {
208
+ "text": "{\n trigger: HTMLElement;\n }"
209
+ }
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "kind": "method",
215
+ "name": "overlayCloseCallback",
216
+ "privacy": "public",
217
+ "return": {
218
+ "type": {
219
+ "text": "void"
220
+ }
221
+ },
222
+ "parameters": [
223
+ {
224
+ "name": "{ trigger }",
225
+ "type": {
226
+ "text": "{ trigger: HTMLElement }"
227
+ }
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "kind": "method",
233
+ "name": "removeProxy",
234
+ "privacy": "private",
235
+ "return": {
236
+ "type": {
237
+ "text": "void"
238
+ }
239
+ }
240
+ },
241
+ {
242
+ "kind": "field",
243
+ "name": "closeOverlayCallback",
244
+ "type": {
245
+ "text": "Promise<() => void> | undefined"
246
+ },
247
+ "privacy": "private"
248
+ },
249
+ {
250
+ "kind": "field",
251
+ "name": "abortOverlay",
252
+ "type": {
253
+ "text": "(cancelled: boolean) => void"
254
+ },
255
+ "privacy": "private"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "openOverlay",
260
+ "privacy": "private"
261
+ },
262
+ {
263
+ "kind": "field",
264
+ "name": "closeOverlay",
265
+ "privacy": "private"
266
+ },
267
+ {
268
+ "kind": "field",
269
+ "name": "previousSlot",
270
+ "type": {
271
+ "text": "string | undefined"
272
+ },
273
+ "privacy": "private"
274
+ },
275
+ {
276
+ "kind": "method",
277
+ "name": "manageTooltip",
278
+ "privacy": "private",
279
+ "return": {
280
+ "type": {
281
+ "text": "void"
282
+ }
283
+ }
284
+ }
285
+ ],
286
+ "attributes": [
287
+ {
288
+ "name": "placement",
289
+ "type": {
290
+ "text": "\"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\""
291
+ },
292
+ "default": "'top'",
293
+ "fieldName": "placement",
294
+ "attribute": "placement"
295
+ },
296
+ {
297
+ "name": "self-managed",
298
+ "type": {
299
+ "text": "boolean"
300
+ },
301
+ "default": "false",
302
+ "fieldName": "selfManaged"
303
+ },
304
+ {
305
+ "name": "offset",
306
+ "type": {
307
+ "text": "number"
308
+ },
309
+ "default": "6",
310
+ "fieldName": "offset"
311
+ },
312
+ {
313
+ "name": "open",
314
+ "type": {
315
+ "text": "boolean"
316
+ },
317
+ "default": "false",
318
+ "fieldName": "open"
319
+ },
320
+ {
321
+ "name": "variant",
322
+ "type": {
323
+ "text": "string"
324
+ },
325
+ "fieldName": "variant"
326
+ }
327
+ ],
328
+ "superclass": {
329
+ "name": "SpectrumElement",
330
+ "package": "@spectrum-web-components/base"
331
+ },
332
+ "tagName": "sp-tooltip",
333
+ "customElement": true
334
+ }
335
+ ],
336
+ "exports": [
337
+ {
338
+ "kind": "js",
339
+ "name": "TooltipProxy",
340
+ "declaration": {
341
+ "name": "TooltipProxy",
342
+ "module": "src/Tooltip.js"
343
+ }
344
+ },
345
+ {
346
+ "kind": "js",
347
+ "name": "Tooltip",
348
+ "declaration": {
349
+ "name": "Tooltip",
350
+ "module": "src/Tooltip.js"
351
+ }
352
+ }
353
+ ]
354
+ }
355
+ ]
356
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/tooltip",
3
- "version": "0.11.18-overlay.18+2ba65b1a7",
3
+ "version": "0.30.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,8 +57,8 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.7.6-overlay.62+2ba65b1a7",
61
- "@spectrum-web-components/overlay": "^0.19.6-overlay.18+2ba65b1a7"
60
+ "@spectrum-web-components/base": "^0.30.0",
61
+ "@spectrum-web-components/overlay": "^0.30.0"
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": "2ba65b1a7310f182972a840bea45ba93203c2da0"
72
+ "gitHead": "e34a26bf2bbea5f60a5e415e0f12c97654f0e20d"
73
73
  }
package/sp-tooltip.dev.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  import { Tooltip } from "./src/Tooltip.dev.js";
3
- customElements.define("sp-tooltip", Tooltip);
3
+ import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
+ defineElement("sp-tooltip", Tooltip);
4
5
  //# sourceMappingURL=sp-tooltip.dev.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["sp-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*/\nimport { Tooltip } from './src/Tooltip.dev.js'\n\ncustomElements.define('sp-tooltip', Tooltip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tooltip': Tooltip;\n }\n}\n"],
5
- "mappings": ";AAWA,SAAS,eAAe;AAExB,eAAe,OAAO,cAAc,OAAO;",
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*/\nimport { Tooltip } from './src/Tooltip.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-tooltip', Tooltip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tooltip': Tooltip;\n }\n}\n"],
5
+ "mappings": ";AAWA,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,cAAc,cAAc,OAAO;",
6
6
  "names": []
7
7
  }
package/sp-tooltip.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";import{Tooltip as o}from"./src/Tooltip.js";customElements.define("sp-tooltip",o);
1
+ "use strict";import{Tooltip as o}from"./src/Tooltip.js";import{defineElement as e}from"@spectrum-web-components/base/src/define-element.js";e("sp-tooltip",o);
2
2
  //# sourceMappingURL=sp-tooltip.js.map
package/sp-tooltip.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["sp-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*/\nimport { Tooltip } from './src/Tooltip.js';\n\ncustomElements.define('sp-tooltip', Tooltip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tooltip': Tooltip;\n }\n}\n"],
5
- "mappings": "aAWA,OAAS,WAAAA,MAAe,mBAExB,eAAe,OAAO,aAAcA,CAAO",
6
- "names": ["Tooltip"]
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*/\nimport { Tooltip } from './src/Tooltip.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-tooltip', Tooltip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tooltip': Tooltip;\n }\n}\n"],
5
+ "mappings": "aAWA,OAAS,WAAAA,MAAe,mBACxB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,aAAcD,CAAO",
6
+ "names": ["Tooltip", "defineElement"]
7
7
  }
package/src/Tooltip.d.ts CHANGED
@@ -1,6 +1,8 @@
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';
1
+ import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
2
+ import type { OverlayDisplayQueryDetail, Placement } from '@spectrum-web-components/overlay';
3
+ export declare class TooltipProxy extends HTMLElement {
4
+ disconnectedCallback(): void;
5
+ }
4
6
  /**
5
7
  * @element sp-tooltip
6
8
  *
@@ -13,21 +15,41 @@ export declare class Tooltip extends SpectrumElement {
13
15
  * @private
14
16
  */
15
17
  static instanceCount: number;
18
+ private _tooltipId;
16
19
  selfManaged: boolean;
17
20
  offset: number;
21
+ private hadTooltipId;
18
22
  open: boolean;
19
23
  /**
20
24
  * @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"}
21
25
  * @attr
22
26
  */
23
27
  placement: Placement;
24
- tipElement: HTMLSpanElement;
28
+ private tipElement;
25
29
  private _variant;
26
30
  get variant(): string;
27
31
  set variant(variant: string);
28
- private handleOpenOverlay;
29
- protected handleCloseOverlay: () => void;
30
- protected handleTransitionrun(event: TransitionEvent): void;
31
- protected handleTransitionend(event: TransitionEvent): void;
32
+ constructor();
33
+ onOverlayQuery(event: CustomEvent<OverlayDisplayQueryDetail>): void;
34
+ private _proxy;
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;
32
52
  render(): TemplateResult;
53
+ protected update(changed: PropertyValues<this>): Promise<void>;
54
+ protected updated(changed: PropertyValues<this>): void;
33
55
  }