@umituz/react-native-design-system 2.6.94 → 2.6.95
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 +1 -1
- package/src/atoms/AtomicAvatar.README.md +284 -397
- package/src/atoms/AtomicBadge.README.md +123 -358
- package/src/atoms/AtomicCard.README.md +358 -247
- package/src/atoms/AtomicDatePicker.README.md +127 -332
- package/src/atoms/AtomicFab.README.md +194 -352
- package/src/atoms/AtomicIcon.README.md +241 -274
- package/src/atoms/AtomicProgress.README.md +100 -338
- package/src/atoms/AtomicSpinner.README.md +304 -337
- package/src/atoms/AtomicText.README.md +153 -389
- package/src/atoms/AtomicTextArea.README.md +267 -268
- package/src/atoms/EmptyState.README.md +247 -292
- package/src/atoms/GlassView/README.md +313 -444
- package/src/atoms/button/README.md +186 -297
- package/src/atoms/button/STRATEGY.md +252 -0
- package/src/atoms/chip/README.md +242 -290
- package/src/atoms/input/README.md +296 -290
- package/src/atoms/picker/README.md +278 -309
- package/src/atoms/skeleton/AtomicSkeleton.README.md +394 -252
- package/src/molecules/BaseModal/README.md +356 -0
- package/src/molecules/BaseModal.README.md +324 -200
- package/src/molecules/ConfirmationModal.README.md +349 -302
- package/src/molecules/Divider/README.md +293 -376
- package/src/molecules/FormField.README.md +321 -534
- package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
- package/src/molecules/GlowingCard/README.md +230 -372
- package/src/molecules/List/README.md +281 -488
- package/src/molecules/ListItem.README.md +320 -315
- package/src/molecules/SearchBar/README.md +332 -430
- package/src/molecules/StepHeader/README.md +311 -411
- package/src/molecules/StepProgress/README.md +281 -448
- package/src/molecules/alerts/README.md +272 -355
- package/src/molecules/avatar/README.md +295 -356
- package/src/molecules/bottom-sheet/README.md +303 -340
- package/src/molecules/calendar/README.md +301 -265
- package/src/molecules/countdown/README.md +347 -456
- package/src/molecules/emoji/README.md +281 -514
- package/src/molecules/listitem/README.md +307 -399
- package/src/molecules/media-card/MediaCard.tsx +31 -34
- package/src/molecules/media-card/README.md +217 -319
- package/src/molecules/navigation/README.md +263 -284
- package/src/molecules/splash/README.md +76 -80
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,36 +1,23 @@
|
|
|
1
1
|
# Navigation System
|
|
2
2
|
|
|
3
|
-
React Native Design System
|
|
3
|
+
React Native Design System provides ready-to-use navigator components that integrate with React Navigation. These components offer theme-aware and customizable navigation solutions.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **StackNavigator** - Stack tabanlı navigasyon
|
|
9
|
-
- **FabButton** - Navigation ile entegre FAB
|
|
10
|
-
|
|
11
|
-
## Kurulum
|
|
12
|
-
|
|
13
|
-
```tsx
|
|
7
|
+
```typescript
|
|
14
8
|
import {
|
|
15
9
|
TabsNavigator,
|
|
16
10
|
StackNavigator
|
|
17
|
-
} from 'react-native-design-system';
|
|
11
|
+
} from 'react-native-design-system/src/molecules/navigation';
|
|
18
12
|
```
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Bottom tab navigasyonu için kullanılır. Material Design 3 uyumlu, tema bilinci bir tab bar sağlar.
|
|
14
|
+
**Location:** `src/molecules/navigation/`
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
## Basic Usage
|
|
25
17
|
|
|
26
18
|
```tsx
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import { ProfileScreen } from './ProfileScreen';
|
|
30
|
-
import { SettingsScreen } from './SettingsScreen';
|
|
31
|
-
|
|
32
|
-
export const MainTabs = () => {
|
|
33
|
-
const tabConfig = {
|
|
19
|
+
<TabsNavigator
|
|
20
|
+
config={{
|
|
34
21
|
id: 'main-tabs',
|
|
35
22
|
initialRouteName: 'Home',
|
|
36
23
|
screens: [
|
|
@@ -38,340 +25,332 @@ export const MainTabs = () => {
|
|
|
38
25
|
name: 'Home',
|
|
39
26
|
component: HomeScreen,
|
|
40
27
|
options: {
|
|
41
|
-
tabBarLabel: '
|
|
28
|
+
tabBarLabel: 'Home',
|
|
42
29
|
tabBarIcon: 'home-outline',
|
|
43
30
|
},
|
|
44
31
|
},
|
|
45
|
-
{
|
|
46
|
-
name: 'Profile',
|
|
47
|
-
component: ProfileScreen,
|
|
48
|
-
options: {
|
|
49
|
-
tabBarLabel: 'Profil',
|
|
50
|
-
tabBarIcon: 'person-outline',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: 'Settings',
|
|
55
|
-
component: SettingsScreen,
|
|
56
|
-
options: {
|
|
57
|
-
tabBarLabel: 'Ayarlar',
|
|
58
|
-
tabBarIcon: 'settings-outline',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
32
|
],
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return <TabsNavigator config={tabConfig} />;
|
|
65
|
-
};
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
66
35
|
```
|
|
67
36
|
|
|
68
|
-
|
|
37
|
+
## Strategy
|
|
69
38
|
|
|
70
|
-
|
|
71
|
-
const tabConfig = {
|
|
72
|
-
id: 'main-tabs',
|
|
73
|
-
initialRouteName: 'Home',
|
|
74
|
-
screens: [
|
|
75
|
-
{
|
|
76
|
-
name: 'Home',
|
|
77
|
-
component: HomeScreen,
|
|
78
|
-
options: {
|
|
79
|
-
tabBarLabel: 'Ana Sayfa',
|
|
80
|
-
tabBarIcon: 'home-outline',
|
|
81
|
-
tabBarBadge: 3, // Badge sayısı
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
// ...
|
|
85
|
-
],
|
|
86
|
-
};
|
|
87
|
-
```
|
|
39
|
+
**Purpose**: Provide consistent, theme-aware navigation components that integrate seamlessly with React Navigation.
|
|
88
40
|
|
|
89
|
-
|
|
41
|
+
**When to Use**:
|
|
42
|
+
- Building app navigation structure
|
|
43
|
+
- Creating bottom tab navigation
|
|
44
|
+
- Implementing stack navigation
|
|
45
|
+
- Managing nested navigation flows
|
|
90
46
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
component: HomeScreen,
|
|
96
|
-
options: {
|
|
97
|
-
tabBarLabel: 'Ana Sayfa',
|
|
98
|
-
tabBarIcon: 'home-outline',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'Admin',
|
|
103
|
-
component: AdminScreen,
|
|
104
|
-
visible: false, // Gizli tab
|
|
105
|
-
},
|
|
106
|
-
]
|
|
107
|
-
```
|
|
47
|
+
**When NOT to Use**:
|
|
48
|
+
- For simple navigation - use React Navigation directly
|
|
49
|
+
- For custom navigation patterns - build custom solution
|
|
50
|
+
- For web-only apps - use web routing libraries
|
|
108
51
|
|
|
109
|
-
|
|
52
|
+
## Rules
|
|
110
53
|
|
|
111
|
-
|
|
112
|
-
const tabConfig = {
|
|
113
|
-
id: 'main-tabs',
|
|
114
|
-
initialRouteName: 'Home',
|
|
115
|
-
screenOptions: {
|
|
116
|
-
headerShown: false,
|
|
117
|
-
},
|
|
118
|
-
screens: [
|
|
119
|
-
// ...
|
|
120
|
-
],
|
|
121
|
-
};
|
|
122
|
-
```
|
|
54
|
+
### Required
|
|
123
55
|
|
|
124
|
-
|
|
56
|
+
1. **ALWAYS** provide unique `id` for navigator config
|
|
57
|
+
2. **MUST** have `name` and `component` for each screen
|
|
58
|
+
3. **NEVER** use duplicate screen names in same navigator
|
|
59
|
+
4. **ALWAYS** define `initialRouteName` explicitly
|
|
60
|
+
5. **MUST** wrap app in NavigationContainer
|
|
125
61
|
|
|
126
|
-
|
|
62
|
+
### Tab Navigator
|
|
127
63
|
|
|
128
|
-
|
|
64
|
+
1. **ALWAYS** provide `tabBarLabel` for each tab
|
|
65
|
+
2. **MUST** provide `tabBarIcon` using Ionicons names
|
|
66
|
+
3. **SHOULD** limit to 3-5 tabs for optimal UX
|
|
67
|
+
4. **NEVER** nest tabs more than 2 levels deep
|
|
129
68
|
|
|
130
|
-
|
|
131
|
-
import { StackNavigator } from 'react-native-design-system';
|
|
132
|
-
import { HomeScreen } from './HomeScreen';
|
|
133
|
-
import { DetailsScreen } from './DetailsScreen';
|
|
69
|
+
### Stack Navigator
|
|
134
70
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
screens: [
|
|
140
|
-
{
|
|
141
|
-
name: 'Home',
|
|
142
|
-
component: HomeScreen,
|
|
143
|
-
options: {
|
|
144
|
-
title: 'Ana Sayfa',
|
|
145
|
-
headerShown: true,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: 'Details',
|
|
150
|
-
component: DetailsScreen,
|
|
151
|
-
options: {
|
|
152
|
-
title: 'Detaylar',
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
};
|
|
71
|
+
1. **ALWAYS** provide meaningful screen names
|
|
72
|
+
2. **MUST** handle header configuration consistently
|
|
73
|
+
3. **SHOULD** provide back button labels for navigation
|
|
74
|
+
4. **NEVER** stack more than 10 screens deep
|
|
157
75
|
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
```
|
|
76
|
+
## Forbidden
|
|
161
77
|
|
|
162
|
-
|
|
78
|
+
❌ **NEVER** do these:
|
|
163
79
|
|
|
164
80
|
```tsx
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
name: 'Home',
|
|
168
|
-
component: HomeScreen,
|
|
169
|
-
options: {
|
|
170
|
-
headerShown: false,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
]
|
|
174
|
-
```
|
|
81
|
+
// ❌ Missing required props
|
|
82
|
+
<TabsNavigator /> {/* Missing config */}
|
|
175
83
|
|
|
176
|
-
|
|
84
|
+
// ❌ Duplicate screen names
|
|
85
|
+
<TabsNavigator
|
|
86
|
+
config={{
|
|
87
|
+
screens: [
|
|
88
|
+
{ name: 'Home', component: HomeScreen },
|
|
89
|
+
{ name: 'Home', component: AboutScreen }, {/* ❌ Duplicate */}
|
|
90
|
+
],
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
177
93
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
94
|
+
// ❌ Too many tabs
|
|
95
|
+
<TabsNavigator
|
|
96
|
+
config={{
|
|
97
|
+
screens: [
|
|
98
|
+
// 10 tabs... ❌ Too many
|
|
99
|
+
],
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
// ❌ Missing icons
|
|
104
|
+
{
|
|
105
|
+
name: 'Home',
|
|
106
|
+
component: HomeScreen,
|
|
107
|
+
options: {
|
|
108
|
+
tabBarLabel: 'Home',
|
|
109
|
+
// Missing tabBarIcon ❌
|
|
190
110
|
},
|
|
191
|
-
|
|
192
|
-
```
|
|
111
|
+
}
|
|
193
112
|
|
|
194
|
-
|
|
113
|
+
// ❌ Inconsistent headers
|
|
114
|
+
{
|
|
115
|
+
name: 'Screen1',
|
|
116
|
+
options: { headerShown: true },
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Screen2',
|
|
120
|
+
options: { headerShown: false }, {/* ❌ Inconsistent */}
|
|
121
|
+
}
|
|
195
122
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
{
|
|
199
|
-
name: 'Profile',
|
|
200
|
-
component: ProfileScreen,
|
|
201
|
-
options: {
|
|
202
|
-
title: 'Profil',
|
|
203
|
-
headerRight: () => (
|
|
204
|
-
<Pressable onPress={handleSettings}>
|
|
205
|
-
<AtomicIcon name="settings-outline" size="md" />
|
|
206
|
-
</Pressable>
|
|
207
|
-
),
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
]
|
|
123
|
+
// ❌ Hardcoded navigation
|
|
124
|
+
navigation.navigate('Profile', { userId: '123' }); {/* ❌ Use params */}
|
|
211
125
|
```
|
|
212
126
|
|
|
213
|
-
##
|
|
127
|
+
## Best Practices
|
|
214
128
|
|
|
215
|
-
###
|
|
129
|
+
### Navigation Structure
|
|
216
130
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
</NavigationContainer>
|
|
223
|
-
);
|
|
224
|
-
};
|
|
131
|
+
✅ **DO**:
|
|
132
|
+
- Use tabs for top-level navigation
|
|
133
|
+
- Use stacks for detail navigation
|
|
134
|
+
- Keep navigation flat (max 2-3 levels)
|
|
135
|
+
- Use descriptive screen names
|
|
225
136
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
```
|
|
137
|
+
❌ **DON'T**:
|
|
138
|
+
- Create deeply nested navigation
|
|
139
|
+
- Use more than 5 tabs
|
|
140
|
+
- Mix navigation patterns arbitrarily
|
|
141
|
+
- Use abbreviations in screen names
|
|
232
142
|
|
|
233
|
-
###
|
|
143
|
+
### Tab Configuration
|
|
234
144
|
|
|
145
|
+
✅ **DO**:
|
|
235
146
|
```tsx
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
);
|
|
242
|
-
};
|
|
147
|
+
options: {
|
|
148
|
+
tabBarLabel: 'Home',
|
|
149
|
+
tabBarIcon: 'home-outline',
|
|
150
|
+
tabBarBadge: 3, // For notifications
|
|
151
|
+
}
|
|
243
152
|
```
|
|
244
153
|
|
|
245
|
-
|
|
246
|
-
|
|
154
|
+
❌ **DON'T**:
|
|
247
155
|
```tsx
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<Stack.Screen name="Register" component={RegisterScreen} />
|
|
253
|
-
<Stack.Screen name="ForgotPassword" component={ForgotPasswordScreen} />
|
|
254
|
-
</Stack.Navigator>
|
|
255
|
-
);
|
|
256
|
-
};
|
|
156
|
+
options: {
|
|
157
|
+
tabBarLabel: 'Hm', // ❌ Too abbreviated
|
|
158
|
+
tabBarIcon: 'invalid-icon-name', // ❌ Invalid icon
|
|
159
|
+
}
|
|
257
160
|
```
|
|
258
161
|
|
|
259
|
-
###
|
|
162
|
+
### Screen Options
|
|
260
163
|
|
|
164
|
+
✅ **DO**:
|
|
261
165
|
```tsx
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
name="Details"
|
|
268
|
-
component={DetailsScreen}
|
|
269
|
-
options={{ presentation: 'modal' }}
|
|
270
|
-
/>
|
|
271
|
-
</Stack.Navigator>
|
|
272
|
-
);
|
|
273
|
-
};
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Konfigürasyon
|
|
277
|
-
|
|
278
|
-
### TabScreenConfig
|
|
166
|
+
// Show header
|
|
167
|
+
options: {
|
|
168
|
+
headerShown: true,
|
|
169
|
+
title: 'Screen Title',
|
|
170
|
+
}
|
|
279
171
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
component: React.ComponentType; // Component (zorunlu)
|
|
284
|
-
options?: {
|
|
285
|
-
tabBarLabel?: string; // Tab label
|
|
286
|
-
tabBarIcon?: string; // İkon ismi (Ionicons)
|
|
287
|
-
tabBarBadge?: string | number; // Badge
|
|
288
|
-
title?: string; // Header başlığı
|
|
289
|
-
headerShown?: boolean; // Header göster/gizle
|
|
290
|
-
};
|
|
291
|
-
visible?: boolean; // Görünürlük
|
|
172
|
+
// Hide header
|
|
173
|
+
options: {
|
|
174
|
+
headerShown: false,
|
|
292
175
|
}
|
|
293
176
|
```
|
|
294
177
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
options?: {
|
|
302
|
-
title?: string;
|
|
303
|
-
headerShown?: boolean;
|
|
304
|
-
headerLeft?: React.ReactNode;
|
|
305
|
-
headerRight?: React.ReactNode;
|
|
306
|
-
headerStyle?: any;
|
|
307
|
-
headerTitleStyle?: any;
|
|
308
|
-
headerTintColor?: string;
|
|
309
|
-
};
|
|
178
|
+
❌ **DON'T**:
|
|
179
|
+
```tsx
|
|
180
|
+
// Don't mix header styles inconsistently
|
|
181
|
+
options: {
|
|
182
|
+
headerShown: true,
|
|
183
|
+
headerStyle: { backgroundColor: 'random-color' },
|
|
310
184
|
}
|
|
311
185
|
```
|
|
312
186
|
|
|
313
|
-
##
|
|
187
|
+
## AI Coding Guidelines
|
|
314
188
|
|
|
315
|
-
###
|
|
189
|
+
### For AI Agents
|
|
316
190
|
|
|
317
|
-
|
|
318
|
-
// Ana tab navigasyonu
|
|
319
|
-
<TabsNavigator config={mainTabs} />
|
|
191
|
+
When generating Navigation components, follow these rules:
|
|
320
192
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
193
|
+
1. **Always import from correct path**:
|
|
194
|
+
```typescript
|
|
195
|
+
import { TabsNavigator, StackNavigator } from 'react-native-design-system/src/molecules/navigation';
|
|
196
|
+
```
|
|
324
197
|
|
|
325
|
-
|
|
198
|
+
2. **Always provide unique IDs**:
|
|
199
|
+
```tsx
|
|
200
|
+
config={{
|
|
201
|
+
id: 'unique-navigator-id',
|
|
202
|
+
initialRouteName: 'Home',
|
|
203
|
+
screens: [...],
|
|
204
|
+
}}
|
|
205
|
+
```
|
|
326
206
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
options: {
|
|
207
|
+
3. **Always use valid icon names**:
|
|
208
|
+
```tsx
|
|
209
|
+
options: {
|
|
210
|
+
tabBarIcon: 'home-outline', // Valid Ionicons name
|
|
211
|
+
}
|
|
212
|
+
```
|
|
330
213
|
|
|
331
|
-
|
|
332
|
-
|
|
214
|
+
4. **Always define initial route**:
|
|
215
|
+
```tsx
|
|
216
|
+
config={{
|
|
217
|
+
initialRouteName: 'Home', // Always specify
|
|
218
|
+
}}
|
|
219
|
+
```
|
|
333
220
|
|
|
334
|
-
|
|
335
|
-
|
|
221
|
+
5. **Never create deeply nested navigation**:
|
|
222
|
+
```tsx
|
|
223
|
+
// ❌ Bad - Too deep
|
|
224
|
+
Tabs -> Stack -> Stack -> Stack
|
|
225
|
+
|
|
226
|
+
// ✅ Good - Flat
|
|
227
|
+
Tabs -> Stack
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Common Patterns
|
|
231
|
+
|
|
232
|
+
#### Main Navigation Structure
|
|
233
|
+
```tsx
|
|
234
|
+
export const AppNavigation = () => {
|
|
235
|
+
return (
|
|
236
|
+
<NavigationContainer>
|
|
237
|
+
<TabsNavigator
|
|
238
|
+
config={{
|
|
239
|
+
id: 'main-tabs',
|
|
240
|
+
initialRouteName: 'Home',
|
|
241
|
+
screens: [
|
|
242
|
+
{
|
|
243
|
+
name: 'Home',
|
|
244
|
+
component: HomeStack,
|
|
245
|
+
options: {
|
|
246
|
+
tabBarLabel: 'Home',
|
|
247
|
+
tabBarIcon: 'home-outline',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'Profile',
|
|
252
|
+
component: ProfileStack,
|
|
253
|
+
options: {
|
|
254
|
+
tabBarLabel: 'Profile',
|
|
255
|
+
tabBarIcon: 'person-outline',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
}}
|
|
260
|
+
/>
|
|
261
|
+
</NavigationContainer>
|
|
262
|
+
);
|
|
263
|
+
};
|
|
336
264
|
```
|
|
337
265
|
|
|
338
|
-
|
|
266
|
+
#### Stack with Header
|
|
267
|
+
```tsx
|
|
268
|
+
<StackNavigator
|
|
269
|
+
config={{
|
|
270
|
+
id: 'home-stack',
|
|
271
|
+
initialRouteName: 'HomeList',
|
|
272
|
+
screens: [
|
|
273
|
+
{
|
|
274
|
+
name: 'HomeList',
|
|
275
|
+
component: HomeList,
|
|
276
|
+
options: {
|
|
277
|
+
title: 'Home',
|
|
278
|
+
headerShown: true,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: 'Detail',
|
|
283
|
+
component: DetailScreen,
|
|
284
|
+
options: {
|
|
285
|
+
title: 'Details',
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
}}
|
|
290
|
+
/>
|
|
291
|
+
```
|
|
339
292
|
|
|
293
|
+
#### Hidden Tab
|
|
340
294
|
```tsx
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
295
|
+
{
|
|
296
|
+
name: 'Admin',
|
|
297
|
+
component: AdminScreen,
|
|
298
|
+
visible: false, // Hidden from UI
|
|
344
299
|
}
|
|
345
300
|
```
|
|
346
301
|
|
|
347
|
-
##
|
|
302
|
+
## Props Reference
|
|
303
|
+
|
|
304
|
+
### TabsNavigator
|
|
305
|
+
|
|
306
|
+
| Prop | Type | Required | Default | Description |
|
|
307
|
+
|------|------|----------|---------|-------------|
|
|
308
|
+
| `config` | `TabNavigatorConfig` | Yes | - | Navigator configuration |
|
|
309
|
+
| `theme` | `Theme` | No | Default theme | Theme object |
|
|
310
|
+
|
|
311
|
+
### StackNavigator
|
|
312
|
+
|
|
313
|
+
| Prop | Type | Required | Default | Description |
|
|
314
|
+
|------|------|----------|---------|-------------|
|
|
315
|
+
| `config` | `StackNavigatorConfig` | Yes | - | Navigator configuration |
|
|
316
|
+
| `theme` | `Theme` | No | Default theme | Theme object |
|
|
317
|
+
|
|
318
|
+
### TabScreenConfig
|
|
319
|
+
|
|
320
|
+
| Property | Type | Required | Description |
|
|
321
|
+
|----------|------|----------|-------------|
|
|
322
|
+
| `name` | `string` | Yes | Screen name (unique) |
|
|
323
|
+
| `component` | `Component` | Yes | Screen component |
|
|
324
|
+
| `options` | `object` | No | Tab options (label, icon, badge) |
|
|
325
|
+
| `visible` | `boolean` | No | Show/hide tab |
|
|
348
326
|
|
|
349
|
-
|
|
327
|
+
## Accessibility
|
|
350
328
|
|
|
351
|
-
- ✅ Screen reader
|
|
352
|
-
- ✅
|
|
353
|
-
- ✅
|
|
354
|
-
- ✅
|
|
355
|
-
- ✅
|
|
329
|
+
- ✅ Screen reader announces tab labels
|
|
330
|
+
- ✅ Focus management for keyboard navigation
|
|
331
|
+
- ✅ Semantic navigation structure
|
|
332
|
+
- ✅ Proper tab order
|
|
333
|
+
- ✅ Header titles announced
|
|
356
334
|
|
|
357
|
-
##
|
|
335
|
+
## Performance
|
|
358
336
|
|
|
359
|
-
1. **Lazy
|
|
360
|
-
2. **Memoization**:
|
|
361
|
-
3. **Unmount**:
|
|
337
|
+
1. **Lazy loading**: Load screens on demand
|
|
338
|
+
2. **Memoization**: Memo screen options
|
|
339
|
+
3. **Unmount**: Unmount unused screens
|
|
340
|
+
4. **Optimization**: Use `navigation.addListener` wisely
|
|
362
341
|
|
|
363
|
-
##
|
|
342
|
+
## Related Components
|
|
364
343
|
|
|
365
344
|
- [`AtomicFab`](../../atoms/AtomicFab/README.md) - Floating action button
|
|
366
|
-
- [`AtomicIcon`](../../atoms/AtomicIcon/README.md) -
|
|
367
|
-
- [`BaseModal`](../BaseModal/README.md) - Modal
|
|
345
|
+
- [`AtomicIcon`](../../atoms/AtomicIcon/README.md) - Icon component
|
|
346
|
+
- [`BaseModal`](../BaseModal/README.md) - Modal component
|
|
368
347
|
|
|
369
|
-
##
|
|
348
|
+
## External Resources
|
|
370
349
|
|
|
371
|
-
|
|
372
|
-
- [Bottom Tabs](https://reactnavigation.org/docs/bottom-tab-navigator/)
|
|
350
|
+
- [React Navigation Docs](https://reactnavigation.org/)
|
|
351
|
+
- [Bottom Tabs Navigator](https://reactnavigation.org/docs/bottom-tab-navigator/)
|
|
373
352
|
- [Stack Navigator](https://reactnavigation.org/docs/stack-navigator/)
|
|
374
353
|
|
|
375
|
-
##
|
|
354
|
+
## License
|
|
376
355
|
|
|
377
356
|
MIT
|