@zag-js/tabs 0.6.0 → 0.7.0

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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-S2KW2DT4.mjs";
4
4
  import {
5
5
  dom
6
- } from "./chunk-5ZMNIWHF.mjs";
6
+ } from "./chunk-OUTOSCZW.mjs";
7
7
 
8
8
  // src/tabs.connect.ts
9
9
  import { getEventKey } from "@zag-js/dom-event";
@@ -7,7 +7,7 @@ var dom = createScope({
7
7
  getContentId: (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`,
8
8
  getContentGroupId: (ctx) => ctx.ids?.contentGroup ?? `tabs:${ctx.id}:content-group`,
9
9
  getTriggerId: (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`,
10
- getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
10
+ getIndicatorId: (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`,
11
11
  getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
12
12
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
13
13
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dom
3
- } from "./chunk-5ZMNIWHF.mjs";
3
+ } from "./chunk-OUTOSCZW.mjs";
4
4
 
5
5
  // src/tabs.machine.ts
6
6
  import { createMachine, guards } from "@zag-js/core";
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var dom = (0, import_dom_query.createScope)({
44
44
  getContentId: (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`,
45
45
  getContentGroupId: (ctx) => ctx.ids?.contentGroup ?? `tabs:${ctx.id}:content-group`,
46
46
  getTriggerId: (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`,
47
- getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
47
+ getIndicatorId: (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`,
48
48
  getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
49
49
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
50
50
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-5JW3YJ3I.mjs";
3
+ } from "./chunk-FPHYRUCF.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-S2KW2DT4.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-JG2VX4ST.mjs";
10
- import "./chunk-5ZMNIWHF.mjs";
9
+ } from "./chunk-PH44XJ2S.mjs";
10
+ import "./chunk-OUTOSCZW.mjs";
11
11
  export {
12
12
  anatomy,
13
13
  connect,
@@ -40,7 +40,7 @@ var dom = (0, import_dom_query.createScope)({
40
40
  getContentId: (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`,
41
41
  getContentGroupId: (ctx) => ctx.ids?.contentGroup ?? `tabs:${ctx.id}:content-group`,
42
42
  getTriggerId: (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`,
43
- getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
43
+ getIndicatorId: (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`,
44
44
  getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
45
45
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
46
46
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-5JW3YJ3I.mjs";
3
+ } from "./chunk-FPHYRUCF.mjs";
4
4
  import "./chunk-S2KW2DT4.mjs";
5
- import "./chunk-5ZMNIWHF.mjs";
5
+ import "./chunk-OUTOSCZW.mjs";
6
6
  export {
7
7
  connect
8
8
  };
package/dist/tabs.dom.js CHANGED
@@ -31,7 +31,7 @@ var dom = (0, import_dom_query.createScope)({
31
31
  getContentId: (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`,
32
32
  getContentGroupId: (ctx) => ctx.ids?.contentGroup ?? `tabs:${ctx.id}:content-group`,
33
33
  getTriggerId: (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`,
34
- getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
34
+ getIndicatorId: (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`,
35
35
  getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
36
36
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
37
37
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
package/dist/tabs.dom.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dom
3
- } from "./chunk-5ZMNIWHF.mjs";
3
+ } from "./chunk-OUTOSCZW.mjs";
4
4
  export {
5
5
  dom
6
6
  };
@@ -37,7 +37,7 @@ var dom = (0, import_dom_query.createScope)({
37
37
  getContentId: (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`,
38
38
  getContentGroupId: (ctx) => ctx.ids?.contentGroup ?? `tabs:${ctx.id}:content-group`,
39
39
  getTriggerId: (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`,
40
- getIndicatorId: (ctx) => `tabs:${ctx.id}:indicator`,
40
+ getIndicatorId: (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`,
41
41
  getTablistEl: (ctx) => dom.getById(ctx, dom.getTablistId(ctx)),
42
42
  getContentEl: (ctx, id) => dom.getById(ctx, dom.getContentId(ctx, id)),
43
43
  getTriggerEl: (ctx, id) => dom.getById(ctx, dom.getTriggerId(ctx, id)),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-JG2VX4ST.mjs";
4
- import "./chunk-5ZMNIWHF.mjs";
3
+ } from "./chunk-PH44XJ2S.mjs";
4
+ import "./chunk-OUTOSCZW.mjs";
5
5
  export {
6
6
  machine
7
7
  };
@@ -10,6 +10,7 @@ type ElementIds = Partial<{
10
10
  tablist: string;
11
11
  contentGroup: string;
12
12
  content: string;
13
+ indicator: string;
13
14
  }>;
14
15
  type PublicContext = DirectionProperty & CommonProperties & {
15
16
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -31,7 +31,7 @@
31
31
  "@zag-js/dom-event": "0.6.0",
32
32
  "@zag-js/tabbable": "0.1.1",
33
33
  "@zag-js/utils": "0.3.4",
34
- "@zag-js/core": "0.5.0",
34
+ "@zag-js/core": "0.7.0",
35
35
  "@zag-js/types": "0.5.0"
36
36
  },
37
37
  "devDependencies": {