mado-ui 0.5.5 → 0.5.7

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 (60) hide show
  1. package/css/index.css +100 -13
  2. package/dist/components/drop-down.d.ts +12 -12
  3. package/dist/components/drop-down.d.ts.map +1 -1
  4. package/dist/components/form/human-verification.d.ts +15 -0
  5. package/dist/components/form/human-verification.d.ts.map +1 -0
  6. package/dist/components/form/index.d.ts +0 -1
  7. package/dist/components/form/index.d.ts.map +1 -1
  8. package/dist/components/form/input/date/index.d.ts +16 -36
  9. package/dist/components/form/input/date/index.d.ts.map +1 -1
  10. package/dist/components/form/input/index.d.ts +91 -8
  11. package/dist/components/form/input/index.d.ts.map +1 -1
  12. package/dist/components/link.d.ts +14 -13
  13. package/dist/components/link.d.ts.map +1 -1
  14. package/dist/components/tooltip.d.ts +7 -7
  15. package/dist/components/tooltip.d.ts.map +1 -1
  16. package/dist/components/video.d.ts +6 -6
  17. package/dist/components/video.d.ts.map +1 -1
  18. package/dist/components.d.ts +96 -194
  19. package/dist/components.esm.js +624 -782
  20. package/dist/components.esm.js.map +1 -1
  21. package/dist/components.js +621 -779
  22. package/dist/components.js.map +1 -1
  23. package/dist/graphics.esm.js +2 -2
  24. package/dist/graphics.esm.js.map +1 -1
  25. package/dist/graphics.js +2 -2
  26. package/dist/graphics.js.map +1 -1
  27. package/dist/hooks/use-fieldset-context.d.ts.map +1 -1
  28. package/dist/hooks/use-form-context.d.ts +5 -5
  29. package/dist/hooks/use-form-context.d.ts.map +1 -1
  30. package/dist/hooks.d.ts +5 -5
  31. package/dist/hooks.esm.js.map +1 -1
  32. package/dist/hooks.js.map +1 -1
  33. package/dist/icons/index.d.ts +142 -143
  34. package/dist/icons/index.d.ts.map +1 -1
  35. package/dist/icons/square-and-arrow-up-right.d.ts +3 -0
  36. package/dist/icons/square-and-arrow-up-right.d.ts.map +1 -0
  37. package/dist/icons/square-and-pencil.d.ts +2 -2
  38. package/dist/icons/square-and-pencil.d.ts.map +1 -1
  39. package/dist/icons.d.ts +2 -4
  40. package/dist/icons.esm.js +2 -6
  41. package/dist/icons.esm.js.map +1 -1
  42. package/dist/icons.js +1 -6
  43. package/dist/icons.js.map +1 -1
  44. package/dist/index.d.ts +96 -194
  45. package/dist/index.esm.js +624 -782
  46. package/dist/index.esm.js.map +1 -1
  47. package/dist/index.js +621 -779
  48. package/dist/index.js.map +1 -1
  49. package/dist/utils/get-date.d.ts +20 -32
  50. package/dist/utils/get-date.d.ts.map +1 -1
  51. package/dist/utils.d.ts +22 -34
  52. package/dist/utils.esm.js +40 -1064
  53. package/dist/utils.esm.js.map +1 -1
  54. package/dist/utils.js +41 -1067
  55. package/dist/utils.js.map +1 -1
  56. package/package.json +88 -100
  57. package/dist/components/form/input/date/views/index.d.ts +0 -5
  58. package/dist/components/form/input/date/views/index.d.ts.map +0 -1
  59. package/dist/icons/square-and-pencil-fill.d.ts +0 -3
  60. package/dist/icons/square-and-pencil-fill.d.ts.map +0 -1
package/dist/utils.js CHANGED
@@ -352,1008 +352,6 @@ function extendMadoTailwindMerge(configExtension) {
352
352
  });
353
353
  }
354
354
 
355
- const timezoneList = [
356
- {
357
- abbr: 'ACDT',
358
- name: 'Australian Central Daylight Time',
359
- offset: ['+', 10, 30],
360
- },
361
- {
362
- abbr: 'ACST',
363
- name: 'Australian Central Standard Time',
364
- offset: ['+', 9, 30],
365
- },
366
- {
367
- abbr: 'ACT',
368
- name: 'Acre Time',
369
- offset: ['-', 5, 0],
370
- },
371
- {
372
- abbr: 'ACWST',
373
- name: 'Australian Central Western Standard Time',
374
- offset: ['+', 8, 45],
375
- },
376
- {
377
- abbr: 'ADT',
378
- name: 'Atlantic Daylight Time',
379
- offset: ['-', 3, 0],
380
- },
381
- {
382
- abbr: 'AEDT',
383
- name: 'Australian Eastern Daylight Savings Time',
384
- offset: ['+', 11, 0],
385
- },
386
- {
387
- abbr: 'AEST',
388
- name: 'Australian Eastern Standard Time',
389
- offset: ['+', 10, 0],
390
- },
391
- {
392
- abbr: 'AFT',
393
- name: 'Afghanistan Time',
394
- offset: ['+', 4, 30],
395
- },
396
- {
397
- abbr: 'AKDT',
398
- name: 'Alaska Daylight Time',
399
- offset: ['-', 8, 0],
400
- },
401
- {
402
- abbr: 'AKST',
403
- name: 'Alaska Standard Time',
404
- offset: ['-', 9, 0],
405
- },
406
- {
407
- abbr: 'AMST',
408
- name: 'Amazon Summer Time',
409
- offset: ['-', 3, 0],
410
- },
411
- {
412
- abbr: 'AMT',
413
- name: 'Amazon Time',
414
- offset: ['-', 4, 0],
415
- },
416
- {
417
- abbr: 'AMT',
418
- name: 'Armenia Time',
419
- offset: ['+', 4, 0],
420
- },
421
- {
422
- abbr: 'ART',
423
- name: 'Argentina Time',
424
- offset: ['-', 3, 0],
425
- },
426
- {
427
- abbr: 'AST',
428
- name: 'Atlantic Standard Time',
429
- offset: ['-', 4, 0],
430
- },
431
- {
432
- abbr: 'AST',
433
- name: 'Arabia Standard Time',
434
- offset: ['+', 3, 0],
435
- },
436
- {
437
- abbr: 'AT',
438
- name: 'Atlantic Time',
439
- offset: ['-', 4, 0],
440
- },
441
- {
442
- abbr: 'AWST',
443
- name: 'Australian Western Standard Time',
444
- offset: ['+', 8, 0],
445
- },
446
- {
447
- abbr: 'AZOST',
448
- name: 'Azores Summer Time',
449
- offset: ['+', 0, 0],
450
- },
451
- {
452
- abbr: 'AZOT',
453
- name: 'Azores Standard Time',
454
- offset: ['-', 1, 0],
455
- },
456
- {
457
- abbr: 'AZT',
458
- name: 'Azerbaijan Time',
459
- offset: ['+', 4, 0],
460
- },
461
- {
462
- abbr: 'BDT',
463
- name: 'Brunei Time',
464
- offset: ['+', 8, 0],
465
- },
466
- {
467
- abbr: 'BIT',
468
- name: 'Baker Island Time',
469
- offset: ['-', 12, 0],
470
- },
471
- {
472
- abbr: 'BNT',
473
- name: 'Brunei Darussalam Time',
474
- offset: ['+', 8, 0],
475
- },
476
- {
477
- abbr: 'BOT',
478
- name: 'Bolivia Time',
479
- offset: ['-', 4, 0],
480
- },
481
- {
482
- abbr: 'BRST',
483
- name: 'Brasilia Summer Time',
484
- offset: ['-', 2, 0],
485
- },
486
- {
487
- abbr: 'BRT',
488
- name: 'Brasilia Time',
489
- offset: ['-', 3, 0],
490
- },
491
- {
492
- abbr: 'BST',
493
- name: 'British Summer Time',
494
- offset: ['+', 1, 0],
495
- },
496
- {
497
- abbr: 'BST',
498
- name: 'Bangladesh Standard Time',
499
- offset: ['+', 6, 0],
500
- },
501
- {
502
- abbr: 'BST',
503
- name: 'Bougainville Standard Time',
504
- offset: ['+', 11, 0],
505
- },
506
- {
507
- abbr: 'BTT',
508
- name: 'Bhutan Time',
509
- offset: ['+', 6, 0],
510
- },
511
- {
512
- abbr: 'CAT',
513
- name: 'Central Africa Time',
514
- offset: ['+', 2, 0],
515
- },
516
- {
517
- abbr: 'CCT',
518
- name: 'Cocos Islands Time',
519
- offset: ['+', 6, 30],
520
- },
521
- {
522
- abbr: 'CDT',
523
- name: 'Central Daylight Time',
524
- offset: ['-', 5, 0],
525
- },
526
- {
527
- abbr: 'CDT',
528
- name: 'Cuba Daylight Time',
529
- offset: ['-', 4, 0],
530
- },
531
- {
532
- abbr: 'CEST',
533
- name: 'Central European Summer Time',
534
- offset: ['+', 2, 0],
535
- },
536
- {
537
- abbr: 'CET',
538
- name: 'Central European Time',
539
- offset: ['+', 1, 0],
540
- },
541
- {
542
- abbr: 'CHADT',
543
- name: 'Chatham Daylight Time',
544
- offset: ['+', 13, 45],
545
- },
546
- {
547
- abbr: 'CHAST',
548
- name: 'Chatham Standard Time',
549
- offset: ['+', 12, 45],
550
- },
551
- {
552
- abbr: 'CHOST',
553
- name: 'Choibalsan Summer Time',
554
- offset: ['+', 9, 0],
555
- },
556
- {
557
- abbr: 'CHOT',
558
- name: 'Choibalsan Standard Time',
559
- offset: ['+', 8, 0],
560
- },
561
- {
562
- abbr: 'CHST',
563
- name: 'Chamorro Standard Time',
564
- offset: ['+', 10, 0],
565
- },
566
- {
567
- abbr: 'CHUT',
568
- name: 'Chuuk Time',
569
- offset: ['+', 10, 0],
570
- },
571
- {
572
- abbr: 'CIST',
573
- name: 'Clipperton Island Standard Time',
574
- offset: ['-', 8, 0],
575
- },
576
- {
577
- abbr: 'CIT',
578
- name: 'Central Indonesia Time',
579
- offset: ['+', 8, 0],
580
- },
581
- {
582
- abbr: 'CKT',
583
- name: 'Cook Island Time',
584
- offset: ['-', 10, 0],
585
- },
586
- {
587
- abbr: 'CLST',
588
- name: 'Chile Summer Time',
589
- offset: ['-', 3, 0],
590
- },
591
- {
592
- abbr: 'CLT',
593
- name: 'Chile Standard Time',
594
- offset: ['-', 4, 0],
595
- },
596
- {
597
- abbr: 'COST',
598
- name: 'Colombia Summer Time',
599
- offset: ['-', 4, 0],
600
- },
601
- {
602
- abbr: 'COT',
603
- name: 'Colombia Time',
604
- offset: ['-', 5, 0],
605
- },
606
- {
607
- abbr: 'CST',
608
- name: 'Central Standard Time',
609
- offset: ['-', 6, 0],
610
- },
611
- {
612
- abbr: 'CST',
613
- name: 'China Standard Time',
614
- offset: ['+', 8, 0],
615
- },
616
- {
617
- abbr: 'CST',
618
- name: 'Cuba Standard Time',
619
- offset: ['-', 5, 0],
620
- },
621
- {
622
- abbr: 'CT',
623
- name: 'Central Time',
624
- offset: ['-', 6, 0],
625
- },
626
- {
627
- abbr: 'CVT',
628
- name: 'Cape Verde Time',
629
- offset: ['-', 1, 0],
630
- },
631
- {
632
- abbr: 'CWST',
633
- name: 'Central Western Standard Time',
634
- offset: ['+', 8, 45],
635
- },
636
- {
637
- abbr: 'CXT',
638
- name: 'Christmas Island Time',
639
- offset: ['+', 7, 0],
640
- },
641
- {
642
- abbr: 'DAVT',
643
- name: 'Davis Time',
644
- offset: ['+', 7, 0],
645
- },
646
- {
647
- abbr: 'DDUT',
648
- name: "Dumont d'Urville Time",
649
- offset: ['+', 10, 0],
650
- },
651
- {
652
- abbr: 'EASST',
653
- name: 'Easter Island Summer Time',
654
- offset: ['-', 5, 0],
655
- },
656
- {
657
- abbr: 'EAST',
658
- name: 'Easter Island Standard Time',
659
- offset: ['-', 6, 0],
660
- },
661
- {
662
- abbr: 'EAT',
663
- name: 'East Africa Time',
664
- offset: ['+', 3, 0],
665
- },
666
- {
667
- abbr: 'ECT',
668
- name: 'Ecuador Time',
669
- offset: ['-', 5, 0],
670
- },
671
- {
672
- abbr: 'EDT',
673
- name: 'Eastern Daylight Time',
674
- offset: ['-', 4, 0],
675
- },
676
- {
677
- abbr: 'EEST',
678
- name: 'Eastern European Summer Time',
679
- offset: ['+', 3, 0],
680
- },
681
- {
682
- abbr: 'EET',
683
- name: 'Eastern European Time',
684
- offset: ['+', 2, 0],
685
- },
686
- {
687
- abbr: 'EGST',
688
- name: 'Eastern Greenland Summer Time',
689
- offset: ['+', 0, 0],
690
- },
691
- {
692
- abbr: 'EGT',
693
- name: 'Eastern Greenland Time',
694
- offset: ['-', 1, 0],
695
- },
696
- {
697
- abbr: 'EIT',
698
- name: 'Eastern Indonesian Time',
699
- offset: ['+', 9, 0],
700
- },
701
- {
702
- abbr: 'EST',
703
- name: 'Eastern Standard Time',
704
- offset: ['-', 5, 0],
705
- },
706
- {
707
- abbr: 'ET',
708
- name: 'Eastern Time',
709
- offset: ['-', 5, 0],
710
- },
711
- {
712
- abbr: 'FET',
713
- name: 'Further-eastern European Time',
714
- offset: ['+', 3, 0],
715
- },
716
- {
717
- abbr: 'FJT',
718
- name: 'Fiji Time',
719
- offset: ['+', 12, 0],
720
- },
721
- {
722
- abbr: 'FKST',
723
- name: 'Falkland Islands Summer Time',
724
- offset: ['-', 3, 0],
725
- },
726
- {
727
- abbr: 'FKT',
728
- name: 'Falkland Islands Time',
729
- offset: ['-', 4, 0],
730
- },
731
- {
732
- abbr: 'FNT',
733
- name: 'Fernando de Noronha Time',
734
- offset: ['-', 2, 0],
735
- },
736
- {
737
- abbr: 'GALT',
738
- name: 'Galapagos Time',
739
- offset: ['-', 6, 0],
740
- },
741
- {
742
- abbr: 'GAMT',
743
- name: 'Gambier Islands',
744
- offset: ['-', 9, 0],
745
- },
746
- {
747
- abbr: 'GET',
748
- name: 'Georgia Standard Time',
749
- offset: ['+', 4, 0],
750
- },
751
- {
752
- abbr: 'GFT',
753
- name: 'French Guiana Time',
754
- offset: ['-', 3, 0],
755
- },
756
- {
757
- abbr: 'GILT',
758
- name: 'Gilbert Island Time',
759
- offset: ['+', 12, 0],
760
- },
761
- {
762
- abbr: 'GIT',
763
- name: 'Gambier Island Time',
764
- offset: ['-', 9, 0],
765
- },
766
- {
767
- abbr: 'GMT',
768
- name: 'Greenwich Mean Time',
769
- offset: ['+', 0, 0],
770
- },
771
- {
772
- abbr: 'GST',
773
- name: 'Gulf Standard Time',
774
- offset: ['+', 4, 0],
775
- },
776
- {
777
- abbr: 'GST',
778
- name: 'South Georgia Time',
779
- offset: ['-', 2, 0],
780
- },
781
- {
782
- abbr: 'GYT',
783
- name: 'Guyana Time',
784
- offset: ['-', 4, 0],
785
- },
786
- {
787
- abbr: 'HADT',
788
- name: 'Hawaii-Aleutian Daylight Time',
789
- offset: ['-', 9, 0],
790
- },
791
- {
792
- abbr: 'HAST',
793
- name: 'Hawaii-Aleutian Standard Time',
794
- offset: ['-', 10, 0],
795
- },
796
- {
797
- abbr: 'HKT',
798
- name: 'Hong Kong Time',
799
- offset: ['+', 8, 0],
800
- },
801
- {
802
- abbr: 'HMT',
803
- name: 'Heard and McDonald Islands Time',
804
- offset: ['+', 5, 0],
805
- },
806
- {
807
- abbr: 'HOVST',
808
- name: 'Khovd Summer Time',
809
- offset: ['+', 8, 0],
810
- },
811
- {
812
- abbr: 'HOVT',
813
- name: 'Khovd Standard Time',
814
- offset: ['+', 7, 0],
815
- },
816
- {
817
- abbr: 'ICT',
818
- name: 'Indochina Time',
819
- offset: ['+', 7, 0],
820
- },
821
- {
822
- abbr: 'IDT',
823
- name: 'Israel Daylight Time',
824
- offset: ['+', 3, 0],
825
- },
826
- {
827
- abbr: 'IOT',
828
- name: 'Indian Chagos Time',
829
- offset: ['+', 6, 0],
830
- },
831
- {
832
- abbr: 'IRDT',
833
- name: 'Iran Daylight Time',
834
- offset: ['+', 4, 30],
835
- },
836
- {
837
- abbr: 'IRKT',
838
- name: 'Irkutsk Time',
839
- offset: ['+', 8, 0],
840
- },
841
- {
842
- abbr: 'IRST',
843
- name: 'Iran Standard Time',
844
- offset: ['+', 3, 30],
845
- },
846
- {
847
- abbr: 'IST',
848
- name: 'Indian Standard Time',
849
- offset: ['+', 5, 30],
850
- },
851
- {
852
- abbr: 'IST',
853
- name: 'Irish Standard Time',
854
- offset: ['+', 1, 0],
855
- },
856
- {
857
- abbr: 'IST',
858
- name: 'Israel Standard Time',
859
- offset: ['+', 2, 0],
860
- },
861
- {
862
- abbr: 'JST',
863
- name: 'Japan Standard Time',
864
- offset: ['+', 9, 0],
865
- },
866
- {
867
- abbr: 'KGT',
868
- name: 'Kyrgyzstan time',
869
- offset: ['+', 6, 0],
870
- },
871
- {
872
- abbr: 'KOST',
873
- name: 'Kosrae Time',
874
- offset: ['+', 11, 0],
875
- },
876
- {
877
- abbr: 'KRAT',
878
- name: 'Krasnoyarsk Time',
879
- offset: ['+', 7, 0],
880
- },
881
- {
882
- abbr: 'KST',
883
- name: 'Korea Standard Time',
884
- offset: ['+', 9, 0],
885
- },
886
- {
887
- abbr: 'LHDT',
888
- name: 'Lord Howe Daylight Time',
889
- offset: ['+', 11, 0],
890
- },
891
- {
892
- abbr: 'LHST',
893
- name: 'Lord Howe Standard Time',
894
- offset: ['+', 10, 30],
895
- },
896
- {
897
- abbr: 'LINT',
898
- name: 'Line Islands Time',
899
- offset: ['+', 14, 0],
900
- },
901
- {
902
- abbr: 'MAGT',
903
- name: 'Magadan Time',
904
- offset: ['+', 11, 0],
905
- },
906
- {
907
- abbr: 'MART',
908
- name: 'Marquesas Islands Time',
909
- offset: ['-', 9, 30],
910
- },
911
- {
912
- abbr: 'MAWT',
913
- name: 'Mawson Station Time',
914
- offset: ['+', 5, 0],
915
- },
916
- {
917
- abbr: 'MDT',
918
- name: 'Mountain Daylight Time',
919
- offset: ['-', 6, 0],
920
- },
921
- {
922
- abbr: 'MHT',
923
- name: 'Marshall Islands',
924
- offset: ['+', 12, 0],
925
- },
926
- {
927
- abbr: 'MIST',
928
- name: 'Macquarie Island Station Time',
929
- offset: ['+', 11, 0],
930
- },
931
- {
932
- abbr: 'MIT',
933
- name: 'Marquesas Islands Time',
934
- offset: ['-', 9, 30],
935
- },
936
- {
937
- abbr: 'MMT',
938
- name: 'Myanmar Standard Time',
939
- offset: ['+', 6, 30],
940
- },
941
- {
942
- abbr: 'MSK',
943
- name: 'Moscow Time',
944
- offset: ['+', 3, 0],
945
- },
946
- {
947
- abbr: 'MST',
948
- name: 'Mountain Standard Time',
949
- offset: ['-', 7, 0],
950
- },
951
- {
952
- abbr: 'MST',
953
- name: 'Malaysia Standard Time',
954
- offset: ['+', 8, 0],
955
- },
956
- {
957
- abbr: 'MT',
958
- name: 'Mountain Time',
959
- offset: ['-', 7, 0],
960
- },
961
- {
962
- abbr: 'MUT',
963
- name: 'Mauritius Time',
964
- offset: ['+', 4, 0],
965
- },
966
- {
967
- abbr: 'MVT',
968
- name: 'Maldives Time',
969
- offset: ['+', 5, 0],
970
- },
971
- {
972
- abbr: 'MYT',
973
- name: 'Malaysia Time',
974
- offset: ['+', 8, 0],
975
- },
976
- {
977
- abbr: 'NCT',
978
- name: 'New Caledonia Time',
979
- offset: ['+', 11, 0],
980
- },
981
- {
982
- abbr: 'NDT',
983
- name: 'Newfoundland Daylight Time',
984
- offset: ['-', 2, 30],
985
- },
986
- {
987
- abbr: 'NFT',
988
- name: 'Norfolk Time',
989
- offset: ['+', 11, 0],
990
- },
991
- {
992
- abbr: 'NPT',
993
- name: 'Nepal Time',
994
- offset: ['+', 5, 45],
995
- },
996
- {
997
- abbr: 'NRT',
998
- name: 'Nauru Time',
999
- offset: ['+', 12, 0],
1000
- },
1001
- {
1002
- abbr: 'NST',
1003
- name: 'Newfoundland Standard Time',
1004
- offset: ['-', 3, 30],
1005
- },
1006
- {
1007
- abbr: 'NT',
1008
- name: 'Newfoundland Time',
1009
- offset: ['-', 3, 30],
1010
- },
1011
- {
1012
- abbr: 'NUT',
1013
- name: 'Niue Time',
1014
- offset: ['-', 11, 0],
1015
- },
1016
- {
1017
- abbr: 'NZDT',
1018
- name: 'New Zealand Daylight Time',
1019
- offset: ['+', 13, 0],
1020
- },
1021
- {
1022
- abbr: 'NZST',
1023
- name: 'New Zealand Standard Time',
1024
- offset: ['+', 12, 0],
1025
- },
1026
- {
1027
- abbr: 'OMST',
1028
- name: 'Omsk Time',
1029
- offset: ['+', 6, 0],
1030
- },
1031
- {
1032
- abbr: 'ORAT',
1033
- name: 'Oral Time',
1034
- offset: ['+', 5, 0],
1035
- },
1036
- {
1037
- abbr: 'PDT',
1038
- name: 'Pacific Daylight Time',
1039
- offset: ['-', 7, 0],
1040
- },
1041
- {
1042
- abbr: 'PET',
1043
- name: 'Peru Time',
1044
- offset: ['-', 5, 0],
1045
- },
1046
- {
1047
- abbr: 'PETT',
1048
- name: 'Kamchatka Time',
1049
- offset: ['+', 12, 0],
1050
- },
1051
- {
1052
- abbr: 'PGT',
1053
- name: 'Papua New Guinea Time',
1054
- offset: ['+', 10, 0],
1055
- },
1056
- {
1057
- abbr: 'PHOT',
1058
- name: 'Phoenix Island Time',
1059
- offset: ['+', 13, 0],
1060
- },
1061
- {
1062
- abbr: 'PHST',
1063
- name: 'Philippine Standard Time',
1064
- offset: ['+', 8, 0],
1065
- },
1066
- {
1067
- abbr: 'PHT',
1068
- name: 'Philippine Time',
1069
- offset: ['+', 8, 0],
1070
- },
1071
- {
1072
- abbr: 'PKT',
1073
- name: 'Pakistan Standard Time',
1074
- offset: ['+', 5, 0],
1075
- },
1076
- {
1077
- abbr: 'PMDT',
1078
- name: 'Saint Pierre and Miquelon Daylight time',
1079
- offset: ['-', 2, 0],
1080
- },
1081
- {
1082
- abbr: 'PMST',
1083
- name: 'Saint Pierre and Miquelon Standard Time',
1084
- offset: ['-', 3, 0],
1085
- },
1086
- {
1087
- abbr: 'PONT',
1088
- name: 'Pohnpei Standard Time',
1089
- offset: ['+', 11, 0],
1090
- },
1091
- {
1092
- abbr: 'PST',
1093
- name: 'Pacific Standard Time',
1094
- offset: ['-', 8, 0],
1095
- },
1096
- {
1097
- abbr: 'PT',
1098
- name: 'Pacific Time',
1099
- offset: ['-', 8, 0],
1100
- },
1101
- {
1102
- abbr: 'PWT',
1103
- name: 'Palau Time',
1104
- offset: ['+', 9, 0],
1105
- },
1106
- {
1107
- abbr: 'PYST',
1108
- name: 'Paraguay Summer Time',
1109
- offset: ['-', 3, 0],
1110
- },
1111
- {
1112
- abbr: 'PYT',
1113
- name: 'Paraguay Time',
1114
- offset: ['-', 4, 0],
1115
- },
1116
- {
1117
- abbr: 'RET',
1118
- name: 'Réunion Time',
1119
- offset: ['+', 4, 0],
1120
- },
1121
- {
1122
- abbr: 'ROTT',
1123
- name: 'Rothera Research Station Time',
1124
- offset: ['-', 3, 0],
1125
- },
1126
- {
1127
- abbr: 'SAKT',
1128
- name: 'Sakhalin Island time',
1129
- offset: ['+', 11, 0],
1130
- },
1131
- {
1132
- abbr: 'SAMT',
1133
- name: 'Samara Time',
1134
- offset: ['+', 4, 0],
1135
- },
1136
- {
1137
- abbr: 'SAST',
1138
- name: 'South African Standard Time',
1139
- offset: ['+', 2, 0],
1140
- },
1141
- {
1142
- abbr: 'SBT',
1143
- name: 'Solomon Islands Time',
1144
- offset: ['+', 11, 0],
1145
- },
1146
- {
1147
- abbr: 'SCT',
1148
- name: 'Seychelles Time',
1149
- offset: ['+', 4, 0],
1150
- },
1151
- {
1152
- abbr: 'SGT',
1153
- name: 'Singapore Time',
1154
- offset: ['+', 8, 0],
1155
- },
1156
- {
1157
- abbr: 'SLST',
1158
- name: 'Sri Lanka Standard Time',
1159
- offset: ['+', 5, 30],
1160
- },
1161
- {
1162
- abbr: 'SRET',
1163
- name: 'Srednekolymsk Time',
1164
- offset: ['+', 11, 0],
1165
- },
1166
- {
1167
- abbr: 'SRT',
1168
- name: 'Suriname Time',
1169
- offset: ['-', 3, 0],
1170
- },
1171
- {
1172
- abbr: 'SST',
1173
- name: 'Samoa Standard Time',
1174
- offset: ['-', 11, 0],
1175
- },
1176
- {
1177
- abbr: 'SYOT',
1178
- name: 'Showa Station Time',
1179
- offset: ['+', 3, 0],
1180
- },
1181
- {
1182
- abbr: 'TAHT',
1183
- name: 'Tahiti Time',
1184
- offset: ['-', 10, 0],
1185
- },
1186
- {
1187
- abbr: 'TFT',
1188
- name: 'French Southern and Antarctic Time',
1189
- offset: ['+', 5, 0],
1190
- },
1191
- {
1192
- abbr: 'THA',
1193
- name: 'Thailand Standard Time',
1194
- offset: ['+', 7, 0],
1195
- },
1196
- {
1197
- abbr: 'TJT',
1198
- name: 'Tajikistan Time',
1199
- offset: ['+', 5, 0],
1200
- },
1201
- {
1202
- abbr: 'TKT',
1203
- name: 'Tokelau Time',
1204
- offset: ['+', 13, 0],
1205
- },
1206
- {
1207
- abbr: 'TLT',
1208
- name: 'Timor Leste Time',
1209
- offset: ['+', 9, 0],
1210
- },
1211
- {
1212
- abbr: 'TMT',
1213
- name: 'Turkmenistan Time',
1214
- offset: ['+', 5, 0],
1215
- },
1216
- {
1217
- abbr: 'TOT',
1218
- name: 'Tonga Time',
1219
- offset: ['+', 13, 0],
1220
- },
1221
- {
1222
- abbr: 'TRT',
1223
- name: 'Turkey Time',
1224
- offset: ['+', 3, 0],
1225
- },
1226
- {
1227
- abbr: 'TVT',
1228
- name: 'Tuvalu Time',
1229
- offset: ['+', 12, 0],
1230
- },
1231
- {
1232
- abbr: 'ULAST',
1233
- name: 'Ulaanbaatar Summer Time',
1234
- offset: ['+', 9, 0],
1235
- },
1236
- {
1237
- abbr: 'ULAT',
1238
- name: 'Ulaanbaatar Standard Time',
1239
- offset: ['+', 8, 0],
1240
- },
1241
- {
1242
- abbr: 'USZ1',
1243
- name: 'Kaliningrad Time',
1244
- offset: ['+', 2, 0],
1245
- },
1246
- {
1247
- abbr: 'UTC',
1248
- name: 'Coordinated Universal Time',
1249
- offset: ['+', 0, 0],
1250
- },
1251
- {
1252
- abbr: 'UYST',
1253
- name: 'Uruguay Summer Time',
1254
- offset: ['-', 2, 0],
1255
- },
1256
- {
1257
- abbr: 'UYT',
1258
- name: 'Uruguay Standard Time',
1259
- offset: ['-', 3, 0],
1260
- },
1261
- {
1262
- abbr: 'UZT',
1263
- name: 'Uzbekistan Time',
1264
- offset: ['+', 5, 0],
1265
- },
1266
- {
1267
- abbr: 'VET',
1268
- name: 'Venezuelan Standard Time',
1269
- offset: ['-', 4, 0],
1270
- },
1271
- {
1272
- abbr: 'VLAT',
1273
- name: 'Vladivostok Time',
1274
- offset: ['+', 10, 0],
1275
- },
1276
- {
1277
- abbr: 'VOLT',
1278
- name: 'Volgograd Time',
1279
- offset: ['+', 4, 0],
1280
- },
1281
- {
1282
- abbr: 'VOST',
1283
- name: 'Vostok Station Time',
1284
- offset: ['+', 6, 0],
1285
- },
1286
- {
1287
- abbr: 'VUT',
1288
- name: 'Vanuatu Time',
1289
- offset: ['+', 11, 0],
1290
- },
1291
- {
1292
- abbr: 'WAKT',
1293
- name: 'Wake Island Time',
1294
- offset: ['+', 12, 0],
1295
- },
1296
- {
1297
- abbr: 'WAST',
1298
- name: 'West Africa Summer Time',
1299
- offset: ['+', 2, 0],
1300
- },
1301
- {
1302
- abbr: 'WAT',
1303
- name: 'West Africa Time',
1304
- offset: ['+', 1, 0],
1305
- },
1306
- {
1307
- abbr: 'WEST',
1308
- name: 'Western European Summer Time',
1309
- offset: ['+', 1, 0],
1310
- },
1311
- {
1312
- abbr: 'WET',
1313
- name: 'Western European Time',
1314
- offset: ['+', 0, 0],
1315
- },
1316
- {
1317
- abbr: 'WFT',
1318
- name: 'Wallis and Futuna Time',
1319
- offset: ['+', 12, 0],
1320
- },
1321
- {
1322
- abbr: 'WGST',
1323
- name: 'West Greenland Summer Time',
1324
- offset: ['-', 2, 0],
1325
- },
1326
- {
1327
- abbr: 'WGST',
1328
- name: 'West Greenland Time',
1329
- offset: ['-', 3, 0],
1330
- },
1331
- {
1332
- abbr: 'WIB',
1333
- name: 'Western Indonesia Time',
1334
- offset: ['+', 7, 0],
1335
- },
1336
- {
1337
- abbr: 'WIT',
1338
- name: 'Eastern Indonesia Time',
1339
- offset: ['+', 9, 0],
1340
- },
1341
- {
1342
- abbr: 'WST',
1343
- name: 'Western Standard Time',
1344
- offset: ['+', 8, 0],
1345
- },
1346
- {
1347
- abbr: 'YAKT',
1348
- name: 'Yakutsk Time',
1349
- offset: ['+', 9, 0],
1350
- },
1351
- {
1352
- abbr: 'YEKT',
1353
- name: 'Yekaterinburg Time',
1354
- offset: ['+', 5, 0],
1355
- },
1356
- ];
1357
355
  /** The current date as a Date object */
1358
356
  const d = new Date();
1359
357
  /** The current minute of the current hour */
@@ -1385,44 +383,12 @@ const weekdayNamesList = [
1385
383
  'Friday',
1386
384
  'Saturday',
1387
385
  ];
1388
- function compareDates(d1, mode, d2) {
1389
- const date1 = d1.getTime(), date2 = d2.getTime();
1390
- switch (mode) {
1391
- case '>':
1392
- return date1 > date2;
1393
- case '>=':
1394
- return date1 >= date2;
1395
- case '<':
1396
- return date1 < date2;
1397
- case '<=':
1398
- return date1 <= date2;
1399
- case '==':
1400
- return date1 === date2;
1401
- default:
1402
- throw new Error('Invalid mode');
1403
- }
1404
- }
1405
386
  /** The name of the current month */
1406
387
  const currentMonthName = getMonthName();
1407
388
  /** The name of the current day of the week */
1408
389
  const currentWeekdayName = getWeekdayName();
1409
- function dateMath(d1, operator, d2) {
1410
- const date1 = d1.getTime(), date2 = d2.getTime();
1411
- switch (operator) {
1412
- case '+':
1413
- return new Date(date1 + date2);
1414
- case '-':
1415
- return new Date(date1 - date2);
1416
- case '*':
1417
- return new Date(date1 * date2);
1418
- case '/':
1419
- return new Date(date1 / date2);
1420
- default:
1421
- throw new Error('Invalid operator');
1422
- }
1423
- }
1424
390
  /**
1425
- * # Days In Month
391
+ * ### Days In Month
1426
392
  * - Returns the number of days in the specified month.
1427
393
  * @param {Date} date A Date object representing the month to get the number of days for. (Preset to the current date)
1428
394
  * @returns {number} The number of days in the specified month.
@@ -1432,7 +398,7 @@ function daysInMonth(date = d) {
1432
398
  return new Date(selectedYear, selectedMonth, 0).getDate();
1433
399
  }
1434
400
  /**
1435
- * # First of Month
401
+ * ### First of Month
1436
402
  * - Returns the first day of the specified month.
1437
403
  * @param {Date} date A Date object representing the month to get the first day for. (Preset to current date)
1438
404
  * @returns {Date} A Date object of the given month, with the first day.
@@ -1442,7 +408,7 @@ function firstOfMonth(date = d) {
1442
408
  return new Date(date.getFullYear(), date.getMonth(), 1);
1443
409
  }
1444
410
  /**
1445
- * # Get Date
411
+ * ### Get Date
1446
412
  * - Returns the date with two digits
1447
413
  * @param {number|Date} date The date to get date
1448
414
  * @returns {string} The date with two digits
@@ -1456,7 +422,7 @@ function getDate(date = d) {
1456
422
  return formattedDate;
1457
423
  }
1458
424
  /**
1459
- * # Get Hours
425
+ * ### Get Hours
1460
426
  * - Returns the hours with two digits
1461
427
  * @param {number|Date} hours The date to get hours
1462
428
  * @returns {string} The hours with two digits
@@ -1470,7 +436,7 @@ function getHours(hours = d) {
1470
436
  return formattedHours;
1471
437
  }
1472
438
  /**
1473
- * # Get Hours in 12
439
+ * ### Get Hours in 12
1474
440
  * - Returns the hour based on the specified 24 hour value in a 12 hour format
1475
441
  * @param {number|Date} hour The hour to be converted to 12 hour format
1476
442
  * @returns {number} The hour in a 12 hour format
@@ -1483,7 +449,7 @@ function getHoursIn12(hour = d) {
1483
449
  return hour;
1484
450
  }
1485
451
  /**
1486
- * # Get Meridian from Hour
452
+ * ### Get Meridian from Hour
1487
453
  * - Returns either 'pm' or 'am' based on the specified 24 hour value
1488
454
  * @param {number|Date} hour The hour to get the meridian from
1489
455
  * @returns {'am'|'pm'} The meridian for the given hour
@@ -1496,7 +462,7 @@ function getMeridianFromHour(hour = d) {
1496
462
  return 'am';
1497
463
  }
1498
464
  /**
1499
- * # Get Milliseconds
465
+ * ### Get Milliseconds
1500
466
  * - Returns the milliseconds with two digits
1501
467
  * @param {number|Date} milliseconds The date to get milliseconds
1502
468
  * @returns {string} The milliseconds with two digits
@@ -1510,7 +476,7 @@ function getMilliseconds(milliseconds = d) {
1510
476
  return formattedMilliseconds;
1511
477
  }
1512
478
  /**
1513
- * # Get Minutes
479
+ * ### Get Minutes
1514
480
  * - Returns the minutes with two digits
1515
481
  * @param {number|Date} minutes The date to get minutes
1516
482
  * @returns {string} The minutes with two digits
@@ -1524,7 +490,7 @@ function getMinutes(minutes = d) {
1524
490
  return formattedMinutes;
1525
491
  }
1526
492
  /**
1527
- * # Get Month
493
+ * ### Get Month
1528
494
  * - Returns the month with two digits
1529
495
  * @param {number|Date} month The date to get month
1530
496
  * @returns {string} The month with two digits
@@ -1541,7 +507,7 @@ function getMonthIndexFromName(name) {
1541
507
  return monthNamesList.findIndex(monthName => monthName === name);
1542
508
  }
1543
509
  /**
1544
- * # Get Month Name
510
+ * ### Get Month Name
1545
511
  * - Returns the name of the specified month
1546
512
  * @param {Date} date A Date object representing the month to get the name of the month from. (Preset to the current date)
1547
513
  * @returns {MonthName} The name of the specified month
@@ -1552,7 +518,7 @@ function getMonthName(date = d) {
1552
518
  return monthNamesList[date.getMonth()];
1553
519
  }
1554
520
  /**
1555
- * # Get Next Month
521
+ * ### Get Next Month
1556
522
  * - Returns the number of the following month from the specified month
1557
523
  * @param {Date} date The Date object representing the month to get the following month from (Preset to current date)
1558
524
  * @returns {number} The indexed month of the following month
@@ -1563,7 +529,7 @@ function getNextMonth(date = d) {
1563
529
  return givenMonth === 11 ? 0 : givenMonth + 1;
1564
530
  }
1565
531
  /**
1566
- * # Get Previous Month
532
+ * ### Get Previous Month
1567
533
  * - Returns the number of the previous month from the specified month
1568
534
  * @param {Date} date The Date object representing the month to get the previous month from (Preset to current date)
1569
535
  * @returns {number} The indexed month of the previous month
@@ -1574,7 +540,7 @@ function getPreviousMonth(date = d) {
1574
540
  return givenMonth === 0 ? 11 : givenMonth - 1;
1575
541
  }
1576
542
  /**
1577
- * # Get Seconds
543
+ * ### Get Seconds
1578
544
  * - Returns the seconds with two digits
1579
545
  * @param {number|Date} seconds The date to get seconds
1580
546
  * @returns {string} The seconds with two digits
@@ -1588,16 +554,7 @@ function getSeconds(seconds = d) {
1588
554
  return formattedSeconds;
1589
555
  }
1590
556
  /**
1591
- * # Get Local Timezone
1592
- * - Returns the user's local timezone data.
1593
- * @returns {TimezoneData | undefined} Timezone data object
1594
- */
1595
- function getLocalTimezone() {
1596
- const timezoneOffset = new Date().getTimezoneOffset(), isPositive = timezoneOffset >= 0, absoluteOffset = Math.abs(timezoneOffset), offsetHours = Math.floor(absoluteOffset / 60), offsetMinutes = absoluteOffset % 60;
1597
- return timezoneList.find(({ offset }) => (isPositive ? offset[0] === '+' : offset[0] === '-') && offset[1] === offsetHours && offset[2] === offsetMinutes);
1598
- }
1599
- /**
1600
- * # Get User Readable Date
557
+ * ### Get User Readable Date
1601
558
  * - Returns a string of the current date in a user-friendly way
1602
559
  * - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
1603
560
  * @param date (default: `new Date()`)
@@ -1622,7 +579,7 @@ function getUserReadableDate(date = d) {
1622
579
  return fullDateString;
1623
580
  }
1624
581
  /**
1625
- * # Get Weekday Name
582
+ * ### Get Weekday Name
1626
583
  * - Returns the weekday name of the specified day
1627
584
  * @param {number | Date} weekday A Date object or number representing the day to get the weekday name from. (Preset to the current date)
1628
585
  * @returns {WeekdayName} The name of the specified weekday
@@ -1634,7 +591,7 @@ function getWeekdayName(weekday = d) {
1634
591
  return weekdayNamesList[weekday.getDay()];
1635
592
  }
1636
593
  /**
1637
- * # Get Years in Range
594
+ * ### Get Years in Range
1638
595
  * - Returns an array of years in between the specified minimum and maximum years
1639
596
  * @param {number} minYear The minimum year
1640
597
  * @param {number} maxYear The maximum year
@@ -1648,7 +605,7 @@ function getYearsInRange(minYear = 0, maxYear = year) {
1648
605
  return yearList;
1649
606
  }
1650
607
  /**
1651
- * # To Full Date String
608
+ * ### To Full Date String
1652
609
  * - Returns a formatted string to display the date
1653
610
  * @param {Date} date (default: `new Date()`)
1654
611
  * @param {ToFullDateStringOptionsProps} options Change how to display the weekday, month name, day of the month, and year.
@@ -1691,7 +648,7 @@ function toFullDateString(date = d, options) {
1691
648
  return weekdayName + monthName + dayOfMonth + year;
1692
649
  }
1693
650
  /**
1694
- * # Get User Readable Date From Timestampz
651
+ * ### Get User Readable Date From Timestampz
1695
652
  * - Returns a string of the current date in a user-friendly way
1696
653
  * - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
1697
654
  * @param string
@@ -1701,12 +658,31 @@ function getUserReadableDateFromTimestampz(timestampz) {
1701
658
  const [date, time] = timestampz.split('T') || [];
1702
659
  const [year, month, day] = date?.split('-').map(string => Number(string)) || [];
1703
660
  const timezoneIsAheadOfUTC = time?.includes('+');
1704
- const [hms, _timezone] = timezoneIsAheadOfUTC ? time?.split('+') : time?.split('-') || [];
661
+ const [hms, timezone] = timezoneIsAheadOfUTC ? time?.split('+') : time?.split('-') || [];
1705
662
  const [hours, minutes, seconds] = hms?.split(':').map(string => Number(string)) || [];
1706
- // const [timezoneHours, timezoneMinutes] = timezone?.split(':').map(string => Number(string)) || []
663
+ const [timezoneHours, timezoneMinutes] = timezone?.split(':').map(string => Number(string)) || [];
1707
664
  const dateAndTime = new Date(year, month - 1, day, hours, minutes, seconds), userReadableDateAndTime = getUserReadableDate(dateAndTime);
1708
665
  return userReadableDateAndTime;
1709
666
  }
667
+ function getLocalTime(time) {
668
+ const date = new Date(), [hours, minutes] = typeof time === 'string' ? time.split(':') : time;
669
+ const timezone = getTimezone();
670
+ console.log(timezone);
671
+ date.setUTCHours(Number(hours));
672
+ date.setMinutes(Number(minutes));
673
+ return date.toLocaleTimeString([], {
674
+ hour: 'numeric',
675
+ minute: '2-digit',
676
+ hour12: true,
677
+ });
678
+ }
679
+ function getTimezone() {
680
+ const date = new Date();
681
+ const timezonePart = Intl.DateTimeFormat('en-US', { timeZoneName: 'short' })
682
+ .formatToParts(date)
683
+ .find(part => part.type === 'timeZoneName');
684
+ return timezonePart ? timezonePart.value : '';
685
+ }
1710
686
 
1711
687
  function findComponentByType(children, componentType) {
1712
688
  const childrenArray = react.Children.toArray(children);
@@ -1923,10 +899,8 @@ function twSort(className) {
1923
899
  }
1924
900
 
1925
901
  exports.addClass = addClass;
1926
- exports.compareDates = compareDates;
1927
902
  exports.currentMonthName = currentMonthName;
1928
903
  exports.currentWeekdayName = currentWeekdayName;
1929
- exports.dateMath = dateMath;
1930
904
  exports.daysInMonth = daysInMonth;
1931
905
  exports.easeOutExpo = easeOutExpo;
1932
906
  exports.emailRegex = emailRegex;
@@ -1937,7 +911,7 @@ exports.formatPhoneNumber = formatPhoneNumber;
1937
911
  exports.getDate = getDate;
1938
912
  exports.getHours = getHours;
1939
913
  exports.getHoursIn12 = getHoursIn12;
1940
- exports.getLocalTimezone = getLocalTimezone;
914
+ exports.getLocalTime = getLocalTime;
1941
915
  exports.getMeridianFromHour = getMeridianFromHour;
1942
916
  exports.getMilliseconds = getMilliseconds;
1943
917
  exports.getMinutes = getMinutes;
@@ -1947,6 +921,7 @@ exports.getMonthName = getMonthName;
1947
921
  exports.getNextMonth = getNextMonth;
1948
922
  exports.getPreviousMonth = getPreviousMonth;
1949
923
  exports.getSeconds = getSeconds;
924
+ exports.getTimezone = getTimezone;
1950
925
  exports.getUserReadableDate = getUserReadableDate;
1951
926
  exports.getUserReadableDateFromTimestampz = getUserReadableDateFromTimestampz;
1952
927
  exports.getWeekdayName = getWeekdayName;
@@ -1958,7 +933,6 @@ exports.monthNamesList = monthNamesList;
1958
933
  exports.removeClass = removeClass;
1959
934
  exports.splitCamelCase = splitCamelCase;
1960
935
  exports.telRegex = telRegex;
1961
- exports.timezoneList = timezoneList;
1962
936
  exports.toCamelCase = toCamelCase;
1963
937
  exports.toFullDateString = toFullDateString;
1964
938
  exports.toLowerCase = toLowerCase;