@m3e/tooltip 1.0.0-rc.1

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,400 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/index.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "package": "\"./TooltipElement\""
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "package": "\"./TooltipPosition\""
24
+ }
25
+ },
26
+ {
27
+ "kind": "js",
28
+ "name": "*",
29
+ "declaration": {
30
+ "name": "*",
31
+ "package": "\"./TooltipTouchGestures\""
32
+ }
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "kind": "javascript-module",
38
+ "path": "src/TooltipElement.ts",
39
+ "declarations": [
40
+ {
41
+ "kind": "class",
42
+ "description": "",
43
+ "name": "M3eTooltipElement",
44
+ "cssProperties": [
45
+ {
46
+ "description": "Internal spacing of the tooltip container.",
47
+ "name": "--m3e-tooltip-padding"
48
+ },
49
+ {
50
+ "description": "Minimum width of the tooltip.",
51
+ "name": "--m3e-tooltip-min-width"
52
+ },
53
+ {
54
+ "description": "Maximum width of the tooltip.",
55
+ "name": "--m3e-tooltip-max-width"
56
+ },
57
+ {
58
+ "description": "Minimum height of the tooltip container.",
59
+ "name": "--m3e-tooltip-min-height"
60
+ },
61
+ {
62
+ "description": "Maximum height of the tooltip.",
63
+ "name": "--m3e-tooltip-max-height"
64
+ },
65
+ {
66
+ "description": "Border radius of the tooltip container.",
67
+ "name": "--m3e-tooltip-shape"
68
+ },
69
+ {
70
+ "description": "Background color of the tooltip.",
71
+ "name": "--m3e-tooltip-container-color"
72
+ },
73
+ {
74
+ "description": "Text color of supporting text.",
75
+ "name": "--m3e-tooltip-supporting-text-color"
76
+ },
77
+ {
78
+ "description": "Font size of supporting text.",
79
+ "name": "--m3e-tooltip-supporting-text-font-size"
80
+ },
81
+ {
82
+ "description": "Font weight of supporting text.",
83
+ "name": "--m3e-tooltip-supporting-text-font-weight"
84
+ },
85
+ {
86
+ "description": "Line height of supporting text.",
87
+ "name": "--m3e-tooltip-supporting-text-line-height"
88
+ },
89
+ {
90
+ "description": "Letter spacing of supporting text.",
91
+ "name": "--m3e-tooltip-supporting-text-tracking"
92
+ }
93
+ ],
94
+ "slots": [
95
+ {
96
+ "description": "Renders the content of the tooltip.",
97
+ "name": ""
98
+ }
99
+ ],
100
+ "members": [
101
+ {
102
+ "kind": "field",
103
+ "name": "__openTooltips",
104
+ "privacy": "private",
105
+ "static": true,
106
+ "readonly": true,
107
+ "default": "new Array<M3eTooltipElement>()"
108
+ },
109
+ {
110
+ "kind": "field",
111
+ "name": "_base",
112
+ "type": {
113
+ "text": "HTMLElement"
114
+ },
115
+ "privacy": "private",
116
+ "readonly": true
117
+ },
118
+ {
119
+ "kind": "field",
120
+ "name": "#message",
121
+ "privacy": "private",
122
+ "type": {
123
+ "text": "string | null | undefined"
124
+ }
125
+ },
126
+ {
127
+ "kind": "field",
128
+ "name": "#for",
129
+ "privacy": "private",
130
+ "type": {
131
+ "text": "HTMLElement | null"
132
+ },
133
+ "default": "null"
134
+ },
135
+ {
136
+ "kind": "field",
137
+ "name": "#anchorCleanup",
138
+ "privacy": "private",
139
+ "type": {
140
+ "text": "() => void | undefined"
141
+ }
142
+ },
143
+ {
144
+ "kind": "field",
145
+ "name": "#clickHandler",
146
+ "privacy": "private",
147
+ "readonly": true
148
+ },
149
+ {
150
+ "kind": "field",
151
+ "name": "#hoverController",
152
+ "privacy": "private",
153
+ "readonly": true,
154
+ "default": "new HoverController(this, { target: null, endDelay: TOOLTIP_HIDE_DELAY, callback: (hovering) => { if (hovering) { this.show(); } else { this.hide(); } }, })"
155
+ },
156
+ {
157
+ "kind": "field",
158
+ "name": "#longPressController",
159
+ "privacy": "private",
160
+ "readonly": true,
161
+ "default": "new LongPressController(this, { target: null, callback: (pressed) => { if (pressed) { this.show(); } else { this.hide(); } }, })"
162
+ },
163
+ {
164
+ "kind": "field",
165
+ "name": "disabled",
166
+ "type": {
167
+ "text": "boolean"
168
+ },
169
+ "default": "false",
170
+ "description": "Whether the element is disabled.",
171
+ "attribute": "disabled",
172
+ "reflects": true
173
+ },
174
+ {
175
+ "kind": "field",
176
+ "name": "position",
177
+ "type": {
178
+ "text": "TooltipPosition"
179
+ },
180
+ "default": "\"below\"",
181
+ "description": "The position of the tooltip.",
182
+ "attribute": "position"
183
+ },
184
+ {
185
+ "kind": "field",
186
+ "name": "showDelay",
187
+ "type": {
188
+ "text": "number"
189
+ },
190
+ "description": "The amount of time, in milliseconds, before showing the tooltip.",
191
+ "default": "0",
192
+ "attribute": "show-delay"
193
+ },
194
+ {
195
+ "kind": "field",
196
+ "name": "hideDelay",
197
+ "type": {
198
+ "text": "number"
199
+ },
200
+ "description": "The amount of time, in milliseconds, before hiding the tooltip.",
201
+ "default": "200",
202
+ "attribute": "hide-delay"
203
+ },
204
+ {
205
+ "kind": "field",
206
+ "name": "touchGestures",
207
+ "type": {
208
+ "text": "TooltipTouchGestures"
209
+ },
210
+ "default": "\"auto\"",
211
+ "description": "The mode in which to handle touch gestures.",
212
+ "attribute": "touch-gestures"
213
+ },
214
+ {
215
+ "kind": "method",
216
+ "name": "attach",
217
+ "return": {
218
+ "type": {
219
+ "text": "void"
220
+ }
221
+ },
222
+ "parameters": [
223
+ {
224
+ "name": "control",
225
+ "type": {
226
+ "text": "HTMLElement"
227
+ }
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "kind": "method",
233
+ "name": "detach",
234
+ "return": {
235
+ "type": {
236
+ "text": "void"
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "kind": "method",
242
+ "name": "show",
243
+ "return": {
244
+ "type": {
245
+ "text": "Promise<void>"
246
+ }
247
+ },
248
+ "description": "Manually shows the tooltip."
249
+ },
250
+ {
251
+ "kind": "method",
252
+ "name": "hide",
253
+ "return": {
254
+ "type": {
255
+ "text": "void"
256
+ }
257
+ },
258
+ "description": "Manually hides the tooltip."
259
+ },
260
+ {
261
+ "kind": "method",
262
+ "name": "#handleSlotChange",
263
+ "privacy": "private",
264
+ "return": {
265
+ "type": {
266
+ "text": "void"
267
+ }
268
+ }
269
+ },
270
+ {
271
+ "kind": "method",
272
+ "name": "#handleToggle",
273
+ "privacy": "private",
274
+ "return": {
275
+ "type": {
276
+ "text": "void"
277
+ }
278
+ },
279
+ "parameters": [
280
+ {
281
+ "name": "e",
282
+ "type": {
283
+ "text": "ToggleEvent"
284
+ }
285
+ }
286
+ ]
287
+ },
288
+ {
289
+ "kind": "method",
290
+ "name": "#disableNativeGesturesIfNecessary",
291
+ "privacy": "private"
292
+ }
293
+ ],
294
+ "attributes": [
295
+ {
296
+ "description": "Whether the element is disabled.",
297
+ "name": "disabled",
298
+ "type": {
299
+ "text": "boolean"
300
+ },
301
+ "default": "false",
302
+ "fieldName": "disabled"
303
+ },
304
+ {
305
+ "description": "The query selector used to specify the element related to this element.",
306
+ "name": "for"
307
+ },
308
+ {
309
+ "description": "The amount of time, in milliseconds, before hiding the tooltip.",
310
+ "name": "hide-delay",
311
+ "type": {
312
+ "text": "number"
313
+ },
314
+ "default": "200",
315
+ "fieldName": "hideDelay"
316
+ },
317
+ {
318
+ "description": "The position of the tooltip.",
319
+ "name": "position",
320
+ "type": {
321
+ "text": "TooltipPosition"
322
+ },
323
+ "default": "\"below\"",
324
+ "fieldName": "position"
325
+ },
326
+ {
327
+ "description": "The amount of time, in milliseconds, before showing the tooltip.",
328
+ "name": "show-delay",
329
+ "type": {
330
+ "text": "number"
331
+ },
332
+ "default": "0",
333
+ "fieldName": "showDelay"
334
+ },
335
+ {
336
+ "name": "touch-gestures",
337
+ "type": {
338
+ "text": "TooltipTouchGestures"
339
+ },
340
+ "default": "\"auto\"",
341
+ "description": "The mode in which to handle touch gestures.",
342
+ "fieldName": "touchGestures"
343
+ }
344
+ ],
345
+ "mixins": [
346
+ {
347
+ "name": "HtmlFor",
348
+ "package": "@m3e/core"
349
+ },
350
+ {
351
+ "name": "AttachInternals",
352
+ "package": "@m3e/core"
353
+ },
354
+ {
355
+ "name": "Role",
356
+ "package": "@m3e/core"
357
+ }
358
+ ],
359
+ "superclass": {
360
+ "name": "LitElement",
361
+ "package": "lit"
362
+ },
363
+ "tagName": "m3e-tooltip",
364
+ "customElement": true,
365
+ "summary": "Adds additional context to a button or other UI element."
366
+ }
367
+ ],
368
+ "exports": [
369
+ {
370
+ "kind": "js",
371
+ "name": "M3eTooltipElement",
372
+ "declaration": {
373
+ "name": "M3eTooltipElement",
374
+ "module": "src/TooltipElement.ts"
375
+ }
376
+ },
377
+ {
378
+ "kind": "custom-element-definition",
379
+ "name": "m3e-tooltip",
380
+ "declaration": {
381
+ "name": "M3eTooltipElement",
382
+ "module": "src/TooltipElement.ts"
383
+ }
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ "kind": "javascript-module",
389
+ "path": "src/TooltipPosition.ts",
390
+ "declarations": [],
391
+ "exports": []
392
+ },
393
+ {
394
+ "kind": "javascript-module",
395
+ "path": "src/TooltipTouchGestures.ts",
396
+ "declarations": [],
397
+ "exports": []
398
+ }
399
+ ]
400
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "m3e-tooltip",
7
+ "description": "Adds additional context to a button or other UI element.\n---\n\n\n### **Methods:**\n - **show(): _Promise<void>_** - Manually shows the tooltip.\n- **hide(): _void_** - Manually hides the tooltip.\n\n### **Slots:**\n - _default_ - Renders the content of the tooltip.\n\n### **CSS Properties:**\n - **--m3e-tooltip-padding** - Internal spacing of the tooltip container. _(default: undefined)_\n- **--m3e-tooltip-min-width** - Minimum width of the tooltip. _(default: undefined)_\n- **--m3e-tooltip-max-width** - Maximum width of the tooltip. _(default: undefined)_\n- **--m3e-tooltip-min-height** - Minimum height of the tooltip container. _(default: undefined)_\n- **--m3e-tooltip-max-height** - Maximum height of the tooltip. _(default: undefined)_\n- **--m3e-tooltip-shape** - Border radius of the tooltip container. _(default: undefined)_\n- **--m3e-tooltip-container-color** - Background color of the tooltip. _(default: undefined)_\n- **--m3e-tooltip-supporting-text-color** - Text color of supporting text. _(default: undefined)_\n- **--m3e-tooltip-supporting-text-font-size** - Font size of supporting text. _(default: undefined)_\n- **--m3e-tooltip-supporting-text-font-weight** - Font weight of supporting text. _(default: undefined)_\n- **--m3e-tooltip-supporting-text-line-height** - Line height of supporting text. _(default: undefined)_\n- **--m3e-tooltip-supporting-text-tracking** - Letter spacing of supporting text. _(default: undefined)_",
8
+ "attributes": [
9
+ {
10
+ "name": "disabled",
11
+ "description": "Whether the element is disabled.",
12
+ "values": []
13
+ },
14
+ {
15
+ "name": "for",
16
+ "description": "The query selector used to specify the element related to this element.",
17
+ "values": []
18
+ },
19
+ {
20
+ "name": "hide-delay",
21
+ "description": "The amount of time, in milliseconds, before hiding the tooltip.",
22
+ "values": []
23
+ },
24
+ {
25
+ "name": "position",
26
+ "description": "The position of the tooltip.",
27
+ "values": [{ "name": "TooltipPosition" }]
28
+ },
29
+ {
30
+ "name": "show-delay",
31
+ "description": "The amount of time, in milliseconds, before showing the tooltip.",
32
+ "values": []
33
+ },
34
+ {
35
+ "name": "touch-gestures",
36
+ "description": "The mode in which to handle touch gestures.",
37
+ "values": [{ "name": "TooltipTouchGestures" }]
38
+ }
39
+ ],
40
+ "references": []
41
+ }
42
+ ]
43
+ }