@tamagui/tabs 2.7.7 → 3.0.0-beta.1091.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.
Files changed (67) hide show
  1. package/dist/cjs/StyledContext.cjs +15 -20
  2. package/dist/cjs/StyledContext.native.cjs +30 -0
  3. package/dist/cjs/StyledContext.native.js +16 -20
  4. package/dist/cjs/StyledContext.native.js.map +1 -1
  5. package/dist/cjs/Tabs.cjs +230 -68
  6. package/dist/cjs/Tabs.native.cjs +253 -0
  7. package/dist/cjs/Tabs.native.js +236 -67
  8. package/dist/cjs/Tabs.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +9 -27
  10. package/dist/cjs/index.native.cjs +21 -0
  11. package/dist/cjs/index.native.js +10 -27
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/esm/StyledContext.mjs +3 -4
  14. package/dist/esm/StyledContext.mjs.map +1 -1
  15. package/dist/esm/StyledContext.native.js +3 -4
  16. package/dist/esm/StyledContext.native.js.map +1 -1
  17. package/dist/esm/Tabs.mjs +210 -55
  18. package/dist/esm/Tabs.mjs.map +1 -1
  19. package/dist/esm/Tabs.native.js +216 -55
  20. package/dist/esm/Tabs.native.js.map +1 -1
  21. package/dist/esm/index.js +3 -11
  22. package/dist/esm/index.mjs +3 -11
  23. package/dist/esm/index.native.js +3 -11
  24. package/dist/jsx/StyledContext.mjs +3 -4
  25. package/dist/jsx/StyledContext.mjs.map +1 -1
  26. package/dist/jsx/StyledContext.native.cjs +30 -0
  27. package/dist/jsx/StyledContext.native.js +16 -20
  28. package/dist/jsx/StyledContext.native.js.map +1 -1
  29. package/dist/jsx/Tabs.mjs +210 -55
  30. package/dist/jsx/Tabs.mjs.map +1 -1
  31. package/dist/jsx/Tabs.native.cjs +253 -0
  32. package/dist/jsx/Tabs.native.js +236 -67
  33. package/dist/jsx/Tabs.native.js.map +1 -1
  34. package/dist/jsx/index.js +3 -11
  35. package/dist/jsx/index.mjs +3 -11
  36. package/dist/jsx/index.native.cjs +21 -0
  37. package/dist/jsx/index.native.js +10 -27
  38. package/dist/jsx/index.native.js.map +1 -1
  39. package/package.json +14 -18
  40. package/src/StyledContext.tsx +3 -3
  41. package/src/Tabs.tsx +379 -55
  42. package/src/index.ts +1 -9
  43. package/types/StyledContext.d.ts +3 -3
  44. package/types/StyledContext.d.ts.map +1 -1
  45. package/types/Tabs.d.ts +398 -35
  46. package/types/Tabs.d.ts.map +1 -1
  47. package/types/index.d.ts +1 -537
  48. package/types/index.d.ts.map +1 -1
  49. package/dist/cjs/createTabs.cjs +0 -293
  50. package/dist/cjs/createTabs.native.js +0 -308
  51. package/dist/cjs/createTabs.native.js.map +0 -1
  52. package/dist/esm/createTabs.mjs +0 -257
  53. package/dist/esm/createTabs.mjs.map +0 -1
  54. package/dist/esm/createTabs.native.js +0 -269
  55. package/dist/esm/createTabs.native.js.map +0 -1
  56. package/dist/esm/index.js.map +0 -1
  57. package/dist/esm/index.mjs.map +0 -1
  58. package/dist/esm/index.native.js.map +0 -1
  59. package/dist/jsx/createTabs.mjs +0 -257
  60. package/dist/jsx/createTabs.mjs.map +0 -1
  61. package/dist/jsx/createTabs.native.js +0 -308
  62. package/dist/jsx/createTabs.native.js.map +0 -1
  63. package/dist/jsx/index.js.map +0 -1
  64. package/dist/jsx/index.mjs.map +0 -1
  65. package/src/createTabs.tsx +0 -438
  66. package/types/createTabs.d.ts +0 -527
  67. package/types/createTabs.d.ts.map +0 -1
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
27
+ }) : target, mod));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var Tabs_exports = {};
30
+ __export(Tabs_exports, {
31
+ Tabs: () => Tabs2,
32
+ TabsContent: () => TabsContent,
33
+ TabsContentFrame: () => TabsContentFrame,
34
+ TabsFrame: () => TabsFrame,
35
+ TabsList: () => TabsList,
36
+ TabsListFrame: () => TabsListFrame,
37
+ TabsTab: () => TabsTab,
38
+ TabsTabFrame: () => TabsTabFrame
39
+ });
40
+ module.exports = __toCommonJS(Tabs_exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_compose_refs = require("@tamagui/compose-refs");
43
+ var import_constants = require("@tamagui/constants");
44
+ var import_core = require("@tamagui/core");
45
+ var import_helpers = require("@tamagui/helpers");
46
+ var import_roving_focus = require("@tamagui/roving-focus");
47
+ var import_size = require("@tamagui/size");
48
+ var import_tabs_headless = require("@tamagui/tabs-headless");
49
+ var import_web = require("@tamagui/web");
50
+ var React = __toESM(require("react"), 1);
51
+ var import_StyledContext = require("./StyledContext.native.js");
52
+ var TABS_CONTEXT = "TabsContext";
53
+ var TabsFrame = (0, import_core.styled)(import_core.View, {
54
+ displayName: "Tabs",
55
+ context: import_size.SizeContext
56
+ });
57
+ var TabsListFrame = (0, import_core.styled)(import_core.View, {
58
+ displayName: "TabsList",
59
+ context: import_size.SizeContext,
60
+ role: "tablist"
61
+ });
62
+ var TabsTabFrame = (0, import_core.styled)(import_core.View, {
63
+ displayName: "TabsTrigger",
64
+ context: import_size.SizeContext,
65
+ role: "tab",
66
+ variants: { disabled: { true: { pointerEvents: "none" } } }
67
+ });
68
+ var TabsContentFrame = (0, import_core.styled)(import_core.View, {
69
+ displayName: "TabsContent",
70
+ context: import_size.SizeContext
71
+ });
72
+ var TabsListDisabledContext = /* @__PURE__ */ React.createContext(false);
73
+ var TabsList = (0, import_core.createStyledHOC)(TabsListFrame, function TabsList2(props, forwardedRef) {
74
+ var { __scopeTabs, loop = true, disabled = false, children, ...listProps } = props;
75
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
76
+ var { listProps: headlessListProps } = (0, import_tabs_headless.useTabsList)({
77
+ orientation: context.orientation,
78
+ disabled
79
+ });
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListDisabledContext.Provider, {
81
+ value: disabled,
82
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {
83
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
84
+ orientation: context.orientation,
85
+ dir: context.dir,
86
+ loop,
87
+ asChild: true,
88
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListFrame, {
89
+ ...headlessListProps,
90
+ flexDirection: context.orientation === "vertical" ? "column" : "row",
91
+ ref: forwardedRef,
92
+ ...listProps,
93
+ children
94
+ })
95
+ })
96
+ });
97
+ });
98
+ var TabsTab = (0, import_core.createStyledHOC)(TabsTabFrame, function TabsTab2(props, forwardedRef) {
99
+ var { __scopeTabs, value, disabled: disabledProp, onInteraction, activeStyle, activeTheme, onLayout, onMouseEnter, onMouseLeave, onPress, onKeyDown, onFocus, onBlur, ...triggerProps } = props;
100
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
101
+ var listDisabled = React.useContext(TabsListDisabledContext);
102
+ var disabled = (disabledProp !== null && disabledProp !== void 0 ? disabledProp : listDisabled) === true;
103
+ var { isSelected, tabProps } = (0, import_tabs_headless.useTab)({
104
+ baseId: context.baseId,
105
+ value,
106
+ selectedValue: context.value,
107
+ disabled,
108
+ activationMode: context.activationMode,
109
+ onChange: context.onChange
110
+ });
111
+ var { onPress: activateOnPress, onKeyDown: activateOnKeyDown, onFocus: activateOnFocus, ...tabA11yProps } = tabProps;
112
+ var [layout, setLayout] = React.useState(null);
113
+ var triggerRef = React.useRef(null);
114
+ var emitInteraction = (0, import_web.useEvent)(function(type, layout2) {
115
+ onInteraction === null || onInteraction === void 0 ? void 0 : onInteraction(type, layout2);
116
+ });
117
+ React.useEffect(function() {
118
+ context.registerTrigger();
119
+ return function() {
120
+ return context.unregisterTrigger();
121
+ };
122
+ }, []);
123
+ React.useEffect(function() {
124
+ if (!triggerRef.current || !import_constants.isWeb) return;
125
+ var element = triggerRef.current;
126
+ function updateTriggerSize() {
127
+ var next = {
128
+ width: element.offsetWidth,
129
+ height: element.offsetHeight,
130
+ x: element.offsetLeft,
131
+ y: element.offsetTop
132
+ };
133
+ setLayout(function(previous) {
134
+ return previous && previous.width === next.width && previous.height === next.height && previous.x === next.x && previous.y === next.y ? previous : next;
135
+ });
136
+ }
137
+ updateTriggerSize();
138
+ var observer = new ResizeObserver(updateTriggerSize);
139
+ observer.observe(element);
140
+ var offsetParent = element.offsetParent;
141
+ if (offsetParent) {
142
+ observer.observe(offsetParent);
143
+ }
144
+ return function() {
145
+ return observer.disconnect();
146
+ };
147
+ }, [context.triggersCount]);
148
+ React.useEffect(function() {
149
+ if (isSelected && layout) {
150
+ emitInteraction("select", layout);
151
+ }
152
+ }, [
153
+ emitInteraction,
154
+ isSelected,
155
+ layout
156
+ ]);
157
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {
158
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
159
+ asChild: true,
160
+ tabIndex: disabled ? -1 : 0,
161
+ active: isSelected,
162
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTabFrame, {
163
+ onLayout: import_constants.isWeb ? onLayout : (0, import_helpers.composeEventHandlers)(onLayout, function(event) {
164
+ setLayout(event.nativeEvent.layout);
165
+ }),
166
+ onMouseEnter: (0, import_helpers.composeEventHandlers)(onMouseEnter, function() {
167
+ if (layout) {
168
+ emitInteraction("hover", layout);
169
+ }
170
+ }),
171
+ onMouseLeave: (0, import_helpers.composeEventHandlers)(onMouseLeave, function() {
172
+ emitInteraction("hover", null);
173
+ }),
174
+ ...tabA11yProps,
175
+ theme: isSelected ? activeTheme !== null && activeTheme !== void 0 ? activeTheme : null : null,
176
+ size: context.size,
177
+ ...triggerProps,
178
+ style: [triggerProps.style, isSelected && activeStyle],
179
+ ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
180
+ onPress: (0, import_helpers.composeEventHandlers)(onPress !== null && onPress !== void 0 ? onPress : void 0, activateOnPress),
181
+ ...import_constants.isWeb && {
182
+ onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, activateOnKeyDown),
183
+ onFocus: (0, import_helpers.composeEventHandlers)(onFocus, (0, import_helpers.composeEventHandlers)(function() {
184
+ if (layout) {
185
+ emitInteraction("focus", layout);
186
+ }
187
+ }, activateOnFocus)),
188
+ onBlur: (0, import_helpers.composeEventHandlers)(onBlur, function() {
189
+ emitInteraction("focus", null);
190
+ })
191
+ }
192
+ })
193
+ });
194
+ });
195
+ var TabsContent = (0, import_core.createStyledHOC)(TabsContentFrame, function TabsContent2(props, forwardedRef) {
196
+ var { __scopeTabs, value, forceMount, children, ...contentProps } = props;
197
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
198
+ var { shouldMount, contentProps: headlessContentProps } = (0, import_tabs_headless.useTabContent)({
199
+ baseId: context.baseId,
200
+ value,
201
+ selectedValue: context.value,
202
+ orientation: context.orientation,
203
+ forceMount
204
+ });
205
+ if (!shouldMount) {
206
+ return null;
207
+ }
208
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContentFrame, {
209
+ ...headlessContentProps,
210
+ ...contentProps,
211
+ ref: forwardedRef,
212
+ children
213
+ }, value);
214
+ });
215
+ var TabsComponent = (0, import_core.createStyledHOC)(TabsFrame, function Tabs(props, forwardedRef) {
216
+ var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size = true, ...tabsProps } = props;
217
+ var { value, setValue, baseId, direction, triggersCount, registerTrigger, unregisterTrigger, tabsProps: headlessTabsProps } = (0, import_tabs_headless.useTabs)({
218
+ value: valueProp,
219
+ onValueChange,
220
+ defaultValue,
221
+ orientation,
222
+ dir,
223
+ activationMode
224
+ });
225
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_size.SizeContext.Provider, {
226
+ size,
227
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledContext.TabsProvider, {
228
+ scope: __scopeTabs,
229
+ baseId,
230
+ value,
231
+ onChange: setValue,
232
+ orientation,
233
+ dir: direction,
234
+ activationMode,
235
+ size,
236
+ registerTrigger,
237
+ triggersCount,
238
+ unregisterTrigger,
239
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsFrame, {
240
+ direction,
241
+ ...headlessTabsProps,
242
+ ...tabsProps,
243
+ ref: forwardedRef
244
+ })
245
+ })
246
+ });
247
+ });
248
+ var Tabs2 = (0, import_helpers.withStaticProperties)(TabsComponent, {
249
+ Frame: TabsFrame,
250
+ List: TabsList,
251
+ Tab: TabsTab,
252
+ Content: TabsContent
253
+ });
@@ -1,86 +1,255 @@
1
1
  "use strict";
2
2
 
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
12
14
  };
13
15
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
21
23
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
27
+ }) : target, mod));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
29
  var Tabs_exports = {};
26
30
  __export(Tabs_exports, {
27
- DefaultTabsContentFrame: () => DefaultTabsContentFrame,
28
- DefaultTabsFrame: () => DefaultTabsFrame,
29
- DefaultTabsTabFrame: () => DefaultTabsTabFrame
31
+ Tabs: () => Tabs2,
32
+ TabsContent: () => TabsContent,
33
+ TabsContentFrame: () => TabsContentFrame,
34
+ TabsFrame: () => TabsFrame,
35
+ TabsList: () => TabsList,
36
+ TabsListFrame: () => TabsListFrame,
37
+ TabsTab: () => TabsTab,
38
+ TabsTabFrame: () => TabsTabFrame
30
39
  });
31
40
  module.exports = __toCommonJS(Tabs_exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_compose_refs = require("@tamagui/compose-refs");
43
+ var import_constants = require("@tamagui/constants");
32
44
  var import_core = require("@tamagui/core");
33
- var import_get_button_sized = require("@tamagui/get-button-sized");
34
- var import_stacks = require("@tamagui/stacks");
35
- var TABS_NAME = "Tabs";
36
- var DefaultTabsFrame = (0, import_core.styled)(import_stacks.SizableStack, {
37
- name: TABS_NAME
45
+ var import_helpers = require("@tamagui/helpers");
46
+ var import_roving_focus = require("@tamagui/roving-focus");
47
+ var import_size = require("@tamagui/size");
48
+ var import_tabs_headless = require("@tamagui/tabs-headless");
49
+ var import_web = require("@tamagui/web");
50
+ var React = __toESM(require("react"), 1);
51
+ var import_StyledContext = require("./StyledContext.native.js");
52
+ var TABS_CONTEXT = "TabsContext";
53
+ var TabsFrame = (0, import_core.styled)(import_core.View, {
54
+ displayName: "Tabs",
55
+ context: import_size.SizeContext
38
56
  });
39
- var TRIGGER_NAME = "TabsTrigger";
40
- var DefaultTabsTabFrame = (0, import_core.styled)(import_core.View, {
41
- name: TRIGGER_NAME,
42
- role: "tab",
43
- variants: {
44
- size: {
45
- "...size": import_get_button_sized.getButtonSized
46
- },
47
- disabled: {
48
- true: {
49
- pointerEvents: "none"
50
- }
51
- },
52
- unstyled: {
53
- false: {
54
- borderWidth: 0,
55
- backgroundColor: "$background",
56
- userSelect: "none",
57
- justifyContent: "center",
58
- alignItems: "center",
59
- flexWrap: "nowrap",
60
- flexDirection: "row",
61
- cursor: "pointer",
62
- pressStyle: {
63
- backgroundColor: "$backgroundPress"
64
- },
65
- focusVisibleStyle: {
66
- outlineColor: "$outlineColor",
67
- outlineWidth: 2,
68
- outlineStyle: "solid",
69
- zIndex: 10
70
- }
71
- }
72
- }
73
- },
74
- defaultVariants: {
75
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
76
- }
77
- }, {
78
- accept: {
79
- activeStyle: "style"
80
- }
57
+ var TabsListFrame = (0, import_core.styled)(import_core.View, {
58
+ displayName: "TabsList",
59
+ context: import_size.SizeContext,
60
+ role: "tablist"
81
61
  });
82
- var CONTENT_NAME = "TabsContent";
83
- var DefaultTabsContentFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
84
- name: CONTENT_NAME
62
+ var TabsTabFrame = (0, import_core.styled)(import_core.View, {
63
+ displayName: "TabsTrigger",
64
+ context: import_size.SizeContext,
65
+ role: "tab",
66
+ variants: { disabled: { true: { pointerEvents: "none" } } }
85
67
  });
68
+ var TabsContentFrame = (0, import_core.styled)(import_core.View, {
69
+ displayName: "TabsContent",
70
+ context: import_size.SizeContext
71
+ });
72
+ var TabsListDisabledContext = /* @__PURE__ */ React.createContext(false);
73
+ var TabsList = (0, import_core.createStyledHOC)(TabsListFrame, function TabsList2(props, forwardedRef) {
74
+ var { __scopeTabs, loop = true, disabled = false, children, ...listProps } = props;
75
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
76
+ var { listProps: headlessListProps } = (0, import_tabs_headless.useTabsList)({
77
+ orientation: context.orientation,
78
+ disabled
79
+ });
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListDisabledContext.Provider, {
81
+ value: disabled,
82
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {
83
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
84
+ orientation: context.orientation,
85
+ dir: context.dir,
86
+ loop,
87
+ asChild: true,
88
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListFrame, {
89
+ ...headlessListProps,
90
+ flexDirection: context.orientation === "vertical" ? "column" : "row",
91
+ ref: forwardedRef,
92
+ ...listProps,
93
+ children
94
+ })
95
+ })
96
+ });
97
+ });
98
+ var TabsTab = (0, import_core.createStyledHOC)(TabsTabFrame, function TabsTab2(props, forwardedRef) {
99
+ var { __scopeTabs, value, disabled: disabledProp, onInteraction, activeStyle, activeTheme, onLayout, onMouseEnter, onMouseLeave, onPress, onKeyDown, onFocus, onBlur, ...triggerProps } = props;
100
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
101
+ var listDisabled = React.useContext(TabsListDisabledContext);
102
+ var disabled = (disabledProp !== null && disabledProp !== void 0 ? disabledProp : listDisabled) === true;
103
+ var { isSelected, tabProps } = (0, import_tabs_headless.useTab)({
104
+ baseId: context.baseId,
105
+ value,
106
+ selectedValue: context.value,
107
+ disabled,
108
+ activationMode: context.activationMode,
109
+ onChange: context.onChange
110
+ });
111
+ var { onPress: activateOnPress, onKeyDown: activateOnKeyDown, onFocus: activateOnFocus, ...tabA11yProps } = tabProps;
112
+ var [layout, setLayout] = React.useState(null);
113
+ var triggerRef = React.useRef(null);
114
+ var emitInteraction = (0, import_web.useEvent)(function(type, layout2) {
115
+ onInteraction === null || onInteraction === void 0 ? void 0 : onInteraction(type, layout2);
116
+ });
117
+ React.useEffect(function() {
118
+ context.registerTrigger();
119
+ return function() {
120
+ return context.unregisterTrigger();
121
+ };
122
+ }, []);
123
+ React.useEffect(function() {
124
+ if (!triggerRef.current || !import_constants.isWeb) return;
125
+ var element = triggerRef.current;
126
+ function updateTriggerSize() {
127
+ var next = {
128
+ width: element.offsetWidth,
129
+ height: element.offsetHeight,
130
+ x: element.offsetLeft,
131
+ y: element.offsetTop
132
+ };
133
+ setLayout(function(previous) {
134
+ return previous && previous.width === next.width && previous.height === next.height && previous.x === next.x && previous.y === next.y ? previous : next;
135
+ });
136
+ }
137
+ updateTriggerSize();
138
+ var observer = new ResizeObserver(updateTriggerSize);
139
+ observer.observe(element);
140
+ var offsetParent = element.offsetParent;
141
+ if (offsetParent) {
142
+ observer.observe(offsetParent);
143
+ }
144
+ return function() {
145
+ return observer.disconnect();
146
+ };
147
+ }, [context.triggersCount]);
148
+ React.useEffect(function() {
149
+ if (isSelected && layout) {
150
+ emitInteraction("select", layout);
151
+ }
152
+ }, [
153
+ emitInteraction,
154
+ isSelected,
155
+ layout
156
+ ]);
157
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {
158
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
159
+ asChild: true,
160
+ tabIndex: disabled ? -1 : 0,
161
+ active: isSelected,
162
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTabFrame, {
163
+ onLayout: import_constants.isWeb ? onLayout : (0, import_helpers.composeEventHandlers)(onLayout, function(event) {
164
+ setLayout(event.nativeEvent.layout);
165
+ }),
166
+ onMouseEnter: (0, import_helpers.composeEventHandlers)(onMouseEnter, function() {
167
+ if (layout) {
168
+ emitInteraction("hover", layout);
169
+ }
170
+ }),
171
+ onMouseLeave: (0, import_helpers.composeEventHandlers)(onMouseLeave, function() {
172
+ emitInteraction("hover", null);
173
+ }),
174
+ ...tabA11yProps,
175
+ theme: isSelected ? activeTheme !== null && activeTheme !== void 0 ? activeTheme : null : null,
176
+ size: context.size,
177
+ ...triggerProps,
178
+ style: [triggerProps.style, isSelected && activeStyle],
179
+ ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
180
+ onPress: (0, import_helpers.composeEventHandlers)(onPress !== null && onPress !== void 0 ? onPress : void 0, activateOnPress),
181
+ ...import_constants.isWeb && {
182
+ onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, activateOnKeyDown),
183
+ onFocus: (0, import_helpers.composeEventHandlers)(onFocus, (0, import_helpers.composeEventHandlers)(function() {
184
+ if (layout) {
185
+ emitInteraction("focus", layout);
186
+ }
187
+ }, activateOnFocus)),
188
+ onBlur: (0, import_helpers.composeEventHandlers)(onBlur, function() {
189
+ emitInteraction("focus", null);
190
+ })
191
+ }
192
+ })
193
+ });
194
+ });
195
+ var TabsContent = (0, import_core.createStyledHOC)(TabsContentFrame, function TabsContent2(props, forwardedRef) {
196
+ var { __scopeTabs, value, forceMount, children, ...contentProps } = props;
197
+ var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
198
+ var { shouldMount, contentProps: headlessContentProps } = (0, import_tabs_headless.useTabContent)({
199
+ baseId: context.baseId,
200
+ value,
201
+ selectedValue: context.value,
202
+ orientation: context.orientation,
203
+ forceMount
204
+ });
205
+ if (!shouldMount) {
206
+ return null;
207
+ }
208
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContentFrame, {
209
+ ...headlessContentProps,
210
+ ...contentProps,
211
+ ref: forwardedRef,
212
+ children
213
+ }, value);
214
+ });
215
+ var TabsComponent = (0, import_core.createStyledHOC)(TabsFrame, function Tabs(props, forwardedRef) {
216
+ var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size = true, ...tabsProps } = props;
217
+ var { value, setValue, baseId, direction, triggersCount, registerTrigger, unregisterTrigger, tabsProps: headlessTabsProps } = (0, import_tabs_headless.useTabs)({
218
+ value: valueProp,
219
+ onValueChange,
220
+ defaultValue,
221
+ orientation,
222
+ dir,
223
+ activationMode
224
+ });
225
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_size.SizeContext.Provider, {
226
+ size,
227
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledContext.TabsProvider, {
228
+ scope: __scopeTabs,
229
+ baseId,
230
+ value,
231
+ onChange: setValue,
232
+ orientation,
233
+ dir: direction,
234
+ activationMode,
235
+ size,
236
+ registerTrigger,
237
+ triggersCount,
238
+ unregisterTrigger,
239
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsFrame, {
240
+ direction,
241
+ ...headlessTabsProps,
242
+ ...tabsProps,
243
+ ref: forwardedRef
244
+ })
245
+ })
246
+ });
247
+ });
248
+ var Tabs2 = (0, import_helpers.withStaticProperties)(TabsComponent, {
249
+ Frame: TabsFrame,
250
+ List: TabsList,
251
+ Tab: TabsTab,
252
+ Content: TabsContent
253
+ });
254
+
86
255
  //# sourceMappingURL=Tabs.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Tabs_exports","__export","DefaultTabsContentFrame","DefaultTabsFrame","DefaultTabsTabFrame","module","exports","import_core","require","import_get_button_sized","import_stacks","TABS_NAME","styled","SizableStack","name","TRIGGER_NAME","View","role","variants","size","getButtonSized","disabled","true","pointerEvents","unstyled","false","borderWidth","backgroundColor","userSelect","justifyContent","alignItems","flexWrap","flexDirection","cursor","pressStyle","focusVisibleStyle","outlineColor","outlineWidth","outlineStyle","zIndex","defaultVariants","process","env","TAMAGUI_HEADLESS","accept","activeStyle","CONTENT_NAME","ThemeableStack"],"sources":["../../src/Tabs.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,uBAAA,EAAAA,CAAA,KAAAA,uBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAA6B,CAAAK,YAAA;AAC7B,IAAAO,WAAA,GAAAC,OAAA,gBAA+B;AAC/B,IAAAC,uBAA6C,GAAAD,OAAA;AAE7C,IAAAE,aAAM,GAAYF,OAAA;AACX,IAAAG,SAAM;AAAwC,IACnDR,gBAAM,OAAAI,WAAA,CAAAK,MAAA,EAAAF,aAAA,CAAAG,YAAA;EACPC,IAAA,EAAAH;AAED;AAEO,IAAAI,YAAM,gBAAsB;AAAA,IACjCX,mBAAA,OAAAG,WAAA,CAAAK,MAAA,EAAAL,WAAA,CAAAS,IAAA;EACAF,IAAA,EAAAC,YAAA;EAAAE,IACE,OAAM;EAAAC,QACA;IAENC,IAAA;MACE,SAAM,EAAAV,uBAAA,CAAAW;IAAA;IACOC,QACb;MAEAC,IAAA;QACEC,aAAM;MAAA;IACW;IACjBC,QACF;MAEAC,KAAA;QACEC,WAAO;QAAAC,eACQ;QAAAC,UACb;QAAiBC,cACL;QAAAC,UACZ,UAAgB;QAAAC,QAChB,UAAY;QAAAC,aACF;QAAAC,MACV,WAAe;QAAAC,UACP;UAERP,eAAY;QAAA;QACOQ,iBACnB;UAEAC,YAAA,iBAAmB;UAAAC,YACjB;UAAcC,YACd,SAAc;UAAAC,MACd;QAAc;MACN;IACV;EACF;EACFC,eACF;IAEAhB,QAAA,EAAAiB,OAAiB,CAAAC,GAAA,CAAAC,gBAAA;EAAA;AAC4B;EAE/CC,MAAA;IACAC,WAAA;EAAA;AACU;AACO,IACfC,YAAA;AAAA,IACF5C,uBAAA,OAAAK,WAAA,CAAAK,MAAA,EAAAF,aAAA,CAAAqC,cAAA;EACFjC,IAAA,EAAAgC;AAEA","ignoreList":[]}
1
+ {"version":3,"file":"Tabs.native.js","names":[],"sources":["cjs/Tabs.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Tabs_exports = {};\n__export(Tabs_exports, {\n Tabs: () => Tabs2,\n TabsContent: () => TabsContent,\n TabsContentFrame: () => TabsContentFrame,\n TabsFrame: () => TabsFrame,\n TabsList: () => TabsList,\n TabsListFrame: () => TabsListFrame,\n TabsTab: () => TabsTab,\n TabsTabFrame: () => TabsTabFrame\n});\nmodule.exports = __toCommonJS(Tabs_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_roving_focus = require(\"@tamagui/roving-focus\");\nvar import_size = require(\"@tamagui/size\");\nvar import_tabs_headless = require(\"@tamagui/tabs-headless\");\nvar import_web = require(\"@tamagui/web\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_StyledContext = require(\"./StyledContext\");\nvar TABS_CONTEXT = \"TabsContext\";\nvar TabsFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"Tabs\",\n context: import_size.SizeContext\n});\nvar TabsListFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"TabsList\",\n context: import_size.SizeContext,\n role: \"tablist\"\n});\nvar TabsTabFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"TabsTrigger\",\n context: import_size.SizeContext,\n role: \"tab\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar TabsContentFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"TabsContent\",\n context: import_size.SizeContext\n});\nvar TabsListDisabledContext = /* @__PURE__ */ React.createContext(false);\nvar TabsList = (0, import_core.createStyledHOC)(TabsListFrame, function TabsList2(props, forwardedRef) {\n var { __scopeTabs, loop = true, disabled = false, children, ...listProps } = props;\n var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);\n var { listProps: headlessListProps } = (0, import_tabs_headless.useTabsList)({\n orientation: context.orientation,\n disabled\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListDisabledContext.Provider, {\n value: disabled,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {\n __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n asChild: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsListFrame, {\n ...headlessListProps,\n flexDirection: context.orientation === \"vertical\" ? \"column\" : \"row\",\n ref: forwardedRef,\n ...listProps,\n children\n })\n })\n });\n});\nvar TabsTab = (0, import_core.createStyledHOC)(TabsTabFrame, function TabsTab2(props, forwardedRef) {\n var { __scopeTabs, value, disabled: disabledProp, onInteraction, activeStyle, activeTheme, onLayout, onMouseEnter, onMouseLeave, onPress, onKeyDown, onFocus, onBlur, ...triggerProps } = props;\n var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);\n var listDisabled = React.useContext(TabsListDisabledContext);\n var disabled = (disabledProp !== null && disabledProp !== void 0 ? disabledProp : listDisabled) === true;\n var { isSelected, tabProps } = (0, import_tabs_headless.useTab)({\n baseId: context.baseId,\n value,\n selectedValue: context.value,\n disabled,\n activationMode: context.activationMode,\n onChange: context.onChange\n });\n var { onPress: activateOnPress, onKeyDown: activateOnKeyDown, onFocus: activateOnFocus, ...tabA11yProps } = tabProps;\n var [layout, setLayout] = React.useState(null);\n var triggerRef = React.useRef(null);\n var emitInteraction = (0, import_web.useEvent)(function(type, layout2) {\n onInteraction === null || onInteraction === void 0 ? void 0 : onInteraction(type, layout2);\n });\n React.useEffect(function() {\n context.registerTrigger();\n return function() {\n return context.unregisterTrigger();\n };\n }, []);\n React.useEffect(function() {\n if (!triggerRef.current || !import_constants.isWeb) return;\n var element = triggerRef.current;\n function updateTriggerSize() {\n var next = {\n width: element.offsetWidth,\n height: element.offsetHeight,\n x: element.offsetLeft,\n y: element.offsetTop\n };\n setLayout(function(previous) {\n return previous && previous.width === next.width && previous.height === next.height && previous.x === next.x && previous.y === next.y ? previous : next;\n });\n }\n updateTriggerSize();\n var observer = new ResizeObserver(updateTriggerSize);\n observer.observe(element);\n var offsetParent = element.offsetParent;\n if (offsetParent) {\n observer.observe(offsetParent);\n }\n return function() {\n return observer.disconnect();\n };\n }, [\n context.triggersCount\n ]);\n React.useEffect(function() {\n if (isSelected && layout) {\n emitInteraction(\"select\", layout);\n }\n }, [\n emitInteraction,\n isSelected,\n layout\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {\n __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,\n asChild: true,\n tabIndex: disabled ? -1 : 0,\n active: isSelected,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTabFrame, {\n onLayout: import_constants.isWeb ? onLayout : (0, import_helpers.composeEventHandlers)(onLayout, function(event) {\n setLayout(event.nativeEvent.layout);\n }),\n onMouseEnter: (0, import_helpers.composeEventHandlers)(onMouseEnter, function() {\n if (layout) {\n emitInteraction(\"hover\", layout);\n }\n }),\n onMouseLeave: (0, import_helpers.composeEventHandlers)(onMouseLeave, function() {\n emitInteraction(\"hover\", null);\n }),\n ...tabA11yProps,\n theme: isSelected ? activeTheme !== null && activeTheme !== void 0 ? activeTheme : null : null,\n size: context.size,\n ...triggerProps,\n // after triggerProps so active styles beat base styles from styled() skins\n style: [\n triggerProps.style,\n isSelected && activeStyle\n ],\n ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),\n onPress: (0, import_helpers.composeEventHandlers)(onPress !== null && onPress !== void 0 ? onPress : void 0, activateOnPress),\n ...import_constants.isWeb && {\n onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, activateOnKeyDown),\n // emit the focus interaction before activating, matching the order\n // the indicator animations were built against\n onFocus: (0, import_helpers.composeEventHandlers)(onFocus, (0, import_helpers.composeEventHandlers)(function() {\n if (layout) {\n emitInteraction(\"focus\", layout);\n }\n }, activateOnFocus)),\n onBlur: (0, import_helpers.composeEventHandlers)(onBlur, function() {\n emitInteraction(\"focus\", null);\n })\n }\n })\n });\n});\nvar TabsContent = (0, import_core.createStyledHOC)(TabsContentFrame, function TabsContent2(props, forwardedRef) {\n var { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n var context = (0, import_StyledContext.useTabsContext)(__scopeTabs);\n var { shouldMount, contentProps: headlessContentProps } = (0, import_tabs_headless.useTabContent)({\n baseId: context.baseId,\n value,\n selectedValue: context.value,\n orientation: context.orientation,\n forceMount\n });\n if (!shouldMount) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContentFrame, {\n // @ts-ignore hidden is a web-only accessibility attribute\n ...headlessContentProps,\n ...contentProps,\n ref: forwardedRef,\n children\n }, value);\n});\nvar TabsComponent = (0, import_core.createStyledHOC)(TabsFrame, function Tabs(props, forwardedRef) {\n var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = \"horizontal\", dir, activationMode = \"automatic\", size = true, ...tabsProps } = props;\n var { value, setValue, baseId, direction, triggersCount, registerTrigger, unregisterTrigger, tabsProps: headlessTabsProps } = (0, import_tabs_headless.useTabs)({\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation,\n dir,\n activationMode\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_size.SizeContext.Provider, {\n size,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledContext.TabsProvider, {\n scope: __scopeTabs,\n baseId,\n value,\n onChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n size,\n registerTrigger,\n triggersCount,\n unregisterTrigger,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsFrame, {\n direction,\n ...headlessTabsProps,\n ...tabsProps,\n ref: forwardedRef\n })\n })\n });\n});\nvar Tabs2 = (0, import_helpers.withStaticProperties)(TabsComponent, {\n Frame: TabsFrame,\n List: TabsList,\n Tab: TabsTab,\n Content: TabsContent\n});\n//# sourceMappingURL=T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aAAa,OAAO,WAAW,eAAe,cAAc,cAAc,cAAc,KAAK,iBAAiB,aAAa,OAAO,MAAM,GAAG,cAAc;CAC/J,IAAI,EAAE,OAAO,UAAU,QAAQ,WAAW,eAAe,iBAAiB,mBAAmB,WAAW,uBAAuB,GAAG,qBAAqB,QAAO,CAAE;EAC9J,OAAO;EACP;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY,YAAY,UAAU;EACnF;EACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB,cAAc;GACvF,OAAO;GACP;GACA;GACA,UAAU;GACV;GACA,KAAK;GACL;GACA;GACA;GACA;GACA;GACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,WAAW;IAC/D;IACA,GAAG;IACH,GAAG;IACH,KAAK;GACP,CAAC;EACH,CAAC;CACH,CAAC;AACH,CAAC;AACD,IAAI,SAAS,GAAG,eAAe,qBAAoB,CAAE,eAAe;CAClE,OAAO;CACP,MAAM;CACN,KAAK;CACL,SAAS;AACX,CAAC"}
@@ -2,36 +2,18 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
5
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
12
+ return to;
19
13
  };
20
14
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
22
- value: true
23
- }), mod);
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
16
  var index_exports = {};
25
- __export(index_exports, {
26
- Tabs: () => Tabs
27
- });
28
17
  module.exports = __toCommonJS(index_exports);
29
- var import_createTabs = require("./createTabs.cjs");
30
- var import_Tabs = require("./Tabs.cjs");
31
- __reExport(index_exports, require("./createTabs.cjs"), module.exports);
32
18
  __reExport(index_exports, require("./StyledContext.cjs"), module.exports);
33
- const Tabs = (0, import_createTabs.createTabs)({
34
- ContentFrame: import_Tabs.DefaultTabsContentFrame,
35
- TabFrame: import_Tabs.DefaultTabsTabFrame,
36
- TabsFrame: import_Tabs.DefaultTabsFrame
37
- });
19
+ __reExport(index_exports, require("./Tabs.cjs"), module.exports);