@tamagui/core 1.81.3 → 1.82.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/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +14 -11
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.native.js +14 -11
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +40 -20
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +36 -19
- package/dist/test.native.js.map +1 -1
- package/package.json +12 -9
- package/src/index.tsx +25 -19
package/dist/test.native.js
CHANGED
|
@@ -1050,6 +1050,7 @@ var require_validStyleProps_native = __commonJS({
|
|
|
1050
1050
|
borderTopWidth: !0,
|
|
1051
1051
|
borderWidth: !0,
|
|
1052
1052
|
transform: !0,
|
|
1053
|
+
transformOrigin: !0,
|
|
1053
1054
|
alignContent: !0,
|
|
1054
1055
|
alignItems: !0,
|
|
1055
1056
|
alignSelf: !0,
|
|
@@ -4360,6 +4361,7 @@ var require_ThemeDebug_native = __commonJS({
|
|
|
4360
4361
|
}) {
|
|
4361
4362
|
return children;
|
|
4362
4363
|
}
|
|
4364
|
+
ThemeDebug.displayName = "ThemeDebug";
|
|
4363
4365
|
}
|
|
4364
4366
|
});
|
|
4365
4367
|
|
|
@@ -4405,6 +4407,7 @@ var require_Theme_native = __commonJS({
|
|
|
4405
4407
|
}, [props.children, disableDirectChildTheme]);
|
|
4406
4408
|
return useThemedChildren(themeState, children, props, isRoot);
|
|
4407
4409
|
});
|
|
4410
|
+
Theme.displayName = "Theme";
|
|
4408
4411
|
Theme.avoidForwardRef = !0;
|
|
4409
4412
|
function useThemedChildren(themeState, children, props, isRoot = !1, avoidWrap = !1) {
|
|
4410
4413
|
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react3.useRef)(!1);
|
|
@@ -4548,7 +4551,11 @@ var require_Slot_native = __commonJS({
|
|
|
4548
4551
|
);
|
|
4549
4552
|
}
|
|
4550
4553
|
return import_react3.Children.count(children) > 1 ? import_react3.Children.only(null) : null;
|
|
4551
|
-
})
|
|
4554
|
+
});
|
|
4555
|
+
Slot.displayName = "Slot";
|
|
4556
|
+
var Slottable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
4557
|
+
Slottable.displayName = "Slottable";
|
|
4558
|
+
var pressMap = import_constants3.isWeb ? {
|
|
4552
4559
|
onPress: "onClick",
|
|
4553
4560
|
onPressOut: "onMouseUp",
|
|
4554
4561
|
onPressIn: "onMouseDown"
|
|
@@ -4686,7 +4693,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4686
4693
|
let isAnimated = willBeAnimated;
|
|
4687
4694
|
willBeAnimated && !supportsCSSVars && !presence && isHydrated && (import_constants3.isServer || state.unmounted === !0) && (isAnimated = !1), willBeAnimated && !stateRef.current.hasAnimated && (stateRef.current.hasAnimated = !0);
|
|
4688
4695
|
let componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName, hasTextAncestor = !!(import_constants3.isWeb && isText && componentContext.inText), isDisabled = props.disabled ?? ((_c = props.accessibilityState) == null ? void 0 : _c.disabled), element = import_constants3.isWeb && (!Component || typeof Component == "string") && props.tag || Component, elementType = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
|
|
4689
|
-
if (animationsConfig && willBeAnimated && (
|
|
4696
|
+
if (animationsConfig && willBeAnimated && (elementType = animationsConfig[isText ? "Text" : "View"] || elementType), isAnimated && presence) {
|
|
4690
4697
|
let presenceState = presence[2];
|
|
4691
4698
|
if (presenceState) {
|
|
4692
4699
|
let isEntering = state.unmounted, isExiting2 = !presenceState.isPresent, enterExitVariant = presenceState.enterExitVariant, enterVariant = enterExitVariant ?? presenceState.enterVariant, exitVariant = enterExitVariant ?? presenceState.exitVariant;
|
|
@@ -4849,7 +4856,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4849
4856
|
fontFamily && fontFamily[0] === "$" && (fontFamily = fontFamily.slice(1));
|
|
4850
4857
|
let fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "", style = avoidAnimationStyle ? splitStyles.style : animationStyles || splitStyles.style, className;
|
|
4851
4858
|
asChild === "except-style" || asChild === "except-style-web" || (viewProps.style = style);
|
|
4852
|
-
let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants3.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave),
|
|
4859
|
+
let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants3.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), events = !!(attachFocus || attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle) && !isDisabled && !props.asChild ? {
|
|
4853
4860
|
onPressOut: attachPress ? (e) => {
|
|
4854
4861
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
4855
4862
|
} : void 0,
|
|
@@ -6052,6 +6059,7 @@ var require_Stack_native = __commonJS({
|
|
|
6052
6059
|
defaultProps: import_constants3.stackDefaultStyles,
|
|
6053
6060
|
validStyles: import_helpers.validStyles
|
|
6054
6061
|
});
|
|
6062
|
+
Stack2.displayName = "Stack";
|
|
6055
6063
|
}
|
|
6056
6064
|
});
|
|
6057
6065
|
|
|
@@ -6158,7 +6166,10 @@ var require_Text_native = __commonJS({
|
|
|
6158
6166
|
Text: () => Text2
|
|
6159
6167
|
});
|
|
6160
6168
|
module2.exports = __toCommonJS2(Text_exports);
|
|
6161
|
-
var import_helpers = require_index_native4(), import_createComponent = require_createComponent_native(),
|
|
6169
|
+
var import_helpers = require_index_native4(), import_createComponent = require_createComponent_native(), ellipsisStyle = {
|
|
6170
|
+
numberOfLines: 1,
|
|
6171
|
+
lineBreakMode: "clip"
|
|
6172
|
+
}, Text2 = (0, import_createComponent.createComponent)({
|
|
6162
6173
|
acceptsClassName: !0,
|
|
6163
6174
|
isText: !0,
|
|
6164
6175
|
defaultProps: {
|
|
@@ -6171,11 +6182,14 @@ var require_Text_native = __commonJS({
|
|
|
6171
6182
|
ellipsizeMode: {
|
|
6172
6183
|
"...": () => null
|
|
6173
6184
|
},
|
|
6185
|
+
/**
|
|
6186
|
+
* @deprecated Use ellipsis instead
|
|
6187
|
+
*/
|
|
6174
6188
|
ellipse: {
|
|
6175
|
-
true:
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6189
|
+
true: ellipsisStyle
|
|
6190
|
+
},
|
|
6191
|
+
ellipsis: {
|
|
6192
|
+
true: ellipsisStyle
|
|
6179
6193
|
}
|
|
6180
6194
|
},
|
|
6181
6195
|
validStyles: {
|
|
@@ -6183,6 +6197,7 @@ var require_Text_native = __commonJS({
|
|
|
6183
6197
|
...import_helpers.stylePropsTextOnly
|
|
6184
6198
|
}
|
|
6185
6199
|
});
|
|
6200
|
+
Text2.displayName = "Text";
|
|
6186
6201
|
}
|
|
6187
6202
|
});
|
|
6188
6203
|
|
|
@@ -6244,6 +6259,7 @@ var require_FontLanguage_native = __commonJS({
|
|
|
6244
6259
|
let language = (0, import_react3.useMemo)(() => props, [JSON.stringify(props)]);
|
|
6245
6260
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, { language, children });
|
|
6246
6261
|
};
|
|
6262
|
+
FontLanguage.displayName = "FontLanguage";
|
|
6247
6263
|
}
|
|
6248
6264
|
});
|
|
6249
6265
|
|
|
@@ -6296,6 +6312,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
6296
6312
|
}
|
|
6297
6313
|
) });
|
|
6298
6314
|
}
|
|
6315
|
+
TamaguiProvider.displayName = "TamaguiProvider";
|
|
6299
6316
|
}
|
|
6300
6317
|
});
|
|
6301
6318
|
|
|
@@ -6320,6 +6337,7 @@ var require_Configuration_native = __commonJS({
|
|
|
6320
6337
|
let current = (0, import_react3.useContext)(import_ComponentContext.ComponentContext);
|
|
6321
6338
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, { ...current, ...props });
|
|
6322
6339
|
};
|
|
6340
|
+
Configuration.displayName = "Configuration";
|
|
6323
6341
|
}
|
|
6324
6342
|
});
|
|
6325
6343
|
|
|
@@ -6900,23 +6918,22 @@ var View = import_web.View, Stack = import_web.Stack, Text = import_web.Text, ba
|
|
|
6900
6918
|
return viewProps;
|
|
6901
6919
|
},
|
|
6902
6920
|
useEvents(viewProps, events, { pseudos }, setStateShallow, staticConfig) {
|
|
6903
|
-
if (events
|
|
6904
|
-
if (events) {
|
|
6921
|
+
if (events)
|
|
6922
|
+
if (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur), staticConfig.isInput) {
|
|
6905
6923
|
let { onPressIn, onPressOut, onPress } = events, inputEvents = {
|
|
6906
6924
|
onPressIn,
|
|
6907
6925
|
onPressOut: onPressOut || onPress
|
|
6908
6926
|
};
|
|
6909
6927
|
onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
|
|
6928
|
+
} else {
|
|
6929
|
+
viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
6930
|
+
let pressability = usePressability(events);
|
|
6931
|
+
if (events.onPress)
|
|
6932
|
+
for (let key in pressability) {
|
|
6933
|
+
let og = viewProps[key], val = pressability[key];
|
|
6934
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
|
|
6935
|
+
}
|
|
6910
6936
|
}
|
|
6911
|
-
} else {
|
|
6912
|
-
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
6913
|
-
let pressability = usePressability(events || null);
|
|
6914
|
-
if (events && events.onPress)
|
|
6915
|
-
for (let key in pressability) {
|
|
6916
|
-
let og = viewProps[key], val = pressability[key];
|
|
6917
|
-
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
|
|
6918
|
-
}
|
|
6919
|
-
}
|
|
6920
6937
|
},
|
|
6921
6938
|
useChildren(elementType, children, viewProps, events, staticConfig) {
|
|
6922
6939
|
}
|