@zag-js/tabs 0.0.0-dev-20230222120620 → 0.0.0-dev-20230222181847

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.
@@ -12,12 +12,27 @@ function connect(state, send, normalize) {
12
12
  const translations = state.context.translations;
13
13
  const isFocused = state.matches("focused");
14
14
  return {
15
+ /**
16
+ * The current value of the tabs.
17
+ */
15
18
  value: state.context.value,
19
+ /**
20
+ * The value of the tab that is currently focused.
21
+ */
16
22
  focusedValue: state.context.focusedValue,
23
+ /**
24
+ * The previous values of the tabs in sequence of selection.
25
+ */
17
26
  previousValues: Array.from(state.context.previousValues),
27
+ /**
28
+ * Sets the value of the tabs.
29
+ */
18
30
  setValue(value) {
19
31
  send({ type: "SET_VALUE", value });
20
32
  },
33
+ /**
34
+ * Clears the value of the tabs.
35
+ */
21
36
  clearValue() {
22
37
  send({ type: "CLEAR_VALUE" });
23
38
  },
package/dist/index.js CHANGED
@@ -90,12 +90,27 @@ function connect(state, send, normalize) {
90
90
  const translations = state.context.translations;
91
91
  const isFocused = state.matches("focused");
92
92
  return {
93
+ /**
94
+ * The current value of the tabs.
95
+ */
93
96
  value: state.context.value,
97
+ /**
98
+ * The value of the tab that is currently focused.
99
+ */
94
100
  focusedValue: state.context.focusedValue,
101
+ /**
102
+ * The previous values of the tabs in sequence of selection.
103
+ */
95
104
  previousValues: Array.from(state.context.previousValues),
105
+ /**
106
+ * Sets the value of the tabs.
107
+ */
96
108
  setValue(value) {
97
109
  send({ type: "SET_VALUE", value });
98
110
  },
111
+ /**
112
+ * Clears the value of the tabs.
113
+ */
99
114
  clearValue() {
100
115
  send({ type: "CLEAR_VALUE" });
101
116
  },
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-MMG5KHSN.mjs";
3
+ } from "./chunk-5JW3YJ3I.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-S2KW2DT4.mjs";
@@ -3,10 +3,25 @@ import { State, Send, TabProps } from './tabs.types.js';
3
3
  import '@zag-js/core';
4
4
 
5
5
  declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
6
+ /**
7
+ * The current value of the tabs.
8
+ */
6
9
  value: string | null;
10
+ /**
11
+ * The value of the tab that is currently focused.
12
+ */
7
13
  focusedValue: string | null;
14
+ /**
15
+ * The previous values of the tabs in sequence of selection.
16
+ */
8
17
  previousValues: string[];
18
+ /**
19
+ * Sets the value of the tabs.
20
+ */
9
21
  setValue(value: string): void;
22
+ /**
23
+ * Clears the value of the tabs.
24
+ */
10
25
  clearValue(): void;
11
26
  rootProps: T["element"];
12
27
  tablistProps: T["element"];
@@ -86,12 +86,27 @@ function connect(state, send, normalize) {
86
86
  const translations = state.context.translations;
87
87
  const isFocused = state.matches("focused");
88
88
  return {
89
+ /**
90
+ * The current value of the tabs.
91
+ */
89
92
  value: state.context.value,
93
+ /**
94
+ * The value of the tab that is currently focused.
95
+ */
90
96
  focusedValue: state.context.focusedValue,
97
+ /**
98
+ * The previous values of the tabs in sequence of selection.
99
+ */
91
100
  previousValues: Array.from(state.context.previousValues),
101
+ /**
102
+ * Sets the value of the tabs.
103
+ */
92
104
  setValue(value) {
93
105
  send({ type: "SET_VALUE", value });
94
106
  },
107
+ /**
108
+ * Clears the value of the tabs.
109
+ */
95
110
  clearValue() {
96
111
  send({ type: "CLEAR_VALUE" });
97
112
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-MMG5KHSN.mjs";
3
+ } from "./chunk-5JW3YJ3I.mjs";
4
4
  import "./chunk-S2KW2DT4.mjs";
5
5
  import "./chunk-5ZMNIWHF.mjs";
6
6
  export {
@@ -25,10 +25,6 @@ type PublicContext = DirectionProperty & CommonProperties & {
25
25
  * @default true
26
26
  */
27
27
  loop: boolean;
28
- /**
29
- * Whether the indicator is rendered.
30
- */
31
- isIndicatorRendered: boolean;
32
28
  /**
33
29
  * The selected tab id
34
30
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "0.0.0-dev-20230222120620",
3
+ "version": "0.0.0-dev-20230222181847",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@zag-js/anatomy": "0.1.4",
30
- "@zag-js/dom-query": "0.0.0-dev-20230222120620",
31
- "@zag-js/dom-event": "0.0.0-dev-20230222120620",
32
- "@zag-js/tabbable": "0.0.0-dev-20230222120620",
30
+ "@zag-js/dom-query": "0.0.0-dev-20230222181847",
31
+ "@zag-js/dom-event": "0.0.0-dev-20230222181847",
32
+ "@zag-js/tabbable": "0.0.0-dev-20230222181847",
33
33
  "@zag-js/utils": "0.3.3",
34
- "@zag-js/core": "0.0.0-dev-20230222120620",
34
+ "@zag-js/core": "0.0.0-dev-20230222181847",
35
35
  "@zag-js/types": "0.3.4"
36
36
  },
37
37
  "devDependencies": {