@hoddy-ui/core 1.0.99 → 1.1.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/next/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/next",
3
- "version": "2.0.27",
3
+ "version": "2.0.34",
4
4
  "description": "Core rich react native components written in typescript, with support for expo-router",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.99",
3
+ "version": "1.1.0",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -4,33 +4,27 @@ import { Platform, StatusBar } from "react-native";
4
4
  import { useColors, useTheme } from "../hooks";
5
5
 
6
6
  const AdaptiveStatusBar = ({ translucent = false }) => {
7
- const [focused, setFocused] = useState(false);
8
7
  const colors = useColors();
9
8
  const theme = useTheme();
9
+
10
+ const statusbarHandler = () => {
11
+ StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
12
+ if (Platform.OS === "android") {
13
+ StatusBar.setBackgroundColor(
14
+ translucent ? "transparent" : colors.white[1]
15
+ );
16
+ StatusBar.setTranslucent(true);
17
+ }
18
+ };
19
+
10
20
  useFocusEffect(
11
21
  React.useCallback(() => {
12
- // setFocused(true);
13
- StatusBar.setBarStyle(
14
- theme === "dark" ? "light-content" : "dark-content"
15
- );
16
- if (Platform.OS === "android") {
17
- StatusBar.setBackgroundColor(
18
- translucent ? "transparent" : colors.white[1]
19
- );
20
- StatusBar.setTranslucent(true);
21
- }
22
- // return () => setFocused(false);
22
+ statusbarHandler();
23
23
  }, [theme])
24
24
  );
25
25
 
26
26
  React.useEffect(() => {
27
- // setFocused(true);
28
- StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
29
- if (Platform.OS === "android") {
30
- StatusBar.setBackgroundColor(colors.white[1] + (translucent ? "0" : ""));
31
- StatusBar.setTranslucent(true);
32
- }
33
- // return () => setFocused(false);
27
+ statusbarHandler();
34
28
  }, [theme]);
35
29
  return <></>;
36
30
  };
@@ -44,8 +44,8 @@ const Typography: React.FC<TypographyProps> = forwardRef(
44
44
  textTransform: textCase,
45
45
  alignItems: "center",
46
46
  textAlign: align,
47
- fontWeight: fontWeight.toString(),
48
- fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || "System", // Use custom font if provided, else default
47
+ fontWeight: fontWeight,
48
+ fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || undefined, // Use custom font if provided, else default
49
49
  },
50
50
  });
51
51
 
package/src/types.ts CHANGED
@@ -261,7 +261,7 @@ export interface TypographyProps extends TextProps {
261
261
  children: ReactNode;
262
262
  color?: colorTypes | (string & {});
263
263
  style?: TextStyle | ViewStyle;
264
- textCase?: "capitalize" | "uppercase" | "lowercase" | null;
264
+ textCase?: "capitalize" | "uppercase" | "lowercase" | undefined;
265
265
  variant?:
266
266
  | "caption"
267
267
  | "body1"