@umituz/react-native-design-system 2.3.26 → 2.3.28
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.28",
|
|
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,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import 'react-native';
|
|
2
|
+
|
|
3
|
+
declare module 'react-native' {
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
import { ViewProps as RNViewProps, TextProps as RNTextProps } from 'react-native';
|
|
6
|
+
|
|
7
|
+
export const View: FC<RNViewProps>;
|
|
8
|
+
export const Text: FC<RNTextProps>;
|
|
9
|
+
export const ScrollView: FC<any>;
|
|
10
|
+
export const FlatList: FC<any>;
|
|
11
|
+
export const TouchableOpacity: FC<any>;
|
|
12
|
+
export const TouchableHighlight: FC<any>;
|
|
13
|
+
export const Pressable: FC<any>;
|
|
14
|
+
export const TextInput: FC<any>;
|
|
15
|
+
export const Image: FC<any>;
|
|
16
|
+
export const ActivityIndicator: FC<any>;
|
|
17
|
+
export const Modal: FC<any>;
|
|
18
|
+
export const Switch: FC<any>;
|
|
19
|
+
export const KeyboardAvoidingView: FC<any>;
|
|
20
|
+
export const RefreshControl: FC<any>;
|
|
21
|
+
}
|