@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,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,14 +80,12 @@ export const App = () => {
|
|
|
81
80
|
/>
|
|
82
81
|
```
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## Zaman Aşımı
|
|
83
|
+
## Timeout
|
|
87
84
|
|
|
88
85
|
```tsx
|
|
89
86
|
<SplashScreen
|
|
90
87
|
appName="My App"
|
|
91
|
-
tagline="
|
|
88
|
+
tagline="Loading..."
|
|
92
89
|
maxDuration={5000}
|
|
93
90
|
onTimeout={() => {
|
|
94
91
|
console.log('Splash timeout - showing error');
|
|
@@ -100,7 +97,7 @@ export const App = () => {
|
|
|
100
97
|
|
|
101
98
|
## useSplashFlow Hook
|
|
102
99
|
|
|
103
|
-
###
|
|
100
|
+
### Basic Usage
|
|
104
101
|
|
|
105
102
|
```tsx
|
|
106
103
|
import { useSplashFlow } from 'react-native-design-system';
|
|
@@ -116,15 +113,15 @@ export const App = () => {
|
|
|
116
113
|
};
|
|
117
114
|
```
|
|
118
115
|
|
|
119
|
-
### Custom
|
|
116
|
+
### Custom Duration
|
|
120
117
|
|
|
121
118
|
```tsx
|
|
122
119
|
const { isInitialized } = useSplashFlow({
|
|
123
|
-
duration: 3000, // 3
|
|
120
|
+
duration: 3000, // 3 seconds
|
|
124
121
|
});
|
|
125
122
|
```
|
|
126
123
|
|
|
127
|
-
### DeviceEventEmitter
|
|
124
|
+
### DeviceEventEmitter Listening
|
|
128
125
|
|
|
129
126
|
```tsx
|
|
130
127
|
import { DeviceEventEmitter } from 'react-native';
|
|
@@ -142,9 +139,9 @@ useEffect(() => {
|
|
|
142
139
|
}, []);
|
|
143
140
|
```
|
|
144
141
|
|
|
145
|
-
##
|
|
142
|
+
## Example Usages
|
|
146
143
|
|
|
147
|
-
###
|
|
144
|
+
### Basic App Boot
|
|
148
145
|
|
|
149
146
|
```tsx
|
|
150
147
|
export const App = () => {
|
|
@@ -173,7 +170,7 @@ export const App = () => {
|
|
|
173
170
|
<SplashScreen
|
|
174
171
|
icon={require('./assets/logo.png')}
|
|
175
172
|
appName="My App"
|
|
176
|
-
tagline="
|
|
173
|
+
tagline="Loading..."
|
|
177
174
|
visible
|
|
178
175
|
/>
|
|
179
176
|
);
|
|
@@ -183,7 +180,7 @@ export const App = () => {
|
|
|
183
180
|
};
|
|
184
181
|
```
|
|
185
182
|
|
|
186
|
-
### Auth Flow
|
|
183
|
+
### With Auth Flow
|
|
187
184
|
|
|
188
185
|
```tsx
|
|
189
186
|
export const App = () => {
|
|
@@ -203,7 +200,7 @@ export const App = () => {
|
|
|
203
200
|
return (
|
|
204
201
|
<SplashScreen
|
|
205
202
|
appName="My App"
|
|
206
|
-
tagline="
|
|
203
|
+
tagline="Signing in..."
|
|
207
204
|
visible
|
|
208
205
|
/>
|
|
209
206
|
);
|
|
@@ -213,7 +210,7 @@ export const App = () => {
|
|
|
213
210
|
};
|
|
214
211
|
```
|
|
215
212
|
|
|
216
|
-
### Remote Config
|
|
213
|
+
### With Remote Config
|
|
217
214
|
|
|
218
215
|
```tsx
|
|
219
216
|
export const App = () => {
|
|
@@ -232,7 +229,7 @@ export const App = () => {
|
|
|
232
229
|
<SplashScreen
|
|
233
230
|
icon={require('./assets/logo.png')}
|
|
234
231
|
appName="My App"
|
|
235
|
-
tagline="
|
|
232
|
+
tagline="Loading settings..."
|
|
236
233
|
maxDuration={5000}
|
|
237
234
|
onTimeout={() => {
|
|
238
235
|
// Fallback to default config
|
|
@@ -247,7 +244,7 @@ export const App = () => {
|
|
|
247
244
|
};
|
|
248
245
|
```
|
|
249
246
|
|
|
250
|
-
###
|
|
247
|
+
### Animated Splash
|
|
251
248
|
|
|
252
249
|
```tsx
|
|
253
250
|
export const AnimatedSplash = () => {
|
|
@@ -293,10 +290,10 @@ export const MultiStageSplash = () => {
|
|
|
293
290
|
const allReady = Object.values(loadingStage).every(Boolean);
|
|
294
291
|
|
|
295
292
|
const getTagline = () => {
|
|
296
|
-
if (!loadingStage.assets) return '
|
|
297
|
-
if (!loadingStage.auth) return '
|
|
298
|
-
if (!loadingStage.config) return '
|
|
299
|
-
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!';
|
|
300
297
|
};
|
|
301
298
|
|
|
302
299
|
if (!isInitialized || !allReady) {
|
|
@@ -313,7 +310,7 @@ export const MultiStageSplash = () => {
|
|
|
313
310
|
};
|
|
314
311
|
```
|
|
315
312
|
|
|
316
|
-
### Debug
|
|
313
|
+
### Debug Mode
|
|
317
314
|
|
|
318
315
|
```tsx
|
|
319
316
|
export const DebugSplash = () => {
|
|
@@ -352,49 +349,48 @@ export const DebugSplash = () => {
|
|
|
352
349
|
|
|
353
350
|
### SplashScreenProps
|
|
354
351
|
|
|
355
|
-
| Prop |
|
|
356
|
-
|
|
357
|
-
| `icon` | `ImageSourcePropType` | - | Logo/
|
|
358
|
-
| `appName` | `string` | - |
|
|
359
|
-
| `tagline` | `string` | - |
|
|
360
|
-
| `colors` | `SplashColors` | - | Custom
|
|
361
|
-
|
|
362
|
-
| `
|
|
363
|
-
| `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) |
|
|
364
360
|
| `onTimeout` | `() => void` | - | Timeout callback |
|
|
365
361
|
| `onReady` | `() => void` | - | Ready callback |
|
|
366
|
-
| `style` | `ViewStyle` | - |
|
|
362
|
+
| `style` | `ViewStyle` | - | Custom style |
|
|
367
363
|
|
|
368
364
|
### SplashColors
|
|
369
365
|
|
|
370
|
-
| Prop |
|
|
371
|
-
|
|
372
|
-
| `background` | `string` | `tokens.colors.backgroundPrimary` |
|
|
373
|
-
| `text` | `string` | `tokens.colors.textPrimary` |
|
|
374
|
-
| `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 |
|
|
375
371
|
|
|
376
372
|
### useSplashFlow Options
|
|
377
373
|
|
|
378
|
-
| Prop |
|
|
379
|
-
|
|
380
|
-
| `duration` | `number` | `1500` | Splash
|
|
374
|
+
| Prop | Type | Default | Description |
|
|
375
|
+
|------|------|---------|-------------|
|
|
376
|
+
| `duration` | `number` | `1500` | Splash duration (ms) |
|
|
381
377
|
|
|
382
378
|
## Best Practices
|
|
383
379
|
|
|
384
|
-
### 1.
|
|
380
|
+
### 1. Duration Settings
|
|
385
381
|
|
|
386
382
|
```tsx
|
|
387
|
-
//
|
|
383
|
+
// Short
|
|
388
384
|
useSplashFlow({ duration: 1000 })
|
|
389
385
|
|
|
390
|
-
//
|
|
386
|
+
// Medium (recommended)
|
|
391
387
|
useSplashFlow({ duration: 2000 })
|
|
392
388
|
|
|
393
|
-
//
|
|
389
|
+
// Long
|
|
394
390
|
useSplashFlow({ duration: 3000 })
|
|
395
391
|
```
|
|
396
392
|
|
|
397
|
-
### 2. Timeout
|
|
393
|
+
### 2. Timeout Usage
|
|
398
394
|
|
|
399
395
|
```tsx
|
|
400
396
|
<SplashScreen
|
|
@@ -422,7 +418,7 @@ useEffect(() => {
|
|
|
422
418
|
### 4. Theme Awareness
|
|
423
419
|
|
|
424
420
|
```tsx
|
|
425
|
-
// Theme-aware colors (
|
|
421
|
+
// Theme-aware colors (recommended)
|
|
426
422
|
<SplashScreen appName="App" />
|
|
427
423
|
|
|
428
424
|
// Custom colors
|
|
@@ -434,29 +430,29 @@ useEffect(() => {
|
|
|
434
430
|
/>
|
|
435
431
|
```
|
|
436
432
|
|
|
437
|
-
##
|
|
433
|
+
## Accessibility
|
|
438
434
|
|
|
439
|
-
SplashScreen
|
|
435
|
+
SplashScreen provides full accessibility support:
|
|
440
436
|
|
|
441
|
-
- ✅ Screen reader
|
|
437
|
+
- ✅ Screen reader support
|
|
442
438
|
- ✅ Accessibility label
|
|
443
|
-
- ✅ Loading state
|
|
444
|
-
- ✅ Timeout
|
|
439
|
+
- ✅ Loading state announcement
|
|
440
|
+
- ✅ Timeout notification (DEV mode)
|
|
445
441
|
|
|
446
|
-
##
|
|
442
|
+
## Performance Tips
|
|
447
443
|
|
|
448
|
-
1. **Preload Assets**:
|
|
449
|
-
2. **Optimize**:
|
|
450
|
-
3. **Timeout**:
|
|
451
|
-
4. **Async**:
|
|
452
|
-
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
|
|
453
449
|
|
|
454
|
-
##
|
|
450
|
+
## Related Components
|
|
455
451
|
|
|
456
|
-
- [`AtomicSpinner`](../../atoms/AtomicSpinner/README.md) -
|
|
457
|
-
- [`AtomicText`](../../atoms/AtomicText/README.md) -
|
|
458
|
-
- [`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
|
|
459
455
|
|
|
460
|
-
##
|
|
456
|
+
## License
|
|
461
457
|
|
|
462
458
|
MIT
|