@zag-js/tabs 1.46.0 → 1.48.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.
- package/dist/index.d.mts +6 -8
- package/dist/index.d.ts +6 -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 +229 -238
- package/dist/tabs.connect.mjs +225 -212
- package/dist/tabs.dom.d.mts +30 -33
- package/dist/tabs.dom.d.ts +30 -33
- package/dist/tabs.dom.js +46 -84
- package/dist/tabs.dom.mjs +26 -43
- package/dist/tabs.machine.d.mts +2 -7
- package/dist/tabs.machine.d.ts +2 -7
- package/dist/tabs.machine.js +263 -330
- package/dist/tabs.machine.mjs +260 -295
- 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 +180 -180
- package/dist/tabs.types.d.ts +180 -180
- package/dist/tabs.types.js +4 -18
- package/dist/tabs.types.mjs +1 -0
- package/package.json +8 -8
package/dist/tabs.connect.mjs
CHANGED
|
@@ -1,215 +1,228 @@
|
|
|
1
|
-
// src/tabs.connect.ts
|
|
2
|
-
import {
|
|
3
|
-
contains,
|
|
4
|
-
dataAttr,
|
|
5
|
-
getEventKey,
|
|
6
|
-
getEventTarget,
|
|
7
|
-
isAnchorElement,
|
|
8
|
-
isComposingEvent,
|
|
9
|
-
isOpeningInNewTab,
|
|
10
|
-
isSafari
|
|
11
|
-
} from "@zag-js/dom-query";
|
|
12
|
-
import { toPx } from "@zag-js/utils";
|
|
13
1
|
import { parts } from "./tabs.anatomy.mjs";
|
|
14
|
-
import
|
|
2
|
+
import { getContentId, getIndicatorId, getListId, getRootId, getTriggerEl, getTriggerId } from "./tabs.dom.mjs";
|
|
3
|
+
import { contains, dataAttr, getEventKey, getEventTarget, isAnchorElement, isComposingEvent, isDownloadingEvent, isOpeningInNewTab, isSafari } from "@zag-js/dom-query";
|
|
4
|
+
import { toPx } from "@zag-js/utils";
|
|
5
|
+
// src/tabs.connect.ts
|
|
15
6
|
function connect(service, normalize) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
7
|
+
const { state, send, context, prop, scope } = service;
|
|
8
|
+
const translations = prop("translations");
|
|
9
|
+
const focused = state.matches("focused");
|
|
10
|
+
const isVertical = prop("orientation") === "vertical";
|
|
11
|
+
const isHorizontal = prop("orientation") === "horizontal";
|
|
12
|
+
const composite = prop("composite");
|
|
13
|
+
function sendKeyboardEvent(type, key) {
|
|
14
|
+
send({
|
|
15
|
+
type,
|
|
16
|
+
key,
|
|
17
|
+
src: "keyboard"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function getTriggerState(props) {
|
|
21
|
+
return {
|
|
22
|
+
selected: context.get("value") === props.value,
|
|
23
|
+
focused: context.get("focusedValue") === props.value,
|
|
24
|
+
disabled: !!props.disabled
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
value: context.get("value"),
|
|
29
|
+
focusedValue: context.get("focusedValue"),
|
|
30
|
+
setValue(value) {
|
|
31
|
+
send({
|
|
32
|
+
type: "SET_VALUE",
|
|
33
|
+
value
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
clearValue() {
|
|
37
|
+
send({ type: "CLEAR_VALUE" });
|
|
38
|
+
},
|
|
39
|
+
setIndicatorRect(value) {
|
|
40
|
+
const id = getTriggerId(scope, value);
|
|
41
|
+
send({
|
|
42
|
+
type: "SET_INDICATOR_RECT",
|
|
43
|
+
id
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
syncTabIndex() {
|
|
47
|
+
send({ type: "SYNC_TAB_INDEX" });
|
|
48
|
+
},
|
|
49
|
+
selectNext(fromValue) {
|
|
50
|
+
send({
|
|
51
|
+
type: "TAB_FOCUS",
|
|
52
|
+
value: fromValue,
|
|
53
|
+
src: "selectNext"
|
|
54
|
+
});
|
|
55
|
+
send({
|
|
56
|
+
type: "ARROW_NEXT",
|
|
57
|
+
src: "selectNext"
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
selectPrev(fromValue) {
|
|
61
|
+
send({
|
|
62
|
+
type: "TAB_FOCUS",
|
|
63
|
+
value: fromValue,
|
|
64
|
+
src: "selectPrev"
|
|
65
|
+
});
|
|
66
|
+
send({
|
|
67
|
+
type: "ARROW_PREV",
|
|
68
|
+
src: "selectPrev"
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
focus() {
|
|
72
|
+
const value = context.get("value");
|
|
73
|
+
if (!value) return;
|
|
74
|
+
getTriggerEl(scope, value)?.focus();
|
|
75
|
+
},
|
|
76
|
+
getRootProps() {
|
|
77
|
+
return normalize.element({
|
|
78
|
+
...parts.root.attrs,
|
|
79
|
+
id: getRootId(scope),
|
|
80
|
+
"data-orientation": prop("orientation"),
|
|
81
|
+
"data-focus": dataAttr(focused),
|
|
82
|
+
dir: prop("dir")
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
getListProps() {
|
|
86
|
+
return normalize.element({
|
|
87
|
+
...parts.list.attrs,
|
|
88
|
+
id: getListId(scope),
|
|
89
|
+
role: "tablist",
|
|
90
|
+
dir: prop("dir"),
|
|
91
|
+
"data-focus": dataAttr(focused),
|
|
92
|
+
"aria-orientation": prop("orientation"),
|
|
93
|
+
"data-orientation": prop("orientation"),
|
|
94
|
+
"aria-label": translations?.listLabel,
|
|
95
|
+
onKeyDown(event) {
|
|
96
|
+
if (event.defaultPrevented) return;
|
|
97
|
+
if (isComposingEvent(event)) return;
|
|
98
|
+
if (!contains(event.currentTarget, getEventTarget(event))) return;
|
|
99
|
+
const exec = {
|
|
100
|
+
ArrowDown() {
|
|
101
|
+
if (isHorizontal) return;
|
|
102
|
+
sendKeyboardEvent("ARROW_NEXT", "ArrowDown");
|
|
103
|
+
},
|
|
104
|
+
ArrowUp() {
|
|
105
|
+
if (isHorizontal) return;
|
|
106
|
+
sendKeyboardEvent("ARROW_PREV", "ArrowUp");
|
|
107
|
+
},
|
|
108
|
+
ArrowLeft() {
|
|
109
|
+
if (isVertical) return;
|
|
110
|
+
sendKeyboardEvent("ARROW_PREV", "ArrowLeft");
|
|
111
|
+
},
|
|
112
|
+
ArrowRight() {
|
|
113
|
+
if (isVertical) return;
|
|
114
|
+
sendKeyboardEvent("ARROW_NEXT", "ArrowRight");
|
|
115
|
+
},
|
|
116
|
+
Home() {
|
|
117
|
+
sendKeyboardEvent("HOME");
|
|
118
|
+
},
|
|
119
|
+
End() {
|
|
120
|
+
sendKeyboardEvent("END");
|
|
121
|
+
}
|
|
122
|
+
}[getEventKey(event, {
|
|
123
|
+
dir: prop("dir"),
|
|
124
|
+
orientation: prop("orientation")
|
|
125
|
+
})];
|
|
126
|
+
if (exec) {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
exec(event);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
getTriggerState,
|
|
135
|
+
getTriggerProps(props) {
|
|
136
|
+
const { value, disabled } = props;
|
|
137
|
+
const triggerState = getTriggerState(props);
|
|
138
|
+
return normalize.button({
|
|
139
|
+
...parts.trigger.attrs,
|
|
140
|
+
role: "tab",
|
|
141
|
+
type: "button",
|
|
142
|
+
disabled,
|
|
143
|
+
dir: prop("dir"),
|
|
144
|
+
"data-orientation": prop("orientation"),
|
|
145
|
+
"data-disabled": dataAttr(disabled),
|
|
146
|
+
"aria-disabled": disabled,
|
|
147
|
+
"data-value": value,
|
|
148
|
+
"aria-selected": triggerState.selected,
|
|
149
|
+
"data-selected": dataAttr(triggerState.selected),
|
|
150
|
+
"data-focus": dataAttr(triggerState.focused),
|
|
151
|
+
"aria-controls": triggerState.selected ? getContentId(scope, value) : void 0,
|
|
152
|
+
"data-ownedby": getListId(scope),
|
|
153
|
+
"data-ssr": dataAttr(context.get("ssr")),
|
|
154
|
+
id: getTriggerId(scope, value),
|
|
155
|
+
tabIndex: triggerState.selected && composite ? 0 : -1,
|
|
156
|
+
onFocus() {
|
|
157
|
+
send({
|
|
158
|
+
type: "TAB_FOCUS",
|
|
159
|
+
value
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
onBlur(event) {
|
|
163
|
+
if (event.relatedTarget?.getAttribute("role") !== "tab") send({ type: "TAB_BLUR" });
|
|
164
|
+
},
|
|
165
|
+
onClick(event) {
|
|
166
|
+
if (event.defaultPrevented) return;
|
|
167
|
+
if (isDownloadingEvent(event)) return;
|
|
168
|
+
if (isOpeningInNewTab(event)) return;
|
|
169
|
+
if (event.shiftKey && isAnchorElement(event.currentTarget)) return;
|
|
170
|
+
if (disabled) return;
|
|
171
|
+
if (isSafari()) event.currentTarget.focus();
|
|
172
|
+
const node = event.currentTarget;
|
|
173
|
+
if (prop("navigate") != null && isAnchorElement(node)) event.preventDefault();
|
|
174
|
+
send({
|
|
175
|
+
type: "TAB_CLICK",
|
|
176
|
+
value
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
getContentProps(props) {
|
|
182
|
+
const { value } = props;
|
|
183
|
+
const selected = context.get("value") === value;
|
|
184
|
+
return normalize.element({
|
|
185
|
+
...parts.content.attrs,
|
|
186
|
+
dir: prop("dir"),
|
|
187
|
+
id: getContentId(scope, value),
|
|
188
|
+
tabIndex: composite ? 0 : -1,
|
|
189
|
+
"aria-labelledby": getTriggerId(scope, value),
|
|
190
|
+
role: "tabpanel",
|
|
191
|
+
"data-ownedby": getListId(scope),
|
|
192
|
+
"data-selected": dataAttr(selected),
|
|
193
|
+
"data-orientation": prop("orientation"),
|
|
194
|
+
hidden: !selected
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
getIndicatorProps() {
|
|
198
|
+
const rect = context.get("indicatorRect");
|
|
199
|
+
const animateIndicator = context.get("animateIndicator");
|
|
200
|
+
return normalize.element({
|
|
201
|
+
id: getIndicatorId(scope),
|
|
202
|
+
...parts.indicator.attrs,
|
|
203
|
+
dir: prop("dir"),
|
|
204
|
+
"data-orientation": prop("orientation"),
|
|
205
|
+
hidden: isRectEmpty(rect),
|
|
206
|
+
onTransitionEnd(event) {
|
|
207
|
+
if (getEventTarget(event) !== event.currentTarget) return;
|
|
208
|
+
send({ type: "INDICATOR_TRANSITION_END" });
|
|
209
|
+
},
|
|
210
|
+
style: {
|
|
211
|
+
"--transition-property": "left, right, top, bottom, width, height",
|
|
212
|
+
"--left": toPx(rect?.x),
|
|
213
|
+
"--top": toPx(rect?.y),
|
|
214
|
+
"--width": toPx(rect?.width),
|
|
215
|
+
"--height": toPx(rect?.height),
|
|
216
|
+
position: "absolute",
|
|
217
|
+
willChange: animateIndicator ? "var(--transition-property)" : "auto",
|
|
218
|
+
transitionProperty: animateIndicator ? "var(--transition-property)" : "none",
|
|
219
|
+
transitionDuration: animateIndicator ? "var(--transition-duration, 150ms)" : "0ms",
|
|
220
|
+
transitionTimingFunction: "var(--transition-timing-function)",
|
|
221
|
+
[isHorizontal ? "left" : "top"]: isHorizontal ? "var(--left)" : "var(--top)"
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
};
|
|
211
226
|
}
|
|
212
|
-
|
|
213
|
-
export {
|
|
214
|
-
connect
|
|
215
|
-
};
|
|
227
|
+
const isRectEmpty = (rect) => rect == null || rect.width === 0 && rect.height === 0 && rect.x === 0 && rect.y === 0;
|
|
228
|
+
export { connect };
|
package/dist/tabs.dom.d.mts
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
import { Scope } from
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
loopFocus?: boolean | undefined;
|
|
1
|
+
import { Scope } from "@zag-js/core";
|
|
2
|
+
export declare const getRootId: (ctx: Scope) => any;
|
|
3
|
+
export declare const getListId: (ctx: Scope) => any;
|
|
4
|
+
export declare const getContentId: (ctx: Scope, value: string) => any;
|
|
5
|
+
export declare const getTriggerId: (ctx: Scope, value: string) => any;
|
|
6
|
+
export declare const getIndicatorId: (ctx: Scope) => any;
|
|
7
|
+
export declare const getListEl: (ctx: Scope) => HTMLElement | null;
|
|
8
|
+
export declare const getContentEl: (ctx: Scope, value: string) => HTMLElement | null;
|
|
9
|
+
export declare const getTriggerEl: (ctx: Scope, value: string | null) => HTMLElement | null;
|
|
10
|
+
export declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
|
|
11
|
+
export declare const getElements: (ctx: Scope) => HTMLElement[];
|
|
12
|
+
export declare const getFirstTriggerEl: (ctx: Scope) => HTMLElement | undefined;
|
|
13
|
+
export declare const getLastTriggerEl: (ctx: Scope) => HTMLElement | undefined;
|
|
14
|
+
export declare const getNextTriggerEl: (ctx: Scope, opts: {
|
|
15
|
+
value: string;
|
|
16
|
+
loopFocus?: boolean | undefined;
|
|
18
17
|
}) => HTMLElement;
|
|
19
|
-
declare const getPrevTriggerEl: (ctx: Scope, opts: {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
export declare const getPrevTriggerEl: (ctx: Scope, opts: {
|
|
19
|
+
value: string;
|
|
20
|
+
loopFocus?: boolean | undefined;
|
|
22
21
|
}) => HTMLElement | null;
|
|
23
|
-
declare const getOffsetRect: (el: HTMLElement | undefined) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
export declare const getOffsetRect: (el: HTMLElement | undefined) => {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
28
27
|
};
|
|
29
|
-
declare const getRectByValue: (ctx: Scope, value: string) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { getContentEl, getContentId, getElements, getFirstTriggerEl, getIndicatorEl, getIndicatorId, getLastTriggerEl, getListEl, getListId, getNextTriggerEl, getOffsetRect, getPrevTriggerEl, getRectByValue, getRootId, getTriggerEl, getTriggerId };
|
|
28
|
+
export declare const getRectByValue: (ctx: Scope, value: string) => {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
};
|
package/dist/tabs.dom.d.ts
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
import { Scope } from
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
loopFocus?: boolean | undefined;
|
|
1
|
+
import { Scope } from "@zag-js/core";
|
|
2
|
+
export declare const getRootId: (ctx: Scope) => any;
|
|
3
|
+
export declare const getListId: (ctx: Scope) => any;
|
|
4
|
+
export declare const getContentId: (ctx: Scope, value: string) => any;
|
|
5
|
+
export declare const getTriggerId: (ctx: Scope, value: string) => any;
|
|
6
|
+
export declare const getIndicatorId: (ctx: Scope) => any;
|
|
7
|
+
export declare const getListEl: (ctx: Scope) => HTMLElement | null;
|
|
8
|
+
export declare const getContentEl: (ctx: Scope, value: string) => HTMLElement | null;
|
|
9
|
+
export declare const getTriggerEl: (ctx: Scope, value: string | null) => HTMLElement | null;
|
|
10
|
+
export declare const getIndicatorEl: (ctx: Scope) => HTMLElement | null;
|
|
11
|
+
export declare const getElements: (ctx: Scope) => HTMLElement[];
|
|
12
|
+
export declare const getFirstTriggerEl: (ctx: Scope) => HTMLElement | undefined;
|
|
13
|
+
export declare const getLastTriggerEl: (ctx: Scope) => HTMLElement | undefined;
|
|
14
|
+
export declare const getNextTriggerEl: (ctx: Scope, opts: {
|
|
15
|
+
value: string;
|
|
16
|
+
loopFocus?: boolean | undefined;
|
|
18
17
|
}) => HTMLElement;
|
|
19
|
-
declare const getPrevTriggerEl: (ctx: Scope, opts: {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
export declare const getPrevTriggerEl: (ctx: Scope, opts: {
|
|
19
|
+
value: string;
|
|
20
|
+
loopFocus?: boolean | undefined;
|
|
22
21
|
}) => HTMLElement | null;
|
|
23
|
-
declare const getOffsetRect: (el: HTMLElement | undefined) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
export declare const getOffsetRect: (el: HTMLElement | undefined) => {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
28
27
|
};
|
|
29
|
-
declare const getRectByValue: (ctx: Scope, value: string) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { getContentEl, getContentId, getElements, getFirstTriggerEl, getIndicatorEl, getIndicatorId, getLastTriggerEl, getListEl, getListId, getNextTriggerEl, getOffsetRect, getPrevTriggerEl, getRectByValue, getRootId, getTriggerEl, getTriggerId };
|
|
28
|
+
export declare const getRectByValue: (ctx: Scope, value: string) => {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
};
|