tamagui 1.122.8 → 1.123.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/native.js +168 -105
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +162 -97
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -1115,7 +1115,7 @@ var require_types_native2 = __commonJS({
|
|
|
1115
1115
|
var require_constants_native = __commonJS({
|
|
1116
1116
|
"../../core/constants/dist/cjs/constants.native.js"(exports2, module2) {
|
|
1117
1117
|
"use strict";
|
|
1118
|
-
var
|
|
1118
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
1119
1119
|
for (var name in all) __defProp2(target, name, {
|
|
1120
1120
|
get: all[name],
|
|
1121
1121
|
enumerable: !0
|
|
@@ -1143,18 +1143,6 @@ var require_constants_native = __commonJS({
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
return to;
|
|
1146
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
1147
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
1148
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1149
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1150
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1151
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1152
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
1153
|
-
value: mod,
|
|
1154
|
-
enumerable: !0
|
|
1155
|
-
}) : target,
|
|
1156
|
-
mod
|
|
1157
|
-
);
|
|
1158
1146
|
}, __toCommonJS2 = function(mod) {
|
|
1159
1147
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
1160
1148
|
value: !0
|
|
@@ -1196,7 +1184,7 @@ var require_constants_native = __commonJS({
|
|
|
1196
1184
|
}
|
|
1197
1185
|
});
|
|
1198
1186
|
module2.exports = __toCommonJS2(constants_native_exports);
|
|
1199
|
-
var import_react3 =
|
|
1187
|
+
var import_react3 = require("react"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = !1, isIos = process.env.TEST_NATIVE_PLATFORM === "ios", currentPlatform = "native";
|
|
1200
1188
|
}
|
|
1201
1189
|
});
|
|
1202
1190
|
|
|
@@ -1362,9 +1350,6 @@ var require_validStyleProps_native = __commonJS({
|
|
|
1362
1350
|
stylePropsAll: function() {
|
|
1363
1351
|
return stylePropsAll;
|
|
1364
1352
|
},
|
|
1365
|
-
stylePropsFont: function() {
|
|
1366
|
-
return stylePropsFont;
|
|
1367
|
-
},
|
|
1368
1353
|
stylePropsText: function() {
|
|
1369
1354
|
return stylePropsText;
|
|
1370
1355
|
},
|
|
@@ -3948,73 +3933,61 @@ var require_useTheme_native = __commonJS({
|
|
|
3948
3933
|
process.env.NODE_ENV === "development" && (state != null && state.theme || process.env.TAMAGUI_DISABLE_NO_THEME_WARNING !== "1" && console.error(`[tamagui] No theme found, this could be due to an invalid theme name (given theme props ${JSON.stringify(props)}).
|
|
3949
3934
|
|
|
3950
3935
|
If this is intended and you are using Tamagui without any themes, you can disable this warning by setting the environment variable TAMAGUI_DISABLE_NO_THEME_WARNING=1`));
|
|
3951
|
-
var themeProxied = (
|
|
3952
|
-
return keys.current && (keys.current = null), !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, keys, themeManager, props.debug);
|
|
3953
|
-
}, [
|
|
3954
|
-
state == null ? void 0 : state.theme,
|
|
3955
|
-
themeManager,
|
|
3956
|
-
props.deopt,
|
|
3957
|
-
props.debug
|
|
3958
|
-
]);
|
|
3936
|
+
var themeProxied = getThemeProxied(props, state, keys, themeManager);
|
|
3959
3937
|
return process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(` \u{1F539} [${themeManager == null ? void 0 : themeManager.id}] useTheme =>`, state == null ? void 0 : state.name), console.info("returning state", changedThemeState.state, changedThemeState.isNewTheme, "from props", props), console.groupEnd()), [
|
|
3960
3938
|
changedThemeState,
|
|
3961
3939
|
themeProxied
|
|
3962
3940
|
];
|
|
3963
|
-
};
|
|
3964
|
-
function getThemeProxied(
|
|
3965
|
-
var
|
|
3966
|
-
if (!theme) return
|
|
3967
|
-
|
|
3941
|
+
}, emptyObject = {}, ProxiedThemes = /* @__PURE__ */ new Map(), curKeys, curProps, curThemeManger;
|
|
3942
|
+
function getThemeProxied(_props, state, _keys, _themeManager) {
|
|
3943
|
+
var theme = state == null ? void 0 : state.theme;
|
|
3944
|
+
if (!theme || !_themeManager) return emptyObject;
|
|
3945
|
+
if (curKeys = _keys, curProps = _props, curThemeManger = _themeManager, ProxiedThemes.has(theme)) {
|
|
3946
|
+
var proxied = ProxiedThemes.get(theme);
|
|
3947
|
+
return proxied;
|
|
3948
|
+
}
|
|
3949
|
+
var { name, scheme } = state, config = (0, import_config.getConfig)();
|
|
3968
3950
|
function track(key) {
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
[scheme]: color,
|
|
3996
|
-
[oppositeScheme]: oppositeColor
|
|
3997
|
-
}
|
|
3998
|
-
};
|
|
3999
|
-
return dynamicVal;
|
|
4000
|
-
}
|
|
4001
|
-
return process.env.NODE_ENV === "development" && debug && console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
4002
|
-
not web: ${platform2 !== "web"}
|
|
4003
|
-
isIOS: ${import_constants4.isIos}
|
|
4004
|
-
deopt: ${deopt}
|
|
4005
|
-
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
4006
|
-
inversed: ${getIsInversed(themeManager)}
|
|
4007
|
-
`), track(keyString), outVal;
|
|
4008
|
-
};
|
|
4009
|
-
return Reflect.get(val, subkey);
|
|
4010
|
-
}
|
|
4011
|
-
});
|
|
4012
|
-
if (process.env.NODE_ENV === "development" && process.env.TAMAGUI_FEAT_THROW_ON_MISSING_THEME_VALUE === "1") throw new Error(`[tamagui] No theme key "${key}" found in theme ${name}.
|
|
4013
|
-
Keys in theme: ${Object.keys(theme).join(", ")}`);
|
|
3951
|
+
curKeys && (curKeys.current || (curKeys.current = []), curKeys.current.push(key), process.env.NODE_ENV === "development" && curProps.debug && console.info(` \u{1F3A8} useTheme() tracking new key: ${key}`));
|
|
3952
|
+
}
|
|
3953
|
+
var proxied1 = Object.fromEntries(Object.entries(theme).flatMap(function(param) {
|
|
3954
|
+
var [key, value] = param, proxied2 = {
|
|
3955
|
+
...value,
|
|
3956
|
+
get val() {
|
|
3957
|
+
return globalThis.tamaguiAvoidTracking || track(key), value.val;
|
|
3958
|
+
},
|
|
3959
|
+
get(platform2) {
|
|
3960
|
+
var outVal = (0, import_createVariable.getVariable)(value);
|
|
3961
|
+
if (platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && !(0, import_shouldDeoptDueToParentScheme.shouldDeoptDueToParentScheme)(curThemeManger) && scheme) {
|
|
3962
|
+
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = {
|
|
3963
|
+
dynamic: {
|
|
3964
|
+
[scheme]: color,
|
|
3965
|
+
[oppositeScheme]: oppositeColor
|
|
3966
|
+
}
|
|
3967
|
+
};
|
|
3968
|
+
return dynamicVal;
|
|
3969
|
+
}
|
|
3970
|
+
return process.env.NODE_ENV === "development" && curProps.debug && console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
3971
|
+
not web: ${platform2 !== "web"}
|
|
3972
|
+
isIOS: ${import_constants4.isIos}
|
|
3973
|
+
deopt: ${curProps.deopt}
|
|
3974
|
+
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
3975
|
+
inversed: ${getIsInversed(curThemeManger)}
|
|
3976
|
+
`), track(key), outVal;
|
|
4014
3977
|
}
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
3978
|
+
};
|
|
3979
|
+
return [
|
|
3980
|
+
[
|
|
3981
|
+
key,
|
|
3982
|
+
proxied2
|
|
3983
|
+
],
|
|
3984
|
+
[
|
|
3985
|
+
`$${key}`,
|
|
3986
|
+
proxied2
|
|
3987
|
+
]
|
|
3988
|
+
];
|
|
3989
|
+
}));
|
|
3990
|
+
return ProxiedThemes.set(theme, proxied1), proxied1;
|
|
4018
3991
|
}
|
|
4019
3992
|
function getIsInversed(manager) {
|
|
4020
3993
|
for (var isInversed = !1, cur = manager; cur; ) {
|
|
@@ -9547,7 +9520,7 @@ var require_proxyThemeToParents_native = __commonJS({
|
|
|
9547
9520
|
}
|
|
9548
9521
|
});
|
|
9549
9522
|
module2.exports = __toCommonJS2(proxyThemeToParents_exports);
|
|
9550
|
-
var
|
|
9523
|
+
var themesRaw = {};
|
|
9551
9524
|
function proxyThemesToParents(dedupedThemes) {
|
|
9552
9525
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
9553
9526
|
try {
|
|
@@ -9608,21 +9581,24 @@ var require_proxyThemeToParents_native = __commonJS({
|
|
|
9608
9581
|
return themes;
|
|
9609
9582
|
}
|
|
9610
9583
|
function proxyThemeToParents(themeName, theme) {
|
|
9611
|
-
var cur = [], parents = themeName.split("_").slice(0, -1).map(function(part) {
|
|
9584
|
+
var out = {}, cur = [], parents = themeName.split("_").slice(0, -1).map(function(part) {
|
|
9612
9585
|
return cur.push(part), cur.join("_");
|
|
9613
|
-
}),
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
key == "undefined" || Reflect.has(target, key)) return Reflect.get(target, key);
|
|
9619
|
-
for (var i = numParents - 1; i >= 0; i--) {
|
|
9620
|
-
var parent = themesRaw[parents[i]];
|
|
9621
|
-
if (parent && Reflect.has(parent, key)) return Reflect.get(parent, key);
|
|
9622
|
-
}
|
|
9623
|
-
return (0, import_config.getTokenObject)(key);
|
|
9586
|
+
}), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
9587
|
+
try {
|
|
9588
|
+
for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
9589
|
+
var parent = _step.value;
|
|
9590
|
+
Object.assign(out, themesRaw[parent]);
|
|
9624
9591
|
}
|
|
9625
|
-
})
|
|
9592
|
+
} catch (err) {
|
|
9593
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
9594
|
+
} finally {
|
|
9595
|
+
try {
|
|
9596
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
9597
|
+
} finally {
|
|
9598
|
+
if (_didIteratorError) throw _iteratorError;
|
|
9599
|
+
}
|
|
9600
|
+
}
|
|
9601
|
+
return Object.assign(out, theme), out;
|
|
9626
9602
|
}
|
|
9627
9603
|
}
|
|
9628
9604
|
});
|
|
@@ -13962,6 +13938,81 @@ var require_Pressability_native = __commonJS({
|
|
|
13962
13938
|
}
|
|
13963
13939
|
});
|
|
13964
13940
|
|
|
13941
|
+
// ../../core/core/dist/cjs/addNativeValidStyles.native.js
|
|
13942
|
+
var require_addNativeValidStyles_native = __commonJS({
|
|
13943
|
+
"../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
|
|
13944
|
+
"use strict";
|
|
13945
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
13946
|
+
for (var name in all) __defProp2(target, name, {
|
|
13947
|
+
get: all[name],
|
|
13948
|
+
enumerable: !0
|
|
13949
|
+
});
|
|
13950
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
13951
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
13952
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
13953
|
+
for (var _loop = function() {
|
|
13954
|
+
var key = _step.value;
|
|
13955
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
13956
|
+
get: function() {
|
|
13957
|
+
return from[key];
|
|
13958
|
+
},
|
|
13959
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
13960
|
+
});
|
|
13961
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
13962
|
+
} catch (err) {
|
|
13963
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
13964
|
+
} finally {
|
|
13965
|
+
try {
|
|
13966
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
13967
|
+
} finally {
|
|
13968
|
+
if (_didIteratorError)
|
|
13969
|
+
throw _iteratorError;
|
|
13970
|
+
}
|
|
13971
|
+
}
|
|
13972
|
+
return to;
|
|
13973
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
13974
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
13975
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
13976
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
13977
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
13978
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
13979
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
13980
|
+
value: mod,
|
|
13981
|
+
enumerable: !0
|
|
13982
|
+
}) : target,
|
|
13983
|
+
mod
|
|
13984
|
+
);
|
|
13985
|
+
}, __toCommonJS2 = function(mod) {
|
|
13986
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
13987
|
+
value: !0
|
|
13988
|
+
}), mod);
|
|
13989
|
+
}, addNativeValidStyles_native_exports = {};
|
|
13990
|
+
__export2(addNativeValidStyles_native_exports, {
|
|
13991
|
+
addNativeValidStyles: function() {
|
|
13992
|
+
return addNativeValidStyles;
|
|
13993
|
+
}
|
|
13994
|
+
});
|
|
13995
|
+
module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
|
|
13996
|
+
var import_helpers = require_index_native7(), import_ReactNativeVersion = __toESM2(require("react-native/Libraries/Core/ReactNativeVersion"));
|
|
13997
|
+
function addNativeValidStyles() {
|
|
13998
|
+
if (import_ReactNativeVersion.default) {
|
|
13999
|
+
var { version: { major, minor } } = import_ReactNativeVersion.default;
|
|
14000
|
+
if (major === 0 && minor >= 77) {
|
|
14001
|
+
var additional = {
|
|
14002
|
+
boxSizing: !0,
|
|
14003
|
+
mixBlendMode: !0,
|
|
14004
|
+
outlineWidth: !0,
|
|
14005
|
+
outlineStyle: !0,
|
|
14006
|
+
outlineSpread: !0,
|
|
14007
|
+
outlineColor: !0
|
|
14008
|
+
};
|
|
14009
|
+
Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
|
|
14010
|
+
}
|
|
14011
|
+
}
|
|
14012
|
+
}
|
|
14013
|
+
}
|
|
14014
|
+
});
|
|
14015
|
+
|
|
13965
14016
|
// ../../core/core/dist/cjs/reactNativeTypes.native.js
|
|
13966
14017
|
var require_reactNativeTypes_native = __commonJS({
|
|
13967
14018
|
"../../core/core/dist/cjs/reactNativeTypes.native.js"(exports2, module2) {
|
|
@@ -14064,9 +14115,10 @@ var require_index_native18 = __commonJS({
|
|
|
14064
14115
|
}
|
|
14065
14116
|
});
|
|
14066
14117
|
module2.exports = __toCommonJS2(index_exports2);
|
|
14067
|
-
var import_react_native_media_driver = require_index_native16(), import_react_native_use_responder_events = require_index_native17(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_getRect = require_getRect_native(), import_useElementLayout = require_useElementLayout_native(), import_Pressability = require_Pressability_native();
|
|
14118
|
+
var import_react_native_media_driver = require_index_native16(), import_react_native_use_responder_events = require_index_native17(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_getRect = require_getRect_native(), import_useElementLayout = require_useElementLayout_native(), import_Pressability = require_Pressability_native(), import_addNativeValidStyles = require_addNativeValidStyles_native();
|
|
14068
14119
|
__reExport2(index_exports2, require_index_native14(), module2.exports);
|
|
14069
14120
|
__reExport2(index_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
14121
|
+
(0, import_addNativeValidStyles.addNativeValidStyles)();
|
|
14070
14122
|
var createTamagui2 = function(conf) {
|
|
14071
14123
|
return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web.createTamagui)(conf);
|
|
14072
14124
|
}, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
@@ -16772,8 +16824,8 @@ var require_Adapt_native = __commonJS({
|
|
|
16772
16824
|
enabled
|
|
16773
16825
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16774
16826
|
return function() {
|
|
16775
|
-
var _context_setWhen;
|
|
16776
|
-
context == null || (_context_setWhen = context.setWhen) === null || _context_setWhen === void 0 || _context_setWhen.call(context, null);
|
|
16827
|
+
var _context_setWhen, _context_setPlatform;
|
|
16828
|
+
context == null || (_context_setWhen = context.setWhen) === null || _context_setWhen === void 0 || _context_setWhen.call(context, null), context == null || (_context_setPlatform = context.setPlatform) === null || _context_setPlatform === void 0 || _context_setPlatform.call(context, null);
|
|
16777
16829
|
};
|
|
16778
16830
|
}, []);
|
|
16779
16831
|
var output;
|
|
@@ -25075,6 +25127,7 @@ var require_Popper_native = __commonJS({
|
|
|
25075
25127
|
placement,
|
|
25076
25128
|
sameScrollView: !1,
|
|
25077
25129
|
// this only takes effect on native
|
|
25130
|
+
whileElementsMounted: import_floating.autoUpdate,
|
|
25078
25131
|
platform: disableRTL ?? setupOptions.disableRTL ? {
|
|
25079
25132
|
...import_floating.platform,
|
|
25080
25133
|
isRTL(element) {
|
|
@@ -25090,12 +25143,7 @@ var require_Popper_native = __commonJS({
|
|
|
25090
25143
|
typeof offsetOptions < "u" ? (0, import_floating.offset)(offsetOptions) : null,
|
|
25091
25144
|
checkFloating
|
|
25092
25145
|
].filter(Boolean)
|
|
25093
|
-
}), {
|
|
25094
|
-
refs,
|
|
25095
|
-
middlewareData,
|
|
25096
|
-
// @ts-expect-error this comes from Tooltip for example
|
|
25097
|
-
open
|
|
25098
|
-
} = floating, dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React4.useState(!1);
|
|
25146
|
+
}), { middlewareData } = floating, dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React4.useState(!1);
|
|
25099
25147
|
React4.useEffect(function() {
|
|
25100
25148
|
var showSubscription = import_react_native4.Keyboard.addListener("keyboardDidShow", function() {
|
|
25101
25149
|
(0, import_start_transition.startTransition)(function() {
|
|
@@ -25207,6 +25255,9 @@ var require_Popper_native = __commonJS({
|
|
|
25207
25255
|
};
|
|
25208
25256
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
25209
25257
|
...getFloatingProps ? getFloatingProps(frameProps) : frameProps,
|
|
25258
|
+
...x === 0 && y === 0 ? {
|
|
25259
|
+
opacity: 0
|
|
25260
|
+
} : {},
|
|
25210
25261
|
children: contents
|
|
25211
25262
|
});
|
|
25212
25263
|
}), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
@@ -30591,12 +30642,18 @@ var require_Toggle_native = __commonJS({
|
|
|
30591
30642
|
},
|
|
30592
30643
|
ToggleFrame: function() {
|
|
30593
30644
|
return ToggleFrame;
|
|
30645
|
+
},
|
|
30646
|
+
context: function() {
|
|
30647
|
+
return context;
|
|
30594
30648
|
}
|
|
30595
30649
|
});
|
|
30596
30650
|
module2.exports = __toCommonJS2(Toggle_exports);
|
|
30597
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_helpers = require_index_native7(), import_stacks3 = require_index_native22(), import_use_controllable_state = require_index_native10(), import_web = require_index_native14(), React4 = __toESM2(require("react")),
|
|
30651
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_helpers = require_index_native7(), import_stacks3 = require_index_native22(), import_use_controllable_state = require_index_native10(), import_web = require_index_native14(), React4 = __toESM2(require("react")), context = (0, import_web.createStyledContext)({
|
|
30652
|
+
color: ""
|
|
30653
|
+
}), NAME = "Toggle", ToggleFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
30598
30654
|
name: NAME,
|
|
30599
30655
|
tag: "button",
|
|
30656
|
+
context,
|
|
30600
30657
|
variants: {
|
|
30601
30658
|
unstyled: {
|
|
30602
30659
|
false: {
|
|
@@ -30624,6 +30681,11 @@ var require_Toggle_native = __commonJS({
|
|
|
30624
30681
|
}
|
|
30625
30682
|
}
|
|
30626
30683
|
},
|
|
30684
|
+
color: {
|
|
30685
|
+
"...color": function() {
|
|
30686
|
+
return {};
|
|
30687
|
+
}
|
|
30688
|
+
},
|
|
30627
30689
|
active: {
|
|
30628
30690
|
true: {
|
|
30629
30691
|
zIndex: 1,
|
|
@@ -30731,7 +30793,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30731
30793
|
});
|
|
30732
30794
|
module2.exports = __toCommonJS2(ToggleGroup_exports);
|
|
30733
30795
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_focusable2 = require_index_native45(), import_font_size = require_index_native41(), import_get_token2 = require_index_native20(), import_group = require_index_native51(), import_helpers = require_index_native7(), import_helpers_tamagui = require_index_native42(), import_roving_focus = require_index_native60(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native25(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_Toggle = require_Toggle_native(), TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", TOGGLE_GROUP_CONTEXT = "ToggleGroup", { Provider: ToggleGroupItemProvider, useStyledContext: useToggleGroupItemContext } = (0, import_web.createStyledContext)(), { Provider: ToggleGroupContext, useStyledContext: useToggleGroupContext } = (0, import_web.createStyledContext)(), ToggleGroupItem = import_Toggle.ToggleFrame.extractable(/* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
30734
|
-
var { disablePassStyles, ...rest } = props, valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext == null ? void 0 : valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = (0, import_group.useGroupItem)({
|
|
30796
|
+
var [_, { color }] = (0, import_web.usePropsAndStyle)(props), { disablePassStyles, ...rest } = props, valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext == null ? void 0 : valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = (0, import_group.useGroupItem)({
|
|
30735
30797
|
disabled
|
|
30736
30798
|
}), _props_size, size4 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
|
|
30737
30799
|
width: void 0,
|
|
@@ -30739,7 +30801,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30739
30801
|
padding: (0, import_web.getVariableValue)(size4) * 0.6
|
|
30740
30802
|
}, iconSize = (typeof size4 == "number" ? size4 * 0.7 : (0, import_font_size.getFontSize)(size4)) * 1.2, theme = (0, import_web.useTheme)(), getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
30741
30803
|
size: iconSize,
|
|
30742
|
-
color: theme.color
|
|
30804
|
+
color: color ?? theme.color
|
|
30743
30805
|
}), childrens = import_react3.default.Children.toArray(props.children), children = childrens.map(function(child) {
|
|
30744
30806
|
return props.disablePassStyles || !/* @__PURE__ */ import_react3.default.isValidElement(child) ? child : getThemedIcon(child);
|
|
30745
30807
|
}), commonProps = {
|
|
@@ -30751,7 +30813,8 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30751
30813
|
}, inner = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupItemImpl, {
|
|
30752
30814
|
...commonProps,
|
|
30753
30815
|
ref: forwardedRef,
|
|
30754
|
-
focusable
|
|
30816
|
+
// focusable={!disabled}
|
|
30817
|
+
tabIndex: disabled ? -1 : 0,
|
|
30755
30818
|
disabled,
|
|
30756
30819
|
...groupItemProps
|
|
30757
30820
|
});
|