@zag-js/slider 0.2.4 → 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 +146 -146
- package/dist/index.js +10 -10
- package/dist/index.mjs +10 -10
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,25 +6,25 @@ import { StateMachine } from '@zag-js/core';
|
|
|
6
6
|
declare const anatomy: Omit<{
|
|
7
7
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
8
8
|
parts: any;
|
|
9
|
-
|
|
9
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
10
10
|
parts: any;
|
|
11
|
-
|
|
11
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
12
12
|
parts: any;
|
|
13
|
-
|
|
13
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
14
14
|
parts: any;
|
|
15
|
-
|
|
15
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
16
16
|
parts: any;
|
|
17
|
-
|
|
17
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
18
18
|
parts: any;
|
|
19
|
-
|
|
19
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
20
20
|
parts: any;
|
|
21
|
-
|
|
21
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
22
22
|
parts: any;
|
|
23
|
-
|
|
23
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
24
24
|
parts: any;
|
|
25
|
-
|
|
25
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
26
26
|
parts: any;
|
|
27
|
-
|
|
27
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
28
28
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
29
29
|
selector: string;
|
|
30
30
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -75,28 +75,28 @@ declare const anatomy: Omit<{
|
|
|
75
75
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
76
76
|
}>;
|
|
77
77
|
}, "parts">;
|
|
78
|
-
|
|
78
|
+
extendWith: <V_10 extends string>(...parts: V_10[]) => Omit<{
|
|
79
79
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
80
80
|
parts: any;
|
|
81
|
-
|
|
81
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
82
82
|
parts: any;
|
|
83
|
-
|
|
83
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
84
84
|
parts: any;
|
|
85
|
-
|
|
85
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
86
86
|
parts: any;
|
|
87
|
-
|
|
87
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
88
88
|
parts: any;
|
|
89
|
-
|
|
89
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
90
90
|
parts: any;
|
|
91
|
-
|
|
91
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
92
92
|
parts: any;
|
|
93
|
-
|
|
93
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
94
94
|
parts: any;
|
|
95
|
-
|
|
95
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
96
96
|
parts: any;
|
|
97
|
-
|
|
97
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
98
98
|
parts: any;
|
|
99
|
-
|
|
99
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
100
100
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
101
101
|
selector: string;
|
|
102
102
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -147,28 +147,28 @@ declare const anatomy: Omit<{
|
|
|
147
147
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
148
148
|
}>;
|
|
149
149
|
}, "parts">;
|
|
150
|
-
|
|
150
|
+
extendWith: <V_11 extends string>(...parts: V_11[]) => Omit<{
|
|
151
151
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
152
152
|
parts: any;
|
|
153
|
-
|
|
153
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
154
154
|
parts: any;
|
|
155
|
-
|
|
155
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
156
156
|
parts: any;
|
|
157
|
-
|
|
157
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
158
158
|
parts: any;
|
|
159
|
-
|
|
159
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
160
160
|
parts: any;
|
|
161
|
-
|
|
161
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
162
162
|
parts: any;
|
|
163
|
-
|
|
163
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
164
164
|
parts: any;
|
|
165
|
-
|
|
165
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
166
166
|
parts: any;
|
|
167
|
-
|
|
167
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
168
168
|
parts: any;
|
|
169
|
-
|
|
169
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
170
170
|
parts: any;
|
|
171
|
-
|
|
171
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
172
172
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
173
173
|
selector: string;
|
|
174
174
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -219,28 +219,28 @@ declare const anatomy: Omit<{
|
|
|
219
219
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
220
220
|
}>;
|
|
221
221
|
}, "parts">;
|
|
222
|
-
|
|
222
|
+
extendWith: <V_12 extends string>(...parts: V_12[]) => Omit<{
|
|
223
223
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
224
224
|
parts: any;
|
|
225
|
-
|
|
225
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
226
226
|
parts: any;
|
|
227
|
-
|
|
227
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
228
228
|
parts: any;
|
|
229
|
-
|
|
229
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
230
230
|
parts: any;
|
|
231
|
-
|
|
231
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
232
232
|
parts: any;
|
|
233
|
-
|
|
233
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
234
234
|
parts: any;
|
|
235
|
-
|
|
235
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
236
236
|
parts: any;
|
|
237
|
-
|
|
237
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
238
238
|
parts: any;
|
|
239
|
-
|
|
239
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
240
240
|
parts: any;
|
|
241
|
-
|
|
241
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
242
242
|
parts: any;
|
|
243
|
-
|
|
243
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
244
244
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
245
245
|
selector: string;
|
|
246
246
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -291,28 +291,28 @@ declare const anatomy: Omit<{
|
|
|
291
291
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
292
292
|
}>;
|
|
293
293
|
}, "parts">;
|
|
294
|
-
|
|
294
|
+
extendWith: <V_13 extends string>(...parts: V_13[]) => Omit<{
|
|
295
295
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
296
296
|
parts: any;
|
|
297
|
-
|
|
297
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
298
298
|
parts: any;
|
|
299
|
-
|
|
299
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
300
300
|
parts: any;
|
|
301
|
-
|
|
301
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
302
302
|
parts: any;
|
|
303
|
-
|
|
303
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
304
304
|
parts: any;
|
|
305
|
-
|
|
305
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
306
306
|
parts: any;
|
|
307
|
-
|
|
307
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
308
308
|
parts: any;
|
|
309
|
-
|
|
309
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
310
310
|
parts: any;
|
|
311
|
-
|
|
311
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
312
312
|
parts: any;
|
|
313
|
-
|
|
313
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
314
314
|
parts: any;
|
|
315
|
-
|
|
315
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
316
316
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
317
317
|
selector: string;
|
|
318
318
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -363,28 +363,28 @@ declare const anatomy: Omit<{
|
|
|
363
363
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
364
364
|
}>;
|
|
365
365
|
}, "parts">;
|
|
366
|
-
|
|
366
|
+
extendWith: <V_14 extends string>(...parts: V_14[]) => Omit<{
|
|
367
367
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
368
368
|
parts: any;
|
|
369
|
-
|
|
369
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
370
370
|
parts: any;
|
|
371
|
-
|
|
371
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
372
372
|
parts: any;
|
|
373
|
-
|
|
373
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
374
374
|
parts: any;
|
|
375
|
-
|
|
375
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
376
376
|
parts: any;
|
|
377
|
-
|
|
377
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
378
378
|
parts: any;
|
|
379
|
-
|
|
379
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
380
380
|
parts: any;
|
|
381
|
-
|
|
381
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
382
382
|
parts: any;
|
|
383
|
-
|
|
383
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
384
384
|
parts: any;
|
|
385
|
-
|
|
385
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
386
386
|
parts: any;
|
|
387
|
-
|
|
387
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
388
388
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
389
389
|
selector: string;
|
|
390
390
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -435,28 +435,28 @@ declare const anatomy: Omit<{
|
|
|
435
435
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
436
436
|
}>;
|
|
437
437
|
}, "parts">;
|
|
438
|
-
|
|
438
|
+
extendWith: <V_15 extends string>(...parts: V_15[]) => Omit<{
|
|
439
439
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
440
440
|
parts: any;
|
|
441
|
-
|
|
441
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
442
442
|
parts: any;
|
|
443
|
-
|
|
443
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
444
444
|
parts: any;
|
|
445
|
-
|
|
445
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
446
446
|
parts: any;
|
|
447
|
-
|
|
447
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
448
448
|
parts: any;
|
|
449
|
-
|
|
449
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
450
450
|
parts: any;
|
|
451
|
-
|
|
451
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
452
452
|
parts: any;
|
|
453
|
-
|
|
453
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
454
454
|
parts: any;
|
|
455
|
-
|
|
455
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
456
456
|
parts: any;
|
|
457
|
-
|
|
457
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
458
458
|
parts: any;
|
|
459
|
-
|
|
459
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
460
460
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
461
461
|
selector: string;
|
|
462
462
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -507,28 +507,28 @@ declare const anatomy: Omit<{
|
|
|
507
507
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
508
508
|
}>;
|
|
509
509
|
}, "parts">;
|
|
510
|
-
|
|
510
|
+
extendWith: <V_16 extends string>(...parts: V_16[]) => Omit<{
|
|
511
511
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
512
512
|
parts: any;
|
|
513
|
-
|
|
513
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
514
514
|
parts: any;
|
|
515
|
-
|
|
515
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
516
516
|
parts: any;
|
|
517
|
-
|
|
517
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
518
518
|
parts: any;
|
|
519
|
-
|
|
519
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
520
520
|
parts: any;
|
|
521
|
-
|
|
521
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
522
522
|
parts: any;
|
|
523
|
-
|
|
523
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
524
524
|
parts: any;
|
|
525
|
-
|
|
525
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
526
526
|
parts: any;
|
|
527
|
-
|
|
527
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
528
528
|
parts: any;
|
|
529
|
-
|
|
529
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
530
530
|
parts: any;
|
|
531
|
-
|
|
531
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
532
532
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
533
533
|
selector: string;
|
|
534
534
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -579,28 +579,28 @@ declare const anatomy: Omit<{
|
|
|
579
579
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
580
580
|
}>;
|
|
581
581
|
}, "parts">;
|
|
582
|
-
|
|
582
|
+
extendWith: <V_17 extends string>(...parts: V_17[]) => Omit<{
|
|
583
583
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
584
584
|
parts: any;
|
|
585
|
-
|
|
585
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
586
586
|
parts: any;
|
|
587
|
-
|
|
587
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
588
588
|
parts: any;
|
|
589
|
-
|
|
589
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
590
590
|
parts: any;
|
|
591
|
-
|
|
591
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
592
592
|
parts: any;
|
|
593
|
-
|
|
593
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
594
594
|
parts: any;
|
|
595
|
-
|
|
595
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
596
596
|
parts: any;
|
|
597
|
-
|
|
597
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
598
598
|
parts: any;
|
|
599
|
-
|
|
599
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
600
600
|
parts: any;
|
|
601
|
-
|
|
601
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
602
602
|
parts: any;
|
|
603
|
-
|
|
603
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
604
604
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
605
605
|
selector: string;
|
|
606
606
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -651,28 +651,28 @@ declare const anatomy: Omit<{
|
|
|
651
651
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
652
652
|
}>;
|
|
653
653
|
}, "parts">;
|
|
654
|
-
|
|
654
|
+
extendWith: <V_18 extends string>(...parts: V_18[]) => Omit<{
|
|
655
655
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
656
656
|
parts: any;
|
|
657
|
-
|
|
657
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
658
658
|
parts: any;
|
|
659
|
-
|
|
659
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
660
660
|
parts: any;
|
|
661
|
-
|
|
661
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
662
662
|
parts: any;
|
|
663
|
-
|
|
663
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
664
664
|
parts: any;
|
|
665
|
-
|
|
665
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
666
666
|
parts: any;
|
|
667
|
-
|
|
667
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
668
668
|
parts: any;
|
|
669
|
-
|
|
669
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
670
670
|
parts: any;
|
|
671
|
-
|
|
671
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
672
672
|
parts: any;
|
|
673
|
-
|
|
673
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
674
674
|
parts: any;
|
|
675
|
-
|
|
675
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
676
676
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
677
677
|
selector: string;
|
|
678
678
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -723,28 +723,28 @@ declare const anatomy: Omit<{
|
|
|
723
723
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
724
724
|
}>;
|
|
725
725
|
}, "parts">;
|
|
726
|
-
|
|
726
|
+
extendWith: <V_19 extends string>(...parts: V_19[]) => Omit<{
|
|
727
727
|
parts: <U extends string>(...parts: U[]) => Omit<{
|
|
728
728
|
parts: any;
|
|
729
|
-
|
|
729
|
+
extendWith: <V extends string>(...parts: V[]) => Omit<{
|
|
730
730
|
parts: any;
|
|
731
|
-
|
|
731
|
+
extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
|
|
732
732
|
parts: any;
|
|
733
|
-
|
|
733
|
+
extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
|
|
734
734
|
parts: any;
|
|
735
|
-
|
|
735
|
+
extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
|
|
736
736
|
parts: any;
|
|
737
|
-
|
|
737
|
+
extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
|
|
738
738
|
parts: any;
|
|
739
|
-
|
|
739
|
+
extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
|
|
740
740
|
parts: any;
|
|
741
|
-
|
|
741
|
+
extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
|
|
742
742
|
parts: any;
|
|
743
|
-
|
|
743
|
+
extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
|
|
744
744
|
parts: any;
|
|
745
|
-
|
|
745
|
+
extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
|
|
746
746
|
parts: any;
|
|
747
|
-
|
|
747
|
+
extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
|
|
748
748
|
build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
|
|
749
749
|
selector: string;
|
|
750
750
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
@@ -795,64 +795,64 @@ declare const anatomy: Omit<{
|
|
|
795
795
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
796
796
|
}>;
|
|
797
797
|
}, "parts">;
|
|
798
|
-
|
|
799
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
798
|
+
extendWith: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
|
|
799
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
|
|
800
800
|
selector: string;
|
|
801
801
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
802
802
|
}>;
|
|
803
803
|
}, "parts">;
|
|
804
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
804
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
|
|
805
805
|
selector: string;
|
|
806
806
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
807
807
|
}>;
|
|
808
808
|
}, "parts">;
|
|
809
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
809
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
|
|
810
810
|
selector: string;
|
|
811
811
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
812
812
|
}>;
|
|
813
813
|
}, "parts">;
|
|
814
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
814
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
|
|
815
815
|
selector: string;
|
|
816
816
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
817
817
|
}>;
|
|
818
818
|
}, "parts">;
|
|
819
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
819
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
|
|
820
820
|
selector: string;
|
|
821
821
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
822
822
|
}>;
|
|
823
823
|
}, "parts">;
|
|
824
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
824
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13 | V_14, {
|
|
825
825
|
selector: string;
|
|
826
826
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
827
827
|
}>;
|
|
828
828
|
}, "parts">;
|
|
829
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
829
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12 | V_13, {
|
|
830
830
|
selector: string;
|
|
831
831
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
832
832
|
}>;
|
|
833
833
|
}, "parts">;
|
|
834
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
834
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11 | V_12, {
|
|
835
835
|
selector: string;
|
|
836
836
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
837
837
|
}>;
|
|
838
838
|
}, "parts">;
|
|
839
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
839
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10 | V_11, {
|
|
840
840
|
selector: string;
|
|
841
841
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
842
842
|
}>;
|
|
843
843
|
}, "parts">;
|
|
844
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
844
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker" | V_10, {
|
|
845
845
|
selector: string;
|
|
846
846
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
847
847
|
}>;
|
|
848
848
|
}, "parts">;
|
|
849
|
-
build: () => Record<"root" | "label" | "thumb" | "
|
|
849
|
+
build: () => Record<"root" | "label" | "thumb" | "hiddenInput" | "output" | "track" | "range" | "control" | "markerGroup" | "marker", {
|
|
850
850
|
selector: string;
|
|
851
851
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
852
852
|
}>;
|
|
853
853
|
}, "parts">;
|
|
854
854
|
|
|
855
|
-
|
|
855
|
+
type ElementIds = Partial<{
|
|
856
856
|
root: string;
|
|
857
857
|
thumb: string;
|
|
858
858
|
control: string;
|
|
@@ -861,7 +861,7 @@ declare type ElementIds = Partial<{
|
|
|
861
861
|
label: string;
|
|
862
862
|
output: string;
|
|
863
863
|
}>;
|
|
864
|
-
|
|
864
|
+
type PublicContext = DirectionProperty & CommonProperties & {
|
|
865
865
|
/**
|
|
866
866
|
* The ids of the elements in the slider. Useful for composition.
|
|
867
867
|
*/
|
|
@@ -952,8 +952,8 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
|
|
|
952
952
|
*/
|
|
953
953
|
thumbAlignment?: "contain" | "center";
|
|
954
954
|
};
|
|
955
|
-
|
|
956
|
-
|
|
955
|
+
type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
956
|
+
type ComputedContext = Readonly<{
|
|
957
957
|
/**
|
|
958
958
|
* @computed
|
|
959
959
|
* Whether the slider is interactive
|
|
@@ -980,14 +980,14 @@ declare type ComputedContext = Readonly<{
|
|
|
980
980
|
*/
|
|
981
981
|
readonly isRtl: boolean;
|
|
982
982
|
}>;
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
983
|
+
type PrivateContext = Context<{}>;
|
|
984
|
+
type MachineContext = PublicContext & ComputedContext & PrivateContext;
|
|
985
|
+
type MachineState = {
|
|
986
986
|
value: "unknown" | "idle" | "dragging" | "focus";
|
|
987
987
|
};
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
type State = StateMachine.State<MachineContext, MachineState>;
|
|
989
|
+
type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
990
|
+
type SharedContext = {
|
|
991
991
|
min: number;
|
|
992
992
|
max: number;
|
|
993
993
|
step: number;
|
|
@@ -1004,7 +1004,7 @@ declare type SharedContext = {
|
|
|
1004
1004
|
orientation?: "horizontal" | "vertical";
|
|
1005
1005
|
readonly hasMeasuredThumbSize: boolean;
|
|
1006
1006
|
};
|
|
1007
|
-
|
|
1007
|
+
type Point = {
|
|
1008
1008
|
x: number;
|
|
1009
1009
|
y: number;
|
|
1010
1010
|
};
|
|
@@ -1022,7 +1022,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
1022
1022
|
rootProps: T["element"];
|
|
1023
1023
|
labelProps: T["label"];
|
|
1024
1024
|
thumbProps: T["element"];
|
|
1025
|
-
|
|
1025
|
+
hiddenInputProps: T["input"];
|
|
1026
1026
|
outputProps: T["output"];
|
|
1027
1027
|
trackProps: T["element"];
|
|
1028
1028
|
rangeProps: T["element"];
|
|
@@ -1057,7 +1057,7 @@ declare const dom: {
|
|
|
1057
1057
|
getRootId: (ctx: MachineContext) => string;
|
|
1058
1058
|
getThumbId: (ctx: MachineContext) => string;
|
|
1059
1059
|
getControlId: (ctx: MachineContext) => string;
|
|
1060
|
-
|
|
1060
|
+
getHiddenInputId: (ctx: MachineContext) => string;
|
|
1061
1061
|
getOutputId: (ctx: MachineContext) => string;
|
|
1062
1062
|
getTrackId: (ctx: MachineContext) => string;
|
|
1063
1063
|
getRangeId: (ctx: MachineContext) => string;
|
|
@@ -1066,7 +1066,7 @@ declare const dom: {
|
|
|
1066
1066
|
getRootEl: (ctx: MachineContext) => HTMLElement | null;
|
|
1067
1067
|
getThumbEl: (ctx: MachineContext) => HTMLElement | null;
|
|
1068
1068
|
getControlEl: (ctx: MachineContext) => HTMLElement | null;
|
|
1069
|
-
|
|
1069
|
+
getHiddenInputEl: (ctx: MachineContext) => HTMLInputElement | null;
|
|
1070
1070
|
getValueFromPoint(ctx: MachineContext, point: Point): number | undefined;
|
|
1071
1071
|
dispatchChangeEvent(ctx: MachineContext): void;
|
|
1072
1072
|
getThumbOffset: (ctx: SharedContext) => string;
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var anatomy = (0, import_anatomy.createAnatomy)("slider").parts(
|
|
|
33
33
|
"root",
|
|
34
34
|
"label",
|
|
35
35
|
"thumb",
|
|
36
|
-
"
|
|
36
|
+
"hiddenInput",
|
|
37
37
|
"output",
|
|
38
38
|
"track",
|
|
39
39
|
"range",
|
|
@@ -640,7 +640,7 @@ var dom = defineDomHelpers({
|
|
|
640
640
|
var _a, _b;
|
|
641
641
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.control) != null ? _b : `slider:${ctx.id}:control`;
|
|
642
642
|
},
|
|
643
|
-
|
|
643
|
+
getHiddenInputId: (ctx) => `slider:${ctx.id}:input`,
|
|
644
644
|
getOutputId: (ctx) => {
|
|
645
645
|
var _a, _b;
|
|
646
646
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.output) != null ? _b : `slider:${ctx.id}:output`;
|
|
@@ -661,7 +661,7 @@ var dom = defineDomHelpers({
|
|
|
661
661
|
getRootEl: (ctx) => dom.getById(ctx, dom.getRootId(ctx)),
|
|
662
662
|
getThumbEl: (ctx) => dom.getById(ctx, dom.getThumbId(ctx)),
|
|
663
663
|
getControlEl: (ctx) => dom.getById(ctx, dom.getControlId(ctx)),
|
|
664
|
-
|
|
664
|
+
getHiddenInputEl: (ctx) => dom.getById(ctx, dom.getHiddenInputId(ctx)),
|
|
665
665
|
getValueFromPoint(ctx, point) {
|
|
666
666
|
const el = dom.getControlEl(ctx);
|
|
667
667
|
if (!el)
|
|
@@ -678,7 +678,7 @@ var dom = defineDomHelpers({
|
|
|
678
678
|
return utils.fromPercent(ctx, percent);
|
|
679
679
|
},
|
|
680
680
|
dispatchChangeEvent(ctx) {
|
|
681
|
-
const input = dom.
|
|
681
|
+
const input = dom.getHiddenInputEl(ctx);
|
|
682
682
|
if (!input)
|
|
683
683
|
return;
|
|
684
684
|
dispatchInputValueEvent(input, ctx.value);
|
|
@@ -733,7 +733,7 @@ function connect(state2, send, normalize) {
|
|
|
733
733
|
"data-invalid": dataAttr(isInvalid),
|
|
734
734
|
"data-focus": dataAttr(isFocused),
|
|
735
735
|
id: dom.getLabelId(state2.context),
|
|
736
|
-
htmlFor: dom.
|
|
736
|
+
htmlFor: dom.getHiddenInputId(state2.context),
|
|
737
737
|
onClick(event) {
|
|
738
738
|
var _a2;
|
|
739
739
|
if (!isInteractive)
|
|
@@ -818,13 +818,13 @@ function connect(state2, send, normalize) {
|
|
|
818
818
|
},
|
|
819
819
|
style: dom.getThumbStyle(state2.context)
|
|
820
820
|
}),
|
|
821
|
-
|
|
822
|
-
...parts.
|
|
821
|
+
hiddenInputProps: normalize.input({
|
|
822
|
+
...parts.hiddenInput.attrs,
|
|
823
823
|
type: "text",
|
|
824
824
|
defaultValue: state2.context.value,
|
|
825
825
|
name: state2.context.name,
|
|
826
826
|
form: state2.context.form,
|
|
827
|
-
id: dom.
|
|
827
|
+
id: dom.getHiddenInputId(state2.context),
|
|
828
828
|
hidden: true
|
|
829
829
|
}),
|
|
830
830
|
outputProps: normalize.output({
|
|
@@ -832,7 +832,7 @@ function connect(state2, send, normalize) {
|
|
|
832
832
|
"data-disabled": dataAttr(isDisabled),
|
|
833
833
|
"data-invalid": dataAttr(isInvalid),
|
|
834
834
|
id: dom.getOutputId(state2.context),
|
|
835
|
-
htmlFor: dom.
|
|
835
|
+
htmlFor: dom.getHiddenInputId(state2.context),
|
|
836
836
|
"aria-live": "off"
|
|
837
837
|
}),
|
|
838
838
|
trackProps: normalize.element({
|
|
@@ -1035,7 +1035,7 @@ function machine(userContext) {
|
|
|
1035
1035
|
},
|
|
1036
1036
|
activities: {
|
|
1037
1037
|
trackFormControlState(ctx2) {
|
|
1038
|
-
return trackFormControl(dom.
|
|
1038
|
+
return trackFormControl(dom.getHiddenInputEl(ctx2), {
|
|
1039
1039
|
onFieldsetDisabled() {
|
|
1040
1040
|
ctx2.disabled = true;
|
|
1041
1041
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var anatomy = createAnatomy("slider").parts(
|
|
|
4
4
|
"root",
|
|
5
5
|
"label",
|
|
6
6
|
"thumb",
|
|
7
|
-
"
|
|
7
|
+
"hiddenInput",
|
|
8
8
|
"output",
|
|
9
9
|
"track",
|
|
10
10
|
"range",
|
|
@@ -611,7 +611,7 @@ var dom = defineDomHelpers({
|
|
|
611
611
|
var _a, _b;
|
|
612
612
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.control) != null ? _b : `slider:${ctx.id}:control`;
|
|
613
613
|
},
|
|
614
|
-
|
|
614
|
+
getHiddenInputId: (ctx) => `slider:${ctx.id}:input`,
|
|
615
615
|
getOutputId: (ctx) => {
|
|
616
616
|
var _a, _b;
|
|
617
617
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.output) != null ? _b : `slider:${ctx.id}:output`;
|
|
@@ -632,7 +632,7 @@ var dom = defineDomHelpers({
|
|
|
632
632
|
getRootEl: (ctx) => dom.getById(ctx, dom.getRootId(ctx)),
|
|
633
633
|
getThumbEl: (ctx) => dom.getById(ctx, dom.getThumbId(ctx)),
|
|
634
634
|
getControlEl: (ctx) => dom.getById(ctx, dom.getControlId(ctx)),
|
|
635
|
-
|
|
635
|
+
getHiddenInputEl: (ctx) => dom.getById(ctx, dom.getHiddenInputId(ctx)),
|
|
636
636
|
getValueFromPoint(ctx, point) {
|
|
637
637
|
const el = dom.getControlEl(ctx);
|
|
638
638
|
if (!el)
|
|
@@ -649,7 +649,7 @@ var dom = defineDomHelpers({
|
|
|
649
649
|
return utils.fromPercent(ctx, percent);
|
|
650
650
|
},
|
|
651
651
|
dispatchChangeEvent(ctx) {
|
|
652
|
-
const input = dom.
|
|
652
|
+
const input = dom.getHiddenInputEl(ctx);
|
|
653
653
|
if (!input)
|
|
654
654
|
return;
|
|
655
655
|
dispatchInputValueEvent(input, ctx.value);
|
|
@@ -704,7 +704,7 @@ function connect(state2, send, normalize) {
|
|
|
704
704
|
"data-invalid": dataAttr(isInvalid),
|
|
705
705
|
"data-focus": dataAttr(isFocused),
|
|
706
706
|
id: dom.getLabelId(state2.context),
|
|
707
|
-
htmlFor: dom.
|
|
707
|
+
htmlFor: dom.getHiddenInputId(state2.context),
|
|
708
708
|
onClick(event) {
|
|
709
709
|
var _a2;
|
|
710
710
|
if (!isInteractive)
|
|
@@ -789,13 +789,13 @@ function connect(state2, send, normalize) {
|
|
|
789
789
|
},
|
|
790
790
|
style: dom.getThumbStyle(state2.context)
|
|
791
791
|
}),
|
|
792
|
-
|
|
793
|
-
...parts.
|
|
792
|
+
hiddenInputProps: normalize.input({
|
|
793
|
+
...parts.hiddenInput.attrs,
|
|
794
794
|
type: "text",
|
|
795
795
|
defaultValue: state2.context.value,
|
|
796
796
|
name: state2.context.name,
|
|
797
797
|
form: state2.context.form,
|
|
798
|
-
id: dom.
|
|
798
|
+
id: dom.getHiddenInputId(state2.context),
|
|
799
799
|
hidden: true
|
|
800
800
|
}),
|
|
801
801
|
outputProps: normalize.output({
|
|
@@ -803,7 +803,7 @@ function connect(state2, send, normalize) {
|
|
|
803
803
|
"data-disabled": dataAttr(isDisabled),
|
|
804
804
|
"data-invalid": dataAttr(isInvalid),
|
|
805
805
|
id: dom.getOutputId(state2.context),
|
|
806
|
-
htmlFor: dom.
|
|
806
|
+
htmlFor: dom.getHiddenInputId(state2.context),
|
|
807
807
|
"aria-live": "off"
|
|
808
808
|
}),
|
|
809
809
|
trackProps: normalize.element({
|
|
@@ -1006,7 +1006,7 @@ function machine(userContext) {
|
|
|
1006
1006
|
},
|
|
1007
1007
|
activities: {
|
|
1008
1008
|
trackFormControlState(ctx2) {
|
|
1009
|
-
return trackFormControl(dom.
|
|
1009
|
+
return trackFormControl(dom.getHiddenInputEl(ctx2), {
|
|
1010
1010
|
onFieldsetDisabled() {
|
|
1011
1011
|
ctx2.disabled = true;
|
|
1012
1012
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/slider",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Core logic for the slider widget implemented as a state machine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zag-js/anatomy": "0.1.1",
|
|
33
|
-
"@zag-js/core": "0.2.
|
|
33
|
+
"@zag-js/core": "0.2.3",
|
|
34
34
|
"@zag-js/element-size": "0.3.0",
|
|
35
35
|
"@zag-js/types": "0.3.1"
|
|
36
36
|
},
|