create-expo-stack 2.7.0-next.ba3b85d → 2.7.0-next.ba4f707
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 +16 -9
- package/build/templates/base/app.json.ejs +5 -1
- package/build/templates/base/package.json.ejs +30 -2
- package/build/templates/base/tsconfig.json.ejs +1 -1
- package/build/templates/packages/nativewindui/app/+not-found.tsx.ejs +1 -1
- package/build/templates/packages/nativewindui/app/_layout.tsx.ejs +25 -19
- package/build/templates/packages/nativewindui/app/index.tsx.ejs +638 -121
- package/build/templates/packages/nativewindui/app/modal.tsx.ejs +20 -19
- package/build/templates/packages/nativewindui/components/nativewind-ui/ActivityIndicator.tsx.ejs +10 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/Avatar.tsx.ejs +139 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.android.tsx.ejs +66 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.tsx.ejs +10 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/Picker.tsx.ejs +39 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/ProgressIndicator.tsx.ejs +95 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/SegmentedControl.tsx.ejs +22 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/Sheet.tsx.ejs +59 -0
- package/build/templates/packages/nativewindui/components/nativewind-ui/Slider.tsx.ejs +28 -0
- package/build/templates/packages/nativewindui/components/{Text.tsx.ejs → nativewind-ui/Text.tsx.ejs} +26 -2
- package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewind-ui/ThemeToggle.tsx.ejs} +7 -9
- package/build/templates/packages/nativewindui/components/{Toggle.tsx.ejs → nativewind-ui/Toggle.tsx.ejs} +3 -3
- package/build/templates/packages/nativewindui/global.css.ejs +3 -3
- package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +1 -1
- package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +2 -2
- package/build/templates/packages/nativewindui/theme/colors.ts.ejs +8 -8
- package/build/templates/packages/nativewindui/theme/index.ts.ejs +4 -4
- package/build/types/types.d.ts +2 -0
- package/build/utilities/configureProjectFiles.js +42 -13
- package/build/utilities/runCLI.js +80 -26
- package/package.json +1 -1
- package/build/templates/packages/nativewindui/app/bottom-tabs/_layout.tsx.ejs +0 -34
- package/build/templates/packages/nativewindui/app/bottom-tabs/index.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/bottom-tabs/profile.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/drawer/_layout.tsx.ejs +0 -29
- package/build/templates/packages/nativewindui/app/drawer/index.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/top-tabs/_layout.tsx.ejs +0 -71
- package/build/templates/packages/nativewindui/app/top-tabs/following.tsx.ejs +0 -13
- package/build/templates/packages/nativewindui/app/top-tabs/index.tsx.ejs +0 -13
- package/build/templates/packages/nativewindui/app/top-tabs/my-group.tsx.ejs +0 -13
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useColorScheme } from '@/lib/useColorScheme';
|
|
2
|
-
import type {
|
|
3
|
-
MaterialTopTabNavigationEventMap,
|
|
4
|
-
MaterialTopTabNavigationOptions,
|
|
5
|
-
} from '@react-navigation/material-top-tabs';
|
|
6
|
-
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
|
7
|
-
import {
|
|
8
|
-
type ParamListBase,
|
|
9
|
-
type TabNavigationState,
|
|
10
|
-
} from '@react-navigation/native';
|
|
11
|
-
import { withLayoutContext } from 'expo-router';
|
|
12
|
-
import { Dimensions } from 'react-native';
|
|
13
|
-
|
|
14
|
-
const { width } = Dimensions.get('screen');
|
|
15
|
-
|
|
16
|
-
const { Navigator } = createMaterialTopTabNavigator();
|
|
17
|
-
|
|
18
|
-
const TopTabs = withLayoutContext<
|
|
19
|
-
MaterialTopTabNavigationOptions,
|
|
20
|
-
typeof Navigator,
|
|
21
|
-
TabNavigationState<ParamListBase>,
|
|
22
|
-
MaterialTopTabNavigationEventMap
|
|
23
|
-
>(Navigator);
|
|
24
|
-
|
|
25
|
-
const SCREENS = [
|
|
26
|
-
{
|
|
27
|
-
name: 'index',
|
|
28
|
-
title: 'For You',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'following',
|
|
32
|
-
title: 'Following',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'my-group',
|
|
36
|
-
title: 'My Group',
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
export default function TopTabsLayout() {
|
|
41
|
-
const { colors } = useColorScheme();
|
|
42
|
-
return (
|
|
43
|
-
<TopTabs
|
|
44
|
-
initialRouteName='index'
|
|
45
|
-
screenOptions={{
|
|
46
|
-
tabBarActiveTintColor: colors.blue,
|
|
47
|
-
tabBarInactiveTintColor: 'grey',
|
|
48
|
-
tabBarLabelStyle: {
|
|
49
|
-
fontSize: 14,
|
|
50
|
-
textTransform: 'capitalize',
|
|
51
|
-
fontWeight: 'bold',
|
|
52
|
-
},
|
|
53
|
-
tabBarIndicatorStyle: {
|
|
54
|
-
backgroundColor: colors.blue,
|
|
55
|
-
},
|
|
56
|
-
tabBarScrollEnabled: true,
|
|
57
|
-
tabBarItemStyle: { width: width / SCREENS.length },
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
{SCREENS.map(({ name, title }) => (
|
|
61
|
-
<TopTabs.Screen
|
|
62
|
-
key={name}
|
|
63
|
-
name={name}
|
|
64
|
-
options={{
|
|
65
|
-
title,
|
|
66
|
-
}}
|
|
67
|
-
/>
|
|
68
|
-
))}
|
|
69
|
-
</TopTabs>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Text } from '@/components/Text';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export default function FollowingScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>Following Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Text } from '@/components/Text';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export default function ForYouScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>For You Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { Text } from '@/components/Text';
|
|
3
|
-
|
|
4
|
-
export default function MyGroupScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>My Group Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|