@umituz/react-native-design-system 2.6.84 → 2.6.86
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 -3
- package/src/atoms/AtomicCard.README.md +337 -0
- package/src/atoms/AtomicIcon.README.md +349 -0
- package/src/atoms/GlassView/GlassView.tsx +28 -17
- package/src/atoms/GlassView/README.md +521 -0
- package/src/atoms/button/README.md +363 -0
- package/src/atoms/chip/README.md +376 -0
- package/src/atoms/input/README.md +342 -0
- package/src/atoms/picker/README.md +412 -0
- package/src/molecules/BaseModal.README.md +435 -0
- package/src/molecules/FormField.README.md +486 -0
- package/src/molecules/GlowingCard/GlowingCard.tsx +8 -1
- package/src/molecules/GlowingCard/README.md +448 -0
- package/src/molecules/SearchBar/README.md +533 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.86",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"@umituz/react-native-storage": "*",
|
|
61
61
|
"@umituz/react-native-uuid": "*",
|
|
62
62
|
"expo-application": ">=5.0.0",
|
|
63
|
-
"expo-blur": ">=13.0.0",
|
|
64
63
|
"expo-clipboard": ">=8.0.0",
|
|
65
64
|
"expo-crypto": ">=13.0.0",
|
|
66
65
|
"expo-device": ">=5.0.0",
|
|
@@ -112,7 +111,6 @@
|
|
|
112
111
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
113
112
|
"eslint-plugin-react-native": "^5.0.0",
|
|
114
113
|
"expo-application": "~5.9.1",
|
|
115
|
-
"expo-blur": "~14.0.0",
|
|
116
114
|
"expo-clipboard": "~8.0.7",
|
|
117
115
|
"expo-crypto": "~14.0.0",
|
|
118
116
|
"expo-device": "~7.0.2",
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# AtomicCard
|
|
2
|
+
|
|
3
|
+
AtomicCard, React Native için basit ve özelleştirilebilir bir kart container bileşenidir. Material Design 3 prensiplerine uygun olarak tasarlanmıştır.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
|
|
7
|
+
- 🎨 **3 Variant**: Elevated, Outlined, Filled
|
|
8
|
+
- 📦 **4 Padding Seçeneği**: None, Small, Medium, Large
|
|
9
|
+
- 👆 **Pressable**: Tıklanabilir kart desteği
|
|
10
|
+
- 🎯 **Flexible**: İçerik için esnek yapı
|
|
11
|
+
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
12
|
+
|
|
13
|
+
## Kurulum
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { AtomicCard } from 'react-native-design-system';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Temel Kullanım
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import React from 'react';
|
|
23
|
+
import { View, Text } from 'react-native';
|
|
24
|
+
import { AtomicCard } from 'react-native-design-system';
|
|
25
|
+
|
|
26
|
+
export const BasicExample = () => {
|
|
27
|
+
return (
|
|
28
|
+
<View style={{ padding: 16 }}>
|
|
29
|
+
<AtomicCard>
|
|
30
|
+
<Text>Bu bir kart içeriği</Text>
|
|
31
|
+
</AtomicCard>
|
|
32
|
+
</View>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Variant'lar
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<View style={{ gap: 16 }}>
|
|
41
|
+
{/* Elevated (Varsayılan) */}
|
|
42
|
+
<AtomicCard variant="elevated">
|
|
43
|
+
<Text>Elevated Card - Gölge efekti</Text>
|
|
44
|
+
</AtomicCard>
|
|
45
|
+
|
|
46
|
+
{/* Outlined */}
|
|
47
|
+
<AtomicCard variant="outlined">
|
|
48
|
+
<Text>Outlined Card - Çerçeve efekti</Text>
|
|
49
|
+
</AtomicCard>
|
|
50
|
+
|
|
51
|
+
{/* Filled */}
|
|
52
|
+
<AtomicCard variant="filled">
|
|
53
|
+
<Text>Filled Card - Dolgu efekti</Text>
|
|
54
|
+
</AtomicCard>
|
|
55
|
+
</View>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Padding Seçenekleri
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
<View style={{ gap: 16 }}>
|
|
62
|
+
{/* No Padding */}
|
|
63
|
+
<AtomicCard padding="none">
|
|
64
|
+
<Text>Padding yok</Text>
|
|
65
|
+
</AtomicCard>
|
|
66
|
+
|
|
67
|
+
{/* Small */}
|
|
68
|
+
<AtomicCard padding="sm">
|
|
69
|
+
<Text>Small padding</Text>
|
|
70
|
+
</AtomicCard>
|
|
71
|
+
|
|
72
|
+
{/* Medium (Varsayılan) */}
|
|
73
|
+
<AtomicCard padding="md">
|
|
74
|
+
<Text>Medium padding</Text>
|
|
75
|
+
</AtomicCard>
|
|
76
|
+
|
|
77
|
+
{/* Large */}
|
|
78
|
+
<AtomicCard padding="lg">
|
|
79
|
+
<Text>Large padding</Text>
|
|
80
|
+
</AtomicCard>
|
|
81
|
+
</View>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Pressable Card
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
<AtomicCard
|
|
88
|
+
onPress={() => console.log('Kart tıklandı!')}
|
|
89
|
+
padding="md"
|
|
90
|
+
>
|
|
91
|
+
<Text>Tıklanabilir Kart</Text>
|
|
92
|
+
<Text>Tıklamayı dene</Text>
|
|
93
|
+
</AtomicCard>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Örnek Kullanımlar
|
|
97
|
+
|
|
98
|
+
### Profil Kartı
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
<AtomicCard variant="elevated" padding="md">
|
|
102
|
+
<View style={{ alignItems: 'center' }}>
|
|
103
|
+
<Text style={{ fontSize: 20, fontWeight: 'bold' }}>Ahmet Yılmaz</Text>
|
|
104
|
+
<Text style={{ color: 'gray' }}>Frontend Developer</Text>
|
|
105
|
+
</View>
|
|
106
|
+
</AtomicCard>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Ürün Kartı
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
<AtomicCard
|
|
113
|
+
variant="outlined"
|
|
114
|
+
padding="md"
|
|
115
|
+
onPress={() => navigate('ProductDetail')}
|
|
116
|
+
>
|
|
117
|
+
<Text style={{ fontSize: 16, fontWeight: '600' }}>Ürün Adı</Text>
|
|
118
|
+
<Text style={{ marginTop: 8 }}>Ürün açıklaması</Text>
|
|
119
|
+
<Text style={{ marginTop: 16, fontSize: 18, fontWeight: 'bold' }}>$99.99</Text>
|
|
120
|
+
</AtomicCard>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Bilgi Kartı
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
<AtomicCard variant="filled" padding="lg">
|
|
127
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold', marginBottom: 8 }}>
|
|
128
|
+
Önemli Bilgi
|
|
129
|
+
</Text>
|
|
130
|
+
<Text style={{ lineHeight: 22 }}>
|
|
131
|
+
Bu kart önemli bilgileri içermektedir.
|
|
132
|
+
Lütfen dikkatlice okuyunuz.
|
|
133
|
+
</Text>
|
|
134
|
+
</AtomicCard>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Liste Elemanı
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
{items.map((item) => (
|
|
141
|
+
<AtomicCard
|
|
142
|
+
key={item.id}
|
|
143
|
+
variant="outlined"
|
|
144
|
+
padding="sm"
|
|
145
|
+
onPress={() => handleItemPress(item)}
|
|
146
|
+
style={{ marginBottom: 12 }}
|
|
147
|
+
>
|
|
148
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
149
|
+
<Text>{item.title}</Text>
|
|
150
|
+
<Text>{item.date}</Text>
|
|
151
|
+
</View>
|
|
152
|
+
</AtomicCard>
|
|
153
|
+
))}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Props
|
|
157
|
+
|
|
158
|
+
### AtomicCardProps
|
|
159
|
+
|
|
160
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
161
|
+
|------|-----|------------|----------|
|
|
162
|
+
| `children` | `ReactNode` | - **(Zorunlu)** | Kart içeriği |
|
|
163
|
+
| `variant` | `AtomicCardVariant` | `'elevated'` | Kart görünüm stili |
|
|
164
|
+
| `padding` | `AtomicCardPadding` | `'md'` | İç boşluk miktarı |
|
|
165
|
+
| `onPress` | `(event: GestureResponderEvent) => void` | - | Tıklama olayı |
|
|
166
|
+
| `disabled` | `boolean` | `false` | Devre dışı |
|
|
167
|
+
| `style` | `StyleProp<ViewStyle>` | - | Özel stil |
|
|
168
|
+
| `testID` | `string` | - | Test ID'si |
|
|
169
|
+
|
|
170
|
+
### AtomicCardVariant
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
type AtomicCardVariant =
|
|
174
|
+
| 'elevated' // Gölge efekti (varsayılan)
|
|
175
|
+
| 'outlined' // Çerçeve efekti
|
|
176
|
+
| 'filled'; // Dolgu efekti
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### AtomicCardPadding
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
type AtomicCardPadding =
|
|
183
|
+
| 'none' // İç boşluk yok
|
|
184
|
+
| 'sm' // Küçük iç boşluk
|
|
185
|
+
| 'md' // Orta iç boşluk (varsayılan)
|
|
186
|
+
| 'lg'; // Büyük iç boşluk
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Stil Özelleştirme
|
|
190
|
+
|
|
191
|
+
```tsx
|
|
192
|
+
<AtomicCard
|
|
193
|
+
variant="elevated"
|
|
194
|
+
padding="md"
|
|
195
|
+
style={{
|
|
196
|
+
backgroundColor: '#f8f9fa',
|
|
197
|
+
borderRadius: 16,
|
|
198
|
+
borderWidth: 2,
|
|
199
|
+
borderColor: '#e9ecef',
|
|
200
|
+
shadowColor: '#000',
|
|
201
|
+
shadowOffset: { width: 0, height: 2 },
|
|
202
|
+
shadowOpacity: 0.1,
|
|
203
|
+
shadowRadius: 4,
|
|
204
|
+
elevation: 3,
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
<Text>Özel Stilli Kart</Text>
|
|
208
|
+
</AtomicCard>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Best Practices
|
|
212
|
+
|
|
213
|
+
### 1. Variant Seçimi
|
|
214
|
+
|
|
215
|
+
```tsx
|
|
216
|
+
// Ana içerik için elevated
|
|
217
|
+
<AtomicCard variant="elevated">
|
|
218
|
+
<ImportantContent />
|
|
219
|
+
</AtomicCard>
|
|
220
|
+
|
|
221
|
+
// Liste elemanları için outlined
|
|
222
|
+
<FlatList
|
|
223
|
+
data={items}
|
|
224
|
+
renderItem={({ item }) => (
|
|
225
|
+
<AtomicCard variant="outlined" padding="sm">
|
|
226
|
+
{item.content}
|
|
227
|
+
</AtomicCard>
|
|
228
|
+
)}
|
|
229
|
+
/>
|
|
230
|
+
|
|
231
|
+
// Arka plan için filled
|
|
232
|
+
<AtomicCard variant="filled">
|
|
233
|
+
<BackgroundContent />
|
|
234
|
+
</AtomicCard>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 2. Padding Kullanımı
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
// Yoğun içerik için az padding
|
|
241
|
+
<AtomicCard padding="sm">
|
|
242
|
+
<DenseContent />
|
|
243
|
+
</AtomicCard>
|
|
244
|
+
|
|
245
|
+
// Boş içerik için fazla padding
|
|
246
|
+
<AtomicCard padding="lg">
|
|
247
|
+
<SparseContent />
|
|
248
|
+
</AtomicCard>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 3. Pressable Kullanım
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
// Tıklanabilir öğeler
|
|
255
|
+
<AtomicCard
|
|
256
|
+
onPress={handlePress}
|
|
257
|
+
style={{ marginBottom: 8 }}
|
|
258
|
+
>
|
|
259
|
+
<CardHeader />
|
|
260
|
+
<CardContent />
|
|
261
|
+
<CardFooter />
|
|
262
|
+
</AtomicCard>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Erişilebilirlik
|
|
266
|
+
|
|
267
|
+
AtomicCard, tam erişilebilirlik desteği sunar:
|
|
268
|
+
|
|
269
|
+
- ✅ Touch uygun boyut
|
|
270
|
+
- ✅ Screen reader desteği
|
|
271
|
+
- ✅ Disabled state anonsu
|
|
272
|
+
- ✅ Test ID desteği
|
|
273
|
+
|
|
274
|
+
## Performans İpuçları
|
|
275
|
+
|
|
276
|
+
1. **FlatList ile Kullanım**: Listelerde `key` prop'unu kullanın
|
|
277
|
+
2. **Inline Styles**: Mümkün olduğunca theme kullanın
|
|
278
|
+
3. **Re-renders**: Kart içeriğini `React.memo` ile sarın
|
|
279
|
+
|
|
280
|
+
## İlgili Bileşenler
|
|
281
|
+
|
|
282
|
+
- [`MediaCard`](../../molecules/media-card/README.md) - Medya kartı
|
|
283
|
+
- [`GlowingCard`](../../molecules/GlowingCard/README.md) - Parlak kart
|
|
284
|
+
- [`FormField`](../../molecules/FormField/README.md) - Form alanı
|
|
285
|
+
|
|
286
|
+
## Örnek Proje
|
|
287
|
+
|
|
288
|
+
```tsx
|
|
289
|
+
import React from 'react';
|
|
290
|
+
import { View, ScrollView, Text, Image } from 'react-native';
|
|
291
|
+
import { AtomicCard } from 'react-native-design-system';
|
|
292
|
+
|
|
293
|
+
export const CardGallery = () => {
|
|
294
|
+
return (
|
|
295
|
+
<ScrollView style={{ padding: 16 }}>
|
|
296
|
+
{/* Basit Kart */}
|
|
297
|
+
<AtomicCard variant="elevated" padding="md" style={{ marginBottom: 16 }}>
|
|
298
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
299
|
+
Basit Kart
|
|
300
|
+
</Text>
|
|
301
|
+
<Text style={{ marginTop: 8 }}>
|
|
302
|
+
Bu basit bir kart örneğidir.
|
|
303
|
+
</Text>
|
|
304
|
+
</AtomicCard>
|
|
305
|
+
|
|
306
|
+
{/* Tıklanabilir Kart */}
|
|
307
|
+
<AtomicCard
|
|
308
|
+
variant="outlined"
|
|
309
|
+
padding="md"
|
|
310
|
+
onPress={() => console.log('Tıklandı!')}
|
|
311
|
+
style={{ marginBottom: 16 }}
|
|
312
|
+
>
|
|
313
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
314
|
+
Tıklanabilir Kart
|
|
315
|
+
</Text>
|
|
316
|
+
<Text style={{ marginTop: 8, color: '#6366f1' }}>
|
|
317
|
+
Tıkla ve gör
|
|
318
|
+
</Text>
|
|
319
|
+
</AtomicCard>
|
|
320
|
+
|
|
321
|
+
{/* Filled Kart */}
|
|
322
|
+
<AtomicCard variant="filled" padding="lg" style={{ marginBottom: 16 }}>
|
|
323
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
324
|
+
Filled Kart
|
|
325
|
+
</Text>
|
|
326
|
+
<Text style={{ marginTop: 8, lineHeight: 22 }}>
|
|
327
|
+
Bu kartın dolgu efekti vardır.
|
|
328
|
+
</Text>
|
|
329
|
+
</AtomicCard>
|
|
330
|
+
</ScrollView>
|
|
331
|
+
);
|
|
332
|
+
};
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Lisans
|
|
336
|
+
|
|
337
|
+
MIT
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# AtomicIcon
|
|
2
|
+
|
|
3
|
+
AtomicIcon, React Native için tema bilinci yüksek bir ikon bileşenidir. Ionicons kütüphanesini kullanır ve tema ile tam entegre çalışır.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
|
|
7
|
+
- 🎨 **Tema Bilinci**: Semantic renkler desteği
|
|
8
|
+
- 📏 **Semantic Size**: xs, sm, md, lg, xl boyutları
|
|
9
|
+
- 🎭 **Background Desteği**: Dairesel arka plan
|
|
10
|
+
- 🖼️ **Custom SVG**: Özel SVG path desteği
|
|
11
|
+
- ✅ **Validation**: Geçersiz ikon kontrolü
|
|
12
|
+
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
13
|
+
|
|
14
|
+
## Kurulum
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { AtomicIcon } from 'react-native-design-system';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Temel Kullanım
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { View } from 'react-native';
|
|
25
|
+
import { AtomicIcon } from 'react-native-design-system';
|
|
26
|
+
|
|
27
|
+
export const BasicExample = () => {
|
|
28
|
+
return (
|
|
29
|
+
<View style={{ padding: 16, flexDirection: 'row', gap: 16 }}>
|
|
30
|
+
<AtomicIcon name="heart-outline" />
|
|
31
|
+
<AtomicIcon name="star" />
|
|
32
|
+
<AtomicIcon name="settings" />
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Boyutlar
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
<View style={{ flexDirection: 'row', gap: 16, alignItems: 'center' }}>
|
|
42
|
+
{/* Extra Small */}
|
|
43
|
+
<AtomicIcon name="home" size="xs" />
|
|
44
|
+
|
|
45
|
+
{/* Small */}
|
|
46
|
+
<AtomicIcon name="home" size="sm" />
|
|
47
|
+
|
|
48
|
+
{/* Medium (Varsayılan) */}
|
|
49
|
+
<AtomicIcon name="home" size="md" />
|
|
50
|
+
|
|
51
|
+
{/* Large */}
|
|
52
|
+
<AtomicIcon name="home" size="lg" />
|
|
53
|
+
|
|
54
|
+
{/* Extra Large */}
|
|
55
|
+
<AtomicIcon name="home" size="xl" />
|
|
56
|
+
|
|
57
|
+
{/* Custom Size */}
|
|
58
|
+
<AtomicIcon name="home" customSize={32} />
|
|
59
|
+
</View>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Semantic Renkler
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
66
|
+
<AtomicIcon name="checkmark-circle" size="lg" color="success" />
|
|
67
|
+
<AtomicIcon name="warning" size="lg" color="warning" />
|
|
68
|
+
<AtomicIcon name="close-circle" size="lg" color="error" />
|
|
69
|
+
<AtomicIcon name="information-circle" size="lg" color="info" />
|
|
70
|
+
<AtomicIcon name="heart" size="lg" color="primary" />
|
|
71
|
+
<AtomicIcon name="star" size="lg" color="secondary" />
|
|
72
|
+
</View>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Custom Renkler
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<AtomicIcon
|
|
79
|
+
name="favorite"
|
|
80
|
+
size="lg"
|
|
81
|
+
customColor="#FF6B6B"
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Background ile Kullanım
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
89
|
+
<AtomicIcon
|
|
90
|
+
name="home"
|
|
91
|
+
size="md"
|
|
92
|
+
withBackground
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<AtomicIcon
|
|
96
|
+
name="settings"
|
|
97
|
+
size="md"
|
|
98
|
+
withBackground
|
|
99
|
+
backgroundColor="#E3F2FD"
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<AtomicIcon
|
|
103
|
+
name="favorite"
|
|
104
|
+
size="lg"
|
|
105
|
+
withBackground
|
|
106
|
+
color="error"
|
|
107
|
+
/>
|
|
108
|
+
</View>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Custom SVG
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
<AtomicIcon
|
|
115
|
+
size="md"
|
|
116
|
+
svgPath="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"
|
|
117
|
+
svgViewBox="0 0 24 24"
|
|
118
|
+
customColor="#6366f1"
|
|
119
|
+
/>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Örnek Kullanımlar
|
|
123
|
+
|
|
124
|
+
### Navigation Icons
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
<TabBar>
|
|
128
|
+
<TabIcon icon="home-outline" label="Home" />
|
|
129
|
+
<TabIcon icon="search-outline" label="Search" />
|
|
130
|
+
<TabIcon icon="person-outline" label="Profile" />
|
|
131
|
+
</TabBar>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Action Buttons
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
138
|
+
<AtomicIcon
|
|
139
|
+
name="call-outline"
|
|
140
|
+
size="lg"
|
|
141
|
+
color="success"
|
|
142
|
+
withBackground
|
|
143
|
+
/>
|
|
144
|
+
|
|
145
|
+
<AtomicIcon
|
|
146
|
+
name="mail-outline"
|
|
147
|
+
size="lg"
|
|
148
|
+
color="primary"
|
|
149
|
+
withBackground
|
|
150
|
+
/>
|
|
151
|
+
|
|
152
|
+
<AtomicIcon
|
|
153
|
+
name="videocam-outline"
|
|
154
|
+
size="lg"
|
|
155
|
+
color="secondary"
|
|
156
|
+
withBackground
|
|
157
|
+
/>
|
|
158
|
+
</View>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Status Icons
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
165
|
+
<AtomicIcon name="checkmark-circle" size="sm" color="success" />
|
|
166
|
+
<AtomicText>Online</AtomicText>
|
|
167
|
+
</View>
|
|
168
|
+
|
|
169
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
170
|
+
<AtomicIcon name="time" size="sm" color="warning" />
|
|
171
|
+
<AtomicText>Away</AtomicText>
|
|
172
|
+
</View>
|
|
173
|
+
|
|
174
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
175
|
+
<AtomicIcon name="close-circle" size="sm" color="error" />
|
|
176
|
+
<AtomicText>Offline</AtomicText>
|
|
177
|
+
</View>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Props
|
|
181
|
+
|
|
182
|
+
### AtomicIconProps
|
|
183
|
+
|
|
184
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
185
|
+
|------|-----|------------|----------|
|
|
186
|
+
| `name` | `IconName` | - | İkon ismi (Ionicons) |
|
|
187
|
+
| `size` | `IconSize` | `'md'` | Semantic boyut |
|
|
188
|
+
| `customSize` | `number` | - | Özel boyut (px) |
|
|
189
|
+
| `color` | `IconColor` | - | Semantic renk |
|
|
190
|
+
| `customColor` | `string` | - | Özel renk |
|
|
191
|
+
| `svgPath` | `string` | - | Custom SVG path |
|
|
192
|
+
| `svgViewBox` | `string` | `'0 0 24 24'` | SVG viewBox |
|
|
193
|
+
| `withBackground` | `boolean` | `false` | Dairesel arka plan |
|
|
194
|
+
| `backgroundColor` | `string` | - | Arka plan rengi |
|
|
195
|
+
| `accessibilityLabel` | `string` | - | Erişilebilirlik etiketi |
|
|
196
|
+
| `testID` | `string` | - | Test ID'si |
|
|
197
|
+
| `style` | `StyleProp<ViewStyle>` | - | Özel stil |
|
|
198
|
+
|
|
199
|
+
### IconSize
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### IconColor
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
type IconColor =
|
|
209
|
+
| 'primary' // Ana tema rengi
|
|
210
|
+
| 'secondary' // İkincil tema rengi
|
|
211
|
+
| 'success' // Başarı rengi
|
|
212
|
+
| 'warning' // Uyarı rengi
|
|
213
|
+
| 'error' // Hata rengi
|
|
214
|
+
| 'info' // Bilgi rengi
|
|
215
|
+
| 'onSurface' // Yüzey üzerindeki metin
|
|
216
|
+
| 'surfaceVariant' // Yüzey variant rengi
|
|
217
|
+
| 'onPrimary' // Ana renk üzerindeki metin
|
|
218
|
+
| 'onSecondary' // İkincil renk üzerindeki metin
|
|
219
|
+
| 'textInverse' // Ters metin rengi
|
|
220
|
+
| 'textPrimary' // Birincil metin rengi
|
|
221
|
+
| 'textSecondary' // İkincil metin rengi
|
|
222
|
+
| 'textTertiary' // Üçüncül metin rengi
|
|
223
|
+
| 'onSurfaceVariant'; // Yüzey variant üzerindeki metin
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Icon Name Listesi
|
|
227
|
+
|
|
228
|
+
Ionicons kütüphanesinden popüler ikonlar:
|
|
229
|
+
|
|
230
|
+
### Navigation
|
|
231
|
+
- `home`, `home-outline`
|
|
232
|
+
- `search`, `search-outline`
|
|
233
|
+
- `settings`, `settings-outline`
|
|
234
|
+
- `menu`, `menu-outline`
|
|
235
|
+
- `arrow-back`, `arrow-forward`
|
|
236
|
+
- `chevron-back`, `chevron-forward`
|
|
237
|
+
|
|
238
|
+
### Action
|
|
239
|
+
- `add`, `add-outline`
|
|
240
|
+
- `checkmark`, `checkmark-circle`
|
|
241
|
+
- `close`, `close-circle`
|
|
242
|
+
- `trash`, `trash-outline`
|
|
243
|
+
- `create`, `create-outline`
|
|
244
|
+
- `heart`, `heart-outline`
|
|
245
|
+
|
|
246
|
+
### Communication
|
|
247
|
+
- `mail`, `mail-outline`
|
|
248
|
+
- `call`, `call-outline`
|
|
249
|
+
- `chatbubbles`, `chatbubbles-outline`
|
|
250
|
+
- `videocam`, `videocam-outline`
|
|
251
|
+
|
|
252
|
+
### Media
|
|
253
|
+
- `image`, `image-outline`
|
|
254
|
+
- `musical-note`, `musical-notes`
|
|
255
|
+
- `camera`, `camera-outline`
|
|
256
|
+
- `mic`, `mic-outline`
|
|
257
|
+
|
|
258
|
+
### Status
|
|
259
|
+
- `checkmark-circle`, `checkmark-circle-outline`
|
|
260
|
+
- `warning`, `warning-outline`
|
|
261
|
+
- `information-circle`, `information-circle-outline`
|
|
262
|
+
- `close-circle`, `close-circle-outline`
|
|
263
|
+
|
|
264
|
+
Daha fazla ikon için: [Ionicons Documentation](https://ionic.io/ionicons)
|
|
265
|
+
|
|
266
|
+
## Best Practices
|
|
267
|
+
|
|
268
|
+
### 1. Size Kullanımı
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
// Küçük alanlar için
|
|
272
|
+
<AtomicIcon name="checkmark" size="xs" />
|
|
273
|
+
|
|
274
|
+
// Normal kullanım
|
|
275
|
+
<AtomicIcon name="checkmark" size="md" />
|
|
276
|
+
|
|
277
|
+
// Vurgu için
|
|
278
|
+
<AtomicIcon name="checkmark" size="xl" />
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### 2. Renk Seçimi
|
|
282
|
+
|
|
283
|
+
```tsx
|
|
284
|
+
// Ana aksiyon
|
|
285
|
+
<AtomicIcon name="add" color="primary" />
|
|
286
|
+
|
|
287
|
+
// Başarı durumu
|
|
288
|
+
<AtomicIcon name="checkmark" color="success" />
|
|
289
|
+
|
|
290
|
+
// Hata durumu
|
|
291
|
+
<AtomicIcon name="warning" color="error" />
|
|
292
|
+
|
|
293
|
+
// Bilgi durumu
|
|
294
|
+
<AtomicIcon name="info" color="info" />
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### 3. Background Kullanımı
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
// Buton ikonları
|
|
301
|
+
<AtomicIcon
|
|
302
|
+
name="add"
|
|
303
|
+
withBackground
|
|
304
|
+
color="primary"
|
|
305
|
+
/>
|
|
306
|
+
|
|
307
|
+
// Avatar ikonları
|
|
308
|
+
<AtomicIcon
|
|
309
|
+
name="person"
|
|
310
|
+
size="lg"
|
|
311
|
+
withBackground
|
|
312
|
+
backgroundColor="#E3F2FD"
|
|
313
|
+
/>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Erişilebilirlik
|
|
317
|
+
|
|
318
|
+
AtomicIcon, tam erişilebilirlik desteği sunar:
|
|
319
|
+
|
|
320
|
+
- ✅ Screen reader desteği
|
|
321
|
+
- ✅ Accessibility label
|
|
322
|
+
- ✅ Semantic anlamlar
|
|
323
|
+
- ✅ Test ID desteği
|
|
324
|
+
|
|
325
|
+
## Validation
|
|
326
|
+
|
|
327
|
+
Geçersiz ikon isimleri otomatik olarak fallback'e yönlendirilir:
|
|
328
|
+
|
|
329
|
+
```tsx
|
|
330
|
+
// Geçersiz ikon - console warning gösterir
|
|
331
|
+
<AtomicIcon name="invalid-icon" />
|
|
332
|
+
// → "help-circle-outline" gösterir
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Performans İpuçları
|
|
336
|
+
|
|
337
|
+
1. **React.memo**: AtomicIcon zaten `React.memo` ile sarılmış
|
|
338
|
+
2. **Static Names**: İkon isimlerini değişmez olarak tanımlayın
|
|
339
|
+
3. **Avoid Re-renders**: Parent component'te stabilization kullanın
|
|
340
|
+
|
|
341
|
+
## İlgili Bileşenler
|
|
342
|
+
|
|
343
|
+
- [`AtomicButton`](../button/README.md) - Buton bileşeni
|
|
344
|
+
- [`AtomicChip`](../chip/README.md) - Chip bileşeni
|
|
345
|
+
- [`AtomicInput`](../input/README.md) - Input bileşeni
|
|
346
|
+
|
|
347
|
+
## Lisans
|
|
348
|
+
|
|
349
|
+
MIT
|