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

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,521 @@
1
+ # GlassView
2
+
3
+ GlassView, glassmorphism efekti oluşturmak için Expo BlurView wrapper'ıdır. Otomatik olarak tema moduna göre uyum sağlar.
4
+
5
+ ## Özellikler
6
+
7
+ - 🌟 **Glassmorphism**: Modern cam efekti
8
+ - 🎨 **Tema Bilinci**: Otomatik tema uyumu
9
+ - 💧 **Blur Efekti**: Bulanık arka plan
10
+ - ⚙️ **Ayarılabilir Yoğunluk**: 0-100 arası
11
+ - 🌓 **Light/Dark Mod**: Otomatik tint
12
+ - ♿ **Erişilebilir**: Tam erişilebilirlik desteği
13
+
14
+ ## Kurulum
15
+
16
+ ```tsx
17
+ import { GlassView } from 'react-native-design-system';
18
+ ```
19
+
20
+ ## Temel Kullanım
21
+
22
+ ```tsx
23
+ import React from 'react';
24
+ import { View, Text, Image } from 'react-native';
25
+ import { GlassView } from 'react-native-design-system';
26
+
27
+ export const BasicExample = () => {
28
+ return (
29
+ <View style={{ flex: 1 }}>
30
+ {/* Arka plan resmi veya içerik */}
31
+ <Image
32
+ source={{ uri: 'https://example.com/image.jpg' }}
33
+ style={{ ...StyleSheet.absoluteFillObject }}
34
+ />
35
+
36
+ {/* GlassView overlay */}
37
+ <GlassView style={{ flex: 1 }}>
38
+ <Text style={{ padding: 24 }}>
39
+ Glassmorphism Efekti
40
+ </Text>
41
+ </GlassView>
42
+ </View>
43
+ );
44
+ };
45
+ ```
46
+
47
+ ## Basic Glass Effect
48
+
49
+ ```tsx
50
+ <GlassView style={{ padding: 24, borderRadius: 16 }}>
51
+ <Text>Cam Efekti</Text>
52
+ </GlassView>
53
+ ```
54
+
55
+ ## Blur Intensity
56
+
57
+ ```tsx
58
+ <View style={{ gap: 16 }}>
59
+ {/* Hafif blur */}
60
+ <GlassView intensity={30} style={{ padding: 24 }}>
61
+ <Text>Hafif Blur</Text>
62
+ </GlassView>
63
+
64
+ {/* Orta blur (Varsayılan) */}
65
+ <GlassView intensity={50} style={{ padding: 24 }}>
66
+ <Text>Orta Blur</Text>
67
+ </GlassView>
68
+
69
+ {/* Güçlü blur */}
70
+ <GlassView intensity={80} style={{ padding: 24 }}>
71
+ <Text>Güçlü Blur</Text>
72
+ </GlassView>
73
+
74
+ {/* Maksimum blur */}
75
+ <GlassView intensity={100} style={{ padding: 24 }}>
76
+ <Text>Maksimum Blur</Text>
77
+ </GlassView>
78
+ </View>
79
+ ```
80
+
81
+ ## Custom Tint
82
+
83
+ ```tsx
84
+ <View style={{ gap: 16 }}>
85
+ {/* Light tint */}
86
+ <GlassView tint="light" style={{ padding: 24 }}>
87
+ <Text>Light Tint</Text>
88
+ </GlassView>
89
+
90
+ {/* Dark tint */}
91
+ <GlassView tint="dark" style={{ padding: 24 }}>
92
+ <Text>Dark Tint</Text>
93
+ </GlassView>
94
+
95
+ {/* Default tint (otomatik) */}
96
+ <GlassView style={{ padding: 24 }}>
97
+ <Text>Otomatik Tint</Text>
98
+ </GlassView>
99
+ </View>
100
+ ```
101
+
102
+ ## Örnek Kullanımlar
103
+
104
+ ### Navigation Bar
105
+
106
+ ```tsx
107
+ export const GlassNavbar = () => {
108
+ return (
109
+ <GlassView
110
+ intensity={50}
111
+ style={{
112
+ position: 'absolute',
113
+ top: 0,
114
+ left: 0,
115
+ right: 0,
116
+ height: 60,
117
+ flexDirection: 'row',
118
+ alignItems: 'center',
119
+ justifyContent: 'space-between',
120
+ paddingHorizontal: 16,
121
+ }}
122
+ >
123
+ <Text style={{ fontWeight: 'bold' }}>Logo</Text>
124
+
125
+ <View style={{ flexDirection: 'row', gap: 16 }}>
126
+ <Pressable>
127
+ <AtomicIcon name="home" />
128
+ </Pressable>
129
+ <Pressable>
130
+ <AtomicIcon name="search" />
131
+ </Pressable>
132
+ <Pressable>
133
+ <AtomicIcon name="person" />
134
+ </Pressable>
135
+ </View>
136
+ </GlassView>
137
+ );
138
+ };
139
+ ```
140
+
141
+ ### Modal Overlay
142
+
143
+ ```tsx
144
+ export const GlassModal = ({ visible, onClose }) => {
145
+ return (
146
+ <Modal visible={visible} transparent animationType="fade">
147
+ <GlassView
148
+ intensity={80}
149
+ tint="dark"
150
+ style={{
151
+ flex: 1,
152
+ justifyContent: 'center',
153
+ alignItems: 'center',
154
+ padding: 24,
155
+ }}
156
+ >
157
+ <View
158
+ style={{
159
+ backgroundColor: '#fff',
160
+ borderRadius: 16,
161
+ padding: 24,
162
+ width: '100%',
163
+ }}
164
+ >
165
+ <Text style={{ fontSize: 20, fontWeight: 'bold', marginBottom: 16 }}>
166
+ Modal Başlığı
167
+ </Text>
168
+
169
+ <Text style={{ marginBottom: 24 }}>
170
+ Modal içeriği buraya gelecek.
171
+ </Text>
172
+
173
+ <Button title="Kapat" onPress={onClose} />
174
+ </View>
175
+ </GlassView>
176
+ </Modal>
177
+ );
178
+ };
179
+ ```
180
+
181
+ ### Card Overlay
182
+
183
+ ```tsx
184
+ export const GlassCard = ({ title, description, image }) => {
185
+ return (
186
+ <View style={{ borderRadius: 16, overflow: 'hidden', height: 200 }}>
187
+ {/* Arka plan resmi */}
188
+ <Image
189
+ source={{ uri: image }}
190
+ style={{ ...StyleSheet.absoluteFillObject }}
191
+ resizeMode="cover"
192
+ />
193
+
194
+ {/* Glass overlay */}
195
+ <GlassView
196
+ intensity={60}
197
+ style={{
198
+ position: 'absolute',
199
+ bottom: 0,
200
+ left: 0,
201
+ right: 0,
202
+ padding: 16,
203
+ }}
204
+ >
205
+ <Text style={{ fontSize: 18, fontWeight: 'bold', color: '#fff' }}>
206
+ {title}
207
+ </Text>
208
+
209
+ <Text style={{ color: 'rgba(255, 255, 255, 0.8)', marginTop: 4 }}>
210
+ {description}
211
+ </Text>
212
+ </GlassView>
213
+ </View>
214
+ );
215
+ };
216
+ ```
217
+
218
+ ### Tab Bar
219
+
220
+ ```tsx
221
+ export const GlassTabBar = ({ state, descriptors, navigation }) => {
222
+ return (
223
+ <GlassView
224
+ intensity={50}
225
+ style={{
226
+ position: 'absolute',
227
+ bottom: 0,
228
+ left: 0,
229
+ right: 0,
230
+ height: 60,
231
+ flexDirection: 'row',
232
+ borderTopWidth: 1,
233
+ borderTopColor: 'rgba(255, 255, 255, 0.1)',
234
+ }}
235
+ >
236
+ {state.routes.map((route, index) => {
237
+ const { options } = descriptors[route.key];
238
+ const label = options.tabBarLabel !== undefined
239
+ ? options.tabBarLabel
240
+ : route.name;
241
+
242
+ const isFocused = state.index === index;
243
+
244
+ const onPress = () => {
245
+ const event = navigation.emit({
246
+ type: 'tabPress',
247
+ target: route.key,
248
+ canPreventDefault: true,
249
+ });
250
+
251
+ if (!isFocused && !event.defaultPrevented) {
252
+ navigation.navigate(route.name);
253
+ }
254
+ };
255
+
256
+ return (
257
+ <Pressable
258
+ key={route.key}
259
+ onPress={onPress}
260
+ style={{
261
+ flex: 1,
262
+ justifyContent: 'center',
263
+ alignItems: 'center',
264
+ opacity: isFocused ? 1 : 0.6,
265
+ }}
266
+ >
267
+ <AtomicIcon
268
+ name={options.tabBarIcon || 'circle'}
269
+ color={isFocused ? 'primary' : 'textSecondary'}
270
+ />
271
+ <Text style={{ fontSize: 12, marginTop: 4 }}>
272
+ {label}
273
+ </Text>
274
+ </Pressable>
275
+ );
276
+ })}
277
+ </GlassView>
278
+ );
279
+ };
280
+ ```
281
+
282
+ ### Floating Action Button
283
+
284
+ ```tsx
285
+ export const GlassFAB = ({ icon, onPress }) => {
286
+ return (
287
+ <GlassView
288
+ intensity={70}
289
+ style={{
290
+ position: 'absolute',
291
+ bottom: 24,
292
+ right: 24,
293
+ width: 56,
294
+ height: 56,
295
+ borderRadius: 28,
296
+ justifyContent: 'center',
297
+ alignItems: 'center',
298
+ borderWidth: 1,
299
+ borderColor: 'rgba(255, 255, 255, 0.2)',
300
+ }}
301
+ >
302
+ <Pressable onPress={onPress} style={{ padding: 16 }}>
303
+ <AtomicIcon name={icon} size="lg" />
304
+ </Pressable>
305
+ </GlassView>
306
+ );
307
+ };
308
+ ```
309
+
310
+ ### Header
311
+
312
+ ```tsx
313
+ export const GlassHeader = ({ title, right }) => {
314
+ return (
315
+ <GlassView
316
+ intensity={50}
317
+ style={{
318
+ position: 'absolute',
319
+ top: 0,
320
+ left: 0,
321
+ right: 0,
322
+ height: 100,
323
+ paddingTop: 44,
324
+ paddingHorizontal: 16,
325
+ flexDirection: 'row',
326
+ alignItems: 'center',
327
+ justifyContent: 'space-between',
328
+ }}
329
+ >
330
+ <Pressable>
331
+ <AtomicIcon name="arrow-back" />
332
+ </Pressable>
333
+
334
+ <Text style={{ fontSize: 18, fontWeight: 'bold' }}>
335
+ {title}
336
+ </Text>
337
+
338
+ {right || <View style={{ width: 24 }} />}
339
+ </GlassView>
340
+ );
341
+ };
342
+ ```
343
+
344
+ ### Bottom Sheet
345
+
346
+ ```tsx
347
+ export const GlassBottomSheet = ({ visible, onClose }) => {
348
+ return (
349
+ <Modal visible={visible} transparent animationType="slide">
350
+ <Pressable
351
+ style={{ flex: 1 }}
352
+ onPress={onClose}
353
+ >
354
+ <GlassView
355
+ intensity={80}
356
+ tint="dark"
357
+ style={{
358
+ position: 'absolute',
359
+ bottom: 0,
360
+ left: 0,
361
+ right: 0,
362
+ borderTopLeftRadius: 24,
363
+ borderTopRightRadius: 24,
364
+ padding: 24,
365
+ }}
366
+ >
367
+ <View
368
+ style={{
369
+ width: 40,
370
+ height: 4,
371
+ backgroundColor: 'rgba(255, 255, 255, 0.3)',
372
+ borderRadius: 2,
373
+ alignSelf: 'center',
374
+ marginBottom: 24,
375
+ }}
376
+ />
377
+
378
+ <Text style={{ fontSize: 18, fontWeight: 'bold', marginBottom: 16 }}>
379
+ Bottom Sheet
380
+ </Text>
381
+
382
+ <Text style={{ color: 'rgba(255, 255, 255, 0.8)' }}>
383
+ İçerik buraya gelecek.
384
+ </Text>
385
+ </GlassView>
386
+ </Pressable>
387
+ </Modal>
388
+ );
389
+ };
390
+ ```
391
+
392
+ ### Popup Menu
393
+
394
+ ```tsx
395
+ export const GlassPopupMenu = ({ visible, onClose, options }) => {
396
+ if (!visible) return null;
397
+
398
+ return (
399
+ <Pressable
400
+ style={{ ...StyleSheet.absoluteFillObject }}
401
+ onPress={onClose}
402
+ >
403
+ <GlassView
404
+ intensity={80}
405
+ style={{
406
+ position: 'absolute',
407
+ top: 60,
408
+ right: 16,
409
+ borderRadius: 12,
410
+ padding: 8,
411
+ minWidth: 200,
412
+ }}
413
+ >
414
+ {options.map((option, index) => (
415
+ <Pressable
416
+ key={index}
417
+ onPress={() => {
418
+ option.onPress();
419
+ onClose();
420
+ }}
421
+ style={{
422
+ paddingVertical: 12,
423
+ paddingHorizontal: 16,
424
+ borderRadius: 8,
425
+ }}
426
+ >
427
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
428
+ <AtomicIcon name={option.icon} size="sm" />
429
+ <Text style={{ marginLeft: 12 }}>{option.label}</Text>
430
+ </View>
431
+ </Pressable>
432
+ ))}
433
+ </GlassView>
434
+ </Pressable>
435
+ );
436
+ };
437
+ ```
438
+
439
+ ## Props
440
+
441
+ ### GlassViewProps
442
+
443
+ | Prop | Tip | Varsayılan | Açıklama |
444
+ |------|-----|------------|----------|
445
+ | `children` | `ReactNode` | - | İçerik |
446
+ | `style` | `StyleProp<ViewStyle>` | - | Özel stil |
447
+ | `intensity` | `number` | `50` | Blur yoğunluğu (0-100) |
448
+ | `tint` | `'light' \| 'dark'` | Otomatik | Renk tonu |
449
+ | `experimentalBlurMethod` | `'dimezisBlurView' \| 'none'` | - | Deneysel blur yöntemi |
450
+
451
+ ## Best Practices
452
+
453
+ ### 1. Intensity Seçimi
454
+
455
+ ```tsx
456
+ // Hafif blur - arka plan görünebilir
457
+ <GlassView intensity={30}>
458
+
459
+ // Orta blur - iyi denge
460
+ <GlassView intensity={50}>
461
+
462
+ // Güçlü blur - içerik odaklı
463
+ <GlassView intensity={80}>
464
+ ```
465
+
466
+ ### 2. Tint Kullanımı
467
+
468
+ ```tsx
469
+ // Light tema - açık arka planlar
470
+ <GlassView tint="light">
471
+
472
+ // Dark tema - koyu arka planlar
473
+ <GlassView tint="dark">
474
+
475
+ // Otomatik - tema moduna göre
476
+ <GlassView> // Otomatik
477
+ ```
478
+
479
+ ### 3. Performans
480
+
481
+ ```tsx
482
+ // Düşük intensity daha performanslıdır
483
+ <GlassView intensity={30}>
484
+
485
+ // Sabit boyut kullanın
486
+ <GlassView style={{ width: 200, height: 100 }}>
487
+
488
+ // Overflow hidden kullanın
489
+ <GlassView style={{ overflow: 'hidden' }}>
490
+ ```
491
+
492
+ ## Erişilebilirlik
493
+
494
+ GlassView, tam erişilebilirlik desteği sunar:
495
+
496
+ - ✅ Screen reader desteği
497
+ - ✅ Contrast ratio
498
+ - ✅ Semantic meaning
499
+
500
+ ## Performans İpuçları
501
+
502
+ 1. **Intensity**: Daha düşük değerler daha performanslıdır
503
+ 2. **Static Size**: Sabit boyut kullanın
504
+ 3. **Limited Usage**: Gerektiğinde kullanın
505
+ 4. **Test**: Farklı cihazlarda test edin
506
+
507
+ ## Platform Desteği
508
+
509
+ - ✅ iOS (tam destek)
510
+ - ✅ Android (tam destek)
511
+ - ⚠️ Web (kısmi destek)
512
+
513
+ ## İlgili Bileşenler
514
+
515
+ - [`BaseModal`](../../molecules/BaseModal/README.md) - Modal bileşeni
516
+ - [`AtomicCard`](../AtomicCard.README.md) - Kart bileşeni
517
+ - [`GlowingCard`](../../molecules/GlowingCard/README.md) - Parlak kart
518
+
519
+ ## Lisans
520
+
521
+ MIT