tamagui 1.88.18 → 1.88.20

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
@@ -2473,6 +2473,55 @@ var require_defaultComponentState_native = __commonJS({
2473
2473
  }
2474
2474
  });
2475
2475
 
2476
+ // ../web/dist/cjs/helpers/skipProps.native.js
2477
+ var require_skipProps_native = __commonJS({
2478
+ "../web/dist/cjs/helpers/skipProps.native.js"(exports2, module2) {
2479
+ "use strict";
2480
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
2481
+ for (var name in all)
2482
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
2483
+ }, __copyProps2 = (to, from, except, desc) => {
2484
+ if (from && typeof from == "object" || typeof from == "function")
2485
+ for (let key of __getOwnPropNames2(from))
2486
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
2487
+ return to;
2488
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), skipProps_exports = {};
2489
+ __export2(skipProps_exports, {
2490
+ skipProps: () => skipProps
2491
+ });
2492
+ module2.exports = __toCommonJS2(skipProps_exports);
2493
+ var skipProps = {
2494
+ untilMeasured: 1,
2495
+ animation: 1,
2496
+ space: 1,
2497
+ animateOnly: 1,
2498
+ disableClassName: 1,
2499
+ debug: 1,
2500
+ componentName: 1,
2501
+ disableOptimization: 1,
2502
+ tag: 1,
2503
+ style: 1,
2504
+ // handled after loop so pseudos set usedKeys and override it if necessary
2505
+ group: 1
2506
+ };
2507
+ process.env.NODE_ENV === "test" && (skipProps["data-test-renders"] = 1);
2508
+ Object.assign(skipProps, {
2509
+ whiteSpace: 1,
2510
+ wordWrap: 1,
2511
+ textOverflow: 1,
2512
+ textDecorationDistance: 1,
2513
+ cursor: 1,
2514
+ contain: 1,
2515
+ boxSizing: 1,
2516
+ boxShadow: 1,
2517
+ outlineStyle: 1,
2518
+ outlineOffset: 1,
2519
+ outlineWidth: 1,
2520
+ outlineColor: 1
2521
+ });
2522
+ }
2523
+ });
2524
+
2476
2525
  // ../web/dist/cjs/constants/accessibilityDirectMap.native.js
2477
2526
  var require_accessibilityDirectMap_native = __commonJS({
2478
2527
  "../web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
@@ -3577,7 +3626,7 @@ var require_propMapper_native = __commonJS({
3577
3626
  propMapper: () => propMapper
3578
3627
  });
3579
3628
  module2.exports = __toCommonJS2(propMapper_exports);
3580
- var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
3629
+ var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
3581
3630
  var _a;
3582
3631
  if (lastFontFamilyToken = null, !import_constants4.isAndroid && key === "elevationAndroid")
3583
3632
  return;
@@ -3671,43 +3720,45 @@ var require_propMapper_native = __commonJS({
3671
3720
  process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key, value);
3672
3721
  for (let _key in value) {
3673
3722
  let subKey = conf.shorthands[_key] || _key, val = value[_key];
3674
- if (styleProps.noExpand)
3675
- res[subKey] = val;
3676
- else if (variants && subKey in variants) {
3677
- if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
3678
- res[subKey] = // SYNC WITH *1
3679
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
3680
- else {
3681
- let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
3682
- if (variantOut)
3683
- for (let [key2, val2] of variantOut)
3684
- val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
3723
+ if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
3724
+ if (styleProps.noExpand)
3725
+ res[subKey] = val;
3726
+ else if (variants && subKey in variants) {
3727
+ if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
3728
+ res[subKey] = // SYNC WITH *1
3729
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
3730
+ else {
3731
+ let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
3732
+ if (variantOut)
3733
+ for (let [key2, val2] of variantOut)
3734
+ val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
3735
+ }
3736
+ continue;
3685
3737
  }
3686
- continue;
3687
- }
3688
- if ((0, import_createVariable.isVariable)(val)) {
3689
- res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues), process.env.NODE_ENV === "development" && debug === "verbose" && console.info("variable", subKey, res[subKey]);
3690
- continue;
3691
- }
3692
- if (typeof val == "string") {
3693
- let fVal = (
3694
- // SYNC WITH *1
3695
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
3738
+ if ((0, import_createVariable.isVariable)(val)) {
3739
+ res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues), process.env.NODE_ENV === "development" && debug === "verbose" && console.info("variable", subKey, res[subKey]);
3740
+ continue;
3741
+ }
3742
+ if (typeof val == "string") {
3743
+ let fVal = (
3744
+ // SYNC WITH *1
3745
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
3746
+ );
3747
+ res[subKey] = fVal;
3748
+ continue;
3749
+ }
3750
+ if ((0, import_isObj.isObj)(val)) {
3751
+ let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
3752
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
3753
+ } else
3754
+ res[subKey] = val;
3755
+ process.env.NODE_ENV === "development" && debug && ((_a = res[subKey]) == null ? void 0 : _a[0]) === "$" && console.warn(
3756
+ `\u26A0\uFE0F Missing token in theme ${theme.name}:`,
3757
+ subKey,
3758
+ res[subKey],
3759
+ theme
3696
3760
  );
3697
- res[subKey] = fVal;
3698
- continue;
3699
3761
  }
3700
- if ((0, import_isObj.isObj)(val)) {
3701
- let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
3702
- process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
3703
- } else
3704
- res[subKey] = val;
3705
- process.env.NODE_ENV === "development" && debug && ((_a = res[subKey]) == null ? void 0 : _a[0]) === "$" && console.warn(
3706
- `\u26A0\uFE0F Missing token in theme ${theme.name}:`,
3707
- subKey,
3708
- res[subKey],
3709
- theme
3710
- );
3711
3762
  }
3712
3763
  return res;
3713
3764
  }, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
@@ -3817,7 +3868,7 @@ var require_getSplitStyles_native = __commonJS({
3817
3868
  useSplitStyles: () => useSplitStyles
3818
3869
  });
3819
3870
  module2.exports = __toCommonJS2(getSplitStyles_exports);
3820
- var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), 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_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
3871
+ var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react2 = require("react"), import_config = require_config_native(), import_skipProps = require_skipProps_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), 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_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
3821
3872
  function isValidStyleKey(key, staticConfig) {
3822
3873
  var _a;
3823
3874
  return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || ((_a = staticConfig.acceptTokens) == null ? void 0 : _a[key]);
@@ -3861,7 +3912,7 @@ var require_getSplitStyles_native = __commonJS({
3861
3912
  }), console.groupEnd());
3862
3913
  for (let keyOg in props) {
3863
3914
  let keyInit = keyOg, valInit = props[keyOg];
3864
- if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
3915
+ if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in import_skipProps.skipProps && !styleProps.noSkip && !isHOC)
3865
3916
  continue;
3866
3917
  let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
3867
3918
  if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
@@ -3919,7 +3970,7 @@ var require_getSplitStyles_native = __commonJS({
3919
3970
  if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
3920
3971
  continue;
3921
3972
  let shouldPassProp = !isStyleProp || // is in parent variants
3922
- isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
3973
+ isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
3923
3974
  if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(
3924
3975
  ` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`
3925
3976
  ), (0, import_log.log)({ isVariant, valInit, shouldPassProp }), import_constants4.isClient && (0, import_log.log)({
@@ -3929,14 +3980,20 @@ var require_getSplitStyles_native = __commonJS({
3929
3980
  isHOCShouldPassThrough,
3930
3981
  curProps: { ...styleState.curProps },
3931
3982
  parentStaticConfig
3932
- })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
3983
+ })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in import_skipProps.skipProps)
3933
3984
  continue;
3934
3985
  if ((isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && valInit !== "unset" && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
3935
3986
  style[keyInit] = valInit;
3936
3987
  continue;
3937
3988
  }
3938
- let expanded = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit ? [[keyInit, valInit]] : (0, import_propMapper.propMapper)(keyInit, valInit, styleState), next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
3939
- if (next && (styleState.fontFamily = next), process.env.NODE_ENV === "development" && debug === "verbose") {
3989
+ let avoidPropMap = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
3990
+ if (!avoidPropMap) {
3991
+ if (!expanded)
3992
+ continue;
3993
+ let next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
3994
+ next && (styleState.fontFamily = next);
3995
+ }
3996
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
3940
3997
  console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
3941
3998
  try {
3942
3999
  !import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
@@ -3959,192 +4016,195 @@ current`, {
3959
4016
  }
3960
4017
  console.groupEnd();
3961
4018
  }
3962
- if (expanded) {
3963
- for (let [key, val] of expanded)
3964
- if (!(val == null || key in usedKeys)) {
3965
- if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
3966
- passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), (0, import_log.log)({ val, after: { ...viewProps[key] } }), console.groupEnd());
4019
+ let key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1;
4020
+ for (let i = 0; i < max2; i++) {
4021
+ if (expanded) {
4022
+ let [k, v] = expanded[i];
4023
+ key = k, val = v;
4024
+ }
4025
+ if (!(val == null || key in usedKeys)) {
4026
+ if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
4027
+ passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), (0, import_log.log)({ val, after: { ...viewProps[key] } }), console.groupEnd());
4028
+ continue;
4029
+ }
4030
+ if (isPseudo) {
4031
+ if (!val)
4032
+ continue;
4033
+ let pseudoStyleObject = getSubStyle(
4034
+ styleState,
4035
+ key,
4036
+ val,
4037
+ styleProps.noClassNames
4038
+ ), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
4039
+ if (!descriptor)
4040
+ continue;
4041
+ if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
4042
+ Object.assign(pseudos[key], pseudoStyleObject);
3967
4043
  continue;
3968
4044
  }
3969
- if (isPseudo) {
3970
- if (!val)
3971
- continue;
3972
- let pseudoStyleObject = getSubStyle(
3973
- styleState,
3974
- key,
3975
- val,
3976
- styleProps.noClassNames
3977
- ), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
3978
- if (!descriptor)
3979
- continue;
3980
- if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
3981
- Object.assign(pseudos[key], pseudoStyleObject);
3982
- continue;
3983
- }
3984
- if (shouldDoClasses && !isExit) {
3985
- let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
3986
- process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
3987
- for (let psuedoStyle of pseudoStyles)
3988
- `${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
3989
- }
3990
- if (!shouldDoClasses || isExit || isEnter) {
3991
- let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
3992
- isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, { isDisabled }), (0, import_log.log)({ pseudoStyleObject, isDisabled, descriptor, componentState }), console.groupEnd());
3993
- let importance = descriptor.priority;
3994
- for (let pkey in pseudoStyleObject) {
3995
- let val2 = pseudoStyleObject[pkey];
3996
- if (isDisabled) {
3997
- let defaultValues = animatableDefaults[pkey];
3998
- defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
3999
- } else {
4000
- let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
4001
- shouldMerge && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
4002
- importance,
4003
- curImportance,
4004
- pkey,
4005
- val: val2,
4006
- transforms: { ...styleState.transforms }
4007
- });
4008
- }
4045
+ if (shouldDoClasses && !isExit) {
4046
+ let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
4047
+ process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
4048
+ for (let psuedoStyle of pseudoStyles)
4049
+ `${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
4050
+ }
4051
+ if (!shouldDoClasses || isExit || isEnter) {
4052
+ let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
4053
+ isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, { isDisabled }), (0, import_log.log)({ pseudoStyleObject, isDisabled, descriptor, componentState }), console.groupEnd());
4054
+ let importance = descriptor.priority;
4055
+ for (let pkey in pseudoStyleObject) {
4056
+ let val2 = pseudoStyleObject[pkey];
4057
+ if (isDisabled) {
4058
+ let defaultValues = animatableDefaults[pkey];
4059
+ defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
4060
+ } else {
4061
+ let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
4062
+ shouldMerge && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
4063
+ importance,
4064
+ curImportance,
4065
+ pkey,
4066
+ val: val2,
4067
+ transforms: { ...styleState.transforms }
4068
+ });
4009
4069
  }
4010
- if (!isDisabled)
4011
- for (let key2 in val) {
4012
- let k = shorthands[key2] || key2;
4013
- usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
4014
- }
4015
4070
  }
4071
+ if (!isDisabled)
4072
+ for (let key2 in val) {
4073
+ let k = shorthands[key2] || key2;
4074
+ usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
4075
+ }
4076
+ }
4077
+ continue;
4078
+ }
4079
+ if (isMedia) {
4080
+ if (!val)
4016
4081
  continue;
4082
+ if (isMedia === "platform") {
4083
+ let platform = key.slice(10);
4084
+ if (
4085
+ // supports web, ios, android
4086
+ platform !== import_constants4.currentPlatform && // supports web, native
4087
+ platform !== "native"
4088
+ )
4089
+ continue;
4017
4090
  }
4018
- if (isMedia) {
4019
- if (!val)
4091
+ hasMedia || (hasMedia = !0);
4092
+ let mediaStyle = getSubStyle(
4093
+ styleState,
4094
+ key,
4095
+ val,
4096
+ // TODO try true like pseudo
4097
+ !1
4098
+ ), mediaKeyShort = key.slice(1);
4099
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
4100
+ key,
4101
+ val,
4102
+ mediaStyle,
4103
+ props,
4104
+ shouldDoClasses,
4105
+ componentState
4106
+ });
4107
+ let hasSpace = val.space;
4108
+ if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
4109
+ if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
4110
+ let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
4111
+ mediaKeyShort,
4112
+ "space",
4113
+ usedKeys,
4114
+ !0
4115
+ );
4116
+ importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
4117
+ `Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
4118
+ ));
4119
+ }
4120
+ let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
4121
+ mediaStylesSeen += 1;
4122
+ for (let style2 of mediaStyles) {
4123
+ let out = (0, import_createMediaStyle.createMediaStyle)(
4124
+ style2,
4125
+ mediaKeyShort,
4126
+ import_useMedia.mediaQueryConfig,
4127
+ isMedia,
4128
+ !1,
4129
+ priority
4130
+ );
4131
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out), `${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
4132
+ }
4133
+ } else {
4134
+ let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
4135
+ if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
4020
4136
  continue;
4021
- if (isMedia === "platform") {
4022
- let platform = key.slice(10);
4023
- if (
4024
- // supports web, ios, android
4025
- platform !== import_constants4.currentPlatform && // supports web, native
4026
- platform !== "native"
4027
- )
4137
+ let importanceBump = 0;
4138
+ if (isThemeMedia) {
4139
+ dynamicThemeAccess = !0;
4140
+ let mediaThemeName = mediaKeyShort.slice(6);
4141
+ if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
4028
4142
  continue;
4029
- }
4030
- hasMedia || (hasMedia = !0);
4031
- let mediaStyle = getSubStyle(
4032
- styleState,
4033
- key,
4034
- val,
4035
- // TODO try true like pseudo
4036
- !1
4037
- ), mediaKeyShort = key.slice(1);
4038
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
4039
- key,
4040
- val,
4041
- mediaStyle,
4042
- props,
4043
- shouldDoClasses,
4044
- componentState
4045
- });
4046
- let hasSpace = val.space;
4047
- if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
4048
- if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
4049
- let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
4050
- mediaKeyShort,
4051
- "space",
4052
- usedKeys,
4053
- !0
4054
- );
4055
- importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
4056
- `Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
4057
- ));
4058
- }
4059
- let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
4060
- mediaStylesSeen += 1;
4061
- for (let style2 of mediaStyles) {
4062
- let out = (0, import_createMediaStyle.createMediaStyle)(
4063
- style2,
4064
- mediaKeyShort,
4065
- import_useMedia.mediaQueryConfig,
4066
- isMedia,
4067
- !1,
4068
- priority
4069
- );
4070
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out), `${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
4071
- }
4072
- } else {
4073
- let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
4074
- if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
4143
+ } else if (isGroupMedia) {
4144
+ let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
4145
+ if (!groupContext) {
4146
+ process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
4075
4147
  continue;
4076
- let importanceBump = 0;
4077
- if (isThemeMedia) {
4078
- dynamicThemeAccess = !0;
4079
- let mediaThemeName = mediaKeyShort.slice(6);
4080
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
4081
- continue;
4082
- } else if (isGroupMedia) {
4083
- let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
4084
- if (!groupContext) {
4085
- process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
4148
+ }
4149
+ let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
4150
+ if (groupMediaKey) {
4151
+ mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
4152
+ let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
4153
+ if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
4086
4154
  continue;
4087
- }
4088
- let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
4089
- if (groupMediaKey) {
4090
- mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
4091
- let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
4092
- if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
4093
- continue;
4094
- importanceBump = 2;
4095
- }
4096
- if (groupPseudoKey) {
4097
- pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
4098
- let componentGroupPseudoState = (componentGroupState || // fallback to context initially
4099
- context.groups.state[groupName]).pseudo;
4100
- if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
4101
- continue;
4102
- importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
4103
- }
4155
+ importanceBump = 2;
4104
4156
  }
4105
- for (let subKey in mediaStyle) {
4106
- if (subKey === "space") {
4107
- space = valInit.space;
4157
+ if (groupPseudoKey) {
4158
+ pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
4159
+ let componentGroupPseudoState = (componentGroupState || // fallback to context initially
4160
+ context.groups.state[groupName]).pseudo;
4161
+ if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
4108
4162
  continue;
4109
- }
4110
- (0, import_useMedia.mergeMediaByImportance)(
4111
- style,
4112
- mediaKeyShort,
4113
- subKey,
4114
- mediaStyle[subKey],
4115
- usedKeys,
4116
- mediaState3[mediaKeyShort],
4117
- importanceBump
4118
- ), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
4163
+ importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
4119
4164
  }
4120
4165
  }
4121
- continue;
4122
- }
4123
- if (key === "pointerEvents") {
4124
- viewProps[key] = val;
4125
- continue;
4126
- }
4127
- if (
4128
- // is HOC we can just pass through the styles as props
4129
- // this fixes issues where style prop got merged with wrong priority
4130
- !isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
4131
- ) {
4132
- mergeStyle(styleState, key, val);
4133
- continue;
4166
+ for (let subKey in mediaStyle) {
4167
+ if (subKey === "space") {
4168
+ space = valInit.space;
4169
+ continue;
4170
+ }
4171
+ (0, import_useMedia.mergeMediaByImportance)(
4172
+ style,
4173
+ mediaKeyShort,
4174
+ subKey,
4175
+ mediaStyle[subKey],
4176
+ usedKeys,
4177
+ mediaState3[mediaKeyShort],
4178
+ importanceBump
4179
+ ), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
4180
+ }
4134
4181
  }
4135
- isVariant || (viewProps[key] = val);
4182
+ continue;
4136
4183
  }
4137
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
4138
- console.groupCollapsed(" \u2714\uFE0F expand complete", keyInit);
4139
- try {
4140
- (0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
4141
- } catch {
4184
+ if (key === "pointerEvents") {
4185
+ viewProps[key] = val;
4186
+ continue;
4142
4187
  }
4143
- console.groupEnd();
4188
+ if (
4189
+ // is HOC we can just pass through the styles as props
4190
+ // this fixes issues where style prop got merged with wrong priority
4191
+ !isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
4192
+ ) {
4193
+ mergeStyle(styleState, key, val);
4194
+ continue;
4195
+ }
4196
+ isVariant || (viewProps[key] = val);
4197
+ }
4198
+ }
4199
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
4200
+ try {
4201
+ (0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
4202
+ } catch {
4144
4203
  }
4204
+ console.groupEnd();
4145
4205
  }
4146
4206
  }
4147
- if (process.env.NODE_ENV === "development" && console.groupEnd(), props.style)
4207
+ if (props.style)
4148
4208
  if (isHOC)
4149
4209
  viewProps.style = props.style;
4150
4210
  else
@@ -4215,7 +4275,7 @@ current`, {
4215
4275
  let val = styleIn[key];
4216
4276
  key = conf2.shorthands[key] || key;
4217
4277
  let expanded = (0, import_propMapper.propMapper)(key, val, styleState, { ...props, ...props[subKey] });
4218
- if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip))
4278
+ if (!(!expanded || !staticConfig.isHOC && key in import_skipProps.skipProps && !styleProps.noSkip))
4219
4279
  for (let [skey, sval] of expanded)
4220
4280
  !avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
4221
4281
  }
@@ -4235,35 +4295,7 @@ current`, {
4235
4295
  }, mapTransformKeys = {
4236
4296
  x: "translateX",
4237
4297
  y: "translateY"
4238
- }, skipProps = {
4239
- untilMeasured: 1,
4240
- animation: 1,
4241
- space: 1,
4242
- animateOnly: 1,
4243
- disableClassName: 1,
4244
- debug: 1,
4245
- componentName: 1,
4246
- disableOptimization: 1,
4247
- tag: 1,
4248
- style: 1,
4249
- // handled after loop so pseudos set usedKeys and override it if necessary
4250
- group: 1
4251
4298
  };
4252
- process.env.NODE_ENV === "test" && (skipProps["data-test-renders"] = 1);
4253
- Object.assign(skipProps, {
4254
- whiteSpace: 1,
4255
- wordWrap: 1,
4256
- textOverflow: 1,
4257
- textDecorationDistance: 1,
4258
- cursor: 1,
4259
- contain: 1,
4260
- boxSizing: 1,
4261
- boxShadow: 1,
4262
- outlineStyle: 1,
4263
- outlineOffset: 1,
4264
- outlineWidth: 1,
4265
- outlineColor: 1
4266
- });
4267
4299
  function passDownProp(viewProps, key, val, shouldMergeObject = !1) {
4268
4300
  if (shouldMergeObject) {
4269
4301
  let next = {
@@ -5053,8 +5085,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
5053
5085
  willBeAnimated
5054
5086
  }));
5055
5087
  } catch {
5088
+ } finally {
5089
+ console.groupEnd();
5056
5090
  }
5057
- console.groupEnd();
5058
5091
  } else {
5059
5092
  (0, import_log.log)(title), (0, import_log.log)("final styles:");
5060
5093
  for (let key in splitStylesStyle)
@@ -10936,10 +10969,21 @@ var require_Dialog_native = __commonJS({
10936
10969
  children: isShowing ? children : null
10937
10970
  }
10938
10971
  );
10939
- return useShowDialogSheet(context) ? children : context.modal ? isFullyHidden ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, { __scopeDialog, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, { pointerEvents: isShowing ? "auto" : "none", ...frameProps, children: contents }) }) }) : contents;
10972
+ if (useShowDialogSheet(context))
10973
+ return children;
10974
+ if (context.modal) {
10975
+ if (isFullyHidden)
10976
+ return null;
10977
+ let framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, { pointerEvents: isShowing ? "auto" : "none", ...frameProps, children: contents }) });
10978
+ return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, { zIndex: props.zIndex ?? 1e5, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, { children: framedContents }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, { __scopeDialog, children: framedContents });
10979
+ }
10980
+ return contents;
10940
10981
  };
10941
10982
  DialogPortal.displayName = PORTAL_NAME;
10942
- var OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
10983
+ var PassthroughTheme = ({ children }) => {
10984
+ let themeName = (0, import_core12.useThemeName)();
10985
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { name: themeName, forceClassName: !0, children });
10986
+ }, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
10943
10987
  name: OVERLAY_NAME
10944
10988
  }), DialogOverlay = DialogOverlayFrame.extractable(
10945
10989
  React2.forwardRef(
@@ -17140,6 +17184,8 @@ var require_SelectTrigger_native = __commonJS({
17140
17184
  {
17141
17185
  componentName: TRIGGER_NAME,
17142
17186
  unstyled,
17187
+ tag: "button",
17188
+ id: itemParentContext.id,
17143
17189
  ...!unstyled && {
17144
17190
  backgrounded: !0,
17145
17191
  radiused: !0,
@@ -17151,9 +17197,9 @@ var require_SelectTrigger_native = __commonJS({
17151
17197
  outlineWidth: 2,
17152
17198
  outlineColor: "$outlineColor"
17153
17199
  },
17154
- borderWidth: 1
17200
+ borderWidth: 1,
17201
+ size: itemParentContext.size
17155
17202
  },
17156
- size: itemParentContext.size,
17157
17203
  "aria-expanded": context.open,
17158
17204
  "aria-autocomplete": "none",
17159
17205
  dir: context.dir,
@@ -17436,8 +17482,9 @@ var require_Select_native = __commonJS({
17436
17482
  disablePreventBodyScroll,
17437
17483
  size: sizeProp = "$true",
17438
17484
  onActiveChange,
17439
- dir
17440
- } = props, id = React2.useId(), scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? id : id, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
17485
+ dir,
17486
+ id
17487
+ } = props, internalId = React2.useId(), scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? internalId : internalId, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
17441
17488
  Contents: React2.useCallback(
17442
17489
  () => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${scopeKey}SheetContents` }),
17443
17490
  [scopeKey]
@@ -17473,11 +17520,12 @@ var require_Select_native = __commonJS({
17473
17520
  import_context.SelectItemParentProvider,
17474
17521
  {
17475
17522
  scope: __scopeSelect,
17476
- initialValue: React2.useMemo(() => value, []),
17523
+ initialValue: React2.useMemo(() => value, [open]),
17477
17524
  size: sizeProp,
17478
17525
  activeIndexSubscribe,
17479
17526
  valueSubscribe,
17480
17527
  setOpen,
17528
+ id,
17481
17529
  onChange: React2.useCallback((val) => {
17482
17530
  setValue(val), emitValue(val);
17483
17531
  }, []),