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/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;
|
|
@@ -4237,9 +4237,9 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4237
4237
|
// if its a variable (web), its ignored!
|
|
4238
4238
|
get: function(_2, subkey) {
|
|
4239
4239
|
if (subkey === "val") track(keyString);
|
|
4240
|
-
else if (subkey === "get") return function(
|
|
4240
|
+
else if (subkey === "get") return function(platform2) {
|
|
4241
4241
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
4242
|
-
if (
|
|
4242
|
+
if (platform2 !== "web" && import_constants4.isIos && !deopt && config.settings.fastSchemeChange && !someParentIsInversed(themeManager) && scheme) {
|
|
4243
4243
|
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]);
|
|
4244
4244
|
if (oppositeVal) {
|
|
4245
4245
|
var dynamicVal = {
|
|
@@ -8053,11 +8053,11 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8053
8053
|
if (!val) continue;
|
|
8054
8054
|
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
8055
8055
|
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") {
|
|
8056
|
-
var
|
|
8056
|
+
var platform2 = key.slice(10);
|
|
8057
8057
|
if (
|
|
8058
8058
|
// supports web, ios, android
|
|
8059
|
-
|
|
8060
|
-
|
|
8059
|
+
platform2 !== import_constants4.currentPlatform && // supports web, native
|
|
8060
|
+
platform2 !== "native"
|
|
8061
8061
|
) continue;
|
|
8062
8062
|
}
|
|
8063
8063
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
@@ -9769,7 +9769,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9769
9769
|
enabled: shouldListenForMedia,
|
|
9770
9770
|
keys: mediaListeningKeys
|
|
9771
9771
|
});
|
|
9772
|
-
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,
|
|
9772
|
+
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, [
|
|
9773
9773
|
"asChild",
|
|
9774
9774
|
"children",
|
|
9775
9775
|
"themeShallow",
|
|
@@ -9789,8 +9789,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9789
9789
|
"separator",
|
|
9790
9790
|
"forceStyle",
|
|
9791
9791
|
"onClick",
|
|
9792
|
-
"theme"
|
|
9793
|
-
"defaultVariants"
|
|
9792
|
+
"theme"
|
|
9794
9793
|
]), viewProps = nonTamaguiProps;
|
|
9795
9794
|
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
9796
9795
|
var animationStyles, shouldUseAnimation = (
|
|
@@ -10082,10 +10081,10 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
10082
10081
|
return props.children;
|
|
10083
10082
|
}
|
|
10084
10083
|
Unspaced2.isUnspaced = !0;
|
|
10085
|
-
var getSpacerSize = function(
|
|
10084
|
+
var getSpacerSize = function(size4, param) {
|
|
10086
10085
|
var tokens = param.tokens;
|
|
10087
|
-
|
|
10088
|
-
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[
|
|
10086
|
+
size4 = size4 === !0 ? "$true" : size4;
|
|
10087
|
+
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[size4]) !== null && _tokens_space_size !== void 0 ? _tokens_space_size : size4;
|
|
10089
10088
|
return {
|
|
10090
10089
|
width: sizePx,
|
|
10091
10090
|
height: sizePx,
|
|
@@ -11613,12 +11612,19 @@ var require_styled_native = __commonJS({
|
|
|
11613
11612
|
"defaultVariants",
|
|
11614
11613
|
"acceptsClassName",
|
|
11615
11614
|
"context"
|
|
11616
|
-
]);
|
|
11617
|
-
if (
|
|
11615
|
+
]), parentDefaultVariants, parentDefaultProps;
|
|
11616
|
+
if (parentStaticConfig) {
|
|
11618
11617
|
var avoid = parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC;
|
|
11619
|
-
|
|
11618
|
+
if (!avoid) {
|
|
11619
|
+
var pdp = parentStaticConfig.defaultProps;
|
|
11620
|
+
for (var key2 in pdp) {
|
|
11621
|
+
var val = pdp[key2];
|
|
11622
|
+
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
11623
|
+
}
|
|
11624
|
+
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
11625
|
+
}
|
|
11620
11626
|
}
|
|
11621
|
-
parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
11627
|
+
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = _object_spread9({}, parentDefaultProps, parentDefaultVariants, defaultProps, defaultVariants)), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
11622
11628
|
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 && {
|
|
11623
11629
|
Component
|
|
11624
11630
|
}), {
|
|
@@ -15895,9 +15901,9 @@ var require_getElevation_native = __commonJS({
|
|
|
15895
15901
|
}
|
|
15896
15902
|
return target;
|
|
15897
15903
|
}
|
|
15898
|
-
var getElevation = function(
|
|
15899
|
-
if (
|
|
15900
|
-
var tokens = extras.tokens, token = tokens.size[
|
|
15904
|
+
var getElevation = function(size4, extras) {
|
|
15905
|
+
if (size4) {
|
|
15906
|
+
var tokens = extras.tokens, token = tokens.size[size4], sizeNum = (0, import_core12.isVariable)(token) ? +token.val : size4;
|
|
15901
15907
|
return getSizedElevation(sizeNum, extras);
|
|
15902
15908
|
}
|
|
15903
15909
|
}, getSizedElevation = function(val, param) {
|
|
@@ -16093,8 +16099,8 @@ var require_index_native18 = __commonJS({
|
|
|
16093
16099
|
bounds: [
|
|
16094
16100
|
0
|
|
16095
16101
|
]
|
|
16096
|
-
}, getSize = function(
|
|
16097
|
-
return getTokenRelative("size",
|
|
16102
|
+
}, getSize = function(size4, options) {
|
|
16103
|
+
return getTokenRelative("size", size4, options);
|
|
16098
16104
|
}, getSpace2 = function(space, options) {
|
|
16099
16105
|
return getTokenRelative("space", space, options);
|
|
16100
16106
|
}, getRadius = function(radius, options) {
|
|
@@ -16142,9 +16148,9 @@ var require_index_native18 = __commonJS({
|
|
|
16142
16148
|
}
|
|
16143
16149
|
}
|
|
16144
16150
|
}
|
|
16145
|
-
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),
|
|
16146
|
-
|
|
16147
|
-
var index = Math.min(max2, Math.max(min2, currentIndex +
|
|
16151
|
+
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;
|
|
16152
|
+
shift4 && (current === "$true" || (0, import_web.isVariable)(current) && current.name === "true") && (shift4 += shift4 > 0 ? 1 : -1);
|
|
16153
|
+
var index = Math.min(max2, Math.max(min2, currentIndex + shift4)), found = tokensOrdered[index], result = (typeof found == "string" ? tokens[found] : found) || tokens.$true;
|
|
16148
16154
|
return result;
|
|
16149
16155
|
}, getTokenRelative = stepTokenUpOrDown;
|
|
16150
16156
|
}
|
|
@@ -16363,14 +16369,14 @@ var require_variants_native = __commonJS({
|
|
|
16363
16369
|
true: function(_, param) {
|
|
16364
16370
|
var props = param.props, tokens = param.tokens;
|
|
16365
16371
|
if (!("size" in props)) return circularStyle;
|
|
16366
|
-
var
|
|
16372
|
+
var size4 = typeof props.size == "number" ? props.size : tokens.size[props.size];
|
|
16367
16373
|
return _object_spread_props8(_object_spread9({}, circularStyle), {
|
|
16368
|
-
width:
|
|
16369
|
-
height:
|
|
16370
|
-
maxWidth:
|
|
16371
|
-
maxHeight:
|
|
16372
|
-
minWidth:
|
|
16373
|
-
minHeight:
|
|
16374
|
+
width: size4,
|
|
16375
|
+
height: size4,
|
|
16376
|
+
maxWidth: size4,
|
|
16377
|
+
maxHeight: size4,
|
|
16378
|
+
minWidth: size4,
|
|
16379
|
+
minHeight: size4
|
|
16374
16380
|
});
|
|
16375
16381
|
}
|
|
16376
16382
|
}, hoverTheme = {
|
|
@@ -16870,8 +16876,8 @@ var require_SizableText_native = __commonJS({
|
|
|
16870
16876
|
});
|
|
16871
16877
|
SizableText2.staticConfig.variants.fontFamily = {
|
|
16872
16878
|
"...": function(_, extras) {
|
|
16873
|
-
var
|
|
16874
|
-
return (0, import_get_font_sized2.getFontSized)(
|
|
16879
|
+
var size4 = extras.props.size || "$true";
|
|
16880
|
+
return (0, import_get_font_sized2.getFontSized)(size4, extras);
|
|
16875
16881
|
}
|
|
16876
16882
|
};
|
|
16877
16883
|
}
|
|
@@ -17130,12 +17136,12 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
17130
17136
|
}), target;
|
|
17131
17137
|
}
|
|
17132
17138
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
17133
|
-
var children = propsIn.children, textProps = propsIn.textProps,
|
|
17139
|
+
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;
|
|
17134
17140
|
if (noTextWrap || !children) return [
|
|
17135
17141
|
children
|
|
17136
17142
|
];
|
|
17137
17143
|
var props = _object_spread9({}, extraProps);
|
|
17138
|
-
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),
|
|
17144
|
+
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) {
|
|
17139
17145
|
return typeof child == "string" ? (
|
|
17140
17146
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
17141
17147
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextComponent, _object_spread_props8(_object_spread9({}, props, textProps), {
|
|
@@ -17992,8 +17998,8 @@ var require_Adapt_native = __commonJS({
|
|
|
17992
17998
|
when
|
|
17993
17999
|
};
|
|
17994
18000
|
}, Adapt = (0, import_helpers.withStaticProperties)(function(param) {
|
|
17995
|
-
var
|
|
17996
|
-
return
|
|
18001
|
+
var platform2 = param.platform, when = param.when, children = param.children, context = (0, import_react4.useContext)(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !platform2;
|
|
18002
|
+
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() {
|
|
17997
18003
|
enabled && (context == null || context.setWhen(when || enabled));
|
|
17998
18004
|
}, [
|
|
17999
18005
|
when,
|
|
@@ -19820,11 +19826,11 @@ var require_nativeSheet_native = __commonJS({
|
|
|
19820
19826
|
var nativeSheets = {
|
|
19821
19827
|
ios: null
|
|
19822
19828
|
};
|
|
19823
|
-
function getNativeSheet(
|
|
19824
|
-
return nativeSheets[
|
|
19829
|
+
function getNativeSheet(platform2) {
|
|
19830
|
+
return nativeSheets[platform2];
|
|
19825
19831
|
}
|
|
19826
|
-
function setupNativeSheet(
|
|
19827
|
-
|
|
19832
|
+
function setupNativeSheet(platform2, Implementation) {
|
|
19833
|
+
platform2 === "ios" && (nativeSheets[platform2] = function(props) {
|
|
19828
19834
|
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)();
|
|
19829
19835
|
return (0, import_react4.useEffect)(function() {
|
|
19830
19836
|
var _ref_current;
|
|
@@ -23082,8 +23088,8 @@ var require_getShapeSize_native = __commonJS({
|
|
|
23082
23088
|
}
|
|
23083
23089
|
});
|
|
23084
23090
|
module2.exports = __toCommonJS2(getShapeSize_exports);
|
|
23085
|
-
var getShapeSize = function(
|
|
23086
|
-
var tokens = param.tokens, _tokens_size_size, width = (_tokens_size_size = tokens.size[
|
|
23091
|
+
var getShapeSize = function(size4, param) {
|
|
23092
|
+
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;
|
|
23087
23093
|
return {
|
|
23088
23094
|
width,
|
|
23089
23095
|
height,
|
|
@@ -23498,17 +23504,17 @@ var require_Avatar_native = __commonJS({
|
|
|
23498
23504
|
position: "relative",
|
|
23499
23505
|
overflow: "hidden"
|
|
23500
23506
|
}), Avatar = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
23501
|
-
var __scopeAvatar = props.__scopeAvatar, _props_size = props.size,
|
|
23507
|
+
var __scopeAvatar = props.__scopeAvatar, _props_size = props.size, size4 = _props_size === void 0 ? "$true" : _props_size, avatarProps = _object_without_properties5(props, [
|
|
23502
23508
|
"__scopeAvatar",
|
|
23503
23509
|
"size"
|
|
23504
23510
|
]), _React_useState = _sliced_to_array(React2.useState("idle"), 2), imageLoadingStatus = _React_useState[0], setImageLoadingStatus = _React_useState[1];
|
|
23505
23511
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarProvider, {
|
|
23506
|
-
size:
|
|
23512
|
+
size: size4,
|
|
23507
23513
|
scope: __scopeAvatar,
|
|
23508
23514
|
imageLoadingStatus,
|
|
23509
23515
|
onImageLoadingStatusChange: setImageLoadingStatus,
|
|
23510
23516
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFrame, _object_spread_props8(_object_spread9({
|
|
23511
|
-
size:
|
|
23517
|
+
size: size4
|
|
23512
23518
|
}, avatarProps), {
|
|
23513
23519
|
ref: forwardedRef
|
|
23514
23520
|
}))
|
|
@@ -23627,10 +23633,10 @@ var require_getFontSize_native = __commonJS({
|
|
|
23627
23633
|
return conf.fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size[token];
|
|
23628
23634
|
}, getFontSizeToken = function(inSize, opts) {
|
|
23629
23635
|
if (typeof inSize == "number") return null;
|
|
23630
|
-
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,
|
|
23631
|
-
foundIndex === -1 &&
|
|
23636
|
+
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);
|
|
23637
|
+
foundIndex === -1 && size4.endsWith(".5") && (foundIndex = sizeTokens.indexOf(size4.replace(".5", ""))), process.env.NODE_ENV === "development" && foundIndex === -1 && console.warn("No font size found", size4, opts, "in size tokens", sizeTokens);
|
|
23632
23638
|
var tokenIndex = Math.min(Math.max(0, foundIndex + relativeSize), sizeTokens.length - 1), _sizeTokens_tokenIndex;
|
|
23633
|
-
return (_sizeTokens_tokenIndex = sizeTokens[tokenIndex]) !== null && _sizeTokens_tokenIndex !== void 0 ? _sizeTokens_tokenIndex :
|
|
23639
|
+
return (_sizeTokens_tokenIndex = sizeTokens[tokenIndex]) !== null && _sizeTokens_tokenIndex !== void 0 ? _sizeTokens_tokenIndex : size4;
|
|
23634
23640
|
};
|
|
23635
23641
|
}
|
|
23636
23642
|
});
|
|
@@ -24190,7 +24196,7 @@ var require_Button_native = __commonJS({
|
|
|
24190
24196
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24191
24197
|
}
|
|
24192
24198
|
}), ButtonIcon = function(props) {
|
|
24193
|
-
var children = props.children, _props_scaleIcon = props.scaleIcon, scaleIcon = _props_scaleIcon === void 0 ? 1 : _props_scaleIcon, _useContext = (0, import_react4.useContext)(ButtonContext),
|
|
24199
|
+
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)({
|
|
24194
24200
|
size: iconSize,
|
|
24195
24201
|
color
|
|
24196
24202
|
});
|
|
@@ -24242,7 +24248,7 @@ var require_Button_native = __commonJS({
|
|
|
24242
24248
|
"tag",
|
|
24243
24249
|
"ellipse",
|
|
24244
24250
|
"maxFontSizeMultiplier"
|
|
24245
|
-
]),
|
|
24251
|
+
]), size4 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size4 == "number" ? size4 * 0.5 : (0, import_font_size.getFontSize)(size4, {
|
|
24246
24252
|
font: (fontFamily == null ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
|
|
24247
24253
|
})) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
24248
24254
|
size: iconSize,
|
|
@@ -24264,7 +24270,7 @@ var require_Button_native = __commonJS({
|
|
|
24264
24270
|
maxFontSizeMultiplier
|
|
24265
24271
|
}, Text3 === ButtonText && propsActive.unstyled !== !0 ? {
|
|
24266
24272
|
unstyled: process.env.TAMAGUI_HEADLESS === "1",
|
|
24267
|
-
size:
|
|
24273
|
+
size: size4
|
|
24268
24274
|
} : void 0), inner = (0, import_web.spacedChildren)({
|
|
24269
24275
|
// a bit arbitrary but scaling to font size is necessary so long as button does
|
|
24270
24276
|
space: spaceSize,
|
|
@@ -24280,7 +24286,7 @@ var require_Button_native = __commonJS({
|
|
|
24280
24286
|
themedIconAfter
|
|
24281
24287
|
])
|
|
24282
24288
|
}), props = _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({
|
|
24283
|
-
size:
|
|
24289
|
+
size: size4
|
|
24284
24290
|
}, propsIn.disabled && {
|
|
24285
24291
|
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
24286
24292
|
focusable: void 0,
|
|
@@ -25988,12 +25994,12 @@ var require_createCheckbox_native = __commonJS({
|
|
|
25988
25994
|
"onCheckedChange",
|
|
25989
25995
|
"native",
|
|
25990
25996
|
"unstyled"
|
|
25991
|
-
]), propsActive = (0, import_core12.useProps)(props), styledContext = import_react4.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext), adjustedSize = 0,
|
|
25997
|
+
]), propsActive = (0, import_core12.useProps)(props), styledContext = import_react4.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext), adjustedSize = 0, size4 = 0;
|
|
25992
25998
|
if (!unstyled) {
|
|
25993
25999
|
var _propsActive_size, _ref;
|
|
25994
26000
|
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", {
|
|
25995
26001
|
shift: sizeAdjust
|
|
25996
|
-
})),
|
|
26002
|
+
})), size4 = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize;
|
|
25997
26003
|
}
|
|
25998
26004
|
var _useControllableState = _sliced_to_array((0, import_use_controllable_state.useControllableState)({
|
|
25999
26005
|
prop: checkedProp,
|
|
@@ -26045,14 +26051,14 @@ var require_createCheckbox_native = __commonJS({
|
|
|
26045
26051
|
scaleIcon: (_ref2 = scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon)) !== null && _ref2 !== void 0 ? _ref2 : 1,
|
|
26046
26052
|
children: [
|
|
26047
26053
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({}, !unstyled && {
|
|
26048
|
-
width:
|
|
26049
|
-
height:
|
|
26054
|
+
width: size4,
|
|
26055
|
+
height: size4
|
|
26050
26056
|
}), {
|
|
26051
26057
|
tag: "button",
|
|
26052
26058
|
ref: checkboxRef,
|
|
26053
26059
|
unstyled
|
|
26054
26060
|
}), unstyled === !1 && {
|
|
26055
|
-
size:
|
|
26061
|
+
size: size4,
|
|
26056
26062
|
theme: checked ? "active" : null
|
|
26057
26063
|
}), {
|
|
26058
26064
|
// potential variant
|
|
@@ -27349,7 +27355,7 @@ var require_Group_native = __commonJS({
|
|
|
27349
27355
|
});
|
|
27350
27356
|
function createGroup(verticalDefault) {
|
|
27351
27357
|
return (0, import_helpers.withStaticProperties)(GroupFrame.styleable(function(props, ref) {
|
|
27352
|
-
var activeProps = (0, import_core12.useProps)(props), __scopeGroup = activeProps.__scopeGroup, childrenProp = activeProps.children, space = activeProps.space, _activeProps_size = activeProps.size,
|
|
27358
|
+
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, [
|
|
27353
27359
|
"__scopeGroup",
|
|
27354
27360
|
"children",
|
|
27355
27361
|
"space",
|
|
@@ -27365,7 +27371,7 @@ var require_Group_native = __commonJS({
|
|
|
27365
27371
|
"forceUseItem"
|
|
27366
27372
|
]), vertical = orientation === "vertical", _useControllableState = _sliced_to_array((0, import_use_controllable_state.useControllableState)({
|
|
27367
27373
|
defaultProp: forceUseItem ? 1 : 0
|
|
27368
|
-
}), 2), itemChildrenCount = _useControllableState[0], setItemChildrenCount = _useControllableState[1], isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (
|
|
27374
|
+
}), 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) {
|
|
27369
27375
|
if (!/* @__PURE__ */ (0, import_react4.isValidElement)(child) || child.type === import_react4.Fragment) return child;
|
|
27370
27376
|
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({
|
|
27371
27377
|
isFirst,
|
|
@@ -27404,7 +27410,7 @@ var require_Group_native = __commonJS({
|
|
|
27404
27410
|
scope: __scopeGroup,
|
|
27405
27411
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GroupFrame, _object_spread_props8(_object_spread9({
|
|
27406
27412
|
ref,
|
|
27407
|
-
size:
|
|
27413
|
+
size: size4,
|
|
27408
27414
|
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
27409
27415
|
borderRadius
|
|
27410
27416
|
}, restProps), {
|
|
@@ -28363,7 +28369,7 @@ var require_ListItem_native = __commonJS({
|
|
|
28363
28369
|
textAlign,
|
|
28364
28370
|
ellipse,
|
|
28365
28371
|
children
|
|
28366
|
-
},
|
|
28372
|
+
}, size4 = props.size || "$true", iconSize = (0, import_font_size.getFontSize)(size4) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
28367
28373
|
size: iconSize,
|
|
28368
28374
|
color
|
|
28369
28375
|
}), _map = _sliced_to_array([
|
|
@@ -28388,7 +28394,7 @@ var require_ListItem_native = __commonJS({
|
|
|
28388
28394
|
flex: 1,
|
|
28389
28395
|
children: [
|
|
28390
28396
|
noTextWrap === "all" ? title : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Title, {
|
|
28391
|
-
size:
|
|
28397
|
+
size: size4,
|
|
28392
28398
|
children: title
|
|
28393
28399
|
}),
|
|
28394
28400
|
subTitle ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
@@ -28397,7 +28403,7 @@ var require_ListItem_native = __commonJS({
|
|
|
28397
28403
|
// or standardize on subtle colors in themes
|
|
28398
28404
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Subtitle, {
|
|
28399
28405
|
unstyled,
|
|
28400
|
-
size:
|
|
28406
|
+
size: size4,
|
|
28401
28407
|
children: subTitle
|
|
28402
28408
|
})
|
|
28403
28409
|
) : subTitle
|
|
@@ -28808,18 +28814,18 @@ var sides, alignments, placements, min, max, oppositeSideMap, oppositeAlignmentM
|
|
|
28808
28814
|
// ../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js
|
|
28809
28815
|
var floating_ui_core_esm_exports = {};
|
|
28810
28816
|
__export(floating_ui_core_esm_exports, {
|
|
28811
|
-
arrow: () =>
|
|
28812
|
-
autoPlacement: () =>
|
|
28817
|
+
arrow: () => arrow2,
|
|
28818
|
+
autoPlacement: () => autoPlacement2,
|
|
28813
28819
|
computePosition: () => computePosition,
|
|
28814
|
-
detectOverflow: () =>
|
|
28815
|
-
flip: () =>
|
|
28816
|
-
hide: () =>
|
|
28817
|
-
inline: () =>
|
|
28818
|
-
limitShift: () =>
|
|
28819
|
-
offset: () =>
|
|
28820
|
+
detectOverflow: () => detectOverflow2,
|
|
28821
|
+
flip: () => flip2,
|
|
28822
|
+
hide: () => hide2,
|
|
28823
|
+
inline: () => inline2,
|
|
28824
|
+
limitShift: () => limitShift2,
|
|
28825
|
+
offset: () => offset2,
|
|
28820
28826
|
rectToClientRect: () => rectToClientRect,
|
|
28821
|
-
shift: () =>
|
|
28822
|
-
size: () =>
|
|
28827
|
+
shift: () => shift2,
|
|
28828
|
+
size: () => size2
|
|
28823
28829
|
});
|
|
28824
28830
|
function _array_like_to_array(arr, len) {
|
|
28825
28831
|
(len == null || len > arr.length) && (len = arr.length);
|
|
@@ -29054,7 +29060,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
29054
29060
|
}
|
|
29055
29061
|
return coords;
|
|
29056
29062
|
}
|
|
29057
|
-
function
|
|
29063
|
+
function detectOverflow2(state, options) {
|
|
29058
29064
|
return _detectOverflow.apply(this, arguments);
|
|
29059
29065
|
}
|
|
29060
29066
|
function _detectOverflow() {
|
|
@@ -29067,13 +29073,13 @@ function _detectOverflow() {
|
|
|
29067
29073
|
* @see https://floating-ui.com/docs/detectOverflow
|
|
29068
29074
|
*/
|
|
29069
29075
|
_async_to_generator(function(state, options) {
|
|
29070
|
-
var _await$platform$isEle, x, y,
|
|
29076
|
+
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;
|
|
29071
29077
|
return _ts_generator(this, function(_state) {
|
|
29072
29078
|
switch (_state.label) {
|
|
29073
29079
|
case 0:
|
|
29074
|
-
return options === void 0 && (options = {}), x = state.x, y = state.y,
|
|
29080
|
+
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 = {}, [
|
|
29075
29081
|
4,
|
|
29076
|
-
|
|
29082
|
+
platform2.isElement == null ? void 0 : platform2.isElement(element)
|
|
29077
29083
|
];
|
|
29078
29084
|
case 1:
|
|
29079
29085
|
return (_await$platform$isEle = _state.sent()) == null || _await$platform$isEle ? (_tmp1 = element, [
|
|
@@ -29089,7 +29095,7 @@ function _detectOverflow() {
|
|
|
29089
29095
|
4
|
|
29090
29096
|
] : [
|
|
29091
29097
|
4,
|
|
29092
|
-
|
|
29098
|
+
platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)
|
|
29093
29099
|
];
|
|
29094
29100
|
case 3:
|
|
29095
29101
|
_tmp2 = _state.sent(), _state.label = 4;
|
|
@@ -29098,7 +29104,7 @@ function _detectOverflow() {
|
|
|
29098
29104
|
case 5:
|
|
29099
29105
|
return [
|
|
29100
29106
|
4,
|
|
29101
|
-
_.apply(
|
|
29107
|
+
_.apply(platform2, [
|
|
29102
29108
|
(_tmp.element = _tmp1, _tmp.boundary = boundary, _tmp.rootBoundary = rootBoundary, _tmp.strategy = strategy, _tmp)
|
|
29103
29109
|
])
|
|
29104
29110
|
];
|
|
@@ -29112,17 +29118,17 @@ function _detectOverflow() {
|
|
|
29112
29118
|
height: rects.floating.height
|
|
29113
29119
|
} : rects.reference, [
|
|
29114
29120
|
4,
|
|
29115
|
-
|
|
29121
|
+
platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)
|
|
29116
29122
|
];
|
|
29117
29123
|
case 7:
|
|
29118
29124
|
return offsetParent = _state.sent(), [
|
|
29119
29125
|
4,
|
|
29120
|
-
|
|
29126
|
+
platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)
|
|
29121
29127
|
];
|
|
29122
29128
|
case 8:
|
|
29123
29129
|
return _state.sent() ? [
|
|
29124
29130
|
4,
|
|
29125
|
-
|
|
29131
|
+
platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)
|
|
29126
29132
|
] : [
|
|
29127
29133
|
3,
|
|
29128
29134
|
10
|
|
@@ -29141,9 +29147,9 @@ function _detectOverflow() {
|
|
|
29141
29147
|
y: 1
|
|
29142
29148
|
}, _state.label = 11;
|
|
29143
29149
|
case 11:
|
|
29144
|
-
return offsetScale = _tmp3,
|
|
29150
|
+
return offsetScale = _tmp3, platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? [
|
|
29145
29151
|
4,
|
|
29146
|
-
|
|
29152
|
+
platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
29147
29153
|
elements,
|
|
29148
29154
|
rect,
|
|
29149
29155
|
offsetParent,
|
|
@@ -29238,13 +29244,13 @@ function _convertValueToCoords() {
|
|
|
29238
29244
|
return _convertValueToCoords = // For type backwards-compatibility, the `OffsetOptions` type was also
|
|
29239
29245
|
// Derivable.
|
|
29240
29246
|
_async_to_generator(function(state, options) {
|
|
29241
|
-
var placement,
|
|
29247
|
+
var placement, platform2, elements, rtl, side, alignment, isVertical, mainAxisMulti, crossAxisMulti, rawValue, _ref, mainAxis, crossAxis, alignmentAxis;
|
|
29242
29248
|
return _ts_generator(this, function(_state) {
|
|
29243
29249
|
switch (_state.label) {
|
|
29244
29250
|
case 0:
|
|
29245
|
-
return placement = state.placement,
|
|
29251
|
+
return placement = state.placement, platform2 = state.platform, elements = state.elements, [
|
|
29246
29252
|
4,
|
|
29247
|
-
|
|
29253
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
29248
29254
|
];
|
|
29249
29255
|
case 1:
|
|
29250
29256
|
return rtl = _state.sent(), side = getSide(placement), alignment = getAlignment(placement), isVertical = getSideAxis(placement) === "y", mainAxisMulti = [
|
|
@@ -29272,24 +29278,24 @@ function _convertValueToCoords() {
|
|
|
29272
29278
|
});
|
|
29273
29279
|
}), _convertValueToCoords.apply(this, arguments);
|
|
29274
29280
|
}
|
|
29275
|
-
var computePosition,
|
|
29281
|
+
var computePosition, arrow2, autoPlacement2, flip2, hide2, inline2, offset2, shift2, limitShift2, size2, init_floating_ui_core_esm = __esm({
|
|
29276
29282
|
"../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js"() {
|
|
29277
29283
|
init_floating_ui_utils();
|
|
29278
29284
|
init_floating_ui_utils();
|
|
29279
29285
|
computePosition = function() {
|
|
29280
29286
|
var _ref = _async_to_generator(function(reference, floating, config) {
|
|
29281
|
-
var _config_placement, placement, _config_strategy, strategy, _config_middleware, middleware,
|
|
29287
|
+
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;
|
|
29282
29288
|
return _ts_generator(this, function(_state) {
|
|
29283
29289
|
switch (_state.label) {
|
|
29284
29290
|
case 0:
|
|
29285
|
-
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,
|
|
29291
|
+
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), [
|
|
29286
29292
|
4,
|
|
29287
|
-
|
|
29293
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(floating)
|
|
29288
29294
|
];
|
|
29289
29295
|
case 1:
|
|
29290
29296
|
return rtl = _state.sent(), [
|
|
29291
29297
|
4,
|
|
29292
|
-
|
|
29298
|
+
platform2.getElementRects({
|
|
29293
29299
|
reference,
|
|
29294
29300
|
floating,
|
|
29295
29301
|
strategy
|
|
@@ -29308,7 +29314,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29308
29314
|
strategy,
|
|
29309
29315
|
middlewareData,
|
|
29310
29316
|
rects,
|
|
29311
|
-
platform,
|
|
29317
|
+
platform: platform2,
|
|
29312
29318
|
elements: {
|
|
29313
29319
|
reference,
|
|
29314
29320
|
floating
|
|
@@ -29327,7 +29333,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29327
29333
|
6
|
|
29328
29334
|
] : [
|
|
29329
29335
|
4,
|
|
29330
|
-
|
|
29336
|
+
platform2.getElementRects({
|
|
29331
29337
|
reference,
|
|
29332
29338
|
floating,
|
|
29333
29339
|
strategy
|
|
@@ -29375,17 +29381,17 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29375
29381
|
return _ref.apply(this, arguments);
|
|
29376
29382
|
};
|
|
29377
29383
|
}();
|
|
29378
|
-
|
|
29384
|
+
arrow2 = function(options) {
|
|
29379
29385
|
return {
|
|
29380
29386
|
name: "arrow",
|
|
29381
29387
|
options,
|
|
29382
29388
|
fn: function(state) {
|
|
29383
29389
|
return _async_to_generator(function() {
|
|
29384
|
-
var x, y, placement, rects,
|
|
29390
|
+
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;
|
|
29385
29391
|
return _ts_generator(this, function(_state) {
|
|
29386
29392
|
switch (_state.label) {
|
|
29387
29393
|
case 0:
|
|
29388
|
-
return x = state.x, y = state.y, placement = state.placement, rects = state.rects,
|
|
29394
|
+
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 ? [
|
|
29389
29395
|
2,
|
|
29390
29396
|
{}
|
|
29391
29397
|
] : (paddingObject = getPaddingObject(padding), coords = {
|
|
@@ -29393,12 +29399,12 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29393
29399
|
y
|
|
29394
29400
|
}, axis = getAlignmentAxis(placement), length = getAxisLength(axis), [
|
|
29395
29401
|
4,
|
|
29396
|
-
|
|
29402
|
+
platform2.getDimensions(element)
|
|
29397
29403
|
]);
|
|
29398
29404
|
case 1:
|
|
29399
29405
|
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], [
|
|
29400
29406
|
4,
|
|
29401
|
-
|
|
29407
|
+
platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element)
|
|
29402
29408
|
];
|
|
29403
29409
|
case 2:
|
|
29404
29410
|
return arrowOffsetParent = _state.sent(), clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0, _tmp = !clientSize, _tmp ? [
|
|
@@ -29406,14 +29412,14 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29406
29412
|
4
|
|
29407
29413
|
] : [
|
|
29408
29414
|
4,
|
|
29409
|
-
|
|
29415
|
+
platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent)
|
|
29410
29416
|
];
|
|
29411
29417
|
case 3:
|
|
29412
29418
|
_tmp = !_state.sent(), _state.label = 4;
|
|
29413
29419
|
case 4:
|
|
29414
|
-
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,
|
|
29420
|
+
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, [
|
|
29415
29421
|
2,
|
|
29416
|
-
(_obj1 = {}, _define_property2(_obj1, axis, coords[axis] + alignmentOffset), _define_property2(_obj1, "data", _object_spread2((_obj = {}, _define_property2(_obj, axis,
|
|
29422
|
+
(_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 && {
|
|
29417
29423
|
alignmentOffset
|
|
29418
29424
|
})), _define_property2(_obj1, "reset", shouldAddOffset), _obj1)
|
|
29419
29425
|
];
|
|
@@ -29423,24 +29429,24 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29423
29429
|
}
|
|
29424
29430
|
};
|
|
29425
29431
|
};
|
|
29426
|
-
|
|
29432
|
+
autoPlacement2 = function(options) {
|
|
29427
29433
|
return options === void 0 && (options = {}), {
|
|
29428
29434
|
name: "autoPlacement",
|
|
29429
29435
|
options,
|
|
29430
29436
|
fn: function(state) {
|
|
29431
29437
|
return _async_to_generator(function() {
|
|
29432
|
-
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE, rects, middlewareData, placement,
|
|
29438
|
+
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;
|
|
29433
29439
|
return _ts_generator(this, function(_state) {
|
|
29434
29440
|
switch (_state.label) {
|
|
29435
29441
|
case 0:
|
|
29436
|
-
return rects = state.rects, middlewareData = state.middlewareData, placement = state.placement,
|
|
29442
|
+
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, [
|
|
29437
29443
|
"crossAxis",
|
|
29438
29444
|
"alignment",
|
|
29439
29445
|
"allowedPlacements",
|
|
29440
29446
|
"autoAlignment"
|
|
29441
29447
|
]), placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements, [
|
|
29442
29448
|
4,
|
|
29443
|
-
|
|
29449
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
29444
29450
|
];
|
|
29445
29451
|
case 1:
|
|
29446
29452
|
return overflow = _state.sent(), currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0, currentPlacement = placements$1[currentIndex], currentPlacement == null ? [
|
|
@@ -29451,7 +29457,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29451
29457
|
rects
|
|
29452
29458
|
], [
|
|
29453
29459
|
4,
|
|
29454
|
-
|
|
29460
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
29455
29461
|
]);
|
|
29456
29462
|
case 2:
|
|
29457
29463
|
return alignmentSides = getAlignmentSides.apply(void 0, _tmp.concat([
|
|
@@ -29529,17 +29535,17 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29529
29535
|
})();
|
|
29530
29536
|
}
|
|
29531
29537
|
};
|
|
29532
|
-
},
|
|
29538
|
+
}, flip2 = function(options) {
|
|
29533
29539
|
return options === void 0 && (options = {}), {
|
|
29534
29540
|
name: "flip",
|
|
29535
29541
|
options,
|
|
29536
29542
|
fn: function(state) {
|
|
29537
29543
|
return _async_to_generator(function() {
|
|
29538
|
-
var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement,
|
|
29544
|
+
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;
|
|
29539
29545
|
return _ts_generator(this, function(_state) {
|
|
29540
29546
|
switch (_state.label) {
|
|
29541
29547
|
case 0:
|
|
29542
|
-
return placement = state.placement, middlewareData = state.middlewareData, rects = state.rects, initialPlacement = state.initialPlacement,
|
|
29548
|
+
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, [
|
|
29543
29549
|
"mainAxis",
|
|
29544
29550
|
"crossAxis",
|
|
29545
29551
|
"fallbackPlacements",
|
|
@@ -29551,7 +29557,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29551
29557
|
{}
|
|
29552
29558
|
] : (side = getSide(placement), isBasePlacement = getSide(initialPlacement) === initialPlacement, [
|
|
29553
29559
|
4,
|
|
29554
|
-
|
|
29560
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
29555
29561
|
]);
|
|
29556
29562
|
case 1:
|
|
29557
29563
|
return rtl = _state.sent(), fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [
|
|
@@ -29560,7 +29566,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29560
29566
|
initialPlacement
|
|
29561
29567
|
].concat(_to_consumable_array(fallbackPlacements)), [
|
|
29562
29568
|
4,
|
|
29563
|
-
|
|
29569
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
29564
29570
|
];
|
|
29565
29571
|
case 2:
|
|
29566
29572
|
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([
|
|
@@ -29629,7 +29635,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29629
29635
|
}
|
|
29630
29636
|
};
|
|
29631
29637
|
};
|
|
29632
|
-
|
|
29638
|
+
hide2 = function(options) {
|
|
29633
29639
|
return options === void 0 && (options = {}), {
|
|
29634
29640
|
name: "hide",
|
|
29635
29641
|
options,
|
|
@@ -29660,7 +29666,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29660
29666
|
case 1:
|
|
29661
29667
|
return [
|
|
29662
29668
|
4,
|
|
29663
|
-
|
|
29669
|
+
detectOverflow2(state, _object_spread_props2(_object_spread2({}, detectOverflowOptions), {
|
|
29664
29670
|
elementContext: "reference"
|
|
29665
29671
|
}))
|
|
29666
29672
|
];
|
|
@@ -29677,7 +29683,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29677
29683
|
case 3:
|
|
29678
29684
|
return [
|
|
29679
29685
|
4,
|
|
29680
|
-
|
|
29686
|
+
detectOverflow2(state, _object_spread_props2(_object_spread2({}, detectOverflowOptions), {
|
|
29681
29687
|
altBoundary: !0
|
|
29682
29688
|
}))
|
|
29683
29689
|
];
|
|
@@ -29706,13 +29712,13 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29706
29712
|
}
|
|
29707
29713
|
};
|
|
29708
29714
|
};
|
|
29709
|
-
|
|
29715
|
+
inline2 = function(options) {
|
|
29710
29716
|
return options === void 0 && (options = {}), {
|
|
29711
29717
|
name: "inline",
|
|
29712
29718
|
options,
|
|
29713
29719
|
fn: function(state) {
|
|
29714
29720
|
return _async_to_generator(function() {
|
|
29715
|
-
var placement, elements, rects,
|
|
29721
|
+
var placement, elements, rects, platform2, strategy, _evaluate, _evaluate_padding, padding, x, y, nativeClientRects, _, clientRects, fallback, paddingObject, resetRects;
|
|
29716
29722
|
function getBoundingClientRect() {
|
|
29717
29723
|
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null)
|
|
29718
29724
|
return clientRects.find(function(rect) {
|
|
@@ -29755,16 +29761,16 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29755
29761
|
return _ts_generator(this, function(_state) {
|
|
29756
29762
|
switch (_state.label) {
|
|
29757
29763
|
case 0:
|
|
29758
|
-
return placement = state.placement, elements = state.elements, rects = state.rects,
|
|
29764
|
+
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, [
|
|
29759
29765
|
4,
|
|
29760
|
-
|
|
29766
|
+
platform2.getClientRects == null ? void 0 : platform2.getClientRects(elements.reference)
|
|
29761
29767
|
];
|
|
29762
29768
|
case 1:
|
|
29763
29769
|
return nativeClientRects = _.apply(Array, [
|
|
29764
29770
|
_state.sent() || []
|
|
29765
29771
|
]), clientRects = getRectsByLine(nativeClientRects), fallback = rectToClientRect(getBoundingRect(nativeClientRects)), paddingObject = getPaddingObject(padding), [
|
|
29766
29772
|
4,
|
|
29767
|
-
|
|
29773
|
+
platform2.getElementRects({
|
|
29768
29774
|
reference: {
|
|
29769
29775
|
getBoundingClientRect
|
|
29770
29776
|
},
|
|
@@ -29790,7 +29796,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29790
29796
|
}
|
|
29791
29797
|
};
|
|
29792
29798
|
};
|
|
29793
|
-
|
|
29799
|
+
offset2 = function(options) {
|
|
29794
29800
|
return options === void 0 && (options = 0), {
|
|
29795
29801
|
name: "offset",
|
|
29796
29802
|
options,
|
|
@@ -29823,7 +29829,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29823
29829
|
})();
|
|
29824
29830
|
}
|
|
29825
29831
|
};
|
|
29826
|
-
},
|
|
29832
|
+
}, shift2 = function(options) {
|
|
29827
29833
|
return options === void 0 && (options = {}), {
|
|
29828
29834
|
name: "shift",
|
|
29829
29835
|
options,
|
|
@@ -29850,7 +29856,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29850
29856
|
y
|
|
29851
29857
|
}, [
|
|
29852
29858
|
4,
|
|
29853
|
-
|
|
29859
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
29854
29860
|
];
|
|
29855
29861
|
case 1:
|
|
29856
29862
|
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))), [
|
|
@@ -29867,14 +29873,14 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29867
29873
|
})();
|
|
29868
29874
|
}
|
|
29869
29875
|
};
|
|
29870
|
-
},
|
|
29876
|
+
}, limitShift2 = function(options) {
|
|
29871
29877
|
return options === void 0 && (options = {}), {
|
|
29872
29878
|
options,
|
|
29873
29879
|
fn: function(state) {
|
|
29874
|
-
var x = state.x, y = state.y, placement = state.placement, rects = state.rects, middlewareData = state.middlewareData, _evaluate = evaluate(options, state), _evaluate_offset = _evaluate.offset,
|
|
29880
|
+
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 = {
|
|
29875
29881
|
x,
|
|
29876
29882
|
y
|
|
29877
|
-
}, crossAxis = getSideAxis(placement), mainAxis = getOppositeAxis(crossAxis), mainAxisCoord = coords[mainAxis], crossAxisCoord = coords[crossAxis], rawOffset = evaluate(
|
|
29883
|
+
}, crossAxis = getSideAxis(placement), mainAxis = getOppositeAxis(crossAxis), mainAxisCoord = coords[mainAxis], crossAxisCoord = coords[crossAxis], rawOffset = evaluate(offset4, state), computedOffset = typeof rawOffset == "number" ? {
|
|
29878
29884
|
mainAxis: rawOffset,
|
|
29879
29885
|
crossAxis: 0
|
|
29880
29886
|
} : _object_spread2({
|
|
@@ -29896,27 +29902,27 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29896
29902
|
return _obj = {}, _define_property2(_obj, mainAxis, mainAxisCoord), _define_property2(_obj, crossAxis, crossAxisCoord), _obj;
|
|
29897
29903
|
}
|
|
29898
29904
|
};
|
|
29899
|
-
},
|
|
29905
|
+
}, size2 = function(options) {
|
|
29900
29906
|
return options === void 0 && (options = {}), {
|
|
29901
29907
|
name: "size",
|
|
29902
29908
|
options,
|
|
29903
29909
|
fn: function(state) {
|
|
29904
29910
|
return _async_to_generator(function() {
|
|
29905
|
-
var placement, rects,
|
|
29911
|
+
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;
|
|
29906
29912
|
return _ts_generator(this, function(_state) {
|
|
29907
29913
|
switch (_state.label) {
|
|
29908
29914
|
case 0:
|
|
29909
|
-
return placement = state.placement, rects = state.rects,
|
|
29915
|
+
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() {
|
|
29910
29916
|
} : _evaluate_apply, detectOverflowOptions = _object_without_properties(_evaluate, [
|
|
29911
29917
|
"apply"
|
|
29912
29918
|
]), [
|
|
29913
29919
|
4,
|
|
29914
|
-
|
|
29920
|
+
detectOverflow2(state, detectOverflowOptions)
|
|
29915
29921
|
];
|
|
29916
29922
|
case 1:
|
|
29917
29923
|
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, [
|
|
29918
29924
|
4,
|
|
29919
|
-
|
|
29925
|
+
platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)
|
|
29920
29926
|
]) : [
|
|
29921
29927
|
3,
|
|
29922
29928
|
3
|
|
@@ -29939,7 +29945,7 @@ var computePosition, arrow, autoPlacement, flip, hide, inline, offset, shift, li
|
|
|
29939
29945
|
case 5:
|
|
29940
29946
|
return _state.sent(), [
|
|
29941
29947
|
4,
|
|
29942
|
-
|
|
29948
|
+
platform2.getDimensions(elements.floating)
|
|
29943
29949
|
];
|
|
29944
29950
|
case 6:
|
|
29945
29951
|
return nextDimensions = _state.sent(), width !== nextDimensions.width || height !== nextDimensions.height ? [
|
|
@@ -30190,7 +30196,7 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
30190
30196
|
middlewareData: {}
|
|
30191
30197
|
}), 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];
|
|
30192
30198
|
deepEqual(latestMiddleware, middleware) || setLatestMiddleware(middleware);
|
|
30193
|
-
var
|
|
30199
|
+
var platform2 = React__namespace.useMemo(function() {
|
|
30194
30200
|
return createPlatform({
|
|
30195
30201
|
offsetParent: offsetParentEl,
|
|
30196
30202
|
scrollOffsets,
|
|
@@ -30203,14 +30209,14 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
30203
30209
|
]), update = React__namespace.useCallback(function() {
|
|
30204
30210
|
!referenceRef.current || !floatingRef.current || core.computePosition(referenceRef.current, floatingRef.current, {
|
|
30205
30211
|
middleware: latestMiddleware,
|
|
30206
|
-
platform,
|
|
30212
|
+
platform: platform2,
|
|
30207
30213
|
placement
|
|
30208
30214
|
}).then(function(data2) {
|
|
30209
30215
|
isMountedRef.current && setData(data2);
|
|
30210
30216
|
});
|
|
30211
30217
|
}, [
|
|
30212
30218
|
latestMiddleware,
|
|
30213
|
-
|
|
30219
|
+
platform2,
|
|
30214
30220
|
placement
|
|
30215
30221
|
]);
|
|
30216
30222
|
React__namespace.useLayoutEffect(function() {
|
|
@@ -30314,63 +30320,63 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
30314
30320
|
}).fn(state) : {};
|
|
30315
30321
|
}
|
|
30316
30322
|
};
|
|
30317
|
-
},
|
|
30323
|
+
}, offset4 = function(options, deps) {
|
|
30318
30324
|
return _object_spread_props8(_object_spread9({}, core.offset(options)), {
|
|
30319
30325
|
options: [
|
|
30320
30326
|
options,
|
|
30321
30327
|
deps
|
|
30322
30328
|
]
|
|
30323
30329
|
});
|
|
30324
|
-
},
|
|
30330
|
+
}, shift4 = function(options, deps) {
|
|
30325
30331
|
return _object_spread_props8(_object_spread9({}, core.shift(options)), {
|
|
30326
30332
|
options: [
|
|
30327
30333
|
options,
|
|
30328
30334
|
deps
|
|
30329
30335
|
]
|
|
30330
30336
|
});
|
|
30331
|
-
},
|
|
30337
|
+
}, limitShift4 = function(options, deps) {
|
|
30332
30338
|
return _object_spread_props8(_object_spread9({}, core.limitShift(options)), {
|
|
30333
30339
|
options: [
|
|
30334
30340
|
options,
|
|
30335
30341
|
deps
|
|
30336
30342
|
]
|
|
30337
30343
|
});
|
|
30338
|
-
},
|
|
30344
|
+
}, flip4 = function(options, deps) {
|
|
30339
30345
|
return _object_spread_props8(_object_spread9({}, core.flip(options)), {
|
|
30340
30346
|
options: [
|
|
30341
30347
|
options,
|
|
30342
30348
|
deps
|
|
30343
30349
|
]
|
|
30344
30350
|
});
|
|
30345
|
-
},
|
|
30351
|
+
}, size4 = function(options, deps) {
|
|
30346
30352
|
return _object_spread_props8(_object_spread9({}, core.size(options)), {
|
|
30347
30353
|
options: [
|
|
30348
30354
|
options,
|
|
30349
30355
|
deps
|
|
30350
30356
|
]
|
|
30351
30357
|
});
|
|
30352
|
-
},
|
|
30358
|
+
}, autoPlacement4 = function(options, deps) {
|
|
30353
30359
|
return _object_spread_props8(_object_spread9({}, core.autoPlacement(options)), {
|
|
30354
30360
|
options: [
|
|
30355
30361
|
options,
|
|
30356
30362
|
deps
|
|
30357
30363
|
]
|
|
30358
30364
|
});
|
|
30359
|
-
},
|
|
30365
|
+
}, hide4 = function(options, deps) {
|
|
30360
30366
|
return _object_spread_props8(_object_spread9({}, core.hide(options)), {
|
|
30361
30367
|
options: [
|
|
30362
30368
|
options,
|
|
30363
30369
|
deps
|
|
30364
30370
|
]
|
|
30365
30371
|
});
|
|
30366
|
-
},
|
|
30372
|
+
}, inline4 = function(options, deps) {
|
|
30367
30373
|
return _object_spread_props8(_object_spread9({}, core.inline(options)), {
|
|
30368
30374
|
options: [
|
|
30369
30375
|
options,
|
|
30370
30376
|
deps
|
|
30371
30377
|
]
|
|
30372
30378
|
});
|
|
30373
|
-
},
|
|
30379
|
+
}, arrow3 = function(options, deps) {
|
|
30374
30380
|
return _object_spread_props8(_object_spread9({}, arrow$1(options)), {
|
|
30375
30381
|
options: [
|
|
30376
30382
|
options,
|
|
@@ -30384,15 +30390,15 @@ var require_floating_ui_react_native = __commonJS({
|
|
|
30384
30390
|
return core.detectOverflow;
|
|
30385
30391
|
}
|
|
30386
30392
|
});
|
|
30387
|
-
exports2.arrow =
|
|
30388
|
-
exports2.autoPlacement =
|
|
30389
|
-
exports2.flip =
|
|
30390
|
-
exports2.hide =
|
|
30391
|
-
exports2.inline =
|
|
30392
|
-
exports2.limitShift =
|
|
30393
|
-
exports2.offset =
|
|
30394
|
-
exports2.shift =
|
|
30395
|
-
exports2.size =
|
|
30393
|
+
exports2.arrow = arrow3;
|
|
30394
|
+
exports2.autoPlacement = autoPlacement4;
|
|
30395
|
+
exports2.flip = flip4;
|
|
30396
|
+
exports2.hide = hide4;
|
|
30397
|
+
exports2.inline = inline4;
|
|
30398
|
+
exports2.limitShift = limitShift4;
|
|
30399
|
+
exports2.offset = offset4;
|
|
30400
|
+
exports2.shift = shift4;
|
|
30401
|
+
exports2.size = size4;
|
|
30396
30402
|
exports2.useFloating = useFloating2;
|
|
30397
30403
|
}
|
|
30398
30404
|
});
|
|
@@ -30442,13 +30448,16 @@ var require_Floating_native = __commonJS({
|
|
|
30442
30448
|
}, Floating_native_exports = {};
|
|
30443
30449
|
__export2(Floating_native_exports, {
|
|
30444
30450
|
autoUpdate: function() {
|
|
30445
|
-
return
|
|
30451
|
+
return autoUpdate2;
|
|
30452
|
+
},
|
|
30453
|
+
platform: function() {
|
|
30454
|
+
return platform2;
|
|
30446
30455
|
}
|
|
30447
30456
|
});
|
|
30448
30457
|
module2.exports = __toCommonJS2(Floating_native_exports);
|
|
30449
30458
|
__reExport2(Floating_native_exports, require_floating_ui_react_native(), module2.exports);
|
|
30450
|
-
var
|
|
30451
|
-
};
|
|
30459
|
+
var autoUpdate2 = function() {
|
|
30460
|
+
}, platform2 = null;
|
|
30452
30461
|
}
|
|
30453
30462
|
});
|
|
30454
30463
|
|
|
@@ -30557,8 +30566,6 @@ var require_index_native56 = __commonJS({
|
|
|
30557
30566
|
}
|
|
30558
30567
|
}
|
|
30559
30568
|
return to;
|
|
30560
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
30561
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
30562
30569
|
}, __toCommonJS2 = function(mod) {
|
|
30563
30570
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30564
30571
|
value: !0
|
|
@@ -30568,13 +30575,48 @@ var require_index_native56 = __commonJS({
|
|
|
30568
30575
|
FloatingOverrideContext: function() {
|
|
30569
30576
|
return import_useFloating.FloatingOverrideContext;
|
|
30570
30577
|
},
|
|
30578
|
+
arrow: function() {
|
|
30579
|
+
return import_Floating.arrow;
|
|
30580
|
+
},
|
|
30581
|
+
autoPlacement: function() {
|
|
30582
|
+
return import_Floating.autoPlacement;
|
|
30583
|
+
},
|
|
30584
|
+
autoUpdate: function() {
|
|
30585
|
+
return import_Floating.autoUpdate;
|
|
30586
|
+
},
|
|
30587
|
+
detectOverflow: function() {
|
|
30588
|
+
return import_Floating.detectOverflow;
|
|
30589
|
+
},
|
|
30590
|
+
flip: function() {
|
|
30591
|
+
return import_Floating.flip;
|
|
30592
|
+
},
|
|
30593
|
+
hide: function() {
|
|
30594
|
+
return import_Floating.hide;
|
|
30595
|
+
},
|
|
30596
|
+
inline: function() {
|
|
30597
|
+
return import_Floating.inline;
|
|
30598
|
+
},
|
|
30599
|
+
limitShift: function() {
|
|
30600
|
+
return import_Floating.limitShift;
|
|
30601
|
+
},
|
|
30602
|
+
offset: function() {
|
|
30603
|
+
return import_Floating.offset;
|
|
30604
|
+
},
|
|
30605
|
+
platform: function() {
|
|
30606
|
+
return import_Floating.platform;
|
|
30607
|
+
},
|
|
30608
|
+
shift: function() {
|
|
30609
|
+
return import_Floating.shift;
|
|
30610
|
+
},
|
|
30611
|
+
size: function() {
|
|
30612
|
+
return import_Floating.size;
|
|
30613
|
+
},
|
|
30571
30614
|
useFloating: function() {
|
|
30572
30615
|
return import_useFloating.useFloating;
|
|
30573
30616
|
}
|
|
30574
30617
|
});
|
|
30575
30618
|
module2.exports = __toCommonJS2(src_exports2);
|
|
30576
|
-
|
|
30577
|
-
var import_useFloating = require_useFloating_native();
|
|
30619
|
+
var import_Floating = require_Floating_native(), import_useFloating = require_useFloating_native();
|
|
30578
30620
|
}
|
|
30579
30621
|
});
|
|
30580
30622
|
|
|
@@ -30765,7 +30807,7 @@ var require_Popper_native = __commonJS({
|
|
|
30765
30807
|
Object.assign(setupOptions, options);
|
|
30766
30808
|
}
|
|
30767
30809
|
function Popper(props) {
|
|
30768
|
-
var _middlewareData_checkFloating, children = props.children,
|
|
30810
|
+
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)({
|
|
30769
30811
|
strategy,
|
|
30770
30812
|
placement,
|
|
30771
30813
|
sameScrollView: !1,
|
|
@@ -30805,7 +30847,7 @@ var require_Popper_native = __commonJS({
|
|
|
30805
30847
|
keyboardOpen
|
|
30806
30848
|
]);
|
|
30807
30849
|
var popperContext = _object_spread9({
|
|
30808
|
-
size:
|
|
30850
|
+
size: size4,
|
|
30809
30851
|
arrowRef: setArrow,
|
|
30810
30852
|
arrowStyle: middlewareData.arrow,
|
|
30811
30853
|
onArrowSize: setArrowSize,
|
|
@@ -30859,7 +30901,7 @@ var require_Popper_native = __commonJS({
|
|
|
30859
30901
|
var __scopePopper = props.__scopePopper, enableAnimationForPositionChange = props.enableAnimationForPositionChange, rest = _object_without_properties5(props, [
|
|
30860
30902
|
"__scopePopper",
|
|
30861
30903
|
"enableAnimationForPositionChange"
|
|
30862
|
-
]), _usePopperContext = usePopperContext(__scopePopper), strategy = _usePopperContext.strategy, placement = _usePopperContext.placement, refs = _usePopperContext.refs, x = _usePopperContext.x, y = _usePopperContext.y, getFloatingProps = _usePopperContext.getFloatingProps,
|
|
30904
|
+
]), _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;
|
|
30863
30905
|
if (import_constants4.isAndroid) {
|
|
30864
30906
|
var initialRender = React2.useRef(!0), finalHasFloating = React2.useRef(!1);
|
|
30865
30907
|
hasFloating === !1 && (initialRender.current = !1), initialRender.current || (finalHasFloating.current = hasFloating), finalHasFloatingValue = finalHasFloating.current;
|
|
@@ -30869,7 +30911,7 @@ var require_Popper_native = __commonJS({
|
|
|
30869
30911
|
"data-placement": placement,
|
|
30870
30912
|
"data-strategy": strategy,
|
|
30871
30913
|
contain: "layout",
|
|
30872
|
-
size:
|
|
30914
|
+
size: size4
|
|
30873
30915
|
}, rest), "popper-content-frame");
|
|
30874
30916
|
}, [
|
|
30875
30917
|
placement,
|
|
@@ -30956,7 +30998,7 @@ var require_Popper_native = __commonJS({
|
|
|
30956
30998
|
}, PopperArrow = PopperArrowFrame.styleable(function(propsIn, forwardedRef) {
|
|
30957
30999
|
var _context_arrowStyle, _context_arrowStyle1, __scopePopper = propsIn.__scopePopper, rest = _object_without_properties5(propsIn, [
|
|
30958
31000
|
"__scopePopper"
|
|
30959
|
-
]), props = (0, import_core12.useProps)(rest),
|
|
31001
|
+
]), 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, [
|
|
30960
31002
|
"offset",
|
|
30961
31003
|
"size",
|
|
30962
31004
|
"borderWidth"
|
|
@@ -30965,20 +31007,20 @@ var require_Popper_native = __commonJS({
|
|
|
30965
31007
|
bounds: [
|
|
30966
31008
|
2
|
|
30967
31009
|
]
|
|
30968
|
-
})),
|
|
31010
|
+
})), 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 = {
|
|
30969
31011
|
x,
|
|
30970
31012
|
y,
|
|
30971
|
-
width:
|
|
30972
|
-
height:
|
|
31013
|
+
width: size4,
|
|
31014
|
+
height: size4
|
|
30973
31015
|
}, innerArrowStyle = {}, isVertical = primaryPlacement === "bottom" || primaryPlacement === "top";
|
|
30974
31016
|
if (primaryPlacement) {
|
|
30975
|
-
arrowStyle[isVertical ? "width" : "height"] =
|
|
31017
|
+
arrowStyle[isVertical ? "width" : "height"] = size4 * 2;
|
|
30976
31018
|
var oppSide = opposites[primaryPlacement];
|
|
30977
|
-
oppSide && (arrowStyle[oppSide] = -
|
|
31019
|
+
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() {
|
|
30978
31020
|
var _context_onArrowSize;
|
|
30979
|
-
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context,
|
|
31021
|
+
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context, size4);
|
|
30980
31022
|
}, [
|
|
30981
|
-
|
|
31023
|
+
size4,
|
|
30982
31024
|
context.onArrowSize
|
|
30983
31025
|
]);
|
|
30984
31026
|
}
|
|
@@ -30986,8 +31028,8 @@ var require_Popper_native = __commonJS({
|
|
|
30986
31028
|
ref: refs
|
|
30987
31029
|
}, arrowStyle), {
|
|
30988
31030
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperArrowFrame, _object_spread9(_object_spread_props8(_object_spread9({
|
|
30989
|
-
width:
|
|
30990
|
-
height:
|
|
31031
|
+
width: size4,
|
|
31032
|
+
height: size4
|
|
30991
31033
|
}, arrowProps, innerArrowStyle), {
|
|
30992
31034
|
rotate: "45deg"
|
|
30993
31035
|
}), primaryPlacement === "bottom" && {
|
|
@@ -31897,10 +31939,10 @@ var require_Progress_native = __commonJS({
|
|
|
31897
31939
|
},
|
|
31898
31940
|
size: {
|
|
31899
31941
|
"...size": function(val) {
|
|
31900
|
-
var
|
|
31942
|
+
var size4 = Math.round((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) * 0.25);
|
|
31901
31943
|
return {
|
|
31902
|
-
height:
|
|
31903
|
-
minWidth: (0, import_core12.getVariableValue)(
|
|
31944
|
+
height: size4,
|
|
31945
|
+
minWidth: (0, import_core12.getVariableValue)(size4) * 20,
|
|
31904
31946
|
width: "100%"
|
|
31905
31947
|
};
|
|
31906
31948
|
}
|
|
@@ -31910,7 +31952,7 @@ var require_Progress_native = __commonJS({
|
|
|
31910
31952
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
31911
31953
|
}
|
|
31912
31954
|
}), Progress = (0, import_helpers.withStaticProperties)(ProgressFrame.styleable(function(props, forwardedRef) {
|
|
31913
|
-
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,
|
|
31955
|
+
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, [
|
|
31914
31956
|
"__scopeProgress",
|
|
31915
31957
|
"value",
|
|
31916
31958
|
"max",
|
|
@@ -31933,7 +31975,7 @@ var require_Progress_native = __commonJS({
|
|
|
31933
31975
|
"data-value": value ?? void 0,
|
|
31934
31976
|
"data-max": max2
|
|
31935
31977
|
}, progressProps.unstyled !== !0 && {
|
|
31936
|
-
size:
|
|
31978
|
+
size: size4
|
|
31937
31979
|
}, progressProps), {
|
|
31938
31980
|
onLayout: function(e) {
|
|
31939
31981
|
var _progressProps_onLayout;
|
|
@@ -32097,10 +32139,10 @@ var require_RadioGroup_native = __commonJS({
|
|
|
32097
32139
|
},
|
|
32098
32140
|
size: {
|
|
32099
32141
|
"...size": function(value, param) {
|
|
32100
|
-
var props = param.props, _props_scaleSize,
|
|
32142
|
+
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));
|
|
32101
32143
|
return {
|
|
32102
|
-
width:
|
|
32103
|
-
height:
|
|
32144
|
+
width: size4,
|
|
32145
|
+
height: size4
|
|
32104
32146
|
};
|
|
32105
32147
|
}
|
|
32106
32148
|
}
|
|
@@ -33925,7 +33967,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
33925
33967
|
"index"
|
|
33926
33968
|
]), _useListItem = (0, import_list_item.useListItem)(_object_spread9({}, !props.unstyled && {
|
|
33927
33969
|
ellipse: !0
|
|
33928
|
-
}, 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,
|
|
33970
|
+
}, 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];
|
|
33929
33971
|
React2.useEffect(function() {
|
|
33930
33972
|
return activeIndexSubscribe(function(i) {
|
|
33931
33973
|
var isActive = index === i;
|
|
@@ -34005,7 +34047,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
34005
34047
|
hoverTheme: !0,
|
|
34006
34048
|
focusTheme: !0,
|
|
34007
34049
|
cursor: "default",
|
|
34008
|
-
size:
|
|
34050
|
+
size: size4,
|
|
34009
34051
|
outlineOffset: -0.5,
|
|
34010
34052
|
focusVisibleStyle: {
|
|
34011
34053
|
outlineColor: "$outlineColor",
|
|
@@ -34787,10 +34829,10 @@ var require_Select_native = __commonJS({
|
|
|
34787
34829
|
}), SelectGroup = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
34788
34830
|
var __scopeSelect = props.__scopeSelect, groupProps = _object_without_properties5(props, [
|
|
34789
34831
|
"__scopeSelect"
|
|
34790
|
-
]), groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), _itemParentContext_size,
|
|
34832
|
+
]), 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() {
|
|
34791
34833
|
return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
|
|
34792
34834
|
asChild: !0,
|
|
34793
|
-
size:
|
|
34835
|
+
size: size4,
|
|
34794
34836
|
// @ts-expect-error until we support typing based on tag
|
|
34795
34837
|
value: context.value,
|
|
34796
34838
|
id: itemParentContext.id,
|
|
@@ -34799,7 +34841,7 @@ var require_Select_native = __commonJS({
|
|
|
34799
34841
|
onChange: function(event) {
|
|
34800
34842
|
itemParentContext.onChange(event.currentTarget.value);
|
|
34801
34843
|
},
|
|
34802
|
-
size:
|
|
34844
|
+
size: size4,
|
|
34803
34845
|
ref: nativeSelectRef,
|
|
34804
34846
|
style: {
|
|
34805
34847
|
color: "var(--color)",
|
|
@@ -35314,14 +35356,14 @@ var require_helpers_native2 = __commonJS({
|
|
|
35314
35356
|
return distances.indexOf(closestDistance);
|
|
35315
35357
|
}
|
|
35316
35358
|
function getThumbInBoundsOffset(width, left, direction) {
|
|
35317
|
-
var quarterWidth = width / 4, halfPercent = 50,
|
|
35359
|
+
var quarterWidth = width / 4, halfPercent = 50, offset4 = linearScale([
|
|
35318
35360
|
0,
|
|
35319
35361
|
halfPercent
|
|
35320
35362
|
], [
|
|
35321
35363
|
0,
|
|
35322
35364
|
quarterWidth
|
|
35323
35365
|
]);
|
|
35324
|
-
return (quarterWidth -
|
|
35366
|
+
return (quarterWidth - offset4(left) * direction) * direction;
|
|
35325
35367
|
}
|
|
35326
35368
|
function getStepsBetweenValues(values) {
|
|
35327
35369
|
return values.slice(0, -1).map(function(value, index) {
|
|
@@ -35479,14 +35521,14 @@ var require_SliderImpl_native = __commonJS({
|
|
|
35479
35521
|
},
|
|
35480
35522
|
size: function(val, extras) {
|
|
35481
35523
|
if (val) {
|
|
35482
|
-
var orientation = extras.props.orientation,
|
|
35524
|
+
var orientation = extras.props.orientation, size5 = Math.round((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(val)) / 6);
|
|
35483
35525
|
return orientation === "horizontal" ? {
|
|
35484
|
-
height:
|
|
35485
|
-
borderRadius:
|
|
35526
|
+
height: size5,
|
|
35527
|
+
borderRadius: size5,
|
|
35486
35528
|
justifyContent: "center"
|
|
35487
35529
|
} : {
|
|
35488
|
-
width:
|
|
35489
|
-
borderRadius:
|
|
35530
|
+
width: size5,
|
|
35531
|
+
borderRadius: size5,
|
|
35490
35532
|
alignItems: "center"
|
|
35491
35533
|
};
|
|
35492
35534
|
}
|
|
@@ -35975,14 +36017,14 @@ var require_Slider_native = __commonJS({
|
|
|
35975
36017
|
});
|
|
35976
36018
|
SliderTrackActive.displayName = RANGE_NAME;
|
|
35977
36019
|
var THUMB_NAME = "SliderThumb", getThumbSize = function(val) {
|
|
35978
|
-
var tokens = (0, import_core12.getTokens)(),
|
|
36020
|
+
var tokens = (0, import_core12.getTokens)(), size4 = typeof val == "number" ? val : (0, import_get_token2.getSize)(tokens.size[val], {
|
|
35979
36021
|
shift: -1
|
|
35980
36022
|
});
|
|
35981
36023
|
return {
|
|
35982
|
-
width:
|
|
35983
|
-
height:
|
|
35984
|
-
minWidth:
|
|
35985
|
-
minHeight:
|
|
36024
|
+
width: size4,
|
|
36025
|
+
height: size4,
|
|
36026
|
+
minWidth: size4,
|
|
36027
|
+
minHeight: size4
|
|
35986
36028
|
};
|
|
35987
36029
|
}, SliderThumbFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
35988
36030
|
name: "SliderThumb",
|
|
@@ -36013,7 +36055,7 @@ var require_Slider_native = __commonJS({
|
|
|
36013
36055
|
]), 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() {
|
|
36014
36056
|
var estimatedSize = (0, import_core12.getVariableValue)(getThumbSize(sizeIn).width);
|
|
36015
36057
|
return estimatedSize;
|
|
36016
|
-
}), 2),
|
|
36058
|
+
}), 2), size4 = _React_useState1[0], setSize = _React_useState1[1], thumbInBoundsOffset = size4 ? (0, import_helpers3.getThumbInBoundsOffset)(size4, percent, orientation.direction) : 0;
|
|
36017
36059
|
React2.useEffect(function() {
|
|
36018
36060
|
if (thumb) return context.thumbs.set(thumb, index), function() {
|
|
36019
36061
|
context.thumbs.delete(thumb);
|
|
@@ -36024,17 +36066,17 @@ var require_Slider_native = __commonJS({
|
|
|
36024
36066
|
index
|
|
36025
36067
|
]);
|
|
36026
36068
|
var positionalStyles = context.orientation === "horizontal" ? _object_spread9({
|
|
36027
|
-
x: thumbInBoundsOffset -
|
|
36028
|
-
y: -
|
|
36069
|
+
x: thumbInBoundsOffset - size4 / 2,
|
|
36070
|
+
y: -size4 / 2,
|
|
36029
36071
|
top: "50%"
|
|
36030
|
-
},
|
|
36072
|
+
}, size4 === 0 && {
|
|
36031
36073
|
top: "auto",
|
|
36032
36074
|
bottom: "auto"
|
|
36033
36075
|
}) : _object_spread9({
|
|
36034
|
-
x: -
|
|
36035
|
-
y:
|
|
36076
|
+
x: -size4 / 2,
|
|
36077
|
+
y: size4 / 2,
|
|
36036
36078
|
left: "50%"
|
|
36037
|
-
},
|
|
36079
|
+
}, size4 === 0 && {
|
|
36038
36080
|
left: "auto",
|
|
36039
36081
|
right: "auto"
|
|
36040
36082
|
}), _obj;
|
|
@@ -36638,10 +36680,10 @@ var require_Switch_native = __commonJS({
|
|
|
36638
36680
|
},
|
|
36639
36681
|
size: {
|
|
36640
36682
|
"...size": function(val) {
|
|
36641
|
-
var
|
|
36683
|
+
var size4 = getSwitchHeight(val);
|
|
36642
36684
|
return {
|
|
36643
|
-
height:
|
|
36644
|
-
width:
|
|
36685
|
+
height: size4,
|
|
36686
|
+
width: size4
|
|
36645
36687
|
};
|
|
36646
36688
|
}
|
|
36647
36689
|
}
|
|
@@ -36856,12 +36898,12 @@ var require_createSwitch_native = __commonJS({
|
|
|
36856
36898
|
"size",
|
|
36857
36899
|
"unstyled",
|
|
36858
36900
|
"nativeID"
|
|
36859
|
-
]), 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,
|
|
36901
|
+
]), 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;
|
|
36860
36902
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Thumb, _object_spread9(_object_spread_props8(_object_spread9({
|
|
36861
36903
|
ref: forwardedRef,
|
|
36862
36904
|
unstyled
|
|
36863
36905
|
}, unstyled === !1 && _object_spread9({
|
|
36864
|
-
size:
|
|
36906
|
+
size: size4
|
|
36865
36907
|
}, !disableActiveTheme && {
|
|
36866
36908
|
theme: checked ? "active" : null
|
|
36867
36909
|
})), {
|
|
@@ -37363,7 +37405,7 @@ var require_Tabs_native = __commonJS({
|
|
|
37363
37405
|
}), TABS_NAME = "Tabs", _createStyledContext = (0, import_web.createStyledContext)(), TabsProvider = _createStyledContext.Provider, useTabsContext = _createStyledContext.useStyledContext, TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
|
|
37364
37406
|
name: TABS_NAME
|
|
37365
37407
|
}), TabsComponent = TabsFrame.styleable(function(props, forwardedRef) {
|
|
37366
|
-
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,
|
|
37408
|
+
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, [
|
|
37367
37409
|
"__scopeTabs",
|
|
37368
37410
|
"value",
|
|
37369
37411
|
"onValueChange",
|
|
@@ -37393,7 +37435,7 @@ var require_Tabs_native = __commonJS({
|
|
|
37393
37435
|
orientation,
|
|
37394
37436
|
dir: direction,
|
|
37395
37437
|
activationMode,
|
|
37396
|
-
size:
|
|
37438
|
+
size: size4,
|
|
37397
37439
|
registerTrigger,
|
|
37398
37440
|
triggersCount,
|
|
37399
37441
|
unregisterTrigger,
|
|
@@ -38364,11 +38406,11 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
38364
38406
|
"disablePassStyles"
|
|
38365
38407
|
]), 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)({
|
|
38366
38408
|
disabled
|
|
38367
|
-
}), _props_size,
|
|
38409
|
+
}), _props_size, size4 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
|
|
38368
38410
|
width: void 0,
|
|
38369
38411
|
height: void 0,
|
|
38370
|
-
padding: (0, import_web.getVariableValue)(
|
|
38371
|
-
}, iconSize = (typeof
|
|
38412
|
+
padding: (0, import_web.getVariableValue)(size4) * 0.6
|
|
38413
|
+
}, 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)({
|
|
38372
38414
|
size: iconSize,
|
|
38373
38415
|
color: theme.color
|
|
38374
38416
|
}), childrens = import_react4.default.Children.toArray(props.children), children = childrens.map(function(child) {
|
|
@@ -38549,12 +38591,12 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
38549
38591
|
dir: direction
|
|
38550
38592
|
}, toggleGroupProps), adjustedSize = (0, import_web.getVariableValue)((0, import_get_token2.getSize)(sizeProp, {
|
|
38551
38593
|
shift: sizeAdjust
|
|
38552
|
-
})),
|
|
38594
|
+
})), size4 = Math.round(adjustedSize * 0.45);
|
|
38553
38595
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupContext, {
|
|
38554
38596
|
scope: __scopeToggleGroup,
|
|
38555
38597
|
rovingFocus,
|
|
38556
38598
|
disabled,
|
|
38557
|
-
size:
|
|
38599
|
+
size: size4,
|
|
38558
38600
|
children: rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
38559
38601
|
asChild: "except-style",
|
|
38560
38602
|
__scopeRovingFocusGroup: __scopeToggleGroup || TOGGLE_GROUP_CONTEXT,
|
|
@@ -39558,7 +39600,7 @@ function _object_without_properties_loose4(source, excluded) {
|
|
|
39558
39600
|
return target;
|
|
39559
39601
|
}
|
|
39560
39602
|
var Spinner = import_stacks2.YStack.extractable((0, import_core8.themeable)(/* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
39561
|
-
var
|
|
39603
|
+
var size4 = props.size, colorProp = props.color, stackProps = _object_without_properties4(props, [
|
|
39562
39604
|
"size",
|
|
39563
39605
|
"color"
|
|
39564
39606
|
]), theme = (0, import_core8.useTheme)(), color = colorProp;
|
|
@@ -39566,7 +39608,7 @@ var Spinner = import_stacks2.YStack.extractable((0, import_core8.themeable)(/* @
|
|
|
39566
39608
|
ref
|
|
39567
39609
|
}, stackProps), {
|
|
39568
39610
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native3.ActivityIndicator, {
|
|
39569
|
-
size:
|
|
39611
|
+
size: size4,
|
|
39570
39612
|
color
|
|
39571
39613
|
})
|
|
39572
39614
|
}));
|