funuicss 3.8.15 → 3.8.16

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/css/fun.css CHANGED
@@ -1466,7 +1466,6 @@ border-radius: var(--borderRadius);
1466
1466
  }
1467
1467
 
1468
1468
 
1469
-
1470
1469
  .navigation-bar {
1471
1470
  width: 100%;
1472
1471
  display: flex;
@@ -1483,7 +1482,6 @@ border-radius: var(--borderRadius);
1483
1482
 
1484
1483
  .linkWrapper {
1485
1484
  display: none;
1486
- animation: SlideRight 0.2s linear;
1487
1485
  }
1488
1486
 
1489
1487
  .sidebar-trigger {
@@ -6309,81 +6307,111 @@ color: var(--primary) !important;
6309
6307
  .min-w-100-vw { min-width: 100vw !important; }
6310
6308
 
6311
6309
 
6312
-
6313
- .width-10-p { width: 10% !important; }
6314
- .width-20-p { width: 20% !important; }
6315
- .width-30-p { width: 30% !important; }
6316
- .width-40-p { width: 40% !important; }
6317
- .width-50-p { width: 50% !important; }
6318
- .width-60-p { width: 60% !important; }
6319
- .width-70-p { width: 70% !important; }
6320
- .width-80-p { width: 80% !important; }
6321
- .width-90-p { width: 90% !important; }
6322
- .width-100-p { width: 100% !important; }
6323
-
6324
- .w-10-p { width: 10% !important; }
6325
- .w-20-p { width: 20% !important; }
6326
- .w-30-p { width: 30% !important; }
6327
- .w-40-p { width: 40% !important; }
6328
- .w-50-p { width: 50% !important; }
6329
- .w-60-p { width: 60% !important; }
6330
- .w-70-p { width: 70% !important; }
6331
- .w-80-p { width: 80% !important; }
6332
- .w-90-p { width: 90% !important; }
6333
- .w-100-p , .w-full { width: 100% !important; }
6334
-
6335
- .w-5 { max-width: 0.3125rem; width: 100% !important; }
6336
- .w-10 { max-width: 0.625rem; width: 100% !important; }
6337
- .w-15 { max-width: 0.9375rem; width: 100% !important; }
6338
- .w-20 { max-width: 1.25rem; width: 100% !important; }
6310
+ /* Max-width versions (responsive with width: 100%) */
6311
+ .w-5 { max-width: 5px; width: 100% !important; }
6312
+ .w-10 { max-width: 10px; width: 100% !important; }
6313
+ .w-15 { max-width: 15px; width: 100% !important; }
6314
+ .w-20 { max-width: 20px; width: 100% !important; }
6339
6315
 
6340
6316
  /* Increments of 5 from 25-95 */
6341
- .w-25 { max-width: 1.5625rem; width: 100% !important; }
6342
- .w-30 { max-width: 1.875rem; width: 100% !important; }
6343
- .w-35 { max-width: 2.1875rem; width: 100% !important; }
6344
- .w-40 { max-width: 2.5rem; width: 100% !important; }
6345
- .w-45 { max-width: 2.8125rem; width: 100% !important; }
6346
- .w-50 { max-width: 3.125rem; width: 100% !important; }
6347
- .w-55 { max-width: 3.4375rem; width: 100% !important; }
6348
- .w-60 { max-width: 3.75rem; width: 100% !important; }
6349
- .w-65 { max-width: 4.0625rem; width: 100% !important; }
6350
- .w-70 { max-width: 4.375rem; width: 100% !important; }
6351
- .w-75 { max-width: 4.6875rem; width: 100% !important; }
6352
- .w-80 { max-width: 5rem; width: 100% !important; }
6353
- .w-85 { max-width: 5.3125rem; width: 100% !important; }
6354
- .w-90 { max-width: 5.625rem; width: 100% !important; }
6355
- .w-95 { max-width: 5.9375rem; width: 100% !important; }
6356
-
6357
- .w-100 { max-width: 6.25rem; width: 100% !important; }
6358
- .w-150 { max-width: 9.375rem; width: 100% !important; }
6359
- .w-200 { max-width: 12.5rem; width: 100% !important; }
6360
- .w-250 { max-width: 15.625rem; width: 100% !important; }
6361
- .w-300 { max-width: 18.75rem; width: 100% !important; }
6362
- .w-350 { max-width: 21.875rem; width: 100% !important; }
6363
- .w-400 { max-width: 25rem; width: 100% !important; }
6364
- .w-450 { max-width: 28.125rem; width: 100% !important; }
6365
- .w-500 { max-width: 31.25rem; width: 100% !important; }
6366
- .w-550 { max-width: 34.375rem; width: 100% !important; }
6367
- .w-600 { max-width: 37.5rem; width: 100% !important; }
6368
- .w-650 { max-width: 40.625rem; width: 100% !important; }
6369
- .w-700 { max-width: 43.75rem; width: 100% !important; }
6370
- .w-750 { max-width: 46.875rem; width: 100% !important; }
6371
- .w-800 { max-width: 50rem; width: 100% !important; }
6372
- .w-850 { max-width: 53.125rem; width: 100% !important; }
6373
- .w-900 { max-width: 56.25rem; width: 100% !important; }
6374
- .w-950 { max-width: 59.375rem; width: 100% !important; }
6375
- .w-1000 { max-width: 62.5rem; width: 100% !important; }
6376
- .w-1050 { max-width: 65.625rem; width: 100% !important; }
6377
- .w-1100 { max-width: 68.75rem; width: 100% !important; }
6378
- .w-1150 { max-width: 71.875rem; width: 100% !important; }
6379
- .w-1200 { max-width: 75rem; width: 100% !important; }
6380
- .w-1250 { max-width: 78.125rem; width: 100% !important; }
6381
- .w-1300 { max-width: 81.25rem; width: 100% !important; }
6382
- .w-1350 { max-width: 84.375rem; width: 100% !important; }
6383
- .w-1400 { max-width: 87.5rem; width: 100% !important; }
6384
- .w-1450 { max-width: 90.625rem; width: 100% !important; }
6385
- .w-1500 { max-width: 93.75rem; width: 100% !important; }
6317
+ .w-25 { max-width: 25px; width: 100% !important; }
6318
+ .w-30 { max-width: 30px; width: 100% !important; }
6319
+ .w-35 { max-width: 35px; width: 100% !important; }
6320
+ .w-40 { max-width: 40px; width: 100% !important; }
6321
+ .w-45 { max-width: 45px; width: 100% !important; }
6322
+ .w-50 { max-width: 50px; width: 100% !important; }
6323
+ .w-55 { max-width: 55px; width: 100% !important; }
6324
+ .w-60 { max-width: 60px; width: 100% !important; }
6325
+ .w-65 { max-width: 65px; width: 100% !important; }
6326
+ .w-70 { max-width: 70px; width: 100% !important; }
6327
+ .w-75 { max-width: 75px; width: 100% !important; }
6328
+ .w-80 { max-width: 80px; width: 100% !important; }
6329
+ .w-85 { max-width: 85px; width: 100% !important; }
6330
+ .w-90 { max-width: 90px; width: 100% !important; }
6331
+ .w-95 { max-width: 95px; width: 100% !important; }
6332
+
6333
+ .w-100 { max-width: 100px; width: 100% !important; }
6334
+ .w-150 { max-width: 150px; width: 100% !important; }
6335
+ .w-200 { max-width: 200px; width: 100% !important; }
6336
+ .w-250 { max-width: 250px; width: 100% !important; }
6337
+ .w-300 { max-width: 300px; width: 100% !important; }
6338
+ .w-350 { max-width: 350px; width: 100% !important; }
6339
+ .w-400 { max-width: 400px; width: 100% !important; }
6340
+ .w-450 { max-width: 450px; width: 100% !important; }
6341
+ .w-500 { max-width: 500px; width: 100% !important; }
6342
+ .w-550 { max-width: 550px; width: 100% !important; }
6343
+ .w-600 { max-width: 600px; width: 100% !important; }
6344
+ .w-650 { max-width: 650px; width: 100% !important; }
6345
+ .w-700 { max-width: 700px; width: 100% !important; }
6346
+ .w-750 { max-width: 750px; width: 100% !important; }
6347
+ .w-800 { max-width: 800px; width: 100% !important; }
6348
+ .w-850 { max-width: 850px; width: 100% !important; }
6349
+ .w-900 { max-width: 900px; width: 100% !important; }
6350
+ .w-950 { max-width: 950px; width: 100% !important; }
6351
+ .w-1000 { max-width: 1000px; width: 100% !important; }
6352
+ .w-1050 { max-width: 1050px; width: 100% !important; }
6353
+ .w-1100 { max-width: 1100px; width: 100% !important; }
6354
+ .w-1150 { max-width: 1150px; width: 100% !important; }
6355
+ .w-1200 { max-width: 1200px; width: 100% !important; }
6356
+ .w-1250 { max-width: 1250px; width: 100% !important; }
6357
+ .w-1300 { max-width: 1300px; width: 100% !important; }
6358
+ .w-1350 { max-width: 1350px; width: 100% !important; }
6359
+ .w-1400 { max-width: 1400px; width: 100% !important; }
6360
+ .w-1450 { max-width: 1450px; width: 100% !important; }
6361
+ .w-1500 { max-width: 1500px; width: 100% !important; }
6362
+
6363
+ /* Fixed width versions (no max-width, just width) */
6364
+ .w-5-f { width: 5px !important; }
6365
+ .w-10-f { width: 10px !important; }
6366
+ .w-15-f { width: 15px !important; }
6367
+ .w-20-f { width: 20px !important; }
6386
6368
 
6369
+ /* Increments of 5 from 25-95 */
6370
+ .w-25-f { width: 25px !important; }
6371
+ .w-30-f { width: 30px !important; }
6372
+ .w-35-f { width: 35px !important; }
6373
+ .w-40-f { width: 40px !important; }
6374
+ .w-45-f { width: 45px !important; }
6375
+ .w-50-f { width: 50px !important; }
6376
+ .w-55-f { width: 55px !important; }
6377
+ .w-60-f { width: 60px !important; }
6378
+ .w-65-f { width: 65px !important; }
6379
+ .w-70-f { width: 70px !important; }
6380
+ .w-75-f { width: 75px !important; }
6381
+ .w-80-f { width: 80px !important; }
6382
+ .w-85-f { width: 85px !important; }
6383
+ .w-90-f { width: 90px !important; }
6384
+ .w-95-f { width: 95px !important; }
6385
+
6386
+ .w-100-f { width: 100px !important; }
6387
+ .w-150-f { width: 150px !important; }
6388
+ .w-200-f { width: 200px !important; }
6389
+ .w-250-f { width: 250px !important; }
6390
+ .w-300-f { width: 300px !important; }
6391
+ .w-350-f { width: 350px !important; }
6392
+ .w-400-f { width: 400px !important; }
6393
+ .w-450-f { width: 450px !important; }
6394
+ .w-500-f { width: 500px !important; }
6395
+ .w-550-f { width: 550px !important; }
6396
+ .w-600-f { width: 600px !important; }
6397
+ .w-650-f { width: 650px !important; }
6398
+ .w-700-f { width: 700px !important; }
6399
+ .w-750-f { width: 750px !important; }
6400
+ .w-800-f { width: 800px !important; }
6401
+ .w-850-f { width: 850px !important; }
6402
+ .w-900-f { width: 900px !important; }
6403
+ .w-950-f { width: 950px !important; }
6404
+ .w-1000-f { width: 1000px !important; }
6405
+ .w-1050-f { width: 1050px !important; }
6406
+ .w-1100-f { width: 1100px !important; }
6407
+ .w-1150-f { width: 1150px !important; }
6408
+ .w-1200-f { width: 1200px !important; }
6409
+ .w-1250-f { width: 1250px !important; }
6410
+ .w-1300-f { width: 1300px !important; }
6411
+ .w-1350-f { width: 1350px !important; }
6412
+ .w-1400-f { width: 1400px !important; }
6413
+ .w-1450-f { width: 1450px !important; }
6414
+ .w-1500-f { width: 1500px !important; }
6387
6415
 
6388
6416
  /* Max-width and Min-width */
6389
6417
  .max-w-10 { max-width: 0.625rem !important; }
@@ -6770,60 +6798,111 @@ color: var(--primary) !important;
6770
6798
  .min-h-900 { min-height: 56.25rem !important; }
6771
6799
 
6772
6800
  /* height */
6773
- /* Height utilities with Pexels scaling system (1 unit = 0.0625rem) */
6774
- /* Increments of 5 from 5-20 */
6775
- .h-5 { max-height: 0.3125rem; height: 100% !important; }
6776
- .h-10 { max-height: 0.625rem; height: 100% !important; }
6777
- .h-15 { max-height: 0.9375rem; height: 100% !important; }
6778
- .h-20 { max-height: 1.25rem; height: 100% !important; }
6801
+ /* Max-height versions (responsive with height: 100%) */
6802
+ .h-5 { max-height: 5px; height: 100% !important; }
6803
+ .h-10 { max-height: 10px; height: 100% !important; }
6804
+ .h-15 { max-height: 15px; height: 100% !important; }
6805
+ .h-20 { max-height: 20px; height: 100% !important; }
6806
+
6807
+ /* Increments of 5 from 25-95 */
6808
+ .h-25 { max-height: 25px; height: 100% !important; }
6809
+ .h-30 { max-height: 30px; height: 100% !important; }
6810
+ .h-35 { max-height: 35px; height: 100% !important; }
6811
+ .h-40 { max-height: 40px; height: 100% !important; }
6812
+ .h-45 { max-height: 45px; height: 100% !important; }
6813
+ .h-50 { max-height: 50px; height: 100% !important; }
6814
+ .h-55 { max-height: 55px; height: 100% !important; }
6815
+ .h-60 { max-height: 60px; height: 100% !important; }
6816
+ .h-65 { max-height: 65px; height: 100% !important; }
6817
+ .h-70 { max-height: 70px; height: 100% !important; }
6818
+ .h-75 { max-height: 75px; height: 100% !important; }
6819
+ .h-80 { max-height: 80px; height: 100% !important; }
6820
+ .h-85 { max-height: 85px; height: 100% !important; }
6821
+ .h-90 { max-height: 90px; height: 100% !important; }
6822
+ .h-95 { max-height: 95px; height: 100% !important; }
6823
+
6824
+ .h-100 { max-height: 100px; height: 100% !important; }
6825
+ .h-150 { max-height: 150px; height: 100% !important; }
6826
+ .h-200 { max-height: 200px; height: 100% !important; }
6827
+ .h-250 { max-height: 250px; height: 100% !important; }
6828
+ .h-300 { max-height: 300px; height: 100% !important; }
6829
+ .h-350 { max-height: 350px; height: 100% !important; }
6830
+ .h-400 { max-height: 400px; height: 100% !important; }
6831
+ .h-450 { max-height: 450px; height: 100% !important; }
6832
+ .h-500 { max-height: 500px; height: 100% !important; }
6833
+ .h-550 { max-height: 550px; height: 100% !important; }
6834
+ .h-600 { max-height: 600px; height: 100% !important; }
6835
+ .h-650 { max-height: 650px; height: 100% !important; }
6836
+ .h-700 { max-height: 700px; height: 100% !important; }
6837
+ .h-750 { max-height: 750px; height: 100% !important; }
6838
+ .h-800 { max-height: 800px; height: 100% !important; }
6839
+ .h-850 { max-height: 850px; height: 100% !important; }
6840
+ .h-900 { max-height: 900px; height: 100% !important; }
6841
+ .h-950 { max-height: 950px; height: 100% !important; }
6842
+ .h-1000 { max-height: 1000px; height: 100% !important; }
6843
+ .h-1050 { max-height: 1050px; height: 100% !important; }
6844
+ .h-1100 { max-height: 1100px; height: 100% !important; }
6845
+ .h-1150 { max-height: 1150px; height: 100% !important; }
6846
+ .h-1200 { max-height: 1200px; height: 100% !important; }
6847
+ .h-1250 { max-height: 1250px; height: 100% !important; }
6848
+ .h-1300 { max-height: 1300px; height: 100% !important; }
6849
+ .h-1350 { max-height: 1350px; height: 100% !important; }
6850
+ .h-1400 { max-height: 1400px; height: 100% !important; }
6851
+ .h-1450 { max-height: 1450px; height: 100% !important; }
6852
+ .h-1500 { max-height: 1500px; height: 100% !important; }
6853
+
6854
+ /* Fixed height versions (no max-height, just height) */
6855
+ .h-5-f { height: 5px !important; }
6856
+ .h-10-f { height: 10px !important; }
6857
+ .h-15-f { height: 15px !important; }
6858
+ .h-20-f { height: 20px !important; }
6779
6859
 
6780
6860
  /* Increments of 5 from 25-95 */
6781
- .h-25 { max-height: 1.5625rem; height: 100% !important; }
6782
- .h-30 { max-height: 1.875rem; height: 100% !important; }
6783
- .h-35 { max-height: 2.1875rem; height: 100% !important; }
6784
- .h-40 { max-height: 2.5rem; height: 100% !important; }
6785
- .h-45 { max-height: 2.8125rem; height: 100% !important; }
6786
- .h-50 { max-height: 3.125rem; height: 100% !important; }
6787
- .h-55 { max-height: 3.4375rem; height: 100% !important; }
6788
- .h-60 { max-height: 3.75rem; height: 100% !important; }
6789
- .h-65 { max-height: 4.0625rem; height: 100% !important; }
6790
- .h-70 { max-height: 4.375rem; height: 100% !important; }
6791
- .h-75 { max-height: 4.6875rem; height: 100% !important; }
6792
- .h-80 { max-height: 5rem; height: 100% !important; }
6793
- .h-85 { max-height: 5.3125rem; height: 100% !important; }
6794
- .h-90 { max-height: 5.625rem; height: 100% !important; }
6795
- .h-95 { max-height: 5.9375rem; height: 100% !important; }
6796
-
6797
- /* Increments of 50 from 100-1500 */
6798
- .h-100 { max-height: 6.25rem; height: 100% !important; }
6799
- .h-150 { max-height: 9.375rem; height: 100% !important; }
6800
- .h-200 { max-height: 12.5rem; height: 100% !important; }
6801
- .h-250 { max-height: 15.625rem; height: 100% !important; }
6802
- .h-300 { max-height: 18.75rem; height: 100% !important; }
6803
- .h-350 { max-height: 21.875rem; height: 100% !important; }
6804
- .h-400 { max-height: 25rem; height: 100% !important; }
6805
- .h-450 { max-height: 28.125rem; height: 100% !important; }
6806
- .h-500 { max-height: 31.25rem; height: 100% !important; }
6807
- .h-550 { max-height: 34.375rem; height: 100% !important; }
6808
- .h-600 { max-height: 37.5rem; height: 100% !important; }
6809
- .h-650 { max-height: 40.625rem; height: 100% !important; }
6810
- .h-700 { max-height: 43.75rem; height: 100% !important; }
6811
- .h-750 { max-height: 46.875rem; height: 100% !important; }
6812
- .h-800 { max-height: 50rem; height: 100% !important; }
6813
- .h-850 { max-height: 53.125rem; height: 100% !important; }
6814
- .h-900 { max-height: 56.25rem; height: 100% !important; }
6815
- .h-950 { max-height: 59.375rem; height: 100% !important; }
6816
- .h-1000 { max-height: 62.5rem; height: 100% !important; }
6817
- .h-1050 { max-height: 65.625rem; height: 100% !important; }
6818
- .h-1100 { max-height: 68.75rem; height: 100% !important; }
6819
- .h-1150 { max-height: 71.875rem; height: 100% !important; }
6820
- .h-1200 { max-height: 75rem; height: 100% !important; }
6821
- .h-1250 { max-height: 78.125rem; height: 100% !important; }
6822
- .h-1300 { max-height: 81.25rem; height: 100% !important; }
6823
- .h-1350 { max-height: 84.375rem; height: 100% !important; }
6824
- .h-1400 { max-height: 87.5rem; height: 100% !important; }
6825
- .h-1450 { max-height: 90.625rem; height: 100% !important; }
6826
- .h-1500 { max-height: 93.75rem; height: 100% !important; }
6861
+ .h-25-f { height: 25px !important; }
6862
+ .h-30-f { height: 30px !important; }
6863
+ .h-35-f { height: 35px !important; }
6864
+ .h-40-f { height: 40px !important; }
6865
+ .h-45-f { height: 45px !important; }
6866
+ .h-50-f { height: 50px !important; }
6867
+ .h-55-f { height: 55px !important; }
6868
+ .h-60-f { height: 60px !important; }
6869
+ .h-65-f { height: 65px !important; }
6870
+ .h-70-f { height: 70px !important; }
6871
+ .h-75-f { height: 75px !important; }
6872
+ .h-80-f { height: 80px !important; }
6873
+ .h-85-f { height: 85px !important; }
6874
+ .h-90-f { height: 90px !important; }
6875
+ .h-95-f { height: 95px !important; }
6876
+
6877
+ .h-100-f { height: 100px !important; }
6878
+ .h-150-f { height: 150px !important; }
6879
+ .h-200-f { height: 200px !important; }
6880
+ .h-250-f { height: 250px !important; }
6881
+ .h-300-f { height: 300px !important; }
6882
+ .h-350-f { height: 350px !important; }
6883
+ .h-400-f { height: 400px !important; }
6884
+ .h-450-f { height: 450px !important; }
6885
+ .h-500-f { height: 500px !important; }
6886
+ .h-550-f { height: 550px !important; }
6887
+ .h-600-f { height: 600px !important; }
6888
+ .h-650-f { height: 650px !important; }
6889
+ .h-700-f { height: 700px !important; }
6890
+ .h-750-f { height: 750px !important; }
6891
+ .h-800-f { height: 800px !important; }
6892
+ .h-850-f { height: 850px !important; }
6893
+ .h-900-f { height: 900px !important; }
6894
+ .h-950-f { height: 950px !important; }
6895
+ .h-1000-f { height: 1000px !important; }
6896
+ .h-1050-f { height: 1050px !important; }
6897
+ .h-1100-f { height: 1100px !important; }
6898
+ .h-1150-f { height: 1150px !important; }
6899
+ .h-1200-f { height: 1200px !important; }
6900
+ .h-1250-f { height: 1250px !important; }
6901
+ .h-1300-f { height: 1300px !important; }
6902
+ .h-1350-f { height: 1350px !important; }
6903
+ .h-1400-f { height: 1400px !important; }
6904
+ .h-1450-f { height: 1450px !important; }
6905
+ .h-1500-f { height: 1500px !important; }
6827
6906
 
6828
6907
  /* percentage */
6829
6908
  .h-10-p { height: 10% !important; }
@@ -7309,7 +7388,6 @@ color: var(--primary) !important;
7309
7388
  overflow-x: auto;
7310
7389
  scroll-snap-type: x mandatory;
7311
7390
  -webkit-overflow-scrolling: touch;
7312
- padding: 1rem 0;
7313
7391
  scroll-behavior: smooth;
7314
7392
  }
7315
7393
  .carouselLeft{
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.8.15",
2
+ "version": "3.8.16",
3
3
  "name": "funuicss",
4
4
  "description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
5
5
  "main": "index.js",
@@ -61,6 +61,8 @@ type AccordionProps = {
61
61
  borderColor?: string;
62
62
  borderRadius?: string;
63
63
  shadow?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
64
+ bg?: string;
65
+ contentBg?: string;
64
66
  animationDuration?: number;
65
67
  animationEasing?: string;
66
68
  className?: string;
@@ -44,6 +44,42 @@ var __importStar = (this && this.__importStar) || (function () {
44
44
  return result;
45
45
  };
46
46
  })();
47
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
48
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
49
+ return new (P || (P = Promise))(function (resolve, reject) {
50
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
51
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
53
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
54
+ });
55
+ };
56
+ var __generator = (this && this.__generator) || function (thisArg, body) {
57
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
58
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
59
+ function verb(n) { return function (v) { return step([n, v]); }; }
60
+ function step(op) {
61
+ if (f) throw new TypeError("Generator is already executing.");
62
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
63
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
64
+ if (y = 0, t) op = [op[0] & 2, t.value];
65
+ switch (op[0]) {
66
+ case 0: case 1: t = op; break;
67
+ case 4: _.label++; return { value: op[1], done: false };
68
+ case 5: _.label++; y = op[1]; op = [0]; continue;
69
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
70
+ default:
71
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
72
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
73
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
74
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
75
+ if (t[2]) _.ops.pop();
76
+ _.trys.pop(); continue;
77
+ }
78
+ op = body.call(thisArg, _);
79
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
80
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
81
+ }
82
+ };
47
83
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
48
84
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
49
85
  if (ar || !(i in from)) {
@@ -55,10 +91,24 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
91
  };
56
92
  Object.defineProperty(exports, "__esModule", { value: true });
57
93
  var react_1 = __importStar(require("react"));
58
- var getCssVariable_1 = require("../../utils/getCssVariable");
59
- var componentUtils_1 = require("../../utils/componentUtils");
60
- var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
61
94
  var pi_1 = require("react-icons/pi");
95
+ // Mock utilities - replace with your actual imports
96
+ var getCssVariableValue = function (varName) {
97
+ if (typeof window === 'undefined')
98
+ return '';
99
+ return getComputedStyle(document.documentElement).getPropertyValue("--".concat(varName)).trim();
100
+ };
101
+ var useComponentConfiguration = function (componentName, variant) {
102
+ return {
103
+ mergeWithLocal: function (localProps) { return ({ props: localProps }); }
104
+ };
105
+ };
106
+ var getDynamicIcon = function (iconString) { return __awaiter(void 0, void 0, void 0, function () {
107
+ return __generator(this, function (_a) {
108
+ // Mock implementation - replace with your actual icon loader
109
+ return [2 /*return*/, null];
110
+ });
111
+ }); };
62
112
  // Custom hook for dynamic icons
63
113
  var useDynamicIcon = function (iconString) {
64
114
  var _a = (0, react_1.useState)(null), iconNode = _a[0], setIconNode = _a[1];
@@ -69,7 +119,7 @@ var useDynamicIcon = function (iconString) {
69
119
  setHasValidIcon(false);
70
120
  return;
71
121
  }
72
- (0, getDynamicIcon_1.getDynamicIcon)(iconString).then(function (node) {
122
+ getDynamicIcon(iconString).then(function (node) {
73
123
  if (node) {
74
124
  setIconNode(node);
75
125
  setHasValidIcon(true);
@@ -89,10 +139,8 @@ var AccordionIcon = function (_a) {
89
139
  var colorToUse = isExpandIcon ? expandIconColor : iconColor;
90
140
  var sizeToUse = isExpandIcon ? expandIconSize : iconSize;
91
141
  var classNameToUse = isExpandIcon ? expandIconClassName : iconClassName;
92
- // Handle string icons (dynamic)
93
142
  var isStringIcon = iconToUse && typeof iconToUse === 'string';
94
143
  var _j = useDynamicIcon(isStringIcon ? iconToUse : undefined), dynamicIconNode = _j.iconNode, hasValidDynamicIcon = _j.hasValidIcon;
95
- // Get color class from color name
96
144
  var getColorClass = function (color) {
97
145
  if (!color)
98
146
  return '';
@@ -117,15 +165,12 @@ var AccordionIcon = function (_a) {
117
165
  }
118
166
  return react_1.default.cloneElement(iconElement, props);
119
167
  };
120
- // If it's a React element icon
121
168
  if (iconToUse && typeof iconToUse !== 'string' && react_1.default.isValidElement(iconToUse)) {
122
169
  return renderIconWithProps(iconToUse, "".concat(isExpandIcon ? 'accordion-expand-icon' : 'accordion-icon', " ").concat(classNameToUse, " ").concat(isOpen && rotate ? 'accordion-rotated' : '').trim(), sizeToUse);
123
170
  }
124
- // If it's a string icon (dynamic)
125
171
  if (isStringIcon && hasValidDynamicIcon && dynamicIconNode) {
126
172
  return renderIconWithProps(dynamicIconNode, "".concat(isExpandIcon ? 'accordion-expand-icon' : 'accordion-icon', " ").concat(classNameToUse, " ").concat(isOpen && rotate ? 'accordion-rotated' : '').trim(), sizeToUse);
127
173
  }
128
- // Default expand icon (PiCaretDown)
129
174
  if (isExpandIcon && !iconToUse) {
130
175
  return (react_1.default.createElement(pi_1.PiCaretDown, { className: "accordion-expand-icon ".concat(expandIconClassName || '', " ").concat(colorClass, " ").concat(isOpen && rotate ? 'accordion-rotated' : '').trim(), style: {
131
176
  fontSize: expandIconSize,
@@ -137,10 +182,8 @@ var AccordionIcon = function (_a) {
137
182
  // Accordion Item Component
138
183
  var AccordionItem = function (_a) {
139
184
  var item = _a.item, index = _a.index, isOpen = _a.isOpen, onToggle = _a.onToggle, globalProps = _a.globalProps, _b = _a.animationDuration, animationDuration = _b === void 0 ? 300 : _b, _c = _a.animationEasing, animationEasing = _c === void 0 ? 'ease' : _c;
140
- // Merge item props with global props (item props take precedence)
141
185
  var mergedProps = __assign(__assign({}, globalProps), item);
142
186
  var itemClass = mergedProps.itemClass, titleClass = mergedProps.titleClass, iconClass = mergedProps.iconClass, contentClass = mergedProps.contentClass, activeClass = mergedProps.activeClass, icon = mergedProps.icon, iconColor = mergedProps.iconColor, iconSize = mergedProps.iconSize, iconClassName = mergedProps.iconClassName, _d = mergedProps.iconPosition, iconPosition = _d === void 0 ? 'left' : _d, expandIcon = mergedProps.expandIcon, expandIconColor = mergedProps.expandIconColor, expandIconSize = mergedProps.expandIconSize, expandIconClassName = mergedProps.expandIconClassName, _e = mergedProps.expandIconRotate, expandIconRotate = _e === void 0 ? true : _e, titleSize = mergedProps.titleSize, titleWeight = mergedProps.titleWeight, titleColor = mergedProps.titleColor, contentSize = mergedProps.contentSize, contentWeight = mergedProps.contentWeight, contentColor = mergedProps.contentColor, disabled = mergedProps.disabled, customRender = mergedProps.customRender;
143
- // Get background class from color name
144
187
  var getBgClass = function (color) {
145
188
  if (!color)
146
189
  return '';
@@ -153,7 +196,6 @@ var AccordionItem = function (_a) {
153
196
  }
154
197
  return '';
155
198
  };
156
- // Get border class from color name
157
199
  var getBorderClass = function (color) {
158
200
  if (!color)
159
201
  return '';
@@ -164,13 +206,11 @@ var AccordionItem = function (_a) {
164
206
  if (colorNames.includes(color)) {
165
207
  return "border-".concat(color);
166
208
  }
167
- // Special handling for borderColor
168
209
  if (color === 'borderColor') {
169
210
  return 'border-default';
170
211
  }
171
212
  return '';
172
213
  };
173
- // Get text size class
174
214
  var getTextSizeClass = function (size) {
175
215
  if (!size)
176
216
  return 'text-sm';
@@ -183,7 +223,6 @@ var AccordionItem = function (_a) {
183
223
  }
184
224
  return 'text-sm';
185
225
  };
186
- // Get text color class
187
226
  var getTextColorClass = function (color) {
188
227
  if (!color)
189
228
  return 'text-default';
@@ -210,17 +249,14 @@ var AccordionItem = function (_a) {
210
249
  var titleContent = typeof item.title === 'string' ? (react_1.default.createElement("div", { className: "\n ".concat(getTextSizeClass(titleSize), " \n ").concat(getTextColorClass(titleColor), "\n ").concat(titleClass || '', "\n ").trim(), style: {
211
250
  fontWeight: titleWeight || 400,
212
251
  } }, item.title)) : item.title;
213
- // Get container classes
214
252
  var getContainerClasses = function () {
215
253
  var classes = ['accordion-item'];
216
- // Background
217
254
  if (globalProps.bg) {
218
255
  var bgClass = getBgClass(globalProps.bg);
219
256
  if (bgClass) {
220
257
  classes.push(bgClass);
221
258
  }
222
259
  }
223
- // Border
224
260
  if (globalProps.border) {
225
261
  classes.push('border');
226
262
  var borderClass = getBorderClass(globalProps.borderColor);
@@ -228,7 +264,6 @@ var AccordionItem = function (_a) {
228
264
  classes.push(borderClass);
229
265
  }
230
266
  }
231
- // Border radius
232
267
  if (globalProps.borderRadius) {
233
268
  var radius = getSpacingValue(globalProps.borderRadius);
234
269
  if (radius === '0.25rem')
@@ -240,18 +275,15 @@ var AccordionItem = function (_a) {
240
275
  else if (radius === '1rem')
241
276
  classes.push('rounded-xl');
242
277
  }
243
- // Shadow
244
278
  if (globalProps.shadow && globalProps.shadow !== 'none') {
245
279
  classes.push("shadow-".concat(globalProps.shadow));
246
280
  }
247
- // State classes
248
281
  if (isOpen) {
249
282
  classes.push(activeClass || 'active');
250
283
  }
251
284
  if (disabled) {
252
285
  classes.push('disabled');
253
286
  }
254
- // Custom classes
255
287
  if (itemClass) {
256
288
  classes.push(itemClass);
257
289
  }
@@ -288,7 +320,7 @@ var AccordionItem = function (_a) {
288
320
  transition: "max-height ".concat(animationDuration, "ms ").concat(animationEasing),
289
321
  padding: isOpen ? getSpacingValue(globalProps.padding) || '0.5rem 0' : '0',
290
322
  backgroundColor: globalProps.contentBg ? getBgClass(globalProps.contentBg) : '',
291
- borderTop: isOpen && globalProps.border ? "1px solid ".concat((0, getCssVariable_1.getCssVariableValue)(globalProps.borderColor) || 'var(--borderColor)') : 'none',
323
+ borderTop: isOpen && globalProps.border ? "1px solid ".concat(getCssVariableValue(globalProps.borderColor) || 'var(--borderColor)') : 'none',
292
324
  } },
293
325
  react_1.default.createElement("div", { className: "\n accordion-inner\n ".concat(getTextSizeClass(contentSize), "\n ").concat(getTextColorClass(contentColor), "\n ").trim(), style: {
294
326
  opacity: isOpen ? 1 : 0,
@@ -299,14 +331,10 @@ var AccordionItem = function (_a) {
299
331
  };
300
332
  // Main Accordion Component
301
333
  var Accordion = function (localProps) {
302
- // Merge props with configuration
303
- var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Accordion', localProps.variant).mergeWithLocal;
334
+ var mergeWithLocal = useComponentConfiguration('Accordion', localProps.variant).mergeWithLocal;
304
335
  var mergedProps = mergeWithLocal(localProps).props;
305
336
  var final = mergedProps;
306
- var _a = (0, react_1.useState)([]), openIndexes = _a[0], setOpenIndexes = _a[1];
307
- var _b = (0, react_1.useState)([]), itemsArray = _b[0], setItemsArray = _b[1];
308
- // Use ref to track if we've initialized
309
- var hasInitialized = (0, react_1.useRef)(false);
337
+ var _a = (0, react_1.useState)([]), itemsArray = _a[0], setItemsArray = _a[1];
310
338
  // Parse items from JSON string if needed
311
339
  (0, react_1.useEffect)(function () {
312
340
  if (typeof final.items === 'string') {
@@ -326,38 +354,38 @@ var Accordion = function (localProps) {
326
354
  setItemsArray([]);
327
355
  }
328
356
  }, [final.items]);
329
- // Initialize open indexes only once
330
- (0, react_1.useEffect)(function () {
331
- if (!hasInitialized.current) {
332
- if (final.allowMultiple) {
333
- setOpenIndexes(final.defaultOpenIndexes || []);
334
- }
335
- else {
336
- setOpenIndexes(final.defaultOpenIndexes && final.defaultOpenIndexes.length > 0
337
- ? [final.defaultOpenIndexes[0]]
338
- : []);
339
- }
340
- hasInitialized.current = true;
357
+ // Initialize open indexes using useMemo to compute initial value
358
+ var initialOpenIndexes = react_1.default.useMemo(function () {
359
+ if (final.allowMultiple) {
360
+ return final.defaultOpenIndexes || [];
361
+ }
362
+ else {
363
+ return final.defaultOpenIndexes && final.defaultOpenIndexes.length > 0
364
+ ? [final.defaultOpenIndexes[0]]
365
+ : [];
341
366
  }
342
- }, []);
367
+ }, [final.allowMultiple, final.defaultOpenIndexes]);
368
+ var _b = (0, react_1.useState)(initialOpenIndexes), openIndexes = _b[0], setOpenIndexes = _b[1];
343
369
  var toggleIndex = function (index) {
344
- var newOpenIndexes = [];
345
- if (final.allowMultiple) {
346
- if (openIndexes.includes(index)) {
347
- newOpenIndexes = openIndexes.filter(function (i) { return i !== index; });
370
+ setOpenIndexes(function (prevOpenIndexes) {
371
+ var newOpenIndexes = [];
372
+ if (final.allowMultiple) {
373
+ if (prevOpenIndexes.includes(index)) {
374
+ newOpenIndexes = prevOpenIndexes.filter(function (i) { return i !== index; });
375
+ }
376
+ else {
377
+ newOpenIndexes = __spreadArray(__spreadArray([], prevOpenIndexes, true), [index], false);
378
+ }
348
379
  }
349
380
  else {
350
- newOpenIndexes = __spreadArray(__spreadArray([], openIndexes, true), [index], false);
381
+ newOpenIndexes = prevOpenIndexes.includes(index) ? [] : [index];
351
382
  }
352
- }
353
- else {
354
- newOpenIndexes = openIndexes.includes(index) ? [] : [index];
355
- }
356
- setOpenIndexes(newOpenIndexes);
357
- // Call callback if provided
358
- if (final.onItemToggle) {
359
- final.onItemToggle(index, !openIndexes.includes(index));
360
- }
383
+ // Call callback if provided
384
+ if (final.onItemToggle) {
385
+ final.onItemToggle(index, !prevOpenIndexes.includes(index));
386
+ }
387
+ return newOpenIndexes;
388
+ });
361
389
  };
362
390
  var getContainerClasses = function () {
363
391
  var classes = ['accordion'];
@@ -12,6 +12,8 @@ interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
12
12
  infiniteScroll?: boolean;
13
13
  infiniteScrollSpeed?: number;
14
14
  infiniteScrollDirection?: 'left' | 'right' | 'alternate';
15
+ overflowCss?: string;
16
+ overflowPadding?: string;
15
17
  }
16
18
  declare const Carousel: React.FC<CarouselProps>;
17
19
  export default Carousel;
@@ -55,27 +55,52 @@ var __rest = (this && this.__rest) || function (s, e) {
55
55
  }
56
56
  return t;
57
57
  };
58
- var __importDefault = (this && this.__importDefault) || function (mod) {
59
- return (mod && mod.__esModule) ? mod : { "default": mod };
60
- };
61
58
  Object.defineProperty(exports, "__esModule", { value: true });
62
59
  var react_1 = __importStar(require("react"));
63
60
  var pi_1 = require("react-icons/pi");
64
- var Circle_1 = __importDefault(require("../specials/Circle"));
65
- var RowFlex_1 = __importDefault(require("../specials/RowFlex"));
66
- var Functions_1 = require("../../utils/Functions");
61
+ // Helper function to detect touch devices
62
+ var isTouchDevice = function () {
63
+ return (('ontouchstart' in window) ||
64
+ (navigator.maxTouchPoints > 0));
65
+ };
66
+ // Simple Circle component
67
+ var Circle = function (_a) {
68
+ var bordered = _a.bordered, _b = _a.size, size = _b === void 0 ? 2.5 : _b, onClick = _a.onClick, children = _a.children;
69
+ return (react_1.default.createElement("div", { onClick: onClick, style: {
70
+ width: "".concat(size, "rem"),
71
+ height: "".concat(size, "rem"),
72
+ borderRadius: '50%',
73
+ display: 'flex',
74
+ alignItems: 'center',
75
+ justifyContent: 'center',
76
+ border: bordered ? '1px solid var(--borderColor, #ccc)' : 'none',
77
+ cursor: 'pointer',
78
+ background: 'var(--background, white)',
79
+ transition: 'all 0.2s ease'
80
+ } }, children));
81
+ };
82
+ // Simple RowFlex component
83
+ var RowFlex = function (_a) {
84
+ var _b = _a.gap, gap = _b === void 0 ? 0.5 : _b, _c = _a.justify, justify = _c === void 0 ? 'flex-start' : _c, children = _a.children;
85
+ return (react_1.default.createElement("div", { style: {
86
+ display: 'flex',
87
+ gap: "".concat(gap, "rem"),
88
+ justifyContent: justify
89
+ } }, children));
90
+ };
67
91
  var Carousel = function (_a) {
68
- var _b = _a.scrollNumber, scrollNumber = _b === void 0 ? 320 : _b, _c = _a.gap, gap = _c === void 0 ? 0.5 : _c, _d = _a.funcss, funcss = _d === void 0 ? '' : _d, _e = _a.showDashes, showDashes = _e === void 0 ? true : _e, _f = _a.allowVerticalOverflow, allowVerticalOverflow = _f === void 0 ? false : _f, _g = _a.itemPadding, itemPadding = _g === void 0 ? '0rem' : _g, children = _a.children, _h = _a.controlerSize, controlerSize = _h === void 0 ? 2.5 : _h, _j = _a.controlerIconSize, controlerIconSize = _j === void 0 ? 20 : _j, _k = _a.infiniteScroll, infiniteScroll = _k === void 0 ? false : _k, _l = _a.infiniteScrollSpeed, infiniteScrollSpeed = _l === void 0 ? 50 : _l, _m = _a.infiniteScrollDirection, infiniteScrollDirection = _m === void 0 ? 'left' : _m, rest = __rest(_a, ["scrollNumber", "gap", "funcss", "showDashes", "allowVerticalOverflow", "itemPadding", "children", "controlerSize", "controlerIconSize", "infiniteScroll", "infiniteScrollSpeed", "infiniteScrollDirection"]);
92
+ var _b = _a.scrollNumber, scrollNumber = _b === void 0 ? 320 : _b, _c = _a.gap, gap = _c === void 0 ? 0.5 : _c, _d = _a.funcss, funcss = _d === void 0 ? '' : _d, _e = _a.showDashes, showDashes = _e === void 0 ? true : _e, _f = _a.allowVerticalOverflow, allowVerticalOverflow = _f === void 0 ? false : _f, _g = _a.itemPadding, itemPadding = _g === void 0 ? '' : _g, children = _a.children, _h = _a.controlerSize, controlerSize = _h === void 0 ? 2.5 : _h, _j = _a.controlerIconSize, controlerIconSize = _j === void 0 ? 20 : _j, _k = _a.infiniteScroll, infiniteScroll = _k === void 0 ? false : _k, _l = _a.infiniteScrollSpeed, infiniteScrollSpeed = _l === void 0 ? 50 : _l, _m = _a.infiniteScrollDirection, infiniteScrollDirection = _m === void 0 ? 'left' : _m, _o = _a.overflowPadding, overflowPadding = _o === void 0 ? '' : _o, _p = _a.overflowCss, overflowCss = _p === void 0 ? '' : _p, rest = __rest(_a, ["scrollNumber", "gap", "funcss", "showDashes", "allowVerticalOverflow", "itemPadding", "children", "controlerSize", "controlerIconSize", "infiniteScroll", "infiniteScrollSpeed", "infiniteScrollDirection", "overflowPadding", "overflowCss"]);
69
93
  var scrollRef = (0, react_1.useRef)(null);
70
94
  var containerRef = (0, react_1.useRef)(null);
71
- var _o = (0, react_1.useState)('start'), scrollPosition = _o[0], setScrollPosition = _o[1];
72
- var _p = (0, react_1.useState)(false), isPhone = _p[0], setIsPhone = _p[1];
73
- var _q = (0, react_1.useState)(false), isScrollable = _q[0], setIsScrollable = _q[1];
74
- var _r = (0, react_1.useState)(infiniteScrollDirection === 'right' ? 'right' : 'left'), autoScrollDirection = _r[0], setAutoScrollDirection = _r[1];
75
- var _s = (0, react_1.useState)(false), isHovered = _s[0], setIsHovered = _s[1];
76
- var animationRef = (0, react_1.useRef)(null);
77
- var lastScrollTimeRef = (0, react_1.useRef)(0);
78
- var isProgrammaticScrollRef = (0, react_1.useRef)(false);
95
+ var _q = (0, react_1.useState)('start'), scrollPosition = _q[0], setScrollPosition = _q[1];
96
+ var _r = (0, react_1.useState)(false), isPhone = _r[0], setIsPhone = _r[1];
97
+ var _s = (0, react_1.useState)(false), isScrollable = _s[0], setIsScrollable = _s[1];
98
+ var _t = (0, react_1.useState)(infiniteScrollDirection === 'right' ? 'right' : 'left'), autoScrollDirection = _t[0], setAutoScrollDirection = _t[1];
99
+ var _u = (0, react_1.useState)(false), isPaused = _u[0], setIsPaused = _u[1];
100
+ var _v = (0, react_1.useState)(false), isReady = _v[0], setIsReady = _v[1];
101
+ var animationFrameRef = (0, react_1.useRef)(null);
102
+ var lastTimestampRef = (0, react_1.useRef)(0);
103
+ var startDelayRef = (0, react_1.useRef)(false);
79
104
  var checkScrollable = function () {
80
105
  var container = scrollRef.current;
81
106
  if (container) {
@@ -87,19 +112,23 @@ var Carousel = function (_a) {
87
112
  window.addEventListener('resize', checkScrollable);
88
113
  return function () { return window.removeEventListener('resize', checkScrollable); };
89
114
  }, [children]);
115
+ // Delay start for smooth initialization
90
116
  (0, react_1.useEffect)(function () {
91
- if ((0, Functions_1.isTouchDevice)()) {
92
- setIsPhone(true);
117
+ if (infiniteScroll && isScrollable) {
118
+ // Wait for layout to settle and then start
119
+ var timer_1 = setTimeout(function () {
120
+ setIsReady(true);
121
+ }, 300);
122
+ return function () { return clearTimeout(timer_1); };
93
123
  }
94
124
  else {
95
- setIsPhone(false);
125
+ setIsReady(false);
96
126
  }
127
+ }, [infiniteScroll, isScrollable]);
128
+ (0, react_1.useEffect)(function () {
129
+ setIsPhone(isTouchDevice());
97
130
  }, []);
98
131
  var handleScroll = function () {
99
- if (isProgrammaticScrollRef.current) {
100
- isProgrammaticScrollRef.current = false;
101
- return;
102
- }
103
132
  var container = scrollRef.current;
104
133
  if (!container)
105
134
  return;
@@ -114,7 +143,6 @@ var Carousel = function (_a) {
114
143
  else {
115
144
  setScrollPosition('middle');
116
145
  }
117
- lastScrollTimeRef.current = Date.now();
118
146
  };
119
147
  var scroll = function (direction) {
120
148
  var container = scrollRef.current;
@@ -125,18 +153,31 @@ var Carousel = function (_a) {
125
153
  behavior: 'smooth',
126
154
  });
127
155
  };
128
- var infiniteScrollAnimation = function () {
129
- if (!infiniteScroll || !scrollRef.current || isHovered || !isScrollable) {
130
- if (animationRef.current) {
131
- cancelAnimationFrame(animationRef.current);
132
- animationRef.current = null;
133
- }
156
+ // Smooth auto-scroll animation using requestAnimationFrame
157
+ var smoothAutoScroll = function (timestamp) {
158
+ if (!infiniteScroll || !scrollRef.current || isPaused || !isScrollable || !isReady) {
159
+ animationFrameRef.current = null;
160
+ lastTimestampRef.current = 0;
134
161
  return;
135
162
  }
136
163
  var container = scrollRef.current;
137
164
  var scrollLeft = container.scrollLeft, scrollWidth = container.scrollWidth, clientWidth = container.clientWidth;
138
165
  var maxScrollLeft = scrollWidth - clientWidth;
166
+ // Initialize timestamp on first frame
167
+ if (lastTimestampRef.current === 0) {
168
+ lastTimestampRef.current = timestamp;
169
+ animationFrameRef.current = requestAnimationFrame(smoothAutoScroll);
170
+ return;
171
+ }
172
+ // Calculate time delta for smooth animation
173
+ var deltaTime = timestamp - lastTimestampRef.current;
174
+ lastTimestampRef.current = timestamp;
175
+ // Calculate scroll amount based on speed and time (pixels per second)
176
+ // Cap deltaTime to prevent large jumps after tab switches
177
+ var cappedDeltaTime = Math.min(deltaTime, 100);
178
+ var scrollAmount = (infiniteScrollSpeed * cappedDeltaTime) / 1000;
139
179
  var newDirection = autoScrollDirection;
180
+ // Handle alternate direction
140
181
  if (infiniteScrollDirection === 'alternate') {
141
182
  if (scrollLeft <= 0) {
142
183
  newDirection = 'right';
@@ -147,32 +188,42 @@ var Carousel = function (_a) {
147
188
  setAutoScrollDirection('left');
148
189
  }
149
190
  }
150
- var scrollAmount = infiniteScrollSpeed / 60;
151
- isProgrammaticScrollRef.current = true;
191
+ // Perform the scroll
152
192
  if (newDirection === 'left') {
153
193
  container.scrollLeft -= scrollAmount;
194
+ // Loop back for infinite scroll (non-alternate)
154
195
  if (scrollLeft <= 0 && infiniteScrollDirection !== 'alternate') {
155
196
  container.scrollLeft = maxScrollLeft;
156
197
  }
157
198
  }
158
199
  else {
159
200
  container.scrollLeft += scrollAmount;
201
+ // Loop back for infinite scroll (non-alternate)
160
202
  if (scrollLeft >= maxScrollLeft - 1 && infiniteScrollDirection !== 'alternate') {
161
203
  container.scrollLeft = 0;
162
204
  }
163
205
  }
164
- animationRef.current = requestAnimationFrame(infiniteScrollAnimation);
206
+ animationFrameRef.current = requestAnimationFrame(smoothAutoScroll);
165
207
  };
208
+ // Start/stop auto-scroll based on pause state
166
209
  (0, react_1.useEffect)(function () {
167
- if (infiniteScroll) {
168
- infiniteScrollAnimation();
210
+ if (infiniteScroll && !isPaused && isScrollable && isReady) {
211
+ lastTimestampRef.current = 0;
212
+ animationFrameRef.current = requestAnimationFrame(smoothAutoScroll);
213
+ }
214
+ else {
215
+ if (animationFrameRef.current) {
216
+ cancelAnimationFrame(animationFrameRef.current);
217
+ animationFrameRef.current = null;
218
+ }
219
+ lastTimestampRef.current = 0;
169
220
  }
170
221
  return function () {
171
- if (animationRef.current) {
172
- cancelAnimationFrame(animationRef.current);
222
+ if (animationFrameRef.current) {
223
+ cancelAnimationFrame(animationFrameRef.current);
173
224
  }
174
225
  };
175
- }, [infiniteScroll, infiniteScrollSpeed, infiniteScrollDirection, isHovered, isScrollable, autoScrollDirection]);
226
+ }, [infiniteScroll, infiniteScrollSpeed, infiniteScrollDirection, isPaused, isScrollable, autoScrollDirection, isReady]);
176
227
  (0, react_1.useEffect)(function () {
177
228
  setAutoScrollDirection(infiniteScrollDirection === 'right' ? 'right' : 'left');
178
229
  }, [infiniteScrollDirection]);
@@ -187,53 +238,29 @@ var Carousel = function (_a) {
187
238
  var childrenArray = react_1.default.Children.toArray(children);
188
239
  if (childrenArray.length === 0)
189
240
  return children;
190
- // Clone enough items to create a seamless infinite effect
191
- // We need enough clones to fill at least 3 times the viewport width
192
241
  var container = scrollRef.current;
193
242
  var clonesNeeded = container ? Math.ceil(container.clientWidth * 3 / (scrollNumber || 320)) : 3;
194
243
  var clonedItems = [];
195
244
  for (var i = 0; i < clonesNeeded; i++) {
196
245
  clonedItems.push.apply(clonedItems, childrenArray);
197
246
  }
198
- return (react_1.default.createElement(react_1.default.Fragment, null, clonedItems.map(function (child, index) { return (react_1.default.createElement("div", { key: index, className: "carousel-item", style: { flexShrink: 0 } },
247
+ return (react_1.default.createElement(react_1.default.Fragment, null, clonedItems.map(function (child, index) { return (react_1.default.createElement("div", { key: index, className: "carousel-item", style: { flexShrink: 0 }, onMouseEnter: function () { return setIsPaused(true); }, onMouseLeave: function () { return setIsPaused(false); } },
199
248
  react_1.default.createElement("div", { className: "carousel-card" }, child))); })));
200
249
  };
201
- var handleMouseEnter = function () {
202
- setIsHovered(true);
203
- if (animationRef.current) {
204
- cancelAnimationFrame(animationRef.current);
205
- animationRef.current = null;
206
- }
207
- };
208
- var handleMouseLeave = function () {
209
- setIsHovered(false);
210
- if (infiniteScroll && !isHovered) {
211
- infiniteScrollAnimation();
212
- }
213
- };
214
- // Handle touch events for mobile
215
250
  var handleTouchStart = function () {
216
- setIsHovered(true);
217
- if (animationRef.current) {
218
- cancelAnimationFrame(animationRef.current);
219
- animationRef.current = null;
220
- }
251
+ setIsPaused(true);
221
252
  };
222
253
  var handleTouchEnd = function () {
223
- // Wait a bit before resuming to allow user to interact
224
254
  setTimeout(function () {
225
- setIsHovered(false);
226
- if (infiniteScroll && !isHovered) {
227
- infiniteScrollAnimation();
228
- }
229
- }, 1000); // Resume after 1 second of inactivity
255
+ setIsPaused(false);
256
+ }, 1000);
230
257
  };
231
- return (react_1.default.createElement("div", __assign({ ref: containerRef, className: "carousel-wrapper ".concat(funcss), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onTouchStart: handleTouchStart, onTouchEnd: handleTouchEnd }, rest),
258
+ return (react_1.default.createElement("div", __assign({ ref: containerRef, className: "carousel-wrapper", onTouchStart: handleTouchStart, onTouchEnd: handleTouchEnd }, rest),
232
259
  react_1.default.createElement(react_1.default.Fragment, null,
233
260
  !isPhone && isScrollable && !infiniteScroll && (react_1.default.createElement("div", { className: 'carouselLeft' },
234
- react_1.default.createElement(Circle_1.default, { bordered: true, size: controlerSize, onClick: function () { return scroll('left'); } },
261
+ react_1.default.createElement(Circle, { bordered: true, size: controlerSize, onClick: function () { return scroll('left'); } },
235
262
  react_1.default.createElement(pi_1.PiCaretLeft, { className: 'text-primary', size: controlerIconSize })))),
236
- react_1.default.createElement("div", { ref: scrollRef, className: "carousel-container scrollbar-hide w-full", style: {
263
+ react_1.default.createElement("div", { ref: scrollRef, className: "carousel-container scrollbar-hide w-full ".concat(funcss, " ").concat(isScrollable ? overflowCss : ''), style: {
237
264
  width: '100%',
238
265
  gap: gap + 'rem',
239
266
  overflowX: 'auto',
@@ -242,15 +269,15 @@ var Carousel = function (_a) {
242
269
  justifyItems: (isScrollable || isPhone) ? 'flex-start' : 'center',
243
270
  scrollSnapType: infiniteScroll ? 'none' : 'x mandatory',
244
271
  scrollBehavior: 'smooth',
245
- padding: itemPadding || "0.5rem",
272
+ padding: (isScrollable && overflowPadding) ? overflowPadding : itemPadding,
246
273
  cursor: infiniteScroll ? 'grab' : 'default'
247
- }, onMouseDown: function () { return infiniteScroll && handleMouseEnter(); }, onMouseUp: function () { return infiniteScroll && handleMouseLeave(); }, onScroll: handleScroll }, infiniteScroll ? cloneChildren() : (react_1.default.Children.map(children, function (child, index) { return (react_1.default.createElement("div", { className: "carousel-item", style: { flexShrink: 0 } },
274
+ }, onScroll: handleScroll }, infiniteScroll ? cloneChildren() : (react_1.default.Children.map(children, function (child, index) { return (react_1.default.createElement("div", { className: "carousel-item", style: { flexShrink: 0 }, onMouseEnter: function () { return !infiniteScroll && setIsPaused(true); }, onMouseLeave: function () { return !infiniteScroll && setIsPaused(false); } },
248
275
  react_1.default.createElement("div", { className: "carousel-card" }, child))); }))),
249
276
  !isPhone && isScrollable && !infiniteScroll && (react_1.default.createElement("div", { className: 'carouselRight' },
250
- react_1.default.createElement(Circle_1.default, { bordered: true, size: controlerSize, onClick: function () { return scroll('right'); } },
277
+ react_1.default.createElement(Circle, { bordered: true, size: controlerSize, onClick: function () { return scroll('right'); } },
251
278
  react_1.default.createElement(pi_1.PiCaretRight, { className: 'text-primary', size: controlerIconSize }))))),
252
279
  (showDashes && isScrollable && !infiniteScroll) && (react_1.default.createElement("div", { className: "center padding-top-10" },
253
- react_1.default.createElement(RowFlex_1.default, { gap: 0.5, justify: "center" }, ['start', 'middle', 'end'].map(function (pos) { return (react_1.default.createElement("div", { className: 'pointer', key: pos, onClick: function () {
280
+ react_1.default.createElement(RowFlex, { gap: 0.5, justify: "center" }, ['start', 'middle', 'end'].map(function (pos) { return (react_1.default.createElement("div", { className: 'pointer', key: pos, onClick: function () {
254
281
  var _a, _b;
255
282
  if (pos === 'start') {
256
283
  scroll('left');
@@ -267,27 +294,10 @@ var Carousel = function (_a) {
267
294
  }, style: {
268
295
  width: '10px',
269
296
  height: '10px',
270
- background: scrollPosition === pos ? 'var(--primary)' : 'var(--borderColor)',
297
+ background: scrollPosition === pos ? 'var(--primary, #007bff)' : 'var(--borderColor, #ccc)',
271
298
  borderRadius: '50%',
272
299
  transform: scrollPosition === pos ? 'scale(1.3)' : 'scale(0.9)',
273
300
  transition: 'transform 0.3s ease, background 0.3s ease',
274
- } })); })))),
275
- infiniteScroll && isHovered && (react_1.default.createElement("div", { style: {
276
- position: 'absolute',
277
- top: '50%',
278
- left: '50%',
279
- transform: 'translate(-50%, -50%)',
280
- background: 'rgba(0,0,0,0.7)',
281
- color: 'white',
282
- padding: '5px 10px',
283
- borderRadius: '5px',
284
- fontSize: '12px',
285
- zIndex: 10,
286
- pointerEvents: 'none',
287
- opacity: 0,
288
- animation: 'fadeInOut 2s ease'
289
- } },
290
- "Scroll paused",
291
- react_1.default.createElement("style", null, "\n @keyframes fadeInOut {\n 0% { opacity: 0; }\n 10% { opacity: 1; }\n 90% { opacity: 1; }\n 100% { opacity: 0; }\n }\n ")))));
301
+ } })); }))))));
292
302
  };
293
303
  exports.default = Carousel;
@@ -26,6 +26,7 @@ interface SideBarProps {
26
26
  children?: ReactNode;
27
27
  onClose?: () => void;
28
28
  isAccordion?: boolean;
29
+ togglePrefix?: ReactNode;
29
30
  }
30
- export default function SideBar({ funcss, position, open, header, content, footer, top, sidebarWidth, iconCSS, sidebarCss, activeCss, bodyCss, popIcon, dividers, accordionItemCss, links, children, onClose, isAccordion, }: SideBarProps): React.JSX.Element;
31
+ export default function SideBar({ funcss, position, open, header, content, footer, top, sidebarWidth, iconCSS, sidebarCss, activeCss, bodyCss, popIcon, dividers, accordionItemCss, links, children, onClose, togglePrefix, isAccordion, }: SideBarProps): React.JSX.Element;
31
32
  export {};
@@ -337,7 +337,7 @@ var bs_1 = require("react-icons/bs");
337
337
  var Flex_1 = __importDefault(require("../flex/Flex"));
338
338
  function SideBar(_a) {
339
339
  var _b, _c;
340
- var _d = _a.funcss, funcss = _d === void 0 ? '' : _d, _e = _a.position, position = _e === void 0 ? 'left' : _e, _f = _a.open, open = _f === void 0 ? false : _f, header = _a.header, content = _a.content, footer = _a.footer, _g = _a.top, top = _g === void 0 ? 0 : _g, _h = _a.sidebarWidth, sidebarWidth = _h === void 0 ? 250 : _h, _j = _a.iconCSS, iconCSS = _j === void 0 ? '' : _j, _k = _a.sidebarCss, sidebarCss = _k === void 0 ? '' : _k, activeCss = _a.activeCss, _l = _a.bodyCss, bodyCss = _l === void 0 ? '' : _l, _m = _a.popIcon, popIcon = _m === void 0 ? false : _m, _o = _a.dividers, dividers = _o === void 0 ? false : _o, accordionItemCss = _a.accordionItemCss, _p = _a.links, links = _p === void 0 ? [] : _p, children = _a.children, onClose = _a.onClose, _q = _a.isAccordion, isAccordion = _q === void 0 ? false : _q;
340
+ var _d = _a.funcss, funcss = _d === void 0 ? '' : _d, _e = _a.position, position = _e === void 0 ? 'left' : _e, _f = _a.open, open = _f === void 0 ? false : _f, header = _a.header, content = _a.content, footer = _a.footer, _g = _a.top, top = _g === void 0 ? 0 : _g, _h = _a.sidebarWidth, sidebarWidth = _h === void 0 ? 250 : _h, _j = _a.iconCSS, iconCSS = _j === void 0 ? '' : _j, _k = _a.sidebarCss, sidebarCss = _k === void 0 ? '' : _k, activeCss = _a.activeCss, _l = _a.bodyCss, bodyCss = _l === void 0 ? '' : _l, _m = _a.popIcon, popIcon = _m === void 0 ? false : _m, _o = _a.dividers, dividers = _o === void 0 ? false : _o, accordionItemCss = _a.accordionItemCss, _p = _a.links, links = _p === void 0 ? [] : _p, children = _a.children, onClose = _a.onClose, togglePrefix = _a.togglePrefix, _q = _a.isAccordion, isAccordion = _q === void 0 ? false : _q;
341
341
  var _r = (0, react_1.useState)(false), isMobile = _r[0], setIsMobile = _r[1];
342
342
  var _s = (0, react_1.useState)(open), internalOpen = _s[0], setInternalOpen = _s[1];
343
343
  var _t = (0, react_1.useState)('0px'), appBarHeight = _t[0], setAppBarHeight = _t[1];
@@ -479,8 +479,10 @@ function SideBar(_a) {
479
479
  _c.padding = '1rem',
480
480
  _c) },
481
481
  react_1.default.createElement("div", { className: "sidebar-header" },
482
- react_1.default.createElement("div", { className: 'pointer hover-text-primary text-right', style: { fontSize: collapseIconSize, lineHeight: 0 }, onClick: toggleCollapse },
483
- react_1.default.createElement(bs_1.BsLayoutSidebarInset, null)),
482
+ react_1.default.createElement(Flex_1.default, { width: '100%', alignItems: 'center', gap: 0.5, justify: 'space-between' },
483
+ togglePrefix || react_1.default.createElement("div", null),
484
+ react_1.default.createElement("div", { className: 'pointer hover-text-primary text-right', style: { fontSize: collapseIconSize, lineHeight: 0 }, onClick: toggleCollapse },
485
+ react_1.default.createElement(bs_1.BsLayoutSidebarInset, null))),
484
486
  header && react_1.default.createElement("div", null, header)),
485
487
  react_1.default.createElement("section", { className: "sidebar-body mt-3" },
486
488
  links.length > 0 && (react_1.default.createElement("nav", { className: "sidebar-links" }, isAccordion ? (react_1.default.createElement(Accordion_1.default, { itemClass: accordionItemCss, items: accordionItems, allowMultiple: false, contentClass: "", titleClass: 'text-sm', activeClass: "" })) : (Object.entries(groupedLinks).map(function (_a) {
package/ui/vista/Vista.js CHANGED
@@ -286,6 +286,10 @@ var Vista = function (localProps) {
286
286
  overflow: 'hidden',
287
287
  minHeight: 'auto',
288
288
  height: 'fit-content',
289
+ display: 'flex',
290
+ flexDirection: 'column',
291
+ alignItems: 'center',
292
+ justifyContent: 'center',
289
293
  backgroundImage: final.pattern && final.backgroundMode !== 'background' ?
290
294
  (final.pattern === 'grid' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
291
295
  final.pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
@@ -354,7 +358,7 @@ var Vista = function (localProps) {
354
358
  padding: '2rem',
355
359
  } },
356
360
  react_1.default.createElement("div", { style: {
357
- maxWidth: final.contentWrapperMaxWidth || '500px',
361
+ maxWidth: final.contentWrapperMaxWidth || '700px',
358
362
  width: '100%',
359
363
  textAlign: final.textAlign || 'left',
360
364
  } }, ContentComponent))) : (
@@ -368,6 +372,7 @@ var Vista = function (localProps) {
368
372
  alignItems: 'center',
369
373
  justifyContent: 'center',
370
374
  width: '100%',
375
+ height: '100%',
371
376
  maxWidth: '1200px',
372
377
  margin: '0 auto',
373
378
  padding: '2rem',
@@ -375,7 +380,7 @@ var Vista = function (localProps) {
375
380
  } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
376
381
  (final.mediaPosition === 'top') && react_1.default.createElement(MediaComponent, null),
377
382
  react_1.default.createElement("div", { style: {
378
- maxWidth: final.contentWrapperMaxWidth || '500px',
383
+ maxWidth: final.contentWrapperMaxWidth || '100%',
379
384
  width: '100%',
380
385
  textAlign: final.textAlign || 'left',
381
386
  } }, ContentComponent),