@xaypay/tui 0.0.123 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -75
- package/dist/index.es.js +808 -555
- package/dist/index.js +808 -555
- package/package.json +1 -1
- package/tui.config.js +770 -452
package/dist/index.js
CHANGED
|
@@ -266,13 +266,26 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
266
266
|
check,
|
|
267
267
|
radius,
|
|
268
268
|
status,
|
|
269
|
+
iconPdf,
|
|
270
|
+
iconPng,
|
|
271
|
+
iconJpg,
|
|
272
|
+
iconJpeg,
|
|
273
|
+
iconHeic,
|
|
274
|
+
iconWrong,
|
|
275
|
+
iconDelItem,
|
|
269
276
|
removeFile,
|
|
270
277
|
fileFormat,
|
|
271
278
|
progressColor,
|
|
272
279
|
listItemHeight,
|
|
273
280
|
listItemPadding,
|
|
274
281
|
progressFontSize,
|
|
282
|
+
progressFontStyle,
|
|
283
|
+
progressFontWeight,
|
|
284
|
+
progressFontFamily,
|
|
275
285
|
listItemErrorSize,
|
|
286
|
+
listItemErrorStyle,
|
|
287
|
+
listItemErrorWeight,
|
|
288
|
+
listItemErrorFamily,
|
|
276
289
|
timeForRemoveError,
|
|
277
290
|
listItemErrorColor,
|
|
278
291
|
progressTrackColor,
|
|
@@ -349,7 +362,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
349
362
|
style: {
|
|
350
363
|
width: '32px'
|
|
351
364
|
}
|
|
352
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgWrong, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
365
|
+
}, iconWrong ? iconWrong : /*#__PURE__*/React__default["default"].createElement(SvgWrong, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
353
366
|
style: {
|
|
354
367
|
position: 'relative',
|
|
355
368
|
display: 'flex',
|
|
@@ -367,7 +380,10 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
367
380
|
color: progressColor,
|
|
368
381
|
boxSizing: 'border-box',
|
|
369
382
|
flexDirection: 'column',
|
|
370
|
-
fontSize: listItemErrorSize
|
|
383
|
+
fontSize: listItemErrorSize,
|
|
384
|
+
fontStyle: listItemErrorStyle,
|
|
385
|
+
fontWeight: listItemErrorWeight,
|
|
386
|
+
fontFamily: listItemErrorFamily
|
|
371
387
|
}
|
|
372
388
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
373
389
|
style: {
|
|
@@ -392,7 +408,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
392
408
|
style: {
|
|
393
409
|
width: '32px'
|
|
394
410
|
}
|
|
395
|
-
}, fileFormat === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
411
|
+
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
396
412
|
style: {
|
|
397
413
|
position: 'relative',
|
|
398
414
|
display: 'flex',
|
|
@@ -411,6 +427,9 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
411
427
|
boxSizing: 'border-box',
|
|
412
428
|
alignItems: 'flex-start',
|
|
413
429
|
fontSize: progressFontSize,
|
|
430
|
+
fontStyle: progressFontStyle,
|
|
431
|
+
fontWeight: progressFontWeight,
|
|
432
|
+
fontFamily: progressFontFamily,
|
|
414
433
|
justifyContent: 'space-between'
|
|
415
434
|
}
|
|
416
435
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -444,30 +463,28 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
444
463
|
cursor: 'pointer'
|
|
445
464
|
},
|
|
446
465
|
onClick: () => handleRemoveItem(uuid)
|
|
447
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null))));
|
|
466
|
+
}, iconDelItem ? iconDelItem : /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null))));
|
|
448
467
|
});
|
|
449
468
|
|
|
450
469
|
const _ = require('lodash');
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
470
|
+
let projectConfig = {};
|
|
471
|
+
let packageConfig = {};
|
|
472
|
+
try {
|
|
473
|
+
packageConfig = require('../tui.config.js');
|
|
474
|
+
} catch (e) {
|
|
454
475
|
try {
|
|
455
|
-
packageConfig = require('
|
|
456
|
-
} catch (
|
|
457
|
-
|
|
458
|
-
packageConfig = require('../../tui.config.js');
|
|
459
|
-
} catch (err) {
|
|
460
|
-
packageConfig = {};
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
try {
|
|
464
|
-
projectConfig = require('../../../../tui.config.js');
|
|
465
|
-
} catch (error) {
|
|
466
|
-
projectConfig = {};
|
|
467
|
-
// console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
|
|
476
|
+
packageConfig = require('../../tui.config.js');
|
|
477
|
+
} catch (err) {
|
|
478
|
+
packageConfig = {};
|
|
468
479
|
}
|
|
469
|
-
|
|
470
|
-
|
|
480
|
+
}
|
|
481
|
+
try {
|
|
482
|
+
projectConfig = require('../../../../tui.config.js');
|
|
483
|
+
} catch (error) {
|
|
484
|
+
projectConfig = {};
|
|
485
|
+
// console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
|
|
486
|
+
}
|
|
487
|
+
const merge = _.merge(packageConfig.default, projectConfig.default);
|
|
471
488
|
const hasOwnerProperty = (object, property) => {
|
|
472
489
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
473
490
|
};
|
|
@@ -475,6 +492,7 @@ const hasOwnerProperty = (object, property) => {
|
|
|
475
492
|
const Button = ({
|
|
476
493
|
icon,
|
|
477
494
|
size,
|
|
495
|
+
style,
|
|
478
496
|
type,
|
|
479
497
|
font,
|
|
480
498
|
color,
|
|
@@ -505,8 +523,7 @@ const Button = ({
|
|
|
505
523
|
...props
|
|
506
524
|
}) => {
|
|
507
525
|
const [isHover, setIsHover] = React.useState(false);
|
|
508
|
-
const
|
|
509
|
-
const classProps = classnames__default["default"](className ? className : configStyles.BUTTON.className);
|
|
526
|
+
const classProps = classnames__default["default"](className ?? merge.BUTTON.className);
|
|
510
527
|
const handleMouseEnter = () => {
|
|
511
528
|
setIsHover(true);
|
|
512
529
|
};
|
|
@@ -524,37 +541,40 @@ const Button = ({
|
|
|
524
541
|
outline: 'none',
|
|
525
542
|
alignItems: 'center',
|
|
526
543
|
justifyContent: 'center',
|
|
527
|
-
fontSize: size
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
544
|
+
fontSize: size ?? merge.BUTTON.font.size,
|
|
545
|
+
fontStyle: style ?? merge.BUTTON.font.style,
|
|
546
|
+
fontFamily: font ?? merge.BUTTON.font.family,
|
|
547
|
+
height: height ?? merge.BUTTON.height,
|
|
548
|
+
fontWeight: weight ?? merge.BUTTON.font.weight,
|
|
549
|
+
padding: padding ?? merge.BUTTON.padding,
|
|
550
|
+
borderRadius: radius ?? merge.BUTTON.radius,
|
|
551
|
+
boxSizing: boxSizing ?? merge.BUTTON.box.sizing,
|
|
552
|
+
transition: transition ?? merge.BUTTON.transition,
|
|
553
|
+
border: outline ? 'none' : border ?? merge.BUTTON.border,
|
|
554
|
+
width: contentWidth ? 'auto' : width ?? merge.BUTTON.width,
|
|
555
|
+
cursor: disabled ? 'not-allowed' : cursor ?? merge.BUTTON.cursor,
|
|
556
|
+
textTransform: textTransform ?? merge.BUTTON.text.transform,
|
|
557
|
+
backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : merge.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : merge.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : merge.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : merge.BUTTON.colors.background,
|
|
558
|
+
boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : merge.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : merge.BUTTON.colors.background}` : 'none',
|
|
559
|
+
color: (outline || !outline) && disabled ? disabledColor ? disabledColor : merge.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : merge.BUTTON.color : backgroundColor ? backgroundColor : merge.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : merge.BUTTON.text.colors.hover : color ? color : merge.BUTTON.color
|
|
542
560
|
},
|
|
543
|
-
type: type
|
|
544
|
-
disabled: disabled
|
|
561
|
+
type: type ?? merge.BUTTON.type,
|
|
562
|
+
disabled: disabled ?? merge.BUTTON.disabled,
|
|
545
563
|
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
|
|
546
564
|
onMouseEnter: handleMouseEnter,
|
|
547
565
|
onMouseLeave: handleMouseLeave,
|
|
548
566
|
className: classProps
|
|
549
567
|
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
550
568
|
style: {
|
|
551
|
-
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight :
|
|
569
|
+
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : merge.BUTTON.icon.marginRight : '0px'
|
|
552
570
|
}
|
|
553
571
|
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
|
|
554
572
|
};
|
|
555
573
|
Button.propTypes = {
|
|
556
574
|
type: PropTypes__default["default"].string,
|
|
557
575
|
size: PropTypes__default["default"].string,
|
|
576
|
+
style: PropTypes__default["default"].string,
|
|
577
|
+
weight: PropTypes__default["default"].string,
|
|
558
578
|
font: PropTypes__default["default"].string,
|
|
559
579
|
icon: PropTypes__default["default"].element,
|
|
560
580
|
hoverIcon: PropTypes__default["default"].element,
|
|
@@ -563,7 +583,6 @@ Button.propTypes = {
|
|
|
563
583
|
outline: PropTypes__default["default"].bool,
|
|
564
584
|
onClick: PropTypes__default["default"].func,
|
|
565
585
|
label: PropTypes__default["default"].string,
|
|
566
|
-
weight: PropTypes__default["default"].string,
|
|
567
586
|
height: PropTypes__default["default"].string,
|
|
568
587
|
cursor: PropTypes__default["default"].string,
|
|
569
588
|
border: PropTypes__default["default"].string,
|
|
@@ -701,11 +720,15 @@ const File = ({
|
|
|
701
720
|
name,
|
|
702
721
|
color,
|
|
703
722
|
label,
|
|
723
|
+
style,
|
|
704
724
|
weight,
|
|
725
|
+
family,
|
|
705
726
|
height,
|
|
706
727
|
radius,
|
|
707
728
|
change,
|
|
708
|
-
|
|
729
|
+
borderWidth,
|
|
730
|
+
borderStyle,
|
|
731
|
+
borderColor,
|
|
709
732
|
upload,
|
|
710
733
|
preview,
|
|
711
734
|
maxSize,
|
|
@@ -715,14 +738,19 @@ const File = ({
|
|
|
715
738
|
required,
|
|
716
739
|
className,
|
|
717
740
|
errorSize,
|
|
741
|
+
errorStyle,
|
|
742
|
+
errorWeight,
|
|
743
|
+
errorFamily,
|
|
718
744
|
labelSize,
|
|
745
|
+
labelStyle,
|
|
746
|
+
labelWeight,
|
|
747
|
+
labelFamily,
|
|
719
748
|
removeFile,
|
|
720
749
|
labelColor,
|
|
721
750
|
errorColor,
|
|
722
751
|
filesArray,
|
|
723
752
|
componentId,
|
|
724
753
|
putFileHere,
|
|
725
|
-
borderColor,
|
|
726
754
|
uploadColor,
|
|
727
755
|
defaultData,
|
|
728
756
|
formatError,
|
|
@@ -731,12 +759,27 @@ const File = ({
|
|
|
731
759
|
maxSizeError,
|
|
732
760
|
progressColor,
|
|
733
761
|
noChoosenFile,
|
|
762
|
+
iconPdf,
|
|
763
|
+
iconPng,
|
|
764
|
+
iconJpg,
|
|
765
|
+
iconJpeg,
|
|
766
|
+
iconHeic,
|
|
767
|
+
iconWrong,
|
|
768
|
+
iconUpload,
|
|
769
|
+
iconRequired,
|
|
770
|
+
iconDeleteItem,
|
|
771
|
+
iconRemoveFile,
|
|
772
|
+
iconDeleteComponent,
|
|
734
773
|
uploadBtnFont,
|
|
735
774
|
uploadBtnSize,
|
|
775
|
+
uploadBtnStyle,
|
|
776
|
+
uploadBtnWeight,
|
|
736
777
|
uploadBtnLabel,
|
|
737
778
|
uploadBtnColor,
|
|
738
779
|
uploadBtnHeight,
|
|
780
|
+
uploadBtnHoverColor,
|
|
739
781
|
uploadBtnBackgroundColor,
|
|
782
|
+
uploadBtnBackgroundColorHover,
|
|
740
783
|
fileExtensions,
|
|
741
784
|
listItemHeight,
|
|
742
785
|
backgroundColor,
|
|
@@ -744,9 +787,15 @@ const File = ({
|
|
|
744
787
|
removeComponent,
|
|
745
788
|
listItemPadding,
|
|
746
789
|
progressFontSize,
|
|
790
|
+
progressFontStyle,
|
|
791
|
+
progressFontWeight,
|
|
792
|
+
progressFontFamily,
|
|
747
793
|
borderHoverColor,
|
|
748
794
|
maxCHoosenLength,
|
|
749
795
|
listItemErrorSize,
|
|
796
|
+
listItemErrorStyle,
|
|
797
|
+
listItemErrorWeight,
|
|
798
|
+
listItemErrorFamily,
|
|
750
799
|
progressTrackColor,
|
|
751
800
|
fileAreaImageWidth,
|
|
752
801
|
listItemErrorColor,
|
|
@@ -764,9 +813,8 @@ const File = ({
|
|
|
764
813
|
}) => {
|
|
765
814
|
const ref = React.useRef(null);
|
|
766
815
|
const inpRef = React.useRef(null);
|
|
767
|
-
const configStyles = compereConfigs();
|
|
768
816
|
const memoizedItems = React.useMemo(() => filesArray, [filesArray]);
|
|
769
|
-
const classProps = classnames__default["default"](className
|
|
817
|
+
const classProps = classnames__default["default"](className ?? merge.FILE.className);
|
|
770
818
|
const [error, setError] = React.useState('');
|
|
771
819
|
const [isHover, setIsHover] = React.useState(false);
|
|
772
820
|
const [singleFile, setSingleFile] = React.useState(null);
|
|
@@ -788,7 +836,7 @@ const File = ({
|
|
|
788
836
|
const handleUploadFiles = file => {
|
|
789
837
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
790
838
|
if (file.length > choosenFileCount || file.length + memoizedItems.length > choosenFileCount) {
|
|
791
|
-
setError(maxCHoosenLengthError
|
|
839
|
+
setError(maxCHoosenLengthError ?? `Դիմումին կարող եք կցել առավելագույնը ${choosenFileCount} ֆայլ`);
|
|
792
840
|
const clearFunc = () => {
|
|
793
841
|
clearTimeout(time);
|
|
794
842
|
};
|
|
@@ -812,14 +860,14 @@ const File = ({
|
|
|
812
860
|
change({
|
|
813
861
|
file: file[ix],
|
|
814
862
|
uuid: v4(),
|
|
815
|
-
check: formatError
|
|
863
|
+
check: formatError ?? merge.FILE.error.format
|
|
816
864
|
});
|
|
817
865
|
}
|
|
818
866
|
} else {
|
|
819
867
|
change({
|
|
820
868
|
file: file[ix],
|
|
821
869
|
uuid: v4(),
|
|
822
|
-
check: maxSizeError
|
|
870
|
+
check: maxSizeError ?? merge.FILE.error.maxSize
|
|
823
871
|
});
|
|
824
872
|
}
|
|
825
873
|
}
|
|
@@ -841,14 +889,14 @@ const File = ({
|
|
|
841
889
|
change({
|
|
842
890
|
file: file[ix],
|
|
843
891
|
uuid: v4(),
|
|
844
|
-
check: formatError
|
|
892
|
+
check: formatError ?? merge.FILE.error.format
|
|
845
893
|
});
|
|
846
894
|
}
|
|
847
895
|
} else {
|
|
848
896
|
change({
|
|
849
897
|
file: file[ix],
|
|
850
898
|
uuid: v4(),
|
|
851
|
-
check: maxSizeError
|
|
899
|
+
check: maxSizeError ?? merge.FILE.error.maxSize
|
|
852
900
|
});
|
|
853
901
|
}
|
|
854
902
|
}
|
|
@@ -862,7 +910,7 @@ const File = ({
|
|
|
862
910
|
setImage(null);
|
|
863
911
|
handleUploadFiles(file);
|
|
864
912
|
if (file.length === 0 && memoizedItems.length === 0) {
|
|
865
|
-
setError(noChoosenFile
|
|
913
|
+
setError(noChoosenFile ?? merge.FILE.error.noChoosen);
|
|
866
914
|
}
|
|
867
915
|
} else {
|
|
868
916
|
if (file[0]) {
|
|
@@ -880,16 +928,16 @@ const File = ({
|
|
|
880
928
|
}
|
|
881
929
|
} else {
|
|
882
930
|
setImage(null);
|
|
883
|
-
setError(formatError
|
|
931
|
+
setError(formatError ?? merge.FILE.error.format);
|
|
884
932
|
}
|
|
885
933
|
} else {
|
|
886
934
|
setImage(null);
|
|
887
|
-
setError(maxSizeError
|
|
935
|
+
setError(maxSizeError ?? merge.FILE.error.maxSize);
|
|
888
936
|
}
|
|
889
937
|
}
|
|
890
938
|
if (file.length === 0) {
|
|
891
939
|
setImage(null);
|
|
892
|
-
setError(noChoosenFile
|
|
940
|
+
setError(noChoosenFile ?? merge.FILE.error.noChoosen);
|
|
893
941
|
}
|
|
894
942
|
}
|
|
895
943
|
};
|
|
@@ -975,7 +1023,7 @@ const File = ({
|
|
|
975
1023
|
ref: ref,
|
|
976
1024
|
style: {
|
|
977
1025
|
width: '100%',
|
|
978
|
-
maxWidth: maxWidth
|
|
1026
|
+
maxWidth: maxWidth ?? merge.FILE.maxWidth
|
|
979
1027
|
},
|
|
980
1028
|
className: classProps
|
|
981
1029
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -987,15 +1035,18 @@ const File = ({
|
|
|
987
1035
|
}
|
|
988
1036
|
}, label && /*#__PURE__*/React__default["default"].createElement("label", {
|
|
989
1037
|
style: {
|
|
990
|
-
color: labelColor
|
|
991
|
-
fontSize: labelSize
|
|
1038
|
+
color: labelColor ?? merge.FILE.label.color,
|
|
1039
|
+
fontSize: labelSize ?? merge.FILE.label.font.size,
|
|
1040
|
+
fontStyle: labelStyle ?? merge.FILE.label.font.style,
|
|
1041
|
+
fontWeight: labelWeight ?? merge.FILE.label.font.weight,
|
|
1042
|
+
fontFamily: labelFamily ?? merge.FILE.label.font.family
|
|
992
1043
|
}
|
|
993
|
-
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1044
|
+
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : merge.FILE.icon.required ? merge.FILE.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
994
1045
|
style: {
|
|
995
1046
|
cursor: 'pointer'
|
|
996
1047
|
},
|
|
997
1048
|
onClick: handleRemoveComponent
|
|
998
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1049
|
+
}, iconDeleteComponent ? iconDeleteComponent : merge.FILE.icon.deleteComponent ? merge.FILE.icon.deleteComponent : /*#__PURE__*/React__default["default"].createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
999
1050
|
style: {
|
|
1000
1051
|
width: '100%',
|
|
1001
1052
|
display: 'flex',
|
|
@@ -1004,11 +1055,12 @@ const File = ({
|
|
|
1004
1055
|
boxSizing: 'border-box',
|
|
1005
1056
|
justifyContent: 'center',
|
|
1006
1057
|
cursor: !disabled ? 'pointer' : 'not-allowed',
|
|
1007
|
-
height: height
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1058
|
+
height: height ?? merge.FILE.height,
|
|
1059
|
+
borderWidth: borderWidth ?? merge.FILE.border.width,
|
|
1060
|
+
borderStyle: borderStyle ?? merge.FILE.border.style,
|
|
1061
|
+
borderRadius: radius ?? merge.FILE.radius,
|
|
1062
|
+
backgroundColor: backgroundColor ?? merge.FILE.colors.background,
|
|
1063
|
+
borderColor: error ? errorColor ? errorColor : merge.FILE.error.color : disabled ? borderColor ? borderColor : merge.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : merge.FILE.border.colors.hover : borderColor ? borderColor : merge.FILE.border.color
|
|
1012
1064
|
},
|
|
1013
1065
|
onDrop: handleDrop,
|
|
1014
1066
|
onClick: handleClick,
|
|
@@ -1032,38 +1084,40 @@ const File = ({
|
|
|
1032
1084
|
alignItems: 'center',
|
|
1033
1085
|
flexDirection: 'column',
|
|
1034
1086
|
justifyContent: 'center',
|
|
1035
|
-
color: color
|
|
1036
|
-
fontSize: size
|
|
1037
|
-
|
|
1087
|
+
color: color ?? merge.FILE.color,
|
|
1088
|
+
fontSize: size ?? merge.FILE.font.size,
|
|
1089
|
+
fontStyle: style ?? merge.FILE.font.style,
|
|
1090
|
+
fontFamily: family ?? merge.FILE.font.family,
|
|
1091
|
+
fontWeight: weight ?? merge.FILE.font.weight
|
|
1038
1092
|
}
|
|
1039
|
-
}, !multiple && image && preview ? image === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1093
|
+
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : merge.FILE.icon.pdf ? merge.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : merge.FILE.icon.heic ? merge.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1040
1094
|
src: image,
|
|
1041
1095
|
style: {
|
|
1042
1096
|
display: 'block',
|
|
1043
1097
|
maxWidth: '100%',
|
|
1044
1098
|
maxHeight: '95%',
|
|
1045
1099
|
objectFit: 'contain',
|
|
1046
|
-
width: fileAreaImageWidth
|
|
1047
|
-
height: fileAreaImageHeight
|
|
1100
|
+
width: fileAreaImageWidth ?? merge.FILE.fileAreaImageWidth,
|
|
1101
|
+
height: fileAreaImageHeight ?? merge.FILE.fileAreaImageHeight
|
|
1048
1102
|
},
|
|
1049
1103
|
alt: "file preview"
|
|
1050
|
-
}) : preview ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SvgUpload, null)), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1104
|
+
}) : preview ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", null, iconUpload ? iconUpload : merge.FILE.icon.upload ? merge.FILE.icon.upload : /*#__PURE__*/React__default["default"].createElement(SvgUpload, null)), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1051
1105
|
style: {
|
|
1052
1106
|
margin: '0px'
|
|
1053
1107
|
}
|
|
1054
|
-
}, putFileHere
|
|
1108
|
+
}, putFileHere ?? merge.FILE.putFileHere, /*#__PURE__*/React__default["default"].createElement("br", null), or ? or : merge.FILE.or, ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1055
1109
|
style: {
|
|
1056
|
-
color: uploadColor
|
|
1110
|
+
color: uploadColor ?? merge.FILE.uploadColor
|
|
1057
1111
|
}
|
|
1058
|
-
}, upload
|
|
1112
|
+
}, upload ?? merge.FILE.upload))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1059
1113
|
style: {
|
|
1060
|
-
marginTop: extentionsRowMarginTop
|
|
1114
|
+
marginTop: extentionsRowMarginTop ?? merge.FILE.extentionsRowMarginTop
|
|
1061
1115
|
}
|
|
1062
1116
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1063
1117
|
style: {
|
|
1064
1118
|
margin: '0px'
|
|
1065
1119
|
}
|
|
1066
|
-
}, fileSizeText
|
|
1120
|
+
}, fileSizeText ?? merge.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1067
1121
|
style: {
|
|
1068
1122
|
width: '100%',
|
|
1069
1123
|
padding: '5px',
|
|
@@ -1075,14 +1129,16 @@ const File = ({
|
|
|
1075
1129
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1076
1130
|
contentWidth: true,
|
|
1077
1131
|
onClick: _ => _,
|
|
1078
|
-
font: uploadBtnFont
|
|
1079
|
-
size: uploadBtnSize
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1132
|
+
font: uploadBtnFont ?? merge.FILE.uploadBtn.font.family,
|
|
1133
|
+
size: uploadBtnSize ?? merge.FILE.uploadBtn.font.size,
|
|
1134
|
+
style: uploadBtnStyle ?? merge.FILE.uploadBtn.font.style,
|
|
1135
|
+
weight: uploadBtnWeight ?? merge.FILE.uploadBtn.font.weight,
|
|
1136
|
+
label: uploadBtnLabel ?? merge.FILE.uploadBtn.label,
|
|
1137
|
+
color: uploadBtnColor ?? merge.FILE.uploadBtn.color,
|
|
1138
|
+
height: uploadBtnHeight ?? merge.FILE.uploadBtn.height,
|
|
1139
|
+
hoverColor: uploadBtnHoverColor ?? merge.FILE.uploadBtn.colors.hover,
|
|
1140
|
+
backgroundColor: uploadBtnBackgroundColor ?? merge.FILE.uploadBtn.colors.background,
|
|
1141
|
+
backgroundHoverColor: uploadBtnBackgroundColorHover ?? merge.FILE.uploadBtn.colors.backgroundHover
|
|
1086
1142
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1087
1143
|
style: {
|
|
1088
1144
|
margin: '0px',
|
|
@@ -1091,7 +1147,7 @@ const File = ({
|
|
|
1091
1147
|
whiteSpace: 'nowrap',
|
|
1092
1148
|
textOverflow: 'ellipsis'
|
|
1093
1149
|
}
|
|
1094
|
-
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default["default"].createElement("span", null, fileSizeText
|
|
1150
|
+
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default["default"].createElement("span", null, fileSizeText ?? merge.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1095
1151
|
style: {
|
|
1096
1152
|
position: 'absolute',
|
|
1097
1153
|
top: '0px',
|
|
@@ -1104,9 +1160,9 @@ const File = ({
|
|
|
1104
1160
|
boxSizing: 'border-box',
|
|
1105
1161
|
alignItems: 'flex-start',
|
|
1106
1162
|
justifyContent: 'flex-end',
|
|
1107
|
-
borderRadius: radius
|
|
1163
|
+
borderRadius: radius ?? merge.FILE.radius,
|
|
1108
1164
|
display: !multiple && !disabled && image && !error && isHover ? 'flex' : 'none',
|
|
1109
|
-
backgroundColor: hiddenBackgroundColor
|
|
1165
|
+
backgroundColor: hiddenBackgroundColor ?? merge.FILE.colors.backgroundHidden
|
|
1110
1166
|
},
|
|
1111
1167
|
onClick: handleStopPropagation
|
|
1112
1168
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -1114,12 +1170,15 @@ const File = ({
|
|
|
1114
1170
|
cursor: 'pointer'
|
|
1115
1171
|
},
|
|
1116
1172
|
onClick: handleRemoveFile
|
|
1117
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1173
|
+
}, iconRemoveFile ? iconRemoveFile : merge.FILE.icon.removeFile ? merge.FILE.icon.removeFile : /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1118
1174
|
style: {
|
|
1119
1175
|
marginTop: '6px',
|
|
1120
1176
|
display: 'inline-block',
|
|
1121
|
-
color: errorColor
|
|
1122
|
-
fontSize: errorSize
|
|
1177
|
+
color: errorColor ?? merge.FILE.error.color,
|
|
1178
|
+
fontSize: errorSize ?? merge.FILE.error.font.size,
|
|
1179
|
+
fontStyle: errorStyle ?? merge.FILE.error.font.style,
|
|
1180
|
+
fontWeight: errorWeight ?? merge.FILE.error.font.weight,
|
|
1181
|
+
fontFamily: errorFamily ?? merge.FILE.error.font.family
|
|
1123
1182
|
}
|
|
1124
1183
|
}, error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
1125
1184
|
return /*#__PURE__*/React__default["default"].createElement(FileItem, {
|
|
@@ -1129,22 +1188,35 @@ const File = ({
|
|
|
1129
1188
|
status: item.status,
|
|
1130
1189
|
size: item.file.size,
|
|
1131
1190
|
name: item.file.name,
|
|
1191
|
+
iconPdf: iconPdf ?? merge.FILE.icon.pdf,
|
|
1192
|
+
iconPng: iconPng ?? merge.FILE.icon.png,
|
|
1193
|
+
iconJpg: iconJpg ?? merge.FILE.icon.jpg,
|
|
1194
|
+
iconJpeg: iconJpeg ?? merge.FILE.icon.jpeg,
|
|
1195
|
+
iconHeic: iconHeic ?? merge.FILE.icon.heic,
|
|
1196
|
+
iconWrong: iconWrong ?? merge.FILE.icon.wrong,
|
|
1197
|
+
iconDelItem: iconDeleteItem ?? merge.FILE.icon.deleteItem,
|
|
1132
1198
|
timeForRemoveError: timeForRemoveError,
|
|
1133
1199
|
removeFile: removeFile ? removeFile : _ => _,
|
|
1134
|
-
radius: radius
|
|
1200
|
+
radius: radius ?? merge.FILE.radius,
|
|
1135
1201
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
1136
|
-
progressColor: progressColor
|
|
1137
|
-
listItemHeight: listItemHeight
|
|
1138
|
-
listItemPadding: listItemPadding
|
|
1139
|
-
progressFontSize: progressFontSize
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1202
|
+
progressColor: progressColor ?? merge.FILE.progress.color,
|
|
1203
|
+
listItemHeight: listItemHeight ?? merge.FILE.listItem.height,
|
|
1204
|
+
listItemPadding: listItemPadding ?? merge.FILE.listItem.padding,
|
|
1205
|
+
progressFontSize: progressFontSize ?? merge.FILE.progress.font.size,
|
|
1206
|
+
progressFontStyle: progressFontStyle ?? merge.FILE.progress.font.style,
|
|
1207
|
+
progressFontWeight: progressFontWeight ?? merge.FILE.progress.font.weight,
|
|
1208
|
+
progressFontFamily: progressFontFamily ?? merge.FILE.progress.font.family,
|
|
1209
|
+
listItemErrorSize: listItemErrorSize ?? merge.FILE.listItem.error.font.size,
|
|
1210
|
+
listItemErrorStyle: listItemErrorStyle ?? merge.FILE.listItem.error.style,
|
|
1211
|
+
listItemErrorWeight: listItemErrorWeight ?? merge.FILE.listItem.error.weight,
|
|
1212
|
+
listItemErrorFamily: listItemErrorFamily ?? merge.FILE.listItem.error.family,
|
|
1213
|
+
listItemErrorColor: listItemErrorColor ?? merge.FILE.listItem.error.color,
|
|
1214
|
+
progressTrackColor: progressTrackColor ?? merge.FILE.progress.colors.track,
|
|
1215
|
+
progressFailedColor: progressFailedColor ?? merge.FILE.progress.colors.failed,
|
|
1216
|
+
progressSuccessColor: progressSuccessColor ?? merge.FILE.progress.colors.success,
|
|
1217
|
+
progressLoadingColor: progressLoadingColor ?? merge.FILE.progress.colors.loading,
|
|
1218
|
+
listItemBackgroundColor: listItemBackgroundColor ?? merge.FILE.listItem.colors.background,
|
|
1219
|
+
listItemBackgroundErrorColor: listItemBackgroundErrorColor ?? merge.FILE.listItem.colors.backgroundError
|
|
1148
1220
|
});
|
|
1149
1221
|
}));
|
|
1150
1222
|
};
|
|
@@ -1157,21 +1229,30 @@ File.propTypes = {
|
|
|
1157
1229
|
height: PropTypes__default["default"].string,
|
|
1158
1230
|
disabled: PropTypes__default["default"].bool,
|
|
1159
1231
|
radius: PropTypes__default["default"].string,
|
|
1160
|
-
|
|
1232
|
+
borderWidth: PropTypes__default["default"].string,
|
|
1233
|
+
borderStyle: PropTypes__default["default"].string,
|
|
1234
|
+
borderColor: PropTypes__default["default"].string,
|
|
1161
1235
|
required: PropTypes__default["default"].bool,
|
|
1162
1236
|
upload: PropTypes__default["default"].string,
|
|
1163
1237
|
weight: PropTypes__default["default"].number,
|
|
1238
|
+
style: PropTypes__default["default"].string,
|
|
1239
|
+
family: PropTypes__default["default"].string,
|
|
1164
1240
|
maxSize: PropTypes__default["default"].number,
|
|
1165
1241
|
maxWidth: PropTypes__default["default"].string,
|
|
1166
1242
|
removeFile: PropTypes__default["default"].func,
|
|
1167
1243
|
className: PropTypes__default["default"].string,
|
|
1168
1244
|
errorSize: PropTypes__default["default"].string,
|
|
1245
|
+
errorStyle: PropTypes__default["default"].string,
|
|
1246
|
+
errorWeight: PropTypes__default["default"].string,
|
|
1247
|
+
errorFamily: PropTypes__default["default"].string,
|
|
1169
1248
|
labelSize: PropTypes__default["default"].string,
|
|
1249
|
+
labelStyle: PropTypes__default["default"].string,
|
|
1250
|
+
labelWeight: PropTypes__default["default"].string,
|
|
1251
|
+
labelFamily: PropTypes__default["default"].string,
|
|
1170
1252
|
labelColor: PropTypes__default["default"].string,
|
|
1171
1253
|
errorColor: PropTypes__default["default"].string,
|
|
1172
1254
|
formatError: PropTypes__default["default"].string,
|
|
1173
1255
|
putFileHere: PropTypes__default["default"].string,
|
|
1174
|
-
borderColor: PropTypes__default["default"].string,
|
|
1175
1256
|
uploadColor: PropTypes__default["default"].string,
|
|
1176
1257
|
defaultData: PropTypes__default["default"].object,
|
|
1177
1258
|
componentId: PropTypes__default["default"].number,
|
|
@@ -1182,20 +1263,40 @@ File.propTypes = {
|
|
|
1182
1263
|
progressColor: PropTypes__default["default"].string,
|
|
1183
1264
|
deleteComponent: PropTypes__default["default"].bool,
|
|
1184
1265
|
removeComponent: PropTypes__default["default"].func,
|
|
1266
|
+
iconPdf: PropTypes__default["default"].element,
|
|
1267
|
+
iconPng: PropTypes__default["default"].element,
|
|
1268
|
+
iconJpg: PropTypes__default["default"].element,
|
|
1269
|
+
iconJpeg: PropTypes__default["default"].element,
|
|
1270
|
+
iconHeic: PropTypes__default["default"].element,
|
|
1271
|
+
iconWrong: PropTypes__default["default"].element,
|
|
1272
|
+
iconUpload: PropTypes__default["default"].element,
|
|
1273
|
+
iconRequired: PropTypes__default["default"].element,
|
|
1274
|
+
iconDeleteItem: PropTypes__default["default"].element,
|
|
1275
|
+
iconRemoveFile: PropTypes__default["default"].element,
|
|
1276
|
+
iconDeleteComponent: PropTypes__default["default"].element,
|
|
1185
1277
|
uploadBtnFont: PropTypes__default["default"].string,
|
|
1186
1278
|
uploadBtnSize: PropTypes__default["default"].string,
|
|
1279
|
+
uploadBtnStyle: PropTypes__default["default"].string,
|
|
1280
|
+
uploadBtnWeight: PropTypes__default["default"].string,
|
|
1187
1281
|
uploadBtnLabel: PropTypes__default["default"].string,
|
|
1188
1282
|
uploadBtnColor: PropTypes__default["default"].string,
|
|
1189
1283
|
uploadBtnHeight: PropTypes__default["default"].string,
|
|
1190
1284
|
uploadBtnBackgroundColor: PropTypes__default["default"].string,
|
|
1285
|
+
uploadBtnBackgroundColorHover: PropTypes__default["default"].string,
|
|
1191
1286
|
listItemHeight: PropTypes__default["default"].string,
|
|
1192
1287
|
backgroundColor: PropTypes__default["default"].string,
|
|
1193
1288
|
change: PropTypes__default["default"].func.isRequired,
|
|
1194
1289
|
listItemPadding: PropTypes__default["default"].string,
|
|
1195
1290
|
maxCHoosenLength: PropTypes__default["default"].number,
|
|
1196
1291
|
progressFontSize: PropTypes__default["default"].string,
|
|
1292
|
+
progressFontStyle: PropTypes__default["default"].string,
|
|
1293
|
+
progressFontWeight: PropTypes__default["default"].string,
|
|
1294
|
+
progressFontFamily: PropTypes__default["default"].string,
|
|
1197
1295
|
borderHoverColor: PropTypes__default["default"].string,
|
|
1198
1296
|
listItemErrorSize: PropTypes__default["default"].string,
|
|
1297
|
+
listItemErrorStyle: PropTypes__default["default"].string,
|
|
1298
|
+
listItemErrorWeight: PropTypes__default["default"].string,
|
|
1299
|
+
listItemErrorFamily: PropTypes__default["default"].string,
|
|
1199
1300
|
timeForRemoveError: PropTypes__default["default"].number,
|
|
1200
1301
|
progressTrackColor: PropTypes__default["default"].string,
|
|
1201
1302
|
fileAreaImageWidth: PropTypes__default["default"].string,
|
|
@@ -1278,7 +1379,6 @@ const Checkbox$1 = ({
|
|
|
1278
1379
|
labelMarginLeft,
|
|
1279
1380
|
ignoreDisabledForChecked
|
|
1280
1381
|
}) => {
|
|
1281
|
-
const configStyles = compereConfigs();
|
|
1282
1382
|
const [innerChecked, setInnerChecked] = React.useState(false);
|
|
1283
1383
|
const [innerDisabled, setInnerDisabled] = React.useState(false);
|
|
1284
1384
|
const handleClick = e => {
|
|
@@ -1310,10 +1410,10 @@ const Checkbox$1 = ({
|
|
|
1310
1410
|
...styles
|
|
1311
1411
|
},
|
|
1312
1412
|
onClick: !innerDisabled && handleChecked ? handleClick : _ => _
|
|
1313
|
-
}, innerChecked && (ignoreDisabledForChecked
|
|
1314
|
-
fillColor: checkedColor
|
|
1413
|
+
}, innerChecked && (ignoreDisabledForChecked ?? !innerDisabled) ? checkedIcon ? checkedIcon : /*#__PURE__*/React__default["default"].createElement(SvgCheckboxChecked, {
|
|
1414
|
+
fillColor: checkedColor ?? merge.CHECKBOX.checkedColor
|
|
1315
1415
|
}) : unCheckedIcon ? unCheckedIcon : /*#__PURE__*/React__default["default"].createElement(SvgCheckboxUnchecked, {
|
|
1316
|
-
fillColor: unCheckedColor
|
|
1416
|
+
fillColor: unCheckedColor ?? merge.CHECKBOX.unCheckedColor
|
|
1317
1417
|
}), label && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1318
1418
|
style: {
|
|
1319
1419
|
marginLeft: labelMarginLeft
|
|
@@ -1337,7 +1437,6 @@ const SingleCheckbox = ({
|
|
|
1337
1437
|
labelMarginLeft,
|
|
1338
1438
|
ignoreDisabledForChecked
|
|
1339
1439
|
}) => {
|
|
1340
|
-
const configStyles = compereConfigs();
|
|
1341
1440
|
const [innerData, setInnerData] = React.useState(null);
|
|
1342
1441
|
React.useEffect(() => {
|
|
1343
1442
|
setInnerData(data);
|
|
@@ -1356,7 +1455,7 @@ const SingleCheckbox = ({
|
|
|
1356
1455
|
handleChecked: handleChecked,
|
|
1357
1456
|
unCheckedColor: unCheckedColor,
|
|
1358
1457
|
ignoreDisabledForChecked: ignoreDisabledForChecked,
|
|
1359
|
-
labelMarginLeft: labelMarginLeft
|
|
1458
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.labelMarginLeft
|
|
1360
1459
|
});
|
|
1361
1460
|
};
|
|
1362
1461
|
SingleCheckbox.propTypes = {
|
|
@@ -1413,6 +1512,7 @@ const TH = ({
|
|
|
1413
1512
|
tHeadFamily,
|
|
1414
1513
|
tHeadPadding,
|
|
1415
1514
|
tHeadFontSize,
|
|
1515
|
+
tHeadFontStyle,
|
|
1416
1516
|
tHeadTextAlign,
|
|
1417
1517
|
tHeadFontWeight,
|
|
1418
1518
|
tableColumnMinWidth,
|
|
@@ -1436,6 +1536,7 @@ const TH = ({
|
|
|
1436
1536
|
padding: tHeadPadding,
|
|
1437
1537
|
fontSize: tHeadFontSize,
|
|
1438
1538
|
fontFamily: tHeadFamily,
|
|
1539
|
+
fontStyle: tHeadFontStyle,
|
|
1439
1540
|
fontWeight: tHeadFontWeight,
|
|
1440
1541
|
minWidth: tableColumnMinWidth,
|
|
1441
1542
|
maxWidth: tableColumnMaxWidth,
|
|
@@ -1476,6 +1577,7 @@ const TD = ({
|
|
|
1476
1577
|
innerIndex,
|
|
1477
1578
|
tBodyColor,
|
|
1478
1579
|
borderRight,
|
|
1580
|
+
borderRightColor,
|
|
1479
1581
|
tBodyPadding,
|
|
1480
1582
|
tBodyFontSize,
|
|
1481
1583
|
openListColor,
|
|
@@ -1484,6 +1586,8 @@ const TD = ({
|
|
|
1484
1586
|
tBodyFontWeight,
|
|
1485
1587
|
handleCheckDots,
|
|
1486
1588
|
openListFontSize,
|
|
1589
|
+
openListFontStyle,
|
|
1590
|
+
openListFontWeight,
|
|
1487
1591
|
handleCheckedBody,
|
|
1488
1592
|
openListFontFamily,
|
|
1489
1593
|
tableColumnMinWidth,
|
|
@@ -1546,7 +1650,7 @@ const TD = ({
|
|
|
1546
1650
|
minWidth: tableColumnMinWidth,
|
|
1547
1651
|
maxWidth: tableColumnMaxWidth,
|
|
1548
1652
|
whiteSpace: Array.isArray(item) ? 'nowrap' : 'wrap',
|
|
1549
|
-
borderColor: hideBorder ? 'transparent' :
|
|
1653
|
+
borderColor: hideBorder ? 'transparent' : borderRightColor,
|
|
1550
1654
|
boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
1551
1655
|
borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
1552
1656
|
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
@@ -1630,7 +1734,8 @@ const TD = ({
|
|
|
1630
1734
|
style: {
|
|
1631
1735
|
textAlign: tBodyTextAlign,
|
|
1632
1736
|
margin: '0px',
|
|
1633
|
-
cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto'
|
|
1737
|
+
cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto',
|
|
1738
|
+
...item.props
|
|
1634
1739
|
},
|
|
1635
1740
|
onClick: hasOwnerProperty(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : hasOwnerProperty(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
|
|
1636
1741
|
}, item.content === 0 ? item.content.toString() : item.content ? item.content : hasOwnerProperty(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : hasOwnerProperty(item, 'dots') ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -1696,6 +1801,8 @@ const TD = ({
|
|
|
1696
1801
|
color: openListColor,
|
|
1697
1802
|
textAlign: tBodyTextAlign,
|
|
1698
1803
|
fontSize: openListFontSize,
|
|
1804
|
+
fontStyle: openListFontStyle,
|
|
1805
|
+
fontWeight: openListFontWeight,
|
|
1699
1806
|
fontFamily: openListFontFamily
|
|
1700
1807
|
},
|
|
1701
1808
|
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
@@ -1780,6 +1887,7 @@ const Table = ({
|
|
|
1780
1887
|
tHeadFamily,
|
|
1781
1888
|
tHeadPadding,
|
|
1782
1889
|
tHeadFontSize,
|
|
1890
|
+
tHeadFontStyle,
|
|
1783
1891
|
tHeadTextAlign,
|
|
1784
1892
|
tHeadFontWeight,
|
|
1785
1893
|
tHeadBorderRadius,
|
|
@@ -1796,10 +1904,11 @@ const Table = ({
|
|
|
1796
1904
|
className,
|
|
1797
1905
|
openListColor,
|
|
1798
1906
|
openListFontSize,
|
|
1907
|
+
openListFontStyle,
|
|
1908
|
+
openListFontWeight,
|
|
1799
1909
|
openListFontFamily,
|
|
1800
1910
|
hideBorder
|
|
1801
1911
|
}) => {
|
|
1802
|
-
const configStyles = compereConfigs();
|
|
1803
1912
|
const [body, setBody] = React.useState([]);
|
|
1804
1913
|
const [header, setHeader] = React.useState([]);
|
|
1805
1914
|
const [disableArr, setDisableArr] = React.useState([]);
|
|
@@ -2272,15 +2381,15 @@ const Table = ({
|
|
|
2272
2381
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
2273
2382
|
style: {
|
|
2274
2383
|
width: '100%',
|
|
2275
|
-
borderCollapse:
|
|
2276
|
-
borderSpacing: `0 ${tBodyRowMarginTop
|
|
2384
|
+
borderCollapse: tableRowItem ?? merge.TABLE.body.row.asItem ? 'separate' : 'collapse',
|
|
2385
|
+
borderSpacing: `0 ${tBodyRowMarginTop ?? merge.TABLE.body.row.marginTop}`
|
|
2277
2386
|
},
|
|
2278
2387
|
onClick: handleTableClick,
|
|
2279
|
-
className: className
|
|
2388
|
+
className: className ?? merge.TABLE.className
|
|
2280
2389
|
}, header && header.length > 0 && /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
2281
2390
|
style: {
|
|
2282
|
-
color: tHeadColor
|
|
2283
|
-
backgroundColor: tHeadBackgroundColor
|
|
2391
|
+
color: tHeadColor ?? merge.TABLE.head.color,
|
|
2392
|
+
backgroundColor: tHeadBackgroundColor ?? merge.TABLE.head.colors.background,
|
|
2284
2393
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2285
2394
|
}
|
|
2286
2395
|
}, header.map((item, index) => {
|
|
@@ -2291,28 +2400,29 @@ const Table = ({
|
|
|
2291
2400
|
handleCheckedHeader: handleCheckedHeader,
|
|
2292
2401
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
2293
2402
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
2294
|
-
tHeadFamily: tHeadFamily
|
|
2295
|
-
tHeadPadding: tHeadPadding
|
|
2296
|
-
tHeadFontSize: tHeadFontSize
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2403
|
+
tHeadFamily: tHeadFamily ?? merge.TABLE.head.font.family,
|
|
2404
|
+
tHeadPadding: tHeadPadding ?? merge.TABLE.head.padding,
|
|
2405
|
+
tHeadFontSize: tHeadFontSize ?? merge.TABLE.head.font.size,
|
|
2406
|
+
tHeadFontStyle: tHeadFontStyle ?? merge.TABLE.head.font.style,
|
|
2407
|
+
tHeadTextAlign: tHeadTextAlign ?? merge.TABLE.textAlign,
|
|
2408
|
+
tHeadFontWeight: tHeadFontWeight ?? merge.TABLE.head.font.weight,
|
|
2409
|
+
borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : merge.TABLE.head.radius : '0px',
|
|
2410
|
+
borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : merge.TABLE.head.radius : '0px',
|
|
2411
|
+
tableColumnMinWidth: tableColumnMinWidth ?? merge.TABLE.column.minWidth,
|
|
2412
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? merge.TABLE.column.maxWidth
|
|
2303
2413
|
});
|
|
2304
2414
|
}))), body && body.length > 0 && /*#__PURE__*/React__default["default"].createElement("tbody", {
|
|
2305
2415
|
style: {
|
|
2306
|
-
boxShadow: tBodyBoxShadow
|
|
2416
|
+
boxShadow: tBodyBoxShadow ?? merge.TABLE.body.box.shadow
|
|
2307
2417
|
}
|
|
2308
2418
|
}, body.map((item, index) => {
|
|
2309
2419
|
return /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
2310
2420
|
key: `${item}_${index}`,
|
|
2311
2421
|
style: {
|
|
2312
|
-
backgroundColor: tableRowBGColor
|
|
2313
|
-
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder :
|
|
2314
|
-
borderColor: hideBorder ? 'transparent' :
|
|
2315
|
-
boxShadow: (tableRowItem ? tableRowItem :
|
|
2422
|
+
backgroundColor: tableRowBGColor ?? merge.TABLE.body.row.colors.background,
|
|
2423
|
+
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : merge.TABLE.body.row.border,
|
|
2424
|
+
borderColor: hideBorder ? 'transparent' : merge.TABLE.body.row.borderColor,
|
|
2425
|
+
boxShadow: (tableRowItem ? tableRowItem : merge.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : merge.TABLE.body.row.box.shadow : 'none'
|
|
2316
2426
|
}
|
|
2317
2427
|
}, Object.values(item).map((innerItem, innerIndex) => {
|
|
2318
2428
|
return /*#__PURE__*/React__default["default"].createElement(TD, {
|
|
@@ -2324,24 +2434,27 @@ const Table = ({
|
|
|
2324
2434
|
id: item.id ? item.id : '',
|
|
2325
2435
|
handleCheckDots: handleCheckDots,
|
|
2326
2436
|
key: `${innerItem}_${index}_${innerIndex}`,
|
|
2327
|
-
openListColor: openListColor
|
|
2328
|
-
tableColumnMinWidth: tableColumnMinWidth
|
|
2329
|
-
tableColumnMaxWidth: tableColumnMaxWidth
|
|
2330
|
-
openListFontSize: openListFontSize
|
|
2331
|
-
|
|
2437
|
+
openListColor: openListColor ?? merge.TABLE.openList.color,
|
|
2438
|
+
tableColumnMinWidth: tableColumnMinWidth ?? merge.TABLE.column.minWidth,
|
|
2439
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? merge.TABLE.column.maxWidth,
|
|
2440
|
+
openListFontSize: openListFontSize ?? merge.TABLE.openList.font.size,
|
|
2441
|
+
openListFontStyle: openListFontStyle ?? merge.TABLE.openList.font.style,
|
|
2442
|
+
openListFontWeight: openListFontWeight ?? merge.TABLE.openList.font.weight,
|
|
2443
|
+
openListFontFamily: openListFontFamily ?? merge.TABLE.openList.font.family,
|
|
2332
2444
|
handleCheckedBody: handleCheckedBody,
|
|
2333
2445
|
handleBodyActionClick: handleBodyActionClick,
|
|
2334
2446
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
2335
2447
|
handleContentListClick: handleContentListClick,
|
|
2336
|
-
tBodyColor: tBodyColor
|
|
2337
|
-
rowItem: tableRowItem
|
|
2338
|
-
rowRadius: tableRowRadius
|
|
2339
|
-
tBodyPadding: tBodyPadding
|
|
2340
|
-
tBodyFontSize: tBodyFontSize
|
|
2341
|
-
tBodyTextAlign: tBodyTextAlign
|
|
2342
|
-
tBodyFontFamily: tBodyFontFamily
|
|
2343
|
-
tBodyFontWeight: tBodyFontWeight
|
|
2344
|
-
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' :
|
|
2448
|
+
tBodyColor: tBodyColor ?? merge.TABLE.body.color,
|
|
2449
|
+
rowItem: tableRowItem ?? merge.TABLE.body.row.isItem,
|
|
2450
|
+
rowRadius: tableRowRadius ?? merge.TABLE.body.row.radius,
|
|
2451
|
+
tBodyPadding: tBodyPadding ?? merge.TABLE.body.padding,
|
|
2452
|
+
tBodyFontSize: tBodyFontSize ?? merge.TABLE.body.font.size,
|
|
2453
|
+
tBodyTextAlign: tBodyTextAlign ?? merge.TABLE.textAlign,
|
|
2454
|
+
tBodyFontFamily: tBodyFontFamily ?? merge.TABLE.body.font.family,
|
|
2455
|
+
tBodyFontWeight: tBodyFontWeight ?? merge.TABLE.body.font.weight,
|
|
2456
|
+
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' : merge.TABLE.body.row.border,
|
|
2457
|
+
borderRightColor: innerIndex === Object.values(item).length - 1 ? 'transparent' : merge.TABLE.body.row.borderColor,
|
|
2345
2458
|
handleCheckArrowAction: handleCheckArrowAction,
|
|
2346
2459
|
handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
|
|
2347
2460
|
});
|
|
@@ -2364,6 +2477,7 @@ Table.propTypes = {
|
|
|
2364
2477
|
tHeadFamily: PropTypes__default["default"].string,
|
|
2365
2478
|
tHeadPadding: PropTypes__default["default"].string,
|
|
2366
2479
|
tHeadFontSize: PropTypes__default["default"].string,
|
|
2480
|
+
tHeadFontStyle: PropTypes__default["default"].string,
|
|
2367
2481
|
tHeadTextAlign: PropTypes__default["default"].string,
|
|
2368
2482
|
tHeadFontWeight: PropTypes__default["default"].number,
|
|
2369
2483
|
tHeadBorderRadius: PropTypes__default["default"].string,
|
|
@@ -2380,6 +2494,8 @@ Table.propTypes = {
|
|
|
2380
2494
|
tBodyRowBorder: PropTypes__default["default"].string,
|
|
2381
2495
|
openListColor: PropTypes__default["default"].string,
|
|
2382
2496
|
openListFontSize: PropTypes__default["default"].string,
|
|
2497
|
+
openListFontStyle: PropTypes__default["default"].string,
|
|
2498
|
+
openListFontWeight: PropTypes__default["default"].string,
|
|
2383
2499
|
openListFontFamily: PropTypes__default["default"].string,
|
|
2384
2500
|
hideBorder: PropTypes__default["default"].bool
|
|
2385
2501
|
};
|
|
@@ -2501,6 +2617,10 @@ const Modal = ({
|
|
|
2501
2617
|
padding,
|
|
2502
2618
|
setShow,
|
|
2503
2619
|
zoomIcon,
|
|
2620
|
+
prevIcon,
|
|
2621
|
+
nextIcon,
|
|
2622
|
+
closeIcon,
|
|
2623
|
+
closeSlideIcon,
|
|
2504
2624
|
selected,
|
|
2505
2625
|
children,
|
|
2506
2626
|
minWidth,
|
|
@@ -2512,6 +2632,8 @@ const Modal = ({
|
|
|
2512
2632
|
headerText,
|
|
2513
2633
|
imageWidth,
|
|
2514
2634
|
headerSize,
|
|
2635
|
+
headerStyle,
|
|
2636
|
+
headerFamily,
|
|
2515
2637
|
imageHeight,
|
|
2516
2638
|
headerColor,
|
|
2517
2639
|
borderStyle,
|
|
@@ -2522,9 +2644,7 @@ const Modal = ({
|
|
|
2522
2644
|
outsideClose,
|
|
2523
2645
|
headerWeight,
|
|
2524
2646
|
headerHeight,
|
|
2525
|
-
// imageMaxWidth,
|
|
2526
2647
|
justifyContent,
|
|
2527
|
-
// imageWrapWidth,
|
|
2528
2648
|
backgroundColor,
|
|
2529
2649
|
imageWrapHeight,
|
|
2530
2650
|
grayDecorHeight,
|
|
@@ -2534,8 +2654,7 @@ const Modal = ({
|
|
|
2534
2654
|
const [select, setSelect] = React.useState(0);
|
|
2535
2655
|
const [isHover, setIsHover] = React.useState(false);
|
|
2536
2656
|
const [innerData, setInnerData] = React.useState([]);
|
|
2537
|
-
const
|
|
2538
|
-
const classProps = classnames__default["default"](className ? className : configStyles.MODAL.className);
|
|
2657
|
+
const classProps = classnames__default["default"](className ?? merge.MODAL.className);
|
|
2539
2658
|
const handleCloseModal = () => {
|
|
2540
2659
|
setShow(false);
|
|
2541
2660
|
};
|
|
@@ -2607,7 +2726,7 @@ const Modal = ({
|
|
|
2607
2726
|
}, []);
|
|
2608
2727
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2609
2728
|
className: classProps,
|
|
2610
|
-
onClick: outsideClose ||
|
|
2729
|
+
onClick: outsideClose || merge.MODAL.outsideClose ? handleCloseModal : _ => _,
|
|
2611
2730
|
style: {
|
|
2612
2731
|
top: '0px',
|
|
2613
2732
|
left: '0px',
|
|
@@ -2615,7 +2734,7 @@ const Modal = ({
|
|
|
2615
2734
|
width: '100%',
|
|
2616
2735
|
height: '100vh',
|
|
2617
2736
|
position: 'fixed',
|
|
2618
|
-
backgroundColor: layerBackgroundColor
|
|
2737
|
+
backgroundColor: layerBackgroundColor ?? merge.MODAL.colors.backgroundLayer
|
|
2619
2738
|
}
|
|
2620
2739
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2621
2740
|
style: {
|
|
@@ -2623,8 +2742,8 @@ const Modal = ({
|
|
|
2623
2742
|
display: 'flex',
|
|
2624
2743
|
width: '100%',
|
|
2625
2744
|
height: '100vh',
|
|
2626
|
-
alignItems: alignItems
|
|
2627
|
-
justifyContent: justifyContent
|
|
2745
|
+
alignItems: alignItems ?? merge.MODAL.alignItems,
|
|
2746
|
+
justifyContent: justifyContent ?? merge.MODAL.justifyContent
|
|
2628
2747
|
}
|
|
2629
2748
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2630
2749
|
className: `${styles$8['animation__modal']}`,
|
|
@@ -2633,16 +2752,16 @@ const Modal = ({
|
|
|
2633
2752
|
position: 'relative',
|
|
2634
2753
|
boxSizing: 'border-box',
|
|
2635
2754
|
display: type === 'content' ? 'grid' : 'block',
|
|
2636
|
-
width: width
|
|
2755
|
+
width: width ?? merge.MODAL.width,
|
|
2637
2756
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2638
|
-
height: height
|
|
2757
|
+
height: height ?? merge.MODAL.height,
|
|
2639
2758
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2640
|
-
borderRadius: radius
|
|
2641
|
-
maxWidth: mMaxWidth
|
|
2642
|
-
maxHeight: mMaxHeight
|
|
2643
|
-
minWidth: type === 'content' ? minWidth
|
|
2644
|
-
backgroundColor: backgroundColor
|
|
2645
|
-
minHeight: type === 'content' ? minHeight
|
|
2759
|
+
borderRadius: radius ?? merge.MODAL.radius,
|
|
2760
|
+
maxWidth: mMaxWidth ?? merge.MODAL.maxWidth,
|
|
2761
|
+
maxHeight: mMaxHeight ?? merge.MODAL.maxHeight,
|
|
2762
|
+
minWidth: type === 'content' ? minWidth ?? merge.MODAL.minWidth : '',
|
|
2763
|
+
backgroundColor: backgroundColor ?? merge.MODAL.colors.background,
|
|
2764
|
+
minHeight: type === 'content' ? minHeight ?? merge.MODAL.minHeight : ''
|
|
2646
2765
|
}
|
|
2647
2766
|
}, type === 'content' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2648
2767
|
style: {
|
|
@@ -2652,8 +2771,8 @@ const Modal = ({
|
|
|
2652
2771
|
alignItems: 'center',
|
|
2653
2772
|
boxSizing: 'border-box',
|
|
2654
2773
|
backgroundColor: '#FBFBFB',
|
|
2655
|
-
padding: padding
|
|
2656
|
-
height: headerHeight
|
|
2774
|
+
padding: padding ?? merge.MODAL.padding,
|
|
2775
|
+
height: headerHeight ?? merge.MODAL.header.height,
|
|
2657
2776
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
|
|
2658
2777
|
}
|
|
2659
2778
|
}, headerText && type === 'content' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -2663,9 +2782,11 @@ const Modal = ({
|
|
|
2663
2782
|
whiteSpace: 'nowrap',
|
|
2664
2783
|
textOverflow: 'ellipsis',
|
|
2665
2784
|
margin: '0px 16px 0px 0px',
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2785
|
+
color: headerColor ?? merge.MODAL.header.color,
|
|
2786
|
+
fontSize: headerSize ?? merge.MODAL.header.font.size,
|
|
2787
|
+
fontStyle: headerStyle ?? merge.MODAL.header.font.style,
|
|
2788
|
+
fontFamily: headerFamily ?? merge.MODAL.header.font.family,
|
|
2789
|
+
fontWeight: headerWeight ?? merge.MODAL.header.font.weight
|
|
2669
2790
|
}
|
|
2670
2791
|
}, headerText), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2671
2792
|
onClick: handleCloseModal,
|
|
@@ -2674,7 +2795,7 @@ const Modal = ({
|
|
|
2674
2795
|
height: '14px',
|
|
2675
2796
|
cursor: 'pointer'
|
|
2676
2797
|
}
|
|
2677
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2798
|
+
}, closeIcon ? closeIcon : merge.MODAL.icon.close ? merge.MODAL.icon.close : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2678
2799
|
style: {
|
|
2679
2800
|
display: 'flex',
|
|
2680
2801
|
width: '100%',
|
|
@@ -2684,9 +2805,9 @@ const Modal = ({
|
|
|
2684
2805
|
boxSizing: 'border-box',
|
|
2685
2806
|
justifyContent: 'center',
|
|
2686
2807
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2687
|
-
borderWidth: borderWidth
|
|
2688
|
-
borderStyle: borderStyle
|
|
2689
|
-
borderColor: borderColor
|
|
2808
|
+
borderWidth: borderWidth ?? merge.MODAL.border.width,
|
|
2809
|
+
borderStyle: borderStyle ?? merge.MODAL.border.style,
|
|
2810
|
+
borderColor: borderColor ?? merge.MODAL.border.color
|
|
2690
2811
|
},
|
|
2691
2812
|
onMouseEnter: handleMouseEnter,
|
|
2692
2813
|
onMouseLeave: handleMouseLeave
|
|
@@ -2698,8 +2819,8 @@ const Modal = ({
|
|
|
2698
2819
|
width: '100%',
|
|
2699
2820
|
borderTopLeftRadius: '6px',
|
|
2700
2821
|
borderTopRightRadius: '6px',
|
|
2701
|
-
height: grayDecorHeight
|
|
2702
|
-
background: closeAreaBackgroundColor
|
|
2822
|
+
height: grayDecorHeight ?? merge.MODAL.grayDecorHeight,
|
|
2823
|
+
background: closeAreaBackgroundColor ?? merge.MODAL.closeAreaBackgroundColor
|
|
2703
2824
|
}
|
|
2704
2825
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2705
2826
|
onClick: handleCloseModal,
|
|
@@ -2716,9 +2837,9 @@ const Modal = ({
|
|
|
2716
2837
|
cursor: 'pointer',
|
|
2717
2838
|
backgroundColor: 'transparent'
|
|
2718
2839
|
}
|
|
2719
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2840
|
+
}, closeSlideIcon ? closeSlideIcon : merge.MODAL.icon.closeSlide ? merge.MODAL.icon.closeSlide : /*#__PURE__*/React__default["default"].createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2720
2841
|
style: {
|
|
2721
|
-
height: imageWrapHeight
|
|
2842
|
+
height: imageWrapHeight ?? merge.MODAL.image.wrapHeight
|
|
2722
2843
|
}
|
|
2723
2844
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
2724
2845
|
if (select === index) {
|
|
@@ -2731,11 +2852,10 @@ const Modal = ({
|
|
|
2731
2852
|
style: {
|
|
2732
2853
|
display: 'block',
|
|
2733
2854
|
objectFit: 'contain',
|
|
2734
|
-
margin: imageMargin
|
|
2735
|
-
borderRadius: radius
|
|
2736
|
-
width: imageWidth
|
|
2737
|
-
height: imageHeight
|
|
2738
|
-
// maxWidth: '100%'
|
|
2855
|
+
margin: imageMargin ?? merge.MODAL.image.margin,
|
|
2856
|
+
borderRadius: radius ?? merge.MODAL.radius,
|
|
2857
|
+
width: imageWidth ?? merge.MODAL.image.width,
|
|
2858
|
+
height: imageHeight ?? merge.MODAL.image.height
|
|
2739
2859
|
},
|
|
2740
2860
|
src: item.url
|
|
2741
2861
|
}), isHover && showZoomIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2756,7 +2876,7 @@ const Modal = ({
|
|
|
2756
2876
|
justifyContent: 'center'
|
|
2757
2877
|
},
|
|
2758
2878
|
onClick: () => handleOpenInNewTab(item.url)
|
|
2759
|
-
}, zoomIcon ? zoomIcon : /*#__PURE__*/React__default["default"].createElement(SvgZoom, null)) : '');
|
|
2879
|
+
}, zoomIcon ? zoomIcon : merge.MODAL.icon.zoom ? merge.MODAL.icon.zoom : /*#__PURE__*/React__default["default"].createElement(SvgZoom, null)) : '');
|
|
2760
2880
|
}
|
|
2761
2881
|
}
|
|
2762
2882
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
@@ -2773,7 +2893,7 @@ const Modal = ({
|
|
|
2773
2893
|
top: 'calc(50% - 12px)',
|
|
2774
2894
|
backgroundColor: 'transparent'
|
|
2775
2895
|
}
|
|
2776
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgPrev, null)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2896
|
+
}, prevIcon ? prevIcon : merge.MODAL.icon.prev ? merge.MODAL.icon.prev : /*#__PURE__*/React__default["default"].createElement(SvgPrev, null)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2777
2897
|
onClick: () => handleGoTo('next'),
|
|
2778
2898
|
style: {
|
|
2779
2899
|
position: 'absolute',
|
|
@@ -2787,7 +2907,7 @@ const Modal = ({
|
|
|
2787
2907
|
top: 'calc(50% - 12px)',
|
|
2788
2908
|
backgroundColor: 'transparent'
|
|
2789
2909
|
}
|
|
2790
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgNext, null)))))))));
|
|
2910
|
+
}, nextIcon ? nextIcon : merge.MODAL.icon.next ? merge.MODAL.icon.next : /*#__PURE__*/React__default["default"].createElement(SvgNext, null)))))))));
|
|
2791
2911
|
};
|
|
2792
2912
|
Modal.propTypes = {
|
|
2793
2913
|
data: PropTypes__default["default"].array,
|
|
@@ -2803,11 +2923,17 @@ Modal.propTypes = {
|
|
|
2803
2923
|
minHeight: PropTypes__default["default"].string,
|
|
2804
2924
|
className: PropTypes__default["default"].string,
|
|
2805
2925
|
zoomIcon: PropTypes__default["default"].element,
|
|
2926
|
+
prevIcon: PropTypes__default["default"].element,
|
|
2927
|
+
nextIcon: PropTypes__default["default"].element,
|
|
2928
|
+
closeIcon: PropTypes__default["default"].element,
|
|
2929
|
+
closeSlideIcon: PropTypes__default["default"].element,
|
|
2806
2930
|
alignItems: PropTypes__default["default"].string,
|
|
2807
2931
|
mMaxHeight: PropTypes__default["default"].string,
|
|
2808
2932
|
headerText: PropTypes__default["default"].string,
|
|
2809
2933
|
imageWidth: PropTypes__default["default"].string,
|
|
2810
2934
|
headerSize: PropTypes__default["default"].string,
|
|
2935
|
+
headerStyle: PropTypes__default["default"].string,
|
|
2936
|
+
headerFamily: PropTypes__default["default"].string,
|
|
2811
2937
|
outsideClose: PropTypes__default["default"].bool,
|
|
2812
2938
|
showZoomIcon: PropTypes__default["default"].bool,
|
|
2813
2939
|
imageMargin: PropTypes__default["default"].string,
|
|
@@ -2817,9 +2943,7 @@ Modal.propTypes = {
|
|
|
2817
2943
|
imageHeight: PropTypes__default["default"].string,
|
|
2818
2944
|
headerWeight: PropTypes__default["default"].string,
|
|
2819
2945
|
headerHeight: PropTypes__default["default"].string,
|
|
2820
|
-
imageMaxWidth: PropTypes__default["default"].string,
|
|
2821
2946
|
justifyContent: PropTypes__default["default"].string,
|
|
2822
|
-
imageWrapWidth: PropTypes__default["default"].string,
|
|
2823
2947
|
backgroundColor: PropTypes__default["default"].string,
|
|
2824
2948
|
grayDecorHeight: PropTypes__default["default"].string,
|
|
2825
2949
|
imageWrapHeight: PropTypes__default["default"].string,
|
|
@@ -2841,12 +2965,13 @@ const InputTypes = {
|
|
|
2841
2965
|
PASSWORD: 'password'
|
|
2842
2966
|
};
|
|
2843
2967
|
const P = styled__default["default"].span`
|
|
2844
|
-
animation: ${props => props.errorAnimation ? props.
|
|
2968
|
+
animation: ${props => props.errorAnimation ? props.errorAnimation : 'none'};
|
|
2845
2969
|
`;
|
|
2846
2970
|
const Input = ({
|
|
2847
2971
|
type,
|
|
2848
2972
|
size,
|
|
2849
2973
|
name,
|
|
2974
|
+
style,
|
|
2850
2975
|
color,
|
|
2851
2976
|
label,
|
|
2852
2977
|
value,
|
|
@@ -2855,12 +2980,13 @@ const Input = ({
|
|
|
2855
2980
|
height,
|
|
2856
2981
|
radius,
|
|
2857
2982
|
change,
|
|
2983
|
+
weight,
|
|
2984
|
+
family,
|
|
2858
2985
|
padding,
|
|
2859
2986
|
tooltip,
|
|
2860
2987
|
leftIcon,
|
|
2861
2988
|
required,
|
|
2862
2989
|
disabled,
|
|
2863
|
-
marginTop,
|
|
2864
2990
|
transform,
|
|
2865
2991
|
iconWidth,
|
|
2866
2992
|
rightIcon,
|
|
@@ -2871,20 +2997,24 @@ const Input = ({
|
|
|
2871
2997
|
errorSize,
|
|
2872
2998
|
labelSize,
|
|
2873
2999
|
maxLength,
|
|
3000
|
+
labelStyle,
|
|
2874
3001
|
floatToFix,
|
|
2875
3002
|
minNumSize,
|
|
2876
3003
|
maxNumSize,
|
|
2877
3004
|
labelColor,
|
|
2878
3005
|
errorColor,
|
|
2879
3006
|
withoutDot,
|
|
2880
|
-
|
|
3007
|
+
errorStyle,
|
|
2881
3008
|
placeholder,
|
|
2882
3009
|
errorZindex,
|
|
2883
3010
|
labelWeight,
|
|
3011
|
+
errorWeight,
|
|
3012
|
+
errorFamily,
|
|
2884
3013
|
phoneDisplay,
|
|
2885
3014
|
errorMessage,
|
|
2886
3015
|
autoComplete,
|
|
2887
3016
|
labelDisplay,
|
|
3017
|
+
errorMarginTop,
|
|
2888
3018
|
boxShadowHover,
|
|
2889
3019
|
errorClassName,
|
|
2890
3020
|
errorAnimation,
|
|
@@ -2893,14 +3023,15 @@ const Input = ({
|
|
|
2893
3023
|
errorLineHeight,
|
|
2894
3024
|
labelLineHeight,
|
|
2895
3025
|
backgroundColor,
|
|
2896
|
-
telErrorMessage,
|
|
2897
|
-
borderRightColor,
|
|
2898
3026
|
labelMarginBottom,
|
|
2899
3027
|
regexpErrorMessage,
|
|
2900
3028
|
phoneJustifyContent,
|
|
2901
|
-
|
|
3029
|
+
telBorderRightWidth,
|
|
3030
|
+
telBorderRightStyle,
|
|
3031
|
+
telBorderRightColor,
|
|
2902
3032
|
backgroundDisableColor,
|
|
2903
3033
|
errorAnimationDuration,
|
|
3034
|
+
telBorderRightColorHover,
|
|
2904
3035
|
...props
|
|
2905
3036
|
}) => {
|
|
2906
3037
|
const phoneNumberRegex = /^\d+$/;
|
|
@@ -2910,8 +3041,7 @@ const Input = ({
|
|
|
2910
3041
|
const [innerMinNumSize, setInnerMinNumSize] = React.useState(0);
|
|
2911
3042
|
const [innerErrorMessage, setInnerErrorMessage] = React.useState('');
|
|
2912
3043
|
const random = Math.floor(Math.random() * 1000 + 1);
|
|
2913
|
-
const
|
|
2914
|
-
const classProps = classnames__default["default"](className ? className : configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
3044
|
+
const classProps = classnames__default["default"](className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
2915
3045
|
const errorShow = styled.keyframes`
|
|
2916
3046
|
100% {
|
|
2917
3047
|
bottom: '-20px';
|
|
@@ -2923,15 +3053,15 @@ const Input = ({
|
|
|
2923
3053
|
}
|
|
2924
3054
|
`;
|
|
2925
3055
|
const animation = () => styled.css`
|
|
2926
|
-
${errorShow} ${errorAnimationDuration ? errorAnimationDuration :
|
|
3056
|
+
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : merge.INPUT.error.animationDuration} forwards
|
|
2927
3057
|
`;
|
|
2928
3058
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
2929
3059
|
if (type === 'tel') {
|
|
2930
3060
|
if (!phoneNumberRegex.test(val)) {
|
|
2931
|
-
if (
|
|
2932
|
-
setInnerErrorMessage(
|
|
2933
|
-
}
|
|
2934
|
-
|
|
3061
|
+
if (errorMessage) {
|
|
3062
|
+
setInnerErrorMessage(errorMessage);
|
|
3063
|
+
}
|
|
3064
|
+
if (val !== '') {
|
|
2935
3065
|
val = prevVal;
|
|
2936
3066
|
}
|
|
2937
3067
|
} else {
|
|
@@ -3009,7 +3139,7 @@ const Input = ({
|
|
|
3009
3139
|
const handleChange = event => {
|
|
3010
3140
|
let prevValue = innerValue;
|
|
3011
3141
|
let currentValue = event.target.value;
|
|
3012
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3142
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3013
3143
|
currentValue = handleCheckTypeTel(currentValue, prevValue);
|
|
3014
3144
|
currentValue = handleCheckTypeNumber(currentValue, prevValue);
|
|
3015
3145
|
if (max && currentValue.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3055,7 +3185,7 @@ const Input = ({
|
|
|
3055
3185
|
if (value === null) {
|
|
3056
3186
|
newValue = '';
|
|
3057
3187
|
} else {
|
|
3058
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3188
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3059
3189
|
newValue = handleCheckTypeTel(value, newValue);
|
|
3060
3190
|
newValue = handleCheckTypeNumber(value, newValue);
|
|
3061
3191
|
if (max && value.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3067,25 +3197,26 @@ const Input = ({
|
|
|
3067
3197
|
}
|
|
3068
3198
|
}
|
|
3069
3199
|
setInnerValue(() => newValue);
|
|
3070
|
-
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage
|
|
3200
|
+
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage]);
|
|
3071
3201
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3072
3202
|
className: classProps
|
|
3073
3203
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3074
3204
|
style: {
|
|
3075
|
-
color: labelColor
|
|
3076
|
-
fontSize: labelSize
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3205
|
+
color: labelColor ?? merge.INPUT.label.color,
|
|
3206
|
+
fontSize: labelSize ?? merge.INPUT.label.font.size,
|
|
3207
|
+
fontStyle: labelStyle ?? merge.INPUT.label.font.style,
|
|
3208
|
+
display: labelDisplay ?? merge.INPUT.label.display,
|
|
3209
|
+
fontWeight: labelWeight ?? merge.INPUT.label.font.weight,
|
|
3210
|
+
lineHeight: labelLineHeight ?? merge.INPUT.label.lineHeight,
|
|
3211
|
+
marginBottom: labelMarginBottom ?? merge.INPUT.label.marginBottom,
|
|
3212
|
+
fontFamily: labelFontFamily ?? merge.INPUT.label.font.family
|
|
3082
3213
|
}
|
|
3083
3214
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3084
3215
|
className: `${styles$7['input-content']}`,
|
|
3085
3216
|
style: {
|
|
3086
|
-
width: width
|
|
3087
|
-
borderRadius: radius
|
|
3088
|
-
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${
|
|
3217
|
+
width: width ?? merge.INPUT.width,
|
|
3218
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3219
|
+
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${merge.INPUT.error.color}` : isHover && !disabled ? boxShadowHover ? boxShadowHover : merge.INPUT.box.shadowHover : boxShadow ? boxShadow : merge.INPUT.box.shadow
|
|
3089
3220
|
},
|
|
3090
3221
|
onMouseEnter: handleMouseEnter,
|
|
3091
3222
|
onMouseLeave: handleMouseLeave
|
|
@@ -3096,30 +3227,36 @@ const Input = ({
|
|
|
3096
3227
|
alignItems: 'center',
|
|
3097
3228
|
justifyContent: 'center',
|
|
3098
3229
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3099
|
-
height: height
|
|
3100
|
-
padding: padding
|
|
3101
|
-
width: iconWidth
|
|
3102
|
-
boxSizing: boxSizing
|
|
3103
|
-
borderTopLeftRadius: radius
|
|
3104
|
-
borderBottomLeftRadius: radius
|
|
3105
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
3230
|
+
height: height ?? merge.INPUT.height,
|
|
3231
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3232
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3233
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3234
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3235
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3236
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3106
3237
|
}
|
|
3107
3238
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3108
3239
|
style: {
|
|
3240
|
+
// border: 'none',
|
|
3109
3241
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
3110
|
-
fontSize: size
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3242
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3243
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3244
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3245
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3246
|
+
height: height ?? merge.INPUT.height,
|
|
3247
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3248
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3249
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3250
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3251
|
+
display: phoneDisplay ?? merge.INPUT.tel.display,
|
|
3252
|
+
borderRight: `
|
|
3253
|
+
${telBorderRightWidth ?? merge.INPUT.tel.borderRight.width}
|
|
3254
|
+
${telBorderRightStyle ?? merge.INPUT.tel.borderRight.style}`,
|
|
3255
|
+
alignItems: phoneAlignItems ?? merge.INPUT.tel.alignItems,
|
|
3256
|
+
borderColor: innerErrorMessage ? errorColor ? errorColor : merge.INPUT.error.color : isHover ? telBorderRightColorHover ? telBorderRightColorHover : merge.INPUT.tel.borderRight.colors.hover : telBorderRightColor ? telBorderRightColor : merge.INPUT.tel.borderRight.color,
|
|
3257
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3258
|
+
justifyContent: phoneJustifyContent ?? merge.INPUT.tel.justifyContent,
|
|
3259
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3123
3260
|
}
|
|
3124
3261
|
}, "+374") : '', /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
|
|
3125
3262
|
value: innerValue,
|
|
@@ -3130,19 +3267,22 @@ const Input = ({
|
|
|
3130
3267
|
type: show || type === 'number' ? 'text' : type,
|
|
3131
3268
|
min: type === 'number' && minNumSize ? minNumSize : '',
|
|
3132
3269
|
max: type === 'number' && maxNumSize ? maxNumSize : '',
|
|
3133
|
-
autoComplete: autoComplete ? autoComplete :
|
|
3270
|
+
autoComplete: autoComplete ? autoComplete : merge.INPUT.autoComplete,
|
|
3134
3271
|
style: {
|
|
3135
3272
|
border: 'none',
|
|
3136
3273
|
outline: 'none',
|
|
3137
3274
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
3138
|
-
width: width
|
|
3139
|
-
fontSize: size
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3275
|
+
width: width ?? merge.INPUT.width,
|
|
3276
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3277
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3278
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3279
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3280
|
+
height: height ?? merge.INPUT.height,
|
|
3281
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3282
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3283
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3284
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3285
|
+
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3146
3286
|
}
|
|
3147
3287
|
})), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3148
3288
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
@@ -3151,34 +3291,41 @@ const Input = ({
|
|
|
3151
3291
|
alignItems: 'center',
|
|
3152
3292
|
justifyContent: 'center',
|
|
3153
3293
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3154
|
-
height: height
|
|
3155
|
-
padding: padding
|
|
3156
|
-
width: iconWidth
|
|
3157
|
-
boxSizing: boxSizing
|
|
3158
|
-
borderTopRightRadius: radius
|
|
3159
|
-
borderBottomRightRadius: radius
|
|
3160
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
3294
|
+
height: height ?? merge.INPUT.height,
|
|
3295
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3296
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3297
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3298
|
+
borderTopRightRadius: radius ?? merge.INPUT.radius,
|
|
3299
|
+
borderBottomRightRadius: radius ?? merge.INPUT.radius,
|
|
3300
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3161
3301
|
}
|
|
3162
3302
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P, {
|
|
3163
|
-
errorAnimation: errorAnimation,
|
|
3303
|
+
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3164
3304
|
animation: animation,
|
|
3165
3305
|
style: {
|
|
3166
3306
|
margin: '0px',
|
|
3167
3307
|
position: 'absolute',
|
|
3168
|
-
width: width
|
|
3169
|
-
left: errorLeft
|
|
3170
|
-
color: errorColor
|
|
3171
|
-
fontSize: errorSize
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3308
|
+
width: width ?? merge.INPUT.width,
|
|
3309
|
+
left: errorLeft ?? merge.INPUT.error.left,
|
|
3310
|
+
color: errorColor ?? merge.INPUT.error.color,
|
|
3311
|
+
fontSize: errorSize ?? merge.INPUT.error.font.size,
|
|
3312
|
+
fontStyle: errorStyle ?? merge.INPUT.error.font.style,
|
|
3313
|
+
fontFamily: errorFamily ?? merge.INPUT.error.font.family,
|
|
3314
|
+
fontWeight: errorWeight ?? merge.INPUT.error.font.weight,
|
|
3315
|
+
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3316
|
+
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3317
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3318
|
+
transform: !errorAnimation && !merge.INPUT.error.animation ? 'scale3d(1,1,1)' : transform ? transform : merge.INPUT.error.transform
|
|
3176
3319
|
},
|
|
3177
|
-
className: errorClassName
|
|
3320
|
+
className: errorClassName ?? merge.INPUT.error.className
|
|
3178
3321
|
}, innerErrorMessage) : '');
|
|
3179
3322
|
};
|
|
3180
3323
|
Input.propTypes = {
|
|
3324
|
+
size: PropTypes__default["default"].string,
|
|
3181
3325
|
name: PropTypes__default["default"].string,
|
|
3326
|
+
style: PropTypes__default["default"].string,
|
|
3327
|
+
weight: PropTypes__default["default"].string,
|
|
3328
|
+
family: PropTypes__default["default"].string,
|
|
3182
3329
|
change: PropTypes__default["default"].func,
|
|
3183
3330
|
color: PropTypes__default["default"].string,
|
|
3184
3331
|
width: PropTypes__default["default"].string,
|
|
@@ -3188,10 +3335,8 @@ Input.propTypes = {
|
|
|
3188
3335
|
height: PropTypes__default["default"].string,
|
|
3189
3336
|
radius: PropTypes__default["default"].string,
|
|
3190
3337
|
padding: PropTypes__default["default"].string,
|
|
3191
|
-
fontSize: PropTypes__default["default"].string,
|
|
3192
3338
|
tooltip: PropTypes__default["default"].element,
|
|
3193
3339
|
withoutDot: PropTypes__default["default"].bool,
|
|
3194
|
-
marginTop: PropTypes__default["default"].string,
|
|
3195
3340
|
transform: PropTypes__default["default"].string,
|
|
3196
3341
|
className: PropTypes__default["default"].string,
|
|
3197
3342
|
iconWidth: PropTypes__default["default"].string,
|
|
@@ -3206,6 +3351,10 @@ Input.propTypes = {
|
|
|
3206
3351
|
maxNumSize: PropTypes__default["default"].number,
|
|
3207
3352
|
errorColor: PropTypes__default["default"].string,
|
|
3208
3353
|
labelColor: PropTypes__default["default"].string,
|
|
3354
|
+
labelStyle: PropTypes__default["default"].string,
|
|
3355
|
+
errorStyle: PropTypes__default["default"].string,
|
|
3356
|
+
errorWeight: PropTypes__default["default"].string,
|
|
3357
|
+
errorFamily: PropTypes__default["default"].string,
|
|
3209
3358
|
borderRight: PropTypes__default["default"].string,
|
|
3210
3359
|
placeholder: PropTypes__default["default"].string,
|
|
3211
3360
|
errorZindex: PropTypes__default["default"].string,
|
|
@@ -3216,22 +3365,24 @@ Input.propTypes = {
|
|
|
3216
3365
|
errorAnimation: PropTypes__default["default"].bool,
|
|
3217
3366
|
labelDisplay: PropTypes__default["default"].string,
|
|
3218
3367
|
errorPosition: PropTypes__default["default"].string,
|
|
3368
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
3219
3369
|
boxShadowHover: PropTypes__default["default"].string,
|
|
3220
3370
|
errorClassName: PropTypes__default["default"].string,
|
|
3221
3371
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3222
|
-
telErrorMessage: PropTypes__default["default"].string,
|
|
3223
3372
|
backgroundColor: PropTypes__default["default"].string,
|
|
3224
3373
|
phoneAlignItems: PropTypes__default["default"].string,
|
|
3225
3374
|
errorLineHeight: PropTypes__default["default"].string,
|
|
3226
3375
|
labelLineHeight: PropTypes__default["default"].string,
|
|
3227
|
-
borderRightColor: PropTypes__default["default"].string,
|
|
3228
3376
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
3229
3377
|
regexpErrorMessage: PropTypes__default["default"].string,
|
|
3230
3378
|
regexp: PropTypes__default["default"].instanceOf(RegExp),
|
|
3379
|
+
telBorderRightWidth: PropTypes__default["default"].string,
|
|
3380
|
+
telBorderRightStyle: PropTypes__default["default"].string,
|
|
3381
|
+
telBorderRightColor: PropTypes__default["default"].string,
|
|
3231
3382
|
phoneJustifyContent: PropTypes__default["default"].string,
|
|
3232
|
-
borderRightColorHover: PropTypes__default["default"].string,
|
|
3233
3383
|
backgroundDisableColor: PropTypes__default["default"].string,
|
|
3234
3384
|
errorAnimationDuration: PropTypes__default["default"].string,
|
|
3385
|
+
telBorderRightColorHover: PropTypes__default["default"].string,
|
|
3235
3386
|
leftIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
3236
3387
|
rightIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
3237
3388
|
type: PropTypes__default["default"].oneOf(Object.values(InputTypes)),
|
|
@@ -3258,6 +3409,7 @@ const Radio = ({
|
|
|
3258
3409
|
borderColor,
|
|
3259
3410
|
borderStyle,
|
|
3260
3411
|
labelFontSize,
|
|
3412
|
+
labelFontStyle,
|
|
3261
3413
|
labelFontFamily,
|
|
3262
3414
|
labelFontWeight,
|
|
3263
3415
|
labelLineHeight,
|
|
@@ -3266,8 +3418,7 @@ const Radio = ({
|
|
|
3266
3418
|
radioItemMarginRight,
|
|
3267
3419
|
radioItemMarginBottom
|
|
3268
3420
|
}) => {
|
|
3269
|
-
const
|
|
3270
|
-
const classProps = classnames__default["default"](className ? className : configStyles.RADIO.className);
|
|
3421
|
+
const classProps = classnames__default["default"](className ?? merge.RADIO.className);
|
|
3271
3422
|
const [innerData, setInnerData] = React.useState([]);
|
|
3272
3423
|
const [radioInnerSize, setRadioInnerSize] = React.useState('');
|
|
3273
3424
|
const [radioInnerFormat, setRadioInnerFormat] = React.useState('');
|
|
@@ -3279,11 +3430,11 @@ const Radio = ({
|
|
|
3279
3430
|
});
|
|
3280
3431
|
const handleMouseEnter = (id, elemID) => {
|
|
3281
3432
|
const elem = document.querySelector(`#${elemID}`);
|
|
3282
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3433
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color;
|
|
3283
3434
|
};
|
|
3284
3435
|
const handleMouseLeave = (id, elemID) => {
|
|
3285
3436
|
const elem = document.querySelector(`#${elemID}`);
|
|
3286
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3437
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent';
|
|
3287
3438
|
};
|
|
3288
3439
|
const handleChecked = selItem => {
|
|
3289
3440
|
setInnerSelectedData(selItem);
|
|
@@ -3299,7 +3450,7 @@ const Radio = ({
|
|
|
3299
3450
|
React.useEffect(() => {
|
|
3300
3451
|
let radioSize = '';
|
|
3301
3452
|
let radioSizeFormat = '';
|
|
3302
|
-
const checkSize = size ||
|
|
3453
|
+
const checkSize = size || merge.RADIO.size;
|
|
3303
3454
|
if (checkSize && typeof checkSize === 'string') {
|
|
3304
3455
|
if (checkSize.length > 0) {
|
|
3305
3456
|
checkSize.split('').map(item => {
|
|
@@ -3316,7 +3467,7 @@ const Radio = ({
|
|
|
3316
3467
|
}
|
|
3317
3468
|
setRadioInnerFormat(radioSizeFormat);
|
|
3318
3469
|
setRadioInnerSize(`${parseInt(radioSize) / 2}`);
|
|
3319
|
-
}, [size,
|
|
3470
|
+
}, [size, merge.RADIO.size]);
|
|
3320
3471
|
React.useEffect(() => {
|
|
3321
3472
|
if (typeof selected === 'object' && selected !== null && !Array.isArray(selected)) {
|
|
3322
3473
|
setInnerSelectedData(selected);
|
|
@@ -3346,8 +3497,8 @@ const Radio = ({
|
|
|
3346
3497
|
cursor: item[innerKeyNames.disabled] ? 'not-allowed' : 'pointer',
|
|
3347
3498
|
width: 'fit-content',
|
|
3348
3499
|
alignItems: 'center',
|
|
3349
|
-
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight :
|
|
3350
|
-
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom :
|
|
3500
|
+
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : merge.RADIO.item.marginRight : '0px',
|
|
3501
|
+
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : merge.RADIO.item.marginBottom : '0px'
|
|
3351
3502
|
},
|
|
3352
3503
|
onClick: item[innerKeyNames.disabled] ? _ => _ : () => handleChecked(item),
|
|
3353
3504
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
@@ -3358,11 +3509,11 @@ const Radio = ({
|
|
|
3358
3509
|
alignItems: 'center',
|
|
3359
3510
|
borderRadius: '100%',
|
|
3360
3511
|
justifyContent: 'center',
|
|
3361
|
-
width: size ? size :
|
|
3362
|
-
height: size ? size :
|
|
3363
|
-
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight :
|
|
3364
|
-
border: `${borderSize
|
|
3365
|
-
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3512
|
+
width: size ? size : merge.RADIO.size,
|
|
3513
|
+
height: size ? size : merge.RADIO.size,
|
|
3514
|
+
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight : merge.RADIO.marginRight : '0px',
|
|
3515
|
+
border: `${borderSize ?? merge.RADIO.border.width} ${borderStyle ? borderStyle : merge.RADIO.border.style}`,
|
|
3516
|
+
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color
|
|
3366
3517
|
}
|
|
3367
3518
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3368
3519
|
id: elemId,
|
|
@@ -3370,15 +3521,16 @@ const Radio = ({
|
|
|
3370
3521
|
borderRadius: '100%',
|
|
3371
3522
|
width: radioInnerSize + radioInnerFormat,
|
|
3372
3523
|
height: radioInnerSize + radioInnerFormat,
|
|
3373
|
-
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3524
|
+
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent'
|
|
3374
3525
|
}
|
|
3375
3526
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3376
3527
|
style: {
|
|
3377
|
-
color: labelColor
|
|
3378
|
-
fontSize: labelFontSize
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3528
|
+
color: labelColor ?? merge.RADIO.label.color,
|
|
3529
|
+
fontSize: labelFontSize ?? merge.RADIO.label.font.size,
|
|
3530
|
+
fontStyle: labelFontStyle ?? merge.RADIO.label.font.style,
|
|
3531
|
+
fontFamily: labelFontFamily ?? merge.RADIO.label.font.family,
|
|
3532
|
+
fontWeight: labelFontWeight ?? merge.RADIO.label.font.weight,
|
|
3533
|
+
lineHeight: labelLineHeight ?? merge.RADIO.label.lineHeight
|
|
3382
3534
|
},
|
|
3383
3535
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
3384
3536
|
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
@@ -3395,6 +3547,7 @@ Radio.propTypes = {
|
|
|
3395
3547
|
borderColor: PropTypes__default["default"].string,
|
|
3396
3548
|
borderStyle: PropTypes__default["default"].string,
|
|
3397
3549
|
labelFontSize: PropTypes__default["default"].string,
|
|
3550
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
3398
3551
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3399
3552
|
labelFontWeight: PropTypes__default["default"].string,
|
|
3400
3553
|
labelLineHeight: PropTypes__default["default"].string,
|
|
@@ -3456,6 +3609,7 @@ const Select = ({
|
|
|
3456
3609
|
labelWeight,
|
|
3457
3610
|
labelDisplay,
|
|
3458
3611
|
labelFontSize,
|
|
3612
|
+
labelFontStyle,
|
|
3459
3613
|
labelLineHeight,
|
|
3460
3614
|
labelFontFamily,
|
|
3461
3615
|
labelMarginBottom,
|
|
@@ -3463,12 +3617,17 @@ const Select = ({
|
|
|
3463
3617
|
cursor,
|
|
3464
3618
|
errorSize,
|
|
3465
3619
|
errorColor,
|
|
3620
|
+
errorStyle,
|
|
3621
|
+
errorFamily,
|
|
3622
|
+
errorWeight,
|
|
3466
3623
|
selectedColor,
|
|
3467
3624
|
selectedRadius,
|
|
3468
|
-
selectedMinHeight,
|
|
3469
3625
|
selectedPadding,
|
|
3470
3626
|
selectedFontSize,
|
|
3627
|
+
selectedFontStyle,
|
|
3471
3628
|
selectedBoxSizing,
|
|
3629
|
+
selectedMinHeight,
|
|
3630
|
+
selectedFontFamily,
|
|
3472
3631
|
selectedFontWeight,
|
|
3473
3632
|
selectedLineHeight,
|
|
3474
3633
|
selectedHoverColor,
|
|
@@ -3494,8 +3653,7 @@ const Select = ({
|
|
|
3494
3653
|
boxShadowHover
|
|
3495
3654
|
}) => {
|
|
3496
3655
|
const ref = React.useRef();
|
|
3497
|
-
const
|
|
3498
|
-
const classProps = classnames__default["default"](className ? className : configStyles.SELECT.className);
|
|
3656
|
+
const classProps = classnames__default["default"](className ? className : merge.SELECT.className);
|
|
3499
3657
|
const [opened, setOpened] = React.useState(false);
|
|
3500
3658
|
const [isHover, setIsHover] = React.useState(false);
|
|
3501
3659
|
const [newSelected, setNewSelected] = React.useState([]);
|
|
@@ -3548,12 +3706,12 @@ const Select = ({
|
|
|
3548
3706
|
setIsHover(false);
|
|
3549
3707
|
};
|
|
3550
3708
|
const handleMouseEnterOption = e => {
|
|
3551
|
-
e.target.style.color = optionItemColorHover ? optionItemColorHover :
|
|
3552
|
-
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover :
|
|
3709
|
+
e.target.style.color = optionItemColorHover ? optionItemColorHover : merge.SELECT.options.item.colors.hover;
|
|
3710
|
+
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover : merge.SELECT.options.item.colors.backgroudHover;
|
|
3553
3711
|
};
|
|
3554
3712
|
const handleMouseLeaveOption = e => {
|
|
3555
|
-
e.target.style.color = optionItemColor ? optionItemColor :
|
|
3556
|
-
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor :
|
|
3713
|
+
e.target.style.color = optionItemColor ? optionItemColor : merge.SELECT.options.item.color;
|
|
3714
|
+
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor : merge.SELECT.options.item.colors.backgroud;
|
|
3557
3715
|
};
|
|
3558
3716
|
const isObjectEmpty = obj => {
|
|
3559
3717
|
for (var key in obj) {
|
|
@@ -3609,14 +3767,15 @@ const Select = ({
|
|
|
3609
3767
|
}
|
|
3610
3768
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3611
3769
|
style: {
|
|
3612
|
-
color: labelColor
|
|
3613
|
-
fontWeight: labelWeight
|
|
3614
|
-
display: labelDisplay
|
|
3615
|
-
fontSize: labelFontSize
|
|
3616
|
-
|
|
3617
|
-
fontFamily: labelFontFamily
|
|
3618
|
-
|
|
3619
|
-
|
|
3770
|
+
color: labelColor ?? merge.SELECT.label.color,
|
|
3771
|
+
fontWeight: labelWeight ?? merge.SELECT.label.font.weight,
|
|
3772
|
+
display: labelDisplay ?? merge.SELECT.label.display,
|
|
3773
|
+
fontSize: labelFontSize ?? merge.SELECT.label.font.size,
|
|
3774
|
+
fontStyle: labelFontStyle ?? merge.SELECT.label.font.style,
|
|
3775
|
+
fontFamily: labelFontFamily ?? merge.SELECT.label.font.family,
|
|
3776
|
+
lineHeight: labelLineHeight ?? merge.SELECT.label.lineHeight,
|
|
3777
|
+
marginBottom: labelMarginBottom ?? merge.SELECT.label.marginBottom,
|
|
3778
|
+
textTransform: labelTextTransform ?? merge.SELECT.label.textTransform
|
|
3620
3779
|
}
|
|
3621
3780
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3622
3781
|
ref: ref
|
|
@@ -3624,17 +3783,19 @@ const Select = ({
|
|
|
3624
3783
|
className: styles$6['select-content']
|
|
3625
3784
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3626
3785
|
style: {
|
|
3627
|
-
cursor: disabled ? 'not-allowed' : cursor ? cursor :
|
|
3628
|
-
minHeight: selectedMinHeight
|
|
3629
|
-
padding: selectedPadding
|
|
3630
|
-
borderRadius: selectedRadius
|
|
3631
|
-
fontSize: selectedFontSize
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3786
|
+
cursor: disabled ? 'not-allowed' : cursor ? cursor : merge.SELECT.selected.cursor,
|
|
3787
|
+
minHeight: selectedMinHeight ?? merge.SELECT.selected.minHeight,
|
|
3788
|
+
padding: selectedPadding ?? merge.SELECT.selected.padding,
|
|
3789
|
+
borderRadius: selectedRadius ?? merge.SELECT.selected.radius,
|
|
3790
|
+
fontSize: selectedFontSize ?? merge.SELECT.selected.font.size,
|
|
3791
|
+
fontStyle: selectedFontStyle ?? merge.SELECT.selected.font.style,
|
|
3792
|
+
fontFamily: selectedFontFamily ?? merge.SELECT.selected.font.family,
|
|
3793
|
+
boxSizing: selectedBoxSizing ?? merge.SELECT.selected.box.sizing,
|
|
3794
|
+
fontWeight: selectedFontWeight ?? merge.SELECT.selected.font.weight,
|
|
3795
|
+
lineHeight: selectedLineHeight ?? merge.SELECT.selected.lineHeight,
|
|
3796
|
+
transition: selectedTransition ?? merge.SELECT.selected.transition,
|
|
3797
|
+
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : merge.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : merge.SELECT.selected.colors.background,
|
|
3798
|
+
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : merge.SELECT.error.box.shadow : isHover ? boxShadowHover ? boxShadowHover : merge.SELECT.box.shadowHover : boxShadow ? boxShadow : merge.SELECT.box.shadow
|
|
3638
3799
|
},
|
|
3639
3800
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
3640
3801
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
@@ -3646,7 +3807,7 @@ const Select = ({
|
|
|
3646
3807
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
3647
3808
|
overflow: 'hidden',
|
|
3648
3809
|
textOverflow: 'ellipsis',
|
|
3649
|
-
color: errorMessage ? errorColor ? errorColor :
|
|
3810
|
+
color: errorMessage ? errorColor ? errorColor : merge.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
|
|
3650
3811
|
}
|
|
3651
3812
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
3652
3813
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -3658,23 +3819,23 @@ const Select = ({
|
|
|
3658
3819
|
}
|
|
3659
3820
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3660
3821
|
className: `${styles$6['select-content-top-icon']}`
|
|
3661
|
-
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default["default"].createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon :
|
|
3822
|
+
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default["default"].createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : merge.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3662
3823
|
className: `${styles$6['close-icon']}`,
|
|
3663
3824
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
3664
3825
|
style: {
|
|
3665
3826
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
3666
3827
|
}
|
|
3667
|
-
}, closeIcon ? closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3828
|
+
}, closeIcon ? closeIcon : merge.SELECT.closeIcon ? merge.SELECT.closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3668
3829
|
style: {
|
|
3669
3830
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
3670
3831
|
},
|
|
3671
3832
|
className: `${styles$6['arrow-icon']}`
|
|
3672
|
-
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3833
|
+
}, arrowIcon ? arrowIcon : merge.SELECT.arrowIcon ? merge.SELECT.arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3673
3834
|
style: {
|
|
3674
|
-
boxShadow: optionsBoxShadow
|
|
3675
|
-
borderRadius: optionsBorderRadius
|
|
3676
|
-
backgroundColor: optionsBackgroundColor
|
|
3677
|
-
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' :
|
|
3835
|
+
boxShadow: optionsBoxShadow ?? merge.SELECT.options.box.shadow,
|
|
3836
|
+
borderRadius: optionsBorderRadius ?? merge.SELECT.options.radius,
|
|
3837
|
+
backgroundColor: optionsBackgroundColor ?? merge.SELECT.options.colors.background,
|
|
3838
|
+
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : merge.SELECT.selected.minHeight.includes('rem') ? parseFloat(merge.SELECT.selected.minHeight.substr(0, merge.SELECT.selected.minHeight.length - 3)) + 0.6 + 'rem' : parseFloat(merge.SELECT.selected.minHeight.substr(0, merge.SELECT.selected.minHeight.length - 2)) + 6 + 'px'
|
|
3678
3839
|
},
|
|
3679
3840
|
className: `${styles$6['select-content-bottom']}`
|
|
3680
3841
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3687,19 +3848,19 @@ const Select = ({
|
|
|
3687
3848
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
3688
3849
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
3689
3850
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
3690
|
-
className: `${styles$6['select-content-bottom-row']} ${dots ||
|
|
3851
|
+
className: `${styles$6['select-content-bottom-row']} ${dots || merge.SELECT.dots ? styles$6['ellipsis'] : ''}`,
|
|
3691
3852
|
style: {
|
|
3692
|
-
overflowWrap: !dots && !
|
|
3693
|
-
color: optionItemColor
|
|
3694
|
-
cursor: optionItemCursor
|
|
3695
|
-
padding: optionItemPadding
|
|
3696
|
-
fontSize: optionItemFontSize
|
|
3697
|
-
boxSizing: optionItemBoxSizing
|
|
3698
|
-
minHeight: optionItemMinHeight
|
|
3699
|
-
fontWeight: optionItemFontWeight
|
|
3700
|
-
lineHeight: dots ||
|
|
3701
|
-
marginBottom: optionItemMarginBottom
|
|
3702
|
-
backgroundColor: optionItemBackgroudColor
|
|
3853
|
+
overflowWrap: !dots && !merge.SELECT.dots ? 'anywhere' : 'break-word',
|
|
3854
|
+
color: optionItemColor ?? merge.SELECT.options.item.color,
|
|
3855
|
+
cursor: optionItemCursor ?? merge.SELECT.options.item.cursor,
|
|
3856
|
+
padding: optionItemPadding ?? merge.SELECT.options.item.padding,
|
|
3857
|
+
fontSize: optionItemFontSize ?? merge.SELECT.options.item.font.size,
|
|
3858
|
+
boxSizing: optionItemBoxSizing ?? merge.SELECT.options.item.box.sizing,
|
|
3859
|
+
minHeight: optionItemMinHeight ?? merge.SELECT.options.item.minHeight,
|
|
3860
|
+
fontWeight: optionItemFontWeight ?? merge.SELECT.options.item.font.weight,
|
|
3861
|
+
lineHeight: dots || merge.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : merge.SELECT.options.item.lineHeight,
|
|
3862
|
+
marginBottom: optionItemMarginBottom ?? merge.SELECT.options.item.marginBottom,
|
|
3863
|
+
backgroundColor: optionItemBackgroudColor ?? merge.SELECT.options.item.colors.backgroud
|
|
3703
3864
|
}
|
|
3704
3865
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
|
|
3705
3866
|
checked: option.checked
|
|
@@ -3707,10 +3868,13 @@ const Select = ({
|
|
|
3707
3868
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3708
3869
|
style: {
|
|
3709
3870
|
position: 'absolute',
|
|
3710
|
-
color: errorColor
|
|
3711
|
-
fontSize: errorSize
|
|
3712
|
-
|
|
3713
|
-
|
|
3871
|
+
color: errorColor ?? merge.SELECT.error.color,
|
|
3872
|
+
fontSize: errorSize ?? merge.SELECT.error.font.size,
|
|
3873
|
+
fontStyle: errorStyle ?? merge.SELECT.error.font.style,
|
|
3874
|
+
fontFamily: errorFamily ?? merge.SELECT.error.font.family,
|
|
3875
|
+
fontWeight: errorWeight ?? merge.SELECT.error.font.weight,
|
|
3876
|
+
zIndex: errorZindex ?? merge.SELECT.error.zIndex,
|
|
3877
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.SELECT.error.marginTop})`
|
|
3714
3878
|
}
|
|
3715
3879
|
}, errorMessage) : '');
|
|
3716
3880
|
};
|
|
@@ -3737,6 +3901,7 @@ Select.propTypes = {
|
|
|
3737
3901
|
labelWeight: PropTypes__default["default"].string,
|
|
3738
3902
|
labelDisplay: PropTypes__default["default"].string,
|
|
3739
3903
|
labelFontSize: PropTypes__default["default"].string,
|
|
3904
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
3740
3905
|
labelLineHeight: PropTypes__default["default"].string,
|
|
3741
3906
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3742
3907
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -3749,7 +3914,9 @@ Select.propTypes = {
|
|
|
3749
3914
|
selectedMinHeight: PropTypes__default["default"].string,
|
|
3750
3915
|
selectedPadding: PropTypes__default["default"].string,
|
|
3751
3916
|
selectedFontSize: PropTypes__default["default"].string,
|
|
3917
|
+
selectedFontStyle: PropTypes__default["default"].string,
|
|
3752
3918
|
selectedBoxSizing: PropTypes__default["default"].string,
|
|
3919
|
+
selectedFontFamily: PropTypes__default["default"].string,
|
|
3753
3920
|
selectedHoverColor: PropTypes__default["default"].string,
|
|
3754
3921
|
selectedFontWeight: PropTypes__default["default"].string,
|
|
3755
3922
|
selectedLineHeight: PropTypes__default["default"].string,
|
|
@@ -3781,16 +3948,22 @@ const SvgToasterInfo = ({
|
|
|
3781
3948
|
fillColor,
|
|
3782
3949
|
...props
|
|
3783
3950
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3784
|
-
width: "
|
|
3785
|
-
height: "
|
|
3786
|
-
viewBox: "0 0
|
|
3951
|
+
width: "60",
|
|
3952
|
+
height: "60",
|
|
3953
|
+
viewBox: "0 0 60 60",
|
|
3787
3954
|
fill: "none",
|
|
3788
3955
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3789
3956
|
"aria-labelledby": titleId
|
|
3790
3957
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3791
3958
|
id: titleId
|
|
3792
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3793
|
-
|
|
3959
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3960
|
+
opacity: "0.05",
|
|
3961
|
+
cx: "30",
|
|
3962
|
+
cy: "30",
|
|
3963
|
+
r: "30",
|
|
3964
|
+
fill: fillColor ? fillColor : '#00236A'
|
|
3965
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3966
|
+
d: "M30 36C30.34 36 30.6252 35.8848 30.8556 35.6544C31.086 35.424 31.2008 35.1392 31.2 34.8V29.97C31.2 29.63 31.0848 29.35 30.8544 29.13C30.624 28.91 30.3392 28.8 30 28.8C29.66 28.8 29.3748 28.9152 29.1444 29.1456C28.914 29.376 28.7992 29.6608 28.8 30V34.83C28.8 35.17 28.9152 35.45 29.1456 35.67C29.376 35.89 29.6608 36 30 36ZM30 26.4C30.34 26.4 30.6252 26.2848 30.8556 26.0544C31.086 25.824 31.2008 25.5392 31.2 25.2C31.2 24.86 31.0848 24.5748 30.8544 24.3444C30.624 24.114 30.3392 23.9992 30 24C29.66 24 29.3748 24.1152 29.1444 24.3456C28.914 24.576 28.7992 24.8608 28.8 25.2C28.8 25.54 28.9152 25.8252 29.1456 26.0556C29.376 26.286 29.6608 26.4008 30 26.4ZM30 42C28.34 42 26.78 41.6848 25.32 41.0544C23.86 40.424 22.59 39.5692 21.51 38.49C20.43 37.41 19.5752 36.14 18.9456 34.68C18.316 33.22 18.0008 31.66 18 30C18 28.34 18.3152 26.78 18.9456 25.32C19.576 23.86 20.4308 22.59 21.51 21.51C22.59 20.43 23.86 19.5752 25.32 18.9456C26.78 18.316 28.34 18.0008 30 18C31.66 18 33.22 18.3152 34.68 18.9456C36.14 19.576 37.41 20.4308 38.49 21.51C39.57 22.59 40.4252 23.86 41.0556 25.32C41.686 26.78 42.0008 28.34 42 30C42 31.66 41.6848 33.22 41.0544 34.68C40.424 36.14 39.5692 37.41 38.49 38.49C37.41 39.57 36.14 40.4252 34.68 41.0556C33.22 41.686 31.66 42.0008 30 42Z",
|
|
3794
3967
|
fill: fillColor ? fillColor : '#00236A'
|
|
3795
3968
|
}));
|
|
3796
3969
|
|
|
@@ -3800,17 +3973,23 @@ const SvgToasterError = ({
|
|
|
3800
3973
|
fillColor,
|
|
3801
3974
|
...props
|
|
3802
3975
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3803
|
-
width: "
|
|
3804
|
-
height: "
|
|
3805
|
-
viewBox: "0 0
|
|
3976
|
+
width: "60",
|
|
3977
|
+
height: "60",
|
|
3978
|
+
viewBox: "0 0 60 60",
|
|
3806
3979
|
fill: "none",
|
|
3807
3980
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3808
3981
|
"aria-labelledby": titleId
|
|
3809
3982
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3810
3983
|
id: titleId
|
|
3811
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3812
|
-
|
|
3813
|
-
|
|
3984
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3985
|
+
opacity: "0.05",
|
|
3986
|
+
cx: "30",
|
|
3987
|
+
cy: "30",
|
|
3988
|
+
r: "30",
|
|
3989
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3990
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3991
|
+
d: "M30 18C31.5759 18 33.1363 18.3104 34.5922 18.9134C36.0481 19.5165 37.371 20.4004 38.4853 21.5147C39.5996 22.629 40.4835 23.9519 41.0866 25.4078C41.6896 26.8637 42 28.4241 42 30C42 31.5759 41.6896 33.1363 41.0866 34.5922C40.4835 36.0481 39.5996 37.371 38.4853 38.4853C37.371 39.5996 36.0481 40.4835 34.5922 41.0866C33.1363 41.6896 31.5759 42 30 42C26.8174 42 23.7652 40.7357 21.5147 38.4853C19.2643 36.2348 18 33.1826 18 30C18 26.8174 19.2643 23.7652 21.5147 21.5147C23.7652 19.2643 26.8174 18 30 18ZM30 34C29.6022 34 29.2206 34.158 28.9393 34.4393C28.658 34.7206 28.5 35.1022 28.5 35.5C28.5 35.8978 28.658 36.2794 28.9393 36.5607C29.2206 36.842 29.6022 37 30 37C30.3978 37 30.7794 36.842 31.0607 36.5607C31.342 36.2794 31.5 35.8978 31.5 35.5C31.5 35.1022 31.342 34.7206 31.0607 34.4393C30.7794 34.158 30.3978 34 30 34ZM30 23C29.7659 22.9999 29.5393 23.0819 29.3595 23.2318C29.1797 23.3816 29.0581 23.5898 29.016 23.82L29 24V31L29.016 31.18C29.0577 31.4106 29.1791 31.6191 29.359 31.7694C29.5388 31.9196 29.7657 32.0018 30 32.0018C30.2343 32.0018 30.4612 31.9196 30.641 31.7694C30.8209 31.6191 30.9423 31.4106 30.984 31.18L31 31V24L30.984 23.82C30.9419 23.5898 30.8203 23.3816 30.6405 23.2318C30.4607 23.0819 30.2341 22.9999 30 23Z",
|
|
3992
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3814
3993
|
}));
|
|
3815
3994
|
|
|
3816
3995
|
const SvgToasterClose = ({
|
|
@@ -3838,16 +4017,22 @@ const SvgToasterWarning = ({
|
|
|
3838
4017
|
fillColor,
|
|
3839
4018
|
...props
|
|
3840
4019
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3841
|
-
width: "
|
|
3842
|
-
height: "
|
|
3843
|
-
viewBox: "0 0
|
|
4020
|
+
width: "60",
|
|
4021
|
+
height: "60",
|
|
4022
|
+
viewBox: "0 0 60 60",
|
|
3844
4023
|
fill: "none",
|
|
3845
4024
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3846
4025
|
"aria-labelledby": titleId
|
|
3847
4026
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3848
4027
|
id: titleId
|
|
3849
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3850
|
-
|
|
4028
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
4029
|
+
opacity: "0.05",
|
|
4030
|
+
cx: "30",
|
|
4031
|
+
cy: "30",
|
|
4032
|
+
r: "30",
|
|
4033
|
+
fill: fillColor ? fillColor : '#FF8A00'
|
|
4034
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
4035
|
+
d: "M19.1563 40C18.942 40 18.7471 39.9463 18.5717 39.839C18.3964 39.7317 18.26 39.5909 18.1625 39.4167C18.0651 39.2417 18.0113 39.0519 18.0012 38.8473C17.9911 38.6428 18.0449 38.4437 18.1625 38.25L28.9771 19.5833C29.094 19.3889 29.2452 19.2431 29.4307 19.1458C29.6162 19.0486 29.806 19 30.0001 19C30.1949 19 30.3851 19.0486 30.5706 19.1458C30.7561 19.2431 30.9069 19.3889 31.0231 19.5833L41.8376 38.25C41.9545 38.4444 42.0083 38.6439 41.999 38.8485C41.9896 39.053 41.9358 39.2424 41.8376 39.4167C41.7402 39.5917 41.6038 39.7328 41.4284 39.8402C41.253 39.9475 41.0582 40.0008 40.8438 40H19.1563ZM30.0001 36.5C30.3313 36.5 30.6092 36.388 30.8337 36.164C31.0582 35.94 31.17 35.6631 31.1692 35.3333C31.1692 35.0028 31.057 34.7255 30.8325 34.5015C30.608 34.2775 30.3306 34.1659 30.0001 34.1667C29.6688 34.1667 29.391 34.2787 29.1665 34.5027C28.942 34.7267 28.8302 35.0035 28.8309 35.3333C28.8309 35.6639 28.9432 35.9412 29.1677 36.1652C29.3921 36.3892 29.6696 36.5008 30.0001 36.5ZM30.0001 33C30.3313 33 30.6092 32.888 30.8337 32.664C31.0582 32.44 31.17 32.1631 31.1692 31.8333V28.3333C31.1692 28.0028 31.057 27.7255 30.8325 27.5015C30.608 27.2775 30.3306 27.1659 30.0001 27.1667C29.6688 27.1667 29.391 27.2787 29.1665 27.5027C28.942 27.7267 28.8302 28.0036 28.8309 28.3333V31.8333C28.8309 32.1639 28.9432 32.4412 29.1677 32.6652C29.3921 32.8892 29.6696 33.0008 30.0001 33Z",
|
|
3851
4036
|
fill: fillColor ? fillColor : '#FF8A00'
|
|
3852
4037
|
}));
|
|
3853
4038
|
|
|
@@ -3857,16 +4042,22 @@ const SvgToasterSuccess = ({
|
|
|
3857
4042
|
fillColor,
|
|
3858
4043
|
...props
|
|
3859
4044
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3860
|
-
width: "
|
|
3861
|
-
height: "
|
|
3862
|
-
viewBox: "0 0
|
|
4045
|
+
width: "60",
|
|
4046
|
+
height: "60",
|
|
4047
|
+
viewBox: "0 0 60 60",
|
|
3863
4048
|
fill: "none",
|
|
3864
4049
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3865
4050
|
"aria-labelledby": titleId
|
|
3866
4051
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3867
4052
|
id: titleId
|
|
3868
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3869
|
-
|
|
4053
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
4054
|
+
opacity: "0.05",
|
|
4055
|
+
cx: "30",
|
|
4056
|
+
cy: "30",
|
|
4057
|
+
r: "30",
|
|
4058
|
+
fill: fillColor ? fillColor : '#0DA574'
|
|
4059
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
4060
|
+
d: "M30 18C33.1826 18 36.2348 19.2643 38.4853 21.5147C40.7357 23.7652 42 26.8174 42 30C42 33.1826 40.7357 36.2348 38.4853 38.4853C36.2348 40.7357 33.1826 42 30 42C26.8174 42 23.7652 40.7357 21.5147 38.4853C19.2643 36.2348 18 33.1826 18 30C18 26.8174 19.2643 23.7652 21.5147 21.5147C23.7652 19.2643 26.8174 18 30 18ZM28.5051 32.3674L25.8394 29.7C25.7439 29.6044 25.6304 29.5286 25.5056 29.4769C25.3807 29.4252 25.2469 29.3986 25.1117 29.3986C24.9766 29.3986 24.8427 29.4252 24.7179 29.4769C24.593 29.5286 24.4796 29.6044 24.384 29.7C24.191 29.893 24.0826 30.1548 24.0826 30.4277C24.0826 30.7007 24.191 30.9624 24.384 31.1554L27.7783 34.5497C27.8736 34.6458 27.9869 34.722 28.1118 34.774C28.2367 34.826 28.3707 34.8528 28.506 34.8528C28.6413 34.8528 28.7753 34.826 28.9002 34.774C29.0251 34.722 29.1384 34.6458 29.2337 34.5497L36.2623 27.5194C36.3591 27.4243 36.4362 27.3109 36.489 27.1858C36.5418 27.0607 36.5693 26.9264 36.5699 26.7906C36.5705 26.6548 36.5443 26.5203 36.4926 26.3947C36.441 26.2691 36.365 26.155 36.2691 26.0589C36.1731 25.9629 36.0591 25.8867 35.9336 25.835C35.8081 25.7832 35.6735 25.7568 35.5378 25.7572C35.402 25.7577 35.2677 25.7851 35.1425 25.8377C35.0173 25.8904 34.9039 25.9673 34.8086 26.064L28.5051 32.3674Z",
|
|
3870
4061
|
fill: fillColor ? fillColor : '#0DA574'
|
|
3871
4062
|
}));
|
|
3872
4063
|
|
|
@@ -3891,9 +4082,11 @@ const ToasterPosition = {
|
|
|
3891
4082
|
};
|
|
3892
4083
|
const Toast = ({
|
|
3893
4084
|
type,
|
|
4085
|
+
icon,
|
|
3894
4086
|
title,
|
|
3895
4087
|
timer,
|
|
3896
4088
|
position,
|
|
4089
|
+
closeIcon,
|
|
3897
4090
|
removeToast,
|
|
3898
4091
|
description
|
|
3899
4092
|
}) => {
|
|
@@ -3948,10 +4141,9 @@ const Toast = ({
|
|
|
3948
4141
|
height: '60px',
|
|
3949
4142
|
borderRadius: '30px',
|
|
3950
4143
|
alignItems: 'center',
|
|
3951
|
-
justifyContent: 'center'
|
|
3952
|
-
backgroundColor: type === 'info' ? 'rgba(0, 35, 106, 0.05)' : type === 'warn' ? 'rgba(255, 138, 0, 0.05)' : type === 'error' ? 'rgba(238, 0, 0, 0.05)' : type === 'success' ? 'rgba(13, 165, 116, 0.05)' : ''
|
|
4144
|
+
justifyContent: 'center'
|
|
3953
4145
|
}
|
|
3954
|
-
}, type === 'info' ? /*#__PURE__*/React__default["default"].createElement(SvgToasterInfo, null) : type === 'warn' ? /*#__PURE__*/React__default["default"].createElement(SvgToasterWarning, null) : type === 'error' ? /*#__PURE__*/React__default["default"].createElement(SvgToasterError, null) : type === 'success' ? /*#__PURE__*/React__default["default"].createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4146
|
+
}, type === 'info' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterInfo, null) : type === 'warn' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterWarning, null) : type === 'error' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterError, null) : type === 'success' ? icon ? icon : /*#__PURE__*/React__default["default"].createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3955
4147
|
style: {
|
|
3956
4148
|
height: '100%',
|
|
3957
4149
|
width: 'calc(100% - 90px)'
|
|
@@ -3984,7 +4176,7 @@ const Toast = ({
|
|
|
3984
4176
|
height: '18px',
|
|
3985
4177
|
cursor: 'pointer'
|
|
3986
4178
|
}
|
|
3987
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
|
|
4179
|
+
}, closeIcon ? closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
|
|
3988
4180
|
};
|
|
3989
4181
|
Toast.propTypes = {
|
|
3990
4182
|
timer: PropTypes__default["default"].number,
|
|
@@ -4015,9 +4207,11 @@ const removeToast = ref => {
|
|
|
4015
4207
|
};
|
|
4016
4208
|
const createToast = ({
|
|
4017
4209
|
type,
|
|
4210
|
+
icon,
|
|
4018
4211
|
timer,
|
|
4019
4212
|
title,
|
|
4020
4213
|
position,
|
|
4214
|
+
iconClose,
|
|
4021
4215
|
description
|
|
4022
4216
|
}) => {
|
|
4023
4217
|
let toastParentBlock;
|
|
@@ -4032,11 +4226,13 @@ const createToast = ({
|
|
|
4032
4226
|
toastBlock.style.marginBottom = '20px';
|
|
4033
4227
|
const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
|
|
4034
4228
|
type,
|
|
4229
|
+
icon,
|
|
4035
4230
|
timer,
|
|
4036
4231
|
title,
|
|
4037
4232
|
position,
|
|
4038
|
-
|
|
4039
|
-
description
|
|
4233
|
+
iconClose,
|
|
4234
|
+
description,
|
|
4235
|
+
removeToast
|
|
4040
4236
|
});
|
|
4041
4237
|
ReactDOM__default["default"].render(newElem, toastBlock);
|
|
4042
4238
|
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
@@ -4055,66 +4251,81 @@ const createToast = ({
|
|
|
4055
4251
|
const toast = {
|
|
4056
4252
|
success: (title, props) => {
|
|
4057
4253
|
const {
|
|
4254
|
+
icon,
|
|
4058
4255
|
timer,
|
|
4059
4256
|
position,
|
|
4257
|
+
iconClose,
|
|
4060
4258
|
description
|
|
4061
4259
|
} = props || {};
|
|
4062
4260
|
createToast({
|
|
4063
4261
|
title,
|
|
4064
4262
|
type: 'success',
|
|
4065
|
-
timer: timer
|
|
4066
|
-
position: position
|
|
4067
|
-
description: description
|
|
4263
|
+
timer: timer ?? 5000,
|
|
4264
|
+
position: position ?? 'top-right',
|
|
4265
|
+
description: description ?? '',
|
|
4266
|
+
icon: icon ?? merge.TOASTER.icon.success,
|
|
4267
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4068
4268
|
});
|
|
4069
4269
|
},
|
|
4070
4270
|
info: (title, props) => {
|
|
4071
4271
|
const {
|
|
4272
|
+
icon,
|
|
4072
4273
|
timer,
|
|
4073
4274
|
position,
|
|
4275
|
+
iconClose,
|
|
4074
4276
|
description
|
|
4075
4277
|
} = props || {};
|
|
4076
4278
|
createToast({
|
|
4077
4279
|
title,
|
|
4078
4280
|
type: 'info',
|
|
4079
|
-
timer: timer
|
|
4080
|
-
position: position
|
|
4081
|
-
description: description
|
|
4281
|
+
timer: timer ?? 5000,
|
|
4282
|
+
position: position ?? 'top-right',
|
|
4283
|
+
description: description ?? '',
|
|
4284
|
+
icon: icon ?? merge.TOASTER.icon.info,
|
|
4285
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4082
4286
|
});
|
|
4083
4287
|
},
|
|
4084
4288
|
warn: (title, props) => {
|
|
4085
4289
|
const {
|
|
4290
|
+
icon,
|
|
4086
4291
|
timer,
|
|
4087
4292
|
position,
|
|
4293
|
+
iconClose,
|
|
4088
4294
|
description
|
|
4089
4295
|
} = props || {};
|
|
4090
4296
|
createToast({
|
|
4091
4297
|
title,
|
|
4092
4298
|
type: 'warn',
|
|
4093
|
-
timer: timer
|
|
4094
|
-
position: position
|
|
4095
|
-
description: description
|
|
4299
|
+
timer: timer ?? 5000,
|
|
4300
|
+
position: position ?? 'top-right',
|
|
4301
|
+
description: description ?? '',
|
|
4302
|
+
icon: icon ?? merge.TOASTER.icon.warn,
|
|
4303
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4096
4304
|
});
|
|
4097
4305
|
},
|
|
4098
4306
|
error: (title, props) => {
|
|
4099
4307
|
const {
|
|
4308
|
+
icon,
|
|
4100
4309
|
timer,
|
|
4101
4310
|
position,
|
|
4311
|
+
iconClose,
|
|
4102
4312
|
description
|
|
4103
4313
|
} = props || {};
|
|
4104
4314
|
createToast({
|
|
4105
4315
|
title,
|
|
4106
4316
|
type: 'error',
|
|
4107
|
-
timer: timer
|
|
4108
|
-
position: position
|
|
4109
|
-
description: description
|
|
4317
|
+
timer: timer ?? 5000,
|
|
4318
|
+
position: position ?? 'top-right',
|
|
4319
|
+
description: description ?? '',
|
|
4320
|
+
icon: icon ?? merge.TOASTER.icon.error,
|
|
4321
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4110
4322
|
});
|
|
4111
4323
|
}
|
|
4112
4324
|
};
|
|
4113
4325
|
const Toaster = ({
|
|
4114
4326
|
className
|
|
4115
4327
|
}) => {
|
|
4116
|
-
const
|
|
4117
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TOASTER.className);
|
|
4328
|
+
const classProps = classnames__default["default"](className ?? merge.TOASTER.className);
|
|
4118
4329
|
window.addEventListener('popstate', () => {
|
|
4119
4330
|
if (path !== window.location.href) {
|
|
4120
4331
|
if (!toastify) {
|
|
@@ -4168,7 +4379,9 @@ const Tooltip = ({
|
|
|
4168
4379
|
radius,
|
|
4169
4380
|
fontSize,
|
|
4170
4381
|
className,
|
|
4382
|
+
fontStyle,
|
|
4171
4383
|
fontFamily,
|
|
4384
|
+
fontWeight,
|
|
4172
4385
|
tooltipIcon,
|
|
4173
4386
|
tooltipWidth,
|
|
4174
4387
|
tooltipRadius,
|
|
@@ -4176,8 +4389,7 @@ const Tooltip = ({
|
|
|
4176
4389
|
tooltipBackgroundColor
|
|
4177
4390
|
}) => {
|
|
4178
4391
|
const tooltipRef = /*#__PURE__*/React.createRef(null);
|
|
4179
|
-
const
|
|
4180
|
-
const classProps = classnames__default["default"](styles$4['tooltip-block'], className ? className : configStyles.TOOLTIP.className);
|
|
4392
|
+
const classProps = classnames__default["default"](styles$4['tooltip-block'], className ?? merge.TOOLTIP.className);
|
|
4181
4393
|
const [checkTooltipWidth, setCheckTooltipWidth] = React.useState(0);
|
|
4182
4394
|
const [checkTooltipHeight, setCheckTooltipHeight] = React.useState(0);
|
|
4183
4395
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
@@ -4194,18 +4406,18 @@ const Tooltip = ({
|
|
|
4194
4406
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4195
4407
|
className: classProps,
|
|
4196
4408
|
style: {
|
|
4197
|
-
width: width
|
|
4198
|
-
height: height
|
|
4199
|
-
borderRadius: radius
|
|
4200
|
-
backgroundColor: backgroundColor
|
|
4409
|
+
width: width ?? merge.TOOLTIP.parent.width,
|
|
4410
|
+
height: height ?? merge.TOOLTIP.parent.height,
|
|
4411
|
+
borderRadius: radius ?? merge.TOOLTIP.parent.radius,
|
|
4412
|
+
backgroundColor: backgroundColor ?? merge.TOOLTIP.parent.colors.background
|
|
4201
4413
|
}
|
|
4202
4414
|
}, showTooltip ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4203
4415
|
ref: tooltipRef,
|
|
4204
4416
|
className: `${styles$4['tooltip']}`,
|
|
4205
4417
|
style: {
|
|
4206
|
-
width: tooltipWidth
|
|
4207
|
-
borderRadius: tooltipRadius
|
|
4208
|
-
backgroundColor: tooltipBackgroundColor
|
|
4418
|
+
width: tooltipWidth ?? merge.TOOLTIP.width,
|
|
4419
|
+
borderRadius: tooltipRadius ?? merge.TOOLTIP.radius,
|
|
4420
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4209
4421
|
top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
|
|
4210
4422
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
4211
4423
|
}
|
|
@@ -4214,22 +4426,24 @@ const Tooltip = ({
|
|
|
4214
4426
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4215
4427
|
className: `${styles$4['tooltip-decor']}`,
|
|
4216
4428
|
style: {
|
|
4217
|
-
backgroundColor: tooltipBackgroundColor
|
|
4429
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4218
4430
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
4219
4431
|
top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
|
|
4220
4432
|
}
|
|
4221
4433
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4222
4434
|
style: {
|
|
4223
|
-
color: color
|
|
4224
|
-
fontSize: fontSize
|
|
4225
|
-
|
|
4435
|
+
color: color ?? merge.TOOLTIP.color,
|
|
4436
|
+
fontSize: fontSize ?? merge.TOOLTIP.font.size,
|
|
4437
|
+
fontStyle: fontStyle ?? merge.TOOLTIP.font.style,
|
|
4438
|
+
fontFamily: fontFamily ?? merge.TOOLTIP.font.family,
|
|
4439
|
+
fontWeight: fontWeight ?? merge.TOOLTIP.font.weight
|
|
4226
4440
|
}
|
|
4227
4441
|
}, text))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4228
4442
|
style: {
|
|
4229
4443
|
cursor: 'pointer'
|
|
4230
4444
|
},
|
|
4231
4445
|
onClick: handleShow
|
|
4232
|
-
}, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
|
|
4446
|
+
}, tooltipIcon ? tooltipIcon : merge.TOOLTIP.icon ? merge.TOOLTIP.icon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
|
|
4233
4447
|
};
|
|
4234
4448
|
Tooltip.propTypes = {
|
|
4235
4449
|
type: PropTypes__default["default"].string,
|
|
@@ -4238,8 +4452,10 @@ Tooltip.propTypes = {
|
|
|
4238
4452
|
height: PropTypes__default["default"].string,
|
|
4239
4453
|
radius: PropTypes__default["default"].string,
|
|
4240
4454
|
fontSize: PropTypes__default["default"].string,
|
|
4455
|
+
fontStyle: PropTypes__default["default"].string,
|
|
4241
4456
|
className: PropTypes__default["default"].string,
|
|
4242
4457
|
fontFamily: PropTypes__default["default"].string,
|
|
4458
|
+
fontWeight: PropTypes__default["default"].string,
|
|
4243
4459
|
tooltipWidth: PropTypes__default["default"].string,
|
|
4244
4460
|
tooltipIcon: PropTypes__default["default"].element,
|
|
4245
4461
|
tooltipRadius: PropTypes__default["default"].string,
|
|
@@ -4294,17 +4510,19 @@ var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captc
|
|
|
4294
4510
|
styleInject(css_248z$5);
|
|
4295
4511
|
|
|
4296
4512
|
const Captcha = ({
|
|
4297
|
-
size,
|
|
4298
4513
|
color,
|
|
4299
4514
|
range,
|
|
4300
4515
|
label,
|
|
4516
|
+
getRange,
|
|
4301
4517
|
className,
|
|
4302
|
-
|
|
4518
|
+
fontSize,
|
|
4519
|
+
fontStyle,
|
|
4520
|
+
fontFamily,
|
|
4521
|
+
fontWeight
|
|
4303
4522
|
}) => {
|
|
4304
4523
|
const [rangeNumber, setRangeNumber] = React.useState(0);
|
|
4305
4524
|
const [rangeProgress, setRangeProgress] = React.useState(0);
|
|
4306
|
-
const
|
|
4307
|
-
const classProps = classnames__default["default"](className ? className : configStyles.CAPTCHA.className);
|
|
4525
|
+
const classProps = classnames__default["default"](className ?? merge.CAPTCHA.className);
|
|
4308
4526
|
const handleRange = e => {
|
|
4309
4527
|
const value = e.target.value;
|
|
4310
4528
|
getRange(value);
|
|
@@ -4330,8 +4548,11 @@ const Captcha = ({
|
|
|
4330
4548
|
className: classProps
|
|
4331
4549
|
}, label && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4332
4550
|
style: {
|
|
4333
|
-
|
|
4334
|
-
|
|
4551
|
+
color: color ?? merge.CAPTCHA.label.color,
|
|
4552
|
+
fontSize: fontSize ?? merge.CAPTCHA.label.font.size,
|
|
4553
|
+
fontStyle: fontStyle ?? merge.CAPTCHA.label.font.style,
|
|
4554
|
+
fontFamily: fontFamily ?? merge.CAPTCHA.label.font.family,
|
|
4555
|
+
fontWeight: fontWeight ?? merge.CAPTCHA.label.font.weight
|
|
4335
4556
|
}
|
|
4336
4557
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4337
4558
|
style: {
|
|
@@ -4424,9 +4645,8 @@ const Stepper = ({
|
|
|
4424
4645
|
activeSteps,
|
|
4425
4646
|
className
|
|
4426
4647
|
}) => {
|
|
4427
|
-
const configStyles = compereConfigs();
|
|
4428
4648
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4429
|
-
className: classnames__default["default"](className
|
|
4649
|
+
className: classnames__default["default"](className ?? merge.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`)
|
|
4430
4650
|
}, (() => {
|
|
4431
4651
|
let steppers = [];
|
|
4432
4652
|
for (let step = 1; step <= stepLength; step++) {
|
|
@@ -4457,13 +4677,14 @@ const Checkbox = ({
|
|
|
4457
4677
|
keyNames,
|
|
4458
4678
|
className,
|
|
4459
4679
|
direction,
|
|
4680
|
+
checkedColor,
|
|
4681
|
+
unCheckedColor,
|
|
4460
4682
|
checkedIcon,
|
|
4461
4683
|
unCheckedIcon,
|
|
4462
4684
|
labelMarginLeft,
|
|
4463
4685
|
checkBoxMarginBottom
|
|
4464
4686
|
}) => {
|
|
4465
|
-
const
|
|
4466
|
-
const classProps = classnames__default["default"](className ? className : configStyles.CHECKBOX.className);
|
|
4687
|
+
const classProps = classnames__default["default"](className ?? merge.CHECKBOX.className);
|
|
4467
4688
|
const [innerData, setInnerData] = React.useState([]);
|
|
4468
4689
|
const [innerKeyNames, setInnerKeyNames] = React.useState({
|
|
4469
4690
|
id: 'id',
|
|
@@ -4496,11 +4717,11 @@ const Checkbox = ({
|
|
|
4496
4717
|
React.useEffect(() => {
|
|
4497
4718
|
if (typeof keyNames === 'object' && keyNames !== null && !Array.isArray(keyNames)) {
|
|
4498
4719
|
setInnerKeyNames({
|
|
4499
|
-
id: keyNames.id
|
|
4500
|
-
label: keyNames.label
|
|
4501
|
-
checked: keyNames.checked
|
|
4502
|
-
disabled: keyNames.disabled
|
|
4503
|
-
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked
|
|
4720
|
+
id: keyNames.id ?? 'id',
|
|
4721
|
+
label: keyNames.label ?? 'label',
|
|
4722
|
+
checked: keyNames.checked ?? 'checked',
|
|
4723
|
+
disabled: keyNames.disabled ?? 'disabled',
|
|
4724
|
+
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked ?? 'ignoreDisabledForChecked'
|
|
4504
4725
|
});
|
|
4505
4726
|
}
|
|
4506
4727
|
}, [keyNames]);
|
|
@@ -4516,21 +4737,21 @@ const Checkbox = ({
|
|
|
4516
4737
|
key: `TUI_${index}_checkbox`,
|
|
4517
4738
|
style: {
|
|
4518
4739
|
width: 'fit-content',
|
|
4519
|
-
marginBottom: direction === 'vertical' ? checkBoxMarginBottom
|
|
4740
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ?? merge.CHECKBOX.marginBottom : '0px'
|
|
4520
4741
|
}
|
|
4521
4742
|
}, /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
|
|
4522
4743
|
data: item,
|
|
4523
4744
|
index: index,
|
|
4524
|
-
checkedColor: "#00236A",
|
|
4525
|
-
unCheckedColor: "#D1D1D1",
|
|
4526
|
-
checkedIcon: checkedIcon,
|
|
4527
|
-
unCheckedIcon: unCheckedIcon,
|
|
4528
4745
|
handleChecked: handleSendData,
|
|
4529
4746
|
label: item[innerKeyNames.label],
|
|
4530
4747
|
checked: item[innerKeyNames.checked],
|
|
4531
4748
|
disabled: item[innerKeyNames.disabled],
|
|
4532
4749
|
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
4533
|
-
labelMarginLeft: labelMarginLeft
|
|
4750
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.label.marginLeft,
|
|
4751
|
+
checkedColor: checkedColor ?? merge.CHECKBOX.colors.checked,
|
|
4752
|
+
unCheckedColor: unCheckedColor ?? merge.CHECKBOX.colors.unChecked,
|
|
4753
|
+
checkedIcon: checkedIcon ?? merge.CHECKBOX.checkedIcon,
|
|
4754
|
+
unCheckedIcon: unCheckedIcon ?? merge.CHECKBOX.unCheckedIcon
|
|
4534
4755
|
}));
|
|
4535
4756
|
}));
|
|
4536
4757
|
};
|
|
@@ -4540,6 +4761,8 @@ Checkbox.propTypes = {
|
|
|
4540
4761
|
checkedIcon: PropTypes__default["default"].element,
|
|
4541
4762
|
unCheckedIcon: PropTypes__default["default"].element,
|
|
4542
4763
|
labelMarginLeft: PropTypes__default["default"].string,
|
|
4764
|
+
checkedColor: PropTypes__default["default"].string,
|
|
4765
|
+
unCheckedColor: PropTypes__default["default"].string,
|
|
4543
4766
|
checkBoxMarginBottom: PropTypes__default["default"].string,
|
|
4544
4767
|
direction: PropTypes__default["default"].oneOf(Object.values(DirectionMode)),
|
|
4545
4768
|
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
|
|
@@ -4557,6 +4780,9 @@ const PositionSide = {
|
|
|
4557
4780
|
};
|
|
4558
4781
|
const Textarea = ({
|
|
4559
4782
|
size,
|
|
4783
|
+
style,
|
|
4784
|
+
family,
|
|
4785
|
+
weight,
|
|
4560
4786
|
label,
|
|
4561
4787
|
width,
|
|
4562
4788
|
value,
|
|
@@ -4576,6 +4802,9 @@ const Textarea = ({
|
|
|
4576
4802
|
maxLength,
|
|
4577
4803
|
labelSize,
|
|
4578
4804
|
errorSize,
|
|
4805
|
+
errorStyle,
|
|
4806
|
+
errorWeight,
|
|
4807
|
+
errorFamily,
|
|
4579
4808
|
marginTop,
|
|
4580
4809
|
className,
|
|
4581
4810
|
labelColor,
|
|
@@ -4592,8 +4821,7 @@ const Textarea = ({
|
|
|
4592
4821
|
showCharacterCount,
|
|
4593
4822
|
characterCountPosition
|
|
4594
4823
|
}) => {
|
|
4595
|
-
const
|
|
4596
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TEXTAREA.className);
|
|
4824
|
+
const classProps = classnames__default["default"](className ?? merge.TEXTAREA.className);
|
|
4597
4825
|
const [error, setError] = React.useState('');
|
|
4598
4826
|
const [isHover, setIsHover] = React.useState(false);
|
|
4599
4827
|
const [isFocus, setIsFocus] = React.useState(false);
|
|
@@ -4618,31 +4846,30 @@ const Textarea = ({
|
|
|
4618
4846
|
onChange(value.substr(0, maxLength));
|
|
4619
4847
|
}
|
|
4620
4848
|
} else {
|
|
4621
|
-
if (value.length >
|
|
4622
|
-
onChange(value.substr(0,
|
|
4849
|
+
if (value.length > merge.TEXTAREA.maxLength) {
|
|
4850
|
+
onChange(value.substr(0, merge.TEXTAREA.maxLength));
|
|
4623
4851
|
}
|
|
4624
4852
|
}
|
|
4625
4853
|
};
|
|
4626
4854
|
React.useEffect(() => {
|
|
4627
|
-
if (value === undefined) {
|
|
4628
|
-
alert('Please add value prop on Textarea component');
|
|
4629
|
-
}
|
|
4630
4855
|
if (!onChange) {
|
|
4631
4856
|
alert('Please add onChange function on Textarea component');
|
|
4632
4857
|
}
|
|
4858
|
+
}, [onChange]);
|
|
4859
|
+
React.useEffect(() => {
|
|
4860
|
+
if (value === undefined) {
|
|
4861
|
+
alert('Please add value prop on Textarea component');
|
|
4862
|
+
}
|
|
4633
4863
|
if (errorMessage) {
|
|
4634
|
-
setError(errorMessage);
|
|
4864
|
+
value === '' ? setError(errorMessage) : setError('');
|
|
4635
4865
|
} else {
|
|
4636
4866
|
setError('');
|
|
4637
4867
|
}
|
|
4638
|
-
if (value === '') {
|
|
4639
|
-
setError('');
|
|
4640
|
-
}
|
|
4641
4868
|
setInnerValue(value);
|
|
4642
|
-
}, [value,
|
|
4869
|
+
}, [value, errorMessage]);
|
|
4643
4870
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4644
4871
|
style: {
|
|
4645
|
-
width: width
|
|
4872
|
+
width: width ?? merge.TEXTAREA.width
|
|
4646
4873
|
},
|
|
4647
4874
|
className: classProps
|
|
4648
4875
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4650,40 +4877,38 @@ const Textarea = ({
|
|
|
4650
4877
|
display: 'flex',
|
|
4651
4878
|
alignItems: 'center',
|
|
4652
4879
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
4653
|
-
|
|
4654
|
-
|
|
4880
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4881
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4882
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family,
|
|
4883
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4884
|
+
marginBottom: labelMarginBottom ?? merge.TEXTAREA.label.marginBottom
|
|
4655
4885
|
}
|
|
4656
4886
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4657
4887
|
style: {
|
|
4658
|
-
|
|
4659
|
-
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
|
|
4660
|
-
display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
|
|
4661
|
-
fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
|
|
4662
|
-
}
|
|
4663
|
-
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4664
|
-
style: {
|
|
4665
|
-
color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
|
|
4666
|
-
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize
|
|
4888
|
+
display: labelDisplay ?? merge.TEXTAREA.label.display
|
|
4667
4889
|
}
|
|
4668
|
-
}, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
4890
|
+
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default["default"].createElement("span", null, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
4669
4891
|
style: {
|
|
4670
4892
|
width: '100%',
|
|
4671
4893
|
border: 'none',
|
|
4672
4894
|
outline: 'none',
|
|
4673
4895
|
overflow: 'auto',
|
|
4674
4896
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4675
|
-
fontSize: size
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4897
|
+
fontSize: size ?? merge.TEXTAREA.font.size,
|
|
4898
|
+
fontStyle: style ?? merge.TEXTAREA.font.style,
|
|
4899
|
+
fontFamily: family ?? merge.TEXTAREA.font.family,
|
|
4900
|
+
fontWeight: weight ?? merge.TEXTAREA.font.weight,
|
|
4901
|
+
height: height ?? merge.TEXTAREA.height,
|
|
4902
|
+
padding: padding ?? merge.TEXTAREA.padding,
|
|
4903
|
+
borderRadius: radius ?? merge.TEXTAREA.radius,
|
|
4904
|
+
minWidth: minWidth ?? merge.TEXTAREA.minWidth,
|
|
4905
|
+
maxWidth: maxWidth ?? merge.TEXTAREA.maxWidth,
|
|
4906
|
+
minHeight: minHeight ?? merge.TEXTAREA.minHeight,
|
|
4907
|
+
maxHeight: maxHeight ?? merge.TEXTAREA.maxHeight,
|
|
4908
|
+
boxSizing: boxSizing ?? merge.TEXTAREA.box.sizing,
|
|
4909
|
+
backgroundColor: backgroundColor ?? merge.TEXTAREA.colors.background,
|
|
4910
|
+
boxShadow: error ? errorColor ? `0 0 0 2px ${errorColor}` : merge.TEXTAREA.error.box.shadow : isFocus ? borderFocusColor ? `0 0 0 2px ${borderFocusColor}` : merge.TEXTAREA.box.colors.focus : isHover ? borderHoverColor ? `0 0 0 2px ${borderHoverColor}` : merge.TEXTAREA.box.colors.hover : boxShadow ? boxShadow : merge.INPUT.box.shadow,
|
|
4911
|
+
resize: resize ? resize : merge.TEXTAREA.resize
|
|
4687
4912
|
},
|
|
4688
4913
|
value: innerValue,
|
|
4689
4914
|
disabled: disabled,
|
|
@@ -4699,26 +4924,34 @@ const Textarea = ({
|
|
|
4699
4924
|
}
|
|
4700
4925
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4701
4926
|
style: {
|
|
4702
|
-
color: labelColor
|
|
4703
|
-
fontSize: labelSize
|
|
4927
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4928
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4929
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4930
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family
|
|
4704
4931
|
}
|
|
4705
4932
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4706
4933
|
style: {
|
|
4707
4934
|
clear: 'both',
|
|
4708
4935
|
wordBreak: 'break-all',
|
|
4709
|
-
maxWidth: width
|
|
4936
|
+
maxWidth: width ?? merge.TEXTAREA.width
|
|
4710
4937
|
}
|
|
4711
4938
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4712
4939
|
style: {
|
|
4713
4940
|
display: 'inline-block',
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4941
|
+
color: errorColor ?? merge.TEXTAREA.error.color,
|
|
4942
|
+
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4943
|
+
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4944
|
+
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
|
4945
|
+
fontFamily: errorFamily ?? merge.TEXTAREA.error.font.family,
|
|
4946
|
+
marginTop: marginTop ?? merge.TEXTAREA.error.marginTop
|
|
4717
4947
|
}
|
|
4718
4948
|
}, error)) : '');
|
|
4719
4949
|
};
|
|
4720
4950
|
Textarea.propTypes = {
|
|
4721
4951
|
size: PropTypes__default["default"].string,
|
|
4952
|
+
style: PropTypes__default["default"].string,
|
|
4953
|
+
family: PropTypes__default["default"].string,
|
|
4954
|
+
weight: PropTypes__default["default"].string,
|
|
4722
4955
|
label: PropTypes__default["default"].string,
|
|
4723
4956
|
width: PropTypes__default["default"].string,
|
|
4724
4957
|
height: PropTypes__default["default"].string,
|
|
@@ -4737,6 +4970,9 @@ Textarea.propTypes = {
|
|
|
4737
4970
|
maxLength: PropTypes__default["default"].number,
|
|
4738
4971
|
labelSize: PropTypes__default["default"].string,
|
|
4739
4972
|
errorSize: PropTypes__default["default"].string,
|
|
4973
|
+
errorStyle: PropTypes__default["default"].string,
|
|
4974
|
+
errorWeight: PropTypes__default["default"].string,
|
|
4975
|
+
errorFamily: PropTypes__default["default"].string,
|
|
4740
4976
|
className: PropTypes__default["default"].string,
|
|
4741
4977
|
labelColor: PropTypes__default["default"].string,
|
|
4742
4978
|
errorColor: PropTypes__default["default"].string,
|
|
@@ -4793,8 +5029,7 @@ const Typography = ({
|
|
|
4793
5029
|
backgroundColor,
|
|
4794
5030
|
...props
|
|
4795
5031
|
}) => {
|
|
4796
|
-
const
|
|
4797
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TYPOGRAPHY.className);
|
|
5032
|
+
const classProps = classnames__default["default"](className ?? merge.TYPOGRAPHY.className);
|
|
4798
5033
|
const [isHover, setIsHover] = React.useState(false);
|
|
4799
5034
|
const [validVariant, setValidVariant] = React.useState(false);
|
|
4800
5035
|
const handleMouseEnter = () => {
|
|
@@ -4805,20 +5040,20 @@ const Typography = ({
|
|
|
4805
5040
|
};
|
|
4806
5041
|
const tagT = /*#__PURE__*/React__default["default"].createElement(variant, {
|
|
4807
5042
|
style: {
|
|
4808
|
-
border: border
|
|
4809
|
-
cursor: cursor
|
|
4810
|
-
borderRadius: radius
|
|
4811
|
-
fontSize: size
|
|
4812
|
-
fontWeight: weight
|
|
4813
|
-
textShadow: textShadow
|
|
4814
|
-
textAlign: textAlign
|
|
4815
|
-
fontStyle: fontStyle
|
|
4816
|
-
lineHeight: lineHeight
|
|
4817
|
-
fontFamily: fontFamily
|
|
4818
|
-
textTransform: textTransform
|
|
4819
|
-
textDecoration: textDecoration
|
|
4820
|
-
backgroundColor: backgroundColor
|
|
4821
|
-
color: isHover ? colorHover ? colorHover : color ? color :
|
|
5043
|
+
border: border ?? merge.TYPOGRAPHY.border,
|
|
5044
|
+
cursor: cursor ?? merge.TYPOGRAPHY.cursor,
|
|
5045
|
+
borderRadius: radius ?? merge.TYPOGRAPHY.radius,
|
|
5046
|
+
fontSize: size ?? merge.TYPOGRAPHY.font['size' + variant],
|
|
5047
|
+
fontWeight: weight ?? merge.TYPOGRAPHY.font['weight' + variant],
|
|
5048
|
+
textShadow: textShadow ?? merge.TYPOGRAPHY.text['shadow' + variant],
|
|
5049
|
+
textAlign: textAlign ?? merge.TYPOGRAPHY.text['align' + variant],
|
|
5050
|
+
fontStyle: fontStyle ?? merge.TYPOGRAPHY.font['style' + variant],
|
|
5051
|
+
lineHeight: lineHeight ?? merge.TYPOGRAPHY.text['lineHeight' + variant],
|
|
5052
|
+
fontFamily: fontFamily ?? merge.TYPOGRAPHY.font['family' + variant],
|
|
5053
|
+
textTransform: textTransform ?? merge.TYPOGRAPHY.text['transform' + variant],
|
|
5054
|
+
textDecoration: textDecoration ?? merge.TYPOGRAPHY.text['decoration' + variant],
|
|
5055
|
+
backgroundColor: backgroundColor ?? merge.TYPOGRAPHY.colors['background' + variant],
|
|
5056
|
+
color: isHover ? colorHover ? colorHover : color ? color : merge.TYPOGRAPHY.colors[variant] : color ? color : merge.TYPOGRAPHY.colors[variant]
|
|
4822
5057
|
},
|
|
4823
5058
|
...props,
|
|
4824
5059
|
className: classProps,
|
|
@@ -4948,7 +5183,6 @@ const Pagination = ({
|
|
|
4948
5183
|
totalCount,
|
|
4949
5184
|
currentPage
|
|
4950
5185
|
}) => {
|
|
4951
|
-
const configStyles = compereConfigs();
|
|
4952
5186
|
const [inpVal, setInpVal] = React.useState('');
|
|
4953
5187
|
const [error, setError] = React.useState(false);
|
|
4954
5188
|
const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
|
|
@@ -4977,7 +5211,7 @@ const Pagination = ({
|
|
|
4977
5211
|
}
|
|
4978
5212
|
const classProps = classnames__default["default"](
|
|
4979
5213
|
// TODO: check and remove pagination-bar-rem class
|
|
4980
|
-
styles$1.list, className
|
|
5214
|
+
styles$1.list, className ?? merge.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`);
|
|
4981
5215
|
const onNext = () => {
|
|
4982
5216
|
onPageChange(currentPageNumber + 1);
|
|
4983
5217
|
};
|
|
@@ -5121,7 +5355,11 @@ const Autocomplete = ({
|
|
|
5121
5355
|
selected,
|
|
5122
5356
|
className,
|
|
5123
5357
|
errorSize,
|
|
5358
|
+
errorStyle,
|
|
5359
|
+
errorWeight,
|
|
5360
|
+
errorFamily,
|
|
5124
5361
|
labelSize,
|
|
5362
|
+
labelStyle,
|
|
5125
5363
|
marginTop,
|
|
5126
5364
|
errorColor,
|
|
5127
5365
|
labelColor,
|
|
@@ -5133,6 +5371,8 @@ const Autocomplete = ({
|
|
|
5133
5371
|
labelDisplay,
|
|
5134
5372
|
contentDisplay,
|
|
5135
5373
|
contentTopSize,
|
|
5374
|
+
contentTopStyle,
|
|
5375
|
+
contentTopFamily,
|
|
5136
5376
|
contentPosition,
|
|
5137
5377
|
contentTopColor,
|
|
5138
5378
|
labelLineHeight,
|
|
@@ -5195,15 +5435,14 @@ const Autocomplete = ({
|
|
|
5195
5435
|
const [innerError, setInnerError] = React.useState('');
|
|
5196
5436
|
const [innerValue, setInnerValue] = React.useState('');
|
|
5197
5437
|
const [innerOptions, setInnerOptions] = React.useState([]);
|
|
5198
|
-
const
|
|
5199
|
-
const classProps = classnames__default["default"](className ? className : configStyles.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5438
|
+
const classProps = classnames__default["default"](className ?? merge.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5200
5439
|
const showOption = styled.keyframes`
|
|
5201
5440
|
100% {
|
|
5202
5441
|
max-height: 400px;
|
|
5203
5442
|
}
|
|
5204
5443
|
`;
|
|
5205
5444
|
const animation = () => styled.css`
|
|
5206
|
-
${showOption} ${showOptionDuration
|
|
5445
|
+
${showOption} ${showOptionDuration ?? merge.AUTOCOMPLETE.showOptionDuration} linear forwards
|
|
5207
5446
|
`;
|
|
5208
5447
|
const handleMouseEnter = () => {
|
|
5209
5448
|
setIsHover(true);
|
|
@@ -5212,12 +5451,12 @@ const Autocomplete = ({
|
|
|
5212
5451
|
setIsHover(false);
|
|
5213
5452
|
};
|
|
5214
5453
|
const handleRowMouseEnter = e => {
|
|
5215
|
-
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor :
|
|
5216
|
-
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor :
|
|
5454
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : merge.AUTOCOMPLETE.contentBottom.row.colors.hover;
|
|
5455
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover;
|
|
5217
5456
|
};
|
|
5218
5457
|
const handleRowMouseLeave = e => {
|
|
5219
|
-
e.target.style.color = contentBottomRowColor ? contentBottomRowColor :
|
|
5220
|
-
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5458
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color;
|
|
5459
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background;
|
|
5221
5460
|
};
|
|
5222
5461
|
const handleFocus = () => {
|
|
5223
5462
|
setIsFocus(true);
|
|
@@ -5236,11 +5475,6 @@ const Autocomplete = ({
|
|
|
5236
5475
|
name: value,
|
|
5237
5476
|
id: currentId
|
|
5238
5477
|
});
|
|
5239
|
-
} else {
|
|
5240
|
-
change({
|
|
5241
|
-
name: '',
|
|
5242
|
-
id: ''
|
|
5243
|
-
});
|
|
5244
5478
|
}
|
|
5245
5479
|
};
|
|
5246
5480
|
const handleClick = selectedValue => {
|
|
@@ -5249,28 +5483,28 @@ const Autocomplete = ({
|
|
|
5249
5483
|
setInnerValue(selectedValue[keyNames.name]);
|
|
5250
5484
|
getItem(selectedValue);
|
|
5251
5485
|
};
|
|
5252
|
-
const optionList = /*#__PURE__*/React__default["default"].createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5486
|
+
const optionList = /*#__PURE__*/React__default["default"].createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 && innerValue.length >= searchCount ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5253
5487
|
style: {
|
|
5254
|
-
left: contentBottomLeft
|
|
5255
|
-
width: contentBottomWidth
|
|
5256
|
-
zIndex: contentBottomZindex
|
|
5257
|
-
borderRadius: contentBottomRadius
|
|
5258
|
-
maxWidth: contentBottomMaxWidth
|
|
5259
|
-
overflow: contentBottomOverflow
|
|
5260
|
-
position: contentBottomPosition
|
|
5261
|
-
minHeight: contentBottomMinHeight
|
|
5262
|
-
boxShadow: contentBottomBoxShadow
|
|
5263
|
-
backgroundColor: contentBottomBackgroundColor
|
|
5264
|
-
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' :
|
|
5488
|
+
left: contentBottomLeft ?? merge.AUTOCOMPLETE.contentBottom.left,
|
|
5489
|
+
width: contentBottomWidth ?? merge.AUTOCOMPLETE.contentBottom.width,
|
|
5490
|
+
zIndex: contentBottomZindex ?? merge.AUTOCOMPLETE.contentBottom.zIndex,
|
|
5491
|
+
borderRadius: contentBottomRadius ?? merge.AUTOCOMPLETE.contentBottom.radius,
|
|
5492
|
+
maxWidth: contentBottomMaxWidth ?? merge.AUTOCOMPLETE.contentBottom.maxWidth,
|
|
5493
|
+
overflow: contentBottomOverflow ?? merge.AUTOCOMPLETE.contentBottom.overflow,
|
|
5494
|
+
position: contentBottomPosition ?? merge.AUTOCOMPLETE.contentBottom.position,
|
|
5495
|
+
minHeight: contentBottomMinHeight ?? merge.AUTOCOMPLETE.contentBottom.minHeight,
|
|
5496
|
+
boxShadow: contentBottomBoxShadow ?? merge.AUTOCOMPLETE.contentBottom.box.shadow,
|
|
5497
|
+
backgroundColor: contentBottomBackgroundColor ?? merge.AUTOCOMPLETE.contentBottom.colors.background,
|
|
5498
|
+
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' : merge.AUTOCOMPLETE.height.includes('rem') ? parseFloat(merge.AUTOCOMPLETE.height.substr(0, merge.AUTOCOMPLETE.height.length - 3)) + 0.6 + 'rem' : parseFloat(merge.AUTOCOMPLETE.height.substr(0, merge.AUTOCOMPLETE.height.length - 2)) + 6 + 'px',
|
|
5265
5499
|
animation
|
|
5266
5500
|
}
|
|
5267
5501
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5268
5502
|
style: {
|
|
5269
|
-
display: contentBottomInnerDisplay ? contentBottomInnerDisplay :
|
|
5270
|
-
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY :
|
|
5271
|
-
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX :
|
|
5272
|
-
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight :
|
|
5273
|
-
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection :
|
|
5503
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : merge.AUTOCOMPLETE.contentBottom.inner.display,
|
|
5504
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : merge.AUTOCOMPLETE.contentBottom.inner.overflowY,
|
|
5505
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : merge.AUTOCOMPLETE.contentBottom.inner.overflowX,
|
|
5506
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : merge.AUTOCOMPLETE.contentBottom.inner.maxHeight,
|
|
5507
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : merge.AUTOCOMPLETE.contentBottom.inner.direction
|
|
5274
5508
|
}
|
|
5275
5509
|
}, innerOptions.map(item => {
|
|
5276
5510
|
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -5280,34 +5514,37 @@ const Autocomplete = ({
|
|
|
5280
5514
|
onClick: () => handleClick(item),
|
|
5281
5515
|
style: {
|
|
5282
5516
|
flexShrink: 0,
|
|
5283
|
-
color: contentBottomRowColor ? contentBottomRowColor :
|
|
5284
|
-
height: contentBottomRowHeight ? contentBottomRowHeight :
|
|
5285
|
-
cursor: contentBottomRowCursor ? contentBottomRowCursor :
|
|
5286
|
-
display: contentBottomRowDisplay ? contentBottomRowDisplay :
|
|
5287
|
-
padding: contentBottomRowPadding ? contentBottomRowPadding :
|
|
5288
|
-
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize :
|
|
5289
|
-
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing :
|
|
5290
|
-
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight :
|
|
5291
|
-
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight :
|
|
5292
|
-
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems :
|
|
5293
|
-
transition: contentBottomRowTransition ? contentBottomRowTransition :
|
|
5294
|
-
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom :
|
|
5295
|
-
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5517
|
+
color: contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color,
|
|
5518
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5519
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : merge.AUTOCOMPLETE.contentBottom.row.cursor,
|
|
5520
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : merge.AUTOCOMPLETE.contentBottom.row.display,
|
|
5521
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : merge.AUTOCOMPLETE.contentBottom.row.padding,
|
|
5522
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : merge.AUTOCOMPLETE.contentBottom.row.font.size,
|
|
5523
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : merge.AUTOCOMPLETE.contentBottom.box.sizing,
|
|
5524
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : merge.AUTOCOMPLETE.contentBottom.row.font.weight,
|
|
5525
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5526
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : merge.AUTOCOMPLETE.contentBottom.row.alignItems,
|
|
5527
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : merge.AUTOCOMPLETE.contentBottom.row.transition,
|
|
5528
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : merge.AUTOCOMPLETE.contentBottom.row.marginBottom,
|
|
5529
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
5296
5530
|
}
|
|
5297
5531
|
}, item[keyNames.name]);
|
|
5298
|
-
}))) :
|
|
5532
|
+
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5299
5533
|
style: {
|
|
5300
5534
|
position: 'absolute',
|
|
5301
5535
|
zIndex: '1',
|
|
5302
|
-
color: errorColor
|
|
5303
|
-
fontSize: errorSize
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5536
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5537
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5538
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5539
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5540
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5541
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5542
|
+
padding: innerErrorPadding ?? merge.AUTOCOMPLETE.innerError.padding,
|
|
5543
|
+
height: contentBottomRowHeight ?? merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5544
|
+
lineHeight: contentBottomRowLineHeight ?? merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5545
|
+
backgroundColor: innerErrorBackgroundColor ?? merge.AUTOCOMPLETE.innerError.colors.background
|
|
5546
|
+
}
|
|
5547
|
+
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
5311
5548
|
React.useEffect(() => {
|
|
5312
5549
|
if (options === undefined) {
|
|
5313
5550
|
alert('Please add options prop');
|
|
@@ -5343,22 +5580,23 @@ const Autocomplete = ({
|
|
|
5343
5580
|
className: classProps
|
|
5344
5581
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
5345
5582
|
style: {
|
|
5346
|
-
color: labelColor
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5583
|
+
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
5584
|
+
display: labelDisplay ?? merge.AUTOCOMPLETE.label.display,
|
|
5585
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5586
|
+
fontSize: labelSize ?? merge.AUTOCOMPLETE.label.font.size,
|
|
5587
|
+
fontStyle: labelStyle ?? merge.AUTOCOMPLETE.label.font.style,
|
|
5588
|
+
fontWeight: labelWeight ?? merge.AUTOCOMPLETE.label.font.weight,
|
|
5589
|
+
fontFamily: labelFontFamily ?? merge.AUTOCOMPLETE.label.font.family,
|
|
5590
|
+
lineHeight: labelLineHeight ?? merge.AUTOCOMPLETE.label.lineHeight,
|
|
5591
|
+
marginBottom: labelMarginBottom ?? merge.AUTOCOMPLETE.label.marginBottom,
|
|
5592
|
+
textTransform: labelTextTransform ?? merge.AUTOCOMPLETE.label.textTransform
|
|
5355
5593
|
}
|
|
5356
5594
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5357
5595
|
style: {
|
|
5358
|
-
display: contentDisplay
|
|
5359
|
-
position: contentPosition
|
|
5360
|
-
|
|
5361
|
-
|
|
5596
|
+
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5597
|
+
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5598
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5599
|
+
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5362
5600
|
}
|
|
5363
5601
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
5364
5602
|
id: id,
|
|
@@ -5370,35 +5608,40 @@ const Autocomplete = ({
|
|
|
5370
5608
|
onInput: handleChange,
|
|
5371
5609
|
onMouseEnter: handleMouseEnter,
|
|
5372
5610
|
onMouseLeave: handleMouseLeave,
|
|
5373
|
-
placeholder: placeHolder
|
|
5374
|
-
autoComplete: autoComplete
|
|
5611
|
+
placeholder: placeHolder ?? '',
|
|
5612
|
+
autoComplete: autoComplete ?? merge.AUTOCOMPLETE.autoComplete,
|
|
5375
5613
|
style: {
|
|
5376
5614
|
border: 'none',
|
|
5377
5615
|
outline: 'none',
|
|
5378
5616
|
maxWidth: '100%',
|
|
5379
5617
|
transition: 'all 240ms',
|
|
5380
5618
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5381
|
-
color: contentTopColor
|
|
5382
|
-
fontSize: contentTopSize
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5619
|
+
color: contentTopColor ?? merge.AUTOCOMPLETE.color,
|
|
5620
|
+
fontSize: contentTopSize ?? merge.AUTOCOMPLETE.font.size,
|
|
5621
|
+
fontStyle: contentTopStyle ?? merge.AUTOCOMPLETE.font.style,
|
|
5622
|
+
fontFamily: contentTopFamily ?? merge.AUTOCOMPLETE.font.family,
|
|
5623
|
+
fontWeight: contentTopWeight ?? merge.AUTOCOMPLETE.font.weight,
|
|
5624
|
+
backgroundColor: disabled && (backgroundDisableColor ?? merge.AUTOCOMPLETE.colors.backgroundDisable),
|
|
5625
|
+
height: contentTopHeight ?? merge.AUTOCOMPLETE.height,
|
|
5626
|
+
padding: contentTopPadding ?? merge.AUTOCOMPLETE.padding,
|
|
5627
|
+
display: contentTopDisplay ?? merge.AUTOCOMPLETE.display,
|
|
5628
|
+
borderRadius: contentTopRadius ?? merge.AUTOCOMPLETE.radius,
|
|
5629
|
+
boxSizing: contentTopBoxSizing ?? merge.AUTOCOMPLETE.box.sizing,
|
|
5630
|
+
lineHeight: contentTopLineHeight ?? merge.AUTOCOMPLETE.lineHeight,
|
|
5631
|
+
flexDirection: contentTopDirection ?? merge.AUTOCOMPLETE.direction,
|
|
5632
|
+
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : merge.AUTOCOMPLETE.error.box.shadow : isFocus ? contentTopBorderActive ? contentTopBorderActive : merge.AUTOCOMPLETE.box.shadowActive : isHover ? contentTopBorderHover ? contentTopBorderHover : merge.AUTOCOMPLETE.box.shadowHover : contentTopBorder ? contentTopBorder : merge.AUTOCOMPLETE.box.shadow
|
|
5393
5633
|
}
|
|
5394
5634
|
}, props)), innerError ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5395
5635
|
style: {
|
|
5396
5636
|
left: '0px',
|
|
5397
5637
|
position: 'absolute',
|
|
5398
|
-
color: errorColor
|
|
5399
|
-
fontSize: errorSize
|
|
5400
|
-
|
|
5401
|
-
|
|
5638
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5639
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5640
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5641
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5642
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5643
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5644
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5402
5645
|
}
|
|
5403
5646
|
}, innerError) : '', optionList));
|
|
5404
5647
|
};
|
|
@@ -5410,8 +5653,12 @@ Autocomplete.propTypes = {
|
|
|
5410
5653
|
selected: PropTypes__default["default"].object,
|
|
5411
5654
|
className: PropTypes__default["default"].string,
|
|
5412
5655
|
errorSize: PropTypes__default["default"].string,
|
|
5656
|
+
errorStyle: PropTypes__default["default"].string,
|
|
5657
|
+
errorWeight: PropTypes__default["default"].string,
|
|
5658
|
+
errorFamily: PropTypes__default["default"].string,
|
|
5413
5659
|
marginTop: PropTypes__default["default"].string,
|
|
5414
5660
|
labelSize: PropTypes__default["default"].string,
|
|
5661
|
+
labelStyle: PropTypes__default["default"].string,
|
|
5415
5662
|
errorColor: PropTypes__default["default"].string,
|
|
5416
5663
|
labelColor: PropTypes__default["default"].string,
|
|
5417
5664
|
searchCount: PropTypes__default["default"].number,
|
|
@@ -5422,6 +5669,8 @@ Autocomplete.propTypes = {
|
|
|
5422
5669
|
autoComplete: PropTypes__default["default"].string,
|
|
5423
5670
|
contentDisplay: PropTypes__default["default"].string,
|
|
5424
5671
|
contentTopSize: PropTypes__default["default"].string,
|
|
5672
|
+
contentTopStyle: PropTypes__default["default"].string,
|
|
5673
|
+
contentTopFamily: PropTypes__default["default"].string,
|
|
5425
5674
|
contentPosition: PropTypes__default["default"].string,
|
|
5426
5675
|
labelLineHeight: PropTypes__default["default"].string,
|
|
5427
5676
|
contentTopColor: PropTypes__default["default"].string,
|
|
@@ -5481,7 +5730,11 @@ Autocomplete.propTypes = {
|
|
|
5481
5730
|
};
|
|
5482
5731
|
Autocomplete.defaultProps = {
|
|
5483
5732
|
searchCount: 3,
|
|
5484
|
-
disabled: false
|
|
5733
|
+
disabled: false,
|
|
5734
|
+
keyNames: {
|
|
5735
|
+
name: 'name',
|
|
5736
|
+
id: 'id'
|
|
5737
|
+
}
|
|
5485
5738
|
};
|
|
5486
5739
|
|
|
5487
5740
|
exports.Autocomplete = Autocomplete;
|