tamagui 1.75.6 → 1.75.7

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
@@ -1737,65 +1737,6 @@ var require_createMediaStyle_native = __commonJS({
1737
1737
  }
1738
1738
  });
1739
1739
 
1740
- // ../web/dist/cjs/helpers/expandStyle.native.js
1741
- var require_expandStyle_native = __commonJS({
1742
- "../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
1743
- "use strict";
1744
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
1745
- for (var name in all2)
1746
- __defProp2(target, name, { get: all2[name], enumerable: !0 });
1747
- }, __copyProps2 = (to, from, except, desc) => {
1748
- if (from && typeof from == "object" || typeof from == "function")
1749
- for (let key of __getOwnPropNames2(from))
1750
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1751
- return to;
1752
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
1753
- __export2(expandStyle_exports, {
1754
- expandStyle: () => expandStyle
1755
- });
1756
- module2.exports = __toCommonJS2(expandStyle_exports);
1757
- var import_constants = require_index_native2();
1758
- function expandStyle(key, value) {
1759
- if (!1)
1760
- switch (key) {
1761
- case "textAlignVertical":
1762
- case "writingDirection":
1763
- }
1764
- if (import_constants.isAndroid && key === "elevationAndroid")
1765
- return [["elevation", value]];
1766
- if (key in EXPANSIONS)
1767
- return EXPANSIONS[key].map((key2) => [key2, value]);
1768
- }
1769
- var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
1770
- borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
1771
- borderRadius: [
1772
- "TopLeftRadius",
1773
- "TopRightRadius",
1774
- "BottomRightRadius",
1775
- "BottomLeftRadius"
1776
- ],
1777
- borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
1778
- margin: all,
1779
- marginHorizontal: horiz,
1780
- marginVertical: vert,
1781
- overscrollBehavior: xy,
1782
- padding: all,
1783
- paddingHorizontal: horiz,
1784
- paddingVertical: vert,
1785
- ...import_constants.isWeb && {
1786
- // react-native only supports borderStyle
1787
- borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
1788
- // react-native doesn't support X / Y
1789
- overflow: xy
1790
- }
1791
- }, _a;
1792
- for (let parent in EXPANSIONS) {
1793
- let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
1794
- EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
1795
- }
1796
- }
1797
- });
1798
-
1799
1740
  // ../../node_modules/@react-native/normalize-color/index.js
1800
1741
  var require_normalize_color = __commonJS({
1801
1742
  "../../node_modules/@react-native/normalize-color/index.js"(exports, module2) {
@@ -2437,26 +2378,10 @@ var require_expandStyles_native = __commonJS({
2437
2378
  return to;
2438
2379
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyles_exports = {};
2439
2380
  __export2(expandStyles_exports, {
2440
- expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues,
2441
2381
  fixStyles: () => fixStyles
2442
2382
  });
2443
2383
  module2.exports = __toCommonJS2(expandStyles_exports);
2444
- var import_constants = require_index_native2(), import_expandStyle = require_expandStyle_native(), import_normalizeShadow = require_normalizeShadow_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_pseudoDescriptors = require_pseudoDescriptors_native();
2445
- function expandStylesAndRemoveNullishValues(style) {
2446
- let res = {};
2447
- for (let key in style) {
2448
- let valIn = style[key];
2449
- if (valIn == null)
2450
- continue;
2451
- if (key in import_pseudoDescriptors.pseudoDescriptors) {
2452
- res[key] = expandStylesAndRemoveNullishValues(valIn);
2453
- continue;
2454
- }
2455
- let val = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(valIn, key), out = (0, import_expandStyle.expandStyle)(key, val);
2456
- out ? Object.assign(res, Object.fromEntries(out)) : res[key] = val;
2457
- }
2458
- return fixStyles(res), res;
2459
- }
2384
+ var import_constants = require_index_native2(), import_normalizeShadow = require_normalizeShadow_native();
2460
2385
  function fixStyles(style) {
2461
2386
  "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));
2462
2387
  for (let key in borderDefaults)
@@ -2498,6 +2423,101 @@ var require_getStylesAtomic_native = __commonJS({
2498
2423
  }
2499
2424
  });
2500
2425
 
2426
+ // ../web/dist/cjs/helpers/expandStyle.native.js
2427
+ var require_expandStyle_native = __commonJS({
2428
+ "../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
2429
+ "use strict";
2430
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
2431
+ for (var name in all2)
2432
+ __defProp2(target, name, { get: all2[name], enumerable: !0 });
2433
+ }, __copyProps2 = (to, from, except, desc) => {
2434
+ if (from && typeof from == "object" || typeof from == "function")
2435
+ for (let key of __getOwnPropNames2(from))
2436
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
2437
+ return to;
2438
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
2439
+ __export2(expandStyle_exports, {
2440
+ expandStyle: () => expandStyle
2441
+ });
2442
+ module2.exports = __toCommonJS2(expandStyle_exports);
2443
+ var import_constants = require_index_native2();
2444
+ function expandStyle(key, value) {
2445
+ if (!1)
2446
+ switch (key) {
2447
+ case "textAlignVertical":
2448
+ case "writingDirection":
2449
+ }
2450
+ if (import_constants.isAndroid && key === "elevationAndroid")
2451
+ return [["elevation", value]];
2452
+ if (key in EXPANSIONS)
2453
+ return EXPANSIONS[key].map((key2) => [key2, value]);
2454
+ }
2455
+ var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
2456
+ borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
2457
+ borderRadius: [
2458
+ "TopLeftRadius",
2459
+ "TopRightRadius",
2460
+ "BottomRightRadius",
2461
+ "BottomLeftRadius"
2462
+ ],
2463
+ borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
2464
+ margin: all,
2465
+ marginHorizontal: horiz,
2466
+ marginVertical: vert,
2467
+ overscrollBehavior: xy,
2468
+ padding: all,
2469
+ paddingHorizontal: horiz,
2470
+ paddingVertical: vert,
2471
+ ...import_constants.isWeb && {
2472
+ // react-native only supports borderStyle
2473
+ borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
2474
+ // react-native doesn't support X / Y
2475
+ overflow: xy
2476
+ }
2477
+ }, _a;
2478
+ for (let parent in EXPANSIONS) {
2479
+ let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
2480
+ EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
2481
+ }
2482
+ }
2483
+ });
2484
+
2485
+ // ../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js
2486
+ var require_expandStylesAndRemoveNullishValues_native = __commonJS({
2487
+ "../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js"(exports, module2) {
2488
+ "use strict";
2489
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
2490
+ for (var name in all)
2491
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
2492
+ }, __copyProps2 = (to, from, except, desc) => {
2493
+ if (from && typeof from == "object" || typeof from == "function")
2494
+ for (let key of __getOwnPropNames2(from))
2495
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
2496
+ return to;
2497
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStylesAndRemoveNullishValues_exports = {};
2498
+ __export2(expandStylesAndRemoveNullishValues_exports, {
2499
+ expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues
2500
+ });
2501
+ module2.exports = __toCommonJS2(expandStylesAndRemoveNullishValues_exports);
2502
+ var import_expandStyle = require_expandStyle_native(), import_expandStyles = require_expandStyles_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_pseudoDescriptors = require_pseudoDescriptors_native();
2503
+ function expandStylesAndRemoveNullishValues(style, disableNormalize = !1) {
2504
+ let res = {};
2505
+ for (let key in style) {
2506
+ let prop = style[key];
2507
+ if (prop == null)
2508
+ continue;
2509
+ if (key in import_pseudoDescriptors.pseudoDescriptors) {
2510
+ res[key] = expandStylesAndRemoveNullishValues(prop, disableNormalize);
2511
+ continue;
2512
+ }
2513
+ let value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
2514
+ out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
2515
+ }
2516
+ return (0, import_expandStyles.fixStyles)(res), res;
2517
+ }
2518
+ }
2519
+ });
2520
+
2501
2521
  // ../web/dist/cjs/helpers/getVariantExtras.native.js
2502
2522
  var require_getVariantExtras_native = __commonJS({
2503
2523
  "../web/dist/cjs/helpers/getVariantExtras.native.js"(exports, module2) {
@@ -2604,7 +2624,7 @@ var require_propMapper_native = __commonJS({
2604
2624
  propMapper: () => propMapper
2605
2625
  });
2606
2626
  module2.exports = __toCommonJS2(propMapper_exports);
2607
- var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStyles = require_expandStyles_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
2627
+ var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStylesAndRemoveNullishValues = require_expandStylesAndRemoveNullishValues_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
2608
2628
  if (!import_constants.isAndroid && key === "elevationAndroid")
2609
2629
  return;
2610
2630
  let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
@@ -2661,7 +2681,10 @@ var require_propMapper_native = __commonJS({
2661
2681
  );
2662
2682
  }
2663
2683
  if (variantValue) {
2664
- let expanded = (0, import_expandStyles.expandStylesAndRemoveNullishValues)(variantValue), next = Object.entries(expanded);
2684
+ let expanded = (0, import_expandStylesAndRemoveNullishValues.expandStylesAndRemoveNullishValues)(
2685
+ variantValue,
2686
+ !!styleProps.noNormalize
2687
+ ), next = Object.entries(expanded);
2665
2688
  return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
2666
2689
  }
2667
2690
  };
@@ -2826,7 +2849,7 @@ var require_getSplitStyles_native = __commonJS({
2826
2849
  module2.exports = __toCommonJS2(getSplitStyles_exports);
2827
2850
  var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), fontFamilyKey = "fontFamily", IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
2828
2851
  var _a, _b, _c, _e, _f, _g;
2829
- conf = conf || (0, import_config.getConfig)();
2852
+ conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
2830
2853
  let { shorthands } = conf, {
2831
2854
  isHOC,
2832
2855
  isText,
@@ -2897,7 +2920,7 @@ var require_getSplitStyles_native = __commonJS({
2897
2920
  continue;
2898
2921
  }
2899
2922
  if (keyInit[0] === "_" && keyInit.startsWith("_style")) {
2900
- mergeStyleProp(styleState, valInit);
2923
+ mergeStylePropIntoStyle(styleState, valInit);
2901
2924
  continue;
2902
2925
  }
2903
2926
  if (!1 && !(keyInit in accessibilityDirectMap))
@@ -3151,7 +3174,7 @@ current`, {
3151
3174
  }
3152
3175
  }
3153
3176
  }
3154
- if (props.style && mergeStyleProp(styleState, props.style), !styleProps.noNormalize && ((0, import_expandStyles.fixStyles)(style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
3177
+ if (props.style && mergeStylePropIntoStyle(styleState, props.style), styleProps.noNormalize !== !1 && ((0, import_expandStyles.fixStyles)(style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
3155
3178
  mergeTransform(style, key, val, !0);
3156
3179
  }), parentSplitStyles && !shouldDoClasses))
3157
3180
  for (let key in parentSplitStyles.style)
@@ -3199,14 +3222,14 @@ current`, {
3199
3222
  }
3200
3223
  return result;
3201
3224
  };
3202
- function mergeStyle(styleState, key, val) {
3225
+ function mergeStyle(styleState, key, val, disableNormalize = !1) {
3203
3226
  let { classNames, viewProps, style, usedKeys, styleProps } = styleState;
3204
3227
  if (import_constants.isWeb && (val == null ? void 0 : val[0]) === "_")
3205
3228
  classNames[key] = val, usedKeys[key] ||= 1;
3206
3229
  else if (key in import_helpers.stylePropsTransform)
3207
3230
  styleState.transforms ||= {}, styleState.transforms[key] = val;
3208
3231
  else {
3209
- let out = import_constants.isWeb && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
3232
+ let out = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
3210
3233
  key in import_helpers.validStylesOnBaseProps ? viewProps[key] = out : style[key] = out;
3211
3234
  }
3212
3235
  }
@@ -3222,17 +3245,13 @@ current`, {
3222
3245
  }
3223
3246
  return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
3224
3247
  };
3225
- function mergeStyleProp(styleState, val) {
3226
- if (!val)
3227
- return;
3228
- let styles = [].concat(val).flat();
3229
- for (let cur of styles)
3230
- if (cur)
3231
- if (cur.$$css)
3232
- Object.assign(styleState.classNames, cur);
3233
- else
3234
- for (let key in cur)
3235
- key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
3248
+ function mergeStylePropIntoStyle(styleState, cur) {
3249
+ if (cur)
3250
+ if (cur.$$css)
3251
+ Object.assign(styleState.classNames, cur);
3252
+ else
3253
+ for (let key in cur)
3254
+ key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
3236
3255
  }
3237
3256
  var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
3238
3257
  }, useSplitStyles = (...args) => {
@@ -4556,11 +4575,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
4556
4575
  }
4557
4576
  function styleable(Component2, options) {
4558
4577
  var _a2;
4559
- let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
4560
- // memo because theme changes otherwise would always re-render
4561
- (0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
4562
- ), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig), out = options != null && options.disableTheme ? ComponentForwardedRef : (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
4563
- return out.staticConfig = extendedConfig, out.styleable = styleable, out;
4578
+ let out = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (0, import_react2.forwardRef)(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
4579
+ return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = (0, import_react2.memo)(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
4564
4580
  }
4565
4581
  return res.extractable = extractable, res.styleable = styleable, res;
4566
4582
  }
@@ -6046,6 +6062,7 @@ var require_index_native9 = __commonJS({
6046
6062
  __reExport2(src_exports2, require_ComponentContext_native(), module2.exports);
6047
6063
  __reExport2(src_exports2, require_createStyledContext_native(), module2.exports);
6048
6064
  __reExport2(src_exports2, require_expandStyles_native(), module2.exports);
6065
+ __reExport2(src_exports2, require_expandStylesAndRemoveNullishValues_native(), module2.exports);
6049
6066
  __reExport2(src_exports2, require_propMapper_native(), module2.exports);
6050
6067
  __reExport2(src_exports2, require_getExpandedShorthands_native(), module2.exports);
6051
6068
  __reExport2(src_exports2, require_getSplitStyles_native(), module2.exports);
@@ -16103,7 +16120,6 @@ var require_RadioGroup_native = __commonJS({
16103
16120
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
16104
16121
  RadioGroupFrame,
16105
16122
  {
16106
- "aria-valuetext": value,
16107
16123
  role: "radiogroup",
16108
16124
  "aria-orientation": orientation,
16109
16125
  ref: forwardedRef,