@tamagui/core 1.91.5 → 1.92.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.
@@ -6785,7 +6785,7 @@ var require_propMapper_native = __commonJS({
6785
6785
  get: function(_, k) {
6786
6786
  return k === "curProps" ? subProps : Reflect.get(_, k);
6787
6787
  }
6788
- }) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, variants = staticConfig.variants;
6788
+ }) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, skipThemeTokenResolution = styleState.skipThemeTokenResolution, variants = staticConfig.variants;
6789
6789
  if (!styleProps.noExpand && variants && key in variants) {
6790
6790
  styleState.curProps[key] = value;
6791
6791
  var variantValue = resolveVariants(key, value, styleProps, styleState, "");
@@ -6958,9 +6958,11 @@ var require_propMapper_native = __commonJS({
6958
6958
  var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
6959
6959
  val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
6960
6960
  }
6961
- if (theme && value in theme)
6962
- valOrVar = theme[value], hasSet = !0;
6963
- else {
6961
+ if (theme && value in theme) {
6962
+ if (valOrVar = theme[value], styleState.skipThemeTokenResolution && valOrVar != null && valOrVar.val)
6963
+ return value;
6964
+ hasSet = !0;
6965
+ } else {
6964
6966
  if (value in conf.specificTokens)
6965
6967
  hasSet = !0, valOrVar = conf.specificTokens[value];
6966
6968
  else {
@@ -7223,7 +7225,7 @@ var require_getSplitStyles_native = __commonJS({
7223
7225
  var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
7224
7226
  return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
7225
7227
  }
7226
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
7228
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
7227
7229
  conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
7228
7230
  var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
7229
7231
  curProps: {},
@@ -7238,7 +7240,8 @@ var require_getSplitStyles_native = __commonJS({
7238
7240
  usedKeys,
7239
7241
  viewProps,
7240
7242
  context,
7241
- debug
7243
+ debug,
7244
+ skipThemeTokenResolution
7242
7245
  };
7243
7246
  for (var keyOg in props) {
7244
7247
  var _parentStaticConfig_variants, keyInit = keyOg, valInit = props[keyOg];
@@ -8617,7 +8620,8 @@ var require_createComponent_native = __commonJS({
8617
8620
  props.accessibilityDisabled || !1;
8618
8621
  disabled != null && (initialState.disabled = disabled);
8619
8622
  var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? _object_spread_props(_object_spread2({}, states[0]), _define_property2({}, props.forceStyle, !0)) : states[0], setState = states[1];
8620
- disabled !== state.disabled && setState(_object_spread_props(_object_spread2({}, state), {
8623
+ disabled !== state.disabled && setState(_object_spread_props(_object_spread2({}, state, import_defaultComponentState.defaultComponentState), {
8624
+ // removes any stale press state etc
8621
8625
  disabled
8622
8626
  }));
8623
8627
  var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, debugProp);