@artsy/palette-mobile 22.2.0--canary.425.5163.0 → 22.2.0--canary.425.5173.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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Use to position content directly below the tab bar
3
+ * on android this is a simple view that is positioned absolutely below the tab bar
4
+ * We don't animate it because it's currently broken in react-native-reanimated after the new architecture update
5
+ * See https://github.com/software-mansion/react-native-reanimated/issues/7460
6
+ */
7
+ export declare const SubTabBar: React.FC<React.PropsWithChildren<{}>>;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { View } from "react-native";
3
+ import { useSpace } from "../../utils/hooks/useSpace";
4
+ /**
5
+ * Use to position content directly below the tab bar
6
+ * on android this is a simple view that is positioned absolutely below the tab bar
7
+ * We don't animate it because it's currently broken in react-native-reanimated after the new architecture update
8
+ * See https://github.com/software-mansion/react-native-reanimated/issues/7460
9
+ */
10
+ export const SubTabBar = ({ children }) => {
11
+ const space = useSpace();
12
+ return _jsx(View, { style: [{ zIndex: 1, marginHorizontal: -space(2) }], children: children });
13
+ };
@@ -16,9 +16,7 @@ export declare const Tabs: import("react").FC<import("./TabsContainer").TabsCont
16
16
  SectionList: <T>(p: import("react-native").SectionListProps<T> & {
17
17
  ref?: React.Ref<import("react-native").SectionList<T>>;
18
18
  }) => React.ReactElement;
19
- SubTabBar: import("react").FC<{
20
- children?: import("react").ReactNode | undefined;
21
- }>;
19
+ SubTabBar: any;
22
20
  Tab: typeof import("react-native-collapsible-tab-view").Tab;
23
21
  TabsWithHeader: import("react").FC<import("./TabsWithHeader").TabsWithHeaderProps>;
24
22
  useAnimatedTabIndex: typeof useAnimatedTabIndex;
@@ -1,4 +1,5 @@
1
1
  import { Tabs as BaseTabs, useAnimatedTabIndex, useCurrentTabScrollY, useFocusedTab, useHeaderMeasurements, } from "react-native-collapsible-tab-view";
2
+ // @ts-ignore
2
3
  import { SubTabBar } from "./SubTabBar";
3
4
  import { TabFlashList } from "./TabFlashList";
4
5
  import { TabFlatList } from "./TabFlatList";
@@ -13,11 +13,13 @@ export const Text = forwardRef(({ variant = "sm", italic = false, color = "onBac
13
13
  ...nativeTextStyle,
14
14
  { textAlignVertical: "center" }, // android renders text higher by default, so we bring it down to be consistent with ios
15
15
  { textDecorationLine: !!underline ? "underline" : "none" },
16
+ { fontStyle: italic ? "italic" : undefined },
16
17
  !!maxWidth ? { width: "100%", maxWidth: 600, alignSelf: "center" } : {},
18
+ // Overriding the font family for the regular font to avoid breaking the layout (mainly on android)
19
+ // See: https://github.com/facebook/react-native/issues/53286
20
+ Platform.OS === "android" ? {} : { fontFamily },
17
21
  style, // keep last so we can override
18
- ], ...(fontFamily === theme.fonts.sans.regular && Platform.OS === "android"
19
- ? {}
20
- : { fontFamily }), ...fixTextTreatmentForStyledComponent(theme.textTreatments[variant]), children: children, color: color, ...restProps }));
22
+ ], ...fixTextTreatmentForStyledComponent(theme.textTreatments[variant]), children: children, color: color, ...restProps }));
21
23
  });
22
24
  const fixTextTreatmentForStyledComponent = (treatment) => {
23
25
  const treatmentWithUnits = { ...treatment };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "22.2.0--canary.425.5163.0",
3
+ "version": "22.2.0--canary.425.5173.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "workspaces": [
6
6
  "Example"