@umituz/react-native-design-system 2.6.87 → 2.6.88

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.
@@ -0,0 +1,372 @@
1
+ # EmptyState
2
+
3
+ EmptyState, veri bulunmadığında gösterilen bir bileşendir. Kullanıcıya durumu açıklar ve aksiyon alması için rehberlik eder.
4
+
5
+ ## Özellikler
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';
17
+ ```
18
+
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
+ ```
37
+
38
+ ## Basic Empty State
39
+
40
+ ```tsx
41
+ <EmptyState
42
+ title="Veri Bulunamadı"
43
+ />
44
+ ```
45
+
46
+ ## Description ile
47
+
48
+ ```tsx
49
+ <EmptyState
50
+ title="Henüz mesaj yok"
51
+ description="İlk mesajı gönderin ve sohbeti başlatın"
52
+ />
53
+ ```
54
+
55
+ ## Custom İkon
56
+
57
+ ```tsx
58
+ <EmptyState
59
+ icon="mail-outline"
60
+ title="Mesaj Yok"
61
+ description="Henüz mesajınız bulunmuyor"
62
+ />
63
+ ```
64
+
65
+ ## Action Button ile
66
+
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
+ ```
76
+
77
+ ## Custom Illustration
78
+
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
+ ```
91
+
92
+ ## Örnek Kullanımlar
93
+
94
+ ### Boş Liste
95
+
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
111
+
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
+ ```
125
+
126
+ ### Boş Bildirimler
127
+
128
+ ```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
+ ```
139
+
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
+ ```
155
+
156
+ ### Boş Sepet
157
+
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
+ ```
171
+
172
+ ### Boş İndirmeler
173
+
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
+ };
184
+ ```
185
+
186
+ ### Boş Arama Geçmişi
187
+
188
+ ```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
+ ```
199
+
200
+ ### Bağlantı Hatası
201
+
202
+ ```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
+ };
214
+ ```
215
+
216
+ ### Hata Durumu
217
+
218
+ ```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
+ ```
231
+
232
+ ### İzin Gerekli
233
+
234
+ ```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
+ };
246
+ ```
247
+
248
+ ### Giriş Gerekli
249
+
250
+ ```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
+ };
262
+ ```
263
+
264
+ ### Özellik Yakında
265
+
266
+ ```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
+ };
276
+ ```
277
+
278
+ ### Bakım Modu
279
+
280
+ ```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
+ };
290
+ ```
291
+
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
+
312
+ ```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" />
324
+ ```
325
+
326
+ ### 2. Açıklama Metni
327
+
328
+ ```tsx
329
+ // Kısa ve açıklayıcı
330
+ <EmptyState
331
+ title="Boş Başlık"
332
+ description="Ne yapmanız gerektiğini açıklayın"
333
+ />
334
+ ```
335
+
336
+ ### 3. Action Button
337
+
338
+ ```tsx
339
+ // Aksiyon varsa
340
+ <EmptyState
341
+ actionLabel="Şimdi Ekle"
342
+ onAction={handleAction}
343
+ />
344
+
345
+ // Sadece bilgilendirme
346
+ <EmptyState title="Bilgilendirme" />
347
+ ```
348
+
349
+ ## Erişilebilirlik
350
+
351
+ EmptyState, tam erişilebilirlik desteği sunar:
352
+
353
+ - ✅ Screen reader desteği
354
+ - ✅ Semantic anlamlar
355
+ - ✅ Touch uygun boyut
356
+ - ✅ Action button erişilebilirliği
357
+
358
+ ## Performans İpuçları
359
+
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
363
+
364
+ ## İlgili Bileşenler
365
+
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
369
+
370
+ ## Lisans
371
+
372
+ MIT
@@ -0,0 +1,339 @@
1
+ # AtomicSkeleton
2
+
3
+ AtomicSkeleton, içerik yüklenirken gösterilen placeholder bileşenidir. Farklı pattern'ler ile liste, kart veya custom skeleton yüklemeleri sağlar.
4
+
5
+ ## Özellikler
6
+
7
+ - 📋 **Pattern'ler**: List, Card, Avatar, Text, Custom
8
+ - 🔢 **Çoklu Render**: Count parametresi ile tekrar
9
+ - 🎨 **Tema Bilinci**: Otomatik renk uyumu
10
+ - ⚙️ **Özelleştirilebilir**: Custom skeleton yapılandırması
11
+ - ♿ **Erişilebilir**: Screen reader için gizli
12
+
13
+ ## Kurulum
14
+
15
+ ```tsx
16
+ import { AtomicSkeleton } from 'react-native-design-system';
17
+ ```
18
+
19
+ ## Temel Kullanım
20
+
21
+ ```tsx
22
+ import React from 'react';
23
+ import { View } from 'react-native';
24
+ import { AtomicSkeleton } from 'react-native-design-system';
25
+
26
+ export const BasicExample = () => {
27
+ return (
28
+ <View style={{ padding: 16 }}>
29
+ <AtomicSkeleton pattern="list" count={3} />
30
+ </View>
31
+ );
32
+ };
33
+ ```
34
+
35
+ ## List Pattern
36
+
37
+ ```tsx
38
+ {/* 3 liste öğesi */}
39
+ <AtomicSkeleton pattern="list" count={3} />
40
+
41
+ {/* 5 liste öğesi */}
42
+ <AtomicSkeleton pattern="list" count={5} />
43
+ ```
44
+
45
+ ## Card Pattern
46
+
47
+ ```tsx
48
+ {/* 1 kart */}
49
+ <AtomicSkeleton pattern="card" />
50
+
51
+ {/* 3 kart */}
52
+ <AtomicSkeleton pattern="card" count={3} />
53
+ ```
54
+
55
+ ## Avatar Pattern
56
+
57
+ ```tsx
58
+ <AtomicSkeleton pattern="avatar" count={5} />
59
+ ```
60
+
61
+ ## Text Pattern
62
+
63
+ ```tsx
64
+ <AtomicSkeleton pattern="text" count={3} />
65
+ ```
66
+
67
+ ## Custom Pattern
68
+
69
+ ```tsx
70
+ <AtomicSkeleton
71
+ pattern="custom"
72
+ custom={[
73
+ { width: '100%', height: 200, borderRadius: 12 },
74
+ { width: '80%', height: 20, borderRadius: 4, marginBottom: 12 },
75
+ { width: '60%', height: 20, borderRadius: 4 },
76
+ ]}
77
+ />
78
+ ```
79
+
80
+ ## Örnek Kullanımlar
81
+
82
+ ### Liste Yükleniyor
83
+
84
+ ```tsx
85
+ export const ListSkeleton = () => {
86
+ return (
87
+ <View style={{ padding: 16 }}>
88
+ <AtomicSkeleton pattern="list" count={5} />
89
+ </View>
90
+ );
91
+ };
92
+ ```
93
+
94
+ ### Kart Yükleniyor
95
+
96
+ ```tsx
97
+ export const CardSkeleton = () => {
98
+ return (
99
+ <View style={{ padding: 16 }}>
100
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 16 }}>
101
+ <AtomicSkeleton pattern="card" count={6} />
102
+ </View>
103
+ </View>
104
+ );
105
+ };
106
+ ```
107
+
108
+ ### Profil Yükleniyor
109
+
110
+ ```tsx
111
+ export const ProfileSkeleton = () => {
112
+ return (
113
+ <View style={{ padding: 16, alignItems: 'center' }}>
114
+ <AtomicSkeleton
115
+ pattern="custom"
116
+ custom={[
117
+ { width: 120, height: 120, borderRadius: 60, marginBottom: 16 },
118
+ { width: 200, height: 24, borderRadius: 4, marginBottom: 8 },
119
+ { width: 150, height: 16, borderRadius: 4 },
120
+ ]}
121
+ />
122
+ </View>
123
+ );
124
+ };
125
+ ```
126
+
127
+ ### Detay Yükleniyor
128
+
129
+ ```tsx
130
+ export const DetailSkeleton = () => {
131
+ return (
132
+ <View style={{ padding: 16 }}>
133
+ <AtomicSkeleton
134
+ pattern="custom"
135
+ custom={[
136
+ { width: '100%', height: 200, borderRadius: 12, marginBottom: 16 },
137
+ { width: '60%', height: 28, borderRadius: 4, marginBottom: 12 },
138
+ { width: '100%', height: 16, borderRadius: 4, marginBottom: 8 },
139
+ { width: '100%', height: 16, borderRadius: 4, marginBottom: 8 },
140
+ { width: '80%', height: 16, borderRadius: 4, marginBottom: 24 },
141
+ { width: 120, height: 40, borderRadius: 8 },
142
+ ]}
143
+ />
144
+ </View>
145
+ );
146
+ };
147
+ ```
148
+
149
+ ### Feed Yükleniyor
150
+
151
+ ```tsx
152
+ export const FeedSkeleton = () => {
153
+ return (
154
+ <View style={{ padding: 16 }}>
155
+ {Array.from({ length: 3 }).map((_, index) => (
156
+ <View key={index} style={{ marginBottom: 24 }}>
157
+ <View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 12 }}>
158
+ <View style={{ width: 40, height: 40, borderRadius: 20, backgroundColor: '#e0e0e0', marginRight: 12 }} />
159
+ <View>
160
+ <View style={{ width: 120, height: 16, borderRadius: 4, marginBottom: 4, backgroundColor: '#e0e0e0' }} />
161
+ <View style={{ width: 80, height: 12, borderRadius: 4, backgroundColor: '#f0f0f0' }} />
162
+ </View>
163
+ </View>
164
+ <View style={{ width: '100%', height: 200, borderRadius: 12, marginBottom: 12, backgroundColor: '#e0e0e0' }} />
165
+ <View style={{ width: '100%', height: 16, borderRadius: 4, marginBottom: 8, backgroundColor: '#e0e0e0' }} />
166
+ <View style={{ width: '80%', height: 16, borderRadius: 4, backgroundColor: '#f0f0f0' }} />
167
+ </View>
168
+ ))}
169
+ </View>
170
+ );
171
+ };
172
+ ```
173
+
174
+ ### Tablo Yükleniyor
175
+
176
+ ```tsx
177
+ export const TableSkeleton = ({ rows = 5 }) => {
178
+ return (
179
+ <View style={{ padding: 16 }}>
180
+ {/* Başlık */}
181
+ <View style={{ flexDirection: 'row', marginBottom: 12 }}>
182
+ {[1, 2, 3, 4].map((_, index) => (
183
+ <View key={index} style={{ flex: 1, marginRight: 8 }}>
184
+ <View style={{ width: '100%', height: 20, borderRadius: 4, backgroundColor: '#e0e0e0' }} />
185
+ </View>
186
+ ))}
187
+ </View>
188
+
189
+ {/* Satırlar */}
190
+ {Array.from({ length: rows }).map((_, rowIndex) => (
191
+ <View key={rowIndex} style={{ flexDirection: 'row', marginBottom: 8 }}>
192
+ {[1, 2, 3, 4].map((_, colIndex) => (
193
+ <View key={colIndex} style={{ flex: 1, marginRight: 8 }}>
194
+ <View style={{ width: '100%', height: 16, borderRadius: 4, backgroundColor: '#f0f0f0' }} />
195
+ </View>
196
+ ))}
197
+ </View>
198
+ ))}
199
+ </View>
200
+ );
201
+ };
202
+ ```
203
+
204
+ ### Arama Sonucu Yükleniyor
205
+
206
+ ```tsx
207
+ export const SearchResultsSkeleton = () => {
208
+ return (
209
+ <View style={{ padding: 16 }}>
210
+ <AtomicSkeleton pattern="list" count={3} />
211
+
212
+ <View style={{ alignItems: 'center', marginTop: 24 }}>
213
+ <AtomicSkeleton
214
+ pattern="custom"
215
+ custom={[
216
+ { width: 80, height: 16, borderRadius: 4, marginBottom: 8 },
217
+ { width: 120, height: 12, borderRadius: 4 },
218
+ ]}
219
+ />
220
+ </View>
221
+ </View>
222
+ );
223
+ };
224
+ ```
225
+
226
+ ### Form Yükleniyor
227
+
228
+ ```tsx
229
+ export const FormSkeleton = () => {
230
+ return (
231
+ <View style={{ padding: 16 }}>
232
+ {Array.from({ length: 4 }).map((_, index) => (
233
+ <View key={index} style={{ marginBottom: 24 }}>
234
+ <View style={{ width: 100, height: 16, borderRadius: 4, marginBottom: 8, backgroundColor: '#e0e0e0' }} />
235
+ <View style={{ width: '100%', height: 48, borderRadius: 8, backgroundColor: '#f0f0f0' }} />
236
+ </View>
237
+ ))}
238
+
239
+ <View style={{ width: 120, height: 48, borderRadius: 8, backgroundColor: '#e0e0e0' }} />
240
+ </View>
241
+ );
242
+ };
243
+ ```
244
+
245
+ ## Props
246
+
247
+ ### AtomicSkeletonProps
248
+
249
+ | Prop | Tip | Varsayılan | Açıklama |
250
+ |------|-----|------------|----------|
251
+ | `pattern` | `SkeletonPattern` | `'list'` | Skeleton pattern'i |
252
+ | `custom` | `SkeletonConfig[]` | - | Custom yapılandırma |
253
+ | `count` | `number` | `1` | Skeleton sayısı |
254
+ | `style` | `StyleProp<ViewStyle>` | - | Özel stil |
255
+ | `testID` | `string` | - | Test ID'si |
256
+
257
+ ### SkeletonPattern
258
+
259
+ ```typescript
260
+ type SkeletonPattern =
261
+ | 'list' // Liste öğesi
262
+ | 'card' // Kart
263
+ | 'avatar' // Avatar
264
+ | 'text' // Metin
265
+ | 'custom'; // Özel
266
+ ```
267
+
268
+ ### SkeletonConfig
269
+
270
+ ```typescript
271
+ interface SkeletonConfig {
272
+ width: number | string; // Genişlik
273
+ height?: number; // Yükseklik
274
+ borderRadius?: number; // Köşe yarıçapı
275
+ marginBottom?: number; // Alt boşluk
276
+ }
277
+ ```
278
+
279
+ ## Best Practices
280
+
281
+ ### 1. Pattern Seçimi
282
+
283
+ ```tsx
284
+ // Liste için
285
+ <AtomicSkeleton pattern="list" />
286
+
287
+ // Kart için
288
+ <AtomicSkeleton pattern="card" />
289
+
290
+ // Avatar için
291
+ <AtomicSkeleton pattern="avatar" />
292
+ ```
293
+
294
+ ### 2. Count Kullanımı
295
+
296
+ ```tsx
297
+ // Uzun liste
298
+ <AtomicSkeleton pattern="list" count={10} />
299
+
300
+ // Kısa liste
301
+ <AtomicSkeleton pattern="list" count={3} />
302
+ ```
303
+
304
+ ### 3. Custom Skeleton
305
+
306
+ ```tsx
307
+ // Özel tasarım
308
+ <AtomicSkeleton
309
+ pattern="custom"
310
+ custom={[
311
+ { width: '100%', height: 200, borderRadius: 12 },
312
+ { width: '80%', height: 20, borderRadius: 4 },
313
+ ]}
314
+ />
315
+ ```
316
+
317
+ ## Erişilebilirlik
318
+
319
+ AtomicSkeleton, tam erişilebilirlik desteği sunar:
320
+
321
+ - ✅ Screen reader'da gizli
322
+ - ✅ Loading state anonsu
323
+ - ✅ Accessibility özellikleri
324
+
325
+ ## Performans İpuçları
326
+
327
+ 1. **Minimal Count**: Gerektiği kadar skeleton gösterin
328
+ 2. **Simple Patterns**: Basit pattern'ler daha performanslıdır
329
+ 3. **Unload**: Veri geldiğinde skeleton'ı kaldırın
330
+
331
+ ## İlgili Bileşenler
332
+
333
+ - [`AtomicSpinner`](../AtomicSpinner/README.md) - Spinner yükleniyor
334
+ - [`EmptyState`](../EmptyState/README.md) - Boş durum
335
+ - [`AtomicProgress`](../AtomicProgress/README.md) - İlerleme çubuğu
336
+
337
+ ## Lisans
338
+
339
+ MIT