@xaypay/tui 0.2.1 → 0.2.2
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/dist/index.es.js +1518 -540
- package/dist/index.js +1518 -540
- package/package.json +2 -1
- package/rollup.config.mjs +3 -0
- package/tui.config.js +4 -0
- package/vite.config.mjs +0 -36
package/dist/index.es.js
CHANGED
|
@@ -437,35 +437,799 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
437
437
|
}, iconDelItem ? iconDelItem : /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
|
|
438
438
|
});
|
|
439
439
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
440
|
+
const boxSizing = 'border-box';
|
|
441
|
+
const fontStyle = 'normal';
|
|
442
|
+
const fontFamily = 'Arial';
|
|
443
|
+
const fontWeight = 500;
|
|
444
|
+
const transparent = 'transparent';
|
|
445
|
+
const presetColors = {
|
|
446
|
+
info: '#F24C4C',
|
|
447
|
+
dark: '#3C393E',
|
|
448
|
+
light: '#EEEEEE',
|
|
449
|
+
extraLight: '#FBFBFB',
|
|
450
|
+
danger: '#EE0000',
|
|
451
|
+
success: '#0DA574',
|
|
452
|
+
warning: '#FECD29',
|
|
453
|
+
secondary: '#D1D1D1',
|
|
454
|
+
primary: '#051942',
|
|
455
|
+
primarySecond: '#00236A'
|
|
456
|
+
};
|
|
457
|
+
const fontObject = {
|
|
458
|
+
size: '16px',
|
|
459
|
+
style: fontStyle,
|
|
460
|
+
weight: fontWeight,
|
|
461
|
+
family: fontFamily
|
|
462
|
+
};
|
|
463
|
+
var packageResult = {
|
|
464
|
+
// default properties for <Button /> component
|
|
465
|
+
BUTTON: {
|
|
466
|
+
type: 'button',
|
|
467
|
+
width: '100%',
|
|
468
|
+
height: '46px',
|
|
469
|
+
color: 'white',
|
|
470
|
+
contentWidth: false,
|
|
471
|
+
border: 'none',
|
|
472
|
+
radius: '6px',
|
|
473
|
+
cursor: 'pointer',
|
|
474
|
+
padding: '12px 20px',
|
|
475
|
+
disabled: false,
|
|
476
|
+
className: '',
|
|
477
|
+
transition: 'background-color 240ms, color 240ms',
|
|
478
|
+
box: {
|
|
479
|
+
sizing: boxSizing
|
|
480
|
+
},
|
|
481
|
+
colors: {
|
|
482
|
+
background: 'rgba(0, 35, 106, 1)',
|
|
483
|
+
backgroundHover: '#CB3A3A',
|
|
484
|
+
disabled: 'rgba(60, 57, 62, 1)',
|
|
485
|
+
disabledLine: 'rgba(60, 57, 62, 1)',
|
|
486
|
+
disabledBackground: 'rgba(238, 238, 238, 1)'
|
|
487
|
+
},
|
|
488
|
+
font: {
|
|
489
|
+
...fontObject
|
|
490
|
+
},
|
|
491
|
+
text: {
|
|
492
|
+
transform: 'none',
|
|
493
|
+
colors: {
|
|
494
|
+
hover: '#001745'
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
icon: {
|
|
498
|
+
marginRight: '10px'
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
// default properties for <Input /> component
|
|
502
|
+
INPUT: {
|
|
503
|
+
type: 'text',
|
|
504
|
+
width: '100%',
|
|
505
|
+
color: 'rgb(60, 57, 62)',
|
|
506
|
+
height: '46px',
|
|
507
|
+
radius: '0px',
|
|
508
|
+
padding: '12px 15px',
|
|
509
|
+
disabled: false,
|
|
510
|
+
required: false,
|
|
511
|
+
className: '',
|
|
512
|
+
maxLength: 255,
|
|
513
|
+
iconWidth: '64px',
|
|
514
|
+
autoComplete: 'off',
|
|
515
|
+
box: {
|
|
516
|
+
sizing: boxSizing,
|
|
517
|
+
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
518
|
+
// like border
|
|
519
|
+
shadowHover: `0 0 0 2px ${presetColors.dark}` // like border
|
|
520
|
+
},
|
|
521
|
+
colors: {
|
|
522
|
+
background: 'white',
|
|
523
|
+
backgroundDisable: presetColors.secondary
|
|
524
|
+
},
|
|
525
|
+
font: {
|
|
526
|
+
...fontObject
|
|
527
|
+
},
|
|
528
|
+
label: {
|
|
529
|
+
color: presetColors.dark,
|
|
530
|
+
display: 'block',
|
|
531
|
+
lineHeight: '22px',
|
|
532
|
+
marginBottom: '6px',
|
|
533
|
+
font: {
|
|
534
|
+
...fontObject
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
error: {
|
|
538
|
+
left: '0px',
|
|
539
|
+
color: presetColors.danger,
|
|
540
|
+
zIndex: '1',
|
|
541
|
+
className: '',
|
|
542
|
+
marginTop: '10px',
|
|
543
|
+
lineHeight: '19px',
|
|
544
|
+
font: {
|
|
545
|
+
...fontObject
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
tel: {
|
|
549
|
+
display: 'flex',
|
|
550
|
+
alignItems: 'center',
|
|
551
|
+
justifyContent: 'center',
|
|
552
|
+
borderRight: {
|
|
553
|
+
width: '1px',
|
|
554
|
+
style: 'solid',
|
|
555
|
+
color: presetColors.secondary,
|
|
556
|
+
colors: {
|
|
557
|
+
hover: presetColors.dark
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
// default properties for <Tooltip /> component
|
|
563
|
+
TOOLTIP: {
|
|
564
|
+
type: 'top',
|
|
565
|
+
color: 'white',
|
|
566
|
+
width: '100px',
|
|
567
|
+
radius: '3px',
|
|
568
|
+
className: '',
|
|
569
|
+
// icon: React.createElement(SvgChecked, { fill: 'red' }),
|
|
570
|
+
|
|
571
|
+
parent: {
|
|
572
|
+
width: '46px',
|
|
573
|
+
height: '46px',
|
|
574
|
+
radius: '0px',
|
|
575
|
+
colors: {
|
|
576
|
+
background: transparent
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
colors: {
|
|
580
|
+
background: '#03a9f4'
|
|
581
|
+
},
|
|
582
|
+
font: {
|
|
583
|
+
...fontObject
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
// default properties for <Typography /> component
|
|
587
|
+
TYPOGRAPHY: {
|
|
588
|
+
radius: '0px',
|
|
589
|
+
border: 'none',
|
|
590
|
+
cursor: 'default',
|
|
591
|
+
className: '',
|
|
592
|
+
colors: {
|
|
593
|
+
p: presetColors.dark,
|
|
594
|
+
h1: presetColors.dark,
|
|
595
|
+
h2: presetColors.dark,
|
|
596
|
+
h3: presetColors.dark,
|
|
597
|
+
h4: presetColors.dark,
|
|
598
|
+
h5: presetColors.dark,
|
|
599
|
+
h6: presetColors.dark,
|
|
600
|
+
span: presetColors.dark,
|
|
601
|
+
backgroundp: transparent,
|
|
602
|
+
backgroundh1: transparent,
|
|
603
|
+
backgroundh2: transparent,
|
|
604
|
+
backgroundh3: transparent,
|
|
605
|
+
backgroundh4: transparent,
|
|
606
|
+
backgroundh5: transparent,
|
|
607
|
+
backgroundh6: transparent,
|
|
608
|
+
backgroundspan: transparent
|
|
609
|
+
},
|
|
610
|
+
font: {
|
|
611
|
+
sizep: '13px',
|
|
612
|
+
sizeh1: '70px',
|
|
613
|
+
sizeh2: '50px',
|
|
614
|
+
sizeh3: '38px',
|
|
615
|
+
sizeh4: '24px',
|
|
616
|
+
sizeh5: '20px',
|
|
617
|
+
sizeh6: '14px',
|
|
618
|
+
sizespan: '12px',
|
|
619
|
+
stylep: fontStyle,
|
|
620
|
+
styleh1: fontStyle,
|
|
621
|
+
styleh2: fontStyle,
|
|
622
|
+
styleh3: fontStyle,
|
|
623
|
+
styleh4: fontStyle,
|
|
624
|
+
styleh5: fontStyle,
|
|
625
|
+
styleh6: fontStyle,
|
|
626
|
+
stylespan: fontStyle,
|
|
627
|
+
weightp: fontWeight,
|
|
628
|
+
weighth1: fontWeight,
|
|
629
|
+
weighth2: fontWeight,
|
|
630
|
+
weighth3: fontWeight,
|
|
631
|
+
weighth4: fontWeight,
|
|
632
|
+
weighth5: fontWeight,
|
|
633
|
+
weighth6: fontWeight,
|
|
634
|
+
weightspan: fontWeight,
|
|
635
|
+
familyp: fontFamily,
|
|
636
|
+
familyh1: fontFamily,
|
|
637
|
+
familyh2: fontFamily,
|
|
638
|
+
familyh3: fontFamily,
|
|
639
|
+
familyh4: fontFamily,
|
|
640
|
+
familyh5: fontFamily,
|
|
641
|
+
familyh6: fontFamily,
|
|
642
|
+
familyspan: fontFamily
|
|
643
|
+
},
|
|
644
|
+
text: {
|
|
645
|
+
alignp: 'left',
|
|
646
|
+
alignh1: 'left',
|
|
647
|
+
alignh2: 'left',
|
|
648
|
+
alignh3: 'left',
|
|
649
|
+
alignh4: 'left',
|
|
650
|
+
alignh5: 'left',
|
|
651
|
+
alignh6: 'left',
|
|
652
|
+
alignspan: 'left',
|
|
653
|
+
shadowp: 'none',
|
|
654
|
+
shadowh1: 'none',
|
|
655
|
+
shadowh2: 'none',
|
|
656
|
+
shadowh3: 'none',
|
|
657
|
+
shadowh4: 'none',
|
|
658
|
+
shadowh5: 'none',
|
|
659
|
+
shadowh6: 'none',
|
|
660
|
+
shadowspan: 'none',
|
|
661
|
+
transformp: 'none',
|
|
662
|
+
transformh1: 'none',
|
|
663
|
+
transformh2: 'none',
|
|
664
|
+
transformh3: 'none',
|
|
665
|
+
transformh4: 'none',
|
|
666
|
+
transformh5: 'none',
|
|
667
|
+
transformh6: 'none',
|
|
668
|
+
transformspan: 'none',
|
|
669
|
+
decorationp: 'none',
|
|
670
|
+
decorationh1: 'none',
|
|
671
|
+
decorationh2: 'none',
|
|
672
|
+
decorationh3: 'none',
|
|
673
|
+
decorationh4: 'none',
|
|
674
|
+
decorationh5: 'none',
|
|
675
|
+
decorationh6: 'none',
|
|
676
|
+
decorationspan: 'none',
|
|
677
|
+
lineHeightp: 'normal',
|
|
678
|
+
lineHeighth1: 'normal',
|
|
679
|
+
lineHeighth2: 'normal',
|
|
680
|
+
lineHeighth3: 'normal',
|
|
681
|
+
lineHeighth4: 'normal',
|
|
682
|
+
lineHeighth5: 'normal',
|
|
683
|
+
lineHeighth6: 'normal',
|
|
684
|
+
lineHeightspan: 'normal'
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
// default properties for <Select /> component
|
|
688
|
+
SELECT: {
|
|
689
|
+
dots: false,
|
|
690
|
+
className: '',
|
|
691
|
+
showCloseIcon: true,
|
|
692
|
+
// arrowIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
693
|
+
// closeIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
694
|
+
|
|
695
|
+
box: {
|
|
696
|
+
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
697
|
+
// like border
|
|
698
|
+
shadowHover: `0 0 0 2px ${presetColors.dark}` // like border
|
|
699
|
+
},
|
|
700
|
+
label: {
|
|
701
|
+
color: presetColors.dark,
|
|
702
|
+
display: 'block',
|
|
703
|
+
lineHeight: '22px',
|
|
704
|
+
marginBottom: '6px',
|
|
705
|
+
textTransform: 'none',
|
|
706
|
+
font: {
|
|
707
|
+
...fontObject
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
selected: {
|
|
711
|
+
color: presetColors.dark,
|
|
712
|
+
cursor: 'pointer',
|
|
713
|
+
radius: '6px',
|
|
714
|
+
padding: '0px 15px',
|
|
715
|
+
minHeight: '46px',
|
|
716
|
+
lineHeight: '22px',
|
|
717
|
+
transition: 'border-color 240ms',
|
|
718
|
+
box: {
|
|
719
|
+
sizing: boxSizing
|
|
720
|
+
},
|
|
721
|
+
colors: {
|
|
722
|
+
hover: '#373538',
|
|
723
|
+
background: presetColors.extraLight,
|
|
724
|
+
backgroundDisable: presetColors.secondary
|
|
725
|
+
},
|
|
726
|
+
font: {
|
|
727
|
+
...fontObject
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
options: {
|
|
731
|
+
radius: '6px',
|
|
732
|
+
colors: {
|
|
733
|
+
background: presetColors.extraLight
|
|
734
|
+
},
|
|
735
|
+
box: {
|
|
736
|
+
shadow: '0 0 10px rgba(60, 57, 62, 0.08)'
|
|
737
|
+
},
|
|
738
|
+
item: {
|
|
739
|
+
color: presetColors.dark,
|
|
740
|
+
cursor: 'pointer',
|
|
741
|
+
padding: '0px 15px',
|
|
742
|
+
minHeight: '46px',
|
|
743
|
+
lineHeight: '25px',
|
|
744
|
+
marginBottom: '2px',
|
|
745
|
+
box: {
|
|
746
|
+
sizing: boxSizing
|
|
747
|
+
},
|
|
748
|
+
colors: {
|
|
749
|
+
hover: presetColors.primarySecond,
|
|
750
|
+
backgroud: '#ffffff',
|
|
751
|
+
backgroudHover: 'unset'
|
|
752
|
+
},
|
|
753
|
+
font: {
|
|
754
|
+
...fontObject
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
error: {
|
|
759
|
+
color: 'rgb(238, 0, 0)',
|
|
760
|
+
marginTop: '10px',
|
|
761
|
+
zIndex: 10,
|
|
762
|
+
box: {
|
|
763
|
+
shadow: `0 0 0 2px ${presetColors.danger}`
|
|
764
|
+
},
|
|
765
|
+
font: {
|
|
766
|
+
...fontObject
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
// default properties for <Textarea /> component
|
|
771
|
+
TEXTAREA: {
|
|
772
|
+
color: presetColors.dark,
|
|
773
|
+
width: '400px',
|
|
774
|
+
height: '134px',
|
|
775
|
+
radius: '6px',
|
|
776
|
+
resize: 'none',
|
|
777
|
+
padding: '12px 15px',
|
|
778
|
+
minWidth: '200px',
|
|
779
|
+
maxWidth: '500px',
|
|
780
|
+
minHeight: '100px',
|
|
781
|
+
maxHeight: '300px',
|
|
782
|
+
maxLength: 1500,
|
|
783
|
+
className: '',
|
|
784
|
+
box: {
|
|
785
|
+
sizing: boxSizing,
|
|
786
|
+
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
787
|
+
// like border
|
|
788
|
+
|
|
789
|
+
colors: {
|
|
790
|
+
hover: `0 0 0 2px ${presetColors.dark}`,
|
|
791
|
+
// like border color
|
|
792
|
+
focus: `0 0 0 2px ${presetColors.primarySecond}` // like border color
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
colors: {
|
|
796
|
+
background: 'white'
|
|
797
|
+
},
|
|
798
|
+
label: {
|
|
799
|
+
color: presetColors.dark,
|
|
800
|
+
display: 'block',
|
|
801
|
+
marginBottom: '10px',
|
|
802
|
+
font: {
|
|
803
|
+
...fontObject
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
font: {
|
|
807
|
+
...fontObject
|
|
808
|
+
},
|
|
809
|
+
error: {
|
|
810
|
+
color: '#E40E00',
|
|
811
|
+
marginTop: '10px',
|
|
812
|
+
box: {
|
|
813
|
+
shadow: `0 0 0 2px ${presetColors.danger}` // like border
|
|
814
|
+
},
|
|
815
|
+
font: {
|
|
816
|
+
...fontObject
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
// default properties for <NewAutocomplete /> component
|
|
821
|
+
AUTOCOMPLETE: {
|
|
822
|
+
className: '',
|
|
823
|
+
searchCount: 3,
|
|
824
|
+
autoComplete: 'off',
|
|
825
|
+
showOptionDuration: '640ms',
|
|
826
|
+
color: presetColors.dark,
|
|
827
|
+
radius: '6px',
|
|
828
|
+
height: '46px',
|
|
829
|
+
padding: '0px 15px',
|
|
830
|
+
display: 'flex',
|
|
831
|
+
maxWidth: '400px',
|
|
832
|
+
direction: 'row',
|
|
833
|
+
lineHeight: '22px',
|
|
834
|
+
box: {
|
|
835
|
+
sizing: boxSizing,
|
|
836
|
+
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
837
|
+
// like border
|
|
838
|
+
shadowHover: `0 0 0 2px ${presetColors.dark}`,
|
|
839
|
+
// like border
|
|
840
|
+
shadowActive: `0 0 0 2px ${presetColors.primarySecond}` // like border
|
|
841
|
+
},
|
|
842
|
+
font: {
|
|
843
|
+
...fontObject
|
|
844
|
+
},
|
|
845
|
+
parent: {
|
|
846
|
+
display: 'flex',
|
|
847
|
+
direction: 'column',
|
|
848
|
+
position: 'relative'
|
|
849
|
+
},
|
|
850
|
+
colors: {
|
|
851
|
+
backgroundDisable: presetColors.secondary
|
|
852
|
+
},
|
|
853
|
+
label: {
|
|
854
|
+
color: presetColors.dark,
|
|
855
|
+
display: 'block',
|
|
856
|
+
lineHeight: '22px',
|
|
857
|
+
marginBottom: '6px',
|
|
858
|
+
textTransform: 'none',
|
|
859
|
+
font: {
|
|
860
|
+
...fontObject
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
contentBottom: {
|
|
864
|
+
left: '0px',
|
|
865
|
+
width: '100%',
|
|
866
|
+
zIndex: 1,
|
|
867
|
+
radius: '6px',
|
|
868
|
+
maxWidth: '400px',
|
|
869
|
+
overflow: 'hidden',
|
|
870
|
+
position: 'absolute',
|
|
871
|
+
minHeight: '0px',
|
|
872
|
+
inner: {
|
|
873
|
+
display: 'flex',
|
|
874
|
+
overflowY: 'auto',
|
|
875
|
+
maxHeight: '234px',
|
|
876
|
+
overflowX: 'hidden',
|
|
877
|
+
direction: 'column'
|
|
878
|
+
},
|
|
879
|
+
row: {
|
|
880
|
+
color: presetColors.dark,
|
|
881
|
+
height: '46px',
|
|
882
|
+
cursor: 'pointer',
|
|
883
|
+
display: 'flex',
|
|
884
|
+
padding: '0px 15px',
|
|
885
|
+
lineHeight: '22px',
|
|
886
|
+
alignItems: 'center',
|
|
887
|
+
transition: 'all 240ms',
|
|
888
|
+
marginBottom: '2px',
|
|
889
|
+
colors: {
|
|
890
|
+
hover: presetColors.primarySecond,
|
|
891
|
+
background: '#ffffff',
|
|
892
|
+
backgroundHover: 'initial'
|
|
893
|
+
},
|
|
894
|
+
font: {
|
|
895
|
+
...fontObject
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
colors: {
|
|
899
|
+
background: presetColors.extraLight
|
|
900
|
+
},
|
|
901
|
+
box: {
|
|
902
|
+
shadow: '0 0 10px rgba(60, 57, 62, 0.08)',
|
|
903
|
+
sizing: boxSizing
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
error: {
|
|
907
|
+
color: presetColors.danger,
|
|
908
|
+
marginTop: '10px',
|
|
909
|
+
font: {
|
|
910
|
+
...fontObject
|
|
911
|
+
},
|
|
912
|
+
box: {
|
|
913
|
+
shadow: `0 0 0 2px ${presetColors.danger}` // like border
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
innerError: {
|
|
917
|
+
padding: '0px 15px',
|
|
918
|
+
colors: {
|
|
919
|
+
background: 'gray'
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
// default properties for <Captcha /> component
|
|
924
|
+
CAPTCHA: {
|
|
925
|
+
className: '',
|
|
926
|
+
label: {
|
|
927
|
+
color: presetColors.dark,
|
|
928
|
+
font: {
|
|
929
|
+
...fontObject
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
// default properties for <File /> component
|
|
934
|
+
FILE: {
|
|
935
|
+
color: presetColors.dark,
|
|
936
|
+
radius: '6px',
|
|
937
|
+
height: '200px',
|
|
938
|
+
maxWidth: '440px',
|
|
939
|
+
className: '',
|
|
940
|
+
areaImage: {
|
|
941
|
+
width: '27.8rem',
|
|
942
|
+
height: 'auto'
|
|
943
|
+
},
|
|
944
|
+
or: 'կամ',
|
|
945
|
+
upload: 'Բեռնել',
|
|
946
|
+
uploadColor: presetColors.success,
|
|
947
|
+
putFileHere: 'Տեղադրել ֆայլը այստեղ',
|
|
948
|
+
sizeText: 'Առավելագույնը',
|
|
949
|
+
timeForRemoveError: 4000,
|
|
950
|
+
extentionsRowMarginTop: '40px',
|
|
951
|
+
border: {
|
|
952
|
+
width: '2px',
|
|
953
|
+
style: 'dashed',
|
|
954
|
+
color: presetColors.secondary,
|
|
955
|
+
colors: {
|
|
956
|
+
hover: presetColors.primarySecond
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
colors: {
|
|
960
|
+
background: '#F8F8F8',
|
|
961
|
+
backgroundHidden: 'rgba(60, 57, 62, 0.4)'
|
|
962
|
+
},
|
|
963
|
+
label: {
|
|
964
|
+
color: '#4A4A4D',
|
|
965
|
+
font: {
|
|
966
|
+
...fontObject
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
font: {
|
|
970
|
+
...fontObject
|
|
971
|
+
},
|
|
972
|
+
error: {
|
|
973
|
+
color: presetColors.danger,
|
|
974
|
+
font: {
|
|
975
|
+
...fontObject
|
|
976
|
+
},
|
|
977
|
+
format: 'ֆայլի սխալ ֆորմատ',
|
|
978
|
+
maxSize: 'Առավելագույն ծավալ',
|
|
979
|
+
noChoosenFile: 'Ֆայլը ընտրված չէ'
|
|
980
|
+
},
|
|
981
|
+
progress: {
|
|
982
|
+
color: '#4A4A4D',
|
|
983
|
+
colors: {
|
|
984
|
+
track: '#E5E8E8',
|
|
985
|
+
failed: '#E40E00',
|
|
986
|
+
success: '#069768',
|
|
987
|
+
loading: presetColors.primary
|
|
988
|
+
},
|
|
989
|
+
font: {
|
|
990
|
+
...fontObject
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
uploadBtn: {
|
|
994
|
+
label: 'Բեռնել',
|
|
995
|
+
color: '#fff',
|
|
996
|
+
height: '30px',
|
|
997
|
+
colors: {
|
|
998
|
+
hover: '#fff',
|
|
999
|
+
background: 'rgba(0, 35, 106, 1)',
|
|
1000
|
+
backgroundHover: 'rgba(0, 35, 106, 1)'
|
|
1001
|
+
},
|
|
1002
|
+
font: {
|
|
1003
|
+
...fontObject
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
listItem: {
|
|
1007
|
+
color: '#4a4a4d',
|
|
1008
|
+
height: '70px',
|
|
1009
|
+
padding: '14px 20px',
|
|
1010
|
+
colors: {
|
|
1011
|
+
background: '#F6F8F8',
|
|
1012
|
+
backgroundError: '#F6F8F8'
|
|
1013
|
+
},
|
|
1014
|
+
font: {
|
|
1015
|
+
...fontObject
|
|
1016
|
+
},
|
|
1017
|
+
error: {
|
|
1018
|
+
color: '#E40E00',
|
|
1019
|
+
font: {
|
|
1020
|
+
...fontObject
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
icon: {
|
|
1025
|
+
// comment here for example,
|
|
1026
|
+
|
|
1027
|
+
// pdf: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1028
|
+
// png: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1029
|
+
// jpg: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1030
|
+
// jpeg: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1031
|
+
// heic: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1032
|
+
// wrong: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1033
|
+
// upload: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1034
|
+
// required: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1035
|
+
// removeFile: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1036
|
+
// deleteComponent: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1037
|
+
// deleteItem: React.createElement(SvgUnchecked, { fill: 'green' }),
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
// default properties for <Modal /> component
|
|
1041
|
+
MODAL: {
|
|
1042
|
+
width: '',
|
|
1043
|
+
height: '',
|
|
1044
|
+
maxWidth: '95%',
|
|
1045
|
+
minWidth: '320px',
|
|
1046
|
+
maxHeight: '95vh',
|
|
1047
|
+
minHeight: '200px',
|
|
1048
|
+
radius: '14px',
|
|
1049
|
+
padding: '20px 20px 20px',
|
|
1050
|
+
className: '',
|
|
1051
|
+
alignItems: 'center',
|
|
1052
|
+
outsideClose: true,
|
|
1053
|
+
justifyContent: 'center',
|
|
1054
|
+
grayDecorHeight: '80px',
|
|
1055
|
+
border: {
|
|
1056
|
+
width: '20px',
|
|
1057
|
+
style: 'solid',
|
|
1058
|
+
color: transparent
|
|
1059
|
+
},
|
|
1060
|
+
colors: {
|
|
1061
|
+
background: 'white',
|
|
1062
|
+
backgroundLayer: 'rgba(0,0,0,0.4)'
|
|
1063
|
+
},
|
|
1064
|
+
header: {
|
|
1065
|
+
color: presetColors.primarySecond,
|
|
1066
|
+
height: '30px',
|
|
1067
|
+
font: {
|
|
1068
|
+
...fontObject
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
image: {
|
|
1072
|
+
width: '',
|
|
1073
|
+
margin: '0px',
|
|
1074
|
+
height: '100%',
|
|
1075
|
+
maxWidth: '100%',
|
|
1076
|
+
wrapWidth: '100%',
|
|
1077
|
+
wrapHeight: '100%'
|
|
1078
|
+
},
|
|
1079
|
+
icon: {
|
|
1080
|
+
// zoom: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1081
|
+
// prev: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1082
|
+
// next: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1083
|
+
// close: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1084
|
+
// closeSlide: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1085
|
+
},
|
|
1086
|
+
closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
|
|
1087
|
+
},
|
|
1088
|
+
// default properties for <Checkbox /> component
|
|
1089
|
+
CHECKBOX: {
|
|
1090
|
+
className: '',
|
|
1091
|
+
marginBottom: '10px',
|
|
1092
|
+
colors: {
|
|
1093
|
+
checked: presetColors.primarySecond,
|
|
1094
|
+
unChecked: presetColors.secondary
|
|
1095
|
+
},
|
|
1096
|
+
label: {
|
|
1097
|
+
marginLeft: '10px'
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
// checkedIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1101
|
+
// unCheckedIcon: React.createElement(<SvgUnchecked fill="#E00" />),
|
|
1102
|
+
},
|
|
1103
|
+
// default properties for <Table /> component
|
|
1104
|
+
TABLE: {
|
|
1105
|
+
className: '',
|
|
1106
|
+
textAlign: 'center',
|
|
1107
|
+
column: {
|
|
1108
|
+
maxWidth: '',
|
|
1109
|
+
minWidth: ''
|
|
1110
|
+
},
|
|
1111
|
+
head: {
|
|
1112
|
+
color: presetColors.extraLight,
|
|
1113
|
+
radius: '14px',
|
|
1114
|
+
padding: '11px 20px',
|
|
1115
|
+
colors: {
|
|
1116
|
+
background: presetColors.primarySecond
|
|
1117
|
+
},
|
|
1118
|
+
font: {
|
|
1119
|
+
...fontObject
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
body: {
|
|
1123
|
+
color: presetColors.dark,
|
|
1124
|
+
padding: '11px 20px',
|
|
1125
|
+
box: {
|
|
1126
|
+
shadow: ''
|
|
1127
|
+
},
|
|
1128
|
+
row: {
|
|
1129
|
+
asItem: false,
|
|
1130
|
+
radius: '6px',
|
|
1131
|
+
marginTop: '10px',
|
|
1132
|
+
colors: {
|
|
1133
|
+
backgroud: transparent
|
|
1134
|
+
},
|
|
1135
|
+
box: {
|
|
1136
|
+
shadow: ''
|
|
1137
|
+
},
|
|
1138
|
+
border: '1px solid',
|
|
1139
|
+
borderColor: presetColors.light
|
|
1140
|
+
},
|
|
1141
|
+
font: {
|
|
1142
|
+
...fontObject
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
openList: {
|
|
1146
|
+
color: '#A3A5A9',
|
|
1147
|
+
font: {
|
|
1148
|
+
...fontObject
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
// default properties for <Pagination /> component
|
|
1153
|
+
PAGINATION: {
|
|
1154
|
+
className: '' // for pagination class
|
|
1155
|
+
},
|
|
1156
|
+
// default properties for <Toaster /> component
|
|
1157
|
+
TOASTER: {
|
|
1158
|
+
className: '',
|
|
1159
|
+
icon: {
|
|
1160
|
+
// info: React.createElement(SvgChecked, { just: 'must' }),
|
|
1161
|
+
// warn: React.createElement(SvgUnchecked, { just: 'must' }),
|
|
1162
|
+
// close: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1163
|
+
// error: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1164
|
+
// success: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
// default properties for <Stepper /> component
|
|
1168
|
+
STEPPER: {
|
|
1169
|
+
className: '' // for stepper class
|
|
1170
|
+
},
|
|
1171
|
+
// default properties for <Radio /> component
|
|
1172
|
+
RADIO: {
|
|
1173
|
+
size: '20px',
|
|
1174
|
+
className: '',
|
|
1175
|
+
marginRight: '10px',
|
|
1176
|
+
item: {
|
|
1177
|
+
marginRight: '10px',
|
|
1178
|
+
marginBottom: '10px'
|
|
1179
|
+
},
|
|
1180
|
+
border: {
|
|
1181
|
+
width: '2px',
|
|
1182
|
+
style: 'solid',
|
|
1183
|
+
color: '#E7E7E7',
|
|
1184
|
+
activeColor: '#3C3D46'
|
|
1185
|
+
},
|
|
1186
|
+
label: {
|
|
1187
|
+
color: '#3C3D46',
|
|
1188
|
+
lineHeight: '21px',
|
|
1189
|
+
font: {
|
|
1190
|
+
...fontObject
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
// default properties for <Form /> component
|
|
1195
|
+
FORM: {
|
|
1196
|
+
className: ''
|
|
447
1197
|
}
|
|
448
|
-
|
|
449
|
-
|
|
1198
|
+
};
|
|
1199
|
+
|
|
1200
|
+
async function getPProps() {
|
|
1201
|
+
let projectResult = {};
|
|
1202
|
+
const projectPath = `../../../../tui.config.js`;
|
|
1203
|
+
async function loadComponent(componentName) {
|
|
1204
|
+
try {
|
|
1205
|
+
const Component = await import( /* @vite-ignore */componentName);
|
|
1206
|
+
return Component.default;
|
|
1207
|
+
} catch (err) {
|
|
1208
|
+
console.error(`Error loading component: ${componentName}`);
|
|
1209
|
+
return null;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
const projectImportConfig = await loadComponent(projectPath);
|
|
1213
|
+
if (projectImportConfig) {
|
|
1214
|
+
projectResult = projectImportConfig;
|
|
450
1215
|
}
|
|
451
|
-
return
|
|
1216
|
+
return {
|
|
1217
|
+
packageResult,
|
|
1218
|
+
projectResult
|
|
1219
|
+
};
|
|
452
1220
|
}
|
|
453
|
-
|
|
454
|
-
let projectConfig = {};
|
|
455
|
-
let packageConfig = {};
|
|
456
|
-
async function getProps(type) {
|
|
1221
|
+
async function getProps() {
|
|
457
1222
|
let props;
|
|
458
1223
|
try {
|
|
459
|
-
const newProps = await getPProps(
|
|
460
|
-
props = _.merge(
|
|
1224
|
+
const newProps = await getPProps();
|
|
1225
|
+
props = _.merge(newProps.packageResult, newProps.projectResult);
|
|
461
1226
|
} catch (error) {
|
|
462
1227
|
console.error('Error in getProps:', error);
|
|
463
1228
|
}
|
|
464
1229
|
return props;
|
|
465
1230
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
const merge = _.merge(packageConfig, projectConfig);
|
|
1231
|
+
|
|
1232
|
+
var configStylesPromise = getProps();
|
|
469
1233
|
const hasOwnerProperty = (object, property) => {
|
|
470
1234
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
471
1235
|
};
|
|
@@ -503,8 +1267,9 @@ const Button = ({
|
|
|
503
1267
|
disabledBackgroundColor,
|
|
504
1268
|
...props
|
|
505
1269
|
}) => {
|
|
1270
|
+
const [classProps, setClassProps] = useState({});
|
|
1271
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
506
1272
|
const [isHover, setIsHover] = useState(false);
|
|
507
|
-
const classProps = classnames(className ?? merge.BUTTON.className);
|
|
508
1273
|
const handleMouseEnter = () => {
|
|
509
1274
|
setIsHover(true);
|
|
510
1275
|
};
|
|
@@ -515,41 +1280,51 @@ const Button = ({
|
|
|
515
1280
|
if (!label && !icon) {
|
|
516
1281
|
alert('Add icon or label props on Button component');
|
|
517
1282
|
}
|
|
1283
|
+
configStylesPromise.then(data => {
|
|
1284
|
+
setClassProps(() => classnames(className ?? data.BUTTON.className));
|
|
1285
|
+
setConfigStyles(() => {
|
|
1286
|
+
return {
|
|
1287
|
+
...data
|
|
1288
|
+
};
|
|
1289
|
+
});
|
|
1290
|
+
}, error => {
|
|
1291
|
+
console.error(error);
|
|
1292
|
+
});
|
|
518
1293
|
}, []);
|
|
519
|
-
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
1294
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, configStyles.BUTTON && /*#__PURE__*/React__default.createElement("button", _extends({
|
|
520
1295
|
style: {
|
|
521
1296
|
display: 'flex',
|
|
522
1297
|
outline: 'none',
|
|
523
1298
|
alignItems: 'center',
|
|
524
1299
|
justifyContent: 'center',
|
|
525
|
-
fontSize: size ??
|
|
526
|
-
fontStyle: style ??
|
|
527
|
-
fontFamily: font ??
|
|
528
|
-
height: height ??
|
|
529
|
-
fontWeight: weight ??
|
|
530
|
-
padding: padding ??
|
|
531
|
-
borderRadius: radius ??
|
|
532
|
-
boxSizing: boxSizing ??
|
|
533
|
-
transition: transition ??
|
|
534
|
-
border: outline ? 'none' : border ??
|
|
535
|
-
width: contentWidth ? 'auto' : width ??
|
|
536
|
-
cursor: disabled ? 'not-allowed' : cursor ??
|
|
537
|
-
textTransform: textTransform ??
|
|
538
|
-
backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor :
|
|
539
|
-
boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor :
|
|
540
|
-
color: (outline || !outline) && disabled ? disabledColor ? disabledColor :
|
|
1300
|
+
fontSize: size ?? configStyles.BUTTON.font.size,
|
|
1301
|
+
fontStyle: style ?? configStyles.BUTTON.font.style,
|
|
1302
|
+
fontFamily: font ?? configStyles.BUTTON.font.family,
|
|
1303
|
+
height: height ?? configStyles.BUTTON.height,
|
|
1304
|
+
fontWeight: weight ?? configStyles.BUTTON.font.weight,
|
|
1305
|
+
padding: padding ?? configStyles.BUTTON.padding,
|
|
1306
|
+
borderRadius: radius ?? configStyles.BUTTON.radius,
|
|
1307
|
+
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1308
|
+
transition: transition ?? configStyles.BUTTON.transition,
|
|
1309
|
+
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1310
|
+
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
1311
|
+
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1312
|
+
textTransform: textTransform ?? configStyles.BUTTON.text.transform,
|
|
1313
|
+
backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
|
|
1314
|
+
boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background}` : 'none',
|
|
1315
|
+
color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
|
|
541
1316
|
},
|
|
542
|
-
type: type ??
|
|
543
|
-
disabled: disabled ??
|
|
1317
|
+
type: type ?? configStyles.BUTTON.type,
|
|
1318
|
+
disabled: disabled ?? configStyles.BUTTON.disabled,
|
|
544
1319
|
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
|
|
545
1320
|
onMouseEnter: handleMouseEnter,
|
|
546
1321
|
onMouseLeave: handleMouseLeave,
|
|
547
1322
|
className: classProps
|
|
548
1323
|
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
|
|
549
1324
|
style: {
|
|
550
|
-
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight :
|
|
1325
|
+
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
|
|
551
1326
|
}
|
|
552
|
-
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
|
|
1327
|
+
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
|
|
553
1328
|
};
|
|
554
1329
|
Button.propTypes = {
|
|
555
1330
|
type: PropTypes.string,
|
|
@@ -795,10 +1570,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
795
1570
|
}, ref) => {
|
|
796
1571
|
const inpRef = useRef(null);
|
|
797
1572
|
const memoizedItems = useMemo(() => filesArray, [filesArray]);
|
|
798
|
-
const classProps = classnames(className ?? merge.FILE.className);
|
|
799
1573
|
const [error, setError] = useState('');
|
|
800
1574
|
const [isHover, setIsHover] = useState(false);
|
|
1575
|
+
const [classProps, setClassProps] = useState({});
|
|
801
1576
|
const [singleFile, setSingleFile] = useState(null);
|
|
1577
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
802
1578
|
const [choosenFileCount, setChoosenFileCount] = useState(0);
|
|
803
1579
|
const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
|
|
804
1580
|
const handleRemoveComponent = () => {
|
|
@@ -841,14 +1617,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
841
1617
|
change({
|
|
842
1618
|
file: file[ix],
|
|
843
1619
|
uuid: v4(),
|
|
844
|
-
check: formatError ??
|
|
1620
|
+
check: formatError ?? configStyles.FILE.error.format
|
|
845
1621
|
});
|
|
846
1622
|
}
|
|
847
1623
|
} else {
|
|
848
1624
|
change({
|
|
849
1625
|
file: file[ix],
|
|
850
1626
|
uuid: v4(),
|
|
851
|
-
check: maxSizeError ??
|
|
1627
|
+
check: maxSizeError ?? configStyles.FILE.error.maxSize
|
|
852
1628
|
});
|
|
853
1629
|
}
|
|
854
1630
|
}
|
|
@@ -870,14 +1646,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
870
1646
|
change({
|
|
871
1647
|
file: file[ix],
|
|
872
1648
|
uuid: v4(),
|
|
873
|
-
check: formatError ??
|
|
1649
|
+
check: formatError ?? configStyles.FILE.error.format
|
|
874
1650
|
});
|
|
875
1651
|
}
|
|
876
1652
|
} else {
|
|
877
1653
|
change({
|
|
878
1654
|
file: file[ix],
|
|
879
1655
|
uuid: v4(),
|
|
880
|
-
check: maxSizeError ??
|
|
1656
|
+
check: maxSizeError ?? configStyles.FILE.error.maxSize
|
|
881
1657
|
});
|
|
882
1658
|
}
|
|
883
1659
|
}
|
|
@@ -891,7 +1667,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
891
1667
|
setImage(null);
|
|
892
1668
|
handleUploadFiles(file);
|
|
893
1669
|
if (file.length === 0 && memoizedItems.length === 0) {
|
|
894
|
-
setError(noChoosenFile ??
|
|
1670
|
+
setError(noChoosenFile ?? configStyles.FILE.error.noChoosen);
|
|
895
1671
|
}
|
|
896
1672
|
} else {
|
|
897
1673
|
if (file[0]) {
|
|
@@ -909,16 +1685,16 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
909
1685
|
}
|
|
910
1686
|
} else {
|
|
911
1687
|
setImage(null);
|
|
912
|
-
setError(formatError ??
|
|
1688
|
+
setError(formatError ?? configStyles.FILE.error.format);
|
|
913
1689
|
}
|
|
914
1690
|
} else {
|
|
915
1691
|
setImage(null);
|
|
916
|
-
setError(maxSizeError ??
|
|
1692
|
+
setError(maxSizeError ?? configStyles.FILE.error.maxSize);
|
|
917
1693
|
}
|
|
918
1694
|
}
|
|
919
1695
|
if (file.length === 0) {
|
|
920
1696
|
setImage(null);
|
|
921
|
-
setError(noChoosenFile ??
|
|
1697
|
+
setError(noChoosenFile ?? configStyles.FILE.error.noChoosen);
|
|
922
1698
|
}
|
|
923
1699
|
}
|
|
924
1700
|
};
|
|
@@ -1005,10 +1781,22 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1005
1781
|
alert('Please add change prop on File component');
|
|
1006
1782
|
}
|
|
1007
1783
|
}, [change]);
|
|
1008
|
-
|
|
1784
|
+
useEffect(() => {
|
|
1785
|
+
configStylesPromise.then(data => {
|
|
1786
|
+
setClassProps(() => classnames(className ?? data.FILE.className));
|
|
1787
|
+
setConfigStyles(() => {
|
|
1788
|
+
return {
|
|
1789
|
+
...data
|
|
1790
|
+
};
|
|
1791
|
+
});
|
|
1792
|
+
}, error => {
|
|
1793
|
+
console.error(error);
|
|
1794
|
+
});
|
|
1795
|
+
}, []);
|
|
1796
|
+
return configStyles.FILE && /*#__PURE__*/React__default.createElement("div", {
|
|
1009
1797
|
style: {
|
|
1010
1798
|
width: '100%',
|
|
1011
|
-
maxWidth: maxWidth ??
|
|
1799
|
+
maxWidth: maxWidth ?? configStyles.FILE.maxWidth
|
|
1012
1800
|
},
|
|
1013
1801
|
className: classProps
|
|
1014
1802
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1020,18 +1808,18 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1020
1808
|
}
|
|
1021
1809
|
}, label && /*#__PURE__*/React__default.createElement("label", {
|
|
1022
1810
|
style: {
|
|
1023
|
-
color: labelColor ??
|
|
1024
|
-
fontSize: labelSize ??
|
|
1025
|
-
fontStyle: labelStyle ??
|
|
1026
|
-
fontWeight: labelWeight ??
|
|
1027
|
-
fontFamily: labelFamily ??
|
|
1811
|
+
color: labelColor ?? configStyles.FILE.label.color,
|
|
1812
|
+
fontSize: labelSize ?? configStyles.FILE.label.font.size,
|
|
1813
|
+
fontStyle: labelStyle ?? configStyles.FILE.label.font.style,
|
|
1814
|
+
fontWeight: labelWeight ?? configStyles.FILE.label.font.weight,
|
|
1815
|
+
fontFamily: labelFamily ?? configStyles.FILE.label.font.family
|
|
1028
1816
|
}
|
|
1029
|
-
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired :
|
|
1817
|
+
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
|
|
1030
1818
|
style: {
|
|
1031
1819
|
cursor: 'pointer'
|
|
1032
1820
|
},
|
|
1033
1821
|
onClick: handleRemoveComponent
|
|
1034
|
-
}, iconDeleteComponent ? iconDeleteComponent :
|
|
1822
|
+
}, iconDeleteComponent ? iconDeleteComponent : configStyles.FILE.icon.deleteComponent ? configStyles.FILE.icon.deleteComponent : /*#__PURE__*/React__default.createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
1035
1823
|
style: {
|
|
1036
1824
|
width: '100%',
|
|
1037
1825
|
display: 'flex',
|
|
@@ -1040,12 +1828,12 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1040
1828
|
boxSizing: 'border-box',
|
|
1041
1829
|
justifyContent: 'center',
|
|
1042
1830
|
cursor: !disabled ? 'pointer' : 'not-allowed',
|
|
1043
|
-
height: height ??
|
|
1044
|
-
borderWidth: borderWidth ??
|
|
1045
|
-
borderStyle: borderStyle ??
|
|
1046
|
-
borderRadius: radius ??
|
|
1047
|
-
backgroundColor: backgroundColor ??
|
|
1048
|
-
borderColor: error ? errorColor ? errorColor :
|
|
1831
|
+
height: height ?? configStyles.FILE.height,
|
|
1832
|
+
borderWidth: borderWidth ?? configStyles.FILE.border.width,
|
|
1833
|
+
borderStyle: borderStyle ?? configStyles.FILE.border.style,
|
|
1834
|
+
borderRadius: radius ?? configStyles.FILE.radius,
|
|
1835
|
+
backgroundColor: backgroundColor ?? configStyles.FILE.colors.background,
|
|
1836
|
+
borderColor: error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
1049
1837
|
},
|
|
1050
1838
|
onDrop: handleDrop,
|
|
1051
1839
|
onClick: handleClick,
|
|
@@ -1069,40 +1857,40 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1069
1857
|
alignItems: 'center',
|
|
1070
1858
|
flexDirection: 'column',
|
|
1071
1859
|
justifyContent: 'center',
|
|
1072
|
-
color: color ??
|
|
1073
|
-
fontSize: size ??
|
|
1074
|
-
fontStyle: style ??
|
|
1075
|
-
fontFamily: family ??
|
|
1076
|
-
fontWeight: weight ??
|
|
1860
|
+
color: color ?? configStyles.FILE.color,
|
|
1861
|
+
fontSize: size ?? configStyles.FILE.font.size,
|
|
1862
|
+
fontStyle: style ?? configStyles.FILE.font.style,
|
|
1863
|
+
fontFamily: family ?? configStyles.FILE.font.family,
|
|
1864
|
+
fontWeight: weight ?? configStyles.FILE.font.weight
|
|
1077
1865
|
}
|
|
1078
|
-
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf :
|
|
1866
|
+
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
1079
1867
|
src: image,
|
|
1080
1868
|
style: {
|
|
1081
1869
|
display: 'block',
|
|
1082
1870
|
maxWidth: '100%',
|
|
1083
1871
|
maxHeight: '95%',
|
|
1084
1872
|
objectFit: 'contain',
|
|
1085
|
-
width: fileAreaImageWidth ??
|
|
1086
|
-
height: fileAreaImageHeight ??
|
|
1873
|
+
width: fileAreaImageWidth ?? configStyles.FILE.fileAreaImageWidth,
|
|
1874
|
+
height: fileAreaImageHeight ?? configStyles.FILE.fileAreaImageHeight
|
|
1087
1875
|
},
|
|
1088
1876
|
alt: "file preview"
|
|
1089
|
-
}) : preview ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, iconUpload ? iconUpload :
|
|
1877
|
+
}) : preview ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, iconUpload ? iconUpload : configStyles.FILE.icon.upload ? configStyles.FILE.icon.upload : /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
|
|
1090
1878
|
style: {
|
|
1091
1879
|
margin: '0px'
|
|
1092
1880
|
}
|
|
1093
|
-
}, putFileHere ??
|
|
1881
|
+
}, putFileHere ?? configStyles.FILE.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.FILE.or, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
1094
1882
|
style: {
|
|
1095
|
-
color: uploadColor ??
|
|
1883
|
+
color: uploadColor ?? configStyles.FILE.uploadColor
|
|
1096
1884
|
}
|
|
1097
|
-
}, upload ??
|
|
1885
|
+
}, upload ?? configStyles.FILE.upload))), /*#__PURE__*/React__default.createElement("div", {
|
|
1098
1886
|
style: {
|
|
1099
|
-
marginTop: extentionsRowMarginTop ??
|
|
1887
|
+
marginTop: extentionsRowMarginTop ?? configStyles.FILE.extentionsRowMarginTop
|
|
1100
1888
|
}
|
|
1101
1889
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1102
1890
|
style: {
|
|
1103
1891
|
margin: '0px'
|
|
1104
1892
|
}
|
|
1105
|
-
}, fileSizeText ??
|
|
1893
|
+
}, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1106
1894
|
style: {
|
|
1107
1895
|
width: '100%',
|
|
1108
1896
|
padding: '5px',
|
|
@@ -1114,16 +1902,16 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1114
1902
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1115
1903
|
contentWidth: true,
|
|
1116
1904
|
onClick: _ => _,
|
|
1117
|
-
font: uploadBtnFont ??
|
|
1118
|
-
size: uploadBtnSize ??
|
|
1119
|
-
style: uploadBtnStyle ??
|
|
1120
|
-
weight: uploadBtnWeight ??
|
|
1121
|
-
label: uploadBtnLabel ??
|
|
1122
|
-
color: uploadBtnColor ??
|
|
1123
|
-
height: uploadBtnHeight ??
|
|
1124
|
-
hoverColor: uploadBtnHoverColor ??
|
|
1125
|
-
backgroundColor: uploadBtnBackgroundColor ??
|
|
1126
|
-
backgroundHoverColor: uploadBtnBackgroundColorHover ??
|
|
1905
|
+
font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
1906
|
+
size: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
1907
|
+
style: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
1908
|
+
weight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
1909
|
+
label: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
1910
|
+
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
1911
|
+
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
1912
|
+
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
1913
|
+
backgroundColor: uploadBtnBackgroundColor ?? configStyles.FILE.uploadBtn.colors.background,
|
|
1914
|
+
backgroundHoverColor: uploadBtnBackgroundColorHover ?? configStyles.FILE.uploadBtn.colors.backgroundHover
|
|
1127
1915
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
1128
1916
|
style: {
|
|
1129
1917
|
margin: '0px',
|
|
@@ -1132,7 +1920,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1132
1920
|
whiteSpace: 'nowrap',
|
|
1133
1921
|
textOverflow: 'ellipsis'
|
|
1134
1922
|
}
|
|
1135
|
-
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ??
|
|
1923
|
+
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
1136
1924
|
style: {
|
|
1137
1925
|
position: 'absolute',
|
|
1138
1926
|
top: '0px',
|
|
@@ -1145,9 +1933,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1145
1933
|
boxSizing: 'border-box',
|
|
1146
1934
|
alignItems: 'flex-start',
|
|
1147
1935
|
justifyContent: 'flex-end',
|
|
1148
|
-
borderRadius: radius ??
|
|
1936
|
+
borderRadius: radius ?? configStyles.FILE.radius,
|
|
1149
1937
|
display: !multiple && !disabled && image && !error && isHover ? 'flex' : 'none',
|
|
1150
|
-
backgroundColor: hiddenBackgroundColor ??
|
|
1938
|
+
backgroundColor: hiddenBackgroundColor ?? configStyles.FILE.colors.backgroundHidden
|
|
1151
1939
|
},
|
|
1152
1940
|
onClick: handleStopPropagation
|
|
1153
1941
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1155,15 +1943,15 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1155
1943
|
cursor: 'pointer'
|
|
1156
1944
|
},
|
|
1157
1945
|
onClick: handleRemoveFile
|
|
1158
|
-
}, iconRemoveFile ? iconRemoveFile :
|
|
1946
|
+
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default.createElement("span", {
|
|
1159
1947
|
style: {
|
|
1160
1948
|
marginTop: '6px',
|
|
1161
1949
|
display: 'inline-block',
|
|
1162
|
-
color: errorColor ??
|
|
1163
|
-
fontSize: errorSize ??
|
|
1164
|
-
fontStyle: errorStyle ??
|
|
1165
|
-
fontWeight: errorWeight ??
|
|
1166
|
-
fontFamily: errorFamily ??
|
|
1950
|
+
color: errorColor ?? configStyles.FILE.error.color,
|
|
1951
|
+
fontSize: errorSize ?? configStyles.FILE.error.font.size,
|
|
1952
|
+
fontStyle: errorStyle ?? configStyles.FILE.error.font.style,
|
|
1953
|
+
fontWeight: errorWeight ?? configStyles.FILE.error.font.weight,
|
|
1954
|
+
fontFamily: errorFamily ?? configStyles.FILE.error.font.family
|
|
1167
1955
|
}
|
|
1168
1956
|
}, error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
1169
1957
|
return /*#__PURE__*/React__default.createElement(FileItem, {
|
|
@@ -1173,35 +1961,35 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1173
1961
|
status: item.status,
|
|
1174
1962
|
size: item.file.size,
|
|
1175
1963
|
name: item.file.name,
|
|
1176
|
-
iconPdf: iconPdf ??
|
|
1177
|
-
iconPng: iconPng ??
|
|
1178
|
-
iconJpg: iconJpg ??
|
|
1179
|
-
iconJpeg: iconJpeg ??
|
|
1180
|
-
iconHeic: iconHeic ??
|
|
1181
|
-
iconWrong: iconWrong ??
|
|
1182
|
-
iconDelItem: iconDeleteItem ??
|
|
1964
|
+
iconPdf: iconPdf ?? configStyles.FILE.icon.pdf,
|
|
1965
|
+
iconPng: iconPng ?? configStyles.FILE.icon.png,
|
|
1966
|
+
iconJpg: iconJpg ?? configStyles.FILE.icon.jpg,
|
|
1967
|
+
iconJpeg: iconJpeg ?? configStyles.FILE.icon.jpeg,
|
|
1968
|
+
iconHeic: iconHeic ?? configStyles.FILE.icon.heic,
|
|
1969
|
+
iconWrong: iconWrong ?? configStyles.FILE.icon.wrong,
|
|
1970
|
+
iconDelItem: iconDeleteItem ?? configStyles.FILE.icon.deleteItem,
|
|
1183
1971
|
timeForRemoveError: timeForRemoveError,
|
|
1184
1972
|
removeFile: removeFile ? removeFile : _ => _,
|
|
1185
|
-
radius: radius ??
|
|
1973
|
+
radius: radius ?? configStyles.FILE.radius,
|
|
1186
1974
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
1187
|
-
progressColor: progressColor ??
|
|
1188
|
-
listItemHeight: listItemHeight ??
|
|
1189
|
-
listItemPadding: listItemPadding ??
|
|
1190
|
-
progressFontSize: progressFontSize ??
|
|
1191
|
-
progressFontStyle: progressFontStyle ??
|
|
1192
|
-
progressFontWeight: progressFontWeight ??
|
|
1193
|
-
progressFontFamily: progressFontFamily ??
|
|
1194
|
-
listItemErrorSize: listItemErrorSize ??
|
|
1195
|
-
listItemErrorStyle: listItemErrorStyle ??
|
|
1196
|
-
listItemErrorWeight: listItemErrorWeight ??
|
|
1197
|
-
listItemErrorFamily: listItemErrorFamily ??
|
|
1198
|
-
listItemErrorColor: listItemErrorColor ??
|
|
1199
|
-
progressTrackColor: progressTrackColor ??
|
|
1200
|
-
progressFailedColor: progressFailedColor ??
|
|
1201
|
-
progressSuccessColor: progressSuccessColor ??
|
|
1202
|
-
progressLoadingColor: progressLoadingColor ??
|
|
1203
|
-
listItemBackgroundColor: listItemBackgroundColor ??
|
|
1204
|
-
listItemBackgroundErrorColor: listItemBackgroundErrorColor ??
|
|
1975
|
+
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
1976
|
+
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
1977
|
+
listItemPadding: listItemPadding ?? configStyles.FILE.listItem.padding,
|
|
1978
|
+
progressFontSize: progressFontSize ?? configStyles.FILE.progress.font.size,
|
|
1979
|
+
progressFontStyle: progressFontStyle ?? configStyles.FILE.progress.font.style,
|
|
1980
|
+
progressFontWeight: progressFontWeight ?? configStyles.FILE.progress.font.weight,
|
|
1981
|
+
progressFontFamily: progressFontFamily ?? configStyles.FILE.progress.font.family,
|
|
1982
|
+
listItemErrorSize: listItemErrorSize ?? configStyles.FILE.listItem.error.font.size,
|
|
1983
|
+
listItemErrorStyle: listItemErrorStyle ?? configStyles.FILE.listItem.error.style,
|
|
1984
|
+
listItemErrorWeight: listItemErrorWeight ?? configStyles.FILE.listItem.error.weight,
|
|
1985
|
+
listItemErrorFamily: listItemErrorFamily ?? configStyles.FILE.listItem.error.family,
|
|
1986
|
+
listItemErrorColor: listItemErrorColor ?? configStyles.FILE.listItem.error.color,
|
|
1987
|
+
progressTrackColor: progressTrackColor ?? configStyles.FILE.progress.colors.track,
|
|
1988
|
+
progressFailedColor: progressFailedColor ?? configStyles.FILE.progress.colors.failed,
|
|
1989
|
+
progressSuccessColor: progressSuccessColor ?? configStyles.FILE.progress.colors.success,
|
|
1990
|
+
progressLoadingColor: progressLoadingColor ?? configStyles.FILE.progress.colors.loading,
|
|
1991
|
+
listItemBackgroundColor: listItemBackgroundColor ?? configStyles.FILE.listItem.colors.background,
|
|
1992
|
+
listItemBackgroundErrorColor: listItemBackgroundErrorColor ?? configStyles.FILE.listItem.colors.backgroundError
|
|
1205
1993
|
});
|
|
1206
1994
|
}));
|
|
1207
1995
|
});
|
|
@@ -1390,9 +2178,9 @@ const Checkbox$1 = ({
|
|
|
1390
2178
|
},
|
|
1391
2179
|
onClick: !innerDisabled && handleChecked ? handleClick : _ => _
|
|
1392
2180
|
}, innerChecked && (ignoreDisabledForChecked ?? !innerDisabled) ? checkedIcon ? checkedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
|
|
1393
|
-
fillColor: checkedColor ??
|
|
2181
|
+
fillColor: checkedColor ?? configStylesPromise.CHECKBOX.checkedColor
|
|
1394
2182
|
}) : unCheckedIcon ? unCheckedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
1395
|
-
fillColor: unCheckedColor ??
|
|
2183
|
+
fillColor: unCheckedColor ?? configStylesPromise.CHECKBOX.unCheckedColor
|
|
1396
2184
|
}), label && /*#__PURE__*/React__default.createElement("span", {
|
|
1397
2185
|
style: {
|
|
1398
2186
|
marginLeft: labelMarginLeft
|
|
@@ -1417,10 +2205,22 @@ const SingleCheckbox = ({
|
|
|
1417
2205
|
ignoreDisabledForChecked
|
|
1418
2206
|
}) => {
|
|
1419
2207
|
const [innerData, setInnerData] = useState(null);
|
|
2208
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
1420
2209
|
useEffect(() => {
|
|
1421
2210
|
setInnerData(data);
|
|
1422
2211
|
}, [data]);
|
|
1423
|
-
|
|
2212
|
+
useEffect(() => {
|
|
2213
|
+
configStylesPromise.then(data => {
|
|
2214
|
+
setConfigStyles(() => {
|
|
2215
|
+
return {
|
|
2216
|
+
...data
|
|
2217
|
+
};
|
|
2218
|
+
});
|
|
2219
|
+
}, error => {
|
|
2220
|
+
console.error(error);
|
|
2221
|
+
});
|
|
2222
|
+
}, []);
|
|
2223
|
+
return configStyles.CHECKBOX && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
1424
2224
|
index: index,
|
|
1425
2225
|
label: label,
|
|
1426
2226
|
styles: styles,
|
|
@@ -1434,7 +2234,7 @@ const SingleCheckbox = ({
|
|
|
1434
2234
|
handleChecked: handleChecked,
|
|
1435
2235
|
unCheckedColor: unCheckedColor,
|
|
1436
2236
|
ignoreDisabledForChecked: ignoreDisabledForChecked,
|
|
1437
|
-
labelMarginLeft: labelMarginLeft ??
|
|
2237
|
+
labelMarginLeft: labelMarginLeft ?? configStyles.CHECKBOX.labelMarginLeft
|
|
1438
2238
|
});
|
|
1439
2239
|
};
|
|
1440
2240
|
SingleCheckbox.propTypes = {
|
|
@@ -1918,7 +2718,9 @@ const Table = ({
|
|
|
1918
2718
|
const [body, setBody] = useState([]);
|
|
1919
2719
|
const [header, setHeader] = useState([]);
|
|
1920
2720
|
const [disableArr, setDisableArr] = useState([]);
|
|
2721
|
+
const [classProps, setClassProps] = useState({});
|
|
1921
2722
|
const [checkedArray, setCheckedArray] = useState([]);
|
|
2723
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
1922
2724
|
const handleCheckIfArrow = (bodyData, data) => {
|
|
1923
2725
|
let removeItemIndex;
|
|
1924
2726
|
let headerWithoutArrow = [];
|
|
@@ -2385,18 +3187,30 @@ const Table = ({
|
|
|
2385
3187
|
setHeader(() => dataHeader);
|
|
2386
3188
|
}
|
|
2387
3189
|
}, [dataHeader, arrowColumn, arrowShow, disableArr]);
|
|
2388
|
-
|
|
3190
|
+
useEffect(() => {
|
|
3191
|
+
configStylesPromise.then(data => {
|
|
3192
|
+
setClassProps(() => classnames(className ?? data.TABLE.className));
|
|
3193
|
+
setConfigStyles(() => {
|
|
3194
|
+
return {
|
|
3195
|
+
...data
|
|
3196
|
+
};
|
|
3197
|
+
});
|
|
3198
|
+
}, error => {
|
|
3199
|
+
console.error(error);
|
|
3200
|
+
});
|
|
3201
|
+
}, []);
|
|
3202
|
+
return configStyles.TABLE && /*#__PURE__*/React__default.createElement("table", {
|
|
2389
3203
|
style: {
|
|
2390
3204
|
width: '100%',
|
|
2391
|
-
borderCollapse: tableRowItem ??
|
|
2392
|
-
borderSpacing: `0 ${tBodyRowMarginTop ??
|
|
3205
|
+
borderCollapse: tableRowItem ?? configStyles.TABLE.body.row.asItem ? 'separate' : 'collapse',
|
|
3206
|
+
borderSpacing: `0 ${tBodyRowMarginTop ?? configStyles.TABLE.body.row.marginTop}`
|
|
2393
3207
|
},
|
|
2394
3208
|
onClick: handleTableClick,
|
|
2395
|
-
className:
|
|
3209
|
+
className: classProps
|
|
2396
3210
|
}, header && header.length > 0 && /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
2397
3211
|
style: {
|
|
2398
|
-
color: tHeadColor ??
|
|
2399
|
-
backgroundColor: tHeadBackgroundColor ??
|
|
3212
|
+
color: tHeadColor ?? configStyles.TABLE.head.color,
|
|
3213
|
+
backgroundColor: tHeadBackgroundColor ?? configStyles.TABLE.head.colors.background,
|
|
2400
3214
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2401
3215
|
}
|
|
2402
3216
|
}, header.map((item, index) => {
|
|
@@ -2407,29 +3221,29 @@ const Table = ({
|
|
|
2407
3221
|
handleCheckedHeader: handleCheckedHeader,
|
|
2408
3222
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
2409
3223
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
2410
|
-
tHeadFamily: tHeadFamily ??
|
|
2411
|
-
tHeadPadding: tHeadPadding ??
|
|
2412
|
-
tHeadFontSize: tHeadFontSize ??
|
|
2413
|
-
tHeadFontStyle: tHeadFontStyle ??
|
|
2414
|
-
tHeadTextAlign: tHeadTextAlign ??
|
|
2415
|
-
tHeadFontWeight: tHeadFontWeight ??
|
|
2416
|
-
borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius :
|
|
2417
|
-
borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius :
|
|
2418
|
-
tableColumnMinWidth: tableColumnMinWidth ??
|
|
2419
|
-
tableColumnMaxWidth: tableColumnMaxWidth ??
|
|
3224
|
+
tHeadFamily: tHeadFamily ?? configStyles.TABLE.head.font.family,
|
|
3225
|
+
tHeadPadding: tHeadPadding ?? configStyles.TABLE.head.padding,
|
|
3226
|
+
tHeadFontSize: tHeadFontSize ?? configStyles.TABLE.head.font.size,
|
|
3227
|
+
tHeadFontStyle: tHeadFontStyle ?? configStyles.TABLE.head.font.style,
|
|
3228
|
+
tHeadTextAlign: tHeadTextAlign ?? configStyles.TABLE.textAlign,
|
|
3229
|
+
tHeadFontWeight: tHeadFontWeight ?? configStyles.TABLE.head.font.weight,
|
|
3230
|
+
borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.head.radius : '0px',
|
|
3231
|
+
borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.head.radius : '0px',
|
|
3232
|
+
tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
|
|
3233
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth
|
|
2420
3234
|
});
|
|
2421
3235
|
}))), body && body.length > 0 && /*#__PURE__*/React__default.createElement("tbody", {
|
|
2422
3236
|
style: {
|
|
2423
|
-
boxShadow: tBodyBoxShadow ??
|
|
3237
|
+
boxShadow: tBodyBoxShadow ?? configStyles.TABLE.body.box.shadow
|
|
2424
3238
|
}
|
|
2425
3239
|
}, body.map((item, index) => {
|
|
2426
3240
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
2427
3241
|
key: `${item}_${index}`,
|
|
2428
3242
|
style: {
|
|
2429
|
-
backgroundColor: tableRowBGColor ??
|
|
2430
|
-
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder :
|
|
2431
|
-
borderColor: hideBorder ? 'transparent' :
|
|
2432
|
-
boxShadow: (tableRowItem ? tableRowItem :
|
|
3243
|
+
backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
|
|
3244
|
+
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.body.row.border,
|
|
3245
|
+
borderColor: hideBorder ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
3246
|
+
boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.body.row.box.shadow : 'none'
|
|
2433
3247
|
}
|
|
2434
3248
|
}, Object.values(item).map((innerItem, innerIndex) => {
|
|
2435
3249
|
return /*#__PURE__*/React__default.createElement(TD, {
|
|
@@ -2441,32 +3255,32 @@ const Table = ({
|
|
|
2441
3255
|
id: item.id ? item.id : '',
|
|
2442
3256
|
handleCheckDots: handleCheckDots,
|
|
2443
3257
|
key: `${innerItem}_${index}_${innerIndex}`,
|
|
2444
|
-
openListColor: openListColor ??
|
|
2445
|
-
tableColumnMinWidth: tableColumnMinWidth ??
|
|
2446
|
-
tableColumnMaxWidth: tableColumnMaxWidth ??
|
|
2447
|
-
openListFontSize: openListFontSize ??
|
|
2448
|
-
openListFontStyle: openListFontStyle ??
|
|
2449
|
-
openListFontWeight: openListFontWeight ??
|
|
2450
|
-
openListFontFamily: openListFontFamily ??
|
|
3258
|
+
openListColor: openListColor ?? configStyles.TABLE.openList.color,
|
|
3259
|
+
tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
|
|
3260
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth,
|
|
3261
|
+
openListFontSize: openListFontSize ?? configStyles.TABLE.openList.font.size,
|
|
3262
|
+
openListFontStyle: openListFontStyle ?? configStyles.TABLE.openList.font.style,
|
|
3263
|
+
openListFontWeight: openListFontWeight ?? configStyles.TABLE.openList.font.weight,
|
|
3264
|
+
openListFontFamily: openListFontFamily ?? configStyles.TABLE.openList.font.family,
|
|
2451
3265
|
handleCheckedBody: handleCheckedBody,
|
|
2452
3266
|
handleBodyActionClick: handleBodyActionClick,
|
|
2453
3267
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
2454
3268
|
handleContentListClick: handleContentListClick,
|
|
2455
|
-
tBodyColor: tBodyColor ??
|
|
2456
|
-
rowItem: tableRowItem ??
|
|
2457
|
-
rowRadius: tableRowRadius ??
|
|
2458
|
-
tBodyPadding: tBodyPadding ??
|
|
2459
|
-
tBodyFontSize: tBodyFontSize ??
|
|
2460
|
-
tBodyTextAlign: tBodyTextAlign ??
|
|
2461
|
-
tBodyFontFamily: tBodyFontFamily ??
|
|
2462
|
-
tBodyFontWeight: tBodyFontWeight ??
|
|
2463
|
-
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' :
|
|
2464
|
-
borderRightColor: innerIndex === Object.values(item).length - 1 ? 'transparent' :
|
|
3269
|
+
tBodyColor: tBodyColor ?? configStyles.TABLE.body.color,
|
|
3270
|
+
rowItem: tableRowItem ?? configStyles.TABLE.body.row.isItem,
|
|
3271
|
+
rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
|
|
3272
|
+
tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
|
|
3273
|
+
tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
|
|
3274
|
+
tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
|
|
3275
|
+
tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
|
|
3276
|
+
tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
|
|
3277
|
+
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' : configStyles.TABLE.body.row.border,
|
|
3278
|
+
borderRightColor: innerIndex === Object.values(item).length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
2465
3279
|
handleCheckArrowAction: handleCheckArrowAction,
|
|
2466
3280
|
handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
|
|
2467
3281
|
});
|
|
2468
3282
|
}));
|
|
2469
|
-
})))
|
|
3283
|
+
})));
|
|
2470
3284
|
};
|
|
2471
3285
|
Table.propTypes = {
|
|
2472
3286
|
getData: PropTypes.func,
|
|
@@ -2661,7 +3475,8 @@ const Modal = ({
|
|
|
2661
3475
|
const [select, setSelect] = useState(0);
|
|
2662
3476
|
const [isHover, setIsHover] = useState(false);
|
|
2663
3477
|
const [innerData, setInnerData] = useState([]);
|
|
2664
|
-
const classProps =
|
|
3478
|
+
const [classProps, setClassProps] = useState({});
|
|
3479
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
2665
3480
|
const handleCloseModal = () => {
|
|
2666
3481
|
setShow(false);
|
|
2667
3482
|
};
|
|
@@ -2725,15 +3540,25 @@ const Modal = ({
|
|
|
2725
3540
|
}, [selected]);
|
|
2726
3541
|
useEffect(() => {
|
|
2727
3542
|
document.addEventListener('keydown', handleESC, false);
|
|
3543
|
+
configStylesPromise.then(data => {
|
|
3544
|
+
setClassProps(() => classnames(className ?? data.MODAL.className));
|
|
3545
|
+
setConfigStyles(() => {
|
|
3546
|
+
return {
|
|
3547
|
+
...data
|
|
3548
|
+
};
|
|
3549
|
+
});
|
|
3550
|
+
}, error => {
|
|
3551
|
+
console.error(error);
|
|
3552
|
+
});
|
|
2728
3553
|
return () => {
|
|
2729
3554
|
setSelect(0);
|
|
2730
3555
|
setInnerData([]);
|
|
2731
3556
|
document.removeEventListener('keydown', handleESC, false);
|
|
2732
3557
|
};
|
|
2733
3558
|
}, []);
|
|
2734
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3559
|
+
return configStyles.MODAL && /*#__PURE__*/React__default.createElement("div", {
|
|
2735
3560
|
className: classProps,
|
|
2736
|
-
onClick: outsideClose ||
|
|
3561
|
+
onClick: outsideClose || configStyles.MODAL.outsideClose ? handleCloseModal : _ => _,
|
|
2737
3562
|
style: {
|
|
2738
3563
|
top: '0px',
|
|
2739
3564
|
left: '0px',
|
|
@@ -2741,7 +3566,7 @@ const Modal = ({
|
|
|
2741
3566
|
width: '100%',
|
|
2742
3567
|
height: '100vh',
|
|
2743
3568
|
position: 'fixed',
|
|
2744
|
-
backgroundColor: layerBackgroundColor ??
|
|
3569
|
+
backgroundColor: layerBackgroundColor ?? configStyles.MODAL.colors.backgroundLayer
|
|
2745
3570
|
}
|
|
2746
3571
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2747
3572
|
style: {
|
|
@@ -2749,8 +3574,8 @@ const Modal = ({
|
|
|
2749
3574
|
display: 'flex',
|
|
2750
3575
|
width: '100%',
|
|
2751
3576
|
height: '100vh',
|
|
2752
|
-
alignItems: alignItems ??
|
|
2753
|
-
justifyContent: justifyContent ??
|
|
3577
|
+
alignItems: alignItems ?? configStyles.MODAL.alignItems,
|
|
3578
|
+
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
2754
3579
|
}
|
|
2755
3580
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2756
3581
|
className: `${styles$8['animation__modal']}`,
|
|
@@ -2759,16 +3584,16 @@ const Modal = ({
|
|
|
2759
3584
|
position: 'relative',
|
|
2760
3585
|
boxSizing: 'border-box',
|
|
2761
3586
|
display: type === 'content' ? 'grid' : 'block',
|
|
2762
|
-
width: width ??
|
|
3587
|
+
width: width ?? configStyles.MODAL.width,
|
|
2763
3588
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2764
|
-
height: height ??
|
|
3589
|
+
height: height ?? configStyles.MODAL.height,
|
|
2765
3590
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2766
|
-
borderRadius: radius ??
|
|
2767
|
-
maxWidth: mMaxWidth ??
|
|
2768
|
-
maxHeight: mMaxHeight ??
|
|
2769
|
-
minWidth: type === 'content' ? minWidth ??
|
|
2770
|
-
backgroundColor: backgroundColor ??
|
|
2771
|
-
minHeight: type === 'content' ? minHeight ??
|
|
3591
|
+
borderRadius: radius ?? configStyles.MODAL.radius,
|
|
3592
|
+
maxWidth: mMaxWidth ?? configStyles.MODAL.maxWidth,
|
|
3593
|
+
maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
|
|
3594
|
+
minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
|
|
3595
|
+
backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
|
|
3596
|
+
minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
|
|
2772
3597
|
}
|
|
2773
3598
|
}, type === 'content' && /*#__PURE__*/React__default.createElement("div", {
|
|
2774
3599
|
style: {
|
|
@@ -2777,10 +3602,10 @@ const Modal = ({
|
|
|
2777
3602
|
display: 'flex',
|
|
2778
3603
|
alignItems: 'center',
|
|
2779
3604
|
boxSizing: 'border-box',
|
|
2780
|
-
padding: padding ??
|
|
2781
|
-
height: headerHeight ??
|
|
3605
|
+
padding: padding ?? configStyles.MODAL.padding,
|
|
3606
|
+
height: headerHeight ?? configStyles.MODAL.header.height,
|
|
2782
3607
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end',
|
|
2783
|
-
backgroundColor: closeAreaBackgroundColor ??
|
|
3608
|
+
backgroundColor: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
2784
3609
|
}
|
|
2785
3610
|
}, headerText && type === 'content' && /*#__PURE__*/React__default.createElement("p", {
|
|
2786
3611
|
style: {
|
|
@@ -2789,11 +3614,11 @@ const Modal = ({
|
|
|
2789
3614
|
whiteSpace: 'nowrap',
|
|
2790
3615
|
textOverflow: 'ellipsis',
|
|
2791
3616
|
margin: '0px 16px 0px 0px',
|
|
2792
|
-
color: headerColor ??
|
|
2793
|
-
fontSize: headerSize ??
|
|
2794
|
-
fontStyle: headerStyle ??
|
|
2795
|
-
fontFamily: headerFamily ??
|
|
2796
|
-
fontWeight: headerWeight ??
|
|
3617
|
+
color: headerColor ?? configStyles.MODAL.header.color,
|
|
3618
|
+
fontSize: headerSize ?? configStyles.MODAL.header.font.size,
|
|
3619
|
+
fontStyle: headerStyle ?? configStyles.MODAL.header.font.style,
|
|
3620
|
+
fontFamily: headerFamily ?? configStyles.MODAL.header.font.family,
|
|
3621
|
+
fontWeight: headerWeight ?? configStyles.MODAL.header.font.weight
|
|
2797
3622
|
}
|
|
2798
3623
|
}, headerText), /*#__PURE__*/React__default.createElement("div", {
|
|
2799
3624
|
onClick: handleCloseModal,
|
|
@@ -2802,7 +3627,7 @@ const Modal = ({
|
|
|
2802
3627
|
height: '14px',
|
|
2803
3628
|
cursor: 'pointer'
|
|
2804
3629
|
}
|
|
2805
|
-
}, closeIcon ? closeIcon :
|
|
3630
|
+
}, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2806
3631
|
style: {
|
|
2807
3632
|
display: 'flex',
|
|
2808
3633
|
width: '100%',
|
|
@@ -2812,9 +3637,9 @@ const Modal = ({
|
|
|
2812
3637
|
boxSizing: 'border-box',
|
|
2813
3638
|
justifyContent: 'center',
|
|
2814
3639
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2815
|
-
borderWidth: borderWidth ??
|
|
2816
|
-
borderStyle: borderStyle ??
|
|
2817
|
-
borderColor: borderColor ??
|
|
3640
|
+
borderWidth: borderWidth ?? configStyles.MODAL.border.width,
|
|
3641
|
+
borderStyle: borderStyle ?? configStyles.MODAL.border.style,
|
|
3642
|
+
borderColor: borderColor ?? configStyles.MODAL.border.color
|
|
2818
3643
|
},
|
|
2819
3644
|
onMouseEnter: handleMouseEnter,
|
|
2820
3645
|
onMouseLeave: handleMouseLeave
|
|
@@ -2826,8 +3651,8 @@ const Modal = ({
|
|
|
2826
3651
|
width: '100%',
|
|
2827
3652
|
borderTopLeftRadius: '6px',
|
|
2828
3653
|
borderTopRightRadius: '6px',
|
|
2829
|
-
height: grayDecorHeight ??
|
|
2830
|
-
background: closeAreaBackgroundColor ??
|
|
3654
|
+
height: grayDecorHeight ?? configStyles.MODAL.grayDecorHeight,
|
|
3655
|
+
background: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
2831
3656
|
}
|
|
2832
3657
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
2833
3658
|
onClick: handleCloseModal,
|
|
@@ -2844,9 +3669,9 @@ const Modal = ({
|
|
|
2844
3669
|
cursor: 'pointer',
|
|
2845
3670
|
backgroundColor: 'transparent'
|
|
2846
3671
|
}
|
|
2847
|
-
}, closeSlideIcon ? closeSlideIcon :
|
|
3672
|
+
}, closeSlideIcon ? closeSlideIcon : configStyles.MODAL.icon.closeSlide ? configStyles.MODAL.icon.closeSlide : /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2848
3673
|
style: {
|
|
2849
|
-
height: imageWrapHeight ??
|
|
3674
|
+
height: imageWrapHeight ?? configStyles.MODAL.image.wrapHeight
|
|
2850
3675
|
}
|
|
2851
3676
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
2852
3677
|
if (select === index) {
|
|
@@ -2859,10 +3684,10 @@ const Modal = ({
|
|
|
2859
3684
|
style: {
|
|
2860
3685
|
display: 'block',
|
|
2861
3686
|
objectFit: 'contain',
|
|
2862
|
-
margin: imageMargin ??
|
|
2863
|
-
borderRadius: radius ??
|
|
2864
|
-
width: imageWidth ??
|
|
2865
|
-
height: imageHeight ??
|
|
3687
|
+
margin: imageMargin ?? configStyles.MODAL.image.margin,
|
|
3688
|
+
borderRadius: radius ?? configStyles.MODAL.radius,
|
|
3689
|
+
width: imageWidth ?? configStyles.MODAL.image.width,
|
|
3690
|
+
height: imageHeight ?? configStyles.MODAL.image.height
|
|
2866
3691
|
},
|
|
2867
3692
|
src: item.url
|
|
2868
3693
|
}), isHover && showZoomIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2883,7 +3708,7 @@ const Modal = ({
|
|
|
2883
3708
|
justifyContent: 'center'
|
|
2884
3709
|
},
|
|
2885
3710
|
onClick: () => handleOpenInNewTab(item.url)
|
|
2886
|
-
}, zoomIcon ? zoomIcon :
|
|
3711
|
+
}, zoomIcon ? zoomIcon : configStyles.MODAL.icon.zoom ? configStyles.MODAL.icon.zoom : /*#__PURE__*/React__default.createElement(SvgZoom, null)) : '');
|
|
2887
3712
|
}
|
|
2888
3713
|
}
|
|
2889
3714
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -2900,7 +3725,7 @@ const Modal = ({
|
|
|
2900
3725
|
top: 'calc(50% - 12px)',
|
|
2901
3726
|
backgroundColor: 'transparent'
|
|
2902
3727
|
}
|
|
2903
|
-
}, prevIcon ? prevIcon :
|
|
3728
|
+
}, prevIcon ? prevIcon : configStyles.MODAL.icon.prev ? configStyles.MODAL.icon.prev : /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
|
|
2904
3729
|
onClick: () => handleGoTo('next'),
|
|
2905
3730
|
style: {
|
|
2906
3731
|
position: 'absolute',
|
|
@@ -2914,7 +3739,7 @@ const Modal = ({
|
|
|
2914
3739
|
top: 'calc(50% - 12px)',
|
|
2915
3740
|
backgroundColor: 'transparent'
|
|
2916
3741
|
}
|
|
2917
|
-
}, nextIcon ? nextIcon :
|
|
3742
|
+
}, nextIcon ? nextIcon : configStyles.MODAL.icon.next ? configStyles.MODAL.icon.next : /*#__PURE__*/React__default.createElement(SvgNext, null)))))))));
|
|
2918
3743
|
};
|
|
2919
3744
|
Modal.propTypes = {
|
|
2920
3745
|
data: PropTypes.array,
|
|
@@ -3323,27 +4148,28 @@ const Input = ({
|
|
|
3323
4148
|
}) => {
|
|
3324
4149
|
const [show, setShow] = useState(false);
|
|
3325
4150
|
const [isHover, setIsHover] = useState(false);
|
|
4151
|
+
const [classProps, setClassProps] = useState({});
|
|
4152
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
3326
4153
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
3327
|
-
const inpStyles = {
|
|
3328
|
-
width: width ??
|
|
4154
|
+
const inpStyles = configStyles.INPUT && {
|
|
4155
|
+
width: width ?? configStyles.INPUT.width,
|
|
3329
4156
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
3330
|
-
height: height ??
|
|
3331
|
-
padding: padding ??
|
|
3332
|
-
fontSize: size ??
|
|
3333
|
-
fontStyle: style ??
|
|
3334
|
-
fontWeight: weight ??
|
|
3335
|
-
fontFamily: family ??
|
|
3336
|
-
boxSizing: boxSizing ??
|
|
3337
|
-
color: innerErrorMessage && errorColor ? errorColor : color ? color :
|
|
3338
|
-
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor :
|
|
4157
|
+
height: height ?? configStyles.INPUT.height,
|
|
4158
|
+
padding: padding ?? configStyles.INPUT.padding,
|
|
4159
|
+
fontSize: size ?? configStyles.INPUT.font.size,
|
|
4160
|
+
fontStyle: style ?? configStyles.INPUT.font.style,
|
|
4161
|
+
fontWeight: weight ?? configStyles.INPUT.font.weight,
|
|
4162
|
+
fontFamily: family ?? configStyles.INPUT.font.family,
|
|
4163
|
+
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
4164
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : configStyles.INPUT.color,
|
|
4165
|
+
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
3339
4166
|
};
|
|
3340
4167
|
const uuid = v4();
|
|
3341
|
-
const inpAttributes = {
|
|
4168
|
+
const inpAttributes = configStyles.INPUT && {
|
|
3342
4169
|
placeholder: placeholder ?? '',
|
|
3343
4170
|
iName: name ? name : `tui_${uuid}_tui`,
|
|
3344
|
-
autoComplete: autoComplete ??
|
|
4171
|
+
autoComplete: autoComplete ?? configStyles.INPUT.autoComplete
|
|
3345
4172
|
};
|
|
3346
|
-
const classProps = classnames(className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
3347
4173
|
const errorShow = keyframes`
|
|
3348
4174
|
100% {
|
|
3349
4175
|
bottom: '-20px';
|
|
@@ -3376,25 +4202,37 @@ const Input = ({
|
|
|
3376
4202
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
3377
4203
|
}
|
|
3378
4204
|
}, [type, regexp, errorMessage, regexpErrorMessage]);
|
|
3379
|
-
|
|
4205
|
+
useEffect(() => {
|
|
4206
|
+
configStylesPromise.then(data => {
|
|
4207
|
+
setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
|
|
4208
|
+
setConfigStyles(() => {
|
|
4209
|
+
return {
|
|
4210
|
+
...data
|
|
4211
|
+
};
|
|
4212
|
+
});
|
|
4213
|
+
}, error => {
|
|
4214
|
+
console.error(error);
|
|
4215
|
+
});
|
|
4216
|
+
}, []);
|
|
4217
|
+
return configStyles.INPUT && /*#__PURE__*/React__default.createElement("div", {
|
|
3380
4218
|
className: classProps
|
|
3381
4219
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3382
4220
|
style: {
|
|
3383
|
-
color: labelColor ??
|
|
3384
|
-
fontSize: labelSize ??
|
|
3385
|
-
fontStyle: labelStyle ??
|
|
3386
|
-
display: labelDisplay ??
|
|
3387
|
-
fontWeight: labelWeight ??
|
|
3388
|
-
lineHeight: labelLineHeight ??
|
|
3389
|
-
marginBottom: labelMarginBottom ??
|
|
3390
|
-
fontFamily: labelFontFamily ??
|
|
4221
|
+
color: labelColor ?? configStyles.INPUT.label.color,
|
|
4222
|
+
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
4223
|
+
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
4224
|
+
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
4225
|
+
fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
|
|
4226
|
+
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
4227
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
4228
|
+
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family
|
|
3391
4229
|
}
|
|
3392
4230
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3393
4231
|
className: `${styles$7['input-content']}`,
|
|
3394
4232
|
style: {
|
|
3395
|
-
width: width ??
|
|
3396
|
-
borderRadius: radius ??
|
|
3397
|
-
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${
|
|
4233
|
+
width: width ?? configStyles.INPUT.width,
|
|
4234
|
+
borderRadius: radius ?? configStyles.INPUT.radius,
|
|
4235
|
+
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.INPUT.error.color}` : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
3398
4236
|
},
|
|
3399
4237
|
onMouseEnter: handleMouseEnter,
|
|
3400
4238
|
onMouseLeave: handleMouseLeave
|
|
@@ -3405,13 +4243,13 @@ const Input = ({
|
|
|
3405
4243
|
alignItems: 'center',
|
|
3406
4244
|
justifyContent: 'center',
|
|
3407
4245
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3408
|
-
height: height ??
|
|
3409
|
-
padding: padding ??
|
|
3410
|
-
width: iconWidth ??
|
|
3411
|
-
boxSizing: boxSizing ??
|
|
3412
|
-
borderTopLeftRadius: radius ??
|
|
3413
|
-
borderBottomLeftRadius: radius ??
|
|
3414
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
4246
|
+
height: height ?? configStyles.INPUT.height,
|
|
4247
|
+
padding: padding ?? configStyles.INPUT.padding,
|
|
4248
|
+
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4249
|
+
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
4250
|
+
borderTopLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4251
|
+
borderBottomLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4252
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
3415
4253
|
}
|
|
3416
4254
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement(TelInput, {
|
|
3417
4255
|
type: type,
|
|
@@ -3421,14 +4259,14 @@ const Input = ({
|
|
|
3421
4259
|
disabled: disabled,
|
|
3422
4260
|
inpStyles: inpStyles,
|
|
3423
4261
|
inpAttributes: inpAttributes,
|
|
3424
|
-
radius: radius ??
|
|
3425
|
-
phoneDisplay: phoneDisplay ??
|
|
3426
|
-
phoneAlignItems: phoneAlignItems ??
|
|
3427
|
-
phoneJustifyContent: phoneJustifyContent ??
|
|
3428
|
-
telBorderRightWidth: telBorderRightWidth ??
|
|
3429
|
-
telBorderRightStyle: telBorderRightStyle ??
|
|
3430
|
-
telBorderRightColor: telBorderRightColor ??
|
|
3431
|
-
telBorderRightColorHover: telBorderRightColorHover ??
|
|
4262
|
+
radius: radius ?? configStyles.INPUT.radius,
|
|
4263
|
+
phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
|
|
4264
|
+
phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
|
|
4265
|
+
phoneJustifyContent: phoneJustifyContent ?? configStyles.INPUT.tel.justifyContent,
|
|
4266
|
+
telBorderRightWidth: telBorderRightWidth ?? configStyles.INPUT.tel.borderRight.width,
|
|
4267
|
+
telBorderRightStyle: telBorderRightStyle ?? configStyles.INPUT.tel.borderRight.style,
|
|
4268
|
+
telBorderRightColor: telBorderRightColor ?? configStyles.INPUT.tel.borderRight.color,
|
|
4269
|
+
telBorderRightColorHover: telBorderRightColorHover ?? configStyles.INPUT.tel.borderRight.colors.hover
|
|
3432
4270
|
}) : type === 'number' ? /*#__PURE__*/React__default.createElement(NumberInput, {
|
|
3433
4271
|
value: value,
|
|
3434
4272
|
dots: withoutDot,
|
|
@@ -3440,7 +4278,7 @@ const Input = ({
|
|
|
3440
4278
|
inpAttributes: inpAttributes,
|
|
3441
4279
|
minNumSize: minNumSize ? minNumSize : '',
|
|
3442
4280
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
3443
|
-
radius: radius ??
|
|
4281
|
+
radius: radius ?? configStyles.INPUT.radius
|
|
3444
4282
|
}) : type === 'password' ? /*#__PURE__*/React__default.createElement(PassInput, {
|
|
3445
4283
|
show: show,
|
|
3446
4284
|
type: type,
|
|
@@ -3450,7 +4288,7 @@ const Input = ({
|
|
|
3450
4288
|
maxLength: maxLength,
|
|
3451
4289
|
inpStyles: inpStyles,
|
|
3452
4290
|
inpAttributes: inpAttributes,
|
|
3453
|
-
radius: radius ??
|
|
4291
|
+
radius: radius ?? configStyles.INPUT.radius
|
|
3454
4292
|
}) : /*#__PURE__*/React__default.createElement(TextInput, {
|
|
3455
4293
|
value: value,
|
|
3456
4294
|
disabled: disabled,
|
|
@@ -3458,7 +4296,7 @@ const Input = ({
|
|
|
3458
4296
|
inpStyles: inpStyles,
|
|
3459
4297
|
maxLength: maxLength,
|
|
3460
4298
|
inpAttributes: inpAttributes,
|
|
3461
|
-
radius: radius ??
|
|
4299
|
+
radius: radius ?? configStyles.INPUT.radius
|
|
3462
4300
|
}), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
3463
4301
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
3464
4302
|
style: {
|
|
@@ -3466,32 +4304,32 @@ const Input = ({
|
|
|
3466
4304
|
alignItems: 'center',
|
|
3467
4305
|
justifyContent: 'center',
|
|
3468
4306
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3469
|
-
height: height ??
|
|
3470
|
-
padding: padding ??
|
|
3471
|
-
width: iconWidth ??
|
|
3472
|
-
boxSizing: boxSizing ??
|
|
3473
|
-
borderTopRightRadius: radius ??
|
|
3474
|
-
borderBottomRightRadius: radius ??
|
|
3475
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
4307
|
+
height: height ?? configStyles.INPUT.height,
|
|
4308
|
+
padding: padding ?? configStyles.INPUT.padding,
|
|
4309
|
+
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4310
|
+
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
4311
|
+
borderTopRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4312
|
+
borderBottomRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4313
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
3476
4314
|
}
|
|
3477
4315
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P, {
|
|
3478
4316
|
animation: animation,
|
|
3479
4317
|
style: {
|
|
3480
4318
|
margin: '0px',
|
|
3481
4319
|
position: 'absolute',
|
|
3482
|
-
width: width ??
|
|
3483
|
-
left: errorLeft ??
|
|
3484
|
-
color: errorColor ??
|
|
3485
|
-
fontSize: errorSize ??
|
|
3486
|
-
fontStyle: errorStyle ??
|
|
3487
|
-
fontFamily: errorFamily ??
|
|
3488
|
-
fontWeight: errorWeight ??
|
|
3489
|
-
zIndex: errorZindex ??
|
|
3490
|
-
lineHeight: errorLineHeight ??
|
|
3491
|
-
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${
|
|
4320
|
+
width: width ?? configStyles.INPUT.width,
|
|
4321
|
+
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
4322
|
+
color: errorColor ?? configStyles.INPUT.error.color,
|
|
4323
|
+
fontSize: errorSize ?? configStyles.INPUT.error.font.size,
|
|
4324
|
+
fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
|
|
4325
|
+
fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
|
|
4326
|
+
fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
|
|
4327
|
+
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
4328
|
+
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
4329
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
3492
4330
|
transform: 'scale3d(1,1,1)'
|
|
3493
4331
|
},
|
|
3494
|
-
className: errorClassName ??
|
|
4332
|
+
className: errorClassName ?? configStyles.INPUT.error.className
|
|
3495
4333
|
}, innerErrorMessage) : '');
|
|
3496
4334
|
};
|
|
3497
4335
|
Input.propTypes = {
|
|
@@ -3586,8 +4424,9 @@ const Radio = ({
|
|
|
3586
4424
|
radioItemMarginBottom,
|
|
3587
4425
|
diraction = 'vertical'
|
|
3588
4426
|
}) => {
|
|
3589
|
-
const classProps = classnames(className ?? merge.RADIO.className);
|
|
3590
4427
|
const [innerData, setInnerData] = useState([]);
|
|
4428
|
+
const [classProps, setClassProps] = useState({});
|
|
4429
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
3591
4430
|
const [radioInnerSize, setRadioInnerSize] = useState('');
|
|
3592
4431
|
const [radioInnerFormat, setRadioInnerFormat] = useState('');
|
|
3593
4432
|
const [innerSelectedData, setInnerSelectedData] = useState({});
|
|
@@ -3598,11 +4437,11 @@ const Radio = ({
|
|
|
3598
4437
|
});
|
|
3599
4438
|
const handleMouseEnter = (id, elemID) => {
|
|
3600
4439
|
const elem = document.querySelector(`#${elemID}`);
|
|
3601
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
4440
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
3602
4441
|
};
|
|
3603
4442
|
const handleMouseLeave = (id, elemID) => {
|
|
3604
4443
|
const elem = document.querySelector(`#${elemID}`);
|
|
3605
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
4444
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : 'transparent';
|
|
3606
4445
|
};
|
|
3607
4446
|
const handleChecked = selItem => {
|
|
3608
4447
|
setInnerSelectedData(selItem);
|
|
@@ -3618,7 +4457,7 @@ const Radio = ({
|
|
|
3618
4457
|
useEffect(() => {
|
|
3619
4458
|
let radioSize = '';
|
|
3620
4459
|
let radioSizeFormat = '';
|
|
3621
|
-
const checkSize = size ||
|
|
4460
|
+
const checkSize = configStyles.RADIO && (size || configStyles.RADIO.size);
|
|
3622
4461
|
if (checkSize && typeof checkSize === 'string') {
|
|
3623
4462
|
if (checkSize.length > 0) {
|
|
3624
4463
|
checkSize.split('').map(item => {
|
|
@@ -3635,7 +4474,7 @@ const Radio = ({
|
|
|
3635
4474
|
}
|
|
3636
4475
|
setRadioInnerFormat(radioSizeFormat);
|
|
3637
4476
|
setRadioInnerSize(`${parseInt(radioSize) / 2}`);
|
|
3638
|
-
}, [size,
|
|
4477
|
+
}, [size, configStyles.RADIO]);
|
|
3639
4478
|
useEffect(() => {
|
|
3640
4479
|
if (typeof selected === 'object' && selected !== null && !Array.isArray(selected)) {
|
|
3641
4480
|
setInnerSelectedData(selected);
|
|
@@ -3650,7 +4489,19 @@ const Radio = ({
|
|
|
3650
4489
|
});
|
|
3651
4490
|
}
|
|
3652
4491
|
}, [keyNames]);
|
|
3653
|
-
|
|
4492
|
+
useEffect(() => {
|
|
4493
|
+
configStylesPromise.then(data => {
|
|
4494
|
+
setClassProps(() => classnames(className ?? data.RADIO.className));
|
|
4495
|
+
setConfigStyles(() => {
|
|
4496
|
+
return {
|
|
4497
|
+
...data
|
|
4498
|
+
};
|
|
4499
|
+
});
|
|
4500
|
+
}, error => {
|
|
4501
|
+
console.error(error);
|
|
4502
|
+
});
|
|
4503
|
+
}, []);
|
|
4504
|
+
return configStyles.RADIO && /*#__PURE__*/React__default.createElement("div", {
|
|
3654
4505
|
className: classProps,
|
|
3655
4506
|
style: {
|
|
3656
4507
|
display: 'flex',
|
|
@@ -3665,8 +4516,8 @@ const Radio = ({
|
|
|
3665
4516
|
cursor: item[innerKeyNames.disabled] ? 'not-allowed' : 'pointer',
|
|
3666
4517
|
width: 'fit-content',
|
|
3667
4518
|
alignItems: 'center',
|
|
3668
|
-
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight :
|
|
3669
|
-
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom :
|
|
4519
|
+
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : configStyles.RADIO.item.marginRight : '0px',
|
|
4520
|
+
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : configStyles.RADIO.item.marginBottom : '0px'
|
|
3670
4521
|
},
|
|
3671
4522
|
onClick: item[innerKeyNames.disabled] ? _ => _ : () => handleChecked(item),
|
|
3672
4523
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
@@ -3677,11 +4528,11 @@ const Radio = ({
|
|
|
3677
4528
|
alignItems: 'center',
|
|
3678
4529
|
borderRadius: '100%',
|
|
3679
4530
|
justifyContent: 'center',
|
|
3680
|
-
width: size ? size :
|
|
3681
|
-
height: size ? size :
|
|
3682
|
-
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight :
|
|
3683
|
-
border: `${borderSize ??
|
|
3684
|
-
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
4531
|
+
width: size ? size : configStyles.RADIO.size,
|
|
4532
|
+
height: size ? size : configStyles.RADIO.size,
|
|
4533
|
+
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight : configStyles.RADIO.marginRight : '0px',
|
|
4534
|
+
border: `${borderSize ?? configStyles.RADIO.border.width} ${borderStyle ? borderStyle : configStyles.RADIO.border.style}`,
|
|
4535
|
+
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color
|
|
3685
4536
|
}
|
|
3686
4537
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3687
4538
|
id: elemId,
|
|
@@ -3689,16 +4540,16 @@ const Radio = ({
|
|
|
3689
4540
|
borderRadius: '100%',
|
|
3690
4541
|
width: radioInnerSize + radioInnerFormat,
|
|
3691
4542
|
height: radioInnerSize + radioInnerFormat,
|
|
3692
|
-
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
4543
|
+
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : 'transparent'
|
|
3693
4544
|
}
|
|
3694
4545
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default.createElement("span", {
|
|
3695
4546
|
style: {
|
|
3696
|
-
color: labelColor ??
|
|
3697
|
-
fontSize: labelFontSize ??
|
|
3698
|
-
fontStyle: labelFontStyle ??
|
|
3699
|
-
fontFamily: labelFontFamily ??
|
|
3700
|
-
fontWeight: labelFontWeight ??
|
|
3701
|
-
lineHeight: labelLineHeight ??
|
|
4547
|
+
color: labelColor ?? configStyles.RADIO.label.color,
|
|
4548
|
+
fontSize: labelFontSize ?? configStyles.RADIO.label.font.size,
|
|
4549
|
+
fontStyle: labelFontStyle ?? configStyles.RADIO.label.font.style,
|
|
4550
|
+
fontFamily: labelFontFamily ?? configStyles.RADIO.label.font.family,
|
|
4551
|
+
fontWeight: labelFontWeight ?? configStyles.RADIO.label.font.weight,
|
|
4552
|
+
lineHeight: labelLineHeight ?? configStyles.RADIO.label.lineHeight
|
|
3702
4553
|
},
|
|
3703
4554
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
3704
4555
|
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
@@ -3818,11 +4669,12 @@ const Select = ({
|
|
|
3818
4669
|
boxShadowHover
|
|
3819
4670
|
}) => {
|
|
3820
4671
|
const ref = useRef();
|
|
3821
|
-
const classProps = classnames(className ? className : merge.SELECT.className);
|
|
3822
4672
|
const [opened, setOpened] = useState(false);
|
|
3823
4673
|
const [isHover, setIsHover] = useState(false);
|
|
4674
|
+
const [classProps, setClassProps] = useState({});
|
|
3824
4675
|
const [newSelected, setNewSelected] = useState([]);
|
|
3825
4676
|
const [existOptions, setExistOptions] = useState([]);
|
|
4677
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
3826
4678
|
const handleOpenClose = () => {
|
|
3827
4679
|
setOpened(!opened);
|
|
3828
4680
|
};
|
|
@@ -3871,12 +4723,12 @@ const Select = ({
|
|
|
3871
4723
|
setIsHover(false);
|
|
3872
4724
|
};
|
|
3873
4725
|
const handleMouseEnterOption = e => {
|
|
3874
|
-
e.target.style.color = optionItemColorHover ? optionItemColorHover :
|
|
3875
|
-
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover :
|
|
4726
|
+
e.target.style.color = optionItemColorHover ? optionItemColorHover : configStyles.SELECT.options.item.colors.hover;
|
|
4727
|
+
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover : configStyles.SELECT.options.item.colors.backgroudHover;
|
|
3876
4728
|
};
|
|
3877
4729
|
const handleMouseLeaveOption = e => {
|
|
3878
|
-
e.target.style.color = optionItemColor ? optionItemColor :
|
|
3879
|
-
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor :
|
|
4730
|
+
e.target.style.color = optionItemColor ? optionItemColor : configStyles.SELECT.options.item.color;
|
|
4731
|
+
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor : configStyles.SELECT.options.item.colors.backgroud;
|
|
3880
4732
|
};
|
|
3881
4733
|
const isObjectEmpty = obj => {
|
|
3882
4734
|
for (var key in obj) {
|
|
@@ -3924,7 +4776,19 @@ const Select = ({
|
|
|
3924
4776
|
setExistOptions(modifiedOptions);
|
|
3925
4777
|
}
|
|
3926
4778
|
}, [options, multiple, selected, selected?.length]);
|
|
3927
|
-
|
|
4779
|
+
useEffect(() => {
|
|
4780
|
+
configStylesPromise.then(data => {
|
|
4781
|
+
setClassProps(() => classnames(className ?? data.SELECT.className));
|
|
4782
|
+
setConfigStyles(() => {
|
|
4783
|
+
return {
|
|
4784
|
+
...data
|
|
4785
|
+
};
|
|
4786
|
+
});
|
|
4787
|
+
}, error => {
|
|
4788
|
+
console.error(error);
|
|
4789
|
+
});
|
|
4790
|
+
}, []);
|
|
4791
|
+
return configStyles.SELECT && /*#__PURE__*/React__default.createElement("div", {
|
|
3928
4792
|
className: classProps,
|
|
3929
4793
|
style: {
|
|
3930
4794
|
position: 'relative',
|
|
@@ -3932,15 +4796,15 @@ const Select = ({
|
|
|
3932
4796
|
}
|
|
3933
4797
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3934
4798
|
style: {
|
|
3935
|
-
color: labelColor ??
|
|
3936
|
-
fontWeight: labelWeight ??
|
|
3937
|
-
display: labelDisplay ??
|
|
3938
|
-
fontSize: labelFontSize ??
|
|
3939
|
-
fontStyle: labelFontStyle ??
|
|
3940
|
-
fontFamily: labelFontFamily ??
|
|
3941
|
-
lineHeight: labelLineHeight ??
|
|
3942
|
-
marginBottom: labelMarginBottom ??
|
|
3943
|
-
textTransform: labelTextTransform ??
|
|
4799
|
+
color: labelColor ?? configStyles.SELECT.label.color,
|
|
4800
|
+
fontWeight: labelWeight ?? configStyles.SELECT.label.font.weight,
|
|
4801
|
+
display: labelDisplay ?? configStyles.SELECT.label.display,
|
|
4802
|
+
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
4803
|
+
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
4804
|
+
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
4805
|
+
lineHeight: labelLineHeight ?? configStyles.SELECT.label.lineHeight,
|
|
4806
|
+
marginBottom: labelMarginBottom ?? configStyles.SELECT.label.marginBottom,
|
|
4807
|
+
textTransform: labelTextTransform ?? configStyles.SELECT.label.textTransform
|
|
3944
4808
|
}
|
|
3945
4809
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3946
4810
|
ref: ref
|
|
@@ -3948,19 +4812,19 @@ const Select = ({
|
|
|
3948
4812
|
className: styles$6['select-content']
|
|
3949
4813
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3950
4814
|
style: {
|
|
3951
|
-
cursor: disabled ? 'not-allowed' : cursor ? cursor :
|
|
3952
|
-
minHeight: selectedMinHeight ??
|
|
3953
|
-
padding: selectedPadding ??
|
|
3954
|
-
borderRadius: selectedRadius ??
|
|
3955
|
-
fontSize: selectedFontSize ??
|
|
3956
|
-
fontStyle: selectedFontStyle ??
|
|
3957
|
-
fontFamily: selectedFontFamily ??
|
|
3958
|
-
boxSizing: selectedBoxSizing ??
|
|
3959
|
-
fontWeight: selectedFontWeight ??
|
|
3960
|
-
lineHeight: selectedLineHeight ??
|
|
3961
|
-
transition: selectedTransition ??
|
|
3962
|
-
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor :
|
|
3963
|
-
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` :
|
|
4815
|
+
cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
|
|
4816
|
+
minHeight: selectedMinHeight ?? configStyles.SELECT.selected.minHeight,
|
|
4817
|
+
padding: selectedPadding ?? configStyles.SELECT.selected.padding,
|
|
4818
|
+
borderRadius: selectedRadius ?? configStyles.SELECT.selected.radius,
|
|
4819
|
+
fontSize: selectedFontSize ?? configStyles.SELECT.selected.font.size,
|
|
4820
|
+
fontStyle: selectedFontStyle ?? configStyles.SELECT.selected.font.style,
|
|
4821
|
+
fontFamily: selectedFontFamily ?? configStyles.SELECT.selected.font.family,
|
|
4822
|
+
boxSizing: selectedBoxSizing ?? configStyles.SELECT.selected.box.sizing,
|
|
4823
|
+
fontWeight: selectedFontWeight ?? configStyles.SELECT.selected.font.weight,
|
|
4824
|
+
lineHeight: selectedLineHeight ?? configStyles.SELECT.selected.lineHeight,
|
|
4825
|
+
transition: selectedTransition ?? configStyles.SELECT.selected.transition,
|
|
4826
|
+
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selected.colors.background,
|
|
4827
|
+
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : configStyles.SELECT.error.box.shadow : isHover ? boxShadowHover ? boxShadowHover : configStyles.SELECT.box.shadowHover : boxShadow ? boxShadow : configStyles.SELECT.box.shadow
|
|
3964
4828
|
},
|
|
3965
4829
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
3966
4830
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
@@ -3972,7 +4836,7 @@ const Select = ({
|
|
|
3972
4836
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
3973
4837
|
overflow: 'hidden',
|
|
3974
4838
|
textOverflow: 'ellipsis',
|
|
3975
|
-
color: errorMessage ? errorColor ? errorColor :
|
|
4839
|
+
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
3976
4840
|
}
|
|
3977
4841
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
3978
4842
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -3984,23 +4848,23 @@ const Select = ({
|
|
|
3984
4848
|
}
|
|
3985
4849
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
3986
4850
|
className: `${styles$6['select-content-top-icon']}`
|
|
3987
|
-
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon :
|
|
4851
|
+
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
3988
4852
|
className: `${styles$6['close-icon']}`,
|
|
3989
4853
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
3990
4854
|
style: {
|
|
3991
4855
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
3992
4856
|
}
|
|
3993
|
-
}, closeIcon ? closeIcon :
|
|
4857
|
+
}, closeIcon ? closeIcon : configStyles.SELECT.closeIcon ? configStyles.SELECT.closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3994
4858
|
style: {
|
|
3995
4859
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
3996
4860
|
},
|
|
3997
4861
|
className: `${styles$6['arrow-icon']}`
|
|
3998
|
-
}, arrowIcon ? arrowIcon :
|
|
4862
|
+
}, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3999
4863
|
style: {
|
|
4000
|
-
boxShadow: optionsBoxShadow ??
|
|
4001
|
-
borderRadius: optionsBorderRadius ??
|
|
4002
|
-
backgroundColor: optionsBackgroundColor ??
|
|
4003
|
-
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' :
|
|
4864
|
+
boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
|
|
4865
|
+
borderRadius: optionsBorderRadius ?? configStyles.SELECT.options.radius,
|
|
4866
|
+
backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
|
|
4867
|
+
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selected.minHeight.includes('rem') ? parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 2)) + 6 + 'px'
|
|
4004
4868
|
},
|
|
4005
4869
|
className: `${styles$6['select-content-bottom']}`
|
|
4006
4870
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4013,19 +4877,19 @@ const Select = ({
|
|
|
4013
4877
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
4014
4878
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
4015
4879
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
4016
|
-
className: `${styles$6['select-content-bottom-row']} ${dots ||
|
|
4880
|
+
className: `${styles$6['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$6['ellipsis'] : ''}`,
|
|
4017
4881
|
style: {
|
|
4018
|
-
overflowWrap: !dots && !
|
|
4019
|
-
color: optionItemColor ??
|
|
4020
|
-
cursor: optionItemCursor ??
|
|
4021
|
-
padding: optionItemPadding ??
|
|
4022
|
-
fontSize: optionItemFontSize ??
|
|
4023
|
-
boxSizing: optionItemBoxSizing ??
|
|
4024
|
-
minHeight: optionItemMinHeight ??
|
|
4025
|
-
fontWeight: optionItemFontWeight ??
|
|
4026
|
-
lineHeight: dots ||
|
|
4027
|
-
marginBottom: optionItemMarginBottom ??
|
|
4028
|
-
backgroundColor: optionItemBackgroudColor ??
|
|
4882
|
+
overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
|
|
4883
|
+
color: optionItemColor ?? configStyles.SELECT.options.item.color,
|
|
4884
|
+
cursor: optionItemCursor ?? configStyles.SELECT.options.item.cursor,
|
|
4885
|
+
padding: optionItemPadding ?? configStyles.SELECT.options.item.padding,
|
|
4886
|
+
fontSize: optionItemFontSize ?? configStyles.SELECT.options.item.font.size,
|
|
4887
|
+
boxSizing: optionItemBoxSizing ?? configStyles.SELECT.options.item.box.sizing,
|
|
4888
|
+
minHeight: optionItemMinHeight ?? configStyles.SELECT.options.item.minHeight,
|
|
4889
|
+
fontWeight: optionItemFontWeight ?? configStyles.SELECT.options.item.font.weight,
|
|
4890
|
+
lineHeight: dots || configStyles.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : configStyles.SELECT.options.item.lineHeight,
|
|
4891
|
+
marginBottom: optionItemMarginBottom ?? configStyles.SELECT.options.item.marginBottom,
|
|
4892
|
+
backgroundColor: optionItemBackgroudColor ?? configStyles.SELECT.options.item.colors.backgroud
|
|
4029
4893
|
}
|
|
4030
4894
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
4031
4895
|
checked: option.checked
|
|
@@ -4033,13 +4897,13 @@ const Select = ({
|
|
|
4033
4897
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
4034
4898
|
style: {
|
|
4035
4899
|
position: 'absolute',
|
|
4036
|
-
color: errorColor ??
|
|
4037
|
-
fontSize: errorSize ??
|
|
4038
|
-
fontStyle: errorStyle ??
|
|
4039
|
-
fontFamily: errorFamily ??
|
|
4040
|
-
fontWeight: errorWeight ??
|
|
4041
|
-
zIndex: errorZindex ??
|
|
4042
|
-
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${
|
|
4900
|
+
color: errorColor ?? configStyles.SELECT.error.color,
|
|
4901
|
+
fontSize: errorSize ?? configStyles.SELECT.error.font.size,
|
|
4902
|
+
fontStyle: errorStyle ?? configStyles.SELECT.error.font.style,
|
|
4903
|
+
fontFamily: errorFamily ?? configStyles.SELECT.error.font.family,
|
|
4904
|
+
fontWeight: errorWeight ?? configStyles.SELECT.error.font.weight,
|
|
4905
|
+
zIndex: errorZindex ?? configStyles.SELECT.error.zIndex,
|
|
4906
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.SELECT.error.marginTop})`
|
|
4043
4907
|
}
|
|
4044
4908
|
}, errorMessage) : '');
|
|
4045
4909
|
};
|
|
@@ -4411,11 +5275,10 @@ const createToast = ({
|
|
|
4411
5275
|
};
|
|
4412
5276
|
const toast = {
|
|
4413
5277
|
success: (title, props) => {
|
|
5278
|
+
// const { icon, timer, position, iconClose, description } = props || {}
|
|
4414
5279
|
const {
|
|
4415
|
-
icon,
|
|
4416
5280
|
timer,
|
|
4417
5281
|
position,
|
|
4418
|
-
iconClose,
|
|
4419
5282
|
description
|
|
4420
5283
|
} = props || {};
|
|
4421
5284
|
createToast({
|
|
@@ -4423,17 +5286,16 @@ const toast = {
|
|
|
4423
5286
|
type: 'success',
|
|
4424
5287
|
timer: timer ?? 5000,
|
|
4425
5288
|
position: position ?? 'top-right',
|
|
4426
|
-
description: description ?? ''
|
|
4427
|
-
icon: icon ??
|
|
4428
|
-
iconClose: iconClose ??
|
|
5289
|
+
description: description ?? ''
|
|
5290
|
+
// icon: icon ?? configStyles.TOASTER.icon.success,
|
|
5291
|
+
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
4429
5292
|
});
|
|
4430
5293
|
},
|
|
4431
5294
|
info: (title, props) => {
|
|
5295
|
+
// const { icon, timer, position, iconClose, description } = props || {}
|
|
4432
5296
|
const {
|
|
4433
|
-
icon,
|
|
4434
5297
|
timer,
|
|
4435
5298
|
position,
|
|
4436
|
-
iconClose,
|
|
4437
5299
|
description
|
|
4438
5300
|
} = props || {};
|
|
4439
5301
|
createToast({
|
|
@@ -4441,17 +5303,16 @@ const toast = {
|
|
|
4441
5303
|
type: 'info',
|
|
4442
5304
|
timer: timer ?? 5000,
|
|
4443
5305
|
position: position ?? 'top-right',
|
|
4444
|
-
description: description ?? ''
|
|
4445
|
-
icon: icon ??
|
|
4446
|
-
iconClose: iconClose ??
|
|
5306
|
+
description: description ?? ''
|
|
5307
|
+
// icon: icon ?? configStyles.TOASTER.icon.info,
|
|
5308
|
+
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
4447
5309
|
});
|
|
4448
5310
|
},
|
|
4449
5311
|
warn: (title, props) => {
|
|
5312
|
+
// const { icon, timer, position, iconClose, description } = props || {}
|
|
4450
5313
|
const {
|
|
4451
|
-
icon,
|
|
4452
5314
|
timer,
|
|
4453
5315
|
position,
|
|
4454
|
-
iconClose,
|
|
4455
5316
|
description
|
|
4456
5317
|
} = props || {};
|
|
4457
5318
|
createToast({
|
|
@@ -4459,17 +5320,16 @@ const toast = {
|
|
|
4459
5320
|
type: 'warn',
|
|
4460
5321
|
timer: timer ?? 5000,
|
|
4461
5322
|
position: position ?? 'top-right',
|
|
4462
|
-
description: description ?? ''
|
|
4463
|
-
icon: icon ??
|
|
4464
|
-
iconClose: iconClose ??
|
|
5323
|
+
description: description ?? ''
|
|
5324
|
+
// icon: icon ?? configStyles.TOASTER.icon.warn,
|
|
5325
|
+
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
4465
5326
|
});
|
|
4466
5327
|
},
|
|
4467
5328
|
error: (title, props) => {
|
|
5329
|
+
// const { icon, timer, position, iconClose, description } = props || {}
|
|
4468
5330
|
const {
|
|
4469
|
-
icon,
|
|
4470
5331
|
timer,
|
|
4471
5332
|
position,
|
|
4472
|
-
iconClose,
|
|
4473
5333
|
description
|
|
4474
5334
|
} = props || {};
|
|
4475
5335
|
createToast({
|
|
@@ -4477,16 +5337,17 @@ const toast = {
|
|
|
4477
5337
|
type: 'error',
|
|
4478
5338
|
timer: timer ?? 5000,
|
|
4479
5339
|
position: position ?? 'top-right',
|
|
4480
|
-
description: description ?? ''
|
|
4481
|
-
icon: icon ??
|
|
4482
|
-
iconClose: iconClose ??
|
|
5340
|
+
description: description ?? ''
|
|
5341
|
+
// icon: icon ?? configStyles.TOASTER.icon.error,
|
|
5342
|
+
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
4483
5343
|
});
|
|
4484
5344
|
}
|
|
4485
5345
|
};
|
|
4486
5346
|
const Toaster = ({
|
|
4487
5347
|
className
|
|
4488
5348
|
}) => {
|
|
4489
|
-
const classProps =
|
|
5349
|
+
const [classProps, setClassProps] = useState('');
|
|
5350
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
4490
5351
|
window.addEventListener('popstate', () => {
|
|
4491
5352
|
if (path !== window.location.href) {
|
|
4492
5353
|
if (!toastify) {
|
|
@@ -4501,7 +5362,19 @@ const Toaster = ({
|
|
|
4501
5362
|
const handleToasterClick = e => {
|
|
4502
5363
|
e.stopPropagation();
|
|
4503
5364
|
};
|
|
4504
|
-
|
|
5365
|
+
useEffect(() => {
|
|
5366
|
+
configStylesPromise.then(data => {
|
|
5367
|
+
setClassProps(() => classnames(className ?? data.TOASTER.className));
|
|
5368
|
+
setConfigStyles(() => {
|
|
5369
|
+
return {
|
|
5370
|
+
...data
|
|
5371
|
+
};
|
|
5372
|
+
});
|
|
5373
|
+
}, error => {
|
|
5374
|
+
console.error(error);
|
|
5375
|
+
});
|
|
5376
|
+
}, []);
|
|
5377
|
+
return configStyles.TOASTER && /*#__PURE__*/React__default.createElement("div", {
|
|
4505
5378
|
onClick: handleToasterClick,
|
|
4506
5379
|
className: classProps,
|
|
4507
5380
|
id: "toastify"
|
|
@@ -4550,10 +5423,11 @@ const Tooltip = ({
|
|
|
4550
5423
|
type = 'top'
|
|
4551
5424
|
}) => {
|
|
4552
5425
|
const tooltipRef = /*#__PURE__*/createRef(null);
|
|
4553
|
-
const classProps =
|
|
5426
|
+
const [classProps, setClassProps] = useState({});
|
|
5427
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
5428
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
4554
5429
|
const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
|
|
4555
5430
|
const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
|
|
4556
|
-
const [showTooltip, setShowTooltip] = useState(false);
|
|
4557
5431
|
const handleShow = () => {
|
|
4558
5432
|
setShowTooltip(!showTooltip);
|
|
4559
5433
|
};
|
|
@@ -4564,21 +5438,33 @@ const Tooltip = ({
|
|
|
4564
5438
|
tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
|
|
4565
5439
|
tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
|
|
4566
5440
|
}, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
|
|
4567
|
-
|
|
5441
|
+
useEffect(() => {
|
|
5442
|
+
configStylesPromise.then(data => {
|
|
5443
|
+
setClassProps(() => classnames(styles$4['tooltip-block'], className ?? data.TOOLTIP.className));
|
|
5444
|
+
setConfigStyles(() => {
|
|
5445
|
+
return {
|
|
5446
|
+
...data
|
|
5447
|
+
};
|
|
5448
|
+
});
|
|
5449
|
+
}, error => {
|
|
5450
|
+
console.error(error);
|
|
5451
|
+
});
|
|
5452
|
+
}, []);
|
|
5453
|
+
return configStyles.TOOLTIP && /*#__PURE__*/React__default.createElement("div", {
|
|
4568
5454
|
className: classProps,
|
|
4569
5455
|
style: {
|
|
4570
|
-
width: width ??
|
|
4571
|
-
height: height ??
|
|
4572
|
-
borderRadius: radius ??
|
|
4573
|
-
backgroundColor: backgroundColor ??
|
|
5456
|
+
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
5457
|
+
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
5458
|
+
borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
|
|
5459
|
+
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
4574
5460
|
}
|
|
4575
5461
|
}, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
|
|
4576
5462
|
ref: tooltipRef,
|
|
4577
5463
|
className: `${styles$4['tooltip']}`,
|
|
4578
5464
|
style: {
|
|
4579
|
-
width: tooltipWidth ??
|
|
4580
|
-
borderRadius: tooltipRadius ??
|
|
4581
|
-
backgroundColor: tooltipBackgroundColor ??
|
|
5465
|
+
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
5466
|
+
borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
|
|
5467
|
+
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
4582
5468
|
top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
|
|
4583
5469
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
4584
5470
|
}
|
|
@@ -4587,24 +5473,24 @@ const Tooltip = ({
|
|
|
4587
5473
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4588
5474
|
className: `${styles$4['tooltip-decor']}`,
|
|
4589
5475
|
style: {
|
|
4590
|
-
backgroundColor: tooltipBackgroundColor ??
|
|
5476
|
+
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
4591
5477
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
4592
5478
|
top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
|
|
4593
5479
|
}
|
|
4594
5480
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
4595
5481
|
style: {
|
|
4596
|
-
color: color ??
|
|
4597
|
-
fontSize: fontSize ??
|
|
4598
|
-
fontStyle: fontStyle ??
|
|
4599
|
-
fontFamily: fontFamily ??
|
|
4600
|
-
fontWeight: fontWeight ??
|
|
5482
|
+
color: color ?? configStyles.TOOLTIP.color,
|
|
5483
|
+
fontSize: fontSize ?? configStyles.TOOLTIP.font.size,
|
|
5484
|
+
fontStyle: fontStyle ?? configStyles.TOOLTIP.font.style,
|
|
5485
|
+
fontFamily: fontFamily ?? configStyles.TOOLTIP.font.family,
|
|
5486
|
+
fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
|
|
4601
5487
|
}
|
|
4602
5488
|
}, text))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
4603
5489
|
style: {
|
|
4604
5490
|
cursor: 'pointer'
|
|
4605
5491
|
},
|
|
4606
5492
|
onClick: handleShow
|
|
4607
|
-
}, tooltipIcon ? tooltipIcon :
|
|
5493
|
+
}, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
4608
5494
|
};
|
|
4609
5495
|
Tooltip.propTypes = {
|
|
4610
5496
|
type: PropTypes.string,
|
|
@@ -4680,7 +5566,8 @@ const Captcha = ({
|
|
|
4680
5566
|
}) => {
|
|
4681
5567
|
const [rangeNumber, setRangeNumber] = useState(0);
|
|
4682
5568
|
const [rangeProgress, setRangeProgress] = useState(0);
|
|
4683
|
-
const classProps =
|
|
5569
|
+
const [classProps, setClassProps] = useState({});
|
|
5570
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
4684
5571
|
const handleRange = e => {
|
|
4685
5572
|
const value = e.target.value;
|
|
4686
5573
|
getRange(value);
|
|
@@ -4702,15 +5589,27 @@ const Captcha = ({
|
|
|
4702
5589
|
setRangeNumber(Math.min(roundedRange, 100));
|
|
4703
5590
|
}
|
|
4704
5591
|
}, [range, getRange]);
|
|
4705
|
-
|
|
5592
|
+
useEffect(() => {
|
|
5593
|
+
configStylesPromise.then(data => {
|
|
5594
|
+
setClassProps(() => classnames(className ?? data.CAPTCHA.className));
|
|
5595
|
+
setConfigStyles(() => {
|
|
5596
|
+
return {
|
|
5597
|
+
...data
|
|
5598
|
+
};
|
|
5599
|
+
});
|
|
5600
|
+
}, error => {
|
|
5601
|
+
console.error(error);
|
|
5602
|
+
});
|
|
5603
|
+
}, []);
|
|
5604
|
+
return configStyles.CAPTCHA && /*#__PURE__*/React__default.createElement("div", {
|
|
4706
5605
|
className: classProps
|
|
4707
5606
|
}, label && /*#__PURE__*/React__default.createElement("p", {
|
|
4708
5607
|
style: {
|
|
4709
|
-
color: color ??
|
|
4710
|
-
fontSize: fontSize ??
|
|
4711
|
-
fontStyle: fontStyle ??
|
|
4712
|
-
fontFamily: fontFamily ??
|
|
4713
|
-
fontWeight: fontWeight ??
|
|
5608
|
+
color: color ?? configStyles.CAPTCHA.label.color,
|
|
5609
|
+
fontSize: fontSize ?? configStyles.CAPTCHA.label.font.size,
|
|
5610
|
+
fontStyle: fontStyle ?? configStyles.CAPTCHA.label.font.style,
|
|
5611
|
+
fontFamily: fontFamily ?? configStyles.CAPTCHA.label.font.family,
|
|
5612
|
+
fontWeight: fontWeight ?? configStyles.CAPTCHA.label.font.weight
|
|
4714
5613
|
}
|
|
4715
5614
|
}, label), /*#__PURE__*/React__default.createElement("div", {
|
|
4716
5615
|
style: {
|
|
@@ -4803,8 +5702,22 @@ const Stepper = ({
|
|
|
4803
5702
|
activeSteps,
|
|
4804
5703
|
className
|
|
4805
5704
|
}) => {
|
|
4806
|
-
|
|
4807
|
-
|
|
5705
|
+
const [classProps, setClassProps] = useState({});
|
|
5706
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
5707
|
+
useEffect(() => {
|
|
5708
|
+
configStylesPromise.then(data => {
|
|
5709
|
+
setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
|
|
5710
|
+
setConfigStyles(() => {
|
|
5711
|
+
return {
|
|
5712
|
+
...data
|
|
5713
|
+
};
|
|
5714
|
+
});
|
|
5715
|
+
}, error => {
|
|
5716
|
+
console.error(error);
|
|
5717
|
+
});
|
|
5718
|
+
}, []);
|
|
5719
|
+
return configStyles.STEPPER && /*#__PURE__*/React__default.createElement("div", {
|
|
5720
|
+
className: classProps
|
|
4808
5721
|
}, (() => {
|
|
4809
5722
|
let steppers = [];
|
|
4810
5723
|
for (let step = 1; step <= stepLength; step++) {
|
|
@@ -4842,7 +5755,8 @@ const Checkbox = ({
|
|
|
4842
5755
|
checkBoxMarginBottom,
|
|
4843
5756
|
direction = 'vertical'
|
|
4844
5757
|
}) => {
|
|
4845
|
-
const classProps =
|
|
5758
|
+
const [classProps, setClassProps] = useState({});
|
|
5759
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
4846
5760
|
const [innerData, setInnerData] = useState([]);
|
|
4847
5761
|
const [innerKeyNames, setInnerKeyNames] = useState({
|
|
4848
5762
|
id: 'id',
|
|
@@ -4883,7 +5797,19 @@ const Checkbox = ({
|
|
|
4883
5797
|
});
|
|
4884
5798
|
}
|
|
4885
5799
|
}, [keyNames]);
|
|
4886
|
-
|
|
5800
|
+
useEffect(() => {
|
|
5801
|
+
configStylesPromise.then(data => {
|
|
5802
|
+
setClassProps(() => classnames(className ?? data.CHECKBOX.className));
|
|
5803
|
+
setConfigStyles(() => {
|
|
5804
|
+
return {
|
|
5805
|
+
...data
|
|
5806
|
+
};
|
|
5807
|
+
});
|
|
5808
|
+
}, error => {
|
|
5809
|
+
console.error(error);
|
|
5810
|
+
});
|
|
5811
|
+
}, []);
|
|
5812
|
+
return configStyles.CHECKBOX && /*#__PURE__*/React__default.createElement("div", {
|
|
4887
5813
|
style: {
|
|
4888
5814
|
width: '100%',
|
|
4889
5815
|
display: 'flex',
|
|
@@ -4895,7 +5821,7 @@ const Checkbox = ({
|
|
|
4895
5821
|
key: `TUI_${index}_checkbox`,
|
|
4896
5822
|
style: {
|
|
4897
5823
|
width: 'fit-content',
|
|
4898
|
-
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ??
|
|
5824
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ?? configStyles.CHECKBOX.marginBottom : '0px'
|
|
4899
5825
|
}
|
|
4900
5826
|
}, /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
4901
5827
|
data: item,
|
|
@@ -4905,11 +5831,11 @@ const Checkbox = ({
|
|
|
4905
5831
|
checked: item[innerKeyNames.checked],
|
|
4906
5832
|
disabled: item[innerKeyNames.disabled],
|
|
4907
5833
|
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
4908
|
-
labelMarginLeft: labelMarginLeft ??
|
|
4909
|
-
checkedColor: checkedColor ??
|
|
4910
|
-
unCheckedColor: unCheckedColor ??
|
|
4911
|
-
checkedIcon: checkedIcon ??
|
|
4912
|
-
unCheckedIcon: unCheckedIcon ??
|
|
5834
|
+
labelMarginLeft: labelMarginLeft ?? configStyles.CHECKBOX.label.marginLeft,
|
|
5835
|
+
checkedColor: checkedColor ?? configStyles.CHECKBOX.colors.checked,
|
|
5836
|
+
unCheckedColor: unCheckedColor ?? configStyles.CHECKBOX.colors.unChecked,
|
|
5837
|
+
checkedIcon: checkedIcon ?? configStyles.CHECKBOX.checkedIcon,
|
|
5838
|
+
unCheckedIcon: unCheckedIcon ?? configStyles.CHECKBOX.unCheckedIcon
|
|
4913
5839
|
}));
|
|
4914
5840
|
}));
|
|
4915
5841
|
};
|
|
@@ -4976,11 +5902,12 @@ const Textarea = ({
|
|
|
4976
5902
|
showCharacterCount,
|
|
4977
5903
|
characterCountPosition = 'top'
|
|
4978
5904
|
}) => {
|
|
4979
|
-
const classProps = classnames(className ?? merge.TEXTAREA.className);
|
|
4980
5905
|
const [error, setError] = useState('');
|
|
4981
5906
|
const [isHover, setIsHover] = useState(false);
|
|
4982
5907
|
const [isFocus, setIsFocus] = useState(false);
|
|
4983
5908
|
const [innerValue, setInnerValue] = useState('');
|
|
5909
|
+
const [classProps, setClassProps] = useState({});
|
|
5910
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
4984
5911
|
const handleMouseEnter = () => {
|
|
4985
5912
|
setIsHover(true);
|
|
4986
5913
|
};
|
|
@@ -5002,8 +5929,8 @@ const Textarea = ({
|
|
|
5002
5929
|
onChange(value.substr(0, maxLength));
|
|
5003
5930
|
}
|
|
5004
5931
|
} else {
|
|
5005
|
-
if (value.length >
|
|
5006
|
-
onChange(value.substr(0,
|
|
5932
|
+
if (value.length > configStyles.TEXTAREA.maxLength) {
|
|
5933
|
+
onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
|
|
5007
5934
|
}
|
|
5008
5935
|
}
|
|
5009
5936
|
};
|
|
@@ -5023,9 +5950,21 @@ const Textarea = ({
|
|
|
5023
5950
|
}
|
|
5024
5951
|
setInnerValue(() => value);
|
|
5025
5952
|
}, [value, errorMessage]);
|
|
5026
|
-
|
|
5953
|
+
useEffect(() => {
|
|
5954
|
+
configStylesPromise.then(data => {
|
|
5955
|
+
setClassProps(() => classnames(className ?? data.TEXTAREA.className));
|
|
5956
|
+
setConfigStyles(() => {
|
|
5957
|
+
return {
|
|
5958
|
+
...data
|
|
5959
|
+
};
|
|
5960
|
+
});
|
|
5961
|
+
}, error => {
|
|
5962
|
+
console.error(error);
|
|
5963
|
+
});
|
|
5964
|
+
}, []);
|
|
5965
|
+
return configStyles.TEXTAREA && /*#__PURE__*/React__default.createElement("div", {
|
|
5027
5966
|
style: {
|
|
5028
|
-
width: width ??
|
|
5967
|
+
width: width ?? configStyles.TEXTAREA.width
|
|
5029
5968
|
},
|
|
5030
5969
|
className: classProps
|
|
5031
5970
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5033,15 +5972,15 @@ const Textarea = ({
|
|
|
5033
5972
|
display: 'flex',
|
|
5034
5973
|
alignItems: 'center',
|
|
5035
5974
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
5036
|
-
color: labelColor ??
|
|
5037
|
-
fontSize: labelSize ??
|
|
5038
|
-
fontFamily: labelFontFamily ??
|
|
5039
|
-
fontWeight: labelWeight ??
|
|
5040
|
-
marginBottom: labelMarginBottom ??
|
|
5975
|
+
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
5976
|
+
fontSize: labelSize ?? configStyles.TEXTAREA.label.font.size,
|
|
5977
|
+
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
5978
|
+
fontWeight: labelWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
5979
|
+
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
5041
5980
|
}
|
|
5042
5981
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5043
5982
|
style: {
|
|
5044
|
-
display: labelDisplay ??
|
|
5983
|
+
display: labelDisplay ?? configStyles.TEXTAREA.label.display
|
|
5045
5984
|
}
|
|
5046
5985
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", null, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
5047
5986
|
style: {
|
|
@@ -5050,21 +5989,21 @@ const Textarea = ({
|
|
|
5050
5989
|
outline: 'none',
|
|
5051
5990
|
overflow: 'auto',
|
|
5052
5991
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5053
|
-
fontSize: size ??
|
|
5054
|
-
fontStyle: style ??
|
|
5055
|
-
fontFamily: family ??
|
|
5056
|
-
fontWeight: weight ??
|
|
5057
|
-
height: height ??
|
|
5058
|
-
padding: padding ??
|
|
5059
|
-
borderRadius: radius ??
|
|
5060
|
-
minWidth: minWidth ??
|
|
5061
|
-
maxWidth: maxWidth ??
|
|
5062
|
-
minHeight: minHeight ??
|
|
5063
|
-
maxHeight: maxHeight ??
|
|
5064
|
-
boxSizing: boxSizing ??
|
|
5065
|
-
backgroundColor: backgroundColor ??
|
|
5066
|
-
boxShadow: error ? errorColor ? `0 0 0 2px ${errorColor}` :
|
|
5067
|
-
resize: resize ? resize :
|
|
5992
|
+
fontSize: size ?? configStyles.TEXTAREA.font.size,
|
|
5993
|
+
fontStyle: style ?? configStyles.TEXTAREA.font.style,
|
|
5994
|
+
fontFamily: family ?? configStyles.TEXTAREA.font.family,
|
|
5995
|
+
fontWeight: weight ?? configStyles.TEXTAREA.font.weight,
|
|
5996
|
+
height: height ?? configStyles.TEXTAREA.height,
|
|
5997
|
+
padding: padding ?? configStyles.TEXTAREA.padding,
|
|
5998
|
+
borderRadius: radius ?? configStyles.TEXTAREA.radius,
|
|
5999
|
+
minWidth: minWidth ?? configStyles.TEXTAREA.minWidth,
|
|
6000
|
+
maxWidth: maxWidth ?? configStyles.TEXTAREA.maxWidth,
|
|
6001
|
+
minHeight: minHeight ?? configStyles.TEXTAREA.minHeight,
|
|
6002
|
+
maxHeight: maxHeight ?? configStyles.TEXTAREA.maxHeight,
|
|
6003
|
+
boxSizing: boxSizing ?? configStyles.TEXTAREA.box.sizing,
|
|
6004
|
+
backgroundColor: backgroundColor ?? configStyles.TEXTAREA.colors.background,
|
|
6005
|
+
boxShadow: error ? errorColor ? `0 0 0 2px ${errorColor}` : configStyles.TEXTAREA.error.box.shadow : isFocus ? borderFocusColor ? `0 0 0 2px ${borderFocusColor}` : configStyles.TEXTAREA.box.colors.focus : isHover ? borderHoverColor ? `0 0 0 2px ${borderHoverColor}` : configStyles.TEXTAREA.box.colors.hover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow,
|
|
6006
|
+
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
5068
6007
|
},
|
|
5069
6008
|
value: innerValue,
|
|
5070
6009
|
disabled: disabled,
|
|
@@ -5080,26 +6019,26 @@ const Textarea = ({
|
|
|
5080
6019
|
}
|
|
5081
6020
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5082
6021
|
style: {
|
|
5083
|
-
color: labelColor ??
|
|
5084
|
-
fontSize: labelSize ??
|
|
5085
|
-
fontWeight: labelWeight ??
|
|
5086
|
-
fontFamily: labelFontFamily ??
|
|
6022
|
+
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
6023
|
+
fontSize: labelSize ?? configStyles.TEXTAREA.label.font.size,
|
|
6024
|
+
fontWeight: labelWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
6025
|
+
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family
|
|
5087
6026
|
}
|
|
5088
6027
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
5089
6028
|
style: {
|
|
5090
6029
|
clear: 'both',
|
|
5091
6030
|
wordBreak: 'break-all',
|
|
5092
|
-
maxWidth: width ??
|
|
6031
|
+
maxWidth: width ?? configStyles.TEXTAREA.width
|
|
5093
6032
|
}
|
|
5094
6033
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5095
6034
|
style: {
|
|
5096
6035
|
display: 'inline-block',
|
|
5097
|
-
color: errorColor ??
|
|
5098
|
-
fontSize: errorSize ??
|
|
5099
|
-
fontStyle: errorStyle ??
|
|
5100
|
-
fontWeight: errorWeight ??
|
|
5101
|
-
fontFamily: errorFamily ??
|
|
5102
|
-
marginTop: marginTop ??
|
|
6036
|
+
color: errorColor ?? configStyles.TEXTAREA.error.color,
|
|
6037
|
+
fontSize: errorSize ?? configStyles.TEXTAREA.error.font.size,
|
|
6038
|
+
fontStyle: errorStyle ?? configStyles.TEXTAREA.error.font.style,
|
|
6039
|
+
fontWeight: errorWeight ?? configStyles.TEXTAREA.error.font.weight,
|
|
6040
|
+
fontFamily: errorFamily ?? configStyles.TEXTAREA.error.font.family,
|
|
6041
|
+
marginTop: marginTop ?? configStyles.TEXTAREA.error.marginTop
|
|
5103
6042
|
}
|
|
5104
6043
|
}, error)) : '');
|
|
5105
6044
|
};
|
|
@@ -5179,8 +6118,9 @@ const Typography = ({
|
|
|
5179
6118
|
variant = 'p',
|
|
5180
6119
|
...props
|
|
5181
6120
|
}) => {
|
|
5182
|
-
const classProps = classnames(className ?? merge.TYPOGRAPHY.className);
|
|
5183
6121
|
const [isHover, setIsHover] = useState(false);
|
|
6122
|
+
const [classProps, setClassProps] = useState({});
|
|
6123
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
5184
6124
|
const [validVariant, setValidVariant] = useState(false);
|
|
5185
6125
|
const handleMouseEnter = () => {
|
|
5186
6126
|
setIsHover(true);
|
|
@@ -5188,22 +6128,22 @@ const Typography = ({
|
|
|
5188
6128
|
const handleMouseLeave = () => {
|
|
5189
6129
|
setIsHover(false);
|
|
5190
6130
|
};
|
|
5191
|
-
const tagT = /*#__PURE__*/React__default.createElement(variant, {
|
|
6131
|
+
const tagT = configStyles.TYPOGRAPHY && /*#__PURE__*/React__default.createElement(variant, {
|
|
5192
6132
|
style: {
|
|
5193
|
-
border: border ??
|
|
5194
|
-
cursor: cursor ??
|
|
5195
|
-
borderRadius: radius ??
|
|
5196
|
-
fontSize: size ??
|
|
5197
|
-
fontWeight: weight ??
|
|
5198
|
-
textShadow: textShadow ??
|
|
5199
|
-
textAlign: textAlign ??
|
|
5200
|
-
fontStyle: fontStyle ??
|
|
5201
|
-
lineHeight: lineHeight ??
|
|
5202
|
-
fontFamily: fontFamily ??
|
|
5203
|
-
textTransform: textTransform ??
|
|
5204
|
-
textDecoration: textDecoration ??
|
|
5205
|
-
backgroundColor: backgroundColor ??
|
|
5206
|
-
color: isHover ? colorHover ? colorHover : color ? color :
|
|
6133
|
+
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
6134
|
+
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
6135
|
+
borderRadius: radius ?? configStyles.TYPOGRAPHY.radius,
|
|
6136
|
+
fontSize: size ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
6137
|
+
fontWeight: weight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
6138
|
+
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
6139
|
+
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
6140
|
+
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
6141
|
+
lineHeight: lineHeight ?? configStyles.TYPOGRAPHY.text['lineHeight' + variant],
|
|
6142
|
+
fontFamily: fontFamily ?? configStyles.TYPOGRAPHY.font['family' + variant],
|
|
6143
|
+
textTransform: textTransform ?? configStyles.TYPOGRAPHY.text['transform' + variant],
|
|
6144
|
+
textDecoration: textDecoration ?? configStyles.TYPOGRAPHY.text['decoration' + variant],
|
|
6145
|
+
backgroundColor: backgroundColor ?? configStyles.TYPOGRAPHY.colors['background' + variant],
|
|
6146
|
+
color: isHover ? colorHover ? colorHover : color ? color : configStyles.TYPOGRAPHY.colors[variant] : color ? color : configStyles.TYPOGRAPHY.colors[variant]
|
|
5207
6147
|
},
|
|
5208
6148
|
...props,
|
|
5209
6149
|
className: classProps,
|
|
@@ -5216,6 +6156,18 @@ const Typography = ({
|
|
|
5216
6156
|
setValidVariant(true);
|
|
5217
6157
|
}
|
|
5218
6158
|
}, [variant]);
|
|
6159
|
+
useEffect(() => {
|
|
6160
|
+
configStylesPromise.then(data => {
|
|
6161
|
+
setClassProps(() => classnames(className ?? data.TYPOGRAPHY.className));
|
|
6162
|
+
setConfigStyles(() => {
|
|
6163
|
+
return {
|
|
6164
|
+
...data
|
|
6165
|
+
};
|
|
6166
|
+
});
|
|
6167
|
+
}, error => {
|
|
6168
|
+
console.error(error);
|
|
6169
|
+
});
|
|
6170
|
+
}, []);
|
|
5219
6171
|
return validVariant ? 'Please set Typography valid variant' : tagT;
|
|
5220
6172
|
};
|
|
5221
6173
|
Typography.propTypes = {
|
|
@@ -5239,10 +6191,6 @@ Typography.propTypes = {
|
|
|
5239
6191
|
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
5240
6192
|
};
|
|
5241
6193
|
|
|
5242
|
-
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
|
|
5243
|
-
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
5244
|
-
styleInject(css_248z$1);
|
|
5245
|
-
|
|
5246
6194
|
const Dots = '...';
|
|
5247
6195
|
const range = (start, end) => {
|
|
5248
6196
|
const length = end - start + 1;
|
|
@@ -5284,6 +6232,10 @@ const PaginationRange = ({
|
|
|
5284
6232
|
return paginationRange;
|
|
5285
6233
|
};
|
|
5286
6234
|
|
|
6235
|
+
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
|
|
6236
|
+
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
6237
|
+
styleInject(css_248z$1);
|
|
6238
|
+
|
|
5287
6239
|
const SvgDots = ({
|
|
5288
6240
|
title,
|
|
5289
6241
|
titleId,
|
|
@@ -5332,6 +6284,8 @@ const Pagination = ({
|
|
|
5332
6284
|
}) => {
|
|
5333
6285
|
const [inpVal, setInpVal] = useState('');
|
|
5334
6286
|
const [error, setError] = useState(false);
|
|
6287
|
+
const [classProps, setClassProps] = useState({});
|
|
6288
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
5335
6289
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
5336
6290
|
const [currentTotalCount, setcurrentTotalCount] = useState(totalCount);
|
|
5337
6291
|
useEffect(() => {
|
|
@@ -5356,9 +6310,6 @@ const Pagination = ({
|
|
|
5356
6310
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
5357
6311
|
return null;
|
|
5358
6312
|
}
|
|
5359
|
-
const classProps = classnames(
|
|
5360
|
-
// TODO: check and remove pagination-bar-rem class
|
|
5361
|
-
styles$1.list, className ?? merge.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`);
|
|
5362
6313
|
const onNext = () => {
|
|
5363
6314
|
onPageChange(currentPageNumber + 1);
|
|
5364
6315
|
};
|
|
@@ -5406,7 +6357,21 @@ const Pagination = ({
|
|
|
5406
6357
|
}
|
|
5407
6358
|
};
|
|
5408
6359
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
5409
|
-
|
|
6360
|
+
useEffect(() => {
|
|
6361
|
+
configStylesPromise.then(data => {
|
|
6362
|
+
setClassProps(() => classnames(
|
|
6363
|
+
// TODO: check and remove pagination-bar-rem class
|
|
6364
|
+
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6365
|
+
setConfigStyles(() => {
|
|
6366
|
+
return {
|
|
6367
|
+
...data
|
|
6368
|
+
};
|
|
6369
|
+
});
|
|
6370
|
+
}, error => {
|
|
6371
|
+
console.error(error);
|
|
6372
|
+
});
|
|
6373
|
+
}, []);
|
|
6374
|
+
return configStyles.PAGINATION && /*#__PURE__*/React__default.createElement("div", {
|
|
5410
6375
|
style: {
|
|
5411
6376
|
display: 'flex',
|
|
5412
6377
|
margin: '0 auto',
|
|
@@ -5582,14 +6547,15 @@ const Autocomplete = ({
|
|
|
5582
6547
|
const [innerError, setInnerError] = useState('');
|
|
5583
6548
|
const [innerValue, setInnerValue] = useState('');
|
|
5584
6549
|
const [innerOptions, setInnerOptions] = useState([]);
|
|
5585
|
-
const classProps =
|
|
6550
|
+
const [classProps, setClassProps] = useState({});
|
|
6551
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
5586
6552
|
const showOption = keyframes`
|
|
5587
6553
|
100% {
|
|
5588
6554
|
max-height: 400px;
|
|
5589
6555
|
}
|
|
5590
6556
|
`;
|
|
5591
6557
|
const animation = () => css`
|
|
5592
|
-
${showOption} ${showOptionDuration ??
|
|
6558
|
+
${showOption} ${showOptionDuration ?? configStyles.AUTOCOMPLETE.showOptionDuration} linear forwards
|
|
5593
6559
|
`;
|
|
5594
6560
|
const handleMouseEnter = () => {
|
|
5595
6561
|
setIsHover(true);
|
|
@@ -5598,12 +6564,12 @@ const Autocomplete = ({
|
|
|
5598
6564
|
setIsHover(false);
|
|
5599
6565
|
};
|
|
5600
6566
|
const handleRowMouseEnter = e => {
|
|
5601
|
-
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor :
|
|
5602
|
-
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor :
|
|
6567
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.hover;
|
|
6568
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover;
|
|
5603
6569
|
};
|
|
5604
6570
|
const handleRowMouseLeave = e => {
|
|
5605
|
-
e.target.style.color = contentBottomRowColor ? contentBottomRowColor :
|
|
5606
|
-
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
6571
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : configStyles.AUTOCOMPLETE.contentBottom.row.color;
|
|
6572
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.background;
|
|
5607
6573
|
};
|
|
5608
6574
|
const handleFocus = () => {
|
|
5609
6575
|
setIsFocus(true);
|
|
@@ -5630,26 +6596,26 @@ const Autocomplete = ({
|
|
|
5630
6596
|
};
|
|
5631
6597
|
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 && innerValue.length >= searchCount ? /*#__PURE__*/React__default.createElement("div", {
|
|
5632
6598
|
style: {
|
|
5633
|
-
left: contentBottomLeft ??
|
|
5634
|
-
width: contentBottomWidth ??
|
|
5635
|
-
zIndex: contentBottomZindex ??
|
|
5636
|
-
borderRadius: contentBottomRadius ??
|
|
5637
|
-
maxWidth: contentBottomMaxWidth ??
|
|
5638
|
-
overflow: contentBottomOverflow ??
|
|
5639
|
-
position: contentBottomPosition ??
|
|
5640
|
-
minHeight: contentBottomMinHeight ??
|
|
5641
|
-
boxShadow: contentBottomBoxShadow ??
|
|
5642
|
-
backgroundColor: contentBottomBackgroundColor ??
|
|
5643
|
-
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' :
|
|
6599
|
+
left: contentBottomLeft ?? configStyles.AUTOCOMPLETE.contentBottom.left,
|
|
6600
|
+
width: contentBottomWidth ?? configStyles.AUTOCOMPLETE.contentBottom.width,
|
|
6601
|
+
zIndex: contentBottomZindex ?? configStyles.AUTOCOMPLETE.contentBottom.zIndex,
|
|
6602
|
+
borderRadius: contentBottomRadius ?? configStyles.AUTOCOMPLETE.contentBottom.radius,
|
|
6603
|
+
maxWidth: contentBottomMaxWidth ?? configStyles.AUTOCOMPLETE.contentBottom.maxWidth,
|
|
6604
|
+
overflow: contentBottomOverflow ?? configStyles.AUTOCOMPLETE.contentBottom.overflow,
|
|
6605
|
+
position: contentBottomPosition ?? configStyles.AUTOCOMPLETE.contentBottom.position,
|
|
6606
|
+
minHeight: contentBottomMinHeight ?? configStyles.AUTOCOMPLETE.contentBottom.minHeight,
|
|
6607
|
+
boxShadow: contentBottomBoxShadow ?? configStyles.AUTOCOMPLETE.contentBottom.box.shadow,
|
|
6608
|
+
backgroundColor: contentBottomBackgroundColor ?? configStyles.AUTOCOMPLETE.contentBottom.colors.background,
|
|
6609
|
+
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' : configStyles.AUTOCOMPLETE.height.includes('rem') ? parseFloat(configStyles.AUTOCOMPLETE.height.substr(0, configStyles.AUTOCOMPLETE.height.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.AUTOCOMPLETE.height.substr(0, configStyles.AUTOCOMPLETE.height.length - 2)) + 6 + 'px',
|
|
5644
6610
|
animation
|
|
5645
6611
|
}
|
|
5646
6612
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5647
6613
|
style: {
|
|
5648
|
-
display: contentBottomInnerDisplay ? contentBottomInnerDisplay :
|
|
5649
|
-
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY :
|
|
5650
|
-
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX :
|
|
5651
|
-
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight :
|
|
5652
|
-
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection :
|
|
6614
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : configStyles.AUTOCOMPLETE.contentBottom.inner.display,
|
|
6615
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : configStyles.AUTOCOMPLETE.contentBottom.inner.overflowY,
|
|
6616
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : configStyles.AUTOCOMPLETE.contentBottom.inner.overflowX,
|
|
6617
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : configStyles.AUTOCOMPLETE.contentBottom.inner.maxHeight,
|
|
6618
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : configStyles.AUTOCOMPLETE.contentBottom.inner.direction
|
|
5653
6619
|
}
|
|
5654
6620
|
}, innerOptions.map(item => {
|
|
5655
6621
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -5659,35 +6625,35 @@ const Autocomplete = ({
|
|
|
5659
6625
|
onClick: () => handleClick(item),
|
|
5660
6626
|
style: {
|
|
5661
6627
|
flexShrink: 0,
|
|
5662
|
-
color: contentBottomRowColor ? contentBottomRowColor :
|
|
5663
|
-
height: contentBottomRowHeight ? contentBottomRowHeight :
|
|
5664
|
-
cursor: contentBottomRowCursor ? contentBottomRowCursor :
|
|
5665
|
-
display: contentBottomRowDisplay ? contentBottomRowDisplay :
|
|
5666
|
-
padding: contentBottomRowPadding ? contentBottomRowPadding :
|
|
5667
|
-
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize :
|
|
5668
|
-
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing :
|
|
5669
|
-
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight :
|
|
5670
|
-
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight :
|
|
5671
|
-
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems :
|
|
5672
|
-
transition: contentBottomRowTransition ? contentBottomRowTransition :
|
|
5673
|
-
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom :
|
|
5674
|
-
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
6628
|
+
color: contentBottomRowColor ? contentBottomRowColor : configStyles.AUTOCOMPLETE.contentBottom.row.color,
|
|
6629
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
6630
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : configStyles.AUTOCOMPLETE.contentBottom.row.cursor,
|
|
6631
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : configStyles.AUTOCOMPLETE.contentBottom.row.display,
|
|
6632
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.AUTOCOMPLETE.contentBottom.row.padding,
|
|
6633
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : configStyles.AUTOCOMPLETE.contentBottom.row.font.size,
|
|
6634
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : configStyles.AUTOCOMPLETE.contentBottom.box.sizing,
|
|
6635
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : configStyles.AUTOCOMPLETE.contentBottom.row.font.weight,
|
|
6636
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
6637
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : configStyles.AUTOCOMPLETE.contentBottom.row.alignItems,
|
|
6638
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : configStyles.AUTOCOMPLETE.contentBottom.row.transition,
|
|
6639
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : configStyles.AUTOCOMPLETE.contentBottom.row.marginBottom,
|
|
6640
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
5675
6641
|
}
|
|
5676
6642
|
}, item[keyNames.name]);
|
|
5677
6643
|
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
5678
6644
|
style: {
|
|
5679
6645
|
position: 'absolute',
|
|
5680
6646
|
zIndex: '1',
|
|
5681
|
-
color: errorColor ??
|
|
5682
|
-
fontSize: errorSize ??
|
|
5683
|
-
fontStyle: errorStyle ??
|
|
5684
|
-
fontWeight: errorWeight ??
|
|
5685
|
-
fontFamily: errorFamily ??
|
|
5686
|
-
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${
|
|
5687
|
-
padding: innerErrorPadding ??
|
|
5688
|
-
height: contentBottomRowHeight ??
|
|
5689
|
-
lineHeight: contentBottomRowLineHeight ??
|
|
5690
|
-
backgroundColor: innerErrorBackgroundColor ??
|
|
6647
|
+
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
6648
|
+
fontSize: errorSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
6649
|
+
fontStyle: errorStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
6650
|
+
fontWeight: errorWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
6651
|
+
fontFamily: errorFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
6652
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
6653
|
+
padding: innerErrorPadding ?? configStyles.AUTOCOMPLETE.innerError.padding,
|
|
6654
|
+
height: contentBottomRowHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
6655
|
+
lineHeight: contentBottomRowLineHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
6656
|
+
backgroundColor: innerErrorBackgroundColor ?? configStyles.AUTOCOMPLETE.innerError.colors.background
|
|
5691
6657
|
}
|
|
5692
6658
|
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
5693
6659
|
useEffect(() => {
|
|
@@ -5721,30 +6687,42 @@ const Autocomplete = ({
|
|
|
5721
6687
|
useEffect(() => {
|
|
5722
6688
|
setInnerError(errorMessage);
|
|
5723
6689
|
}, [errorMessage]);
|
|
5724
|
-
|
|
6690
|
+
useEffect(() => {
|
|
6691
|
+
configStylesPromise.then(data => {
|
|
6692
|
+
setClassProps(() => classnames(className ?? data.AUTOCOMPLETE.className, styles['auto-complete']));
|
|
6693
|
+
setConfigStyles(() => {
|
|
6694
|
+
return {
|
|
6695
|
+
...data
|
|
6696
|
+
};
|
|
6697
|
+
});
|
|
6698
|
+
}).catch(error => {
|
|
6699
|
+
console.error(error);
|
|
6700
|
+
});
|
|
6701
|
+
}, []);
|
|
6702
|
+
return configStyles.AUTOCOMPLETE && /*#__PURE__*/React__default.createElement("div", {
|
|
5725
6703
|
className: classProps,
|
|
5726
6704
|
style: {
|
|
5727
|
-
width: contentTopMaxWidth ??
|
|
6705
|
+
width: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
5728
6706
|
}
|
|
5729
6707
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5730
6708
|
style: {
|
|
5731
|
-
color: labelColor ??
|
|
5732
|
-
display: labelDisplay ??
|
|
5733
|
-
maxWidth: contentTopMaxWidth ??
|
|
5734
|
-
fontSize: labelSize ??
|
|
5735
|
-
fontStyle: labelStyle ??
|
|
5736
|
-
fontWeight: labelWeight ??
|
|
5737
|
-
fontFamily: labelFontFamily ??
|
|
5738
|
-
lineHeight: labelLineHeight ??
|
|
5739
|
-
marginBottom: labelMarginBottom ??
|
|
5740
|
-
textTransform: labelTextTransform ??
|
|
6709
|
+
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
6710
|
+
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
6711
|
+
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth,
|
|
6712
|
+
fontSize: labelSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
6713
|
+
fontStyle: labelStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
6714
|
+
fontWeight: labelWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
6715
|
+
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
6716
|
+
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
6717
|
+
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
6718
|
+
textTransform: labelTextTransform ?? configStyles.AUTOCOMPLETE.label.textTransform
|
|
5741
6719
|
}
|
|
5742
6720
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
5743
6721
|
style: {
|
|
5744
|
-
display: contentDisplay ??
|
|
5745
|
-
position: contentPosition ??
|
|
6722
|
+
display: contentDisplay ?? configStyles.AUTOCOMPLETE.parent.display,
|
|
6723
|
+
position: contentPosition ?? configStyles.AUTOCOMPLETE.parent.position,
|
|
5746
6724
|
width: '100%',
|
|
5747
|
-
flexDirection: contentDirection ??
|
|
6725
|
+
flexDirection: contentDirection ?? configStyles.AUTOCOMPLETE.parent.direction
|
|
5748
6726
|
}
|
|
5749
6727
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
5750
6728
|
id: id,
|
|
@@ -5757,39 +6735,39 @@ const Autocomplete = ({
|
|
|
5757
6735
|
onMouseEnter: handleMouseEnter,
|
|
5758
6736
|
onMouseLeave: handleMouseLeave,
|
|
5759
6737
|
placeholder: placeHolder ?? '',
|
|
5760
|
-
autoComplete: autoComplete ??
|
|
6738
|
+
autoComplete: autoComplete ?? configStyles.AUTOCOMPLETE.autoComplete,
|
|
5761
6739
|
style: {
|
|
5762
6740
|
border: 'none',
|
|
5763
6741
|
outline: 'none',
|
|
5764
6742
|
maxWidth: '100%',
|
|
5765
6743
|
transition: 'all 240ms',
|
|
5766
6744
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5767
|
-
color: contentTopColor ??
|
|
5768
|
-
fontSize: contentTopSize ??
|
|
5769
|
-
fontStyle: contentTopStyle ??
|
|
5770
|
-
fontFamily: contentTopFamily ??
|
|
5771
|
-
fontWeight: contentTopWeight ??
|
|
5772
|
-
backgroundColor: disabled && (backgroundDisableColor ??
|
|
5773
|
-
height: contentTopHeight ??
|
|
5774
|
-
padding: contentTopPadding ??
|
|
5775
|
-
display: contentTopDisplay ??
|
|
5776
|
-
borderRadius: contentTopRadius ??
|
|
5777
|
-
boxSizing: contentTopBoxSizing ??
|
|
5778
|
-
lineHeight: contentTopLineHeight ??
|
|
5779
|
-
flexDirection: contentTopDirection ??
|
|
5780
|
-
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` :
|
|
6745
|
+
color: contentTopColor ?? configStyles.AUTOCOMPLETE.color,
|
|
6746
|
+
fontSize: contentTopSize ?? configStyles.AUTOCOMPLETE.font.size,
|
|
6747
|
+
fontStyle: contentTopStyle ?? configStyles.AUTOCOMPLETE.font.style,
|
|
6748
|
+
fontFamily: contentTopFamily ?? configStyles.AUTOCOMPLETE.font.family,
|
|
6749
|
+
fontWeight: contentTopWeight ?? configStyles.AUTOCOMPLETE.font.weight,
|
|
6750
|
+
backgroundColor: disabled && (backgroundDisableColor ?? configStyles.AUTOCOMPLETE.colors.backgroundDisable),
|
|
6751
|
+
height: contentTopHeight ?? configStyles.AUTOCOMPLETE.height,
|
|
6752
|
+
padding: contentTopPadding ?? configStyles.AUTOCOMPLETE.padding,
|
|
6753
|
+
display: contentTopDisplay ?? configStyles.AUTOCOMPLETE.display,
|
|
6754
|
+
borderRadius: contentTopRadius ?? configStyles.AUTOCOMPLETE.radius,
|
|
6755
|
+
boxSizing: contentTopBoxSizing ?? configStyles.AUTOCOMPLETE.box.sizing,
|
|
6756
|
+
lineHeight: contentTopLineHeight ?? configStyles.AUTOCOMPLETE.lineHeight,
|
|
6757
|
+
flexDirection: contentTopDirection ?? configStyles.AUTOCOMPLETE.direction,
|
|
6758
|
+
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : configStyles.AUTOCOMPLETE.error.box.shadow : isFocus ? contentTopBorderActive ? contentTopBorderActive : configStyles.AUTOCOMPLETE.box.shadowActive : isHover ? contentTopBorderHover ? contentTopBorderHover : configStyles.AUTOCOMPLETE.box.shadowHover : contentTopBorder ? contentTopBorder : configStyles.AUTOCOMPLETE.box.shadow
|
|
5781
6759
|
}
|
|
5782
6760
|
}, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
|
|
5783
6761
|
style: {
|
|
5784
6762
|
left: '0px',
|
|
5785
6763
|
position: 'absolute',
|
|
5786
|
-
color: errorColor ??
|
|
5787
|
-
fontSize: errorSize ??
|
|
5788
|
-
fontStyle: errorStyle ??
|
|
5789
|
-
fontWeight: errorWeight ??
|
|
5790
|
-
fontFamily: errorFamily ??
|
|
5791
|
-
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${
|
|
5792
|
-
maxWidth: contentTopMaxWidth ??
|
|
6764
|
+
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
6765
|
+
fontSize: errorSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
6766
|
+
fontStyle: errorStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
6767
|
+
fontWeight: errorWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
6768
|
+
fontFamily: errorFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
6769
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
6770
|
+
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
5793
6771
|
}
|
|
5794
6772
|
}, innerError) : '', optionList));
|
|
5795
6773
|
};
|