@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,25 +1,24 @@
|
|
|
1
1
|
# SplashScreen
|
|
2
2
|
|
|
3
|
-
SplashScreen
|
|
3
|
+
SplashScreen is a startup screen component displayed when the application is launching. It includes logo, app name, tagline, and loading indicator. Provides theme-aware color support and timeout control.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
- 🎨 **Theme-Aware**:
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- ♿ **Erişilebilir**: Screen reader desteği
|
|
7
|
+
- 🎨 **Theme-Aware**: Theme-conscious colors
|
|
8
|
+
- ⏱️ **Timeout Control**: Maximum duration and timeout callback
|
|
9
|
+
- 🖼️ **Logo/Icon**: App logo display
|
|
10
|
+
- 📝 **App Name & Tagline**: App name and slogan
|
|
11
|
+
- ⏳ **Loading Indicator**: Automatic loading indicator
|
|
12
|
+
- 🎭 **Customizable**: Colors, style, duration
|
|
13
|
+
- ♿ **Accessible**: Screen reader support
|
|
15
14
|
|
|
16
|
-
##
|
|
15
|
+
## Installation
|
|
17
16
|
|
|
18
17
|
```tsx
|
|
19
18
|
import { SplashScreen, useSplashFlow } from 'react-native-design-system';
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
##
|
|
21
|
+
## Basic Usage
|
|
23
22
|
|
|
24
23
|
```tsx
|
|
25
24
|
import React, { useState } from 'react';
|
|
@@ -33,8 +32,8 @@ export const App = () => {
|
|
|
33
32
|
if (!isInitialized) {
|
|
34
33
|
return (
|
|
35
34
|
<SplashScreen
|
|
36
|
-
appName="
|
|
37
|
-
tagline="
|
|
35
|
+
appName="My App"
|
|
36
|
+
tagline="Welcome"
|
|
38
37
|
visible={!isReady}
|
|
39
38
|
onReady={() => setIsReady(true)}
|
|
40
39
|
/>
|
|
@@ -45,28 +44,28 @@ export const App = () => {
|
|
|
45
44
|
};
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
##
|
|
47
|
+
## Simple Splash
|
|
49
48
|
|
|
50
49
|
```tsx
|
|
51
50
|
<SplashScreen
|
|
52
51
|
appName="My App"
|
|
53
|
-
tagline="
|
|
52
|
+
tagline="An amazing app"
|
|
54
53
|
visible={true}
|
|
55
54
|
/>
|
|
56
55
|
```
|
|
57
56
|
|
|
58
|
-
## Logo
|
|
57
|
+
## With Logo
|
|
59
58
|
|
|
60
59
|
```tsx
|
|
61
60
|
<SplashScreen
|
|
62
61
|
icon={require('../assets/logo.png')}
|
|
63
62
|
appName="My App"
|
|
64
|
-
tagline="
|
|
63
|
+
tagline="Welcome"
|
|
65
64
|
visible={true}
|
|
66
65
|
/>
|
|
67
66
|
```
|
|
68
67
|
|
|
69
|
-
## Custom
|
|
68
|
+
## Custom Colors
|
|
70
69
|
|
|
71
70
|
```tsx
|
|
72
71
|
<SplashScreen
|
|
@@ -81,23 +80,12 @@ export const App = () => {
|
|
|
81
80
|
/>
|
|
82
81
|
```
|
|
83
82
|
|
|
84
|
-
##
|
|
85
|
-
|
|
86
|
-
```tsx
|
|
87
|
-
<SplashScreen
|
|
88
|
-
appName="My App"
|
|
89
|
-
tagline="Welcome"
|
|
90
|
-
gradientColors={['#667eea', '#764ba2']}
|
|
91
|
-
visible={true}
|
|
92
|
-
/>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Zaman Aşımı
|
|
83
|
+
## Timeout
|
|
96
84
|
|
|
97
85
|
```tsx
|
|
98
86
|
<SplashScreen
|
|
99
87
|
appName="My App"
|
|
100
|
-
tagline="
|
|
88
|
+
tagline="Loading..."
|
|
101
89
|
maxDuration={5000}
|
|
102
90
|
onTimeout={() => {
|
|
103
91
|
console.log('Splash timeout - showing error');
|
|
@@ -109,7 +97,7 @@ export const App = () => {
|
|
|
109
97
|
|
|
110
98
|
## useSplashFlow Hook
|
|
111
99
|
|
|
112
|
-
###
|
|
100
|
+
### Basic Usage
|
|
113
101
|
|
|
114
102
|
```tsx
|
|
115
103
|
import { useSplashFlow } from 'react-native-design-system';
|
|
@@ -125,15 +113,15 @@ export const App = () => {
|
|
|
125
113
|
};
|
|
126
114
|
```
|
|
127
115
|
|
|
128
|
-
### Custom
|
|
116
|
+
### Custom Duration
|
|
129
117
|
|
|
130
118
|
```tsx
|
|
131
119
|
const { isInitialized } = useSplashFlow({
|
|
132
|
-
duration: 3000, // 3
|
|
120
|
+
duration: 3000, // 3 seconds
|
|
133
121
|
});
|
|
134
122
|
```
|
|
135
123
|
|
|
136
|
-
### DeviceEventEmitter
|
|
124
|
+
### DeviceEventEmitter Listening
|
|
137
125
|
|
|
138
126
|
```tsx
|
|
139
127
|
import { DeviceEventEmitter } from 'react-native';
|
|
@@ -151,9 +139,9 @@ useEffect(() => {
|
|
|
151
139
|
}, []);
|
|
152
140
|
```
|
|
153
141
|
|
|
154
|
-
##
|
|
142
|
+
## Example Usages
|
|
155
143
|
|
|
156
|
-
###
|
|
144
|
+
### Basic App Boot
|
|
157
145
|
|
|
158
146
|
```tsx
|
|
159
147
|
export const App = () => {
|
|
@@ -182,7 +170,7 @@ export const App = () => {
|
|
|
182
170
|
<SplashScreen
|
|
183
171
|
icon={require('./assets/logo.png')}
|
|
184
172
|
appName="My App"
|
|
185
|
-
tagline="
|
|
173
|
+
tagline="Loading..."
|
|
186
174
|
visible
|
|
187
175
|
/>
|
|
188
176
|
);
|
|
@@ -192,7 +180,7 @@ export const App = () => {
|
|
|
192
180
|
};
|
|
193
181
|
```
|
|
194
182
|
|
|
195
|
-
### Auth Flow
|
|
183
|
+
### With Auth Flow
|
|
196
184
|
|
|
197
185
|
```tsx
|
|
198
186
|
export const App = () => {
|
|
@@ -212,8 +200,7 @@ export const App = () => {
|
|
|
212
200
|
return (
|
|
213
201
|
<SplashScreen
|
|
214
202
|
appName="My App"
|
|
215
|
-
tagline="
|
|
216
|
-
gradientColors={['#667eea', '#764ba2']}
|
|
203
|
+
tagline="Signing in..."
|
|
217
204
|
visible
|
|
218
205
|
/>
|
|
219
206
|
);
|
|
@@ -223,7 +210,7 @@ export const App = () => {
|
|
|
223
210
|
};
|
|
224
211
|
```
|
|
225
212
|
|
|
226
|
-
### Remote Config
|
|
213
|
+
### With Remote Config
|
|
227
214
|
|
|
228
215
|
```tsx
|
|
229
216
|
export const App = () => {
|
|
@@ -242,7 +229,7 @@ export const App = () => {
|
|
|
242
229
|
<SplashScreen
|
|
243
230
|
icon={require('./assets/logo.png')}
|
|
244
231
|
appName="My App"
|
|
245
|
-
tagline="
|
|
232
|
+
tagline="Loading settings..."
|
|
246
233
|
maxDuration={5000}
|
|
247
234
|
onTimeout={() => {
|
|
248
235
|
// Fallback to default config
|
|
@@ -257,7 +244,7 @@ export const App = () => {
|
|
|
257
244
|
};
|
|
258
245
|
```
|
|
259
246
|
|
|
260
|
-
###
|
|
247
|
+
### Animated Splash
|
|
261
248
|
|
|
262
249
|
```tsx
|
|
263
250
|
export const AnimatedSplash = () => {
|
|
@@ -283,7 +270,6 @@ export const AnimatedSplash = () => {
|
|
|
283
270
|
<SplashScreen
|
|
284
271
|
appName="My App"
|
|
285
272
|
tagline="Welcome"
|
|
286
|
-
gradientColors={['#667eea', '#764ba2']}
|
|
287
273
|
visible={!isInitialized}
|
|
288
274
|
/>
|
|
289
275
|
);
|
|
@@ -304,10 +290,10 @@ export const MultiStageSplash = () => {
|
|
|
304
290
|
const allReady = Object.values(loadingStage).every(Boolean);
|
|
305
291
|
|
|
306
292
|
const getTagline = () => {
|
|
307
|
-
if (!loadingStage.assets) return '
|
|
308
|
-
if (!loadingStage.auth) return '
|
|
309
|
-
if (!loadingStage.config) return '
|
|
310
|
-
return '
|
|
293
|
+
if (!loadingStage.assets) return 'Loading assets...';
|
|
294
|
+
if (!loadingStage.auth) return 'Signing in...';
|
|
295
|
+
if (!loadingStage.config) return 'Getting settings...';
|
|
296
|
+
return 'Ready!';
|
|
311
297
|
};
|
|
312
298
|
|
|
313
299
|
if (!isInitialized || !allReady) {
|
|
@@ -315,7 +301,6 @@ export const MultiStageSplash = () => {
|
|
|
315
301
|
<SplashScreen
|
|
316
302
|
appName="My App"
|
|
317
303
|
tagline={getTagline()}
|
|
318
|
-
gradientColors={['#667eea', '#764ba2']}
|
|
319
304
|
visible
|
|
320
305
|
/>
|
|
321
306
|
);
|
|
@@ -325,7 +310,7 @@ export const MultiStageSplash = () => {
|
|
|
325
310
|
};
|
|
326
311
|
```
|
|
327
312
|
|
|
328
|
-
### Debug
|
|
313
|
+
### Debug Mode
|
|
329
314
|
|
|
330
315
|
```tsx
|
|
331
316
|
export const DebugSplash = () => {
|
|
@@ -364,49 +349,48 @@ export const DebugSplash = () => {
|
|
|
364
349
|
|
|
365
350
|
### SplashScreenProps
|
|
366
351
|
|
|
367
|
-
| Prop |
|
|
368
|
-
|
|
369
|
-
| `icon` | `ImageSourcePropType` | - | Logo/
|
|
370
|
-
| `appName` | `string` | - |
|
|
371
|
-
| `tagline` | `string` | - |
|
|
372
|
-
| `colors` | `SplashColors` | - | Custom
|
|
373
|
-
| `
|
|
374
|
-
| `
|
|
375
|
-
| `maxDuration` | `number` | - | Maksimum süre (ms) |
|
|
352
|
+
| Prop | Type | Default | Description |
|
|
353
|
+
|------|------|---------|-------------|
|
|
354
|
+
| `icon` | `ImageSourcePropType` | - | Logo/icon |
|
|
355
|
+
| `appName` | `string` | - | App name |
|
|
356
|
+
| `tagline` | `string` | - | Tagline/slogan |
|
|
357
|
+
| `colors` | `SplashColors` | - | Custom colors |
|
|
358
|
+
| `visible` | `boolean` | `true` | Visibility |
|
|
359
|
+
| `maxDuration` | `number` | - | Maximum duration (ms) |
|
|
376
360
|
| `onTimeout` | `() => void` | - | Timeout callback |
|
|
377
361
|
| `onReady` | `() => void` | - | Ready callback |
|
|
378
|
-
| `style` | `ViewStyle` | - |
|
|
362
|
+
| `style` | `ViewStyle` | - | Custom style |
|
|
379
363
|
|
|
380
364
|
### SplashColors
|
|
381
365
|
|
|
382
|
-
| Prop |
|
|
383
|
-
|
|
384
|
-
| `background` | `string` | `tokens.colors.backgroundPrimary` |
|
|
385
|
-
| `text` | `string` | `tokens.colors.textPrimary` |
|
|
386
|
-
| `iconPlaceholder` | `string` | `text + 30% opacity` |
|
|
366
|
+
| Prop | Type | Default | Description |
|
|
367
|
+
|------|------|---------|-------------|
|
|
368
|
+
| `background` | `string` | `tokens.colors.backgroundPrimary` | Background color |
|
|
369
|
+
| `text` | `string` | `tokens.colors.textPrimary` | Text color |
|
|
370
|
+
| `iconPlaceholder` | `string` | `text + 30% opacity` | Icon placeholder color |
|
|
387
371
|
|
|
388
372
|
### useSplashFlow Options
|
|
389
373
|
|
|
390
|
-
| Prop |
|
|
391
|
-
|
|
392
|
-
| `duration` | `number` | `1500` | Splash
|
|
374
|
+
| Prop | Type | Default | Description |
|
|
375
|
+
|------|------|---------|-------------|
|
|
376
|
+
| `duration` | `number` | `1500` | Splash duration (ms) |
|
|
393
377
|
|
|
394
378
|
## Best Practices
|
|
395
379
|
|
|
396
|
-
### 1.
|
|
380
|
+
### 1. Duration Settings
|
|
397
381
|
|
|
398
382
|
```tsx
|
|
399
|
-
//
|
|
383
|
+
// Short
|
|
400
384
|
useSplashFlow({ duration: 1000 })
|
|
401
385
|
|
|
402
|
-
//
|
|
386
|
+
// Medium (recommended)
|
|
403
387
|
useSplashFlow({ duration: 2000 })
|
|
404
388
|
|
|
405
|
-
//
|
|
389
|
+
// Long
|
|
406
390
|
useSplashFlow({ duration: 3000 })
|
|
407
391
|
```
|
|
408
392
|
|
|
409
|
-
### 2. Timeout
|
|
393
|
+
### 2. Timeout Usage
|
|
410
394
|
|
|
411
395
|
```tsx
|
|
412
396
|
<SplashScreen
|
|
@@ -434,7 +418,7 @@ useEffect(() => {
|
|
|
434
418
|
### 4. Theme Awareness
|
|
435
419
|
|
|
436
420
|
```tsx
|
|
437
|
-
// Theme-aware colors (
|
|
421
|
+
// Theme-aware colors (recommended)
|
|
438
422
|
<SplashScreen appName="App" />
|
|
439
423
|
|
|
440
424
|
// Custom colors
|
|
@@ -446,29 +430,29 @@ useEffect(() => {
|
|
|
446
430
|
/>
|
|
447
431
|
```
|
|
448
432
|
|
|
449
|
-
##
|
|
433
|
+
## Accessibility
|
|
450
434
|
|
|
451
|
-
SplashScreen
|
|
435
|
+
SplashScreen provides full accessibility support:
|
|
452
436
|
|
|
453
|
-
- ✅ Screen reader
|
|
437
|
+
- ✅ Screen reader support
|
|
454
438
|
- ✅ Accessibility label
|
|
455
|
-
- ✅ Loading state
|
|
456
|
-
- ✅ Timeout
|
|
439
|
+
- ✅ Loading state announcement
|
|
440
|
+
- ✅ Timeout notification (DEV mode)
|
|
457
441
|
|
|
458
|
-
##
|
|
442
|
+
## Performance Tips
|
|
459
443
|
|
|
460
|
-
1. **Preload Assets**:
|
|
461
|
-
2. **Optimize**:
|
|
462
|
-
3. **Timeout**:
|
|
463
|
-
4. **Async**:
|
|
464
|
-
5. **Minimal**:
|
|
444
|
+
1. **Preload Assets**: Preload assets during splash
|
|
445
|
+
2. **Optimize**: Optimize logo size
|
|
446
|
+
3. **Timeout**: Set maximum duration
|
|
447
|
+
4. **Async**: Run async operations in parallel
|
|
448
|
+
5. **Minimal**: Avoid unnecessary components
|
|
465
449
|
|
|
466
|
-
##
|
|
450
|
+
## Related Components
|
|
467
451
|
|
|
468
|
-
- [`AtomicSpinner`](../../atoms/AtomicSpinner/README.md) -
|
|
469
|
-
- [`AtomicText`](../../atoms/AtomicText/README.md) -
|
|
470
|
-
- [`BaseModal`](../BaseModal/README.md) - Modal
|
|
452
|
+
- [`AtomicSpinner`](../../atoms/AtomicSpinner/README.md) - Loading indicator
|
|
453
|
+
- [`AtomicText`](../../atoms/AtomicText/README.md) - Text component
|
|
454
|
+
- [`BaseModal`](../BaseModal/README.md) - Modal component
|
|
471
455
|
|
|
472
|
-
##
|
|
456
|
+
## License
|
|
473
457
|
|
|
474
458
|
MIT
|