tamagui 1.102.2 → 1.103.0
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 +264 -222
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +264 -222
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -1324,8 +1324,8 @@ var require_shouldRenderNativePlatform_native = __commonJS({
|
|
|
1324
1324
|
var userRequestedPlatforms = resolvePlatformNames(nativeProp), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1325
1325
|
try {
|
|
1326
1326
|
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
1327
|
-
var
|
|
1328
|
-
if (
|
|
1327
|
+
var platform2 = _step.value;
|
|
1328
|
+
if (platform2 === import_constants4.currentPlatform && userRequestedPlatforms.has(platform2)) return platform2;
|
|
1329
1329
|
}
|
|
1330
1330
|
} catch (err) {
|
|
1331
1331
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -4006,9 +4006,9 @@ var require_useTheme_native = __commonJS({
|
|
|
4006
4006
|
// if its a variable (web), its ignored!
|
|
4007
4007
|
get: function(_2, subkey) {
|
|
4008
4008
|
if (subkey === "val") track(keyString);
|
|
4009
|
-
else if (subkey === "get") return function(
|
|
4009
|
+
else if (subkey === "get") return function(platform2) {
|
|
4010
4010
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
4011
|
-
if (
|
|
4011
|
+
if (platform2 !== "web" && import_constants4.isIos && !deopt && config.settings.fastSchemeChange && !someParentIsInversed(themeManager) && scheme) {
|
|
4012
4012
|
var oppositeThemeName = name.replace(scheme === "dark" ? "dark" : "light", scheme === "dark" ? "light" : "dark"), oppositeTheme = config.themes[oppositeThemeName], oppositeVal = (0, import_createVariable.getVariable)(oppositeTheme == null ? void 0 : oppositeTheme[keyString]);
|
|
4013
4013
|
if (oppositeVal) {
|
|
4014
4014
|
var dynamicVal = {
|
|
@@ -7596,11 +7596,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7596
7596
|
if (!val) continue;
|
|
7597
7597
|
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
7598
7598
|
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (((typeof hasMedia > "u" ? "undefined" : _type_of3(hasMedia)) > "u" ? "undefined" : _type_of1(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
|
|
7599
|
-
var
|
|
7599
|
+
var platform2 = key.slice(10);
|
|
7600
7600
|
if (
|
|
7601
7601
|
// supports web, ios, android
|
|
7602
|
-
|
|
7603
|
-
|
|
7602
|
+
platform2 !== import_constants4.currentPlatform && // supports web, native
|
|
7603
|
+
platform2 !== "native"
|
|
7604
7604
|
) continue;
|
|
7605
7605
|
}
|
|
7606
7606
|
if (shouldDoClasses) {
|
|
@@ -9003,7 +9003,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9003
9003
|
enabled: shouldListenForMedia,
|
|
9004
9004
|
keys: mediaListeningKeys
|
|
9005
9005
|
});
|
|
9006
|
-
var viewPropsIn = splitStyles.viewProps, pseudos = splitStyles.pseudos, splitStylesStyle = splitStyles.style, classNames = splitStyles.classNames, space = splitStyles.space, propsWithAnimation = props, asChild = viewPropsIn.asChild, children = viewPropsIn.children, themeShallow = viewPropsIn.themeShallow, _spaceDirection = viewPropsIn.spaceDirection, onPress = viewPropsIn.onPress, onLongPress = viewPropsIn.onLongPress, onPressIn = viewPropsIn.onPressIn, onPressOut = viewPropsIn.onPressOut, onHoverIn = viewPropsIn.onHoverIn, onHoverOut = viewPropsIn.onHoverOut, onMouseUp = viewPropsIn.onMouseUp, onMouseDown = viewPropsIn.onMouseDown, onMouseEnter = viewPropsIn.onMouseEnter, onMouseLeave = viewPropsIn.onMouseLeave, onFocus = viewPropsIn.onFocus, onBlur = viewPropsIn.onBlur, separator = viewPropsIn.separator, _forceStyle = viewPropsIn.forceStyle, onClick = viewPropsIn.onClick, _themeProp = viewPropsIn.theme,
|
|
9006
|
+
var viewPropsIn = splitStyles.viewProps, pseudos = splitStyles.pseudos, splitStylesStyle = splitStyles.style, classNames = splitStyles.classNames, space = splitStyles.space, propsWithAnimation = props, asChild = viewPropsIn.asChild, children = viewPropsIn.children, themeShallow = viewPropsIn.themeShallow, _spaceDirection = viewPropsIn.spaceDirection, onPress = viewPropsIn.onPress, onLongPress = viewPropsIn.onLongPress, onPressIn = viewPropsIn.onPressIn, onPressOut = viewPropsIn.onPressOut, onHoverIn = viewPropsIn.onHoverIn, onHoverOut = viewPropsIn.onHoverOut, onMouseUp = viewPropsIn.onMouseUp, onMouseDown = viewPropsIn.onMouseDown, onMouseEnter = viewPropsIn.onMouseEnter, onMouseLeave = viewPropsIn.onMouseLeave, onFocus = viewPropsIn.onFocus, onBlur = viewPropsIn.onBlur, separator = viewPropsIn.separator, _forceStyle = viewPropsIn.forceStyle, onClick = viewPropsIn.onClick, _themeProp = viewPropsIn.theme, nonTamaguiProps = _object_without_properties5(viewPropsIn, [
|
|
9007
9007
|
"asChild",
|
|
9008
9008
|
"children",
|
|
9009
9009
|
"themeShallow",
|
|
@@ -9023,8 +9023,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9023
9023
|
"separator",
|
|
9024
9024
|
"forceStyle",
|
|
9025
9025
|
"onClick",
|
|
9026
|
-
"theme"
|
|
9027
|
-
"defaultVariants"
|
|
9026
|
+
"theme"
|
|
9028
9027
|
]), viewProps = nonTamaguiProps;
|
|
9029
9028
|
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
9030
9029
|
var animationStyles, shouldUseAnimation = (
|
|
@@ -9264,10 +9263,10 @@ var require_createComponent_native = __commonJS({
|
|
|
9264
9263
|
return props.children;
|
|
9265
9264
|
}
|
|
9266
9265
|
Unspaced2.isUnspaced = !0;
|
|
9267
|
-
var getSpacerSize = function(
|
|
9266
|
+
var getSpacerSize = function(size4, param) {
|
|
9268
9267
|
var tokens = param.tokens;
|
|
9269
|
-
|
|
9270
|
-
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[
|
|
9268
|
+
size4 = size4 === !0 ? "$true" : size4;
|
|
9269
|
+
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[size4]) !== null && _tokens_space_size !== void 0 ? _tokens_space_size : size4;
|
|
9271
9270
|
return {
|
|
9272
9271
|
width: sizePx,
|
|
9273
9272
|
height: sizePx,
|
|
@@ -10791,12 +10790,19 @@ var require_styled_native = __commonJS({
|
|
|
10791
10790
|
"defaultVariants",
|
|
10792
10791
|
"acceptsClassName",
|
|
10793
10792
|
"context"
|
|
10794
|
-
]);
|
|
10795
|
-
if (
|
|
10793
|
+
]), parentDefaultVariants, parentDefaultProps;
|
|
10794
|
+
if (parentStaticConfig) {
|
|
10796
10795
|
var avoid = parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC;
|
|
10797
|
-
|
|
10796
|
+
if (!avoid) {
|
|
10797
|
+
var pdp = parentStaticConfig.defaultProps;
|
|
10798
|
+
for (var key2 in pdp) {
|
|
10799
|
+
var val = pdp[key2];
|
|
10800
|
+
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
10801
|
+
}
|
|
10802
|
+
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
10803
|
+
}
|
|
10798
10804
|
}
|
|
10799
|
-
parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10805
|
+
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = _object_spread9({}, parentDefaultProps, parentDefaultVariants, defaultProps, defaultVariants)), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10800
10806
|
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), acceptsClassName = acceptsClassNameProp ?? (isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName)), conf = _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({}, parentStaticConfig, staticExtractionOptions, !isPlainStyledComponent && {
|
|
10801
10807
|
Component
|
|
10802
10808
|
}), {
|
|
@@ -15065,9 +15071,9 @@ var require_getElevation_native = __commonJS({
|
|
|
15065
15071
|
}
|
|
15066
15072
|
return target;
|
|
15067
15073
|
}
|
|
15068
|
-
var getElevation = function(
|
|
15069
|
-
if (
|
|
15070
|
-
var tokens = extras.tokens, token = tokens.size[
|
|
15074
|
+
var getElevation = function(size4, extras) {
|
|
15075
|
+
if (size4) {
|
|
15076
|
+
var tokens = extras.tokens, token = tokens.size[size4], sizeNum = (0, import_core12.isVariable)(token) ? +token.val : size4;
|
|
15071
15077
|
return getSizedElevation(sizeNum, extras);
|
|
15072
15078
|
}
|
|
15073
15079
|
}, getSizedElevation = function(val, param) {
|
|
@@ -15263,8 +15269,8 @@ var require_index_native18 = __commonJS({
|
|
|
15263
15269
|
bounds: [
|
|
15264
15270
|
0
|
|
15265
15271
|
]
|
|
15266
|
-
}, getSize = function(
|
|
15267
|
-
return getTokenRelative("size",
|
|
15272
|
+
}, getSize = function(size4, options) {
|
|
15273
|
+
return getTokenRelative("size", size4, options);
|
|
15268
15274
|
}, getSpace2 = function(space, options) {
|
|
15269
15275
|
return getTokenRelative("space", space, options);
|
|
15270
15276
|
}, getRadius = function(radius, options) {
|
|
@@ -15312,9 +15318,9 @@ var require_index_native18 = __commonJS({
|
|
|
15312
15318
|
}
|
|
15313
15319
|
}
|
|
15314
15320
|
}
|
|
15315
|
-
var isString = typeof current == "string", cache = options.excludeHalfSteps ? isString ? cacheWholeKeys : cacheWholeVariables : isString ? cacheKeys : cacheVariables, tokensOrdered = cache[type], _options_bounds_, min2 = (_options_bounds_ = (_options_bounds = options.bounds) === null || _options_bounds === void 0 ? void 0 : _options_bounds[0]) !== null && _options_bounds_ !== void 0 ? _options_bounds_ : 0, _options_bounds_1, max2 = (_options_bounds_1 = (_options_bounds1 = options.bounds) === null || _options_bounds1 === void 0 ? void 0 : _options_bounds1[1]) !== null && _options_bounds_1 !== void 0 ? _options_bounds_1 : tokensOrdered.length - 1, currentIndex = tokensOrdered.indexOf(current),
|
|
15316
|
-
|
|
15317
|
-
var index = Math.min(max2, Math.max(min2, currentIndex +
|
|
15321
|
+
var isString = typeof current == "string", cache = options.excludeHalfSteps ? isString ? cacheWholeKeys : cacheWholeVariables : isString ? cacheKeys : cacheVariables, tokensOrdered = cache[type], _options_bounds_, min2 = (_options_bounds_ = (_options_bounds = options.bounds) === null || _options_bounds === void 0 ? void 0 : _options_bounds[0]) !== null && _options_bounds_ !== void 0 ? _options_bounds_ : 0, _options_bounds_1, max2 = (_options_bounds_1 = (_options_bounds1 = options.bounds) === null || _options_bounds1 === void 0 ? void 0 : _options_bounds1[1]) !== null && _options_bounds_1 !== void 0 ? _options_bounds_1 : tokensOrdered.length - 1, currentIndex = tokensOrdered.indexOf(current), shift4 = options.shift || 0;
|
|
15322
|
+
shift4 && (current === "$true" || (0, import_web.isVariable)(current) && current.name === "true") && (shift4 += shift4 > 0 ? 1 : -1);
|
|
15323
|
+
var index = Math.min(max2, Math.max(min2, currentIndex + shift4)), found = tokensOrdered[index], result = (typeof found == "string" ? tokens[found] : found) || tokens.$true;
|
|
15318
15324
|
return result;
|
|
15319
15325
|
}, getTokenRelative = stepTokenUpOrDown;
|
|
15320
15326
|
}
|
|
@@ -15533,14 +15539,14 @@ var require_variants_native = __commonJS({
|
|
|
15533
15539
|
true: function(_, param) {
|
|
15534
15540
|
var props = param.props, tokens = param.tokens;
|
|
15535
15541
|
if (!("size" in props)) return circularStyle;
|
|
15536
|
-
var
|
|
15542
|
+
var size4 = typeof props.size == "number" ? props.size : tokens.size[props.size];
|
|
15537
15543
|
return _object_spread_props8(_object_spread9({}, circularStyle), {
|
|
15538
|
-
width:
|
|
15539
|
-
height:
|
|
15540
|
-
maxWidth:
|
|
15541
|
-
maxHeight:
|
|
15542
|
-
minWidth:
|
|
15543
|
-
minHeight:
|
|
15544
|
+
width: size4,
|
|
15545
|
+
height: size4,
|
|
15546
|
+
maxWidth: size4,
|
|
15547
|
+
maxHeight: size4,
|
|
15548
|
+
minWidth: size4,
|
|
15549
|
+
minHeight: size4
|
|
15544
15550
|
});
|
|
15545
15551
|
}
|
|
15546
15552
|
}, hoverTheme = {
|
|
@@ -16012,8 +16018,8 @@ var require_SizableText_native = __commonJS({
|
|
|
16012
16018
|
});
|
|
16013
16019
|
SizableText2.staticConfig.variants.fontFamily = {
|
|
16014
16020
|
"...": function(_, extras) {
|
|
16015
|
-
var
|
|
16016
|
-
return (0, import_get_font_sized2.getFontSized)(
|
|
16021
|
+
var size4 = extras.props.size || "$true";
|
|
16022
|
+
return (0, import_get_font_sized2.getFontSized)(size4, extras);
|
|
16017
16023
|
}
|
|
16018
16024
|
};
|
|
16019
16025
|
}
|
|
@@ -16272,12 +16278,12 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
16272
16278
|
}), target;
|
|
16273
16279
|
}
|
|
16274
16280
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
16275
|
-
var children = propsIn.children, textProps = propsIn.textProps,
|
|
16281
|
+
var children = propsIn.children, textProps = propsIn.textProps, size4 = propsIn.size, noTextWrap = propsIn.noTextWrap, color = propsIn.color, fontFamily = propsIn.fontFamily, fontSize = propsIn.fontSize, fontWeight = propsIn.fontWeight, letterSpacing = propsIn.letterSpacing, textAlign = propsIn.textAlign, fontStyle = propsIn.fontStyle, maxFontSizeMultiplier = propsIn.maxFontSizeMultiplier;
|
|
16276
16282
|
if (noTextWrap || !children) return [
|
|
16277
16283
|
children
|
|
16278
16284
|
];
|
|
16279
16285
|
var props = _object_spread9({}, extraProps);
|
|
16280
|
-
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign),
|
|
16286
|
+
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size4 && (props.size = size4), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), import_react4.default.Children.toArray(children).map(function(child, index) {
|
|
16281
16287
|
return typeof child == "string" ? (
|
|
16282
16288
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
16283
16289
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextComponent, _object_spread_props8(_object_spread9({}, props, textProps), {
|
|
@@ -17134,8 +17140,8 @@ var require_Adapt_native = __commonJS({
|
|
|
17134
17140
|
when
|
|
17135
17141
|
};
|
|
17136
17142
|
}, Adapt = (0, import_helpers.withStaticProperties)(function(param) {
|
|
17137
|
-
var
|
|
17138
|
-
return
|
|
17143
|
+
var platform2 = param.platform, when = param.when, children = param.children, context = (0, import_react4.useContext)(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !platform2;
|
|
17144
|
+
return platform2 === "touch" && (enabled = import_constants22.isTouchable), platform2 === "native" && (enabled = !import_constants4.isWeb), platform2 === "web" && (enabled = import_constants4.isWeb), platform2 === "ios" && (enabled = import_constants4.isIos), platform2 === "android" && (enabled = import_constants4.isAndroid), when && !media[when] && (enabled = !1), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17139
17145
|
enabled && (context == null || context.setWhen(when || enabled));
|
|
17140
17146
|
}, [
|
|
17141
17147
|
when,
|
|
@@ -18948,11 +18954,11 @@ var require_nativeSheet_native = __commonJS({
|
|
|
18948
18954
|
var nativeSheets = {
|
|
18949
18955
|
ios: null
|
|
18950
18956
|
};
|
|
18951
|
-
function getNativeSheet(
|
|
18952
|
-
return nativeSheets[
|
|
18957
|
+
function getNativeSheet(platform2) {
|
|
18958
|
+
return nativeSheets[platform2];
|
|
18953
18959
|
}
|
|
18954
|
-
function setupNativeSheet(
|
|
18955
|
-
|
|
18960
|
+
function setupNativeSheet(platform2, Implementation) {
|
|
18961
|
+
platform2 === "ios" && (nativeSheets[platform2] = function(props) {
|
|
18956
18962
|
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), open = state.open, setOpen = state.setOpen, ref = (0, import_react4.useRef)();
|
|
18957
18963
|
return (0, import_react4.useEffect)(function() {
|
|
18958
18964
|
var _ref_current;
|
|
@@ -21988,8 +21994,8 @@ var require_getShapeSize_native = __commonJS({
|
|
|
21988
21994
|
}
|
|
21989
21995
|
});
|
|
21990
21996
|
module2.exports = __toCommonJS2(getShapeSize_exports);
|
|
21991
|
-
var getShapeSize = function(
|
|
21992
|
-
var tokens = param.tokens, _tokens_size_size, width = (_tokens_size_size = tokens.size[
|
|
21997
|
+
var getShapeSize = function(size4, param) {
|
|
21998
|
+
var tokens = param.tokens, _tokens_size_size, width = (_tokens_size_size = tokens.size[size4]) !== null && _tokens_size_size !== void 0 ? _tokens_size_size : size4, _tokens_size_size1, height = (_tokens_size_size1 = tokens.size[size4]) !== null && _tokens_size_size1 !== void 0 ? _tokens_size_size1 : size4;
|
|
21993
21999
|
return {
|
|
21994
22000
|
width,
|
|
21995
22001
|
height,
|
|
@@ -22404,17 +22410,17 @@ var require_Avatar_native = __commonJS({
|
|
|
22404
22410
|
position: "relative",
|
|
22405
22411
|
overflow: "hidden"
|
|
22406
22412
|
}), Avatar = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
22407
|
-
var __scopeAvatar = props.__scopeAvatar, _props_size = props.size,
|
|
22413
|
+
var __scopeAvatar = props.__scopeAvatar, _props_size = props.size, size4 = _props_size === void 0 ? "$true" : _props_size, avatarProps = _object_without_properties5(props, [
|
|
22408
22414
|
"__scopeAvatar",
|
|
22409
22415
|
"size"
|
|
22410
22416
|
]), _React_useState = _sliced_to_array(React2.useState("idle"), 2), imageLoadingStatus = _React_useState[0], setImageLoadingStatus = _React_useState[1];
|
|
22411
22417
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarProvider, {
|
|
22412
|
-
size:
|
|
22418
|
+
size: size4,
|
|
22413
22419
|
scope: __scopeAvatar,
|
|
22414
22420
|
imageLoadingStatus,
|
|
22415
22421
|
onImageLoadingStatusChange: setImageLoadingStatus,
|
|
22416
22422
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFrame, _object_spread_props8(_object_spread9({
|
|
22417
|
-
size:
|
|
22423
|
+
size: size4
|
|
22418
22424
|
}, avatarProps), {
|
|
22419
22425
|
ref: forwardedRef
|
|
22420
22426
|
}))
|
|
@@ -22533,10 +22539,10 @@ var require_getFontSize_native = __commonJS({
|
|
|
22533
22539
|
return conf.fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size[token];
|
|
22534
22540
|
}, getFontSizeToken = function(inSize, opts) {
|
|
22535
22541
|
if (typeof inSize == "number") return null;
|
|
22536
|
-
var relativeSize = (opts == null ? void 0 : opts.relativeSize) || 0, conf = (0, import_core12.getConfig)(), fontSize = conf.fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size, _ref,
|
|
22537
|
-
foundIndex === -1 &&
|
|
22542
|
+
var relativeSize = (opts == null ? void 0 : opts.relativeSize) || 0, conf = (0, import_core12.getConfig)(), fontSize = conf.fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size, _ref, size4 = (_ref = inSize === "$true" && !("$true" in fontSize) ? "$4" : inSize) !== null && _ref !== void 0 ? _ref : "$true" in fontSize ? "$true" : "$4", sizeTokens = Object.keys(fontSize), foundIndex = sizeTokens.indexOf(size4);
|
|
22543
|
+
foundIndex === -1 && size4.endsWith(".5") && (foundIndex = sizeTokens.indexOf(size4.replace(".5", "")));
|
|
22538
22544
|
var tokenIndex = Math.min(Math.max(0, foundIndex + relativeSize), sizeTokens.length - 1), _sizeTokens_tokenIndex;
|
|
22539
|
-
return (_sizeTokens_tokenIndex = sizeTokens[tokenIndex]) !== null && _sizeTokens_tokenIndex !== void 0 ? _sizeTokens_tokenIndex :
|
|
22545
|
+
return (_sizeTokens_tokenIndex = sizeTokens[tokenIndex]) !== null && _sizeTokens_tokenIndex !== void 0 ? _sizeTokens_tokenIndex : size4;
|
|
22540
22546
|
};
|
|
22541
22547
|
}
|
|
22542
22548
|
});
|
|
@@ -23096,7 +23102,7 @@ var require_Button_native = __commonJS({
|
|
|
23096
23102
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
23097
23103
|
}
|
|
23098
23104
|
}), ButtonIcon = function(props) {
|
|
23099
|
-
var children = props.children, _props_scaleIcon = props.scaleIcon, scaleIcon = _props_scaleIcon === void 0 ? 1 : _props_scaleIcon, _useContext = (0, import_react4.useContext)(ButtonContext),
|
|
23105
|
+
var children = props.children, _props_scaleIcon = props.scaleIcon, scaleIcon = _props_scaleIcon === void 0 ? 1 : _props_scaleIcon, _useContext = (0, import_react4.useContext)(ButtonContext), size4 = _useContext.size, color = _useContext.color, iconSize = (typeof size4 == "number" ? size4 * 0.5 : (0, import_font_size.getFontSize)(size4)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
23100
23106
|
size: iconSize,
|
|
23101
23107
|
color
|
|
23102
23108
|
});
|
|
@@ -23148,7 +23154,7 @@ var require_Button_native = __commonJS({
|
|
|
23148
23154
|
"tag",
|
|
23149
23155
|
"ellipse",
|
|
23150
23156
|
"maxFontSizeMultiplier"
|
|
23151
|
-
]),
|
|
23157
|
+
]), size4 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size4 == "number" ? size4 * 0.5 : (0, import_font_size.getFontSize)(size4, {
|
|
23152
23158
|
font: (fontFamily == null ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
|
|
23153
23159
|
})) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
23154
23160
|
size: iconSize,
|
|
@@ -23170,7 +23176,7 @@ var require_Button_native = __commonJS({
|
|
|
23170
23176
|
maxFontSizeMultiplier
|
|
23171
23177
|
}, Text3 === ButtonText && propsActive.unstyled !== !0 ? {
|
|
23172
23178
|
unstyled: process.env.TAMAGUI_HEADLESS === "1",
|
|
23173
|
-
size:
|
|
23179
|
+
size: size4
|
|
23174
23180
|
} : void 0), inner = (0, import_web.spacedChildren)({
|
|
23175
23181
|
// a bit arbitrary but scaling to font size is necessary so long as button does
|
|
23176
23182
|
space: spaceSize,
|
|
@@ -23186,7 +23192,7 @@ var require_Button_native = __commonJS({
|
|
|
23186
23192
|
themedIconAfter
|
|
23187
23193
|
])
|
|
23188
23194
|
}), props = _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({
|
|
23189
|
-
size:
|
|
23195
|
+
size: size4
|
|
23190
23196
|
}, propsIn.disabled && {
|
|
23191
23197
|
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
23192
23198
|
focusable: void 0,
|
|
@@ -24890,12 +24896,12 @@ var require_createCheckbox_native = __commonJS({
|
|
|
24890
24896
|
"onCheckedChange",
|
|
24891
24897
|
"native",
|
|
24892
24898
|
"unstyled"
|
|
24893
|
-
]), propsActive = (0, import_core12.useProps)(props), styledContext = import_react4.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext), adjustedSize = 0,
|
|
24899
|
+
]), propsActive = (0, import_core12.useProps)(props), styledContext = import_react4.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext), adjustedSize = 0, size4 = 0;
|
|
24894
24900
|
if (!unstyled) {
|
|
24895
24901
|
var _propsActive_size, _ref;
|
|
24896
24902
|
adjustedSize = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)((_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext == null ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : "$true", {
|
|
24897
24903
|
shift: sizeAdjust
|
|
24898
|
-
})),
|
|
24904
|
+
})), size4 = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize;
|
|
24899
24905
|
}
|
|
24900
24906
|
var _useControllableState = _sliced_to_array((0, import_use_controllable_state.useControllableState)({
|
|
24901
24907
|
prop: checkedProp,
|
|
@@ -24947,14 +24953,14 @@ var require_createCheckbox_native = __commonJS({
|
|
|
24947
24953
|
scaleIcon: (_ref2 = scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon)) !== null && _ref2 !== void 0 ? _ref2 : 1,
|
|
24948
24954
|
children: [
|
|
24949
24955
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({}, !unstyled && {
|
|
24950
|
-
width:
|
|
24951
|
-
height:
|
|
24956
|
+
width: size4,
|
|
24957
|
+
height: size4
|
|
24952
24958
|
}), {
|
|
24953
24959
|
tag: "button",
|
|
24954
24960
|
ref: checkboxRef,
|
|
24955
24961
|
unstyled
|
|
24956
24962
|
}), unstyled === !1 && {
|
|
24957
|
-
size:
|
|
24963
|
+
size: size4,
|
|
24958
24964
|
theme: checked ? "active" : null
|
|
24959
24965
|
}), {
|
|
24960
24966
|
// potential variant
|
|
@@ -26145,7 +26151,7 @@ var require_Group_native = __commonJS({
|
|
|
26145
26151
|
});
|
|
26146
26152
|
function createGroup(verticalDefault) {
|
|
26147
26153
|
return (0, import_helpers.withStaticProperties)(GroupFrame.styleable(function(props, ref) {
|
|
26148
|
-
var activeProps = (0, import_core12.useProps)(props), __scopeGroup = activeProps.__scopeGroup, childrenProp = activeProps.children, space = activeProps.space, _activeProps_size = activeProps.size,
|
|
26154
|
+
var activeProps = (0, import_core12.useProps)(props), __scopeGroup = activeProps.__scopeGroup, childrenProp = activeProps.children, space = activeProps.space, _activeProps_size = activeProps.size, size4 = _activeProps_size === void 0 ? "$true" : _activeProps_size, spaceDirection = activeProps.spaceDirection, separator = activeProps.separator, scrollable = activeProps.scrollable, _activeProps_axis = activeProps.axis, axis = _activeProps_axis === void 0 ? verticalDefault ? "vertical" : "horizontal" : _activeProps_axis, _activeProps_orientation = activeProps.orientation, orientation = _activeProps_orientation === void 0 ? axis : _activeProps_orientation, disabledProp = activeProps.disabled, disablePassBorderRadiusProp = activeProps.disablePassBorderRadius, borderRadius = activeProps.borderRadius, forceUseItem = activeProps.forceUseItem, restProps = _object_without_properties5(activeProps, [
|
|
26149
26155
|
"__scopeGroup",
|
|
26150
26156
|
"children",
|
|
26151
26157
|
"space",
|
|
@@ -26161,7 +26167,7 @@ var require_Group_native = __commonJS({
|
|
|
26161
26167
|
"forceUseItem"
|
|
26162
26168
|
]), vertical = orientation === "vertical", _useControllableState = _sliced_to_array((0, import_use_controllable_state.useControllableState)({
|
|
26163
26169
|
defaultProp: forceUseItem ? 1 : 0
|
|
26164
|
-
}), 2), itemChildrenCount = _useControllableState[0], setItemChildrenCount = _useControllableState[1], isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (
|
|
26170
|
+
}), 2), itemChildrenCount = _useControllableState[0], setItemChildrenCount = _useControllableState[1], isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (size4 ? (0, import_core12.getVariableValue)((0, import_core12.getTokens)().radius[size4]) - 1 : void 0), hasRadius = radius !== void 0, disablePassBorderRadius = disablePassBorderRadiusProp ?? !hasRadius, childrenArray = import_react4.Children.toArray(childrenProp), children = isUsingItems ? import_react4.Children.toArray(childrenProp).filter(import_react4.isValidElement) : childrenArray.map(function(child, i) {
|
|
26165
26171
|
if (!/* @__PURE__ */ (0, import_react4.isValidElement)(child) || child.type === import_react4.Fragment) return child;
|
|
26166
26172
|
var _child_props_disabled, disabled = (_child_props_disabled = child.props.disabled) !== null && _child_props_disabled !== void 0 ? _child_props_disabled : disabledProp, isFirst = i === 0, isLast = i === childrenArray.length - 1, radiusStyles = disablePassBorderRadius === !0 ? null : getBorderRadius({
|
|
26167
26173
|
isFirst,
|
|
@@ -26200,7 +26206,7 @@ var require_Group_native = __commonJS({
|
|
|
26200
26206
|
scope: __scopeGroup,
|
|
26201
26207
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GroupFrame, _object_spread_props8(_object_spread9({
|
|
26202
26208
|
ref,
|
|
26203
|
-
size:
|
|
26209
|
+
size: size4,
|
|
26204
26210
|
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
26205
26211
|
borderRadius
|
|
26206
26212
|
}, restProps), {
|
|
@@ -27159,7 +27165,7 @@ var require_ListItem_native = __commonJS({
|
|
|
27159
27165
|
textAlign,
|
|
27160
27166
|
ellipse,
|
|
27161
27167
|
children
|
|
27162
|
-
},
|
|
27168
|
+
}, size4 = props.size || "$true", iconSize = (0, import_font_size.getFontSize)(size4) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
27163
27169
|
size: iconSize,
|
|
27164
27170
|
color
|
|
27165
27171
|
}), _map = _sliced_to_array([
|
|
@@ -27184,7 +27190,7 @@ var require_ListItem_native = __commonJS({
|
|
|
27184
27190
|
flex: 1,
|
|
27185
27191
|
children: [
|
|
27186
27192
|
noTextWrap === "all" ? title : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Title, {
|
|
27187
|
-
size:
|
|
27193
|
+
size: size4,
|
|
27188
27194
|
children: title
|
|
27189
27195
|
}),
|
|
27190
27196
|
subTitle ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
@@ -27193,7 +27199,7 @@ var require_ListItem_native = __commonJS({
|
|
|
27193
27199
|
// or standardize on subtle colors in themes
|
|
27194
27200
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Subtitle, {
|
|
27195
27201
|
unstyled,
|
|
27196
|
-
size:
|
|
27202
|
+
size: size4,
|
|
27197
27203
|
children: subTitle
|
|
27198
27204
|
})
|
|
27199
27205
|
) : subTitle
|
|
@@ -27604,18 +27610,18 @@ var sides, alignments, placements, min, max, oppositeSideMap, oppositeAlignmentM
|
|
|
27604
27610
|
// ../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js
|
|
27605
27611
|
var floating_ui_core_esm_exports = {};
|
|
27606
27612
|
__export(floating_ui_core_esm_exports, {
|
|
27607
|
-
arrow: () =>
|
|
27608
|
-
autoPlacement: () =>
|
|
27613
|
+
arrow: () => arrow2,
|
|
27614
|
+
autoPlacement: () => autoPlacement2,
|
|
27609
27615
|
computePosition: () => computePosition,
|
|
27610
|
-
detectOverflow: () =>
|
|
27611
|
-
flip: () =>
|
|
27612
|
-
hide: () =>
|
|
27613
|
-
inline: () =>
|
|
27614
|
-
limitShift: () =>
|
|
27615
|
-
offset: () =>
|
|
27616
|
+
detectOverflow: () => detectOverflow2,
|
|
27617
|
+
flip: () => flip2,
|
|
27618
|
+
hide: () => hide2,
|
|
27619
|
+
inline: () => inline2,
|
|
27620
|
+
limitShift: () => limitShift2,
|
|
27621
|
+
offset: () => offset2,
|
|
27616
27622
|
rectToClientRect: () => rectToClientRect,
|
|
27617
|
-
shift: () =>
|
|
27618
|
-
size: () =>
|
|
27623
|
+
shift: () => shift2,
|
|
27624
|
+
size: () => size2
|
|
27619
27625
|
});
|
|
27620
27626
|
function _array_like_to_array(arr, len) {
|
|
27621
27627
|
(len == null || len > arr.length) && (len = arr.length);
|
|
@@ -27850,7 +27856,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
27850
27856
|
}
|
|
27851
27857
|
return coords;
|
|
27852
27858
|
}
|
|
27853
|
-
function
|
|
27859
|
+
function detectOverflow2(state, options) {
|
|
27854
27860
|
return _detectOverflow.apply(this, arguments);
|
|
27855
27861
|
}
|
|
27856
27862
|
function _detectOverflow() {
|
|
@@ -27863,13 +27869,13 @@ function _detectOverflow() {
|
|
|
27863
27869
|
* @see https://floating-ui.com/docs/detectOverflow
|
|
27864
27870
|
*/
|
|
27865
27871
|
_async_to_generator(function(state, options) {
|
|
27866
|
-
var _await$platform$isEle, x, y,
|
|
27872
|
+
var _await$platform$isEle, x, y, platform2, rects, elements, strategy, _evaluate, _evaluate_boundary, boundary, _evaluate_rootBoundary, rootBoundary, _evaluate_elementContext, elementContext, _evaluate_altBoundary, altBoundary, _evaluate_padding, padding, paddingObject, altContext, element, clippingClientRect, _, _tmp, _tmp1, _tmp2, rect, offsetParent, offsetScale, _tmp3, elementClientRect, _tmp4;
|
|
27867
27873
|
return _ts_generator(this, function(_state) {
|
|
27868
27874
|
switch (_state.label) {
|
|
27869
27875
|
case 0:
|
|
27870
|
-
return options === void 0 && (options = {}), x = state.x, y = state.y,
|
|
27876
|
+
return options === void 0 && (options = {}), x = state.x, y = state.y, platform2 = state.platform, rects = state.rects, elements = state.elements, strategy = state.strategy, _evaluate = evaluate(options, state), _evaluate_boundary = _evaluate.boundary, boundary = _evaluate_boundary === void 0 ? "clippingAncestors" : _evaluate_boundary, _evaluate_rootBoundary = _evaluate.rootBoundary, rootBoundary = _evaluate_rootBoundary === void 0 ? "viewport" : _evaluate_rootBoundary, _evaluate_elementContext = _evaluate.elementContext, elementContext = _evaluate_elementContext === void 0 ? "floating" : _evaluate_elementContext, _evaluate_altBoundary = _evaluate.altBoundary, altBoundary = _evaluate_altBoundary === void 0 ? !1 : _evaluate_altBoundary, _evaluate_padding = _evaluate.padding, padding = _evaluate_padding === void 0 ? 0 : _evaluate_padding, paddingObject = getPaddingObject(padding), altContext = elementContext === "floating" ? "reference" : "floating", element = elements[altBoundary ? altContext : elementContext], _ = platform2.getClippingRect, _tmp = {}, [
|
|
27871
27877
|
4,
|
|
27872
|
-
|
|
27878
|
+
platform2.isElement == null ? void 0 : platform2.isElement(element)
|
|
27873
27879
|
];
|
|
27874
27880
|
case 1:
|
|
27875
27881
|
return (_await$platform$isEle = _state.sent()) == null || _await$platform$isEle ? (_tmp1 = element, [
|
|
@@ -27885,7 +27891,7 @@ function _detectOverflow() {
|
|
|
27885
27891
|
4
|
|
27886
27892
|
] : [
|
|
27887
27893
|
4,
|
|
27888
|
-
|
|
27894
|
+
platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)
|
|
27889
27895
|
];
|
|
27890
27896
|
case 3:
|
|
27891
27897
|
_tmp2 = _state.sent(), _state.label = 4;
|
|
@@ -27894,7 +27900,7 @@ function _detectOverflow() {
|
|
|
27894
27900
|
case 5:
|
|
27895
27901
|
return [
|
|
27896
27902
|
4,
|
|
27897
|
-
_.apply(
|
|
27903
|
+
_.apply(platform2, [
|
|
27898
27904
|
(_tmp.element = _tmp1, _tmp.boundary = boundary, _tmp.rootBoundary = rootBoundary, _tmp.strategy = strategy, _tmp)
|
|
27899
27905
|
])
|
|
27900
27906
|
];
|
|
@@ -27908,17 +27914,17 @@ function _detectOverflow() {
|
|
|
27908
27914
|
height: rects.floating.height
|
|
27909
27915
|
} : rects.reference, [
|
|
27910
27916
|
4,
|
|
27911
|
-
|
|
27917
|
+
platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)
|
|
27912
27918
|
];
|
|
27913
27919
|
case 7:
|
|
27914
27920
|
return offsetParent = _state.sent(), [
|
|
27915
27921
|
4,
|
|
27916
|
-
|
|
27922
|
+
platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)
|
|
27917
27923
|
];
|
|
27918
27924
|
case 8:
|
|
27919
27925
|
return _state.sent() ? [
|
|
27920
27926
|
4,
|
|
27921
|
-
|
|
27927
|
+
platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)
|
|
27922
27928
|
] : [
|
|
27923
27929
|
3,
|
|
27924
27930
|
10
|
|
@@ -27937,9 +27943,9 @@ function _detectOverflow() {
|
|
|
27937
27943
|
y: 1
|
|
27938
27944
|
}, _state.label = 11;
|
|
27939
27945
|
case 11:
|
|
27940
|
-
return offsetScale = _tmp3,
|
|
27946
|
+
return offsetScale = _tmp3, platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? [
|
|
27941
27947
|
4,
|
|
27942
|
-
|
|
27948
|
+
platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
27943
27949
|
elements,
|
|
27944
27950
|
rect,
|
|
27945
27951
|
offsetParent,
|
|
@@ -28034,13 +28040,13 @@ function _convertValueToCoords() {
|
|
|
28034
28040
|
return _convertValueToCoords = // For type backwards-compatibility, the `OffsetOptions` type was also
|
|
28035
28041
|
// Derivable.
|
|
28036
28042
|
_async_to_generator(function(state, options) {
|
|
28037
|
-
var placement,
|
|
28043
|
+
var placement, platform2, elements, rtl, side, alignment, isVertical, mainAxisMulti, crossAxisMulti, rawValue, _ref, mainAxis, crossAxis, alignmentAxis;
|
|
28038
28044
|
return _ts_generator(this, function(_state) {
|
|
28039
28045
|
switch (_state.label) {
|
|
28040
28046
|
case 0:
|
|
28041
|
-
return placement = state.placement,
|
|
28047
|
+
return placement = state.placement, platform2 = state.platform, elements = state.elements, [
|
|
28042
28048
|
4,
|
|
28043
|
-
|
|
28049
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
28044
28050
|
];
|
|
28045
28051
|
case 1:
|
|
28046
28052
|
return rtl = _state.sent(), side = getSide(placement), alignment = getAlignment(placement), isVertical = getSideAxis(placement) === "y", mainAxisMulti = [
|
|
@@ -28068,24 +28074,24 @@ function _convertValueToCoords() {
|
|
|
28068
28074
|
});
|
|
28069
28075
|
}), _convertValueToCoords.apply(this, arguments);
|
|
28070
28076
|
}
|
|
28071
|
-
var computePosition,
|
|
28077
|
+
var computePosition, arrow2, autoPlacement2, flip2, hide2, inline2, offset2, shift2, limitShift2, size2, init_floating_ui_core_esm = __esm({
|
|
28072
28078
|
"../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js"() {
|
|
28073
28079
|
init_floating_ui_utils();
|
|
28074
28080
|
init_floating_ui_utils();
|
|
28075
28081
|
computePosition = function() {
|
|
28076
28082
|
var _ref = _async_to_generator(function(reference, floating, config) {
|
|
28077
|
-
var _config_placement, placement, _config_strategy, strategy, _config_middleware, middleware,
|
|
28083
|
+
var _config_placement, placement, _config_strategy, strategy, _config_middleware, middleware, platform2, validMiddleware, rtl, rects, _computeCoordsFromPlacement, x, y, statefulPlacement, middlewareData, resetCount, i, _validMiddleware_i, name, fn, _ref2, nextX, nextY, data, reset, _tmp, ref;
|
|
28078
28084
|
return _ts_generator(this, function(_state) {
|
|
28079
28085
|
switch (_state.label) {
|
|
28080
28086
|
case 0:
|
|
28081
|
-
return _config_placement = config.placement, placement = _config_placement === void 0 ? "bottom" : _config_placement, _config_strategy = config.strategy, strategy = _config_strategy === void 0 ? "absolute" : _config_strategy, _config_middleware = config.middleware, middleware = _config_middleware === void 0 ? [] : _config_middleware,
|
|
28087
|
+
return _config_placement = config.placement, placement = _config_placement === void 0 ? "bottom" : _config_placement, _config_strategy = config.strategy, strategy = _config_strategy === void 0 ? "absolute" : _config_strategy, _config_middleware = config.middleware, middleware = _config_middleware === void 0 ? [] : _config_middleware, platform2 = config.platform, validMiddleware = middleware.filter(Boolean), [
|
|
28082
28088
|
4,
|
|
28083
|
-
|
|
28089
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(floating)
|
|
28084
28090
|
];
|
|
28085
28091
|
case 1:
|
|
28086
28092
|
return rtl = _state.sent(), [
|
|
28087
28093
|
4,
|
|
28088
|
-
|
|
28094
|
+
platform2.getElementRects({
|
|
28089
28095
|
reference,
|
|
28090
28096
|
floating,
|
|
28091
28097
|
strategy
|
|
@@ -28104,7 +28110,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28104
28110
|
strategy,
|
|
28105
28111
|
middlewareData,
|
|
28106
28112
|
rects,
|
|
28107
|
-
platform,
|
|
28113
|
+
platform: platform2,
|
|
28108
28114
|
elements: {
|
|
28109
28115
|
reference,
|
|
28110
28116
|
floating
|
|
@@ -28123,7 +28129,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28123
28129
|
6
|
|
28124
28130
|
] : [
|
|
28125
28131
|
4,
|
|
28126
|
-
|
|
28132
|
+
platform2.getElementRects({
|
|
28127
28133
|
reference,
|
|
28128
28134
|
floating,
|
|
28129
28135
|
strategy
|
|
@@ -28171,17 +28177,17 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28171
28177
|
return _ref.apply(this, arguments);
|
|
28172
28178
|
};
|
|
28173
28179
|
}();
|
|
28174
|
-
|
|
28180
|
+
arrow2 = function(options) {
|
|
28175
28181
|
return {
|
|
28176
28182
|
name: "arrow",
|
|
28177
28183
|
options,
|
|
28178
28184
|
fn: function(state) {
|
|
28179
28185
|
return _async_to_generator(function() {
|
|
28180
|
-
var x, y, placement, rects,
|
|
28186
|
+
var x, y, placement, rects, platform2, elements, middlewareData, _ref, element, _ref_padding, padding, paddingObject, coords, axis, length, arrowDimensions, isYAxis, minProp, maxProp, clientProp, endDiff, startDiff, arrowOffsetParent, clientSize, _tmp, centerToReference, largestPossiblePadding, minPadding, maxPadding, min$1, max2, center, offset4, shouldAddOffset, alignmentOffset, _obj, _obj1;
|
|
28181
28187
|
return _ts_generator(this, function(_state) {
|
|
28182
28188
|
switch (_state.label) {
|
|
28183
28189
|
case 0:
|
|
28184
|
-
return x = state.x, y = state.y, placement = state.placement, rects = state.rects,
|
|
28190
|
+
return x = state.x, y = state.y, placement = state.placement, rects = state.rects, platform2 = state.platform, elements = state.elements, middlewareData = state.middlewareData, _ref = evaluate(options, state) || {}, element = _ref.element, _ref_padding = _ref.padding, padding = _ref_padding === void 0 ? 0 : _ref_padding, element == null ? [
|
|
28185
28191
|
2,
|
|
28186
28192
|
{}
|
|
28187
28193
|
] : (paddingObject = getPaddingObject(padding), coords = {
|
|
@@ -28189,12 +28195,12 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28189
28195
|
y
|
|
28190
28196
|
}, axis = getAlignmentAxis(placement), length = getAxisLength(axis), [
|
|
28191
28197
|
4,
|
|
28192
|
-
|
|
28198
|
+
platform2.getDimensions(element)
|
|
28193
28199
|
]);
|
|
28194
28200
|
case 1:
|
|
28195
28201
|
return arrowDimensions = _state.sent(), isYAxis = axis === "y", minProp = isYAxis ? "top" : "left", maxProp = isYAxis ? "bottom" : "right", clientProp = isYAxis ? "clientHeight" : "clientWidth", endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length], startDiff = coords[axis] - rects.reference[axis], [
|
|
28196
28202
|
4,
|
|
28197
|
-
|
|
28203
|
+
platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element)
|
|
28198
28204
|
];
|
|
28199
28205
|
case 2:
|
|
28200
28206
|
return arrowOffsetParent = _state.sent(), clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0, _tmp = !clientSize, _tmp ? [
|
|
@@ -28202,14 +28208,14 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28202
28208
|
4
|
|
28203
28209
|
] : [
|
|
28204
28210
|
4,
|
|
28205
|
-
|
|
28211
|
+
platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent)
|
|
28206
28212
|
];
|
|
28207
28213
|
case 3:
|
|
28208
28214
|
_tmp = !_state.sent(), _state.label = 4;
|
|
28209
28215
|
case 4:
|
|
28210
|
-
return _tmp && (clientSize = elements.floating[clientProp] || rects.floating[length]), centerToReference = endDiff / 2 - startDiff / 2, largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1, minPadding = min(paddingObject[minProp], largestPossiblePadding), maxPadding = min(paddingObject[maxProp], largestPossiblePadding), min$1 = minPadding, max2 = clientSize - arrowDimensions[length] - maxPadding, center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference,
|
|
28216
|
+
return _tmp && (clientSize = elements.floating[clientProp] || rects.floating[length]), centerToReference = endDiff / 2 - startDiff / 2, largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1, minPadding = min(paddingObject[minProp], largestPossiblePadding), maxPadding = min(paddingObject[maxProp], largestPossiblePadding), min$1 = minPadding, max2 = clientSize - arrowDimensions[length] - maxPadding, center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference, offset4 = clamp(min$1, center, max2), shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0, alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0, [
|
|
28211
28217
|
2,
|
|
28212
|
-
(_obj1 = {}, _define_property2(_obj1, axis, coords[axis] + alignmentOffset), _define_property2(_obj1, "data", _object_spread2((_obj = {}, _define_property2(_obj, axis,
|
|
28218
|
+
(_obj1 = {}, _define_property2(_obj1, axis, coords[axis] + alignmentOffset), _define_property2(_obj1, "data", _object_spread2((_obj = {}, _define_property2(_obj, axis, offset4), _define_property2(_obj, "centerOffset", center - offset4 - alignmentOffset), _obj), shouldAddOffset && {
|
|
28213
28219
|
alignmentOffset
|
|
28214
28220
|
})), _define_property2(_obj1, "reset", shouldAddOffset), _obj1)
|
|
28215
28221
|
];
|
|
@@ -28219,24 +28225,24 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28219
28225
|
}
|
|
28220
28226
|
};
|
|
28221
28227
|
};
|
|
28222
|
-
|
|
28228
|
+
autoPlacement2 = function(options) {
|
|
28223
28229
|
return options === void 0 && (options = {}), {
|
|
28224
28230
|
name: "autoPlacement",
|
|
28225
28231
|
options,
|
|
28226
28232
|
fn: function(state) {
|
|
28227
28233
|
return _async_to_generator(function() {
|
|
28228
|
-
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE, rects, middlewareData, placement,
|
|
28234
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE, rects, middlewareData, placement, platform2, elements, _evaluate, _evaluate_crossAxis, crossAxis, alignment, _evaluate_allowedPlacements, allowedPlacements, _evaluate_autoAlignment, autoAlignment, detectOverflowOptions, placements$1, overflow, currentIndex, currentPlacement, alignmentSides, _tmp, currentOverflows, allOverflows, nextPlacement, placementsSortedByMostSpace, placementsThatFitOnEachSide, resetPlacement;
|
|
28229
28235
|
return _ts_generator(this, function(_state) {
|
|
28230
28236
|
switch (_state.label) {
|
|
28231
28237
|
case 0:
|
|
28232
|
-
return rects = state.rects, middlewareData = state.middlewareData, placement = state.placement,
|
|
28238
|
+
return rects = state.rects, middlewareData = state.middlewareData, placement = state.placement, platform2 = state.platform, elements = state.elements, _evaluate = evaluate(options, state), _evaluate_crossAxis = _evaluate.crossAxis, crossAxis = _evaluate_crossAxis === void 0 ? !1 : _evaluate_crossAxis, alignment = _evaluate.alignment, _evaluate_allowedPlacements = _evaluate.allowedPlacements, allowedPlacements = _evaluate_allowedPlacements === void 0 ? placements : _evaluate_allowedPlacements, _evaluate_autoAlignment = _evaluate.autoAlignment, autoAlignment = _evaluate_autoAlignment === void 0 ? !0 : _evaluate_autoAlignment, detectOverflowOptions = _object_without_properties(_evaluate, [
|
|
28233
28239
|
"crossAxis",
|
|
28234
28240
|
"alignment",
|
|
28235
28241
|
"allowedPlacements",
|
|
28236
28242
|
"autoAlignment"
|
|
28237
28243
|
]), placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements, [
|
|
28238
28244
|
4,
|
|
28239
|
-
|
|
28245
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
28240
28246
|
];
|
|
28241
28247
|
case 1:
|
|
28242
28248
|
return overflow = _state.sent(), currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0, currentPlacement = placements$1[currentIndex], currentPlacement == null ? [
|
|
@@ -28247,7 +28253,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28247
28253
|
rects
|
|
28248
28254
|
], [
|
|
28249
28255
|
4,
|
|
28250
|
-
|
|
28256
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
28251
28257
|
]);
|
|
28252
28258
|
case 2:
|
|
28253
28259
|
return alignmentSides = getAlignmentSides.apply(void 0, _tmp.concat([
|
|
@@ -28325,17 +28331,17 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28325
28331
|
})();
|
|
28326
28332
|
}
|
|
28327
28333
|
};
|
|
28328
|
-
},
|
|
28334
|
+
}, flip2 = function(options) {
|
|
28329
28335
|
return options === void 0 && (options = {}), {
|
|
28330
28336
|
name: "flip",
|
|
28331
28337
|
options,
|
|
28332
28338
|
fn: function(state) {
|
|
28333
28339
|
return _async_to_generator(function() {
|
|
28334
|
-
var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement,
|
|
28340
|
+
var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform2, elements, _evaluate, tmp, checkMainAxis, tmp1, checkCrossAxis, specifiedFallbackPlacements, _evaluate_fallbackStrategy, fallbackStrategy, _evaluate_fallbackAxisSideDirection, fallbackAxisSideDirection, _evaluate_flipAlignment, flipAlignment, detectOverflowOptions, side, isBasePlacement, rtl, fallbackPlacements, _fallbackPlacements, placements2, overflow, overflows, overflowsData, sides2, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$map$so, placement1;
|
|
28335
28341
|
return _ts_generator(this, function(_state) {
|
|
28336
28342
|
switch (_state.label) {
|
|
28337
28343
|
case 0:
|
|
28338
|
-
return placement = state.placement, middlewareData = state.middlewareData, rects = state.rects, initialPlacement = state.initialPlacement,
|
|
28344
|
+
return placement = state.placement, middlewareData = state.middlewareData, rects = state.rects, initialPlacement = state.initialPlacement, platform2 = state.platform, elements = state.elements, _evaluate = evaluate(options, state), tmp = _evaluate.mainAxis, checkMainAxis = tmp === void 0 ? !0 : tmp, tmp1 = _evaluate.crossAxis, checkCrossAxis = tmp1 === void 0 ? !0 : tmp1, specifiedFallbackPlacements = _evaluate.fallbackPlacements, _evaluate_fallbackStrategy = _evaluate.fallbackStrategy, fallbackStrategy = _evaluate_fallbackStrategy === void 0 ? "bestFit" : _evaluate_fallbackStrategy, _evaluate_fallbackAxisSideDirection = _evaluate.fallbackAxisSideDirection, fallbackAxisSideDirection = _evaluate_fallbackAxisSideDirection === void 0 ? "none" : _evaluate_fallbackAxisSideDirection, _evaluate_flipAlignment = _evaluate.flipAlignment, flipAlignment = _evaluate_flipAlignment === void 0 ? !0 : _evaluate_flipAlignment, detectOverflowOptions = _object_without_properties(_evaluate, [
|
|
28339
28345
|
"mainAxis",
|
|
28340
28346
|
"crossAxis",
|
|
28341
28347
|
"fallbackPlacements",
|
|
@@ -28347,7 +28353,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28347
28353
|
{}
|
|
28348
28354
|
] : (side = getSide(placement), isBasePlacement = getSide(initialPlacement) === initialPlacement, [
|
|
28349
28355
|
4,
|
|
28350
|
-
|
|
28356
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
28351
28357
|
]);
|
|
28352
28358
|
case 1:
|
|
28353
28359
|
return rtl = _state.sent(), fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [
|
|
@@ -28356,7 +28362,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28356
28362
|
initialPlacement
|
|
28357
28363
|
].concat(_to_consumable_array(fallbackPlacements)), [
|
|
28358
28364
|
4,
|
|
28359
|
-
|
|
28365
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
28360
28366
|
];
|
|
28361
28367
|
case 2:
|
|
28362
28368
|
if (overflow = _state.sent(), overflows = [], overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [], checkMainAxis && overflows.push(overflow[side]), checkCrossAxis && (sides2 = getAlignmentSides(placement, rects, rtl), overflows.push(overflow[sides2[0]], overflow[sides2[1]])), overflowsData = _to_consumable_array(overflowsData).concat([
|
|
@@ -28425,7 +28431,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28425
28431
|
}
|
|
28426
28432
|
};
|
|
28427
28433
|
};
|
|
28428
|
-
|
|
28434
|
+
hide2 = function(options) {
|
|
28429
28435
|
return options === void 0 && (options = {}), {
|
|
28430
28436
|
name: "hide",
|
|
28431
28437
|
options,
|
|
@@ -28456,7 +28462,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28456
28462
|
case 1:
|
|
28457
28463
|
return [
|
|
28458
28464
|
4,
|
|
28459
|
-
|
|
28465
|
+
detectOverflow2(state, _object_spread_props2(_object_spread2({}, detectOverflowOptions), {
|
|
28460
28466
|
elementContext: "reference"
|
|
28461
28467
|
}))
|
|
28462
28468
|
];
|
|
@@ -28473,7 +28479,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28473
28479
|
case 3:
|
|
28474
28480
|
return [
|
|
28475
28481
|
4,
|
|
28476
|
-
|
|
28482
|
+
detectOverflow2(state, _object_spread_props2(_object_spread2({}, detectOverflowOptions), {
|
|
28477
28483
|
altBoundary: !0
|
|
28478
28484
|
}))
|
|
28479
28485
|
];
|
|
@@ -28502,13 +28508,13 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28502
28508
|
}
|
|
28503
28509
|
};
|
|
28504
28510
|
};
|
|
28505
|
-
|
|
28511
|
+
inline2 = function(options) {
|
|
28506
28512
|
return options === void 0 && (options = {}), {
|
|
28507
28513
|
name: "inline",
|
|
28508
28514
|
options,
|
|
28509
28515
|
fn: function(state) {
|
|
28510
28516
|
return _async_to_generator(function() {
|
|
28511
|
-
var placement, elements, rects,
|
|
28517
|
+
var placement, elements, rects, platform2, strategy, _evaluate, _evaluate_padding, padding, x, y, nativeClientRects, _, clientRects, fallback, paddingObject, resetRects;
|
|
28512
28518
|
function getBoundingClientRect() {
|
|
28513
28519
|
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null)
|
|
28514
28520
|
return clientRects.find(function(rect) {
|
|
@@ -28551,16 +28557,16 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28551
28557
|
return _ts_generator(this, function(_state) {
|
|
28552
28558
|
switch (_state.label) {
|
|
28553
28559
|
case 0:
|
|
28554
|
-
return placement = state.placement, elements = state.elements, rects = state.rects,
|
|
28560
|
+
return placement = state.placement, elements = state.elements, rects = state.rects, platform2 = state.platform, strategy = state.strategy, _evaluate = evaluate(options, state), _evaluate_padding = _evaluate.padding, padding = _evaluate_padding === void 0 ? 2 : _evaluate_padding, x = _evaluate.x, y = _evaluate.y, _ = Array.from, [
|
|
28555
28561
|
4,
|
|
28556
|
-
|
|
28562
|
+
platform2.getClientRects == null ? void 0 : platform2.getClientRects(elements.reference)
|
|
28557
28563
|
];
|
|
28558
28564
|
case 1:
|
|
28559
28565
|
return nativeClientRects = _.apply(Array, [
|
|
28560
28566
|
_state.sent() || []
|
|
28561
28567
|
]), clientRects = getRectsByLine(nativeClientRects), fallback = rectToClientRect(getBoundingRect(nativeClientRects)), paddingObject = getPaddingObject(padding), [
|
|
28562
28568
|
4,
|
|
28563
|
-
|
|
28569
|
+
platform2.getElementRects({
|
|
28564
28570
|
reference: {
|
|
28565
28571
|
getBoundingClientRect
|
|
28566
28572
|
},
|
|
@@ -28586,7 +28592,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28586
28592
|
}
|
|
28587
28593
|
};
|
|
28588
28594
|
};
|
|
28589
|
-
|
|
28595
|
+
offset2 = function(options) {
|
|
28590
28596
|
return options === void 0 && (options = 0), {
|
|
28591
28597
|
name: "offset",
|
|
28592
28598
|
options,
|
|
@@ -28619,7 +28625,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28619
28625
|
})();
|
|
28620
28626
|
}
|
|
28621
28627
|
};
|
|
28622
|
-
},
|
|
28628
|
+
}, shift2 = function(options) {
|
|
28623
28629
|
return options === void 0 && (options = {}), {
|
|
28624
28630
|
name: "shift",
|
|
28625
28631
|
options,
|
|
@@ -28646,7 +28652,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28646
28652
|
y
|
|
28647
28653
|
}, [
|
|
28648
28654
|
4,
|
|
28649
|
-
|
|
28655
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
28650
28656
|
];
|
|
28651
28657
|
case 1:
|
|
28652
28658
|
return overflow = _state.sent(), crossAxis = getSideAxis(getSide(placement)), mainAxis = getOppositeAxis(crossAxis), mainAxisCoord = coords[mainAxis], crossAxisCoord = coords[crossAxis], checkMainAxis && (minSide = mainAxis === "y" ? "top" : "left", maxSide = mainAxis === "y" ? "bottom" : "right", min2 = mainAxisCoord + overflow[minSide], max2 = mainAxisCoord - overflow[maxSide], mainAxisCoord = clamp(min2, mainAxisCoord, max2)), checkCrossAxis && (minSide1 = crossAxis === "y" ? "top" : "left", maxSide1 = crossAxis === "y" ? "bottom" : "right", min1 = crossAxisCoord + overflow[minSide1], max1 = crossAxisCoord - overflow[maxSide1], crossAxisCoord = clamp(min1, crossAxisCoord, max1)), limitedCoords = limiter.fn(_object_spread_props2(_object_spread2({}, state), (_obj = {}, _define_property2(_obj, mainAxis, mainAxisCoord), _define_property2(_obj, crossAxis, crossAxisCoord), _obj))), [
|
|
@@ -28663,14 +28669,14 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28663
28669
|
})();
|
|
28664
28670
|
}
|
|
28665
28671
|
};
|
|
28666
|
-
},
|
|
28672
|
+
}, limitShift2 = function(options) {
|
|
28667
28673
|
return options === void 0 && (options = {}), {
|
|
28668
28674
|
options,
|
|
28669
28675
|
fn: function(state) {
|
|
28670
|
-
var x = state.x, y = state.y, placement = state.placement, rects = state.rects, middlewareData = state.middlewareData, _evaluate = evaluate(options, state), _evaluate_offset = _evaluate.offset,
|
|
28676
|
+
var x = state.x, y = state.y, placement = state.placement, rects = state.rects, middlewareData = state.middlewareData, _evaluate = evaluate(options, state), _evaluate_offset = _evaluate.offset, offset4 = _evaluate_offset === void 0 ? 0 : _evaluate_offset, tmp = _evaluate.mainAxis, checkMainAxis = tmp === void 0 ? !0 : tmp, tmp1 = _evaluate.crossAxis, checkCrossAxis = tmp1 === void 0 ? !0 : tmp1, coords = {
|
|
28671
28677
|
x,
|
|
28672
28678
|
y
|
|
28673
|
-
}, crossAxis = getSideAxis(placement), mainAxis = getOppositeAxis(crossAxis), mainAxisCoord = coords[mainAxis], crossAxisCoord = coords[crossAxis], rawOffset = evaluate(
|
|
28679
|
+
}, crossAxis = getSideAxis(placement), mainAxis = getOppositeAxis(crossAxis), mainAxisCoord = coords[mainAxis], crossAxisCoord = coords[crossAxis], rawOffset = evaluate(offset4, state), computedOffset = typeof rawOffset == "number" ? {
|
|
28674
28680
|
mainAxis: rawOffset,
|
|
28675
28681
|
crossAxis: 0
|
|
28676
28682
|
} : _object_spread2({
|
|
@@ -28692,27 +28698,27 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28692
28698
|
return _obj = {}, _define_property2(_obj, mainAxis, mainAxisCoord), _define_property2(_obj, crossAxis, crossAxisCoord), _obj;
|
|
28693
28699
|
}
|
|
28694
28700
|
};
|
|
28695
|
-
},
|
|
28701
|
+
}, size2 = function(options) {
|
|
28696
28702
|
return options === void 0 && (options = {}), {
|
|
28697
28703
|
name: "size",
|
|
28698
28704
|
options,
|
|
28699
28705
|
fn: function(state) {
|
|
28700
28706
|
return _async_to_generator(function() {
|
|
28701
|
-
var placement, rects,
|
|
28707
|
+
var placement, rects, platform2, elements, _evaluate, _evaluate_apply, apply, detectOverflowOptions, overflow, side, alignment, isYAxis, _rects_floating, width, height, heightSide, widthSide, maximumClippingHeight, maximumClippingWidth, overflowAvailableHeight, overflowAvailableWidth, noShift, availableHeight, availableWidth, xMin, xMax, yMin, yMax, nextDimensions;
|
|
28702
28708
|
return _ts_generator(this, function(_state) {
|
|
28703
28709
|
switch (_state.label) {
|
|
28704
28710
|
case 0:
|
|
28705
|
-
return placement = state.placement, rects = state.rects,
|
|
28711
|
+
return placement = state.placement, rects = state.rects, platform2 = state.platform, elements = state.elements, _evaluate = evaluate(options, state), _evaluate_apply = _evaluate.apply, apply = _evaluate_apply === void 0 ? function() {
|
|
28706
28712
|
} : _evaluate_apply, detectOverflowOptions = _object_without_properties(_evaluate, [
|
|
28707
28713
|
"apply"
|
|
28708
28714
|
]), [
|
|
28709
28715
|
4,
|
|
28710
|
-
|
|
28716
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
28711
28717
|
];
|
|
28712
28718
|
case 1:
|
|
28713
28719
|
return overflow = _state.sent(), side = getSide(placement), alignment = getAlignment(placement), isYAxis = getSideAxis(placement) === "y", _rects_floating = rects.floating, width = _rects_floating.width, height = _rects_floating.height, side === "top" || side === "bottom" ? (heightSide = side, [
|
|
28714
28720
|
4,
|
|
28715
|
-
|
|
28721
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
28716
28722
|
]) : [
|
|
28717
28723
|
3,
|
|
28718
28724
|
3
|
|
@@ -28735,7 +28741,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
28735
28741
|
case 5:
|
|
28736
28742
|
return _state.sent(), [
|
|
28737
28743
|
4,
|
|
28738
|
-
|
|
28744
|
+
platform2.getDimensions(elements.floating)
|
|
28739
28745
|
];
|
|
28740
28746
|
case 6:
|
|
28741
28747
|
return nextDimensions = _state.sent(), width !== nextDimensions.width || height !== nextDimensions.height ? [
|
|
@@ -28986,7 +28992,7 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
28986
28992
|
middlewareData: {}
|
|
28987
28993
|
}), 2), data = _React__namespace_useState3[0], setData = _React__namespace_useState3[1], _React__namespace_useState4 = _sliced_to_array(React__namespace.useState(ORIGIN), 2), scrollOffsets = _React__namespace_useState4[0], setScrollOffsets = _React__namespace_useState4[1], _React__namespace_useState5 = _sliced_to_array(React__namespace.useState(middleware), 2), latestMiddleware = _React__namespace_useState5[0], setLatestMiddleware = _React__namespace_useState5[1];
|
|
28988
28994
|
deepEqual(latestMiddleware, middleware) || setLatestMiddleware(middleware);
|
|
28989
|
-
var
|
|
28995
|
+
var platform2 = React__namespace.useMemo(function() {
|
|
28990
28996
|
return createPlatform({
|
|
28991
28997
|
offsetParent: offsetParentEl,
|
|
28992
28998
|
scrollOffsets,
|
|
@@ -28999,14 +29005,14 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
28999
29005
|
]), update = React__namespace.useCallback(function() {
|
|
29000
29006
|
!referenceRef.current || !floatingRef.current || core.computePosition(referenceRef.current, floatingRef.current, {
|
|
29001
29007
|
middleware: latestMiddleware,
|
|
29002
|
-
platform,
|
|
29008
|
+
platform: platform2,
|
|
29003
29009
|
placement
|
|
29004
29010
|
}).then(function(data2) {
|
|
29005
29011
|
isMountedRef.current && setData(data2);
|
|
29006
29012
|
});
|
|
29007
29013
|
}, [
|
|
29008
29014
|
latestMiddleware,
|
|
29009
|
-
|
|
29015
|
+
platform2,
|
|
29010
29016
|
placement
|
|
29011
29017
|
]);
|
|
29012
29018
|
React__namespace.useLayoutEffect(function() {
|
|
@@ -29110,63 +29116,63 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
29110
29116
|
}).fn(state) : {};
|
|
29111
29117
|
}
|
|
29112
29118
|
};
|
|
29113
|
-
},
|
|
29119
|
+
}, offset4 = function(options, deps) {
|
|
29114
29120
|
return _object_spread_props8(_object_spread9({}, core.offset(options)), {
|
|
29115
29121
|
options: [
|
|
29116
29122
|
options,
|
|
29117
29123
|
deps
|
|
29118
29124
|
]
|
|
29119
29125
|
});
|
|
29120
|
-
},
|
|
29126
|
+
}, shift4 = function(options, deps) {
|
|
29121
29127
|
return _object_spread_props8(_object_spread9({}, core.shift(options)), {
|
|
29122
29128
|
options: [
|
|
29123
29129
|
options,
|
|
29124
29130
|
deps
|
|
29125
29131
|
]
|
|
29126
29132
|
});
|
|
29127
|
-
},
|
|
29133
|
+
}, limitShift4 = function(options, deps) {
|
|
29128
29134
|
return _object_spread_props8(_object_spread9({}, core.limitShift(options)), {
|
|
29129
29135
|
options: [
|
|
29130
29136
|
options,
|
|
29131
29137
|
deps
|
|
29132
29138
|
]
|
|
29133
29139
|
});
|
|
29134
|
-
},
|
|
29140
|
+
}, flip4 = function(options, deps) {
|
|
29135
29141
|
return _object_spread_props8(_object_spread9({}, core.flip(options)), {
|
|
29136
29142
|
options: [
|
|
29137
29143
|
options,
|
|
29138
29144
|
deps
|
|
29139
29145
|
]
|
|
29140
29146
|
});
|
|
29141
|
-
},
|
|
29147
|
+
}, size4 = function(options, deps) {
|
|
29142
29148
|
return _object_spread_props8(_object_spread9({}, core.size(options)), {
|
|
29143
29149
|
options: [
|
|
29144
29150
|
options,
|
|
29145
29151
|
deps
|
|
29146
29152
|
]
|
|
29147
29153
|
});
|
|
29148
|
-
},
|
|
29154
|
+
}, autoPlacement4 = function(options, deps) {
|
|
29149
29155
|
return _object_spread_props8(_object_spread9({}, core.autoPlacement(options)), {
|
|
29150
29156
|
options: [
|
|
29151
29157
|
options,
|
|
29152
29158
|
deps
|
|
29153
29159
|
]
|
|
29154
29160
|
});
|
|
29155
|
-
},
|
|
29161
|
+
}, hide4 = function(options, deps) {
|
|
29156
29162
|
return _object_spread_props8(_object_spread9({}, core.hide(options)), {
|
|
29157
29163
|
options: [
|
|
29158
29164
|
options,
|
|
29159
29165
|
deps
|
|
29160
29166
|
]
|
|
29161
29167
|
});
|
|
29162
|
-
},
|
|
29168
|
+
}, inline4 = function(options, deps) {
|
|
29163
29169
|
return _object_spread_props8(_object_spread9({}, core.inline(options)), {
|
|
29164
29170
|
options: [
|
|
29165
29171
|
options,
|
|
29166
29172
|
deps
|
|
29167
29173
|
]
|
|
29168
29174
|
});
|
|
29169
|
-
},
|
|
29175
|
+
}, arrow3 = function(options, deps) {
|
|
29170
29176
|
return _object_spread_props8(_object_spread9({}, arrow$1(options)), {
|
|
29171
29177
|
options: [
|
|
29172
29178
|
options,
|
|
@@ -29180,15 +29186,15 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
29180
29186
|
return core.detectOverflow;
|
|
29181
29187
|
}
|
|
29182
29188
|
});
|
|
29183
|
-
exports2.arrow =
|
|
29184
|
-
exports2.autoPlacement =
|
|
29185
|
-
exports2.flip =
|
|
29186
|
-
exports2.hide =
|
|
29187
|
-
exports2.inline =
|
|
29188
|
-
exports2.limitShift =
|
|
29189
|
-
exports2.offset =
|
|
29190
|
-
exports2.shift =
|
|
29191
|
-
exports2.size =
|
|
29189
|
+
exports2.arrow = arrow3;
|
|
29190
|
+
exports2.autoPlacement = autoPlacement4;
|
|
29191
|
+
exports2.flip = flip4;
|
|
29192
|
+
exports2.hide = hide4;
|
|
29193
|
+
exports2.inline = inline4;
|
|
29194
|
+
exports2.limitShift = limitShift4;
|
|
29195
|
+
exports2.offset = offset4;
|
|
29196
|
+
exports2.shift = shift4;
|
|
29197
|
+
exports2.size = size4;
|
|
29192
29198
|
exports2.useFloating = useFloating2;
|
|
29193
29199
|
}
|
|
29194
29200
|
});
|
|
@@ -29238,13 +29244,16 @@ var require_Floating_native = __commonJS({
|
|
|
29238
29244
|
}, Floating_native_exports = {};
|
|
29239
29245
|
__export2(Floating_native_exports, {
|
|
29240
29246
|
autoUpdate: function() {
|
|
29241
|
-
return
|
|
29247
|
+
return autoUpdate2;
|
|
29248
|
+
},
|
|
29249
|
+
platform: function() {
|
|
29250
|
+
return platform2;
|
|
29242
29251
|
}
|
|
29243
29252
|
});
|
|
29244
29253
|
module2.exports = __toCommonJS2(Floating_native_exports);
|
|
29245
29254
|
__reExport2(Floating_native_exports, require_floating_ui_react_native(), module2.exports);
|
|
29246
|
-
var
|
|
29247
|
-
};
|
|
29255
|
+
var autoUpdate2 = function() {
|
|
29256
|
+
}, platform2 = null;
|
|
29248
29257
|
}
|
|
29249
29258
|
});
|
|
29250
29259
|
|
|
@@ -29353,8 +29362,6 @@ var require_index_native56 = __commonJS({
|
|
|
29353
29362
|
}
|
|
29354
29363
|
}
|
|
29355
29364
|
return to;
|
|
29356
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
29357
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
29358
29365
|
}, __toCommonJS2 = function(mod) {
|
|
29359
29366
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
29360
29367
|
value: !0
|
|
@@ -29364,13 +29371,48 @@ var require_index_native56 = __commonJS({
|
|
|
29364
29371
|
FloatingOverrideContext: function() {
|
|
29365
29372
|
return import_useFloating.FloatingOverrideContext;
|
|
29366
29373
|
},
|
|
29374
|
+
arrow: function() {
|
|
29375
|
+
return import_Floating.arrow;
|
|
29376
|
+
},
|
|
29377
|
+
autoPlacement: function() {
|
|
29378
|
+
return import_Floating.autoPlacement;
|
|
29379
|
+
},
|
|
29380
|
+
autoUpdate: function() {
|
|
29381
|
+
return import_Floating.autoUpdate;
|
|
29382
|
+
},
|
|
29383
|
+
detectOverflow: function() {
|
|
29384
|
+
return import_Floating.detectOverflow;
|
|
29385
|
+
},
|
|
29386
|
+
flip: function() {
|
|
29387
|
+
return import_Floating.flip;
|
|
29388
|
+
},
|
|
29389
|
+
hide: function() {
|
|
29390
|
+
return import_Floating.hide;
|
|
29391
|
+
},
|
|
29392
|
+
inline: function() {
|
|
29393
|
+
return import_Floating.inline;
|
|
29394
|
+
},
|
|
29395
|
+
limitShift: function() {
|
|
29396
|
+
return import_Floating.limitShift;
|
|
29397
|
+
},
|
|
29398
|
+
offset: function() {
|
|
29399
|
+
return import_Floating.offset;
|
|
29400
|
+
},
|
|
29401
|
+
platform: function() {
|
|
29402
|
+
return import_Floating.platform;
|
|
29403
|
+
},
|
|
29404
|
+
shift: function() {
|
|
29405
|
+
return import_Floating.shift;
|
|
29406
|
+
},
|
|
29407
|
+
size: function() {
|
|
29408
|
+
return import_Floating.size;
|
|
29409
|
+
},
|
|
29367
29410
|
useFloating: function() {
|
|
29368
29411
|
return import_useFloating.useFloating;
|
|
29369
29412
|
}
|
|
29370
29413
|
});
|
|
29371
29414
|
module2.exports = __toCommonJS2(src_exports2);
|
|
29372
|
-
|
|
29373
|
-
var import_useFloating = require_useFloating_native();
|
|
29415
|
+
var import_Floating = require_Floating_native(), import_useFloating = require_useFloating_native();
|
|
29374
29416
|
}
|
|
29375
29417
|
});
|
|
29376
29418
|
|
|
@@ -29561,7 +29603,7 @@ var require_Popper_native = __commonJS({
|
|
|
29561
29603
|
Object.assign(setupOptions, options);
|
|
29562
29604
|
}
|
|
29563
29605
|
function Popper(props) {
|
|
29564
|
-
var _middlewareData_checkFloating, children = props.children,
|
|
29606
|
+
var _middlewareData_checkFloating, children = props.children, size4 = props.size, _props_strategy = props.strategy, strategy = _props_strategy === void 0 ? "absolute" : _props_strategy, _props_placement = props.placement, placement = _props_placement === void 0 ? "bottom" : _props_placement, stayInFrame = props.stayInFrame, allowFlip = props.allowFlip, offset4 = props.offset, disableRTL = props.disableRTL, __scopePopper = props.__scopePopper, isMounted = (0, import_core12.useDidFinishSSR)(), _React_useState = _sliced_to_array(React2.useState(null), 2), arrowEl = _React_useState[0], setArrow = _React_useState[1], _React_useState1 = _sliced_to_array(React2.useState(0), 2), arrowSize = _React_useState1[0], setArrowSize = _React_useState1[1], offsetOptions = offset4 ?? arrowSize, floating = (0, import_floating.useFloating)({
|
|
29565
29607
|
strategy,
|
|
29566
29608
|
placement,
|
|
29567
29609
|
sameScrollView: !1,
|
|
@@ -29601,7 +29643,7 @@ var require_Popper_native = __commonJS({
|
|
|
29601
29643
|
keyboardOpen
|
|
29602
29644
|
]);
|
|
29603
29645
|
var popperContext = _object_spread9({
|
|
29604
|
-
size:
|
|
29646
|
+
size: size4,
|
|
29605
29647
|
arrowRef: setArrow,
|
|
29606
29648
|
arrowStyle: middlewareData.arrow,
|
|
29607
29649
|
onArrowSize: setArrowSize,
|
|
@@ -29655,7 +29697,7 @@ var require_Popper_native = __commonJS({
|
|
|
29655
29697
|
var __scopePopper = props.__scopePopper, enableAnimationForPositionChange = props.enableAnimationForPositionChange, rest = _object_without_properties5(props, [
|
|
29656
29698
|
"__scopePopper",
|
|
29657
29699
|
"enableAnimationForPositionChange"
|
|
29658
|
-
]), _usePopperContext = usePopperContext(__scopePopper), strategy = _usePopperContext.strategy, placement = _usePopperContext.placement, refs = _usePopperContext.refs, x = _usePopperContext.x, y = _usePopperContext.y, getFloatingProps = _usePopperContext.getFloatingProps,
|
|
29700
|
+
]), _usePopperContext = usePopperContext(__scopePopper), strategy = _usePopperContext.strategy, placement = _usePopperContext.placement, refs = _usePopperContext.refs, x = _usePopperContext.x, y = _usePopperContext.y, getFloatingProps = _usePopperContext.getFloatingProps, size4 = _usePopperContext.size, isMounted = _usePopperContext.isMounted, update = _usePopperContext.update, floatingStyles = _usePopperContext.floatingStyles, hasFloating = _usePopperContext.hasFloating, contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), finalHasFloatingValue = !1;
|
|
29659
29701
|
if (import_constants4.isAndroid) {
|
|
29660
29702
|
var initialRender = React2.useRef(!0), finalHasFloating = React2.useRef(!1);
|
|
29661
29703
|
hasFloating === !1 && (initialRender.current = !1), initialRender.current || (finalHasFloating.current = hasFloating), finalHasFloatingValue = finalHasFloating.current;
|
|
@@ -29665,7 +29707,7 @@ var require_Popper_native = __commonJS({
|
|
|
29665
29707
|
"data-placement": placement,
|
|
29666
29708
|
"data-strategy": strategy,
|
|
29667
29709
|
contain: "layout",
|
|
29668
|
-
size:
|
|
29710
|
+
size: size4
|
|
29669
29711
|
}, rest), "popper-content-frame");
|
|
29670
29712
|
}, [
|
|
29671
29713
|
placement,
|
|
@@ -29752,7 +29794,7 @@ var require_Popper_native = __commonJS({
|
|
|
29752
29794
|
}, PopperArrow = PopperArrowFrame.styleable(function(propsIn, forwardedRef) {
|
|
29753
29795
|
var _context_arrowStyle, _context_arrowStyle1, __scopePopper = propsIn.__scopePopper, rest = _object_without_properties5(propsIn, [
|
|
29754
29796
|
"__scopePopper"
|
|
29755
|
-
]), props = (0, import_core12.useProps)(rest),
|
|
29797
|
+
]), props = (0, import_core12.useProps)(rest), offset4 = props.offset, sizeProp = props.size, _props_borderWidth = props.borderWidth, borderWidth = _props_borderWidth === void 0 ? 0 : _props_borderWidth, arrowProps = _object_without_properties5(props, [
|
|
29756
29798
|
"offset",
|
|
29757
29799
|
"size",
|
|
29758
29800
|
"borderWidth"
|
|
@@ -29761,20 +29803,20 @@ var require_Popper_native = __commonJS({
|
|
|
29761
29803
|
bounds: [
|
|
29762
29804
|
2
|
|
29763
29805
|
]
|
|
29764
|
-
})),
|
|
29806
|
+
})), size4 = Math.max(0, +sizeVal), placement = context.placement, refs = (0, import_compose_refs.useComposedRefs)(context.arrowRef, forwardedRef), x = ((_context_arrowStyle = context.arrowStyle) === null || _context_arrowStyle === void 0 ? void 0 : _context_arrowStyle.x) || 0, y = ((_context_arrowStyle1 = context.arrowStyle) === null || _context_arrowStyle1 === void 0 ? void 0 : _context_arrowStyle1.y) || 0, primaryPlacement = placement ? placement.split("-")[0] : "top", arrowStyle = {
|
|
29765
29807
|
x,
|
|
29766
29808
|
y,
|
|
29767
|
-
width:
|
|
29768
|
-
height:
|
|
29809
|
+
width: size4,
|
|
29810
|
+
height: size4
|
|
29769
29811
|
}, innerArrowStyle = {}, isVertical = primaryPlacement === "bottom" || primaryPlacement === "top";
|
|
29770
29812
|
if (primaryPlacement) {
|
|
29771
|
-
arrowStyle[isVertical ? "width" : "height"] =
|
|
29813
|
+
arrowStyle[isVertical ? "width" : "height"] = size4 * 2;
|
|
29772
29814
|
var oppSide = opposites[primaryPlacement];
|
|
29773
|
-
oppSide && (arrowStyle[oppSide] = -
|
|
29815
|
+
oppSide && (arrowStyle[oppSide] = -size4, innerArrowStyle[oppSide] = size4 / 2), (oppSide === "top" || oppSide === "bottom") && (arrowStyle.left = 0), (oppSide === "left" || oppSide === "right") && (arrowStyle.top = 0), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
29774
29816
|
var _context_onArrowSize;
|
|
29775
|
-
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context,
|
|
29817
|
+
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context, size4);
|
|
29776
29818
|
}, [
|
|
29777
|
-
|
|
29819
|
+
size4,
|
|
29778
29820
|
context.onArrowSize
|
|
29779
29821
|
]);
|
|
29780
29822
|
}
|
|
@@ -29782,8 +29824,8 @@ var require_Popper_native = __commonJS({
|
|
|
29782
29824
|
ref: refs
|
|
29783
29825
|
}, arrowStyle), {
|
|
29784
29826
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperArrowFrame, _object_spread9(_object_spread_props8(_object_spread9({
|
|
29785
|
-
width:
|
|
29786
|
-
height:
|
|
29827
|
+
width: size4,
|
|
29828
|
+
height: size4
|
|
29787
29829
|
}, arrowProps, innerArrowStyle), {
|
|
29788
29830
|
rotate: "45deg"
|
|
29789
29831
|
}), primaryPlacement === "bottom" && {
|
|
@@ -30693,10 +30735,10 @@ var require_Progress_native = __commonJS({
|
|
|
30693
30735
|
},
|
|
30694
30736
|
size: {
|
|
30695
30737
|
"...size": function(val) {
|
|
30696
|
-
var
|
|
30738
|
+
var size4 = Math.round((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) * 0.25);
|
|
30697
30739
|
return {
|
|
30698
|
-
height:
|
|
30699
|
-
minWidth: (0, import_core12.getVariableValue)(
|
|
30740
|
+
height: size4,
|
|
30741
|
+
minWidth: (0, import_core12.getVariableValue)(size4) * 20,
|
|
30700
30742
|
width: "100%"
|
|
30701
30743
|
};
|
|
30702
30744
|
}
|
|
@@ -30706,7 +30748,7 @@ var require_Progress_native = __commonJS({
|
|
|
30706
30748
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
30707
30749
|
}
|
|
30708
30750
|
}), Progress = (0, import_helpers.withStaticProperties)(ProgressFrame.styleable(function(props, forwardedRef) {
|
|
30709
|
-
var __scopeProgress = props.__scopeProgress, valueProp = props.value, maxProp = props.max, _props_getValueLabel = props.getValueLabel, getValueLabel = _props_getValueLabel === void 0 ? defaultGetValueLabel : _props_getValueLabel, _props_size = props.size,
|
|
30751
|
+
var __scopeProgress = props.__scopeProgress, valueProp = props.value, maxProp = props.max, _props_getValueLabel = props.getValueLabel, getValueLabel = _props_getValueLabel === void 0 ? defaultGetValueLabel : _props_getValueLabel, _props_size = props.size, size4 = _props_size === void 0 ? "$true" : _props_size, progressProps = _object_without_properties5(props, [
|
|
30710
30752
|
"__scopeProgress",
|
|
30711
30753
|
"value",
|
|
30712
30754
|
"max",
|
|
@@ -30729,7 +30771,7 @@ var require_Progress_native = __commonJS({
|
|
|
30729
30771
|
"data-value": value ?? void 0,
|
|
30730
30772
|
"data-max": max2
|
|
30731
30773
|
}, progressProps.unstyled !== !0 && {
|
|
30732
|
-
size:
|
|
30774
|
+
size: size4
|
|
30733
30775
|
}, progressProps), {
|
|
30734
30776
|
onLayout: function(e) {
|
|
30735
30777
|
var _progressProps_onLayout;
|
|
@@ -30893,10 +30935,10 @@ var require_RadioGroup_native = __commonJS({
|
|
|
30893
30935
|
},
|
|
30894
30936
|
size: {
|
|
30895
30937
|
"...size": function(value, param) {
|
|
30896
|
-
var props = param.props, _props_scaleSize,
|
|
30938
|
+
var props = param.props, _props_scaleSize, size4 = 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));
|
|
30897
30939
|
return {
|
|
30898
|
-
width:
|
|
30899
|
-
height:
|
|
30940
|
+
width: size4,
|
|
30941
|
+
height: size4
|
|
30900
30942
|
};
|
|
30901
30943
|
}
|
|
30902
30944
|
}
|
|
@@ -32721,7 +32763,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
32721
32763
|
"index"
|
|
32722
32764
|
]), _useListItem = (0, import_list_item.useListItem)(_object_spread9({}, !props.unstyled && {
|
|
32723
32765
|
ellipse: !0
|
|
32724
|
-
}, restProps)), listItemProps = _useListItem.props, context = (0, import_context.useSelectItemParentContext)(ITEM_NAME, __scopeSelect), setSelectedIndex = context.setSelectedIndex, listRef = context.listRef, setOpen = context.setOpen, onChange = context.onChange, activeIndexSubscribe = context.activeIndexSubscribe, valueSubscribe = context.valueSubscribe, allowMouseUpRef = context.allowMouseUpRef, allowSelectRef = context.allowSelectRef, setValueAtIndex = context.setValueAtIndex, selectTimeoutRef = context.selectTimeoutRef, dataRef = context.dataRef, interactions = context.interactions, shouldRenderWebNative = context.shouldRenderWebNative,
|
|
32766
|
+
}, restProps)), listItemProps = _useListItem.props, context = (0, import_context.useSelectItemParentContext)(ITEM_NAME, __scopeSelect), setSelectedIndex = context.setSelectedIndex, listRef = context.listRef, setOpen = context.setOpen, onChange = context.onChange, activeIndexSubscribe = context.activeIndexSubscribe, valueSubscribe = context.valueSubscribe, allowMouseUpRef = context.allowMouseUpRef, allowSelectRef = context.allowSelectRef, setValueAtIndex = context.setValueAtIndex, selectTimeoutRef = context.selectTimeoutRef, dataRef = context.dataRef, interactions = context.interactions, shouldRenderWebNative = context.shouldRenderWebNative, size4 = context.size, onActiveChange = context.onActiveChange, initialValue = context.initialValue, _React_useState = _sliced_to_array(React2.useState(initialValue === value), 2), isSelected = _React_useState[0], setSelected = _React_useState[1];
|
|
32725
32767
|
React2.useEffect(function() {
|
|
32726
32768
|
return activeIndexSubscribe(function(i) {
|
|
32727
32769
|
var isActive = index === i;
|
|
@@ -32801,7 +32843,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
32801
32843
|
hoverTheme: !0,
|
|
32802
32844
|
focusTheme: !0,
|
|
32803
32845
|
cursor: "default",
|
|
32804
|
-
size:
|
|
32846
|
+
size: size4,
|
|
32805
32847
|
outlineOffset: -0.5,
|
|
32806
32848
|
focusVisibleStyle: {
|
|
32807
32849
|
outlineColor: "$outlineColor",
|
|
@@ -33583,10 +33625,10 @@ var require_Select_native = __commonJS({
|
|
|
33583
33625
|
}), SelectGroup = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
33584
33626
|
var __scopeSelect = props.__scopeSelect, groupProps = _object_without_properties5(props, [
|
|
33585
33627
|
"__scopeSelect"
|
|
33586
|
-
]), groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), _itemParentContext_size,
|
|
33628
|
+
]), groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), _itemParentContext_size, size4 = (_itemParentContext_size = itemParentContext.size) !== null && _itemParentContext_size !== void 0 ? _itemParentContext_size : "$true", nativeSelectRef = React2.useRef(null), content = function() {
|
|
33587
33629
|
return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
|
|
33588
33630
|
asChild: !0,
|
|
33589
|
-
size:
|
|
33631
|
+
size: size4,
|
|
33590
33632
|
// @ts-expect-error until we support typing based on tag
|
|
33591
33633
|
value: context.value,
|
|
33592
33634
|
id: itemParentContext.id,
|
|
@@ -33595,7 +33637,7 @@ var require_Select_native = __commonJS({
|
|
|
33595
33637
|
onChange: function(event) {
|
|
33596
33638
|
itemParentContext.onChange(event.currentTarget.value);
|
|
33597
33639
|
},
|
|
33598
|
-
size:
|
|
33640
|
+
size: size4,
|
|
33599
33641
|
ref: nativeSelectRef,
|
|
33600
33642
|
style: {
|
|
33601
33643
|
color: "var(--color)",
|
|
@@ -34110,14 +34152,14 @@ var require_helpers_native2 = __commonJS({
|
|
|
34110
34152
|
return distances.indexOf(closestDistance);
|
|
34111
34153
|
}
|
|
34112
34154
|
function getThumbInBoundsOffset(width, left, direction) {
|
|
34113
|
-
var quarterWidth = width / 4, halfPercent = 50,
|
|
34155
|
+
var quarterWidth = width / 4, halfPercent = 50, offset4 = linearScale([
|
|
34114
34156
|
0,
|
|
34115
34157
|
halfPercent
|
|
34116
34158
|
], [
|
|
34117
34159
|
0,
|
|
34118
34160
|
quarterWidth
|
|
34119
34161
|
]);
|
|
34120
|
-
return (quarterWidth -
|
|
34162
|
+
return (quarterWidth - offset4(left) * direction) * direction;
|
|
34121
34163
|
}
|
|
34122
34164
|
function getStepsBetweenValues(values) {
|
|
34123
34165
|
return values.slice(0, -1).map(function(value, index) {
|
|
@@ -34275,14 +34317,14 @@ var require_SliderImpl_native = __commonJS({
|
|
|
34275
34317
|
},
|
|
34276
34318
|
size: function(val, extras) {
|
|
34277
34319
|
if (val) {
|
|
34278
|
-
var orientation = extras.props.orientation,
|
|
34320
|
+
var orientation = extras.props.orientation, size5 = Math.round((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) / 6);
|
|
34279
34321
|
return orientation === "horizontal" ? {
|
|
34280
|
-
height:
|
|
34281
|
-
borderRadius:
|
|
34322
|
+
height: size5,
|
|
34323
|
+
borderRadius: size5,
|
|
34282
34324
|
justifyContent: "center"
|
|
34283
34325
|
} : {
|
|
34284
|
-
width:
|
|
34285
|
-
borderRadius:
|
|
34326
|
+
width: size5,
|
|
34327
|
+
borderRadius: size5,
|
|
34286
34328
|
alignItems: "center"
|
|
34287
34329
|
};
|
|
34288
34330
|
}
|
|
@@ -34771,14 +34813,14 @@ var require_Slider_native = __commonJS({
|
|
|
34771
34813
|
});
|
|
34772
34814
|
SliderTrackActive.displayName = RANGE_NAME;
|
|
34773
34815
|
var THUMB_NAME = "SliderThumb", getThumbSize = function(val) {
|
|
34774
|
-
var tokens = (0, import_core12.getTokens)(),
|
|
34816
|
+
var tokens = (0, import_core12.getTokens)(), size4 = typeof val == "number" ? val : (0, import_get_token2.getSize)(tokens.size[val], {
|
|
34775
34817
|
shift: -1
|
|
34776
34818
|
});
|
|
34777
34819
|
return {
|
|
34778
|
-
width:
|
|
34779
|
-
height:
|
|
34780
|
-
minWidth:
|
|
34781
|
-
minHeight:
|
|
34820
|
+
width: size4,
|
|
34821
|
+
height: size4,
|
|
34822
|
+
minWidth: size4,
|
|
34823
|
+
minHeight: size4
|
|
34782
34824
|
};
|
|
34783
34825
|
}, SliderThumbFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
34784
34826
|
name: "SliderThumb",
|
|
@@ -34809,7 +34851,7 @@ var require_Slider_native = __commonJS({
|
|
|
34809
34851
|
]), context = (0, import_constants22.useSliderContext)(THUMB_NAME, __scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(THUMB_NAME, __scopeSlider), _React_useState = _sliced_to_array(React2.useState(null), 2), thumb = _React_useState[0], setThumb = _React_useState[1], 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", _React_useState1 = _sliced_to_array(React2.useState(function() {
|
|
34810
34852
|
var estimatedSize = (0, import_core12.getVariableValue)(getThumbSize(sizeIn).width);
|
|
34811
34853
|
return estimatedSize;
|
|
34812
|
-
}), 2),
|
|
34854
|
+
}), 2), size4 = _React_useState1[0], setSize = _React_useState1[1], thumbInBoundsOffset = size4 ? (0, import_helpers3.getThumbInBoundsOffset)(size4, percent, orientation.direction) : 0;
|
|
34813
34855
|
React2.useEffect(function() {
|
|
34814
34856
|
if (thumb) return context.thumbs.set(thumb, index), function() {
|
|
34815
34857
|
context.thumbs.delete(thumb);
|
|
@@ -34820,17 +34862,17 @@ var require_Slider_native = __commonJS({
|
|
|
34820
34862
|
index
|
|
34821
34863
|
]);
|
|
34822
34864
|
var positionalStyles = context.orientation === "horizontal" ? _object_spread9({
|
|
34823
|
-
x: thumbInBoundsOffset -
|
|
34824
|
-
y: -
|
|
34865
|
+
x: thumbInBoundsOffset - size4 / 2,
|
|
34866
|
+
y: -size4 / 2,
|
|
34825
34867
|
top: "50%"
|
|
34826
|
-
},
|
|
34868
|
+
}, size4 === 0 && {
|
|
34827
34869
|
top: "auto",
|
|
34828
34870
|
bottom: "auto"
|
|
34829
34871
|
}) : _object_spread9({
|
|
34830
|
-
x: -
|
|
34831
|
-
y:
|
|
34872
|
+
x: -size4 / 2,
|
|
34873
|
+
y: size4 / 2,
|
|
34832
34874
|
left: "50%"
|
|
34833
|
-
},
|
|
34875
|
+
}, size4 === 0 && {
|
|
34834
34876
|
left: "auto",
|
|
34835
34877
|
right: "auto"
|
|
34836
34878
|
}), _obj;
|
|
@@ -35434,10 +35476,10 @@ var require_Switch_native = __commonJS({
|
|
|
35434
35476
|
},
|
|
35435
35477
|
size: {
|
|
35436
35478
|
"...size": function(val) {
|
|
35437
|
-
var
|
|
35479
|
+
var size4 = getSwitchHeight(val);
|
|
35438
35480
|
return {
|
|
35439
|
-
height:
|
|
35440
|
-
width:
|
|
35481
|
+
height: size4,
|
|
35482
|
+
width: size4
|
|
35441
35483
|
};
|
|
35442
35484
|
}
|
|
35443
35485
|
}
|
|
@@ -35652,12 +35694,12 @@ var require_createSwitch_native = __commonJS({
|
|
|
35652
35694
|
"size",
|
|
35653
35695
|
"unstyled",
|
|
35654
35696
|
"nativeID"
|
|
35655
|
-
]), context = React2.useContext(SwitchContext), checked = context.checked, disabled = context.disabled, frameWidth = context.frameWidth, styledContext = import_StyledContext.SwitchStyledContext.useStyledContext(), unstyledContext = styledContext.unstyled, sizeContext = styledContext.size, _ref, unstyled = process.env.TAMAGUI_HEADLESS === "1" ? !0 : (_ref = unstyledProp ?? unstyledContext) !== null && _ref !== void 0 ? _ref : !1, _ref1,
|
|
35697
|
+
]), context = React2.useContext(SwitchContext), checked = context.checked, disabled = context.disabled, frameWidth = context.frameWidth, styledContext = import_StyledContext.SwitchStyledContext.useStyledContext(), unstyledContext = styledContext.unstyled, sizeContext = styledContext.size, _ref, unstyled = process.env.TAMAGUI_HEADLESS === "1" ? !0 : (_ref = unstyledProp ?? unstyledContext) !== null && _ref !== void 0 ? _ref : !1, _ref1, size4 = (_ref1 = sizeProp ?? sizeContext) !== null && _ref1 !== void 0 ? _ref1 : "$true", initialChecked = React2.useRef(checked).current, _React_useState = _sliced_to_array(React2.useState(0), 2), thumbWidth = _React_useState[0], setThumbWidth = _React_useState[1], distance = frameWidth - thumbWidth, x = initialChecked ? checked ? 0 : -distance : checked ? distance : 0;
|
|
35656
35698
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Thumb, _object_spread9(_object_spread_props8(_object_spread9({
|
|
35657
35699
|
ref: forwardedRef,
|
|
35658
35700
|
unstyled
|
|
35659
35701
|
}, unstyled === !1 && _object_spread9({
|
|
35660
|
-
size:
|
|
35702
|
+
size: size4
|
|
35661
35703
|
}, !disableActiveTheme && {
|
|
35662
35704
|
theme: checked ? "active" : null
|
|
35663
35705
|
})), {
|
|
@@ -36159,7 +36201,7 @@ var require_Tabs_native = __commonJS({
|
|
|
36159
36201
|
}), TABS_NAME = "Tabs", _createStyledContext = (0, import_web.createStyledContext)(), TabsProvider = _createStyledContext.Provider, useTabsContext = _createStyledContext.useStyledContext, TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
|
|
36160
36202
|
name: TABS_NAME
|
|
36161
36203
|
}), TabsComponent = TabsFrame.styleable(function(props, forwardedRef) {
|
|
36162
|
-
var __scopeTabs = props.__scopeTabs, valueProp = props.value, onValueChange = props.onValueChange, defaultValue = props.defaultValue, _props_orientation = props.orientation, orientation = _props_orientation === void 0 ? "horizontal" : _props_orientation, dir = props.dir, _props_activationMode = props.activationMode, activationMode = _props_activationMode === void 0 ? "automatic" : _props_activationMode, _props_size = props.size,
|
|
36204
|
+
var __scopeTabs = props.__scopeTabs, valueProp = props.value, onValueChange = props.onValueChange, defaultValue = props.defaultValue, _props_orientation = props.orientation, orientation = _props_orientation === void 0 ? "horizontal" : _props_orientation, dir = props.dir, _props_activationMode = props.activationMode, activationMode = _props_activationMode === void 0 ? "automatic" : _props_activationMode, _props_size = props.size, size4 = _props_size === void 0 ? "$true" : _props_size, tabsProps = _object_without_properties5(props, [
|
|
36163
36205
|
"__scopeTabs",
|
|
36164
36206
|
"value",
|
|
36165
36207
|
"onValueChange",
|
|
@@ -36189,7 +36231,7 @@ var require_Tabs_native = __commonJS({
|
|
|
36189
36231
|
orientation,
|
|
36190
36232
|
dir: direction,
|
|
36191
36233
|
activationMode,
|
|
36192
|
-
size:
|
|
36234
|
+
size: size4,
|
|
36193
36235
|
registerTrigger,
|
|
36194
36236
|
triggersCount,
|
|
36195
36237
|
unregisterTrigger,
|
|
@@ -37155,11 +37197,11 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
37155
37197
|
"disablePassStyles"
|
|
37156
37198
|
]), valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext == null ? void 0 : valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = (0, import_group.useGroupItem)({
|
|
37157
37199
|
disabled
|
|
37158
|
-
}), _props_size,
|
|
37200
|
+
}), _props_size, size4 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
|
|
37159
37201
|
width: void 0,
|
|
37160
37202
|
height: void 0,
|
|
37161
|
-
padding: (0, import_web.getVariableValue)(
|
|
37162
|
-
}, iconSize = (typeof
|
|
37203
|
+
padding: (0, import_web.getVariableValue)(size4) * 0.6
|
|
37204
|
+
}, iconSize = (typeof size4 == "number" ? size4 * 0.7 : (0, import_font_size.getFontSize)(size4)) * 1.2, theme = (0, import_web.useTheme)(), getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
37163
37205
|
size: iconSize,
|
|
37164
37206
|
color: theme.color
|
|
37165
37207
|
}), childrens = import_react4.default.Children.toArray(props.children), children = childrens.map(function(child) {
|
|
@@ -37340,12 +37382,12 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
37340
37382
|
dir: direction
|
|
37341
37383
|
}, toggleGroupProps), adjustedSize = (0, import_web.getVariableValue)((0, import_get_token2.getSize)(sizeProp, {
|
|
37342
37384
|
shift: sizeAdjust
|
|
37343
|
-
})),
|
|
37385
|
+
})), size4 = Math.round(adjustedSize * 0.45);
|
|
37344
37386
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupContext, {
|
|
37345
37387
|
scope: __scopeToggleGroup,
|
|
37346
37388
|
rovingFocus,
|
|
37347
37389
|
disabled,
|
|
37348
|
-
size:
|
|
37390
|
+
size: size4,
|
|
37349
37391
|
children: rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
37350
37392
|
asChild: "except-style",
|
|
37351
37393
|
__scopeRovingFocusGroup: __scopeToggleGroup || TOGGLE_GROUP_CONTEXT,
|
|
@@ -38295,7 +38337,7 @@ function _object_without_properties_loose4(source, excluded) {
|
|
|
38295
38337
|
return target;
|
|
38296
38338
|
}
|
|
38297
38339
|
var Spinner = import_stacks2.YStack.extractable((0, import_core8.themeable)(/* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
38298
|
-
var
|
|
38340
|
+
var size4 = props.size, colorProp = props.color, stackProps = _object_without_properties4(props, [
|
|
38299
38341
|
"size",
|
|
38300
38342
|
"color"
|
|
38301
38343
|
]), theme = (0, import_core8.useTheme)(), color = colorProp;
|
|
@@ -38303,7 +38345,7 @@ var Spinner = import_stacks2.YStack.extractable((0, import_core8.themeable)(/* @
|
|
|
38303
38345
|
ref
|
|
38304
38346
|
}, stackProps), {
|
|
38305
38347
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native3.ActivityIndicator, {
|
|
38306
|
-
size:
|
|
38348
|
+
size: size4,
|
|
38307
38349
|
color
|
|
38308
38350
|
})
|
|
38309
38351
|
}));
|