@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.
- 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/exports/theme.ts +0 -1
- 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/IconContainer.tsx +1 -1
- 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 -92
- package/src/molecules/swipe-actions/README.md +376 -588
|
@@ -1,521 +1,390 @@
|
|
|
1
1
|
# GlassView
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Glassmorphism effect component with Expo BlurView wrapper, automatically adapting to theme mode.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Import & Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 💧 **Blur Efekti**: Bulanık arka plan
|
|
10
|
-
- ⚙️ **Ayarılabilir Yoğunluk**: 0-100 arası
|
|
11
|
-
- 🌓 **Light/Dark Mod**: Otomatik tint
|
|
12
|
-
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
13
|
-
|
|
14
|
-
## Kurulum
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
import { GlassView } from 'react-native-design-system';
|
|
7
|
+
```typescript
|
|
8
|
+
import { GlassView } from 'react-native-design-system/src/atoms/GlassView';
|
|
18
9
|
```
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
**Location:** `src/atoms/GlassView/GlassView.tsx`
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { View, Text, Image } from 'react-native';
|
|
25
|
-
import { GlassView } from 'react-native-design-system';
|
|
26
|
-
|
|
27
|
-
export const BasicExample = () => {
|
|
28
|
-
return (
|
|
29
|
-
<View style={{ flex: 1 }}>
|
|
30
|
-
{/* Arka plan resmi veya içerik */}
|
|
31
|
-
<Image
|
|
32
|
-
source={{ uri: 'https://example.com/image.jpg' }}
|
|
33
|
-
style={{ ...StyleSheet.absoluteFillObject }}
|
|
34
|
-
/>
|
|
35
|
-
|
|
36
|
-
{/* GlassView overlay */}
|
|
37
|
-
<GlassView style={{ flex: 1 }}>
|
|
38
|
-
<Text style={{ padding: 24 }}>
|
|
39
|
-
Glassmorphism Efekti
|
|
40
|
-
</Text>
|
|
41
|
-
</GlassView>
|
|
42
|
-
</View>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Basic Glass Effect
|
|
13
|
+
## Basic Usage
|
|
48
14
|
|
|
49
15
|
```tsx
|
|
50
16
|
<GlassView style={{ padding: 24, borderRadius: 16 }}>
|
|
51
|
-
<Text>
|
|
17
|
+
<Text>Glassmorphism Effect</Text>
|
|
52
18
|
</GlassView>
|
|
53
19
|
```
|
|
54
20
|
|
|
55
|
-
##
|
|
21
|
+
## Strategy
|
|
56
22
|
|
|
57
|
-
|
|
58
|
-
<View style={{ gap: 16 }}>
|
|
59
|
-
{/* Hafif blur */}
|
|
60
|
-
<GlassView intensity={30} style={{ padding: 24 }}>
|
|
61
|
-
<Text>Hafif Blur</Text>
|
|
62
|
-
</GlassView>
|
|
23
|
+
**Purpose**: Provide modern glassmorphism (frosted glass) visual effects for overlays, modals, and navigation elements.
|
|
63
24
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
25
|
+
**When to Use**:
|
|
26
|
+
- Navigation bars (headers, tab bars)
|
|
27
|
+
- Modal overlays
|
|
28
|
+
- Card overlays with background images
|
|
29
|
+
- Floating elements (FAB, popup menus)
|
|
30
|
+
- Bottom sheets
|
|
31
|
+
- Hero sections with background content
|
|
68
32
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
33
|
+
**When NOT to Use**:
|
|
34
|
+
- For solid backgrounds - use View with backgroundColor instead
|
|
35
|
+
- For simple transparency - use opacity instead
|
|
36
|
+
- On solid backgrounds (no blur effect needed)
|
|
37
|
+
- For performance-critical lists (use sparingly)
|
|
73
38
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
### Required
|
|
42
|
+
|
|
43
|
+
1. **ALWAYS** provide `style` prop with dimensions
|
|
44
|
+
2. **MUST** have background content behind to show blur effect
|
|
45
|
+
3. **NEVER** use on solid backgrounds (wastes performance)
|
|
46
|
+
4. **ALWAYS** test on real devices (blur varies by platform)
|
|
47
|
+
5. **MUST** use appropriate `intensity` for context
|
|
48
|
+
|
|
49
|
+
### Intensity Guidelines
|
|
80
50
|
|
|
81
|
-
|
|
51
|
+
1. **10-30**: Subtle blur, content visible
|
|
52
|
+
2. **40-60**: Medium blur, balanced (default: 50)
|
|
53
|
+
3. **70-100**: Strong blur, content-focused
|
|
54
|
+
|
|
55
|
+
### Tint Selection
|
|
56
|
+
|
|
57
|
+
1. **Light**: For light-themed overlays
|
|
58
|
+
2. **Dark**: For dark-themed overlays
|
|
59
|
+
3. **Auto**: Automatically adapts to theme (default)
|
|
60
|
+
|
|
61
|
+
### Performance
|
|
62
|
+
|
|
63
|
+
1. **MUST** limit usage on screen (max 2-3 instances)
|
|
64
|
+
2. **SHOULD** use lower intensity when possible
|
|
65
|
+
3. **ALWAYS** avoid nested GlassView components
|
|
66
|
+
4. **MUST** test on low-end devices
|
|
67
|
+
|
|
68
|
+
## Forbidden
|
|
69
|
+
|
|
70
|
+
❌ **NEVER** do these:
|
|
82
71
|
|
|
83
72
|
```tsx
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
</GlassView>
|
|
73
|
+
// ❌ Without dimensions (won't show anything)
|
|
74
|
+
<GlassView>
|
|
75
|
+
<Text>No size</Text>
|
|
76
|
+
</GlassView>
|
|
89
77
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
// ❌ On solid background (no blur effect)
|
|
79
|
+
<View style={{ backgroundColor: '#fff' }}>
|
|
80
|
+
<GlassView style={{ padding: 24 }}>
|
|
81
|
+
<Text>No background to blur</Text>
|
|
93
82
|
</GlassView>
|
|
83
|
+
</View>
|
|
94
84
|
|
|
95
|
-
|
|
85
|
+
// ❌ Nested glass views (performance killer)
|
|
86
|
+
<GlassView style={{ flex: 1 }}>
|
|
96
87
|
<GlassView style={{ padding: 24 }}>
|
|
97
|
-
<Text>
|
|
88
|
+
<Text>Nested glass</Text>
|
|
98
89
|
</GlassView>
|
|
99
|
-
</
|
|
100
|
-
```
|
|
90
|
+
</GlassView>
|
|
101
91
|
|
|
102
|
-
|
|
92
|
+
// ❌ Too high intensity (performance issue)
|
|
93
|
+
<GlassView intensity={100} style={{ flex: 1 }}>
|
|
94
|
+
{/* Too heavy for full screen */}
|
|
95
|
+
</GlassView>
|
|
103
96
|
|
|
104
|
-
|
|
97
|
+
// ❌ Multiple instances on same screen
|
|
98
|
+
<View>
|
|
99
|
+
<GlassView style={{ position: 'absolute', top: 0 }} />
|
|
100
|
+
<GlassView style={{ position: 'absolute', bottom: 0 }} />
|
|
101
|
+
<GlassView style={{ position: 'absolute', left: 0 }} />
|
|
102
|
+
{/* ❌ Too many */}
|
|
103
|
+
</View>
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
intensity={50}
|
|
111
|
-
style={{
|
|
112
|
-
position: 'absolute',
|
|
113
|
-
top: 0,
|
|
114
|
-
left: 0,
|
|
115
|
-
right: 0,
|
|
116
|
-
height: 60,
|
|
117
|
-
flexDirection: 'row',
|
|
118
|
-
alignItems: 'center',
|
|
119
|
-
justifyContent: 'space-between',
|
|
120
|
-
paddingHorizontal: 16,
|
|
121
|
-
}}
|
|
122
|
-
>
|
|
123
|
-
<Text style={{ fontWeight: 'bold' }}>Logo</Text>
|
|
124
|
-
|
|
125
|
-
<View style={{ flexDirection: 'row', gap: 16 }}>
|
|
126
|
-
<Pressable>
|
|
127
|
-
<AtomicIcon name="home" />
|
|
128
|
-
</Pressable>
|
|
129
|
-
<Pressable>
|
|
130
|
-
<AtomicIcon name="search" />
|
|
131
|
-
</Pressable>
|
|
132
|
-
<Pressable>
|
|
133
|
-
<AtomicIcon name="person" />
|
|
134
|
-
</Pressable>
|
|
135
|
-
</View>
|
|
136
|
-
</GlassView>
|
|
137
|
-
);
|
|
138
|
-
};
|
|
105
|
+
// ❌ Without proper overflow handling
|
|
106
|
+
<GlassView style={{ borderRadius: 16 }}>
|
|
107
|
+
{/* Content overflow breaks blur effect */}
|
|
108
|
+
</GlassView>
|
|
139
109
|
```
|
|
140
110
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
```tsx
|
|
144
|
-
export const GlassModal = ({ visible, onClose }) => {
|
|
145
|
-
return (
|
|
146
|
-
<Modal visible={visible} transparent animationType="fade">
|
|
147
|
-
<GlassView
|
|
148
|
-
intensity={80}
|
|
149
|
-
tint="dark"
|
|
150
|
-
style={{
|
|
151
|
-
flex: 1,
|
|
152
|
-
justifyContent: 'center',
|
|
153
|
-
alignItems: 'center',
|
|
154
|
-
padding: 24,
|
|
155
|
-
}}
|
|
156
|
-
>
|
|
157
|
-
<View
|
|
158
|
-
style={{
|
|
159
|
-
backgroundColor: '#fff',
|
|
160
|
-
borderRadius: 16,
|
|
161
|
-
padding: 24,
|
|
162
|
-
width: '100%',
|
|
163
|
-
}}
|
|
164
|
-
>
|
|
165
|
-
<Text style={{ fontSize: 20, fontWeight: 'bold', marginBottom: 16 }}>
|
|
166
|
-
Modal Başlığı
|
|
167
|
-
</Text>
|
|
168
|
-
|
|
169
|
-
<Text style={{ marginBottom: 24 }}>
|
|
170
|
-
Modal içeriği buraya gelecek.
|
|
171
|
-
</Text>
|
|
172
|
-
|
|
173
|
-
<Button title="Kapat" onPress={onClose} />
|
|
174
|
-
</View>
|
|
175
|
-
</GlassView>
|
|
176
|
-
</Modal>
|
|
177
|
-
);
|
|
178
|
-
};
|
|
179
|
-
```
|
|
111
|
+
## Best Practices
|
|
180
112
|
|
|
181
|
-
###
|
|
113
|
+
### Intensity Selection
|
|
182
114
|
|
|
115
|
+
✅ **DO**:
|
|
183
116
|
```tsx
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<View style={{ borderRadius: 16, overflow: 'hidden', height: 200 }}>
|
|
187
|
-
{/* Arka plan resmi */}
|
|
188
|
-
<Image
|
|
189
|
-
source={{ uri: image }}
|
|
190
|
-
style={{ ...StyleSheet.absoluteFillObject }}
|
|
191
|
-
resizeMode="cover"
|
|
192
|
-
/>
|
|
193
|
-
|
|
194
|
-
{/* Glass overlay */}
|
|
195
|
-
<GlassView
|
|
196
|
-
intensity={60}
|
|
197
|
-
style={{
|
|
198
|
-
position: 'absolute',
|
|
199
|
-
bottom: 0,
|
|
200
|
-
left: 0,
|
|
201
|
-
right: 0,
|
|
202
|
-
padding: 16,
|
|
203
|
-
}}
|
|
204
|
-
>
|
|
205
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold', color: '#fff' }}>
|
|
206
|
-
{title}
|
|
207
|
-
</Text>
|
|
208
|
-
|
|
209
|
-
<Text style={{ color: 'rgba(255, 255, 255, 0.8)', marginTop: 4 }}>
|
|
210
|
-
{description}
|
|
211
|
-
</Text>
|
|
212
|
-
</GlassView>
|
|
213
|
-
</View>
|
|
214
|
-
);
|
|
215
|
-
};
|
|
216
|
-
```
|
|
117
|
+
// Subtle blur - navigation bars
|
|
118
|
+
<GlassView intensity={30} style={{ height: 60 }} />
|
|
217
119
|
|
|
218
|
-
|
|
120
|
+
// Medium blur - modals, cards
|
|
121
|
+
<GlassView intensity={50} style={{ padding: 24 }} />
|
|
219
122
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return (
|
|
223
|
-
<GlassView
|
|
224
|
-
intensity={50}
|
|
225
|
-
style={{
|
|
226
|
-
position: 'absolute',
|
|
227
|
-
bottom: 0,
|
|
228
|
-
left: 0,
|
|
229
|
-
right: 0,
|
|
230
|
-
height: 60,
|
|
231
|
-
flexDirection: 'row',
|
|
232
|
-
borderTopWidth: 1,
|
|
233
|
-
borderTopColor: 'rgba(255, 255, 255, 0.1)',
|
|
234
|
-
}}
|
|
235
|
-
>
|
|
236
|
-
{state.routes.map((route, index) => {
|
|
237
|
-
const { options } = descriptors[route.key];
|
|
238
|
-
const label = options.tabBarLabel !== undefined
|
|
239
|
-
? options.tabBarLabel
|
|
240
|
-
: route.name;
|
|
241
|
-
|
|
242
|
-
const isFocused = state.index === index;
|
|
243
|
-
|
|
244
|
-
const onPress = () => {
|
|
245
|
-
const event = navigation.emit({
|
|
246
|
-
type: 'tabPress',
|
|
247
|
-
target: route.key,
|
|
248
|
-
canPreventDefault: true,
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
if (!isFocused && !event.defaultPrevented) {
|
|
252
|
-
navigation.navigate(route.name);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
return (
|
|
257
|
-
<Pressable
|
|
258
|
-
key={route.key}
|
|
259
|
-
onPress={onPress}
|
|
260
|
-
style={{
|
|
261
|
-
flex: 1,
|
|
262
|
-
justifyContent: 'center',
|
|
263
|
-
alignItems: 'center',
|
|
264
|
-
opacity: isFocused ? 1 : 0.6,
|
|
265
|
-
}}
|
|
266
|
-
>
|
|
267
|
-
<AtomicIcon
|
|
268
|
-
name={options.tabBarIcon || 'circle'}
|
|
269
|
-
color={isFocused ? 'primary' : 'textSecondary'}
|
|
270
|
-
/>
|
|
271
|
-
<Text style={{ fontSize: 12, marginTop: 4 }}>
|
|
272
|
-
{label}
|
|
273
|
-
</Text>
|
|
274
|
-
</Pressable>
|
|
275
|
-
);
|
|
276
|
-
})}
|
|
277
|
-
</GlassView>
|
|
278
|
-
);
|
|
279
|
-
};
|
|
123
|
+
// Strong blur - focused content
|
|
124
|
+
<GlassView intensity={80} style={{ padding: 32 }} />
|
|
280
125
|
```
|
|
281
126
|
|
|
282
|
-
|
|
283
|
-
|
|
127
|
+
❌ **DON'T**:
|
|
284
128
|
```tsx
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
<GlassView
|
|
288
|
-
intensity={70}
|
|
289
|
-
style={{
|
|
290
|
-
position: 'absolute',
|
|
291
|
-
bottom: 24,
|
|
292
|
-
right: 24,
|
|
293
|
-
width: 56,
|
|
294
|
-
height: 56,
|
|
295
|
-
borderRadius: 28,
|
|
296
|
-
justifyContent: 'center',
|
|
297
|
-
alignItems: 'center',
|
|
298
|
-
borderWidth: 1,
|
|
299
|
-
borderColor: 'rgba(255, 255, 255, 0.2)',
|
|
300
|
-
}}
|
|
301
|
-
>
|
|
302
|
-
<Pressable onPress={onPress} style={{ padding: 16 }}>
|
|
303
|
-
<AtomicIcon name={icon} size="lg" />
|
|
304
|
-
</Pressable>
|
|
305
|
-
</GlassView>
|
|
306
|
-
);
|
|
307
|
-
};
|
|
308
|
-
```
|
|
129
|
+
// Don't use high intensity for large areas
|
|
130
|
+
<GlassView intensity={100} style={{ flex: 1 }} />
|
|
309
131
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
```tsx
|
|
313
|
-
export const GlassHeader = ({ title, right }) => {
|
|
314
|
-
return (
|
|
315
|
-
<GlassView
|
|
316
|
-
intensity={50}
|
|
317
|
-
style={{
|
|
318
|
-
position: 'absolute',
|
|
319
|
-
top: 0,
|
|
320
|
-
left: 0,
|
|
321
|
-
right: 0,
|
|
322
|
-
height: 100,
|
|
323
|
-
paddingTop: 44,
|
|
324
|
-
paddingHorizontal: 16,
|
|
325
|
-
flexDirection: 'row',
|
|
326
|
-
alignItems: 'center',
|
|
327
|
-
justifyContent: 'space-between',
|
|
328
|
-
}}
|
|
329
|
-
>
|
|
330
|
-
<Pressable>
|
|
331
|
-
<AtomicIcon name="arrow-back" />
|
|
332
|
-
</Pressable>
|
|
333
|
-
|
|
334
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>
|
|
335
|
-
{title}
|
|
336
|
-
</Text>
|
|
337
|
-
|
|
338
|
-
{right || <View style={{ width: 24 }} />}
|
|
339
|
-
</GlassView>
|
|
340
|
-
);
|
|
341
|
-
};
|
|
132
|
+
// Don't use zero intensity
|
|
133
|
+
<GlassView intensity={0} /> {/* No effect */}
|
|
342
134
|
```
|
|
343
135
|
|
|
344
|
-
###
|
|
136
|
+
### Tint Usage
|
|
345
137
|
|
|
138
|
+
✅ **DO**:
|
|
346
139
|
```tsx
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
borderTopRightRadius: 24,
|
|
364
|
-
padding: 24,
|
|
365
|
-
}}
|
|
366
|
-
>
|
|
367
|
-
<View
|
|
368
|
-
style={{
|
|
369
|
-
width: 40,
|
|
370
|
-
height: 4,
|
|
371
|
-
backgroundColor: 'rgba(255, 255, 255, 0.3)',
|
|
372
|
-
borderRadius: 2,
|
|
373
|
-
alignSelf: 'center',
|
|
374
|
-
marginBottom: 24,
|
|
375
|
-
}}
|
|
376
|
-
/>
|
|
377
|
-
|
|
378
|
-
<Text style={{ fontSize: 18, fontWeight: 'bold', marginBottom: 16 }}>
|
|
379
|
-
Bottom Sheet
|
|
380
|
-
</Text>
|
|
381
|
-
|
|
382
|
-
<Text style={{ color: 'rgba(255, 255, 255, 0.8)' }}>
|
|
383
|
-
İçerik buraya gelecek.
|
|
384
|
-
</Text>
|
|
385
|
-
</GlassView>
|
|
386
|
-
</Pressable>
|
|
387
|
-
</Modal>
|
|
388
|
-
);
|
|
389
|
-
};
|
|
140
|
+
// Light theme overlay
|
|
141
|
+
<GlassView
|
|
142
|
+
intensity={50}
|
|
143
|
+
tint="light"
|
|
144
|
+
style={{ padding: 24 }}
|
|
145
|
+
/>
|
|
146
|
+
|
|
147
|
+
// Dark theme overlay
|
|
148
|
+
<GlassView
|
|
149
|
+
intensity={50}
|
|
150
|
+
tint="dark"
|
|
151
|
+
style={{ padding: 24 }}
|
|
152
|
+
/>
|
|
153
|
+
|
|
154
|
+
// Auto (recommended)
|
|
155
|
+
<GlassView intensity={50} style={{ padding: 24 }} />
|
|
390
156
|
```
|
|
391
157
|
|
|
392
|
-
|
|
393
|
-
|
|
158
|
+
❌ **DON'T**:
|
|
394
159
|
```tsx
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
return (
|
|
399
|
-
<Pressable
|
|
400
|
-
style={{ ...StyleSheet.absoluteFillObject }}
|
|
401
|
-
onPress={onClose}
|
|
402
|
-
>
|
|
403
|
-
<GlassView
|
|
404
|
-
intensity={80}
|
|
405
|
-
style={{
|
|
406
|
-
position: 'absolute',
|
|
407
|
-
top: 60,
|
|
408
|
-
right: 16,
|
|
409
|
-
borderRadius: 12,
|
|
410
|
-
padding: 8,
|
|
411
|
-
minWidth: 200,
|
|
412
|
-
}}
|
|
413
|
-
>
|
|
414
|
-
{options.map((option, index) => (
|
|
415
|
-
<Pressable
|
|
416
|
-
key={index}
|
|
417
|
-
onPress={() => {
|
|
418
|
-
option.onPress();
|
|
419
|
-
onClose();
|
|
420
|
-
}}
|
|
421
|
-
style={{
|
|
422
|
-
paddingVertical: 12,
|
|
423
|
-
paddingHorizontal: 16,
|
|
424
|
-
borderRadius: 8,
|
|
425
|
-
}}
|
|
426
|
-
>
|
|
427
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
428
|
-
<AtomicIcon name={option.icon} size="sm" />
|
|
429
|
-
<Text style={{ marginLeft: 12 }}>{option.label}</Text>
|
|
430
|
-
</View>
|
|
431
|
-
</Pressable>
|
|
432
|
-
))}
|
|
433
|
-
</GlassView>
|
|
434
|
-
</Pressable>
|
|
435
|
-
);
|
|
436
|
-
};
|
|
160
|
+
// Don't mix tint inappropriately
|
|
161
|
+
<GlassView tint="light" style={{ backgroundColor: '#000' }} />
|
|
437
162
|
```
|
|
438
163
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
### GlassViewProps
|
|
164
|
+
### Performance Optimization
|
|
442
165
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
| `intensity` | `number` | `50` | Blur yoğunluğu (0-100) |
|
|
448
|
-
| `tint` | `'light' \| 'dark'` | Otomatik | Renk tonu |
|
|
449
|
-
| `experimentalBlurMethod` | `'dimezisBlurView' \| 'none'` | - | Deneysel blur yöntemi |
|
|
166
|
+
✅ **DO**:
|
|
167
|
+
```tsx
|
|
168
|
+
// Fixed dimensions
|
|
169
|
+
<GlassView style={{ width: 200, height: 100 }} />
|
|
450
170
|
|
|
451
|
-
|
|
171
|
+
// Lower intensity
|
|
172
|
+
<GlassView intensity={30} />
|
|
452
173
|
|
|
453
|
-
|
|
174
|
+
// Overflow hidden
|
|
175
|
+
<GlassView style={{ overflow: 'hidden', borderRadius: 16 }} />
|
|
176
|
+
```
|
|
454
177
|
|
|
178
|
+
❌ **DON'T**:
|
|
455
179
|
```tsx
|
|
456
|
-
//
|
|
457
|
-
<GlassView intensity={
|
|
458
|
-
|
|
459
|
-
// Orta blur - iyi denge
|
|
460
|
-
<GlassView intensity={50}>
|
|
180
|
+
// Don't use flex with high intensity
|
|
181
|
+
<GlassView intensity={100} style={{ flex: 1 }} />
|
|
461
182
|
|
|
462
|
-
//
|
|
463
|
-
<GlassView intensity={
|
|
183
|
+
// Don't animate intensity
|
|
184
|
+
<GlassView intensity={animatedValue} />
|
|
464
185
|
```
|
|
465
186
|
|
|
466
|
-
|
|
467
|
-
|
|
187
|
+
## AI Coding Guidelines
|
|
188
|
+
|
|
189
|
+
### For AI Agents
|
|
190
|
+
|
|
191
|
+
When generating GlassView components, follow these rules:
|
|
192
|
+
|
|
193
|
+
1. **Always import from correct path**:
|
|
194
|
+
```typescript
|
|
195
|
+
import { GlassView } from 'react-native-design-system/src/atoms/GlassView';
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
2. **Always provide dimensions**:
|
|
199
|
+
```tsx
|
|
200
|
+
<GlassView
|
|
201
|
+
style={{
|
|
202
|
+
width: '100%',
|
|
203
|
+
height: 60,
|
|
204
|
+
padding: 16,
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
内容
|
|
208
|
+
</GlassView>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
3. **Always use appropriate intensity**:
|
|
212
|
+
```tsx
|
|
213
|
+
// 轻微模糊 - 导航栏
|
|
214
|
+
<GlassView intensity={30} />
|
|
215
|
+
|
|
216
|
+
// 中等模糊 - 卡片、模态框
|
|
217
|
+
<GlassView intensity={50} />
|
|
218
|
+
|
|
219
|
+
// 强烈模糊 - 聚焦内容
|
|
220
|
+
<GlassView intensity={80} />
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
4. **Always ensure background content exists**:
|
|
224
|
+
```tsx
|
|
225
|
+
<View style={{ flex: 1 }}>
|
|
226
|
+
<BackgroundImage />
|
|
227
|
+
|
|
228
|
+
<GlassView style={StyleSheet.absoluteFill}>
|
|
229
|
+
<Content />
|
|
230
|
+
</GlassView>
|
|
231
|
+
</View>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
5. **Always test on real devices**:
|
|
235
|
+
```tsx
|
|
236
|
+
// Blur effect varies by platform and device
|
|
237
|
+
// Test on both iOS and Android
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Common Patterns
|
|
241
|
+
|
|
242
|
+
#### Navigation Bar
|
|
468
243
|
```tsx
|
|
469
|
-
|
|
470
|
-
|
|
244
|
+
<GlassView
|
|
245
|
+
intensity={30}
|
|
246
|
+
style={{
|
|
247
|
+
position: 'absolute',
|
|
248
|
+
top: 0,
|
|
249
|
+
left: 0,
|
|
250
|
+
right: 0,
|
|
251
|
+
height: 60,
|
|
252
|
+
flexDirection: 'row',
|
|
253
|
+
alignItems: 'center',
|
|
254
|
+
paddingHorizontal: 16,
|
|
255
|
+
}}
|
|
256
|
+
>
|
|
257
|
+
<Text style={{ fontWeight: 'bold' }}>Logo</Text>
|
|
258
|
+
</GlassView>
|
|
259
|
+
```
|
|
471
260
|
|
|
472
|
-
|
|
473
|
-
|
|
261
|
+
#### Modal Overlay
|
|
262
|
+
```tsx
|
|
263
|
+
<Modal visible={visible} transparent>
|
|
264
|
+
<GlassView
|
|
265
|
+
intensity={80}
|
|
266
|
+
tint="dark"
|
|
267
|
+
style={{
|
|
268
|
+
flex: 1,
|
|
269
|
+
justifyContent: 'center',
|
|
270
|
+
alignItems: 'center',
|
|
271
|
+
padding: 24,
|
|
272
|
+
}}
|
|
273
|
+
>
|
|
274
|
+
<View style={{ backgroundColor: '#fff', borderRadius: 16, padding: 24 }}>
|
|
275
|
+
<Text>Modal Content</Text>
|
|
276
|
+
</View>
|
|
277
|
+
</GlassView>
|
|
278
|
+
</Modal>
|
|
279
|
+
```
|
|
474
280
|
|
|
475
|
-
|
|
476
|
-
|
|
281
|
+
#### Card Overlay
|
|
282
|
+
```tsx
|
|
283
|
+
<View style={{ borderRadius: 16, overflow: 'hidden', height: 200 }}>
|
|
284
|
+
<BackgroundImage style={StyleSheet.absoluteFill} />
|
|
285
|
+
|
|
286
|
+
<GlassView
|
|
287
|
+
intensity={60}
|
|
288
|
+
style={{
|
|
289
|
+
position: 'absolute',
|
|
290
|
+
bottom: 0,
|
|
291
|
+
left: 0,
|
|
292
|
+
right: 0,
|
|
293
|
+
padding: 16,
|
|
294
|
+
}}
|
|
295
|
+
>
|
|
296
|
+
<Text style={{ color: '#fff' }}>{title}</Text>
|
|
297
|
+
</GlassView>
|
|
298
|
+
</View>
|
|
477
299
|
```
|
|
478
300
|
|
|
479
|
-
|
|
301
|
+
#### Tab Bar
|
|
302
|
+
```tsx
|
|
303
|
+
<GlassView
|
|
304
|
+
intensity={40}
|
|
305
|
+
style={{
|
|
306
|
+
position: 'absolute',
|
|
307
|
+
bottom: 0,
|
|
308
|
+
left: 0,
|
|
309
|
+
right: 0,
|
|
310
|
+
height: 60,
|
|
311
|
+
flexDirection: 'row',
|
|
312
|
+
borderTopWidth: 1,
|
|
313
|
+
borderTopColor: 'rgba(255, 255, 255, 0.1)',
|
|
314
|
+
}}
|
|
315
|
+
>
|
|
316
|
+
{tabs.map((tab) => (
|
|
317
|
+
<TabItem key={tab.key} {...tab} />
|
|
318
|
+
))}
|
|
319
|
+
</GlassView>
|
|
320
|
+
```
|
|
480
321
|
|
|
322
|
+
#### Floating Action Button
|
|
481
323
|
```tsx
|
|
482
|
-
|
|
483
|
-
|
|
324
|
+
<GlassView
|
|
325
|
+
intensity={70}
|
|
326
|
+
style={{
|
|
327
|
+
position: 'absolute',
|
|
328
|
+
bottom: 24,
|
|
329
|
+
right: 24,
|
|
330
|
+
width: 56,
|
|
331
|
+
height: 56,
|
|
332
|
+
borderRadius: 28,
|
|
333
|
+
justifyContent: 'center',
|
|
334
|
+
alignItems: 'center',
|
|
335
|
+
borderWidth: 1,
|
|
336
|
+
borderColor: 'rgba(255, 255, 255, 0.2)',
|
|
337
|
+
}}
|
|
338
|
+
>
|
|
339
|
+
<Pressable onPress={onPress}>
|
|
340
|
+
<Icon name="add" />
|
|
341
|
+
</Pressable>
|
|
342
|
+
</GlassView>
|
|
343
|
+
```
|
|
484
344
|
|
|
485
|
-
|
|
486
|
-
<GlassView style={{ width: 200, height: 100 }}>
|
|
345
|
+
## Props Reference
|
|
487
346
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
347
|
+
| Prop | Type | Required | Default | Description |
|
|
348
|
+
|------|------|----------|---------|-------------|
|
|
349
|
+
| `children` | `ReactNode` | No | - | Content |
|
|
350
|
+
| `style` | `StyleProp<ViewStyle>` | Yes* | - | Container style (*must have dimensions) |
|
|
351
|
+
| `intensity` | `number` | No | `50` | Blur intensity (0-100) |
|
|
352
|
+
| `tint` | `'light' \| 'dark'` | No | Auto | Color tint |
|
|
353
|
+
| `experimentalBlurMethod` | `'dimezisBlurView' \| 'none'` | No | - | Experimental blur method |
|
|
354
|
+
|
|
355
|
+
## Accessibility
|
|
491
356
|
|
|
492
|
-
|
|
357
|
+
- ✅ Screen reader accessible
|
|
358
|
+
- ✅ Maintains contrast ratios
|
|
359
|
+
- ✅ Semantic meaning preserved
|
|
360
|
+
- ✅ Touch targets maintained
|
|
493
361
|
|
|
494
|
-
|
|
362
|
+
## Performance Tips
|
|
495
363
|
|
|
496
|
-
-
|
|
497
|
-
-
|
|
498
|
-
|
|
364
|
+
1. **Limit usage**: Max 2-3 instances per screen
|
|
365
|
+
2. **Lower intensity**: Use 30-50 when possible
|
|
366
|
+
3. **Fixed size**: Avoid flex when possible
|
|
367
|
+
4. **Avoid nesting**: Never nest GlassView components
|
|
368
|
+
5. **Test devices**: Verify on low-end devices
|
|
369
|
+
6. **Platform testing**: Test on both iOS and Android
|
|
499
370
|
|
|
500
|
-
##
|
|
371
|
+
## Platform Support
|
|
501
372
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
4. **Test**: Farklı cihazlarda test edin
|
|
373
|
+
- ✅ iOS: Full support with native blur
|
|
374
|
+
- ✅ Android: Full support with hardware blur
|
|
375
|
+
- ⚠️ Web: Partial support (fallback)
|
|
506
376
|
|
|
507
|
-
##
|
|
377
|
+
## Related Components
|
|
508
378
|
|
|
509
|
-
-
|
|
510
|
-
-
|
|
511
|
-
-
|
|
379
|
+
- [`BaseModal`](../../molecules/BaseModal/README.md) - Modal component
|
|
380
|
+
- [`AtomicCard`](../AtomicCard/README.md) - Card component
|
|
381
|
+
- [`GlowingCard`](../../molecules/GlowingCard/README.md) - Glowing card effect
|
|
512
382
|
|
|
513
|
-
##
|
|
383
|
+
## Version History
|
|
514
384
|
|
|
515
|
-
-
|
|
516
|
-
-
|
|
517
|
-
- [`GlowingCard`](../../molecules/GlowingCard/README.md) - Parlak kart
|
|
385
|
+
- **2.6.83**: Initial release with glassmorphism support
|
|
386
|
+
- **2.6.84**: Added theme-aware auto tint
|
|
518
387
|
|
|
519
|
-
##
|
|
388
|
+
## License
|
|
520
389
|
|
|
521
390
|
MIT
|