@umituz/react-native-design-system 2.6.94 → 2.6.96

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/src/atoms/AtomicAvatar.README.md +284 -397
  3. package/src/atoms/AtomicBadge.README.md +123 -358
  4. package/src/atoms/AtomicCard.README.md +358 -247
  5. package/src/atoms/AtomicDatePicker.README.md +127 -332
  6. package/src/atoms/AtomicFab.README.md +194 -352
  7. package/src/atoms/AtomicIcon.README.md +241 -274
  8. package/src/atoms/AtomicProgress.README.md +100 -338
  9. package/src/atoms/AtomicSpinner.README.md +304 -337
  10. package/src/atoms/AtomicText.README.md +153 -389
  11. package/src/atoms/AtomicTextArea.README.md +267 -268
  12. package/src/atoms/EmptyState.README.md +247 -292
  13. package/src/atoms/GlassView/README.md +313 -444
  14. package/src/atoms/button/README.md +186 -297
  15. package/src/atoms/button/STRATEGY.md +252 -0
  16. package/src/atoms/chip/README.md +242 -290
  17. package/src/atoms/input/README.md +296 -290
  18. package/src/atoms/picker/README.md +278 -309
  19. package/src/atoms/skeleton/AtomicSkeleton.README.md +394 -252
  20. package/src/molecules/BaseModal/README.md +356 -0
  21. package/src/molecules/BaseModal.README.md +324 -200
  22. package/src/molecules/ConfirmationModal.README.md +349 -302
  23. package/src/molecules/Divider/README.md +293 -376
  24. package/src/molecules/FormField.README.md +321 -534
  25. package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
  26. package/src/molecules/GlowingCard/README.md +230 -372
  27. package/src/molecules/List/README.md +281 -488
  28. package/src/molecules/ListItem.README.md +320 -315
  29. package/src/molecules/SearchBar/README.md +332 -430
  30. package/src/molecules/StepHeader/README.md +311 -411
  31. package/src/molecules/StepProgress/README.md +281 -448
  32. package/src/molecules/alerts/README.md +272 -355
  33. package/src/molecules/avatar/README.md +295 -356
  34. package/src/molecules/bottom-sheet/README.md +303 -340
  35. package/src/molecules/calendar/README.md +301 -265
  36. package/src/molecules/countdown/README.md +347 -456
  37. package/src/molecules/emoji/README.md +281 -514
  38. package/src/molecules/listitem/README.md +307 -399
  39. package/src/molecules/media-card/MediaCard.tsx +31 -34
  40. package/src/molecules/media-card/README.md +217 -319
  41. package/src/molecules/navigation/README.md +263 -284
  42. package/src/molecules/navigation/components/NavigationHeader.tsx +77 -0
  43. package/src/molecules/navigation/index.ts +1 -0
  44. package/src/molecules/splash/README.md +76 -80
  45. package/src/molecules/swipe-actions/README.md +376 -588
@@ -1,423 +1,188 @@
1
1
  # AtomicBadge
2
2
 
3
- AtomicBadge, etiketler, durum göstergeleri ve küçük bilgi etiketleri için kullanılan bir rozet bileşenidir.
3
+ A small badge component for status indicators, labels, and tags.
4
4
 
5
- ## Özellikler
5
+ ## Import & Usage
6
6
 
7
- - 🏷️ **6 Variant**: Primary, Secondary, Success, Warning, Error, Info
8
- - 📏 **3 Size**: Small, Medium, Large
9
- - 🎭 **İkon Desteği**: Sol veya sağ ikon
10
- - 🎨 **Semantic Colors**: Anlamlı renkler
11
- - ♿ **Erişilebilir**: Tam erişilebilirlik desteği
12
- - 💪 **React.memo**: Optimize edilmiş render
13
-
14
- ## Kurulum
15
-
16
- ```tsx
17
- import { AtomicBadge } from 'react-native-design-system';
7
+ ```typescript
8
+ import { AtomicBadge } from 'react-native-design-system/src/atoms/AtomicBadge';
18
9
  ```
19
10
 
20
- ## Temel Kullanım
21
-
22
- ```tsx
23
- import React from 'react';
24
- import { View } from 'react-native';
25
- import { AtomicBadge } from 'react-native-design-system';
26
-
27
- export const BasicExample = () => {
28
- return (
29
- <View style={{ padding: 16 }}>
30
- <AtomicBadge text="Badge" />
31
- </View>
32
- );
33
- };
34
- ```
11
+ **Location:** `src/atoms/AtomicBadge.tsx`
35
12
 
36
- ## Variant'lar
13
+ ## Basic Usage
37
14
 
38
15
  ```tsx
39
- <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
40
- <AtomicBadge text="Primary" variant="primary" />
41
- <AtomicBadge text="Secondary" variant="secondary" />
42
- <AtomicBadge text="Success" variant="success" />
43
- <AtomicBadge text="Warning" variant="warning" />
44
- <AtomicBadge text="Error" variant="error" />
45
- <AtomicBadge text="Info" variant="info" />
46
- </View>
16
+ <AtomicBadge text="New" variant="success" />
47
17
  ```
48
18
 
49
- ## Boyutlar
19
+ ## Strategy
50
20
 
51
- ```tsx
52
- <View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
53
- {/* Small */}
54
- <AtomicBadge text="Small" size="sm" variant="primary" />
21
+ **Purpose**: Display status information, categories, or labels in compact form.
55
22
 
56
- {/* Medium (Varsayılan) */}
57
- <AtomicBadge text="Medium" size="md" variant="primary" />
23
+ **When to Use**:
24
+ - Status indicators (active, pending, verified)
25
+ - Category tags (product types, topics)
26
+ - Count badges (notifications, messages)
27
+ - Labels (new, featured, beta)
28
+ - Priority indicators (high, low, urgent)
58
29
 
59
- {/* Large */}
60
- <AtomicBadge text="Large" size="lg" variant="primary" />
61
- </View>
62
- ```
30
+ **When NOT to Use**:
31
+ - For large content blocks
32
+ - As buttons (use button with badge instead)
33
+ - For complex interactions
63
34
 
64
- ## İkonlu Badge
35
+ ## Rules
65
36
 
66
- ```tsx
67
- <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
68
- {/* Sol İkon */}
69
- <AtomicBadge
70
- text="New"
71
- variant="success"
72
- icon="checkmark-circle"
73
- iconPosition="left"
74
- />
75
-
76
- {/* Sağ İkon */}
77
- <AtomicBadge
78
- text="Error"
79
- variant="error"
80
- icon="warning"
81
- iconPosition="right"
82
- />
83
- </View>
84
- ```
37
+ ### Required
85
38
 
86
- ## Örnek Kullanımlar
39
+ 1. **MUST** provide `text` prop
40
+ 2. **ALWAYS** use appropriate variant for meaning
41
+ 3. **SHOULD** use appropriate size for context
42
+ 4. **MUST** have accessible labeling
43
+ 5. **ALWAYS** use semantic colors meaningfully
44
+ 6. **SHOULD** include icons when helpful
87
45
 
88
- ### Durum Rozetleri
46
+ ### Variant Selection
89
47
 
90
- ```tsx
91
- export const StatusBadges = () => {
92
- return (
93
- <View style={{ flexDirection: 'row', gap: 8 }}>
94
- <AtomicBadge text="Aktif" variant="success" icon="checkmark-circle" />
95
- <AtomicBadge text="Beklemede" variant="warning" icon="time" />
96
- <AtomicBadge text="İptal" variant="error" icon="close-circle" />
97
- <AtomicBadge text="Taslak" variant="secondary" icon="document" />
98
- </View>
99
- );
100
- };
101
- ```
102
-
103
- ### Kategori Etiketleri
48
+ 1. **primary**: General labels, categories
49
+ 2. **success**: Positive status (active, verified, complete)
50
+ 3. **warning**: Caution status (pending, review)
51
+ 4. **error**: Negative status (inactive, failed, error)
52
+ 5. **info**: Informational labels
53
+ 6. **secondary**: Neutral labels
104
54
 
105
- ```tsx
106
- export const CategoryBadges = ({ categories }) => {
107
- return (
108
- <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
109
- {categories.map((category) => (
110
- <AtomicBadge
111
- key={category.id}
112
- text={category.name}
113
- variant="primary"
114
- size="sm"
115
- />
116
- ))}
117
- </View>
118
- );
119
- };
120
- ```
55
+ ### Size Guidelines
121
56
 
122
- ### Sürüm Etiketi
57
+ 1. **sm**: Inline text, compact lists
58
+ 2. **md**: Default, most use cases
59
+ 3. **lg**: Emphasis, featured badges
123
60
 
124
- ```tsx
125
- export const VersionBadge = ({ version }) => {
126
- return (
127
- <AtomicBadge
128
- text={`v${version}`}
129
- variant="info"
130
- icon="code-slash"
131
- size="sm"
132
- />
133
- );
134
- };
135
- ```
61
+ ## Forbidden
136
62
 
137
- ### Bildirim Sayısı
63
+ **NEVER** do these:
138
64
 
139
65
  ```tsx
140
- export const NotificationBadge = ({ count }) => {
141
- return (
142
- <View style={{ position: 'relative' }}>
143
- <AtomicIcon name="notifications-outline" size="lg" />
144
-
145
- {count > 0 && (
146
- <View style={{ position: 'absolute', top: -4, right: -4 }}>
147
- <AtomicBadge
148
- text={count > 99 ? '99+' : count.toString()}
149
- variant="error"
150
- size="sm"
151
- />
152
- </View>
153
- )}
154
- </View>
155
- );
156
- };
157
- ```
66
+ // No text
67
+ <AtomicBadge /> {/* ❌ Missing required prop */}
158
68
 
159
- ### Ürün Durumu
69
+ // Wrong variant for meaning
70
+ <AtomicBadge
71
+ text="Error"
72
+ variant="success" {/* ❌ Confusing */}
73
+ />
160
74
 
161
- ```tsx
162
- export const ProductBadges = ({ product }) => {
163
- return (
164
- <View style={{ flexDirection: 'row', gap: 8 }}>
165
- {product.isNew && (
166
- <AtomicBadge
167
- text="Yeni"
168
- variant="success"
169
- icon="sparkles"
170
- size="sm"
171
- />
172
- )}
173
-
174
- {product.isOnSale && (
175
- <AtomicBadge
176
- text="İndirim"
177
- variant="error"
178
- icon="pricetag"
179
- size="sm"
180
- />
181
- )}
182
-
183
- {product.isLimited && (
184
- <AtomicBadge
185
- text="Sınırlı"
186
- variant="warning"
187
- icon="time"
188
- size="sm"
189
- />
190
- )}
191
- </View>
192
- );
193
- };
194
- ```
75
+ // ❌ Too large for context
76
+ <AtomicText>
77
+ This is <AtomicBadge text="NEW" size="lg" /> item {/* ❌ Too large */}
78
+ </AtomicText>
195
79
 
196
- ### Kullanıcı Rolü
197
-
198
- ```tsx
199
- export const RoleBadge = ({ role }) => {
200
- const variants = {
201
- admin: 'error',
202
- moderator: 'warning',
203
- user: 'primary',
204
- guest: 'secondary',
205
- };
206
-
207
- return (
208
- <AtomicBadge
209
- text={role.toUpperCase()}
210
- variant={variants[role]}
211
- size="sm"
212
- />
213
- );
214
- };
80
+ // Generic text
81
+ <AtomicBadge text="Label" /> {/* ❌ Not helpful */}
215
82
  ```
216
83
 
217
- ### Öncelik
218
-
219
- ```tsx
220
- export const PriorityBadge = ({ priority }) => {
221
- const config = {
222
- low: { variant: 'secondary', icon: 'arrow-down' },
223
- medium: { variant: 'info', icon: 'remove' },
224
- high: { variant: 'warning', icon: 'arrow-up' },
225
- urgent: { variant: 'error', icon: 'warning' },
226
- };
227
-
228
- const { variant, icon } = config[priority];
229
-
230
- return (
231
- <AtomicBadge
232
- text={priority.toUpperCase()}
233
- variant={variant}
234
- icon={icon}
235
- size="sm"
236
- />
237
- );
238
- };
239
- ```
84
+ ## Best Practices
240
85
 
241
- ### Fiyat Etiketi
86
+ ### Variant Selection
242
87
 
88
+ ✅ **DO**:
243
89
  ```tsx
244
- export const PriceBadge = ({ price, originalPrice }) => {
245
- const discount = originalPrice
246
- ? Math.round((1 - price / originalPrice) * 100)
247
- : 0;
248
-
249
- return (
250
- <View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
251
- <AtomicText type="titleLarge" fontWeight="700">
252
- ${price}
253
- </AtomicText>
254
-
255
- {discount > 0 && (
256
- <AtomicBadge
257
- text={`%${discount} İndirim`}
258
- variant="error"
259
- icon="pricetag"
260
- size="sm"
261
- />
262
- )}
263
- </View>
264
- );
265
- };
90
+ <AtomicBadge text="Active" variant="success" />
91
+ <AtomicBadge text="Pending" variant="warning" />
92
+ <AtomicBadge text="Inactive" variant="error" />
93
+ <AtomicBadge text="Beta" variant="info" />
266
94
  ```
267
95
 
268
- ### Listede Rozetler
269
-
96
+ **DON'T**:
270
97
  ```tsx
271
- export const ListItemWithBadges = ({ item }) => {
272
- return (
273
- <View style={{ padding: 16 }}>
274
- <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
275
- <View>
276
- <AtomicText type="bodyLarge" fontWeight="600">
277
- {item.title}
278
- </AtomicText>
279
- <AtomicText type="bodySmall" color="textSecondary">
280
- {item.description}
281
- </AtomicText>
282
- </View>
283
-
284
- <View style={{ flexDirection: 'row', gap: 4 }}>
285
- {item.badges.map((badge) => (
286
- <AtomicBadge
287
- key={badge.id}
288
- text={badge.text}
289
- variant={badge.variant}
290
- size="sm"
291
- />
292
- ))}
293
- </View>
294
- </View>
295
- </View>
296
- );
297
- };
98
+ // Confusing variants
99
+ <AtomicBadge text="Success" variant="error" />
298
100
  ```
299
101
 
300
- ### Özellik Rozetleri
102
+ ### With Icons
301
103
 
104
+ ✅ **DO**:
302
105
  ```tsx
303
- export const FeatureBadges = ({ features }) => {
304
- return (
305
- <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
306
- {features.map((feature) => (
307
- <AtomicBadge
308
- key={feature.id}
309
- text={feature.name}
310
- variant="info"
311
- icon={feature.icon}
312
- size="sm"
313
- />
314
- ))}
315
- </View>
316
- );
317
- };
106
+ <AtomicBadge
107
+ text="Verified"
108
+ variant="success"
109
+ icon="checkmark-circle"
110
+ />
318
111
  ```
319
112
 
320
- ## Props
113
+ ## AI Coding Guidelines
321
114
 
322
- ### AtomicBadgeProps
115
+ ### For AI Agents
323
116
 
324
- | Prop | Tip | Varsayılan | Açıklama |
325
- |------|-----|------------|----------|
326
- | `text` | `string` | - **(Zorunlu)** | Rozet metni |
327
- | `variant` | `BadgeVariant` | `'primary'` | Rozet variant'ı |
328
- | `size` | `BadgeSize` | `'md'` | Rozet boyutu |
329
- | `icon` | `IconName` | - | İkon ismi |
330
- | `iconPosition` | `'left' \| 'right'` | `'left'` | İkon konumu |
331
- | `style` | `StyleProp<ViewStyle>` | - | Özel stil |
332
- | `textStyle` | `StyleProp<TextStyle>` | - | Metin stili |
333
- | `testID` | `string` | - | Test ID'si |
117
+ 1. **Always provide text**:
118
+ ```tsx
119
+ // Good
120
+ <AtomicBadge text="New" />
334
121
 
335
- ### BadgeVariant
122
+ // ❌ Bad
123
+ <AtomicBadge />
124
+ ```
336
125
 
337
- ```typescript
338
- type BadgeVariant =
339
- | 'primary' // Ana renk
340
- | 'secondary' // İkincil renk
341
- | 'success' // Başarı rengi
342
- | 'warning' // Uyarı rengi
343
- | 'error' // Hata rengi
344
- | 'info'; // Bilgi rengi
345
- ```
126
+ 2. **Always use appropriate variant**:
127
+ ```tsx
128
+ // Good - meaningful variants
129
+ <AtomicBadge text="Active" variant="success" />
130
+ <AtomicBadge text="Failed" variant="error" />
346
131
 
347
- ### BadgeSize
132
+ // ❌ Bad - confusing variants
133
+ <AtomicBadge text="Error" variant="success" />
134
+ ```
348
135
 
349
- ```typescript
350
- type BadgeSize =
351
- | 'sm' // Small
352
- | 'md' // Medium (varsayılan)
353
- | 'lg'; // Large
354
- ```
136
+ 3. **Always use appropriate size**:
137
+ ```tsx
138
+ // ✅ Good - size matches context
139
+ <AtomicText>
140
+ <AtomicBadge text="New" size="sm" /> Item
141
+ </AtomicText>
355
142
 
356
- ## Best Practices
143
+ // Bad - too large
144
+ <AtomicText>
145
+ <AtomicBadge text="New" size="lg" /> Item
146
+ </AtomicText>
147
+ ```
357
148
 
358
- ### 1. Variant Seçimi
149
+ ### Common Patterns
359
150
 
151
+ #### Status Badge
360
152
  ```tsx
361
- // Başarı durumu
362
- <AtomicBadge variant="success" />
363
-
364
- // Hata durumu
365
- <AtomicBadge variant="error" />
366
-
367
- // Uyarı durumu
368
- <AtomicBadge variant="warning" />
369
-
370
- // Bilgi durumu
371
- <AtomicBadge variant="info" />
153
+ <AtomicBadge text="Active" variant="success" />
372
154
  ```
373
155
 
374
- ### 2. Boyut Seçimi
375
-
156
+ #### With Icon
376
157
  ```tsx
377
- // Yoğun içerik için
378
- <AtomicBadge size="sm" />
379
-
380
- // Normal kullanım
381
- <AtomicBadge size="md" />
382
-
383
- // Vurgu için
384
- <AtomicBadge size="lg" />
158
+ <AtomicBadge
159
+ text="Verified"
160
+ variant="success"
161
+ icon="checkmark-circle"
162
+ />
385
163
  ```
386
164
 
387
- ### 3. İkon Kullanımı
388
-
389
- ```tsx
390
- // Durum göstergeleri
391
- <AtomicBadge icon="checkmark-circle" variant="success" />
392
-
393
- // Kategoriler
394
- <AtomicBadge icon="pricetag" variant="primary" />
395
-
396
- // Uyarılar
397
- <AtomicBadge icon="warning" variant="warning" />
398
- ```
399
-
400
- ## Erişilebilirlik
401
-
402
- AtomicBadge, tam erişilebilirlik desteği sunar:
165
+ ## Props Reference
403
166
 
404
- - Screen reader desteği
405
- - ✅ Semantic renkler
406
- - Touch uygun boyut
407
- - Test ID desteği
167
+ | Prop | Type | Required | Default | Description |
168
+ |------|------|----------|---------|-------------|
169
+ | `text` | `string` | Yes | - | Badge text |
170
+ | `variant` | `BadgeVariant` | No | `'primary'` | Badge variant |
171
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | `'md'` | Badge size |
172
+ | `icon` | `string` | No | - | Icon name |
408
173
 
409
- ## Performans İpuçları
174
+ ## Accessibility
410
175
 
411
- 1. **React.memo**: AtomicBadge zaten optimize edilmiş
412
- 2. **Static Props**: Prop'ları sabit tutun
413
- 3. **Listelerde**: `key` prop'unu kullanmayı unutmayın
176
+ - Screen reader support
177
+ - Semantic colors
178
+ - Touch target size
414
179
 
415
- ## İlgili Bileşenler
180
+ ## Related Components
416
181
 
417
- - [`AtomicChip`](./chip/README.md) - Chip bileşeni
418
- - [`AtomicIcon`](./AtomicIcon/README.md) - İkon bileşeni
419
- - [`AtomicText`](./AtomicText/README.md) - Metin bileşeni
182
+ - [`AtomicChip`](./AtomicChip.README.md) - Interactive chips
183
+ - [`AtomicIcon`](./AtomicIcon.README.md) - Icon component
184
+ - [`AtomicText`](./AtomicText.README.md) - Text component
420
185
 
421
- ## Lisans
186
+ ## License
422
187
 
423
188
  MIT