tamagui 1.125.35 → 1.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/helpers/inputHelpers.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/lib/linear-gradient.native.js.map +1 -1
- package/dist/cjs/linear-gradient.native.js.map +1 -1
- package/dist/cjs/react-native-web/Dimensions.native.js.map +1 -1
- package/dist/cjs/setup.native.js.map +1 -1
- package/dist/cjs/viewTypes.native.js.map +1 -1
- package/dist/cjs/views/Anchor.native.js.map +1 -1
- package/dist/cjs/views/EnsureFlexed.native.js.map +1 -1
- package/dist/cjs/views/Fieldset.native.js.map +1 -1
- package/dist/cjs/views/Input.native.js.map +1 -1
- package/dist/cjs/views/Spinner.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.server.native.js.map +1 -1
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/TextArea.native.js.map +1 -1
- package/dist/cjs/views/VisuallyHidden.native.js.map +1 -1
- package/dist/esm/lib/linear-gradient.native.js.map +1 -1
- package/dist/jsx/createTamagui.native.js.map +1 -1
- package/dist/jsx/helpers/inputHelpers.native.js.map +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/lib/linear-gradient.native.js.map +1 -1
- package/dist/jsx/linear-gradient.native.js.map +1 -1
- package/dist/jsx/react-native-web/Dimensions.native.js.map +1 -1
- package/dist/jsx/setup.native.js.map +1 -1
- package/dist/jsx/views/Anchor.native.js.map +1 -1
- package/dist/jsx/views/EnsureFlexed.native.js.map +1 -1
- package/dist/jsx/views/Fieldset.native.js.map +1 -1
- package/dist/jsx/views/Input.native.js.map +1 -1
- package/dist/jsx/views/Spinner.native.js.map +1 -1
- package/dist/jsx/views/TamaguiProvider.native.js.map +1 -1
- package/dist/jsx/views/TamaguiProvider.server.native.js.map +1 -1
- package/dist/jsx/views/Text.native.js.map +1 -1
- package/dist/jsx/views/TextArea.native.js.map +1 -1
- package/dist/jsx/views/VisuallyHidden.native.js.map +1 -1
- package/dist/native.js +317 -185
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +317 -185
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -8648,7 +8648,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8648
8648
|
});
|
|
8649
8649
|
return;
|
|
8650
8650
|
}
|
|
8651
|
+
var tm;
|
|
8651
8652
|
if (state.unmounted) {
|
|
8653
|
+
var _config_animations2, _animationDriver_supportsCSSVars;
|
|
8654
|
+
if ((_animationDriver_supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars) !== null && _animationDriver_supportsCSSVars !== void 0 ? _animationDriver_supportsCSSVars : !(config == null || (_config_animations2 = config.animations) === null || _config_animations2 === void 0) && _config_animations2.supportsCSSVars) return tm = setTimeout(function() {
|
|
8655
|
+
setStateShallow({
|
|
8656
|
+
unmounted: !1
|
|
8657
|
+
});
|
|
8658
|
+
}), function() {
|
|
8659
|
+
return clearTimeout(tm);
|
|
8660
|
+
};
|
|
8652
8661
|
setStateShallow({
|
|
8653
8662
|
unmounted: !1
|
|
8654
8663
|
});
|
|
@@ -19680,7 +19689,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19680
19689
|
// @ts-ignore
|
|
19681
19690
|
ref: composedRefs,
|
|
19682
19691
|
onDismiss: function() {
|
|
19683
|
-
|
|
19692
|
+
var _context_onOpenChange;
|
|
19693
|
+
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1);
|
|
19684
19694
|
},
|
|
19685
19695
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_focus_scope.FocusScope, {
|
|
19686
19696
|
loop: !0,
|
|
@@ -25793,7 +25803,8 @@ var require_Popover_native = __commonJS({
|
|
|
25793
25803
|
ref: forwardedRef,
|
|
25794
25804
|
componentName: "PopoverClose",
|
|
25795
25805
|
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {
|
|
25796
|
-
|
|
25806
|
+
var _context_onOpenChange;
|
|
25807
|
+
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1, "press");
|
|
25797
25808
|
})
|
|
25798
25809
|
});
|
|
25799
25810
|
}), PopoverArrow = import_popper.PopperArrow.styleable(function(props, forwardedRef) {
|
|
@@ -29926,7 +29937,7 @@ var require_index_native68 = __commonJS({
|
|
|
29926
29937
|
var require_Tabs_native = __commonJS({
|
|
29927
29938
|
"../tabs/dist/cjs/Tabs.native.js"(exports2, module2) {
|
|
29928
29939
|
"use strict";
|
|
29929
|
-
var
|
|
29940
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
29930
29941
|
for (var name in all) __defProp2(target, name, {
|
|
29931
29942
|
get: all[name],
|
|
29932
29943
|
enumerable: !0
|
|
@@ -29954,53 +29965,26 @@ var require_Tabs_native = __commonJS({
|
|
|
29954
29965
|
}
|
|
29955
29966
|
}
|
|
29956
29967
|
return to;
|
|
29957
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
29958
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
29959
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29960
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
29961
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29962
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29963
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
29964
|
-
value: mod,
|
|
29965
|
-
enumerable: !0
|
|
29966
|
-
}) : target,
|
|
29967
|
-
mod
|
|
29968
|
-
);
|
|
29969
29968
|
}, __toCommonJS2 = function(mod) {
|
|
29970
29969
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
29971
29970
|
value: !0
|
|
29972
29971
|
}), mod);
|
|
29973
29972
|
}, Tabs_exports = {};
|
|
29974
29973
|
__export2(Tabs_exports, {
|
|
29975
|
-
|
|
29976
|
-
return
|
|
29974
|
+
DefaultTabsContentFrame: function() {
|
|
29975
|
+
return DefaultTabsContentFrame;
|
|
29977
29976
|
},
|
|
29978
|
-
|
|
29979
|
-
return
|
|
29977
|
+
DefaultTabsFrame: function() {
|
|
29978
|
+
return DefaultTabsFrame;
|
|
29979
|
+
},
|
|
29980
|
+
DefaultTabsTabFrame: function() {
|
|
29981
|
+
return DefaultTabsTabFrame;
|
|
29980
29982
|
}
|
|
29981
29983
|
});
|
|
29982
29984
|
module2.exports = __toCommonJS2(Tabs_exports);
|
|
29983
|
-
var
|
|
29984
|
-
|
|
29985
|
-
|
|
29986
|
-
__scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
|
|
29987
|
-
orientation: context.orientation,
|
|
29988
|
-
dir: context.dir,
|
|
29989
|
-
loop,
|
|
29990
|
-
asChild: !0,
|
|
29991
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_group.Group, {
|
|
29992
|
-
role: "tablist",
|
|
29993
|
-
componentName: TAB_LIST_NAME,
|
|
29994
|
-
"aria-orientation": context.orientation,
|
|
29995
|
-
ref: forwardedRef,
|
|
29996
|
-
orientation: context.orientation,
|
|
29997
|
-
...listProps,
|
|
29998
|
-
children
|
|
29999
|
-
})
|
|
30000
|
-
});
|
|
30001
|
-
});
|
|
30002
|
-
TabsList.displayName = TAB_LIST_NAME;
|
|
30003
|
-
var TRIGGER_NAME = "TabsTrigger", TabsTriggerFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
29985
|
+
var import_core12 = require_index_native18(), import_stacks3 = require_index_native22(), import_get_button_sized2 = require_index_native21(), TABS_NAME = "Tabs", DefaultTabsFrame = (0, import_core12.styled)(import_stacks3.SizableStack, {
|
|
29986
|
+
name: TABS_NAME
|
|
29987
|
+
}), TRIGGER_NAME = "TabsTrigger", DefaultTabsTabFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
30004
29988
|
name: TRIGGER_NAME,
|
|
30005
29989
|
tag: "button",
|
|
30006
29990
|
variants: {
|
|
@@ -30047,160 +30031,291 @@ var require_Tabs_native = __commonJS({
|
|
|
30047
30031
|
defaultVariants: {
|
|
30048
30032
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
30049
30033
|
}
|
|
30050
|
-
}),
|
|
30051
|
-
|
|
30052
|
-
|
|
30034
|
+
}), CONTENT_NAME = "TabsContent", DefaultTabsContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
30035
|
+
name: CONTENT_NAME
|
|
30036
|
+
});
|
|
30037
|
+
}
|
|
30038
|
+
});
|
|
30039
|
+
|
|
30040
|
+
// ../tabs/dist/cjs/StyledContext.native.js
|
|
30041
|
+
var require_StyledContext_native2 = __commonJS({
|
|
30042
|
+
"../tabs/dist/cjs/StyledContext.native.js"(exports2, module2) {
|
|
30043
|
+
"use strict";
|
|
30044
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30045
|
+
for (var name in all) __defProp2(target, name, {
|
|
30046
|
+
get: all[name],
|
|
30047
|
+
enumerable: !0
|
|
30053
30048
|
});
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30058
|
-
|
|
30059
|
-
|
|
30060
|
-
|
|
30061
|
-
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30065
|
-
|
|
30066
|
-
|
|
30067
|
-
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
|
|
30071
|
-
|
|
30072
|
-
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30079
|
-
value
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
|
|
30083
|
-
|
|
30084
|
-
|
|
30085
|
-
|
|
30049
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30050
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30051
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30052
|
+
for (var _loop = function() {
|
|
30053
|
+
var key = _step.value;
|
|
30054
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
30055
|
+
get: function() {
|
|
30056
|
+
return from[key];
|
|
30057
|
+
},
|
|
30058
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
30059
|
+
});
|
|
30060
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
30061
|
+
} catch (err) {
|
|
30062
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
30063
|
+
} finally {
|
|
30064
|
+
try {
|
|
30065
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
30066
|
+
} finally {
|
|
30067
|
+
if (_didIteratorError)
|
|
30068
|
+
throw _iteratorError;
|
|
30069
|
+
}
|
|
30070
|
+
}
|
|
30071
|
+
return to;
|
|
30072
|
+
}, __toCommonJS2 = function(mod) {
|
|
30073
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30074
|
+
value: !0
|
|
30075
|
+
}), mod);
|
|
30076
|
+
}, StyledContext_exports = {};
|
|
30077
|
+
__export2(StyledContext_exports, {
|
|
30078
|
+
TabsProvider: function() {
|
|
30079
|
+
return TabsProvider;
|
|
30080
|
+
},
|
|
30081
|
+
useTabsContext: function() {
|
|
30082
|
+
return useTabsContext;
|
|
30083
|
+
}
|
|
30084
|
+
});
|
|
30085
|
+
module2.exports = __toCommonJS2(StyledContext_exports);
|
|
30086
|
+
var import_core12 = require_index_native18(), { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_core12.createStyledContext)();
|
|
30087
|
+
}
|
|
30088
|
+
});
|
|
30089
|
+
|
|
30090
|
+
// ../tabs/dist/cjs/createTabs.native.js
|
|
30091
|
+
var require_createTabs_native = __commonJS({
|
|
30092
|
+
"../tabs/dist/cjs/createTabs.native.js"(exports2, module2) {
|
|
30093
|
+
"use strict";
|
|
30094
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30095
|
+
for (var name in all) __defProp2(target, name, {
|
|
30096
|
+
get: all[name],
|
|
30097
|
+
enumerable: !0
|
|
30098
|
+
});
|
|
30099
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30100
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30101
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30102
|
+
for (var _loop = function() {
|
|
30103
|
+
var key = _step.value;
|
|
30104
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
30105
|
+
get: function() {
|
|
30106
|
+
return from[key];
|
|
30107
|
+
},
|
|
30108
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
30109
|
+
});
|
|
30110
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
30111
|
+
} catch (err) {
|
|
30112
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
30113
|
+
} finally {
|
|
30114
|
+
try {
|
|
30115
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
30116
|
+
} finally {
|
|
30117
|
+
if (_didIteratorError)
|
|
30118
|
+
throw _iteratorError;
|
|
30119
|
+
}
|
|
30120
|
+
}
|
|
30121
|
+
return to;
|
|
30122
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
30123
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
30124
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30125
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
30126
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30127
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30128
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
30129
|
+
value: mod,
|
|
30130
|
+
enumerable: !0
|
|
30131
|
+
}) : target,
|
|
30132
|
+
mod
|
|
30133
|
+
);
|
|
30134
|
+
}, __toCommonJS2 = function(mod) {
|
|
30135
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30136
|
+
value: !0
|
|
30137
|
+
}), mod);
|
|
30138
|
+
}, createTabs_exports = {};
|
|
30139
|
+
__export2(createTabs_exports, {
|
|
30140
|
+
createTabs: function() {
|
|
30141
|
+
return createTabs;
|
|
30142
|
+
}
|
|
30143
|
+
});
|
|
30144
|
+
module2.exports = __toCommonJS2(createTabs_exports);
|
|
30145
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_group = require_index_native52(), import_helpers = require_index_native7(), import_roving_focus = require_index_native61(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native25(), import_web = require_index_native14(), React4 = __toESM2(require("react")), import_Tabs = require_Tabs_native(), import_StyledContext = require_StyledContext_native2();
|
|
30146
|
+
function createTabs(createProps) {
|
|
30147
|
+
var { ContentFrame = import_Tabs.DefaultTabsContentFrame, TabFrame = import_Tabs.DefaultTabsTabFrame, TabsFrame = import_Tabs.DefaultTabsFrame } = createProps, TABS_CONTEXT = "TabsContext", TAB_LIST_NAME = "TabsList", TabsList = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
30148
|
+
var { __scopeTabs, loop = !0, children, ...listProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
|
|
30149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
30086
30150
|
__scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
|
|
30151
|
+
orientation: context.orientation,
|
|
30152
|
+
dir: context.dir,
|
|
30153
|
+
loop,
|
|
30087
30154
|
asChild: !0,
|
|
30088
|
-
|
|
30089
|
-
|
|
30090
|
-
|
|
30091
|
-
|
|
30092
|
-
|
|
30093
|
-
|
|
30094
|
-
|
|
30095
|
-
|
|
30096
|
-
|
|
30097
|
-
|
|
30098
|
-
|
|
30099
|
-
|
|
30100
|
-
|
|
30101
|
-
|
|
30102
|
-
|
|
30103
|
-
|
|
30104
|
-
|
|
30105
|
-
|
|
30106
|
-
|
|
30107
|
-
|
|
30108
|
-
|
|
30109
|
-
|
|
30110
|
-
|
|
30111
|
-
|
|
30112
|
-
|
|
30113
|
-
|
|
30114
|
-
|
|
30115
|
-
|
|
30116
|
-
|
|
30117
|
-
|
|
30118
|
-
|
|
30119
|
-
|
|
30120
|
-
|
|
30121
|
-
|
|
30122
|
-
|
|
30123
|
-
|
|
30124
|
-
|
|
30125
|
-
|
|
30126
|
-
|
|
30155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_group.Group, {
|
|
30156
|
+
role: "tablist",
|
|
30157
|
+
componentName: TAB_LIST_NAME,
|
|
30158
|
+
"aria-orientation": context.orientation,
|
|
30159
|
+
ref: forwardedRef,
|
|
30160
|
+
orientation: context.orientation,
|
|
30161
|
+
...listProps,
|
|
30162
|
+
children
|
|
30163
|
+
})
|
|
30164
|
+
});
|
|
30165
|
+
});
|
|
30166
|
+
TabsList.displayName = TAB_LIST_NAME;
|
|
30167
|
+
var TRIGGER_NAME = "TabsTrigger", TabsTrigger = TabFrame.styleable(function(props, forwardedRef) {
|
|
30168
|
+
var { __scopeTabs, value, disabled = !1, onInteraction, disableActiveTheme, ...triggerProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value), isSelected = value === context.value, [layout, setLayout] = React4.useState(null), triggerRef = React4.useRef(null), groupItemProps = (0, import_group.useGroupItem)({
|
|
30169
|
+
disabled: !!disabled
|
|
30170
|
+
});
|
|
30171
|
+
React4.useEffect(function() {
|
|
30172
|
+
return context.registerTrigger(), function() {
|
|
30173
|
+
return context.unregisterTrigger();
|
|
30174
|
+
};
|
|
30175
|
+
}, []), React4.useEffect(function() {
|
|
30176
|
+
if (!triggerRef.current || !import_constants4.isWeb) return;
|
|
30177
|
+
function getTriggerSize() {
|
|
30178
|
+
triggerRef.current && setLayout({
|
|
30179
|
+
width: triggerRef.current.offsetWidth,
|
|
30180
|
+
height: triggerRef.current.offsetHeight,
|
|
30181
|
+
x: triggerRef.current.offsetLeft,
|
|
30182
|
+
y: triggerRef.current.offsetTop
|
|
30183
|
+
});
|
|
30184
|
+
}
|
|
30185
|
+
getTriggerSize();
|
|
30186
|
+
var observer = new ResizeObserver(getTriggerSize);
|
|
30187
|
+
return observer.observe(triggerRef.current), function() {
|
|
30188
|
+
triggerRef.current && observer.unobserve(triggerRef.current);
|
|
30189
|
+
};
|
|
30190
|
+
}, [
|
|
30191
|
+
context.triggersCount
|
|
30192
|
+
]), React4.useEffect(function() {
|
|
30193
|
+
isSelected && layout && (onInteraction == null || onInteraction("select", layout));
|
|
30194
|
+
}, [
|
|
30195
|
+
isSelected,
|
|
30196
|
+
value,
|
|
30197
|
+
layout
|
|
30198
|
+
]);
|
|
30199
|
+
var _props_onPress;
|
|
30200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.Theme, {
|
|
30201
|
+
name: isSelected && !disableActiveTheme ? "active" : null,
|
|
30202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_roving_focus.RovingFocusGroup.Item, {
|
|
30203
|
+
__scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
|
|
30204
|
+
asChild: !0,
|
|
30205
|
+
focusable: !disabled,
|
|
30206
|
+
active: isSelected,
|
|
30207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabFrame, {
|
|
30208
|
+
onLayout: function(event) {
|
|
30209
|
+
import_constants4.isWeb || setLayout(event.nativeEvent.layout);
|
|
30210
|
+
},
|
|
30211
|
+
onHoverIn: (0, import_helpers.composeEventHandlers)(props.onHoverIn, function() {
|
|
30212
|
+
layout && (onInteraction == null || onInteraction("hover", layout));
|
|
30127
30213
|
}),
|
|
30128
|
-
|
|
30129
|
-
|
|
30130
|
-
var isAutomaticActivation = context.activationMode !== "manual";
|
|
30131
|
-
!isSelected && !disabled && isAutomaticActivation && context.onChange(value);
|
|
30214
|
+
onHoverOut: (0, import_helpers.composeEventHandlers)(props.onHoverOut, function() {
|
|
30215
|
+
onInteraction == null || onInteraction("hover", null);
|
|
30132
30216
|
}),
|
|
30133
|
-
|
|
30134
|
-
|
|
30135
|
-
|
|
30136
|
-
|
|
30217
|
+
role: "tab",
|
|
30218
|
+
"aria-selected": isSelected,
|
|
30219
|
+
"aria-controls": contentId,
|
|
30220
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
30221
|
+
"data-disabled": disabled ? "" : void 0,
|
|
30222
|
+
disabled,
|
|
30223
|
+
id: triggerId,
|
|
30224
|
+
...!props.unstyled && {
|
|
30225
|
+
size: context.size
|
|
30226
|
+
},
|
|
30227
|
+
...isSelected && {
|
|
30228
|
+
forceStyle: "focus"
|
|
30229
|
+
},
|
|
30230
|
+
...groupItemProps,
|
|
30231
|
+
...triggerProps,
|
|
30232
|
+
ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
|
|
30233
|
+
onPress: (0, import_helpers.composeEventHandlers)((_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : void 0, function(event) {
|
|
30234
|
+
var webChecks = !import_constants4.isWeb || event.button === 0 && event.ctrlKey === !1;
|
|
30235
|
+
!disabled && !isSelected && webChecks ? context.onChange(value) : event.preventDefault();
|
|
30236
|
+
}),
|
|
30237
|
+
...import_constants4.isWeb && {
|
|
30238
|
+
type: "button",
|
|
30239
|
+
onKeyDown: (0, import_helpers.composeEventHandlers)(props.onKeyDown, function(event) {
|
|
30240
|
+
[
|
|
30241
|
+
" ",
|
|
30242
|
+
"Enter"
|
|
30243
|
+
].includes(event.key) && (context.onChange(value), event.preventDefault());
|
|
30244
|
+
}),
|
|
30245
|
+
onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, function(event) {
|
|
30246
|
+
layout && (onInteraction == null || onInteraction("focus", layout));
|
|
30247
|
+
var isAutomaticActivation = context.activationMode !== "manual";
|
|
30248
|
+
!isSelected && !disabled && isAutomaticActivation && context.onChange(value);
|
|
30249
|
+
}),
|
|
30250
|
+
onBlur: (0, import_helpers.composeEventHandlers)(props.onFocus, function() {
|
|
30251
|
+
onInteraction == null || onInteraction("focus", null);
|
|
30252
|
+
})
|
|
30253
|
+
}
|
|
30254
|
+
})
|
|
30137
30255
|
})
|
|
30138
|
-
})
|
|
30256
|
+
});
|
|
30139
30257
|
});
|
|
30140
|
-
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
30146
|
-
|
|
30147
|
-
|
|
30148
|
-
|
|
30149
|
-
|
|
30150
|
-
|
|
30151
|
-
|
|
30152
|
-
|
|
30153
|
-
|
|
30154
|
-
|
|
30155
|
-
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
|
|
30160
|
-
|
|
30161
|
-
|
|
30162
|
-
|
|
30163
|
-
|
|
30164
|
-
|
|
30165
|
-
|
|
30166
|
-
|
|
30167
|
-
|
|
30168
|
-
|
|
30258
|
+
TabsTrigger.displayName = TRIGGER_NAME;
|
|
30259
|
+
var TabsContent = ContentFrame.styleable(function(props, forwardedRef) {
|
|
30260
|
+
var { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
|
|
30261
|
+
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContentFrame, {
|
|
30262
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
30263
|
+
"data-orientation": context.orientation,
|
|
30264
|
+
role: "tabpanel",
|
|
30265
|
+
"aria-labelledby": triggerId,
|
|
30266
|
+
// @ts-ignore
|
|
30267
|
+
hidden: !show,
|
|
30268
|
+
id: contentId,
|
|
30269
|
+
tabIndex: 0,
|
|
30270
|
+
...contentProps,
|
|
30271
|
+
ref: forwardedRef,
|
|
30272
|
+
children
|
|
30273
|
+
}, value) : null;
|
|
30274
|
+
}), TabsComponent = TabsFrame.styleable(function(props, forwardedRef) {
|
|
30275
|
+
var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size: size4 = "$true", ...tabsProps } = props, direction = (0, import_use_direction.useDirection)(dir), [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
30276
|
+
prop: valueProp,
|
|
30277
|
+
onChange: onValueChange,
|
|
30278
|
+
defaultProp: defaultValue ?? ""
|
|
30279
|
+
}), [triggersCount, setTriggersCount] = React4.useState(0), registerTrigger = (0, import_web.useEvent)(function() {
|
|
30280
|
+
return setTriggersCount(function(v) {
|
|
30281
|
+
return v + 1;
|
|
30282
|
+
});
|
|
30283
|
+
}), unregisterTrigger = (0, import_web.useEvent)(function() {
|
|
30284
|
+
return setTriggersCount(function(v) {
|
|
30285
|
+
return v - 1;
|
|
30286
|
+
});
|
|
30169
30287
|
});
|
|
30170
|
-
|
|
30171
|
-
|
|
30172
|
-
|
|
30288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_StyledContext.TabsProvider, {
|
|
30289
|
+
scope: __scopeTabs,
|
|
30290
|
+
baseId: React4.useId(),
|
|
30291
|
+
value,
|
|
30292
|
+
onChange: setValue,
|
|
30293
|
+
orientation,
|
|
30294
|
+
dir: direction,
|
|
30295
|
+
activationMode,
|
|
30296
|
+
size: size4,
|
|
30297
|
+
registerTrigger,
|
|
30298
|
+
triggersCount,
|
|
30299
|
+
unregisterTrigger,
|
|
30300
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsFrame, {
|
|
30301
|
+
direction,
|
|
30302
|
+
// dir={direction}
|
|
30303
|
+
"data-orientation": orientation,
|
|
30304
|
+
...tabsProps,
|
|
30305
|
+
ref: forwardedRef
|
|
30306
|
+
})
|
|
30173
30307
|
});
|
|
30174
30308
|
});
|
|
30175
|
-
return
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
size: size4,
|
|
30184
|
-
registerTrigger,
|
|
30185
|
-
triggersCount,
|
|
30186
|
-
unregisterTrigger,
|
|
30187
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsFrame, {
|
|
30188
|
-
direction,
|
|
30189
|
-
// dir={direction}
|
|
30190
|
-
"data-orientation": orientation,
|
|
30191
|
-
...tabsProps,
|
|
30192
|
-
ref: forwardedRef
|
|
30193
|
-
})
|
|
30309
|
+
return (0, import_helpers.withStaticProperties)(TabsComponent, {
|
|
30310
|
+
List: TabsList,
|
|
30311
|
+
/**
|
|
30312
|
+
* @deprecated Use Tabs.Tab instead
|
|
30313
|
+
*/
|
|
30314
|
+
Trigger: TabsTrigger,
|
|
30315
|
+
Tab: TabsTrigger,
|
|
30316
|
+
Content: TabsContent
|
|
30194
30317
|
});
|
|
30195
|
-
}
|
|
30196
|
-
List: TabsList,
|
|
30197
|
-
/**
|
|
30198
|
-
* @deprecated Use Tabs.Tab instead
|
|
30199
|
-
*/
|
|
30200
|
-
Trigger: TabsTrigger,
|
|
30201
|
-
Tab: TabsTrigger,
|
|
30202
|
-
Content: TabsContent
|
|
30203
|
-
});
|
|
30318
|
+
}
|
|
30204
30319
|
function makeTriggerId(baseId, value) {
|
|
30205
30320
|
return `${baseId}-trigger-${value}`;
|
|
30206
30321
|
}
|
|
@@ -30214,7 +30329,12 @@ var require_Tabs_native = __commonJS({
|
|
|
30214
30329
|
var require_index_native69 = __commonJS({
|
|
30215
30330
|
"../tabs/dist/cjs/index.native.js"(exports2, module2) {
|
|
30216
30331
|
"use strict";
|
|
30217
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty,
|
|
30332
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30333
|
+
for (var name in all) __defProp2(target, name, {
|
|
30334
|
+
get: all[name],
|
|
30335
|
+
enumerable: !0
|
|
30336
|
+
});
|
|
30337
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30218
30338
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30219
30339
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30220
30340
|
for (var _loop = function() {
|
|
@@ -30244,8 +30364,20 @@ var require_index_native69 = __commonJS({
|
|
|
30244
30364
|
value: !0
|
|
30245
30365
|
}), mod);
|
|
30246
30366
|
}, index_exports2 = {};
|
|
30367
|
+
__export2(index_exports2, {
|
|
30368
|
+
Tabs: function() {
|
|
30369
|
+
return Tabs;
|
|
30370
|
+
}
|
|
30371
|
+
});
|
|
30247
30372
|
module2.exports = __toCommonJS2(index_exports2);
|
|
30248
|
-
|
|
30373
|
+
var import_createTabs = require_createTabs_native(), import_Tabs = require_Tabs_native();
|
|
30374
|
+
__reExport2(index_exports2, require_createTabs_native(), module2.exports);
|
|
30375
|
+
__reExport2(index_exports2, require_StyledContext_native2(), module2.exports);
|
|
30376
|
+
var Tabs = (0, import_createTabs.createTabs)({
|
|
30377
|
+
ContentFrame: import_Tabs.DefaultTabsContentFrame,
|
|
30378
|
+
TabFrame: import_Tabs.DefaultTabsTabFrame,
|
|
30379
|
+
TabsFrame: import_Tabs.DefaultTabsFrame
|
|
30380
|
+
});
|
|
30249
30381
|
}
|
|
30250
30382
|
});
|
|
30251
30383
|
|