@zag-js/tabs 0.2.3 → 0.2.5

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
@@ -5,25 +5,25 @@ import { StateMachine } from '@zag-js/core';
5
5
  declare const anatomy: Omit<{
6
6
  parts: <U extends string>(...parts: U[]) => Omit<{
7
7
  parts: any;
8
- extend: <V extends string>(...parts: V[]) => Omit<{
8
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
9
9
  parts: any;
10
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
10
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
11
11
  parts: any;
12
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
12
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
13
13
  parts: any;
14
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
14
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
15
15
  parts: any;
16
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
16
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
17
17
  parts: any;
18
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
18
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
19
19
  parts: any;
20
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
20
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
21
21
  parts: any;
22
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
22
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
23
23
  parts: any;
24
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
24
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
25
25
  parts: any;
26
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
26
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
27
27
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
28
28
  selector: string;
29
29
  attrs: Record<"data-scope" | "data-part", string>;
@@ -74,28 +74,28 @@ declare const anatomy: Omit<{
74
74
  attrs: Record<"data-scope" | "data-part", string>;
75
75
  }>;
76
76
  }, "parts">;
77
- extend: <V_10 extends string>(...parts: V_10[]) => Omit<{
77
+ extendWith: <V_10 extends string>(...parts: V_10[]) => Omit<{
78
78
  parts: <U extends string>(...parts: U[]) => Omit<{
79
79
  parts: any;
80
- extend: <V extends string>(...parts: V[]) => Omit<{
80
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
81
81
  parts: any;
82
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
82
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
83
83
  parts: any;
84
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
84
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
85
85
  parts: any;
86
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
86
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
87
87
  parts: any;
88
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
88
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
89
89
  parts: any;
90
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
90
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
91
91
  parts: any;
92
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
92
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
93
93
  parts: any;
94
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
94
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
95
95
  parts: any;
96
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
96
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
97
97
  parts: any;
98
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
98
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
99
99
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
100
100
  selector: string;
101
101
  attrs: Record<"data-scope" | "data-part", string>;
@@ -146,28 +146,28 @@ declare const anatomy: Omit<{
146
146
  attrs: Record<"data-scope" | "data-part", string>;
147
147
  }>;
148
148
  }, "parts">;
149
- extend: <V_11 extends string>(...parts: V_11[]) => Omit<{
149
+ extendWith: <V_11 extends string>(...parts: V_11[]) => Omit<{
150
150
  parts: <U extends string>(...parts: U[]) => Omit<{
151
151
  parts: any;
152
- extend: <V extends string>(...parts: V[]) => Omit<{
152
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
153
153
  parts: any;
154
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
154
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
155
155
  parts: any;
156
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
156
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
157
157
  parts: any;
158
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
158
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
159
159
  parts: any;
160
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
160
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
161
161
  parts: any;
162
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
162
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
163
163
  parts: any;
164
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
164
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
165
165
  parts: any;
166
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
166
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
167
167
  parts: any;
168
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
168
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
169
169
  parts: any;
170
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
170
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
171
171
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
172
172
  selector: string;
173
173
  attrs: Record<"data-scope" | "data-part", string>;
@@ -218,28 +218,28 @@ declare const anatomy: Omit<{
218
218
  attrs: Record<"data-scope" | "data-part", string>;
219
219
  }>;
220
220
  }, "parts">;
221
- extend: <V_12 extends string>(...parts: V_12[]) => Omit<{
221
+ extendWith: <V_12 extends string>(...parts: V_12[]) => Omit<{
222
222
  parts: <U extends string>(...parts: U[]) => Omit<{
223
223
  parts: any;
224
- extend: <V extends string>(...parts: V[]) => Omit<{
224
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
225
225
  parts: any;
226
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
226
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
227
227
  parts: any;
228
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
228
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
229
229
  parts: any;
230
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
230
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
231
231
  parts: any;
232
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
232
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
233
233
  parts: any;
234
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
234
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
235
235
  parts: any;
236
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
236
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
237
237
  parts: any;
238
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
238
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
239
239
  parts: any;
240
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
240
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
241
241
  parts: any;
242
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
242
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
243
243
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
244
244
  selector: string;
245
245
  attrs: Record<"data-scope" | "data-part", string>;
@@ -290,28 +290,28 @@ declare const anatomy: Omit<{
290
290
  attrs: Record<"data-scope" | "data-part", string>;
291
291
  }>;
292
292
  }, "parts">;
293
- extend: <V_13 extends string>(...parts: V_13[]) => Omit<{
293
+ extendWith: <V_13 extends string>(...parts: V_13[]) => Omit<{
294
294
  parts: <U extends string>(...parts: U[]) => Omit<{
295
295
  parts: any;
296
- extend: <V extends string>(...parts: V[]) => Omit<{
296
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
297
297
  parts: any;
298
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
298
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
299
299
  parts: any;
300
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
300
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
301
301
  parts: any;
302
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
302
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
303
303
  parts: any;
304
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
304
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
305
305
  parts: any;
306
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
306
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
307
307
  parts: any;
308
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
308
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
309
309
  parts: any;
310
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
310
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
311
311
  parts: any;
312
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
312
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
313
313
  parts: any;
314
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
314
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
315
315
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
316
316
  selector: string;
317
317
  attrs: Record<"data-scope" | "data-part", string>;
@@ -362,28 +362,28 @@ declare const anatomy: Omit<{
362
362
  attrs: Record<"data-scope" | "data-part", string>;
363
363
  }>;
364
364
  }, "parts">;
365
- extend: <V_14 extends string>(...parts: V_14[]) => Omit<{
365
+ extendWith: <V_14 extends string>(...parts: V_14[]) => Omit<{
366
366
  parts: <U extends string>(...parts: U[]) => Omit<{
367
367
  parts: any;
368
- extend: <V extends string>(...parts: V[]) => Omit<{
368
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
369
369
  parts: any;
370
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
370
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
371
371
  parts: any;
372
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
372
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
373
373
  parts: any;
374
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
374
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
375
375
  parts: any;
376
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
376
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
377
377
  parts: any;
378
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
378
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
379
379
  parts: any;
380
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
380
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
381
381
  parts: any;
382
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
382
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
383
383
  parts: any;
384
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
384
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
385
385
  parts: any;
386
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
386
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
387
387
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
388
388
  selector: string;
389
389
  attrs: Record<"data-scope" | "data-part", string>;
@@ -434,28 +434,28 @@ declare const anatomy: Omit<{
434
434
  attrs: Record<"data-scope" | "data-part", string>;
435
435
  }>;
436
436
  }, "parts">;
437
- extend: <V_15 extends string>(...parts: V_15[]) => Omit<{
437
+ extendWith: <V_15 extends string>(...parts: V_15[]) => Omit<{
438
438
  parts: <U extends string>(...parts: U[]) => Omit<{
439
439
  parts: any;
440
- extend: <V extends string>(...parts: V[]) => Omit<{
440
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
441
441
  parts: any;
442
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
442
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
443
443
  parts: any;
444
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
444
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
445
445
  parts: any;
446
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
446
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
447
447
  parts: any;
448
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
448
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
449
449
  parts: any;
450
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
450
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
451
451
  parts: any;
452
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
452
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
453
453
  parts: any;
454
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
454
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
455
455
  parts: any;
456
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
456
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
457
457
  parts: any;
458
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
458
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
459
459
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
460
460
  selector: string;
461
461
  attrs: Record<"data-scope" | "data-part", string>;
@@ -506,28 +506,28 @@ declare const anatomy: Omit<{
506
506
  attrs: Record<"data-scope" | "data-part", string>;
507
507
  }>;
508
508
  }, "parts">;
509
- extend: <V_16 extends string>(...parts: V_16[]) => Omit<{
509
+ extendWith: <V_16 extends string>(...parts: V_16[]) => Omit<{
510
510
  parts: <U extends string>(...parts: U[]) => Omit<{
511
511
  parts: any;
512
- extend: <V extends string>(...parts: V[]) => Omit<{
512
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
513
513
  parts: any;
514
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
514
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
515
515
  parts: any;
516
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
516
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
517
517
  parts: any;
518
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
518
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
519
519
  parts: any;
520
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
520
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
521
521
  parts: any;
522
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
522
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
523
523
  parts: any;
524
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
524
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
525
525
  parts: any;
526
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
526
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
527
527
  parts: any;
528
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
528
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
529
529
  parts: any;
530
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
530
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
531
531
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
532
532
  selector: string;
533
533
  attrs: Record<"data-scope" | "data-part", string>;
@@ -578,28 +578,28 @@ declare const anatomy: Omit<{
578
578
  attrs: Record<"data-scope" | "data-part", string>;
579
579
  }>;
580
580
  }, "parts">;
581
- extend: <V_17 extends string>(...parts: V_17[]) => Omit<{
581
+ extendWith: <V_17 extends string>(...parts: V_17[]) => Omit<{
582
582
  parts: <U extends string>(...parts: U[]) => Omit<{
583
583
  parts: any;
584
- extend: <V extends string>(...parts: V[]) => Omit<{
584
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
585
585
  parts: any;
586
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
586
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
587
587
  parts: any;
588
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
588
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
589
589
  parts: any;
590
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
590
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
591
591
  parts: any;
592
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
592
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
593
593
  parts: any;
594
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
594
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
595
595
  parts: any;
596
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
596
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
597
597
  parts: any;
598
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
598
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
599
599
  parts: any;
600
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
600
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
601
601
  parts: any;
602
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
602
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
603
603
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
604
604
  selector: string;
605
605
  attrs: Record<"data-scope" | "data-part", string>;
@@ -650,28 +650,28 @@ declare const anatomy: Omit<{
650
650
  attrs: Record<"data-scope" | "data-part", string>;
651
651
  }>;
652
652
  }, "parts">;
653
- extend: <V_18 extends string>(...parts: V_18[]) => Omit<{
653
+ extendWith: <V_18 extends string>(...parts: V_18[]) => Omit<{
654
654
  parts: <U extends string>(...parts: U[]) => Omit<{
655
655
  parts: any;
656
- extend: <V extends string>(...parts: V[]) => Omit<{
656
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
657
657
  parts: any;
658
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
658
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
659
659
  parts: any;
660
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
660
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
661
661
  parts: any;
662
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
662
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
663
663
  parts: any;
664
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
664
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
665
665
  parts: any;
666
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
666
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
667
667
  parts: any;
668
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
668
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
669
669
  parts: any;
670
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
670
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
671
671
  parts: any;
672
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
672
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
673
673
  parts: any;
674
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
674
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
675
675
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
676
676
  selector: string;
677
677
  attrs: Record<"data-scope" | "data-part", string>;
@@ -722,28 +722,28 @@ declare const anatomy: Omit<{
722
722
  attrs: Record<"data-scope" | "data-part", string>;
723
723
  }>;
724
724
  }, "parts">;
725
- extend: <V_19 extends string>(...parts: V_19[]) => Omit<{
725
+ extendWith: <V_19 extends string>(...parts: V_19[]) => Omit<{
726
726
  parts: <U extends string>(...parts: U[]) => Omit<{
727
727
  parts: any;
728
- extend: <V extends string>(...parts: V[]) => Omit<{
728
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
729
729
  parts: any;
730
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
730
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
731
731
  parts: any;
732
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
732
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
733
733
  parts: any;
734
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
734
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
735
735
  parts: any;
736
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
736
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
737
737
  parts: any;
738
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
738
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
739
739
  parts: any;
740
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
740
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
741
741
  parts: any;
742
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
742
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
743
743
  parts: any;
744
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
744
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
745
745
  parts: any;
746
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
746
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
747
747
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
748
748
  selector: string;
749
749
  attrs: Record<"data-scope" | "data-part", string>;
@@ -794,75 +794,74 @@ declare const anatomy: Omit<{
794
794
  attrs: Record<"data-scope" | "data-part", string>;
795
795
  }>;
796
796
  }, "parts">;
797
- extend: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
798
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
797
+ extendWith: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
798
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
799
799
  selector: string;
800
800
  attrs: Record<"data-scope" | "data-part", string>;
801
801
  }>;
802
802
  }, "parts">;
803
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
803
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
804
804
  selector: string;
805
805
  attrs: Record<"data-scope" | "data-part", string>;
806
806
  }>;
807
807
  }, "parts">;
808
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
808
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
809
809
  selector: string;
810
810
  attrs: Record<"data-scope" | "data-part", string>;
811
811
  }>;
812
812
  }, "parts">;
813
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
813
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
814
814
  selector: string;
815
815
  attrs: Record<"data-scope" | "data-part", string>;
816
816
  }>;
817
817
  }, "parts">;
818
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
818
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
819
819
  selector: string;
820
820
  attrs: Record<"data-scope" | "data-part", string>;
821
821
  }>;
822
822
  }, "parts">;
823
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14, {
823
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13 | V_14, {
824
824
  selector: string;
825
825
  attrs: Record<"data-scope" | "data-part", string>;
826
826
  }>;
827
827
  }, "parts">;
828
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12 | V_13, {
828
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12 | V_13, {
829
829
  selector: string;
830
830
  attrs: Record<"data-scope" | "data-part", string>;
831
831
  }>;
832
832
  }, "parts">;
833
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11 | V_12, {
833
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11 | V_12, {
834
834
  selector: string;
835
835
  attrs: Record<"data-scope" | "data-part", string>;
836
836
  }>;
837
837
  }, "parts">;
838
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10 | V_11, {
838
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10 | V_11, {
839
839
  selector: string;
840
840
  attrs: Record<"data-scope" | "data-part", string>;
841
841
  }>;
842
842
  }, "parts">;
843
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator" | V_10, {
843
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator" | V_10, {
844
844
  selector: string;
845
845
  attrs: Record<"data-scope" | "data-part", string>;
846
846
  }>;
847
847
  }, "parts">;
848
- build: () => Record<"root" | "triggerGroup" | "trigger" | "contentGroup" | "content" | "deleteButton" | "indicator", {
848
+ build: () => Record<"root" | "tablist" | "trigger" | "contentGroup" | "content" | "indicator", {
849
849
  selector: string;
850
850
  attrs: Record<"data-scope" | "data-part", string>;
851
851
  }>;
852
852
  }, "parts">;
853
853
 
854
- declare type IntlTranslations = {
854
+ type IntlTranslations = {
855
855
  tablistLabel?: string;
856
- deleteLabel?(value: string): string;
857
856
  };
858
- declare type ElementIds = Partial<{
857
+ type ElementIds = Partial<{
859
858
  root: string;
860
859
  trigger: string;
861
- triggerGroup: string;
860
+ tablist: string;
862
861
  contentGroup: string;
863
862
  content: string;
864
863
  }>;
865
- declare type PublicContext = DirectionProperty & CommonProperties & {
864
+ type PublicContext = DirectionProperty & CommonProperties & {
866
865
  /**
867
866
  * The ids of the elements in the tabs. Useful for composition.
868
867
  */
@@ -918,8 +917,8 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
918
917
  value: string;
919
918
  }) => void;
920
919
  };
921
- declare type UserDefinedContext = RequiredBy<PublicContext, "id">;
922
- declare type ComputedContext = Readonly<{
920
+ type UserDefinedContext = RequiredBy<PublicContext, "id">;
921
+ type ComputedContext = Readonly<{
923
922
  /**
924
923
  * @computed
925
924
  * Whether the tab is in the horizontal orientation
@@ -931,14 +930,14 @@ declare type ComputedContext = Readonly<{
931
930
  */
932
931
  isVertical: boolean;
933
932
  }>;
934
- declare type PrivateContext = Context<{}>;
935
- declare type MachineContext = PublicContext & ComputedContext & PrivateContext;
936
- declare type MachineState = {
933
+ type PrivateContext = Context<{}>;
934
+ type MachineContext = PublicContext & ComputedContext & PrivateContext;
935
+ type MachineState = {
937
936
  value: "unknown" | "idle" | "focused";
938
937
  };
939
- declare type State = StateMachine.State<MachineContext, MachineState>;
940
- declare type Send = StateMachine.Send<StateMachine.AnyEventObject>;
941
- declare type TabProps = {
938
+ type State = StateMachine.State<MachineContext, MachineState>;
939
+ type Send = StateMachine.Send<StateMachine.AnyEventObject>;
940
+ type TabProps = {
942
941
  value: string;
943
942
  disabled?: boolean;
944
943
  };
@@ -950,13 +949,12 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
950
949
  setValue(value: string): void;
951
950
  clearValue(): void;
952
951
  rootProps: T["element"];
953
- triggerGroupProps: T["element"];
952
+ tablistProps: T["element"];
954
953
  getTriggerProps(props: TabProps): T["button"];
955
954
  contentGroupProps: T["element"];
956
955
  getContentProps({ value }: {
957
956
  value: string;
958
957
  }): T["element"];
959
- getDeleteButtonProps({ value, disabled }: TabProps): T["button"];
960
958
  indicatorProps: T["element"];
961
959
  };
962
960
 
package/dist/index.js CHANGED
@@ -28,15 +28,7 @@ module.exports = __toCommonJS(src_exports);
28
28
 
29
29
  // src/tabs.anatomy.ts
30
30
  var import_anatomy = require("@zag-js/anatomy");
31
- var anatomy = (0, import_anatomy.createAnatomy)("tabs").parts(
32
- "root",
33
- "triggerGroup",
34
- "trigger",
35
- "contentGroup",
36
- "content",
37
- "deleteButton",
38
- "indicator"
39
- );
31
+ var anatomy = (0, import_anatomy.createAnatomy)("tabs").parts("root", "tablist", "trigger", "contentGroup", "content", "indicator");
40
32
  var parts = anatomy.build();
41
33
 
42
34
  // ../../utilities/dom/dist/index.mjs
@@ -224,9 +216,9 @@ var dom = defineDomHelpers({
224
216
  var _a, _b;
225
217
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.root) != null ? _b : `tabs:${ctx.id}`;
226
218
  },
227
- getTriggerGroupId: (ctx) => {
219
+ getTablistId: (ctx) => {
228
220
  var _a, _b;
229
- return (_b = (_a = ctx.ids) == null ? void 0 : _a.triggerGroup) != null ? _b : `tabs:${ctx.id}:trigger-group`;
221
+ return (_b = (_a = ctx.ids) == null ? void 0 : _a.tablist) != null ? _b : `tabs:${ctx.id}:list`;
230
222
  },
231
223
  getContentId: (ctx, id) => {
232
224
  var _a, _b;
@@ -241,14 +233,14 @@ var dom = defineDomHelpers({
241
233
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.trigger) != null ? _b : `tabs:${ctx.id}:trigger-${id}`;
242
234
  },
243
235
  getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
244
- getTriggerGroupEl: (ctx) => dom.getById(ctx, dom.getTriggerGroupId(ctx)),
236
+ getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
245
237
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
246
238
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
247
239
  getIndicatorEl: (ctx) => dom.getById(ctx, dom.getIndicatorId(ctx)),
248
240
  getElements: (ctx) => {
249
- const ownerId = CSS.escape(dom.getTriggerGroupId(ctx));
241
+ const ownerId = CSS.escape(dom.getTablistId(ctx));
250
242
  const selector = `[role=tab][data-ownedby='${ownerId}']:not([disabled])`;
251
- return queryAll(dom.getTriggerGroupEl(ctx), selector);
243
+ return queryAll(dom.getTablistEl(ctx), selector);
252
244
  },
253
245
  getFirstEl: (ctx) => first(dom.getElements(ctx)),
254
246
  getLastEl: (ctx) => last(dom.getElements(ctx)),
@@ -303,9 +295,9 @@ function connect(state, send, normalize) {
303
295
  "data-focus": dataAttr(isFocused),
304
296
  dir: state.context.dir
305
297
  }),
306
- triggerGroupProps: normalize.element({
307
- ...parts.triggerGroup.attrs,
308
- id: dom.getTriggerGroupId(state.context),
298
+ tablistProps: normalize.element({
299
+ ...parts.tablist.attrs,
300
+ id: dom.getTablistId(state.context),
309
301
  role: "tablist",
310
302
  "data-focus": dataAttr(isFocused),
311
303
  "aria-orientation": state.context.orientation,
@@ -358,7 +350,7 @@ function connect(state, send, normalize) {
358
350
  "aria-selected": selected,
359
351
  "data-selected": dataAttr(selected),
360
352
  "aria-controls": dom.getContentId(state.context, value),
361
- "data-ownedby": dom.getTriggerGroupId(state.context),
353
+ "data-ownedby": dom.getTablistId(state.context),
362
354
  id: dom.getTriggerId(state.context, value),
363
355
  tabIndex: selected ? 0 : -1,
364
356
  onFocus() {
@@ -393,23 +385,10 @@ function connect(state, send, normalize) {
393
385
  tabIndex: 0,
394
386
  "aria-labelledby": dom.getTriggerId(state.context, value),
395
387
  role: "tabpanel",
396
- "data-ownedby": dom.getTriggerGroupId(state.context),
388
+ "data-ownedby": dom.getTablistId(state.context),
397
389
  hidden: !selected
398
390
  });
399
391
  },
400
- getDeleteButtonProps({ value, disabled }) {
401
- var _a;
402
- return normalize.button({
403
- ...parts.deleteButton.attrs,
404
- type: "button",
405
- tabIndex: -1,
406
- "aria-label": (_a = translations.deleteLabel) == null ? void 0 : _a.call(translations, value),
407
- disabled,
408
- onClick() {
409
- send({ type: "DELETE", value });
410
- }
411
- });
412
- },
413
392
  indicatorProps: normalize.element({
414
393
  id: dom.getIndicatorId(state.context),
415
394
  ...parts.indicator.attrs,
package/dist/index.mjs CHANGED
@@ -1,14 +1,6 @@
1
1
  // src/tabs.anatomy.ts
2
2
  import { createAnatomy } from "@zag-js/anatomy";
3
- var anatomy = createAnatomy("tabs").parts(
4
- "root",
5
- "triggerGroup",
6
- "trigger",
7
- "contentGroup",
8
- "content",
9
- "deleteButton",
10
- "indicator"
11
- );
3
+ var anatomy = createAnatomy("tabs").parts("root", "tablist", "trigger", "contentGroup", "content", "indicator");
12
4
  var parts = anatomy.build();
13
5
 
14
6
  // ../../utilities/dom/dist/index.mjs
@@ -196,9 +188,9 @@ var dom = defineDomHelpers({
196
188
  var _a, _b;
197
189
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.root) != null ? _b : `tabs:${ctx.id}`;
198
190
  },
199
- getTriggerGroupId: (ctx) => {
191
+ getTablistId: (ctx) => {
200
192
  var _a, _b;
201
- return (_b = (_a = ctx.ids) == null ? void 0 : _a.triggerGroup) != null ? _b : `tabs:${ctx.id}:trigger-group`;
193
+ return (_b = (_a = ctx.ids) == null ? void 0 : _a.tablist) != null ? _b : `tabs:${ctx.id}:list`;
202
194
  },
203
195
  getContentId: (ctx, id) => {
204
196
  var _a, _b;
@@ -213,14 +205,14 @@ var dom = defineDomHelpers({
213
205
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.trigger) != null ? _b : `tabs:${ctx.id}:trigger-${id}`;
214
206
  },
215
207
  getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
216
- getTriggerGroupEl: (ctx) => dom.getById(ctx, dom.getTriggerGroupId(ctx)),
208
+ getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
217
209
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
218
210
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
219
211
  getIndicatorEl: (ctx) => dom.getById(ctx, dom.getIndicatorId(ctx)),
220
212
  getElements: (ctx) => {
221
- const ownerId = CSS.escape(dom.getTriggerGroupId(ctx));
213
+ const ownerId = CSS.escape(dom.getTablistId(ctx));
222
214
  const selector = `[role=tab][data-ownedby='${ownerId}']:not([disabled])`;
223
- return queryAll(dom.getTriggerGroupEl(ctx), selector);
215
+ return queryAll(dom.getTablistEl(ctx), selector);
224
216
  },
225
217
  getFirstEl: (ctx) => first(dom.getElements(ctx)),
226
218
  getLastEl: (ctx) => last(dom.getElements(ctx)),
@@ -275,9 +267,9 @@ function connect(state, send, normalize) {
275
267
  "data-focus": dataAttr(isFocused),
276
268
  dir: state.context.dir
277
269
  }),
278
- triggerGroupProps: normalize.element({
279
- ...parts.triggerGroup.attrs,
280
- id: dom.getTriggerGroupId(state.context),
270
+ tablistProps: normalize.element({
271
+ ...parts.tablist.attrs,
272
+ id: dom.getTablistId(state.context),
281
273
  role: "tablist",
282
274
  "data-focus": dataAttr(isFocused),
283
275
  "aria-orientation": state.context.orientation,
@@ -330,7 +322,7 @@ function connect(state, send, normalize) {
330
322
  "aria-selected": selected,
331
323
  "data-selected": dataAttr(selected),
332
324
  "aria-controls": dom.getContentId(state.context, value),
333
- "data-ownedby": dom.getTriggerGroupId(state.context),
325
+ "data-ownedby": dom.getTablistId(state.context),
334
326
  id: dom.getTriggerId(state.context, value),
335
327
  tabIndex: selected ? 0 : -1,
336
328
  onFocus() {
@@ -365,23 +357,10 @@ function connect(state, send, normalize) {
365
357
  tabIndex: 0,
366
358
  "aria-labelledby": dom.getTriggerId(state.context, value),
367
359
  role: "tabpanel",
368
- "data-ownedby": dom.getTriggerGroupId(state.context),
360
+ "data-ownedby": dom.getTablistId(state.context),
369
361
  hidden: !selected
370
362
  });
371
363
  },
372
- getDeleteButtonProps({ value, disabled }) {
373
- var _a;
374
- return normalize.button({
375
- ...parts.deleteButton.attrs,
376
- type: "button",
377
- tabIndex: -1,
378
- "aria-label": (_a = translations.deleteLabel) == null ? void 0 : _a.call(translations, value),
379
- disabled,
380
- onClick() {
381
- send({ type: "DELETE", value });
382
- }
383
- });
384
- },
385
364
  indicatorProps: normalize.element({
386
365
  id: dom.getIndicatorId(state.context),
387
366
  ...parts.indicator.attrs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -29,8 +29,8 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/anatomy": "0.1.1",
33
- "@zag-js/core": "0.2.2",
32
+ "@zag-js/anatomy": "0.1.2",
33
+ "@zag-js/core": "0.2.3",
34
34
  "@zag-js/types": "0.3.1"
35
35
  },
36
36
  "devDependencies": {