@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.
- package/package.json +1 -3
- package/src/atoms/AtomicAvatar.README.md +483 -0
- package/src/atoms/AtomicBadge.README.md +423 -0
- package/src/atoms/AtomicCard.README.md +337 -0
- package/src/atoms/AtomicDatePicker.README.md +399 -0
- package/src/atoms/AtomicFab.README.md +421 -0
- package/src/atoms/AtomicIcon.README.md +349 -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/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/README.md +448 -0
- package/src/molecules/ListItem.README.md +402 -0
- package/src/molecules/SearchBar/README.md +533 -0
|
@@ -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
|