@umituz/react-native-design-system 2.6.93 → 2.6.95

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/exports/theme.ts +0 -1
  21. package/src/molecules/BaseModal/README.md +356 -0
  22. package/src/molecules/BaseModal.README.md +324 -200
  23. package/src/molecules/ConfirmationModal.README.md +349 -302
  24. package/src/molecules/Divider/README.md +293 -376
  25. package/src/molecules/FormField.README.md +321 -534
  26. package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
  27. package/src/molecules/GlowingCard/README.md +230 -372
  28. package/src/molecules/IconContainer.tsx +1 -1
  29. package/src/molecules/List/README.md +281 -488
  30. package/src/molecules/ListItem.README.md +320 -315
  31. package/src/molecules/SearchBar/README.md +332 -430
  32. package/src/molecules/StepHeader/README.md +311 -411
  33. package/src/molecules/StepProgress/README.md +281 -448
  34. package/src/molecules/alerts/README.md +272 -355
  35. package/src/molecules/avatar/README.md +295 -356
  36. package/src/molecules/bottom-sheet/README.md +303 -340
  37. package/src/molecules/calendar/README.md +301 -265
  38. package/src/molecules/countdown/README.md +347 -456
  39. package/src/molecules/emoji/README.md +281 -514
  40. package/src/molecules/listitem/README.md +307 -399
  41. package/src/molecules/media-card/MediaCard.tsx +31 -34
  42. package/src/molecules/media-card/README.md +217 -319
  43. package/src/molecules/navigation/README.md +263 -284
  44. package/src/molecules/splash/README.md +76 -92
  45. package/src/molecules/swipe-actions/README.md +376 -588
@@ -1,370 +1,417 @@
1
1
  # ConfirmationModal
2
2
 
3
- ConfirmationModal, kritik işlemlerden önce kullanıcı onayı almak için kullanılan modal bileşenidir. Silme, kaydetme veya önemli değişiklikler için idealdir.
3
+ A modal component for getting user confirmation before critical actions like delete, save, or important changes.
4
4
 
5
- ## Özellikler
5
+ ## Import & Usage
6
6
 
7
- - ✅ **Onay Dialog'u**: Kritik işlemler için onay
8
- - 🎨 **Variant'lar**: Default, Danger, Warning, Info
9
- - 🎭 **İkon Desteği**: Görsel ikon gösterimi
10
- - ⬛ **Backdrop**: Opsiyonel backdrop
11
- - 🎯 **Customizable**: Buton metinleri ve stil
12
- - ♿ **Erişilebilir**: Tam erişilebilirlik desteği
7
+ ```typescript
8
+ import { ConfirmationModal } from 'react-native-design-system/src/molecules/ConfirmationModal';
9
+ ```
10
+
11
+ **Location:** `src/molecules/ConfirmationModal.tsx`
13
12
 
14
- ## Kurulum
13
+ ## Basic Usage
15
14
 
16
15
  ```tsx
17
- import { ConfirmationModal } from 'react-native-design-system';
16
+ const [visible, setVisible] = useState(false);
17
+
18
+ <ConfirmationModal
19
+ visible={visible}
20
+ title="Are you sure?"
21
+ message="This action cannot be undone"
22
+ confirmText="Confirm"
23
+ cancelText="Cancel"
24
+ onConfirm={() => {
25
+ handleAction();
26
+ setVisible(false);
27
+ }}
28
+ onCancel={() => setVisible(false)}
29
+ />
18
30
  ```
19
31
 
20
- ## Temel Kullanım
32
+ ## Strategy
21
33
 
22
- ```tsx
23
- import React, { useState } from 'react';
24
- import { View, Button } from 'react-native';
25
- import { ConfirmationModal } from 'react-native-design-system';
26
-
27
- export const BasicExample = () => {
28
- const [visible, setVisible] = useState(false);
29
-
30
- return (
31
- <View style={{ flex: 1, justifyContent: 'center' }}>
32
- <Button title="Modalı Aç" onPress={() => setVisible(true)} />
33
-
34
- <ConfirmationModal
35
- visible={visible}
36
- title="Emin misiniz?"
37
- message="Bu işlem geri alınamaz"
38
- confirmText="Onayla"
39
- cancelText="İptal"
40
- onConfirm={() => {
41
- console.log('Onaylandı');
42
- setVisible(false);
43
- }}
44
- onCancel={() => setVisible(false)}
45
- />
46
- </View>
47
- );
48
- };
49
- ```
34
+ **Purpose**: Provide a standardized, accessible confirmation dialog for critical and destructive actions.
35
+
36
+ **When to Use**:
37
+ - Deleting items (files, messages, accounts)
38
+ - Destructive operations (cancel subscription, remove data)
39
+ - Unsaved changes warnings
40
+ - Navigation away from forms with unsaved changes
41
+ - Critical settings changes
42
+ - Irreversible actions
43
+
44
+ **When NOT to Use**:
45
+ - For simple alerts (use Alert/toast instead)
46
+ - For non-critical confirmations (use inline confirmation)
47
+ - For information display (use BaseModal instead)
48
+ - For form submissions (use loading state instead)
49
+
50
+ ## Rules
51
+
52
+ ### Required
53
+
54
+ 1. **MUST** have `visible`, `onConfirm`, and `onCancel` props
55
+ 2. **ALWAYS** provide clear `title` and `message`
56
+ 3. **MUST** use appropriate variant for action severity
57
+ 4. **SHOULD** prevent accidental confirmation (consider backdropDismissible=false)
58
+ 5. **MUST** close modal after action
59
+ 6. **ALWAYS** provide specific button text (not just "OK")
60
+ 7. **SHOULD** mention consequence in message
50
61
 
51
- ## Variant'lar
62
+ ### Variant Selection
63
+
64
+ 1. **Danger**: For destructive, irreversible actions (delete, remove)
65
+ 2. **Warning**: For data loss or important changes (unsaved changes, logout)
66
+ 3. **Default/Info**: For non-critical confirmations
67
+
68
+ ### Message Guidelines
69
+
70
+ 1. **Be specific**: Clearly state what will happen
71
+ 2. **Mention consequences**: "This action cannot be undone"
72
+ 3. **Keep concise**: 1-2 sentences max
73
+ 4. **Use plain language**: Avoid technical jargon
74
+
75
+ ### Button Text
76
+
77
+ 1. **Confirm button**: Use action verbs (Delete, Save, Confirm)
78
+ 2. **Cancel button**: Use Cancel, Go Back, Stay
79
+ 3. **Be specific**: "Delete Account" not "OK"
80
+ 4. **Match action**: Button text should match the action
81
+
82
+ ## Forbidden
83
+
84
+ ❌ **NEVER** do these:
52
85
 
53
86
  ```tsx
54
- {/* Default (Info) */}
87
+ // No close mechanism
55
88
  <ConfirmationModal
56
- visible={visible}
57
- variant="default"
58
- title="Bilgilendirme"
59
- message="Devam etmek istiyor musunuz?"
89
+ visible={true}
90
+ title="Confirm"
91
+ // Missing onConfirm and onCancel
92
+ />
93
+
94
+ // ❌ Vague message
95
+ <ConfirmationModal
96
+ title="Are you sure?"
97
+ message="Are you sure?" // ❌ Doesn't say what will happen
60
98
  onConfirm={handleConfirm}
61
99
  onCancel={handleCancel}
62
100
  />
63
101
 
64
- {/* Danger */}
102
+ // Wrong variant
65
103
  <ConfirmationModal
66
- visible={visible}
67
- variant="danger"
68
- title="Öğeyi Sil"
69
- message="Bu öğeyi silmek istediğinizden emin misiniz?"
70
- confirmText="Sil"
71
- cancelText="İptal"
72
- onConfirm={handleDelete}
73
- onCancel={handleCancel}
104
+ variant="default" // ❌ Should be danger for delete
105
+ title="Delete Account"
106
+ message="This cannot be undone"
107
+ onConfirm={deleteAccount}
108
+ onCancel={cancel}
74
109
  />
75
110
 
76
- {/* Warning */}
111
+ // Generic button text
77
112
  <ConfirmationModal
78
- visible={visible}
79
- variant="warning"
80
- title="Uyarı"
81
- message="Bu işlem veri kaybına neden olabilir"
82
- confirmText="Devam Et"
83
- cancelText="Geri Dön"
84
- onConfirm={handleProceed}
85
- onCancel={handleCancel}
113
+ title="Delete Account"
114
+ confirmText="OK" // ❌ Not specific
115
+ cancelText="Cancel"
116
+ onConfirm={deleteAccount}
117
+ onCancel={cancel}
86
118
  />
87
- ```
88
119
 
89
- ## İkonlu
120
+ // ❌ Doesn't close after action
121
+ <ConfirmationModal
122
+ title="Delete Item"
123
+ onConfirm={() => deleteItem()} // ❌ Doesn't close modal
124
+ onCancel={cancel}
125
+ />
90
126
 
91
- ```tsx
127
+ // ❌ No consequence warning
128
+ <ConfirmationModal
129
+ title="Delete Account"
130
+ message="Do you want to delete?" // ❌ Doesn't mention it's permanent
131
+ onConfirm={deleteAccount}
132
+ onCancel={cancel}
133
+ />
134
+
135
+ // ❌ Dismissible critical action
92
136
  <ConfirmationModal
93
- visible={visible}
94
137
  variant="danger"
95
- icon="warning"
96
- title="Dikkat"
97
- message="Bu işlem geri alınamaz"
98
- onConfirm={handleConfirm}
99
- onCancel={handleCancel}
138
+ title="Delete Account"
139
+ backdropDismissible={true} // ❌ Should be false for critical
140
+ onConfirm={deleteAccount}
141
+ onCancel={cancel}
100
142
  />
101
143
  ```
102
144
 
103
- ## Backdrop Gizle
145
+ ## Best Practices
146
+
147
+ ### Delete Confirmation
104
148
 
149
+ ✅ **DO**:
105
150
  ```tsx
106
151
  <ConfirmationModal
107
152
  visible={visible}
108
- showBackdrop={false}
109
- title="Modal"
110
- message="Backdrop yok"
111
- onConfirm={handleConfirm}
112
- onCancel={handleCancel}
153
+ variant="danger"
154
+ icon="trash-outline"
155
+ title="Delete Item"
156
+ message="Are you sure you want to delete '{item.name}'? This action cannot be undone."
157
+ confirmText="Delete"
158
+ cancelText="Cancel"
159
+ onConfirm={() => {
160
+ deleteItem(item.id);
161
+ setVisible(false);
162
+ }}
163
+ onCancel={() => setVisible(false)}
113
164
  />
114
165
  ```
115
166
 
116
- ## Backdrop Dismissible Değil
117
-
167
+ **DON'T**:
118
168
  ```tsx
169
+ // ❌ Vague message, wrong variant
119
170
  <ConfirmationModal
120
171
  visible={visible}
121
- backdropDismissible={false}
122
- title="Onay Gerekli"
123
- message="Lütfen onaylayın"
124
- onConfirm={handleConfirm}
125
- onCancel={handleCancel}
172
+ variant="default"
173
+ title="Delete"
174
+ message="Are you sure?"
175
+ confirmText="OK"
176
+ onConfirm={deleteItem}
177
+ onCancel={cancel}
126
178
  />
127
179
  ```
128
180
 
129
- ## Örnek Kullanımlar
130
-
131
- ### Silme Onayı
132
-
133
- ```tsx
134
- export const DeleteConfirmation = ({ item, onDelete }) => {
135
- const [visible, setVisible] = useState(false);
136
-
137
- return (
138
- <>
139
- <Button title="Sil" onPress={() => setVisible(true)} />
140
-
141
- <ConfirmationModal
142
- visible={visible}
143
- variant="danger"
144
- icon="trash-outline"
145
- title="Öğeyi Sil"
146
- message={`${item.title} öğesini silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.`}
147
- confirmText="Sil"
148
- cancelText="İptal"
149
- onConfirm={() => {
150
- onDelete(item.id);
151
- setVisible(false);
152
- }}
153
- onCancel={() => setVisible(false)}
154
- />
155
- </>
156
- );
157
- };
158
- ```
159
-
160
- ### Çıkış Onayı
161
-
162
- ```tsx
163
- export const LogoutConfirmation = () => {
164
- const [visible, setVisible] = useState(false);
165
-
166
- return (
167
- <>
168
- <Button title="Çıkış Yap" onPress={() => setVisible(true)} />
169
-
170
- <ConfirmationModal
171
- visible={visible}
172
- variant="warning"
173
- icon="log-out-outline"
174
- title="Çıkış Yap"
175
- message="Oturumunuzu sonlandırmak istediğinizden emin misiniz?"
176
- confirmText="Çıkış"
177
- cancelText="İptal"
178
- onConfirm={() => {
179
- logout();
180
- setVisible(false);
181
- }}
182
- onCancel={() => setVisible(false)}
183
- />
184
- </>
185
- );
186
- };
187
- ```
188
-
189
- ### Değişiklik Kaydetme
190
-
191
- ```tsx
192
- export const UnsavedChangesModal = ({ onSave, onDiscard }) => {
193
- const [visible, setVisible] = useState(false);
194
-
195
- return (
196
- <ConfirmationModal
197
- visible={visible}
198
- variant="warning"
199
- icon="save-outline"
200
- title="Kaydedilmemiş Değişiklikler"
201
- message="Yaptığınız değişiklikleri kaydetmediniz. Ne yapmak istersiniz?"
202
- confirmText="Kaydet"
203
- cancelText="İptal"
204
- onConfirm={() => {
205
- onSave();
206
- setVisible(false);
207
- }}
208
- onCancel={() => {
209
- onDiscard();
210
- setVisible(false);
211
- }}
212
- />
213
- );
214
- };
215
- ```
216
-
217
- ### Formu Terk Etme
181
+ ### Unsaved Changes Warning
218
182
 
183
+ ✅ **DO**:
219
184
  ```tsx
220
- export const LeaveFormModal = () => {
221
- return (
222
- <ConfirmationModal
223
- visible={visible}
224
- icon="warning"
225
- title="Formu Terk Et"
226
- message="Girdiğiniz bilgiler kaybolacak. Emin misiniz?"
227
- confirmText="Terk Et"
228
- cancelText="Formda Kal"
229
- onConfirm={() => navigation.goBack()}
230
- onCancel={() => setVisible(false)}
231
- />
232
- );
233
- };
185
+ <ConfirmationModal
186
+ visible={hasUnsavedChanges}
187
+ variant="warning"
188
+ icon="save-outline"
189
+ title="Unsaved Changes"
190
+ message="You have unsaved changes. What would you like to do?"
191
+ confirmText="Save"
192
+ cancelText="Discard"
193
+ onConfirm={() => {
194
+ saveChanges();
195
+ setVisible(false);
196
+ }}
197
+ onCancel={() => {
198
+ discardChanges();
199
+ setVisible(false);
200
+ }}
201
+ />
234
202
  ```
235
203
 
236
- ### İptal Edilebilir İşlem
237
-
204
+ **DON'T**:
238
205
  ```tsx
239
- export const CancelOperationModal = ({ operation }) => {
240
- return (
241
- <ConfirmationModal
242
- visible={visible}
243
- variant="warning"
244
- icon="close-circle-outline"
245
- title="İşlem İptal Edilsin"
246
- message="Bu işlemi iptal etmek istediğinizden emin misiniz?"
247
- confirmText="İptal Et"
248
- cancelText="Devam Et"
249
- onConfirm={() => {
250
- cancelOperation();
251
- setVisible(false);
252
- }}
253
- onCancel={() => setVisible(false)}
254
- />
255
- );
256
- };
206
+ // No clear options
207
+ <ConfirmationModal
208
+ visible={hasUnsavedChanges}
209
+ title="Changes"
210
+ message="You have changes"
211
+ confirmText="OK"
212
+ onConfirm={saveChanges}
213
+ />
257
214
  ```
258
215
 
259
- ### Abonelik İptali
216
+ ### Logout Confirmation
260
217
 
218
+ ✅ **DO**:
261
219
  ```tsx
262
- export const CancelSubscriptionModal = () => {
263
- return (
264
- <ConfirmationModal
265
- visible={visible}
266
- variant="danger"
267
- icon="alert-circle-outline"
268
- title="Aboneliği İptal Et"
269
- message="Aboneliğinizi iptal ederseniz tüm özelliklere erişimi kaybedeceksiniz. Devam etmek istiyor musunuz?"
270
- confirmText="İptal Et"
271
- cancelText="Geri Dön"
272
- onConfirm={handleCancelSubscription}
273
- onCancel={() => setVisible(false)}
274
- />
275
- );
276
- };
220
+ <ConfirmationModal
221
+ visible={showLogout}
222
+ variant="warning"
223
+ icon="log-out-outline"
224
+ title="Log Out"
225
+ message="Are you sure you want to log out of your account?"
226
+ confirmText="Log Out"
227
+ cancelText="Cancel"
228
+ onConfirm={() => {
229
+ logout();
230
+ setShowLogout(false);
231
+ }}
232
+ onCancel={() => setShowLogout(false)}
233
+ />
277
234
  ```
278
235
 
279
- ### Kullanıcı Silme
280
-
236
+ ## AI Coding Guidelines
237
+
238
+ ### For AI Agents
239
+
240
+ When generating ConfirmationModal components, follow these rules:
241
+
242
+ 1. **Always import from correct path**:
243
+ ```typescript
244
+ import { ConfirmationModal } from 'react-native-design-system/src/molecules/ConfirmationModal';
245
+ ```
246
+
247
+ 2. **Always use appropriate variant**:
248
+ ```tsx
249
+ // ✅ Good - variant by severity
250
+ const getVariant = (action) => {
251
+ if (action === 'delete') return 'danger';
252
+ if (action === 'logout') return 'warning';
253
+ return 'default';
254
+ };
255
+
256
+ // ❌ Bad - always default
257
+ <ConfirmationModal variant="default" /> // Even for delete
258
+ ```
259
+
260
+ 3. **Always be specific in message**:
261
+ ```tsx
262
+ // ✅ Good - specific message
263
+ message={`Delete '${item.name}'? This cannot be undone.`}
264
+
265
+ // ❌ Bad - vague message
266
+ message="Are you sure?"
267
+ ```
268
+
269
+ 4. **Always match button text to action**:
270
+ ```tsx
271
+ // ✅ Good - specific button text
272
+ <ConfirmationModal
273
+ confirmText="Delete Account"
274
+ onConfirm={deleteAccount}
275
+ />
276
+
277
+ // ❌ Bad - generic button text
278
+ <ConfirmationModal
279
+ confirmText="OK"
280
+ onConfirm={deleteAccount}
281
+ />
282
+ ```
283
+
284
+ 5. **Always close modal after action**:
285
+ ```tsx
286
+ // ✅ Good - closes after action
287
+ const handleConfirm = () => {
288
+ deleteItem(id);
289
+ setVisible(false);
290
+ };
291
+
292
+ // ❌ Bad - doesn't close
293
+ const handleConfirm = () => {
294
+ deleteItem(id);
295
+ // Modal stays open
296
+ };
297
+ ```
298
+
299
+ ### Common Patterns
300
+
301
+ #### Delete Confirmation
281
302
  ```tsx
282
- export const DeleteAccountModal = () => {
283
- return (
284
- <ConfirmationModal
285
- visible={visible}
286
- variant="danger"
287
- icon="person-remove-outline"
288
- title="Hesabı Sil"
289
- message="Hesabınızı silmek istediğinizden emin misiniz? Tüm verileriniz kalıcı olarak silinecek ve bu işlem geri alınamaz."
290
- confirmText="Hesabı Sil"
291
- cancelText="Vazgeç"
292
- onConfirm={handleDeleteAccount}
293
- onCancel={() => setVisible(false)}
294
- />
295
- );
296
- };
303
+ <ConfirmationModal
304
+ visible={showDelete}
305
+ variant="danger"
306
+ icon="trash-outline"
307
+ title="Delete Item"
308
+ message={`Delete '${item.name}'? This action cannot be undone.`}
309
+ confirmText="Delete"
310
+ cancelText="Cancel"
311
+ onConfirm={() => {
312
+ deleteItem(item.id);
313
+ setShowDelete(false);
314
+ }}
315
+ onCancel={() => setShowDelete(false)}
316
+ />
297
317
  ```
298
318
 
299
- ## Props
300
-
301
- ### ConfirmationModalProps
302
-
303
- | Prop | Tip | Varsayılan | Açıklama |
304
- |------|-----|------------|----------|
305
- | `visible` | `boolean` | - **(Zorunlu)** | Modal görünürlüğü |
306
- | `title` | `string` | - | Modal başlığı |
307
- | `message` | `string` | - | Modal mesajı |
308
- | `variant` | `'default' \| 'danger' \| 'warning' \| 'info'` | `'default'` | Modal variant'ı |
309
- | `confirmText` | `string` | `'Confirm'` | Onay butonu metni |
310
- | `cancelText` | `string` | `'Cancel'` | İptal butonu metni |
311
- | `icon` | `string` | - | İkon ismi |
312
- | `onConfirm` | `() => void` | - | Onay callback'i |
313
- | `onCancel` | `() => void` | - | İptal callback'i |
314
- | `showBackdrop` | `boolean` | `true` | Backdrop göster |
315
- | `backdropDismissible` | `boolean` | `true` | Backdrop tıklama ile kapat |
316
- | `style` | `ViewStyle` | - | Özel stil |
317
- | `testID` | `string` | - | Test ID'si |
318
-
319
- ## Best Practices
320
-
321
- ### 1. Variant Seçimi
322
-
319
+ #### Unsaved Changes
323
320
  ```tsx
324
- // Kritik/Silme işlemleri
325
- variant="danger"
326
-
327
- // Uyarılar
328
- variant="warning"
329
-
330
- // Bilgilendirme
331
- variant="default" veya "info"
321
+ <ConfirmationModal
322
+ visible={hasUnsavedChanges}
323
+ variant="warning"
324
+ icon="warning"
325
+ title="Unsaved Changes"
326
+ message="You have unsaved changes. Do you want to save them?"
327
+ confirmText="Save"
328
+ cancelText="Don't Save"
329
+ onConfirm={() => {
330
+ saveChanges();
331
+ setHasUnsavedChanges(false);
332
+ }}
333
+ onCancel={() => {
334
+ discardChanges();
335
+ setHasUnsavedChanges(false);
336
+ }}
337
+ />
332
338
  ```
333
339
 
334
- ### 2. Açık Mesaj
335
-
340
+ #### Logout Confirmation
336
341
  ```tsx
337
- // İyi
338
- message="Bu öğeyi silmek istediğinizden emin misiniz? Bu işlem geri alınamaz."
339
-
340
- // Kötü
341
- message="Emin misiniz?"
342
+ <ConfirmationModal
343
+ visible={showLogout}
344
+ variant="warning"
345
+ icon="log-out-outline"
346
+ title="Log Out"
347
+ message="Are you sure you want to log out?"
348
+ confirmText="Log Out"
349
+ cancelText="Cancel"
350
+ onConfirm={() => {
351
+ logout();
352
+ setShowLogout(false);
353
+ }}
354
+ onCancel={() => setShowLogout(false)}
355
+ />
342
356
  ```
343
357
 
344
- ### 3. Buton Metinleri
345
-
358
+ #### Critical Action (No Backdrop Dismiss)
346
359
  ```tsx
347
- // Açık ve eylem odaklı
348
- confirmText="Öğeyi Sil"
349
- cancelText="İptal"
360
+ <ConfirmationModal
361
+ visible={showCritical}
362
+ variant="danger"
363
+ backdropDismissible={false} // Prevents accidental dismiss
364
+ title="Delete Account"
365
+ message="This will permanently delete your account and all data. This cannot be undone."
366
+ confirmText="Delete Account"
367
+ cancelText="Cancel"
368
+ onConfirm={() => {
369
+ deleteAccount();
370
+ setShowCritical(false);
371
+ }}
372
+ onCancel={() => setShowCritical(false)}
373
+ />
350
374
  ```
351
375
 
352
- ## Erişilebilirlik
353
-
354
- ConfirmationModal, tam erişilebilirlik desteği sunar:
355
-
356
- - Screen reader desteği
357
- - Focus trap
358
- - Keyboard navigation
359
- - Semantic role
360
- - Escape key desteği
361
-
362
- ## İlgili Bileşenler
363
-
364
- - [`BaseModal`](../BaseModal/README.md) - Base modal
365
- - [`AlertModal`](./alerts/README.md) - Alert modal
366
- - [`AtomicButton`](../../atoms/button/README.md) - Buton bileşeni
367
-
368
- ## Lisans
376
+ ## Props Reference
377
+
378
+ | Prop | Type | Required | Default | Description |
379
+ |------|------|----------|---------|-------------|
380
+ | `visible` | `boolean` | Yes | - | Modal visibility |
381
+ | `onConfirm` | `() => void` | Yes | - | Confirm callback |
382
+ | `onCancel` | `() => void` | Yes | - | Cancel callback |
383
+ | `title` | `string` | No | - | Modal title |
384
+ | `message` | `string` | No | - | Modal message |
385
+ | `variant` | `'default' \| 'danger' \| 'warning' \| 'info'` | No | `'default'` | Visual variant |
386
+ | `confirmText` | `string` | No | `'Confirm'` | Confirm button text |
387
+ | `cancelText` | `string` | No | `'Cancel'` | Cancel button text |
388
+ | `icon` | `string` | No | - | Icon name (Ionicons) |
389
+ | `showBackdrop` | `boolean` | No | `true` | Show backdrop |
390
+ | `backdropDismissible` | `boolean` | No | `true` | Allow backdrop dismiss |
391
+ | `style` | `ViewStyle` | No | - | Custom container style |
392
+
393
+ ## Accessibility
394
+
395
+ - ✅ Screen reader announces title and message
396
+ - ✅ Focus trap within modal
397
+ - ✅ Keyboard navigation (Escape to cancel)
398
+ - ✅ Touch target size maintained (min 44x44pt)
399
+ - ✅ Semantic dialog role
400
+ - ✅ Proper button labeling
401
+
402
+ ## Performance Tips
403
+
404
+ 1. **State management**: Use local state for visibility
405
+ 2. **Cleanup**: Close modal after navigation
406
+ 3. **Memo callbacks**: Use useCallback for handlers
407
+ 4. **Prevent double-tap**: Disable confirm button during action
408
+
409
+ ## Related Components
410
+
411
+ - [`BaseModal`](./BaseModal/README.md) - Base modal component
412
+ - [`AlertModal`](./alerts/README.md) - Alert modal component
413
+ - [`Button`](../atoms/button/README.md) - Button component
414
+
415
+ ## License
369
416
 
370
417
  MIT