@umituz/react-native-design-system 2.6.86 → 2.6.88
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 -6
- package/src/atoms/AtomicAvatar.README.md +483 -0
- package/src/atoms/AtomicBadge.README.md +423 -0
- package/src/atoms/AtomicDatePicker.README.md +399 -0
- package/src/atoms/AtomicFab.README.md +421 -0
- package/src/atoms/AtomicProgress.README.md +402 -0
- package/src/atoms/AtomicSpinner.README.md +433 -0
- package/src/atoms/AtomicText.README.md +470 -0
- package/src/atoms/AtomicTextArea.README.md +352 -0
- package/src/atoms/EmptyState.README.md +372 -0
- package/src/atoms/skeleton/AtomicSkeleton.README.md +339 -0
- package/src/molecules/ConfirmationModal.README.md +370 -0
- package/src/molecules/Divider/README.md +470 -0
- package/src/molecules/ListItem.README.md +402 -0
- package/src/molecules/StepHeader/README.md +487 -0
- package/src/molecules/alerts/README.md +471 -0
- package/src/molecules/avatar/README.md +431 -0
- package/src/molecules/bottom-sheet/README.md +413 -0
- package/src/molecules/calendar/README.md +339 -0
- package/src/molecules/countdown/README.md +558 -0
- package/src/molecules/media-card/README.md +384 -0
- package/src/molecules/navigation/README.md +377 -0
- package/src/molecules/splash/README.md +474 -0
- package/src/molecules/splash/components/SplashScreen.tsx +0 -14
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
# AtomicText
|
|
2
|
+
|
|
3
|
+
AtomicText, React Native için tema bilinci yüksek, responsive ve özelleştirilebilir bir metin bileşenidir. Material Design 3 tipografi kurallarına uygun olarak tasarlanmıştır.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
|
|
7
|
+
- 📝 **Typography System**: Material Design 3 tipografi
|
|
8
|
+
- 🎨 **Tema Bilinci**: Otomatik renk uyumu
|
|
9
|
+
- 📱 **Responsive**: Otomatik font boyutu
|
|
10
|
+
- ⚙️ **Kolay Özelleştirme**: Convenience props
|
|
11
|
+
- 🎯 **Semantic Colors**: Anlamlı renk seçenekleri
|
|
12
|
+
- ♿ **Erişilebilir**: Tam erişilebilirlik desteği
|
|
13
|
+
|
|
14
|
+
## Kurulum
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { AtomicText } from 'react-native-design-system';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Temel Kullanım
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { View } from 'react-native';
|
|
25
|
+
import { AtomicText } from 'react-native-design-system';
|
|
26
|
+
|
|
27
|
+
export const BasicExample = () => {
|
|
28
|
+
return (
|
|
29
|
+
<View style={{ padding: 16 }}>
|
|
30
|
+
<AtomicText>Merhaba Dünya!</AtomicText>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Typography Types
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<View style={{ gap: 8 }}>
|
|
40
|
+
{/* Display */}
|
|
41
|
+
<AtomicText type="displayLarge">Display Large</AtomicText>
|
|
42
|
+
<AtomicText type="displayMedium">Display Medium</AtomicText>
|
|
43
|
+
<AtomicText type="displaySmall">Display Small</AtomicText>
|
|
44
|
+
|
|
45
|
+
{/* Headline */}
|
|
46
|
+
<AtomicText type="headlineLarge">Headline Large</AtomicText>
|
|
47
|
+
<AtomicText type="headlineMedium">Headline Medium</AtomicText>
|
|
48
|
+
<AtomicText type="headlineSmall">Headline Small</AtomicText>
|
|
49
|
+
|
|
50
|
+
{/* Title */}
|
|
51
|
+
<AtomicText type="titleLarge">Title Large</AtomicText>
|
|
52
|
+
<AtomicText type="titleMedium">Title Medium</AtomicText>
|
|
53
|
+
<AtomicText type="titleSmall">Title Small</AtomicText>
|
|
54
|
+
|
|
55
|
+
{/* Label */}
|
|
56
|
+
<AtomicText type="labelLarge">Label Large</AtomicText>
|
|
57
|
+
<AtomicText type="labelMedium">Label Medium</AtomicText>
|
|
58
|
+
<AtomicText type="labelSmall">Label Small</AtomicText>
|
|
59
|
+
|
|
60
|
+
{/* Body */}
|
|
61
|
+
<AtomicText type="bodyLarge">Body Large</AtomicText>
|
|
62
|
+
<AtomicText type="bodyMedium">Body Medium</AtomicText>
|
|
63
|
+
<AtomicText type="bodySmall">Body Small</AtomicText>
|
|
64
|
+
</View>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Semantic Colors
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
<View style={{ gap: 8 }}>
|
|
71
|
+
<AtomicText color="primary">Primary Renk</AtomicText>
|
|
72
|
+
<AtomicText color="secondary">Secondary Renk</AtomicText>
|
|
73
|
+
<AtomicText color="success">Success Renk</AtomicText>
|
|
74
|
+
<AtomicText color="warning">Warning Renk</AtomicText>
|
|
75
|
+
<AtomicText color="error">Error Renk</AtomicText>
|
|
76
|
+
<AtomicText color="info">Info Renk</AtomicText>
|
|
77
|
+
|
|
78
|
+
{/* Text colors */}
|
|
79
|
+
<AtomicText color="textPrimary">Primary Text</AtomicText>
|
|
80
|
+
<AtomicText color="textSecondary">Secondary Text</AtomicText>
|
|
81
|
+
<AtomicText color="textTertiary">Tertiary Text</AtomicText>
|
|
82
|
+
</View>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Text Alignment
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
<View style={{ gap: 16 }}>
|
|
89
|
+
<AtomicText align="left">Sola Hizalı</AtomicText>
|
|
90
|
+
<AtomicText align="center">Ortalanmış</AtomicText>
|
|
91
|
+
<AtomicText align="right">Sağa Hizalı</AtomicText>
|
|
92
|
+
<AtomicText align="justify">İki yana yaslı</AtomicText>
|
|
93
|
+
</View>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Font Weight
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
<View style={{ gap: 8 }}>
|
|
100
|
+
<AtomicText fontWeight="100">Thin (100)</AtomicText>
|
|
101
|
+
<AtomicText fontWeight="300">Light (300)</AtomicText>
|
|
102
|
+
<AtomicText fontWeight="400">Regular (400)</AtomicText>
|
|
103
|
+
<AtomicText fontWeight="500">Medium (500)</AtomicText>
|
|
104
|
+
<AtomicText fontWeight="600">Semi Bold (600)</AtomicText>
|
|
105
|
+
<AtomicText fontWeight="700">Bold (700)</AtomicText>
|
|
106
|
+
<AtomicText fontWeight="900">Black (900)</AtomicText>
|
|
107
|
+
</View>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Spacing
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
<View>
|
|
114
|
+
<AtomicText type="titleLarge" marginBottom="sm">
|
|
115
|
+
Başlık
|
|
116
|
+
</AtomicText>
|
|
117
|
+
|
|
118
|
+
<AtomicText marginTop="sm" marginBottom="md">
|
|
119
|
+
Açıklama metni
|
|
120
|
+
</AtomicText>
|
|
121
|
+
|
|
122
|
+
<AtomicText marginTop="lg">
|
|
123
|
+
Daha fazla içerik
|
|
124
|
+
</AtomicText>
|
|
125
|
+
</View>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Custom Colors
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
<AtomicText color="#6366f1">Custom Renk</AtomicText>
|
|
132
|
+
<AtomicText color="rgb(99, 102, 241)">RGB Renk</AtomicText>
|
|
133
|
+
<AtomicText color="rgba(99, 102, 241, 0.5)">RGBA Renk</AtomicText>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Custom Style
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
<AtomicText
|
|
140
|
+
type="bodyLarge"
|
|
141
|
+
style={{
|
|
142
|
+
textDecorationLine: 'underline',
|
|
143
|
+
fontStyle: 'italic',
|
|
144
|
+
letterSpacing: 1,
|
|
145
|
+
lineHeight: 28,
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
Özel Stilli Metin
|
|
149
|
+
</AtomicText>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Örnek Kullanımlar
|
|
153
|
+
|
|
154
|
+
### Sayfa Başlığı
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
export const PageHeader = ({ title, subtitle }) => {
|
|
158
|
+
return (
|
|
159
|
+
<View style={{ padding: 16 }}>
|
|
160
|
+
<AtomicText type="headlineLarge" marginBottom="sm">
|
|
161
|
+
{title}
|
|
162
|
+
</AtomicText>
|
|
163
|
+
|
|
164
|
+
{subtitle && (
|
|
165
|
+
<AtomicText type="bodyLarge" color="textSecondary">
|
|
166
|
+
{subtitle}
|
|
167
|
+
</AtomicText>
|
|
168
|
+
)}
|
|
169
|
+
</View>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Kart İçeriği
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
export const CardContent = ({ title, description }) => {
|
|
178
|
+
return (
|
|
179
|
+
<View style={{ padding: 16 }}>
|
|
180
|
+
<AtomicText type="titleLarge" marginBottom="xs">
|
|
181
|
+
{title}
|
|
182
|
+
</AtomicText>
|
|
183
|
+
|
|
184
|
+
<AtomicText type="bodyMedium" color="textSecondary">
|
|
185
|
+
{description}
|
|
186
|
+
</AtomicText>
|
|
187
|
+
</View>
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Form Label
|
|
193
|
+
|
|
194
|
+
```tsx
|
|
195
|
+
export const FormLabel = ({ label, required }) => {
|
|
196
|
+
return (
|
|
197
|
+
<View style={{ flexDirection: 'row', marginBottom: 8 }}>
|
|
198
|
+
<AtomicText type="labelLarge" color="textPrimary">
|
|
199
|
+
{label}
|
|
200
|
+
</AtomicText>
|
|
201
|
+
|
|
202
|
+
{required && (
|
|
203
|
+
<AtomicText type="labelLarge" color="error">
|
|
204
|
+
*
|
|
205
|
+
</AtomicText>
|
|
206
|
+
)}
|
|
207
|
+
</View>
|
|
208
|
+
);
|
|
209
|
+
};
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Error Message
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
export const ErrorMessage = ({ message }) => {
|
|
216
|
+
return (
|
|
217
|
+
<AtomicText
|
|
218
|
+
type="bodySmall"
|
|
219
|
+
color="error"
|
|
220
|
+
marginTop="xs"
|
|
221
|
+
>
|
|
222
|
+
{message}
|
|
223
|
+
</AtomicText>
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Success Message
|
|
229
|
+
|
|
230
|
+
```tsx
|
|
231
|
+
export const SuccessMessage = ({ message }) => {
|
|
232
|
+
return (
|
|
233
|
+
<AtomicText
|
|
234
|
+
type="bodyMedium"
|
|
235
|
+
color="success"
|
|
236
|
+
align="center"
|
|
237
|
+
>
|
|
238
|
+
{message}
|
|
239
|
+
</AtomicText>
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### List Item
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
export const ListItem = ({ title, subtitle, timestamp }) => {
|
|
248
|
+
return (
|
|
249
|
+
<View style={{ padding: 16 }}>
|
|
250
|
+
<AtomicText type="bodyLarge" fontWeight="600">
|
|
251
|
+
{title}
|
|
252
|
+
</AtomicText>
|
|
253
|
+
|
|
254
|
+
{subtitle && (
|
|
255
|
+
<AtomicText
|
|
256
|
+
type="bodyMedium"
|
|
257
|
+
color="textSecondary"
|
|
258
|
+
marginTop="xs"
|
|
259
|
+
>
|
|
260
|
+
{subtitle}
|
|
261
|
+
</AtomicText>
|
|
262
|
+
)}
|
|
263
|
+
|
|
264
|
+
{timestamp && (
|
|
265
|
+
<AtomicText
|
|
266
|
+
type="bodySmall"
|
|
267
|
+
color="textTertiary"
|
|
268
|
+
marginTop="xs"
|
|
269
|
+
>
|
|
270
|
+
{timestamp}
|
|
271
|
+
</AtomicText>
|
|
272
|
+
)}
|
|
273
|
+
</View>
|
|
274
|
+
);
|
|
275
|
+
};
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Pricing Card
|
|
279
|
+
|
|
280
|
+
```tsx
|
|
281
|
+
export const PricingCard = ({ plan, price, features }) => {
|
|
282
|
+
return (
|
|
283
|
+
<View style={{ padding: 24, alignItems: 'center' }}>
|
|
284
|
+
<AtomicText type="headlineSmall" marginBottom="md">
|
|
285
|
+
{plan}
|
|
286
|
+
</AtomicText>
|
|
287
|
+
|
|
288
|
+
<AtomicText
|
|
289
|
+
type="displayLarge"
|
|
290
|
+
color="primary"
|
|
291
|
+
fontWeight="700"
|
|
292
|
+
marginBottom="md"
|
|
293
|
+
>
|
|
294
|
+
${price}
|
|
295
|
+
<AtomicText type="titleMedium">/ay</AtomicText>
|
|
296
|
+
</AtomicText>
|
|
297
|
+
|
|
298
|
+
{features.map((feature, index) => (
|
|
299
|
+
<AtomicText
|
|
300
|
+
key={index}
|
|
301
|
+
type="bodyMedium"
|
|
302
|
+
align="center"
|
|
303
|
+
marginTop="sm"
|
|
304
|
+
>
|
|
305
|
+
{feature}
|
|
306
|
+
</AtomicText>
|
|
307
|
+
))}
|
|
308
|
+
</View>
|
|
309
|
+
);
|
|
310
|
+
};
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Blog Post
|
|
314
|
+
|
|
315
|
+
```tsx
|
|
316
|
+
export const BlogPost = ({ title, author, date, content }) => {
|
|
317
|
+
return (
|
|
318
|
+
<View style={{ padding: 16 }}>
|
|
319
|
+
<AtomicText type="headlineMedium" marginBottom="sm">
|
|
320
|
+
{title}
|
|
321
|
+
</AtomicText>
|
|
322
|
+
|
|
323
|
+
<View style={{ flexDirection: 'row', marginBottom: 16 }}>
|
|
324
|
+
<AtomicText type="bodySmall" color="textSecondary">
|
|
325
|
+
{author}
|
|
326
|
+
</AtomicText>
|
|
327
|
+
<AtomicText type="bodySmall" color="textTertiary">
|
|
328
|
+
• {date}
|
|
329
|
+
</AtomicText>
|
|
330
|
+
</View>
|
|
331
|
+
|
|
332
|
+
<AtomicText type="bodyMedium" lineHeight={24}>
|
|
333
|
+
{content}
|
|
334
|
+
</AtomicText>
|
|
335
|
+
</View>
|
|
336
|
+
);
|
|
337
|
+
};
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Props
|
|
341
|
+
|
|
342
|
+
### AtomicTextProps
|
|
343
|
+
|
|
344
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
345
|
+
|------|-----|------------|----------|
|
|
346
|
+
| `type` | `TextStyleVariant` | `'bodyMedium'` | Tipografi stili |
|
|
347
|
+
| `color` | `ColorVariant \| string` | `'textPrimary'` | Metin rengi |
|
|
348
|
+
| `align` | `TextStyle['textAlign']` | - | Metin hizalaması |
|
|
349
|
+
| `fontWeight` | `TextStyle['fontWeight']` | - | Font kalınlığı |
|
|
350
|
+
| `marginTop` | `keyof Spacing` | - | Üst boşluk |
|
|
351
|
+
| `marginBottom` | `keyof Spacing` | - | Alt boşluk |
|
|
352
|
+
| `children` | `ReactNode` | - **(Zorunlu)** | İçerik |
|
|
353
|
+
| `style` | `StyleProp<TextStyle>` | - | Özel stil |
|
|
354
|
+
| `testID` | `string` | - | Test ID'si |
|
|
355
|
+
|
|
356
|
+
### TextStyleVariant
|
|
357
|
+
|
|
358
|
+
```typescript
|
|
359
|
+
type TextStyleVariant =
|
|
360
|
+
// Display
|
|
361
|
+
| 'displayLarge'
|
|
362
|
+
| 'displayMedium'
|
|
363
|
+
| 'displaySmall'
|
|
364
|
+
// Headline
|
|
365
|
+
| 'headlineLarge'
|
|
366
|
+
| 'headlineMedium'
|
|
367
|
+
| 'headlineSmall'
|
|
368
|
+
// Title
|
|
369
|
+
| 'titleLarge'
|
|
370
|
+
| 'titleMedium'
|
|
371
|
+
| 'titleSmall'
|
|
372
|
+
// Label
|
|
373
|
+
| 'labelLarge'
|
|
374
|
+
| 'labelMedium'
|
|
375
|
+
| 'labelSmall'
|
|
376
|
+
// Body
|
|
377
|
+
| 'bodyLarge'
|
|
378
|
+
| 'bodyMedium'
|
|
379
|
+
| 'bodySmall';
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### ColorVariant
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
type ColorVariant =
|
|
386
|
+
| 'primary'
|
|
387
|
+
| 'secondary'
|
|
388
|
+
| 'success'
|
|
389
|
+
| 'warning'
|
|
390
|
+
| 'error'
|
|
391
|
+
| 'info'
|
|
392
|
+
| 'textPrimary'
|
|
393
|
+
| 'textSecondary'
|
|
394
|
+
| 'textTertiary'
|
|
395
|
+
| 'onPrimary'
|
|
396
|
+
| 'onSecondary'
|
|
397
|
+
| 'onSurface';
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
## Best Practices
|
|
401
|
+
|
|
402
|
+
### 1. Type Hiyerarşisi
|
|
403
|
+
|
|
404
|
+
```tsx
|
|
405
|
+
// Ana başlık
|
|
406
|
+
<AtomicText type="headlineLarge">{title}</AtomicText>
|
|
407
|
+
|
|
408
|
+
// Alt başlık
|
|
409
|
+
<AtomicText type="titleLarge">{subtitle}</AtomicText>
|
|
410
|
+
|
|
411
|
+
// Gövde metni
|
|
412
|
+
<AtomicText type="bodyMedium">{content}</AtomicText>
|
|
413
|
+
|
|
414
|
+
// Yardımcı metin
|
|
415
|
+
<AtomicText type="bodySmall">{helper}</AtomicText>
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### 2. Renk Kullanımı
|
|
419
|
+
|
|
420
|
+
```tsx
|
|
421
|
+
// Ana içerik
|
|
422
|
+
<AtomicText color="textPrimary">
|
|
423
|
+
|
|
424
|
+
// İkincil içerik
|
|
425
|
+
<AtomicText color="textSecondary">
|
|
426
|
+
|
|
427
|
+
// Hata mesajı
|
|
428
|
+
<AtomicText color="error">
|
|
429
|
+
|
|
430
|
+
// Link
|
|
431
|
+
<AtomicText color="primary">
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### 3. Spacing
|
|
435
|
+
|
|
436
|
+
```tsx
|
|
437
|
+
// Convenience props kullanın
|
|
438
|
+
<AtomicText type="titleLarge" marginBottom="md">
|
|
439
|
+
Başlık
|
|
440
|
+
</AtomicText>
|
|
441
|
+
|
|
442
|
+
<AtomicText marginTop="sm">
|
|
443
|
+
İçerik
|
|
444
|
+
</AtomicText>
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
## Erişilebilirlik
|
|
448
|
+
|
|
449
|
+
AtomicText, tam erişilebilirlik desteği sunar:
|
|
450
|
+
|
|
451
|
+
- ✅ Screen reader desteği
|
|
452
|
+
- ✅ Semantic anlamlar
|
|
453
|
+
- ✅ Contrast ratio
|
|
454
|
+
- ✅ Font scaling desteği
|
|
455
|
+
|
|
456
|
+
## Performans İpuçları
|
|
457
|
+
|
|
458
|
+
1. **Avoid Re-renders**: `type` ve `color` props'unu stabilize edin
|
|
459
|
+
2. **Memoization**: Uzun metinleri `React.memo` ile sarın
|
|
460
|
+
3. **Custom Style**: Inline stil yerine StyleSheet kullanın
|
|
461
|
+
|
|
462
|
+
## İlgili Bileşenler
|
|
463
|
+
|
|
464
|
+
- [`AtomicButton`](../button/README.md) - Buton bileşeni
|
|
465
|
+
- [`FormField`](../../molecules/FormField/README.md) - Form alanı
|
|
466
|
+
- [`AtomicInput`](../input/README.md) - Input bileşeni
|
|
467
|
+
|
|
468
|
+
## Lisans
|
|
469
|
+
|
|
470
|
+
MIT
|