@umituz/react-native-design-system 2.6.93 → 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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/src/atoms/AtomicAvatar.README.md +284 -397
  3. package/src/atoms/AtomicBadge.README.md +123 -358
  4. package/src/atoms/AtomicCard.README.md +358 -247
  5. package/src/atoms/AtomicDatePicker.README.md +127 -332
  6. package/src/atoms/AtomicFab.README.md +194 -352
  7. package/src/atoms/AtomicIcon.README.md +241 -274
  8. package/src/atoms/AtomicProgress.README.md +100 -338
  9. package/src/atoms/AtomicSpinner.README.md +304 -337
  10. package/src/atoms/AtomicText.README.md +153 -389
  11. package/src/atoms/AtomicTextArea.README.md +267 -268
  12. package/src/atoms/EmptyState.README.md +247 -292
  13. package/src/atoms/GlassView/README.md +313 -444
  14. package/src/atoms/button/README.md +186 -297
  15. package/src/atoms/button/STRATEGY.md +252 -0
  16. package/src/atoms/chip/README.md +242 -290
  17. package/src/atoms/input/README.md +296 -290
  18. package/src/atoms/picker/README.md +278 -309
  19. package/src/atoms/skeleton/AtomicSkeleton.README.md +394 -252
  20. package/src/exports/theme.ts +0 -1
  21. package/src/molecules/BaseModal/README.md +356 -0
  22. package/src/molecules/BaseModal.README.md +324 -200
  23. package/src/molecules/ConfirmationModal.README.md +349 -302
  24. package/src/molecules/Divider/README.md +293 -376
  25. package/src/molecules/FormField.README.md +321 -534
  26. package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
  27. package/src/molecules/GlowingCard/README.md +230 -372
  28. package/src/molecules/IconContainer.tsx +1 -1
  29. package/src/molecules/List/README.md +281 -488
  30. package/src/molecules/ListItem.README.md +320 -315
  31. package/src/molecules/SearchBar/README.md +332 -430
  32. package/src/molecules/StepHeader/README.md +311 -411
  33. package/src/molecules/StepProgress/README.md +281 -448
  34. package/src/molecules/alerts/README.md +272 -355
  35. package/src/molecules/avatar/README.md +295 -356
  36. package/src/molecules/bottom-sheet/README.md +303 -340
  37. package/src/molecules/calendar/README.md +301 -265
  38. package/src/molecules/countdown/README.md +347 -456
  39. package/src/molecules/emoji/README.md +281 -514
  40. package/src/molecules/listitem/README.md +307 -399
  41. package/src/molecules/media-card/MediaCard.tsx +31 -34
  42. package/src/molecules/media-card/README.md +217 -319
  43. package/src/molecules/navigation/README.md +263 -284
  44. package/src/molecules/splash/README.md +76 -92
  45. package/src/molecules/swipe-actions/README.md +376 -588
@@ -1,36 +1,23 @@
1
1
  # Navigation System
2
2
 
3
- React Native Design System, React Navigation ile entegre çalışan hazır navigator bileşenleri sunar. Tema bilinci ve özelleştirilebilir navigasyon çözümleri sağlar.
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
- ## Navigation Bileşenleri
5
+ ## Import & Usage
6
6
 
7
- - **TabsNavigator** - Bottom tab navigasyonu
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
- ## TabsNavigator
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
- ### Temel Kullanım
16
+ ## Basic Usage
25
17
 
26
18
  ```tsx
27
- import { TabsNavigator } from 'react-native-design-system';
28
- import { HomeScreen } from './HomeScreen';
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: 'Ana Sayfa',
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
- ### Badge Gösterimi
37
+ ## Strategy
69
38
 
70
- ```tsx
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
- ### Gizli Tab
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
- ```tsx
92
- screens: [
93
- {
94
- name: 'Home',
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
- ### Custom Screen Options
52
+ ## Rules
110
53
 
111
- ```tsx
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
- ## StackNavigator
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
- Screen'ler arası geçiş için kullanılır. Push/pop animasyonları ve header yönetimi sağlar.
62
+ ### Tab Navigator
127
63
 
128
- ### Temel Kullanım
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
- ```tsx
131
- import { StackNavigator } from 'react-native-design-system';
132
- import { HomeScreen } from './HomeScreen';
133
- import { DetailsScreen } from './DetailsScreen';
69
+ ### Stack Navigator
134
70
 
135
- export const AppStack = () => {
136
- const stackConfig = {
137
- id: 'app-stack',
138
- initialRouteName: 'Home',
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
- return <StackNavigator config={stackConfig} />;
159
- };
160
- ```
76
+ ## Forbidden
161
77
 
162
- ### Header Gizle
78
+ **NEVER** do these:
163
79
 
164
80
  ```tsx
165
- screens: [
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
- ### Custom Header
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
- ```tsx
179
- screens: [
180
- {
181
- name: 'Home',
182
- component: HomeScreen,
183
- options: {
184
- headerTitle: () => <CustomHeader />,
185
- headerStyle: {
186
- backgroundColor: '#6366f1',
187
- },
188
- headerTintColor: '#ffffff',
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
- ### Header Right
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
- ```tsx
197
- screens: [
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
- ## Örnek Kullanımlar
127
+ ## Best Practices
214
128
 
215
- ### Ana Navigasyon Yapısı
129
+ ### Navigation Structure
216
130
 
217
- ```tsx
218
- export const AppNavigation = () => {
219
- return (
220
- <NavigationContainer>
221
- <Stacks />
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
- const Stacks = () => {
227
- return (
228
- <TabsNavigator config={mainTabConfig} />
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
- ### İç içe Navigasyon
143
+ ### Tab Configuration
234
144
 
145
+ ✅ **DO**:
235
146
  ```tsx
236
- export const NestedNavigation = () => {
237
- return (
238
- <TabsNavigator config={mainTabConfig}>
239
- {/* Her tab içinde kendi stack'i olabilir */}
240
- </TabsNavigator>
241
- );
242
- };
147
+ options: {
148
+ tabBarLabel: 'Home',
149
+ tabBarIcon: 'home-outline',
150
+ tabBarBadge: 3, // For notifications
151
+ }
243
152
  ```
244
153
 
245
- ### Auth Flow
246
-
154
+ **DON'T**:
247
155
  ```tsx
248
- export const AuthNavigation = () => {
249
- return (
250
- <Stack.Navigator screenOptions={{ headerShown: false }}>
251
- <Stack.Screen name="Login" component={LoginScreen} />
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
- ### Modal Stack
162
+ ### Screen Options
260
163
 
164
+ ✅ **DO**:
261
165
  ```tsx
262
- export const MainStack = () => {
263
- return (
264
- <Stack.Navigator>
265
- <Stack.Screen name="Home" component={HomeScreen} />
266
- <Stack.Screen
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
- ```typescript
281
- interface TabScreenConfig {
282
- name: string; // Screen adı (zorunlu)
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
- ### StackScreenConfig
296
-
297
- ```typescript
298
- interface StackScreenConfig {
299
- name: string;
300
- component: React.ComponentType;
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
- ## Best Practices
187
+ ## AI Coding Guidelines
314
188
 
315
- ### 1. Navigasyon Yapısı
189
+ ### For AI Agents
316
190
 
317
- ```tsx
318
- // Ana tab navigasyonu
319
- <TabsNavigator config={mainTabs} />
191
+ When generating Navigation components, follow these rules:
320
192
 
321
- // Her tab içinde stack
322
- <StackNavigator config={homeStack} />
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
- ### 2. Screen Options
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
- ```tsx
328
- // Header göster
329
- options: { headerShown: true }
207
+ 3. **Always use valid icon names**:
208
+ ```tsx
209
+ options: {
210
+ tabBarIcon: 'home-outline', // Valid Ionicons name
211
+ }
212
+ ```
330
213
 
331
- // Header gizle
332
- options: { headerShown: false }
214
+ 4. **Always define initial route**:
215
+ ```tsx
216
+ config={{
217
+ initialRouteName: 'Home', // Always specify
218
+ }}
219
+ ```
333
220
 
334
- // Custom başlık
335
- options: { title: 'Başlık' }
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
- ### 3. İkon Seçimi
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
- // İkon isimleri (Ionicons)
342
- options: {
343
- tabBarIcon: 'home-outline',
295
+ {
296
+ name: 'Admin',
297
+ component: AdminScreen,
298
+ visible: false, // Hidden from UI
344
299
  }
345
300
  ```
346
301
 
347
- ## Erişilebilirlik
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
- Navigation bileşenleri, tam erişilebilirlik desteği sunar:
327
+ ## Accessibility
350
328
 
351
- - ✅ Screen reader desteği
352
- - ✅ Tab label anonsu
353
- - ✅ Focus management
354
- - ✅ Keyboard navigation
355
- - ✅ Semantic anlamlar
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
- ## Performans İpuçları
335
+ ## Performance
358
336
 
359
- 1. **Lazy Loading**: Screen'leri lazy load edin
360
- 2. **Memoization**: Screen options'ı memo edin
361
- 3. **Unmount**: Kullanılmayan screen'leri unmount edin
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
- ## İlgili Bileşenler
342
+ ## Related Components
364
343
 
365
344
  - [`AtomicFab`](../../atoms/AtomicFab/README.md) - Floating action button
366
- - [`AtomicIcon`](../../atoms/AtomicIcon/README.md) - İkon bileşeni
367
- - [`BaseModal`](../BaseModal/README.md) - Modal bileşeni
345
+ - [`AtomicIcon`](../../atoms/AtomicIcon/README.md) - Icon component
346
+ - [`BaseModal`](../BaseModal/README.md) - Modal component
368
347
 
369
- ## React Navigation Dokümantasyonu
348
+ ## External Resources
370
349
 
371
- Detaylı bilgi için:
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
- ## Lisans
354
+ ## License
376
355
 
377
356
  MIT