tamagui 1.122.7 → 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.
@@ -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 __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
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 = __toESM2(require("react")), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.default.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = !1, isIos = process.env.TEST_NATIVE_PLATFORM === "ios", currentPlatform = "native";
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
  },
@@ -3742,65 +3727,55 @@ var require_useTheme_native = __commonJS({
3742
3727
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : emptyProps, [_, theme] = useThemeWithState(props), res = theme;
3743
3728
  return res;
3744
3729
  }, useThemeWithState = function(props) {
3745
- var keys = (0, import_react3.useRef)(null), changedThemeState = useChangeThemeEffect(props, !1, keys), { themeManager, state } = changedThemeState, themeProxied = (0, import_react3.useMemo)(function() {
3746
- return keys.current && (keys.current = null), !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, keys, themeManager, props.debug);
3747
- }, [
3748
- state == null ? void 0 : state.theme,
3749
- themeManager,
3750
- props.deopt,
3751
- props.debug
3752
- ]);
3730
+ var keys = (0, import_react3.useRef)(null), changedThemeState = useChangeThemeEffect(props, !1, keys), { themeManager, state } = changedThemeState, themeProxied = getThemeProxied(props, state, keys, themeManager);
3753
3731
  return [
3754
3732
  changedThemeState,
3755
3733
  themeProxied
3756
3734
  ];
3757
- };
3758
- function getThemeProxied(param) {
3759
- var { theme, name, scheme } = param, deopt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = arguments.length > 2 ? arguments[2] : void 0, themeManager = arguments.length > 3 ? arguments[3] : void 0, debug = arguments.length > 4 ? arguments[4] : void 0;
3760
- if (!theme) return {};
3761
- var config = (0, import_config.getConfig)();
3735
+ }, emptyObject = {}, ProxiedThemes = /* @__PURE__ */ new Map(), curKeys, curProps, curThemeManger;
3736
+ function getThemeProxied(_props, state, _keys, _themeManager) {
3737
+ var theme = state == null ? void 0 : state.theme;
3738
+ if (!theme || !_themeManager) return emptyObject;
3739
+ if (curKeys = _keys, curProps = _props, curThemeManger = _themeManager, ProxiedThemes.has(theme)) {
3740
+ var proxied = ProxiedThemes.get(theme);
3741
+ return proxied;
3742
+ }
3743
+ var { name, scheme } = state, config = (0, import_config.getConfig)();
3762
3744
  function track(key) {
3763
- keys.current || (keys.current = [], setTimeout(function() {
3764
- themeManager == null || themeManager.selfUpdate();
3765
- })), keys.current.push(key);
3766
- }
3767
- return new Proxy(theme, {
3768
- has(_, key) {
3769
- if (Reflect.has(theme, key)) return !0;
3770
- if (typeof key == "string") return key[0] === "$" && (key = key.slice(1)), themeManager == null ? void 0 : themeManager.allKeys.has(key);
3771
- },
3772
- get(_, key) {
3773
- if (
3774
- // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
3775
- // if someone is crazy enough to use "undefined" as a theme key then this not working is on them
3776
- key !== "undefined" && typeof key == "string"
3777
- ) {
3778
- var keyString = key[0] === "$" ? key.slice(1) : key, val = theme[keyString];
3779
- if (val && typeof val == "object") return new Proxy(val, {
3780
- // when they touch the actual value we only track it
3781
- // if its a variable (web), its ignored!
3782
- get(_2, subkey) {
3783
- if (subkey === "val") globalThis.tamaguiAvoidTracking || track(keyString);
3784
- else if (subkey === "get") return function(platform2) {
3785
- var outVal = (0, import_createVariable.getVariable)(val);
3786
- if (platform2 !== "web" && import_constants4.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && !(0, import_shouldDeoptDueToParentScheme.shouldDeoptDueToParentScheme)(themeManager) && scheme) {
3787
- 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[keyString]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[keyString]), dynamicVal = {
3788
- dynamic: {
3789
- [scheme]: color,
3790
- [oppositeScheme]: oppositeColor
3791
- }
3792
- };
3793
- return dynamicVal;
3794
- }
3795
- return track(keyString), outVal;
3796
- };
3797
- return Reflect.get(val, subkey);
3798
- }
3799
- });
3745
+ curKeys && (curKeys.current || (curKeys.current = []), curKeys.current.push(key));
3746
+ }
3747
+ var proxied1 = Object.fromEntries(Object.entries(theme).flatMap(function(param) {
3748
+ var [key, value] = param, proxied2 = {
3749
+ ...value,
3750
+ get val() {
3751
+ return globalThis.tamaguiAvoidTracking || track(key), value.val;
3752
+ },
3753
+ get(platform2) {
3754
+ var outVal = (0, import_createVariable.getVariable)(value);
3755
+ if (platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && !(0, import_shouldDeoptDueToParentScheme.shouldDeoptDueToParentScheme)(curThemeManger) && scheme) {
3756
+ 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 = {
3757
+ dynamic: {
3758
+ [scheme]: color,
3759
+ [oppositeScheme]: oppositeColor
3760
+ }
3761
+ };
3762
+ return dynamicVal;
3763
+ }
3764
+ return track(key), outVal;
3800
3765
  }
3801
- return Reflect.get(_, key);
3802
- }
3803
- });
3766
+ };
3767
+ return [
3768
+ [
3769
+ key,
3770
+ proxied2
3771
+ ],
3772
+ [
3773
+ `$${key}`,
3774
+ proxied2
3775
+ ]
3776
+ ];
3777
+ }));
3778
+ return ProxiedThemes.set(theme, proxied1), proxied1;
3804
3779
  }
3805
3780
  var activeThemeManagers = /* @__PURE__ */ new Set(), _uidToManager = /* @__PURE__ */ new WeakMap(), _idToUID = {}, getId = function(id) {
3806
3781
  return _idToUID[id];
@@ -8938,7 +8913,7 @@ var require_proxyThemeToParents_native = __commonJS({
8938
8913
  }
8939
8914
  });
8940
8915
  module2.exports = __toCommonJS2(proxyThemeToParents_exports);
8941
- var import_config = require_config_native(), themesRaw = {};
8916
+ var themesRaw = {};
8942
8917
  function proxyThemesToParents(dedupedThemes) {
8943
8918
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
8944
8919
  try {
@@ -8999,21 +8974,24 @@ var require_proxyThemeToParents_native = __commonJS({
8999
8974
  return themes;
9000
8975
  }
9001
8976
  function proxyThemeToParents(themeName, theme) {
9002
- var cur = [], parents = themeName.split("_").slice(0, -1).map(function(part) {
8977
+ var out = {}, cur = [], parents = themeName.split("_").slice(0, -1).map(function(part) {
9003
8978
  return cur.push(part), cur.join("_");
9004
- }), numParents = parents.length;
9005
- return new Proxy(theme, {
9006
- get(target, key) {
9007
- if (!key || // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
9008
- // if someone is crazy enough to use "undefined" as a theme key then this not working is on them
9009
- key == "undefined" || Reflect.has(target, key)) return Reflect.get(target, key);
9010
- for (var i = numParents - 1; i >= 0; i--) {
9011
- var parent = themesRaw[parents[i]];
9012
- if (parent && Reflect.has(parent, key)) return Reflect.get(parent, key);
9013
- }
9014
- return (0, import_config.getTokenObject)(key);
8979
+ }), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
8980
+ try {
8981
+ for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
8982
+ var parent = _step.value;
8983
+ Object.assign(out, themesRaw[parent]);
9015
8984
  }
9016
- });
8985
+ } catch (err) {
8986
+ _didIteratorError = !0, _iteratorError = err;
8987
+ } finally {
8988
+ try {
8989
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
8990
+ } finally {
8991
+ if (_didIteratorError) throw _iteratorError;
8992
+ }
8993
+ }
8994
+ return Object.assign(out, theme), out;
9017
8995
  }
9018
8996
  }
9019
8997
  });
@@ -10689,22 +10667,23 @@ var require_ThemeProvider_native = __commonJS({
10689
10667
  });
10690
10668
  module2.exports = __toCommonJS2(ThemeProvider_exports);
10691
10669
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), import_Theme = require_Theme_native(), import_config = require_config_native(), ThemeProvider = function(props) {
10670
+ var _props_disableRootThemeClass, disableRootThemeClass = (_props_disableRootThemeClass = props.disableRootThemeClass) !== null && _props_disableRootThemeClass !== void 0 ? _props_disableRootThemeClass : (0, import_config.getSetting)("disableRootThemeClass"), _props_themeClassNameOnRoot, themeClassNameOnRoot = (_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot");
10692
10671
  return import_constants4.isClient && import_react3.default.useLayoutEffect(function() {
10693
- if (!props.disableRootThemeClass) {
10694
- var cn = `${import_constants22.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, _props_themeClassNameOnRoot, target = ((_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot")) ? document.documentElement : document.body;
10672
+ if (!disableRootThemeClass) {
10673
+ var cn = `${import_constants22.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = themeClassNameOnRoot ? document.documentElement : document.body;
10695
10674
  return target.classList.add(cn), function() {
10696
10675
  target.classList.remove(cn);
10697
10676
  };
10698
10677
  }
10699
10678
  }, [
10700
10679
  props.defaultTheme,
10701
- props.disableRootThemeClass,
10702
- props.themeClassNameOnRoot
10680
+ disableRootThemeClass,
10681
+ themeClassNameOnRoot
10703
10682
  ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Theme.Theme, {
10704
10683
  className: props.className,
10705
10684
  name: props.defaultTheme,
10706
10685
  // if root class disabled, force class here
10707
- forceClassName: !props.disableRootThemeClass,
10686
+ forceClassName: !disableRootThemeClass && !themeClassNameOnRoot,
10708
10687
  // @ts-expect-error
10709
10688
  _isRoot: !0,
10710
10689
  children: props.children
@@ -13344,6 +13323,81 @@ var require_Pressability_native = __commonJS({
13344
13323
  }
13345
13324
  });
13346
13325
 
13326
+ // ../../core/core/dist/cjs/addNativeValidStyles.native.js
13327
+ var require_addNativeValidStyles_native = __commonJS({
13328
+ "../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
13329
+ "use strict";
13330
+ var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
13331
+ for (var name in all) __defProp2(target, name, {
13332
+ get: all[name],
13333
+ enumerable: !0
13334
+ });
13335
+ }, __copyProps2 = function(to, from, except, desc) {
13336
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
13337
+ if (from && typeof from == "object" || typeof from == "function") try {
13338
+ for (var _loop = function() {
13339
+ var key = _step.value;
13340
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
13341
+ get: function() {
13342
+ return from[key];
13343
+ },
13344
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
13345
+ });
13346
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
13347
+ } catch (err) {
13348
+ _didIteratorError = !0, _iteratorError = err;
13349
+ } finally {
13350
+ try {
13351
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
13352
+ } finally {
13353
+ if (_didIteratorError)
13354
+ throw _iteratorError;
13355
+ }
13356
+ }
13357
+ return to;
13358
+ }, __toESM2 = function(mod, isNodeMode, target) {
13359
+ return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
13360
+ // If the importer is in node compatibility mode or this is not an ESM
13361
+ // file that has been converted to a CommonJS file using a Babel-
13362
+ // compatible transform (i.e. "__esModule" has not been set), then set
13363
+ // "default" to the CommonJS "module.exports" for node compatibility.
13364
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
13365
+ value: mod,
13366
+ enumerable: !0
13367
+ }) : target,
13368
+ mod
13369
+ );
13370
+ }, __toCommonJS2 = function(mod) {
13371
+ return __copyProps2(__defProp2({}, "__esModule", {
13372
+ value: !0
13373
+ }), mod);
13374
+ }, addNativeValidStyles_native_exports = {};
13375
+ __export2(addNativeValidStyles_native_exports, {
13376
+ addNativeValidStyles: function() {
13377
+ return addNativeValidStyles;
13378
+ }
13379
+ });
13380
+ module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
13381
+ var import_helpers = require_index_native7(), import_ReactNativeVersion = __toESM2(require("react-native/Libraries/Core/ReactNativeVersion"));
13382
+ function addNativeValidStyles() {
13383
+ if (import_ReactNativeVersion.default) {
13384
+ var { version: { major, minor } } = import_ReactNativeVersion.default;
13385
+ if (major === 0 && minor >= 77) {
13386
+ var additional = {
13387
+ boxSizing: !0,
13388
+ mixBlendMode: !0,
13389
+ outlineWidth: !0,
13390
+ outlineStyle: !0,
13391
+ outlineSpread: !0,
13392
+ outlineColor: !0
13393
+ };
13394
+ Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
13395
+ }
13396
+ }
13397
+ }
13398
+ }
13399
+ });
13400
+
13347
13401
  // ../../core/core/dist/cjs/reactNativeTypes.native.js
13348
13402
  var require_reactNativeTypes_native = __commonJS({
13349
13403
  "../../core/core/dist/cjs/reactNativeTypes.native.js"(exports2, module2) {
@@ -13446,9 +13500,10 @@ var require_index_native18 = __commonJS({
13446
13500
  }
13447
13501
  });
13448
13502
  module2.exports = __toCommonJS2(index_exports2);
13449
- 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();
13503
+ 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();
13450
13504
  __reExport2(index_exports2, require_index_native14(), module2.exports);
13451
13505
  __reExport2(index_exports2, require_reactNativeTypes_native(), module2.exports);
13506
+ (0, import_addNativeValidStyles.addNativeValidStyles)();
13452
13507
  var createTamagui2 = function(conf) {
13453
13508
  return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web.createTamagui)(conf);
13454
13509
  }, baseViews = (0, import_getBaseViews.getBaseViews)();
@@ -16143,8 +16198,8 @@ var require_Adapt_native = __commonJS({
16143
16198
  enabled
16144
16199
  ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16145
16200
  return function() {
16146
- var _context_setWhen;
16147
- context == null || (_context_setWhen = context.setWhen) === null || _context_setWhen === void 0 || _context_setWhen.call(context, null);
16201
+ var _context_setWhen, _context_setPlatform;
16202
+ 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);
16148
16203
  };
16149
16204
  }, []);
16150
16205
  var output;
@@ -24343,6 +24398,7 @@ var require_Popper_native = __commonJS({
24343
24398
  placement,
24344
24399
  sameScrollView: !1,
24345
24400
  // this only takes effect on native
24401
+ whileElementsMounted: import_floating.autoUpdate,
24346
24402
  platform: disableRTL ?? setupOptions.disableRTL ? {
24347
24403
  ...import_floating.platform,
24348
24404
  isRTL(element) {
@@ -24358,12 +24414,7 @@ var require_Popper_native = __commonJS({
24358
24414
  typeof offsetOptions < "u" ? (0, import_floating.offset)(offsetOptions) : null,
24359
24415
  checkFloating
24360
24416
  ].filter(Boolean)
24361
- }), {
24362
- refs,
24363
- middlewareData,
24364
- // @ts-expect-error this comes from Tooltip for example
24365
- open
24366
- } = floating, dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React4.useState(!1);
24417
+ }), { middlewareData } = floating, dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React4.useState(!1);
24367
24418
  React4.useEffect(function() {
24368
24419
  var showSubscription = import_react_native4.Keyboard.addListener("keyboardDidShow", function() {
24369
24420
  (0, import_start_transition.startTransition)(function() {
@@ -24475,6 +24526,9 @@ var require_Popper_native = __commonJS({
24475
24526
  };
24476
24527
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
24477
24528
  ...getFloatingProps ? getFloatingProps(frameProps) : frameProps,
24529
+ ...x === 0 && y === 0 ? {
24530
+ opacity: 0
24531
+ } : {},
24478
24532
  children: contents
24479
24533
  });
24480
24534
  }), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
@@ -29854,12 +29908,18 @@ var require_Toggle_native = __commonJS({
29854
29908
  },
29855
29909
  ToggleFrame: function() {
29856
29910
  return ToggleFrame;
29911
+ },
29912
+ context: function() {
29913
+ return context;
29857
29914
  }
29858
29915
  });
29859
29916
  module2.exports = __toCommonJS2(Toggle_exports);
29860
- 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")), NAME = "Toggle", ToggleFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
29917
+ 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)({
29918
+ color: ""
29919
+ }), NAME = "Toggle", ToggleFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
29861
29920
  name: NAME,
29862
29921
  tag: "button",
29922
+ context,
29863
29923
  variants: {
29864
29924
  unstyled: {
29865
29925
  false: {
@@ -29887,6 +29947,11 @@ var require_Toggle_native = __commonJS({
29887
29947
  }
29888
29948
  }
29889
29949
  },
29950
+ color: {
29951
+ "...color": function() {
29952
+ return {};
29953
+ }
29954
+ },
29890
29955
  active: {
29891
29956
  true: {
29892
29957
  zIndex: 1,
@@ -29994,7 +30059,7 @@ var require_ToggleGroup_native = __commonJS({
29994
30059
  });
29995
30060
  module2.exports = __toCommonJS2(ToggleGroup_exports);
29996
30061
  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) {
29997
- 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)({
30062
+ 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)({
29998
30063
  disabled
29999
30064
  }), _props_size, size4 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
30000
30065
  width: void 0,
@@ -30002,7 +30067,7 @@ var require_ToggleGroup_native = __commonJS({
30002
30067
  padding: (0, import_web.getVariableValue)(size4) * 0.6
30003
30068
  }, 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)({
30004
30069
  size: iconSize,
30005
- color: theme.color
30070
+ color: color ?? theme.color
30006
30071
  }), childrens = import_react3.default.Children.toArray(props.children), children = childrens.map(function(child) {
30007
30072
  return props.disablePassStyles || !/* @__PURE__ */ import_react3.default.isValidElement(child) ? child : getThemedIcon(child);
30008
30073
  }), commonProps = {
@@ -30014,7 +30079,8 @@ var require_ToggleGroup_native = __commonJS({
30014
30079
  }, inner = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupItemImpl, {
30015
30080
  ...commonProps,
30016
30081
  ref: forwardedRef,
30017
- focusable: !disabled,
30082
+ // focusable={!disabled}
30083
+ tabIndex: disabled ? -1 : 0,
30018
30084
  disabled,
30019
30085
  ...groupItemProps
30020
30086
  });