@umituz/react-native-design-system 2.6.87 → 2.6.89
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/AtomicProgress.README.md +402 -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/FormField.README.md +424 -273
- package/src/molecules/List/README.md +568 -0
- package/src/molecules/StepHeader/README.md +487 -0
- package/src/molecules/StepProgress/README.md +522 -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/emoji/README.md +580 -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
- package/src/molecules/splash/types/index.ts +5 -8
- package/src/molecules/swipe-actions/README.md +672 -0
- package/src/theme/core/colors/DarkColors.ts +0 -3
- package/src/theme/core/colors/LightColors.ts +0 -3
- package/src/theme/core/themes.ts +1 -8
- package/src/theme/infrastructure/providers/DesignSystemProvider.tsx +1 -1
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.89",
|
|
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",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"expo-crypto": ">=13.0.0",
|
|
65
65
|
"expo-device": ">=5.0.0",
|
|
66
66
|
"expo-font": ">=12.0.0",
|
|
67
|
-
"expo-linear-gradient": ">=15.0.0",
|
|
68
67
|
"expo-sharing": ">=12.0.0",
|
|
69
68
|
"react": ">=19.0.0",
|
|
70
69
|
"react-native": ">=0.81.0",
|
|
@@ -76,9 +75,6 @@
|
|
|
76
75
|
"zustand": ">=5.0.0"
|
|
77
76
|
},
|
|
78
77
|
"peerDependenciesMeta": {
|
|
79
|
-
"expo-linear-gradient": {
|
|
80
|
-
"optional": true
|
|
81
|
-
},
|
|
82
78
|
"@react-navigation/native": {
|
|
83
79
|
"optional": true
|
|
84
80
|
},
|
|
@@ -117,7 +113,6 @@
|
|
|
117
113
|
"expo-file-system": "^19.0.21",
|
|
118
114
|
"expo-font": "~13.0.0",
|
|
119
115
|
"expo-haptics": "~14.0.0",
|
|
120
|
-
"expo-linear-gradient": "~15.0.7",
|
|
121
116
|
"expo-localization": "~16.0.1",
|
|
122
117
|
"expo-sharing": "~14.0.8",
|
|
123
118
|
"react": "19.1.0",
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
# AtomicProgress
|
|
2
|
+
|
|
3
|
+
AtomicProgress, ilerleme durumu göstermek için kullanılan bir bileşendir. Dosya yükleme, görev tamamlanma veya form dolumu gibi durumlarda kullanılır.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
|
|
7
|
+
- 📊 **0-100 Arası**: Yüzde bazlı ilerleme
|
|
8
|
+
- 🎨 **Özelleştirilebilir**: Renk, boyut, şekil
|
|
9
|
+
- 📝 **Metin Desteği**: Yüzde veya değer gösterimi
|
|
10
|
+
- 🔲 **2 Şekil**: Rounded veya Square
|
|
11
|
+
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
12
|
+
|
|
13
|
+
## Kurulum
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { AtomicProgress } 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 { AtomicProgress } from 'react-native-design-system';
|
|
25
|
+
|
|
26
|
+
export const BasicExample = () => {
|
|
27
|
+
return (
|
|
28
|
+
<View style={{ padding: 16 }}>
|
|
29
|
+
<AtomicProgress value={50} />
|
|
30
|
+
</View>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Basic Progress
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
{/* 0% */}
|
|
39
|
+
<AtomicProgress value={0} />
|
|
40
|
+
|
|
41
|
+
{/* 50% */}
|
|
42
|
+
<AtomicProgress value={50} />
|
|
43
|
+
|
|
44
|
+
{/* 100% */}
|
|
45
|
+
<AtomicProgress value={100} />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Yükseklik
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
<View style={{ gap: 16 }}>
|
|
52
|
+
<AtomicProgress value={50} height={4} />
|
|
53
|
+
<AtomicProgress value={50} height={8} />
|
|
54
|
+
<AtomicProgress value={50} height={12} />
|
|
55
|
+
<AtomicProgress value={50} height={16} />
|
|
56
|
+
</View>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Genişlik
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
<View style={{ gap: 16 }}>
|
|
63
|
+
<AtomicProgress value={50} width="100%" />
|
|
64
|
+
<AtomicProgress value={50} width="80%" />
|
|
65
|
+
<AtomicProgress value={50} width={200} />
|
|
66
|
+
</View>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Custom Renk
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
<View style={{ gap: 16 }}>
|
|
73
|
+
<AtomicProgress value={50} color="#6366f1" />
|
|
74
|
+
<AtomicProgress value={50} color="#10b981" />
|
|
75
|
+
<AtomicProgress value={50} color="#f59e0b" />
|
|
76
|
+
<AtomicProgress value={50} color="#ef4444" />
|
|
77
|
+
</View>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Şekil
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
<View style={{ gap: 16 }}>
|
|
84
|
+
<AtomicProgress value={50} shape="rounded" />
|
|
85
|
+
<AtomicProgress value={50} shape="square" />
|
|
86
|
+
</View>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Percentage Text
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
<AtomicProgress
|
|
93
|
+
value={75}
|
|
94
|
+
showPercentage
|
|
95
|
+
height={24}
|
|
96
|
+
/>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Value Text
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
<AtomicProgress
|
|
103
|
+
value={75}
|
|
104
|
+
showValue
|
|
105
|
+
height={24}
|
|
106
|
+
/>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Custom Background
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
<AtomicProgress
|
|
113
|
+
value={50}
|
|
114
|
+
color="#6366f1"
|
|
115
|
+
backgroundColor="#e0e7ff"
|
|
116
|
+
/>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Örnek Kullanımlar
|
|
120
|
+
|
|
121
|
+
### Dosya Yükleme
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
export const FileUploadProgress = ({ progress }) => {
|
|
125
|
+
return (
|
|
126
|
+
<View style={{ padding: 16 }}>
|
|
127
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
128
|
+
<AtomicText type="bodyMedium">Yükleniyor...</AtomicText>
|
|
129
|
+
<AtomicText type="bodyMedium" color="primary">
|
|
130
|
+
%{progress}
|
|
131
|
+
</AtomicText>
|
|
132
|
+
</View>
|
|
133
|
+
|
|
134
|
+
<AtomicProgress
|
|
135
|
+
value={progress}
|
|
136
|
+
height={8}
|
|
137
|
+
color="#6366f1"
|
|
138
|
+
showPercentage
|
|
139
|
+
/>
|
|
140
|
+
</View>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Görev İlerlemesi
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
export const TaskProgress = ({ completed, total }) => {
|
|
149
|
+
const percentage = (completed / total) * 100;
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<View style={{ padding: 16 }}>
|
|
153
|
+
<AtomicText type="bodyMedium" style={{ marginBottom: 8 }}>
|
|
154
|
+
{completed} / {total} görev tamamlandı
|
|
155
|
+
</AtomicText>
|
|
156
|
+
|
|
157
|
+
<AtomicProgress
|
|
158
|
+
value={percentage}
|
|
159
|
+
height={12}
|
|
160
|
+
color="#10b981"
|
|
161
|
+
/>
|
|
162
|
+
</View>
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Form Tamamlama
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
export const FormCompletionProgress = ({ completedSteps, totalSteps }) => {
|
|
171
|
+
const percentage = (completedSteps / totalSteps) * 100;
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<View style={{ padding: 16, backgroundColor: '#f8f9fa', borderRadius: 8 }}>
|
|
175
|
+
<AtomicText type="labelLarge" color="textSecondary" style={{ marginBottom: 8 }}>
|
|
176
|
+
Form İlerlemesi
|
|
177
|
+
</AtomicText>
|
|
178
|
+
|
|
179
|
+
<AtomicProgress
|
|
180
|
+
value={percentage}
|
|
181
|
+
height={8}
|
|
182
|
+
color="#6366f1"
|
|
183
|
+
showPercentage
|
|
184
|
+
/>
|
|
185
|
+
|
|
186
|
+
<AtomicText type="bodySmall" color="textTertiary" style={{ marginTop: 8 }}>
|
|
187
|
+
{completedSteps} / {totalSteps} adım tamamlandı
|
|
188
|
+
</AtomicText>
|
|
189
|
+
</View>
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Başarı Durumu
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
export const AchievementProgress = ({ current, target }) => {
|
|
198
|
+
const percentage = Math.min((current / target) * 100, 100);
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<View style={{ padding: 16 }}>
|
|
202
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
203
|
+
<AtomicText type="bodyMedium" fontWeight="600">
|
|
204
|
+
Başarı İlerlemesi
|
|
205
|
+
</AtomicText>
|
|
206
|
+
<AtomicText type="bodyMedium" color="success">
|
|
207
|
+
{current} / {target}
|
|
208
|
+
</AtomicText>
|
|
209
|
+
</View>
|
|
210
|
+
|
|
211
|
+
<AtomicProgress
|
|
212
|
+
value={percentage}
|
|
213
|
+
height={16}
|
|
214
|
+
color="#10b981"
|
|
215
|
+
backgroundColor="#d4edda"
|
|
216
|
+
showPercentage
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### İndirme İlerlemesi
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
export const DownloadProgress = ({ downloaded, total, filename }) => {
|
|
227
|
+
const percentage = (downloaded / total) * 100;
|
|
228
|
+
const downloadedMB = (downloaded / 1024 / 1024).toFixed(2);
|
|
229
|
+
const totalMB = (total / 1024 / 1024).toFixed(2);
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
<View style={{ padding: 16 }}>
|
|
233
|
+
<AtomicText type="bodyMedium" fontWeight="600" style={{ marginBottom: 4 }}>
|
|
234
|
+
{filename}
|
|
235
|
+
</AtomicText>
|
|
236
|
+
|
|
237
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
238
|
+
<AtomicText type="bodySmall" color="textSecondary">
|
|
239
|
+
{downloadedMB} MB / {totalMB} MB
|
|
240
|
+
</AtomicText>
|
|
241
|
+
<AtomicText type="bodySmall" color="primary">
|
|
242
|
+
%{Math.round(percentage)}
|
|
243
|
+
</AtomicText>
|
|
244
|
+
</View>
|
|
245
|
+
|
|
246
|
+
<AtomicProgress
|
|
247
|
+
value={percentage}
|
|
248
|
+
height={6}
|
|
249
|
+
color="#6366f1"
|
|
250
|
+
/>
|
|
251
|
+
</View>
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Okuma İlerlemesi
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
export const ReadingProgress = ({ currentPage, totalPages }) => {
|
|
260
|
+
const percentage = (currentPage / totalPages) * 100;
|
|
261
|
+
|
|
262
|
+
return (
|
|
263
|
+
<View style={{ padding: 16 }}>
|
|
264
|
+
<AtomicText type="labelLarge" color="textSecondary" style={{ marginBottom: 8 }}>
|
|
265
|
+
Okuma İlerlemesi
|
|
266
|
+
</AtomicText>
|
|
267
|
+
|
|
268
|
+
<AtomicProgress
|
|
269
|
+
value={percentage}
|
|
270
|
+
height={8}
|
|
271
|
+
color="#8b5cf6"
|
|
272
|
+
showPercentage
|
|
273
|
+
/>
|
|
274
|
+
|
|
275
|
+
<AtomicText type="bodySmall" color="textTertiary" style={{ marginTop: 8 }}>
|
|
276
|
+
Sayfa {currentPage} / {totalPages}
|
|
277
|
+
</AtomicText>
|
|
278
|
+
</View>
|
|
279
|
+
);
|
|
280
|
+
};
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Video İlerlemesi
|
|
284
|
+
|
|
285
|
+
```tsx
|
|
286
|
+
export const VideoProgress = ({ currentTime, duration }) => {
|
|
287
|
+
const percentage = (currentTime / duration) * 100;
|
|
288
|
+
|
|
289
|
+
const formatTime = (seconds) => {
|
|
290
|
+
const mins = Math.floor(seconds / 60);
|
|
291
|
+
const secs = Math.floor(seconds % 60);
|
|
292
|
+
return `${mins}:${secs.toString().padStart(2, '0')}`;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
return (
|
|
296
|
+
<View style={{ padding: 8 }}>
|
|
297
|
+
<AtomicProgress
|
|
298
|
+
value={percentage}
|
|
299
|
+
height={4}
|
|
300
|
+
color="#ef4444"
|
|
301
|
+
backgroundColor="#374151"
|
|
302
|
+
/>
|
|
303
|
+
|
|
304
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 4 }}>
|
|
305
|
+
<AtomicText type="bodySmall" color="textSecondary">
|
|
306
|
+
{formatTime(currentTime)}
|
|
307
|
+
</AtomicText>
|
|
308
|
+
<AtomicText type="bodySmall" color="textSecondary">
|
|
309
|
+
{formatTime(duration)}
|
|
310
|
+
</AtomicText>
|
|
311
|
+
</View>
|
|
312
|
+
</View>
|
|
313
|
+
);
|
|
314
|
+
};
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Props
|
|
318
|
+
|
|
319
|
+
### AtomicProgressProps
|
|
320
|
+
|
|
321
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
322
|
+
|------|-----|------------|----------|
|
|
323
|
+
| `value` | `number` | - **(Zorunlu)** | İlerleme değeri (0-100) |
|
|
324
|
+
| `height` | `number` | `8` | İlerleme çubuğu yüksekliği |
|
|
325
|
+
| `width` | `number \| string` | `'100%'` | Genişlik |
|
|
326
|
+
| `color` | `string` | - | İlerleme rengi |
|
|
327
|
+
| `backgroundColor` | `string` | - | Arka plan rengi |
|
|
328
|
+
| `shape` | `'rounded' \| 'square'` | `'rounded'` | Şekil |
|
|
329
|
+
| `showPercentage` | `boolean` | `false` | Yüzde göster |
|
|
330
|
+
| `showValue` | `boolean` | `false` | Değer göster |
|
|
331
|
+
| `textColor` | `string` | - | Metin rengi |
|
|
332
|
+
| `style` | `ViewStyle` | - | Özel stil |
|
|
333
|
+
| `testID` | `string` | - | Test ID'si |
|
|
334
|
+
|
|
335
|
+
## Best Practices
|
|
336
|
+
|
|
337
|
+
### 1. Yükseklik Seçimi
|
|
338
|
+
|
|
339
|
+
```tsx
|
|
340
|
+
// İnce
|
|
341
|
+
<AtomicProgress height={4} />
|
|
342
|
+
|
|
343
|
+
// Normal
|
|
344
|
+
<AtomicProgress height={8} />
|
|
345
|
+
|
|
346
|
+
// Kalın
|
|
347
|
+
<AtomicProgress height={16} />
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### 2. Renk Seçimi
|
|
351
|
+
|
|
352
|
+
```tsx
|
|
353
|
+
// Başarı (yeşil)
|
|
354
|
+
<AtomicProgress color="#10b981" />
|
|
355
|
+
|
|
356
|
+
// İlerleme (mavi)
|
|
357
|
+
<AtomicProgress color="#6366f1" />
|
|
358
|
+
|
|
359
|
+
// Uyarı (turuncu)
|
|
360
|
+
<AtomicProgress color="#f59e0b" />
|
|
361
|
+
|
|
362
|
+
// Hata (kırmızı)
|
|
363
|
+
<AtomicProgress color="#ef4444" />
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### 3. Metin Gösterimi
|
|
367
|
+
|
|
368
|
+
```tsx
|
|
369
|
+
// Yüzde
|
|
370
|
+
<AtomicProgress showPercentage height={24} />
|
|
371
|
+
|
|
372
|
+
// Değer
|
|
373
|
+
<AtomicProgress showValue height={24} />
|
|
374
|
+
|
|
375
|
+
// Metinsiz
|
|
376
|
+
<AtomicProgress />
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
## Erişilebilirlik
|
|
380
|
+
|
|
381
|
+
AtomicProgress, tam erişilebilirlik desteği sunar:
|
|
382
|
+
|
|
383
|
+
- ✅ Progress bar role
|
|
384
|
+
- ✅ Accessibility label
|
|
385
|
+
- ✅ Accessibility value (min, max, now)
|
|
386
|
+
- ✅ Screen reader desteği
|
|
387
|
+
|
|
388
|
+
## Performans İpuçları
|
|
389
|
+
|
|
390
|
+
1. **Value Clamping**: Değer otomatik olarak 0-100 arası sınırlanır
|
|
391
|
+
2. **Avoid Re-renders**: `value` prop'unu stabilize edin
|
|
392
|
+
3. **Animation**: İlerleme animasyonu için Animated.Value kullanın
|
|
393
|
+
|
|
394
|
+
## İlgili Bileşenler
|
|
395
|
+
|
|
396
|
+
- [`AtomicSpinner`](./AtomicSpinner/README.md) - Yükleme göstergesi
|
|
397
|
+
- [`AtomicSkeleton`](./skeleton/AtomicSkeleton/README.md) - Skeleton loading
|
|
398
|
+
- [`EmptyState`](./EmptyState/README.md) - Boş durum
|
|
399
|
+
|
|
400
|
+
## Lisans
|
|
401
|
+
|
|
402
|
+
MIT
|