@umituz/react-native-design-system 2.6.86 → 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.
- package/package.json +1 -6
- package/src/atoms/AtomicAvatar.README.md +483 -0
- package/src/atoms/AtomicBadge.README.md +423 -0
- package/src/atoms/AtomicDatePicker.README.md +399 -0
- package/src/atoms/AtomicFab.README.md +421 -0
- package/src/atoms/AtomicProgress.README.md +402 -0
- package/src/atoms/AtomicSpinner.README.md +433 -0
- package/src/atoms/AtomicText.README.md +470 -0
- package/src/atoms/AtomicTextArea.README.md +352 -0
- package/src/atoms/EmptyState.README.md +372 -0
- package/src/atoms/skeleton/AtomicSkeleton.README.md +339 -0
- package/src/molecules/ConfirmationModal.README.md +370 -0
- package/src/molecules/Divider/README.md +470 -0
- package/src/molecules/ListItem.README.md +402 -0
- package/src/molecules/StepHeader/README.md +487 -0
- package/src/molecules/alerts/README.md +471 -0
- package/src/molecules/avatar/README.md +431 -0
- package/src/molecules/bottom-sheet/README.md +413 -0
- package/src/molecules/calendar/README.md +339 -0
- package/src/molecules/countdown/README.md +558 -0
- package/src/molecules/media-card/README.md +384 -0
- package/src/molecules/navigation/README.md +377 -0
- package/src/molecules/splash/README.md +474 -0
- package/src/molecules/splash/components/SplashScreen.tsx +0 -14
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# AtomicTextArea
|
|
2
|
+
|
|
3
|
+
AtomicTextArea, çok satırlı metin girişi için optimize edilmiş bir bileşendir. AtomicInput ile tutarlıdır ancak uzun metinler için özel olarak tasarlanmıştır.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
|
|
7
|
+
- 📝 **Multiline**: Çok satırlı metin girişi
|
|
8
|
+
- 🏷️ **Label Desteği**: Etiket gösterimi
|
|
9
|
+
- ❌ **Error State**: Hata durumu
|
|
10
|
+
- ℹ️ **Helper Text**: Yardımcı metin
|
|
11
|
+
- 🔢 **Character Counter**: Karakter sayacı
|
|
12
|
+
- ⚙️ **Özelleştirilebilir**: Satır sayısı, min yükseklik
|
|
13
|
+
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
14
|
+
|
|
15
|
+
## Kurulum
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { AtomicTextArea } from 'react-native-design-system';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Temel Kullanım
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import React, { useState } from 'react';
|
|
25
|
+
import { View } from 'react-native';
|
|
26
|
+
import { AtomicTextArea } from 'react-native-design-system';
|
|
27
|
+
|
|
28
|
+
export const BasicExample = () => {
|
|
29
|
+
const [value, setValue] = useState('');
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View style={{ padding: 16 }}>
|
|
33
|
+
<AtomicTextArea
|
|
34
|
+
label="Açıklama"
|
|
35
|
+
value={value}
|
|
36
|
+
onChangeText={setValue}
|
|
37
|
+
placeholder="Açıklamanızı girin..."
|
|
38
|
+
rows={4}
|
|
39
|
+
/>
|
|
40
|
+
</View>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Basic TextArea
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<AtomicTextArea
|
|
49
|
+
value={value}
|
|
50
|
+
onChangeText={setValue}
|
|
51
|
+
placeholder="Metninizi buraya yazın..."
|
|
52
|
+
/>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Label ile
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<AtomicTextArea
|
|
59
|
+
label="Hakkımda"
|
|
60
|
+
value={value}
|
|
61
|
+
onChangeText={setValue}
|
|
62
|
+
placeholder="Kendinizden bahsedin"
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Satır Sayısı
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
<View style={{ gap: 16 }}>
|
|
70
|
+
{/* 2 satır */}
|
|
71
|
+
<AtomicTextArea
|
|
72
|
+
rows={2}
|
|
73
|
+
placeholder="Kısa metin"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
{/* 4 satır (varsayılan) */}
|
|
77
|
+
<AtomicTextArea
|
|
78
|
+
rows={4}
|
|
79
|
+
placeholder="Normal metin"
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
{/* 8 satır */}
|
|
83
|
+
<AtomicTextArea
|
|
84
|
+
rows={8}
|
|
85
|
+
placeholder="Uzun metin"
|
|
86
|
+
/>
|
|
87
|
+
</View>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Character Limit
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
<AtomicTextArea
|
|
94
|
+
value={value}
|
|
95
|
+
onChangeText={setValue}
|
|
96
|
+
maxLength={200}
|
|
97
|
+
placeholder="En az 200 karakter"
|
|
98
|
+
/>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Error State
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
<AtomicTextArea
|
|
105
|
+
label="Açıklama"
|
|
106
|
+
value={value}
|
|
107
|
+
onChangeText={setValue}
|
|
108
|
+
errorText="Bu alan zorunludur"
|
|
109
|
+
/>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Helper Text
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
<AtomicTextArea
|
|
116
|
+
label="Ürün Açıklaması"
|
|
117
|
+
value={value}
|
|
118
|
+
onChangeText={setValue}
|
|
119
|
+
helperText="Ürününüzü detaylı açıklayın"
|
|
120
|
+
placeholder="Ürün özellikleri, kullanım alanları vb."
|
|
121
|
+
/>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Disabled
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
<AtomicTextArea
|
|
128
|
+
label="Notlar"
|
|
129
|
+
value="Bu alan düzenlenemez"
|
|
130
|
+
disabled
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Min Height
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
<AtomicTextArea
|
|
138
|
+
value={value}
|
|
139
|
+
onChangeText={setValue}
|
|
140
|
+
minHeight={120}
|
|
141
|
+
placeholder="Min 120px yükseklik"
|
|
142
|
+
/>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Örnek Kullanımlar
|
|
146
|
+
|
|
147
|
+
### Form Alanı
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
export const ProductForm = () => {
|
|
151
|
+
const [description, setDescription] = useState('');
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<View style={{ padding: 16 }}>
|
|
155
|
+
<AtomicTextArea
|
|
156
|
+
label="Ürün Açıklaması"
|
|
157
|
+
value={description}
|
|
158
|
+
onChangeText={setDescription}
|
|
159
|
+
placeholder="Ürününüzü detaylı açıklayın..."
|
|
160
|
+
rows={6}
|
|
161
|
+
maxLength={500}
|
|
162
|
+
helperText="En az 50 karakter"
|
|
163
|
+
/>
|
|
164
|
+
</View>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Yorum Formu
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
export const CommentForm = () => {
|
|
173
|
+
const [comment, setComment] = useState('');
|
|
174
|
+
const [error, setError] = useState('');
|
|
175
|
+
|
|
176
|
+
const handleSubmit = () => {
|
|
177
|
+
if (comment.length < 10) {
|
|
178
|
+
setError('Yorum en az 10 karakter olmalıdır');
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// Submit logic
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
<View style={{ padding: 16 }}>
|
|
186
|
+
<AtomicTextArea
|
|
187
|
+
label="Yorumunuz"
|
|
188
|
+
value={comment}
|
|
189
|
+
onChangeText={setComment}
|
|
190
|
+
placeholder=" düşüncelerinizi paylaşın..."
|
|
191
|
+
rows={5}
|
|
192
|
+
maxLength={500}
|
|
193
|
+
errorText={error}
|
|
194
|
+
/>
|
|
195
|
+
|
|
196
|
+
<Button title="Gönder" onPress={handleSubmit} />
|
|
197
|
+
</View>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Not Alma
|
|
203
|
+
|
|
204
|
+
```tsx
|
|
205
|
+
export const NotesForm = () => {
|
|
206
|
+
const [notes, setNotes] = useState('');
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<View style={{ padding: 16 }}>
|
|
210
|
+
<AtomicTextArea
|
|
211
|
+
label="Notlar"
|
|
212
|
+
value={notes}
|
|
213
|
+
onChangeText={setNotes}
|
|
214
|
+
placeholder="Notlarınızı buraya yazın..."
|
|
215
|
+
rows={10}
|
|
216
|
+
helperText="Kişisel notlarınız"
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Bio Formu
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
export const BioForm = () => {
|
|
227
|
+
const [bio, setBio] = useState('');
|
|
228
|
+
|
|
229
|
+
return (
|
|
230
|
+
<View style={{ padding: 16 }}>
|
|
231
|
+
<AtomicTextArea
|
|
232
|
+
label="Hakkımda"
|
|
233
|
+
value={bio}
|
|
234
|
+
onChangeText={setBio}
|
|
235
|
+
placeholder="Kendinizden bahsedin..."
|
|
236
|
+
rows={4}
|
|
237
|
+
maxLength={150}
|
|
238
|
+
helperText="Maksimum 150 karakter"
|
|
239
|
+
/>
|
|
240
|
+
|
|
241
|
+
{bio.length > 0 && (
|
|
242
|
+
<AtomicText type="bodySmall" color="textSecondary">
|
|
243
|
+
{bio.length}/150 karakter
|
|
244
|
+
</AtomicText>
|
|
245
|
+
)}
|
|
246
|
+
</View>
|
|
247
|
+
);
|
|
248
|
+
};
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Geri Bildirim
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
export const FeedbackForm = () => {
|
|
255
|
+
const [feedback, setFeedback] = useState('');
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<View style={{ padding: 16 }}>
|
|
259
|
+
<AtomicTextArea
|
|
260
|
+
label="Geri Bildirim"
|
|
261
|
+
value={feedback}
|
|
262
|
+
onChangeText={setFeedback}
|
|
263
|
+
placeholder="Deneyiminiz hakkında bilgi verin..."
|
|
264
|
+
rows={6}
|
|
265
|
+
maxLength={1000}
|
|
266
|
+
helperText="Geribildiriminiz bizim için değerli"
|
|
267
|
+
/>
|
|
268
|
+
</View>
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Props
|
|
274
|
+
|
|
275
|
+
### AtomicTextAreaProps
|
|
276
|
+
|
|
277
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
278
|
+
|------|-----|------------|----------|
|
|
279
|
+
| `label` | `string` | - | Etiket metni |
|
|
280
|
+
| `value` | `string` | - | Textarea değeri |
|
|
281
|
+
| `onChangeText` | `(text: string) => void` | - | Değişiklik olayı |
|
|
282
|
+
| `placeholder` | `string` | - | Placeholder metni |
|
|
283
|
+
| `helperText` | `string` | - | Yardımcı metin |
|
|
284
|
+
| `errorText` | `string` | - | Hata mesajı |
|
|
285
|
+
| `maxLength` | `number` | - | Maksimum karakter |
|
|
286
|
+
| `numberOfLines` | `number` | - | Satır sayısı (alternatif) |
|
|
287
|
+
| `rows` | `number` | `4` | Satır sayısı |
|
|
288
|
+
| `minHeight` | `number` | - | Minimum yükseklik |
|
|
289
|
+
| `disabled` | `boolean` | `false` | Devre dışı |
|
|
290
|
+
| `autoFocus` | `boolean` | - | Otomatik odak |
|
|
291
|
+
| `returnKeyType` | `ReturnKeyType` | - | Return tuşu |
|
|
292
|
+
| `onSubmitEditing` | `() => void` | - | Submit olayı |
|
|
293
|
+
| `blurOnSubmit` | `boolean` | - | Submit'te blur |
|
|
294
|
+
| `style` | `StyleProp<ViewStyle>` | - | Container stil |
|
|
295
|
+
| `inputStyle` | `StyleProp<TextStyle>` | - | Input stil |
|
|
296
|
+
| `testID` | `string` | - | Test ID'si |
|
|
297
|
+
|
|
298
|
+
## Best Practices
|
|
299
|
+
|
|
300
|
+
### 1. Satır Sayısı
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
// Kısa metinler için
|
|
304
|
+
<AtomicTextArea rows={2} />
|
|
305
|
+
|
|
306
|
+
// Normal kullanım
|
|
307
|
+
<AtomicTextArea rows={4} />
|
|
308
|
+
|
|
309
|
+
// Uzun metinler için
|
|
310
|
+
<AtomicTextArea rows={8} />
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### 2. Character Limit
|
|
314
|
+
|
|
315
|
+
```tsx
|
|
316
|
+
// Kısa limit
|
|
317
|
+
<AtomicTextArea maxLength={100} />
|
|
318
|
+
|
|
319
|
+
// Orta limit
|
|
320
|
+
<AtomicTextArea maxLength={500} />
|
|
321
|
+
|
|
322
|
+
// Uzun limit
|
|
323
|
+
<AtomicTextArea maxLength={1000} />
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### 3. Helper Text
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
// Kullanıcıya rehberlik edin
|
|
330
|
+
<AtomicTextArea
|
|
331
|
+
helperText="En az 50 karakter"
|
|
332
|
+
/>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Erişilebilirlik
|
|
336
|
+
|
|
337
|
+
AtomicTextArea, tam erişilebilirlik desteği sunar:
|
|
338
|
+
|
|
339
|
+
- ✅ Label ilişkilendirmesi
|
|
340
|
+
- ✅ Error state anonsu
|
|
341
|
+
- ✅ Character counter
|
|
342
|
+
- ✅ Screen reader desteği
|
|
343
|
+
|
|
344
|
+
## İlgili Bileşenler
|
|
345
|
+
|
|
346
|
+
- [`AtomicInput`](./input/README.md) - Tek satırlı input
|
|
347
|
+
- [`FormField`](../../molecules/FormField/README.md) - Form alanı
|
|
348
|
+
- [`AtomicText`](./AtomicText/README.md) - Metin bileşeni
|
|
349
|
+
|
|
350
|
+
## Lisans
|
|
351
|
+
|
|
352
|
+
MIT
|
|
@@ -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
|