@tamagui/tabs-headless 2.7.7 → 3.0.0-beta.643.1
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/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useTabs.cjs +114 -280
- package/dist/cjs/useTabs.native.cjs +150 -0
- package/dist/cjs/useTabs.native.js +124 -292
- package/dist/cjs/useTabs.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/esm/useTabs.mjs +95 -254
- package/dist/esm/useTabs.mjs.map +1 -1
- package/dist/esm/useTabs.native.js +104 -266
- package/dist/esm/useTabs.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +21 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/useTabs.mjs +95 -254
- package/dist/jsx/useTabs.mjs.map +1 -1
- package/dist/jsx/useTabs.native.cjs +150 -0
- package/dist/jsx/useTabs.native.js +124 -292
- package/dist/jsx/useTabs.native.js.map +1 -1
- package/package.json +5 -5
- package/src/useTabs.tsx +112 -296
- package/types/useTabs.d.ts +54 -75
- package/types/useTabs.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -1,277 +1,115 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
2
|
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
3
3
|
import { useDirection } from "@tamagui/use-direction";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
function makeTriggerId(baseId, value) {
|
|
7
|
+
return `${baseId}-trigger-${value}`;
|
|
8
|
+
}
|
|
9
|
+
function makeContentId(baseId, value) {
|
|
10
|
+
return `${baseId}-content-${value}`;
|
|
11
|
+
}
|
|
6
12
|
function useTabs() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
var focusTab = useCallback(function (tabValue) {
|
|
42
|
-
var element = tabRefs.current.get(tabValue);
|
|
43
|
-
element === null || element === void 0 ? void 0 : element.focus();
|
|
44
|
-
}, []);
|
|
45
|
-
var getNextTab = useCallback(function (currentValue, direction2) {
|
|
46
|
-
var currentIndex = tabValues.indexOf(currentValue);
|
|
47
|
-
if (currentIndex === -1) return null;
|
|
48
|
-
var nextIndex = currentIndex + direction2;
|
|
49
|
-
if (loop) {
|
|
50
|
-
nextIndex = (nextIndex + tabValues.length) % tabValues.length;
|
|
51
|
-
} else {
|
|
52
|
-
if (nextIndex < 0 || nextIndex >= tabValues.length) return null;
|
|
53
|
-
}
|
|
54
|
-
var _tabValues_nextIndex;
|
|
55
|
-
return (_tabValues_nextIndex = tabValues[nextIndex]) !== null && _tabValues_nextIndex !== void 0 ? _tabValues_nextIndex : null;
|
|
56
|
-
}, [tabValues, loop]);
|
|
57
|
-
var handleKeyDown = useCallback(function (tabValue) {
|
|
58
|
-
return function (event) {
|
|
59
|
-
var isHorizontal = orientation === "horizontal";
|
|
60
|
-
var isRtl = direction === "rtl";
|
|
61
|
-
var nextTab = null;
|
|
62
|
-
switch (event.key) {
|
|
63
|
-
case "ArrowRight":
|
|
64
|
-
if (isHorizontal) {
|
|
65
|
-
nextTab = getNextTab(tabValue, isRtl ? -1 : 1);
|
|
66
|
-
}
|
|
67
|
-
break;
|
|
68
|
-
case "ArrowLeft":
|
|
69
|
-
if (isHorizontal) {
|
|
70
|
-
nextTab = getNextTab(tabValue, isRtl ? 1 : -1);
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
case "ArrowDown":
|
|
74
|
-
if (!isHorizontal) {
|
|
75
|
-
nextTab = getNextTab(tabValue, 1);
|
|
76
|
-
}
|
|
77
|
-
break;
|
|
78
|
-
case "ArrowUp":
|
|
79
|
-
if (!isHorizontal) {
|
|
80
|
-
nextTab = getNextTab(tabValue, -1);
|
|
81
|
-
}
|
|
82
|
-
break;
|
|
83
|
-
case "Home":
|
|
84
|
-
var _tabValues_;
|
|
85
|
-
nextTab = (_tabValues_ = tabValues[0]) !== null && _tabValues_ !== void 0 ? _tabValues_ : null;
|
|
86
|
-
break;
|
|
87
|
-
case "End":
|
|
88
|
-
var _tabValues_1;
|
|
89
|
-
nextTab = (_tabValues_1 = tabValues[tabValues.length - 1]) !== null && _tabValues_1 !== void 0 ? _tabValues_1 : null;
|
|
90
|
-
break;
|
|
91
|
-
case " ":
|
|
92
|
-
case "Enter":
|
|
93
|
-
if (activationMode === "manual") {
|
|
94
|
-
setValue(tabValue);
|
|
95
|
-
event.preventDefault();
|
|
96
|
-
}
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (nextTab) {
|
|
100
|
-
event.preventDefault();
|
|
101
|
-
focusTab(nextTab);
|
|
102
|
-
if (activationMode === "automatic") {
|
|
103
|
-
setValue(nextTab);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
}, [orientation, direction, getNextTab, tabValues, activationMode, setValue, focusTab]);
|
|
108
|
-
var getTabProps = useCallback(function (tabValue, disabled) {
|
|
109
|
-
var isSelected = value === tabValue;
|
|
110
|
-
var triggerId = makeTriggerId(baseId, tabValue);
|
|
111
|
-
var contentId = makeContentId(baseId, tabValue);
|
|
112
|
-
return {
|
|
113
|
-
role: "tab",
|
|
114
|
-
id: triggerId,
|
|
115
|
-
"aria-selected": isSelected,
|
|
116
|
-
"aria-controls": contentId,
|
|
117
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
118
|
-
...(disabled && {
|
|
119
|
-
"data-disabled": ""
|
|
120
|
-
}),
|
|
121
|
-
disabled,
|
|
122
|
-
tabIndex: isSelected ? 0 : -1,
|
|
123
|
-
onKeyDown: disabled ? function () {} : handleKeyDown(tabValue),
|
|
124
|
-
onClick: function (event) {
|
|
125
|
-
if (!disabled && !isSelected) {
|
|
126
|
-
setValue(tabValue);
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
onFocus: function (event) {
|
|
130
|
-
registerTab(tabValue, event.currentTarget);
|
|
131
|
-
if (!disabled && !isSelected && activationMode === "automatic") {
|
|
132
|
-
setValue(tabValue);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
}, [value, baseId, handleKeyDown, setValue, activationMode, registerTab]);
|
|
137
|
-
var getContentProps = useCallback(function (tabValue) {
|
|
138
|
-
var isSelected = value === tabValue;
|
|
139
|
-
var triggerId = makeTriggerId(baseId, tabValue);
|
|
140
|
-
var contentId = makeContentId(baseId, tabValue);
|
|
141
|
-
return {
|
|
142
|
-
role: "tabpanel",
|
|
143
|
-
id: contentId,
|
|
144
|
-
"aria-labelledby": triggerId,
|
|
145
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
146
|
-
"data-orientation": orientation,
|
|
147
|
-
hidden: !isSelected,
|
|
148
|
-
tabIndex: 0
|
|
149
|
-
};
|
|
150
|
-
}, [value, baseId, orientation]);
|
|
151
|
-
var contextValue = {
|
|
152
|
-
baseId,
|
|
153
|
-
value,
|
|
154
|
-
setValue,
|
|
155
|
-
orientation,
|
|
156
|
-
direction,
|
|
157
|
-
activationMode,
|
|
158
|
-
loop
|
|
159
|
-
};
|
|
160
|
-
return {
|
|
161
|
-
value,
|
|
162
|
-
setValue,
|
|
163
|
-
direction,
|
|
164
|
-
tabsProps: {
|
|
165
|
-
"data-orientation": orientation,
|
|
166
|
-
dir: direction
|
|
167
|
-
},
|
|
168
|
-
listProps: {
|
|
169
|
-
role: "tablist",
|
|
170
|
-
"aria-orientation": orientation
|
|
171
|
-
},
|
|
172
|
-
getTabProps,
|
|
173
|
-
getContentProps,
|
|
174
|
-
contextValue
|
|
175
|
-
};
|
|
13
|
+
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
14
|
+
var { value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic" } = props;
|
|
15
|
+
var direction = useDirection(dir);
|
|
16
|
+
var baseId = React.useId();
|
|
17
|
+
var [value, setValue] = useControllableState({
|
|
18
|
+
prop: valueProp,
|
|
19
|
+
onChange: onValueChange,
|
|
20
|
+
defaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : ""
|
|
21
|
+
});
|
|
22
|
+
var [triggersCount, setTriggersCount] = React.useState(0);
|
|
23
|
+
var registerTrigger = React.useCallback(function() {
|
|
24
|
+
return setTriggersCount(function(count) {
|
|
25
|
+
return count + 1;
|
|
26
|
+
});
|
|
27
|
+
}, []);
|
|
28
|
+
var unregisterTrigger = React.useCallback(function() {
|
|
29
|
+
return setTriggersCount(function(count) {
|
|
30
|
+
return count - 1;
|
|
31
|
+
});
|
|
32
|
+
}, []);
|
|
33
|
+
return {
|
|
34
|
+
value,
|
|
35
|
+
setValue,
|
|
36
|
+
baseId,
|
|
37
|
+
direction,
|
|
38
|
+
orientation,
|
|
39
|
+
activationMode,
|
|
40
|
+
triggersCount,
|
|
41
|
+
registerTrigger,
|
|
42
|
+
unregisterTrigger,
|
|
43
|
+
tabsProps: { "data-orientation": orientation }
|
|
44
|
+
};
|
|
176
45
|
}
|
|
177
|
-
|
|
178
|
-
var
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
46
|
+
function useTabsList(props) {
|
|
47
|
+
var { orientation = "horizontal", disabled = false } = props;
|
|
48
|
+
return { listProps: {
|
|
49
|
+
role: "tablist",
|
|
50
|
+
"aria-orientation": orientation,
|
|
51
|
+
"aria-disabled": disabled || void 0,
|
|
52
|
+
"data-orientation": orientation,
|
|
53
|
+
"data-disabled": disabled ? "" : void 0
|
|
54
|
+
} };
|
|
185
55
|
}
|
|
186
56
|
function useTab(props) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if ([" ", "Enter"].includes(event.key)) {
|
|
225
|
-
setValue(tabValue);
|
|
226
|
-
event.preventDefault();
|
|
227
|
-
}
|
|
228
|
-
}),
|
|
229
|
-
onPress: composeEventHandlers(onPress, function () {
|
|
230
|
-
if (!disabled && !isSelected) {
|
|
231
|
-
setValue(tabValue);
|
|
232
|
-
}
|
|
233
|
-
}),
|
|
234
|
-
onFocus: composeEventHandlers(onFocus, function () {
|
|
235
|
-
if (!disabled && !isSelected && activationMode === "automatic") {
|
|
236
|
-
setValue(tabValue);
|
|
237
|
-
}
|
|
238
|
-
})
|
|
239
|
-
}
|
|
240
|
-
};
|
|
57
|
+
var { baseId, value, selectedValue, disabled = false, activationMode = "automatic", onChange } = props;
|
|
58
|
+
var isSelected = value === selectedValue;
|
|
59
|
+
var triggerId = makeTriggerId(baseId, value);
|
|
60
|
+
var contentId = makeContentId(baseId, value);
|
|
61
|
+
return {
|
|
62
|
+
isSelected,
|
|
63
|
+
triggerId,
|
|
64
|
+
contentId,
|
|
65
|
+
tabProps: {
|
|
66
|
+
role: "tab",
|
|
67
|
+
id: triggerId,
|
|
68
|
+
"aria-selected": isSelected,
|
|
69
|
+
"aria-controls": contentId,
|
|
70
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
71
|
+
"data-disabled": disabled ? "" : void 0,
|
|
72
|
+
disabled,
|
|
73
|
+
onPress: function(event) {
|
|
74
|
+
var isPrimaryPointer = !isWeb || (event === null || event === void 0 ? void 0 : event.button) === 0 && (event === null || event === void 0 ? void 0 : event.ctrlKey) === false;
|
|
75
|
+
if (!disabled && !isSelected && isPrimaryPointer) {
|
|
76
|
+
onChange(value);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
...isWeb && {
|
|
80
|
+
onKeyDown: function(event) {
|
|
81
|
+
if (!disabled && [" ", "Enter"].includes(event.key)) {
|
|
82
|
+
onChange(value);
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
onFocus: function() {
|
|
87
|
+
if (!isSelected && !disabled && activationMode !== "manual") {
|
|
88
|
+
onChange(value);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
241
94
|
}
|
|
242
95
|
function useTabContent(props) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
contentProps: {
|
|
260
|
-
role: "tabpanel",
|
|
261
|
-
id: contentId,
|
|
262
|
-
"aria-labelledby": triggerId,
|
|
263
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
264
|
-
"data-orientation": orientation,
|
|
265
|
-
hidden: !isSelected,
|
|
266
|
-
tabIndex: 0
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
function makeTriggerId(baseId, value) {
|
|
271
|
-
return `${baseId}-trigger-${value}`;
|
|
272
|
-
}
|
|
273
|
-
function makeContentId(baseId, value) {
|
|
274
|
-
return `${baseId}-content-${value}`;
|
|
96
|
+
var { baseId, value, selectedValue, orientation = "horizontal", forceMount } = props;
|
|
97
|
+
var isSelected = value === selectedValue;
|
|
98
|
+
var shouldMount = Boolean(forceMount) || isSelected;
|
|
99
|
+
return {
|
|
100
|
+
isSelected,
|
|
101
|
+
shouldMount,
|
|
102
|
+
contentProps: {
|
|
103
|
+
role: "tabpanel",
|
|
104
|
+
id: makeContentId(baseId, value),
|
|
105
|
+
"aria-labelledby": makeTriggerId(baseId, value),
|
|
106
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
107
|
+
"data-orientation": orientation,
|
|
108
|
+
hidden: !shouldMount,
|
|
109
|
+
tabIndex: 0
|
|
110
|
+
}
|
|
111
|
+
};
|
|
275
112
|
}
|
|
276
|
-
|
|
113
|
+
|
|
114
|
+
export { makeContentId, makeTriggerId, useTab, useTabContent, useTabs, useTabsList };
|
|
277
115
|
//# sourceMappingURL=useTabs.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useTabs.native.js","names":[],"sources":["esm/useTabs.native.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { useDirection } from \"@tamagui/use-direction\";\nimport * as React from \"react\";\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nfunction useTabs() {\n var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var { value: valueProp, onValueChange, defaultValue, orientation = \"horizontal\", dir, activationMode = \"automatic\" } = props;\n var direction = useDirection(dir);\n var baseId = React.useId();\n var [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : \"\"\n });\n var [triggersCount, setTriggersCount] = React.useState(0);\n var registerTrigger = React.useCallback(function() {\n return setTriggersCount(function(count) {\n return count + 1;\n });\n }, []);\n var unregisterTrigger = React.useCallback(function() {\n return setTriggersCount(function(count) {\n return count - 1;\n });\n }, []);\n return {\n value,\n setValue,\n baseId,\n direction,\n orientation,\n activationMode,\n triggersCount,\n registerTrigger,\n unregisterTrigger,\n tabsProps: {\n \"data-orientation\": orientation\n }\n };\n}\nfunction useTabsList(props) {\n var { orientation = \"horizontal\", disabled = false } = props;\n return {\n listProps: {\n role: \"tablist\",\n \"aria-orientation\": orientation,\n \"aria-disabled\": disabled || void 0,\n \"data-orientation\": orientation,\n \"data-disabled\": disabled ? \"\" : void 0\n }\n };\n}\nfunction useTab(props) {\n var { baseId, value, selectedValue, disabled = false, activationMode = \"automatic\", onChange } = props;\n var isSelected = value === selectedValue;\n var triggerId = makeTriggerId(baseId, value);\n var contentId = makeContentId(baseId, value);\n return {\n isSelected,\n triggerId,\n contentId,\n tabProps: {\n role: \"tab\",\n id: triggerId,\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n onPress: function(event) {\n var isPrimaryPointer = !isWeb || (event === null || event === void 0 ? void 0 : event.button) === 0 && (event === null || event === void 0 ? void 0 : event.ctrlKey) === false;\n if (!disabled && !isSelected && isPrimaryPointer) {\n onChange(value);\n }\n },\n ...isWeb && {\n onKeyDown: function(event) {\n if (!disabled && [\n \" \",\n \"Enter\"\n ].includes(event.key)) {\n onChange(value);\n event.preventDefault();\n }\n },\n onFocus: function() {\n if (!isSelected && !disabled && activationMode !== \"manual\") {\n onChange(value);\n }\n }\n }\n }\n };\n}\nfunction useTabContent(props) {\n var { baseId, value, selectedValue, orientation = \"horizontal\", forceMount } = props;\n var isSelected = value === selectedValue;\n var shouldMount = Boolean(forceMount) || isSelected;\n return {\n isSelected,\n shouldMount,\n contentProps: {\n role: \"tabpanel\",\n id: makeContentId(baseId, value),\n \"aria-labelledby\": makeTriggerId(baseId, value),\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": orientation,\n hidden: !shouldMount,\n tabIndex: 0\n }\n };\n}\nexport {\n makeContentId,\n makeTriggerId,\n useTab,\n useTabContent,\n useTabs,\n useTabsList\n};\n//# sourceMappingURL=useTabs.js.map\n"],"mappings":";;;;;;AAIA,SAAS,cAAc,QAAQ,OAAO;CACpC,OAAO,GAAG,OAAO,WAAW;AAC9B;AACA,SAAS,cAAc,QAAQ,OAAO;CACpC,OAAO,GAAG,OAAO,WAAW;AAC9B;AACA,SAAS,UAAU;CACjB,IAAI,QAAQ,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAC9E,IAAI,EAAE,OAAO,WAAW,eAAe,cAAc,cAAc,cAAc,KAAK,iBAAiB,gBAAgB;CACvH,IAAI,YAAY,aAAa,GAAG;CAChC,IAAI,SAAS,MAAM,MAAM;CACzB,IAAI,CAAC,OAAO,YAAY,qBAAqB;EAC3C,MAAM;EACN,UAAU;EACV,aAAa,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,eAAe;CACjF,CAAC;CACD,IAAI,CAAC,eAAe,oBAAoB,MAAM,SAAS,CAAC;CACxD,IAAI,kBAAkB,MAAM,YAAY,WAAW;EACjD,OAAO,iBAAiB,SAAS,OAAO;GACtC,OAAO,QAAQ;EACjB,CAAC;CACH,GAAG,CAAC,CAAC;CACL,IAAI,oBAAoB,MAAM,YAAY,WAAW;EACnD,OAAO,iBAAiB,SAAS,OAAO;GACtC,OAAO,QAAQ;EACjB,CAAC;CACH,GAAG,CAAC,CAAC;CACL,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW,EACT,oBAAoB,YACtB;CACF;AACF;AACA,SAAS,YAAY,OAAO;CAC1B,IAAI,EAAE,cAAc,cAAc,WAAW,UAAU;CACvD,OAAO,EACL,WAAW;EACT,MAAM;EACN,oBAAoB;EACpB,iBAAiB,YAAY,KAAK;EAClC,oBAAoB;EACpB,iBAAiB,WAAW,KAAK,KAAK;CACxC,EACF;AACF;AACA,SAAS,OAAO,OAAO;CACrB,IAAI,EAAE,QAAQ,OAAO,eAAe,WAAW,OAAO,iBAAiB,aAAa,aAAa;CACjG,IAAI,aAAa,UAAU;CAC3B,IAAI,YAAY,cAAc,QAAQ,KAAK;CAC3C,IAAI,YAAY,cAAc,QAAQ,KAAK;CAC3C,OAAO;EACL;EACA;EACA;EACA,UAAU;GACR,MAAM;GACN,IAAI;GACJ,iBAAiB;GACjB,iBAAiB;GACjB,cAAc,aAAa,WAAW;GACtC,iBAAiB,WAAW,KAAK,KAAK;GACtC;GACA,SAAS,SAAS,OAAO;IACvB,IAAI,mBAAmB,CAAC,UAAU,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,YAAY,MAAM,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,aAAa;IACzK,IAAI,CAAC,YAAY,CAAC,cAAc,kBAAkB;KAChD,SAAS,KAAK;IAChB;GACF;GACA,GAAG,SAAS;IACV,WAAW,SAAS,OAAO;KACzB,IAAI,CAAC,YAAY,CACf,KACA,OACF,EAAE,SAAS,MAAM,GAAG,GAAG;MACrB,SAAS,KAAK;MACd,MAAM,eAAe;KACvB;IACF;IACA,SAAS,WAAW;KAClB,IAAI,CAAC,cAAc,CAAC,YAAY,mBAAmB,UAAU;MAC3D,SAAS,KAAK;KAChB;IACF;GACF;EACF;CACF;AACF;AACA,SAAS,cAAc,OAAO;CAC5B,IAAI,EAAE,QAAQ,OAAO,eAAe,cAAc,cAAc,eAAe;CAC/E,IAAI,aAAa,UAAU;CAC3B,IAAI,cAAc,QAAQ,UAAU,KAAK;CACzC,OAAO;EACL;EACA;EACA,cAAc;GACZ,MAAM;GACN,IAAI,cAAc,QAAQ,KAAK;GAC/B,mBAAmB,cAAc,QAAQ,KAAK;GAC9C,cAAc,aAAa,WAAW;GACtC,oBAAoB;GACpB,QAAQ,CAAC;GACT,UAAU;EACZ;CACF;AACF"}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from "./useTabs.mjs"
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./useTabs.mjs"
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from "./useTabs.mjs"
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export * from "./useTabs.mjs"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./useTabs.native.js"), module.exports);
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
15
16
|
};
|
|
16
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var index_exports = {};
|
|
21
20
|
module.exports = __toCommonJS(index_exports);
|
|
22
21
|
__reExport(index_exports, require("./useTabs.native.js"), module.exports);
|
|
22
|
+
|
|
23
23
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./useTabs\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,qBAAW,GAAG,OAAO,OAAO"}
|