@zag-js/tabs 2.0.0-next.2 → 2.0.0-next.4
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.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +16 -38
- package/dist/index.mjs +2 -7
- package/dist/tabs.anatomy.d.mts +2 -6
- package/dist/tabs.anatomy.d.ts +2 -6
- package/dist/tabs.anatomy.js +8 -33
- package/dist/tabs.anatomy.mjs +4 -7
- package/dist/tabs.connect.d.mts +4 -7
- package/dist/tabs.connect.d.ts +4 -7
- package/dist/tabs.connect.js +253 -231
- package/dist/tabs.connect.mjs +249 -204
- package/dist/tabs.dom.d.mts +27 -33
- package/dist/tabs.dom.d.ts +27 -33
- package/dist/tabs.dom.js +77 -84
- package/dist/tabs.dom.mjs +57 -44
- package/dist/tabs.machine.d.mts +2 -7
- package/dist/tabs.machine.d.ts +2 -7
- package/dist/tabs.machine.js +301 -329
- package/dist/tabs.machine.mjs +298 -294
- package/dist/tabs.props.d.mts +7 -12
- package/dist/tabs.props.d.ts +7 -12
- package/dist/tabs.props.js +33 -61
- package/dist/tabs.props.mjs +24 -31
- package/dist/tabs.types.d.mts +252 -194
- package/dist/tabs.types.d.ts +252 -194
- package/dist/tabs.types.js +4 -18
- package/dist/tabs.types.mjs +1 -0
- package/package.json +7 -7
package/dist/tabs.props.js
CHANGED
|
@@ -1,63 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/tabs.props.ts
|
|
21
|
-
var tabs_props_exports = {};
|
|
22
|
-
__export(tabs_props_exports, {
|
|
23
|
-
contentProps: () => contentProps,
|
|
24
|
-
props: () => props,
|
|
25
|
-
splitContentProps: () => splitContentProps,
|
|
26
|
-
splitProps: () => splitProps,
|
|
27
|
-
splitTriggerProps: () => splitTriggerProps,
|
|
28
|
-
triggerProps: () => triggerProps
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
29
4
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
5
|
+
let _zag_js_utils = require("@zag-js/utils");
|
|
6
|
+
let _zag_js_types = require("@zag-js/types");
|
|
7
|
+
// src/tabs.props.ts
|
|
8
|
+
const props = (0, _zag_js_types.createProps)()([
|
|
9
|
+
"activationMode",
|
|
10
|
+
"virtualFocus",
|
|
11
|
+
"deselectable",
|
|
12
|
+
"dir",
|
|
13
|
+
"getRootNode",
|
|
14
|
+
"id",
|
|
15
|
+
"ids",
|
|
16
|
+
"loopFocus",
|
|
17
|
+
"navigate",
|
|
18
|
+
"onFocusChange",
|
|
19
|
+
"onValueChange",
|
|
20
|
+
"orientation",
|
|
21
|
+
"translations",
|
|
22
|
+
"value",
|
|
23
|
+
"defaultValue"
|
|
49
24
|
]);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
splitTriggerProps,
|
|
62
|
-
triggerProps
|
|
63
|
-
});
|
|
25
|
+
const splitProps = (0, _zag_js_utils.createSplitProps)(props);
|
|
26
|
+
const triggerProps = (0, _zag_js_types.createProps)()(["disabled", "value"]);
|
|
27
|
+
const splitTriggerProps = (0, _zag_js_utils.createSplitProps)(triggerProps);
|
|
28
|
+
const contentProps = (0, _zag_js_types.createProps)()(["value"]);
|
|
29
|
+
const splitContentProps = (0, _zag_js_utils.createSplitProps)(contentProps);
|
|
30
|
+
exports.contentProps = contentProps;
|
|
31
|
+
exports.props = props;
|
|
32
|
+
exports.splitContentProps = splitContentProps;
|
|
33
|
+
exports.splitProps = splitProps;
|
|
34
|
+
exports.splitTriggerProps = splitTriggerProps;
|
|
35
|
+
exports.triggerProps = triggerProps;
|
package/dist/tabs.props.mjs
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
// src/tabs.props.ts
|
|
2
|
-
import { createProps } from "@zag-js/types";
|
|
3
1
|
import { createSplitProps } from "@zag-js/utils";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { createProps } from "@zag-js/types";
|
|
3
|
+
// src/tabs.props.ts
|
|
4
|
+
const props = createProps()([
|
|
5
|
+
"activationMode",
|
|
6
|
+
"virtualFocus",
|
|
7
|
+
"deselectable",
|
|
8
|
+
"dir",
|
|
9
|
+
"getRootNode",
|
|
10
|
+
"id",
|
|
11
|
+
"ids",
|
|
12
|
+
"loopFocus",
|
|
13
|
+
"navigate",
|
|
14
|
+
"onFocusChange",
|
|
15
|
+
"onValueChange",
|
|
16
|
+
"orientation",
|
|
17
|
+
"translations",
|
|
18
|
+
"value",
|
|
19
|
+
"defaultValue"
|
|
20
20
|
]);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
contentProps,
|
|
28
|
-
props,
|
|
29
|
-
splitContentProps,
|
|
30
|
-
splitProps,
|
|
31
|
-
splitTriggerProps,
|
|
32
|
-
triggerProps
|
|
33
|
-
};
|
|
21
|
+
const splitProps = createSplitProps(props);
|
|
22
|
+
const triggerProps = createProps()(["disabled", "value"]);
|
|
23
|
+
const splitTriggerProps = createSplitProps(triggerProps);
|
|
24
|
+
const contentProps = createProps()(["value"]);
|
|
25
|
+
const splitContentProps = createSplitProps(contentProps);
|
|
26
|
+
export { contentProps, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };
|
package/dist/tabs.types.d.mts
CHANGED
|
@@ -1,207 +1,265 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AnimationFrame } from "@zag-js/dom-query";
|
|
2
|
+
import { EventObject, Machine, Service } from "@zag-js/core";
|
|
3
|
+
import { ActivationDirection, CommonProperties, DirectionProperty, PropTypes, Rect } from "@zag-js/types";
|
|
4
|
+
/**
|
|
5
|
+
* What changed the selected tab:
|
|
6
|
+
* - `trigger-click`: a tab trigger was pressed
|
|
7
|
+
* - `keyboard`: an arrow, `Home` or `End` key moved focus and selected the tab (automatic activation)
|
|
8
|
+
* - `script`: `setValue`, `clearValue`, `selectNext` or `selectPrevious` was called
|
|
9
|
+
*/
|
|
10
|
+
export type ValueChangeReason = "trigger-click" | "keyboard" | "script";
|
|
11
|
+
export interface ValueChangeDetails {
|
|
12
|
+
/** `null` when a `deselectable` tab is deselected */
|
|
13
|
+
value: string | null;
|
|
14
|
+
/** Where the selected tab sits relative to the previous one */
|
|
15
|
+
activationDirection: ActivationDirection;
|
|
16
|
+
/** What changed the selected tab */
|
|
17
|
+
reason?: ValueChangeReason | undefined;
|
|
6
18
|
}
|
|
7
|
-
interface FocusChangeDetails {
|
|
8
|
-
|
|
19
|
+
export interface FocusChangeDetails {
|
|
20
|
+
/** `null` when focus leaves the tab list */
|
|
21
|
+
focusedValue: string | null;
|
|
9
22
|
}
|
|
10
|
-
interface NavigateDetails {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
export interface NavigateDetails {
|
|
24
|
+
value: string;
|
|
25
|
+
node: HTMLAnchorElement;
|
|
26
|
+
href: string;
|
|
14
27
|
}
|
|
15
|
-
interface IntlTranslations {
|
|
16
|
-
|
|
28
|
+
export interface IntlTranslations {
|
|
29
|
+
listLabel?: string | undefined;
|
|
17
30
|
}
|
|
18
|
-
interface ElementIds {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
export interface ElementIds {
|
|
32
|
+
root?: string | undefined;
|
|
33
|
+
trigger?: ((value: string) => string) | undefined;
|
|
34
|
+
list?: string | undefined;
|
|
35
|
+
content?: ((value: string) => string) | undefined;
|
|
36
|
+
indicator?: string | undefined;
|
|
24
37
|
}
|
|
25
|
-
interface TabsProps extends DirectionProperty, CommonProperties {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
38
|
+
export interface TabsProps extends DirectionProperty, CommonProperties {
|
|
39
|
+
/**
|
|
40
|
+
* The ids of the elements in the tabs. Useful for composition.
|
|
41
|
+
*/
|
|
42
|
+
ids?: ElementIds | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the localized strings that identifies the accessibility elements and their states
|
|
45
|
+
*/
|
|
46
|
+
translations?: IntlTranslations | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the keyboard navigation will loop from last tab to first, and vice versa.
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
loopFocus?: boolean | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The controlled selected tab value
|
|
54
|
+
*/
|
|
55
|
+
value?: string | null | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The initial selected tab value when rendered.
|
|
58
|
+
* Use when you don't need to control the selected tab value.
|
|
59
|
+
*/
|
|
60
|
+
defaultValue?: string | null | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The orientation of the tabs. Can be `horizontal` or `vertical`
|
|
63
|
+
* - `horizontal`: only left and right arrow key navigation will work.
|
|
64
|
+
* - `vertical`: only up and down arrow key navigation will work.
|
|
65
|
+
*
|
|
66
|
+
* @default "horizontal"
|
|
67
|
+
*/
|
|
68
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* The activation mode of the tabs. Can be `manual` or `automatic`
|
|
71
|
+
* - `manual`: Tabs are activated when clicked or press `enter` key.
|
|
72
|
+
* - `automatic`: Tabs are activated when receiving focus
|
|
73
|
+
*
|
|
74
|
+
* @default "automatic"
|
|
75
|
+
*/
|
|
76
|
+
activationMode?: "manual" | "automatic" | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Callback to be called when the selected/active tab changes
|
|
79
|
+
*/
|
|
80
|
+
onValueChange?: ((details: ValueChangeDetails) => void) | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Callback to be called when the focused tab changes
|
|
83
|
+
*/
|
|
84
|
+
onFocusChange?: ((details: FocusChangeDetails) => void) | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the tabs use virtual focus instead of roving tabindex.
|
|
87
|
+
*
|
|
88
|
+
* When `true`, triggers receive no DOM focus — arrow keys update `focusedValue`
|
|
89
|
+
* and all triggers remain `tabIndex: -1`. Useful when tabs live inside another
|
|
90
|
+
* widget that manages focus (e.g. a combobox).
|
|
91
|
+
*
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
virtualFocus?: boolean | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the active tab can be deselected when clicking on it.
|
|
97
|
+
*/
|
|
98
|
+
deselectable?: boolean | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Function to navigate to the selected tab when clicking on it.
|
|
101
|
+
* Useful if tab triggers are anchor elements.
|
|
102
|
+
*/
|
|
103
|
+
navigate?: ((details: NavigateDetails) => void) | null | undefined;
|
|
91
104
|
}
|
|
92
105
|
type PropsWithDefault = "orientation" | "activationMode" | "loopFocus";
|
|
93
|
-
type TabsSchema = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
export type TabsSchema = {
|
|
107
|
+
state: "idle" | "focused";
|
|
108
|
+
props: TabsProps;
|
|
109
|
+
defaultPropKey: PropsWithDefault;
|
|
110
|
+
context: {
|
|
111
|
+
ssr: boolean;
|
|
112
|
+
value: string | null;
|
|
113
|
+
focusedValue: string | null;
|
|
114
|
+
indicatorRect: Rect | null;
|
|
115
|
+
indicatorInstant: boolean;
|
|
116
|
+
tabStopValue: string | null;
|
|
117
|
+
hasFocusableContent: boolean;
|
|
118
|
+
activationDirection: ActivationDirection;
|
|
119
|
+
};
|
|
120
|
+
refs: {
|
|
121
|
+
indicatorCleanup: VoidFunction | null | undefined;
|
|
122
|
+
indicatorFrame: AnimationFrame;
|
|
123
|
+
focusFrame: AnimationFrame;
|
|
124
|
+
selectFrame: AnimationFrame;
|
|
125
|
+
tabIndexFrame: AnimationFrame;
|
|
126
|
+
directionFrame: AnimationFrame;
|
|
127
|
+
previousValue: string | null;
|
|
128
|
+
};
|
|
129
|
+
computed: {
|
|
130
|
+
activationDirection: ActivationDirection;
|
|
131
|
+
};
|
|
132
|
+
action: string;
|
|
133
|
+
guard: string;
|
|
134
|
+
effect: string;
|
|
135
|
+
event: EventObject & {
|
|
136
|
+
src?: ValueChangeReason | undefined;
|
|
137
|
+
};
|
|
115
138
|
};
|
|
116
|
-
type TabsService = Service<TabsSchema>;
|
|
117
|
-
type TabsMachine = Machine<TabsSchema>;
|
|
118
|
-
interface TriggerProps {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
139
|
+
export type TabsService = Service<TabsSchema>;
|
|
140
|
+
export type TabsMachine = Machine<TabsSchema>;
|
|
141
|
+
export interface TriggerProps {
|
|
142
|
+
/**
|
|
143
|
+
* The value of the tab
|
|
144
|
+
*/
|
|
145
|
+
value: string;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the tab is disabled
|
|
148
|
+
*/
|
|
149
|
+
disabled?: boolean | undefined;
|
|
127
150
|
}
|
|
128
|
-
interface TriggerState {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
export interface TriggerState {
|
|
152
|
+
/**
|
|
153
|
+
* Whether the tab is selected
|
|
154
|
+
*/
|
|
155
|
+
selected: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Whether the tab is focused
|
|
158
|
+
*/
|
|
159
|
+
focused: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the tab is disabled
|
|
162
|
+
*/
|
|
163
|
+
disabled: boolean;
|
|
141
164
|
}
|
|
142
|
-
interface ContentProps {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
165
|
+
export interface ContentProps {
|
|
166
|
+
/**
|
|
167
|
+
* The value of the tab
|
|
168
|
+
*/
|
|
169
|
+
value: string;
|
|
147
170
|
}
|
|
148
|
-
interface
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
171
|
+
export interface RootState {
|
|
172
|
+
/**
|
|
173
|
+
* Whether a tab trigger has focus
|
|
174
|
+
*/
|
|
175
|
+
focused: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* The orientation of the tabs
|
|
178
|
+
*/
|
|
179
|
+
orientation: "horizontal" | "vertical";
|
|
180
|
+
/**
|
|
181
|
+
* Where the selected tab sits relative to the previously selected one
|
|
182
|
+
*/
|
|
183
|
+
activationDirection: ActivationDirection;
|
|
153
184
|
}
|
|
154
|
-
interface
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
185
|
+
export interface ContentState extends RootState {
|
|
186
|
+
/**
|
|
187
|
+
* Whether the tab content is selected
|
|
188
|
+
*/
|
|
189
|
+
selected: boolean;
|
|
190
|
+
}
|
|
191
|
+
export interface IndicatorState extends RootState {
|
|
192
|
+
/**
|
|
193
|
+
* Whether the indicator has a measured rect to point to
|
|
194
|
+
*/
|
|
195
|
+
visible: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Whether the indicator should snap into place instead of animating
|
|
198
|
+
*/
|
|
199
|
+
instant: boolean;
|
|
200
|
+
}
|
|
201
|
+
export interface TabsApi<T extends PropTypes = PropTypes> {
|
|
202
|
+
/**
|
|
203
|
+
* The current value of the tabs.
|
|
204
|
+
*/
|
|
205
|
+
value: string | null;
|
|
206
|
+
/**
|
|
207
|
+
* The value of the tab that is currently focused.
|
|
208
|
+
*/
|
|
209
|
+
focusedValue: string | null;
|
|
210
|
+
/**
|
|
211
|
+
* Where the selected tab sits relative to the previously selected one
|
|
212
|
+
*/
|
|
213
|
+
activationDirection: ActivationDirection;
|
|
214
|
+
/**
|
|
215
|
+
* Sets the value of the tabs.
|
|
216
|
+
*/
|
|
217
|
+
setValue: (value: string, reason?: ValueChangeReason) => void;
|
|
218
|
+
/**
|
|
219
|
+
* Clears the value of the tabs.
|
|
220
|
+
*/
|
|
221
|
+
clearValue: VoidFunction;
|
|
222
|
+
/**
|
|
223
|
+
* Sets the indicator rect to the tab with the given value
|
|
224
|
+
*/
|
|
225
|
+
setIndicatorRect: (value: string) => void;
|
|
226
|
+
/**
|
|
227
|
+
* Synchronizes the tab index of the content element.
|
|
228
|
+
* Useful when rendering tabs within a select or combobox
|
|
229
|
+
*/
|
|
230
|
+
syncTabIndex: VoidFunction;
|
|
231
|
+
/**
|
|
232
|
+
* Set focus on the selected tab trigger
|
|
233
|
+
*/
|
|
234
|
+
focus: VoidFunction;
|
|
235
|
+
/**
|
|
236
|
+
* Selects the next enabled tab, without moving focus
|
|
237
|
+
*/
|
|
238
|
+
selectNext: (fromValue?: string) => void;
|
|
239
|
+
/**
|
|
240
|
+
* Selects the previous enabled tab, without moving focus
|
|
241
|
+
*/
|
|
242
|
+
selectPrevious: (fromValue?: string) => void;
|
|
243
|
+
/**
|
|
244
|
+
* Returns the state of the trigger with the given props
|
|
245
|
+
*/
|
|
246
|
+
getTriggerState: (props: TriggerProps) => TriggerState;
|
|
247
|
+
getTriggerProps: (props: TriggerProps) => T["button"];
|
|
248
|
+
/**
|
|
249
|
+
* Returns the state of the root. The list shares it.
|
|
250
|
+
*/
|
|
251
|
+
getRootState: () => RootState;
|
|
252
|
+
getRootProps: () => T["element"];
|
|
253
|
+
getListProps: () => T["element"];
|
|
254
|
+
/**
|
|
255
|
+
* Returns the state of the content with the given props
|
|
256
|
+
*/
|
|
257
|
+
getContentState: (props: ContentProps) => ContentState;
|
|
258
|
+
getContentProps: (props: ContentProps) => T["element"];
|
|
259
|
+
/**
|
|
260
|
+
* Returns the state of the indicator
|
|
261
|
+
*/
|
|
262
|
+
getIndicatorState: () => IndicatorState;
|
|
263
|
+
getIndicatorProps: () => T["element"];
|
|
205
264
|
}
|
|
206
|
-
|
|
207
|
-
export type { ContentProps, ContentState, ElementIds, FocusChangeDetails, IntlTranslations, NavigateDetails, TabsApi, TabsMachine, TabsProps, TabsSchema, TabsService, TriggerProps, TriggerState, ValueChangeDetails };
|
|
265
|
+
export {};
|