@umituz/react-native-design-system 2.6.29 → 2.6.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.6.29",
3
+ "version": "2.6.30",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,6 +1,7 @@
1
- import React, { useMemo } from "react";
1
+ import React, { useMemo, useCallback } from "react";
2
2
  import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
3
3
  import type { ParamListBase } from "@react-navigation/native";
4
+ import type { BottomTabNavigationOptions } from "@react-navigation/bottom-tabs";
4
5
  import type { TabNavigatorConfig, TabScreen } from "./types";
5
6
  import { NavigationValidator } from "./utils/NavigationValidator";
6
7
  import { createTabScreen } from "./utils/ScreenFactory";
@@ -15,7 +16,7 @@ export interface TabsNavigatorProps<T extends ParamListBase> {
15
16
 
16
17
  /**
17
18
  * TabsNavigator Component
18
- *
19
+ *
19
20
  * Reusable Bottom Tab Navigator component that handles configuration and rendering.
20
21
  * Integrates with design tokens for consistent themed styling.
21
22
  */
@@ -70,6 +71,21 @@ export function TabsNavigator<T extends ParamListBase>({
70
71
  [tokens]
71
72
  );
72
73
 
74
+ // Merge screen options properly (handle both function and object)
75
+ const mergedScreenOptions = useCallback(
76
+ (props: any): BottomTabNavigationOptions => {
77
+ const customOptions = typeof config.screenOptions === "function"
78
+ ? config.screenOptions(props)
79
+ : config.screenOptions || {};
80
+
81
+ return {
82
+ ...defaultScreenOptions,
83
+ ...customOptions,
84
+ };
85
+ },
86
+ [defaultScreenOptions, config.screenOptions]
87
+ );
88
+
73
89
  if (visibleScreens.length === 0) {
74
90
  return null;
75
91
  }
@@ -78,10 +94,7 @@ export function TabsNavigator<T extends ParamListBase>({
78
94
  <Tab.Navigator
79
95
  id={config.id}
80
96
  initialRouteName={config.initialRouteName as string}
81
- screenOptions={{
82
- ...defaultScreenOptions,
83
- ...(config.screenOptions as any),
84
- }}
97
+ screenOptions={mergedScreenOptions}
85
98
  >
86
99
  {visibleScreens.map((screen) =>
87
100
  createTabScreen(screen as TabScreen<any>, config, Tab)
@@ -33,6 +33,7 @@ export function createTabScreen<T extends ParamListBase = ParamListBase>(
33
33
  const baseOptions: BottomTabNavigationOptions = {
34
34
  tabBarLabel: isFab ? "" : processedLabel,
35
35
  title: isFab ? "" : processedLabel,
36
+ tabBarShowLabel: isFab ? false : undefined,
36
37
  tabBarIcon: ({ focused }: { focused: boolean }) => {
37
38
  const iconName = IconRenderer.getIconName(
38
39
  screen.name,