tamagui 1.74.7 → 1.74.8
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 +10 -12
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +10 -12
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
package/dist/native.js
CHANGED
|
@@ -11811,8 +11811,7 @@ var require_Button_native = __commonJS({
|
|
|
11811
11811
|
Icon: ButtonIcon
|
|
11812
11812
|
}), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
11813
11813
|
function useButton(propsIn, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11814
|
-
let isNested = (0, import_react2.useContext)(ButtonNestingContext), propsActive = (0, import_web.useProps)(propsIn), {
|
|
11815
|
-
children,
|
|
11814
|
+
let isNested = (0, import_react2.useContext)(ButtonNestingContext), didFinishSSR = (0, import_web.useDidFinishSSR)(), propsActive = (0, import_web.useProps)(propsIn), {
|
|
11816
11815
|
icon,
|
|
11817
11816
|
iconAfter,
|
|
11818
11817
|
space,
|
|
@@ -11822,15 +11821,14 @@ var require_Button_native = __commonJS({
|
|
|
11822
11821
|
separator,
|
|
11823
11822
|
noTextWrap,
|
|
11824
11823
|
fontFamily,
|
|
11825
|
-
fontSize
|
|
11826
|
-
...rest
|
|
11824
|
+
fontSize
|
|
11827
11825
|
} = 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)({
|
|
11828
11826
|
size: iconSize,
|
|
11829
11827
|
color: propsActive.color
|
|
11830
|
-
}), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize =
|
|
11828
|
+
}), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
|
|
11831
11829
|
Text3,
|
|
11832
|
-
{ children, fontFamily, fontSize },
|
|
11833
|
-
Text3 === ButtonText &&
|
|
11830
|
+
{ children: propsIn.children, fontFamily, fontSize },
|
|
11831
|
+
Text3 === ButtonText && propsActive.unstyled !== !0 ? {
|
|
11834
11832
|
unstyled: !1,
|
|
11835
11833
|
size: size2
|
|
11836
11834
|
} : void 0
|
|
@@ -11844,10 +11842,10 @@ var require_Button_native = __commonJS({
|
|
|
11844
11842
|
}), tag = isNested ? "span" : (
|
|
11845
11843
|
// defaults to <a /> when accessibilityRole = link
|
|
11846
11844
|
// see https://github.com/tamagui/tamagui/issues/505
|
|
11847
|
-
|
|
11848
|
-
), props = {
|
|
11845
|
+
propsActive.accessibilityRole === "link" ? "a" : void 0
|
|
11846
|
+
), { iconAfter: _1, icon: _2, noTextWrap: _3, ...restProps } = propsIn, props = {
|
|
11849
11847
|
size: size2,
|
|
11850
|
-
...
|
|
11848
|
+
...propsIn.disabled && {
|
|
11851
11849
|
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
11852
11850
|
focusable: void 0,
|
|
11853
11851
|
// even with tabIndex unset, it will keep focusStyle on web so disable it here
|
|
@@ -11858,10 +11856,10 @@ var require_Button_native = __commonJS({
|
|
|
11858
11856
|
...tag && {
|
|
11859
11857
|
tag
|
|
11860
11858
|
},
|
|
11861
|
-
...
|
|
11859
|
+
...restProps,
|
|
11862
11860
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonNestingContext.Provider, { value: !0, children: inner }),
|
|
11863
11861
|
// forces it to be a runtime pressStyle so it passes through context text colors
|
|
11864
|
-
disableClassName:
|
|
11862
|
+
disableClassName: didFinishSSR
|
|
11865
11863
|
};
|
|
11866
11864
|
return {
|
|
11867
11865
|
spaceSize,
|