tamagui 1.77.0 → 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 +28 -9
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +28 -9
- 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/test.native.js
CHANGED
|
@@ -2582,8 +2582,13 @@ var require_propMapper_native = __commonJS({
|
|
|
2582
2582
|
});
|
|
2583
2583
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
2584
2584
|
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) => {
|
|
2585
|
+
var _a;
|
|
2585
2586
|
if (!import_constants.isAndroid && key === "elevationAndroid")
|
|
2586
2587
|
return;
|
|
2588
|
+
if (value === "unset") {
|
|
2589
|
+
let unsetVal = (_a = styleStateIn.conf.unset) == null ? void 0 : _a[key];
|
|
2590
|
+
unsetVal != null && (value = unsetVal);
|
|
2591
|
+
}
|
|
2587
2592
|
let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
|
|
2588
2593
|
get(_, k) {
|
|
2589
2594
|
return k === "curProps" ? subProps : Reflect.get(_, k);
|
|
@@ -2596,8 +2601,12 @@ var require_propMapper_native = __commonJS({
|
|
|
2596
2601
|
return variantValue;
|
|
2597
2602
|
}
|
|
2598
2603
|
let shouldReturn = !1;
|
|
2599
|
-
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)
|
|
2600
|
-
|
|
2604
|
+
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) {
|
|
2605
|
+
let result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [
|
|
2606
|
+
[key, value]
|
|
2607
|
+
];
|
|
2608
|
+
return key === "fontFamily" && fontFamilyCache.set(result, lastFontFamilyToken), result;
|
|
2609
|
+
}
|
|
2601
2610
|
}, resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
2602
2611
|
let { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
2603
2612
|
if (!variants)
|
|
@@ -2710,7 +2719,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2710
2719
|
var fontShorthand = {
|
|
2711
2720
|
fontSize: "size",
|
|
2712
2721
|
fontWeight: "weight"
|
|
2713
|
-
}, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
2722
|
+
}, lastFontFamilyToken = null, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
2714
2723
|
var _a, _b;
|
|
2715
2724
|
if (resolveAs === "none")
|
|
2716
2725
|
return value;
|
|
@@ -2722,7 +2731,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2722
2731
|
else {
|
|
2723
2732
|
switch (key) {
|
|
2724
2733
|
case "fontFamily": {
|
|
2725
|
-
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;
|
|
2734
|
+
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;
|
|
2726
2735
|
break;
|
|
2727
2736
|
}
|
|
2728
2737
|
case "fontSize":
|
|
@@ -2783,7 +2792,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2783
2792
|
useSplitStyles: () => useSplitStyles
|
|
2784
2793
|
});
|
|
2785
2794
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
2786
|
-
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(),
|
|
2795
|
+
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) => {
|
|
2787
2796
|
var _a, _b, _c, _e, _f, _g;
|
|
2788
2797
|
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
2789
2798
|
let { shorthands } = conf, {
|
|
@@ -2796,7 +2805,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2796
2805
|
parentStaticConfig,
|
|
2797
2806
|
acceptsClassName
|
|
2798
2807
|
} = 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 = {
|
|
2799
|
-
curProps:
|
|
2808
|
+
curProps: { ...props },
|
|
2800
2809
|
classNames,
|
|
2801
2810
|
conf,
|
|
2802
2811
|
props,
|
|
@@ -2870,7 +2879,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2870
2879
|
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
2871
2880
|
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
2872
2881
|
continue;
|
|
2873
|
-
if (isText && valInit && (keyInit ===
|
|
2882
|
+
if (isText && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
2874
2883
|
style[keyInit] = valInit;
|
|
2875
2884
|
continue;
|
|
2876
2885
|
}
|
|
@@ -3015,7 +3024,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3015
3024
|
usedKeys,
|
|
3016
3025
|
mediaState3[mediaKeyShort],
|
|
3017
3026
|
importanceBump
|
|
3018
|
-
), key ===
|
|
3027
|
+
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
3019
3028
|
}
|
|
3020
3029
|
}
|
|
3021
3030
|
continue;
|
|
@@ -4871,6 +4880,10 @@ ${runtimeStyles}`;
|
|
|
4871
4880
|
animations: {},
|
|
4872
4881
|
media: {},
|
|
4873
4882
|
...configIn,
|
|
4883
|
+
unset: {
|
|
4884
|
+
fontFamily: configIn.defaultFont ? defaultFont : void 0,
|
|
4885
|
+
...configIn.unset
|
|
4886
|
+
},
|
|
4874
4887
|
settings: {
|
|
4875
4888
|
webContainerType: "size",
|
|
4876
4889
|
...configIn.settings
|
|
@@ -5457,6 +5470,7 @@ var require_Text_native = __commonJS({
|
|
|
5457
5470
|
acceptsClassName: !0,
|
|
5458
5471
|
isText: !0,
|
|
5459
5472
|
defaultProps: {
|
|
5473
|
+
fontFamily: "unset",
|
|
5460
5474
|
suppressHighlighting: !0
|
|
5461
5475
|
},
|
|
5462
5476
|
inlineWhenUnflattened: /* @__PURE__ */ new Set(["fontFamily"]),
|
|
@@ -17333,7 +17347,11 @@ var require_createSwitch_native = __commonJS({
|
|
|
17333
17347
|
nativeProps,
|
|
17334
17348
|
children,
|
|
17335
17349
|
...switchProps
|
|
17336
|
-
} = props, native = Array.isArray(nativeProp) ? nativeProp : [nativeProp], shouldRenderMobileNative = !import_core13.isWeb && nativeProp === !0 || !import_core13.isWeb && native.includes("mobile") || native.includes("android") && import_react_native4.Platform.OS === "android" || native.includes("ios") && import_react_native4.Platform.OS === "ios", [button, setButton] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(
|
|
17350
|
+
} = props, native = Array.isArray(nativeProp) ? nativeProp : [nativeProp], shouldRenderMobileNative = !import_core13.isWeb && nativeProp === !0 || !import_core13.isWeb && native.includes("mobile") || native.includes("android") && import_react_native4.Platform.OS === "android" || native.includes("ios") && import_react_native4.Platform.OS === "ios", [button, setButton] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(
|
|
17351
|
+
forwardedRef,
|
|
17352
|
+
// @ts-expect-error
|
|
17353
|
+
setButton
|
|
17354
|
+
), labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, hasConsumerStoppedPropagationRef = React2.useRef(!1), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [frameWidth, setFrameWidth] = React2.useState(0), [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
17337
17355
|
prop: checkedProp,
|
|
17338
17356
|
defaultProp: defaultChecked || !1,
|
|
17339
17357
|
onChange: onCheckedChange,
|
|
@@ -17357,6 +17375,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
17357
17375
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17358
17376
|
Frame,
|
|
17359
17377
|
{
|
|
17378
|
+
tag: "button",
|
|
17360
17379
|
unstyled,
|
|
17361
17380
|
size: size2,
|
|
17362
17381
|
checked,
|