tamagui 1.79.0 → 1.79.2
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 +21 -11
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +19 -9
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
- package/types/views/Anchor.d.ts +14 -14
- package/types/views/EnsureFlexed.d.ts +5 -5
- package/types/views/Fieldset.d.ts +5 -5
- package/types/views/Input.d.ts +3 -2
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/Layouts.d.ts +35 -35
- package/types/views/Text.d.ts +4 -4
- package/types/views/TextArea.d.ts +1 -1
- package/types/views/VisuallyHidden.d.ts +4 -4
package/dist/native.js
CHANGED
|
@@ -2804,18 +2804,18 @@ var require_propMapper_native = __commonJS({
|
|
|
2804
2804
|
fontSize: "size",
|
|
2805
2805
|
fontWeight: "weight"
|
|
2806
2806
|
}, lastFontFamilyToken = null, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
2807
|
-
var _a, _b;
|
|
2807
|
+
var _a, _b, _c;
|
|
2808
2808
|
if (resolveAs === "none")
|
|
2809
2809
|
return value;
|
|
2810
2810
|
let { theme, conf = (0, import_config.getConfig)(), context, fontFamily } = styleState, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1;
|
|
2811
2811
|
if (theme && value in theme)
|
|
2812
|
-
process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(` -
|
|
2812
|
+
valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(` - resolving ${key} to theme value ${value}: ${(_a = valOrVar == null ? void 0 : valOrVar.get) == null ? void 0 : _a.call(valOrVar)}`), hasSet = !0;
|
|
2813
2813
|
else if (value in conf.specificTokens)
|
|
2814
2814
|
hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
2815
2815
|
else {
|
|
2816
2816
|
switch (key) {
|
|
2817
2817
|
case "fontFamily": {
|
|
2818
|
-
valOrVar = ((
|
|
2818
|
+
valOrVar = ((_b = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]) == null ? void 0 : _b.family) || value, lastFontFamilyToken = value, hasSet = !0;
|
|
2819
2819
|
break;
|
|
2820
2820
|
}
|
|
2821
2821
|
case "fontSize":
|
|
@@ -2825,7 +2825,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2825
2825
|
let defaultFont = conf.defaultFont || "$body", fam = fontFamily || defaultFont;
|
|
2826
2826
|
if (fam) {
|
|
2827
2827
|
let fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed[fam] || fontsParsed[defaultFont];
|
|
2828
|
-
valOrVar = ((
|
|
2828
|
+
valOrVar = ((_c = font == null ? void 0 : font[fontShorthand[key] || key]) == null ? void 0 : _c[value]) || value, hasSet = !0;
|
|
2829
2829
|
}
|
|
2830
2830
|
break;
|
|
2831
2831
|
}
|
|
@@ -2842,7 +2842,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2842
2842
|
}
|
|
2843
2843
|
if (hasSet) {
|
|
2844
2844
|
let out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
2845
|
-
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar
|
|
2845
|
+
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar, out), out;
|
|
2846
2846
|
}
|
|
2847
2847
|
return process.env.NODE_ENV === "development" && import_isDevTools.isDevTools && styleState.debug === "verbose" && (console.groupCollapsed(" \uFE52 propMap (val)", key, value), console.info({ valOrVar, theme, hasSet }, theme ? theme[key] : ""), console.groupEnd()), value;
|
|
2848
2848
|
};
|
|
@@ -2852,7 +2852,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2852
2852
|
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
2853
2853
|
if (resolveValues === "value")
|
|
2854
2854
|
return valOrVar.val;
|
|
2855
|
-
let get = valOrVar.get;
|
|
2855
|
+
let get = valOrVar == null ? void 0 : valOrVar.get;
|
|
2856
2856
|
return key !== "shadowColor" && typeof get == "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.val;
|
|
2857
2857
|
}
|
|
2858
2858
|
return valOrVar;
|
|
@@ -4258,6 +4258,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4258
4258
|
componentName,
|
|
4259
4259
|
disable: disableTheme,
|
|
4260
4260
|
shallow: stateRef.current.themeShallow,
|
|
4261
|
+
inverse: props.themeInverse,
|
|
4261
4262
|
debug: debugProp
|
|
4262
4263
|
};
|
|
4263
4264
|
typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = () => stateRef.current.isListeningToTheme), themeStateProps.deopt = willBeAnimated;
|
|
@@ -12046,7 +12047,8 @@ var require_Button_native = __commonJS({
|
|
|
12046
12047
|
letterSpacing: void 0,
|
|
12047
12048
|
maxFontSizeMultiplier: void 0,
|
|
12048
12049
|
size: void 0,
|
|
12049
|
-
textAlign: void 0
|
|
12050
|
+
textAlign: void 0,
|
|
12051
|
+
variant: void 0
|
|
12050
12052
|
}), BUTTON_NAME = "Button", ButtonFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
12051
12053
|
name: BUTTON_NAME,
|
|
12052
12054
|
tag: "button",
|
|
@@ -12159,9 +12161,9 @@ var require_Button_native = __commonJS({
|
|
|
12159
12161
|
noTextWrap,
|
|
12160
12162
|
fontFamily,
|
|
12161
12163
|
fontSize
|
|
12162
|
-
} = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
12164
|
+
} = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
12163
12165
|
size: iconSize,
|
|
12164
|
-
color
|
|
12166
|
+
color
|
|
12165
12167
|
}), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
|
|
12166
12168
|
Text3,
|
|
12167
12169
|
{ children: propsIn.children, fontFamily, fontSize, textProps },
|
|
@@ -15466,11 +15468,19 @@ var require_Popover_native = __commonJS({
|
|
|
15466
15468
|
})
|
|
15467
15469
|
);
|
|
15468
15470
|
function PopoverRepropagateContext(props) {
|
|
15469
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, { ...props.popperContext, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, { ...props.context, children: props.children }) });
|
|
15471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, { scope: props.scope, ...props.popperContext, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, { ...props.context, children: props.children }) });
|
|
15470
15472
|
}
|
|
15471
15473
|
function PopoverContentPortal(props) {
|
|
15472
15474
|
let { __scopePopover } = props, zIndex = props.zIndex ?? 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core13.useThemeName)(), contents = props.children;
|
|
15473
|
-
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15475
|
+
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15476
|
+
PopoverRepropagateContext,
|
|
15477
|
+
{
|
|
15478
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
15479
|
+
popperContext,
|
|
15480
|
+
context,
|
|
15481
|
+
children: props.children
|
|
15482
|
+
}
|
|
15483
|
+
)), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_core13.Theme, { name: themeName, children: [
|
|
15474
15484
|
!!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15475
15485
|
import_stacks3.YStack,
|
|
15476
15486
|
{
|