@tamagui/core 1.94.2 → 1.94.4

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 CHANGED
@@ -6065,12 +6065,17 @@ var require_normalizeColor_native = __commonJS({
6065
6065
  module2.exports = __toCommonJS2(normalizeColor_exports);
6066
6066
  var import_normalize_css_color = require_index_native7(), import_normalize_css_color2 = require_index_native7(), normalizeColor = function(color, opacity) {
6067
6067
  if (color) {
6068
- if (color[0] === "$" || color.startsWith("var("))
6068
+ if (color[0] === "$")
6069
6069
  return color;
6070
- var rgba3 = getRgba(color);
6071
- if (rgba3) {
6072
- var colors = "".concat(rgba3.r, ",").concat(rgba3.g, ",").concat(rgba3.b), _ref;
6073
- return opacity === 1 ? "rgb(".concat(colors, ")") : "rgba(".concat(colors, ",").concat((_ref = opacity ?? rgba3.a) !== null && _ref !== void 0 ? _ref : 1, ")");
6070
+ if (color.startsWith("var(")) {
6071
+ if (typeof opacity == "number" && opacity < 1)
6072
+ return "color-mix(in srgb, ".concat(color, " ").concat(opacity * 100, "%, transparent)");
6073
+ } else {
6074
+ var rgba3 = getRgba(color);
6075
+ if (rgba3) {
6076
+ var colors = "".concat(rgba3.r, ",").concat(rgba3.g, ",").concat(rgba3.b), _ref;
6077
+ return opacity === 1 ? "rgb(".concat(colors, ")") : "rgba(".concat(colors, ",").concat((_ref = opacity ?? rgba3.a) !== null && _ref !== void 0 ? _ref : 1, ")");
6078
+ }
6074
6079
  }
6075
6080
  return color;
6076
6081
  }
@@ -6192,7 +6197,7 @@ var require_expandStyles_native = __commonJS({
6192
6197
  module2.exports = __toCommonJS2(expandStyles_exports);
6193
6198
  var import_constants = require_index_native3(), import_normalizeShadow = require_normalizeShadow_native();
6194
6199
  function fixStyles(style) {
6195
- "elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius || style.shadowColor || style.shadowOpacity || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
6200
+ "elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
6196
6201
  for (var key in borderDefaults)
6197
6202
  if (key in style) {
6198
6203
  var _style, _borderDefaults_key;
@@ -9448,7 +9453,7 @@ var require_createComponent_native = __commonJS({
9448
9453
  "theme",
9449
9454
  "defaultVariants"
9450
9455
  ]), viewProps = nonTamaguiProps;
9451
- isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
9456
+ !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
9452
9457
  var animationStyles;
9453
9458
  if (
9454
9459
  // if it supports css vars we run it on server too to get matching initial style