tamagui 1.132.14 → 1.132.15
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 +284 -284
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +274 -274
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -1070,9 +1070,9 @@ var require_clamp_native = __commonJS({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
module2.exports = __toCommonJS2(clamp_exports);
|
|
1073
|
-
function clamp(
|
|
1073
|
+
function clamp(value, param) {
|
|
1074
1074
|
var [min, max] = param;
|
|
1075
|
-
return Math.min(max, Math.max(min,
|
|
1075
|
+
return Math.min(max, Math.max(min, value));
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
});
|
|
@@ -2056,7 +2056,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
2056
2056
|
return _();
|
|
2057
2057
|
};
|
|
2058
2058
|
function useControllableState(param) {
|
|
2059
|
-
var { prop, defaultProp, onChange, strategy = "prop-wins", preventUpdate, transition } = param, [state, setState] = React4.useState(prop ?? defaultProp), previous = React4.useRef(state), propWins = strategy === "prop-wins" && prop !== void 0,
|
|
2059
|
+
var { prop, defaultProp, onChange, strategy = "prop-wins", preventUpdate, transition } = param, [state, setState] = React4.useState(prop ?? defaultProp), previous = React4.useRef(state), propWins = strategy === "prop-wins" && prop !== void 0, value = propWins ? prop : state, onChangeCb = (0, import_use_event.useEvent)(onChange || idFn), transitionFn = transition ? import_start_transition.startTransition : emptyCallbackFn;
|
|
2060
2060
|
React4.useEffect(function() {
|
|
2061
2061
|
prop !== void 0 && (previous.current = prop, transitionFn(function() {
|
|
2062
2062
|
setState(prop);
|
|
@@ -2079,7 +2079,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
2079
2079
|
});
|
|
2080
2080
|
});
|
|
2081
2081
|
return [
|
|
2082
|
-
|
|
2082
|
+
value,
|
|
2083
2083
|
setter
|
|
2084
2084
|
];
|
|
2085
2085
|
}
|
|
@@ -2374,22 +2374,22 @@ var require_config_native = __commonJS({
|
|
|
2374
2374
|
{}
|
|
2375
2375
|
), { tokens, tokensParsed } = conf;
|
|
2376
2376
|
return prefixed === !1 ? tokens : prefixed === !0 ? tokensParsed : tokensMerged;
|
|
2377
|
-
}, getTokenObject = function(
|
|
2377
|
+
}, getTokenObject = function(value, group) {
|
|
2378
2378
|
var _tokensMerged_group, _tokensMerged_, _conf_specificTokens_value;
|
|
2379
|
-
return (_conf_specificTokens_value = conf.specificTokens[
|
|
2380
|
-
return tokensMerged[cat][
|
|
2381
|
-
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[
|
|
2382
|
-
}, getToken3 = function(
|
|
2383
|
-
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants4.isWeb, token = getTokenObject(
|
|
2379
|
+
return (_conf_specificTokens_value = conf.specificTokens[value]) !== null && _conf_specificTokens_value !== void 0 ? _conf_specificTokens_value : group ? (_tokensMerged_group = tokensMerged[group]) === null || _tokensMerged_group === void 0 ? void 0 : _tokensMerged_group[value] : (_tokensMerged_ = tokensMerged[Object.keys(tokensMerged).find(function(cat) {
|
|
2380
|
+
return tokensMerged[cat][value];
|
|
2381
|
+
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value];
|
|
2382
|
+
}, getToken3 = function(value, group) {
|
|
2383
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants4.isWeb, token = getTokenObject(value, group);
|
|
2384
2384
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
2385
|
-
}, getTokenValue3 = function(
|
|
2386
|
-
if (!(
|
|
2385
|
+
}, getTokenValue3 = function(value, group) {
|
|
2386
|
+
if (!(value === "unset" || value === "auto")) return getToken3(value, group, !1);
|
|
2387
2387
|
}, useTokens = getTokens3, getThemes3 = function() {
|
|
2388
2388
|
return conf.themes;
|
|
2389
2389
|
}, configListeners = /* @__PURE__ */ new Set(), onConfiguredOnce = function(cb) {
|
|
2390
2390
|
conf ? cb(conf) : configListeners.add(cb);
|
|
2391
|
-
}, updateConfig2 = function(key,
|
|
2392
|
-
Object.assign(conf[key],
|
|
2391
|
+
}, updateConfig2 = function(key, value) {
|
|
2392
|
+
Object.assign(conf[key], value);
|
|
2393
2393
|
}, getFont = function(name) {
|
|
2394
2394
|
var _Object_entries_find, conf2 = getConfig3(), _conf_fontsParsed_name;
|
|
2395
2395
|
return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {
|
|
@@ -2528,9 +2528,9 @@ var require_createVariable_native = __commonJS({
|
|
|
2528
2528
|
var includeVar = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, name = (0, import_helpers.simpleHash)(nameProp, 60);
|
|
2529
2529
|
return includeVar ? constructCSSVariableName(name) : name;
|
|
2530
2530
|
};
|
|
2531
|
-
function px(
|
|
2531
|
+
function px(value) {
|
|
2532
2532
|
return {
|
|
2533
|
-
val:
|
|
2533
|
+
val: value,
|
|
2534
2534
|
needsPx: !0
|
|
2535
2535
|
};
|
|
2536
2536
|
}
|
|
@@ -2617,8 +2617,8 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2617
2617
|
function addTransform(identifier, css, rule) {
|
|
2618
2618
|
var s = css.indexOf("transform:");
|
|
2619
2619
|
if (s !== -1) {
|
|
2620
|
-
var startI = s + 10, endI = css.indexOf(";"),
|
|
2621
|
-
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] =
|
|
2620
|
+
var startI = s + 10, endI = css.indexOf(";"), value = css.slice(startI, endI);
|
|
2621
|
+
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !0;
|
|
2622
2622
|
}
|
|
2623
2623
|
}
|
|
2624
2624
|
function scanAllSheets() {
|
|
@@ -3109,8 +3109,8 @@ var require_useMedia_native = __commonJS({
|
|
|
3109
3109
|
if (typeof query == "string") return query;
|
|
3110
3110
|
if (cache.has(query)) return cache.get(query);
|
|
3111
3111
|
var res = Object.entries(query).map(function(param) {
|
|
3112
|
-
var [feature,
|
|
3113
|
-
return feature = camelToHyphen(feature), typeof
|
|
3112
|
+
var [feature, value] = param;
|
|
3113
|
+
return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
|
|
3114
3114
|
}).join(" and ");
|
|
3115
3115
|
return key && (cachedMediaKeyToQuery[key] = res), cache.set(query, res), res;
|
|
3116
3116
|
}
|
|
@@ -3193,8 +3193,8 @@ var require_Tamagui_native = __commonJS({
|
|
|
3193
3193
|
var TamaguiManager;
|
|
3194
3194
|
}(), identifierToValue = /* @__PURE__ */ new Map(), getValueFromIdentifier = function(identifier) {
|
|
3195
3195
|
return identifierToValue.get(identifier);
|
|
3196
|
-
}, setIdentifierValue = function(identifier,
|
|
3197
|
-
identifierToValue.set(identifier,
|
|
3196
|
+
}, setIdentifierValue = function(identifier, value) {
|
|
3197
|
+
identifierToValue.set(identifier, value);
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
3200
|
});
|
|
@@ -3261,8 +3261,8 @@ var require_compose_refs_native = __commonJS({
|
|
|
3261
3261
|
});
|
|
3262
3262
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
3263
3263
|
var React4 = __toESM2(require("react"));
|
|
3264
|
-
function setRef(ref,
|
|
3265
|
-
typeof ref == "function" ? ref(
|
|
3264
|
+
function setRef(ref, value) {
|
|
3265
|
+
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
3266
3266
|
}
|
|
3267
3267
|
function composeRefs() {
|
|
3268
3268
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
@@ -3584,8 +3584,8 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3584
3584
|
})
|
|
3585
3585
|
});
|
|
3586
3586
|
}, useStyledContext = function() {
|
|
3587
|
-
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext,
|
|
3588
|
-
return
|
|
3587
|
+
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value = import_react3.default.useContext(context);
|
|
3588
|
+
return value;
|
|
3589
3589
|
};
|
|
3590
3590
|
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
3591
3591
|
}
|
|
@@ -5127,11 +5127,11 @@ var require_normalizeValueWithProperty_native = __commonJS({
|
|
|
5127
5127
|
translateX: !0,
|
|
5128
5128
|
translateY: !0
|
|
5129
5129
|
};
|
|
5130
|
-
function normalizeValueWithProperty(
|
|
5130
|
+
function normalizeValueWithProperty(value) {
|
|
5131
5131
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
5132
|
-
if (!import_constants4.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof
|
|
5133
|
-
var res =
|
|
5134
|
-
return
|
|
5132
|
+
if (!import_constants4.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean") return value;
|
|
5133
|
+
var res = value;
|
|
5134
|
+
return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}px` : property && (res = `${res}`), res);
|
|
5135
5135
|
}
|
|
5136
5136
|
}
|
|
5137
5137
|
});
|
|
@@ -5395,26 +5395,26 @@ var require_expandStyle_native = __commonJS({
|
|
|
5395
5395
|
return `${prefix}${k}`;
|
|
5396
5396
|
});
|
|
5397
5397
|
};
|
|
5398
|
-
function expandStyle(key,
|
|
5398
|
+
function expandStyle(key, value) {
|
|
5399
5399
|
if (import_constants4.isAndroid && key === "elevationAndroid") return [
|
|
5400
5400
|
[
|
|
5401
5401
|
"elevation",
|
|
5402
|
-
|
|
5402
|
+
value
|
|
5403
5403
|
]
|
|
5404
5404
|
];
|
|
5405
5405
|
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
|
|
5406
5406
|
return [
|
|
5407
5407
|
key2,
|
|
5408
|
-
|
|
5408
|
+
value
|
|
5409
5409
|
];
|
|
5410
5410
|
});
|
|
5411
5411
|
if (key in import_webToNativeProps.webToNativeExpansion) return import_webToNativeProps.webToNativeExpansion[key].map(function(key2) {
|
|
5412
5412
|
return [
|
|
5413
5413
|
key2,
|
|
5414
|
-
|
|
5414
|
+
value
|
|
5415
5415
|
];
|
|
5416
5416
|
});
|
|
5417
|
-
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](
|
|
5417
|
+
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](value);
|
|
5418
5418
|
}
|
|
5419
5419
|
var all = [
|
|
5420
5420
|
"Top",
|
|
@@ -5659,8 +5659,8 @@ var require_normalizeStyle_native = __commonJS({
|
|
|
5659
5659
|
res[key] = normalizeStyle(prop, disableNormalize);
|
|
5660
5660
|
continue;
|
|
5661
5661
|
}
|
|
5662
|
-
var
|
|
5663
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] =
|
|
5662
|
+
var value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
5663
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
5664
5664
|
}
|
|
5665
5665
|
}
|
|
5666
5666
|
return (0, import_expandStyles.fixStyles)(res), res;
|
|
@@ -5879,18 +5879,18 @@ var require_propMapper_native = __commonJS({
|
|
|
5879
5879
|
}
|
|
5880
5880
|
});
|
|
5881
5881
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
5882
|
-
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key,
|
|
5883
|
-
if (disabled) return map(key,
|
|
5882
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key, value, styleState, disabled, map) {
|
|
5883
|
+
if (disabled) return map(key, value);
|
|
5884
5884
|
if (lastFontFamilyToken = null, !(!import_constants4.isAndroid && key === "elevationAndroid")) {
|
|
5885
5885
|
var { conf, styleProps, staticConfig } = styleState;
|
|
5886
|
-
if (
|
|
5886
|
+
if (value === "unset") {
|
|
5887
5887
|
var _conf_unset, unsetVal = (_conf_unset = conf.unset) === null || _conf_unset === void 0 ? void 0 : _conf_unset[key];
|
|
5888
|
-
if (unsetVal != null)
|
|
5888
|
+
if (unsetVal != null) value = unsetVal;
|
|
5889
5889
|
else return;
|
|
5890
5890
|
}
|
|
5891
5891
|
var { variants } = staticConfig;
|
|
5892
5892
|
if (!styleProps.noExpand && variants && key in variants) {
|
|
5893
|
-
var variantValue = resolveVariants(key,
|
|
5893
|
+
var variantValue = resolveVariants(key, value, styleProps, styleState, "");
|
|
5894
5894
|
if (variantValue) {
|
|
5895
5895
|
variantValue.forEach(function(param) {
|
|
5896
5896
|
var [_$key, _$value] = param;
|
|
@@ -5899,30 +5899,30 @@ var require_propMapper_native = __commonJS({
|
|
|
5899
5899
|
return;
|
|
5900
5900
|
}
|
|
5901
5901
|
}
|
|
5902
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]),
|
|
5902
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
|
|
5903
5903
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
5904
|
-
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key,
|
|
5904
|
+
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value);
|
|
5905
5905
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
5906
5906
|
var [nkey, nvalue] = expanded[i];
|
|
5907
5907
|
map(nkey, nvalue);
|
|
5908
5908
|
}
|
|
5909
|
-
else map(key,
|
|
5909
|
+
else map(key, value);
|
|
5910
5910
|
}
|
|
5911
5911
|
}
|
|
5912
|
-
}, resolveVariants = function(key,
|
|
5912
|
+
}, resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {
|
|
5913
5913
|
var { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
5914
5914
|
if (variants) {
|
|
5915
|
-
var variantValue = getVariantDefinition(variants[key],
|
|
5915
|
+
var variantValue = getVariantDefinition(variants[key], value, conf);
|
|
5916
5916
|
if (!variantValue) {
|
|
5917
|
-
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof
|
|
5917
|
+
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value != "boolean") {
|
|
5918
5918
|
var name = staticConfig.componentName || "[UnnamedComponent]";
|
|
5919
|
-
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${
|
|
5919
|
+
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value}"`);
|
|
5920
5920
|
}
|
|
5921
5921
|
return;
|
|
5922
5922
|
}
|
|
5923
5923
|
if (typeof variantValue == "function") {
|
|
5924
5924
|
var fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
5925
|
-
variantValue = fn(
|
|
5925
|
+
variantValue = fn(value, extras);
|
|
5926
5926
|
}
|
|
5927
5927
|
var fontFamilyResult;
|
|
5928
5928
|
if ((0, import_isObj.isObj)(variantValue)) {
|
|
@@ -5945,10 +5945,10 @@ var require_propMapper_native = __commonJS({
|
|
|
5945
5945
|
}
|
|
5946
5946
|
} else if (typeof input == "string" && input[0] === "$") return input;
|
|
5947
5947
|
}
|
|
5948
|
-
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key,
|
|
5948
|
+
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {
|
|
5949
5949
|
var { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
5950
|
-
for (var _key in
|
|
5951
|
-
var subKey = conf.shorthands[_key] || _key, val =
|
|
5950
|
+
for (var _key in value) {
|
|
5951
|
+
var subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
5952
5952
|
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
5953
5953
|
if (styleProps.noExpand) res[subKey] = val;
|
|
5954
5954
|
else if (variants && subKey in variants) {
|
|
@@ -6012,17 +6012,17 @@ var require_propMapper_native = __commonJS({
|
|
|
6012
6012
|
spreadName: `...${name}`
|
|
6013
6013
|
};
|
|
6014
6014
|
});
|
|
6015
|
-
function getVariantDefinition(variant,
|
|
6015
|
+
function getVariantDefinition(variant, value, conf) {
|
|
6016
6016
|
if (variant) {
|
|
6017
6017
|
if (typeof variant == "function") return variant;
|
|
6018
|
-
var exact = variant[
|
|
6018
|
+
var exact = variant[value];
|
|
6019
6019
|
if (exact) return exact;
|
|
6020
|
-
if (
|
|
6020
|
+
if (value != null) {
|
|
6021
6021
|
var { tokensParsed } = conf, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6022
6022
|
try {
|
|
6023
6023
|
for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
6024
6024
|
var { name, spreadName } = _step.value;
|
|
6025
|
-
if (spreadName in variant && name in tokensParsed &&
|
|
6025
|
+
if (spreadName in variant && name in tokensParsed && value in tokensParsed[name]) return variant[spreadName];
|
|
6026
6026
|
}
|
|
6027
6027
|
} catch (err) {
|
|
6028
6028
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -6034,32 +6034,32 @@ var require_propMapper_native = __commonJS({
|
|
|
6034
6034
|
}
|
|
6035
6035
|
}
|
|
6036
6036
|
var fontSizeVariant = variant["...fontSize"];
|
|
6037
|
-
if (fontSizeVariant && conf.fontSizeTokens.has(
|
|
6037
|
+
if (fontSizeVariant && conf.fontSizeTokens.has(value)) return fontSizeVariant;
|
|
6038
6038
|
}
|
|
6039
|
-
return variant[`:${typeof
|
|
6039
|
+
return variant[`:${typeof value}`] || variant["..."];
|
|
6040
6040
|
}
|
|
6041
6041
|
}
|
|
6042
6042
|
var fontShorthand = {
|
|
6043
6043
|
fontSize: "size",
|
|
6044
6044
|
fontWeight: "weight"
|
|
6045
|
-
}, lastFontFamilyToken = null, getTokenForKey = function(key,
|
|
6045
|
+
}, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
|
|
6046
6046
|
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
6047
|
-
if (resolveAs === "none") return
|
|
6048
|
-
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[
|
|
6047
|
+
if (resolveAs === "none") return value;
|
|
6048
|
+
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value] || theme[value.slice(1)] : void 0, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
6049
6049
|
if (customTokenAccept) {
|
|
6050
|
-
var val = themeValue ?? tokensParsed[customTokenAccept][
|
|
6050
|
+
var val = themeValue ?? tokensParsed[customTokenAccept][value];
|
|
6051
6051
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
6052
6052
|
}
|
|
6053
6053
|
if (themeValue) {
|
|
6054
|
-
if (resolveAs === "except-theme") return
|
|
6054
|
+
if (resolveAs === "except-theme") return value;
|
|
6055
6055
|
valOrVar = themeValue, hasSet = !0;
|
|
6056
6056
|
} else {
|
|
6057
|
-
if (
|
|
6057
|
+
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
6058
6058
|
else {
|
|
6059
6059
|
switch (key) {
|
|
6060
6060
|
case "fontFamily": {
|
|
6061
6061
|
var _fontsParsed_value, fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed;
|
|
6062
|
-
valOrVar = ((_fontsParsed_value = fontsParsed[
|
|
6062
|
+
valOrVar = ((_fontsParsed_value = fontsParsed[value]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value, lastFontFamilyToken = value, hasSet = !0;
|
|
6063
6063
|
break;
|
|
6064
6064
|
}
|
|
6065
6065
|
case "fontSize":
|
|
@@ -6069,18 +6069,18 @@ var require_propMapper_native = __commonJS({
|
|
|
6069
6069
|
var fam = fontFamily || conf.defaultFontToken;
|
|
6070
6070
|
if (fam) {
|
|
6071
6071
|
var _font_, fontsParsed1 = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed1[fam] || fontsParsed1[conf.defaultFontToken];
|
|
6072
|
-
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[
|
|
6072
|
+
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[value]) || value, hasSet = !0;
|
|
6073
6073
|
}
|
|
6074
6074
|
break;
|
|
6075
6075
|
}
|
|
6076
6076
|
}
|
|
6077
6077
|
for (var cat in import_helpers.tokenCategories) if (key in import_helpers.tokenCategories[cat]) {
|
|
6078
|
-
var res = tokensParsed[cat][
|
|
6078
|
+
var res = tokensParsed[cat][value];
|
|
6079
6079
|
res != null && (valOrVar = res, hasSet = !0);
|
|
6080
6080
|
}
|
|
6081
6081
|
}
|
|
6082
6082
|
if (!hasSet) {
|
|
6083
|
-
var spaceVar = tokensParsed.space[
|
|
6083
|
+
var spaceVar = tokensParsed.space[value];
|
|
6084
6084
|
spaceVar != null && (valOrVar = spaceVar, hasSet = !0);
|
|
6085
6085
|
}
|
|
6086
6086
|
}
|
|
@@ -6205,8 +6205,8 @@ var require_transformsToString_native = __commonJS({
|
|
|
6205
6205
|
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
6206
6206
|
// { perspective: 1000 } => perspective(1000px)
|
|
6207
6207
|
function(transform) {
|
|
6208
|
-
var type = Object.keys(transform)[0],
|
|
6209
|
-
return type === "matrix" || type === "matrix3d" ? `${type}(${
|
|
6208
|
+
var type = Object.keys(transform)[0], value = transform[type];
|
|
6209
|
+
return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
|
|
6210
6210
|
}
|
|
6211
6211
|
).join(" ");
|
|
6212
6212
|
}
|
|
@@ -6553,7 +6553,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6553
6553
|
if (!styleState.style.$$css) {
|
|
6554
6554
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
6555
6555
|
try {
|
|
6556
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2,
|
|
6556
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
6557
6557
|
} catch (err) {
|
|
6558
6558
|
} finally {
|
|
6559
6559
|
}
|
|
@@ -6715,14 +6715,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6715
6715
|
delete viewProps[key], viewProps[key] = next;
|
|
6716
6716
|
} else viewProps[key] = val;
|
|
6717
6717
|
}
|
|
6718
|
-
function mergeMediaByImportance(styleState, mediaKey, key,
|
|
6718
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
|
|
6719
6719
|
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
6720
6720
|
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
6721
6721
|
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
6722
6722
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
6723
6723
|
if (isDisabled) return !1;
|
|
6724
|
-
for (var subKey in
|
|
6725
|
-
} else mergeStyle(styleState, key,
|
|
6724
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
6725
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
6726
6726
|
return !0;
|
|
6727
6727
|
}
|
|
6728
6728
|
function normalizeStyle(style) {
|
|
@@ -7332,14 +7332,14 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
7332
7332
|
curKeys && (curKeys.current || (curKeys.current = /* @__PURE__ */ new Set()), curKeys.current.add(key));
|
|
7333
7333
|
}
|
|
7334
7334
|
var proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {
|
|
7335
|
-
var [key,
|
|
7336
|
-
...
|
|
7335
|
+
var [key, value] = param, proxied2 = {
|
|
7336
|
+
...value,
|
|
7337
7337
|
get val() {
|
|
7338
|
-
return globalThis.tamaguiAvoidTracking || track(key),
|
|
7338
|
+
return globalThis.tamaguiAvoidTracking || track(key), value.val;
|
|
7339
7339
|
},
|
|
7340
7340
|
get(platform2) {
|
|
7341
7341
|
if (curState) {
|
|
7342
|
-
var outVal = (0, import_createVariable.getVariable)(
|
|
7342
|
+
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
7343
7343
|
if (shouldOptimize) {
|
|
7344
7344
|
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = (0, import_getDynamicVal.getDynamicVal)({
|
|
7345
7345
|
scheme,
|
|
@@ -7889,11 +7889,11 @@ var require_index_native14 = __commonJS({
|
|
|
7889
7889
|
};
|
|
7890
7890
|
function useDidFinishSSR2() {
|
|
7891
7891
|
var clientOnly = React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
7892
|
-
return
|
|
7892
|
+
return !0;
|
|
7893
7893
|
}
|
|
7894
|
-
function useClientValue(
|
|
7894
|
+
function useClientValue(value) {
|
|
7895
7895
|
var done = useDidFinishSSR2();
|
|
7896
|
-
return done ? typeof
|
|
7896
|
+
return done ? typeof value == "function" ? value() : value : void 0;
|
|
7897
7897
|
}
|
|
7898
7898
|
}
|
|
7899
7899
|
});
|
|
@@ -9362,10 +9362,10 @@ var require_createFont_native = __commonJS({
|
|
|
9362
9362
|
...sectionKeys
|
|
9363
9363
|
])
|
|
9364
9364
|
].map(function(key) {
|
|
9365
|
-
var _section_key, _ref,
|
|
9366
|
-
return fillValue =
|
|
9365
|
+
var _section_key, _ref, value = (_ref = (_section_key = section[key]) !== null && _section_key !== void 0 ? _section_key : defaultValue) !== null && _ref !== void 0 ? _ref : fillValue;
|
|
9366
|
+
return fillValue = value, defaultValue = value, [
|
|
9367
9367
|
key,
|
|
9368
|
-
|
|
9368
|
+
value
|
|
9369
9369
|
];
|
|
9370
9370
|
}));
|
|
9371
9371
|
}, createFont2 = function(font) {
|
|
@@ -11536,41 +11536,41 @@ var require_matchQuery_native = __commonJS({
|
|
|
11536
11536
|
var inverse = query.inverse, typeMatch = query.type === "all" || values.type === query.type;
|
|
11537
11537
|
if (typeMatch && inverse || !(typeMatch || inverse)) return !1;
|
|
11538
11538
|
var expressionsMatch = query.expressions.every(function(expression) {
|
|
11539
|
-
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value,
|
|
11540
|
-
if (!
|
|
11539
|
+
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value, value = values[feature];
|
|
11540
|
+
if (!value) return !1;
|
|
11541
11541
|
switch (feature) {
|
|
11542
11542
|
case "orientation":
|
|
11543
11543
|
case "scan":
|
|
11544
|
-
return
|
|
11544
|
+
return value.toLowerCase() === expValue.toLowerCase();
|
|
11545
11545
|
case "width":
|
|
11546
11546
|
case "height":
|
|
11547
11547
|
case "device-width":
|
|
11548
11548
|
case "device-height":
|
|
11549
|
-
expValue = toPx(expValue),
|
|
11549
|
+
expValue = toPx(expValue), value = toPx(value);
|
|
11550
11550
|
break;
|
|
11551
11551
|
case "resolution":
|
|
11552
|
-
expValue = toDpi(expValue),
|
|
11552
|
+
expValue = toDpi(expValue), value = toDpi(value);
|
|
11553
11553
|
break;
|
|
11554
11554
|
case "aspect-ratio":
|
|
11555
11555
|
case "device-aspect-ratio":
|
|
11556
11556
|
case /* Deprecated */
|
|
11557
11557
|
"device-pixel-ratio":
|
|
11558
|
-
expValue = toDecimal(expValue),
|
|
11558
|
+
expValue = toDecimal(expValue), value = toDecimal(value);
|
|
11559
11559
|
break;
|
|
11560
11560
|
case "grid":
|
|
11561
11561
|
case "color":
|
|
11562
11562
|
case "color-index":
|
|
11563
11563
|
case "monochrome":
|
|
11564
|
-
expValue = Number.parseInt(expValue, 10) || 1,
|
|
11564
|
+
expValue = Number.parseInt(expValue, 10) || 1, value = Number.parseInt(value, 10) || 0;
|
|
11565
11565
|
break;
|
|
11566
11566
|
}
|
|
11567
11567
|
switch (modifier) {
|
|
11568
11568
|
case "min":
|
|
11569
|
-
return
|
|
11569
|
+
return value >= expValue;
|
|
11570
11570
|
case "max":
|
|
11571
|
-
return
|
|
11571
|
+
return value <= expValue;
|
|
11572
11572
|
default:
|
|
11573
|
-
return
|
|
11573
|
+
return value === expValue;
|
|
11574
11574
|
}
|
|
11575
11575
|
});
|
|
11576
11576
|
return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
|
@@ -11602,35 +11602,35 @@ var require_matchQuery_native = __commonJS({
|
|
|
11602
11602
|
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
11603
11603
|
}
|
|
11604
11604
|
function toDpi(resolution) {
|
|
11605
|
-
var _String_match,
|
|
11605
|
+
var _String_match, value = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11606
11606
|
switch (units) {
|
|
11607
11607
|
case "dpcm":
|
|
11608
|
-
return
|
|
11608
|
+
return value / 2.54;
|
|
11609
11609
|
case "dppx":
|
|
11610
|
-
return
|
|
11610
|
+
return value * 96;
|
|
11611
11611
|
default:
|
|
11612
|
-
return
|
|
11612
|
+
return value;
|
|
11613
11613
|
}
|
|
11614
11614
|
}
|
|
11615
11615
|
function toPx(length) {
|
|
11616
|
-
var _String_match,
|
|
11616
|
+
var _String_match, value = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11617
11617
|
switch (units) {
|
|
11618
11618
|
case "em":
|
|
11619
|
-
return
|
|
11619
|
+
return value * 16;
|
|
11620
11620
|
case "rem":
|
|
11621
|
-
return
|
|
11621
|
+
return value * 16;
|
|
11622
11622
|
case "cm":
|
|
11623
|
-
return
|
|
11623
|
+
return value * 96 / 2.54;
|
|
11624
11624
|
case "mm":
|
|
11625
|
-
return
|
|
11625
|
+
return value * 96 / 2.54 / 10;
|
|
11626
11626
|
case "in":
|
|
11627
|
-
return
|
|
11627
|
+
return value * 96;
|
|
11628
11628
|
case "pt":
|
|
11629
|
-
return
|
|
11629
|
+
return value * 72;
|
|
11630
11630
|
case "pc":
|
|
11631
|
-
return
|
|
11631
|
+
return value * 72 / 12;
|
|
11632
11632
|
default:
|
|
11633
|
-
return
|
|
11633
|
+
return value;
|
|
11634
11634
|
}
|
|
11635
11635
|
}
|
|
11636
11636
|
}
|
|
@@ -11692,13 +11692,13 @@ var require_mediaQueryList_native = __commonJS({
|
|
|
11692
11692
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
11693
11693
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
11694
11694
|
}
|
|
11695
|
-
function _define_property(obj, key,
|
|
11695
|
+
function _define_property(obj, key, value) {
|
|
11696
11696
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
11697
|
-
value
|
|
11697
|
+
value,
|
|
11698
11698
|
enumerable: !0,
|
|
11699
11699
|
configurable: !0,
|
|
11700
11700
|
writable: !0
|
|
11701
|
-
}) : obj[key] =
|
|
11701
|
+
}) : obj[key] = value, obj;
|
|
11702
11702
|
}
|
|
11703
11703
|
var NativeMediaQueryList = /* @__PURE__ */ function() {
|
|
11704
11704
|
"use strict";
|
|
@@ -12368,13 +12368,13 @@ var require_ResponderTouchHistoryStore_native = __commonJS({
|
|
|
12368
12368
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
12369
12369
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
12370
12370
|
}
|
|
12371
|
-
function _define_property(obj, key,
|
|
12371
|
+
function _define_property(obj, key, value) {
|
|
12372
12372
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
12373
|
-
value
|
|
12373
|
+
value,
|
|
12374
12374
|
enumerable: !0,
|
|
12375
12375
|
configurable: !0,
|
|
12376
12376
|
writable: !0
|
|
12377
|
-
}) : obj[key] =
|
|
12377
|
+
}) : obj[key] = value, obj;
|
|
12378
12378
|
}
|
|
12379
12379
|
var ResponderTouchHistoryStore = /* @__PURE__ */ function() {
|
|
12380
12380
|
"use strict";
|
|
@@ -15341,24 +15341,24 @@ var require_Accordion_native = __commonJS({
|
|
|
15341
15341
|
AccordionComponent.displayName = ACCORDION_NAME;
|
|
15342
15342
|
AccordionComponent.propTypes = {
|
|
15343
15343
|
type(props) {
|
|
15344
|
-
var
|
|
15344
|
+
var value = props.value || props.defaultValue;
|
|
15345
15345
|
return props.type && ![
|
|
15346
15346
|
"single",
|
|
15347
15347
|
"multiple"
|
|
15348
|
-
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof
|
|
15348
|
+
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof value == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : props.type === "single" && Array.isArray(value) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
|
15349
15349
|
}
|
|
15350
15350
|
};
|
|
15351
15351
|
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0, import_core12.createStyledContext)(), { Provider: AccordionCollapsibleProvider, useStyledContext: useAccordionCollapsibleContext } = (0, import_core12.createStyledContext)(), AccordionImplSingle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15352
15352
|
var { value: valueProp, defaultValue, control, onValueChange = function() {
|
|
15353
|
-
}, collapsible = !1, ...accordionSingleProps } = props, [
|
|
15353
|
+
}, collapsible = !1, ...accordionSingleProps } = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15354
15354
|
prop: valueProp,
|
|
15355
15355
|
defaultProp: defaultValue || "",
|
|
15356
15356
|
onChange: onValueChange
|
|
15357
15357
|
});
|
|
15358
15358
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionValueProvider, {
|
|
15359
15359
|
scope: props.__scopeAccordion,
|
|
15360
|
-
value:
|
|
15361
|
-
|
|
15360
|
+
value: value ? [
|
|
15361
|
+
value
|
|
15362
15362
|
] : [],
|
|
15363
15363
|
onItemOpen: setValue,
|
|
15364
15364
|
onItemClose: React4.useCallback(function() {
|
|
@@ -15378,7 +15378,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15378
15378
|
});
|
|
15379
15379
|
}), AccordionImplMultiple = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15380
15380
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
15381
|
-
}, ...accordionMultipleProps } = props, [
|
|
15381
|
+
}, ...accordionMultipleProps } = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15382
15382
|
prop: valueProp,
|
|
15383
15383
|
defaultProp: defaultValue || [],
|
|
15384
15384
|
onChange: onValueChange
|
|
@@ -15395,8 +15395,8 @@ var require_Accordion_native = __commonJS({
|
|
|
15395
15395
|
]), handleItemClose = React4.useCallback(function(itemValue) {
|
|
15396
15396
|
return setValue(function() {
|
|
15397
15397
|
var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
15398
|
-
return prevValue.filter(function(
|
|
15399
|
-
return
|
|
15398
|
+
return prevValue.filter(function(value2) {
|
|
15399
|
+
return value2 !== itemValue;
|
|
15400
15400
|
});
|
|
15401
15401
|
});
|
|
15402
15402
|
}, [
|
|
@@ -15404,7 +15404,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15404
15404
|
]);
|
|
15405
15405
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionValueProvider, {
|
|
15406
15406
|
scope: props.__scopeAccordion,
|
|
15407
|
-
value:
|
|
15407
|
+
value: value || [],
|
|
15408
15408
|
onItemOpen: handleItemOpen,
|
|
15409
15409
|
onItemClose: handleItemClose,
|
|
15410
15410
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionCollapsibleProvider, {
|
|
@@ -15476,7 +15476,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15476
15476
|
})
|
|
15477
15477
|
});
|
|
15478
15478
|
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0, import_core12.createStyledContext)(), AccordionItem = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15479
|
-
var { __scopeAccordion, value
|
|
15479
|
+
var { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(__scopeAccordion), valueContext = useAccordionValueContext(__scopeAccordion), triggerId = React4.useId(), open = value && valueContext.value.includes(value) || !1, disabled = accordionContext.disabled || props.disabled;
|
|
15480
15480
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionItemProvider, {
|
|
15481
15481
|
scope: __scopeAccordion,
|
|
15482
15482
|
open,
|
|
@@ -15491,7 +15491,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15491
15491
|
disabled,
|
|
15492
15492
|
open,
|
|
15493
15493
|
onOpenChange: function(open2) {
|
|
15494
|
-
open2 ? valueContext.onItemOpen(
|
|
15494
|
+
open2 ? valueContext.onItemOpen(value) : valueContext.onItemClose(value);
|
|
15495
15495
|
}
|
|
15496
15496
|
})
|
|
15497
15497
|
});
|
|
@@ -16084,9 +16084,9 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16084
16084
|
};
|
|
16085
16085
|
}, PortalProviderComponent = function(param) {
|
|
16086
16086
|
var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
|
|
16087
|
-
var next = function(
|
|
16087
|
+
var next = function(value) {
|
|
16088
16088
|
(0, import_start_transition.startTransition)(function() {
|
|
16089
|
-
dispatch(
|
|
16089
|
+
dispatch(value);
|
|
16090
16090
|
});
|
|
16091
16091
|
};
|
|
16092
16092
|
return next;
|
|
@@ -16766,11 +16766,11 @@ var require_create_context_native = __commonJS({
|
|
|
16766
16766
|
function createContext(rootComponentName, defaultContext) {
|
|
16767
16767
|
var Context = /* @__PURE__ */ React4.createContext(defaultContext);
|
|
16768
16768
|
function Provider(props) {
|
|
16769
|
-
var { children, ...context } = props,
|
|
16769
|
+
var { children, ...context } = props, value = React4.useMemo(function() {
|
|
16770
16770
|
return context;
|
|
16771
16771
|
}, Object.values(context));
|
|
16772
16772
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
16773
|
-
value
|
|
16773
|
+
value,
|
|
16774
16774
|
children
|
|
16775
16775
|
});
|
|
16776
16776
|
}
|
|
@@ -16794,11 +16794,11 @@ var require_create_context_native = __commonJS({
|
|
|
16794
16794
|
defaultContext
|
|
16795
16795
|
];
|
|
16796
16796
|
function Provider(props) {
|
|
16797
|
-
var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext,
|
|
16797
|
+
var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, value = React4.useMemo(function() {
|
|
16798
16798
|
return context;
|
|
16799
16799
|
}, Object.values(context));
|
|
16800
16800
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
16801
|
-
value
|
|
16801
|
+
value,
|
|
16802
16802
|
children
|
|
16803
16803
|
});
|
|
16804
16804
|
}
|
|
@@ -18027,8 +18027,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18027
18027
|
useAnimatedNumberReaction({
|
|
18028
18028
|
value: animatedNumber,
|
|
18029
18029
|
hostRef: sheetRef
|
|
18030
|
-
}, import_react3.default.useCallback(function(
|
|
18031
|
-
at.current =
|
|
18030
|
+
}, import_react3.default.useCallback(function(value) {
|
|
18031
|
+
at.current = value, scrollBridge.paneY = value;
|
|
18032
18032
|
}, [
|
|
18033
18033
|
animationDriver
|
|
18034
18034
|
]));
|
|
@@ -21632,7 +21632,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
21632
21632
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
21633
21633
|
var import_compose_refs = require_index_native11(), import_web = require_index_native15(), import_react3 = __toESM2(require("react")), import_registerFocusable = require_registerFocusable_native();
|
|
21634
21634
|
function useFocusable2(param) {
|
|
21635
|
-
var { isInput, props, ref } = param, { id, onChangeText, value
|
|
21635
|
+
var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(value || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(void 0), focusAndSelect = import_react3.default.useCallback(function(input) {
|
|
21636
21636
|
input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
|
|
21637
21637
|
}, []), registerFocusableHandler = import_react3.default.useCallback(function(input) {
|
|
21638
21638
|
var _unregisterFocusable_current;
|
|
@@ -21652,8 +21652,8 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
21652
21652
|
input && registerFocusableHandler(input);
|
|
21653
21653
|
}, [
|
|
21654
21654
|
registerFocusableHandler
|
|
21655
|
-
]), handleChangeText = (0, import_web.useEvent)(function(
|
|
21656
|
-
inputValue.current =
|
|
21655
|
+
]), handleChangeText = (0, import_web.useEvent)(function(value2) {
|
|
21656
|
+
inputValue.current = value2, onChangeText == null || onChangeText(value2);
|
|
21657
21657
|
});
|
|
21658
21658
|
return import_react3.default.useEffect(function() {
|
|
21659
21659
|
return function() {
|
|
@@ -22005,15 +22005,15 @@ var require_index_native49 = __commonJS({
|
|
|
22005
22005
|
});
|
|
22006
22006
|
module2.exports = __toCommonJS2(index_exports2);
|
|
22007
22007
|
var React4 = __toESM2(require("react"));
|
|
22008
|
-
function usePrevious(
|
|
22008
|
+
function usePrevious(value) {
|
|
22009
22009
|
var ref = React4.useRef({
|
|
22010
|
-
value
|
|
22011
|
-
previous:
|
|
22010
|
+
value,
|
|
22011
|
+
previous: value
|
|
22012
22012
|
});
|
|
22013
22013
|
return React4.useMemo(function() {
|
|
22014
|
-
return ref.current.value !==
|
|
22014
|
+
return ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous;
|
|
22015
22015
|
}, [
|
|
22016
|
-
|
|
22016
|
+
value
|
|
22017
22017
|
]);
|
|
22018
22018
|
}
|
|
22019
22019
|
}
|
|
@@ -22225,7 +22225,7 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22225
22225
|
module2.exports = __toCommonJS2(useCheckbox_exports);
|
|
22226
22226
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_label = require_index_native48(), import_react3 = __toESM2(require("react")), import_BubbleInput = require_BubbleInput_native(), import_utils = require_utils_native2();
|
|
22227
22227
|
function useCheckbox(props, param, ref) {
|
|
22228
|
-
var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value
|
|
22228
|
+
var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props, [button, setButton] = import_react3.default.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(ref, setButton), hasConsumerStoppedPropagationRef = import_react3.default.useRef(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, parentKeyDown = props.onKeyDown, handleKeyDown = (0, import_react3.useMemo)(function() {
|
|
22229
22229
|
return (0, import_helpers.composeEventHandlers)(parentKeyDown, function(event) {
|
|
22230
22230
|
event.key === "Enter" && event.preventDefault();
|
|
22231
22231
|
});
|
|
@@ -22246,7 +22246,7 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22246
22246
|
control: button,
|
|
22247
22247
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
22248
22248
|
name,
|
|
22249
|
-
value
|
|
22249
|
+
value,
|
|
22250
22250
|
checked,
|
|
22251
22251
|
required,
|
|
22252
22252
|
disabled
|
|
@@ -22259,7 +22259,7 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22259
22259
|
...checkboxProps,
|
|
22260
22260
|
...import_constants4.isWeb && {
|
|
22261
22261
|
type: "button",
|
|
22262
|
-
value
|
|
22262
|
+
value,
|
|
22263
22263
|
"data-state": (0, import_utils.getState)(checked),
|
|
22264
22264
|
"data-disabled": disabled ? "" : void 0,
|
|
22265
22265
|
disabled,
|
|
@@ -22403,8 +22403,8 @@ var require_createCheckbox_native = __commonJS({
|
|
|
22403
22403
|
import_react3.default.useEffect(function() {
|
|
22404
22404
|
if (props.id && !props.disabled) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
22405
22405
|
focusAndSelect: function() {
|
|
22406
|
-
setChecked == null || setChecked(function(
|
|
22407
|
-
return !
|
|
22406
|
+
setChecked == null || setChecked(function(value) {
|
|
22407
|
+
return !value;
|
|
22408
22408
|
});
|
|
22409
22409
|
},
|
|
22410
22410
|
focus: function() {
|
|
@@ -24849,20 +24849,20 @@ var require_Progress_native = __commonJS({
|
|
|
24849
24849
|
animation: context.width ? animation : null
|
|
24850
24850
|
});
|
|
24851
24851
|
});
|
|
24852
|
-
function defaultGetValueLabel(
|
|
24853
|
-
return `${Math.round(
|
|
24852
|
+
function defaultGetValueLabel(value, max) {
|
|
24853
|
+
return `${Math.round(value / max * 100)}%`;
|
|
24854
24854
|
}
|
|
24855
|
-
function getProgressState(
|
|
24856
|
-
return
|
|
24855
|
+
function getProgressState(value, maxValue) {
|
|
24856
|
+
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
24857
24857
|
}
|
|
24858
|
-
function isNumber(
|
|
24859
|
-
return typeof
|
|
24858
|
+
function isNumber(value) {
|
|
24859
|
+
return typeof value == "number";
|
|
24860
24860
|
}
|
|
24861
24861
|
function isValidMaxNumber(max) {
|
|
24862
24862
|
return isNumber(max) && !Number.isNaN(max) && max > 0;
|
|
24863
24863
|
}
|
|
24864
|
-
function isValidValueNumber(
|
|
24865
|
-
return isNumber(
|
|
24864
|
+
function isValidValueNumber(value, max) {
|
|
24865
|
+
return isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
24866
24866
|
}
|
|
24867
24867
|
var DEFAULT_MAX = 100, ProgressFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
24868
24868
|
name: "Progress",
|
|
@@ -24897,21 +24897,21 @@ var require_Progress_native = __commonJS({
|
|
|
24897
24897
|
getValueLabel = defaultGetValueLabel,
|
|
24898
24898
|
size: size2 = "$true",
|
|
24899
24899
|
...progressProps
|
|
24900
|
-
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX,
|
|
24900
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React4.useState(0);
|
|
24901
24901
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressProvider, {
|
|
24902
24902
|
scope: __scopeProgress,
|
|
24903
|
-
value
|
|
24903
|
+
value,
|
|
24904
24904
|
max,
|
|
24905
24905
|
width,
|
|
24906
24906
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressFrame, {
|
|
24907
24907
|
"aria-valuemax": max,
|
|
24908
24908
|
"aria-valuemin": 0,
|
|
24909
|
-
"aria-valuenow": isNumber(
|
|
24909
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
24910
24910
|
"aria-valuetext": valueLabel,
|
|
24911
24911
|
// @ts-ignore
|
|
24912
24912
|
role: "progressbar",
|
|
24913
|
-
"data-state": getProgressState(
|
|
24914
|
-
"data-value":
|
|
24913
|
+
"data-state": getProgressState(value, max),
|
|
24914
|
+
"data-value": value ?? void 0,
|
|
24915
24915
|
"data-max": max,
|
|
24916
24916
|
...progressProps.unstyled !== !0 && {
|
|
24917
24917
|
size: size2
|
|
@@ -25070,8 +25070,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
25070
25070
|
}
|
|
25071
25071
|
},
|
|
25072
25072
|
size: {
|
|
25073
|
-
"...size": function(
|
|
25074
|
-
var { props } = param, _props_scaleSize, size2 = Math.floor((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(
|
|
25073
|
+
"...size": function(value, param) {
|
|
25074
|
+
var { props } = param, _props_scaleSize, size2 = Math.floor((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(value)) * ((_props_scaleSize = props.scaleSize) !== null && _props_scaleSize !== void 0 ? _props_scaleSize : 0.5));
|
|
25075
25075
|
return {
|
|
25076
25076
|
width: size2,
|
|
25077
25077
|
height: size2
|
|
@@ -25310,14 +25310,14 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25310
25310
|
module2.exports = __toCommonJS2(useRadioGroup_exports);
|
|
25311
25311
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_focusable2 = require_index_native47(), import_helpers = require_index_native7(), import_label = require_index_native48(), import_use_controllable_state = require_index_native10(), import_react3 = require("react"), import_BubbleInput = require_BubbleInput_native2(), import_utils = require_utils_native3();
|
|
25312
25312
|
function useRadioGroup(params) {
|
|
25313
|
-
var { value: valueProp, onValueChange, defaultValue, required, disabled, name, native, accentColor, orientation, ref } = params, [
|
|
25313
|
+
var { value: valueProp, onValueChange, defaultValue, required, disabled, name, native, accentColor, orientation, ref } = params, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
25314
25314
|
prop: valueProp,
|
|
25315
25315
|
defaultProp: defaultValue,
|
|
25316
25316
|
onChange: onValueChange
|
|
25317
25317
|
});
|
|
25318
25318
|
return {
|
|
25319
25319
|
providerValue: {
|
|
25320
|
-
value
|
|
25320
|
+
value,
|
|
25321
25321
|
onChange: setValue,
|
|
25322
25322
|
required,
|
|
25323
25323
|
disabled,
|
|
@@ -25342,9 +25342,9 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25342
25342
|
"ArrowLeft",
|
|
25343
25343
|
"ArrowRight"
|
|
25344
25344
|
], useRadioGroupItem = function(params) {
|
|
25345
|
-
var { radioGroupContext, value
|
|
25345
|
+
var { radioGroupContext, value, labelledBy: ariaLabelledby, disabled: itemDisabled, ref: refProp, id, onPress, onKeyDown, onFocus } = params, { value: groupValue, disabled, required, onChange, name, native, accentColor } = (0, import_react3.useContext)(radioGroupContext), [button, setButton] = (0, import_react3.useState)(null), hasConsumerStoppedPropagationRef = (0, import_react3.useRef)(!1), ref = (0, import_react3.useRef)(null), composedRefs = (0, import_compose_refs.useComposedRefs)(refProp, function(node) {
|
|
25346
25346
|
return setButton(node);
|
|
25347
|
-
}, ref), isArrowKeyPressedRef = (0, import_react3.useRef)(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue ===
|
|
25347
|
+
}, ref), isArrowKeyPressedRef = (0, import_react3.useRef)(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue === value, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
25348
25348
|
(0, import_react3.useEffect)(function() {
|
|
25349
25349
|
if (import_constants4.isWeb) {
|
|
25350
25350
|
var handleKeyDown = function(event) {
|
|
@@ -25359,14 +25359,14 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25359
25359
|
}, []), (0, import_react3.useEffect)(function() {
|
|
25360
25360
|
if (id && !disabled) return (0, import_focusable2.registerFocusable)(id, {
|
|
25361
25361
|
focusAndSelect: function() {
|
|
25362
|
-
onChange == null || onChange(
|
|
25362
|
+
onChange == null || onChange(value);
|
|
25363
25363
|
},
|
|
25364
25364
|
focus: function() {
|
|
25365
25365
|
}
|
|
25366
25366
|
});
|
|
25367
25367
|
}, [
|
|
25368
25368
|
id,
|
|
25369
|
-
|
|
25369
|
+
value,
|
|
25370
25370
|
disabled
|
|
25371
25371
|
]);
|
|
25372
25372
|
var isDisabled = disabled || itemDisabled;
|
|
@@ -25381,7 +25381,7 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25381
25381
|
control: button,
|
|
25382
25382
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
25383
25383
|
name,
|
|
25384
|
-
value
|
|
25384
|
+
value,
|
|
25385
25385
|
checked,
|
|
25386
25386
|
required,
|
|
25387
25387
|
disabled: isDisabled,
|
|
@@ -25402,11 +25402,11 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25402
25402
|
ref: composedRefs,
|
|
25403
25403
|
...import_constants4.isWeb && {
|
|
25404
25404
|
type: "button",
|
|
25405
|
-
value
|
|
25405
|
+
value
|
|
25406
25406
|
},
|
|
25407
25407
|
id,
|
|
25408
25408
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, function(event) {
|
|
25409
|
-
checked || onChange == null || onChange(
|
|
25409
|
+
checked || onChange == null || onChange(value), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
|
|
25410
25410
|
}),
|
|
25411
25411
|
...import_constants4.isWeb && {
|
|
25412
25412
|
onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, function(event) {
|
|
@@ -25667,11 +25667,11 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
25667
25667
|
var { disableActiveTheme, Frame = import_RadioGroup.RadioGroupFrame, Indicator = import_RadioGroup.RadioGroupIndicatorFrame, Item = import_RadioGroup.RadioGroupItemFrame } = createProps;
|
|
25668
25668
|
ensureContext(Frame), ensureContext(Indicator), ensureContext(Item);
|
|
25669
25669
|
var RadioGroupImp = Frame.styleable(function(props, ref) {
|
|
25670
|
-
var { value
|
|
25670
|
+
var { value, defaultValue, onValueChange, required = !1, disabled = !1, name, native, accentColor, orientation = "vertical", ...rest } = props, { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
25671
25671
|
orientation,
|
|
25672
25672
|
name,
|
|
25673
25673
|
defaultValue,
|
|
25674
|
-
value
|
|
25674
|
+
value,
|
|
25675
25675
|
onValueChange,
|
|
25676
25676
|
required,
|
|
25677
25677
|
disabled,
|
|
@@ -25691,7 +25691,7 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
25691
25691
|
});
|
|
25692
25692
|
}), RadioGroupItemImp = Item.styleable(function(props, ref) {
|
|
25693
25693
|
var {
|
|
25694
|
-
value
|
|
25694
|
+
value,
|
|
25695
25695
|
labelledBy,
|
|
25696
25696
|
onPress,
|
|
25697
25697
|
//@ts-expect-error
|
|
@@ -25701,7 +25701,7 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
25701
25701
|
...rest
|
|
25702
25702
|
} = props, { providerValue, bubbleInput, rovingFocusGroupAttrs, frameAttrs, isFormControl, native } = (0, import_radio_headless.useRadioGroupItem)({
|
|
25703
25703
|
radioGroupContext: RadioGroupContext,
|
|
25704
|
-
value
|
|
25704
|
+
value,
|
|
25705
25705
|
id,
|
|
25706
25706
|
labelledBy,
|
|
25707
25707
|
disabled,
|
|
@@ -26314,41 +26314,41 @@ var require_SelectItem_native = __commonJS({
|
|
|
26314
26314
|
});
|
|
26315
26315
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
26316
26316
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_list_item = require_index_native55(), import_core12 = require_index_native20(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem", { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core12.createStyledContext)(null, ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(function(props, forwardedRef) {
|
|
26317
|
-
var { scope, value
|
|
26317
|
+
var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
26318
26318
|
...!props.unstyled && {
|
|
26319
26319
|
ellipse: !0
|
|
26320
26320
|
},
|
|
26321
26321
|
...restProps
|
|
26322
|
-
}), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue ===
|
|
26322
|
+
}), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue === value);
|
|
26323
26323
|
React4.useEffect(function() {
|
|
26324
26324
|
return activeIndexSubscribe(function(i) {
|
|
26325
26325
|
var isActive = index === i;
|
|
26326
26326
|
if (isActive) {
|
|
26327
26327
|
var _listRef_current_index;
|
|
26328
|
-
onActiveChange(
|
|
26328
|
+
onActiveChange(value, index), listRef == null || (_listRef_current_index = listRef.current[index]) === null || _listRef_current_index === void 0 || _listRef_current_index.focus();
|
|
26329
26329
|
}
|
|
26330
26330
|
});
|
|
26331
26331
|
}, [
|
|
26332
26332
|
index
|
|
26333
26333
|
]), React4.useEffect(function() {
|
|
26334
26334
|
return valueSubscribe(function(val) {
|
|
26335
|
-
setSelected(val ===
|
|
26335
|
+
setSelected(val === value);
|
|
26336
26336
|
});
|
|
26337
26337
|
}, [
|
|
26338
|
-
|
|
26338
|
+
value
|
|
26339
26339
|
]);
|
|
26340
26340
|
var textId = React4.useId(), refCallback = React4.useCallback(function(node) {
|
|
26341
26341
|
import_constants4.isWeb && node instanceof HTMLElement && listRef && (listRef.current[index] = node);
|
|
26342
26342
|
}, []), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, refCallback);
|
|
26343
26343
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
26344
|
-
setValueAtIndex(index,
|
|
26344
|
+
setValueAtIndex(index, value);
|
|
26345
26345
|
}, [
|
|
26346
26346
|
index,
|
|
26347
26347
|
setValueAtIndex,
|
|
26348
|
-
|
|
26348
|
+
value
|
|
26349
26349
|
]);
|
|
26350
26350
|
function handleSelect() {
|
|
26351
|
-
setSelectedIndex(index), onChange(
|
|
26351
|
+
setSelectedIndex(index), onChange(value), setOpen(!1);
|
|
26352
26352
|
}
|
|
26353
26353
|
var selectItemProps = React4.useMemo(function() {
|
|
26354
26354
|
return interactions ? interactions.getItemProps({
|
|
@@ -26377,11 +26377,11 @@ var require_SelectItem_native = __commonJS({
|
|
|
26377
26377
|
]);
|
|
26378
26378
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
|
|
26379
26379
|
scope,
|
|
26380
|
-
value
|
|
26380
|
+
value,
|
|
26381
26381
|
textId: textId || "",
|
|
26382
26382
|
isSelected,
|
|
26383
26383
|
children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", {
|
|
26384
|
-
value
|
|
26384
|
+
value,
|
|
26385
26385
|
children: props.children
|
|
26386
26386
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItemFrame, {
|
|
26387
26387
|
tag: "div",
|
|
@@ -27085,9 +27085,9 @@ var require_Select_native = __commonJS({
|
|
|
27085
27085
|
function useEmitter() {
|
|
27086
27086
|
var listeners = React4.useRef(null);
|
|
27087
27087
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
27088
|
-
var emit = function(
|
|
27088
|
+
var emit = function(value) {
|
|
27089
27089
|
listeners.current.forEach(function(l) {
|
|
27090
|
-
return l(
|
|
27090
|
+
return l(value);
|
|
27091
27091
|
});
|
|
27092
27092
|
}, subscribe = React4.useCallback(function(listener) {
|
|
27093
27093
|
return listeners.current.add(listener), function() {
|
|
@@ -27106,25 +27106,25 @@ var require_Select_native = __commonJS({
|
|
|
27106
27106
|
prop: openProp,
|
|
27107
27107
|
defaultProp: defaultOpen || !1,
|
|
27108
27108
|
onChange: onOpenChange
|
|
27109
|
-
}), [
|
|
27109
|
+
}), [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
27110
27110
|
prop: valueProp,
|
|
27111
27111
|
defaultProp: defaultValue || "",
|
|
27112
27112
|
onChange: onValueChange,
|
|
27113
27113
|
transition: !0
|
|
27114
27114
|
});
|
|
27115
27115
|
React4.useEffect(function() {
|
|
27116
|
-
open && emitValue(
|
|
27116
|
+
open && emitValue(value);
|
|
27117
27117
|
}, [
|
|
27118
27118
|
open
|
|
27119
27119
|
]), React4.useEffect(function() {
|
|
27120
|
-
emitValue(
|
|
27120
|
+
emitValue(value);
|
|
27121
27121
|
}, [
|
|
27122
|
-
|
|
27122
|
+
value
|
|
27123
27123
|
]), React4.useEffect(function() {
|
|
27124
27124
|
if (props.id) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
27125
27125
|
focusAndSelect: function() {
|
|
27126
|
-
setOpen == null || setOpen(function(
|
|
27127
|
-
return !
|
|
27126
|
+
setOpen == null || setOpen(function(value2) {
|
|
27127
|
+
return !value2;
|
|
27128
27128
|
});
|
|
27129
27129
|
},
|
|
27130
27130
|
focus: function() {
|
|
@@ -27147,7 +27147,7 @@ var require_Select_native = __commonJS({
|
|
|
27147
27147
|
scope,
|
|
27148
27148
|
adaptScope,
|
|
27149
27149
|
initialValue: React4.useMemo(function() {
|
|
27150
|
-
return
|
|
27150
|
+
return value;
|
|
27151
27151
|
}, [
|
|
27152
27152
|
open
|
|
27153
27153
|
]),
|
|
@@ -27159,12 +27159,12 @@ var require_Select_native = __commonJS({
|
|
|
27159
27159
|
onChange: React4.useCallback(function(val) {
|
|
27160
27160
|
setValue(val), emitValue(val);
|
|
27161
27161
|
}, []),
|
|
27162
|
-
onActiveChange: (0, import_core12.useEvent)(function(
|
|
27163
|
-
onActiveChange == null || onActiveChange(
|
|
27162
|
+
onActiveChange: (0, import_core12.useEvent)(function(value2, index) {
|
|
27163
|
+
onActiveChange == null || onActiveChange(value2, index);
|
|
27164
27164
|
}),
|
|
27165
27165
|
setSelectedIndex,
|
|
27166
|
-
setValueAtIndex: React4.useCallback(function(index,
|
|
27167
|
-
listContentRef.current[index] =
|
|
27166
|
+
setValueAtIndex: React4.useCallback(function(index, value2) {
|
|
27167
|
+
listContentRef.current[index] = value2;
|
|
27168
27168
|
}, []),
|
|
27169
27169
|
shouldRenderWebNative,
|
|
27170
27170
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
@@ -27183,7 +27183,7 @@ var require_Select_native = __commonJS({
|
|
|
27183
27183
|
activeIndex,
|
|
27184
27184
|
selectedIndex,
|
|
27185
27185
|
setActiveIndex: setActiveIndexDebounced,
|
|
27186
|
-
value
|
|
27186
|
+
value,
|
|
27187
27187
|
open,
|
|
27188
27188
|
native,
|
|
27189
27189
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
@@ -27195,7 +27195,7 @@ var require_Select_native = __commonJS({
|
|
|
27195
27195
|
selectedIndexRef,
|
|
27196
27196
|
...props,
|
|
27197
27197
|
open,
|
|
27198
|
-
value
|
|
27198
|
+
value,
|
|
27199
27199
|
children
|
|
27200
27200
|
})
|
|
27201
27201
|
})
|
|
@@ -27423,9 +27423,9 @@ var require_helpers_native3 = __commonJS({
|
|
|
27423
27423
|
return a - b;
|
|
27424
27424
|
});
|
|
27425
27425
|
}
|
|
27426
|
-
function convertValueToPercentage(
|
|
27426
|
+
function convertValueToPercentage(value, min, max) {
|
|
27427
27427
|
var maxSteps = max - min, percentPerStep = 100 / maxSteps;
|
|
27428
|
-
return percentPerStep * (
|
|
27428
|
+
return percentPerStep * (value - min);
|
|
27429
27429
|
}
|
|
27430
27430
|
function getLabel(index, totalValues) {
|
|
27431
27431
|
if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;
|
|
@@ -27436,8 +27436,8 @@ var require_helpers_native3 = __commonJS({
|
|
|
27436
27436
|
}
|
|
27437
27437
|
function getClosestValueIndex(values, nextValue) {
|
|
27438
27438
|
if (values.length === 1) return 0;
|
|
27439
|
-
var distances = values.map(function(
|
|
27440
|
-
return Math.abs(
|
|
27439
|
+
var distances = values.map(function(value) {
|
|
27440
|
+
return Math.abs(value - nextValue);
|
|
27441
27441
|
}), closestDistance = Math.min(...distances);
|
|
27442
27442
|
return distances.indexOf(closestDistance);
|
|
27443
27443
|
}
|
|
@@ -27452,8 +27452,8 @@ var require_helpers_native3 = __commonJS({
|
|
|
27452
27452
|
return (quarterWidth - offset2(left) * direction) * direction;
|
|
27453
27453
|
}
|
|
27454
27454
|
function getStepsBetweenValues(values) {
|
|
27455
|
-
return values.slice(0, -1).map(function(
|
|
27456
|
-
return values[index + 1] -
|
|
27455
|
+
return values.slice(0, -1).map(function(value, index) {
|
|
27456
|
+
return values[index + 1] - value;
|
|
27457
27457
|
});
|
|
27458
27458
|
}
|
|
27459
27459
|
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
@@ -27464,18 +27464,18 @@ var require_helpers_native3 = __commonJS({
|
|
|
27464
27464
|
return !0;
|
|
27465
27465
|
}
|
|
27466
27466
|
function linearScale(input, output) {
|
|
27467
|
-
return function(
|
|
27467
|
+
return function(value) {
|
|
27468
27468
|
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
27469
27469
|
var ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
27470
|
-
return output[0] + ratio * (
|
|
27470
|
+
return output[0] + ratio * (value - input[0]);
|
|
27471
27471
|
};
|
|
27472
27472
|
}
|
|
27473
|
-
function getDecimalCount(
|
|
27474
|
-
return (String(
|
|
27473
|
+
function getDecimalCount(value) {
|
|
27474
|
+
return (String(value).split(".")[1] || "").length;
|
|
27475
27475
|
}
|
|
27476
|
-
function roundValue(
|
|
27476
|
+
function roundValue(value, decimalCount) {
|
|
27477
27477
|
var rounder = Math.pow(10, decimalCount);
|
|
27478
|
-
return Math.round(
|
|
27478
|
+
return Math.round(value * rounder) / rounder;
|
|
27479
27479
|
}
|
|
27480
27480
|
}
|
|
27481
27481
|
});
|
|
@@ -27715,8 +27715,8 @@ var require_Slider_native = __commonJS({
|
|
|
27715
27715
|
] : [
|
|
27716
27716
|
max,
|
|
27717
27717
|
min
|
|
27718
|
-
],
|
|
27719
|
-
return
|
|
27718
|
+
], value = (0, import_helpers3.linearScale)(input, output);
|
|
27719
|
+
return value(pointerPosition);
|
|
27720
27720
|
}
|
|
27721
27721
|
var measure = function() {
|
|
27722
27722
|
var _sliderRef_current;
|
|
@@ -27764,16 +27764,16 @@ var require_Slider_native = __commonJS({
|
|
|
27764
27764
|
orientation: "horizontal",
|
|
27765
27765
|
onLayout: measure,
|
|
27766
27766
|
onSlideStart: function(event, target) {
|
|
27767
|
-
var
|
|
27768
|
-
|
|
27767
|
+
var value = getValueFromPointer(event.nativeEvent.locationX);
|
|
27768
|
+
value && (onSlideStart == null || onSlideStart(value, target, event));
|
|
27769
27769
|
},
|
|
27770
27770
|
onSlideMove: function(event) {
|
|
27771
|
-
var
|
|
27772
|
-
|
|
27771
|
+
var value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
|
|
27772
|
+
value && (onSlideMove == null || onSlideMove(value, event));
|
|
27773
27773
|
},
|
|
27774
27774
|
onSlideEnd: function(event) {
|
|
27775
|
-
var
|
|
27776
|
-
|
|
27775
|
+
var value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
|
|
27776
|
+
value && (onSlideEnd == null || onSlideEnd(event, value));
|
|
27777
27777
|
},
|
|
27778
27778
|
onStepKeyDown: function(event) {
|
|
27779
27779
|
var isBackKey = import_constants22.BACK_KEYS[direction].includes(event.key);
|
|
@@ -27810,8 +27810,8 @@ var require_Slider_native = __commonJS({
|
|
|
27810
27810
|
], output = [
|
|
27811
27811
|
max,
|
|
27812
27812
|
min
|
|
27813
|
-
],
|
|
27814
|
-
return
|
|
27813
|
+
], value = (0, import_helpers3.linearScale)(input, output);
|
|
27814
|
+
return value(pointerPosition);
|
|
27815
27815
|
}
|
|
27816
27816
|
var measure = function() {
|
|
27817
27817
|
var _sliderRef_current;
|
|
@@ -27835,16 +27835,16 @@ var require_Slider_native = __commonJS({
|
|
|
27835
27835
|
orientation: "vertical",
|
|
27836
27836
|
onLayout: measure,
|
|
27837
27837
|
onSlideStart: function(event, target) {
|
|
27838
|
-
var
|
|
27839
|
-
|
|
27838
|
+
var value = getValueFromPointer(event.nativeEvent.locationY);
|
|
27839
|
+
value && (onSlideStart == null || onSlideStart(value, target, event));
|
|
27840
27840
|
},
|
|
27841
27841
|
onSlideMove: function(event) {
|
|
27842
|
-
var
|
|
27843
|
-
|
|
27842
|
+
var value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
|
|
27843
|
+
value && (onSlideMove == null || onSlideMove(value, event));
|
|
27844
27844
|
},
|
|
27845
27845
|
onSlideEnd: function(event) {
|
|
27846
|
-
var
|
|
27847
|
-
onSlideEnd == null || onSlideEnd(event,
|
|
27846
|
+
var value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
|
|
27847
|
+
onSlideEnd == null || onSlideEnd(event, value);
|
|
27848
27848
|
},
|
|
27849
27849
|
onStepKeyDown: function(event) {
|
|
27850
27850
|
var isBackKey = import_constants22.BACK_KEYS.ltr.includes(event.key);
|
|
@@ -27890,8 +27890,8 @@ var require_Slider_native = __commonJS({
|
|
|
27890
27890
|
position: "absolute",
|
|
27891
27891
|
pointerEvents: "box-none"
|
|
27892
27892
|
}), SliderTrackActive = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
27893
|
-
var { __scopeSlider, ...rangeProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(function(
|
|
27894
|
-
return (0, import_helpers3.convertValueToPercentage)(
|
|
27893
|
+
var { __scopeSlider, ...rangeProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(function(value) {
|
|
27894
|
+
return (0, import_helpers3.convertValueToPercentage)(value, context.min, context.max);
|
|
27895
27895
|
}), offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0, offsetEnd = 100 - Math.max(...percentages);
|
|
27896
27896
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SliderTrackActiveFrame, {
|
|
27897
27897
|
orientation: context.orientation,
|
|
@@ -27949,7 +27949,7 @@ var require_Slider_native = __commonJS({
|
|
|
27949
27949
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
27950
27950
|
}
|
|
27951
27951
|
}), SliderThumb = SliderThumbFrame.styleable(function(props, forwardedRef) {
|
|
27952
|
-
var { __scopeSlider, index, circular, size: sizeProp, ...thumbProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), [thumb, setThumb] = React4.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb),
|
|
27952
|
+
var { __scopeSlider, index, circular, size: sizeProp, ...thumbProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), [thumb, setThumb] = React4.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers3.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers3.getLabel)(index, context.values.length), _ref, sizeIn = (_ref = sizeProp ?? context.size) !== null && _ref !== void 0 ? _ref : "$true", [size2, setSize] = React4.useState(function() {
|
|
27953
27953
|
var estimatedSize = (0, import_core12.getVariableValue)(getThumbSize(sizeIn).width);
|
|
27954
27954
|
return estimatedSize;
|
|
27955
27955
|
}), thumbInBoundsOffset = size2 ? (0, import_helpers3.getThumbInBoundsOffset)(size2, percent, orientation.direction) : 0;
|
|
@@ -27984,7 +27984,7 @@ var require_Slider_native = __commonJS({
|
|
|
27984
27984
|
role: "slider",
|
|
27985
27985
|
"aria-label": props["aria-label"] || label,
|
|
27986
27986
|
"aria-valuemin": context.min,
|
|
27987
|
-
"aria-valuenow":
|
|
27987
|
+
"aria-valuenow": value,
|
|
27988
27988
|
"aria-valuemax": context.max,
|
|
27989
27989
|
"aria-orientation": context.orientation,
|
|
27990
27990
|
"data-orientation": context.orientation,
|
|
@@ -28023,13 +28023,13 @@ var require_Slider_native = __commonJS({
|
|
|
28023
28023
|
}), SliderComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
28024
28024
|
var { name, min = 0, max = 100, step = 1, orientation = "horizontal", disabled = !1, minStepsBetweenThumbs = 0, defaultValue = [
|
|
28025
28025
|
min
|
|
28026
|
-
], value
|
|
28026
|
+
], value, onValueChange = function() {
|
|
28027
28027
|
}, size: sizeProp, onSlideEnd, onSlideMove, onSlideStart, ...sliderProps } = props, sliderRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef), thumbRefs = React4.useRef(/* @__PURE__ */ new Map()), valueIndexToChangeRef = React4.useRef(0), isHorizontal = orientation === "horizontal", [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
|
|
28028
|
-
prop:
|
|
28028
|
+
prop: value,
|
|
28029
28029
|
defaultProp: defaultValue,
|
|
28030
28030
|
transition: !0,
|
|
28031
|
-
onChange: function(
|
|
28032
|
-
updateThumbFocus(valueIndexToChangeRef.current), onValueChange(
|
|
28031
|
+
onChange: function(value2) {
|
|
28032
|
+
updateThumbFocus(valueIndexToChangeRef.current), onValueChange(value2);
|
|
28033
28033
|
}
|
|
28034
28034
|
});
|
|
28035
28035
|
import_constants4.isWeb && React4.useEffect(function() {
|
|
@@ -28065,11 +28065,11 @@ var require_Slider_native = __commonJS({
|
|
|
28065
28065
|
}
|
|
28066
28066
|
}
|
|
28067
28067
|
}
|
|
28068
|
-
function handleSlideMove(
|
|
28069
|
-
updateValues(
|
|
28068
|
+
function handleSlideMove(value2, event) {
|
|
28069
|
+
updateValues(value2, valueIndexToChangeRef.current), onSlideMove == null || onSlideMove(event, value2);
|
|
28070
28070
|
}
|
|
28071
|
-
function updateValues(
|
|
28072
|
-
var decimalCount = (0, import_helpers3.getDecimalCount)(step), snapToStep = (0, import_helpers3.roundValue)(Math.round((
|
|
28071
|
+
function updateValues(value2, atIndex) {
|
|
28072
|
+
var decimalCount = (0, import_helpers3.getDecimalCount)(step), snapToStep = (0, import_helpers3.roundValue)(Math.round((value2 - min) / step) * step + min, decimalCount), nextValue = (0, import_helpers2.clamp)(snapToStep, [
|
|
28073
28073
|
min,
|
|
28074
28074
|
max
|
|
28075
28075
|
]);
|
|
@@ -28097,12 +28097,12 @@ var require_Slider_native = __commonJS({
|
|
|
28097
28097
|
min,
|
|
28098
28098
|
max,
|
|
28099
28099
|
onSlideEnd,
|
|
28100
|
-
onSlideStart: disabled ? void 0 : function(
|
|
28100
|
+
onSlideStart: disabled ? void 0 : function(value2, target, event) {
|
|
28101
28101
|
if (target !== "thumb") {
|
|
28102
|
-
var closestIndex = (0, import_helpers3.getClosestValueIndex)(values,
|
|
28103
|
-
updateValues(
|
|
28102
|
+
var closestIndex = (0, import_helpers3.getClosestValueIndex)(values, value2);
|
|
28103
|
+
updateValues(value2, closestIndex);
|
|
28104
28104
|
}
|
|
28105
|
-
onSlideStart == null || onSlideStart(event,
|
|
28105
|
+
onSlideStart == null || onSlideStart(event, value2, target);
|
|
28106
28106
|
},
|
|
28107
28107
|
onSlideMove: disabled ? void 0 : handleSlideMove,
|
|
28108
28108
|
onHomeKeyDown: function() {
|
|
@@ -28114,8 +28114,8 @@ var require_Slider_native = __commonJS({
|
|
|
28114
28114
|
onStepKeyDown: function(param) {
|
|
28115
28115
|
var { event, direction: stepDirection } = param;
|
|
28116
28116
|
if (!disabled) {
|
|
28117
|
-
var isPageKey = import_constants22.PAGE_KEYS.includes(event.key), isSkipKey = isPageKey || event.shiftKey && import_constants22.ARROW_KEYS.includes(event.key), multiplier = isSkipKey ? 10 : 1, atIndex = valueIndexToChangeRef.current,
|
|
28118
|
-
updateValues(
|
|
28117
|
+
var isPageKey = import_constants22.PAGE_KEYS.includes(event.key), isSkipKey = isPageKey || event.shiftKey && import_constants22.ARROW_KEYS.includes(event.key), multiplier = isSkipKey ? 10 : 1, atIndex = valueIndexToChangeRef.current, value2 = values[atIndex], stepInDirection = step * multiplier * stepDirection;
|
|
28118
|
+
updateValues(value2 + stepInDirection, atIndex);
|
|
28119
28119
|
}
|
|
28120
28120
|
}
|
|
28121
28121
|
})
|
|
@@ -28252,7 +28252,7 @@ var require_useSwitch_native = __commonJS({
|
|
|
28252
28252
|
switchRef: ref,
|
|
28253
28253
|
bubbleInput: null
|
|
28254
28254
|
};
|
|
28255
|
-
var disabled, name,
|
|
28255
|
+
var disabled, name, value, required, hasConsumerStoppedPropagationRef, button, setButton, composedRefs, isFormControl, labelId, ariaLabelledBy;
|
|
28256
28256
|
}
|
|
28257
28257
|
}
|
|
28258
28258
|
});
|
|
@@ -28573,8 +28573,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
28573
28573
|
React4.useEffect(function() {
|
|
28574
28574
|
if (props.id && !props.disabled) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
28575
28575
|
focusAndSelect: function() {
|
|
28576
|
-
setChecked == null || setChecked(function(
|
|
28577
|
-
return !
|
|
28576
|
+
setChecked == null || setChecked(function(value2) {
|
|
28577
|
+
return !value2;
|
|
28578
28578
|
});
|
|
28579
28579
|
},
|
|
28580
28580
|
focus: function() {
|
|
@@ -28590,7 +28590,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
28590
28590
|
onValueChange: setChecked,
|
|
28591
28591
|
...nativeProps
|
|
28592
28592
|
});
|
|
28593
|
-
var disabled = props.disabled,
|
|
28593
|
+
var disabled = props.disabled, value = React4.useMemo(function() {
|
|
28594
28594
|
return {
|
|
28595
28595
|
checked,
|
|
28596
28596
|
disabled,
|
|
@@ -28605,7 +28605,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
28605
28605
|
next !== frameWidth && setFrameInnerWidth(next);
|
|
28606
28606
|
}, _styledContext_unstyled, _ref3, unstyled = (_ref3 = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : props.unstyled) !== null && _ref3 !== void 0 ? _ref3 : !1, _styledContext_size, _ref4;
|
|
28607
28607
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SwitchContext.Provider, {
|
|
28608
|
-
value
|
|
28608
|
+
value,
|
|
28609
28609
|
children: [
|
|
28610
28610
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
|
|
28611
28611
|
ref: switchRef,
|
|
@@ -28936,7 +28936,7 @@ var require_createTabs_native = __commonJS({
|
|
|
28936
28936
|
});
|
|
28937
28937
|
TabsList.displayName = TAB_LIST_NAME;
|
|
28938
28938
|
var TRIGGER_NAME = "TabsTrigger", TabsTrigger = TabFrame.styleable(function(props, forwardedRef) {
|
|
28939
|
-
var { __scopeTabs, value
|
|
28939
|
+
var { __scopeTabs, value, disabled = !1, onInteraction, disableActiveTheme, ...triggerProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value), isSelected = value === context.value, [layout, setLayout] = React4.useState(null), triggerRef = React4.useRef(null), groupItemProps = (0, import_group.useGroupItem)({
|
|
28940
28940
|
disabled: !!disabled
|
|
28941
28941
|
});
|
|
28942
28942
|
React4.useEffect(function() {
|
|
@@ -28964,7 +28964,7 @@ var require_createTabs_native = __commonJS({
|
|
|
28964
28964
|
isSelected && layout && (onInteraction == null || onInteraction("select", layout));
|
|
28965
28965
|
}, [
|
|
28966
28966
|
isSelected,
|
|
28967
|
-
|
|
28967
|
+
value,
|
|
28968
28968
|
layout
|
|
28969
28969
|
]);
|
|
28970
28970
|
var _props_onPress;
|
|
@@ -29003,7 +29003,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29003
29003
|
ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
|
|
29004
29004
|
onPress: (0, import_helpers.composeEventHandlers)((_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : void 0, function(event) {
|
|
29005
29005
|
var webChecks = !import_constants4.isWeb || event.button === 0 && event.ctrlKey === !1;
|
|
29006
|
-
!disabled && !isSelected && webChecks ? context.onChange(
|
|
29006
|
+
!disabled && !isSelected && webChecks ? context.onChange(value) : event.preventDefault();
|
|
29007
29007
|
}),
|
|
29008
29008
|
...import_constants4.isWeb && {
|
|
29009
29009
|
type: "button",
|
|
@@ -29011,12 +29011,12 @@ var require_createTabs_native = __commonJS({
|
|
|
29011
29011
|
[
|
|
29012
29012
|
" ",
|
|
29013
29013
|
"Enter"
|
|
29014
|
-
].includes(event.key) && (context.onChange(
|
|
29014
|
+
].includes(event.key) && (context.onChange(value), event.preventDefault());
|
|
29015
29015
|
}),
|
|
29016
29016
|
onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, function(event) {
|
|
29017
29017
|
layout && (onInteraction == null || onInteraction("focus", layout));
|
|
29018
29018
|
var isAutomaticActivation = context.activationMode !== "manual";
|
|
29019
|
-
!isSelected && !disabled && isAutomaticActivation && context.onChange(
|
|
29019
|
+
!isSelected && !disabled && isAutomaticActivation && context.onChange(value);
|
|
29020
29020
|
}),
|
|
29021
29021
|
onBlur: (0, import_helpers.composeEventHandlers)(props.onFocus, function() {
|
|
29022
29022
|
onInteraction == null || onInteraction("focus", null);
|
|
@@ -29028,7 +29028,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29028
29028
|
});
|
|
29029
29029
|
TabsTrigger.displayName = TRIGGER_NAME;
|
|
29030
29030
|
var TabsContent = ContentFrame.styleable(function(props, forwardedRef) {
|
|
29031
|
-
var { __scopeTabs, value
|
|
29031
|
+
var { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
|
|
29032
29032
|
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContentFrame, {
|
|
29033
29033
|
"data-state": isSelected ? "active" : "inactive",
|
|
29034
29034
|
"data-orientation": context.orientation,
|
|
@@ -29041,9 +29041,9 @@ var require_createTabs_native = __commonJS({
|
|
|
29041
29041
|
...contentProps,
|
|
29042
29042
|
ref: forwardedRef,
|
|
29043
29043
|
children
|
|
29044
|
-
},
|
|
29044
|
+
}, value) : null;
|
|
29045
29045
|
}), TabsComponent = TabsFrame.styleable(function(props, forwardedRef) {
|
|
29046
|
-
var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size: size2 = "$true", ...tabsProps } = props, direction = (0, import_use_direction.useDirection)(dir), [
|
|
29046
|
+
var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size: size2 = "$true", ...tabsProps } = props, direction = (0, import_use_direction.useDirection)(dir), [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
29047
29047
|
prop: valueProp,
|
|
29048
29048
|
onChange: onValueChange,
|
|
29049
29049
|
defaultProp: defaultValue ?? ""
|
|
@@ -29059,7 +29059,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29059
29059
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_StyledContext.TabsProvider, {
|
|
29060
29060
|
scope: __scopeTabs,
|
|
29061
29061
|
baseId: React4.useId(),
|
|
29062
|
-
value
|
|
29062
|
+
value,
|
|
29063
29063
|
onChange: setValue,
|
|
29064
29064
|
orientation,
|
|
29065
29065
|
dir: direction,
|
|
@@ -29087,11 +29087,11 @@ var require_createTabs_native = __commonJS({
|
|
|
29087
29087
|
Content: TabsContent
|
|
29088
29088
|
});
|
|
29089
29089
|
}
|
|
29090
|
-
function makeTriggerId(baseId,
|
|
29091
|
-
return `${baseId}-trigger-${
|
|
29090
|
+
function makeTriggerId(baseId, value) {
|
|
29091
|
+
return `${baseId}-trigger-${value}`;
|
|
29092
29092
|
}
|
|
29093
|
-
function makeContentId(baseId,
|
|
29094
|
-
return `${baseId}-content-${
|
|
29093
|
+
function makeContentId(baseId, value) {
|
|
29094
|
+
return `${baseId}-content-${value}`;
|
|
29095
29095
|
}
|
|
29096
29096
|
}
|
|
29097
29097
|
});
|
|
@@ -29760,7 +29760,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29760
29760
|
}));
|
|
29761
29761
|
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
29762
29762
|
var ToggleGroupItemImpl = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
29763
|
-
var { __scopeToggleGroup, value
|
|
29763
|
+
var { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = {
|
|
29764
29764
|
"aria-pressed": void 0
|
|
29765
29765
|
}, typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
29766
29766
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Toggle.Toggle, {
|
|
@@ -29768,7 +29768,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29768
29768
|
...itemProps,
|
|
29769
29769
|
ref: forwardedRef,
|
|
29770
29770
|
onPressedChange: function(pressed) {
|
|
29771
|
-
pressed ? valueContext.onItemActivate(
|
|
29771
|
+
pressed ? valueContext.onItemActivate(value) : valueContext.onItemDeactivate(value);
|
|
29772
29772
|
}
|
|
29773
29773
|
});
|
|
29774
29774
|
}), ToggleGroup = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
@@ -29803,7 +29803,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29803
29803
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
29804
29804
|
var { Provider: ToggleGroupValueProvider, useStyledContext: useToggleGroupValueContext } = (0, import_web.createStyledContext)(), ToggleGroupImplSingle = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
29805
29805
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
29806
|
-
}, disableDeactivation = !1, ...toggleGroupSingleProps } = props, [
|
|
29806
|
+
}, disableDeactivation = !1, ...toggleGroupSingleProps } = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
29807
29807
|
prop: valueProp,
|
|
29808
29808
|
defaultProp: defaultValue,
|
|
29809
29809
|
onChange: onValueChange
|
|
@@ -29811,10 +29811,10 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29811
29811
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupValueProvider, {
|
|
29812
29812
|
scope: props.__scopeToggleGroup,
|
|
29813
29813
|
type: "single",
|
|
29814
|
-
value:
|
|
29815
|
-
|
|
29814
|
+
value: value ? [
|
|
29815
|
+
value
|
|
29816
29816
|
] : [],
|
|
29817
|
-
defaultValue:
|
|
29817
|
+
defaultValue: value,
|
|
29818
29818
|
onItemActivate: setValue,
|
|
29819
29819
|
onItemDeactivate: import_react3.default.useCallback(function() {
|
|
29820
29820
|
return disableDeactivation ? null : setValue("");
|
|
@@ -29829,7 +29829,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29829
29829
|
});
|
|
29830
29830
|
}), ToggleGroupImplMultiple = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
29831
29831
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
29832
|
-
}, disableDeactivation, ...toggleGroupMultipleProps } = props, [
|
|
29832
|
+
}, disableDeactivation, ...toggleGroupMultipleProps } = props, [value = [], setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
29833
29833
|
prop: valueProp,
|
|
29834
29834
|
defaultProp: defaultValue,
|
|
29835
29835
|
onChange: onValueChange
|
|
@@ -29846,8 +29846,8 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29846
29846
|
]), handleButtonDeactivate = import_react3.default.useCallback(function(itemValue) {
|
|
29847
29847
|
return setValue(function() {
|
|
29848
29848
|
var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
29849
|
-
return prevValue.filter(function(
|
|
29850
|
-
return
|
|
29849
|
+
return prevValue.filter(function(value2) {
|
|
29850
|
+
return value2 !== itemValue;
|
|
29851
29851
|
});
|
|
29852
29852
|
});
|
|
29853
29853
|
}, [
|
|
@@ -29856,8 +29856,8 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
29856
29856
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupValueProvider, {
|
|
29857
29857
|
scope: props.__scopeToggleGroup,
|
|
29858
29858
|
type: "multiple",
|
|
29859
|
-
value
|
|
29860
|
-
defaultValue:
|
|
29859
|
+
value,
|
|
29860
|
+
defaultValue: value,
|
|
29861
29861
|
onItemActivate: handleButtonActivate,
|
|
29862
29862
|
onItemDeactivate: handleButtonDeactivate,
|
|
29863
29863
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupImpl, {
|