tee3apps-cms-sdk-react 0.0.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 (43) hide show
  1. package/.env +11 -0
  2. package/README.md +255 -0
  3. package/dist/index.d.ts +5 -0
  4. package/dist/index.js +13 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +13 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +33 -0
  9. package/rollup.config.js +43 -0
  10. package/src/Components/BoxRenderer.tsx +108 -0
  11. package/src/Components/ComponentRenderer.tsx +29 -0
  12. package/src/Components/ImageComponent.tsx +68 -0
  13. package/src/Components/RowComponent.tsx +66 -0
  14. package/src/Components/TextComponent.tsx +47 -0
  15. package/src/ErrorBoundary.tsx +35 -0
  16. package/src/Page.tsx +124 -0
  17. package/src/PageComponents/BoxComponent.tsx +397 -0
  18. package/src/PageComponents/RowComponent.tsx +113 -0
  19. package/src/PageComponents/Visual-Components/CarouselComponent.tsx +366 -0
  20. package/src/PageComponents/Visual-Components/GroupBrandComponent.tsx +391 -0
  21. package/src/PageComponents/Visual-Components/GroupCategoryComponent.tsx +425 -0
  22. package/src/PageComponents/Visual-Components/GroupImageList.tsx +669 -0
  23. package/src/PageComponents/Visual-Components/GroupProductComponent.tsx +671 -0
  24. package/src/PageComponents/Visual-Components/GroupVideoList.tsx +590 -0
  25. package/src/PageComponents/Visual-Components/ImageComponent.tsx +163 -0
  26. package/src/PageComponents/Visual-Components/LinkComponent.tsx +68 -0
  27. package/src/PageComponents/Visual-Components/LottieComponent.tsx +213 -0
  28. package/src/PageComponents/Visual-Components/NavigationComponent.tsx +178 -0
  29. package/src/PageComponents/Visual-Components/Styles/ProductListViewOne.tsx +102 -0
  30. package/src/PageComponents/Visual-Components/Styles/ProductListViewTwo.tsx +104 -0
  31. package/src/PageComponents/Visual-Components/Styles/product-list-view-one.css +166 -0
  32. package/src/PageComponents/Visual-Components/Styles/product-list-view-two.css +182 -0
  33. package/src/PageComponents/Visual-Components/TabComponent.tsx +1169 -0
  34. package/src/PageComponents/Visual-Components/TextComponent.tsx +114 -0
  35. package/src/PageComponents/Visual-Components/VideoComponent.tsx +191 -0
  36. package/src/PageComponents/Visual-Components/tab.css +697 -0
  37. package/src/common.interface.ts +216 -0
  38. package/src/const.ts +6 -0
  39. package/src/env.d.ts +15 -0
  40. package/src/index.css +82 -0
  41. package/src/index.ts +2 -0
  42. package/src/types.ts +234 -0
  43. package/tsconfig.json +20 -0
@@ -0,0 +1,697 @@
1
+ .media-box {
2
+ width: 100%;
3
+ height: 100%;
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ background-color: #f4f4f4;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .media-content {
12
+ height: 100%;
13
+ width: 100%;
14
+ object-fit: fill;
15
+ }
16
+
17
+ /* Video specific styles */
18
+ video.media-content {
19
+ object-fit: cover;
20
+ background-color: #000;
21
+ }
22
+
23
+ video.media-content::-webkit-media-controls {
24
+ background-color: rgba(0, 0, 0, 0.3);
25
+ }
26
+
27
+ video.media-content::-webkit-media-controls-panel {
28
+ background-color: rgba(0, 0, 0, 0.3);
29
+ }
30
+ /* Base Card */
31
+ .product-card {
32
+ display: flex;
33
+ width: 100%;
34
+ height: 100%;
35
+ min-height: 200px;
36
+ background: #fff;
37
+ border-radius: 16px;
38
+ box-shadow: 0 6px 30px rgba(0, 0, 0, 0.06);
39
+ overflow: hidden;
40
+ transition: all 0.3s ease-in-out;
41
+ border: 1px solid #d1fae5;
42
+ flex-shrink: 0;
43
+ }
44
+
45
+ .product-card:hover {
46
+ transform: translateY(-3px);
47
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
48
+ }
49
+
50
+ /* Image */
51
+ .product-image-container {
52
+ flex: 0 0 45%;
53
+ min-height: 200px;
54
+ padding: 20px;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ overflow: hidden;
59
+ flex-shrink: 0;
60
+ }
61
+
62
+ .product-image {
63
+ width: 100%;
64
+ height: 100%;
65
+ object-fit: contain;
66
+ transition: transform 0.3s ease-in-out;
67
+ max-width: 100%;
68
+ max-height: 100%;
69
+ }
70
+
71
+ .product-image:hover {
72
+ transform: scale(1.07);
73
+ }
74
+
75
+ /* Details */
76
+ .product-details {
77
+ flex: 1;
78
+ padding: 20px;
79
+ display: flex;
80
+ flex-direction: column;
81
+ justify-content: flex-start;
82
+ overflow-y: auto;
83
+ }
84
+
85
+ /* Header */
86
+ .product-header {
87
+ margin-bottom: 16px;
88
+ }
89
+
90
+ .product-brand {
91
+ font-size: 13px;
92
+ font-weight: 700;
93
+ text-transform: uppercase;
94
+ margin-bottom: 6px;
95
+ letter-spacing: 0.5px;
96
+ color: #6b7280;
97
+ }
98
+
99
+ .product-name {
100
+ font-size: 20px;
101
+ font-weight: 800;
102
+ color: #111827;
103
+ line-height: 1.3;
104
+ margin-bottom: 8px;
105
+ }
106
+
107
+ .product-code {
108
+ font-size: 12px;
109
+ font-family: 'Courier New', monospace;
110
+ color: #6b7280;
111
+ margin-bottom: 0;
112
+ }
113
+
114
+ /* Additional Details for 1x1 layout */
115
+ .product-description,
116
+ .product-manufacturer,
117
+ .product-category {
118
+ margin-bottom: 12px;
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: 4px;
122
+ }
123
+
124
+ .detail-label {
125
+ font-size: 11px;
126
+ color: #6b7280;
127
+ font-weight: 500;
128
+ text-transform: uppercase;
129
+ letter-spacing: 0.3px;
130
+ }
131
+
132
+ .detail-value {
133
+ font-size: 13px;
134
+ color: #374151;
135
+ line-height: 1.4;
136
+ display: -webkit-box;
137
+ -webkit-line-clamp: 2;
138
+ line-clamp: 2;
139
+ -webkit-box-orient: vertical;
140
+ overflow: hidden;
141
+ }
142
+
143
+ /* Variant Tags */
144
+ .product-variants {
145
+ display: flex;
146
+ flex-wrap: wrap;
147
+ gap: 8px;
148
+ margin-bottom: 16px;
149
+ }
150
+
151
+ .variant-tag {
152
+ color: #065f46;
153
+ border: 1px solid #212423;
154
+ padding: 6px 12px;
155
+ font-size: 12px;
156
+ font-weight: 600;
157
+ border-radius: 9999px;
158
+ text-transform: capitalize;
159
+ background-color: #f0f9ff;
160
+ }
161
+
162
+ /* Pricing */
163
+ .product-pricing {
164
+ margin-bottom: 16px;
165
+ }
166
+
167
+ .price-row {
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 12px;
171
+ flex-wrap: wrap;
172
+ }
173
+
174
+ .current-price {
175
+ font-size: 22px;
176
+ font-weight: 800;
177
+ color: #10b981;
178
+ }
179
+
180
+ .original-price {
181
+ font-size: 16px;
182
+ color: #9ca3af;
183
+ text-decoration: line-through;
184
+ }
185
+
186
+ .offer-badge {
187
+ background-color: #d1fae5;
188
+ color: #047857;
189
+ font-size: 12px;
190
+ font-weight: 700;
191
+ padding: 4px 8px;
192
+ border-radius: 999px;
193
+ border: 1px solid #6ee7b7;
194
+ box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
195
+ }
196
+
197
+ /* Rating */
198
+ .product-rating {
199
+ display: flex;
200
+ align-items: center;
201
+ gap: 8px;
202
+ margin-bottom: 0;
203
+ }
204
+
205
+ .stars {
206
+ display: flex;
207
+ gap: 2px;
208
+ }
209
+
210
+ .star {
211
+ color: #fbbf24;
212
+ font-size: 16px;
213
+ }
214
+
215
+ .star.empty {
216
+ color: #e5e7eb;
217
+ }
218
+
219
+ .rating-text {
220
+ font-size: 13px;
221
+ color: #6b7280;
222
+ }
223
+
224
+ /* Button (optional footer for CTA) */
225
+ .product-footer {
226
+ margin-top: 24px;
227
+ display: flex;
228
+ justify-content: space-between;
229
+ align-items: center;
230
+ border-top: 1px solid #f3f4f6;
231
+ padding-top: 16px;
232
+ }
233
+
234
+ /* Layout-specific styles */
235
+ .product-card.carousel-mode {
236
+ flex-direction: row;
237
+ height: 100%;
238
+ min-height: 300px;
239
+ flex-shrink: 0;
240
+ }
241
+
242
+ .product-card.carousel-mode .product-image-container {
243
+ flex: 0 0 50%;
244
+ min-height: 300px;
245
+ flex-shrink: 0;
246
+ }
247
+
248
+ .product-card.carousel-mode .product-details {
249
+ flex: 1;
250
+ padding: 24px;
251
+ min-height: 300px;
252
+ display: flex;
253
+ flex-direction: column;
254
+ justify-content: flex-start;
255
+ overflow-y: auto;
256
+ }
257
+
258
+ /* Carousel mode specific spacing */
259
+ .product-card.carousel-mode .product-header {
260
+ margin-bottom: 20px;
261
+ }
262
+
263
+ .product-card.carousel-mode .product-variants {
264
+ margin-bottom: 20px;
265
+ }
266
+
267
+ .product-card.carousel-mode .product-pricing {
268
+ margin-bottom: 20px;
269
+ }
270
+
271
+ .product-card.carousel-mode .product-rating {
272
+ margin-bottom: 0;
273
+ }
274
+
275
+ /* 2x1 Layout (Horizontal compact) */
276
+ .product-card.layout-2x1 {
277
+ flex-direction: row;
278
+ height: 100%;
279
+ min-height: 140px;
280
+ cursor: pointer;
281
+ transition: all 0.3s ease;
282
+ flex-shrink: 0;
283
+ }
284
+
285
+ .product-card.layout-2x1:hover {
286
+ transform: translateY(-2px);
287
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
288
+ }
289
+
290
+ .product-card.layout-2x1 .product-image-container {
291
+ flex: 0 0 42%;
292
+ min-height: 140px;
293
+ position: relative;
294
+ overflow: hidden;
295
+ flex-shrink: 0;
296
+ padding: 16px;
297
+ display: flex;
298
+ align-items: center;
299
+ justify-content: center;
300
+ }
301
+
302
+ .product-card.layout-2x1 .product-details {
303
+ flex: 1;
304
+ min-height: 140px;
305
+ display: flex;
306
+ padding-left: 20px;
307
+ flex-direction: row;
308
+ justify-content: start;
309
+ align-items: center;
310
+ overflow: hidden;
311
+ }
312
+
313
+ .product-card.layout-2x1 .product-header {
314
+ margin-bottom: 8px;
315
+ }
316
+
317
+ .product-card.layout-2x1 .product-brand {
318
+ font-size: 11px;
319
+ color: #9ca3af;
320
+ margin-bottom: 3px;
321
+ font-weight: 600;
322
+ }
323
+
324
+ .product-card.layout-2x1 .product-name {
325
+ font-size: 15px;
326
+ font-weight: 600;
327
+ margin-bottom: 4px;
328
+ line-height: 1.3;
329
+ display: -webkit-box;
330
+ -webkit-line-clamp: 2;
331
+ line-clamp: 2;
332
+ -webkit-box-orient: vertical;
333
+ overflow: hidden;
334
+ color: #111827;
335
+ }
336
+
337
+ .product-card.layout-2x1 .product-code {
338
+ font-size: 10px;
339
+ color: #6b7280;
340
+ margin-bottom: 0;
341
+ }
342
+
343
+ .product-card.layout-2x1 .product-pricing {
344
+ margin-bottom: 8px;
345
+ }
346
+
347
+ .product-card.layout-2x1 .current-price {
348
+ font-size: 16px;
349
+ font-weight: 700;
350
+ color: #10b981;
351
+ }
352
+
353
+ .product-card.layout-2x1 .original-price {
354
+ font-size: 13px;
355
+ color: #9ca3af;
356
+ text-decoration: line-through;
357
+ }
358
+
359
+ .product-card.layout-2x1 .offer-badge {
360
+ font-size: 10px;
361
+ padding: 3px 7px;
362
+ }
363
+
364
+ .product-card.layout-2x1 .product-rating {
365
+ margin-bottom: 0;
366
+ gap: 6px;
367
+ }
368
+
369
+ .product-card.layout-2x1 .rating-text {
370
+ font-size: 11px;
371
+ }
372
+
373
+ .product-card.layout-2x1 .stars {
374
+ gap: 2px;
375
+ }
376
+
377
+ .product-card.layout-2x1 .star {
378
+ font-size: 13px;
379
+ }
380
+
381
+ .product-card.layout-2x1 .product-variants {
382
+ display: none; /* Hide variants in 2x1 mode */
383
+ }
384
+
385
+ .product-card.layout-2x1 .product-footer {
386
+ display: none; /* Hide footer in 2x1 mode */
387
+ }
388
+
389
+ .product-card.grid-mode {
390
+ flex-direction: row;
391
+ height: 100%;
392
+ min-height: 120px;
393
+ cursor: pointer;
394
+ transition: all 0.3s ease;
395
+ flex-shrink: 0;
396
+ }
397
+
398
+ .product-card.grid-mode:hover {
399
+ transform: translateY(-2px);
400
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
401
+ }
402
+
403
+ .product-card.grid-mode .product-image-container {
404
+ flex: 0 0 40%;
405
+ min-height: 120px;
406
+ position: relative;
407
+ overflow: hidden;
408
+ flex-shrink: 0;
409
+ padding: 12px;
410
+ }
411
+
412
+ .product-card.grid-mode .product-details {
413
+ flex: 1;
414
+ padding: 16px;
415
+ min-height: 150px;
416
+ padding-top: 40px;
417
+ display: flex;
418
+ flex-direction: column;
419
+ justify-content: center;
420
+ overflow: hidden;
421
+ }
422
+
423
+ .product-card.grid-mode .product-header {
424
+ margin-bottom: 1px;
425
+ }
426
+
427
+ .product-card.grid-mode .product-name {
428
+ font-size: 14px;
429
+ font-weight: 600;
430
+ margin-bottom: 1px;
431
+ line-height: 1.2;
432
+ display: -webkit-box;
433
+ -webkit-line-clamp: 2;
434
+ line-clamp: 2;
435
+ -webkit-box-orient: vertical;
436
+ overflow: hidden;
437
+ }
438
+
439
+ .product-card.grid-mode .product-code {
440
+ font-size: 10px;
441
+ color: #6b7280;
442
+ margin-bottom: 0;
443
+ }
444
+
445
+ .product-card.grid-mode .product-brand {
446
+ font-size: 10px;
447
+ color: #9ca3af;
448
+ margin-bottom: 1px;
449
+ }
450
+
451
+ .product-card.grid-mode .product-pricing {
452
+ margin-bottom: 1px;
453
+ }
454
+
455
+ .product-card.grid-mode .current-price {
456
+ font-size: 14px;
457
+ font-weight: 700;
458
+ color: #10b981;
459
+ }
460
+
461
+ .product-card.grid-mode .original-price {
462
+ font-size: 12px;
463
+ color: #9ca3af;
464
+ text-decoration: line-through;
465
+ }
466
+
467
+ .product-card.grid-mode .offer-badge {
468
+ font-size: 10px;
469
+ padding: 2px 6px;
470
+ }
471
+
472
+ .product-card.grid-mode .product-rating {
473
+ margin-bottom: 0;
474
+ gap: 6px;
475
+ }
476
+
477
+ .product-card.grid-mode .rating-text {
478
+ font-size: 11px;
479
+ }
480
+
481
+ .product-card.grid-mode .stars {
482
+ gap: 1px;
483
+ }
484
+
485
+ .product-card.grid-mode .star {
486
+ font-size: 12px;
487
+ }
488
+
489
+ .product-card.grid-mode .product-variants {
490
+ display: none; /* Hide variants in compact mode */
491
+ }
492
+
493
+ .product-card.grid-mode .product-footer {
494
+ display: none; /* Hide footer in compact mode */
495
+ }
496
+
497
+ /* Responsive */
498
+ @media (max-width: 768px) {
499
+ .product-card.carousel-mode {
500
+ flex-direction: column;
501
+ min-height: 200px;
502
+ }
503
+
504
+ .product-card.carousel-mode .product-image-container {
505
+ flex: 0 0 200px;
506
+ min-height: 200px;
507
+ }
508
+
509
+ .product-card.carousel-mode .product-details {
510
+ padding: 16px;
511
+ min-height: auto;
512
+ }
513
+
514
+ .product-card.carousel-mode .product-header {
515
+ margin-bottom: 16px;
516
+ }
517
+
518
+ .product-card.carousel-mode .product-variants {
519
+ margin-bottom: 16px;
520
+ }
521
+
522
+ .product-card.carousel-mode .product-pricing {
523
+ margin-bottom: 16px;
524
+ }
525
+
526
+ .product-card.carousel-mode .product-name {
527
+ font-size: 18px;
528
+ }
529
+
530
+ .product-card.carousel-mode .current-price {
531
+ font-size: 18px;
532
+ }
533
+
534
+ /* 2x1 Layout responsive */
535
+ .product-card.layout-2x1 {
536
+ min-height: 120px;
537
+ }
538
+
539
+ .product-card.layout-2x1 .product-image-container {
540
+ flex: 0 0 38%;
541
+ min-height: 120px;
542
+ padding: 12px;
543
+ }
544
+
545
+ .product-card.layout-2x1 .product-details {
546
+ padding: 12px 16px;
547
+ min-height: 120px;
548
+ }
549
+
550
+ .product-card.layout-2x1 .product-header {
551
+ margin-bottom: 6px;
552
+ }
553
+
554
+ .product-card.layout-2x1 .product-pricing {
555
+ margin-bottom: 6px;
556
+ }
557
+
558
+ .product-card.layout-2x1 .product-name {
559
+ font-size: 14px;
560
+ }
561
+
562
+ .product-card.layout-2x1 .current-price {
563
+ font-size: 14px;
564
+ }
565
+
566
+ /* Keep grid mode horizontal on mobile */
567
+ .product-card.grid-mode {
568
+ flex-direction: row;
569
+ min-height: 100px;
570
+ }
571
+
572
+ .product-card.grid-mode .product-image-container {
573
+ flex: 0 0 35%;
574
+ min-height: 100px;
575
+ padding: 8px;
576
+ }
577
+
578
+ .product-card.grid-mode .product-details {
579
+ padding: 12px;
580
+ min-height: 100px;
581
+ }
582
+
583
+ .product-card.grid-mode .product-header {
584
+ margin-bottom: 6px;
585
+ }
586
+
587
+ .product-card.grid-mode .product-pricing {
588
+ margin-bottom: 6px;
589
+ }
590
+
591
+ .product-card.grid-mode .product-name {
592
+ font-size: 13px;
593
+ }
594
+
595
+ .product-card.grid-mode .current-price {
596
+ font-size: 13px;
597
+ }
598
+ }
599
+
600
+ @media (max-width: 480px) {
601
+ .product-card.carousel-mode {
602
+ min-height: 180px;
603
+ }
604
+
605
+ .product-card.carousel-mode .product-image-container {
606
+ flex: 0 0 150px;
607
+ min-height: 150px;
608
+ }
609
+
610
+ .product-card.carousel-mode .product-details {
611
+ padding: 12px;
612
+ }
613
+
614
+ .product-card.carousel-mode .product-header {
615
+ margin-bottom: 12px;
616
+ }
617
+
618
+ .product-card.carousel-mode .product-variants {
619
+ margin-bottom: 12px;
620
+ }
621
+
622
+ .product-card.carousel-mode .product-pricing {
623
+ margin-bottom: 12px;
624
+ }
625
+
626
+ .product-card.carousel-mode .product-name {
627
+ font-size: 16px;
628
+ }
629
+
630
+ .product-card.carousel-mode .current-price {
631
+ font-size: 16px;
632
+ }
633
+
634
+ /* 2x1 Layout on very small screens */
635
+ .product-card.layout-2x1 {
636
+ min-height: 100px;
637
+ }
638
+
639
+ .product-card.layout-2x1 .product-image-container {
640
+ flex: 0 0 35%;
641
+ min-height: 100px;
642
+ padding: 8px;
643
+ }
644
+
645
+ .product-card.layout-2x1 .product-details {
646
+ padding: 8px 12px;
647
+ min-height: 100px;
648
+ }
649
+
650
+ .product-card.layout-2x1 .product-header {
651
+ margin-bottom: 4px;
652
+ }
653
+
654
+ .product-card.layout-2x1 .product-pricing {
655
+ margin-bottom: 4px;
656
+ }
657
+
658
+ .product-card.layout-2x1 .product-name {
659
+ font-size: 13px;
660
+ }
661
+
662
+ .product-card.layout-2x1 .current-price {
663
+ font-size: 13px;
664
+ }
665
+
666
+ /* Grid mode on very small screens */
667
+ .product-card.grid-mode {
668
+ min-height: 90px;
669
+ }
670
+
671
+ .product-card.grid-mode .product-image-container {
672
+ flex: 0 0 32%;
673
+ min-height: 90px;
674
+ padding: 6px;
675
+ }
676
+
677
+ .product-card.grid-mode .product-details {
678
+ padding: 8px;
679
+ min-height: 90px;
680
+ }
681
+
682
+ .product-card.grid-mode .product-header {
683
+ margin-bottom: 4px;
684
+ }
685
+
686
+ .product-card.grid-mode .product-pricing {
687
+ margin-bottom: 4px;
688
+ }
689
+
690
+ .product-card.grid-mode .product-name {
691
+ font-size: 12px;
692
+ }
693
+
694
+ .product-card.grid-mode .current-price {
695
+ font-size: 12px;
696
+ }
697
+ }