@rubixscript/react-native-onboarding 1.0.1 → 1.1.1

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.
Files changed (37) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +383 -383
  3. package/dist/components/NavigationButtons.js +17 -17
  4. package/dist/components/Onboarding.js +16 -16
  5. package/dist/components/Pagination.js +30 -30
  6. package/dist/components/SimpleOnboardingScreen.d.ts +54 -0
  7. package/dist/components/SimpleOnboardingScreen.d.ts.map +1 -0
  8. package/dist/components/SimpleOnboardingScreen.js +184 -0
  9. package/dist/components/index.d.ts +2 -0
  10. package/dist/components/index.d.ts.map +1 -1
  11. package/dist/components/index.js +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -0
  15. package/dist/presets/index.d.ts.map +1 -1
  16. package/dist/presets/index.js +24 -27
  17. package/dist/slides/FormSlide.js +37 -37
  18. package/dist/slides/IconSlide.js +24 -24
  19. package/dist/slides/ImageSlide.js +20 -20
  20. package/dist/slides/VideoSlide.js +20 -20
  21. package/dist/themes/index.d.ts.map +1 -1
  22. package/dist/themes/index.js +9 -7
  23. package/package.json +71 -66
  24. package/src/components/NavigationButtons.tsx +198 -198
  25. package/src/components/Onboarding.tsx +337 -337
  26. package/src/components/Pagination.tsx +337 -337
  27. package/src/components/SimpleOnboardingScreen.tsx +266 -0
  28. package/src/components/index.ts +7 -5
  29. package/src/index.ts +69 -65
  30. package/src/presets/index.ts +391 -394
  31. package/src/slides/FormSlide.tsx +314 -314
  32. package/src/slides/IconSlide.tsx +166 -166
  33. package/src/slides/ImageSlide.tsx +132 -132
  34. package/src/slides/VideoSlide.tsx +146 -146
  35. package/src/slides/index.tsx +37 -37
  36. package/src/themes/index.ts +576 -574
  37. package/src/types/index.ts +247 -247
@@ -1,574 +1,576 @@
1
- import { Platform, StyleSheet } from 'react-native';
2
- import { OnboardingTheme, PresetConfig } from '../types';
3
-
4
- // ============================================================================
5
- // BASE THEME UTILITIES
6
- // ============================================================================
7
-
8
- const createBaseTypography = () => ({
9
- title: {
10
- fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
11
- fontWeight: '700' as const,
12
- letterSpacing: -0.5,
13
- },
14
- description: {
15
- fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
16
- fontWeight: '400' as const,
17
- lineHeight: 24,
18
- },
19
- button: {
20
- fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
21
- fontWeight: '600' as const,
22
- letterSpacing: 0.5,
23
- },
24
- label: {
25
- fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
26
- fontWeight: '500' as const,
27
- },
28
- });
29
-
30
- const createSpacing = () => ({
31
- xs: 4,
32
- sm: 8,
33
- md: 16,
34
- lg: 24,
35
- xl: 32,
36
- xxl: 48,
37
- });
38
-
39
- const createBorderRadius = () => ({
40
- sm: 4,
41
- md: 12,
42
- lg: 16,
43
- xl: 24,
44
- full: 9999,
45
- });
46
-
47
- const createShadows = () => ({
48
- sm: {
49
- ...Platform.select({
50
- ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.1, shadowRadius: 2 },
51
- android: { elevation: 2 },
52
- }),
53
- },
54
- md: {
55
- ...Platform.select({
56
- ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 4 },
57
- android: { elevation: 4 },
58
- }),
59
- },
60
- lg: {
61
- ...Platform.select({
62
- ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.2, shadowRadius: 8 },
63
- android: { elevation: 8 },
64
- }),
65
- },
66
- });
67
-
68
- // ============================================================================
69
- // ONEPAGE THEME
70
- // ============================================================================
71
-
72
- export const onepageTheme: OnboardingTheme = {
73
- colors: {
74
- primary: '#667EEA',
75
- secondary: '#06D6A0',
76
- background: '#F8FAFC',
77
- surface: '#FFFFFF',
78
- text: {
79
- primary: '#1E293B',
80
- secondary: '#64748B',
81
- inverse: '#FFFFFF',
82
- },
83
- border: '#E2E8F0',
84
- overlay: 'rgba(0, 0, 0, 0.1)',
85
- },
86
- typography: {
87
- title: {
88
- ...createBaseTypography().title,
89
- fontSize: 28,
90
- color: '#1E293B',
91
- },
92
- description: {
93
- ...createBaseTypography().description,
94
- fontSize: 15,
95
- color: '#64748B',
96
- },
97
- button: {
98
- ...createBaseTypography().button,
99
- fontSize: 16,
100
- color: '#FFFFFF',
101
- },
102
- label: {
103
- ...createBaseTypography().label,
104
- fontSize: 14,
105
- color: '#475569',
106
- },
107
- },
108
- spacing: createSpacing(),
109
- borderRadius: createBorderRadius(),
110
- shadows: createShadows(),
111
- };
112
-
113
- export const onepagePreset: PresetConfig = {
114
- theme: onepageTheme,
115
- navigation: {
116
- style: 'dots',
117
- position: 'bottom',
118
- showSkip: true,
119
- showBack: true,
120
- skipLabel: 'Skip',
121
- backLabel: 'Back',
122
- nextLabel: 'Next',
123
- doneLabel: "Let's Get Started",
124
- },
125
- animation: {
126
- type: 'slide',
127
- duration: 300,
128
- },
129
- defaultSlideStyles: {
130
- image: {
131
- width: '100%',
132
- height: 280,
133
- borderRadius: 16,
134
- marginBottom: 24,
135
- },
136
- title: {
137
- fontSize: 24,
138
- marginBottom: 12,
139
- textAlign: 'center',
140
- },
141
- description: {
142
- fontSize: 15,
143
- textAlign: 'center',
144
- paddingHorizontal: 32,
145
- lineHeight: 22,
146
- },
147
- },
148
- };
149
-
150
- // ============================================================================
151
- // ZAPRECIPE THEME
152
- // ============================================================================
153
-
154
- export const zaprecipeTheme: OnboardingTheme = {
155
- colors: {
156
- primary: '#6B4EFF',
157
- secondary: '#FF8C42',
158
- background: '#FFFFFF',
159
- surface: '#FFFFFF',
160
- text: {
161
- primary: '#1E293B',
162
- secondary: '#64748B',
163
- inverse: '#FFFFFF',
164
- },
165
- border: '#E2E8F0',
166
- overlay: 'rgba(255, 255, 255, 0.2)',
167
- },
168
- typography: {
169
- title: {
170
- ...createBaseTypography().title,
171
- fontSize: 32,
172
- color: '#FFFFFF',
173
- },
174
- description: {
175
- ...createBaseTypography().description,
176
- fontSize: 16,
177
- color: 'rgba(255, 255, 255, 0.9)',
178
- },
179
- button: {
180
- ...createBaseTypography().button,
181
- fontSize: 16,
182
- color: '#FFFFFF',
183
- },
184
- label: {
185
- ...createBaseTypography().label,
186
- fontSize: 14,
187
- color: '#FFFFFF',
188
- },
189
- },
190
- spacing: createSpacing(),
191
- borderRadius: createBorderRadius(),
192
- shadows: createShadows(),
193
- };
194
-
195
- export const zaprecipePreset: PresetConfig = {
196
- theme: zaprecipeTheme,
197
- navigation: {
198
- style: 'dots',
199
- position: 'floating',
200
- showSkip: true,
201
- showBack: true,
202
- skipLabel: 'Skip',
203
- backLabel: 'Back',
204
- nextLabel: 'Continue',
205
- doneLabel: "Let's Start Cooking!",
206
- },
207
- animation: {
208
- type: 'fade',
209
- duration: 250,
210
- },
211
- defaultSlideStyles: {
212
- image: {
213
- width: '100%',
214
- height: 300,
215
- borderRadius: 0,
216
- marginBottom: 0,
217
- },
218
- title: {
219
- fontSize: 28,
220
- marginBottom: 16,
221
- textAlign: 'center',
222
- },
223
- description: {
224
- fontSize: 15,
225
- textAlign: 'center',
226
- paddingHorizontal: 24,
227
- lineHeight: 22,
228
- },
229
- },
230
- };
231
-
232
- // ============================================================================
233
- // POMODO THEME
234
- // ============================================================================
235
-
236
- export const pomodoTheme: OnboardingTheme = {
237
- colors: {
238
- primary: '#FF6B6B',
239
- secondary: '#667EEA',
240
- background: '#F6F6F6',
241
- surface: '#FFFFFF',
242
- text: {
243
- primary: '#1E293B',
244
- secondary: '#64748B',
245
- inverse: '#FFFFFF',
246
- },
247
- border: '#E2E8F0',
248
- overlay: 'rgba(0, 0, 0, 0.05)',
249
- },
250
- typography: {
251
- title: {
252
- ...createBaseTypography().title,
253
- fontSize: 24,
254
- color: '#1E293B',
255
- },
256
- description: {
257
- ...createBaseTypography().description,
258
- fontSize: 14,
259
- color: '#64748B',
260
- },
261
- button: {
262
- ...createBaseTypography().button,
263
- fontSize: 16,
264
- color: '#FFFFFF',
265
- },
266
- },
267
- spacing: createSpacing(),
268
- borderRadius: createBorderRadius(),
269
- shadows: createShadows(),
270
- };
271
-
272
- export const pomodoPreset: PresetConfig = {
273
- theme: pomodoTheme,
274
- navigation: {
275
- style: 'dots',
276
- position: 'bottom',
277
- showSkip: false,
278
- showBack: false,
279
- nextLabel: 'Next',
280
- doneLabel: 'Get Started',
281
- },
282
- animation: {
283
- type: 'fade',
284
- duration: 500,
285
- },
286
- defaultSlideStyles: {
287
- icon: {
288
- width: 160,
289
- height: 160,
290
- borderRadius: 80,
291
- justifyContent: 'center',
292
- alignItems: 'center',
293
- marginBottom: 24,
294
- },
295
- title: {
296
- fontSize: 22,
297
- marginBottom: 12,
298
- textAlign: 'center',
299
- fontWeight: '600',
300
- },
301
- description: {
302
- fontSize: 14,
303
- textAlign: 'center',
304
- paddingHorizontal: 32,
305
- lineHeight: 20,
306
- },
307
- },
308
- };
309
-
310
- // ============================================================================
311
- // MODERN THEME
312
- // ============================================================================
313
-
314
- export const modernTheme: OnboardingTheme = {
315
- colors: {
316
- primary: '#8B5CF6',
317
- secondary: '#EC4899',
318
- background: '#FFFFFF',
319
- surface: '#F9FAFB',
320
- text: {
321
- primary: '#111827',
322
- secondary: '#6B7280',
323
- inverse: '#FFFFFF',
324
- },
325
- border: '#E5E7EB',
326
- overlay: 'rgba(0, 0, 0, 0.05)',
327
- },
328
- typography: {
329
- title: {
330
- ...createBaseTypography().title,
331
- fontSize: 30,
332
- color: '#111827',
333
- },
334
- description: {
335
- ...createBaseTypography().description,
336
- fontSize: 16,
337
- color: '#6B7280',
338
- },
339
- button: {
340
- ...createBaseTypography().button,
341
- fontSize: 16,
342
- color: '#FFFFFF',
343
- },
344
- },
345
- spacing: createSpacing(),
346
- borderRadius: createBorderRadius(),
347
- shadows: createShadows(),
348
- };
349
-
350
- export const modernPreset: PresetConfig = {
351
- theme: modernTheme,
352
- navigation: {
353
- style: 'progress-bar',
354
- position: 'top',
355
- showSkip: true,
356
- showBack: true,
357
- skipLabel: 'Skip',
358
- backLabel: 'Back',
359
- nextLabel: 'Next',
360
- doneLabel: 'Get Started',
361
- },
362
- animation: {
363
- type: 'slide',
364
- duration: 350,
365
- },
366
- defaultSlideStyles: {
367
- title: {
368
- fontSize: 28,
369
- marginBottom: 16,
370
- fontWeight: '700',
371
- },
372
- description: {
373
- fontSize: 16,
374
- lineHeight: 24,
375
- },
376
- },
377
- };
378
-
379
- // ============================================================================
380
- // MINIMAL THEME
381
- // ============================================================================
382
-
383
- export const minimalTheme: OnboardingTheme = {
384
- colors: {
385
- primary: '#111827',
386
- secondary: '#6B7280',
387
- background: '#FFFFFF',
388
- surface: '#FFFFFF',
389
- text: {
390
- primary: '#111827',
391
- secondary: '#6B7280',
392
- inverse: '#FFFFFF',
393
- },
394
- border: '#E5E7EB',
395
- },
396
- typography: {
397
- title: {
398
- ...createBaseTypography().title,
399
- fontSize: 24,
400
- color: '#111827',
401
- },
402
- description: {
403
- ...createBaseTypography().description,
404
- fontSize: 15,
405
- color: '#6B7280',
406
- },
407
- button: {
408
- ...createBaseTypography().button,
409
- fontSize: 15,
410
- color: '#FFFFFF',
411
- },
412
- },
413
- spacing: createSpacing(),
414
- borderRadius: createBorderRadius(),
415
- shadows: createShadows(),
416
- };
417
-
418
- export const minimalPreset: PresetConfig = {
419
- theme: minimalTheme,
420
- navigation: {
421
- style: 'steps',
422
- position: 'bottom',
423
- showSkip: true,
424
- showBack: false,
425
- skipLabel: 'Skip',
426
- nextLabel: 'Next',
427
- doneLabel: 'Start',
428
- },
429
- animation: {
430
- type: 'fade',
431
- duration: 200,
432
- },
433
- defaultSlideStyles: {
434
- title: {
435
- fontSize: 22,
436
- marginBottom: 8,
437
- fontWeight: '600',
438
- },
439
- description: {
440
- fontSize: 14,
441
- lineHeight: 20,
442
- },
443
- },
444
- };
445
-
446
- // ============================================================================
447
- // GRADIENT THEME
448
- // ============================================================================
449
-
450
- export const gradientTheme: OnboardingTheme = {
451
- colors: {
452
- primary: '#667EEA',
453
- secondary: '#764BA2',
454
- background: '#667EEA',
455
- surface: 'rgba(255, 255, 255, 0.15)',
456
- text: {
457
- primary: '#FFFFFF',
458
- secondary: 'rgba(255, 255, 255, 0.8)',
459
- inverse: '#FFFFFF',
460
- },
461
- border: 'rgba(255, 255, 255, 0.2)',
462
- overlay: 'rgba(255, 255, 255, 0.1)',
463
- },
464
- typography: {
465
- title: {
466
- ...createBaseTypography().title,
467
- fontSize: 32,
468
- color: '#FFFFFF',
469
- },
470
- description: {
471
- ...createBaseTypography().description,
472
- fontSize: 16,
473
- color: 'rgba(255, 255, 255, 0.9)',
474
- },
475
- button: {
476
- ...createBaseTypography().button,
477
- fontSize: 16,
478
- color: '#FFFFFF',
479
- },
480
- },
481
- spacing: createSpacing(),
482
- borderRadius: createBorderRadius(),
483
- shadows: createShadows(),
484
- };
485
-
486
- export const gradientPreset: PresetConfig = {
487
- theme: gradientTheme,
488
- navigation: {
489
- style: 'dots',
490
- position: 'floating',
491
- showSkip: true,
492
- showBack: true,
493
- skipLabel: 'Skip',
494
- backLabel: 'Back',
495
- nextLabel: 'Next',
496
- doneLabel: 'Get Started',
497
- },
498
- animation: {
499
- type: 'parallax',
500
- duration: 400,
501
- parallaxFactor: 0.3,
502
- },
503
- defaultSlideStyles: {
504
- title: {
505
- fontSize: 28,
506
- marginBottom: 16,
507
- textAlign: 'center',
508
- },
509
- description: {
510
- fontSize: 15,
511
- textAlign: 'center',
512
- paddingHorizontal: 24,
513
- lineHeight: 22,
514
- },
515
- },
516
- };
517
-
518
- // ============================================================================
519
- // THEME GETTERS
520
- // ============================================================================
521
-
522
- export const getTheme = (preset: string): OnboardingTheme => {
523
- const themes: Record<string, OnboardingTheme> = {
524
- onepage: onepageTheme,
525
- zaprecipe: zaprecipeTheme,
526
- pomodo: pomodoTheme,
527
- modern: modernTheme,
528
- minimal: minimalTheme,
529
- gradient: gradientTheme,
530
- };
531
- return themes[preset] || modernTheme;
532
- };
533
-
534
- export const getPreset = (preset: string): PresetConfig => {
535
- const presets: Record<string, PresetConfig> = {
536
- onepage: onepagePreset,
537
- zaprecipe: zaprecipePreset,
538
- pomodo: pomodoPreset,
539
- modern: modernPreset,
540
- minimal: minimalPreset,
541
- gradient: gradientPreset,
542
- };
543
- return presets[preset] || modernPreset;
544
- };
545
-
546
- export const mergeTheme = (base: OnboardingTheme, custom?: Partial<OnboardingTheme>): OnboardingTheme => {
547
- if (!custom) return base;
548
-
549
- return {
550
- colors: { ...base.colors, ...custom.colors, text: { ...base.colors.text, ...custom.colors?.text } },
551
- typography: { ...base.typography, ...custom.typography },
552
- spacing: { ...base.spacing, ...custom.spacing },
553
- borderRadius: { ...base.borderRadius, ...custom.borderRadius },
554
- shadows: { ...base.shadows, ...custom.shadows },
555
- };
556
- };
557
-
558
- export default {
559
- onepageTheme,
560
- zaprecipeTheme,
561
- pomodoTheme,
562
- modernTheme,
563
- minimalTheme,
564
- gradientTheme,
565
- onepagePreset,
566
- zaprecipePreset,
567
- pomodoPreset,
568
- modernPreset,
569
- minimalPreset,
570
- gradientPreset,
571
- getTheme,
572
- getPreset,
573
- mergeTheme,
574
- };
1
+ import { Platform, StyleSheet } from 'react-native';
2
+ import { OnboardingTheme, PresetConfig } from '../types';
3
+
4
+ // ============================================================================
5
+ // BASE THEME UTILITIES
6
+ // ============================================================================
7
+
8
+ const createBaseTypography = () => ({
9
+ title: {
10
+ fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
11
+ fontWeight: '700' as const,
12
+ letterSpacing: -0.5,
13
+ },
14
+ description: {
15
+ fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
16
+ fontWeight: '400' as const,
17
+ lineHeight: 24,
18
+ },
19
+ button: {
20
+ fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
21
+ fontWeight: '600' as const,
22
+ letterSpacing: 0.5,
23
+ },
24
+ label: {
25
+ fontFamily: Platform.select({ ios: 'System', android: 'Roboto' }),
26
+ fontWeight: '500' as const,
27
+ },
28
+ });
29
+
30
+ const createSpacing = () => ({
31
+ xs: 4,
32
+ sm: 8,
33
+ md: 16,
34
+ lg: 24,
35
+ xl: 32,
36
+ xxl: 48,
37
+ });
38
+
39
+ const createBorderRadius = () => ({
40
+ sm: 4,
41
+ md: 12,
42
+ lg: 16,
43
+ xl: 24,
44
+ full: 9999,
45
+ });
46
+
47
+ const createShadows = () => ({
48
+ sm: {
49
+ ...Platform.select({
50
+ ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.1, shadowRadius: 2 },
51
+ android: { elevation: 2 },
52
+ }),
53
+ },
54
+ md: {
55
+ ...Platform.select({
56
+ ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 4 },
57
+ android: { elevation: 4 },
58
+ }),
59
+ },
60
+ lg: {
61
+ ...Platform.select({
62
+ ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.2, shadowRadius: 8 },
63
+ android: { elevation: 8 },
64
+ }),
65
+ },
66
+ });
67
+
68
+ // ============================================================================
69
+ // ONEPAGE THEME
70
+ // ============================================================================
71
+
72
+ export const onepageTheme: OnboardingTheme = {
73
+ colors: {
74
+ primary: '#667EEA',
75
+ secondary: '#06D6A0',
76
+ background: '#F8FAFC',
77
+ surface: '#FFFFFF',
78
+ text: {
79
+ primary: '#1E293B',
80
+ secondary: '#64748B',
81
+ inverse: '#FFFFFF',
82
+ },
83
+ border: '#E2E8F0',
84
+ overlay: 'rgba(0, 0, 0, 0.1)',
85
+ },
86
+ typography: {
87
+ title: {
88
+ ...createBaseTypography().title,
89
+ fontSize: 28,
90
+ color: '#1E293B',
91
+ },
92
+ description: {
93
+ ...createBaseTypography().description,
94
+ fontSize: 15,
95
+ color: '#64748B',
96
+ },
97
+ button: {
98
+ ...createBaseTypography().button,
99
+ fontSize: 16,
100
+ color: '#FFFFFF',
101
+ },
102
+ label: {
103
+ ...createBaseTypography().label,
104
+ fontSize: 14,
105
+ color: '#475569',
106
+ },
107
+ },
108
+ spacing: createSpacing(),
109
+ borderRadius: createBorderRadius(),
110
+ shadows: createShadows(),
111
+ };
112
+
113
+ export const onepagePreset: PresetConfig = {
114
+ theme: onepageTheme,
115
+ navigation: {
116
+ style: 'dots',
117
+ position: 'bottom',
118
+ showSkip: true,
119
+ showBack: true,
120
+ skipLabel: 'Skip',
121
+ backLabel: 'Back',
122
+ nextLabel: 'Next',
123
+ doneLabel: "Let's Get Started",
124
+ },
125
+ animation: {
126
+ type: 'slide',
127
+ duration: 300,
128
+ },
129
+ defaultSlideStyles: {
130
+ image: {
131
+ width: '100%',
132
+ height: 280,
133
+ borderRadius: 16,
134
+ marginBottom: 24,
135
+ },
136
+ title: {
137
+ fontSize: 24,
138
+ marginBottom: 12,
139
+ textAlign: 'center',
140
+ },
141
+ description: {
142
+ fontSize: 15,
143
+ textAlign: 'center',
144
+ paddingHorizontal: 32,
145
+ lineHeight: 22,
146
+ },
147
+ },
148
+ };
149
+
150
+ // ============================================================================
151
+ // ZAPRECIPE THEME
152
+ // ============================================================================
153
+
154
+ export const zaprecipeTheme: OnboardingTheme = {
155
+ colors: {
156
+ primary: '#6B4EFF',
157
+ secondary: '#FF8C42',
158
+ background: '#FFFFFF',
159
+ surface: '#FFFFFF',
160
+ text: {
161
+ primary: '#1E293B',
162
+ secondary: '#64748B',
163
+ inverse: '#FFFFFF',
164
+ },
165
+ border: '#E2E8F0',
166
+ overlay: 'rgba(255, 255, 255, 0.2)',
167
+ },
168
+ typography: {
169
+ title: {
170
+ ...createBaseTypography().title,
171
+ fontSize: 32,
172
+ color: '#FFFFFF',
173
+ },
174
+ description: {
175
+ ...createBaseTypography().description,
176
+ fontSize: 16,
177
+ color: 'rgba(255, 255, 255, 0.9)',
178
+ },
179
+ button: {
180
+ ...createBaseTypography().button,
181
+ fontSize: 16,
182
+ color: '#FFFFFF',
183
+ },
184
+ label: {
185
+ ...createBaseTypography().label,
186
+ fontSize: 14,
187
+ color: '#FFFFFF',
188
+ },
189
+ },
190
+ spacing: createSpacing(),
191
+ borderRadius: createBorderRadius(),
192
+ shadows: createShadows(),
193
+ };
194
+
195
+ export const zaprecipePreset: PresetConfig = {
196
+ theme: zaprecipeTheme,
197
+ navigation: {
198
+ style: 'dots',
199
+ position: 'floating',
200
+ showSkip: true,
201
+ showBack: true,
202
+ skipLabel: 'Skip',
203
+ backLabel: 'Back',
204
+ nextLabel: 'Continue',
205
+ doneLabel: "Let's Start Cooking!",
206
+ },
207
+ animation: {
208
+ type: 'fade',
209
+ duration: 250,
210
+ },
211
+ defaultSlideStyles: {
212
+ image: {
213
+ width: '100%',
214
+ height: 300,
215
+ borderRadius: 0,
216
+ marginBottom: 0,
217
+ },
218
+ title: {
219
+ fontSize: 28,
220
+ marginBottom: 16,
221
+ textAlign: 'center',
222
+ },
223
+ description: {
224
+ fontSize: 15,
225
+ textAlign: 'center',
226
+ paddingHorizontal: 24,
227
+ lineHeight: 22,
228
+ },
229
+ },
230
+ };
231
+
232
+ // ============================================================================
233
+ // POMODO THEME
234
+ // ============================================================================
235
+
236
+ export const pomodoTheme: OnboardingTheme = {
237
+ colors: {
238
+ primary: '#FF6B6B',
239
+ secondary: '#667EEA',
240
+ background: '#F6F6F6',
241
+ surface: '#FFFFFF',
242
+ text: {
243
+ primary: '#1E293B',
244
+ secondary: '#64748B',
245
+ inverse: '#FFFFFF',
246
+ },
247
+ border: '#E2E8F0',
248
+ overlay: 'rgba(0, 0, 0, 0.05)',
249
+ },
250
+ typography: {
251
+ title: {
252
+ ...createBaseTypography().title,
253
+ fontSize: 24,
254
+ color: '#1E293B',
255
+ },
256
+ description: {
257
+ ...createBaseTypography().description,
258
+ fontSize: 14,
259
+ color: '#64748B',
260
+ },
261
+ button: {
262
+ ...createBaseTypography().button,
263
+ fontSize: 16,
264
+ color: '#FFFFFF',
265
+ },
266
+ },
267
+ spacing: createSpacing(),
268
+ borderRadius: createBorderRadius(),
269
+ shadows: createShadows(),
270
+ };
271
+
272
+ export const pomodoPreset: PresetConfig = {
273
+ theme: pomodoTheme,
274
+ navigation: {
275
+ style: 'dots',
276
+ position: 'bottom',
277
+ showSkip: false,
278
+ showBack: false,
279
+ nextLabel: 'Next',
280
+ doneLabel: 'Get Started',
281
+ },
282
+ animation: {
283
+ type: 'fade',
284
+ duration: 500,
285
+ },
286
+ defaultSlideStyles: {
287
+ icon: {
288
+ width: 160,
289
+ height: 160,
290
+ borderRadius: 80,
291
+ justifyContent: 'center',
292
+ alignItems: 'center',
293
+ marginBottom: 40,
294
+ },
295
+ title: {
296
+ fontSize: 28,
297
+ marginBottom: 16,
298
+ textAlign: 'center',
299
+ fontWeight: '700',
300
+ color: '#000000',
301
+ },
302
+ description: {
303
+ fontSize: 17,
304
+ textAlign: 'center',
305
+ paddingHorizontal: 40,
306
+ lineHeight: 24,
307
+ color: '#666666',
308
+ },
309
+ },
310
+ };
311
+
312
+ // ============================================================================
313
+ // MODERN THEME
314
+ // ============================================================================
315
+
316
+ export const modernTheme: OnboardingTheme = {
317
+ colors: {
318
+ primary: '#8B5CF6',
319
+ secondary: '#EC4899',
320
+ background: '#FFFFFF',
321
+ surface: '#F9FAFB',
322
+ text: {
323
+ primary: '#111827',
324
+ secondary: '#6B7280',
325
+ inverse: '#FFFFFF',
326
+ },
327
+ border: '#E5E7EB',
328
+ overlay: 'rgba(0, 0, 0, 0.05)',
329
+ },
330
+ typography: {
331
+ title: {
332
+ ...createBaseTypography().title,
333
+ fontSize: 30,
334
+ color: '#111827',
335
+ },
336
+ description: {
337
+ ...createBaseTypography().description,
338
+ fontSize: 16,
339
+ color: '#6B7280',
340
+ },
341
+ button: {
342
+ ...createBaseTypography().button,
343
+ fontSize: 16,
344
+ color: '#FFFFFF',
345
+ },
346
+ },
347
+ spacing: createSpacing(),
348
+ borderRadius: createBorderRadius(),
349
+ shadows: createShadows(),
350
+ };
351
+
352
+ export const modernPreset: PresetConfig = {
353
+ theme: modernTheme,
354
+ navigation: {
355
+ style: 'progress-bar',
356
+ position: 'top',
357
+ showSkip: true,
358
+ showBack: true,
359
+ skipLabel: 'Skip',
360
+ backLabel: 'Back',
361
+ nextLabel: 'Next',
362
+ doneLabel: 'Get Started',
363
+ },
364
+ animation: {
365
+ type: 'slide',
366
+ duration: 350,
367
+ },
368
+ defaultSlideStyles: {
369
+ title: {
370
+ fontSize: 28,
371
+ marginBottom: 16,
372
+ fontWeight: '700',
373
+ },
374
+ description: {
375
+ fontSize: 16,
376
+ lineHeight: 24,
377
+ },
378
+ },
379
+ };
380
+
381
+ // ============================================================================
382
+ // MINIMAL THEME
383
+ // ============================================================================
384
+
385
+ export const minimalTheme: OnboardingTheme = {
386
+ colors: {
387
+ primary: '#111827',
388
+ secondary: '#6B7280',
389
+ background: '#FFFFFF',
390
+ surface: '#FFFFFF',
391
+ text: {
392
+ primary: '#111827',
393
+ secondary: '#6B7280',
394
+ inverse: '#FFFFFF',
395
+ },
396
+ border: '#E5E7EB',
397
+ },
398
+ typography: {
399
+ title: {
400
+ ...createBaseTypography().title,
401
+ fontSize: 24,
402
+ color: '#111827',
403
+ },
404
+ description: {
405
+ ...createBaseTypography().description,
406
+ fontSize: 15,
407
+ color: '#6B7280',
408
+ },
409
+ button: {
410
+ ...createBaseTypography().button,
411
+ fontSize: 15,
412
+ color: '#FFFFFF',
413
+ },
414
+ },
415
+ spacing: createSpacing(),
416
+ borderRadius: createBorderRadius(),
417
+ shadows: createShadows(),
418
+ };
419
+
420
+ export const minimalPreset: PresetConfig = {
421
+ theme: minimalTheme,
422
+ navigation: {
423
+ style: 'steps',
424
+ position: 'bottom',
425
+ showSkip: true,
426
+ showBack: false,
427
+ skipLabel: 'Skip',
428
+ nextLabel: 'Next',
429
+ doneLabel: 'Start',
430
+ },
431
+ animation: {
432
+ type: 'fade',
433
+ duration: 200,
434
+ },
435
+ defaultSlideStyles: {
436
+ title: {
437
+ fontSize: 22,
438
+ marginBottom: 8,
439
+ fontWeight: '600',
440
+ },
441
+ description: {
442
+ fontSize: 14,
443
+ lineHeight: 20,
444
+ },
445
+ },
446
+ };
447
+
448
+ // ============================================================================
449
+ // GRADIENT THEME
450
+ // ============================================================================
451
+
452
+ export const gradientTheme: OnboardingTheme = {
453
+ colors: {
454
+ primary: '#667EEA',
455
+ secondary: '#764BA2',
456
+ background: '#667EEA',
457
+ surface: 'rgba(255, 255, 255, 0.15)',
458
+ text: {
459
+ primary: '#FFFFFF',
460
+ secondary: 'rgba(255, 255, 255, 0.8)',
461
+ inverse: '#FFFFFF',
462
+ },
463
+ border: 'rgba(255, 255, 255, 0.2)',
464
+ overlay: 'rgba(255, 255, 255, 0.1)',
465
+ },
466
+ typography: {
467
+ title: {
468
+ ...createBaseTypography().title,
469
+ fontSize: 32,
470
+ color: '#FFFFFF',
471
+ },
472
+ description: {
473
+ ...createBaseTypography().description,
474
+ fontSize: 16,
475
+ color: 'rgba(255, 255, 255, 0.9)',
476
+ },
477
+ button: {
478
+ ...createBaseTypography().button,
479
+ fontSize: 16,
480
+ color: '#FFFFFF',
481
+ },
482
+ },
483
+ spacing: createSpacing(),
484
+ borderRadius: createBorderRadius(),
485
+ shadows: createShadows(),
486
+ };
487
+
488
+ export const gradientPreset: PresetConfig = {
489
+ theme: gradientTheme,
490
+ navigation: {
491
+ style: 'dots',
492
+ position: 'floating',
493
+ showSkip: true,
494
+ showBack: true,
495
+ skipLabel: 'Skip',
496
+ backLabel: 'Back',
497
+ nextLabel: 'Next',
498
+ doneLabel: 'Get Started',
499
+ },
500
+ animation: {
501
+ type: 'parallax',
502
+ duration: 400,
503
+ parallaxFactor: 0.3,
504
+ },
505
+ defaultSlideStyles: {
506
+ title: {
507
+ fontSize: 28,
508
+ marginBottom: 16,
509
+ textAlign: 'center',
510
+ },
511
+ description: {
512
+ fontSize: 15,
513
+ textAlign: 'center',
514
+ paddingHorizontal: 24,
515
+ lineHeight: 22,
516
+ },
517
+ },
518
+ };
519
+
520
+ // ============================================================================
521
+ // THEME GETTERS
522
+ // ============================================================================
523
+
524
+ export const getTheme = (preset: string): OnboardingTheme => {
525
+ const themes: Record<string, OnboardingTheme> = {
526
+ onepage: onepageTheme,
527
+ zaprecipe: zaprecipeTheme,
528
+ pomodo: pomodoTheme,
529
+ modern: modernTheme,
530
+ minimal: minimalTheme,
531
+ gradient: gradientTheme,
532
+ };
533
+ return themes[preset] || modernTheme;
534
+ };
535
+
536
+ export const getPreset = (preset: string): PresetConfig => {
537
+ const presets: Record<string, PresetConfig> = {
538
+ onepage: onepagePreset,
539
+ zaprecipe: zaprecipePreset,
540
+ pomodo: pomodoPreset,
541
+ modern: modernPreset,
542
+ minimal: minimalPreset,
543
+ gradient: gradientPreset,
544
+ };
545
+ return presets[preset] || modernPreset;
546
+ };
547
+
548
+ export const mergeTheme = (base: OnboardingTheme, custom?: Partial<OnboardingTheme>): OnboardingTheme => {
549
+ if (!custom) return base;
550
+
551
+ return {
552
+ colors: { ...base.colors, ...custom.colors, text: { ...base.colors.text, ...custom.colors?.text } },
553
+ typography: { ...base.typography, ...custom.typography },
554
+ spacing: { ...base.spacing, ...custom.spacing },
555
+ borderRadius: { ...base.borderRadius, ...custom.borderRadius },
556
+ shadows: { ...base.shadows, ...custom.shadows },
557
+ };
558
+ };
559
+
560
+ export default {
561
+ onepageTheme,
562
+ zaprecipeTheme,
563
+ pomodoTheme,
564
+ modernTheme,
565
+ minimalTheme,
566
+ gradientTheme,
567
+ onepagePreset,
568
+ zaprecipePreset,
569
+ pomodoPreset,
570
+ modernPreset,
571
+ minimalPreset,
572
+ gradientPreset,
573
+ getTheme,
574
+ getPreset,
575
+ mergeTheme,
576
+ };