@digilogiclabs/saas-factory-ui 1.0.1 → 1.2.0
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/README.md +1072 -1004
- package/dist/index.css.map +1 -1
- package/dist/index.js +5583 -4209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5641 -4203
- package/dist/index.mjs.map +1 -1
- package/dist/motion-presets/motion-presets.js +281 -0
- package/dist/motion-presets/motion-presets.js.map +1 -0
- package/dist/motion-presets/motion-presets.mjs +260 -0
- package/dist/motion-presets/motion-presets.mjs.map +1 -0
- package/dist/native/index.js +1573 -894
- package/dist/native/index.js.map +1 -1
- package/dist/native/index.mjs +1583 -908
- package/dist/native/index.mjs.map +1 -1
- package/dist/web/index.js +5287 -4209
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +5363 -4221
- package/dist/web/index.mjs.map +1 -1
- package/package.json +15 -7
package/README.md
CHANGED
|
@@ -1,1004 +1,1072 @@
|
|
|
1
|
-
# @digilogiclabs/saas-factory-ui
|
|
2
|
-
|
|
3
|
-
A comprehensive cross-platform UI component library built for both **Next.js web applications** and **React Native/Expo mobile applications**. This package provides a complete set of accessible, mobile-optimized components with consistent design across platforms.
|
|
4
|
-
|
|
5
|
-
## 🌟 Features
|
|
6
|
-
|
|
7
|
-
- 🎨 **Cross-Platform Design System**
|
|
8
|
-
- Consistent components for web and mobile
|
|
9
|
-
- Platform-optimized implementations
|
|
10
|
-
- Shared design tokens and theming
|
|
11
|
-
- 🌐 **Web Support**
|
|
12
|
-
- Built with React, Tailwind CSS, Radix UI, and Framer Motion
|
|
13
|
-
- Dark mode support
|
|
14
|
-
- Responsive by default
|
|
15
|
-
- 📱 **React Native Support**
|
|
16
|
-
- Native mobile components with Expo compatibility
|
|
17
|
-
- Platform-specific optimizations
|
|
18
|
-
- Haptic feedback integration
|
|
19
|
-
- ♿️ **Accessibility First**
|
|
20
|
-
- WCAG 2.2 AA compliant components
|
|
21
|
-
- Screen reader support
|
|
22
|
-
- Keyboard navigation and touch alternatives
|
|
23
|
-
- ⚡ **Performance Optimized**
|
|
24
|
-
- Advanced mobile interactions with gesture recognition
|
|
25
|
-
- Lazy loading and progressive image optimization
|
|
26
|
-
- Virtual scrolling for large datasets
|
|
27
|
-
- Network-aware content delivery
|
|
28
|
-
- 🌐 **Offline Support**
|
|
29
|
-
- Comprehensive caching strategies
|
|
30
|
-
- Offline-first component architecture
|
|
31
|
-
- Network detection and graceful degradation
|
|
32
|
-
- 🎯 **Developer Experience**
|
|
33
|
-
- Full TypeScript support
|
|
34
|
-
- Tree-shakeable exports
|
|
35
|
-
- Comprehensive documentation
|
|
36
|
-
- Optimized bundle sizes
|
|
37
|
-
|
|
38
|
-
## 📦 Installation
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm install @digilogiclabs/saas-factory-ui
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## 🚀 Platform Requirements
|
|
45
|
-
|
|
46
|
-
### Web Applications
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
- React
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"./
|
|
80
|
-
"./
|
|
81
|
-
|
|
82
|
-
"./
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
npm install @
|
|
144
|
-
|
|
145
|
-
npm install
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
209
|
-
| **
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- `
|
|
223
|
-
- `
|
|
224
|
-
- `
|
|
225
|
-
- `
|
|
226
|
-
- `
|
|
227
|
-
- `
|
|
228
|
-
- `
|
|
229
|
-
- `
|
|
230
|
-
- `
|
|
231
|
-
- `
|
|
232
|
-
- `
|
|
233
|
-
- `
|
|
234
|
-
- `
|
|
235
|
-
- `
|
|
236
|
-
- `
|
|
237
|
-
- `
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
- `
|
|
242
|
-
- `
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
###
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
|
262
|
-
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
|
272
|
-
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
|
282
|
-
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
- `
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
- `
|
|
398
|
-
- `
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
<
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
threshold={
|
|
465
|
-
|
|
466
|
-
>
|
|
467
|
-
|
|
468
|
-
</
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
```tsx
|
|
477
|
-
// Web
|
|
478
|
-
import {
|
|
479
|
-
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
);
|
|
713
|
-
}
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
-
|
|
892
|
-
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
-
|
|
902
|
-
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
-
|
|
908
|
-
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1
|
+
# @digilogiclabs/saas-factory-ui
|
|
2
|
+
|
|
3
|
+
A comprehensive cross-platform UI component library built for both **Next.js web applications** and **React Native/Expo mobile applications**. This package provides a complete set of accessible, mobile-optimized components with consistent design across platforms.
|
|
4
|
+
|
|
5
|
+
## 🌟 Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **Cross-Platform Design System**
|
|
8
|
+
- Consistent components for web and mobile
|
|
9
|
+
- Platform-optimized implementations
|
|
10
|
+
- Shared design tokens and theming
|
|
11
|
+
- 🌐 **Web Support**
|
|
12
|
+
- Built with React, Tailwind CSS, Radix UI, and Framer Motion
|
|
13
|
+
- Dark mode support
|
|
14
|
+
- Responsive by default
|
|
15
|
+
- 📱 **React Native Support**
|
|
16
|
+
- Native mobile components with Expo compatibility
|
|
17
|
+
- Platform-specific optimizations
|
|
18
|
+
- Haptic feedback integration
|
|
19
|
+
- ♿️ **Accessibility First**
|
|
20
|
+
- WCAG 2.2 AA compliant components
|
|
21
|
+
- Screen reader support
|
|
22
|
+
- Keyboard navigation and touch alternatives
|
|
23
|
+
- ⚡ **Performance Optimized**
|
|
24
|
+
- Advanced mobile interactions with gesture recognition
|
|
25
|
+
- Lazy loading and progressive image optimization
|
|
26
|
+
- Virtual scrolling for large datasets
|
|
27
|
+
- Network-aware content delivery
|
|
28
|
+
- 🌐 **Offline Support**
|
|
29
|
+
- Comprehensive caching strategies
|
|
30
|
+
- Offline-first component architecture
|
|
31
|
+
- Network detection and graceful degradation
|
|
32
|
+
- 🎯 **Developer Experience**
|
|
33
|
+
- Full TypeScript support
|
|
34
|
+
- Tree-shakeable exports
|
|
35
|
+
- Comprehensive documentation
|
|
36
|
+
- Optimized bundle sizes
|
|
37
|
+
|
|
38
|
+
## 📦 Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install @digilogiclabs/saas-factory-ui
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 🚀 Platform Requirements
|
|
45
|
+
|
|
46
|
+
### Web Applications
|
|
47
|
+
|
|
48
|
+
- Node.js >=20.0.0
|
|
49
|
+
- Next.js 15+ or React 19+
|
|
50
|
+
- Tailwind CSS 3.4 or higher
|
|
51
|
+
- TypeScript (recommended)
|
|
52
|
+
|
|
53
|
+
### React Native Applications
|
|
54
|
+
|
|
55
|
+
- Node.js >=20.0.0
|
|
56
|
+
- React Native 0.70 or higher
|
|
57
|
+
- Expo SDK 49 or higher
|
|
58
|
+
- React 19 or higher
|
|
59
|
+
|
|
60
|
+
## 🌐 Web Setup (Next.js)
|
|
61
|
+
|
|
62
|
+
### 1. Install Dependencies
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install @digilogiclabs/saas-factory-ui
|
|
66
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
67
|
+
npx tailwindcss init -p
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 2. Configure Tailwind CSS
|
|
71
|
+
|
|
72
|
+
Update your `tailwind.config.js` to include the component library:
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
// tailwind.config.js
|
|
76
|
+
/** @type {import('tailwindcss').Config} */
|
|
77
|
+
export default {
|
|
78
|
+
content: [
|
|
79
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
80
|
+
"./app/**/*.{js,ts,jsx,tsx}",
|
|
81
|
+
"./pages/**/*.{js,ts,jsx,tsx}",
|
|
82
|
+
"./components/**/*.{js,ts,jsx,tsx}",
|
|
83
|
+
// 🚨 IMPORTANT: Include the UI package
|
|
84
|
+
"./node_modules/@digilogiclabs/saas-factory-ui/**/*.{js,ts,jsx,tsx}",
|
|
85
|
+
],
|
|
86
|
+
theme: {
|
|
87
|
+
extend: {},
|
|
88
|
+
},
|
|
89
|
+
plugins: [],
|
|
90
|
+
};
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 3. Import Styles (REQUIRED)
|
|
94
|
+
|
|
95
|
+
Add the CSS import to your root layout or app file:
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
// app/layout.tsx (Next.js 13+) or pages/_app.tsx (Next.js 12)
|
|
99
|
+
import "@digilogiclabs/saas-factory-ui/styles.css";
|
|
100
|
+
import "./globals.css"; // Your app styles
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 4. Use Components
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import {
|
|
107
|
+
Button,
|
|
108
|
+
Card,
|
|
109
|
+
Container,
|
|
110
|
+
PageTransition,
|
|
111
|
+
SwipeableCard,
|
|
112
|
+
LazyImage,
|
|
113
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
114
|
+
|
|
115
|
+
export default function HomePage() {
|
|
116
|
+
return (
|
|
117
|
+
<PageTransition type="slide" direction="horizontal">
|
|
118
|
+
<Container>
|
|
119
|
+
<Card className="p-6">
|
|
120
|
+
<h1 className="text-2xl font-bold mb-4">Welcome to Web</h1>
|
|
121
|
+
<LazyImage
|
|
122
|
+
src="/hero-image.jpg"
|
|
123
|
+
alt="Hero image"
|
|
124
|
+
className="w-full h-64 object-cover rounded-lg mb-4"
|
|
125
|
+
placeholder="blur"
|
|
126
|
+
webpSupport={true}
|
|
127
|
+
/>
|
|
128
|
+
<Button variant="default" size="lg">
|
|
129
|
+
Get Started
|
|
130
|
+
</Button>
|
|
131
|
+
</Card>
|
|
132
|
+
</Container>
|
|
133
|
+
</PageTransition>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## 📱 React Native Setup
|
|
139
|
+
|
|
140
|
+
### 1. Install Dependencies
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm install @digilogiclabs/saas-factory-ui
|
|
144
|
+
# Required for advanced features
|
|
145
|
+
npm install @react-native-community/netinfo
|
|
146
|
+
npm install @react-native-async-storage/async-storage
|
|
147
|
+
npm install expo-haptics
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 2. Import Native Components
|
|
151
|
+
|
|
152
|
+
```tsx
|
|
153
|
+
import {
|
|
154
|
+
NativeButton,
|
|
155
|
+
NativeContainer,
|
|
156
|
+
NativeCard,
|
|
157
|
+
NativePageTransition,
|
|
158
|
+
NativeSwipeableCard,
|
|
159
|
+
NativeLazyImage,
|
|
160
|
+
} from "@digilogiclabs/saas-factory-ui/native";
|
|
161
|
+
import { Text } from "react-native";
|
|
162
|
+
|
|
163
|
+
export default function App() {
|
|
164
|
+
return (
|
|
165
|
+
<NativePageTransition type="slide" direction="horizontal">
|
|
166
|
+
<NativeContainer style={{ flex: 1, padding: 20 }}>
|
|
167
|
+
<NativeCard style={{ padding: 20 }}>
|
|
168
|
+
<Text style={{ fontSize: 20, fontWeight: "bold", marginBottom: 16 }}>
|
|
169
|
+
Welcome to Mobile
|
|
170
|
+
</Text>
|
|
171
|
+
<NativeLazyImage
|
|
172
|
+
source={{ uri: "https://example.com/image.jpg" }}
|
|
173
|
+
style={{
|
|
174
|
+
width: "100%",
|
|
175
|
+
height: 200,
|
|
176
|
+
borderRadius: 8,
|
|
177
|
+
marginBottom: 16,
|
|
178
|
+
}}
|
|
179
|
+
placeholder="skeleton"
|
|
180
|
+
/>
|
|
181
|
+
<NativeButton
|
|
182
|
+
variant="default"
|
|
183
|
+
size="lg"
|
|
184
|
+
onPress={() => console.log("Pressed")}
|
|
185
|
+
>
|
|
186
|
+
Get Started
|
|
187
|
+
</NativeButton>
|
|
188
|
+
</NativeCard>
|
|
189
|
+
</NativeContainer>
|
|
190
|
+
</NativePageTransition>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## 📚 Available Components
|
|
196
|
+
|
|
197
|
+
### ✅ Core Components (v0.13.0)
|
|
198
|
+
|
|
199
|
+
| Component | Web | Native | Description |
|
|
200
|
+
| -------------------------------- | --- | ------ | ------------------------------------------------------------- |
|
|
201
|
+
| **Layout & Structure** | | | |
|
|
202
|
+
| `Container` | ✅ | ✅ | Responsive layout containers |
|
|
203
|
+
| `Grid` | ✅ | ✅ | Flexible grid layouts |
|
|
204
|
+
| `Section` | ✅ | ✅ | Semantic page sections |
|
|
205
|
+
| `Card` | ✅ | ✅ | Content containers with elevation |
|
|
206
|
+
| **Interactive Elements** | | | |
|
|
207
|
+
| `Button` | ✅ | ✅ | Primary action buttons with variants |
|
|
208
|
+
| `SwipeableCard` | ✅ | ✅ | **NEW** Touch-friendly swipe gestures with haptic feedback |
|
|
209
|
+
| **Advanced Mobile Interactions** | | | |
|
|
210
|
+
| `PageTransition` | ✅ | ✅ | **NEW** Smooth page transitions with multiple animation types |
|
|
211
|
+
| `PullToRefresh` | ✅ | ✅ | **NEW** Native pull-to-refresh functionality |
|
|
212
|
+
| **Performance & Media** | | | |
|
|
213
|
+
| `LazyImage` | ✅ | ✅ | **NEW** Intelligent lazy loading with WebP support |
|
|
214
|
+
| `ProgressiveImage` | ✅ | ✅ | **NEW** Quality-aware progressive image loading |
|
|
215
|
+
| `VirtualScrollList` | ✅ | ✅ | **NEW** Memory-efficient virtual scrolling |
|
|
216
|
+
| **Network & Offline** | | | |
|
|
217
|
+
| `NetworkAwareContent` | ✅ | ✅ | **NEW** Smart content delivery based on network conditions |
|
|
218
|
+
| `OfflineWrapper` | ✅ | ✅ | **NEW** Comprehensive offline support with caching |
|
|
219
|
+
|
|
220
|
+
### 🌐 Web-Specific Components
|
|
221
|
+
|
|
222
|
+
- `Alert` - Contextual feedback messages
|
|
223
|
+
- `Avatar` - User profile pictures and initials
|
|
224
|
+
- `Badge` - Status indicators and counts
|
|
225
|
+
- `Checkbox` - Boolean input controls
|
|
226
|
+
- `DataTable` - Sortable data tables with pagination support
|
|
227
|
+
- `Dialog` - Modal dialogs and overlays
|
|
228
|
+
- `DropdownMenu` - Contextual action menus
|
|
229
|
+
- `Form` - Form validation and state management
|
|
230
|
+
- `Input` - Text input fields with validation
|
|
231
|
+
- `Label` - Accessible form labels
|
|
232
|
+
- `Modal` - Simple modal wrapper component
|
|
233
|
+
- `Pagination` - Data navigation with page controls
|
|
234
|
+
- `Progress` - Progress indicators and loading bars
|
|
235
|
+
- `Select` - Dropdown selection controls
|
|
236
|
+
- `Skeleton` - Loading state placeholders
|
|
237
|
+
- `Tabs` - Tabbed content navigation
|
|
238
|
+
- `Toast` - Notification messages
|
|
239
|
+
- `Tooltip` - Contextual help and information
|
|
240
|
+
- `AudioPlayer` - Advanced audio playback with playlists
|
|
241
|
+
- `VideoPlayer` - Feature-rich video player
|
|
242
|
+
- `AudioUploader` - Audio file upload with preview
|
|
243
|
+
- `FileUpload` - Drag-and-drop file uploads
|
|
244
|
+
- `Waveform` - Audio waveform visualization
|
|
245
|
+
|
|
246
|
+
### 📱 Native-Specific Components
|
|
247
|
+
|
|
248
|
+
- `SafeContainer` - Safe area aware container
|
|
249
|
+
- `TouchableCard` - Pressable card component
|
|
250
|
+
|
|
251
|
+
## 🆕 NEW v0.21.0: Layout & Navigation System
|
|
252
|
+
|
|
253
|
+
### Complete Application Structure
|
|
254
|
+
|
|
255
|
+
A comprehensive system providing everything needed for modern SaaS applications:
|
|
256
|
+
|
|
257
|
+
#### 🏗️ App Shell Components
|
|
258
|
+
|
|
259
|
+
| Component | Web | Native | Description |
|
|
260
|
+
| ------------- | --- | ------ | ----------------------------------------- |
|
|
261
|
+
| `AppShell` | ✅ | ✅ | Complete application layout orchestration |
|
|
262
|
+
| `Header` | ✅ | ✅ | Top navigation with user menu and actions |
|
|
263
|
+
| `Sidebar` | ✅ | - | Collapsible navigation sidebar (web) |
|
|
264
|
+
| `Drawer` | - | ✅ | Slide-out navigation drawer (mobile) |
|
|
265
|
+
| `Breadcrumbs` | ✅ | - | Hierarchical navigation breadcrumbs |
|
|
266
|
+
|
|
267
|
+
#### 🧭 Navigation Components
|
|
268
|
+
|
|
269
|
+
| Component | Web | Native | Description |
|
|
270
|
+
| ---------------- | --- | ------ | --------------------------------------- |
|
|
271
|
+
| `Tabs` | ✅ | ✅ | Feature-rich tabbed navigation |
|
|
272
|
+
| `BottomTabBar` | - | ✅ | Mobile-optimized bottom tab navigation |
|
|
273
|
+
| `Stepper` | ✅ | ✅ | Step-by-step process visualization |
|
|
274
|
+
| `Pagination` | ✅ | ✅ | Data navigation with page controls |
|
|
275
|
+
| `CommandPalette` | ✅ | - | Keyboard-driven command palette (Cmd+K) |
|
|
276
|
+
|
|
277
|
+
#### 🎯 Tour & Onboarding
|
|
278
|
+
|
|
279
|
+
| Component | Web | Native | Description |
|
|
280
|
+
| ------------------ | --- | ------ | -------------------------------------------- |
|
|
281
|
+
| `Tour` | ✅ | ✅ | Interactive guided tours with spotlights |
|
|
282
|
+
| `Onboarding` | ✅ | ✅ | Multi-step onboarding with progress tracking |
|
|
283
|
+
| `Tooltip` | ✅ | ✅ | Contextual feature highlights |
|
|
284
|
+
| `WelcomeModal` | ✅ | ✅ | Welcome screens with feature showcase |
|
|
285
|
+
| `FeatureHighlight` | ✅ | - | Animated feature callouts with pulse effects |
|
|
286
|
+
|
|
287
|
+
#### 📋 Layout Templates
|
|
288
|
+
|
|
289
|
+
| Template | Web | Native | Description |
|
|
290
|
+
| ----------------- | --- | ------ | ------------------------------------------- |
|
|
291
|
+
| `DashboardLayout` | ✅ | ✅ | Complete dashboard with navigation |
|
|
292
|
+
| `AuthLayout` | ✅ | ✅ | Authentication pages with features showcase |
|
|
293
|
+
| `SettingsLayout` | ✅ | ✅ | Settings pages with tabbed navigation |
|
|
294
|
+
|
|
295
|
+
### Usage Examples
|
|
296
|
+
|
|
297
|
+
#### Web Dashboard with Command Palette
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
import {
|
|
301
|
+
DashboardLayout,
|
|
302
|
+
CommandPalette,
|
|
303
|
+
useCommandPalette,
|
|
304
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
305
|
+
|
|
306
|
+
export default function Dashboard() {
|
|
307
|
+
const commands = [
|
|
308
|
+
{
|
|
309
|
+
id: "nav",
|
|
310
|
+
label: "Navigation",
|
|
311
|
+
items: [
|
|
312
|
+
{
|
|
313
|
+
id: "dashboard",
|
|
314
|
+
label: "Go to Dashboard",
|
|
315
|
+
action: () => router.push("/"),
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: "settings",
|
|
319
|
+
label: "Open Settings",
|
|
320
|
+
action: () => router.push("/settings"),
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
];
|
|
325
|
+
|
|
326
|
+
const { isOpen, toggle } = useCommandPalette({
|
|
327
|
+
commands,
|
|
328
|
+
keyboardShortcut: "cmd+k",
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
return (
|
|
332
|
+
<DashboardLayout>
|
|
333
|
+
<div className="p-6">
|
|
334
|
+
<h1>Dashboard Content</h1>
|
|
335
|
+
<p>Press Cmd+K to open command palette</p>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<CommandPalette open={isOpen} onOpenChange={toggle} commands={commands} />
|
|
339
|
+
</DashboardLayout>
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
#### Native App with Bottom Tabs
|
|
345
|
+
|
|
346
|
+
```tsx
|
|
347
|
+
import {
|
|
348
|
+
DashboardLayout,
|
|
349
|
+
Tour,
|
|
350
|
+
useTour,
|
|
351
|
+
} from "@digilogiclabs/saas-factory-ui/native";
|
|
352
|
+
|
|
353
|
+
export default function MobileApp() {
|
|
354
|
+
const tourSteps = [
|
|
355
|
+
{
|
|
356
|
+
id: "welcome",
|
|
357
|
+
title: "Welcome!",
|
|
358
|
+
content: "Let me show you around",
|
|
359
|
+
target: "#main-content",
|
|
360
|
+
},
|
|
361
|
+
];
|
|
362
|
+
|
|
363
|
+
const { isOpen, start } = useTour({
|
|
364
|
+
steps: tourSteps,
|
|
365
|
+
localStorage: { key: "app-tour" },
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
return (
|
|
369
|
+
<DashboardLayout
|
|
370
|
+
showBottomTabs={true}
|
|
371
|
+
bottomTabs={[
|
|
372
|
+
{ id: "home", label: "Home", icon: "🏠" },
|
|
373
|
+
{ id: "search", label: "Search", icon: "🔍" },
|
|
374
|
+
{ id: "profile", label: "Profile", icon: "👤" },
|
|
375
|
+
]}
|
|
376
|
+
>
|
|
377
|
+
<ScrollView>
|
|
378
|
+
<Text style={styles.title}>Mobile Dashboard</Text>
|
|
379
|
+
<TouchableOpacity onPress={start}>
|
|
380
|
+
<Text>Start Tour</Text>
|
|
381
|
+
</TouchableOpacity>
|
|
382
|
+
</ScrollView>
|
|
383
|
+
|
|
384
|
+
<Tour steps={tourSteps} isOpen={isOpen} onRequestClose={() => {}} />
|
|
385
|
+
</DashboardLayout>
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### 🔧 Available Hooks
|
|
391
|
+
|
|
392
|
+
#### Cross-Platform Hooks
|
|
393
|
+
|
|
394
|
+
- `useMounted` - Component mount status detection
|
|
395
|
+
- `useNetworkInfo` - **NEW** Network connection monitoring
|
|
396
|
+
- `useOfflineState` - **NEW** Online/offline status detection
|
|
397
|
+
- `useCache` - **NEW** Persistent caching utilities
|
|
398
|
+
- `useTour` - **NEW** Tour state management with localStorage persistence
|
|
399
|
+
- `useOnboarding` - **NEW** Multi-step onboarding flow management
|
|
400
|
+
|
|
401
|
+
#### Web-Only Hooks
|
|
402
|
+
|
|
403
|
+
- `useMediaQuery` - Responsive breakpoint detection
|
|
404
|
+
- `useLockBody` - Body scroll lock for modals
|
|
405
|
+
- `useCommandPalette` - **NEW** Command palette state management
|
|
406
|
+
- `useResponsive` - **NEW** Advanced responsive breakpoint detection
|
|
407
|
+
|
|
408
|
+
#### Native-Only Hooks
|
|
409
|
+
|
|
410
|
+
- `useDimensions` - Screen dimensions and orientation
|
|
411
|
+
- `useKeyboard` - Keyboard visibility and height
|
|
412
|
+
|
|
413
|
+
## 🚀 New v0.13.0 Features
|
|
414
|
+
|
|
415
|
+
### Advanced Mobile Interactions
|
|
416
|
+
|
|
417
|
+
#### PageTransition
|
|
418
|
+
|
|
419
|
+
Smooth, customizable page transitions with multiple animation types:
|
|
420
|
+
|
|
421
|
+
```tsx
|
|
422
|
+
// Web
|
|
423
|
+
import { PageTransition } from "@digilogiclabs/saas-factory-ui";
|
|
424
|
+
|
|
425
|
+
<PageTransition
|
|
426
|
+
type="slide"
|
|
427
|
+
direction="horizontal"
|
|
428
|
+
duration={300}
|
|
429
|
+
key={pageKey}
|
|
430
|
+
>
|
|
431
|
+
<YourPageContent />
|
|
432
|
+
</PageTransition>;
|
|
433
|
+
|
|
434
|
+
// Supported types: 'slide', 'fade', 'scale', 'flip', 'elastic'
|
|
435
|
+
// Directions: 'horizontal', 'vertical', 'up', 'down', 'left', 'right'
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
#### SwipeableCard
|
|
439
|
+
|
|
440
|
+
Touch-friendly cards with swipe actions and haptic feedback:
|
|
441
|
+
|
|
442
|
+
```tsx
|
|
443
|
+
// Web
|
|
444
|
+
import { SwipeableCard } from "@digilogiclabs/saas-factory-ui";
|
|
445
|
+
|
|
446
|
+
<SwipeableCard
|
|
447
|
+
leftActions={[
|
|
448
|
+
{
|
|
449
|
+
id: "archive",
|
|
450
|
+
label: "Archive",
|
|
451
|
+
backgroundColor: "#10B981",
|
|
452
|
+
onAction: () => archiveItem(),
|
|
453
|
+
},
|
|
454
|
+
]}
|
|
455
|
+
rightActions={[
|
|
456
|
+
{
|
|
457
|
+
id: "delete",
|
|
458
|
+
label: "Delete",
|
|
459
|
+
backgroundColor: "#EF4444",
|
|
460
|
+
onAction: () => deleteItem(),
|
|
461
|
+
},
|
|
462
|
+
]}
|
|
463
|
+
hapticFeedback={true}
|
|
464
|
+
threshold={80}
|
|
465
|
+
>
|
|
466
|
+
<div className="p-4">
|
|
467
|
+
<h3>Swipe me left or right!</h3>
|
|
468
|
+
</div>
|
|
469
|
+
</SwipeableCard>;
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
#### PullToRefresh
|
|
473
|
+
|
|
474
|
+
Native pull-to-refresh functionality:
|
|
475
|
+
|
|
476
|
+
```tsx
|
|
477
|
+
// Web
|
|
478
|
+
import { PullToRefresh } from "@digilogiclabs/saas-factory-ui";
|
|
479
|
+
|
|
480
|
+
<PullToRefresh
|
|
481
|
+
onRefresh={async () => {
|
|
482
|
+
await fetchFreshData();
|
|
483
|
+
}}
|
|
484
|
+
threshold={60}
|
|
485
|
+
hapticFeedback={true}
|
|
486
|
+
>
|
|
487
|
+
<YourScrollableContent />
|
|
488
|
+
</PullToRefresh>;
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### Performance Optimization
|
|
492
|
+
|
|
493
|
+
#### LazyImage
|
|
494
|
+
|
|
495
|
+
Intelligent lazy loading with modern format support:
|
|
496
|
+
|
|
497
|
+
```tsx
|
|
498
|
+
// Web
|
|
499
|
+
import { LazyImage } from "@digilogiclabs/saas-factory-ui";
|
|
500
|
+
|
|
501
|
+
<LazyImage
|
|
502
|
+
src="/large-image.jpg"
|
|
503
|
+
alt="Description"
|
|
504
|
+
placeholder="blur"
|
|
505
|
+
webpSupport={true}
|
|
506
|
+
mobileOptimization={{
|
|
507
|
+
quality: 75,
|
|
508
|
+
format: "webp",
|
|
509
|
+
sizes: "(max-width: 768px) 100vw, 50vw",
|
|
510
|
+
}}
|
|
511
|
+
loading="lazy"
|
|
512
|
+
fetchPriority="high"
|
|
513
|
+
retryAttempts={3}
|
|
514
|
+
/>;
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
#### ProgressiveImage
|
|
518
|
+
|
|
519
|
+
Quality-aware progressive loading:
|
|
520
|
+
|
|
521
|
+
```tsx
|
|
522
|
+
// Web
|
|
523
|
+
import { ProgressiveImage } from "@digilogiclabs/saas-factory-ui";
|
|
524
|
+
|
|
525
|
+
<ProgressiveImage
|
|
526
|
+
lowQualitySrc="/thumbnail.jpg"
|
|
527
|
+
highQualitySrc="/full-quality.jpg"
|
|
528
|
+
alt="Progressive image"
|
|
529
|
+
mobileStrategy="blur-up"
|
|
530
|
+
transition="fade"
|
|
531
|
+
networkAware={true}
|
|
532
|
+
/>;
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
#### VirtualScrollList
|
|
536
|
+
|
|
537
|
+
Memory-efficient virtual scrolling for large datasets:
|
|
538
|
+
|
|
539
|
+
```tsx
|
|
540
|
+
// Web
|
|
541
|
+
import { VirtualScrollList } from "@digilogiclabs/saas-factory-ui";
|
|
542
|
+
|
|
543
|
+
<VirtualScrollList
|
|
544
|
+
items={largeDataArray}
|
|
545
|
+
itemHeight={80}
|
|
546
|
+
containerHeight={400}
|
|
547
|
+
renderItem={(item, index) => (
|
|
548
|
+
<div key={index} className="p-4 border-b">
|
|
549
|
+
{item.name}
|
|
550
|
+
</div>
|
|
551
|
+
)}
|
|
552
|
+
onEndReached={() => loadMore()}
|
|
553
|
+
mobileOptimized={true}
|
|
554
|
+
overscan={5}
|
|
555
|
+
/>;
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Network & Offline Support
|
|
559
|
+
|
|
560
|
+
#### NetworkAwareContent
|
|
561
|
+
|
|
562
|
+
Smart content delivery based on connection quality:
|
|
563
|
+
|
|
564
|
+
```tsx
|
|
565
|
+
// Web
|
|
566
|
+
import { NetworkAwareContent } from "@digilogiclabs/saas-factory-ui";
|
|
567
|
+
|
|
568
|
+
<NetworkAwareContent
|
|
569
|
+
showOnFast={<HighQualityContent />}
|
|
570
|
+
showOnSlow={<LightweightContent />}
|
|
571
|
+
showOnOffline={<OfflineMessage />}
|
|
572
|
+
respectSaveData={true}
|
|
573
|
+
>
|
|
574
|
+
<DefaultContent />
|
|
575
|
+
</NetworkAwareContent>;
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
#### OfflineWrapper
|
|
579
|
+
|
|
580
|
+
Comprehensive offline support with caching:
|
|
581
|
+
|
|
582
|
+
```tsx
|
|
583
|
+
// Web
|
|
584
|
+
import { OfflineWrapper } from "@digilogiclabs/saas-factory-ui";
|
|
585
|
+
|
|
586
|
+
<OfflineWrapper
|
|
587
|
+
cacheStrategy="stale-while-revalidate"
|
|
588
|
+
cacheKey="user-data"
|
|
589
|
+
cacheDuration={3600000} // 1 hour
|
|
590
|
+
showOfflineIndicator={true}
|
|
591
|
+
retryOnReconnect={true}
|
|
592
|
+
>
|
|
593
|
+
<YourOnlineContent />
|
|
594
|
+
</OfflineWrapper>;
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
## 🎨 Advanced Usage Examples
|
|
598
|
+
|
|
599
|
+
### Mobile-Optimized Dashboard
|
|
600
|
+
|
|
601
|
+
```tsx
|
|
602
|
+
import {
|
|
603
|
+
PageTransition,
|
|
604
|
+
NetworkAwareContent,
|
|
605
|
+
VirtualScrollList,
|
|
606
|
+
PullToRefresh,
|
|
607
|
+
LazyImage,
|
|
608
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
609
|
+
|
|
610
|
+
function MobileDashboard() {
|
|
611
|
+
const [data, setData] = useState([]);
|
|
612
|
+
const [refreshing, setRefreshing] = useState(false);
|
|
613
|
+
|
|
614
|
+
const handleRefresh = async () => {
|
|
615
|
+
setRefreshing(true);
|
|
616
|
+
await fetchFreshData();
|
|
617
|
+
setRefreshing(false);
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
return (
|
|
621
|
+
<PageTransition type="slide" direction="up">
|
|
622
|
+
<div className="h-screen flex flex-col">
|
|
623
|
+
<NetworkAwareContent
|
|
624
|
+
showOnSlow={<SimpleDashboardHeader />}
|
|
625
|
+
showOnFast={<RichDashboardHeader />}
|
|
626
|
+
>
|
|
627
|
+
<DashboardHeader />
|
|
628
|
+
</NetworkAwareContent>
|
|
629
|
+
|
|
630
|
+
<PullToRefresh onRefresh={handleRefresh} className="flex-1">
|
|
631
|
+
<VirtualScrollList
|
|
632
|
+
items={data}
|
|
633
|
+
itemHeight={120}
|
|
634
|
+
renderItem={(item, index) => (
|
|
635
|
+
<div className="p-4 border-b">
|
|
636
|
+
<div className="flex items-center space-x-3">
|
|
637
|
+
<LazyImage
|
|
638
|
+
src={item.avatar}
|
|
639
|
+
alt={item.name}
|
|
640
|
+
className="w-12 h-12 rounded-full"
|
|
641
|
+
placeholder="blur"
|
|
642
|
+
/>
|
|
643
|
+
<div>
|
|
644
|
+
<h3 className="font-semibold">{item.name}</h3>
|
|
645
|
+
<p className="text-sm text-gray-500">{item.status}</p>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
)}
|
|
650
|
+
onEndReached={loadMoreData}
|
|
651
|
+
mobileOptimized={true}
|
|
652
|
+
/>
|
|
653
|
+
</PullToRefresh>
|
|
654
|
+
</div>
|
|
655
|
+
</PageTransition>
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
### Swipeable Card List with Actions
|
|
661
|
+
|
|
662
|
+
```tsx
|
|
663
|
+
import {
|
|
664
|
+
SwipeableCard,
|
|
665
|
+
LazyImage,
|
|
666
|
+
Button,
|
|
667
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
668
|
+
|
|
669
|
+
function MessageList({ messages }) {
|
|
670
|
+
return (
|
|
671
|
+
<div className="space-y-2">
|
|
672
|
+
{messages.map((message) => (
|
|
673
|
+
<SwipeableCard
|
|
674
|
+
key={message.id}
|
|
675
|
+
leftActions={[
|
|
676
|
+
{
|
|
677
|
+
id: "archive",
|
|
678
|
+
label: "Archive",
|
|
679
|
+
icon: "📁",
|
|
680
|
+
backgroundColor: "#10B981",
|
|
681
|
+
onAction: () => archiveMessage(message.id),
|
|
682
|
+
},
|
|
683
|
+
]}
|
|
684
|
+
rightActions={[
|
|
685
|
+
{
|
|
686
|
+
id: "delete",
|
|
687
|
+
label: "Delete",
|
|
688
|
+
icon: "🗑️",
|
|
689
|
+
backgroundColor: "#EF4444",
|
|
690
|
+
onAction: () => deleteMessage(message.id),
|
|
691
|
+
},
|
|
692
|
+
]}
|
|
693
|
+
threshold={100}
|
|
694
|
+
hapticFeedback={true}
|
|
695
|
+
>
|
|
696
|
+
<div className="flex items-center p-4 bg-white rounded-lg shadow">
|
|
697
|
+
<LazyImage
|
|
698
|
+
src={message.sender.avatar}
|
|
699
|
+
alt={message.sender.name}
|
|
700
|
+
className="w-12 h-12 rounded-full mr-3"
|
|
701
|
+
placeholder="skeleton"
|
|
702
|
+
/>
|
|
703
|
+
<div className="flex-1">
|
|
704
|
+
<h4 className="font-semibold">{message.sender.name}</h4>
|
|
705
|
+
<p className="text-gray-600 truncate">{message.preview}</p>
|
|
706
|
+
</div>
|
|
707
|
+
<span className="text-xs text-gray-400">{message.time}</span>
|
|
708
|
+
</div>
|
|
709
|
+
</SwipeableCard>
|
|
710
|
+
))}
|
|
711
|
+
</div>
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Progressive Image Gallery
|
|
717
|
+
|
|
718
|
+
```tsx
|
|
719
|
+
import {
|
|
720
|
+
ProgressiveImage,
|
|
721
|
+
VirtualScrollList,
|
|
722
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
723
|
+
|
|
724
|
+
function ImageGallery({ images }) {
|
|
725
|
+
return (
|
|
726
|
+
<VirtualScrollList
|
|
727
|
+
items={images}
|
|
728
|
+
itemHeight={300}
|
|
729
|
+
renderItem={(image, index) => (
|
|
730
|
+
<div className="p-2">
|
|
731
|
+
<ProgressiveImage
|
|
732
|
+
lowQualitySrc={image.thumbnail}
|
|
733
|
+
highQualitySrc={image.fullSize}
|
|
734
|
+
alt={image.description}
|
|
735
|
+
className="w-full h-64 object-cover rounded-lg"
|
|
736
|
+
mobileStrategy="blur-up"
|
|
737
|
+
transition="crossfade"
|
|
738
|
+
networkAware={true}
|
|
739
|
+
/>
|
|
740
|
+
</div>
|
|
741
|
+
)}
|
|
742
|
+
containerHeight={600}
|
|
743
|
+
mobileOptimized={true}
|
|
744
|
+
/>
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
## 🌐 Network-Aware Development
|
|
750
|
+
|
|
751
|
+
### Connection-Based Content Delivery
|
|
752
|
+
|
|
753
|
+
```tsx
|
|
754
|
+
import {
|
|
755
|
+
NetworkAwareContent,
|
|
756
|
+
useNetworkInfo,
|
|
757
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
758
|
+
|
|
759
|
+
function AdaptiveApp() {
|
|
760
|
+
const networkInfo = useNetworkInfo();
|
|
761
|
+
|
|
762
|
+
return (
|
|
763
|
+
<div>
|
|
764
|
+
<NetworkAwareContent
|
|
765
|
+
fastThreshold={["4g", "fast"]}
|
|
766
|
+
slowThreshold={["2g", "3g", "slow"]}
|
|
767
|
+
showOnFast={
|
|
768
|
+
<div>
|
|
769
|
+
<HighResolutionImages />
|
|
770
|
+
<AnimatedComponents />
|
|
771
|
+
<VideoContent />
|
|
772
|
+
</div>
|
|
773
|
+
}
|
|
774
|
+
showOnSlow={
|
|
775
|
+
<div>
|
|
776
|
+
<CompressedImages />
|
|
777
|
+
<StaticComponents />
|
|
778
|
+
<TextContent />
|
|
779
|
+
</div>
|
|
780
|
+
}
|
|
781
|
+
showOnOffline={<OfflineFallback />}
|
|
782
|
+
respectSaveData={true}
|
|
783
|
+
onNetworkChange={(info) => {
|
|
784
|
+
console.log("Network changed:", info);
|
|
785
|
+
// Adjust app behavior based on network
|
|
786
|
+
}}
|
|
787
|
+
>
|
|
788
|
+
<DefaultContent />
|
|
789
|
+
</NetworkAwareContent>
|
|
790
|
+
</div>
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### Offline-First Architecture
|
|
796
|
+
|
|
797
|
+
```tsx
|
|
798
|
+
import {
|
|
799
|
+
OfflineWrapper,
|
|
800
|
+
useOfflineState,
|
|
801
|
+
useCache,
|
|
802
|
+
} from "@digilogiclabs/saas-factory-ui";
|
|
803
|
+
|
|
804
|
+
function OfflineCapableComponent() {
|
|
805
|
+
const isOnline = useOfflineState();
|
|
806
|
+
const { get, set } = useCache("user-preferences", 3600000);
|
|
807
|
+
|
|
808
|
+
return (
|
|
809
|
+
<OfflineWrapper
|
|
810
|
+
cacheStrategy="stale-while-revalidate"
|
|
811
|
+
cacheKey="dashboard-data"
|
|
812
|
+
showOfflineIndicator={true}
|
|
813
|
+
enableServiceWorker={true}
|
|
814
|
+
onOffline={() => console.log("Gone offline")}
|
|
815
|
+
onOnline={() => console.log("Back online")}
|
|
816
|
+
fallback={
|
|
817
|
+
<div className="text-center p-8">
|
|
818
|
+
<h3>You're offline</h3>
|
|
819
|
+
<p>Some features may not be available</p>
|
|
820
|
+
</div>
|
|
821
|
+
}
|
|
822
|
+
>
|
|
823
|
+
<div>
|
|
824
|
+
<h2>Dashboard {isOnline ? "🟢" : "🔴"}</h2>
|
|
825
|
+
<DashboardContent />
|
|
826
|
+
</div>
|
|
827
|
+
</OfflineWrapper>
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
## 🎨 Theming & Styling
|
|
833
|
+
|
|
834
|
+
### Custom Theme Configuration
|
|
835
|
+
|
|
836
|
+
Create a custom theme by extending the default CSS variables:
|
|
837
|
+
|
|
838
|
+
```css
|
|
839
|
+
/* custom-theme.css */
|
|
840
|
+
:root {
|
|
841
|
+
/* Primary colors */
|
|
842
|
+
--primary: 262 83% 58%; /* Purple */
|
|
843
|
+
--primary-foreground: 0 0% 98%;
|
|
844
|
+
|
|
845
|
+
/* Secondary colors */
|
|
846
|
+
--secondary: 220 14% 96%;
|
|
847
|
+
--secondary-foreground: 220 9% 46%;
|
|
848
|
+
|
|
849
|
+
/* Accent colors */
|
|
850
|
+
--accent: 262 83% 58%;
|
|
851
|
+
--accent-foreground: 0 0% 98%;
|
|
852
|
+
|
|
853
|
+
/* Custom border radius */
|
|
854
|
+
--radius: 0.75rem;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* Dark mode overrides */
|
|
858
|
+
.dark {
|
|
859
|
+
--primary: 262 83% 58%;
|
|
860
|
+
--primary-foreground: 0 0% 98%;
|
|
861
|
+
--background: 224 71% 4%;
|
|
862
|
+
--foreground: 213 31% 91%;
|
|
863
|
+
}
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
## 📝 Migration Guide
|
|
867
|
+
|
|
868
|
+
### From v0.12.x to v0.13.0
|
|
869
|
+
|
|
870
|
+
#### New Dependencies (Optional)
|
|
871
|
+
|
|
872
|
+
For full functionality, install additional dependencies:
|
|
873
|
+
|
|
874
|
+
```bash
|
|
875
|
+
# For React Native projects
|
|
876
|
+
npm install @react-native-community/netinfo
|
|
877
|
+
npm install @react-native-async-storage/async-storage
|
|
878
|
+
npm install expo-haptics
|
|
879
|
+
|
|
880
|
+
# These are optional and only needed if using specific components
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
#### Breaking Changes
|
|
884
|
+
|
|
885
|
+
- None. All new components are additive.
|
|
886
|
+
|
|
887
|
+
#### New Features Available
|
|
888
|
+
|
|
889
|
+
- Advanced mobile interactions (PageTransition, SwipeableCard, PullToRefresh)
|
|
890
|
+
- Performance optimization components (LazyImage, ProgressiveImage, VirtualScrollList)
|
|
891
|
+
- Network and offline support (NetworkAwareContent, OfflineWrapper)
|
|
892
|
+
- New hooks (useNetworkInfo, useOfflineState, useCache)
|
|
893
|
+
|
|
894
|
+
## 🏗 Development Status
|
|
895
|
+
|
|
896
|
+
### ✅ Completed (v0.13.0) - Mobile-First Optimization Release
|
|
897
|
+
|
|
898
|
+
**Advanced Mobile Interactions**
|
|
899
|
+
|
|
900
|
+
- ✅ PageTransition - Smooth page transitions with gesture support
|
|
901
|
+
- ✅ SwipeableCard - Touch-friendly swipe gestures with haptic feedback
|
|
902
|
+
- ✅ PullToRefresh - Native pull-to-refresh functionality
|
|
903
|
+
|
|
904
|
+
**Performance Optimization**
|
|
905
|
+
|
|
906
|
+
- ✅ LazyImage - Intelligent lazy loading with WebP support
|
|
907
|
+
- ✅ ProgressiveImage - Quality-aware progressive image loading
|
|
908
|
+
- ✅ VirtualScrollList - Memory-efficient virtual scrolling
|
|
909
|
+
|
|
910
|
+
**Network & Offline Support**
|
|
911
|
+
|
|
912
|
+
- ✅ NetworkAwareContent - Smart content delivery based on network conditions
|
|
913
|
+
- ✅ OfflineWrapper - Comprehensive offline support with caching strategies
|
|
914
|
+
- ✅ Network detection hooks and utilities
|
|
915
|
+
|
|
916
|
+
**Developer Experience**
|
|
917
|
+
|
|
918
|
+
- ✅ Cross-platform architecture (Web + React Native)
|
|
919
|
+
- ✅ Full TypeScript support with platform-specific types
|
|
920
|
+
- ✅ Accessibility-first design (WCAG 2.2 AA compliant)
|
|
921
|
+
- ✅ Tree-shakeable exports and optimized bundle sizes
|
|
922
|
+
- ✅ Comprehensive documentation and examples
|
|
923
|
+
|
|
924
|
+
### ✅ Completed (v1.1.0) - Security Validators & Animation Presets
|
|
925
|
+
|
|
926
|
+
**Security Validators**
|
|
927
|
+
|
|
928
|
+
- ✅ `noHtml` - Block HTML tags in text fields (contact forms, comments)
|
|
929
|
+
- ✅ `noUrls` - Block protocol-prefixed URLs (https://, http://, ftp://, www.)
|
|
930
|
+
- ✅ `noLinks` - Block all links including bare domains (stricter than noUrls)
|
|
931
|
+
|
|
932
|
+
**Framer Motion Presets**
|
|
933
|
+
|
|
934
|
+
- ✅ `DURATIONS` - Standardized animation durations (instant/fast/normal/slow/slower)
|
|
935
|
+
- ✅ `EASINGS` - Easing curves including cubic-bezier and spring configs
|
|
936
|
+
- ✅ `VARIANTS` - 10 reusable animation variants (fadeIn, slideUp, scale, cardReveal, etc.)
|
|
937
|
+
- ✅ `HOVER` / `HOVER_TRANSITION` - Consistent hover effect presets
|
|
938
|
+
- ✅ `STAGGER_CONTAINERS` / `STAGGER_ITEMS` - Staggered children animations
|
|
939
|
+
- ✅ `VIEWPORT` - Scroll-trigger viewport settings
|
|
940
|
+
- ✅ `DISTANCES` - Movement distance presets (sm/md/lg/xl)
|
|
941
|
+
- ✅ Helper functions: `createTransition()`, `createSlideVariant()`, `mergeVariants()`
|
|
942
|
+
|
|
943
|
+
### 🚧 Coming Next (v1.2.0)
|
|
944
|
+
|
|
945
|
+
**Enhanced Authentication Components**
|
|
946
|
+
|
|
947
|
+
- 🔄 MobileAuthForm with biometric authentication
|
|
948
|
+
- 🔄 MobileUserMenu with gesture-enabled navigation
|
|
949
|
+
- 🔄 Social login optimizations
|
|
950
|
+
|
|
951
|
+
**Mobile Payment Optimization**
|
|
952
|
+
|
|
953
|
+
- 🔄 MobileCheckout with Apple Pay/Google Pay
|
|
954
|
+
- 🔄 MobileBilling dashboard
|
|
955
|
+
- 🔄 MobilePricing with comparison tables
|
|
956
|
+
|
|
957
|
+
### 📋 Future Roadmap
|
|
958
|
+
|
|
959
|
+
- Advanced UI components (BottomSheet, InfiniteScroll, FAB)
|
|
960
|
+
- Enhanced theming system with brand color extraction
|
|
961
|
+
- Real-time components with WebSocket integration
|
|
962
|
+
- PWA optimization features
|
|
963
|
+
- Advanced accessibility features
|
|
964
|
+
- Comprehensive Storybook documentation
|
|
965
|
+
|
|
966
|
+
## 🚀 Performance Metrics
|
|
967
|
+
|
|
968
|
+
### Bundle Sizes (v0.13.0)
|
|
969
|
+
|
|
970
|
+
- **Main Bundle**: 270KB ESM (295KB CJS) + 73KB CSS
|
|
971
|
+
- **Web Bundle**: 295KB optimized for web platforms
|
|
972
|
+
- **Native Bundle**: 18KB optimized for React Native
|
|
973
|
+
- **Tree-shakeable**: Import only what you need
|
|
974
|
+
|
|
975
|
+
### Performance Targets ✅
|
|
976
|
+
|
|
977
|
+
- **Bundle Size**: < 250KB gzipped ✅ (Optimized)
|
|
978
|
+
- **Load Time**: < 3s on 3G networks ✅
|
|
979
|
+
- **First Paint**: < 1.5s ✅
|
|
980
|
+
- **Interaction Ready**: < 2.5s ✅
|
|
981
|
+
- **Accessibility Score**: 95+ Lighthouse ✅
|
|
982
|
+
|
|
983
|
+
## 🔧 Development & Contributing
|
|
984
|
+
|
|
985
|
+
### Local Development
|
|
986
|
+
|
|
987
|
+
```bash
|
|
988
|
+
# Clone the repository
|
|
989
|
+
git clone https://github.com/DigiLogicLabs/saas-factory-ui
|
|
990
|
+
cd saas-factory-ui
|
|
991
|
+
|
|
992
|
+
# Install dependencies
|
|
993
|
+
npm install
|
|
994
|
+
|
|
995
|
+
# Build the package
|
|
996
|
+
npm run build
|
|
997
|
+
|
|
998
|
+
# Run tests
|
|
999
|
+
npm run test
|
|
1000
|
+
|
|
1001
|
+
# Type check
|
|
1002
|
+
npm run type-check
|
|
1003
|
+
|
|
1004
|
+
# Lint
|
|
1005
|
+
npm run lint
|
|
1006
|
+
|
|
1007
|
+
# Link for local testing
|
|
1008
|
+
npm link
|
|
1009
|
+
|
|
1010
|
+
# In your test project
|
|
1011
|
+
npm link @digilogiclabs/saas-factory-ui
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
### Testing Your Changes
|
|
1015
|
+
|
|
1016
|
+
1. Build the package: `npm run build`
|
|
1017
|
+
2. Test in a Next.js app with mobile interactions
|
|
1018
|
+
3. Test in a React Native/Expo app
|
|
1019
|
+
4. Verify TypeScript types work correctly
|
|
1020
|
+
5. Test offline/online scenarios
|
|
1021
|
+
6. Verify accessibility with screen readers
|
|
1022
|
+
|
|
1023
|
+
## 🐛 Troubleshooting
|
|
1024
|
+
|
|
1025
|
+
### Quick Diagnostic Commands
|
|
1026
|
+
|
|
1027
|
+
```bash
|
|
1028
|
+
# Check if package is installed correctly
|
|
1029
|
+
npm ls @digilogiclabs/saas-factory-ui
|
|
1030
|
+
|
|
1031
|
+
# Check package contents
|
|
1032
|
+
ls node_modules/@digilogiclabs/saas-factory-ui/dist/
|
|
1033
|
+
|
|
1034
|
+
# Verify CSS file exists
|
|
1035
|
+
find node_modules/@digilogiclabs/saas-factory-ui -name "*.css"
|
|
1036
|
+
|
|
1037
|
+
# Test network features (in browser console)
|
|
1038
|
+
navigator.onLine // Should return true/false
|
|
1039
|
+
navigator.connection // Should show connection info
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
### Common Solutions
|
|
1043
|
+
|
|
1044
|
+
1. **Clear cache**: `rm -rf .next node_modules package-lock.json && npm install`
|
|
1045
|
+
2. **Rebuild**: `npm run build` in your project
|
|
1046
|
+
3. **Check imports**: Verify import paths match package exports
|
|
1047
|
+
4. **Update dependencies**: Ensure compatible React/Next.js versions
|
|
1048
|
+
5. **Network features not working**: Check browser support and permissions
|
|
1049
|
+
6. **Haptic feedback not working**: Verify device and browser support
|
|
1050
|
+
|
|
1051
|
+
### Mobile-Specific Issues
|
|
1052
|
+
|
|
1053
|
+
1. **Gestures not working**: Ensure `touch-action` CSS is not preventing interactions
|
|
1054
|
+
2. **Performance issues**: Enable `mobileOptimized` props where available
|
|
1055
|
+
3. **Network detection not working on mobile**: Check app permissions and service worker registration
|
|
1056
|
+
|
|
1057
|
+
## 📄 License
|
|
1058
|
+
|
|
1059
|
+
MIT © [DigiLogic Labs](https://github.com/DigiLogicLabs)
|
|
1060
|
+
|
|
1061
|
+
## 🔗 Links
|
|
1062
|
+
|
|
1063
|
+
- [Documentation](https://github.com/DigiLogicLabs/saas-factory-ui)
|
|
1064
|
+
- [NPM Package](https://www.npmjs.com/package/@digilogiclabs/saas-factory-ui)
|
|
1065
|
+
- [Issues](https://github.com/DigiLogicLabs/saas-factory-ui/issues)
|
|
1066
|
+
- [Changelog](CHANGELOG.md)
|
|
1067
|
+
|
|
1068
|
+
---
|
|
1069
|
+
|
|
1070
|
+
**Current Version**: 1.1.0
|
|
1071
|
+
**Platforms**: Web (Next.js/React) + React Native/Expo
|
|
1072
|
+
**License**: MIT
|