@xaypay/tui 0.0.122 → 0.1.0
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 +804 -548
- package/dist/index.js +804 -548
- package/package.json +1 -1
- package/tui.config.js +772 -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,19 +2644,17 @@ 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,
|
|
2531
|
-
layerBackgroundColor
|
|
2651
|
+
layerBackgroundColor,
|
|
2652
|
+
closeAreaBackgroundColor
|
|
2532
2653
|
}) => {
|
|
2533
2654
|
const [select, setSelect] = React.useState(0);
|
|
2534
2655
|
const [isHover, setIsHover] = React.useState(false);
|
|
2535
2656
|
const [innerData, setInnerData] = React.useState([]);
|
|
2536
|
-
const
|
|
2537
|
-
const classProps = classnames__default["default"](className ? className : configStyles.MODAL.className);
|
|
2657
|
+
const classProps = classnames__default["default"](className ?? merge.MODAL.className);
|
|
2538
2658
|
const handleCloseModal = () => {
|
|
2539
2659
|
setShow(false);
|
|
2540
2660
|
};
|
|
@@ -2606,7 +2726,7 @@ const Modal = ({
|
|
|
2606
2726
|
}, []);
|
|
2607
2727
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2608
2728
|
className: classProps,
|
|
2609
|
-
onClick: outsideClose ||
|
|
2729
|
+
onClick: outsideClose || merge.MODAL.outsideClose ? handleCloseModal : _ => _,
|
|
2610
2730
|
style: {
|
|
2611
2731
|
top: '0px',
|
|
2612
2732
|
left: '0px',
|
|
@@ -2614,7 +2734,7 @@ const Modal = ({
|
|
|
2614
2734
|
width: '100%',
|
|
2615
2735
|
height: '100vh',
|
|
2616
2736
|
position: 'fixed',
|
|
2617
|
-
backgroundColor: layerBackgroundColor
|
|
2737
|
+
backgroundColor: layerBackgroundColor ?? merge.MODAL.colors.backgroundLayer
|
|
2618
2738
|
}
|
|
2619
2739
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2620
2740
|
style: {
|
|
@@ -2622,8 +2742,8 @@ const Modal = ({
|
|
|
2622
2742
|
display: 'flex',
|
|
2623
2743
|
width: '100%',
|
|
2624
2744
|
height: '100vh',
|
|
2625
|
-
alignItems: alignItems
|
|
2626
|
-
justifyContent: justifyContent
|
|
2745
|
+
alignItems: alignItems ?? merge.MODAL.alignItems,
|
|
2746
|
+
justifyContent: justifyContent ?? merge.MODAL.justifyContent
|
|
2627
2747
|
}
|
|
2628
2748
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2629
2749
|
className: `${styles$8['animation__modal']}`,
|
|
@@ -2632,16 +2752,16 @@ const Modal = ({
|
|
|
2632
2752
|
position: 'relative',
|
|
2633
2753
|
boxSizing: 'border-box',
|
|
2634
2754
|
display: type === 'content' ? 'grid' : 'block',
|
|
2635
|
-
width: width
|
|
2755
|
+
width: width ?? merge.MODAL.width,
|
|
2636
2756
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2637
|
-
height: height
|
|
2757
|
+
height: height ?? merge.MODAL.height,
|
|
2638
2758
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2639
|
-
borderRadius: radius
|
|
2640
|
-
maxWidth: mMaxWidth
|
|
2641
|
-
maxHeight: mMaxHeight
|
|
2642
|
-
minWidth: type === 'content' ? minWidth
|
|
2643
|
-
backgroundColor: backgroundColor
|
|
2644
|
-
minHeight: type === 'content' ? minHeight
|
|
2759
|
+
borderRadius: radius ?? merge.MODAL.radius,
|
|
2760
|
+
maxWidth: mMaxWidth ?? merge.MODAL.mMaxWidth,
|
|
2761
|
+
maxHeight: mMaxHeight ?? merge.MODAL.mMaxHeight,
|
|
2762
|
+
minWidth: type === 'content' ? minWidth ?? merge.MODAL.minWidth : '',
|
|
2763
|
+
backgroundColor: backgroundColor ?? merge.MODAL.colors.background,
|
|
2764
|
+
minHeight: type === 'content' ? minHeight ?? merge.MODAL.minHeight : ''
|
|
2645
2765
|
}
|
|
2646
2766
|
}, type === 'content' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2647
2767
|
style: {
|
|
@@ -2651,8 +2771,8 @@ const Modal = ({
|
|
|
2651
2771
|
alignItems: 'center',
|
|
2652
2772
|
boxSizing: 'border-box',
|
|
2653
2773
|
backgroundColor: '#FBFBFB',
|
|
2654
|
-
padding: padding
|
|
2655
|
-
height: headerHeight
|
|
2774
|
+
padding: padding ?? merge.MODAL.padding,
|
|
2775
|
+
height: headerHeight ?? merge.MODAL.header.height,
|
|
2656
2776
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
|
|
2657
2777
|
}
|
|
2658
2778
|
}, headerText && type === 'content' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -2662,9 +2782,11 @@ const Modal = ({
|
|
|
2662
2782
|
whiteSpace: 'nowrap',
|
|
2663
2783
|
textOverflow: 'ellipsis',
|
|
2664
2784
|
margin: '0px 16px 0px 0px',
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
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
|
|
2668
2790
|
}
|
|
2669
2791
|
}, headerText), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2670
2792
|
onClick: handleCloseModal,
|
|
@@ -2673,7 +2795,7 @@ const Modal = ({
|
|
|
2673
2795
|
height: '14px',
|
|
2674
2796
|
cursor: 'pointer'
|
|
2675
2797
|
}
|
|
2676
|
-
}, /*#__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", {
|
|
2677
2799
|
style: {
|
|
2678
2800
|
display: 'flex',
|
|
2679
2801
|
width: '100%',
|
|
@@ -2683,9 +2805,9 @@ const Modal = ({
|
|
|
2683
2805
|
boxSizing: 'border-box',
|
|
2684
2806
|
justifyContent: 'center',
|
|
2685
2807
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2686
|
-
borderWidth: borderWidth
|
|
2687
|
-
borderStyle: borderStyle
|
|
2688
|
-
borderColor: borderColor
|
|
2808
|
+
borderWidth: borderWidth ?? merge.MODAL.border.width,
|
|
2809
|
+
borderStyle: borderStyle ?? merge.MODAL.border.style,
|
|
2810
|
+
borderColor: borderColor ?? merge.MODAL.border.color
|
|
2689
2811
|
},
|
|
2690
2812
|
onMouseEnter: handleMouseEnter,
|
|
2691
2813
|
onMouseLeave: handleMouseLeave
|
|
@@ -2697,8 +2819,8 @@ const Modal = ({
|
|
|
2697
2819
|
width: '100%',
|
|
2698
2820
|
borderTopLeftRadius: '6px',
|
|
2699
2821
|
borderTopRightRadius: '6px',
|
|
2700
|
-
height: grayDecorHeight
|
|
2701
|
-
|
|
2822
|
+
height: grayDecorHeight ?? merge.MODAL.grayDecorHeight,
|
|
2823
|
+
background: closeAreaBackgroundColor ?? merge.MODAL.closeAreaBackgroundColor
|
|
2702
2824
|
}
|
|
2703
2825
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2704
2826
|
onClick: handleCloseModal,
|
|
@@ -2715,10 +2837,9 @@ const Modal = ({
|
|
|
2715
2837
|
cursor: 'pointer',
|
|
2716
2838
|
backgroundColor: 'transparent'
|
|
2717
2839
|
}
|
|
2718
|
-
}, /*#__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", {
|
|
2719
2841
|
style: {
|
|
2720
|
-
|
|
2721
|
-
height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.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) {
|
|
@@ -2730,13 +2851,11 @@ const Modal = ({
|
|
|
2730
2851
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2731
2852
|
style: {
|
|
2732
2853
|
display: 'block',
|
|
2733
|
-
objectFit: '
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight,
|
|
2739
|
-
maxWidth: imageMaxWidth ? imageMaxWidth : configStyles.MODAL.imageMaxWidth
|
|
2854
|
+
objectFit: 'contain',
|
|
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
|
|
2740
2859
|
},
|
|
2741
2860
|
src: item.url
|
|
2742
2861
|
}), isHover && showZoomIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2757,7 +2876,7 @@ const Modal = ({
|
|
|
2757
2876
|
justifyContent: 'center'
|
|
2758
2877
|
},
|
|
2759
2878
|
onClick: () => handleOpenInNewTab(item.url)
|
|
2760
|
-
}, 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)) : '');
|
|
2761
2880
|
}
|
|
2762
2881
|
}
|
|
2763
2882
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
@@ -2774,7 +2893,7 @@ const Modal = ({
|
|
|
2774
2893
|
top: 'calc(50% - 12px)',
|
|
2775
2894
|
backgroundColor: 'transparent'
|
|
2776
2895
|
}
|
|
2777
|
-
}, /*#__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", {
|
|
2778
2897
|
onClick: () => handleGoTo('next'),
|
|
2779
2898
|
style: {
|
|
2780
2899
|
position: 'absolute',
|
|
@@ -2788,7 +2907,7 @@ const Modal = ({
|
|
|
2788
2907
|
top: 'calc(50% - 12px)',
|
|
2789
2908
|
backgroundColor: 'transparent'
|
|
2790
2909
|
}
|
|
2791
|
-
}, /*#__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)))))))));
|
|
2792
2911
|
};
|
|
2793
2912
|
Modal.propTypes = {
|
|
2794
2913
|
data: PropTypes__default["default"].array,
|
|
@@ -2804,11 +2923,17 @@ Modal.propTypes = {
|
|
|
2804
2923
|
minHeight: PropTypes__default["default"].string,
|
|
2805
2924
|
className: PropTypes__default["default"].string,
|
|
2806
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,
|
|
2807
2930
|
alignItems: PropTypes__default["default"].string,
|
|
2808
2931
|
mMaxHeight: PropTypes__default["default"].string,
|
|
2809
2932
|
headerText: PropTypes__default["default"].string,
|
|
2810
2933
|
imageWidth: PropTypes__default["default"].string,
|
|
2811
2934
|
headerSize: PropTypes__default["default"].string,
|
|
2935
|
+
headerStyle: PropTypes__default["default"].string,
|
|
2936
|
+
headerFamily: PropTypes__default["default"].string,
|
|
2812
2937
|
outsideClose: PropTypes__default["default"].bool,
|
|
2813
2938
|
showZoomIcon: PropTypes__default["default"].bool,
|
|
2814
2939
|
imageMargin: PropTypes__default["default"].string,
|
|
@@ -2818,13 +2943,12 @@ Modal.propTypes = {
|
|
|
2818
2943
|
imageHeight: PropTypes__default["default"].string,
|
|
2819
2944
|
headerWeight: PropTypes__default["default"].string,
|
|
2820
2945
|
headerHeight: PropTypes__default["default"].string,
|
|
2821
|
-
imageMaxWidth: PropTypes__default["default"].string,
|
|
2822
2946
|
justifyContent: PropTypes__default["default"].string,
|
|
2823
|
-
imageWrapWidth: PropTypes__default["default"].string,
|
|
2824
2947
|
backgroundColor: PropTypes__default["default"].string,
|
|
2825
2948
|
grayDecorHeight: PropTypes__default["default"].string,
|
|
2826
2949
|
imageWrapHeight: PropTypes__default["default"].string,
|
|
2827
|
-
layerBackgroundColor: PropTypes__default["default"].string
|
|
2950
|
+
layerBackgroundColor: PropTypes__default["default"].string,
|
|
2951
|
+
closeAreaBackgroundColor: PropTypes__default["default"].string
|
|
2828
2952
|
};
|
|
2829
2953
|
Modal.defaultProps = {
|
|
2830
2954
|
type: 'content'
|
|
@@ -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,
|
|
@@ -2894,13 +3024,15 @@ const Input = ({
|
|
|
2894
3024
|
labelLineHeight,
|
|
2895
3025
|
backgroundColor,
|
|
2896
3026
|
telErrorMessage,
|
|
2897
|
-
borderRightColor,
|
|
2898
3027
|
labelMarginBottom,
|
|
2899
3028
|
regexpErrorMessage,
|
|
2900
3029
|
phoneJustifyContent,
|
|
2901
|
-
|
|
3030
|
+
telBorderRightWidth,
|
|
3031
|
+
telBorderRightStyle,
|
|
3032
|
+
telBorderRightColor,
|
|
2902
3033
|
backgroundDisableColor,
|
|
2903
3034
|
errorAnimationDuration,
|
|
3035
|
+
telBorderRightColorHover,
|
|
2904
3036
|
...props
|
|
2905
3037
|
}) => {
|
|
2906
3038
|
const phoneNumberRegex = /^\d+$/;
|
|
@@ -2910,8 +3042,7 @@ const Input = ({
|
|
|
2910
3042
|
const [innerMinNumSize, setInnerMinNumSize] = React.useState(0);
|
|
2911
3043
|
const [innerErrorMessage, setInnerErrorMessage] = React.useState('');
|
|
2912
3044
|
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']);
|
|
3045
|
+
const classProps = classnames__default["default"](className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
2915
3046
|
const errorShow = styled.keyframes`
|
|
2916
3047
|
100% {
|
|
2917
3048
|
bottom: '-20px';
|
|
@@ -2923,7 +3054,7 @@ const Input = ({
|
|
|
2923
3054
|
}
|
|
2924
3055
|
`;
|
|
2925
3056
|
const animation = () => styled.css`
|
|
2926
|
-
${errorShow} ${errorAnimationDuration ? errorAnimationDuration :
|
|
3057
|
+
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : merge.INPUT.error.animationDuration} forwards
|
|
2927
3058
|
`;
|
|
2928
3059
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
2929
3060
|
if (type === 'tel') {
|
|
@@ -2931,7 +3062,7 @@ const Input = ({
|
|
|
2931
3062
|
if (val === '') {
|
|
2932
3063
|
setInnerErrorMessage('');
|
|
2933
3064
|
} else {
|
|
2934
|
-
telErrorMessage ? setInnerErrorMessage(telErrorMessage) : setInnerErrorMessage(
|
|
3065
|
+
telErrorMessage ? setInnerErrorMessage(telErrorMessage) : setInnerErrorMessage(merge.INPUT.error.telMessage);
|
|
2935
3066
|
val = prevVal;
|
|
2936
3067
|
}
|
|
2937
3068
|
} else {
|
|
@@ -3009,7 +3140,7 @@ const Input = ({
|
|
|
3009
3140
|
const handleChange = event => {
|
|
3010
3141
|
let prevValue = innerValue;
|
|
3011
3142
|
let currentValue = event.target.value;
|
|
3012
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3143
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3013
3144
|
currentValue = handleCheckTypeTel(currentValue, prevValue);
|
|
3014
3145
|
currentValue = handleCheckTypeNumber(currentValue, prevValue);
|
|
3015
3146
|
if (max && currentValue.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3041,7 +3172,7 @@ const Input = ({
|
|
|
3041
3172
|
}
|
|
3042
3173
|
if (minNumSize && minNumSize < 0) {
|
|
3043
3174
|
setInnerMinNumSize(0);
|
|
3044
|
-
alert(
|
|
3175
|
+
alert("minNumSize prop can't be less then 0");
|
|
3045
3176
|
} else if (minNumSize && minNumSize >= 0) {
|
|
3046
3177
|
setInnerMinNumSize(minNumSize);
|
|
3047
3178
|
}
|
|
@@ -3055,7 +3186,7 @@ const Input = ({
|
|
|
3055
3186
|
if (value === null) {
|
|
3056
3187
|
newValue = '';
|
|
3057
3188
|
} else {
|
|
3058
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3189
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3059
3190
|
newValue = handleCheckTypeTel(value, newValue);
|
|
3060
3191
|
newValue = handleCheckTypeNumber(value, newValue);
|
|
3061
3192
|
if (max && value.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3064,28 +3195,29 @@ const Input = ({
|
|
|
3064
3195
|
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
3065
3196
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
3066
3197
|
}
|
|
3067
|
-
setInnerValue(() => newValue);
|
|
3068
3198
|
}
|
|
3069
3199
|
}
|
|
3200
|
+
setInnerValue(() => newValue);
|
|
3070
3201
|
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage, telErrorMessage]);
|
|
3071
3202
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3072
3203
|
className: classProps
|
|
3073
3204
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3074
3205
|
style: {
|
|
3075
|
-
color: labelColor
|
|
3076
|
-
fontSize: labelSize
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3206
|
+
color: labelColor ?? merge.INPUT.label.color,
|
|
3207
|
+
fontSize: labelSize ?? merge.INPUT.label.font.size,
|
|
3208
|
+
fontStyle: labelStyle ?? merge.INPUT.label.font.style,
|
|
3209
|
+
display: labelDisplay ?? merge.INPUT.label.display,
|
|
3210
|
+
fontWeight: labelWeight ?? merge.INPUT.label.font.weight,
|
|
3211
|
+
lineHeight: labelLineHeight ?? merge.INPUT.label.lineHeight,
|
|
3212
|
+
marginBottom: labelMarginBottom ?? merge.INPUT.label.marginBottom,
|
|
3213
|
+
fontFamily: labelFontFamily ?? merge.INPUT.label.font.family
|
|
3082
3214
|
}
|
|
3083
3215
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3084
3216
|
className: `${styles$7['input-content']}`,
|
|
3085
3217
|
style: {
|
|
3086
|
-
width: width
|
|
3087
|
-
borderRadius: radius
|
|
3088
|
-
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${
|
|
3218
|
+
width: width ?? merge.INPUT.width,
|
|
3219
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3220
|
+
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
3221
|
},
|
|
3090
3222
|
onMouseEnter: handleMouseEnter,
|
|
3091
3223
|
onMouseLeave: handleMouseLeave
|
|
@@ -3096,30 +3228,36 @@ const Input = ({
|
|
|
3096
3228
|
alignItems: 'center',
|
|
3097
3229
|
justifyContent: 'center',
|
|
3098
3230
|
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 :
|
|
3231
|
+
height: height ?? merge.INPUT.height,
|
|
3232
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3233
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3234
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3235
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3236
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3237
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3106
3238
|
}
|
|
3107
3239
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3108
3240
|
style: {
|
|
3241
|
+
// border: 'none',
|
|
3109
3242
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
3110
|
-
fontSize: size
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3243
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3244
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3245
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3246
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3247
|
+
height: height ?? merge.INPUT.height,
|
|
3248
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3249
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3250
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3251
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3252
|
+
display: phoneDisplay ?? merge.INPUT.tel.display,
|
|
3253
|
+
borderRight: `
|
|
3254
|
+
${telBorderRightWidth ?? merge.INPUT.tel.borderRight.width}
|
|
3255
|
+
${telBorderRightStyle ?? merge.INPUT.tel.borderRight.style}`,
|
|
3256
|
+
alignItems: phoneAlignItems ?? merge.INPUT.tel.alignItems,
|
|
3257
|
+
borderColor: innerErrorMessage ? errorColor ? errorColor : merge.INPUT.error.color : isHover ? telBorderRightColorHover ? telBorderRightColorHover : merge.INPUT.tel.borderRight.colors.hover : telBorderRightColor ? telBorderRightColor : merge.INPUT.tel.borderRight.color,
|
|
3258
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3259
|
+
justifyContent: phoneJustifyContent ?? merge.INPUT.tel.justifyContent,
|
|
3260
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3123
3261
|
}
|
|
3124
3262
|
}, "+374") : '', /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
|
|
3125
3263
|
value: innerValue,
|
|
@@ -3130,19 +3268,22 @@ const Input = ({
|
|
|
3130
3268
|
type: show || type === 'number' ? 'text' : type,
|
|
3131
3269
|
min: type === 'number' && minNumSize ? minNumSize : '',
|
|
3132
3270
|
max: type === 'number' && maxNumSize ? maxNumSize : '',
|
|
3133
|
-
autoComplete: autoComplete ? autoComplete :
|
|
3271
|
+
autoComplete: autoComplete ? autoComplete : merge.INPUT.autoComplete,
|
|
3134
3272
|
style: {
|
|
3135
3273
|
border: 'none',
|
|
3136
3274
|
outline: 'none',
|
|
3137
3275
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
3138
|
-
width: width
|
|
3139
|
-
fontSize: size
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3276
|
+
width: width ?? merge.INPUT.width,
|
|
3277
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3278
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3279
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3280
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3281
|
+
height: height ?? merge.INPUT.height,
|
|
3282
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3283
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3284
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3285
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3286
|
+
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3146
3287
|
}
|
|
3147
3288
|
})), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3148
3289
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
@@ -3151,34 +3292,41 @@ const Input = ({
|
|
|
3151
3292
|
alignItems: 'center',
|
|
3152
3293
|
justifyContent: 'center',
|
|
3153
3294
|
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 :
|
|
3295
|
+
height: height ?? merge.INPUT.height,
|
|
3296
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3297
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3298
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3299
|
+
borderTopRightRadius: radius ?? merge.INPUT.radius,
|
|
3300
|
+
borderBottomRightRadius: radius ?? merge.INPUT.radius,
|
|
3301
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3161
3302
|
}
|
|
3162
3303
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P, {
|
|
3163
|
-
errorAnimation: errorAnimation,
|
|
3304
|
+
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3164
3305
|
animation: animation,
|
|
3165
3306
|
style: {
|
|
3166
3307
|
margin: '0px',
|
|
3167
3308
|
position: 'absolute',
|
|
3168
|
-
width: width
|
|
3169
|
-
left: errorLeft
|
|
3170
|
-
color: errorColor
|
|
3171
|
-
fontSize: errorSize
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3309
|
+
width: width ?? merge.INPUT.width,
|
|
3310
|
+
left: errorLeft ?? merge.INPUT.error.left,
|
|
3311
|
+
color: errorColor ?? merge.INPUT.error.color,
|
|
3312
|
+
fontSize: errorSize ?? merge.INPUT.error.font.size,
|
|
3313
|
+
fontStyle: errorStyle ?? merge.INPUT.error.font.style,
|
|
3314
|
+
fontFamily: errorFamily ?? merge.INPUT.error.font.family,
|
|
3315
|
+
fontWeight: errorWeight ?? merge.INPUT.error.font.weight,
|
|
3316
|
+
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3317
|
+
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3318
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3319
|
+
transform: !errorAnimation && !merge.INPUT.error.animation ? 'scale3d(1,1,1)' : transform ? transform : merge.INPUT.error.transform
|
|
3176
3320
|
},
|
|
3177
|
-
className: errorClassName
|
|
3321
|
+
className: errorClassName ?? merge.INPUT.error.className
|
|
3178
3322
|
}, innerErrorMessage) : '');
|
|
3179
3323
|
};
|
|
3180
3324
|
Input.propTypes = {
|
|
3325
|
+
size: PropTypes__default["default"].string,
|
|
3181
3326
|
name: PropTypes__default["default"].string,
|
|
3327
|
+
style: PropTypes__default["default"].string,
|
|
3328
|
+
weight: PropTypes__default["default"].string,
|
|
3329
|
+
family: PropTypes__default["default"].string,
|
|
3182
3330
|
change: PropTypes__default["default"].func,
|
|
3183
3331
|
color: PropTypes__default["default"].string,
|
|
3184
3332
|
width: PropTypes__default["default"].string,
|
|
@@ -3188,10 +3336,8 @@ Input.propTypes = {
|
|
|
3188
3336
|
height: PropTypes__default["default"].string,
|
|
3189
3337
|
radius: PropTypes__default["default"].string,
|
|
3190
3338
|
padding: PropTypes__default["default"].string,
|
|
3191
|
-
fontSize: PropTypes__default["default"].string,
|
|
3192
3339
|
tooltip: PropTypes__default["default"].element,
|
|
3193
3340
|
withoutDot: PropTypes__default["default"].bool,
|
|
3194
|
-
marginTop: PropTypes__default["default"].string,
|
|
3195
3341
|
transform: PropTypes__default["default"].string,
|
|
3196
3342
|
className: PropTypes__default["default"].string,
|
|
3197
3343
|
iconWidth: PropTypes__default["default"].string,
|
|
@@ -3206,6 +3352,10 @@ Input.propTypes = {
|
|
|
3206
3352
|
maxNumSize: PropTypes__default["default"].number,
|
|
3207
3353
|
errorColor: PropTypes__default["default"].string,
|
|
3208
3354
|
labelColor: PropTypes__default["default"].string,
|
|
3355
|
+
labelStyle: PropTypes__default["default"].string,
|
|
3356
|
+
errorStyle: PropTypes__default["default"].string,
|
|
3357
|
+
errorWeight: PropTypes__default["default"].string,
|
|
3358
|
+
errorFamily: PropTypes__default["default"].string,
|
|
3209
3359
|
borderRight: PropTypes__default["default"].string,
|
|
3210
3360
|
placeholder: PropTypes__default["default"].string,
|
|
3211
3361
|
errorZindex: PropTypes__default["default"].string,
|
|
@@ -3216,6 +3366,7 @@ Input.propTypes = {
|
|
|
3216
3366
|
errorAnimation: PropTypes__default["default"].bool,
|
|
3217
3367
|
labelDisplay: PropTypes__default["default"].string,
|
|
3218
3368
|
errorPosition: PropTypes__default["default"].string,
|
|
3369
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
3219
3370
|
boxShadowHover: PropTypes__default["default"].string,
|
|
3220
3371
|
errorClassName: PropTypes__default["default"].string,
|
|
3221
3372
|
labelFontFamily: PropTypes__default["default"].string,
|
|
@@ -3224,14 +3375,16 @@ Input.propTypes = {
|
|
|
3224
3375
|
phoneAlignItems: PropTypes__default["default"].string,
|
|
3225
3376
|
errorLineHeight: PropTypes__default["default"].string,
|
|
3226
3377
|
labelLineHeight: PropTypes__default["default"].string,
|
|
3227
|
-
borderRightColor: PropTypes__default["default"].string,
|
|
3228
3378
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
3229
3379
|
regexpErrorMessage: PropTypes__default["default"].string,
|
|
3230
3380
|
regexp: PropTypes__default["default"].instanceOf(RegExp),
|
|
3381
|
+
telBorderRightWidth: PropTypes__default["default"].string,
|
|
3382
|
+
telBorderRightStyle: PropTypes__default["default"].string,
|
|
3383
|
+
telBorderRightColor: PropTypes__default["default"].string,
|
|
3231
3384
|
phoneJustifyContent: PropTypes__default["default"].string,
|
|
3232
|
-
borderRightColorHover: PropTypes__default["default"].string,
|
|
3233
3385
|
backgroundDisableColor: PropTypes__default["default"].string,
|
|
3234
3386
|
errorAnimationDuration: PropTypes__default["default"].string,
|
|
3387
|
+
telBorderRightColorHover: PropTypes__default["default"].string,
|
|
3235
3388
|
leftIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
3236
3389
|
rightIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
3237
3390
|
type: PropTypes__default["default"].oneOf(Object.values(InputTypes)),
|
|
@@ -3258,6 +3411,7 @@ const Radio = ({
|
|
|
3258
3411
|
borderColor,
|
|
3259
3412
|
borderStyle,
|
|
3260
3413
|
labelFontSize,
|
|
3414
|
+
labelFontStyle,
|
|
3261
3415
|
labelFontFamily,
|
|
3262
3416
|
labelFontWeight,
|
|
3263
3417
|
labelLineHeight,
|
|
@@ -3266,8 +3420,7 @@ const Radio = ({
|
|
|
3266
3420
|
radioItemMarginRight,
|
|
3267
3421
|
radioItemMarginBottom
|
|
3268
3422
|
}) => {
|
|
3269
|
-
const
|
|
3270
|
-
const classProps = classnames__default["default"](className ? className : configStyles.RADIO.className);
|
|
3423
|
+
const classProps = classnames__default["default"](className ?? merge.RADIO.className);
|
|
3271
3424
|
const [innerData, setInnerData] = React.useState([]);
|
|
3272
3425
|
const [radioInnerSize, setRadioInnerSize] = React.useState('');
|
|
3273
3426
|
const [radioInnerFormat, setRadioInnerFormat] = React.useState('');
|
|
@@ -3279,11 +3432,11 @@ const Radio = ({
|
|
|
3279
3432
|
});
|
|
3280
3433
|
const handleMouseEnter = (id, elemID) => {
|
|
3281
3434
|
const elem = document.querySelector(`#${elemID}`);
|
|
3282
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3435
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color;
|
|
3283
3436
|
};
|
|
3284
3437
|
const handleMouseLeave = (id, elemID) => {
|
|
3285
3438
|
const elem = document.querySelector(`#${elemID}`);
|
|
3286
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3439
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent';
|
|
3287
3440
|
};
|
|
3288
3441
|
const handleChecked = selItem => {
|
|
3289
3442
|
setInnerSelectedData(selItem);
|
|
@@ -3299,7 +3452,7 @@ const Radio = ({
|
|
|
3299
3452
|
React.useEffect(() => {
|
|
3300
3453
|
let radioSize = '';
|
|
3301
3454
|
let radioSizeFormat = '';
|
|
3302
|
-
const checkSize = size ||
|
|
3455
|
+
const checkSize = size || merge.RADIO.size;
|
|
3303
3456
|
if (checkSize && typeof checkSize === 'string') {
|
|
3304
3457
|
if (checkSize.length > 0) {
|
|
3305
3458
|
checkSize.split('').map(item => {
|
|
@@ -3316,7 +3469,7 @@ const Radio = ({
|
|
|
3316
3469
|
}
|
|
3317
3470
|
setRadioInnerFormat(radioSizeFormat);
|
|
3318
3471
|
setRadioInnerSize(`${parseInt(radioSize) / 2}`);
|
|
3319
|
-
}, [size,
|
|
3472
|
+
}, [size, merge.RADIO.size]);
|
|
3320
3473
|
React.useEffect(() => {
|
|
3321
3474
|
if (typeof selected === 'object' && selected !== null && !Array.isArray(selected)) {
|
|
3322
3475
|
setInnerSelectedData(selected);
|
|
@@ -3346,8 +3499,8 @@ const Radio = ({
|
|
|
3346
3499
|
cursor: item[innerKeyNames.disabled] ? 'not-allowed' : 'pointer',
|
|
3347
3500
|
width: 'fit-content',
|
|
3348
3501
|
alignItems: 'center',
|
|
3349
|
-
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight :
|
|
3350
|
-
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom :
|
|
3502
|
+
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : merge.RADIO.item.marginRight : '0px',
|
|
3503
|
+
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : merge.RADIO.item.marginBottom : '0px'
|
|
3351
3504
|
},
|
|
3352
3505
|
onClick: item[innerKeyNames.disabled] ? _ => _ : () => handleChecked(item),
|
|
3353
3506
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
@@ -3358,11 +3511,11 @@ const Radio = ({
|
|
|
3358
3511
|
alignItems: 'center',
|
|
3359
3512
|
borderRadius: '100%',
|
|
3360
3513
|
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 :
|
|
3514
|
+
width: size ? size : merge.RADIO.size,
|
|
3515
|
+
height: size ? size : merge.RADIO.size,
|
|
3516
|
+
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight : merge.RADIO.marginRight : '0px',
|
|
3517
|
+
border: `${borderSize ?? merge.RADIO.border.width} ${borderStyle ? borderStyle : merge.RADIO.border.style}`,
|
|
3518
|
+
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color
|
|
3366
3519
|
}
|
|
3367
3520
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3368
3521
|
id: elemId,
|
|
@@ -3370,15 +3523,16 @@ const Radio = ({
|
|
|
3370
3523
|
borderRadius: '100%',
|
|
3371
3524
|
width: radioInnerSize + radioInnerFormat,
|
|
3372
3525
|
height: radioInnerSize + radioInnerFormat,
|
|
3373
|
-
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3526
|
+
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent'
|
|
3374
3527
|
}
|
|
3375
3528
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3376
3529
|
style: {
|
|
3377
|
-
color: labelColor
|
|
3378
|
-
fontSize: labelFontSize
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3530
|
+
color: labelColor ?? merge.RADIO.label.color,
|
|
3531
|
+
fontSize: labelFontSize ?? merge.RADIO.label.font.size,
|
|
3532
|
+
fontStyle: labelFontStyle ?? merge.RADIO.label.font.style,
|
|
3533
|
+
fontFamily: labelFontFamily ?? merge.RADIO.label.font.family,
|
|
3534
|
+
fontWeight: labelFontWeight ?? merge.RADIO.label.font.weight,
|
|
3535
|
+
lineHeight: labelLineHeight ?? merge.RADIO.label.lineHeight
|
|
3382
3536
|
},
|
|
3383
3537
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
3384
3538
|
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
@@ -3395,6 +3549,7 @@ Radio.propTypes = {
|
|
|
3395
3549
|
borderColor: PropTypes__default["default"].string,
|
|
3396
3550
|
borderStyle: PropTypes__default["default"].string,
|
|
3397
3551
|
labelFontSize: PropTypes__default["default"].string,
|
|
3552
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
3398
3553
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3399
3554
|
labelFontWeight: PropTypes__default["default"].string,
|
|
3400
3555
|
labelLineHeight: PropTypes__default["default"].string,
|
|
@@ -3456,6 +3611,7 @@ const Select = ({
|
|
|
3456
3611
|
labelWeight,
|
|
3457
3612
|
labelDisplay,
|
|
3458
3613
|
labelFontSize,
|
|
3614
|
+
labelFontStyle,
|
|
3459
3615
|
labelLineHeight,
|
|
3460
3616
|
labelFontFamily,
|
|
3461
3617
|
labelMarginBottom,
|
|
@@ -3463,12 +3619,17 @@ const Select = ({
|
|
|
3463
3619
|
cursor,
|
|
3464
3620
|
errorSize,
|
|
3465
3621
|
errorColor,
|
|
3622
|
+
errorStyle,
|
|
3623
|
+
errorFamily,
|
|
3624
|
+
errorWeight,
|
|
3466
3625
|
selectedColor,
|
|
3467
3626
|
selectedRadius,
|
|
3468
|
-
selectedMinHeight,
|
|
3469
3627
|
selectedPadding,
|
|
3470
3628
|
selectedFontSize,
|
|
3629
|
+
selectedFontStyle,
|
|
3471
3630
|
selectedBoxSizing,
|
|
3631
|
+
selectedMinHeight,
|
|
3632
|
+
selectedFontFamily,
|
|
3472
3633
|
selectedFontWeight,
|
|
3473
3634
|
selectedLineHeight,
|
|
3474
3635
|
selectedHoverColor,
|
|
@@ -3494,8 +3655,7 @@ const Select = ({
|
|
|
3494
3655
|
boxShadowHover
|
|
3495
3656
|
}) => {
|
|
3496
3657
|
const ref = React.useRef();
|
|
3497
|
-
const
|
|
3498
|
-
const classProps = classnames__default["default"](className ? className : configStyles.SELECT.className);
|
|
3658
|
+
const classProps = classnames__default["default"](className ? className : merge.SELECT.className);
|
|
3499
3659
|
const [opened, setOpened] = React.useState(false);
|
|
3500
3660
|
const [isHover, setIsHover] = React.useState(false);
|
|
3501
3661
|
const [newSelected, setNewSelected] = React.useState([]);
|
|
@@ -3548,12 +3708,12 @@ const Select = ({
|
|
|
3548
3708
|
setIsHover(false);
|
|
3549
3709
|
};
|
|
3550
3710
|
const handleMouseEnterOption = e => {
|
|
3551
|
-
e.target.style.color = optionItemColorHover ? optionItemColorHover :
|
|
3552
|
-
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover :
|
|
3711
|
+
e.target.style.color = optionItemColorHover ? optionItemColorHover : merge.SELECT.options.item.colors.hover;
|
|
3712
|
+
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover : merge.SELECT.options.item.colors.backgroudHover;
|
|
3553
3713
|
};
|
|
3554
3714
|
const handleMouseLeaveOption = e => {
|
|
3555
|
-
e.target.style.color = optionItemColor ? optionItemColor :
|
|
3556
|
-
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor :
|
|
3715
|
+
e.target.style.color = optionItemColor ? optionItemColor : merge.SELECT.options.item.color;
|
|
3716
|
+
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor : merge.SELECT.options.item.colors.backgroud;
|
|
3557
3717
|
};
|
|
3558
3718
|
const isObjectEmpty = obj => {
|
|
3559
3719
|
for (var key in obj) {
|
|
@@ -3609,14 +3769,15 @@ const Select = ({
|
|
|
3609
3769
|
}
|
|
3610
3770
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3611
3771
|
style: {
|
|
3612
|
-
color: labelColor
|
|
3613
|
-
fontWeight: labelWeight
|
|
3614
|
-
display: labelDisplay
|
|
3615
|
-
fontSize: labelFontSize
|
|
3616
|
-
|
|
3617
|
-
fontFamily: labelFontFamily
|
|
3618
|
-
|
|
3619
|
-
|
|
3772
|
+
color: labelColor ?? merge.SELECT.label.color,
|
|
3773
|
+
fontWeight: labelWeight ?? merge.SELECT.label.font.weight,
|
|
3774
|
+
display: labelDisplay ?? merge.SELECT.label.display,
|
|
3775
|
+
fontSize: labelFontSize ?? merge.SELECT.label.font.size,
|
|
3776
|
+
fontStyle: labelFontStyle ?? merge.SELECT.label.font.style,
|
|
3777
|
+
fontFamily: labelFontFamily ?? merge.SELECT.label.font.family,
|
|
3778
|
+
lineHeight: labelLineHeight ?? merge.SELECT.label.lineHeight,
|
|
3779
|
+
marginBottom: labelMarginBottom ?? merge.SELECT.label.marginBottom,
|
|
3780
|
+
textTransform: labelTextTransform ?? merge.SELECT.label.textTransform
|
|
3620
3781
|
}
|
|
3621
3782
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3622
3783
|
ref: ref
|
|
@@ -3624,17 +3785,19 @@ const Select = ({
|
|
|
3624
3785
|
className: styles$6['select-content']
|
|
3625
3786
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3626
3787
|
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
|
-
|
|
3788
|
+
cursor: disabled ? 'not-allowed' : cursor ? cursor : merge.SELECT.selected.cursor,
|
|
3789
|
+
minHeight: selectedMinHeight ?? merge.SELECT.selected.minHeight,
|
|
3790
|
+
padding: selectedPadding ?? merge.SELECT.selected.padding,
|
|
3791
|
+
borderRadius: selectedRadius ?? merge.SELECT.selected.radius,
|
|
3792
|
+
fontSize: selectedFontSize ?? merge.SELECT.selected.font.size,
|
|
3793
|
+
fontStyle: selectedFontStyle ?? merge.SELECT.selected.font.style,
|
|
3794
|
+
fontFamily: selectedFontFamily ?? merge.SELECT.selected.font.family,
|
|
3795
|
+
boxSizing: selectedBoxSizing ?? merge.SELECT.selected.box.sizing,
|
|
3796
|
+
fontWeight: selectedFontWeight ?? merge.SELECT.selected.font.weight,
|
|
3797
|
+
lineHeight: selectedLineHeight ?? merge.SELECT.selected.lineHeight,
|
|
3798
|
+
transition: selectedTransition ?? merge.SELECT.selected.transition,
|
|
3799
|
+
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : merge.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : merge.SELECT.selected.colors.background,
|
|
3800
|
+
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
3801
|
},
|
|
3639
3802
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
3640
3803
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
@@ -3646,7 +3809,7 @@ const Select = ({
|
|
|
3646
3809
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
3647
3810
|
overflow: 'hidden',
|
|
3648
3811
|
textOverflow: 'ellipsis',
|
|
3649
|
-
color: errorMessage ? errorColor ? errorColor :
|
|
3812
|
+
color: errorMessage ? errorColor ? errorColor : merge.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
|
|
3650
3813
|
}
|
|
3651
3814
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
3652
3815
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -3658,23 +3821,23 @@ const Select = ({
|
|
|
3658
3821
|
}
|
|
3659
3822
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3660
3823
|
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 :
|
|
3824
|
+
}, !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
3825
|
className: `${styles$6['close-icon']}`,
|
|
3663
3826
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
3664
3827
|
style: {
|
|
3665
3828
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
3666
3829
|
}
|
|
3667
|
-
}, closeIcon ? closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3830
|
+
}, closeIcon ? closeIcon : merge.SELECT.closeIcon ? merge.SELECT.closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3668
3831
|
style: {
|
|
3669
3832
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
3670
3833
|
},
|
|
3671
3834
|
className: `${styles$6['arrow-icon']}`
|
|
3672
|
-
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3835
|
+
}, arrowIcon ? arrowIcon : merge.SELECT.arrowIcon ? merge.SELECT.arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3673
3836
|
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' :
|
|
3837
|
+
boxShadow: optionsBoxShadow ?? merge.SELECT.options.box.shadow,
|
|
3838
|
+
borderRadius: optionsBorderRadius ?? merge.SELECT.options.radius,
|
|
3839
|
+
backgroundColor: optionsBackgroundColor ?? merge.SELECT.options.colors.background,
|
|
3840
|
+
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
3841
|
},
|
|
3679
3842
|
className: `${styles$6['select-content-bottom']}`
|
|
3680
3843
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3687,19 +3850,19 @@ const Select = ({
|
|
|
3687
3850
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
3688
3851
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
3689
3852
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
3690
|
-
className: `${styles$6['select-content-bottom-row']} ${dots ||
|
|
3853
|
+
className: `${styles$6['select-content-bottom-row']} ${dots || merge.SELECT.dots ? styles$6['ellipsis'] : ''}`,
|
|
3691
3854
|
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
|
|
3855
|
+
overflowWrap: !dots && !merge.SELECT.dots ? 'anywhere' : 'break-word',
|
|
3856
|
+
color: optionItemColor ?? merge.SELECT.options.item.color,
|
|
3857
|
+
cursor: optionItemCursor ?? merge.SELECT.options.item.cursor,
|
|
3858
|
+
padding: optionItemPadding ?? merge.SELECT.options.item.padding,
|
|
3859
|
+
fontSize: optionItemFontSize ?? merge.SELECT.options.item.font.size,
|
|
3860
|
+
boxSizing: optionItemBoxSizing ?? merge.SELECT.options.item.box.sizing,
|
|
3861
|
+
minHeight: optionItemMinHeight ?? merge.SELECT.options.item.minHeight,
|
|
3862
|
+
fontWeight: optionItemFontWeight ?? merge.SELECT.options.item.font.weight,
|
|
3863
|
+
lineHeight: dots || merge.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : merge.SELECT.options.item.lineHeight,
|
|
3864
|
+
marginBottom: optionItemMarginBottom ?? merge.SELECT.options.item.marginBottom,
|
|
3865
|
+
backgroundColor: optionItemBackgroudColor ?? merge.SELECT.options.item.colors.backgroud
|
|
3703
3866
|
}
|
|
3704
3867
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
|
|
3705
3868
|
checked: option.checked
|
|
@@ -3707,10 +3870,13 @@ const Select = ({
|
|
|
3707
3870
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3708
3871
|
style: {
|
|
3709
3872
|
position: 'absolute',
|
|
3710
|
-
color: errorColor
|
|
3711
|
-
fontSize: errorSize
|
|
3712
|
-
|
|
3713
|
-
|
|
3873
|
+
color: errorColor ?? merge.SELECT.error.color,
|
|
3874
|
+
fontSize: errorSize ?? merge.SELECT.error.font.size,
|
|
3875
|
+
fontStyle: errorStyle ?? merge.SELECT.error.font.style,
|
|
3876
|
+
fontFamily: errorFamily ?? merge.SELECT.error.font.family,
|
|
3877
|
+
fontWeight: errorWeight ?? merge.SELECT.error.font.weight,
|
|
3878
|
+
zIndex: errorZindex ?? merge.SELECT.error.zIndex,
|
|
3879
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.SELECT.error.marginTop})`
|
|
3714
3880
|
}
|
|
3715
3881
|
}, errorMessage) : '');
|
|
3716
3882
|
};
|
|
@@ -3737,6 +3903,7 @@ Select.propTypes = {
|
|
|
3737
3903
|
labelWeight: PropTypes__default["default"].string,
|
|
3738
3904
|
labelDisplay: PropTypes__default["default"].string,
|
|
3739
3905
|
labelFontSize: PropTypes__default["default"].string,
|
|
3906
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
3740
3907
|
labelLineHeight: PropTypes__default["default"].string,
|
|
3741
3908
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3742
3909
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -3749,7 +3916,9 @@ Select.propTypes = {
|
|
|
3749
3916
|
selectedMinHeight: PropTypes__default["default"].string,
|
|
3750
3917
|
selectedPadding: PropTypes__default["default"].string,
|
|
3751
3918
|
selectedFontSize: PropTypes__default["default"].string,
|
|
3919
|
+
selectedFontStyle: PropTypes__default["default"].string,
|
|
3752
3920
|
selectedBoxSizing: PropTypes__default["default"].string,
|
|
3921
|
+
selectedFontFamily: PropTypes__default["default"].string,
|
|
3753
3922
|
selectedHoverColor: PropTypes__default["default"].string,
|
|
3754
3923
|
selectedFontWeight: PropTypes__default["default"].string,
|
|
3755
3924
|
selectedLineHeight: PropTypes__default["default"].string,
|
|
@@ -3781,16 +3950,22 @@ const SvgToasterInfo = ({
|
|
|
3781
3950
|
fillColor,
|
|
3782
3951
|
...props
|
|
3783
3952
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3784
|
-
width: "
|
|
3785
|
-
height: "
|
|
3786
|
-
viewBox: "0 0
|
|
3953
|
+
width: "60",
|
|
3954
|
+
height: "60",
|
|
3955
|
+
viewBox: "0 0 60 60",
|
|
3787
3956
|
fill: "none",
|
|
3788
3957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3789
3958
|
"aria-labelledby": titleId
|
|
3790
3959
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3791
3960
|
id: titleId
|
|
3792
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3793
|
-
|
|
3961
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3962
|
+
opacity: "0.05",
|
|
3963
|
+
cx: "30",
|
|
3964
|
+
cy: "30",
|
|
3965
|
+
r: "30",
|
|
3966
|
+
fill: fillColor ? fillColor : '#00236A'
|
|
3967
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3968
|
+
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
3969
|
fill: fillColor ? fillColor : '#00236A'
|
|
3795
3970
|
}));
|
|
3796
3971
|
|
|
@@ -3800,17 +3975,23 @@ const SvgToasterError = ({
|
|
|
3800
3975
|
fillColor,
|
|
3801
3976
|
...props
|
|
3802
3977
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3803
|
-
width: "
|
|
3804
|
-
height: "
|
|
3805
|
-
viewBox: "0 0
|
|
3978
|
+
width: "60",
|
|
3979
|
+
height: "60",
|
|
3980
|
+
viewBox: "0 0 60 60",
|
|
3806
3981
|
fill: "none",
|
|
3807
3982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3808
3983
|
"aria-labelledby": titleId
|
|
3809
3984
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3810
3985
|
id: titleId
|
|
3811
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3812
|
-
|
|
3813
|
-
|
|
3986
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3987
|
+
opacity: "0.05",
|
|
3988
|
+
cx: "30",
|
|
3989
|
+
cy: "30",
|
|
3990
|
+
r: "30",
|
|
3991
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3992
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3993
|
+
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",
|
|
3994
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3814
3995
|
}));
|
|
3815
3996
|
|
|
3816
3997
|
const SvgToasterClose = ({
|
|
@@ -3838,16 +4019,22 @@ const SvgToasterWarning = ({
|
|
|
3838
4019
|
fillColor,
|
|
3839
4020
|
...props
|
|
3840
4021
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3841
|
-
width: "
|
|
3842
|
-
height: "
|
|
3843
|
-
viewBox: "0 0
|
|
4022
|
+
width: "60",
|
|
4023
|
+
height: "60",
|
|
4024
|
+
viewBox: "0 0 60 60",
|
|
3844
4025
|
fill: "none",
|
|
3845
4026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3846
4027
|
"aria-labelledby": titleId
|
|
3847
4028
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3848
4029
|
id: titleId
|
|
3849
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3850
|
-
|
|
4030
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
4031
|
+
opacity: "0.05",
|
|
4032
|
+
cx: "30",
|
|
4033
|
+
cy: "30",
|
|
4034
|
+
r: "30",
|
|
4035
|
+
fill: fillColor ? fillColor : '#FF8A00'
|
|
4036
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
4037
|
+
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
4038
|
fill: fillColor ? fillColor : '#FF8A00'
|
|
3852
4039
|
}));
|
|
3853
4040
|
|
|
@@ -3857,16 +4044,22 @@ const SvgToasterSuccess = ({
|
|
|
3857
4044
|
fillColor,
|
|
3858
4045
|
...props
|
|
3859
4046
|
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3860
|
-
width: "
|
|
3861
|
-
height: "
|
|
3862
|
-
viewBox: "0 0
|
|
4047
|
+
width: "60",
|
|
4048
|
+
height: "60",
|
|
4049
|
+
viewBox: "0 0 60 60",
|
|
3863
4050
|
fill: "none",
|
|
3864
4051
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3865
4052
|
"aria-labelledby": titleId
|
|
3866
4053
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
3867
4054
|
id: titleId
|
|
3868
|
-
}, title) : null, /*#__PURE__*/React__namespace.createElement("
|
|
3869
|
-
|
|
4055
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
4056
|
+
opacity: "0.05",
|
|
4057
|
+
cx: "30",
|
|
4058
|
+
cy: "30",
|
|
4059
|
+
r: "30",
|
|
4060
|
+
fill: fillColor ? fillColor : '#0DA574'
|
|
4061
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
4062
|
+
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
4063
|
fill: fillColor ? fillColor : '#0DA574'
|
|
3871
4064
|
}));
|
|
3872
4065
|
|
|
@@ -3891,9 +4084,11 @@ const ToasterPosition = {
|
|
|
3891
4084
|
};
|
|
3892
4085
|
const Toast = ({
|
|
3893
4086
|
type,
|
|
4087
|
+
icon,
|
|
3894
4088
|
title,
|
|
3895
4089
|
timer,
|
|
3896
4090
|
position,
|
|
4091
|
+
closeIcon,
|
|
3897
4092
|
removeToast,
|
|
3898
4093
|
description
|
|
3899
4094
|
}) => {
|
|
@@ -3948,10 +4143,9 @@ const Toast = ({
|
|
|
3948
4143
|
height: '60px',
|
|
3949
4144
|
borderRadius: '30px',
|
|
3950
4145
|
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)' : ''
|
|
4146
|
+
justifyContent: 'center'
|
|
3953
4147
|
}
|
|
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", {
|
|
4148
|
+
}, 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
4149
|
style: {
|
|
3956
4150
|
height: '100%',
|
|
3957
4151
|
width: 'calc(100% - 90px)'
|
|
@@ -3984,7 +4178,7 @@ const Toast = ({
|
|
|
3984
4178
|
height: '18px',
|
|
3985
4179
|
cursor: 'pointer'
|
|
3986
4180
|
}
|
|
3987
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
|
|
4181
|
+
}, closeIcon ? closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
|
|
3988
4182
|
};
|
|
3989
4183
|
Toast.propTypes = {
|
|
3990
4184
|
timer: PropTypes__default["default"].number,
|
|
@@ -4015,9 +4209,11 @@ const removeToast = ref => {
|
|
|
4015
4209
|
};
|
|
4016
4210
|
const createToast = ({
|
|
4017
4211
|
type,
|
|
4212
|
+
icon,
|
|
4018
4213
|
timer,
|
|
4019
4214
|
title,
|
|
4020
4215
|
position,
|
|
4216
|
+
iconClose,
|
|
4021
4217
|
description
|
|
4022
4218
|
}) => {
|
|
4023
4219
|
let toastParentBlock;
|
|
@@ -4032,11 +4228,13 @@ const createToast = ({
|
|
|
4032
4228
|
toastBlock.style.marginBottom = '20px';
|
|
4033
4229
|
const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
|
|
4034
4230
|
type,
|
|
4231
|
+
icon,
|
|
4035
4232
|
timer,
|
|
4036
4233
|
title,
|
|
4037
4234
|
position,
|
|
4038
|
-
|
|
4039
|
-
description
|
|
4235
|
+
iconClose,
|
|
4236
|
+
description,
|
|
4237
|
+
removeToast
|
|
4040
4238
|
});
|
|
4041
4239
|
ReactDOM__default["default"].render(newElem, toastBlock);
|
|
4042
4240
|
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
@@ -4055,66 +4253,81 @@ const createToast = ({
|
|
|
4055
4253
|
const toast = {
|
|
4056
4254
|
success: (title, props) => {
|
|
4057
4255
|
const {
|
|
4256
|
+
icon,
|
|
4058
4257
|
timer,
|
|
4059
4258
|
position,
|
|
4259
|
+
iconClose,
|
|
4060
4260
|
description
|
|
4061
4261
|
} = props || {};
|
|
4062
4262
|
createToast({
|
|
4063
4263
|
title,
|
|
4064
4264
|
type: 'success',
|
|
4065
|
-
timer: timer
|
|
4066
|
-
position: position
|
|
4067
|
-
description: description
|
|
4265
|
+
timer: timer ?? 5000,
|
|
4266
|
+
position: position ?? 'top-right',
|
|
4267
|
+
description: description ?? '',
|
|
4268
|
+
icon: icon ?? merge.TOASTER.icon.success,
|
|
4269
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4068
4270
|
});
|
|
4069
4271
|
},
|
|
4070
4272
|
info: (title, props) => {
|
|
4071
4273
|
const {
|
|
4274
|
+
icon,
|
|
4072
4275
|
timer,
|
|
4073
4276
|
position,
|
|
4277
|
+
iconClose,
|
|
4074
4278
|
description
|
|
4075
4279
|
} = props || {};
|
|
4076
4280
|
createToast({
|
|
4077
4281
|
title,
|
|
4078
4282
|
type: 'info',
|
|
4079
|
-
timer: timer
|
|
4080
|
-
position: position
|
|
4081
|
-
description: description
|
|
4283
|
+
timer: timer ?? 5000,
|
|
4284
|
+
position: position ?? 'top-right',
|
|
4285
|
+
description: description ?? '',
|
|
4286
|
+
icon: icon ?? merge.TOASTER.icon.info,
|
|
4287
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4082
4288
|
});
|
|
4083
4289
|
},
|
|
4084
4290
|
warn: (title, props) => {
|
|
4085
4291
|
const {
|
|
4292
|
+
icon,
|
|
4086
4293
|
timer,
|
|
4087
4294
|
position,
|
|
4295
|
+
iconClose,
|
|
4088
4296
|
description
|
|
4089
4297
|
} = props || {};
|
|
4090
4298
|
createToast({
|
|
4091
4299
|
title,
|
|
4092
4300
|
type: 'warn',
|
|
4093
|
-
timer: timer
|
|
4094
|
-
position: position
|
|
4095
|
-
description: description
|
|
4301
|
+
timer: timer ?? 5000,
|
|
4302
|
+
position: position ?? 'top-right',
|
|
4303
|
+
description: description ?? '',
|
|
4304
|
+
icon: icon ?? merge.TOASTER.icon.warn,
|
|
4305
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4096
4306
|
});
|
|
4097
4307
|
},
|
|
4098
4308
|
error: (title, props) => {
|
|
4099
4309
|
const {
|
|
4310
|
+
icon,
|
|
4100
4311
|
timer,
|
|
4101
4312
|
position,
|
|
4313
|
+
iconClose,
|
|
4102
4314
|
description
|
|
4103
4315
|
} = props || {};
|
|
4104
4316
|
createToast({
|
|
4105
4317
|
title,
|
|
4106
4318
|
type: 'error',
|
|
4107
|
-
timer: timer
|
|
4108
|
-
position: position
|
|
4109
|
-
description: description
|
|
4319
|
+
timer: timer ?? 5000,
|
|
4320
|
+
position: position ?? 'top-right',
|
|
4321
|
+
description: description ?? '',
|
|
4322
|
+
icon: icon ?? merge.TOASTER.icon.error,
|
|
4323
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4110
4324
|
});
|
|
4111
4325
|
}
|
|
4112
4326
|
};
|
|
4113
4327
|
const Toaster = ({
|
|
4114
4328
|
className
|
|
4115
4329
|
}) => {
|
|
4116
|
-
const
|
|
4117
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TOASTER.className);
|
|
4330
|
+
const classProps = classnames__default["default"](className ?? merge.TOASTER.className);
|
|
4118
4331
|
window.addEventListener('popstate', () => {
|
|
4119
4332
|
if (path !== window.location.href) {
|
|
4120
4333
|
if (!toastify) {
|
|
@@ -4168,7 +4381,9 @@ const Tooltip = ({
|
|
|
4168
4381
|
radius,
|
|
4169
4382
|
fontSize,
|
|
4170
4383
|
className,
|
|
4384
|
+
fontStyle,
|
|
4171
4385
|
fontFamily,
|
|
4386
|
+
fontWeight,
|
|
4172
4387
|
tooltipIcon,
|
|
4173
4388
|
tooltipWidth,
|
|
4174
4389
|
tooltipRadius,
|
|
@@ -4176,8 +4391,7 @@ const Tooltip = ({
|
|
|
4176
4391
|
tooltipBackgroundColor
|
|
4177
4392
|
}) => {
|
|
4178
4393
|
const tooltipRef = /*#__PURE__*/React.createRef(null);
|
|
4179
|
-
const
|
|
4180
|
-
const classProps = classnames__default["default"](styles$4['tooltip-block'], className ? className : configStyles.TOOLTIP.className);
|
|
4394
|
+
const classProps = classnames__default["default"](styles$4['tooltip-block'], className ?? merge.TOOLTIP.className);
|
|
4181
4395
|
const [checkTooltipWidth, setCheckTooltipWidth] = React.useState(0);
|
|
4182
4396
|
const [checkTooltipHeight, setCheckTooltipHeight] = React.useState(0);
|
|
4183
4397
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
@@ -4194,18 +4408,18 @@ const Tooltip = ({
|
|
|
4194
4408
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4195
4409
|
className: classProps,
|
|
4196
4410
|
style: {
|
|
4197
|
-
width: width
|
|
4198
|
-
height: height
|
|
4199
|
-
borderRadius: radius
|
|
4200
|
-
backgroundColor: backgroundColor
|
|
4411
|
+
width: width ?? merge.TOOLTIP.parent.width,
|
|
4412
|
+
height: height ?? merge.TOOLTIP.parent.height,
|
|
4413
|
+
borderRadius: radius ?? merge.TOOLTIP.parent.radius,
|
|
4414
|
+
backgroundColor: backgroundColor ?? merge.TOOLTIP.parent.colors.background
|
|
4201
4415
|
}
|
|
4202
4416
|
}, showTooltip ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4203
4417
|
ref: tooltipRef,
|
|
4204
4418
|
className: `${styles$4['tooltip']}`,
|
|
4205
4419
|
style: {
|
|
4206
|
-
width: tooltipWidth
|
|
4207
|
-
borderRadius: tooltipRadius
|
|
4208
|
-
backgroundColor: tooltipBackgroundColor
|
|
4420
|
+
width: tooltipWidth ?? merge.TOOLTIP.width,
|
|
4421
|
+
borderRadius: tooltipRadius ?? merge.TOOLTIP.radius,
|
|
4422
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4209
4423
|
top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
|
|
4210
4424
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
4211
4425
|
}
|
|
@@ -4214,22 +4428,24 @@ const Tooltip = ({
|
|
|
4214
4428
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4215
4429
|
className: `${styles$4['tooltip-decor']}`,
|
|
4216
4430
|
style: {
|
|
4217
|
-
backgroundColor: tooltipBackgroundColor
|
|
4431
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4218
4432
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
4219
4433
|
top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
|
|
4220
4434
|
}
|
|
4221
4435
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4222
4436
|
style: {
|
|
4223
|
-
color: color
|
|
4224
|
-
fontSize: fontSize
|
|
4225
|
-
|
|
4437
|
+
color: color ?? merge.TOOLTIP.color,
|
|
4438
|
+
fontSize: fontSize ?? merge.TOOLTIP.font.size,
|
|
4439
|
+
fontStyle: fontStyle ?? merge.TOOLTIP.font.style,
|
|
4440
|
+
fontFamily: fontFamily ?? merge.TOOLTIP.font.family,
|
|
4441
|
+
fontWeight: fontWeight ?? merge.TOOLTIP.font.weight
|
|
4226
4442
|
}
|
|
4227
4443
|
}, text))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4228
4444
|
style: {
|
|
4229
4445
|
cursor: 'pointer'
|
|
4230
4446
|
},
|
|
4231
4447
|
onClick: handleShow
|
|
4232
|
-
}, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
|
|
4448
|
+
}, tooltipIcon ? tooltipIcon : merge.TOOLTIP.icon ? merge.TOOLTIP.icon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
|
|
4233
4449
|
};
|
|
4234
4450
|
Tooltip.propTypes = {
|
|
4235
4451
|
type: PropTypes__default["default"].string,
|
|
@@ -4238,8 +4454,10 @@ Tooltip.propTypes = {
|
|
|
4238
4454
|
height: PropTypes__default["default"].string,
|
|
4239
4455
|
radius: PropTypes__default["default"].string,
|
|
4240
4456
|
fontSize: PropTypes__default["default"].string,
|
|
4457
|
+
fontStyle: PropTypes__default["default"].string,
|
|
4241
4458
|
className: PropTypes__default["default"].string,
|
|
4242
4459
|
fontFamily: PropTypes__default["default"].string,
|
|
4460
|
+
fontWeight: PropTypes__default["default"].string,
|
|
4243
4461
|
tooltipWidth: PropTypes__default["default"].string,
|
|
4244
4462
|
tooltipIcon: PropTypes__default["default"].element,
|
|
4245
4463
|
tooltipRadius: PropTypes__default["default"].string,
|
|
@@ -4294,17 +4512,19 @@ var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captc
|
|
|
4294
4512
|
styleInject(css_248z$5);
|
|
4295
4513
|
|
|
4296
4514
|
const Captcha = ({
|
|
4297
|
-
size,
|
|
4298
4515
|
color,
|
|
4299
4516
|
range,
|
|
4300
4517
|
label,
|
|
4518
|
+
getRange,
|
|
4301
4519
|
className,
|
|
4302
|
-
|
|
4520
|
+
fontSize,
|
|
4521
|
+
fontStyle,
|
|
4522
|
+
fontFamily,
|
|
4523
|
+
fontWeight
|
|
4303
4524
|
}) => {
|
|
4304
4525
|
const [rangeNumber, setRangeNumber] = React.useState(0);
|
|
4305
4526
|
const [rangeProgress, setRangeProgress] = React.useState(0);
|
|
4306
|
-
const
|
|
4307
|
-
const classProps = classnames__default["default"](className ? className : configStyles.CAPTCHA.className);
|
|
4527
|
+
const classProps = classnames__default["default"](className ?? merge.CAPTCHA.className);
|
|
4308
4528
|
const handleRange = e => {
|
|
4309
4529
|
const value = e.target.value;
|
|
4310
4530
|
getRange(value);
|
|
@@ -4330,8 +4550,11 @@ const Captcha = ({
|
|
|
4330
4550
|
className: classProps
|
|
4331
4551
|
}, label && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4332
4552
|
style: {
|
|
4333
|
-
|
|
4334
|
-
|
|
4553
|
+
color: color ?? merge.CAPTCHA.label.color,
|
|
4554
|
+
fontSize: fontSize ?? merge.CAPTCHA.label.font.size,
|
|
4555
|
+
fontStyle: fontStyle ?? merge.CAPTCHA.label.font.style,
|
|
4556
|
+
fontFamily: fontFamily ?? merge.CAPTCHA.label.font.family,
|
|
4557
|
+
fontWeight: fontWeight ?? merge.CAPTCHA.label.font.weight
|
|
4335
4558
|
}
|
|
4336
4559
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4337
4560
|
style: {
|
|
@@ -4424,9 +4647,8 @@ const Stepper = ({
|
|
|
4424
4647
|
activeSteps,
|
|
4425
4648
|
className
|
|
4426
4649
|
}) => {
|
|
4427
|
-
const configStyles = compereConfigs();
|
|
4428
4650
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4429
|
-
className: classnames__default["default"](className
|
|
4651
|
+
className: classnames__default["default"](className ?? merge.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`)
|
|
4430
4652
|
}, (() => {
|
|
4431
4653
|
let steppers = [];
|
|
4432
4654
|
for (let step = 1; step <= stepLength; step++) {
|
|
@@ -4457,13 +4679,14 @@ const Checkbox = ({
|
|
|
4457
4679
|
keyNames,
|
|
4458
4680
|
className,
|
|
4459
4681
|
direction,
|
|
4682
|
+
checkedColor,
|
|
4683
|
+
unCheckedColor,
|
|
4460
4684
|
checkedIcon,
|
|
4461
4685
|
unCheckedIcon,
|
|
4462
4686
|
labelMarginLeft,
|
|
4463
4687
|
checkBoxMarginBottom
|
|
4464
4688
|
}) => {
|
|
4465
|
-
const
|
|
4466
|
-
const classProps = classnames__default["default"](className ? className : configStyles.CHECKBOX.className);
|
|
4689
|
+
const classProps = classnames__default["default"](className ?? merge.CHECKBOX.className);
|
|
4467
4690
|
const [innerData, setInnerData] = React.useState([]);
|
|
4468
4691
|
const [innerKeyNames, setInnerKeyNames] = React.useState({
|
|
4469
4692
|
id: 'id',
|
|
@@ -4496,11 +4719,11 @@ const Checkbox = ({
|
|
|
4496
4719
|
React.useEffect(() => {
|
|
4497
4720
|
if (typeof keyNames === 'object' && keyNames !== null && !Array.isArray(keyNames)) {
|
|
4498
4721
|
setInnerKeyNames({
|
|
4499
|
-
id: keyNames.id
|
|
4500
|
-
label: keyNames.label
|
|
4501
|
-
checked: keyNames.checked
|
|
4502
|
-
disabled: keyNames.disabled
|
|
4503
|
-
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked
|
|
4722
|
+
id: keyNames.id ?? 'id',
|
|
4723
|
+
label: keyNames.label ?? 'label',
|
|
4724
|
+
checked: keyNames.checked ?? 'checked',
|
|
4725
|
+
disabled: keyNames.disabled ?? 'disabled',
|
|
4726
|
+
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked ?? 'ignoreDisabledForChecked'
|
|
4504
4727
|
});
|
|
4505
4728
|
}
|
|
4506
4729
|
}, [keyNames]);
|
|
@@ -4516,21 +4739,21 @@ const Checkbox = ({
|
|
|
4516
4739
|
key: `TUI_${index}_checkbox`,
|
|
4517
4740
|
style: {
|
|
4518
4741
|
width: 'fit-content',
|
|
4519
|
-
marginBottom: direction === 'vertical' ? checkBoxMarginBottom
|
|
4742
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ?? merge.CHECKBOX.marginBottom : '0px'
|
|
4520
4743
|
}
|
|
4521
4744
|
}, /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
|
|
4522
4745
|
data: item,
|
|
4523
4746
|
index: index,
|
|
4524
|
-
checkedColor: "#00236A",
|
|
4525
|
-
unCheckedColor: "#D1D1D1",
|
|
4526
|
-
checkedIcon: checkedIcon,
|
|
4527
|
-
unCheckedIcon: unCheckedIcon,
|
|
4528
4747
|
handleChecked: handleSendData,
|
|
4529
4748
|
label: item[innerKeyNames.label],
|
|
4530
4749
|
checked: item[innerKeyNames.checked],
|
|
4531
4750
|
disabled: item[innerKeyNames.disabled],
|
|
4532
4751
|
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
4533
|
-
labelMarginLeft: labelMarginLeft
|
|
4752
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.label.marginLeft,
|
|
4753
|
+
checkedColor: checkedColor ?? merge.CHECKBOX.colors.checked,
|
|
4754
|
+
unCheckedColor: unCheckedColor ?? merge.CHECKBOX.colors.unChecked,
|
|
4755
|
+
checkedIcon: checkedIcon ?? merge.CHECKBOX.checkedIcon,
|
|
4756
|
+
unCheckedIcon: unCheckedIcon ?? merge.CHECKBOX.unCheckedIcon
|
|
4534
4757
|
}));
|
|
4535
4758
|
}));
|
|
4536
4759
|
};
|
|
@@ -4540,6 +4763,8 @@ Checkbox.propTypes = {
|
|
|
4540
4763
|
checkedIcon: PropTypes__default["default"].element,
|
|
4541
4764
|
unCheckedIcon: PropTypes__default["default"].element,
|
|
4542
4765
|
labelMarginLeft: PropTypes__default["default"].string,
|
|
4766
|
+
checkedColor: PropTypes__default["default"].string,
|
|
4767
|
+
unCheckedColor: PropTypes__default["default"].string,
|
|
4543
4768
|
checkBoxMarginBottom: PropTypes__default["default"].string,
|
|
4544
4769
|
direction: PropTypes__default["default"].oneOf(Object.values(DirectionMode)),
|
|
4545
4770
|
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
|
|
@@ -4557,6 +4782,9 @@ const PositionSide = {
|
|
|
4557
4782
|
};
|
|
4558
4783
|
const Textarea = ({
|
|
4559
4784
|
size,
|
|
4785
|
+
style,
|
|
4786
|
+
family,
|
|
4787
|
+
weight,
|
|
4560
4788
|
label,
|
|
4561
4789
|
width,
|
|
4562
4790
|
value,
|
|
@@ -4576,6 +4804,9 @@ const Textarea = ({
|
|
|
4576
4804
|
maxLength,
|
|
4577
4805
|
labelSize,
|
|
4578
4806
|
errorSize,
|
|
4807
|
+
errorStyle,
|
|
4808
|
+
errorWeight,
|
|
4809
|
+
errorFamily,
|
|
4579
4810
|
marginTop,
|
|
4580
4811
|
className,
|
|
4581
4812
|
labelColor,
|
|
@@ -4592,8 +4823,7 @@ const Textarea = ({
|
|
|
4592
4823
|
showCharacterCount,
|
|
4593
4824
|
characterCountPosition
|
|
4594
4825
|
}) => {
|
|
4595
|
-
const
|
|
4596
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TEXTAREA.className);
|
|
4826
|
+
const classProps = classnames__default["default"](className ?? merge.TEXTAREA.className);
|
|
4597
4827
|
const [error, setError] = React.useState('');
|
|
4598
4828
|
const [isHover, setIsHover] = React.useState(false);
|
|
4599
4829
|
const [isFocus, setIsFocus] = React.useState(false);
|
|
@@ -4618,8 +4848,8 @@ const Textarea = ({
|
|
|
4618
4848
|
onChange(value.substr(0, maxLength));
|
|
4619
4849
|
}
|
|
4620
4850
|
} else {
|
|
4621
|
-
if (value.length >
|
|
4622
|
-
onChange(value.substr(0,
|
|
4851
|
+
if (value.length > merge.TEXTAREA.maxLength) {
|
|
4852
|
+
onChange(value.substr(0, merge.TEXTAREA.maxLength));
|
|
4623
4853
|
}
|
|
4624
4854
|
}
|
|
4625
4855
|
};
|
|
@@ -4642,7 +4872,7 @@ const Textarea = ({
|
|
|
4642
4872
|
}, [value, onChange, errorMessage]);
|
|
4643
4873
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4644
4874
|
style: {
|
|
4645
|
-
width: width
|
|
4875
|
+
width: width ?? merge.TEXTAREA.width
|
|
4646
4876
|
},
|
|
4647
4877
|
className: classProps
|
|
4648
4878
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4650,40 +4880,38 @@ const Textarea = ({
|
|
|
4650
4880
|
display: 'flex',
|
|
4651
4881
|
alignItems: 'center',
|
|
4652
4882
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
4653
|
-
|
|
4654
|
-
|
|
4883
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4884
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4885
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family,
|
|
4886
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4887
|
+
marginBottom: labelMarginBottom ?? merge.TEXTAREA.label.marginBottom
|
|
4655
4888
|
}
|
|
4656
4889
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4657
4890
|
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
|
|
4891
|
+
display: labelDisplay ?? merge.TEXTAREA.label.display
|
|
4667
4892
|
}
|
|
4668
|
-
}, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
4893
|
+
}, 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
4894
|
style: {
|
|
4670
4895
|
width: '100%',
|
|
4671
4896
|
border: 'none',
|
|
4672
4897
|
outline: 'none',
|
|
4673
4898
|
overflow: 'auto',
|
|
4674
4899
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4675
|
-
fontSize: size
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4900
|
+
fontSize: size ?? merge.TEXTAREA.font.size,
|
|
4901
|
+
fontStyle: style ?? merge.TEXTAREA.font.style,
|
|
4902
|
+
fontFamily: family ?? merge.TEXTAREA.font.family,
|
|
4903
|
+
fontWeight: weight ?? merge.TEXTAREA.font.weight,
|
|
4904
|
+
height: height ?? merge.TEXTAREA.height,
|
|
4905
|
+
padding: padding ?? merge.TEXTAREA.padding,
|
|
4906
|
+
borderRadius: radius ?? merge.TEXTAREA.radius,
|
|
4907
|
+
minWidth: minWidth ?? merge.TEXTAREA.minWidth,
|
|
4908
|
+
maxWidth: maxWidth ?? merge.TEXTAREA.maxWidth,
|
|
4909
|
+
minHeight: minHeight ?? merge.TEXTAREA.minHeight,
|
|
4910
|
+
maxHeight: maxHeight ?? merge.TEXTAREA.maxHeight,
|
|
4911
|
+
boxSizing: boxSizing ?? merge.TEXTAREA.box.sizing,
|
|
4912
|
+
backgroundColor: backgroundColor ?? merge.TEXTAREA.colors.background,
|
|
4913
|
+
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,
|
|
4914
|
+
resize: resize ? resize : merge.TEXTAREA.resize
|
|
4687
4915
|
},
|
|
4688
4916
|
value: innerValue,
|
|
4689
4917
|
disabled: disabled,
|
|
@@ -4699,26 +4927,34 @@ const Textarea = ({
|
|
|
4699
4927
|
}
|
|
4700
4928
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4701
4929
|
style: {
|
|
4702
|
-
color: labelColor
|
|
4703
|
-
fontSize: labelSize
|
|
4930
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4931
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4932
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4933
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family
|
|
4704
4934
|
}
|
|
4705
4935
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4706
4936
|
style: {
|
|
4707
4937
|
clear: 'both',
|
|
4708
4938
|
wordBreak: 'break-all',
|
|
4709
|
-
maxWidth: width
|
|
4939
|
+
maxWidth: width ?? merge.TEXTAREA.width
|
|
4710
4940
|
}
|
|
4711
4941
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4712
4942
|
style: {
|
|
4713
4943
|
display: 'inline-block',
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4944
|
+
color: errorColor ?? merge.TEXTAREA.error.font.color,
|
|
4945
|
+
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4946
|
+
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4947
|
+
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
|
4948
|
+
fontFamily: errorFamily ?? merge.TEXTAREA.error.font.family,
|
|
4949
|
+
marginTop: marginTop ?? merge.TEXTAREA.error.marginTop
|
|
4717
4950
|
}
|
|
4718
4951
|
}, error)) : '');
|
|
4719
4952
|
};
|
|
4720
4953
|
Textarea.propTypes = {
|
|
4721
4954
|
size: PropTypes__default["default"].string,
|
|
4955
|
+
style: PropTypes__default["default"].string,
|
|
4956
|
+
family: PropTypes__default["default"].string,
|
|
4957
|
+
weight: PropTypes__default["default"].string,
|
|
4722
4958
|
label: PropTypes__default["default"].string,
|
|
4723
4959
|
width: PropTypes__default["default"].string,
|
|
4724
4960
|
height: PropTypes__default["default"].string,
|
|
@@ -4737,6 +4973,9 @@ Textarea.propTypes = {
|
|
|
4737
4973
|
maxLength: PropTypes__default["default"].number,
|
|
4738
4974
|
labelSize: PropTypes__default["default"].string,
|
|
4739
4975
|
errorSize: PropTypes__default["default"].string,
|
|
4976
|
+
errorStyle: PropTypes__default["default"].string,
|
|
4977
|
+
errorWeight: PropTypes__default["default"].string,
|
|
4978
|
+
errorFamily: PropTypes__default["default"].string,
|
|
4740
4979
|
className: PropTypes__default["default"].string,
|
|
4741
4980
|
labelColor: PropTypes__default["default"].string,
|
|
4742
4981
|
errorColor: PropTypes__default["default"].string,
|
|
@@ -4793,8 +5032,7 @@ const Typography = ({
|
|
|
4793
5032
|
backgroundColor,
|
|
4794
5033
|
...props
|
|
4795
5034
|
}) => {
|
|
4796
|
-
const
|
|
4797
|
-
const classProps = classnames__default["default"](className ? className : configStyles.TYPOGRAPHY.className);
|
|
5035
|
+
const classProps = classnames__default["default"](className ?? merge.TYPOGRAPHY.className);
|
|
4798
5036
|
const [isHover, setIsHover] = React.useState(false);
|
|
4799
5037
|
const [validVariant, setValidVariant] = React.useState(false);
|
|
4800
5038
|
const handleMouseEnter = () => {
|
|
@@ -4805,20 +5043,20 @@ const Typography = ({
|
|
|
4805
5043
|
};
|
|
4806
5044
|
const tagT = /*#__PURE__*/React__default["default"].createElement(variant, {
|
|
4807
5045
|
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 :
|
|
5046
|
+
border: border ?? merge.TYPOGRAPHY.border,
|
|
5047
|
+
cursor: cursor ?? merge.TYPOGRAPHY.cursor,
|
|
5048
|
+
borderRadius: radius ?? merge.TYPOGRAPHY.radius,
|
|
5049
|
+
fontSize: size ?? merge.TYPOGRAPHY.font['size' + variant],
|
|
5050
|
+
fontWeight: weight ?? merge.TYPOGRAPHY.font['weight' + variant],
|
|
5051
|
+
textShadow: textShadow ?? merge.TYPOGRAPHY.text['shadow' + variant],
|
|
5052
|
+
textAlign: textAlign ?? merge.TYPOGRAPHY.text['align' + variant],
|
|
5053
|
+
fontStyle: fontStyle ?? merge.TYPOGRAPHY.font['style' + variant],
|
|
5054
|
+
lineHeight: lineHeight ?? merge.TYPOGRAPHY.text['lineHeight' + variant],
|
|
5055
|
+
fontFamily: fontFamily ?? merge.TYPOGRAPHY.font['family' + variant],
|
|
5056
|
+
textTransform: textTransform ?? merge.TYPOGRAPHY.text['transform' + variant],
|
|
5057
|
+
textDecoration: textDecoration ?? merge.TYPOGRAPHY.text['decoration' + variant],
|
|
5058
|
+
backgroundColor: backgroundColor ?? merge.TYPOGRAPHY.colors['background' + variant],
|
|
5059
|
+
color: isHover ? colorHover ? colorHover : color ? color : merge.TYPOGRAPHY.colors[variant] : color ? color : merge.TYPOGRAPHY.colors[variant]
|
|
4822
5060
|
},
|
|
4823
5061
|
...props,
|
|
4824
5062
|
className: classProps,
|
|
@@ -4948,7 +5186,6 @@ const Pagination = ({
|
|
|
4948
5186
|
totalCount,
|
|
4949
5187
|
currentPage
|
|
4950
5188
|
}) => {
|
|
4951
|
-
const configStyles = compereConfigs();
|
|
4952
5189
|
const [inpVal, setInpVal] = React.useState('');
|
|
4953
5190
|
const [error, setError] = React.useState(false);
|
|
4954
5191
|
const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
|
|
@@ -4977,7 +5214,7 @@ const Pagination = ({
|
|
|
4977
5214
|
}
|
|
4978
5215
|
const classProps = classnames__default["default"](
|
|
4979
5216
|
// TODO: check and remove pagination-bar-rem class
|
|
4980
|
-
styles$1.list, className
|
|
5217
|
+
styles$1.list, className ?? merge.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`);
|
|
4981
5218
|
const onNext = () => {
|
|
4982
5219
|
onPageChange(currentPageNumber + 1);
|
|
4983
5220
|
};
|
|
@@ -5121,7 +5358,11 @@ const Autocomplete = ({
|
|
|
5121
5358
|
selected,
|
|
5122
5359
|
className,
|
|
5123
5360
|
errorSize,
|
|
5361
|
+
errorStyle,
|
|
5362
|
+
errorWeight,
|
|
5363
|
+
errorFamily,
|
|
5124
5364
|
labelSize,
|
|
5365
|
+
labelStyle,
|
|
5125
5366
|
marginTop,
|
|
5126
5367
|
errorColor,
|
|
5127
5368
|
labelColor,
|
|
@@ -5133,6 +5374,8 @@ const Autocomplete = ({
|
|
|
5133
5374
|
labelDisplay,
|
|
5134
5375
|
contentDisplay,
|
|
5135
5376
|
contentTopSize,
|
|
5377
|
+
contentTopStyle,
|
|
5378
|
+
contentTopFamily,
|
|
5136
5379
|
contentPosition,
|
|
5137
5380
|
contentTopColor,
|
|
5138
5381
|
labelLineHeight,
|
|
@@ -5195,15 +5438,14 @@ const Autocomplete = ({
|
|
|
5195
5438
|
const [innerError, setInnerError] = React.useState('');
|
|
5196
5439
|
const [innerValue, setInnerValue] = React.useState('');
|
|
5197
5440
|
const [innerOptions, setInnerOptions] = React.useState([]);
|
|
5198
|
-
const
|
|
5199
|
-
const classProps = classnames__default["default"](className ? className : configStyles.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5441
|
+
const classProps = classnames__default["default"](className ?? merge.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5200
5442
|
const showOption = styled.keyframes`
|
|
5201
5443
|
100% {
|
|
5202
5444
|
max-height: 400px;
|
|
5203
5445
|
}
|
|
5204
5446
|
`;
|
|
5205
5447
|
const animation = () => styled.css`
|
|
5206
|
-
${showOption} ${showOptionDuration
|
|
5448
|
+
${showOption} ${showOptionDuration ?? merge.AUTOCOMPLETE.showOptionDuration} linear forwards
|
|
5207
5449
|
`;
|
|
5208
5450
|
const handleMouseEnter = () => {
|
|
5209
5451
|
setIsHover(true);
|
|
@@ -5212,12 +5454,12 @@ const Autocomplete = ({
|
|
|
5212
5454
|
setIsHover(false);
|
|
5213
5455
|
};
|
|
5214
5456
|
const handleRowMouseEnter = e => {
|
|
5215
|
-
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor :
|
|
5216
|
-
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor :
|
|
5457
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : merge.AUTOCOMPLETE.contentBottom.row.colors.hover;
|
|
5458
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover;
|
|
5217
5459
|
};
|
|
5218
5460
|
const handleRowMouseLeave = e => {
|
|
5219
|
-
e.target.style.color = contentBottomRowColor ? contentBottomRowColor :
|
|
5220
|
-
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5461
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color;
|
|
5462
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background;
|
|
5221
5463
|
};
|
|
5222
5464
|
const handleFocus = () => {
|
|
5223
5465
|
setIsFocus(true);
|
|
@@ -5236,11 +5478,6 @@ const Autocomplete = ({
|
|
|
5236
5478
|
name: value,
|
|
5237
5479
|
id: currentId
|
|
5238
5480
|
});
|
|
5239
|
-
} else {
|
|
5240
|
-
change({
|
|
5241
|
-
name: '',
|
|
5242
|
-
id: ''
|
|
5243
|
-
});
|
|
5244
5481
|
}
|
|
5245
5482
|
};
|
|
5246
5483
|
const handleClick = selectedValue => {
|
|
@@ -5249,28 +5486,28 @@ const Autocomplete = ({
|
|
|
5249
5486
|
setInnerValue(selectedValue[keyNames.name]);
|
|
5250
5487
|
getItem(selectedValue);
|
|
5251
5488
|
};
|
|
5252
|
-
const optionList = /*#__PURE__*/React__default["default"].createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5489
|
+
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
5490
|
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' :
|
|
5491
|
+
left: contentBottomLeft ?? merge.AUTOCOMPLETE.contentBottom.left,
|
|
5492
|
+
width: contentBottomWidth ?? merge.AUTOCOMPLETE.contentBottom.width,
|
|
5493
|
+
zIndex: contentBottomZindex ?? merge.AUTOCOMPLETE.contentBottom.zIndex,
|
|
5494
|
+
borderRadius: contentBottomRadius ?? merge.AUTOCOMPLETE.contentBottom.radius,
|
|
5495
|
+
maxWidth: contentBottomMaxWidth ?? merge.AUTOCOMPLETE.contentBottom.maxWidth,
|
|
5496
|
+
overflow: contentBottomOverflow ?? merge.AUTOCOMPLETE.contentBottom.overflow,
|
|
5497
|
+
position: contentBottomPosition ?? merge.AUTOCOMPLETE.contentBottom.position,
|
|
5498
|
+
minHeight: contentBottomMinHeight ?? merge.AUTOCOMPLETE.contentBottom.minHeight,
|
|
5499
|
+
boxShadow: contentBottomBoxShadow ?? merge.AUTOCOMPLETE.contentBottom.box.shadow,
|
|
5500
|
+
backgroundColor: contentBottomBackgroundColor ?? merge.AUTOCOMPLETE.contentBottom.colors.background,
|
|
5501
|
+
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
5502
|
animation
|
|
5266
5503
|
}
|
|
5267
5504
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5268
5505
|
style: {
|
|
5269
|
-
display: contentBottomInnerDisplay ? contentBottomInnerDisplay :
|
|
5270
|
-
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY :
|
|
5271
|
-
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX :
|
|
5272
|
-
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight :
|
|
5273
|
-
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection :
|
|
5506
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : merge.AUTOCOMPLETE.contentBottom.inner.display,
|
|
5507
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : merge.AUTOCOMPLETE.contentBottom.inner.overflowY,
|
|
5508
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : merge.AUTOCOMPLETE.contentBottom.inner.overflowX,
|
|
5509
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : merge.AUTOCOMPLETE.contentBottom.inner.maxHeight,
|
|
5510
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : merge.AUTOCOMPLETE.contentBottom.inner.direction
|
|
5274
5511
|
}
|
|
5275
5512
|
}, innerOptions.map(item => {
|
|
5276
5513
|
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -5280,34 +5517,37 @@ const Autocomplete = ({
|
|
|
5280
5517
|
onClick: () => handleClick(item),
|
|
5281
5518
|
style: {
|
|
5282
5519
|
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 :
|
|
5520
|
+
color: contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color,
|
|
5521
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5522
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : merge.AUTOCOMPLETE.contentBottom.row.cursor,
|
|
5523
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : merge.AUTOCOMPLETE.contentBottom.row.display,
|
|
5524
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : merge.AUTOCOMPLETE.contentBottom.row.padding,
|
|
5525
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : merge.AUTOCOMPLETE.contentBottom.row.font.size,
|
|
5526
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : merge.AUTOCOMPLETE.contentBottom.box.sizing,
|
|
5527
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : merge.AUTOCOMPLETE.contentBottom.row.font.weight,
|
|
5528
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5529
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : merge.AUTOCOMPLETE.contentBottom.row.alignItems,
|
|
5530
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : merge.AUTOCOMPLETE.contentBottom.row.transition,
|
|
5531
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : merge.AUTOCOMPLETE.contentBottom.row.marginBottom,
|
|
5532
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
5296
5533
|
}
|
|
5297
5534
|
}, item[keyNames.name]);
|
|
5298
|
-
}))) :
|
|
5535
|
+
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5299
5536
|
style: {
|
|
5300
5537
|
position: 'absolute',
|
|
5301
5538
|
zIndex: '1',
|
|
5302
|
-
color: errorColor
|
|
5303
|
-
fontSize: errorSize
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5539
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5540
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5541
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5542
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5543
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5544
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5545
|
+
padding: innerErrorPadding ?? merge.AUTOCOMPLETE.innerError.padding,
|
|
5546
|
+
height: contentBottomRowHeight ?? merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5547
|
+
lineHeight: contentBottomRowLineHeight ?? merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5548
|
+
backgroundColor: innerErrorBackgroundColor ?? merge.AUTOCOMPLETE.innerError.colors.background
|
|
5549
|
+
}
|
|
5550
|
+
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
5311
5551
|
React.useEffect(() => {
|
|
5312
5552
|
if (options === undefined) {
|
|
5313
5553
|
alert('Please add options prop');
|
|
@@ -5343,22 +5583,23 @@ const Autocomplete = ({
|
|
|
5343
5583
|
className: classProps
|
|
5344
5584
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
5345
5585
|
style: {
|
|
5346
|
-
color: labelColor
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5586
|
+
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
5587
|
+
display: labelDisplay ?? merge.AUTOCOMPLETE.label.display,
|
|
5588
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5589
|
+
fontSize: labelSize ?? merge.AUTOCOMPLETE.label.font.size,
|
|
5590
|
+
fontStyle: labelStyle ?? merge.AUTOCOMPLETE.label.font.style,
|
|
5591
|
+
fontWeight: labelWeight ?? merge.AUTOCOMPLETE.label.font.weight,
|
|
5592
|
+
fontFamily: labelFontFamily ?? merge.AUTOCOMPLETE.label.font.family,
|
|
5593
|
+
lineHeight: labelLineHeight ?? merge.AUTOCOMPLETE.label.lineHeight,
|
|
5594
|
+
marginBottom: labelMarginBottom ?? merge.AUTOCOMPLETE.label.marginBottom,
|
|
5595
|
+
textTransform: labelTextTransform ?? merge.AUTOCOMPLETE.label.textTransform
|
|
5355
5596
|
}
|
|
5356
5597
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5357
5598
|
style: {
|
|
5358
|
-
display: contentDisplay
|
|
5359
|
-
position: contentPosition
|
|
5360
|
-
|
|
5361
|
-
|
|
5599
|
+
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5600
|
+
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5601
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5602
|
+
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5362
5603
|
}
|
|
5363
5604
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
5364
5605
|
id: id,
|
|
@@ -5370,35 +5611,40 @@ const Autocomplete = ({
|
|
|
5370
5611
|
onInput: handleChange,
|
|
5371
5612
|
onMouseEnter: handleMouseEnter,
|
|
5372
5613
|
onMouseLeave: handleMouseLeave,
|
|
5373
|
-
placeholder: placeHolder
|
|
5374
|
-
autoComplete: autoComplete
|
|
5614
|
+
placeholder: placeHolder ?? '',
|
|
5615
|
+
autoComplete: autoComplete ?? merge.AUTOCOMPLETE.autoComplete,
|
|
5375
5616
|
style: {
|
|
5376
5617
|
border: 'none',
|
|
5377
5618
|
outline: 'none',
|
|
5378
5619
|
maxWidth: '100%',
|
|
5379
5620
|
transition: 'all 240ms',
|
|
5380
5621
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5381
|
-
color: contentTopColor
|
|
5382
|
-
fontSize: contentTopSize
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5622
|
+
color: contentTopColor ?? merge.AUTOCOMPLETE.color,
|
|
5623
|
+
fontSize: contentTopSize ?? merge.AUTOCOMPLETE.font.size,
|
|
5624
|
+
fontStyle: contentTopStyle ?? merge.AUTOCOMPLETE.font.style,
|
|
5625
|
+
fontFamily: contentTopFamily ?? merge.AUTOCOMPLETE.font.family,
|
|
5626
|
+
fontWeight: contentTopWeight ?? merge.AUTOCOMPLETE.font.weight,
|
|
5627
|
+
backgroundColor: disabled && (backgroundDisableColor ?? merge.AUTOCOMPLETE.colors.backgroundDisable),
|
|
5628
|
+
height: contentTopHeight ?? merge.AUTOCOMPLETE.height,
|
|
5629
|
+
padding: contentTopPadding ?? merge.AUTOCOMPLETE.padding,
|
|
5630
|
+
display: contentTopDisplay ?? merge.AUTOCOMPLETE.display,
|
|
5631
|
+
borderRadius: contentTopRadius ?? merge.AUTOCOMPLETE.radius,
|
|
5632
|
+
boxSizing: contentTopBoxSizing ?? merge.AUTOCOMPLETE.box.sizing,
|
|
5633
|
+
lineHeight: contentTopLineHeight ?? merge.AUTOCOMPLETE.lineHeight,
|
|
5634
|
+
flexDirection: contentTopDirection ?? merge.AUTOCOMPLETE.direction,
|
|
5635
|
+
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
5636
|
}
|
|
5394
5637
|
}, props)), innerError ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5395
5638
|
style: {
|
|
5396
5639
|
left: '0px',
|
|
5397
5640
|
position: 'absolute',
|
|
5398
|
-
color: errorColor
|
|
5399
|
-
fontSize: errorSize
|
|
5400
|
-
|
|
5401
|
-
|
|
5641
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5642
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5643
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5644
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5645
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5646
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5647
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5402
5648
|
}
|
|
5403
5649
|
}, innerError) : '', optionList));
|
|
5404
5650
|
};
|
|
@@ -5410,8 +5656,12 @@ Autocomplete.propTypes = {
|
|
|
5410
5656
|
selected: PropTypes__default["default"].object,
|
|
5411
5657
|
className: PropTypes__default["default"].string,
|
|
5412
5658
|
errorSize: PropTypes__default["default"].string,
|
|
5659
|
+
errorStyle: PropTypes__default["default"].string,
|
|
5660
|
+
errorWeight: PropTypes__default["default"].string,
|
|
5661
|
+
errorFamily: PropTypes__default["default"].string,
|
|
5413
5662
|
marginTop: PropTypes__default["default"].string,
|
|
5414
5663
|
labelSize: PropTypes__default["default"].string,
|
|
5664
|
+
labelStyle: PropTypes__default["default"].string,
|
|
5415
5665
|
errorColor: PropTypes__default["default"].string,
|
|
5416
5666
|
labelColor: PropTypes__default["default"].string,
|
|
5417
5667
|
searchCount: PropTypes__default["default"].number,
|
|
@@ -5422,6 +5672,8 @@ Autocomplete.propTypes = {
|
|
|
5422
5672
|
autoComplete: PropTypes__default["default"].string,
|
|
5423
5673
|
contentDisplay: PropTypes__default["default"].string,
|
|
5424
5674
|
contentTopSize: PropTypes__default["default"].string,
|
|
5675
|
+
contentTopStyle: PropTypes__default["default"].string,
|
|
5676
|
+
contentTopFamily: PropTypes__default["default"].string,
|
|
5425
5677
|
contentPosition: PropTypes__default["default"].string,
|
|
5426
5678
|
labelLineHeight: PropTypes__default["default"].string,
|
|
5427
5679
|
contentTopColor: PropTypes__default["default"].string,
|
|
@@ -5481,7 +5733,11 @@ Autocomplete.propTypes = {
|
|
|
5481
5733
|
};
|
|
5482
5734
|
Autocomplete.defaultProps = {
|
|
5483
5735
|
searchCount: 3,
|
|
5484
|
-
disabled: false
|
|
5736
|
+
disabled: false,
|
|
5737
|
+
keyNames: {
|
|
5738
|
+
name: 'name',
|
|
5739
|
+
id: 'id'
|
|
5740
|
+
}
|
|
5485
5741
|
};
|
|
5486
5742
|
|
|
5487
5743
|
exports.Autocomplete = Autocomplete;
|