@zezosoft/zezo-ott-react-native-ui-kit 1.0.8 → 1.0.9
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/README.md +1 -1
- package/lib/module/components/Account/Account.js +1 -1
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +48 -19
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +4 -2
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +15 -1
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +4 -2
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/BlurView/BlurView.js +171 -0
- package/lib/module/components/BlurView/BlurView.js.map +1 -0
- package/lib/module/components/BlurView/index.js +9 -0
- package/lib/module/components/BlurView/index.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Four.js +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Content.js +4 -2
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +4 -2
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +64 -19
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +1 -1
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +340 -13
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/TabBar/One.js +71 -108
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +63 -78
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +110 -106
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +324 -0
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -0
- package/lib/module/components/User/index.js +2 -1
- package/lib/module/components/User/index.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +34 -0
- package/lib/module/hooks/useNavigationMode.js.map +1 -0
- package/lib/module/utils/Spacing.js +26 -0
- package/lib/module/utils/Spacing.js.map +1 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +1 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +2 -0
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts +2 -0
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BlurView/BlurView.d.ts +48 -0
- package/lib/typescript/src/components/BlurView/BlurView.d.ts.map +1 -0
- package/lib/typescript/src/components/BlurView/index.d.ts +7 -0
- package/lib/typescript/src/components/BlurView/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +17 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts +6 -0
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/One.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Three.d.ts +3 -2
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts +13 -4
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/index.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +50 -0
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -0
- package/lib/typescript/src/components/User/index.d.ts +2 -1
- package/lib/typescript/src/components/User/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts +14 -0
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts +2 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/lib/typescript/src/utils/Spacing.d.ts +16 -0
- package/lib/typescript/src/utils/Spacing.d.ts.map +1 -0
- package/package.json +9 -5
- package/src/components/Account/Account.tsx +1 -1
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +82 -37
- package/src/components/Auth/Login/LoginWithEmail.tsx +9 -2
- package/src/components/Auth/OTP/OTP.tsx +37 -1
- package/src/components/Auth/SignUp/SignUp.tsx +9 -2
- package/src/components/BlurView/BlurView.tsx +199 -0
- package/src/components/BlurView/index.ts +7 -0
- package/src/components/Content/Card/Styles/Four.tsx +3 -1
- package/src/components/Content/Content.tsx +5 -4
- package/src/components/ContentView/ContentView.tsx +8 -1
- package/src/components/ContentView/components/MiniInfo.tsx +99 -22
- package/src/components/Settings/AppSettings.tsx +1 -1
- package/src/components/Subscription/SubOne.tsx +422 -11
- package/src/components/TabBar/One.tsx +79 -141
- package/src/components/TabBar/Three.tsx +84 -99
- package/src/components/TabBar/Two.tsx +139 -110
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +439 -0
- package/src/components/User/index.ts +8 -1
- package/src/components/index.ts +1 -0
- package/src/hooks/useNavigationMode.ts +35 -0
- package/src/types/content/content-view.types.ts +5 -0
- package/src/utils/Spacing.ts +27 -0
|
@@ -1,70 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @author
|
|
5
|
-
* @lastModified
|
|
4
|
+
* @author Naresh Dhamu
|
|
5
|
+
* @lastModified Thu 06 Nov 2025 at 11:50 AM
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React
|
|
9
|
-
import { View, Pressable, Platform
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { View, StyleSheet, Pressable, Platform } from 'react-native';
|
|
10
10
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
11
11
|
import { scale } from 'react-native-size-matters';
|
|
12
12
|
import { useInternalTheme } from "../../theme/hook/useInternalTheme.js";
|
|
13
|
-
import { Text } from "../Text/index.js";
|
|
14
13
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
15
|
-
import {
|
|
14
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
|
+
import { useNavigationMode } from "../../hooks/useNavigationMode.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
const Tab = createBottomTabNavigator();
|
|
17
|
-
const TabBarButton = ({
|
|
18
|
-
onPress,
|
|
19
|
-
tab,
|
|
20
|
-
isActive,
|
|
21
|
-
appliedTheme,
|
|
22
|
-
isDarkMode,
|
|
23
|
-
setActiveTab,
|
|
24
|
-
onTabPress,
|
|
25
|
-
renderIcon
|
|
26
|
-
}) => {
|
|
27
|
-
const color = isActive ? appliedTheme.colors.primary : appliedTheme.colors.textPrimary;
|
|
28
|
-
const iconSize = scale(24);
|
|
29
|
-
const icon = renderIcon ? renderIcon({
|
|
30
|
-
icon: tab.icon,
|
|
31
|
-
color,
|
|
32
|
-
size: iconSize
|
|
33
|
-
}) : /*#__PURE__*/_jsx(tab.icon, {
|
|
34
|
-
width: iconSize,
|
|
35
|
-
height: iconSize,
|
|
36
|
-
color: color
|
|
37
|
-
});
|
|
38
|
-
return /*#__PURE__*/_jsx(View, {
|
|
39
|
-
style: styles.buttonWrapper,
|
|
40
|
-
children: /*#__PURE__*/_jsxs(Pressable, {
|
|
41
|
-
onPress: e => {
|
|
42
|
-
onPress?.(e);
|
|
43
|
-
setActiveTab(tab.key);
|
|
44
|
-
onTabPress?.(tab.key);
|
|
45
|
-
},
|
|
46
|
-
android_ripple: {
|
|
47
|
-
color: isDarkMode ? 'rgba(255, 255, 255, 0.12)' : 'rgba(0, 0, 0, 0.08)',
|
|
48
|
-
borderless: true,
|
|
49
|
-
radius: scale(35)
|
|
50
|
-
},
|
|
51
|
-
style: styles.iconWithLabel,
|
|
52
|
-
accessibilityRole: "button",
|
|
53
|
-
accessibilityLabel: `Tab: ${tab.name}`,
|
|
54
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
55
|
-
style: {
|
|
56
|
-
marginBottom: scale(3)
|
|
57
|
-
},
|
|
58
|
-
children: icon
|
|
59
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
60
|
-
style: [styles.label],
|
|
61
|
-
color: color,
|
|
62
|
-
numberOfLines: 1,
|
|
63
|
-
children: tab.name
|
|
64
|
-
})]
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
18
|
const TabBarOne = ({
|
|
69
19
|
tabs,
|
|
70
20
|
theme,
|
|
@@ -72,78 +22,91 @@ const TabBarOne = ({
|
|
|
72
22
|
renderIcon
|
|
73
23
|
}) => {
|
|
74
24
|
const {
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
isGestureNav
|
|
26
|
+
} = useNavigationMode();
|
|
27
|
+
const insets = useSafeAreaInsets();
|
|
28
|
+
const {
|
|
29
|
+
theme: appliedTheme
|
|
77
30
|
} = useInternalTheme(theme);
|
|
78
|
-
const
|
|
31
|
+
const baseHeight = Platform.OS === 'android' ? isGestureNav ? scale(53) : scale(68) : scale(35);
|
|
32
|
+
const tabBarHeight = baseHeight + insets.bottom;
|
|
79
33
|
return /*#__PURE__*/_jsx(Tab.Navigator, {
|
|
80
|
-
screenListeners: {
|
|
81
|
-
state: e => {
|
|
82
|
-
const index = e.data.state.index;
|
|
83
|
-
const currentKey = tabs[index]?.key;
|
|
84
|
-
if (currentKey) setActiveTab(currentKey);
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
34
|
screenOptions: {
|
|
88
35
|
headerShown: false,
|
|
89
|
-
tabBarShowLabel: false,
|
|
90
36
|
tabBarHideOnKeyboard: true,
|
|
91
37
|
tabBarStyle: {
|
|
92
|
-
position: 'absolute',
|
|
93
|
-
bottom: 0,
|
|
94
|
-
height: scale(80),
|
|
95
38
|
backgroundColor: appliedTheme.colors.background,
|
|
96
|
-
|
|
97
|
-
borderTopWidth: 0.5,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
39
|
+
borderColor: appliedTheme.colors.border,
|
|
40
|
+
borderTopWidth: scale(0.5),
|
|
41
|
+
paddingHorizontal: scale(5),
|
|
42
|
+
height: tabBarHeight
|
|
43
|
+
},
|
|
44
|
+
tabBarActiveTintColor: appliedTheme.colors.primary,
|
|
45
|
+
tabBarInactiveTintColor: appliedTheme.colors.textPrimary,
|
|
46
|
+
tabBarLabelStyle: {
|
|
47
|
+
fontSize: RFValue(10)
|
|
101
48
|
}
|
|
102
49
|
},
|
|
103
50
|
children: tabs.map(tab => /*#__PURE__*/_jsx(Tab.Screen, {
|
|
104
51
|
name: tab.key,
|
|
105
52
|
component: tab.screenComponent,
|
|
106
53
|
options: {
|
|
107
|
-
tabBarButton: props =>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
54
|
+
tabBarButton: props => {
|
|
55
|
+
const {
|
|
56
|
+
onPress,
|
|
57
|
+
onLongPress,
|
|
58
|
+
accessibilityRole,
|
|
59
|
+
accessibilityState,
|
|
60
|
+
testID,
|
|
61
|
+
style,
|
|
62
|
+
children
|
|
63
|
+
} = props;
|
|
64
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
65
|
+
android_ripple: {
|
|
66
|
+
color: appliedTheme.colors.border,
|
|
67
|
+
borderless: true,
|
|
68
|
+
radius: scale(30)
|
|
69
|
+
},
|
|
70
|
+
onPress: onPress,
|
|
71
|
+
onLongPress: onLongPress,
|
|
72
|
+
accessibilityRole: accessibilityRole,
|
|
73
|
+
accessibilityState: accessibilityState,
|
|
74
|
+
testID: testID,
|
|
75
|
+
style: style,
|
|
76
|
+
children: children
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
onTabPress: () => onTabPress?.(tab.key),
|
|
80
|
+
tabBarLabel: tab.name,
|
|
81
|
+
tabBarIcon: ({
|
|
82
|
+
color
|
|
83
|
+
}) => {
|
|
84
|
+
const iconSize = scale(24);
|
|
85
|
+
return renderIcon ? /*#__PURE__*/_jsx(View, {
|
|
86
|
+
style: styles.iconContainer,
|
|
87
|
+
children: renderIcon({
|
|
88
|
+
icon: tab.icon,
|
|
89
|
+
color,
|
|
90
|
+
size: iconSize
|
|
91
|
+
})
|
|
92
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
93
|
+
style: styles.iconContainer,
|
|
94
|
+
children: /*#__PURE__*/_jsx(tab.icon, {
|
|
95
|
+
width: iconSize,
|
|
96
|
+
height: iconSize,
|
|
97
|
+
color: color
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
117
101
|
}
|
|
118
102
|
}, tab.key))
|
|
119
103
|
});
|
|
120
104
|
};
|
|
121
|
-
const TabBarButtonWrapper = props => {
|
|
122
|
-
return /*#__PURE__*/_jsx(TabBarButton, {
|
|
123
|
-
...props
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
function TabBarButtonWrapperWithProps(props) {
|
|
127
|
-
return /*#__PURE__*/_jsx(TabBarButtonWrapper, {
|
|
128
|
-
...props
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
105
|
export default TabBarOne;
|
|
132
106
|
const styles = StyleSheet.create({
|
|
133
|
-
|
|
134
|
-
flex: 1,
|
|
107
|
+
iconContainer: {
|
|
135
108
|
justifyContent: 'center',
|
|
136
109
|
alignItems: 'center'
|
|
137
|
-
},
|
|
138
|
-
iconWithLabel: {
|
|
139
|
-
justifyContent: 'center',
|
|
140
|
-
alignItems: 'center',
|
|
141
|
-
paddingHorizontal: scale(8)
|
|
142
|
-
},
|
|
143
|
-
label: {
|
|
144
|
-
marginTop: scale(4),
|
|
145
|
-
fontSize: RFValue(10),
|
|
146
|
-
textAlign: 'center'
|
|
147
110
|
}
|
|
148
111
|
});
|
|
149
112
|
//# sourceMappingURL=One.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Pressable","Platform","createBottomTabNavigator","scale","useInternalTheme","RFValue","useSafeAreaInsets","useNavigationMode","jsx","_jsx","Tab","TabBarOne","tabs","theme","onTabPress","renderIcon","isGestureNav","insets","appliedTheme","baseHeight","OS","tabBarHeight","bottom","Navigator","screenOptions","headerShown","tabBarHideOnKeyboard","tabBarStyle","backgroundColor","colors","background","borderColor","border","borderTopWidth","paddingHorizontal","height","tabBarActiveTintColor","primary","tabBarInactiveTintColor","textPrimary","tabBarLabelStyle","fontSize","children","map","tab","Screen","name","key","component","screenComponent","options","tabBarButton","props","onPress","onLongPress","accessibilityRole","accessibilityState","testID","style","android_ripple","color","borderless","radius","tabBarLabel","tabBarIcon","iconSize","styles","iconContainer","icon","size","width","create","justifyContent","alignItems"],"sourceRoot":"../../../../src","sources":["components/TabBar/One.tsx"],"mappings":";;AAAA;AACA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BACfN,IAAA,CAACX,IAAI;YAAC4D,KAAK,EAAEQ,MAAM,CAACC,aAAc;YAAAzB,QAAA,EAC/B3B,UAAU,CAAC;cAAEqD,IAAI,EAAExB,GAAG,CAACwB,IAAI;cAAER,KAAK;cAAES,IAAI,EAAEJ;YAAS,CAAC;UAAC,CAClD,CAAC,gBAEPxD,IAAA,CAACX,IAAI;YAAC4D,KAAK,EAAEQ,MAAM,CAACC,aAAc;YAAAzB,QAAA,eAChCjC,IAAA,CAACmC,GAAG,CAACwB,IAAI;cAACE,KAAK,EAAEL,QAAS;cAAC9B,MAAM,EAAE8B,QAAS;cAACL,KAAK,EAAEA;YAAM,CAAE;UAAC,CACzD,CACP;QACH;MACF;IAAE,GApDGhB,GAAG,CAACG,GAqDV,CACF;EAAC,CACW,CAAC;AAEpB,CAAC;AAED,eAAepC,SAAS;AAExB,MAAMuD,MAAM,GAAGnE,UAAU,CAACwE,MAAM,CAAC;EAC/BJ,aAAa,EAAE;IACbK,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,84 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @author Naresh
|
|
5
|
-
* @lastModified
|
|
4
|
+
* @author Naresh Dhamu
|
|
5
|
+
* @lastModified Sun 09 Nov 2025 at 01:33 PM
|
|
6
6
|
*/
|
|
7
|
+
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import { View, Pressable, StyleSheet, Platform } from 'react-native';
|
|
9
|
-
import { BlurView } from '@react-native-community/blur';
|
|
10
10
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
11
11
|
import { scale } from 'react-native-size-matters';
|
|
12
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
13
|
+
import { BlurView } from '@react-native-community/blur';
|
|
12
14
|
import { useInternalTheme } from "../../theme/hook/useInternalTheme.js";
|
|
13
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
const Tab = createBottomTabNavigator();
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
state,
|
|
19
|
-
navigation,
|
|
17
|
+
const TAB_BAR_HEIGHT = scale(65);
|
|
18
|
+
const TAB_BAR_OFFSET = Platform.OS === 'android' ? scale(5) : -scale(8);
|
|
19
|
+
const TabBarThree = ({
|
|
20
20
|
tabs,
|
|
21
|
+
theme,
|
|
21
22
|
onTabPress,
|
|
22
|
-
|
|
23
|
-
}) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
tabBarHeight = TAB_BAR_HEIGHT
|
|
24
|
+
}) => {
|
|
25
|
+
const insets = useSafeAreaInsets();
|
|
26
|
+
const {
|
|
27
|
+
theme: appliedTheme
|
|
28
|
+
} = useInternalTheme(theme);
|
|
29
|
+
const tabWidth = tabBarHeight - scale(10);
|
|
30
|
+
const tabPadding = scale(7);
|
|
31
|
+
const tabGap = scale(8);
|
|
32
|
+
const totalWidth = tabs.length * tabWidth + tabPadding * 2 + tabGap * (tabs.length - 1);
|
|
33
|
+
const renderTabBar = props => /*#__PURE__*/_jsx(View, {
|
|
34
|
+
style: [styles.container, {
|
|
35
|
+
bottom: insets.bottom + TAB_BAR_OFFSET
|
|
29
36
|
}],
|
|
30
|
-
children:
|
|
31
|
-
style:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
38
|
+
style: [styles.tabBar, {
|
|
39
|
+
height: tabBarHeight,
|
|
40
|
+
width: totalWidth,
|
|
41
|
+
paddingHorizontal: tabPadding,
|
|
42
|
+
gap: tabGap,
|
|
43
|
+
borderRadius: scale(tabBarHeight / 2),
|
|
44
|
+
borderColor: appliedTheme.colors.border,
|
|
45
|
+
backgroundColor: Platform.OS === 'android' ? appliedTheme.colors.backdrop : 'transparent'
|
|
46
|
+
}],
|
|
47
|
+
children: [Platform.OS !== 'web' && /*#__PURE__*/_jsx(BlurView, {
|
|
48
|
+
style: StyleSheet.absoluteFillObject,
|
|
49
|
+
blurType: "light",
|
|
50
|
+
blurAmount: 25,
|
|
51
|
+
reducedTransparencyFallbackColor: "transparent"
|
|
52
|
+
}), tabs.map((tab, index) => {
|
|
53
|
+
const isFocused = props.state.index === index;
|
|
42
54
|
return /*#__PURE__*/_jsx(Pressable, {
|
|
43
55
|
onPress: () => {
|
|
44
56
|
onTabPress?.(tab.key);
|
|
45
|
-
navigation.navigate(tab.key);
|
|
57
|
+
props.navigation.navigate(tab.key);
|
|
46
58
|
},
|
|
47
|
-
style: [styles.
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
style: [styles.tab, {
|
|
60
|
+
padding: scale(tabBarHeight / 5.1),
|
|
61
|
+
borderWidth: Platform.select({
|
|
62
|
+
ios: scale(1),
|
|
63
|
+
android: scale(1.5)
|
|
64
|
+
}),
|
|
65
|
+
backgroundColor: isFocused ? appliedTheme.colors.button : appliedTheme.colors.background,
|
|
66
|
+
borderColor: isFocused ? appliedTheme.colors.button : appliedTheme.colors.border
|
|
50
67
|
}],
|
|
51
68
|
children: /*#__PURE__*/_jsx(tab.icon, {
|
|
52
|
-
width: scale(
|
|
53
|
-
height: scale(
|
|
54
|
-
color:
|
|
69
|
+
width: scale(tabBarHeight / 3.1),
|
|
70
|
+
height: scale(tabBarHeight / 3.1),
|
|
71
|
+
color: isFocused ? appliedTheme.colors.buttonText : appliedTheme.colors.textPrimary
|
|
55
72
|
})
|
|
56
73
|
}, tab.key);
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
const renderTabBar = (tabs, onTabPress, theme) => props => /*#__PURE__*/_jsx(CustomTabBar, {
|
|
62
|
-
...props,
|
|
63
|
-
tabs: tabs,
|
|
64
|
-
onTabPress: onTabPress,
|
|
65
|
-
theme: theme
|
|
66
|
-
});
|
|
67
|
-
const TabBarThree = ({
|
|
68
|
-
tabs,
|
|
69
|
-
theme,
|
|
70
|
-
onTabPress
|
|
71
|
-
}) => {
|
|
72
|
-
const {
|
|
73
|
-
theme: appliedTheme
|
|
74
|
-
} = useInternalTheme(theme);
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
75
77
|
return /*#__PURE__*/_jsx(Tab.Navigator, {
|
|
76
78
|
screenOptions: {
|
|
77
79
|
headerShown: false,
|
|
78
80
|
tabBarShowLabel: false,
|
|
79
81
|
tabBarHideOnKeyboard: true
|
|
80
82
|
},
|
|
81
|
-
tabBar: renderTabBar
|
|
83
|
+
tabBar: renderTabBar,
|
|
82
84
|
children: tabs.map(tab => /*#__PURE__*/_jsx(Tab.Screen, {
|
|
83
85
|
name: tab.key,
|
|
84
86
|
component: tab.screenComponent
|
|
@@ -86,45 +88,28 @@ const TabBarThree = ({
|
|
|
86
88
|
});
|
|
87
89
|
};
|
|
88
90
|
const styles = StyleSheet.create({
|
|
89
|
-
|
|
91
|
+
container: {
|
|
90
92
|
position: 'absolute',
|
|
91
|
-
bottom: scale(20),
|
|
92
93
|
left: 0,
|
|
93
94
|
right: 0,
|
|
94
95
|
alignItems: 'center'
|
|
95
96
|
},
|
|
96
|
-
|
|
97
|
-
marginHorizontal: scale(16),
|
|
98
|
-
alignSelf: 'center',
|
|
99
|
-
height: BOTTOM_BAR_HEIGHT,
|
|
100
|
-
borderRadius: scale(BOTTOM_BAR_HEIGHT / 2),
|
|
101
|
-
overflow: 'hidden',
|
|
102
|
-
borderWidth: Platform.select({
|
|
103
|
-
ios: scale(1),
|
|
104
|
-
android: scale(1.5)
|
|
105
|
-
}),
|
|
106
|
-
alignItems: 'center',
|
|
107
|
-
justifyContent: 'center'
|
|
108
|
-
},
|
|
109
|
-
row: {
|
|
97
|
+
tabBar: {
|
|
110
98
|
flexDirection: 'row',
|
|
111
99
|
justifyContent: 'space-between',
|
|
112
100
|
alignItems: 'center',
|
|
113
|
-
width: '100%',
|
|
114
|
-
paddingHorizontal: scale(12)
|
|
115
|
-
},
|
|
116
|
-
icon: {
|
|
117
|
-
width: ICON_BOX_SIZE,
|
|
118
|
-
height: ICON_BOX_SIZE,
|
|
119
|
-
borderRadius: ICON_BOX_SIZE / 2,
|
|
120
101
|
borderWidth: Platform.select({
|
|
121
102
|
ios: scale(1),
|
|
122
103
|
android: scale(1.5)
|
|
123
104
|
}),
|
|
105
|
+
overflow: 'hidden',
|
|
106
|
+
marginHorizontal: 'auto'
|
|
107
|
+
},
|
|
108
|
+
tab: {
|
|
124
109
|
justifyContent: 'center',
|
|
125
110
|
alignItems: 'center',
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
borderRadius: scale(100),
|
|
112
|
+
aspectRatio: 1
|
|
128
113
|
}
|
|
129
114
|
});
|
|
130
115
|
export default TabBarThree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Pressable","StyleSheet","Platform","
|
|
1
|
+
{"version":3,"names":["React","View","Pressable","StyleSheet","Platform","createBottomTabNavigator","scale","useSafeAreaInsets","BlurView","useInternalTheme","jsx","_jsx","jsxs","_jsxs","Tab","TAB_BAR_HEIGHT","TAB_BAR_OFFSET","OS","TabBarThree","tabs","theme","onTabPress","tabBarHeight","insets","appliedTheme","tabWidth","tabPadding","tabGap","totalWidth","length","renderTabBar","props","style","styles","container","bottom","children","tabBar","height","width","paddingHorizontal","gap","borderRadius","borderColor","colors","border","backgroundColor","backdrop","absoluteFillObject","blurType","blurAmount","reducedTransparencyFallbackColor","map","tab","index","isFocused","state","onPress","key","navigation","navigate","padding","borderWidth","select","ios","android","button","background","icon","color","buttonText","textPrimary","Navigator","screenOptions","headerShown","tabBarShowLabel","tabBarHideOnKeyboard","Screen","name","component","screenComponent","create","position","left","right","alignItems","flexDirection","justifyContent","overflow","marginHor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