@zag-js/tooltip 0.2.2 → 0.2.4

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/dist/index.d.ts CHANGED
@@ -3,11 +3,860 @@ import * as _zag_js_core from '@zag-js/core';
3
3
  import { StateMachine } from '@zag-js/core';
4
4
  import { PositioningOptions } from '@zag-js/popper';
5
5
 
6
- declare type ElementIds = Partial<{
6
+ declare const anatomy: Omit<{
7
+ parts: <U extends string>(...parts: U[]) => Omit<{
8
+ parts: any;
9
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
10
+ parts: any;
11
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
12
+ parts: any;
13
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
14
+ parts: any;
15
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
16
+ parts: any;
17
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
18
+ parts: any;
19
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
20
+ parts: any;
21
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
22
+ parts: any;
23
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
24
+ parts: any;
25
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
26
+ parts: any;
27
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
28
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
29
+ selector: string;
30
+ attrs: Record<"data-scope" | "data-part", string>;
31
+ }>;
32
+ }, "parts">;
33
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
34
+ selector: string;
35
+ attrs: Record<"data-scope" | "data-part", string>;
36
+ }>;
37
+ }, "parts">;
38
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
39
+ selector: string;
40
+ attrs: Record<"data-scope" | "data-part", string>;
41
+ }>;
42
+ }, "parts">;
43
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
44
+ selector: string;
45
+ attrs: Record<"data-scope" | "data-part", string>;
46
+ }>;
47
+ }, "parts">;
48
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
49
+ selector: string;
50
+ attrs: Record<"data-scope" | "data-part", string>;
51
+ }>;
52
+ }, "parts">;
53
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
54
+ selector: string;
55
+ attrs: Record<"data-scope" | "data-part", string>;
56
+ }>;
57
+ }, "parts">;
58
+ build: () => Record<U | V | V_1 | V_2, {
59
+ selector: string;
60
+ attrs: Record<"data-scope" | "data-part", string>;
61
+ }>;
62
+ }, "parts">;
63
+ build: () => Record<U | V | V_1, {
64
+ selector: string;
65
+ attrs: Record<"data-scope" | "data-part", string>;
66
+ }>;
67
+ }, "parts">;
68
+ build: () => Record<U | V, {
69
+ selector: string;
70
+ attrs: Record<"data-scope" | "data-part", string>;
71
+ }>;
72
+ }, "parts">;
73
+ build: () => Record<U, {
74
+ selector: string;
75
+ attrs: Record<"data-scope" | "data-part", string>;
76
+ }>;
77
+ }, "parts">;
78
+ extendWith: <V_10 extends string>(...parts: V_10[]) => Omit<{
79
+ parts: <U extends string>(...parts: U[]) => Omit<{
80
+ parts: any;
81
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
82
+ parts: any;
83
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
84
+ parts: any;
85
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
86
+ parts: any;
87
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
88
+ parts: any;
89
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
90
+ parts: any;
91
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
92
+ parts: any;
93
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
94
+ parts: any;
95
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
96
+ parts: any;
97
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
98
+ parts: any;
99
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
100
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
101
+ selector: string;
102
+ attrs: Record<"data-scope" | "data-part", string>;
103
+ }>;
104
+ }, "parts">;
105
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
106
+ selector: string;
107
+ attrs: Record<"data-scope" | "data-part", string>;
108
+ }>;
109
+ }, "parts">;
110
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
111
+ selector: string;
112
+ attrs: Record<"data-scope" | "data-part", string>;
113
+ }>;
114
+ }, "parts">;
115
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
116
+ selector: string;
117
+ attrs: Record<"data-scope" | "data-part", string>;
118
+ }>;
119
+ }, "parts">;
120
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
121
+ selector: string;
122
+ attrs: Record<"data-scope" | "data-part", string>;
123
+ }>;
124
+ }, "parts">;
125
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
126
+ selector: string;
127
+ attrs: Record<"data-scope" | "data-part", string>;
128
+ }>;
129
+ }, "parts">;
130
+ build: () => Record<U | V | V_1 | V_2, {
131
+ selector: string;
132
+ attrs: Record<"data-scope" | "data-part", string>;
133
+ }>;
134
+ }, "parts">;
135
+ build: () => Record<U | V | V_1, {
136
+ selector: string;
137
+ attrs: Record<"data-scope" | "data-part", string>;
138
+ }>;
139
+ }, "parts">;
140
+ build: () => Record<U | V, {
141
+ selector: string;
142
+ attrs: Record<"data-scope" | "data-part", string>;
143
+ }>;
144
+ }, "parts">;
145
+ build: () => Record<U, {
146
+ selector: string;
147
+ attrs: Record<"data-scope" | "data-part", string>;
148
+ }>;
149
+ }, "parts">;
150
+ extendWith: <V_11 extends string>(...parts: V_11[]) => Omit<{
151
+ parts: <U extends string>(...parts: U[]) => Omit<{
152
+ parts: any;
153
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
154
+ parts: any;
155
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
156
+ parts: any;
157
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
158
+ parts: any;
159
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
160
+ parts: any;
161
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
162
+ parts: any;
163
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
164
+ parts: any;
165
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
166
+ parts: any;
167
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
168
+ parts: any;
169
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
170
+ parts: any;
171
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
172
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
173
+ selector: string;
174
+ attrs: Record<"data-scope" | "data-part", string>;
175
+ }>;
176
+ }, "parts">;
177
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
178
+ selector: string;
179
+ attrs: Record<"data-scope" | "data-part", string>;
180
+ }>;
181
+ }, "parts">;
182
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
183
+ selector: string;
184
+ attrs: Record<"data-scope" | "data-part", string>;
185
+ }>;
186
+ }, "parts">;
187
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
188
+ selector: string;
189
+ attrs: Record<"data-scope" | "data-part", string>;
190
+ }>;
191
+ }, "parts">;
192
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
193
+ selector: string;
194
+ attrs: Record<"data-scope" | "data-part", string>;
195
+ }>;
196
+ }, "parts">;
197
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
198
+ selector: string;
199
+ attrs: Record<"data-scope" | "data-part", string>;
200
+ }>;
201
+ }, "parts">;
202
+ build: () => Record<U | V | V_1 | V_2, {
203
+ selector: string;
204
+ attrs: Record<"data-scope" | "data-part", string>;
205
+ }>;
206
+ }, "parts">;
207
+ build: () => Record<U | V | V_1, {
208
+ selector: string;
209
+ attrs: Record<"data-scope" | "data-part", string>;
210
+ }>;
211
+ }, "parts">;
212
+ build: () => Record<U | V, {
213
+ selector: string;
214
+ attrs: Record<"data-scope" | "data-part", string>;
215
+ }>;
216
+ }, "parts">;
217
+ build: () => Record<U, {
218
+ selector: string;
219
+ attrs: Record<"data-scope" | "data-part", string>;
220
+ }>;
221
+ }, "parts">;
222
+ extendWith: <V_12 extends string>(...parts: V_12[]) => Omit<{
223
+ parts: <U extends string>(...parts: U[]) => Omit<{
224
+ parts: any;
225
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
226
+ parts: any;
227
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
228
+ parts: any;
229
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
230
+ parts: any;
231
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
232
+ parts: any;
233
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
234
+ parts: any;
235
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
236
+ parts: any;
237
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
238
+ parts: any;
239
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
240
+ parts: any;
241
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
242
+ parts: any;
243
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
244
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
245
+ selector: string;
246
+ attrs: Record<"data-scope" | "data-part", string>;
247
+ }>;
248
+ }, "parts">;
249
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
250
+ selector: string;
251
+ attrs: Record<"data-scope" | "data-part", string>;
252
+ }>;
253
+ }, "parts">;
254
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
255
+ selector: string;
256
+ attrs: Record<"data-scope" | "data-part", string>;
257
+ }>;
258
+ }, "parts">;
259
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
260
+ selector: string;
261
+ attrs: Record<"data-scope" | "data-part", string>;
262
+ }>;
263
+ }, "parts">;
264
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
265
+ selector: string;
266
+ attrs: Record<"data-scope" | "data-part", string>;
267
+ }>;
268
+ }, "parts">;
269
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
270
+ selector: string;
271
+ attrs: Record<"data-scope" | "data-part", string>;
272
+ }>;
273
+ }, "parts">;
274
+ build: () => Record<U | V | V_1 | V_2, {
275
+ selector: string;
276
+ attrs: Record<"data-scope" | "data-part", string>;
277
+ }>;
278
+ }, "parts">;
279
+ build: () => Record<U | V | V_1, {
280
+ selector: string;
281
+ attrs: Record<"data-scope" | "data-part", string>;
282
+ }>;
283
+ }, "parts">;
284
+ build: () => Record<U | V, {
285
+ selector: string;
286
+ attrs: Record<"data-scope" | "data-part", string>;
287
+ }>;
288
+ }, "parts">;
289
+ build: () => Record<U, {
290
+ selector: string;
291
+ attrs: Record<"data-scope" | "data-part", string>;
292
+ }>;
293
+ }, "parts">;
294
+ extendWith: <V_13 extends string>(...parts: V_13[]) => Omit<{
295
+ parts: <U extends string>(...parts: U[]) => Omit<{
296
+ parts: any;
297
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
298
+ parts: any;
299
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
300
+ parts: any;
301
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
302
+ parts: any;
303
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
304
+ parts: any;
305
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
306
+ parts: any;
307
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
308
+ parts: any;
309
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
310
+ parts: any;
311
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
312
+ parts: any;
313
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
314
+ parts: any;
315
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
316
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
317
+ selector: string;
318
+ attrs: Record<"data-scope" | "data-part", string>;
319
+ }>;
320
+ }, "parts">;
321
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
322
+ selector: string;
323
+ attrs: Record<"data-scope" | "data-part", string>;
324
+ }>;
325
+ }, "parts">;
326
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
327
+ selector: string;
328
+ attrs: Record<"data-scope" | "data-part", string>;
329
+ }>;
330
+ }, "parts">;
331
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
332
+ selector: string;
333
+ attrs: Record<"data-scope" | "data-part", string>;
334
+ }>;
335
+ }, "parts">;
336
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
337
+ selector: string;
338
+ attrs: Record<"data-scope" | "data-part", string>;
339
+ }>;
340
+ }, "parts">;
341
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
342
+ selector: string;
343
+ attrs: Record<"data-scope" | "data-part", string>;
344
+ }>;
345
+ }, "parts">;
346
+ build: () => Record<U | V | V_1 | V_2, {
347
+ selector: string;
348
+ attrs: Record<"data-scope" | "data-part", string>;
349
+ }>;
350
+ }, "parts">;
351
+ build: () => Record<U | V | V_1, {
352
+ selector: string;
353
+ attrs: Record<"data-scope" | "data-part", string>;
354
+ }>;
355
+ }, "parts">;
356
+ build: () => Record<U | V, {
357
+ selector: string;
358
+ attrs: Record<"data-scope" | "data-part", string>;
359
+ }>;
360
+ }, "parts">;
361
+ build: () => Record<U, {
362
+ selector: string;
363
+ attrs: Record<"data-scope" | "data-part", string>;
364
+ }>;
365
+ }, "parts">;
366
+ extendWith: <V_14 extends string>(...parts: V_14[]) => Omit<{
367
+ parts: <U extends string>(...parts: U[]) => Omit<{
368
+ parts: any;
369
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
370
+ parts: any;
371
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
372
+ parts: any;
373
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
374
+ parts: any;
375
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
376
+ parts: any;
377
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
378
+ parts: any;
379
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
380
+ parts: any;
381
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
382
+ parts: any;
383
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
384
+ parts: any;
385
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
386
+ parts: any;
387
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
388
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
389
+ selector: string;
390
+ attrs: Record<"data-scope" | "data-part", string>;
391
+ }>;
392
+ }, "parts">;
393
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
394
+ selector: string;
395
+ attrs: Record<"data-scope" | "data-part", string>;
396
+ }>;
397
+ }, "parts">;
398
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
399
+ selector: string;
400
+ attrs: Record<"data-scope" | "data-part", string>;
401
+ }>;
402
+ }, "parts">;
403
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
404
+ selector: string;
405
+ attrs: Record<"data-scope" | "data-part", string>;
406
+ }>;
407
+ }, "parts">;
408
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
409
+ selector: string;
410
+ attrs: Record<"data-scope" | "data-part", string>;
411
+ }>;
412
+ }, "parts">;
413
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
414
+ selector: string;
415
+ attrs: Record<"data-scope" | "data-part", string>;
416
+ }>;
417
+ }, "parts">;
418
+ build: () => Record<U | V | V_1 | V_2, {
419
+ selector: string;
420
+ attrs: Record<"data-scope" | "data-part", string>;
421
+ }>;
422
+ }, "parts">;
423
+ build: () => Record<U | V | V_1, {
424
+ selector: string;
425
+ attrs: Record<"data-scope" | "data-part", string>;
426
+ }>;
427
+ }, "parts">;
428
+ build: () => Record<U | V, {
429
+ selector: string;
430
+ attrs: Record<"data-scope" | "data-part", string>;
431
+ }>;
432
+ }, "parts">;
433
+ build: () => Record<U, {
434
+ selector: string;
435
+ attrs: Record<"data-scope" | "data-part", string>;
436
+ }>;
437
+ }, "parts">;
438
+ extendWith: <V_15 extends string>(...parts: V_15[]) => Omit<{
439
+ parts: <U extends string>(...parts: U[]) => Omit<{
440
+ parts: any;
441
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
442
+ parts: any;
443
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
444
+ parts: any;
445
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
446
+ parts: any;
447
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
448
+ parts: any;
449
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
450
+ parts: any;
451
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
452
+ parts: any;
453
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
454
+ parts: any;
455
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
456
+ parts: any;
457
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
458
+ parts: any;
459
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
460
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
461
+ selector: string;
462
+ attrs: Record<"data-scope" | "data-part", string>;
463
+ }>;
464
+ }, "parts">;
465
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
466
+ selector: string;
467
+ attrs: Record<"data-scope" | "data-part", string>;
468
+ }>;
469
+ }, "parts">;
470
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
471
+ selector: string;
472
+ attrs: Record<"data-scope" | "data-part", string>;
473
+ }>;
474
+ }, "parts">;
475
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
476
+ selector: string;
477
+ attrs: Record<"data-scope" | "data-part", string>;
478
+ }>;
479
+ }, "parts">;
480
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
481
+ selector: string;
482
+ attrs: Record<"data-scope" | "data-part", string>;
483
+ }>;
484
+ }, "parts">;
485
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
486
+ selector: string;
487
+ attrs: Record<"data-scope" | "data-part", string>;
488
+ }>;
489
+ }, "parts">;
490
+ build: () => Record<U | V | V_1 | V_2, {
491
+ selector: string;
492
+ attrs: Record<"data-scope" | "data-part", string>;
493
+ }>;
494
+ }, "parts">;
495
+ build: () => Record<U | V | V_1, {
496
+ selector: string;
497
+ attrs: Record<"data-scope" | "data-part", string>;
498
+ }>;
499
+ }, "parts">;
500
+ build: () => Record<U | V, {
501
+ selector: string;
502
+ attrs: Record<"data-scope" | "data-part", string>;
503
+ }>;
504
+ }, "parts">;
505
+ build: () => Record<U, {
506
+ selector: string;
507
+ attrs: Record<"data-scope" | "data-part", string>;
508
+ }>;
509
+ }, "parts">;
510
+ extendWith: <V_16 extends string>(...parts: V_16[]) => Omit<{
511
+ parts: <U extends string>(...parts: U[]) => Omit<{
512
+ parts: any;
513
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
514
+ parts: any;
515
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
516
+ parts: any;
517
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
518
+ parts: any;
519
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
520
+ parts: any;
521
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
522
+ parts: any;
523
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
524
+ parts: any;
525
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
526
+ parts: any;
527
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
528
+ parts: any;
529
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
530
+ parts: any;
531
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
532
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
533
+ selector: string;
534
+ attrs: Record<"data-scope" | "data-part", string>;
535
+ }>;
536
+ }, "parts">;
537
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
538
+ selector: string;
539
+ attrs: Record<"data-scope" | "data-part", string>;
540
+ }>;
541
+ }, "parts">;
542
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
543
+ selector: string;
544
+ attrs: Record<"data-scope" | "data-part", string>;
545
+ }>;
546
+ }, "parts">;
547
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
548
+ selector: string;
549
+ attrs: Record<"data-scope" | "data-part", string>;
550
+ }>;
551
+ }, "parts">;
552
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
553
+ selector: string;
554
+ attrs: Record<"data-scope" | "data-part", string>;
555
+ }>;
556
+ }, "parts">;
557
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
558
+ selector: string;
559
+ attrs: Record<"data-scope" | "data-part", string>;
560
+ }>;
561
+ }, "parts">;
562
+ build: () => Record<U | V | V_1 | V_2, {
563
+ selector: string;
564
+ attrs: Record<"data-scope" | "data-part", string>;
565
+ }>;
566
+ }, "parts">;
567
+ build: () => Record<U | V | V_1, {
568
+ selector: string;
569
+ attrs: Record<"data-scope" | "data-part", string>;
570
+ }>;
571
+ }, "parts">;
572
+ build: () => Record<U | V, {
573
+ selector: string;
574
+ attrs: Record<"data-scope" | "data-part", string>;
575
+ }>;
576
+ }, "parts">;
577
+ build: () => Record<U, {
578
+ selector: string;
579
+ attrs: Record<"data-scope" | "data-part", string>;
580
+ }>;
581
+ }, "parts">;
582
+ extendWith: <V_17 extends string>(...parts: V_17[]) => Omit<{
583
+ parts: <U extends string>(...parts: U[]) => Omit<{
584
+ parts: any;
585
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
586
+ parts: any;
587
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
588
+ parts: any;
589
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
590
+ parts: any;
591
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
592
+ parts: any;
593
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
594
+ parts: any;
595
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
596
+ parts: any;
597
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
598
+ parts: any;
599
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
600
+ parts: any;
601
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
602
+ parts: any;
603
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
604
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
605
+ selector: string;
606
+ attrs: Record<"data-scope" | "data-part", string>;
607
+ }>;
608
+ }, "parts">;
609
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
610
+ selector: string;
611
+ attrs: Record<"data-scope" | "data-part", string>;
612
+ }>;
613
+ }, "parts">;
614
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
615
+ selector: string;
616
+ attrs: Record<"data-scope" | "data-part", string>;
617
+ }>;
618
+ }, "parts">;
619
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
620
+ selector: string;
621
+ attrs: Record<"data-scope" | "data-part", string>;
622
+ }>;
623
+ }, "parts">;
624
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
625
+ selector: string;
626
+ attrs: Record<"data-scope" | "data-part", string>;
627
+ }>;
628
+ }, "parts">;
629
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
630
+ selector: string;
631
+ attrs: Record<"data-scope" | "data-part", string>;
632
+ }>;
633
+ }, "parts">;
634
+ build: () => Record<U | V | V_1 | V_2, {
635
+ selector: string;
636
+ attrs: Record<"data-scope" | "data-part", string>;
637
+ }>;
638
+ }, "parts">;
639
+ build: () => Record<U | V | V_1, {
640
+ selector: string;
641
+ attrs: Record<"data-scope" | "data-part", string>;
642
+ }>;
643
+ }, "parts">;
644
+ build: () => Record<U | V, {
645
+ selector: string;
646
+ attrs: Record<"data-scope" | "data-part", string>;
647
+ }>;
648
+ }, "parts">;
649
+ build: () => Record<U, {
650
+ selector: string;
651
+ attrs: Record<"data-scope" | "data-part", string>;
652
+ }>;
653
+ }, "parts">;
654
+ extendWith: <V_18 extends string>(...parts: V_18[]) => Omit<{
655
+ parts: <U extends string>(...parts: U[]) => Omit<{
656
+ parts: any;
657
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
658
+ parts: any;
659
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
660
+ parts: any;
661
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
662
+ parts: any;
663
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
664
+ parts: any;
665
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
666
+ parts: any;
667
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
668
+ parts: any;
669
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
670
+ parts: any;
671
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
672
+ parts: any;
673
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
674
+ parts: any;
675
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
676
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
677
+ selector: string;
678
+ attrs: Record<"data-scope" | "data-part", string>;
679
+ }>;
680
+ }, "parts">;
681
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
682
+ selector: string;
683
+ attrs: Record<"data-scope" | "data-part", string>;
684
+ }>;
685
+ }, "parts">;
686
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
687
+ selector: string;
688
+ attrs: Record<"data-scope" | "data-part", string>;
689
+ }>;
690
+ }, "parts">;
691
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
692
+ selector: string;
693
+ attrs: Record<"data-scope" | "data-part", string>;
694
+ }>;
695
+ }, "parts">;
696
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
697
+ selector: string;
698
+ attrs: Record<"data-scope" | "data-part", string>;
699
+ }>;
700
+ }, "parts">;
701
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
702
+ selector: string;
703
+ attrs: Record<"data-scope" | "data-part", string>;
704
+ }>;
705
+ }, "parts">;
706
+ build: () => Record<U | V | V_1 | V_2, {
707
+ selector: string;
708
+ attrs: Record<"data-scope" | "data-part", string>;
709
+ }>;
710
+ }, "parts">;
711
+ build: () => Record<U | V | V_1, {
712
+ selector: string;
713
+ attrs: Record<"data-scope" | "data-part", string>;
714
+ }>;
715
+ }, "parts">;
716
+ build: () => Record<U | V, {
717
+ selector: string;
718
+ attrs: Record<"data-scope" | "data-part", string>;
719
+ }>;
720
+ }, "parts">;
721
+ build: () => Record<U, {
722
+ selector: string;
723
+ attrs: Record<"data-scope" | "data-part", string>;
724
+ }>;
725
+ }, "parts">;
726
+ extendWith: <V_19 extends string>(...parts: V_19[]) => Omit<{
727
+ parts: <U extends string>(...parts: U[]) => Omit<{
728
+ parts: any;
729
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
730
+ parts: any;
731
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
732
+ parts: any;
733
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
734
+ parts: any;
735
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
736
+ parts: any;
737
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
738
+ parts: any;
739
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
740
+ parts: any;
741
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
742
+ parts: any;
743
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
744
+ parts: any;
745
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
746
+ parts: any;
747
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
748
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
749
+ selector: string;
750
+ attrs: Record<"data-scope" | "data-part", string>;
751
+ }>;
752
+ }, "parts">;
753
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7, {
754
+ selector: string;
755
+ attrs: Record<"data-scope" | "data-part", string>;
756
+ }>;
757
+ }, "parts">;
758
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6, {
759
+ selector: string;
760
+ attrs: Record<"data-scope" | "data-part", string>;
761
+ }>;
762
+ }, "parts">;
763
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5, {
764
+ selector: string;
765
+ attrs: Record<"data-scope" | "data-part", string>;
766
+ }>;
767
+ }, "parts">;
768
+ build: () => Record<U | V | V_1 | V_2 | V_3 | V_4, {
769
+ selector: string;
770
+ attrs: Record<"data-scope" | "data-part", string>;
771
+ }>;
772
+ }, "parts">;
773
+ build: () => Record<U | V | V_1 | V_2 | V_3, {
774
+ selector: string;
775
+ attrs: Record<"data-scope" | "data-part", string>;
776
+ }>;
777
+ }, "parts">;
778
+ build: () => Record<U | V | V_1 | V_2, {
779
+ selector: string;
780
+ attrs: Record<"data-scope" | "data-part", string>;
781
+ }>;
782
+ }, "parts">;
783
+ build: () => Record<U | V | V_1, {
784
+ selector: string;
785
+ attrs: Record<"data-scope" | "data-part", string>;
786
+ }>;
787
+ }, "parts">;
788
+ build: () => Record<U | V, {
789
+ selector: string;
790
+ attrs: Record<"data-scope" | "data-part", string>;
791
+ }>;
792
+ }, "parts">;
793
+ build: () => Record<U, {
794
+ selector: string;
795
+ attrs: Record<"data-scope" | "data-part", string>;
796
+ }>;
797
+ }, "parts">;
798
+ extendWith: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
799
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
800
+ selector: string;
801
+ attrs: Record<"data-scope" | "data-part", string>;
802
+ }>;
803
+ }, "parts">;
804
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
805
+ selector: string;
806
+ attrs: Record<"data-scope" | "data-part", string>;
807
+ }>;
808
+ }, "parts">;
809
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
810
+ selector: string;
811
+ attrs: Record<"data-scope" | "data-part", string>;
812
+ }>;
813
+ }, "parts">;
814
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
815
+ selector: string;
816
+ attrs: Record<"data-scope" | "data-part", string>;
817
+ }>;
818
+ }, "parts">;
819
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
820
+ selector: string;
821
+ attrs: Record<"data-scope" | "data-part", string>;
822
+ }>;
823
+ }, "parts">;
824
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13 | V_14, {
825
+ selector: string;
826
+ attrs: Record<"data-scope" | "data-part", string>;
827
+ }>;
828
+ }, "parts">;
829
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12 | V_13, {
830
+ selector: string;
831
+ attrs: Record<"data-scope" | "data-part", string>;
832
+ }>;
833
+ }, "parts">;
834
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11 | V_12, {
835
+ selector: string;
836
+ attrs: Record<"data-scope" | "data-part", string>;
837
+ }>;
838
+ }, "parts">;
839
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10 | V_11, {
840
+ selector: string;
841
+ attrs: Record<"data-scope" | "data-part", string>;
842
+ }>;
843
+ }, "parts">;
844
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label" | V_10, {
845
+ selector: string;
846
+ attrs: Record<"data-scope" | "data-part", string>;
847
+ }>;
848
+ }, "parts">;
849
+ build: () => Record<"trigger" | "arrow" | "arrowTip" | "positioner" | "content" | "label", {
850
+ selector: string;
851
+ attrs: Record<"data-scope" | "data-part", string>;
852
+ }>;
853
+ }, "parts">;
854
+
855
+ type ElementIds = Partial<{
7
856
  trigger: string;
8
857
  content: string;
9
858
  }>;
10
- declare type PublicContext = CommonProperties & {
859
+ type PublicContext = CommonProperties & {
11
860
  /**
12
861
  * The ids of the elements in the tooltip. Useful for composition.
13
862
  */
@@ -59,21 +908,21 @@ declare type PublicContext = CommonProperties & {
59
908
  */
60
909
  disabled?: boolean;
61
910
  };
62
- declare type UserDefinedContext = RequiredBy<PublicContext, "id">;
63
- declare type ComputedContext = Readonly<{
911
+ type UserDefinedContext = RequiredBy<PublicContext, "id">;
912
+ type ComputedContext = Readonly<{
64
913
  /**
65
914
  * @computed Whether an `aria-label` is set.
66
915
  */
67
916
  readonly hasAriaLabel: boolean;
68
917
  }>;
69
- declare type PrivateContext = RootProperties & {};
70
- declare type MachineContext = PublicContext & ComputedContext & PrivateContext;
71
- declare type MachineState = {
918
+ type PrivateContext = RootProperties & {};
919
+ type MachineContext = PublicContext & ComputedContext & PrivateContext;
920
+ type MachineState = {
72
921
  value: "unknown" | "opening" | "open" | "closing" | "closed";
73
922
  tags: "open" | "closed";
74
923
  };
75
- declare type State = StateMachine.State<MachineContext, MachineState>;
76
- declare type Send = StateMachine.Send<StateMachine.AnyEventObject>;
924
+ type State = StateMachine.State<MachineContext, MachineState>;
925
+ type Send = StateMachine.Send<StateMachine.AnyEventObject>;
77
926
 
78
927
  declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
79
928
  isOpen: boolean;
@@ -85,7 +934,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
85
934
  };
86
935
  triggerProps: T["button"];
87
936
  arrowProps: T["element"];
88
- innerArrowProps: T["element"];
937
+ arrowTipProps: T["element"];
89
938
  positionerProps: T["element"];
90
939
  contentProps: T["element"];
91
940
  labelProps: T["element"];
@@ -94,4 +943,4 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
94
943
 
95
944
  declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
96
945
 
97
- export { UserDefinedContext as Context, connect, machine };
946
+ export { UserDefinedContext as Context, anatomy, connect, machine };
package/dist/index.js CHANGED
@@ -20,11 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
+ anatomy: () => anatomy,
23
24
  connect: () => connect,
24
25
  machine: () => machine
25
26
  });
26
27
  module.exports = __toCommonJS(src_exports);
27
28
 
29
+ // src/tooltip.anatomy.ts
30
+ var import_anatomy = require("@zag-js/anatomy");
31
+ var anatomy = (0, import_anatomy.createAnatomy)("tooltip").parts("trigger", "arrow", "arrowTip", "positioner", "content", "label");
32
+ var parts = anatomy.build();
33
+
28
34
  // ../../utilities/dom/dist/index.mjs
29
35
  var dataAttr = (guard) => {
30
36
  return guard ? "" : void 0;
@@ -312,7 +318,7 @@ function connect(state, send, normalize) {
312
318
  };
313
319
  },
314
320
  triggerProps: normalize.button({
315
- "data-part": "trigger",
321
+ ...parts.trigger.attrs,
316
322
  id: triggerId,
317
323
  "data-expanded": dataAttr(isOpen),
318
324
  "aria-describedby": isOpen ? contentId : void 0,
@@ -352,20 +358,21 @@ function connect(state, send, normalize) {
352
358
  }),
353
359
  arrowProps: normalize.element({
354
360
  id: dom.getArrowId(state.context),
355
- "data-part": "arrow",
361
+ ...parts.arrow.attrs,
356
362
  style: popperStyles.arrow
357
363
  }),
358
- innerArrowProps: normalize.element({
359
- "data-part": "arrow-inner",
360
- style: popperStyles.innerArrow
364
+ arrowTipProps: normalize.element({
365
+ ...parts.arrowTip.attrs,
366
+ style: popperStyles.arrowTip
361
367
  }),
362
368
  positionerProps: normalize.element({
363
369
  id: dom.getPositionerId(state.context),
364
- "data-part": "positioner",
370
+ ...parts.positioner.attrs,
365
371
  style: popperStyles.floating
366
372
  }),
367
373
  contentProps: normalize.element({
368
- "data-part": "content",
374
+ ...parts.content.attrs,
375
+ hidden: !isOpen,
369
376
  role: hasAriaLabel ? void 0 : "tooltip",
370
377
  id: hasAriaLabel ? void 0 : contentId,
371
378
  "data-placement": state.context.currentPlacement,
@@ -380,7 +387,7 @@ function connect(state, send, normalize) {
380
387
  }
381
388
  }),
382
389
  labelProps: normalize.element({
383
- "data-part": "label",
390
+ ...parts.label.attrs,
384
391
  id: contentId,
385
392
  role: "tooltip",
386
393
  style: visuallyHiddenStyle,
@@ -640,6 +647,7 @@ function machine(userContext) {
640
647
  }
641
648
  // Annotate the CommonJS export names for ESM import in node:
642
649
  0 && (module.exports = {
650
+ anatomy,
643
651
  connect,
644
652
  machine
645
653
  });
package/dist/index.mjs CHANGED
@@ -1,3 +1,8 @@
1
+ // src/tooltip.anatomy.ts
2
+ import { createAnatomy } from "@zag-js/anatomy";
3
+ var anatomy = createAnatomy("tooltip").parts("trigger", "arrow", "arrowTip", "positioner", "content", "label");
4
+ var parts = anatomy.build();
5
+
1
6
  // ../../utilities/dom/dist/index.mjs
2
7
  var dataAttr = (guard) => {
3
8
  return guard ? "" : void 0;
@@ -285,7 +290,7 @@ function connect(state, send, normalize) {
285
290
  };
286
291
  },
287
292
  triggerProps: normalize.button({
288
- "data-part": "trigger",
293
+ ...parts.trigger.attrs,
289
294
  id: triggerId,
290
295
  "data-expanded": dataAttr(isOpen),
291
296
  "aria-describedby": isOpen ? contentId : void 0,
@@ -325,20 +330,21 @@ function connect(state, send, normalize) {
325
330
  }),
326
331
  arrowProps: normalize.element({
327
332
  id: dom.getArrowId(state.context),
328
- "data-part": "arrow",
333
+ ...parts.arrow.attrs,
329
334
  style: popperStyles.arrow
330
335
  }),
331
- innerArrowProps: normalize.element({
332
- "data-part": "arrow-inner",
333
- style: popperStyles.innerArrow
336
+ arrowTipProps: normalize.element({
337
+ ...parts.arrowTip.attrs,
338
+ style: popperStyles.arrowTip
334
339
  }),
335
340
  positionerProps: normalize.element({
336
341
  id: dom.getPositionerId(state.context),
337
- "data-part": "positioner",
342
+ ...parts.positioner.attrs,
338
343
  style: popperStyles.floating
339
344
  }),
340
345
  contentProps: normalize.element({
341
- "data-part": "content",
346
+ ...parts.content.attrs,
347
+ hidden: !isOpen,
342
348
  role: hasAriaLabel ? void 0 : "tooltip",
343
349
  id: hasAriaLabel ? void 0 : contentId,
344
350
  "data-placement": state.context.currentPlacement,
@@ -353,7 +359,7 @@ function connect(state, send, normalize) {
353
359
  }
354
360
  }),
355
361
  labelProps: normalize.element({
356
- "data-part": "label",
362
+ ...parts.label.attrs,
357
363
  id: contentId,
358
364
  role: "tooltip",
359
365
  style: visuallyHiddenStyle,
@@ -612,6 +618,7 @@ function machine(userContext) {
612
618
  );
613
619
  }
614
620
  export {
621
+ anatomy,
615
622
  connect,
616
623
  machine
617
624
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tooltip",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Core logic for the tooltip widget implemented as a state machine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -29,8 +29,9 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.2.2",
33
- "@zag-js/popper": "0.2.0",
32
+ "@zag-js/anatomy": "0.1.1",
33
+ "@zag-js/core": "0.2.3",
34
+ "@zag-js/popper": "0.2.1",
34
35
  "@zag-js/types": "0.3.1"
35
36
  },
36
37
  "devDependencies": {