@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,421 +1,263 @@
1
- # AtomicFab
1
+ # AtomicFab (Floating Action Button)
2
2
 
3
- AtomicFab (Floating Action Button), Material Design 3 uyumlu bir yüzen aksiyon butonudur. Ekranın sağ alt köşesinde bulunur ve bir ekrandaki birincil eylemi temsil eder.
3
+ A Material Design 3 floating action button for primary screen actions.
4
4
 
5
- ## Özellikler
5
+ ## Import & Usage
6
6
 
7
- - 🎯 **Primary Action**: Ana eylem için buton
8
- - 📏 **3 Size**: Small (40px), Medium (56px), Large (72px)
9
- - 🎨 **3 Variant**: Primary, Secondary, Surface
10
- - 📍 **Responsive**: Otomatik pozisyonlama
11
- - 🔝 **Safe Area**: Tab bar ve safe area uyumlu
12
- - ♿ **Erişilebilir**: Tam erişilebilirlik desteği
13
-
14
- ## Önemli Not
7
+ ```typescript
8
+ import { AtomicFab } from 'react-native-design-system/src/atoms/AtomicFab';
9
+ ```
15
10
 
16
- ⚠️ **FAB mutlaka ScreenLayout seviyesinde kullanılmalı, ScrollView içinde kullanılmamalıdır!**
11
+ **Location:** `src/atoms/AtomicFab.tsx`
17
12
 
18
- ## Kurulum
13
+ ## Basic Usage
19
14
 
20
15
  ```tsx
21
- import { AtomicFab } from 'react-native-design-system';
16
+ <ScreenLayout>
17
+ <ScrollView>{/* Content */}</ScrollView>
18
+ <AtomicFab icon="add" onPress={handleAdd} />
19
+ </ScreenLayout>
22
20
  ```
23
21
 
24
- ## Temel Kullanım
22
+ ## Strategy
25
23
 
26
- ```tsx
27
- import React from 'react';
28
- import { View, ScrollView } from 'react-native';
29
- import { AtomicFab, ScreenLayout } from 'react-native-design-system';
30
-
31
- export const BasicExample = () => {
32
- const handleAdd = () => {
33
- console.log('Yeni öğe ekle');
34
- };
35
-
36
- return (
37
- <ScreenLayout>
38
- <ScrollView>
39
- {/* İçerik */}
40
- </ScrollView>
41
-
42
- <AtomicFab
43
- icon="add"
44
- onPress={handleAdd}
45
- />
46
- </ScreenLayout>
47
- );
48
- };
49
- ```
24
+ **Purpose**: Promote the primary action on a screen.
50
25
 
51
- ## Variant'lar
26
+ **When to Use**:
27
+ - Primary screen action (add item, create new)
28
+ - Frequently used action
29
+ - Single positive action (create, add, share)
30
+ - Destructive action when it's the only option
52
31
 
53
- ```tsx
54
- <View style={{ gap: 16 }}>
55
- {/* Primary (Varsayılan) */}
56
- <AtomicFab
57
- icon="add"
58
- variant="primary"
59
- onPress={() => {}}
60
- />
61
-
62
- {/* Secondary */}
63
- <AtomicFab
64
- icon="create"
65
- variant="secondary"
66
- onPress={() => {}}
67
- />
68
-
69
- {/* Surface */}
70
- <AtomicFab
71
- icon="share"
72
- variant="surface"
73
- onPress={() => {}}
74
- />
75
- </View>
76
- ```
32
+ **When NOT to Use**:
33
+ - In ScrollView (MUST be at ScreenLayout level)
34
+ - For multiple actions of equal importance
35
+ - For non-primary actions
36
+ - For actions that are context-specific to list items
77
37
 
78
- ## Boyutlar
38
+ ## Rules
79
39
 
80
- ```tsx
81
- <View style={{ gap: 16 }}>
82
- {/* Small */}
83
- <AtomicFab
84
- icon="add"
85
- size="sm"
86
- onPress={() => {}}
87
- />
88
-
89
- {/* Medium (Varsayılan) */}
90
- <AtomicFab
91
- icon="add"
92
- size="md"
93
- onPress={() => {}}
94
- />
95
-
96
- {/* Large */}
97
- <AtomicFab
98
- icon="add"
99
- size="lg"
100
- onPress={() => {}}
101
- />
102
- </View>
103
- ```
40
+ ### Required
104
41
 
105
- ## Disabled State
42
+ 1. **MUST** be at ScreenLayout level (NOT in ScrollView)
43
+ 2. **ALWAYS** provide `icon` and `onPress`
44
+ 3. **SHOULD** use `primary` variant for main action
45
+ 4. **MUST** have accessibility label
46
+ 5. **ALWAYS** use appropriate icon for action
47
+ 6. **SHOULD** be the only FAB on screen
48
+ 7. **MUST** not overlap important content
106
49
 
107
- ```tsx
108
- <AtomicFab
109
- icon="add"
110
- disabled
111
- onPress={() => {}}
112
- />
113
- ```
50
+ ### Positioning
51
+
52
+ 1. **Default**: Bottom-right corner
53
+ 2. **Safe area**: Respects safe area insets
54
+ 3. **Above navigation**: Above tab bar if present
55
+ 4. **Manual**: Can position manually with style
114
56
 
115
- ## Custom Style
57
+ ### Variants
58
+
59
+ 1. **primary**: Main action (default)
60
+ 2. **secondary**: Secondary action
61
+ 3. **surface**: Surface-level action
62
+
63
+ ## Forbidden
64
+
65
+ ❌ **NEVER** do these:
116
66
 
117
67
  ```tsx
68
+ // ❌ FAB in ScrollView
69
+ <ScrollView>
70
+ <Content />
71
+ <AtomicFab icon="add" onPress={handleAdd} /> {/* ❌ Wrong level */}
72
+ </ScrollView>
73
+
74
+ // ❌ Missing accessibility
118
75
  <AtomicFab
119
76
  icon="add"
120
77
  onPress={handleAdd}
121
- style={{
122
- bottom: 100,
123
- right: 20,
124
- }}
78
+ // ❌ No accessibilityLabel
125
79
  />
126
- ```
127
80
 
128
- ## Örnek Kullanımlar
81
+ // Wrong icon for action
82
+ <AtomicFab
83
+ icon="trash" {/* ❌ FAB should be positive action */}
84
+ onPress={handleDelete}
85
+ />
129
86
 
130
- ### Yeni Öğe Ekleme
87
+ // Multiple FABs
88
+ <ScreenLayout>
89
+ <AtomicFab icon="add" onPress={handleAdd} />
90
+ <AtomicFab icon="edit" onPress={handleEdit} /> {/* ❌ Too many */}
91
+ </ScreenLayout>
131
92
 
132
- ```tsx
133
- export const ItemList = () => {
134
- const navigation = useNavigation();
135
-
136
- return (
137
- <ScreenLayout>
138
- <FlatList
139
- data={items}
140
- keyExtractor={(item) => item.id}
141
- renderItem={({ item }) => <ItemCard item={item} />}
142
- />
143
-
144
- <AtomicFab
145
- icon="add"
146
- onPress={() => navigation.navigate('AddItem')}
147
- accessibilityLabel="Yeni öğe ekle"
148
- />
149
- </ScreenLayout>
150
- );
151
- };
93
+ // ❌ Unnecessary variant
94
+ <AtomicFab
95
+ icon="share"
96
+ variant="surface" {/* Should use default primary */}
97
+ onPress={handleShare}
98
+ />
152
99
  ```
153
100
 
154
- ### Mesaj Oluşturma
155
-
156
- ```tsx
157
- export const ChatList = () => {
158
- return (
159
- <ScreenLayout>
160
- <FlatList
161
- data={conversations}
162
- keyExtractor={(item) => item.id}
163
- renderItem={({ item }) => <ConversationCard item={item} />}
164
- />
165
-
166
- <AtomicFab
167
- icon="chatbubble-outline"
168
- onPress={() => console.log('Yeni mesaj')}
169
- accessibilityLabel="Yeni mesaj"
170
- />
171
- </ScreenLayout>
172
- );
173
- };
174
- ```
101
+ ## Best Practices
175
102
 
176
- ### Fotoğraf Çekme
103
+ ### ScreenLayout Level
177
104
 
105
+ ✅ **DO**:
178
106
  ```tsx
179
- export const PhotoGallery = () => {
180
- const handleTakePhoto = () => {
181
- launchCamera();
182
- };
183
-
184
- return (
185
- <ScreenLayout>
186
- <FlatList
187
- data={photos}
188
- numColumns={3}
189
- renderItem={({ item }) => <PhotoItem photo={item} />}
190
- />
191
-
192
- <AtomicFab
193
- icon="camera-outline"
194
- onPress={handleTakePhoto}
195
- accessibilityLabel="Fotoğraf çek"
196
- />
197
- </ScreenLayout>
198
- );
199
- };
107
+ <ScreenLayout>
108
+ <ScrollView>
109
+ <Content />
110
+ </ScrollView>
111
+ <AtomicFab icon="add" onPress={handleAdd} />
112
+ </ScreenLayout>
200
113
  ```
201
114
 
202
- ### Konum Oluşturma
203
-
115
+ **DON'T**:
204
116
  ```tsx
205
- export const MapScreen = () => {
206
- const handleAddLocation = () => {
207
- console.log('Konum ekle');
208
- };
209
-
210
- return (
211
- <ScreenLayout>
212
- <MapView style={{ flex: 1 }} />
213
-
214
- <AtomicFab
215
- icon="location-outline"
216
- variant="secondary"
217
- onPress={handleAddLocation}
218
- accessibilityLabel="Konum ekle"
219
- />
220
- </ScreenLayout>
221
- );
222
- };
117
+ // In ScrollView
118
+ <ScrollView>
119
+ <Content />
120
+ <AtomicFab icon="add" onPress={handleAdd} />
121
+ </ScrollView>
223
122
  ```
224
123
 
225
- ### Arama
124
+ ### Icon Selection
226
125
 
126
+ ✅ **DO**:
227
127
  ```tsx
228
- export const ContactList = () => {
229
- const handleCall = () => {
230
- console.log('Ara');
231
- };
232
-
233
- return (
234
- <ScreenLayout>
235
- <FlatList
236
- data={contacts}
237
- keyExtractor={(item) => item.id}
238
- renderItem={({ item }) => <ContactCard contact={item} />}
239
- />
240
-
241
- <AtomicFab
242
- icon="call-outline"
243
- variant="surface"
244
- onPress={handleCall}
245
- accessibilityLabel="Ara"
246
- />
247
- </ScreenLayout>
248
- );
249
- };
128
+ // Positive, clear actions
129
+ <AtomicFab icon="add" onPress={handleAdd} />
130
+ <AtomicFab icon="create" onPress={handleEdit} />
131
+ <AtomicFab icon="chatbubble" onPress={handleMessage} />
250
132
  ```
251
133
 
252
- ### Farklı Eylemler
253
-
134
+ **DON'T**:
254
135
  ```tsx
255
- export const Dashboard = () => {
256
- return (
257
- <ScreenLayout>
258
- <ScrollView contentContainerStyle={{ padding: 16 }}>
259
- <DashboardCards />
260
- </ScrollView>
261
-
262
- {/* İlk FAB - Ana eylem */}
263
- <AtomicFab
264
- icon="add"
265
- onPress={() => console.log('Ana eylem')}
266
- style={{ right: 80 }}
267
- />
268
-
269
- {/* İkinci FAB - İkincil eylem */}
270
- <AtomicFab
271
- icon="settings-outline"
272
- variant="secondary"
273
- size="sm"
274
- onPress={() => console.log('İkincil eylem')}
275
- />
276
- </ScreenLayout>
277
- );
278
- };
136
+ // Negative actions
137
+ <AtomicFab icon="trash" onPress={handleDelete} />
138
+ <AtomicFab icon="close" onPress={handleClose} />
279
139
  ```
280
140
 
281
- ## Props
282
-
283
- ### AtomicFabProps
284
-
285
- | Prop | Tip | Varsayılan | Açıklama |
286
- |------|-----|------------|----------|
287
- | `icon` | `string` | - **(Zorunlu)** | İkon ismi (Ionicons) |
288
- | `onPress` | `() => void` | - **(Zorunlu)** | Tıklama olayı |
289
- | `variant` | `FabVariant` | `'primary'` | FAB variant'ı |
290
- | `size` | `FabSize` | `'md'` | FAB boyutu |
291
- | `disabled` | `boolean` | `false` | Devre dışı |
292
- | `activeOpacity` | `number` | `0.7` | Tıklama opaklığı |
293
- | `accessibilityLabel` | `string` | - | Erişilebilirlik etiketi |
294
- | `style` | `StyleProp<ViewStyle>` | - | Özel stil |
295
- | `testID` | `string` | - | Test ID'si |
141
+ ### Accessibility
296
142
 
297
- ### FabVariant
298
-
299
- ```typescript
300
- type FabVariant =
301
- | 'primary' // Ana eylem (varsayılan)
302
- | 'secondary' // İkincil eylem
303
- | 'surface'; // Yüzey eylemi
143
+ **DO**:
144
+ ```tsx
145
+ <AtomicFab
146
+ icon="add"
147
+ onPress={handleAdd}
148
+ accessibilityLabel="Add new item"
149
+ />
304
150
  ```
305
151
 
306
- ### FabSize
307
-
308
- ```typescript
309
- type FabSize =
310
- | 'sm' // Small (40px)
311
- | 'md' // Medium (56px, varsayılan)
312
- | 'lg'; // Large (72px)
152
+ **DON'T**:
153
+ ```tsx
154
+ // ❌ No label
155
+ <AtomicFab icon="add" onPress={handleAdd} />
313
156
  ```
314
157
 
315
- ## Best Practices
316
-
317
- ### 1. Doğru Kullanım
318
-
158
+ ## AI Coding Guidelines
159
+
160
+ ### For AI Agents
161
+
162
+ When generating AtomicFab components, follow these rules:
163
+
164
+ 1. **Always place at ScreenLayout level**:
165
+ ```tsx
166
+ // ✅ Good
167
+ <ScreenLayout>
168
+ <ScrollView>{/* Content */}</ScrollView>
169
+ <AtomicFab icon="add" onPress={handleAdd} />
170
+ </ScreenLayout>
171
+
172
+ // ❌ Bad
173
+ <ScrollView>
174
+ <Content />
175
+ <AtomicFab icon="add" onPress={handleAdd} />
176
+ </ScrollView>
177
+ ```
178
+
179
+ 2. **Always use positive actions**:
180
+ ```tsx
181
+ // ✅ Good
182
+ <AtomicFab icon="add" onPress={handleAdd} />
183
+ <AtomicFab icon="create" onPress={handleCreate} />
184
+
185
+ // ❌ Bad
186
+ <AtomicFab icon="trash" onPress={handleDelete} />
187
+ <AtomicFab icon="close" onPress={handleClose} />
188
+ ```
189
+
190
+ 3. **Always provide accessibility label**:
191
+ ```tsx
192
+ // ✅ Good
193
+ <AtomicFab
194
+ icon="add"
195
+ onPress={handleAdd}
196
+ accessibilityLabel="Create new item"
197
+ />
198
+
199
+ // ❌ Bad
200
+ <AtomicFab icon="add" onPress={handleAdd} />
201
+ ```
202
+
203
+ 4. **Never use multiple FABs**:
204
+ ```tsx
205
+ // ❌ Bad - multiple FABs
206
+ <ScreenLayout>
207
+ <AtomicFab icon="add" />
208
+ <AtomicFab icon="edit" />
209
+ </ScreenLayout>
210
+ ```
211
+
212
+ ### Common Patterns
213
+
214
+ #### Basic FAB
319
215
  ```tsx
320
- // ✅ DOĞRU - ScreenLayout seviyesinde
321
216
  <ScreenLayout>
322
- <ScrollView>
323
- {/* İçerik */}
324
- </ScrollView>
217
+ <ScrollView>{/* Content */}</ScrollView>
325
218
  <AtomicFab icon="add" onPress={handleAdd} />
326
219
  </ScreenLayout>
327
-
328
- // ❌ YANLIŞ - ScrollView içinde
329
- <ScrollView>
330
- <AtomicFab icon="add" onPress={handleAdd} />
331
- </ScrollView>
332
220
  ```
333
221
 
334
- ### 2. İkon Seçimi
335
-
222
+ #### With Custom Position
336
223
  ```tsx
337
- // Ekleme işlemi
338
- <AtomicFab icon="add" />
339
-
340
- // Düzenleme
341
- <AtomicFab icon="create" />
342
-
343
- // Mesajlaşma
344
- <AtomicFab icon="chatbubble-outline" />
345
-
346
- // Paylaşım
347
- <AtomicFab icon="share-outline" />
348
-
349
- // Arama
350
- <AtomicFab icon="call-outline" />
224
+ <AtomicFab
225
+ icon="add"
226
+ onPress={handleAdd}
227
+ style={{ bottom: 100 }}
228
+ />
351
229
  ```
352
230
 
353
- ### 3. Variant Seçimi
354
-
355
- ```tsx
356
- // Ana eylem
357
- <AtomicFab variant="primary" icon="add" />
358
-
359
- // İkincil eylem
360
- <AtomicFab variant="secondary" icon="create" />
231
+ ## Props Reference
361
232
 
362
- // Alternatif eylem
363
- <AtomicFab variant="surface" icon="share" />
364
- ```
365
-
366
- ## Erişilebilirlik
233
+ | Prop | Type | Required | Default | Description |
234
+ |------|------|----------|---------|-------------|
235
+ | `icon` | `string` | Yes | - | Icon name (Ionicons) |
236
+ | `onPress` | `() => void` | Yes | - | Press callback |
237
+ | `variant` | `'primary' \| 'secondary' \| 'surface'` | No | `'primary'` | FAB variant |
238
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | `'md'` | FAB size |
239
+ | `disabled` | `boolean` | No | `false` | Disabled state |
240
+ | `accessibilityLabel` | `string` | No | - | Accessibility label |
367
241
 
368
- AtomicFab, tam erişilebilirlik desteği sunar:
242
+ ## Accessibility
369
243
 
370
- - ✅ Touch uygun boyut (minimum 40x40)
371
- - ✅ Screen reader desteği
244
+ - ✅ Touch target size (min 40x40)
245
+ - ✅ Screen reader support
372
246
  - ✅ Accessibility label
373
247
  - ✅ Semantic role (button)
374
- - ✅ Test ID desteği
375
-
376
- ## Performans İpuçları
377
-
378
- 1. **OnPress Stabilization**: `onPress` callback'ini `useCallback` ile sarın
379
- 2. **Avoid Re-renders**: FAB'ı gereksiz yere yeniden render etmeyin
380
- 3. **Single FAB**: Genellikle bir ekranda tek FAB olmalıdır
381
-
382
- ## Material Design 3 Uyumluluğu
383
-
384
- Bu bileşen Material Design 3 spesifikasyonlarına uygun olarak tasarlanmıştır:
385
-
386
- - ✅ Standart boyutlar (40px, 56px, 72px)
387
- - ✅ Variant renkleri
388
- - ✅ Border ile derinlik (gölge yok)
389
- - ✅ Responsive pozisyonlama
390
- - ✅ Safe area desteği
391
-
392
- ## İlgili Bileşenler
393
-
394
- - [`AtomicButton`](./button/README.md) - Normal buton
395
- - [`AtomicIcon`](./AtomicIcon/README.md) - İkon bileşeni
396
- - [`ScreenLayout`](../layouts/ScreenLayout/README.md) - Ekran düzeni
397
-
398
- ## Önemli Bilgiler
399
-
400
- ### FAB Kullanımı
401
248
 
402
- 1. **Birincil Eylem**: FAB, ekrandaki en önemli eylem olmalıdır
403
- 2. **Sınırlı Sayı**: Bir ekranda genellikle tek FAB bulunur
404
- 3. **Pozisyon**: Sağ alt köşededir
405
- 4. **Scroll**: İçerik scroll olduğunda sabit kalır
249
+ ## Performance Tips
406
250
 
407
- ### FAB vs Extended FAB
251
+ 1. **Stabilize onPress**: Use useCallback
252
+ 2. **Single FAB**: Only one per screen
253
+ 3. **Avoid re-renders**: Memo FAB wrapper
408
254
 
409
- Standart FAB (bu bileşen):
410
- - Dairesel şekil
411
- - Sadece ikon
412
- - Compact tasarım
255
+ ## Related Components
413
256
 
414
- Extended FAB (farklı bileşen):
415
- - Dikdörtgen/Pill şekil
416
- - İkon + metin
417
- - Daha fazla yer kaplar
257
+ - [`AtomicButton`](./AtomicButton.README.md) - Regular button
258
+ - [`AtomicIcon`](./AtomicIcon.README.md) - Icon component
259
+ - [`ScreenLayout`](../layouts/ScreenLayout) - Screen layout
418
260
 
419
- ## Lisans
261
+ ## License
420
262
 
421
263
  MIT