@zag-js/tabs 1.8.0 → 1.8.2
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.js +10 -9
- package/dist/index.mjs +11 -10
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -489,15 +489,16 @@ var machine = core.createMachine({
|
|
|
489
489
|
const triggerEl = getTriggerEl(scope, value);
|
|
490
490
|
const indicatorEl = getIndicatorEl(scope);
|
|
491
491
|
if (!triggerEl || !indicatorEl) return;
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
492
|
+
const indicatorCleanup = domQuery.trackElementRect([triggerEl], {
|
|
493
|
+
measure(el) {
|
|
494
|
+
return getOffsetRect(el);
|
|
495
|
+
},
|
|
496
|
+
onEntry({ rects }) {
|
|
497
|
+
const [rect] = rects;
|
|
498
|
+
context.set("indicatorRect", resolveRect(rect));
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
refs.set("indicatorCleanup", indicatorCleanup);
|
|
501
502
|
},
|
|
502
503
|
navigateIfNeeded({ context, prop, scope }) {
|
|
503
504
|
const value = context.get("value");
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAnatomy } from '@zag-js/anatomy';
|
|
2
|
-
import { isAnchorElement, nextTick, raf, getFocusables, prevById, nextById, clickIfLink, itemById, queryAll, dataAttr, isSafari, isSelfTarget, isComposingEvent, getEventKey } from '@zag-js/dom-query';
|
|
2
|
+
import { isAnchorElement, trackElementRect, nextTick, raf, getFocusables, prevById, nextById, clickIfLink, itemById, queryAll, dataAttr, isSafari, isSelfTarget, isComposingEvent, getEventKey } from '@zag-js/dom-query';
|
|
3
3
|
import { last, first, createSplitProps } from '@zag-js/utils';
|
|
4
4
|
import { createGuards, createMachine } from '@zag-js/core';
|
|
5
5
|
import { createProps } from '@zag-js/types';
|
|
@@ -487,15 +487,16 @@ var machine = createMachine({
|
|
|
487
487
|
const triggerEl = getTriggerEl(scope, value);
|
|
488
488
|
const indicatorEl = getIndicatorEl(scope);
|
|
489
489
|
if (!triggerEl || !indicatorEl) return;
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
490
|
+
const indicatorCleanup = trackElementRect([triggerEl], {
|
|
491
|
+
measure(el) {
|
|
492
|
+
return getOffsetRect(el);
|
|
493
|
+
},
|
|
494
|
+
onEntry({ rects }) {
|
|
495
|
+
const [rect] = rects;
|
|
496
|
+
context.set("indicatorRect", resolveRect(rect));
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
refs.set("indicatorCleanup", indicatorCleanup);
|
|
499
500
|
},
|
|
500
501
|
navigateIfNeeded({ context, prop, scope }) {
|
|
501
502
|
const value = context.get("value");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tabs",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Core logic for the tabs widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "1.8.
|
|
30
|
-
"@zag-js/dom-query": "1.8.
|
|
31
|
-
"@zag-js/
|
|
32
|
-
"@zag-js/
|
|
33
|
-
"@zag-js/
|
|
34
|
-
"@zag-js/types": "1.8.0"
|
|
29
|
+
"@zag-js/anatomy": "1.8.2",
|
|
30
|
+
"@zag-js/dom-query": "1.8.2",
|
|
31
|
+
"@zag-js/utils": "1.8.2",
|
|
32
|
+
"@zag-js/core": "1.8.2",
|
|
33
|
+
"@zag-js/types": "1.8.2"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"clean-package": "2.2.0"
|