@tamagui/tabs 1.14.0 → 1.14.2
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/Tabs.js +359 -1
- package/dist/cjs/Tabs.js.map +2 -2
- package/dist/cjs/index.js +18 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/Tabs.js +334 -1
- package/dist/esm/Tabs.js.map +2 -2
- package/dist/esm/Tabs.mjs +334 -1
- package/dist/esm/Tabs.mjs.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/jsx/Tabs.js +307 -1
- package/dist/jsx/Tabs.js.map +2 -2
- package/dist/jsx/Tabs.mjs +307 -1
- package/dist/jsx/Tabs.mjs.map +2 -2
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +1 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/cjs/Tabs.js
CHANGED
|
@@ -1,2 +1,360 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Tabs_exports = {};
|
|
30
|
+
__export(Tabs_exports, {
|
|
31
|
+
Tabs: () => Tabs
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Tabs_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_create_context = require("@tamagui/create-context");
|
|
36
|
+
var import_get_button_sized = require("@tamagui/get-button-sized");
|
|
37
|
+
var import_group = require("@tamagui/group");
|
|
38
|
+
var import_roving_focus = require("@tamagui/roving-focus");
|
|
39
|
+
var import_stacks = require("@tamagui/stacks");
|
|
40
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
41
|
+
var import_use_direction = require("@tamagui/use-direction");
|
|
42
|
+
var import_web = require("@tamagui/web");
|
|
43
|
+
var React = __toESM(require("react"));
|
|
44
|
+
const TAB_LIST_NAME = "TabsList";
|
|
45
|
+
const TabsListFrame = (0, import_web.styled)(import_group.Group, {
|
|
46
|
+
name: TAB_LIST_NAME,
|
|
47
|
+
focusable: true
|
|
48
|
+
// defaultVariants: {
|
|
49
|
+
// flexGrow: 0,
|
|
50
|
+
// },
|
|
51
|
+
});
|
|
52
|
+
const TabsList = TabsListFrame.extractable(
|
|
53
|
+
React.forwardRef(
|
|
54
|
+
(props, forwardedRef) => {
|
|
55
|
+
const { __scopeTabs, loop = true, children, ...listProps } = props;
|
|
56
|
+
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
57
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
import_roving_focus.RovingFocusGroup,
|
|
60
|
+
{
|
|
61
|
+
asChild: true,
|
|
62
|
+
orientation: context.orientation,
|
|
63
|
+
dir: context.dir,
|
|
64
|
+
loop,
|
|
65
|
+
...rovingFocusGroupScope,
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
TabsListFrame,
|
|
68
|
+
{
|
|
69
|
+
role: "tablist",
|
|
70
|
+
"aria-orientation": context.orientation,
|
|
71
|
+
ref: forwardedRef,
|
|
72
|
+
axis: context.orientation,
|
|
73
|
+
...listProps,
|
|
74
|
+
children
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
TabsList.displayName = TAB_LIST_NAME;
|
|
83
|
+
const TRIGGER_NAME = "TabsTrigger";
|
|
84
|
+
const TabsTriggerFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
|
|
85
|
+
name: TRIGGER_NAME,
|
|
86
|
+
justifyContent: "center",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
flexWrap: "nowrap",
|
|
89
|
+
flexDirection: "row",
|
|
90
|
+
cursor: "pointer",
|
|
91
|
+
focusable: true,
|
|
92
|
+
variants: {
|
|
93
|
+
size: {
|
|
94
|
+
"...size": import_get_button_sized.getButtonSized
|
|
95
|
+
},
|
|
96
|
+
disabled: {
|
|
97
|
+
true: {
|
|
98
|
+
pointerEvents: "none"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
unstyled: {
|
|
102
|
+
false: {
|
|
103
|
+
backgroundColor: "$background",
|
|
104
|
+
pressStyle: {
|
|
105
|
+
backgroundColor: "$backgroundPress"
|
|
106
|
+
},
|
|
107
|
+
hoverStyle: {
|
|
108
|
+
backgroundColor: "$backgroundHover"
|
|
109
|
+
},
|
|
110
|
+
focusStyle: {
|
|
111
|
+
backgroundColor: "$backgroundFocus"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
defaultVariants: {
|
|
117
|
+
unstyled: false
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const TabsTrigger = TabsTriggerFrame.extractable(
|
|
121
|
+
React.forwardRef(
|
|
122
|
+
(props, forwardedRef) => {
|
|
123
|
+
const {
|
|
124
|
+
__scopeTabs,
|
|
125
|
+
value,
|
|
126
|
+
disabled = false,
|
|
127
|
+
onInteraction,
|
|
128
|
+
...triggerProps
|
|
129
|
+
} = props;
|
|
130
|
+
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
|
|
131
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
132
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
133
|
+
const contentId = makeContentId(context.baseId, value);
|
|
134
|
+
const isSelected = value === context.value;
|
|
135
|
+
const [layout, setLayout] = React.useState(null);
|
|
136
|
+
const triggerRef = React.useRef(null);
|
|
137
|
+
const groupItemProps = (0, import_group.useGroupItem)({ disabled });
|
|
138
|
+
React.useEffect(() => {
|
|
139
|
+
context.registerTrigger();
|
|
140
|
+
return () => context.unregisterTrigger();
|
|
141
|
+
}, []);
|
|
142
|
+
React.useEffect(() => {
|
|
143
|
+
if (!triggerRef.current || !import_web.isWeb)
|
|
144
|
+
return;
|
|
145
|
+
function getTriggerSize() {
|
|
146
|
+
if (!triggerRef.current)
|
|
147
|
+
return;
|
|
148
|
+
setLayout({
|
|
149
|
+
width: triggerRef.current.offsetWidth,
|
|
150
|
+
height: triggerRef.current.offsetHeight,
|
|
151
|
+
x: triggerRef.current.offsetLeft,
|
|
152
|
+
y: triggerRef.current.offsetTop
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
getTriggerSize();
|
|
156
|
+
const observer = new ResizeObserver(getTriggerSize);
|
|
157
|
+
observer.observe(triggerRef.current);
|
|
158
|
+
return () => {
|
|
159
|
+
if (!triggerRef.current)
|
|
160
|
+
return;
|
|
161
|
+
observer.unobserve(triggerRef.current);
|
|
162
|
+
};
|
|
163
|
+
}, [context.triggersCount]);
|
|
164
|
+
React.useEffect(() => {
|
|
165
|
+
if (isSelected && layout) {
|
|
166
|
+
onInteraction == null ? void 0 : onInteraction("select", layout);
|
|
167
|
+
}
|
|
168
|
+
}, [isSelected, value, layout]);
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, { forceClassName: true, name: isSelected ? "active" : null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
170
|
+
import_roving_focus.RovingFocusGroup.Item,
|
|
171
|
+
{
|
|
172
|
+
asChild: true,
|
|
173
|
+
...rovingFocusGroupScope,
|
|
174
|
+
focusable: !disabled,
|
|
175
|
+
active: isSelected,
|
|
176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
177
|
+
TabsTriggerFrame,
|
|
178
|
+
{
|
|
179
|
+
onLayout: (event) => {
|
|
180
|
+
if (!import_web.isWeb) {
|
|
181
|
+
setLayout(event.nativeEvent.layout);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
onHoverIn: (0, import_web.composeEventHandlers)(props.onHoverIn, () => {
|
|
185
|
+
if (layout) {
|
|
186
|
+
onInteraction == null ? void 0 : onInteraction("hover", layout);
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
onHoverOut: (0, import_web.composeEventHandlers)(props.onHoverOut, () => {
|
|
190
|
+
onInteraction == null ? void 0 : onInteraction("hover", null);
|
|
191
|
+
}),
|
|
192
|
+
role: "tab",
|
|
193
|
+
"aria-selected": isSelected,
|
|
194
|
+
"aria-controls": contentId,
|
|
195
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
196
|
+
"data-disabled": disabled ? "" : void 0,
|
|
197
|
+
disabled,
|
|
198
|
+
id: triggerId,
|
|
199
|
+
size: context.size,
|
|
200
|
+
...triggerProps,
|
|
201
|
+
ref: (0, import_web.composeRefs)(forwardedRef, triggerRef),
|
|
202
|
+
onPress: (0, import_web.composeEventHandlers)(props.onPress ?? void 0, (event) => {
|
|
203
|
+
const webChecks = !import_web.isWeb || event.button === 0 && event.ctrlKey === false;
|
|
204
|
+
if (!disabled && !isSelected && webChecks) {
|
|
205
|
+
context.onChange(value);
|
|
206
|
+
} else {
|
|
207
|
+
event.preventDefault();
|
|
208
|
+
}
|
|
209
|
+
}),
|
|
210
|
+
...import_web.isWeb && {
|
|
211
|
+
type: "button",
|
|
212
|
+
onKeyDown: (0, import_web.composeEventHandlers)(
|
|
213
|
+
props.onKeyDown,
|
|
214
|
+
(event) => {
|
|
215
|
+
if ([" ", "Enter"].includes(event.key)) {
|
|
216
|
+
context.onChange(value);
|
|
217
|
+
event.preventDefault();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
onFocus: (0, import_web.composeEventHandlers)(props.onFocus, (event) => {
|
|
222
|
+
if (layout) {
|
|
223
|
+
onInteraction == null ? void 0 : onInteraction("focus", layout);
|
|
224
|
+
}
|
|
225
|
+
const isAutomaticActivation = context.activationMode !== "manual";
|
|
226
|
+
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
227
|
+
context.onChange(value);
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
onBlur: (0, import_web.composeEventHandlers)(props.onFocus, () => {
|
|
231
|
+
onInteraction == null ? void 0 : onInteraction("focus", null);
|
|
232
|
+
})
|
|
233
|
+
},
|
|
234
|
+
...groupItemProps
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
) });
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
);
|
|
242
|
+
TabsTrigger.displayName = TRIGGER_NAME;
|
|
243
|
+
const CONTENT_NAME = "TabsContent";
|
|
244
|
+
const TabsContentFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
|
|
245
|
+
name: CONTENT_NAME
|
|
246
|
+
});
|
|
247
|
+
const TabsContent = TabsContentFrame.extractable(
|
|
248
|
+
React.forwardRef(
|
|
249
|
+
(props, forwardedRef) => {
|
|
250
|
+
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
251
|
+
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
|
|
252
|
+
const isSelected = value === context.value;
|
|
253
|
+
const show = forceMount || isSelected;
|
|
254
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
255
|
+
const contentId = makeContentId(context.baseId, value);
|
|
256
|
+
if (!show)
|
|
257
|
+
return null;
|
|
258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
259
|
+
TabsContentFrame,
|
|
260
|
+
{
|
|
261
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
262
|
+
"data-orientation": context.orientation,
|
|
263
|
+
role: "tabpanel",
|
|
264
|
+
"aria-labelledby": triggerId,
|
|
265
|
+
hidden: !show,
|
|
266
|
+
id: contentId,
|
|
267
|
+
tabIndex: 0,
|
|
268
|
+
...contentProps,
|
|
269
|
+
ref: forwardedRef,
|
|
270
|
+
children
|
|
271
|
+
},
|
|
272
|
+
value
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
TabsContent.displayName = CONTENT_NAME;
|
|
278
|
+
const TABS_NAME = "Tabs";
|
|
279
|
+
const [createTabsContext, createTabsScope] = (0, import_create_context.createContextScope)(TABS_NAME, [
|
|
280
|
+
import_roving_focus.createRovingFocusGroupScope
|
|
281
|
+
]);
|
|
282
|
+
const useRovingFocusGroupScope = (0, import_roving_focus.createRovingFocusGroupScope)();
|
|
283
|
+
const [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
284
|
+
const TabsFrame = (0, import_web.styled)(import_stacks.SizableStack, {
|
|
285
|
+
name: TABS_NAME
|
|
286
|
+
});
|
|
287
|
+
const Tabs = (0, import_web.withStaticProperties)(
|
|
288
|
+
TabsFrame.extractable(
|
|
289
|
+
React.forwardRef(
|
|
290
|
+
(props, forwardedRef) => {
|
|
291
|
+
const {
|
|
292
|
+
__scopeTabs,
|
|
293
|
+
value: valueProp,
|
|
294
|
+
onValueChange,
|
|
295
|
+
defaultValue,
|
|
296
|
+
orientation = "horizontal",
|
|
297
|
+
dir,
|
|
298
|
+
activationMode = "automatic",
|
|
299
|
+
size = "$true",
|
|
300
|
+
...tabsProps
|
|
301
|
+
} = props;
|
|
302
|
+
const direction = (0, import_use_direction.useDirection)(dir);
|
|
303
|
+
const [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
304
|
+
prop: valueProp,
|
|
305
|
+
onChange: onValueChange,
|
|
306
|
+
defaultProp: defaultValue ?? ""
|
|
307
|
+
});
|
|
308
|
+
const [triggersCount, setTriggersCount] = React.useState(0);
|
|
309
|
+
const registerTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v + 1));
|
|
310
|
+
const unregisterTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v - 1));
|
|
311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
312
|
+
TabsProvider,
|
|
313
|
+
{
|
|
314
|
+
scope: __scopeTabs,
|
|
315
|
+
baseId: (0, import_web.useId)(),
|
|
316
|
+
value,
|
|
317
|
+
onChange: setValue,
|
|
318
|
+
orientation,
|
|
319
|
+
dir: direction,
|
|
320
|
+
activationMode,
|
|
321
|
+
size,
|
|
322
|
+
registerTrigger,
|
|
323
|
+
triggersCount,
|
|
324
|
+
unregisterTrigger,
|
|
325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
326
|
+
TabsFrame,
|
|
327
|
+
{
|
|
328
|
+
direction,
|
|
329
|
+
"data-orientation": orientation,
|
|
330
|
+
...tabsProps,
|
|
331
|
+
ref: forwardedRef
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
),
|
|
339
|
+
{
|
|
340
|
+
List: TabsList,
|
|
341
|
+
/**
|
|
342
|
+
* @deprecated Use Tabs.Tab instead
|
|
343
|
+
*/
|
|
344
|
+
Trigger: TabsTrigger,
|
|
345
|
+
Tab: TabsTrigger,
|
|
346
|
+
Content: TabsContent
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
Tabs.displayName = TABS_NAME;
|
|
350
|
+
function makeTriggerId(baseId, value) {
|
|
351
|
+
return `${baseId}-trigger-${value}`;
|
|
352
|
+
}
|
|
353
|
+
function makeContentId(baseId, value) {
|
|
354
|
+
return `${baseId}-content-${value}`;
|
|
355
|
+
}
|
|
356
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
357
|
+
0 && (module.exports = {
|
|
358
|
+
Tabs
|
|
359
|
+
});
|
|
2
360
|
//# sourceMappingURL=Tabs.js.map
|
package/dist/cjs/Tabs.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Tabs.tsx"],
|
|
4
4
|
"sourcesContent": ["import type { Scope } from '@tamagui/create-context'\nimport { createContextScope } from '@tamagui/create-context'\nimport { getButtonSized } from '@tamagui/get-button-sized'\nimport { Group, GroupProps, useGroupItem } from '@tamagui/group'\nimport { RovingFocusGroup, createRovingFocusGroupScope } from '@tamagui/roving-focus'\nimport { SizableStack, ThemeableStack, ThemeableStackProps } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { useDirection } from '@tamagui/use-direction'\nimport {\n GetProps,\n SizeTokens,\n Theme,\n composeEventHandlers,\n composeRefs,\n isWeb,\n styled,\n useEvent,\n useId,\n withStaticProperties,\n} from '@tamagui/web'\nimport * as React from 'react'\nimport type { LayoutRectangle } from 'react-native'\n\n/* -------------------------------------------------------------------------------------------------\n * TabsList\n * -----------------------------------------------------------------------------------------------*/\n\nconst TAB_LIST_NAME = 'TabsList'\n\nconst TabsListFrame = styled(Group, {\n name: TAB_LIST_NAME,\n focusable: true,\n // defaultVariants: {\n // flexGrow: 0,\n // },\n})\n\ntype TabsListFrameProps = GroupProps\n\ntype TabsListProps = TabsListFrameProps & {\n /**\n * Whether to loop over after reaching the end or start of the items\n * @default true\n */\n loop?: boolean\n}\n\nconst TabsList = TabsListFrame.extractable(\n React.forwardRef<HTMLDivElement, TabsListProps>(\n (props: ScopedProps<TabsListProps>, forwardedRef) => {\n const { __scopeTabs, loop = true, children, ...listProps } = props\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs)\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs)\n\n return (\n <RovingFocusGroup\n asChild\n orientation={context.orientation}\n dir={context.dir}\n loop={loop}\n {...rovingFocusGroupScope}\n >\n <TabsListFrame\n role=\"tablist\"\n aria-orientation={context.orientation}\n ref={forwardedRef}\n axis={context.orientation}\n {...listProps}\n >\n {children}\n </TabsListFrame>\n </RovingFocusGroup>\n )\n }\n )\n)\n\nTabsList.displayName = TAB_LIST_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * TabsTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'TabsTrigger'\n\nconst TabsTriggerFrame = styled(ThemeableStack, {\n name: TRIGGER_NAME,\n justifyContent: 'center',\n alignItems: 'center',\n flexWrap: 'nowrap',\n flexDirection: 'row',\n cursor: 'pointer',\n focusable: true,\n\n variants: {\n size: {\n '...size': getButtonSized,\n },\n disabled: {\n true: {\n pointerEvents: 'none',\n },\n },\n unstyled: {\n false: {\n backgroundColor: '$background',\n\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n },\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\n/**\n * @deprecated Use `TabLayout` instead\n */\ntype TabsTriggerLayout = LayoutRectangle\ntype TabLayout = LayoutRectangle\ntype InteractionType = 'select' | 'focus' | 'hover'\n\ntype TabsTriggerFrameProps = GetProps<typeof TabsTriggerFrame>\n/**\n * @deprecated use `TabTabsProps` instead\n */\ntype TabsTriggerProps = TabsTriggerFrameProps & {\n /** The value for the tabs state to be changed to after activation of the trigger */\n value: string\n\n /** Used for making custom indicators when trigger interacted with */\n onInteraction?: (type: InteractionType, layout: TabLayout | null) => void\n}\n\ntype TabsTabProps = TabsTriggerProps\n\nconst TabsTrigger = TabsTriggerFrame.extractable(\n React.forwardRef<HTMLButtonElement, TabsTriggerProps>(\n (props: ScopedProps<TabsTriggerProps>, forwardedRef) => {\n const {\n __scopeTabs,\n value,\n disabled = false,\n onInteraction,\n ...triggerProps\n } = props\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs)\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs)\n const triggerId = makeTriggerId(context.baseId, value)\n const contentId = makeContentId(context.baseId, value)\n const isSelected = value === context.value\n const [layout, setLayout] = React.useState<TabLayout | null>(null)\n const triggerRef = React.useRef<HTMLButtonElement>(null)\n const groupItemProps = useGroupItem({ disabled })\n\n React.useEffect(() => {\n context.registerTrigger()\n return () => context.unregisterTrigger()\n }, [])\n\n React.useEffect(() => {\n if (!triggerRef.current || !isWeb) return\n\n function getTriggerSize() {\n if (!triggerRef.current) return\n setLayout({\n width: triggerRef.current.offsetWidth,\n height: triggerRef.current.offsetHeight,\n x: triggerRef.current.offsetLeft,\n y: triggerRef.current.offsetTop,\n })\n }\n getTriggerSize()\n\n const observer = new ResizeObserver(getTriggerSize)\n observer.observe(triggerRef.current)\n\n return () => {\n if (!triggerRef.current) return\n observer.unobserve(triggerRef.current)\n }\n }, [context.triggersCount])\n\n React.useEffect(() => {\n if (isSelected && layout) {\n onInteraction?.('select', layout)\n }\n }, [isSelected, value, layout])\n\n return (\n <Theme forceClassName name={isSelected ? 'active' : null}>\n <RovingFocusGroup.Item\n asChild\n {...rovingFocusGroupScope}\n focusable={!disabled}\n active={isSelected}\n >\n <TabsTriggerFrame\n onLayout={(event) => {\n if (!isWeb) {\n setLayout(event.nativeEvent.layout)\n }\n }}\n onHoverIn={composeEventHandlers(props.onHoverIn, () => {\n if (layout) {\n onInteraction?.('hover', layout)\n }\n })}\n onHoverOut={composeEventHandlers(props.onHoverOut, () => {\n onInteraction?.('hover', null)\n })}\n role=\"tab\"\n aria-selected={isSelected}\n aria-controls={contentId}\n data-state={isSelected ? 'active' : 'inactive'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n id={triggerId}\n // @ts-ignore\n size={context.size}\n {...triggerProps}\n ref={composeRefs(forwardedRef, triggerRef)}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n\n const webChecks =\n !isWeb ||\n ((event as unknown as React.MouseEvent).button === 0 &&\n (event as unknown as React.MouseEvent).ctrlKey === false)\n if (!disabled && !isSelected && webChecks) {\n context.onChange(value)\n } else {\n // prevent focus to avoid accidental activation\n event.preventDefault()\n }\n })}\n {...(isWeb && {\n type: 'button',\n onKeyDown: composeEventHandlers(\n (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n (event) => {\n if ([' ', 'Enter'].includes(event.key)) {\n context.onChange(value)\n event.preventDefault()\n }\n }\n ),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n if (layout) {\n onInteraction?.('focus', layout)\n }\n // handle \"automatic\" activation if necessary\n // ie. activate tab following focus\n const isAutomaticActivation = context.activationMode !== 'manual'\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onChange(value)\n }\n }),\n onBlur: composeEventHandlers(props.onFocus, () => {\n onInteraction?.('focus', null)\n }),\n })}\n {...groupItemProps}\n />\n </RovingFocusGroup.Item>\n </Theme>\n )\n }\n )\n)\n\nTabsTrigger.displayName = TRIGGER_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * TabsContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'TabsContent'\n\nconst TabsContentFrame = styled(ThemeableStack, {\n name: CONTENT_NAME,\n})\ntype TabsContentFrameProps = GetProps<typeof TabsContentFrame>\ntype TabsContentProps = TabsContentFrameProps & {\n /** Will show the content when the value matches the state of Tabs root */\n value: string\n\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with Tamagui animations.\n */\n forceMount?: true\n}\n\nconst TabsContent = TabsContentFrame.extractable(\n React.forwardRef<HTMLDivElement, TabsContentProps>(\n (props: ScopedProps<TabsContentProps>, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props\n const context = useTabsContext(CONTENT_NAME, __scopeTabs)\n const isSelected = value === context.value\n const show = forceMount || isSelected\n\n const triggerId = makeTriggerId(context.baseId, value)\n const contentId = makeContentId(context.baseId, value)\n\n if (!show) return null\n return (\n <TabsContentFrame\n key={value}\n data-state={isSelected ? 'active' : 'inactive'}\n data-orientation={context.orientation}\n role=\"tabpanel\"\n aria-labelledby={triggerId}\n // @ts-ignore\n hidden={!show}\n id={contentId}\n tabIndex={0}\n {...contentProps}\n ref={forwardedRef}\n >\n {children}\n </TabsContentFrame>\n )\n }\n )\n)\n\nTabsContent.displayName = CONTENT_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * Tabs\n * -----------------------------------------------------------------------------------------------*/\n\nconst TABS_NAME = 'Tabs'\n\ntype ScopedProps<P> = P & { __scopeTabs?: Scope }\nconst [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope,\n])\nconst useRovingFocusGroupScope = createRovingFocusGroupScope()\n\ntype TabsContextValue = {\n baseId: string\n value?: string\n onChange: (value: string) => void\n orientation?: TabsProps['orientation']\n dir?: TabsProps['dir']\n activationMode?: TabsProps['activationMode']\n size: SizeTokens\n registerTrigger: () => void\n unregisterTrigger: () => void\n triggersCount: number\n}\n\nconst [TabsProvider, useTabsContext] = createTabsContext<TabsContextValue>(TABS_NAME)\n\nconst TabsFrame = styled(SizableStack, {\n name: TABS_NAME,\n})\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup>\ntype TabsFrameProps = GetProps<typeof TabsFrame>\ntype TabsProps = TabsFrameProps & {\n /** The value for the selected tab, if controlled */\n value?: string\n /** The value of the tab to select by default, if uncontrolled */\n defaultValue?: string\n /** A function called when a new tab is selected */\n onValueChange?: (value: string) => void\n /**\n * The orientation the tabs are layed out.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n * @defaultValue horizontal\n */\n orientation?: RovingFocusGroupProps['orientation']\n /**\n * The direction of navigation between toolbar items.\n */\n dir?: RovingFocusGroupProps['dir']\n /**\n * Whether a tab is activated automatically or manually. Only supported in web.\n * @defaultValue automatic\n * */\n activationMode?: 'automatic' | 'manual'\n}\n\nexport const Tabs = withStaticProperties(\n TabsFrame.extractable(\n React.forwardRef<HTMLDivElement, TabsProps>(\n (props: ScopedProps<TabsProps>, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = 'horizontal',\n dir,\n activationMode = 'automatic',\n size = '$true',\n ...tabsProps\n } = props\n const direction = useDirection(dir)\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n })\n const [triggersCount, setTriggersCount] = React.useState(0)\n const registerTrigger = useEvent(() => setTriggersCount((v) => v + 1))\n const unregisterTrigger = useEvent(() => setTriggersCount((v) => v - 1))\n\n return (\n <TabsProvider\n scope={__scopeTabs}\n baseId={useId()}\n value={value}\n onChange={setValue}\n orientation={orientation}\n dir={direction}\n activationMode={activationMode}\n size={size}\n registerTrigger={registerTrigger}\n triggersCount={triggersCount}\n unregisterTrigger={unregisterTrigger}\n >\n <TabsFrame\n direction={direction}\n // dir={direction}\n data-orientation={orientation}\n {...tabsProps}\n ref={forwardedRef}\n />\n </TabsProvider>\n )\n }\n )\n ),\n {\n List: TabsList,\n /**\n * @deprecated Use Tabs.Tab instead\n */\n Trigger: TabsTrigger,\n Tab: TabsTrigger,\n Content: TabsContent,\n }\n)\nTabs.displayName = TABS_NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction makeTriggerId(baseId: string, value: string) {\n return `${baseId}-trigger-${value}`\n}\n\nfunction makeContentId(baseId: string, value: string) {\n return `${baseId}-content-${value}`\n}\n\nexport type {\n TabsProps,\n TabsListProps,\n TabsTriggerProps,\n TabsTriggerLayout,\n TabsTabProps,\n TabsContentProps,\n TabLayout,\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8DU;AA7DV,4BAAmC;AACnC,8BAA+B;AAC/B,mBAAgD;AAChD,0BAA8D;AAC9D,oBAAkE;AAClE,oCAAqC;AACrC,2BAA6B;AAC7B,iBAWO;AACP,YAAuB;AAOvB,MAAM,gBAAgB;AAEtB,MAAM,oBAAgB,mBAAO,oBAAO;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AAAA;AAAA;AAAA;AAIb,CAAC;AAYD,MAAM,WAAW,cAAc;AAAA,EAC7B,MAAM;AAAA,IACJ,CAAC,OAAmC,iBAAiB;AACnD,YAAM,EAAE,aAAa,OAAO,MAAM,UAAU,GAAG,UAAU,IAAI;AAC7D,YAAM,UAAU,eAAe,eAAe,WAAW;AACzD,YAAM,wBAAwB,yBAAyB,WAAW;AAElE,aACE;AAAA,QAAC;AAAA;AAAA,UACC,SAAO;AAAA,UACP,aAAa,QAAQ;AAAA,UACr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|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./Tabs"), module.exports);
|
|
2
19
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './Tabs'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,mBAAd;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|