@umituz/react-native-design-system 2.3.26 → 2.3.27
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.3.
|
|
3
|
+
"version": "2.3.27",
|
|
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",
|
|
@@ -32,8 +32,15 @@ export class NavigationValidator {
|
|
|
32
32
|
|
|
33
33
|
if (type === "tab") {
|
|
34
34
|
const tabScreen = screen as TabScreen;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
|
|
36
|
+
if (!tabScreen.isFab) {
|
|
37
|
+
if (!tabScreen.label || typeof tabScreen.label !== "string" || tabScreen.label.trim() === "") {
|
|
38
|
+
throw new Error(`Tab screen '${screen.name}' must have a valid non-empty label`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (tabScreen.label.length > 50) {
|
|
42
|
+
throw new Error(`Tab screen '${screen.name}' label too long (max 50 characters)`);
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
if (tabScreen.icon !== undefined && (typeof tabScreen.icon !== "string" || tabScreen.icon.trim() === "")) {
|
|
@@ -41,10 +48,6 @@ export class NavigationValidator {
|
|
|
41
48
|
console.warn(`[NavigationValidator] Tab screen '${screen.name}' has invalid icon, it will be ignored`);
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
|
-
|
|
45
|
-
if (tabScreen.label.length > 50) {
|
|
46
|
-
throw new Error(`Tab screen '${screen.name}' label too long (max 50 characters)`);
|
|
47
|
-
}
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
53
|
}
|
|
@@ -31,8 +31,8 @@ export function createTabScreen<T extends ParamListBase = ParamListBase>(
|
|
|
31
31
|
const isFab = screen.isFab ?? false;
|
|
32
32
|
|
|
33
33
|
const baseOptions: BottomTabNavigationOptions = {
|
|
34
|
-
tabBarLabel: isFab ?
|
|
35
|
-
title: processedLabel,
|
|
34
|
+
tabBarLabel: isFab ? "" : processedLabel,
|
|
35
|
+
title: isFab ? "" : processedLabel,
|
|
36
36
|
tabBarIcon: ({ focused }: { focused: boolean }) => {
|
|
37
37
|
const iconName = IconRenderer.getIconName(
|
|
38
38
|
screen.name,
|