@zag-js/tabs 0.0.0-dev-20230504153240 → 0.0.0-dev-20230504202256
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.
|
@@ -184,7 +184,7 @@ function machine(userContext) {
|
|
|
184
184
|
});
|
|
185
185
|
},
|
|
186
186
|
cleanupObserver(ctx2) {
|
|
187
|
-
ctx2.
|
|
187
|
+
ctx2.indicatorCleanup?.();
|
|
188
188
|
},
|
|
189
189
|
enableIndicatorTransition(ctx2) {
|
|
190
190
|
ctx2.canIndicatorTransition = true;
|
|
@@ -202,14 +202,14 @@ function machine(userContext) {
|
|
|
202
202
|
});
|
|
203
203
|
},
|
|
204
204
|
syncIndicatorRect(ctx2) {
|
|
205
|
-
ctx2.
|
|
205
|
+
ctx2.indicatorCleanup?.();
|
|
206
206
|
const value = ctx2.value;
|
|
207
207
|
if (!ctx2.isIndicatorRendered || !value)
|
|
208
208
|
return;
|
|
209
209
|
const tabEl = dom.getActiveTabEl(ctx2);
|
|
210
210
|
if (!tabEl)
|
|
211
211
|
return;
|
|
212
|
-
ctx2.
|
|
212
|
+
ctx2.indicatorCleanup = trackElementRect(tabEl, {
|
|
213
213
|
getRect(el) {
|
|
214
214
|
return dom.getOffsetRect(el);
|
|
215
215
|
},
|
package/dist/index.js
CHANGED
|
@@ -426,7 +426,7 @@ function machine(userContext) {
|
|
|
426
426
|
});
|
|
427
427
|
},
|
|
428
428
|
cleanupObserver(ctx2) {
|
|
429
|
-
ctx2.
|
|
429
|
+
ctx2.indicatorCleanup?.();
|
|
430
430
|
},
|
|
431
431
|
enableIndicatorTransition(ctx2) {
|
|
432
432
|
ctx2.canIndicatorTransition = true;
|
|
@@ -444,14 +444,14 @@ function machine(userContext) {
|
|
|
444
444
|
});
|
|
445
445
|
},
|
|
446
446
|
syncIndicatorRect(ctx2) {
|
|
447
|
-
ctx2.
|
|
447
|
+
ctx2.indicatorCleanup?.();
|
|
448
448
|
const value = ctx2.value;
|
|
449
449
|
if (!ctx2.isIndicatorRendered || !value)
|
|
450
450
|
return;
|
|
451
451
|
const tabEl = dom.getActiveTabEl(ctx2);
|
|
452
452
|
if (!tabEl)
|
|
453
453
|
return;
|
|
454
|
-
ctx2.
|
|
454
|
+
ctx2.indicatorCleanup = (0, import_element_rect.trackElementRect)(tabEl, {
|
|
455
455
|
getRect(el) {
|
|
456
456
|
return dom.getOffsetRect(el);
|
|
457
457
|
},
|
package/dist/index.mjs
CHANGED
package/dist/tabs.machine.js
CHANGED
|
@@ -261,7 +261,7 @@ function machine(userContext) {
|
|
|
261
261
|
});
|
|
262
262
|
},
|
|
263
263
|
cleanupObserver(ctx2) {
|
|
264
|
-
ctx2.
|
|
264
|
+
ctx2.indicatorCleanup?.();
|
|
265
265
|
},
|
|
266
266
|
enableIndicatorTransition(ctx2) {
|
|
267
267
|
ctx2.canIndicatorTransition = true;
|
|
@@ -279,14 +279,14 @@ function machine(userContext) {
|
|
|
279
279
|
});
|
|
280
280
|
},
|
|
281
281
|
syncIndicatorRect(ctx2) {
|
|
282
|
-
ctx2.
|
|
282
|
+
ctx2.indicatorCleanup?.();
|
|
283
283
|
const value = ctx2.value;
|
|
284
284
|
if (!ctx2.isIndicatorRendered || !value)
|
|
285
285
|
return;
|
|
286
286
|
const tabEl = dom.getActiveTabEl(ctx2);
|
|
287
287
|
if (!tabEl)
|
|
288
288
|
return;
|
|
289
|
-
ctx2.
|
|
289
|
+
ctx2.indicatorCleanup = (0, import_element_rect.trackElementRect)(tabEl, {
|
|
290
290
|
getRect(el) {
|
|
291
291
|
return dom.getOffsetRect(el);
|
|
292
292
|
},
|
package/dist/tabs.machine.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tabs",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230504202256",
|
|
4
4
|
"description": "Core logic for the tabs widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@zag-js/anatomy": "0.1.4",
|
|
30
30
|
"@zag-js/dom-query": "0.1.4",
|
|
31
|
-
"@zag-js/dom-event": "0.0.0-dev-
|
|
32
|
-
"@zag-js/element-rect": "0.0.0-dev-
|
|
33
|
-
"@zag-js/tabbable": "0.0.0-dev-
|
|
31
|
+
"@zag-js/dom-event": "0.0.0-dev-20230504202256",
|
|
32
|
+
"@zag-js/element-rect": "0.0.0-dev-20230504202256",
|
|
33
|
+
"@zag-js/tabbable": "0.0.0-dev-20230504202256",
|
|
34
34
|
"@zag-js/utils": "0.3.4",
|
|
35
35
|
"@zag-js/core": "0.7.0",
|
|
36
36
|
"@zag-js/types": "0.5.0"
|