@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,470 @@
1
+ # Divider
2
+
3
+ Divider, içerik bölümleri arasında görsel ayırıcı göstermek için kullanılan bileşendir. Yatay, dikey ve metinli ayırıcıları destekler.
4
+
5
+ ## Özellikler
6
+
7
+ - 📏 **2 Orientasyon**: Yatay, dikey
8
+ - 🎨 **3 Stil**: Solid, dashed, dotted
9
+ - 📝 **Text Label**: Metinli ayırıcı
10
+ - 🎯 **4 Spacing**: None, small, medium, large
11
+ - 🎭 **Tema Bilinci**: Design token uyumlu
12
+ - 🌈 **Custom Renk**: Özel renk desteği
13
+ - 📐 **Custom Kalınlık**: Özel kalınlık
14
+
15
+ ## Kurulum
16
+
17
+ ```tsx
18
+ import { Divider } from 'react-native-design-system';
19
+ ```
20
+
21
+ ## Temel Kullanım
22
+
23
+ ```tsx
24
+ import React from 'react';
25
+ import { View } from 'react-native';
26
+ import { Divider } from 'react-native-design-system';
27
+
28
+ export const BasicExample = () => {
29
+ return (
30
+ <View style={{ padding: 16 }}>
31
+ <AtomicText>Bölüm 1</AtomicText>
32
+ <Divider />
33
+ <AtomicText>Bölüm 2</AtomicText>
34
+ </View>
35
+ );
36
+ };
37
+ ```
38
+
39
+ ## Yatay Ayırıcı
40
+
41
+ ```tsx
42
+ {/* Varsayılan yatay */}
43
+ <Divider />
44
+
45
+ {/* Custom spacing */}
46
+ <Divider spacing="large" />
47
+
48
+ {/* Custom color */}
49
+ <Divider color="#6366f1" />
50
+
51
+ {/* Custom thickness */}
52
+ <Divider thickness={2} />
53
+ ```
54
+
55
+ ## Dikey Ayırıcı
56
+
57
+ ```tsx
58
+ <View style={{ flexDirection: 'row', height: 100 }}>
59
+ <View style={{ flex: 1, backgroundColor: '#f0f0f0' }} />
60
+ <Divider orientation="vertical" />
61
+ <View style={{ flex: 1, backgroundColor: '#e0e0e0' }} />
62
+ </View>
63
+ ```
64
+
65
+ ## Çizgi Stilleri
66
+
67
+ ```tsx
68
+ <View>
69
+ {/* Solid (varsayılan) */}
70
+ <Divider lineStyle="solid" />
71
+
72
+ {/* Dashed */}
73
+ <Divider lineStyle="dashed" />
74
+
75
+ {/* Dotted */}
76
+ <Divider lineStyle="dotted" />
77
+ </View>
78
+ ```
79
+
80
+ ## Metinli Ayırıcı
81
+
82
+ ```tsx
83
+ <Divider text="VEYA" />
84
+
85
+ <Divider text="veya devam et" />
86
+
87
+ <Divider
88
+ text="⭐ Özellikli ⭐"
89
+ lineStyle="dashed"
90
+ />
91
+ ```
92
+
93
+ ## Spacing Seçenekleri
94
+
95
+ ```tsx
96
+ <View>
97
+ {/* None */}
98
+ <Divider spacing="none" />
99
+
100
+ {/* Small */}
101
+ <Divider spacing="small" />
102
+
103
+ {/* Medium (varsayılan) */}
104
+ <Divider spacing="medium" />
105
+
106
+ {/* Large */}
107
+ <Divider spacing="large" />
108
+ </View>
109
+ ```
110
+
111
+ ## Custom Renk ve Kalınlık
112
+
113
+ ```tsx
114
+ <Divider
115
+ color="#6366f1"
116
+ thickness={2}
117
+ spacing="large"
118
+ />
119
+
120
+ <Divider
121
+ color="#ef4444"
122
+ thickness={3}
123
+ lineStyle="dashed"
124
+ />
125
+ ```
126
+
127
+ ## Örnek Kullanımlar
128
+
129
+ ### Form Bölümleri
130
+
131
+ ```tsx
132
+ export const FormSections = () => {
133
+ return (
134
+ <View style={{ padding: 16 }}>
135
+ <View>
136
+ <AtomicText type="titleMedium">Kişisel Bilgiler</AtomicText>
137
+ <FormField label="Ad" />
138
+ <FormField label="Soyad" />
139
+ </View>
140
+
141
+ <Divider spacing="large" />
142
+
143
+ <View>
144
+ <AtomicText type="titleMedium">İletişim Bilgileri</AtomicText>
145
+ <FormField label="E-posta" />
146
+ <FormField label="Telefon" />
147
+ </View>
148
+
149
+ <Divider spacing="large" />
150
+
151
+ <View>
152
+ <AtomicText type="titleMedium">Adres</AtomicText>
153
+ <FormField label="Şehir" />
154
+ <FormField label="Ülke" />
155
+ </View>
156
+ </View>
157
+ );
158
+ };
159
+ ```
160
+
161
+ ### Menü Ayırıcıları
162
+
163
+ ```tsx
164
+ export const MenuDivider = () => {
165
+ return (
166
+ <View>
167
+ <MenuItem title="Profil" icon="person-outline" />
168
+ <MenuItem title="Ayarlar" icon="settings-outline" />
169
+ <Divider />
170
+ <MenuItem title="Yardım" icon="help-circle-outline" />
171
+ <MenuItem title="Hakkında" icon="information-circle-outline" />
172
+ <Divider spacing="large" />
173
+ <MenuItem title="Çıkış" icon="log-out-outline" variant="danger" />
174
+ </View>
175
+ );
176
+ };
177
+ ```
178
+
179
+ ### Kart İçeriği
180
+
181
+ ```tsx
182
+ export const CardContent = () => {
183
+ return (
184
+ <AtomicCard variant="outlined">
185
+ <View style={{ padding: 16 }}>
186
+ <AtomicText type="titleLarge">Kart Başlığı</AtomicText>
187
+ <AtomicText type="bodyMedium" color="secondary">
188
+ Alt başlık veya açıklama
189
+ </AtomicText>
190
+ </View>
191
+
192
+ <Divider />
193
+
194
+ <View style={{ padding: 16 }}>
195
+ <AtomicText>İçerik buraya gelir</AtomicText>
196
+ </View>
197
+
198
+ <Divider />
199
+
200
+ <View style={{ padding: 16, flexDirection: 'row', justifyContent: 'flex-end' }}>
201
+ <Button title="İptal" variant="ghost" style={{ marginRight: 8 }} />
202
+ <Button title="Kaydet" />
203
+ </View>
204
+ </AtomicCard>
205
+ );
206
+ };
207
+ ```
208
+
209
+ ### OR Ayırıcı
210
+
211
+ ```tsx
212
+ export const OrSeparator = () => {
213
+ return (
214
+ <View style={{ padding: 16 }}>
215
+ <SocialLoginButton provider="google" label="Google ile devam et" />
216
+
217
+ <Divider text="VEYA" spacing="large" />
218
+
219
+ <FormField label="E-posta" />
220
+ <FormField label="Şifre" secureTextEntry />
221
+
222
+ <Button title="Giriş Yap" />
223
+ </View>
224
+ );
225
+ };
226
+ ```
227
+
228
+ ### Tablo Ayırıcıları
229
+
230
+ ```tsx
231
+ export const TableDivider = () => {
232
+ return (
233
+ <View>
234
+ {/* Header */}
235
+ <View style={{ flexDirection: 'row', padding: 12 }}>
236
+ <AtomicText style={{ flex: 1, fontWeight: '600' }}>Ad</AtomicText>
237
+ <AtomicText style={{ flex: 1, fontWeight: '600' }}>Soyad</AtomicText>
238
+ <AtomicText style={{ flex: 1, fontWeight: '600' }}>E-posta</AtomicText>
239
+ </View>
240
+
241
+ <Divider thickness={2} />
242
+
243
+ {/* Rows */}
244
+ <View style={{ flexDirection: 'row', padding: 12 }}>
245
+ <AtomicText style={{ flex: 1 }}>Ahmet</AtomicText>
246
+ <AtomicText style={{ flex: 1 }}>Yılmaz</AtomicText>
247
+ <AtomicText style={{ flex: 1 }}>ahmet@example.com</AtomicText>
248
+ </View>
249
+
250
+ <Divider />
251
+
252
+ <View style={{ flexDirection: 'row', padding: 12 }}>
253
+ <AtomicText style={{ flex: 1 }}>Ayşe</AtomicText>
254
+ <AtomicText style={{ flex: 1 }}>Demir</AtomicText>
255
+ <AtomicText style={{ flex: 1 }}>ayse@example.com</AtomicText>
256
+ </View>
257
+ </View>
258
+ );
259
+ };
260
+ ```
261
+
262
+ ### Timeline
263
+
264
+ ```tsx
265
+ export const TimelineDivider = () => {
266
+ const events = [
267
+ { time: '09:00', title: 'Kayıt', description: 'Kayıt işlemleri' },
268
+ { time: '10:00', title: 'Açılış', description: 'Konferans açılışı' },
269
+ { time: '12:00', title: 'Öğle Arası', description: 'Yemek molası' },
270
+ ];
271
+
272
+ return (
273
+ <View style={{ padding: 16 }}>
274
+ {events.map((event, index) => (
275
+ <View key={index}>
276
+ <View style={{ flexDirection: 'row' }}>
277
+ <AtomicText style={{ width: 60 }}>{event.time}</AtomicText>
278
+ <View style={{ flex: 1 }}>
279
+ <AtomicText fontWeight="600">{event.title}</AtomicText>
280
+ <AtomicText type="bodySmall" color="secondary">
281
+ {event.description}
282
+ </AtomicText>
283
+ </View>
284
+ </View>
285
+
286
+ {index < events.length - 1 && (
287
+ <Divider
288
+ orientation="vertical"
289
+ spacing="small"
290
+ style={{ marginLeft: 24 }}
291
+ />
292
+ )}
293
+ </View>
294
+ ))}
295
+ </View>
296
+ );
297
+ };
298
+ ```
299
+
300
+ ### Yan Yana İçerik
301
+
302
+ ```tsx
303
+ export const SideBySideContent = () => {
304
+ return (
305
+ <View style={{ flexDirection: 'row', height: 200 }}>
306
+ <View style={{ flex: 1, padding: 16, backgroundColor: '#f0f0f0' }}>
307
+ <AtomicText>Sol İçerik</AtomicText>
308
+ </View>
309
+
310
+ <Divider orientation="vertical" thickness={2} color="#6366f1" />
311
+
312
+ <View style={{ flex: 1, padding: 16, backgroundColor: '#e0e0e0' }}>
313
+ <AtomicText>Sağ İçerik</AtomicText>
314
+ </View>
315
+ </View>
316
+ );
317
+ };
318
+ ```
319
+
320
+ ### Liste Grupları
321
+
322
+ ```tsx
323
+ export const ListGroups = () => {
324
+ const groups = [
325
+ {
326
+ title: 'Favoriler',
327
+ items: ['Öğe 1', 'Öğe 2', 'Öğe 3'],
328
+ },
329
+ {
330
+ title: 'Son Eklenenler',
331
+ items: ['Öğe 4', 'Öğe 5'],
332
+ },
333
+ ];
334
+
335
+ return (
336
+ <View>
337
+ {groups.map((group, groupIndex) => (
338
+ <View key={groupIndex}>
339
+ <AtomicText
340
+ type="labelLarge"
341
+ style={{ padding: 16, paddingBottom: 8 }}
342
+ >
343
+ {group.title}
344
+ </AtomicText>
345
+
346
+ {group.items.map((item, itemIndex) => (
347
+ <View key={itemIndex} style={{ padding: 16 }}>
348
+ <AtomicText>{item}</AtomicText>
349
+ </View>
350
+ ))}
351
+
352
+ {groupIndex < groups.length - 1 && <Divider spacing="large" />}
353
+ </View>
354
+ ))}
355
+ </View>
356
+ );
357
+ };
358
+ ```
359
+
360
+ ### Ayırıcı Menü
361
+
362
+ ```tsx
363
+ export const SeparatorMenu = () => {
364
+ return (
365
+ <View>
366
+ <Pressable style={{ padding: 16 }}>
367
+ <AtomicText>Düzenle</AtomicText>
368
+ </Pressable>
369
+
370
+ <Divider spacing="small" />
371
+
372
+ <Pressable style={{ padding: 16 }}>
373
+ <AtomicText>Sil</AtomicText>
374
+ </Pressable>
375
+
376
+ <Divider text="Diğer İşlemler" />
377
+
378
+ <Pressable style={{ padding: 16 }}>
379
+ <AtomicText>Paylaş</AtomicText>
380
+ </Pressable>
381
+
382
+ <Divider spacing="small" />
383
+
384
+ <Pressable style={{ padding: 16 }}>
385
+ <AtomicText>Bağlantıyı Kopyala</AtomicText>
386
+ </Pressable>
387
+ </View>
388
+ );
389
+ };
390
+ ```
391
+
392
+ ## Props
393
+
394
+ ### DividerProps
395
+
396
+ | Prop | Tip | Varsayılan | Açıklama |
397
+ |------|-----|------------|----------|
398
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Ayırıcı yönü |
399
+ | `lineStyle` | `'solid' \| 'dashed' \| 'dotted'` | `'solid'` | Çizgi stili |
400
+ | `spacing` | `'none' \| 'small' \| 'medium' \| 'large'` | `'medium'` | Boşluk |
401
+ | `color` | `string` | `tokens.colors.border` | Çizgi rengi |
402
+ | `thickness` | `number` | `1` | Çizgi kalınlığı |
403
+ | `text` | `string` | - | Metin etiketi |
404
+ | `style` | `ViewStyle` | - | Özel stil |
405
+
406
+ ## Best Practices
407
+
408
+ ### 1. Orientasyon Seçimi
409
+
410
+ ```tsx
411
+ // Form bölümleri için
412
+ <Divider /> // horizontal ✅
413
+
414
+ // Yan yana içerik için
415
+ <Divider orientation="vertical" /> // vertical ✅
416
+ ```
417
+
418
+ ### 2. Spacing Kullanımı
419
+
420
+ ```tsx
421
+ // İçerik içinde
422
+ <Divider spacing="small" />
423
+
424
+ // Bölüm arası
425
+ <Divider spacing="large" />
426
+ ```
427
+
428
+ ### 3. Stil Seçimi
429
+
430
+ ```tsx
431
+ // Varsayılan
432
+ <Divider lineStyle="solid" />
433
+
434
+ // Vurgulu
435
+ <Divider lineStyle="dashed" thickness={2} />
436
+ ```
437
+
438
+ ### 4. Renk Kullanımı
439
+
440
+ ```tsx
441
+ // Theme-aware (önerilen)
442
+ <Divider />
443
+
444
+ // Custom (spesifik durumlarda)
445
+ <Divider color="#6366f1" />
446
+ ```
447
+
448
+ ## Erişilebilirlik
449
+
450
+ Divider, erişilebilirlik desteği sunar:
451
+
452
+ - ✅ Screen reader desteği
453
+ - ✅ Semantic role
454
+ - ✅ Görsel ayırıcı
455
+
456
+ ## Performans İpuçları
457
+
458
+ 1. **Simplify**: Basit tutun, fazla prop kullanmayın
459
+ 2. **Theme-aware**: Token rengi kullanın
460
+ 3. **Minimal**: Gereksiz divider'lardan kaçının
461
+
462
+ ## İlgili Bileşenler
463
+
464
+ - [`AtomicText`](../../atoms/AtomicText/README.md) - Metin bileşeni
465
+ - [`AtomicCard`](../../atoms/AtomicCard.README.md) - Kart bileşeni
466
+ - [`ListItem`](../ListItem.tsx) - Liste öğesi
467
+
468
+ ## Lisans
469
+
470
+ MIT