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