tamagui 1.77.1 → 1.78.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 +22 -8
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +22 -8
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
- package/types/views/Fieldset.d.ts +5 -5
- package/types/views/Input.d.ts +119 -122
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/Layouts.d.ts +42 -42
- package/types/views/VisuallyHidden.d.ts +5 -5
package/dist/native.js
CHANGED
|
@@ -2649,8 +2649,13 @@ var require_propMapper_native = __commonJS({
|
|
|
2649
2649
|
});
|
|
2650
2650
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
2651
2651
|
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStylesAndRemoveNullishValues = require_expandStylesAndRemoveNullishValues_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
2652
|
+
var _a;
|
|
2652
2653
|
if (!import_constants.isAndroid && key === "elevationAndroid")
|
|
2653
2654
|
return;
|
|
2655
|
+
if (value === "unset") {
|
|
2656
|
+
let unsetVal = (_a = styleStateIn.conf.unset) == null ? void 0 : _a[key];
|
|
2657
|
+
unsetVal != null && (value = unsetVal);
|
|
2658
|
+
}
|
|
2654
2659
|
let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
|
|
2655
2660
|
get(_, k) {
|
|
2656
2661
|
return k === "curProps" ? subProps : Reflect.get(_, k);
|
|
@@ -2667,8 +2672,12 @@ var require_propMapper_native = __commonJS({
|
|
|
2667
2672
|
return variantValue;
|
|
2668
2673
|
}
|
|
2669
2674
|
let shouldReturn = !1;
|
|
2670
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), shouldReturn || value != null)
|
|
2671
|
-
|
|
2675
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), shouldReturn || value != null) {
|
|
2676
|
+
let result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [
|
|
2677
|
+
[key, value]
|
|
2678
|
+
];
|
|
2679
|
+
return key === "fontFamily" && fontFamilyCache.set(result, lastFontFamilyToken), result;
|
|
2680
|
+
}
|
|
2672
2681
|
}, resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
2673
2682
|
let { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
2674
2683
|
if (!variants)
|
|
@@ -2794,7 +2803,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2794
2803
|
var fontShorthand = {
|
|
2795
2804
|
fontSize: "size",
|
|
2796
2805
|
fontWeight: "weight"
|
|
2797
|
-
}, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
2806
|
+
}, lastFontFamilyToken = null, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
2798
2807
|
var _a, _b;
|
|
2799
2808
|
if (resolveAs === "none")
|
|
2800
2809
|
return value;
|
|
@@ -2806,7 +2815,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2806
2815
|
else {
|
|
2807
2816
|
switch (key) {
|
|
2808
2817
|
case "fontFamily": {
|
|
2809
|
-
valOrVar = ((_a = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]) == null ? void 0 : _a.family) || value, hasSet = !0;
|
|
2818
|
+
valOrVar = ((_a = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]) == null ? void 0 : _a.family) || value, lastFontFamilyToken = value, hasSet = !0;
|
|
2810
2819
|
break;
|
|
2811
2820
|
}
|
|
2812
2821
|
case "fontSize":
|
|
@@ -2871,7 +2880,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2871
2880
|
useSplitStyles: () => useSplitStyles
|
|
2872
2881
|
});
|
|
2873
2882
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
2874
|
-
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(),
|
|
2883
|
+
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
2875
2884
|
var _a, _b, _c, _e, _f, _g;
|
|
2876
2885
|
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
2877
2886
|
let { shorthands } = conf, {
|
|
@@ -2884,7 +2893,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2884
2893
|
parentStaticConfig,
|
|
2885
2894
|
acceptsClassName
|
|
2886
2895
|
} = staticConfig, validStyleProps = isText ? import_helpers.stylePropsText : import_helpers.validStyles, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = [], classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, style = {}, className = "", mediaStylesSeen = 0, styleState = {
|
|
2887
|
-
curProps:
|
|
2896
|
+
curProps: { ...props },
|
|
2888
2897
|
classNames,
|
|
2889
2898
|
conf,
|
|
2890
2899
|
props,
|
|
@@ -2976,7 +2985,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2976
2985
|
parentStaticConfig
|
|
2977
2986
|
}), console.groupEnd()), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
2978
2987
|
continue;
|
|
2979
|
-
if (isText && valInit && (keyInit ===
|
|
2988
|
+
if (isText && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
2980
2989
|
style[keyInit] = valInit;
|
|
2981
2990
|
continue;
|
|
2982
2991
|
}
|
|
@@ -3169,7 +3178,7 @@ current`, {
|
|
|
3169
3178
|
usedKeys,
|
|
3170
3179
|
mediaState3[mediaKeyShort],
|
|
3171
3180
|
importanceBump
|
|
3172
|
-
), key ===
|
|
3181
|
+
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
3173
3182
|
}
|
|
3174
3183
|
}
|
|
3175
3184
|
continue;
|
|
@@ -5224,6 +5233,10 @@ ${runtimeStyles}`;
|
|
|
5224
5233
|
animations: {},
|
|
5225
5234
|
media: {},
|
|
5226
5235
|
...configIn,
|
|
5236
|
+
unset: {
|
|
5237
|
+
fontFamily: configIn.defaultFont ? defaultFont : void 0,
|
|
5238
|
+
...configIn.unset
|
|
5239
|
+
},
|
|
5227
5240
|
settings: {
|
|
5228
5241
|
webContainerType: "size",
|
|
5229
5242
|
...configIn.settings
|
|
@@ -5810,6 +5823,7 @@ var require_Text_native = __commonJS({
|
|
|
5810
5823
|
acceptsClassName: !0,
|
|
5811
5824
|
isText: !0,
|
|
5812
5825
|
defaultProps: {
|
|
5826
|
+
fontFamily: "unset",
|
|
5813
5827
|
suppressHighlighting: !0
|
|
5814
5828
|
},
|
|
5815
5829
|
inlineWhenUnflattened: /* @__PURE__ */ new Set(["fontFamily"]),
|