tamagui 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
@@ -6162,12 +6162,17 @@ var require_normalizeColor_native = __commonJS({
6162
6162
  module2.exports = __toCommonJS2(normalizeColor_exports);
6163
6163
  var import_normalize_css_color = require_index_native12(), import_normalize_css_color2 = require_index_native12(), normalizeColor = function(color, opacity) {
6164
6164
  if (color) {
6165
- if (color[0] === "$" || color.startsWith("var("))
6165
+ if (color[0] === "$")
6166
6166
  return color;
6167
- var rgba3 = getRgba(color);
6168
- if (rgba3) {
6169
- var colors = "".concat(rgba3.r, ",").concat(rgba3.g, ",").concat(rgba3.b), _ref;
6170
- return opacity === 1 ? "rgb(".concat(colors, ")") : "rgba(".concat(colors, ",").concat((_ref = opacity ?? rgba3.a) !== null && _ref !== void 0 ? _ref : 1, ")");
6167
+ if (color.startsWith("var(")) {
6168
+ if (typeof opacity == "number" && opacity < 1)
6169
+ return "color-mix(in srgb, ".concat(color, " ").concat(opacity * 100, "%, transparent)");
6170
+ } else {
6171
+ var rgba3 = getRgba(color);
6172
+ if (rgba3) {
6173
+ var colors = "".concat(rgba3.r, ",").concat(rgba3.g, ",").concat(rgba3.b), _ref;
6174
+ return opacity === 1 ? "rgb(".concat(colors, ")") : "rgba(".concat(colors, ",").concat((_ref = opacity ?? rgba3.a) !== null && _ref !== void 0 ? _ref : 1, ")");
6175
+ }
6171
6176
  }
6172
6177
  return color;
6173
6178
  }
@@ -6289,7 +6294,7 @@ var require_expandStyles_native = __commonJS({
6289
6294
  module2.exports = __toCommonJS2(expandStyles_exports);
6290
6295
  var import_constants4 = require_index_native6(), import_normalizeShadow = require_normalizeShadow_native();
6291
6296
  function fixStyles(style) {
6292
- "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));
6297
+ "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));
6293
6298
  for (var key in borderDefaults)
6294
6299
  if (key in style) {
6295
6300
  var _style, _borderDefaults_key;
@@ -9545,7 +9550,7 @@ var require_createComponent_native = __commonJS({
9545
9550
  "theme",
9546
9551
  "defaultVariants"
9547
9552
  ]), viewProps = nonTamaguiProps;
9548
- isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
9553
+ !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
9549
9554
  var animationStyles;
9550
9555
  if (
9551
9556
  // if it supports css vars we run it on server too to get matching initial style
@@ -18957,6 +18962,10 @@ var require_index_native31 = __commonJS({
18957
18962
  var require_constants_native3 = __commonJS({
18958
18963
  "../sheet/dist/cjs/constants.native.js"(exports2, module2) {
18959
18964
  "use strict";
18965
+ function _type_of(obj) {
18966
+ "@swc/helpers - typeof";
18967
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
18968
+ }
18960
18969
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
18961
18970
  for (var name in all)
18962
18971
  __defProp2(target, name, {
@@ -19012,7 +19021,7 @@ var require_constants_native3 = __commonJS({
19012
19021
  });
19013
19022
  module2.exports = __toCommonJS2(constants_exports);
19014
19023
  var import_core12 = require_index_native16(), constants = {}, SHEET_NAME = "Sheet", SHEET_HANDLE_NAME = "SheetHandle", SHEET_OVERLAY_NAME = "SheetOverlay", SHEET_HIDDEN_STYLESHEET = import_core12.isClient ? document.createElement("style") : null;
19015
- SHEET_HIDDEN_STYLESHEET && document.head.appendChild(SHEET_HIDDEN_STYLESHEET);
19024
+ SHEET_HIDDEN_STYLESHEET && _type_of(document.head) < "u" && document.head.appendChild(SHEET_HIDDEN_STYLESHEET);
19016
19025
  }
19017
19026
  });
19018
19027
 
@@ -24438,8 +24447,8 @@ var require_Checkbox_native = __commonJS({
24438
24447
  }
24439
24448
  },
24440
24449
  size: {
24441
- "...size": function(val, param) {
24442
- var tokens = param.tokens, radiusToken = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) / 8;
24450
+ "...size": function(val) {
24451
+ var radiusToken = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) / 8;
24443
24452
  return {
24444
24453
  borderRadius: radiusToken
24445
24454
  };
@@ -25817,7 +25826,8 @@ var require_createCheckbox_native = __commonJS({
25817
25826
  height: size3
25818
25827
  }), {
25819
25828
  tag: "button",
25820
- ref: checkboxRef
25829
+ ref: checkboxRef,
25830
+ unstyled
25821
25831
  }), unstyled === !1 && {
25822
25832
  size: size3,
25823
25833
  theme: checked ? "active" : null