@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.
- package/package.json +1 -1
- package/src/atoms/AtomicAvatar.README.md +284 -397
- package/src/atoms/AtomicBadge.README.md +123 -358
- package/src/atoms/AtomicCard.README.md +358 -247
- package/src/atoms/AtomicDatePicker.README.md +127 -332
- package/src/atoms/AtomicFab.README.md +194 -352
- package/src/atoms/AtomicIcon.README.md +241 -274
- package/src/atoms/AtomicProgress.README.md +100 -338
- package/src/atoms/AtomicSpinner.README.md +304 -337
- package/src/atoms/AtomicText.README.md +153 -389
- package/src/atoms/AtomicTextArea.README.md +267 -268
- package/src/atoms/EmptyState.README.md +247 -292
- package/src/atoms/GlassView/README.md +313 -444
- package/src/atoms/button/README.md +186 -297
- package/src/atoms/button/STRATEGY.md +252 -0
- package/src/atoms/chip/README.md +242 -290
- package/src/atoms/input/README.md +296 -290
- package/src/atoms/picker/README.md +278 -309
- package/src/atoms/skeleton/AtomicSkeleton.README.md +394 -252
- package/src/molecules/BaseModal/README.md +356 -0
- package/src/molecules/BaseModal.README.md +324 -200
- package/src/molecules/ConfirmationModal.README.md +349 -302
- package/src/molecules/Divider/README.md +293 -376
- package/src/molecules/FormField.README.md +321 -534
- package/src/molecules/GlowingCard/GlowingCard.tsx +1 -1
- package/src/molecules/GlowingCard/README.md +230 -372
- package/src/molecules/List/README.md +281 -488
- package/src/molecules/ListItem.README.md +320 -315
- package/src/molecules/SearchBar/README.md +332 -430
- package/src/molecules/StepHeader/README.md +311 -411
- package/src/molecules/StepProgress/README.md +281 -448
- package/src/molecules/alerts/README.md +272 -355
- package/src/molecules/avatar/README.md +295 -356
- package/src/molecules/bottom-sheet/README.md +303 -340
- package/src/molecules/calendar/README.md +301 -265
- package/src/molecules/countdown/README.md +347 -456
- package/src/molecules/emoji/README.md +281 -514
- package/src/molecules/listitem/README.md +307 -399
- package/src/molecules/media-card/MediaCard.tsx +31 -34
- package/src/molecules/media-card/README.md +217 -319
- package/src/molecules/navigation/README.md +263 -284
- package/src/molecules/navigation/components/NavigationHeader.tsx +77 -0
- package/src/molecules/navigation/index.ts +1 -0
- package/src/molecules/splash/README.md +76 -80
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,470 +1,387 @@
|
|
|
1
1
|
# Divider
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A visual separator component for content sections with support for horizontal, vertical, and text dividers.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 📝 **Text Label**: Metinli ayırıcı
|
|
10
|
-
- 🎯 **4 Spacing**: None, small, medium, large
|
|
11
|
-
- 🎭 **Tema Bilinci**: Design token uyumlu
|
|
12
|
-
- 🌈 **Custom Renk**: Özel renk desteği
|
|
13
|
-
- 📐 **Custom Kalınlık**: Özel kalınlık
|
|
14
|
-
|
|
15
|
-
## Kurulum
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import { Divider } from 'react-native-design-system';
|
|
7
|
+
```typescript
|
|
8
|
+
import { Divider } from 'react-native-design-system/src/molecules/Divider';
|
|
19
9
|
```
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { View } from 'react-native';
|
|
26
|
-
import { Divider } from 'react-native-design-system';
|
|
27
|
-
|
|
28
|
-
export const BasicExample = () => {
|
|
29
|
-
return (
|
|
30
|
-
<View style={{ padding: 16 }}>
|
|
31
|
-
<AtomicText>Bölüm 1</AtomicText>
|
|
32
|
-
<Divider />
|
|
33
|
-
<AtomicText>Bölüm 2</AtomicText>
|
|
34
|
-
</View>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
```
|
|
11
|
+
**Location:** `src/molecules/Divider/Divider.tsx`
|
|
38
12
|
|
|
39
|
-
##
|
|
13
|
+
## Basic Usage
|
|
40
14
|
|
|
41
15
|
```tsx
|
|
42
|
-
{/* Varsayılan yatay */}
|
|
43
16
|
<Divider />
|
|
17
|
+
```
|
|
44
18
|
|
|
45
|
-
|
|
46
|
-
<Divider spacing="large" />
|
|
19
|
+
## Strategy
|
|
47
20
|
|
|
48
|
-
|
|
49
|
-
<Divider color="#6366f1" />
|
|
21
|
+
**Purpose**: Visually separate content sections, organize information, and improve content hierarchy.
|
|
50
22
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
**When to Use**:
|
|
24
|
+
- Between form sections
|
|
25
|
+
- Separating list items
|
|
26
|
+
- Content grouping
|
|
27
|
+
- Visual separation in cards
|
|
28
|
+
- Between related and unrelated items
|
|
29
|
+
- "OR" separators in auth flows
|
|
54
30
|
|
|
55
|
-
|
|
31
|
+
**When NOT to Use**:
|
|
32
|
+
- For decorative purposes only
|
|
33
|
+
- When spacing is sufficient
|
|
34
|
+
- For active interactive elements
|
|
35
|
+
- Too frequently (causes visual clutter)
|
|
56
36
|
|
|
57
|
-
|
|
58
|
-
<View style={{ flexDirection: 'row', height: 100 }}>
|
|
59
|
-
<View style={{ flex: 1, backgroundColor: '#f0f0f0' }} />
|
|
60
|
-
<Divider orientation="vertical" />
|
|
61
|
-
<View style={{ flex: 1, backgroundColor: '#e0e0e0' }} />
|
|
62
|
-
</View>
|
|
63
|
-
```
|
|
37
|
+
## Rules
|
|
64
38
|
|
|
65
|
-
|
|
39
|
+
### Required
|
|
66
40
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
41
|
+
1. **MUST** have semantic purpose (not decorative)
|
|
42
|
+
2. **SHOULD** use appropriate spacing for context
|
|
43
|
+
3. **MUST** maintain consistent thickness
|
|
44
|
+
4. **ALWAYS** use theme colors unless custom color is intentional
|
|
45
|
+
5. **SHOULD** keep spacing minimal and purposeful
|
|
46
|
+
6. **NEVER** use for decorative purposes only
|
|
71
47
|
|
|
72
|
-
|
|
73
|
-
<Divider lineStyle="dashed" />
|
|
48
|
+
### Spacing Guidelines
|
|
74
49
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
50
|
+
1. **None**: Between tightly related items
|
|
51
|
+
2. **Small**: Within content groups (8px)
|
|
52
|
+
3. **Medium**: Default spacing (16px)
|
|
53
|
+
4. **Large**: Between major sections (24px)
|
|
79
54
|
|
|
80
|
-
|
|
55
|
+
### Orientation
|
|
81
56
|
|
|
82
|
-
|
|
83
|
-
|
|
57
|
+
1. **Horizontal**: Most common, between sections
|
|
58
|
+
2. **Vertical**: Between side-by-side content
|
|
59
|
+
3. **Text**: For "OR" separators
|
|
84
60
|
|
|
85
|
-
|
|
61
|
+
### Style Selection
|
|
86
62
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
63
|
+
1. **Solid**: Default, most common
|
|
64
|
+
2. **Dashed**: For emphasis or temporary sections
|
|
65
|
+
3. **Dotted**: For subtle separation
|
|
66
|
+
|
|
67
|
+
## Forbidden
|
|
92
68
|
|
|
93
|
-
|
|
69
|
+
❌ **NEVER** do these:
|
|
94
70
|
|
|
95
71
|
```tsx
|
|
72
|
+
// ❌ Decorative only
|
|
96
73
|
<View>
|
|
97
|
-
|
|
98
|
-
<Divider
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<Divider spacing="small" />
|
|
74
|
+
<Content />
|
|
75
|
+
<Divider /> {/* ❌ No purpose, just decorative */}
|
|
76
|
+
<MoreContent />
|
|
77
|
+
</View>
|
|
102
78
|
|
|
103
|
-
|
|
104
|
-
|
|
79
|
+
// ❌ Too many dividers
|
|
80
|
+
<View>
|
|
81
|
+
<Item1 />
|
|
82
|
+
<Divider />
|
|
83
|
+
<Item2 />
|
|
84
|
+
<Divider />
|
|
85
|
+
<Item3 />
|
|
86
|
+
<Divider />
|
|
87
|
+
<Item4 />
|
|
88
|
+
{/* ❌ Too many, use spacing instead */}
|
|
89
|
+
</View>
|
|
105
90
|
|
|
106
|
-
|
|
91
|
+
// ❌ Inconsistent spacing
|
|
92
|
+
<View>
|
|
93
|
+
<Section1 />
|
|
107
94
|
<Divider spacing="large" />
|
|
95
|
+
<Section2 />
|
|
96
|
+
<Divider spacing="none" /> {/* ❌ Inconsistent */}
|
|
97
|
+
<Section3 />
|
|
108
98
|
</View>
|
|
109
|
-
```
|
|
110
99
|
|
|
111
|
-
|
|
100
|
+
// ❌ Random colors
|
|
101
|
+
<Divider color="#ff00ff" /> {/* ❌ Not theme-compliant */}
|
|
112
102
|
|
|
113
|
-
|
|
114
|
-
<Divider
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/>
|
|
119
|
-
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
103
|
+
// ❌ Too thick
|
|
104
|
+
<Divider thickness={10} /> {/* ❌ Too heavy */}
|
|
105
|
+
|
|
106
|
+
// ❌ Wrong orientation for content
|
|
107
|
+
<View style={{ flexDirection: 'row' }}>
|
|
108
|
+
<Content1 />
|
|
109
|
+
<Divider /> {/* ❌ Should be vertical */}
|
|
110
|
+
<Content2 />
|
|
111
|
+
</View>
|
|
112
|
+
|
|
113
|
+
// ❌ Nested dividers
|
|
114
|
+
<View>
|
|
115
|
+
<Divider />
|
|
116
|
+
<Divider />
|
|
117
|
+
<Divider /> {/* ❌ Multiple dividers, use spacing */}
|
|
118
|
+
</View>
|
|
125
119
|
```
|
|
126
120
|
|
|
127
|
-
##
|
|
121
|
+
## Best Practices
|
|
128
122
|
|
|
129
|
-
### Form
|
|
123
|
+
### Form Sections
|
|
130
124
|
|
|
125
|
+
✅ **DO**:
|
|
131
126
|
```tsx
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<FormField label="Soyad" />
|
|
139
|
-
</View>
|
|
140
|
-
|
|
141
|
-
<Divider spacing="large" />
|
|
142
|
-
|
|
143
|
-
<View>
|
|
144
|
-
<AtomicText type="titleMedium">İletişim Bilgileri</AtomicText>
|
|
145
|
-
<FormField label="E-posta" />
|
|
146
|
-
<FormField label="Telefon" />
|
|
147
|
-
</View>
|
|
148
|
-
|
|
149
|
-
<Divider spacing="large" />
|
|
150
|
-
|
|
151
|
-
<View>
|
|
152
|
-
<AtomicText type="titleMedium">Adres</AtomicText>
|
|
153
|
-
<FormField label="Şehir" />
|
|
154
|
-
<FormField label="Ülke" />
|
|
155
|
-
</View>
|
|
156
|
-
</View>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
```
|
|
127
|
+
<View>
|
|
128
|
+
<View>
|
|
129
|
+
<AtomicText type="titleMedium">Personal Information</AtomicText>
|
|
130
|
+
<FormField label="First Name" />
|
|
131
|
+
<FormField label="Last Name" />
|
|
132
|
+
</View>
|
|
160
133
|
|
|
161
|
-
|
|
134
|
+
<Divider spacing="large" />
|
|
162
135
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<Divider />
|
|
170
|
-
<MenuItem title="Yardım" icon="help-circle-outline" />
|
|
171
|
-
<MenuItem title="Hakkında" icon="information-circle-outline" />
|
|
172
|
-
<Divider spacing="large" />
|
|
173
|
-
<MenuItem title="Çıkış" icon="log-out-outline" variant="danger" />
|
|
174
|
-
</View>
|
|
175
|
-
);
|
|
176
|
-
};
|
|
136
|
+
<View>
|
|
137
|
+
<AtomicText type="titleMedium">Contact Information</AtomicText>
|
|
138
|
+
<FormField label="Email" />
|
|
139
|
+
<FormField label="Phone" />
|
|
140
|
+
</View>
|
|
141
|
+
</View>
|
|
177
142
|
```
|
|
178
143
|
|
|
179
|
-
|
|
180
|
-
|
|
144
|
+
❌ **DON'T**:
|
|
181
145
|
```tsx
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
Alt başlık veya açıklama
|
|
189
|
-
</AtomicText>
|
|
190
|
-
</View>
|
|
191
|
-
|
|
192
|
-
<Divider />
|
|
193
|
-
|
|
194
|
-
<View style={{ padding: 16 }}>
|
|
195
|
-
<AtomicText>İçerik buraya gelir</AtomicText>
|
|
196
|
-
</View>
|
|
197
|
-
|
|
198
|
-
<Divider />
|
|
199
|
-
|
|
200
|
-
<View style={{ padding: 16, flexDirection: 'row', justifyContent: 'flex-end' }}>
|
|
201
|
-
<Button title="İptal" variant="ghost" style={{ marginRight: 8 }} />
|
|
202
|
-
<Button title="Kaydet" />
|
|
203
|
-
</View>
|
|
204
|
-
</AtomicCard>
|
|
205
|
-
);
|
|
206
|
-
};
|
|
146
|
+
// ❌ Dividers between every field
|
|
147
|
+
<FormField label="First Name" />
|
|
148
|
+
<Divider /> {/* ❌ Unnecessary */}
|
|
149
|
+
<FormField label="Last Name" />
|
|
150
|
+
<Divider /> {/* ❌ Unnecessary */}
|
|
151
|
+
<FormField label="Email" />
|
|
207
152
|
```
|
|
208
153
|
|
|
209
|
-
###
|
|
154
|
+
### List Grouping
|
|
210
155
|
|
|
156
|
+
✅ **DO**:
|
|
211
157
|
```tsx
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
<Divider text="VEYA" spacing="large" />
|
|
158
|
+
<View>
|
|
159
|
+
<AtomicText type="labelLarge">Favorites</AtomicText>
|
|
160
|
+
<ListItem title="Item 1" />
|
|
161
|
+
<ListItem title="Item 2" />
|
|
218
162
|
|
|
219
|
-
|
|
220
|
-
<FormField label="Şifre" secureTextEntry />
|
|
163
|
+
<Divider spacing="large" />
|
|
221
164
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
165
|
+
<AtomicText type="labelLarge">Recent</AtomicText>
|
|
166
|
+
<ListItem title="Item 3" />
|
|
167
|
+
<ListItem title="Item 4" />
|
|
168
|
+
</View>
|
|
226
169
|
```
|
|
227
170
|
|
|
228
|
-
###
|
|
171
|
+
### OR Separator
|
|
229
172
|
|
|
173
|
+
✅ **DO**:
|
|
230
174
|
```tsx
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<View>
|
|
234
|
-
{/* Header */}
|
|
235
|
-
<View style={{ flexDirection: 'row', padding: 12 }}>
|
|
236
|
-
<AtomicText style={{ flex: 1, fontWeight: '600' }}>Ad</AtomicText>
|
|
237
|
-
<AtomicText style={{ flex: 1, fontWeight: '600' }}>Soyad</AtomicText>
|
|
238
|
-
<AtomicText style={{ flex: 1, fontWeight: '600' }}>E-posta</AtomicText>
|
|
239
|
-
</View>
|
|
240
|
-
|
|
241
|
-
<Divider thickness={2} />
|
|
242
|
-
|
|
243
|
-
{/* Rows */}
|
|
244
|
-
<View style={{ flexDirection: 'row', padding: 12 }}>
|
|
245
|
-
<AtomicText style={{ flex: 1 }}>Ahmet</AtomicText>
|
|
246
|
-
<AtomicText style={{ flex: 1 }}>Yılmaz</AtomicText>
|
|
247
|
-
<AtomicText style={{ flex: 1 }}>ahmet@example.com</AtomicText>
|
|
248
|
-
</View>
|
|
249
|
-
|
|
250
|
-
<Divider />
|
|
251
|
-
|
|
252
|
-
<View style={{ flexDirection: 'row', padding: 12 }}>
|
|
253
|
-
<AtomicText style={{ flex: 1 }}>Ayşe</AtomicText>
|
|
254
|
-
<AtomicText style={{ flex: 1 }}>Demir</AtomicText>
|
|
255
|
-
<AtomicText style={{ flex: 1 }}>ayse@example.com</AtomicText>
|
|
256
|
-
</View>
|
|
257
|
-
</View>
|
|
258
|
-
);
|
|
259
|
-
};
|
|
260
|
-
```
|
|
175
|
+
<View>
|
|
176
|
+
<SocialLoginButton provider="google" label="Continue with Google" />
|
|
261
177
|
|
|
262
|
-
|
|
178
|
+
<Divider text="OR" spacing="large" />
|
|
263
179
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{ time: '10:00', title: 'Açılış', description: 'Konferans açılışı' },
|
|
269
|
-
{ time: '12:00', title: 'Öğle Arası', description: 'Yemek molası' },
|
|
270
|
-
];
|
|
271
|
-
|
|
272
|
-
return (
|
|
273
|
-
<View style={{ padding: 16 }}>
|
|
274
|
-
{events.map((event, index) => (
|
|
275
|
-
<View key={index}>
|
|
276
|
-
<View style={{ flexDirection: 'row' }}>
|
|
277
|
-
<AtomicText style={{ width: 60 }}>{event.time}</AtomicText>
|
|
278
|
-
<View style={{ flex: 1 }}>
|
|
279
|
-
<AtomicText fontWeight="600">{event.title}</AtomicText>
|
|
280
|
-
<AtomicText type="bodySmall" color="secondary">
|
|
281
|
-
{event.description}
|
|
282
|
-
</AtomicText>
|
|
283
|
-
</View>
|
|
284
|
-
</View>
|
|
285
|
-
|
|
286
|
-
{index < events.length - 1 && (
|
|
287
|
-
<Divider
|
|
288
|
-
orientation="vertical"
|
|
289
|
-
spacing="small"
|
|
290
|
-
style={{ marginLeft: 24 }}
|
|
291
|
-
/>
|
|
292
|
-
)}
|
|
293
|
-
</View>
|
|
294
|
-
))}
|
|
295
|
-
</View>
|
|
296
|
-
);
|
|
297
|
-
};
|
|
180
|
+
<FormField label="Email" />
|
|
181
|
+
<FormField label="Password" />
|
|
182
|
+
<Button title="Sign In" />
|
|
183
|
+
</View>
|
|
298
184
|
```
|
|
299
185
|
|
|
300
|
-
|
|
301
|
-
|
|
186
|
+
❌ **DON'T**:
|
|
302
187
|
```tsx
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
<AtomicText>Sol İçerik</AtomicText>
|
|
308
|
-
</View>
|
|
309
|
-
|
|
310
|
-
<Divider orientation="vertical" thickness={2} color="#6366f1" />
|
|
311
|
-
|
|
312
|
-
<View style={{ flex: 1, padding: 16, backgroundColor: '#e0e0e0' }}>
|
|
313
|
-
<AtomicText>Sağ İçerik</AtomicText>
|
|
314
|
-
</View>
|
|
315
|
-
</View>
|
|
316
|
-
);
|
|
317
|
-
};
|
|
188
|
+
// ❌ Plain divider without context
|
|
189
|
+
<SocialLoginButton provider="google" />
|
|
190
|
+
<Divider /> {/* ❌ Not clear what this separates */}
|
|
191
|
+
<FormField label="Email" />
|
|
318
192
|
```
|
|
319
193
|
|
|
320
|
-
###
|
|
194
|
+
### Spacing Consistency
|
|
321
195
|
|
|
196
|
+
✅ **DO**:
|
|
322
197
|
```tsx
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
items: ['Öğe 1', 'Öğe 2', 'Öğe 3'],
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
title: 'Son Eklenenler',
|
|
331
|
-
items: ['Öğe 4', 'Öğe 5'],
|
|
332
|
-
},
|
|
333
|
-
];
|
|
334
|
-
|
|
335
|
-
return (
|
|
336
|
-
<View>
|
|
337
|
-
{groups.map((group, groupIndex) => (
|
|
338
|
-
<View key={groupIndex}>
|
|
339
|
-
<AtomicText
|
|
340
|
-
type="labelLarge"
|
|
341
|
-
style={{ padding: 16, paddingBottom: 8 }}
|
|
342
|
-
>
|
|
343
|
-
{group.title}
|
|
344
|
-
</AtomicText>
|
|
345
|
-
|
|
346
|
-
{group.items.map((item, itemIndex) => (
|
|
347
|
-
<View key={itemIndex} style={{ padding: 16 }}>
|
|
348
|
-
<AtomicText>{item}</AtomicText>
|
|
349
|
-
</View>
|
|
350
|
-
))}
|
|
351
|
-
|
|
352
|
-
{groupIndex < groups.length - 1 && <Divider spacing="large" />}
|
|
353
|
-
</View>
|
|
354
|
-
))}
|
|
355
|
-
</View>
|
|
356
|
-
);
|
|
357
|
-
};
|
|
198
|
+
// ✅ Consistent spacing
|
|
199
|
+
<Divider spacing="large" />
|
|
200
|
+
<Divider spacing="large" />
|
|
201
|
+
<Divider spacing="large" />
|
|
358
202
|
```
|
|
359
203
|
|
|
360
|
-
|
|
361
|
-
|
|
204
|
+
❌ **DON'T**:
|
|
362
205
|
```tsx
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
<AtomicText>Düzenle</AtomicText>
|
|
368
|
-
</Pressable>
|
|
369
|
-
|
|
370
|
-
<Divider spacing="small" />
|
|
371
|
-
|
|
372
|
-
<Pressable style={{ padding: 16 }}>
|
|
373
|
-
<AtomicText>Sil</AtomicText>
|
|
374
|
-
</Pressable>
|
|
375
|
-
|
|
376
|
-
<Divider text="Diğer İşlemler" />
|
|
377
|
-
|
|
378
|
-
<Pressable style={{ padding: 16 }}>
|
|
379
|
-
<AtomicText>Paylaş</AtomicText>
|
|
380
|
-
</Pressable>
|
|
381
|
-
|
|
382
|
-
<Divider spacing="small" />
|
|
383
|
-
|
|
384
|
-
<Pressable style={{ padding: 16 }}>
|
|
385
|
-
<AtomicText>Bağlantıyı Kopyala</AtomicText>
|
|
386
|
-
</Pressable>
|
|
387
|
-
</View>
|
|
388
|
-
);
|
|
389
|
-
};
|
|
206
|
+
// ❌ Inconsistent spacing
|
|
207
|
+
<Divider spacing="large" />
|
|
208
|
+
<Divider spacing="small" />
|
|
209
|
+
<Divider spacing="medium" />
|
|
390
210
|
```
|
|
391
211
|
|
|
392
|
-
##
|
|
393
|
-
|
|
394
|
-
###
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
212
|
+
## AI Coding Guidelines
|
|
213
|
+
|
|
214
|
+
### For AI Agents
|
|
215
|
+
|
|
216
|
+
When generating Divider components, follow these rules:
|
|
217
|
+
|
|
218
|
+
1. **Always import from correct path**:
|
|
219
|
+
```typescript
|
|
220
|
+
import { Divider } from 'react-native-design-system/src/molecules/Divider';
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
2. **Always have semantic purpose**:
|
|
224
|
+
```tsx
|
|
225
|
+
// ✅ Good - separates form sections
|
|
226
|
+
<View>
|
|
227
|
+
<PersonalInfoSection />
|
|
228
|
+
<Divider spacing="large" />
|
|
229
|
+
<ContactInfoSection />
|
|
230
|
+
</View>
|
|
231
|
+
|
|
232
|
+
// ❌ Bad - decorative only
|
|
233
|
+
<View>
|
|
234
|
+
<Content />
|
|
235
|
+
<Divider /> {/* No semantic purpose */}
|
|
236
|
+
<MoreContent />
|
|
237
|
+
</View>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
3. **Always use appropriate spacing**:
|
|
241
|
+
```tsx
|
|
242
|
+
// ✅ Good - spacing by context
|
|
243
|
+
<Divider spacing="large" /> // Between major sections
|
|
244
|
+
<Divider spacing="small" /> // Within content groups
|
|
245
|
+
<Divider spacing="none" /> // Tightly related items
|
|
246
|
+
|
|
247
|
+
// ❌ Bad - random spacing
|
|
248
|
+
<Divider spacing="large" />
|
|
249
|
+
<Divider spacing="small" />
|
|
250
|
+
<Divider spacing="large" />
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
4. **Always use theme colors unless intentional**:
|
|
254
|
+
```tsx
|
|
255
|
+
// ✅ Good - theme color
|
|
256
|
+
<Divider /> // Uses token.colors.border
|
|
257
|
+
|
|
258
|
+
// ✅ Good - intentional custom color for emphasis
|
|
259
|
+
<Divider color="#6366f1" />
|
|
260
|
+
|
|
261
|
+
// ❌ Bad - random custom color
|
|
262
|
+
<Divider color="#ff00ff" />
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
5. **Always match orientation to layout**:
|
|
266
|
+
```tsx
|
|
267
|
+
// ✅ Good - horizontal for vertical stacks
|
|
268
|
+
<View>
|
|
269
|
+
<Content1 />
|
|
270
|
+
<Divider /> {/* Horizontal */}
|
|
271
|
+
<Content2 />
|
|
272
|
+
</View>
|
|
273
|
+
|
|
274
|
+
// ✅ Good - vertical for horizontal layouts
|
|
275
|
+
<View style={{ flexDirection: 'row' }}>
|
|
276
|
+
<Content1 />
|
|
277
|
+
<Divider orientation="vertical" /> {/* Vertical */}
|
|
278
|
+
<Content2 />
|
|
279
|
+
</View>
|
|
280
|
+
|
|
281
|
+
// ❌ Bad - wrong orientation
|
|
282
|
+
<View style={{ flexDirection: 'row' }}>
|
|
283
|
+
<Content1 />
|
|
284
|
+
<Divider /> {/* Should be vertical */}
|
|
285
|
+
<Content2 />
|
|
286
|
+
</View>
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Common Patterns
|
|
290
|
+
|
|
291
|
+
#### Form Section Separator
|
|
292
|
+
```tsx
|
|
293
|
+
<View>
|
|
294
|
+
<View>
|
|
295
|
+
<AtomicText type="titleMedium">Personal Information</AtomicText>
|
|
296
|
+
<FormField label="First Name" />
|
|
297
|
+
<FormField label="Last Name" />
|
|
298
|
+
</View>
|
|
405
299
|
|
|
406
|
-
|
|
300
|
+
<Divider spacing="large" />
|
|
407
301
|
|
|
408
|
-
|
|
302
|
+
<View>
|
|
303
|
+
<AtomicText type="titleMedium">Contact Information</AtomicText>
|
|
304
|
+
<FormField label="Email" />
|
|
305
|
+
<FormField label="Phone" />
|
|
306
|
+
</View>
|
|
307
|
+
</View>
|
|
308
|
+
```
|
|
409
309
|
|
|
310
|
+
#### List Group Separator
|
|
410
311
|
```tsx
|
|
411
|
-
|
|
412
|
-
<
|
|
312
|
+
<View>
|
|
313
|
+
<AtomicText type="labelLarge">Favorites</AtomicText>
|
|
314
|
+
{favorites.map(item => <ListItem key={item.id} title={item.title} />)}
|
|
413
315
|
|
|
414
|
-
|
|
415
|
-
<Divider orientation="vertical" /> // vertical ✅
|
|
416
|
-
```
|
|
316
|
+
<Divider spacing="large" />
|
|
417
317
|
|
|
418
|
-
|
|
318
|
+
<AtomicText type="labelLarge">Recent</AtomicText>
|
|
319
|
+
{recent.map(item => <ListItem key={item.id} title={item.title} />)}
|
|
320
|
+
</View>
|
|
321
|
+
```
|
|
419
322
|
|
|
323
|
+
#### OR Separator
|
|
420
324
|
```tsx
|
|
421
|
-
|
|
422
|
-
<
|
|
325
|
+
<View>
|
|
326
|
+
<SocialLoginButton provider="google" label="Continue with Google" />
|
|
423
327
|
|
|
424
|
-
|
|
425
|
-
<Divider spacing="large" />
|
|
426
|
-
```
|
|
328
|
+
<Divider text="OR" spacing="large" />
|
|
427
329
|
|
|
428
|
-
|
|
330
|
+
<FormField label="Email" />
|
|
331
|
+
<FormField label="Password" />
|
|
332
|
+
<Button title="Sign In" />
|
|
333
|
+
</View>
|
|
334
|
+
```
|
|
429
335
|
|
|
336
|
+
#### Menu Separator
|
|
430
337
|
```tsx
|
|
431
|
-
|
|
432
|
-
<
|
|
338
|
+
<View>
|
|
339
|
+
<MenuItem title="Profile" icon="person-outline" />
|
|
340
|
+
<MenuItem title="Settings" icon="settings-outline" />
|
|
433
341
|
|
|
434
|
-
|
|
435
|
-
<Divider lineStyle="dashed" thickness={2} />
|
|
436
|
-
```
|
|
342
|
+
<Divider />
|
|
437
343
|
|
|
438
|
-
|
|
344
|
+
<MenuItem title="Help" icon="help-circle-outline" />
|
|
345
|
+
<MenuItem title="About" icon="information-circle-outline" />
|
|
439
346
|
|
|
440
|
-
|
|
441
|
-
// Theme-aware (önerilen)
|
|
442
|
-
<Divider />
|
|
347
|
+
<Divider spacing="large" />
|
|
443
348
|
|
|
444
|
-
|
|
445
|
-
|
|
349
|
+
<MenuItem title="Logout" icon="log-out-outline" variant="danger" />
|
|
350
|
+
</View>
|
|
446
351
|
```
|
|
447
352
|
|
|
448
|
-
##
|
|
353
|
+
## Props Reference
|
|
354
|
+
|
|
355
|
+
| Prop | Type | Required | Default | Description |
|
|
356
|
+
|------|------|----------|---------|-------------|
|
|
357
|
+
| `orientation` | `'horizontal' \| 'vertical'` | No | `'horizontal'` | Divider orientation |
|
|
358
|
+
| `lineStyle` | `'solid' \| 'dashed' \| 'dotted'` | No | `'solid'` | Line style |
|
|
359
|
+
| `spacing` | `'none' \| 'small' \| 'medium' \| 'large'` | No | `'medium'` | Spacing around divider |
|
|
360
|
+
| `color` | `string` | No | `tokens.colors.border` | Line color |
|
|
361
|
+
| `thickness` | `number` | No | `1` | Line thickness |
|
|
362
|
+
| `text` | `string` | No | - | Text label for text divider |
|
|
363
|
+
| `style` | `ViewStyle` | No | - | Custom container style |
|
|
449
364
|
|
|
450
|
-
|
|
365
|
+
## Accessibility
|
|
451
366
|
|
|
452
|
-
- ✅ Screen reader
|
|
453
|
-
- ✅
|
|
454
|
-
- ✅
|
|
367
|
+
- ✅ Screen reader support with semantic role
|
|
368
|
+
- ✅ Visual separator announced
|
|
369
|
+
- ✅ Text divider accessible
|
|
370
|
+
- ✅ Sufficient color contrast
|
|
455
371
|
|
|
456
|
-
##
|
|
372
|
+
## Performance Tips
|
|
457
373
|
|
|
458
|
-
1. **
|
|
459
|
-
2. **Theme
|
|
460
|
-
3. **Minimal**:
|
|
374
|
+
1. **Keep it simple**: Avoid excessive props
|
|
375
|
+
2. **Theme colors**: Use default theme colors
|
|
376
|
+
3. **Minimal usage**: Don't overuse dividers
|
|
377
|
+
4. **Consistency**: Keep styling consistent
|
|
461
378
|
|
|
462
|
-
##
|
|
379
|
+
## Related Components
|
|
463
380
|
|
|
464
|
-
- [`
|
|
465
|
-
- [`AtomicCard`](../../atoms/AtomicCard
|
|
466
|
-
- [`
|
|
381
|
+
- [`ListItem`](../listitem/README.md) - List item component
|
|
382
|
+
- [`AtomicCard`](../../atoms/AtomicCard/README.md) - Card component
|
|
383
|
+
- [`AtomicText`](../../atoms/AtomicText/README.md) - Text component
|
|
467
384
|
|
|
468
|
-
##
|
|
385
|
+
## License
|
|
469
386
|
|
|
470
387
|
MIT
|