@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.
Files changed (43) 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/molecules/BaseModal/README.md +356 -0
  21. package/src/molecules/BaseModal.README.md +324 -200
  22. package/src/molecules/ConfirmationModal.README.md +349 -302
  23. package/src/molecules/Divider/README.md +293 -376
  24. package/src/molecules/FormField.README.md +321 -534
  25. package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
  26. package/src/molecules/GlowingCard/README.md +230 -372
  27. package/src/molecules/List/README.md +281 -488
  28. package/src/molecules/ListItem.README.md +320 -315
  29. package/src/molecules/SearchBar/README.md +332 -430
  30. package/src/molecules/StepHeader/README.md +311 -411
  31. package/src/molecules/StepProgress/README.md +281 -448
  32. package/src/molecules/alerts/README.md +272 -355
  33. package/src/molecules/avatar/README.md +295 -356
  34. package/src/molecules/bottom-sheet/README.md +303 -340
  35. package/src/molecules/calendar/README.md +301 -265
  36. package/src/molecules/countdown/README.md +347 -456
  37. package/src/molecules/emoji/README.md +281 -514
  38. package/src/molecules/listitem/README.md +307 -399
  39. package/src/molecules/media-card/MediaCard.tsx +31 -34
  40. package/src/molecules/media-card/README.md +217 -319
  41. package/src/molecules/navigation/README.md +263 -284
  42. package/src/molecules/splash/README.md +76 -80
  43. package/src/molecules/swipe-actions/README.md +376 -588
@@ -1,372 +1,327 @@
1
1
  # EmptyState
2
2
 
3
- EmptyState, veri bulunmadığında gösterilen bir bileşendir. Kullanıcıya durumu açıklar ve aksiyon alması için rehberlik eder.
3
+ A component displayed when no data is available. Explains the situation and guides users to take action.
4
4
 
5
- ## Özellikler
5
+ ## Import & Usage
6
6
 
7
- - 🎭 **İkon veya Illustration**: Görsel destek
8
- - 📝 **Title & Description**: Açıklama metinleri
9
- - 👆 **Action Button**: Aksiyon butonu desteği
10
- - 🎨 **Tema Bilinci**: Otomatik tema uyumu
11
- - ♿ **Erişilebilir**: Tam erişilebilirlik desteği
12
-
13
- ## Kurulum
14
-
15
- ```tsx
16
- import { EmptyState } from 'react-native-design-system';
7
+ ```typescript
8
+ import { EmptyState } from 'react-native-design-system/src/atoms/EmptyState';
17
9
  ```
18
10
 
19
- ## Temel Kullanım
20
-
21
- ```tsx
22
- import React from 'react';
23
- import { View } from 'react-native';
24
- import { EmptyState } from 'react-native-design-system';
25
-
26
- export const BasicExample = () => {
27
- return (
28
- <View style={{ flex: 1 }}>
29
- <EmptyState
30
- title="Henüz öğe yok"
31
- description="İlk öğeyi oluşturmak için başlayın"
32
- />
33
- </View>
34
- );
35
- };
36
- ```
11
+ **Location:** `src/atoms/EmptyState.tsx`
37
12
 
38
- ## Basic Empty State
13
+ ## Basic Usage
39
14
 
40
15
  ```tsx
41
16
  <EmptyState
42
- title="Veri Bulunamadı"
17
+ title="No items yet"
18
+ description="Get started by creating your first item"
43
19
  />
44
20
  ```
45
21
 
46
- ## Description ile
22
+ ## Strategy
47
23
 
48
- ```tsx
49
- <EmptyState
50
- title="Henüz mesaj yok"
51
- description="İlk mesajı gönderin ve sohbeti başlatın"
52
- />
53
- ```
24
+ **Purpose**: Communicate empty states clearly and guide users to resolution.
54
25
 
55
- ## Custom İkon
26
+ **When to Use**:
27
+ - No data in lists/feeds (empty folders, no results)
28
+ - Error states with recovery action
29
+ - Zero-state onboarding (first-time users)
30
+ - Search returned no results
31
+ - Feature not available yet
56
32
 
57
- ```tsx
58
- <EmptyState
59
- icon="mail-outline"
60
- title="Mesaj Yok"
61
- description="Henüz mesajınız bulunmuyor"
62
- />
63
- ```
33
+ **When NOT to Use**:
34
+ - Loading states (use AtomicSpinner or AtomicSkeleton)
35
+ - Success states (use success-specific UI)
36
+ - For decorative illustrations without context
64
37
 
65
- ## Action Button ile
38
+ ## Rules
66
39
 
67
- ```tsx
68
- <EmptyState
69
- icon="document-text-outline"
70
- title="Henüz içerik yok"
71
- description="İlk içeriği oluşturmak için butona tıklayın"
72
- actionLabel="İçerik Oluştur"
73
- onAction={() => console.log('İçerik oluştur')}
74
- />
75
- ```
40
+ ### Required
76
41
 
77
- ## Custom Illustration
42
+ 1. **MUST** have a `title` prop explaining the state
43
+ 2. **SHOULD** provide `description` for clarity
44
+ 3. **MUST** provide actionable next step if applicable
45
+ 4. **ALWAYS** use appropriate icon for context
46
+ 5. **SHOULD** be concise and scannable
47
+ 6. **MUST** have accessible labeling
48
+ 7. **ALWAYS** provide action when user can resolve
78
49
 
79
- ```tsx
80
- <EmptyState
81
- title="Özelleştirilmiş İllüstrasyon"
82
- illustration={
83
- <Image
84
- source={require('./empty-state.png')}
85
- style={{ width: 200, height: 200 }}
86
- />
87
- }
88
- description="Açıklama metni"
89
- />
90
- ```
50
+ ### Content Guidelines
91
51
 
92
- ## Örnek Kullanımlar
52
+ 1. **Title**: Short, clear (3-5 words)
53
+ 2. **Description**: Helpful, not obvious
54
+ 3. **Action**: Clear, action-oriented text
55
+ 4. **Icon**: Contextually appropriate
93
56
 
94
- ### Boş Liste
57
+ ### Action Guidelines
95
58
 
96
- ```tsx
97
- export const EmptyList = () => {
98
- return (
99
- <EmptyState
100
- icon="list-outline"
101
- title="Henüz liste boş"
102
- description="Listeye öğe eklemek için butona tıklayın"
103
- actionLabel="Öğe Ekle"
104
- onAction={() => console.log('Ekle')}
105
- />
106
- );
107
- };
108
- ```
109
-
110
- ### Boş Arama
59
+ 1. **Provide action**: If user can resolve
60
+ 2. **Skip action**: If informational only
61
+ 3. **Make primary**: When there's one clear action
62
+ 4. **Make optional**: When multiple actions possible
111
63
 
112
- ```tsx
113
- export const EmptySearch = ({ query }) => {
114
- return (
115
- <EmptyState
116
- icon="search-outline"
117
- title="Sonuç Bulunamadı"
118
- description={`"${query}" için sonuç bulunamadı`}
119
- actionLabel="Aramayı Temizle"
120
- onAction={() => setQuery('')}
121
- />
122
- );
123
- };
124
- ```
64
+ ## Forbidden
125
65
 
126
- ### Boş Bildirimler
66
+ **NEVER** do these:
127
67
 
128
68
  ```tsx
129
- export const EmptyNotifications = () => {
130
- return (
131
- <EmptyState
132
- icon="notifications-off-outline"
133
- title="Bildirim Yok"
134
- description="Henüz bildiriminiz bulunmuyor"
135
- />
136
- );
137
- };
138
- ```
69
+ // No title
70
+ <EmptyState /> {/* ❌ Missing required context */}
139
71
 
140
- ### Boş Favoriler
141
-
142
- ```tsx
143
- export const EmptyFavorites = () => {
144
- return (
145
- <EmptyState
146
- icon="heart-outline"
147
- title="Favori Yok"
148
- description="Beğendiğiniz öğeleri favorilere ekleyin"
149
- actionLabel="Keşfet"
150
- onAction={() => navigation.navigate('Explore')}
151
- />
152
- );
153
- };
154
- ```
72
+ // Generic title
73
+ <EmptyState
74
+ title="Empty" {/* ❌ Not helpful */}
75
+ />
155
76
 
156
- ### Boş Sepet
77
+ // Obvious description
78
+ <EmptyState
79
+ title="No items"
80
+ description="There are no items here" {/* ❌ States the obvious */}
81
+ />
157
82
 
158
- ```tsx
159
- export const EmptyCart = () => {
160
- return (
161
- <EmptyState
162
- icon="cart-outline"
163
- title="Sepetiniz Boş"
164
- description="Sepetinize ürün ekleyin ve alışverişe başlayın"
165
- actionLabel="Alışverişe Başla"
166
- onAction={() => navigation.navigate('Products')}
167
- />
168
- );
169
- };
170
- ```
83
+ // ❌ Action without handler
84
+ <EmptyState
85
+ actionLabel="Create item"
86
+ // ❌ Missing onAction
87
+ />
171
88
 
172
- ### Boş İndirmeler
89
+ // Wrong icon
90
+ <EmptyState
91
+ title="No results"
92
+ icon="checkmark-circle" {/* ❌ Confusing - suggests success */}
93
+ />
173
94
 
174
- ```tsx
175
- export const EmptyDownloads = () => {
176
- return (
177
- <EmptyState
178
- icon="download-outline"
179
- title="İndirme Yok"
180
- description="İndirilen içeriğiniz burada görünecek"
181
- />
182
- );
183
- };
95
+ // ❌ Too much text
96
+ <EmptyState
97
+ title="No items found in your search"
98
+ description="You searched for something and we couldn't find it. Try searching again with different terms or checking your spelling." {/* ❌ Too long */}
99
+ />
184
100
  ```
185
101
 
186
- ### Boş Arama Geçmişi
102
+ ## Best Practices
103
+
104
+ ### Clear Messaging
187
105
 
106
+ ✅ **DO**:
188
107
  ```tsx
189
- export const EmptySearchHistory = () => {
190
- return (
191
- <EmptyState
192
- icon="time-outline"
193
- title="Arama Geçmişi Yok"
194
- description="Yaptığınız aramalar burada görünecek"
195
- />
196
- );
197
- };
198
- ```
108
+ // Specific and helpful
109
+ <EmptyState
110
+ title="No conversations yet"
111
+ description="Start a conversation with your contacts"
112
+ icon="chatbubbles-outline"
113
+ />
199
114
 
200
- ### Bağlantı Hatası
115
+ // Action-oriented
116
+ <EmptyState
117
+ title="No search results"
118
+ description="Try adjusting your search terms"
119
+ actionLabel="Clear search"
120
+ onAction={() => setSearchQuery('')}
121
+ />
122
+ ```
201
123
 
124
+ ❌ **DON'T**:
202
125
  ```tsx
203
- export const ConnectionError = () => {
204
- return (
205
- <EmptyState
206
- icon="wifi-outline"
207
- title="İnternet Bağlantısı Yok"
208
- description="Lütfen internet bağlantınızı kontrol edin"
209
- actionLabel="Tekrar Dene"
210
- onAction={() => refetch()}
211
- />
212
- );
213
- };
126
+ // Generic
127
+ <EmptyState title="Empty" />
128
+
129
+ // ❌ Obvious description
130
+ <EmptyState
131
+ title="No items"
132
+ description="You have no items"
133
+ />
214
134
  ```
215
135
 
216
- ### Hata Durumu
136
+ ### Appropriate Actions
217
137
 
138
+ ✅ **DO**:
218
139
  ```tsx
219
- export const ErrorState = ({ error, onRetry }) => {
220
- return (
221
- <EmptyState
222
- icon="alert-circle-outline"
223
- title="Bir Hata Oluştu"
224
- description={error?.message || 'Beklenmeyen bir hata oluştu'}
225
- actionLabel="Tekrar Dene"
226
- onAction={onRetry}
227
- />
228
- );
229
- };
230
- ```
140
+ // Clear action
141
+ <EmptyState
142
+ title="No photos yet"
143
+ description="Take photos to see them here"
144
+ actionLabel="Take Photo"
145
+ onAction={handleTakePhoto}
146
+ />
231
147
 
232
- ### İzin Gerekli
148
+ // Multiple options
149
+ <View>
150
+ <EmptyState
151
+ title="No internet connection"
152
+ description="Check your connection and try again"
153
+ icon="wifi-outline"
154
+ />
155
+ <Button title="Retry" onPress={handleRetry} />
156
+ </View>
157
+ ```
233
158
 
159
+ ❌ **DON'T**:
234
160
  ```tsx
235
- export const PermissionRequired = () => {
236
- return (
237
- <EmptyState
238
- icon="lock-closed-outline"
239
- title="Kamera İzni Gerekli"
240
- description="Fotoğraf çekmek için kamera izni vermeniz gerekiyor"
241
- actionLabel="İzin Ver"
242
- onAction={() => requestPermission()}
243
- />
244
- );
245
- };
161
+ // Action without handler
162
+ <EmptyState
163
+ actionLabel="Create"
164
+ // Missing onAction
165
+ />
166
+
167
+ // ❌ Vague action
168
+ <EmptyState
169
+ actionLabel="Click here"
170
+ onAction={handleAction}
171
+ />
246
172
  ```
247
173
 
248
- ### Giriş Gerekli
174
+ ### Icon Selection
249
175
 
176
+ ✅ **DO**:
250
177
  ```tsx
251
- export const LoginRequired = () => {
252
- return (
253
- <EmptyState
254
- icon="person-outline"
255
- title="Giriş Yapmalısınız"
256
- description="Bu özelliği kullanmak için giriş yapmalısınız"
257
- actionLabel="Giriş Yap"
258
- onAction={() => navigation.navigate('Login')}
259
- />
260
- );
261
- };
178
+ // Contextually appropriate
179
+ <EmptyState icon="search-outline" title="No results" />
180
+ <EmptyState icon="cart-outline" title="Cart is empty" />
181
+ <EmptyState icon="notifications-off-outline" title="No notifications" />
182
+ <EmptyState icon="wifi-outline" title="No connection" />
262
183
  ```
263
184
 
264
- ### Özellik Yakında
265
-
185
+ **DON'T**:
266
186
  ```tsx
267
- export const ComingSoon = () => {
268
- return (
269
- <EmptyState
270
- icon="rocket-outline"
271
- title="Yakında Burada"
272
- description="Bu özellik yakında kullanıma sunulacak"
273
- />
274
- );
275
- };
187
+ // Confusing icons
188
+ <EmptyState icon="checkmark-circle" title="No results" />
189
+ <EmptyState icon="warning" title="Empty cart" />
276
190
  ```
277
191
 
278
- ### Bakım Modu
279
-
192
+ ## AI Coding Guidelines
193
+
194
+ ### For AI Agents
195
+
196
+ When generating EmptyState components, follow these rules:
197
+
198
+ 1. **Always provide clear title**:
199
+ ```tsx
200
+ // ✅ Good - specific and clear
201
+ <EmptyState title="No conversations yet" />
202
+ <EmptyState title="Search found no results" />
203
+
204
+ // ❌ Bad - generic
205
+ <EmptyState title="Empty" />
206
+ <EmptyState title="No data" />
207
+ ```
208
+
209
+ 2. **Always provide helpful description**:
210
+ ```tsx
211
+ // ✅ Good - helpful guidance
212
+ <EmptyState
213
+ title="No items"
214
+ description="Get started by creating your first item"
215
+ />
216
+
217
+ // ❌ Bad - obvious or missing
218
+ <EmptyState
219
+ title="No items"
220
+ description="There are no items" // Obvious
221
+ />
222
+ ```
223
+
224
+ 3. **Always provide action when resolvable**:
225
+ ```tsx
226
+ // ✅ Good - actionable
227
+ <EmptyState
228
+ title="No photos"
229
+ actionLabel="Take Photo"
230
+ onAction={handleTakePhoto}
231
+ />
232
+
233
+ // ❌ Bad - action without handler
234
+ <EmptyState
235
+ actionLabel="Create"
236
+ // Missing onAction
237
+ />
238
+ ```
239
+
240
+ 4. **Always use appropriate icons**:
241
+ ```tsx
242
+ // ✅ Good - contextual
243
+ <EmptyState icon="search-outline" title="No results" />
244
+ <EmptyState icon="cart-outline" title="Cart empty" />
245
+
246
+ // ❌ Bad - wrong context
247
+ <EmptyState icon="checkmark-circle" title="No results" />
248
+ ```
249
+
250
+ ### Common Patterns
251
+
252
+ #### Basic Empty State
280
253
  ```tsx
281
- export const MaintenanceMode = () => {
282
- return (
283
- <EmptyState
284
- icon="construct-outline"
285
- title="Bakım Modu"
286
- description="Sistem bakımında, lütfen daha sonra tekrar deneyin"
287
- />
288
- );
289
- };
254
+ <EmptyState
255
+ title="No items yet"
256
+ description="Items will appear here when you add them"
257
+ />
290
258
  ```
291
259
 
292
- ## Props
293
-
294
- ### EmptyStateProps
295
-
296
- | Prop | Tip | Varsayılan | Açıklama |
297
- |------|-----|------------|----------|
298
- | `icon` | `string` | `'file-tray-outline'` | İkon ismi |
299
- | `title` | `string` | - **(Zorunlu)** | Başlık metni |
300
- | `subtitle` | `string` | - | Alt başlık (deprecated, description kullanın) |
301
- | `description` | `string` | - | Açıklama metni |
302
- | `actionLabel` | `string` | - | Aksiyon butonu metni |
303
- | `onAction` | `() => void` | - | Aksiyon callback'i |
304
- | `illustration` | `ReactNode` | - | Custom illüstrasyon |
305
- | `style` | `ViewStyle` | - | Özel stil |
306
- | `testID` | `string` | - | Test ID'si |
307
-
308
- ## Best Practices
309
-
310
- ### 1. İkon Seçimi
311
-
260
+ #### With Action
312
261
  ```tsx
313
- // Genel boş durum
314
- <EmptyState icon="document-outline" />
315
-
316
- // Arama boş
317
- <EmptyState icon="search-outline" />
318
-
319
- // Hata durumu
320
- <EmptyState icon="alert-circle-outline" />
321
-
322
- // Başarı durumu
323
- <EmptyState icon="checkmark-circle-outline" />
262
+ <EmptyState
263
+ title="No conversations"
264
+ description="Start messaging your contacts"
265
+ icon="chatbubbles-outline"
266
+ actionLabel="Start Chat"
267
+ onAction={handleStartChat}
268
+ />
324
269
  ```
325
270
 
326
- ### 2. Açıklama Metni
327
-
271
+ #### Error State
328
272
  ```tsx
329
- // Kısa ve açıklayıcı
330
273
  <EmptyState
331
- title="Boş Başlık"
332
- description="Ne yapmanız gerektiğini açıklayın"
274
+ title="Connection Error"
275
+ description="Check your internet connection"
276
+ icon="wifi-outline"
277
+ actionLabel="Retry"
278
+ onAction={handleRetry}
333
279
  />
334
280
  ```
335
281
 
336
- ### 3. Action Button
337
-
282
+ #### Search Results
338
283
  ```tsx
339
- // Aksiyon varsa
340
284
  <EmptyState
341
- actionLabel="Şimdi Ekle"
342
- onAction={handleAction}
285
+ title="No results found"
286
+ description={`No results for "${query}"`}
287
+ icon="search-outline"
288
+ actionLabel="Clear search"
289
+ onAction={() => setQuery('')}
343
290
  />
344
-
345
- // Sadece bilgilendirme
346
- <EmptyState title="Bilgilendirme" />
347
291
  ```
348
292
 
349
- ## Erişilebilirlik
293
+ ## Props Reference
294
+
295
+ | Prop | Type | Required | Default | Description |
296
+ |------|------|----------|---------|-------------|
297
+ | `title` | `string` | Yes | - | State title |
298
+ | `description` | `string` | No | - | State description |
299
+ | `icon` | `string` | No | `'file-tray-outline'` | Icon name |
300
+ | `actionLabel` | `string` | No | - | Action button text |
301
+ | `onAction` | `() => void` | No | - | Action callback |
302
+ | `illustration` | `ReactNode` | No | - | Custom illustration |
303
+ | `style` | `ViewStyle` | No | - | Custom style |
304
+ | `testID` | `string` | No | - | Test identifier |
350
305
 
351
- EmptyState, tam erişilebilirlik desteği sunar:
306
+ ## Accessibility
352
307
 
353
- - ✅ Screen reader desteği
354
- - ✅ Semantic anlamlar
355
- - ✅ Touch uygun boyut
356
- - ✅ Action button erişilebilirliği
308
+ - ✅ Screen reader announces state and action
309
+ - ✅ Semantic meaning from icon
310
+ - ✅ Touch target for action button
311
+ - ✅ Test ID support
357
312
 
358
- ## Performans İpuçları
313
+ ## Performance Tips
359
314
 
360
- 1. **Lazy Load**: Illustration'ları lazy load edin
361
- 2. **Memoization**: Component'i memo edin
362
- 3. **Simple Icons**: Karmaşık illüstrasyonlar yerine basit ikonlar kullanın
315
+ 1. **Lazy illustrations**: Load illustration images lazily
316
+ 2. **Memoization**: Memo empty state component
317
+ 3. **Simple icons**: Prefer icons over complex illustrations
363
318
 
364
- ## İlgili Bileşenler
319
+ ## Related Components
365
320
 
366
- - [`AtomicSkeleton`](./skeleton/AtomicSkeleton/README.md) - Skeleton loading
367
- - [`AtomicSpinner`](./AtomicSpinner/README.md) - Yükleme göstergesi
368
- - [`AtomicIcon`](./AtomicIcon/README.md) - İkon bileşeni
321
+ - [`AtomicSkeleton`](./skeleton/AtomicSkeleton.README.md) - Skeleton loading
322
+ - [`AtomicSpinner`](./AtomicSpinner.README.md) - Loading spinner
323
+ - [`AtomicIcon`](./AtomicIcon.README.md) - Icon component
369
324
 
370
- ## Lisans
325
+ ## License
371
326
 
372
327
  MIT