@umituz/react-native-design-system 2.6.94 → 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.
- 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/splash/README.md +76 -80
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,448 +1,306 @@
|
|
|
1
1
|
# GlowingCard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A card component with neon-like glowing shadow effect for highlighting important content and creating visual emphasis.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 💡 **Ayarlabilir Yoğunluk**: 0-1 arası yoğunluk
|
|
10
|
-
- 👆 **Pressable**: Tıklanabilir kart desteği
|
|
11
|
-
- 🎯 **Çerçeve**: Renkli çerçeve
|
|
12
|
-
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
13
|
-
|
|
14
|
-
## Kurulum
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { GlowingCard } from 'react-native-design-system';
|
|
7
|
+
```typescript
|
|
8
|
+
import { GlowingCard } from 'react-native-design-system/src/molecules/GlowingCard';
|
|
18
9
|
```
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { View, Text } from 'react-native';
|
|
25
|
-
import { GlowingCard } from 'react-native-design-system';
|
|
26
|
-
|
|
27
|
-
export const BasicExample = () => {
|
|
28
|
-
return (
|
|
29
|
-
<View style={{ padding: 16 }}>
|
|
30
|
-
<GlowingCard>
|
|
31
|
-
<Text style={{ padding: 24 }}>Parlak Kart</Text>
|
|
32
|
-
</GlowingCard>
|
|
33
|
-
</View>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
```
|
|
11
|
+
**Location:** `src/molecules/GlowingCard/GlowingCard.tsx`
|
|
37
12
|
|
|
38
|
-
## Basic
|
|
13
|
+
## Basic Usage
|
|
39
14
|
|
|
40
15
|
```tsx
|
|
41
|
-
<GlowingCard>
|
|
42
|
-
<
|
|
43
|
-
<Text>Varsayılan parlama efekti</Text>
|
|
44
|
-
</View>
|
|
16
|
+
<GlowingCard glowColor="#6366f1" intensity={0.5}>
|
|
17
|
+
<YourContent />
|
|
45
18
|
</GlowingCard>
|
|
46
19
|
```
|
|
47
20
|
|
|
48
|
-
##
|
|
21
|
+
## Strategy
|
|
49
22
|
|
|
50
|
-
|
|
51
|
-
<GlowingCard glowColor="#6366f1">
|
|
52
|
-
<View style={{ padding: 24 }}>
|
|
53
|
-
<Text>İndigo parlama</Text>
|
|
54
|
-
</View>
|
|
55
|
-
</GlowingCard>
|
|
23
|
+
**Purpose**: Create visual emphasis and draw attention to specific content through glowing effects.
|
|
56
24
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
25
|
+
**When to Use**:
|
|
26
|
+
- Featured products or items
|
|
27
|
+
- Premium content highlighting
|
|
28
|
+
- Important announcements
|
|
29
|
+
- Achievement badges
|
|
30
|
+
- Limited-time offers
|
|
31
|
+
- User highlights (verified users, contributors)
|
|
62
32
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```
|
|
33
|
+
**When NOT to Use**:
|
|
34
|
+
- Regular content cards (use AtomicCard instead)
|
|
35
|
+
- Multiple items on same screen (causes visual clutter)
|
|
36
|
+
- Background elements
|
|
37
|
+
- Non-essential content
|
|
69
38
|
|
|
70
|
-
##
|
|
39
|
+
## Rules
|
|
71
40
|
|
|
72
|
-
|
|
73
|
-
<View style={{ gap: 16 }}>
|
|
74
|
-
{/* Hafif parlama */}
|
|
75
|
-
<GlowingCard intensity={0.3}>
|
|
76
|
-
<View style={{ padding: 24 }}>
|
|
77
|
-
<Text>Hafif Parlama</Text>
|
|
78
|
-
</View>
|
|
79
|
-
</GlowingCard>
|
|
41
|
+
### Required
|
|
80
42
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</GlowingCard>
|
|
43
|
+
1. **MUST** provide a `glowColor` prop
|
|
44
|
+
2. **MUST** keep `intensity` between 0.3 and 0.8
|
|
45
|
+
3. **ALWAYS** use sparingly (max 1-2 per screen)
|
|
46
|
+
4. **MUST** ensure sufficient contrast with glow color
|
|
47
|
+
5. **SHOULD** have purpose (highlight featured content)
|
|
87
48
|
|
|
88
|
-
|
|
89
|
-
<GlowingCard intensity={1.0}>
|
|
90
|
-
<View style={{ padding: 24 }}>
|
|
91
|
-
<Text>Tam Parlama</Text>
|
|
92
|
-
</View>
|
|
93
|
-
</GlowingCard>
|
|
94
|
-
</View>
|
|
95
|
-
```
|
|
49
|
+
### Intensity Guidelines
|
|
96
50
|
|
|
97
|
-
|
|
51
|
+
1. **Subtle emphasis**: 0.3 - 0.5
|
|
52
|
+
2. **Medium emphasis**: 0.5 - 0.7
|
|
53
|
+
3. **Strong emphasis**: 0.7 - 0.8
|
|
98
54
|
|
|
99
|
-
|
|
100
|
-
<GlowingCard
|
|
101
|
-
glowColor="#6366f1"
|
|
102
|
-
onPress={() => console.log('Tıklandı!')}
|
|
103
|
-
>
|
|
104
|
-
<View style={{ padding: 24 }}>
|
|
105
|
-
<Text>Tıklanabilir Parlak Kart</Text>
|
|
106
|
-
</View>
|
|
107
|
-
</GlowingCard>
|
|
108
|
-
```
|
|
55
|
+
**Never use intensity > 0.8** (too distracting)
|
|
109
56
|
|
|
110
|
-
|
|
57
|
+
### Color Selection
|
|
111
58
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
intensity={0.8}
|
|
116
|
-
style={{
|
|
117
|
-
padding: 32,
|
|
118
|
-
backgroundColor: '#1e1e1e',
|
|
119
|
-
}}
|
|
120
|
-
>
|
|
121
|
-
<Text style={{ color: '#ffffff' }}>
|
|
122
|
-
Özel Stilli Parlak Kart
|
|
123
|
-
</Text>
|
|
124
|
-
</GlowingCard>
|
|
125
|
-
```
|
|
59
|
+
1. **MUST** use theme colors when possible
|
|
60
|
+
2. **SHOULD** match content purpose
|
|
61
|
+
3. **NEVER** use pure neon colors (#00FF00, #FF00FF, etc.)
|
|
126
62
|
|
|
127
|
-
##
|
|
63
|
+
## Forbidden
|
|
128
64
|
|
|
129
|
-
|
|
65
|
+
❌ **NEVER** do these:
|
|
130
66
|
|
|
131
67
|
```tsx
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 16 }}>
|
|
137
|
-
<AtomicIcon name="star" size="lg" color="#6366f1" />
|
|
138
|
-
<Text style={{ marginLeft: 8, fontWeight: '600' }}>
|
|
139
|
-
Öne Çıkan
|
|
140
|
-
</Text>
|
|
141
|
-
</View>
|
|
142
|
-
|
|
143
|
-
<Text style={{ fontSize: 20, fontWeight: 'bold', marginBottom: 8 }}>
|
|
144
|
-
Özel İçerik
|
|
145
|
-
</Text>
|
|
146
|
-
|
|
147
|
-
<Text style={{ color: 'gray' }}>
|
|
148
|
-
Bu içerik özellikle vurgulanmıştır.
|
|
149
|
-
</Text>
|
|
150
|
-
</View>
|
|
151
|
-
</GlowingCard>
|
|
152
|
-
);
|
|
153
|
-
};
|
|
154
|
-
```
|
|
68
|
+
// ❌ No glow color
|
|
69
|
+
<GlowingCard>
|
|
70
|
+
<Content />
|
|
71
|
+
</GlowingCard>
|
|
155
72
|
|
|
156
|
-
|
|
73
|
+
// ❌ Too high intensity
|
|
74
|
+
<GlowingCard glowColor="#6366f1" intensity={1.0}>
|
|
75
|
+
<Content />
|
|
76
|
+
</GlowingCard>
|
|
157
77
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
>
|
|
166
|
-
<View style={{ padding: 24 }}>
|
|
167
|
-
<View style={{ alignItems: 'center', marginBottom: 16 }}>
|
|
168
|
-
<AtomicIcon name="diamond" size="xl" color="#f59e0b" />
|
|
169
|
-
<Text style={{ marginTop: 8, fontWeight: '600', color: '#f59e0b' }}>
|
|
170
|
-
Premium
|
|
171
|
-
</Text>
|
|
172
|
-
</View>
|
|
173
|
-
|
|
174
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold', textAlign: 'center' }}>
|
|
175
|
-
{product.name}
|
|
176
|
-
</Text>
|
|
177
|
-
|
|
178
|
-
<Text style={{ marginTop: 8, textAlign: 'center', color: 'gray' }}>
|
|
179
|
-
{product.description}
|
|
180
|
-
</Text>
|
|
181
|
-
|
|
182
|
-
<Text style={{ marginTop: 16, fontSize: 24, fontWeight: 'bold', textAlign: 'center' }}>
|
|
183
|
-
${product.price}
|
|
184
|
-
</Text>
|
|
185
|
-
</View>
|
|
186
|
-
</GlowingCard>
|
|
187
|
-
);
|
|
188
|
-
};
|
|
189
|
-
```
|
|
78
|
+
// ❌ Too many glowing cards
|
|
79
|
+
<View>
|
|
80
|
+
<GlowingCard glowColor="#6366f1"><Content1 /></GlowingCard>
|
|
81
|
+
<GlowingCard glowColor="#10b981"><Content2 /></GlowingCard>
|
|
82
|
+
<GlowingCard glowColor="#f59e0b"><Content3 /></GlowingCard>
|
|
83
|
+
{/* ❌ Max 1-2 per screen */}
|
|
84
|
+
</View>
|
|
190
85
|
|
|
191
|
-
|
|
86
|
+
// ❌ Neon colors
|
|
87
|
+
<GlowingCard glowColor="#00FF00" intensity={0.8}>
|
|
88
|
+
<Content />
|
|
89
|
+
</GlowingCard>
|
|
192
90
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
justifyContent: 'center',
|
|
205
|
-
alignItems: 'center',
|
|
206
|
-
marginBottom: 16,
|
|
207
|
-
}}
|
|
208
|
-
>
|
|
209
|
-
<AtomicIcon name="trophy" size="xl" color="#10b981" />
|
|
210
|
-
</View>
|
|
211
|
-
|
|
212
|
-
<Text style={{ fontSize: 20, fontWeight: 'bold', marginBottom: 8 }}>
|
|
213
|
-
Başarı!
|
|
214
|
-
</Text>
|
|
215
|
-
|
|
216
|
-
<Text style={{ textAlign: 'center', color: 'gray' }}>
|
|
217
|
-
{achievement.title}
|
|
218
|
-
</Text>
|
|
219
|
-
|
|
220
|
-
<Text style={{ marginTop: 8, textAlign: 'center', fontSize: 14 }}>
|
|
221
|
-
{achievement.description}
|
|
222
|
-
</Text>
|
|
223
|
-
</View>
|
|
224
|
-
</GlowingCard>
|
|
225
|
-
);
|
|
226
|
-
};
|
|
91
|
+
// ❌ Non-essential content
|
|
92
|
+
<GlowingCard glowColor="#6366f1">
|
|
93
|
+
<RegularContent /> {/* ❌ Use AtomicCard instead */}
|
|
94
|
+
</GlowingCard>
|
|
95
|
+
|
|
96
|
+
// ❌ Nested GlowingCards
|
|
97
|
+
<GlowingCard glowColor="#6366f1">
|
|
98
|
+
<GlowingCard glowColor="#10b981">
|
|
99
|
+
<Content />
|
|
100
|
+
</GlowingCard>
|
|
101
|
+
</GlowingCard>
|
|
227
102
|
```
|
|
228
103
|
|
|
229
|
-
|
|
104
|
+
## Best Practices
|
|
105
|
+
|
|
106
|
+
### Featured Content
|
|
230
107
|
|
|
108
|
+
✅ **DO**:
|
|
231
109
|
```tsx
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
<Text style={{ fontWeight: '600', marginBottom: 4 }}>
|
|
240
|
-
Dikkat
|
|
241
|
-
</Text>
|
|
242
|
-
<Text style={{ fontSize: 14, color: 'gray' }}>
|
|
243
|
-
Bu işlem geri alınamaz. Devam etmek istediğinizden emin misiniz?
|
|
244
|
-
</Text>
|
|
245
|
-
</View>
|
|
246
|
-
</View>
|
|
247
|
-
</View>
|
|
248
|
-
</GlowingCard>
|
|
249
|
-
);
|
|
250
|
-
};
|
|
110
|
+
<GlowingCard
|
|
111
|
+
glowColor={tokens.colors.primary}
|
|
112
|
+
intensity={0.6}
|
|
113
|
+
onPress={() => navigateTo(featuredItem)}
|
|
114
|
+
>
|
|
115
|
+
<FeaturedProductCard product={featuredProduct} />
|
|
116
|
+
</GlowingCard>
|
|
251
117
|
```
|
|
252
118
|
|
|
253
|
-
|
|
254
|
-
|
|
119
|
+
❌ **DON'T**:
|
|
255
120
|
```tsx
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
<View style={{ padding: 24 }}>
|
|
260
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
261
|
-
<AtomicIcon name="close-circle" size="lg" color="#ef4444" />
|
|
262
|
-
<View style={{ marginLeft: 12, flex: 1 }}>
|
|
263
|
-
<Text style={{ fontWeight: '600', marginBottom: 4 }}>
|
|
264
|
-
Hata Oluştu
|
|
265
|
-
</Text>
|
|
266
|
-
<Text style={{ fontSize: 14, color: 'gray' }}>
|
|
267
|
-
{error.message}
|
|
268
|
-
</Text>
|
|
269
|
-
</View>
|
|
270
|
-
</View>
|
|
271
|
-
</View>
|
|
272
|
-
</GlowingCard>
|
|
273
|
-
);
|
|
274
|
-
};
|
|
121
|
+
<GlowingCard glowColor="#ff0000" intensity={0.9}>
|
|
122
|
+
<RegularProduct />
|
|
123
|
+
</GlowingCard>
|
|
275
124
|
```
|
|
276
125
|
|
|
277
|
-
###
|
|
126
|
+
### Achievement Badges
|
|
278
127
|
|
|
128
|
+
✅ **DO**:
|
|
279
129
|
```tsx
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
<Text style={{ fontWeight: '600', marginBottom: 4 }}>
|
|
288
|
-
Bilgi
|
|
289
|
-
</Text>
|
|
290
|
-
<Text style={{ fontSize: 14, color: 'gray' }}>
|
|
291
|
-
Bu özellik premium kullanıcılar için geçerlidir.
|
|
292
|
-
</Text>
|
|
293
|
-
</View>
|
|
294
|
-
</View>
|
|
295
|
-
</View>
|
|
296
|
-
</GlowingCard>
|
|
297
|
-
);
|
|
298
|
-
};
|
|
130
|
+
<GlowingCard
|
|
131
|
+
glowColor="#f59e0b"
|
|
132
|
+
intensity={0.5}
|
|
133
|
+
style={{ width: 120, height: 120 }}
|
|
134
|
+
>
|
|
135
|
+
<AchievementBadge achievement={achievement} />
|
|
136
|
+
</GlowingCard>
|
|
299
137
|
```
|
|
300
138
|
|
|
301
|
-
###
|
|
139
|
+
### User Highlights
|
|
302
140
|
|
|
141
|
+
✅ **DO**:
|
|
303
142
|
```tsx
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
glowColor="#8b5cf6"
|
|
308
|
-
intensity={0.7}
|
|
309
|
-
onPress={() => navigate('Profile', { id: user.id })}
|
|
310
|
-
>
|
|
311
|
-
<View style={{ padding: 24, alignItems: 'center' }}>
|
|
312
|
-
<Image
|
|
313
|
-
source={{ uri: user.avatar }}
|
|
314
|
-
style={{ width: 80, height: 80, borderRadius: 40, marginBottom: 16 }}
|
|
315
|
-
/>
|
|
316
|
-
|
|
317
|
-
<Text style={{ fontSize: 20, fontWeight: 'bold' }}>
|
|
318
|
-
{user.name}
|
|
319
|
-
</Text>
|
|
320
|
-
|
|
321
|
-
<Text style={{ color: 'gray', marginBottom: 16 }}>
|
|
322
|
-
@{user.username}
|
|
323
|
-
</Text>
|
|
324
|
-
|
|
325
|
-
<View style={{ flexDirection: 'row', gap: 24 }}>
|
|
326
|
-
<View style={{ alignItems: 'center' }}>
|
|
327
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
328
|
-
{user.posts}
|
|
329
|
-
</Text>
|
|
330
|
-
<Text style={{ fontSize: 12, color: 'gray' }}>Gönderi</Text>
|
|
331
|
-
</View>
|
|
332
|
-
|
|
333
|
-
<View style={{ alignItems: 'center' }}>
|
|
334
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
335
|
-
{user.followers}
|
|
336
|
-
</Text>
|
|
337
|
-
<Text style={{ fontSize: 12, color: 'gray' }}>Takipçi</Text>
|
|
338
|
-
</View>
|
|
339
|
-
|
|
340
|
-
<View style={{ alignItems: 'center' }}>
|
|
341
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
342
|
-
{user.following}
|
|
343
|
-
</Text>
|
|
344
|
-
<Text style={{ fontSize: 12, color: 'gray' }}>Takip</Text>
|
|
345
|
-
</View>
|
|
346
|
-
</View>
|
|
347
|
-
</View>
|
|
348
|
-
</GlowingCard>
|
|
349
|
-
);
|
|
350
|
-
};
|
|
143
|
+
<GlowingCard glowColor="#8b5cf6" intensity={0.4}>
|
|
144
|
+
<UserHighlight user={verifiedUser} />
|
|
145
|
+
</GlowingCard>
|
|
351
146
|
```
|
|
352
147
|
|
|
353
|
-
|
|
148
|
+
### Color by Purpose
|
|
354
149
|
|
|
355
|
-
|
|
150
|
+
✅ **DO**:
|
|
151
|
+
- Primary actions: Theme primary color
|
|
152
|
+
- Success: Green (#10b981, #22c55e)
|
|
153
|
+
- Warning: Orange/Amber (#f59e0b, #f97316)
|
|
154
|
+
- Error: Red (#ef4444, #dc2626)
|
|
155
|
+
- Info: Blue (#3b82f6, #2563eb)
|
|
356
156
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
| `intensity` | `number` | `1` | Parlama yoğunluğu (0-1) |
|
|
362
|
-
| `onPress` | `(event: GestureResponderEvent) => void` | - | Tıklama olayı |
|
|
363
|
-
| `style` | `StyleProp<ViewStyle>` | - | Özel stil |
|
|
364
|
-
| `testID` | `string` | - | Test ID'si |
|
|
157
|
+
❌ **DON'T**:
|
|
158
|
+
```tsx
|
|
159
|
+
// ❌ Random colors
|
|
160
|
+
<GlowingCard glowColor="#123456" />
|
|
365
161
|
|
|
366
|
-
|
|
162
|
+
// ❌ Too bright
|
|
163
|
+
<GlowingCard glowColor="#00FF00" />
|
|
164
|
+
```
|
|
367
165
|
|
|
166
|
+
## AI Coding Guidelines
|
|
167
|
+
|
|
168
|
+
### For AI Agents
|
|
169
|
+
|
|
170
|
+
When generating GlowingCard components, follow these rules:
|
|
171
|
+
|
|
172
|
+
1. **Always import from correct path**:
|
|
173
|
+
```typescript
|
|
174
|
+
import { GlowingCard } from 'react-native-design-system/src/molecules/GlowingCard';
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
2. **Always specify glowColor**:
|
|
178
|
+
```tsx
|
|
179
|
+
<GlowingCard
|
|
180
|
+
glowColor={根据内容选择合适的颜色}
|
|
181
|
+
intensity={0.5-0.7之间的值}
|
|
182
|
+
>
|
|
183
|
+
{content}
|
|
184
|
+
</GlowingCard>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
3. **Never use without purpose**:
|
|
188
|
+
```tsx
|
|
189
|
+
// ❌ Bad - arbitrary use
|
|
190
|
+
<GlowingCard glowColor="#6366f1">
|
|
191
|
+
<RegularContent />
|
|
192
|
+
</GlowingCard>
|
|
193
|
+
|
|
194
|
+
// ✅ Good - featured content
|
|
195
|
+
{isFeatured && (
|
|
196
|
+
<GlowingCard glowColor="#6366f1" intensity={0.6}>
|
|
197
|
+
<FeaturedContent />
|
|
198
|
+
</GlowingCard>
|
|
199
|
+
)}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
4. **Always limit usage on screen**:
|
|
203
|
+
```tsx
|
|
204
|
+
// ✅ Good - conditional highlighting
|
|
205
|
+
<View>
|
|
206
|
+
{items.map((item, index) =>
|
|
207
|
+
item.isFeatured ? (
|
|
208
|
+
<GlowingCard key={item.id} glowColor="#6366f1" intensity={0.6}>
|
|
209
|
+
<ItemCard item={item} />
|
|
210
|
+
</GlowingCard>
|
|
211
|
+
) : (
|
|
212
|
+
<AtomicCard key={item.id}>
|
|
213
|
+
<ItemCard item={item} />
|
|
214
|
+
</AtomicCard>
|
|
215
|
+
)
|
|
216
|
+
)}
|
|
217
|
+
</View>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
5. **Always use semantic colors**:
|
|
221
|
+
```tsx
|
|
222
|
+
// ✅ Good - color by purpose
|
|
223
|
+
const getGlowColor = (type: 'success' | 'warning' | 'error') => {
|
|
224
|
+
switch (type) {
|
|
225
|
+
case 'success': return '#10b981';
|
|
226
|
+
case 'warning': return '#f59e0b';
|
|
227
|
+
case 'error': return '#ef4444';
|
|
228
|
+
default: return tokens.colors.primary;
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
<GlowingCard glowColor={getGlowColor(type)} />
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Common Patterns
|
|
236
|
+
|
|
237
|
+
#### Featured Product
|
|
368
238
|
```tsx
|
|
369
239
|
<GlowingCard
|
|
370
|
-
glowColor="#
|
|
371
|
-
intensity={0.
|
|
372
|
-
|
|
373
|
-
padding: 32,
|
|
374
|
-
backgroundColor: '#1e1e1e',
|
|
375
|
-
borderWidth: 2,
|
|
376
|
-
}}
|
|
240
|
+
glowColor="#6366f1"
|
|
241
|
+
intensity={0.6}
|
|
242
|
+
onPress={() => navigation.navigate('Product', { productId: product.id })}
|
|
377
243
|
>
|
|
378
|
-
{
|
|
244
|
+
<ProductCard product={product} variant="featured" />
|
|
379
245
|
</GlowingCard>
|
|
380
246
|
```
|
|
381
247
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
### 1. Renk Seçimi
|
|
385
|
-
|
|
248
|
+
#### Achievement Badge
|
|
386
249
|
```tsx
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<GlowingCard glowColor="#ef4444">
|
|
395
|
-
|
|
396
|
-
// Uyarı durumu
|
|
397
|
-
<GlowingCard glowColor="#f59e0b">
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### 2. Yoğunluk
|
|
401
|
-
|
|
402
|
-
```tsx
|
|
403
|
-
// Hafif vurgu
|
|
404
|
-
<GlowingCard intensity={0.3}>
|
|
405
|
-
|
|
406
|
-
// Orta vurgu
|
|
407
|
-
<GlowingCard intensity={0.6}>
|
|
408
|
-
|
|
409
|
-
// Güçlü vurgu
|
|
410
|
-
<GlowingCard intensity={1.0}>
|
|
250
|
+
<GlowingCard
|
|
251
|
+
glowColor="#f59e0b"
|
|
252
|
+
intensity={0.5}
|
|
253
|
+
style={{ margin: 8 }}
|
|
254
|
+
>
|
|
255
|
+
<AchievementBadge achievement={achievement} />
|
|
256
|
+
</GlowingCard>
|
|
411
257
|
```
|
|
412
258
|
|
|
413
|
-
|
|
414
|
-
|
|
259
|
+
#### Notification Card
|
|
415
260
|
```tsx
|
|
416
|
-
// İnteraktif kart
|
|
417
261
|
<GlowingCard
|
|
418
|
-
glowColor=
|
|
419
|
-
|
|
262
|
+
glowColor={notification.urgency === 'high' ? '#ef4444' : '#3b82f6'}
|
|
263
|
+
intensity={notification.urgency === 'high' ? 0.7 : 0.4}
|
|
264
|
+
onPress={() => markAsRead(notification.id)}
|
|
420
265
|
>
|
|
421
|
-
{
|
|
266
|
+
<NotificationCard notification={notification} />
|
|
422
267
|
</GlowingCard>
|
|
423
268
|
```
|
|
424
269
|
|
|
425
|
-
##
|
|
270
|
+
## Props Reference
|
|
271
|
+
|
|
272
|
+
| Prop | Type | Required | Default | Description |
|
|
273
|
+
|------|------|----------|---------|-------------|
|
|
274
|
+
| `glowColor` | `string` | **Yes** | Theme primary color | Glow color (hex) |
|
|
275
|
+
| `intensity` | `number` | No | `0.5` | Glow intensity (0-1) |
|
|
276
|
+
| `borderWidth` | `number` | No | `0` | Border width |
|
|
277
|
+
| `borderColor` | `string` | No | Same as glowColor | Border color |
|
|
278
|
+
| `onPress` | `() => void` | No | - | Press callback |
|
|
279
|
+
| `style` | `ViewStyle` | No | - | Custom container style |
|
|
280
|
+
| `children` | `ReactNode` | **Yes** | - | Card content |
|
|
426
281
|
|
|
427
|
-
|
|
282
|
+
## Accessibility
|
|
428
283
|
|
|
429
|
-
- ✅
|
|
430
|
-
- ✅
|
|
431
|
-
- ✅
|
|
432
|
-
- ✅
|
|
284
|
+
- ✅ Screen reader announces card content
|
|
285
|
+
- ✅ Touch target size maintained (min 44x44pt)
|
|
286
|
+
- ✅ Focus indicators for pressable cards
|
|
287
|
+
- ✅ Sufficient color contrast with glow
|
|
288
|
+
- ✅ Semantic structure preserved
|
|
433
289
|
|
|
434
|
-
##
|
|
290
|
+
## Performance Tips
|
|
435
291
|
|
|
436
|
-
1. **
|
|
437
|
-
2. **
|
|
438
|
-
3. **
|
|
292
|
+
1. **Use sparingly**: Only for highlights (1-2 per screen max)
|
|
293
|
+
2. **Lower intensity**: Better performance with 0.3-0.5
|
|
294
|
+
3. **Avoid animation**: Static glow more performant
|
|
295
|
+
4. **Conditional rendering**: Don't use for every card
|
|
296
|
+
5. **Memo content**: Memo card content to prevent re-renders
|
|
439
297
|
|
|
440
|
-
##
|
|
298
|
+
## Related Components
|
|
441
299
|
|
|
442
|
-
- [`AtomicCard`](../../atoms/AtomicCard
|
|
443
|
-
- [`
|
|
444
|
-
- [`
|
|
300
|
+
- [`AtomicCard`](../../atoms/AtomicCard/README.md) - Base card component
|
|
301
|
+
- [`MediaCard`](../media-card/README.md) - Media card component
|
|
302
|
+
- [`AtomicIcon`](../../atoms/AtomicIcon/README.md) - Icon component
|
|
445
303
|
|
|
446
|
-
##
|
|
304
|
+
## License
|
|
447
305
|
|
|
448
306
|
MIT
|