@xaypay/tui 0.0.123 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -75
- package/dist/index.es.js +808 -555
- package/dist/index.js +808 -555
- package/package.json +1 -1
- package/tui.config.js +770 -452
package/dist/index.es.js
CHANGED
|
@@ -236,13 +236,26 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
236
236
|
check,
|
|
237
237
|
radius,
|
|
238
238
|
status,
|
|
239
|
+
iconPdf,
|
|
240
|
+
iconPng,
|
|
241
|
+
iconJpg,
|
|
242
|
+
iconJpeg,
|
|
243
|
+
iconHeic,
|
|
244
|
+
iconWrong,
|
|
245
|
+
iconDelItem,
|
|
239
246
|
removeFile,
|
|
240
247
|
fileFormat,
|
|
241
248
|
progressColor,
|
|
242
249
|
listItemHeight,
|
|
243
250
|
listItemPadding,
|
|
244
251
|
progressFontSize,
|
|
252
|
+
progressFontStyle,
|
|
253
|
+
progressFontWeight,
|
|
254
|
+
progressFontFamily,
|
|
245
255
|
listItemErrorSize,
|
|
256
|
+
listItemErrorStyle,
|
|
257
|
+
listItemErrorWeight,
|
|
258
|
+
listItemErrorFamily,
|
|
246
259
|
timeForRemoveError,
|
|
247
260
|
listItemErrorColor,
|
|
248
261
|
progressTrackColor,
|
|
@@ -319,7 +332,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
319
332
|
style: {
|
|
320
333
|
width: '32px'
|
|
321
334
|
}
|
|
322
|
-
}, /*#__PURE__*/React__default.createElement(SvgWrong, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
335
|
+
}, iconWrong ? iconWrong : /*#__PURE__*/React__default.createElement(SvgWrong, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
323
336
|
style: {
|
|
324
337
|
position: 'relative',
|
|
325
338
|
display: 'flex',
|
|
@@ -337,7 +350,10 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
337
350
|
color: progressColor,
|
|
338
351
|
boxSizing: 'border-box',
|
|
339
352
|
flexDirection: 'column',
|
|
340
|
-
fontSize: listItemErrorSize
|
|
353
|
+
fontSize: listItemErrorSize,
|
|
354
|
+
fontStyle: listItemErrorStyle,
|
|
355
|
+
fontWeight: listItemErrorWeight,
|
|
356
|
+
fontFamily: listItemErrorFamily
|
|
341
357
|
}
|
|
342
358
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
343
359
|
style: {
|
|
@@ -362,7 +378,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
362
378
|
style: {
|
|
363
379
|
width: '32px'
|
|
364
380
|
}
|
|
365
|
-
}, fileFormat === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? /*#__PURE__*/React__default.createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
381
|
+
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
366
382
|
style: {
|
|
367
383
|
position: 'relative',
|
|
368
384
|
display: 'flex',
|
|
@@ -381,6 +397,9 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
381
397
|
boxSizing: 'border-box',
|
|
382
398
|
alignItems: 'flex-start',
|
|
383
399
|
fontSize: progressFontSize,
|
|
400
|
+
fontStyle: progressFontStyle,
|
|
401
|
+
fontWeight: progressFontWeight,
|
|
402
|
+
fontFamily: progressFontFamily,
|
|
384
403
|
justifyContent: 'space-between'
|
|
385
404
|
}
|
|
386
405
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -414,30 +433,28 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
414
433
|
cursor: 'pointer'
|
|
415
434
|
},
|
|
416
435
|
onClick: () => handleRemoveItem(uuid)
|
|
417
|
-
}, /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
|
|
436
|
+
}, iconDelItem ? iconDelItem : /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
|
|
418
437
|
});
|
|
419
438
|
|
|
420
439
|
const _ = require('lodash');
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
440
|
+
let projectConfig = {};
|
|
441
|
+
let packageConfig = {};
|
|
442
|
+
try {
|
|
443
|
+
packageConfig = require('../tui.config.js');
|
|
444
|
+
} catch (e) {
|
|
424
445
|
try {
|
|
425
|
-
packageConfig = require('
|
|
426
|
-
} catch (
|
|
427
|
-
|
|
428
|
-
packageConfig = require('../../tui.config.js');
|
|
429
|
-
} catch (err) {
|
|
430
|
-
packageConfig = {};
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
try {
|
|
434
|
-
projectConfig = require('../../../../tui.config.js');
|
|
435
|
-
} catch (error) {
|
|
436
|
-
projectConfig = {};
|
|
437
|
-
// console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
|
|
446
|
+
packageConfig = require('../../tui.config.js');
|
|
447
|
+
} catch (err) {
|
|
448
|
+
packageConfig = {};
|
|
438
449
|
}
|
|
439
|
-
|
|
440
|
-
|
|
450
|
+
}
|
|
451
|
+
try {
|
|
452
|
+
projectConfig = require('../../../../tui.config.js');
|
|
453
|
+
} catch (error) {
|
|
454
|
+
projectConfig = {};
|
|
455
|
+
// console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
|
|
456
|
+
}
|
|
457
|
+
const merge = _.merge(packageConfig.default, projectConfig.default);
|
|
441
458
|
const hasOwnerProperty = (object, property) => {
|
|
442
459
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
443
460
|
};
|
|
@@ -445,6 +462,7 @@ const hasOwnerProperty = (object, property) => {
|
|
|
445
462
|
const Button = ({
|
|
446
463
|
icon,
|
|
447
464
|
size,
|
|
465
|
+
style,
|
|
448
466
|
type,
|
|
449
467
|
font,
|
|
450
468
|
color,
|
|
@@ -475,8 +493,7 @@ const Button = ({
|
|
|
475
493
|
...props
|
|
476
494
|
}) => {
|
|
477
495
|
const [isHover, setIsHover] = useState(false);
|
|
478
|
-
const
|
|
479
|
-
const classProps = classnames(className ? className : configStyles.BUTTON.className);
|
|
496
|
+
const classProps = classnames(className ?? merge.BUTTON.className);
|
|
480
497
|
const handleMouseEnter = () => {
|
|
481
498
|
setIsHover(true);
|
|
482
499
|
};
|
|
@@ -494,37 +511,40 @@ const Button = ({
|
|
|
494
511
|
outline: 'none',
|
|
495
512
|
alignItems: 'center',
|
|
496
513
|
justifyContent: 'center',
|
|
497
|
-
fontSize: size
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
514
|
+
fontSize: size ?? merge.BUTTON.font.size,
|
|
515
|
+
fontStyle: style ?? merge.BUTTON.font.style,
|
|
516
|
+
fontFamily: font ?? merge.BUTTON.font.family,
|
|
517
|
+
height: height ?? merge.BUTTON.height,
|
|
518
|
+
fontWeight: weight ?? merge.BUTTON.font.weight,
|
|
519
|
+
padding: padding ?? merge.BUTTON.padding,
|
|
520
|
+
borderRadius: radius ?? merge.BUTTON.radius,
|
|
521
|
+
boxSizing: boxSizing ?? merge.BUTTON.box.sizing,
|
|
522
|
+
transition: transition ?? merge.BUTTON.transition,
|
|
523
|
+
border: outline ? 'none' : border ?? merge.BUTTON.border,
|
|
524
|
+
width: contentWidth ? 'auto' : width ?? merge.BUTTON.width,
|
|
525
|
+
cursor: disabled ? 'not-allowed' : cursor ?? merge.BUTTON.cursor,
|
|
526
|
+
textTransform: textTransform ?? merge.BUTTON.text.transform,
|
|
527
|
+
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,
|
|
528
|
+
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',
|
|
529
|
+
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
|
|
512
530
|
},
|
|
513
|
-
type: type
|
|
514
|
-
disabled: disabled
|
|
531
|
+
type: type ?? merge.BUTTON.type,
|
|
532
|
+
disabled: disabled ?? merge.BUTTON.disabled,
|
|
515
533
|
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
|
|
516
534
|
onMouseEnter: handleMouseEnter,
|
|
517
535
|
onMouseLeave: handleMouseLeave,
|
|
518
536
|
className: classProps
|
|
519
537
|
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
|
|
520
538
|
style: {
|
|
521
|
-
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight :
|
|
539
|
+
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : merge.BUTTON.icon.marginRight : '0px'
|
|
522
540
|
}
|
|
523
541
|
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
|
|
524
542
|
};
|
|
525
543
|
Button.propTypes = {
|
|
526
544
|
type: PropTypes.string,
|
|
527
545
|
size: PropTypes.string,
|
|
546
|
+
style: PropTypes.string,
|
|
547
|
+
weight: PropTypes.string,
|
|
528
548
|
font: PropTypes.string,
|
|
529
549
|
icon: PropTypes.element,
|
|
530
550
|
hoverIcon: PropTypes.element,
|
|
@@ -533,7 +553,6 @@ Button.propTypes = {
|
|
|
533
553
|
outline: PropTypes.bool,
|
|
534
554
|
onClick: PropTypes.func,
|
|
535
555
|
label: PropTypes.string,
|
|
536
|
-
weight: PropTypes.string,
|
|
537
556
|
height: PropTypes.string,
|
|
538
557
|
cursor: PropTypes.string,
|
|
539
558
|
border: PropTypes.string,
|
|
@@ -671,11 +690,15 @@ const File = ({
|
|
|
671
690
|
name,
|
|
672
691
|
color,
|
|
673
692
|
label,
|
|
693
|
+
style,
|
|
674
694
|
weight,
|
|
695
|
+
family,
|
|
675
696
|
height,
|
|
676
697
|
radius,
|
|
677
698
|
change,
|
|
678
|
-
|
|
699
|
+
borderWidth,
|
|
700
|
+
borderStyle,
|
|
701
|
+
borderColor,
|
|
679
702
|
upload,
|
|
680
703
|
preview,
|
|
681
704
|
maxSize,
|
|
@@ -685,14 +708,19 @@ const File = ({
|
|
|
685
708
|
required,
|
|
686
709
|
className,
|
|
687
710
|
errorSize,
|
|
711
|
+
errorStyle,
|
|
712
|
+
errorWeight,
|
|
713
|
+
errorFamily,
|
|
688
714
|
labelSize,
|
|
715
|
+
labelStyle,
|
|
716
|
+
labelWeight,
|
|
717
|
+
labelFamily,
|
|
689
718
|
removeFile,
|
|
690
719
|
labelColor,
|
|
691
720
|
errorColor,
|
|
692
721
|
filesArray,
|
|
693
722
|
componentId,
|
|
694
723
|
putFileHere,
|
|
695
|
-
borderColor,
|
|
696
724
|
uploadColor,
|
|
697
725
|
defaultData,
|
|
698
726
|
formatError,
|
|
@@ -701,12 +729,27 @@ const File = ({
|
|
|
701
729
|
maxSizeError,
|
|
702
730
|
progressColor,
|
|
703
731
|
noChoosenFile,
|
|
732
|
+
iconPdf,
|
|
733
|
+
iconPng,
|
|
734
|
+
iconJpg,
|
|
735
|
+
iconJpeg,
|
|
736
|
+
iconHeic,
|
|
737
|
+
iconWrong,
|
|
738
|
+
iconUpload,
|
|
739
|
+
iconRequired,
|
|
740
|
+
iconDeleteItem,
|
|
741
|
+
iconRemoveFile,
|
|
742
|
+
iconDeleteComponent,
|
|
704
743
|
uploadBtnFont,
|
|
705
744
|
uploadBtnSize,
|
|
745
|
+
uploadBtnStyle,
|
|
746
|
+
uploadBtnWeight,
|
|
706
747
|
uploadBtnLabel,
|
|
707
748
|
uploadBtnColor,
|
|
708
749
|
uploadBtnHeight,
|
|
750
|
+
uploadBtnHoverColor,
|
|
709
751
|
uploadBtnBackgroundColor,
|
|
752
|
+
uploadBtnBackgroundColorHover,
|
|
710
753
|
fileExtensions,
|
|
711
754
|
listItemHeight,
|
|
712
755
|
backgroundColor,
|
|
@@ -714,9 +757,15 @@ const File = ({
|
|
|
714
757
|
removeComponent,
|
|
715
758
|
listItemPadding,
|
|
716
759
|
progressFontSize,
|
|
760
|
+
progressFontStyle,
|
|
761
|
+
progressFontWeight,
|
|
762
|
+
progressFontFamily,
|
|
717
763
|
borderHoverColor,
|
|
718
764
|
maxCHoosenLength,
|
|
719
765
|
listItemErrorSize,
|
|
766
|
+
listItemErrorStyle,
|
|
767
|
+
listItemErrorWeight,
|
|
768
|
+
listItemErrorFamily,
|
|
720
769
|
progressTrackColor,
|
|
721
770
|
fileAreaImageWidth,
|
|
722
771
|
listItemErrorColor,
|
|
@@ -734,9 +783,8 @@ const File = ({
|
|
|
734
783
|
}) => {
|
|
735
784
|
const ref = useRef(null);
|
|
736
785
|
const inpRef = useRef(null);
|
|
737
|
-
const configStyles = compereConfigs();
|
|
738
786
|
const memoizedItems = useMemo(() => filesArray, [filesArray]);
|
|
739
|
-
const classProps = classnames(className
|
|
787
|
+
const classProps = classnames(className ?? merge.FILE.className);
|
|
740
788
|
const [error, setError] = useState('');
|
|
741
789
|
const [isHover, setIsHover] = useState(false);
|
|
742
790
|
const [singleFile, setSingleFile] = useState(null);
|
|
@@ -758,7 +806,7 @@ const File = ({
|
|
|
758
806
|
const handleUploadFiles = file => {
|
|
759
807
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
760
808
|
if (file.length > choosenFileCount || file.length + memoizedItems.length > choosenFileCount) {
|
|
761
|
-
setError(maxCHoosenLengthError
|
|
809
|
+
setError(maxCHoosenLengthError ?? `Դիմումին կարող եք կցել առավելագույնը ${choosenFileCount} ֆայլ`);
|
|
762
810
|
const clearFunc = () => {
|
|
763
811
|
clearTimeout(time);
|
|
764
812
|
};
|
|
@@ -782,14 +830,14 @@ const File = ({
|
|
|
782
830
|
change({
|
|
783
831
|
file: file[ix],
|
|
784
832
|
uuid: v4(),
|
|
785
|
-
check: formatError
|
|
833
|
+
check: formatError ?? merge.FILE.error.format
|
|
786
834
|
});
|
|
787
835
|
}
|
|
788
836
|
} else {
|
|
789
837
|
change({
|
|
790
838
|
file: file[ix],
|
|
791
839
|
uuid: v4(),
|
|
792
|
-
check: maxSizeError
|
|
840
|
+
check: maxSizeError ?? merge.FILE.error.maxSize
|
|
793
841
|
});
|
|
794
842
|
}
|
|
795
843
|
}
|
|
@@ -811,14 +859,14 @@ const File = ({
|
|
|
811
859
|
change({
|
|
812
860
|
file: file[ix],
|
|
813
861
|
uuid: v4(),
|
|
814
|
-
check: formatError
|
|
862
|
+
check: formatError ?? merge.FILE.error.format
|
|
815
863
|
});
|
|
816
864
|
}
|
|
817
865
|
} else {
|
|
818
866
|
change({
|
|
819
867
|
file: file[ix],
|
|
820
868
|
uuid: v4(),
|
|
821
|
-
check: maxSizeError
|
|
869
|
+
check: maxSizeError ?? merge.FILE.error.maxSize
|
|
822
870
|
});
|
|
823
871
|
}
|
|
824
872
|
}
|
|
@@ -832,7 +880,7 @@ const File = ({
|
|
|
832
880
|
setImage(null);
|
|
833
881
|
handleUploadFiles(file);
|
|
834
882
|
if (file.length === 0 && memoizedItems.length === 0) {
|
|
835
|
-
setError(noChoosenFile
|
|
883
|
+
setError(noChoosenFile ?? merge.FILE.error.noChoosen);
|
|
836
884
|
}
|
|
837
885
|
} else {
|
|
838
886
|
if (file[0]) {
|
|
@@ -850,16 +898,16 @@ const File = ({
|
|
|
850
898
|
}
|
|
851
899
|
} else {
|
|
852
900
|
setImage(null);
|
|
853
|
-
setError(formatError
|
|
901
|
+
setError(formatError ?? merge.FILE.error.format);
|
|
854
902
|
}
|
|
855
903
|
} else {
|
|
856
904
|
setImage(null);
|
|
857
|
-
setError(maxSizeError
|
|
905
|
+
setError(maxSizeError ?? merge.FILE.error.maxSize);
|
|
858
906
|
}
|
|
859
907
|
}
|
|
860
908
|
if (file.length === 0) {
|
|
861
909
|
setImage(null);
|
|
862
|
-
setError(noChoosenFile
|
|
910
|
+
setError(noChoosenFile ?? merge.FILE.error.noChoosen);
|
|
863
911
|
}
|
|
864
912
|
}
|
|
865
913
|
};
|
|
@@ -945,7 +993,7 @@ const File = ({
|
|
|
945
993
|
ref: ref,
|
|
946
994
|
style: {
|
|
947
995
|
width: '100%',
|
|
948
|
-
maxWidth: maxWidth
|
|
996
|
+
maxWidth: maxWidth ?? merge.FILE.maxWidth
|
|
949
997
|
},
|
|
950
998
|
className: classProps
|
|
951
999
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -957,15 +1005,18 @@ const File = ({
|
|
|
957
1005
|
}
|
|
958
1006
|
}, label && /*#__PURE__*/React__default.createElement("label", {
|
|
959
1007
|
style: {
|
|
960
|
-
color: labelColor
|
|
961
|
-
fontSize: labelSize
|
|
1008
|
+
color: labelColor ?? merge.FILE.label.color,
|
|
1009
|
+
fontSize: labelSize ?? merge.FILE.label.font.size,
|
|
1010
|
+
fontStyle: labelStyle ?? merge.FILE.label.font.style,
|
|
1011
|
+
fontWeight: labelWeight ?? merge.FILE.label.font.weight,
|
|
1012
|
+
fontFamily: labelFamily ?? merge.FILE.label.font.family
|
|
962
1013
|
}
|
|
963
|
-
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
|
|
1014
|
+
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : merge.FILE.icon.required ? merge.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
|
|
964
1015
|
style: {
|
|
965
1016
|
cursor: 'pointer'
|
|
966
1017
|
},
|
|
967
1018
|
onClick: handleRemoveComponent
|
|
968
|
-
}, /*#__PURE__*/React__default.createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
1019
|
+
}, iconDeleteComponent ? iconDeleteComponent : merge.FILE.icon.deleteComponent ? merge.FILE.icon.deleteComponent : /*#__PURE__*/React__default.createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
969
1020
|
style: {
|
|
970
1021
|
width: '100%',
|
|
971
1022
|
display: 'flex',
|
|
@@ -974,11 +1025,12 @@ const File = ({
|
|
|
974
1025
|
boxSizing: 'border-box',
|
|
975
1026
|
justifyContent: 'center',
|
|
976
1027
|
cursor: !disabled ? 'pointer' : 'not-allowed',
|
|
977
|
-
height: height
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1028
|
+
height: height ?? merge.FILE.height,
|
|
1029
|
+
borderWidth: borderWidth ?? merge.FILE.border.width,
|
|
1030
|
+
borderStyle: borderStyle ?? merge.FILE.border.style,
|
|
1031
|
+
borderRadius: radius ?? merge.FILE.radius,
|
|
1032
|
+
backgroundColor: backgroundColor ?? merge.FILE.colors.background,
|
|
1033
|
+
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
|
|
982
1034
|
},
|
|
983
1035
|
onDrop: handleDrop,
|
|
984
1036
|
onClick: handleClick,
|
|
@@ -1002,38 +1054,40 @@ const File = ({
|
|
|
1002
1054
|
alignItems: 'center',
|
|
1003
1055
|
flexDirection: 'column',
|
|
1004
1056
|
justifyContent: 'center',
|
|
1005
|
-
color: color
|
|
1006
|
-
fontSize: size
|
|
1007
|
-
|
|
1057
|
+
color: color ?? merge.FILE.color,
|
|
1058
|
+
fontSize: size ?? merge.FILE.font.size,
|
|
1059
|
+
fontStyle: style ?? merge.FILE.font.style,
|
|
1060
|
+
fontFamily: family ?? merge.FILE.font.family,
|
|
1061
|
+
fontWeight: weight ?? merge.FILE.font.weight
|
|
1008
1062
|
}
|
|
1009
|
-
}, !multiple && image && preview ? image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
1063
|
+
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : merge.FILE.icon.pdf ? merge.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : merge.FILE.icon.heic ? merge.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
1010
1064
|
src: image,
|
|
1011
1065
|
style: {
|
|
1012
1066
|
display: 'block',
|
|
1013
1067
|
maxWidth: '100%',
|
|
1014
1068
|
maxHeight: '95%',
|
|
1015
1069
|
objectFit: 'contain',
|
|
1016
|
-
width: fileAreaImageWidth
|
|
1017
|
-
height: fileAreaImageHeight
|
|
1070
|
+
width: fileAreaImageWidth ?? merge.FILE.fileAreaImageWidth,
|
|
1071
|
+
height: fileAreaImageHeight ?? merge.FILE.fileAreaImageHeight
|
|
1018
1072
|
},
|
|
1019
1073
|
alt: "file preview"
|
|
1020
|
-
}) : preview ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
|
|
1074
|
+
}) : preview ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, iconUpload ? iconUpload : merge.FILE.icon.upload ? merge.FILE.icon.upload : /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
|
|
1021
1075
|
style: {
|
|
1022
1076
|
margin: '0px'
|
|
1023
1077
|
}
|
|
1024
|
-
}, putFileHere
|
|
1078
|
+
}, putFileHere ?? merge.FILE.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : merge.FILE.or, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
1025
1079
|
style: {
|
|
1026
|
-
color: uploadColor
|
|
1080
|
+
color: uploadColor ?? merge.FILE.uploadColor
|
|
1027
1081
|
}
|
|
1028
|
-
}, upload
|
|
1082
|
+
}, upload ?? merge.FILE.upload))), /*#__PURE__*/React__default.createElement("div", {
|
|
1029
1083
|
style: {
|
|
1030
|
-
marginTop: extentionsRowMarginTop
|
|
1084
|
+
marginTop: extentionsRowMarginTop ?? merge.FILE.extentionsRowMarginTop
|
|
1031
1085
|
}
|
|
1032
1086
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1033
1087
|
style: {
|
|
1034
1088
|
margin: '0px'
|
|
1035
1089
|
}
|
|
1036
|
-
}, fileSizeText
|
|
1090
|
+
}, fileSizeText ?? merge.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1037
1091
|
style: {
|
|
1038
1092
|
width: '100%',
|
|
1039
1093
|
padding: '5px',
|
|
@@ -1045,14 +1099,16 @@ const File = ({
|
|
|
1045
1099
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1046
1100
|
contentWidth: true,
|
|
1047
1101
|
onClick: _ => _,
|
|
1048
|
-
font: uploadBtnFont
|
|
1049
|
-
size: uploadBtnSize
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1102
|
+
font: uploadBtnFont ?? merge.FILE.uploadBtn.font.family,
|
|
1103
|
+
size: uploadBtnSize ?? merge.FILE.uploadBtn.font.size,
|
|
1104
|
+
style: uploadBtnStyle ?? merge.FILE.uploadBtn.font.style,
|
|
1105
|
+
weight: uploadBtnWeight ?? merge.FILE.uploadBtn.font.weight,
|
|
1106
|
+
label: uploadBtnLabel ?? merge.FILE.uploadBtn.label,
|
|
1107
|
+
color: uploadBtnColor ?? merge.FILE.uploadBtn.color,
|
|
1108
|
+
height: uploadBtnHeight ?? merge.FILE.uploadBtn.height,
|
|
1109
|
+
hoverColor: uploadBtnHoverColor ?? merge.FILE.uploadBtn.colors.hover,
|
|
1110
|
+
backgroundColor: uploadBtnBackgroundColor ?? merge.FILE.uploadBtn.colors.background,
|
|
1111
|
+
backgroundHoverColor: uploadBtnBackgroundColorHover ?? merge.FILE.uploadBtn.colors.backgroundHover
|
|
1056
1112
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
1057
1113
|
style: {
|
|
1058
1114
|
margin: '0px',
|
|
@@ -1061,7 +1117,7 @@ const File = ({
|
|
|
1061
1117
|
whiteSpace: 'nowrap',
|
|
1062
1118
|
textOverflow: 'ellipsis'
|
|
1063
1119
|
}
|
|
1064
|
-
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText
|
|
1120
|
+
}, singleFile ? singleFile[0].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? merge.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
1065
1121
|
style: {
|
|
1066
1122
|
position: 'absolute',
|
|
1067
1123
|
top: '0px',
|
|
@@ -1074,9 +1130,9 @@ const File = ({
|
|
|
1074
1130
|
boxSizing: 'border-box',
|
|
1075
1131
|
alignItems: 'flex-start',
|
|
1076
1132
|
justifyContent: 'flex-end',
|
|
1077
|
-
borderRadius: radius
|
|
1133
|
+
borderRadius: radius ?? merge.FILE.radius,
|
|
1078
1134
|
display: !multiple && !disabled && image && !error && isHover ? 'flex' : 'none',
|
|
1079
|
-
backgroundColor: hiddenBackgroundColor
|
|
1135
|
+
backgroundColor: hiddenBackgroundColor ?? merge.FILE.colors.backgroundHidden
|
|
1080
1136
|
},
|
|
1081
1137
|
onClick: handleStopPropagation
|
|
1082
1138
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1084,12 +1140,15 @@ const File = ({
|
|
|
1084
1140
|
cursor: 'pointer'
|
|
1085
1141
|
},
|
|
1086
1142
|
onClick: handleRemoveFile
|
|
1087
|
-
}, /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default.createElement("span", {
|
|
1143
|
+
}, iconRemoveFile ? iconRemoveFile : merge.FILE.icon.removeFile ? merge.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default.createElement("span", {
|
|
1088
1144
|
style: {
|
|
1089
1145
|
marginTop: '6px',
|
|
1090
1146
|
display: 'inline-block',
|
|
1091
|
-
color: errorColor
|
|
1092
|
-
fontSize: errorSize
|
|
1147
|
+
color: errorColor ?? merge.FILE.error.color,
|
|
1148
|
+
fontSize: errorSize ?? merge.FILE.error.font.size,
|
|
1149
|
+
fontStyle: errorStyle ?? merge.FILE.error.font.style,
|
|
1150
|
+
fontWeight: errorWeight ?? merge.FILE.error.font.weight,
|
|
1151
|
+
fontFamily: errorFamily ?? merge.FILE.error.font.family
|
|
1093
1152
|
}
|
|
1094
1153
|
}, error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
1095
1154
|
return /*#__PURE__*/React__default.createElement(FileItem, {
|
|
@@ -1099,22 +1158,35 @@ const File = ({
|
|
|
1099
1158
|
status: item.status,
|
|
1100
1159
|
size: item.file.size,
|
|
1101
1160
|
name: item.file.name,
|
|
1161
|
+
iconPdf: iconPdf ?? merge.FILE.icon.pdf,
|
|
1162
|
+
iconPng: iconPng ?? merge.FILE.icon.png,
|
|
1163
|
+
iconJpg: iconJpg ?? merge.FILE.icon.jpg,
|
|
1164
|
+
iconJpeg: iconJpeg ?? merge.FILE.icon.jpeg,
|
|
1165
|
+
iconHeic: iconHeic ?? merge.FILE.icon.heic,
|
|
1166
|
+
iconWrong: iconWrong ?? merge.FILE.icon.wrong,
|
|
1167
|
+
iconDelItem: iconDeleteItem ?? merge.FILE.icon.deleteItem,
|
|
1102
1168
|
timeForRemoveError: timeForRemoveError,
|
|
1103
1169
|
removeFile: removeFile ? removeFile : _ => _,
|
|
1104
|
-
radius: radius
|
|
1170
|
+
radius: radius ?? merge.FILE.radius,
|
|
1105
1171
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
1106
|
-
progressColor: progressColor
|
|
1107
|
-
listItemHeight: listItemHeight
|
|
1108
|
-
listItemPadding: listItemPadding
|
|
1109
|
-
progressFontSize: progressFontSize
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1172
|
+
progressColor: progressColor ?? merge.FILE.progress.color,
|
|
1173
|
+
listItemHeight: listItemHeight ?? merge.FILE.listItem.height,
|
|
1174
|
+
listItemPadding: listItemPadding ?? merge.FILE.listItem.padding,
|
|
1175
|
+
progressFontSize: progressFontSize ?? merge.FILE.progress.font.size,
|
|
1176
|
+
progressFontStyle: progressFontStyle ?? merge.FILE.progress.font.style,
|
|
1177
|
+
progressFontWeight: progressFontWeight ?? merge.FILE.progress.font.weight,
|
|
1178
|
+
progressFontFamily: progressFontFamily ?? merge.FILE.progress.font.family,
|
|
1179
|
+
listItemErrorSize: listItemErrorSize ?? merge.FILE.listItem.error.font.size,
|
|
1180
|
+
listItemErrorStyle: listItemErrorStyle ?? merge.FILE.listItem.error.style,
|
|
1181
|
+
listItemErrorWeight: listItemErrorWeight ?? merge.FILE.listItem.error.weight,
|
|
1182
|
+
listItemErrorFamily: listItemErrorFamily ?? merge.FILE.listItem.error.family,
|
|
1183
|
+
listItemErrorColor: listItemErrorColor ?? merge.FILE.listItem.error.color,
|
|
1184
|
+
progressTrackColor: progressTrackColor ?? merge.FILE.progress.colors.track,
|
|
1185
|
+
progressFailedColor: progressFailedColor ?? merge.FILE.progress.colors.failed,
|
|
1186
|
+
progressSuccessColor: progressSuccessColor ?? merge.FILE.progress.colors.success,
|
|
1187
|
+
progressLoadingColor: progressLoadingColor ?? merge.FILE.progress.colors.loading,
|
|
1188
|
+
listItemBackgroundColor: listItemBackgroundColor ?? merge.FILE.listItem.colors.background,
|
|
1189
|
+
listItemBackgroundErrorColor: listItemBackgroundErrorColor ?? merge.FILE.listItem.colors.backgroundError
|
|
1118
1190
|
});
|
|
1119
1191
|
}));
|
|
1120
1192
|
};
|
|
@@ -1127,21 +1199,30 @@ File.propTypes = {
|
|
|
1127
1199
|
height: PropTypes.string,
|
|
1128
1200
|
disabled: PropTypes.bool,
|
|
1129
1201
|
radius: PropTypes.string,
|
|
1130
|
-
|
|
1202
|
+
borderWidth: PropTypes.string,
|
|
1203
|
+
borderStyle: PropTypes.string,
|
|
1204
|
+
borderColor: PropTypes.string,
|
|
1131
1205
|
required: PropTypes.bool,
|
|
1132
1206
|
upload: PropTypes.string,
|
|
1133
1207
|
weight: PropTypes.number,
|
|
1208
|
+
style: PropTypes.string,
|
|
1209
|
+
family: PropTypes.string,
|
|
1134
1210
|
maxSize: PropTypes.number,
|
|
1135
1211
|
maxWidth: PropTypes.string,
|
|
1136
1212
|
removeFile: PropTypes.func,
|
|
1137
1213
|
className: PropTypes.string,
|
|
1138
1214
|
errorSize: PropTypes.string,
|
|
1215
|
+
errorStyle: PropTypes.string,
|
|
1216
|
+
errorWeight: PropTypes.string,
|
|
1217
|
+
errorFamily: PropTypes.string,
|
|
1139
1218
|
labelSize: PropTypes.string,
|
|
1219
|
+
labelStyle: PropTypes.string,
|
|
1220
|
+
labelWeight: PropTypes.string,
|
|
1221
|
+
labelFamily: PropTypes.string,
|
|
1140
1222
|
labelColor: PropTypes.string,
|
|
1141
1223
|
errorColor: PropTypes.string,
|
|
1142
1224
|
formatError: PropTypes.string,
|
|
1143
1225
|
putFileHere: PropTypes.string,
|
|
1144
|
-
borderColor: PropTypes.string,
|
|
1145
1226
|
uploadColor: PropTypes.string,
|
|
1146
1227
|
defaultData: PropTypes.object,
|
|
1147
1228
|
componentId: PropTypes.number,
|
|
@@ -1152,20 +1233,40 @@ File.propTypes = {
|
|
|
1152
1233
|
progressColor: PropTypes.string,
|
|
1153
1234
|
deleteComponent: PropTypes.bool,
|
|
1154
1235
|
removeComponent: PropTypes.func,
|
|
1236
|
+
iconPdf: PropTypes.element,
|
|
1237
|
+
iconPng: PropTypes.element,
|
|
1238
|
+
iconJpg: PropTypes.element,
|
|
1239
|
+
iconJpeg: PropTypes.element,
|
|
1240
|
+
iconHeic: PropTypes.element,
|
|
1241
|
+
iconWrong: PropTypes.element,
|
|
1242
|
+
iconUpload: PropTypes.element,
|
|
1243
|
+
iconRequired: PropTypes.element,
|
|
1244
|
+
iconDeleteItem: PropTypes.element,
|
|
1245
|
+
iconRemoveFile: PropTypes.element,
|
|
1246
|
+
iconDeleteComponent: PropTypes.element,
|
|
1155
1247
|
uploadBtnFont: PropTypes.string,
|
|
1156
1248
|
uploadBtnSize: PropTypes.string,
|
|
1249
|
+
uploadBtnStyle: PropTypes.string,
|
|
1250
|
+
uploadBtnWeight: PropTypes.string,
|
|
1157
1251
|
uploadBtnLabel: PropTypes.string,
|
|
1158
1252
|
uploadBtnColor: PropTypes.string,
|
|
1159
1253
|
uploadBtnHeight: PropTypes.string,
|
|
1160
1254
|
uploadBtnBackgroundColor: PropTypes.string,
|
|
1255
|
+
uploadBtnBackgroundColorHover: PropTypes.string,
|
|
1161
1256
|
listItemHeight: PropTypes.string,
|
|
1162
1257
|
backgroundColor: PropTypes.string,
|
|
1163
1258
|
change: PropTypes.func.isRequired,
|
|
1164
1259
|
listItemPadding: PropTypes.string,
|
|
1165
1260
|
maxCHoosenLength: PropTypes.number,
|
|
1166
1261
|
progressFontSize: PropTypes.string,
|
|
1262
|
+
progressFontStyle: PropTypes.string,
|
|
1263
|
+
progressFontWeight: PropTypes.string,
|
|
1264
|
+
progressFontFamily: PropTypes.string,
|
|
1167
1265
|
borderHoverColor: PropTypes.string,
|
|
1168
1266
|
listItemErrorSize: PropTypes.string,
|
|
1267
|
+
listItemErrorStyle: PropTypes.string,
|
|
1268
|
+
listItemErrorWeight: PropTypes.string,
|
|
1269
|
+
listItemErrorFamily: PropTypes.string,
|
|
1169
1270
|
timeForRemoveError: PropTypes.number,
|
|
1170
1271
|
progressTrackColor: PropTypes.string,
|
|
1171
1272
|
fileAreaImageWidth: PropTypes.string,
|
|
@@ -1248,7 +1349,6 @@ const Checkbox$1 = ({
|
|
|
1248
1349
|
labelMarginLeft,
|
|
1249
1350
|
ignoreDisabledForChecked
|
|
1250
1351
|
}) => {
|
|
1251
|
-
const configStyles = compereConfigs();
|
|
1252
1352
|
const [innerChecked, setInnerChecked] = useState(false);
|
|
1253
1353
|
const [innerDisabled, setInnerDisabled] = useState(false);
|
|
1254
1354
|
const handleClick = e => {
|
|
@@ -1280,10 +1380,10 @@ const Checkbox$1 = ({
|
|
|
1280
1380
|
...styles
|
|
1281
1381
|
},
|
|
1282
1382
|
onClick: !innerDisabled && handleChecked ? handleClick : _ => _
|
|
1283
|
-
}, innerChecked && (ignoreDisabledForChecked
|
|
1284
|
-
fillColor: checkedColor
|
|
1383
|
+
}, innerChecked && (ignoreDisabledForChecked ?? !innerDisabled) ? checkedIcon ? checkedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
|
|
1384
|
+
fillColor: checkedColor ?? merge.CHECKBOX.checkedColor
|
|
1285
1385
|
}) : unCheckedIcon ? unCheckedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
1286
|
-
fillColor: unCheckedColor
|
|
1386
|
+
fillColor: unCheckedColor ?? merge.CHECKBOX.unCheckedColor
|
|
1287
1387
|
}), label && /*#__PURE__*/React__default.createElement("span", {
|
|
1288
1388
|
style: {
|
|
1289
1389
|
marginLeft: labelMarginLeft
|
|
@@ -1307,7 +1407,6 @@ const SingleCheckbox = ({
|
|
|
1307
1407
|
labelMarginLeft,
|
|
1308
1408
|
ignoreDisabledForChecked
|
|
1309
1409
|
}) => {
|
|
1310
|
-
const configStyles = compereConfigs();
|
|
1311
1410
|
const [innerData, setInnerData] = useState(null);
|
|
1312
1411
|
useEffect(() => {
|
|
1313
1412
|
setInnerData(data);
|
|
@@ -1326,7 +1425,7 @@ const SingleCheckbox = ({
|
|
|
1326
1425
|
handleChecked: handleChecked,
|
|
1327
1426
|
unCheckedColor: unCheckedColor,
|
|
1328
1427
|
ignoreDisabledForChecked: ignoreDisabledForChecked,
|
|
1329
|
-
labelMarginLeft: labelMarginLeft
|
|
1428
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.labelMarginLeft
|
|
1330
1429
|
});
|
|
1331
1430
|
};
|
|
1332
1431
|
SingleCheckbox.propTypes = {
|
|
@@ -1383,6 +1482,7 @@ const TH = ({
|
|
|
1383
1482
|
tHeadFamily,
|
|
1384
1483
|
tHeadPadding,
|
|
1385
1484
|
tHeadFontSize,
|
|
1485
|
+
tHeadFontStyle,
|
|
1386
1486
|
tHeadTextAlign,
|
|
1387
1487
|
tHeadFontWeight,
|
|
1388
1488
|
tableColumnMinWidth,
|
|
@@ -1406,6 +1506,7 @@ const TH = ({
|
|
|
1406
1506
|
padding: tHeadPadding,
|
|
1407
1507
|
fontSize: tHeadFontSize,
|
|
1408
1508
|
fontFamily: tHeadFamily,
|
|
1509
|
+
fontStyle: tHeadFontStyle,
|
|
1409
1510
|
fontWeight: tHeadFontWeight,
|
|
1410
1511
|
minWidth: tableColumnMinWidth,
|
|
1411
1512
|
maxWidth: tableColumnMaxWidth,
|
|
@@ -1446,6 +1547,7 @@ const TD = ({
|
|
|
1446
1547
|
innerIndex,
|
|
1447
1548
|
tBodyColor,
|
|
1448
1549
|
borderRight,
|
|
1550
|
+
borderRightColor,
|
|
1449
1551
|
tBodyPadding,
|
|
1450
1552
|
tBodyFontSize,
|
|
1451
1553
|
openListColor,
|
|
@@ -1454,6 +1556,8 @@ const TD = ({
|
|
|
1454
1556
|
tBodyFontWeight,
|
|
1455
1557
|
handleCheckDots,
|
|
1456
1558
|
openListFontSize,
|
|
1559
|
+
openListFontStyle,
|
|
1560
|
+
openListFontWeight,
|
|
1457
1561
|
handleCheckedBody,
|
|
1458
1562
|
openListFontFamily,
|
|
1459
1563
|
tableColumnMinWidth,
|
|
@@ -1516,7 +1620,7 @@ const TD = ({
|
|
|
1516
1620
|
minWidth: tableColumnMinWidth,
|
|
1517
1621
|
maxWidth: tableColumnMaxWidth,
|
|
1518
1622
|
whiteSpace: Array.isArray(item) ? 'nowrap' : 'wrap',
|
|
1519
|
-
borderColor: hideBorder ? 'transparent' :
|
|
1623
|
+
borderColor: hideBorder ? 'transparent' : borderRightColor,
|
|
1520
1624
|
boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
1521
1625
|
borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
1522
1626
|
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
@@ -1600,7 +1704,8 @@ const TD = ({
|
|
|
1600
1704
|
style: {
|
|
1601
1705
|
textAlign: tBodyTextAlign,
|
|
1602
1706
|
margin: '0px',
|
|
1603
|
-
cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto'
|
|
1707
|
+
cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto',
|
|
1708
|
+
...item.props
|
|
1604
1709
|
},
|
|
1605
1710
|
onClick: hasOwnerProperty(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : hasOwnerProperty(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
|
|
1606
1711
|
}, 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.createElement("span", {
|
|
@@ -1666,6 +1771,8 @@ const TD = ({
|
|
|
1666
1771
|
color: openListColor,
|
|
1667
1772
|
textAlign: tBodyTextAlign,
|
|
1668
1773
|
fontSize: openListFontSize,
|
|
1774
|
+
fontStyle: openListFontStyle,
|
|
1775
|
+
fontWeight: openListFontWeight,
|
|
1669
1776
|
fontFamily: openListFontFamily
|
|
1670
1777
|
},
|
|
1671
1778
|
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
@@ -1750,6 +1857,7 @@ const Table = ({
|
|
|
1750
1857
|
tHeadFamily,
|
|
1751
1858
|
tHeadPadding,
|
|
1752
1859
|
tHeadFontSize,
|
|
1860
|
+
tHeadFontStyle,
|
|
1753
1861
|
tHeadTextAlign,
|
|
1754
1862
|
tHeadFontWeight,
|
|
1755
1863
|
tHeadBorderRadius,
|
|
@@ -1766,10 +1874,11 @@ const Table = ({
|
|
|
1766
1874
|
className,
|
|
1767
1875
|
openListColor,
|
|
1768
1876
|
openListFontSize,
|
|
1877
|
+
openListFontStyle,
|
|
1878
|
+
openListFontWeight,
|
|
1769
1879
|
openListFontFamily,
|
|
1770
1880
|
hideBorder
|
|
1771
1881
|
}) => {
|
|
1772
|
-
const configStyles = compereConfigs();
|
|
1773
1882
|
const [body, setBody] = useState([]);
|
|
1774
1883
|
const [header, setHeader] = useState([]);
|
|
1775
1884
|
const [disableArr, setDisableArr] = useState([]);
|
|
@@ -2242,15 +2351,15 @@ const Table = ({
|
|
|
2242
2351
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("table", {
|
|
2243
2352
|
style: {
|
|
2244
2353
|
width: '100%',
|
|
2245
|
-
borderCollapse:
|
|
2246
|
-
borderSpacing: `0 ${tBodyRowMarginTop
|
|
2354
|
+
borderCollapse: tableRowItem ?? merge.TABLE.body.row.asItem ? 'separate' : 'collapse',
|
|
2355
|
+
borderSpacing: `0 ${tBodyRowMarginTop ?? merge.TABLE.body.row.marginTop}`
|
|
2247
2356
|
},
|
|
2248
2357
|
onClick: handleTableClick,
|
|
2249
|
-
className: className
|
|
2358
|
+
className: className ?? merge.TABLE.className
|
|
2250
2359
|
}, header && header.length > 0 && /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
2251
2360
|
style: {
|
|
2252
|
-
color: tHeadColor
|
|
2253
|
-
backgroundColor: tHeadBackgroundColor
|
|
2361
|
+
color: tHeadColor ?? merge.TABLE.head.color,
|
|
2362
|
+
backgroundColor: tHeadBackgroundColor ?? merge.TABLE.head.colors.background,
|
|
2254
2363
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2255
2364
|
}
|
|
2256
2365
|
}, header.map((item, index) => {
|
|
@@ -2261,28 +2370,29 @@ const Table = ({
|
|
|
2261
2370
|
handleCheckedHeader: handleCheckedHeader,
|
|
2262
2371
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
2263
2372
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
2264
|
-
tHeadFamily: tHeadFamily
|
|
2265
|
-
tHeadPadding: tHeadPadding
|
|
2266
|
-
tHeadFontSize: tHeadFontSize
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2373
|
+
tHeadFamily: tHeadFamily ?? merge.TABLE.head.font.family,
|
|
2374
|
+
tHeadPadding: tHeadPadding ?? merge.TABLE.head.padding,
|
|
2375
|
+
tHeadFontSize: tHeadFontSize ?? merge.TABLE.head.font.size,
|
|
2376
|
+
tHeadFontStyle: tHeadFontStyle ?? merge.TABLE.head.font.style,
|
|
2377
|
+
tHeadTextAlign: tHeadTextAlign ?? merge.TABLE.textAlign,
|
|
2378
|
+
tHeadFontWeight: tHeadFontWeight ?? merge.TABLE.head.font.weight,
|
|
2379
|
+
borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : merge.TABLE.head.radius : '0px',
|
|
2380
|
+
borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : merge.TABLE.head.radius : '0px',
|
|
2381
|
+
tableColumnMinWidth: tableColumnMinWidth ?? merge.TABLE.column.minWidth,
|
|
2382
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? merge.TABLE.column.maxWidth
|
|
2273
2383
|
});
|
|
2274
2384
|
}))), body && body.length > 0 && /*#__PURE__*/React__default.createElement("tbody", {
|
|
2275
2385
|
style: {
|
|
2276
|
-
boxShadow: tBodyBoxShadow
|
|
2386
|
+
boxShadow: tBodyBoxShadow ?? merge.TABLE.body.box.shadow
|
|
2277
2387
|
}
|
|
2278
2388
|
}, body.map((item, index) => {
|
|
2279
2389
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
2280
2390
|
key: `${item}_${index}`,
|
|
2281
2391
|
style: {
|
|
2282
|
-
backgroundColor: tableRowBGColor
|
|
2283
|
-
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder :
|
|
2284
|
-
borderColor: hideBorder ? 'transparent' :
|
|
2285
|
-
boxShadow: (tableRowItem ? tableRowItem :
|
|
2392
|
+
backgroundColor: tableRowBGColor ?? merge.TABLE.body.row.colors.background,
|
|
2393
|
+
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : merge.TABLE.body.row.border,
|
|
2394
|
+
borderColor: hideBorder ? 'transparent' : merge.TABLE.body.row.borderColor,
|
|
2395
|
+
boxShadow: (tableRowItem ? tableRowItem : merge.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : merge.TABLE.body.row.box.shadow : 'none'
|
|
2286
2396
|
}
|
|
2287
2397
|
}, Object.values(item).map((innerItem, innerIndex) => {
|
|
2288
2398
|
return /*#__PURE__*/React__default.createElement(TD, {
|
|
@@ -2294,24 +2404,27 @@ const Table = ({
|
|
|
2294
2404
|
id: item.id ? item.id : '',
|
|
2295
2405
|
handleCheckDots: handleCheckDots,
|
|
2296
2406
|
key: `${innerItem}_${index}_${innerIndex}`,
|
|
2297
|
-
openListColor: openListColor
|
|
2298
|
-
tableColumnMinWidth: tableColumnMinWidth
|
|
2299
|
-
tableColumnMaxWidth: tableColumnMaxWidth
|
|
2300
|
-
openListFontSize: openListFontSize
|
|
2301
|
-
|
|
2407
|
+
openListColor: openListColor ?? merge.TABLE.openList.color,
|
|
2408
|
+
tableColumnMinWidth: tableColumnMinWidth ?? merge.TABLE.column.minWidth,
|
|
2409
|
+
tableColumnMaxWidth: tableColumnMaxWidth ?? merge.TABLE.column.maxWidth,
|
|
2410
|
+
openListFontSize: openListFontSize ?? merge.TABLE.openList.font.size,
|
|
2411
|
+
openListFontStyle: openListFontStyle ?? merge.TABLE.openList.font.style,
|
|
2412
|
+
openListFontWeight: openListFontWeight ?? merge.TABLE.openList.font.weight,
|
|
2413
|
+
openListFontFamily: openListFontFamily ?? merge.TABLE.openList.font.family,
|
|
2302
2414
|
handleCheckedBody: handleCheckedBody,
|
|
2303
2415
|
handleBodyActionClick: handleBodyActionClick,
|
|
2304
2416
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
2305
2417
|
handleContentListClick: handleContentListClick,
|
|
2306
|
-
tBodyColor: tBodyColor
|
|
2307
|
-
rowItem: tableRowItem
|
|
2308
|
-
rowRadius: tableRowRadius
|
|
2309
|
-
tBodyPadding: tBodyPadding
|
|
2310
|
-
tBodyFontSize: tBodyFontSize
|
|
2311
|
-
tBodyTextAlign: tBodyTextAlign
|
|
2312
|
-
tBodyFontFamily: tBodyFontFamily
|
|
2313
|
-
tBodyFontWeight: tBodyFontWeight
|
|
2314
|
-
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' :
|
|
2418
|
+
tBodyColor: tBodyColor ?? merge.TABLE.body.color,
|
|
2419
|
+
rowItem: tableRowItem ?? merge.TABLE.body.row.isItem,
|
|
2420
|
+
rowRadius: tableRowRadius ?? merge.TABLE.body.row.radius,
|
|
2421
|
+
tBodyPadding: tBodyPadding ?? merge.TABLE.body.padding,
|
|
2422
|
+
tBodyFontSize: tBodyFontSize ?? merge.TABLE.body.font.size,
|
|
2423
|
+
tBodyTextAlign: tBodyTextAlign ?? merge.TABLE.textAlign,
|
|
2424
|
+
tBodyFontFamily: tBodyFontFamily ?? merge.TABLE.body.font.family,
|
|
2425
|
+
tBodyFontWeight: tBodyFontWeight ?? merge.TABLE.body.font.weight,
|
|
2426
|
+
borderRight: innerIndex === Object.values(item).length - 1 ? 'none' : merge.TABLE.body.row.border,
|
|
2427
|
+
borderRightColor: innerIndex === Object.values(item).length - 1 ? 'transparent' : merge.TABLE.body.row.borderColor,
|
|
2315
2428
|
handleCheckArrowAction: handleCheckArrowAction,
|
|
2316
2429
|
handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
|
|
2317
2430
|
});
|
|
@@ -2334,6 +2447,7 @@ Table.propTypes = {
|
|
|
2334
2447
|
tHeadFamily: PropTypes.string,
|
|
2335
2448
|
tHeadPadding: PropTypes.string,
|
|
2336
2449
|
tHeadFontSize: PropTypes.string,
|
|
2450
|
+
tHeadFontStyle: PropTypes.string,
|
|
2337
2451
|
tHeadTextAlign: PropTypes.string,
|
|
2338
2452
|
tHeadFontWeight: PropTypes.number,
|
|
2339
2453
|
tHeadBorderRadius: PropTypes.string,
|
|
@@ -2350,6 +2464,8 @@ Table.propTypes = {
|
|
|
2350
2464
|
tBodyRowBorder: PropTypes.string,
|
|
2351
2465
|
openListColor: PropTypes.string,
|
|
2352
2466
|
openListFontSize: PropTypes.string,
|
|
2467
|
+
openListFontStyle: PropTypes.string,
|
|
2468
|
+
openListFontWeight: PropTypes.string,
|
|
2353
2469
|
openListFontFamily: PropTypes.string,
|
|
2354
2470
|
hideBorder: PropTypes.bool
|
|
2355
2471
|
};
|
|
@@ -2471,6 +2587,10 @@ const Modal = ({
|
|
|
2471
2587
|
padding,
|
|
2472
2588
|
setShow,
|
|
2473
2589
|
zoomIcon,
|
|
2590
|
+
prevIcon,
|
|
2591
|
+
nextIcon,
|
|
2592
|
+
closeIcon,
|
|
2593
|
+
closeSlideIcon,
|
|
2474
2594
|
selected,
|
|
2475
2595
|
children,
|
|
2476
2596
|
minWidth,
|
|
@@ -2482,6 +2602,8 @@ const Modal = ({
|
|
|
2482
2602
|
headerText,
|
|
2483
2603
|
imageWidth,
|
|
2484
2604
|
headerSize,
|
|
2605
|
+
headerStyle,
|
|
2606
|
+
headerFamily,
|
|
2485
2607
|
imageHeight,
|
|
2486
2608
|
headerColor,
|
|
2487
2609
|
borderStyle,
|
|
@@ -2492,9 +2614,7 @@ const Modal = ({
|
|
|
2492
2614
|
outsideClose,
|
|
2493
2615
|
headerWeight,
|
|
2494
2616
|
headerHeight,
|
|
2495
|
-
// imageMaxWidth,
|
|
2496
2617
|
justifyContent,
|
|
2497
|
-
// imageWrapWidth,
|
|
2498
2618
|
backgroundColor,
|
|
2499
2619
|
imageWrapHeight,
|
|
2500
2620
|
grayDecorHeight,
|
|
@@ -2504,8 +2624,7 @@ const Modal = ({
|
|
|
2504
2624
|
const [select, setSelect] = useState(0);
|
|
2505
2625
|
const [isHover, setIsHover] = useState(false);
|
|
2506
2626
|
const [innerData, setInnerData] = useState([]);
|
|
2507
|
-
const
|
|
2508
|
-
const classProps = classnames(className ? className : configStyles.MODAL.className);
|
|
2627
|
+
const classProps = classnames(className ?? merge.MODAL.className);
|
|
2509
2628
|
const handleCloseModal = () => {
|
|
2510
2629
|
setShow(false);
|
|
2511
2630
|
};
|
|
@@ -2577,7 +2696,7 @@ const Modal = ({
|
|
|
2577
2696
|
}, []);
|
|
2578
2697
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2579
2698
|
className: classProps,
|
|
2580
|
-
onClick: outsideClose ||
|
|
2699
|
+
onClick: outsideClose || merge.MODAL.outsideClose ? handleCloseModal : _ => _,
|
|
2581
2700
|
style: {
|
|
2582
2701
|
top: '0px',
|
|
2583
2702
|
left: '0px',
|
|
@@ -2585,7 +2704,7 @@ const Modal = ({
|
|
|
2585
2704
|
width: '100%',
|
|
2586
2705
|
height: '100vh',
|
|
2587
2706
|
position: 'fixed',
|
|
2588
|
-
backgroundColor: layerBackgroundColor
|
|
2707
|
+
backgroundColor: layerBackgroundColor ?? merge.MODAL.colors.backgroundLayer
|
|
2589
2708
|
}
|
|
2590
2709
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2591
2710
|
style: {
|
|
@@ -2593,8 +2712,8 @@ const Modal = ({
|
|
|
2593
2712
|
display: 'flex',
|
|
2594
2713
|
width: '100%',
|
|
2595
2714
|
height: '100vh',
|
|
2596
|
-
alignItems: alignItems
|
|
2597
|
-
justifyContent: justifyContent
|
|
2715
|
+
alignItems: alignItems ?? merge.MODAL.alignItems,
|
|
2716
|
+
justifyContent: justifyContent ?? merge.MODAL.justifyContent
|
|
2598
2717
|
}
|
|
2599
2718
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2600
2719
|
className: `${styles$8['animation__modal']}`,
|
|
@@ -2603,16 +2722,16 @@ const Modal = ({
|
|
|
2603
2722
|
position: 'relative',
|
|
2604
2723
|
boxSizing: 'border-box',
|
|
2605
2724
|
display: type === 'content' ? 'grid' : 'block',
|
|
2606
|
-
width: width
|
|
2725
|
+
width: width ?? merge.MODAL.width,
|
|
2607
2726
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2608
|
-
height: height
|
|
2727
|
+
height: height ?? merge.MODAL.height,
|
|
2609
2728
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2610
|
-
borderRadius: radius
|
|
2611
|
-
maxWidth: mMaxWidth
|
|
2612
|
-
maxHeight: mMaxHeight
|
|
2613
|
-
minWidth: type === 'content' ? minWidth
|
|
2614
|
-
backgroundColor: backgroundColor
|
|
2615
|
-
minHeight: type === 'content' ? minHeight
|
|
2729
|
+
borderRadius: radius ?? merge.MODAL.radius,
|
|
2730
|
+
maxWidth: mMaxWidth ?? merge.MODAL.maxWidth,
|
|
2731
|
+
maxHeight: mMaxHeight ?? merge.MODAL.maxHeight,
|
|
2732
|
+
minWidth: type === 'content' ? minWidth ?? merge.MODAL.minWidth : '',
|
|
2733
|
+
backgroundColor: backgroundColor ?? merge.MODAL.colors.background,
|
|
2734
|
+
minHeight: type === 'content' ? minHeight ?? merge.MODAL.minHeight : ''
|
|
2616
2735
|
}
|
|
2617
2736
|
}, type === 'content' && /*#__PURE__*/React__default.createElement("div", {
|
|
2618
2737
|
style: {
|
|
@@ -2622,8 +2741,8 @@ const Modal = ({
|
|
|
2622
2741
|
alignItems: 'center',
|
|
2623
2742
|
boxSizing: 'border-box',
|
|
2624
2743
|
backgroundColor: '#FBFBFB',
|
|
2625
|
-
padding: padding
|
|
2626
|
-
height: headerHeight
|
|
2744
|
+
padding: padding ?? merge.MODAL.padding,
|
|
2745
|
+
height: headerHeight ?? merge.MODAL.header.height,
|
|
2627
2746
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
|
|
2628
2747
|
}
|
|
2629
2748
|
}, headerText && type === 'content' && /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -2633,9 +2752,11 @@ const Modal = ({
|
|
|
2633
2752
|
whiteSpace: 'nowrap',
|
|
2634
2753
|
textOverflow: 'ellipsis',
|
|
2635
2754
|
margin: '0px 16px 0px 0px',
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2755
|
+
color: headerColor ?? merge.MODAL.header.color,
|
|
2756
|
+
fontSize: headerSize ?? merge.MODAL.header.font.size,
|
|
2757
|
+
fontStyle: headerStyle ?? merge.MODAL.header.font.style,
|
|
2758
|
+
fontFamily: headerFamily ?? merge.MODAL.header.font.family,
|
|
2759
|
+
fontWeight: headerWeight ?? merge.MODAL.header.font.weight
|
|
2639
2760
|
}
|
|
2640
2761
|
}, headerText), /*#__PURE__*/React__default.createElement("div", {
|
|
2641
2762
|
onClick: handleCloseModal,
|
|
@@ -2644,7 +2765,7 @@ const Modal = ({
|
|
|
2644
2765
|
height: '14px',
|
|
2645
2766
|
cursor: 'pointer'
|
|
2646
2767
|
}
|
|
2647
|
-
}, /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2768
|
+
}, closeIcon ? closeIcon : merge.MODAL.icon.close ? merge.MODAL.icon.close : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2648
2769
|
style: {
|
|
2649
2770
|
display: 'flex',
|
|
2650
2771
|
width: '100%',
|
|
@@ -2654,9 +2775,9 @@ const Modal = ({
|
|
|
2654
2775
|
boxSizing: 'border-box',
|
|
2655
2776
|
justifyContent: 'center',
|
|
2656
2777
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
2657
|
-
borderWidth: borderWidth
|
|
2658
|
-
borderStyle: borderStyle
|
|
2659
|
-
borderColor: borderColor
|
|
2778
|
+
borderWidth: borderWidth ?? merge.MODAL.border.width,
|
|
2779
|
+
borderStyle: borderStyle ?? merge.MODAL.border.style,
|
|
2780
|
+
borderColor: borderColor ?? merge.MODAL.border.color
|
|
2660
2781
|
},
|
|
2661
2782
|
onMouseEnter: handleMouseEnter,
|
|
2662
2783
|
onMouseLeave: handleMouseLeave
|
|
@@ -2668,8 +2789,8 @@ const Modal = ({
|
|
|
2668
2789
|
width: '100%',
|
|
2669
2790
|
borderTopLeftRadius: '6px',
|
|
2670
2791
|
borderTopRightRadius: '6px',
|
|
2671
|
-
height: grayDecorHeight
|
|
2672
|
-
background: closeAreaBackgroundColor
|
|
2792
|
+
height: grayDecorHeight ?? merge.MODAL.grayDecorHeight,
|
|
2793
|
+
background: closeAreaBackgroundColor ?? merge.MODAL.closeAreaBackgroundColor
|
|
2673
2794
|
}
|
|
2674
2795
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
2675
2796
|
onClick: handleCloseModal,
|
|
@@ -2686,9 +2807,9 @@ const Modal = ({
|
|
|
2686
2807
|
cursor: 'pointer',
|
|
2687
2808
|
backgroundColor: 'transparent'
|
|
2688
2809
|
}
|
|
2689
|
-
}, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2810
|
+
}, closeSlideIcon ? closeSlideIcon : merge.MODAL.icon.closeSlide ? merge.MODAL.icon.closeSlide : /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
2690
2811
|
style: {
|
|
2691
|
-
height: imageWrapHeight
|
|
2812
|
+
height: imageWrapHeight ?? merge.MODAL.image.wrapHeight
|
|
2692
2813
|
}
|
|
2693
2814
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
2694
2815
|
if (select === index) {
|
|
@@ -2701,11 +2822,10 @@ const Modal = ({
|
|
|
2701
2822
|
style: {
|
|
2702
2823
|
display: 'block',
|
|
2703
2824
|
objectFit: 'contain',
|
|
2704
|
-
margin: imageMargin
|
|
2705
|
-
borderRadius: radius
|
|
2706
|
-
width: imageWidth
|
|
2707
|
-
height: imageHeight
|
|
2708
|
-
// maxWidth: '100%'
|
|
2825
|
+
margin: imageMargin ?? merge.MODAL.image.margin,
|
|
2826
|
+
borderRadius: radius ?? merge.MODAL.radius,
|
|
2827
|
+
width: imageWidth ?? merge.MODAL.image.width,
|
|
2828
|
+
height: imageHeight ?? merge.MODAL.image.height
|
|
2709
2829
|
},
|
|
2710
2830
|
src: item.url
|
|
2711
2831
|
}), isHover && showZoomIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2726,7 +2846,7 @@ const Modal = ({
|
|
|
2726
2846
|
justifyContent: 'center'
|
|
2727
2847
|
},
|
|
2728
2848
|
onClick: () => handleOpenInNewTab(item.url)
|
|
2729
|
-
}, zoomIcon ? zoomIcon : /*#__PURE__*/React__default.createElement(SvgZoom, null)) : '');
|
|
2849
|
+
}, zoomIcon ? zoomIcon : merge.MODAL.icon.zoom ? merge.MODAL.icon.zoom : /*#__PURE__*/React__default.createElement(SvgZoom, null)) : '');
|
|
2730
2850
|
}
|
|
2731
2851
|
}
|
|
2732
2852
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -2743,7 +2863,7 @@ const Modal = ({
|
|
|
2743
2863
|
top: 'calc(50% - 12px)',
|
|
2744
2864
|
backgroundColor: 'transparent'
|
|
2745
2865
|
}
|
|
2746
|
-
}, /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
|
|
2866
|
+
}, prevIcon ? prevIcon : merge.MODAL.icon.prev ? merge.MODAL.icon.prev : /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
|
|
2747
2867
|
onClick: () => handleGoTo('next'),
|
|
2748
2868
|
style: {
|
|
2749
2869
|
position: 'absolute',
|
|
@@ -2757,7 +2877,7 @@ const Modal = ({
|
|
|
2757
2877
|
top: 'calc(50% - 12px)',
|
|
2758
2878
|
backgroundColor: 'transparent'
|
|
2759
2879
|
}
|
|
2760
|
-
}, /*#__PURE__*/React__default.createElement(SvgNext, null)))))))));
|
|
2880
|
+
}, nextIcon ? nextIcon : merge.MODAL.icon.next ? merge.MODAL.icon.next : /*#__PURE__*/React__default.createElement(SvgNext, null)))))))));
|
|
2761
2881
|
};
|
|
2762
2882
|
Modal.propTypes = {
|
|
2763
2883
|
data: PropTypes.array,
|
|
@@ -2773,11 +2893,17 @@ Modal.propTypes = {
|
|
|
2773
2893
|
minHeight: PropTypes.string,
|
|
2774
2894
|
className: PropTypes.string,
|
|
2775
2895
|
zoomIcon: PropTypes.element,
|
|
2896
|
+
prevIcon: PropTypes.element,
|
|
2897
|
+
nextIcon: PropTypes.element,
|
|
2898
|
+
closeIcon: PropTypes.element,
|
|
2899
|
+
closeSlideIcon: PropTypes.element,
|
|
2776
2900
|
alignItems: PropTypes.string,
|
|
2777
2901
|
mMaxHeight: PropTypes.string,
|
|
2778
2902
|
headerText: PropTypes.string,
|
|
2779
2903
|
imageWidth: PropTypes.string,
|
|
2780
2904
|
headerSize: PropTypes.string,
|
|
2905
|
+
headerStyle: PropTypes.string,
|
|
2906
|
+
headerFamily: PropTypes.string,
|
|
2781
2907
|
outsideClose: PropTypes.bool,
|
|
2782
2908
|
showZoomIcon: PropTypes.bool,
|
|
2783
2909
|
imageMargin: PropTypes.string,
|
|
@@ -2787,9 +2913,7 @@ Modal.propTypes = {
|
|
|
2787
2913
|
imageHeight: PropTypes.string,
|
|
2788
2914
|
headerWeight: PropTypes.string,
|
|
2789
2915
|
headerHeight: PropTypes.string,
|
|
2790
|
-
imageMaxWidth: PropTypes.string,
|
|
2791
2916
|
justifyContent: PropTypes.string,
|
|
2792
|
-
imageWrapWidth: PropTypes.string,
|
|
2793
2917
|
backgroundColor: PropTypes.string,
|
|
2794
2918
|
grayDecorHeight: PropTypes.string,
|
|
2795
2919
|
imageWrapHeight: PropTypes.string,
|
|
@@ -2811,12 +2935,13 @@ const InputTypes = {
|
|
|
2811
2935
|
PASSWORD: 'password'
|
|
2812
2936
|
};
|
|
2813
2937
|
const P = styled.span`
|
|
2814
|
-
animation: ${props => props.errorAnimation ? props.
|
|
2938
|
+
animation: ${props => props.errorAnimation ? props.errorAnimation : 'none'};
|
|
2815
2939
|
`;
|
|
2816
2940
|
const Input = ({
|
|
2817
2941
|
type,
|
|
2818
2942
|
size,
|
|
2819
2943
|
name,
|
|
2944
|
+
style,
|
|
2820
2945
|
color,
|
|
2821
2946
|
label,
|
|
2822
2947
|
value,
|
|
@@ -2825,12 +2950,13 @@ const Input = ({
|
|
|
2825
2950
|
height,
|
|
2826
2951
|
radius,
|
|
2827
2952
|
change,
|
|
2953
|
+
weight,
|
|
2954
|
+
family,
|
|
2828
2955
|
padding,
|
|
2829
2956
|
tooltip,
|
|
2830
2957
|
leftIcon,
|
|
2831
2958
|
required,
|
|
2832
2959
|
disabled,
|
|
2833
|
-
marginTop,
|
|
2834
2960
|
transform,
|
|
2835
2961
|
iconWidth,
|
|
2836
2962
|
rightIcon,
|
|
@@ -2841,20 +2967,24 @@ const Input = ({
|
|
|
2841
2967
|
errorSize,
|
|
2842
2968
|
labelSize,
|
|
2843
2969
|
maxLength,
|
|
2970
|
+
labelStyle,
|
|
2844
2971
|
floatToFix,
|
|
2845
2972
|
minNumSize,
|
|
2846
2973
|
maxNumSize,
|
|
2847
2974
|
labelColor,
|
|
2848
2975
|
errorColor,
|
|
2849
2976
|
withoutDot,
|
|
2850
|
-
|
|
2977
|
+
errorStyle,
|
|
2851
2978
|
placeholder,
|
|
2852
2979
|
errorZindex,
|
|
2853
2980
|
labelWeight,
|
|
2981
|
+
errorWeight,
|
|
2982
|
+
errorFamily,
|
|
2854
2983
|
phoneDisplay,
|
|
2855
2984
|
errorMessage,
|
|
2856
2985
|
autoComplete,
|
|
2857
2986
|
labelDisplay,
|
|
2987
|
+
errorMarginTop,
|
|
2858
2988
|
boxShadowHover,
|
|
2859
2989
|
errorClassName,
|
|
2860
2990
|
errorAnimation,
|
|
@@ -2863,14 +2993,15 @@ const Input = ({
|
|
|
2863
2993
|
errorLineHeight,
|
|
2864
2994
|
labelLineHeight,
|
|
2865
2995
|
backgroundColor,
|
|
2866
|
-
telErrorMessage,
|
|
2867
|
-
borderRightColor,
|
|
2868
2996
|
labelMarginBottom,
|
|
2869
2997
|
regexpErrorMessage,
|
|
2870
2998
|
phoneJustifyContent,
|
|
2871
|
-
|
|
2999
|
+
telBorderRightWidth,
|
|
3000
|
+
telBorderRightStyle,
|
|
3001
|
+
telBorderRightColor,
|
|
2872
3002
|
backgroundDisableColor,
|
|
2873
3003
|
errorAnimationDuration,
|
|
3004
|
+
telBorderRightColorHover,
|
|
2874
3005
|
...props
|
|
2875
3006
|
}) => {
|
|
2876
3007
|
const phoneNumberRegex = /^\d+$/;
|
|
@@ -2880,8 +3011,7 @@ const Input = ({
|
|
|
2880
3011
|
const [innerMinNumSize, setInnerMinNumSize] = useState(0);
|
|
2881
3012
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
2882
3013
|
const random = Math.floor(Math.random() * 1000 + 1);
|
|
2883
|
-
const
|
|
2884
|
-
const classProps = classnames(className ? className : configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
3014
|
+
const classProps = classnames(className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
2885
3015
|
const errorShow = keyframes`
|
|
2886
3016
|
100% {
|
|
2887
3017
|
bottom: '-20px';
|
|
@@ -2893,15 +3023,15 @@ const Input = ({
|
|
|
2893
3023
|
}
|
|
2894
3024
|
`;
|
|
2895
3025
|
const animation = () => css`
|
|
2896
|
-
${errorShow} ${errorAnimationDuration ? errorAnimationDuration :
|
|
3026
|
+
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : merge.INPUT.error.animationDuration} forwards
|
|
2897
3027
|
`;
|
|
2898
3028
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
2899
3029
|
if (type === 'tel') {
|
|
2900
3030
|
if (!phoneNumberRegex.test(val)) {
|
|
2901
|
-
if (
|
|
2902
|
-
setInnerErrorMessage(
|
|
2903
|
-
}
|
|
2904
|
-
|
|
3031
|
+
if (errorMessage) {
|
|
3032
|
+
setInnerErrorMessage(errorMessage);
|
|
3033
|
+
}
|
|
3034
|
+
if (val !== '') {
|
|
2905
3035
|
val = prevVal;
|
|
2906
3036
|
}
|
|
2907
3037
|
} else {
|
|
@@ -2979,7 +3109,7 @@ const Input = ({
|
|
|
2979
3109
|
const handleChange = event => {
|
|
2980
3110
|
let prevValue = innerValue;
|
|
2981
3111
|
let currentValue = event.target.value;
|
|
2982
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3112
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
2983
3113
|
currentValue = handleCheckTypeTel(currentValue, prevValue);
|
|
2984
3114
|
currentValue = handleCheckTypeNumber(currentValue, prevValue);
|
|
2985
3115
|
if (max && currentValue.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3025,7 +3155,7 @@ const Input = ({
|
|
|
3025
3155
|
if (value === null) {
|
|
3026
3156
|
newValue = '';
|
|
3027
3157
|
} else {
|
|
3028
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3158
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3029
3159
|
newValue = handleCheckTypeTel(value, newValue);
|
|
3030
3160
|
newValue = handleCheckTypeNumber(value, newValue);
|
|
3031
3161
|
if (max && value.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3037,25 +3167,26 @@ const Input = ({
|
|
|
3037
3167
|
}
|
|
3038
3168
|
}
|
|
3039
3169
|
setInnerValue(() => newValue);
|
|
3040
|
-
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage
|
|
3170
|
+
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage]);
|
|
3041
3171
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3042
3172
|
className: classProps
|
|
3043
3173
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3044
3174
|
style: {
|
|
3045
|
-
color: labelColor
|
|
3046
|
-
fontSize: labelSize
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3175
|
+
color: labelColor ?? merge.INPUT.label.color,
|
|
3176
|
+
fontSize: labelSize ?? merge.INPUT.label.font.size,
|
|
3177
|
+
fontStyle: labelStyle ?? merge.INPUT.label.font.style,
|
|
3178
|
+
display: labelDisplay ?? merge.INPUT.label.display,
|
|
3179
|
+
fontWeight: labelWeight ?? merge.INPUT.label.font.weight,
|
|
3180
|
+
lineHeight: labelLineHeight ?? merge.INPUT.label.lineHeight,
|
|
3181
|
+
marginBottom: labelMarginBottom ?? merge.INPUT.label.marginBottom,
|
|
3182
|
+
fontFamily: labelFontFamily ?? merge.INPUT.label.font.family
|
|
3052
3183
|
}
|
|
3053
3184
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3054
3185
|
className: `${styles$7['input-content']}`,
|
|
3055
3186
|
style: {
|
|
3056
|
-
width: width
|
|
3057
|
-
borderRadius: radius
|
|
3058
|
-
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${
|
|
3187
|
+
width: width ?? merge.INPUT.width,
|
|
3188
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3189
|
+
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
|
|
3059
3190
|
},
|
|
3060
3191
|
onMouseEnter: handleMouseEnter,
|
|
3061
3192
|
onMouseLeave: handleMouseLeave
|
|
@@ -3066,30 +3197,36 @@ const Input = ({
|
|
|
3066
3197
|
alignItems: 'center',
|
|
3067
3198
|
justifyContent: 'center',
|
|
3068
3199
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3069
|
-
height: height
|
|
3070
|
-
padding: padding
|
|
3071
|
-
width: iconWidth
|
|
3072
|
-
boxSizing: boxSizing
|
|
3073
|
-
borderTopLeftRadius: radius
|
|
3074
|
-
borderBottomLeftRadius: radius
|
|
3075
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
3200
|
+
height: height ?? merge.INPUT.height,
|
|
3201
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3202
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3203
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3204
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3205
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3206
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3076
3207
|
}
|
|
3077
3208
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement("div", {
|
|
3078
3209
|
style: {
|
|
3210
|
+
// border: 'none',
|
|
3079
3211
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
3080
|
-
fontSize: size
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3212
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3213
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3214
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3215
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3216
|
+
height: height ?? merge.INPUT.height,
|
|
3217
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3218
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3219
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3220
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3221
|
+
display: phoneDisplay ?? merge.INPUT.tel.display,
|
|
3222
|
+
borderRight: `
|
|
3223
|
+
${telBorderRightWidth ?? merge.INPUT.tel.borderRight.width}
|
|
3224
|
+
${telBorderRightStyle ?? merge.INPUT.tel.borderRight.style}`,
|
|
3225
|
+
alignItems: phoneAlignItems ?? merge.INPUT.tel.alignItems,
|
|
3226
|
+
borderColor: innerErrorMessage ? errorColor ? errorColor : merge.INPUT.error.color : isHover ? telBorderRightColorHover ? telBorderRightColorHover : merge.INPUT.tel.borderRight.colors.hover : telBorderRightColor ? telBorderRightColor : merge.INPUT.tel.borderRight.color,
|
|
3227
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3228
|
+
justifyContent: phoneJustifyContent ?? merge.INPUT.tel.justifyContent,
|
|
3229
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3093
3230
|
}
|
|
3094
3231
|
}, "+374") : '', /*#__PURE__*/React__default.createElement("input", _extends({}, props, {
|
|
3095
3232
|
value: innerValue,
|
|
@@ -3100,19 +3237,22 @@ const Input = ({
|
|
|
3100
3237
|
type: show || type === 'number' ? 'text' : type,
|
|
3101
3238
|
min: type === 'number' && minNumSize ? minNumSize : '',
|
|
3102
3239
|
max: type === 'number' && maxNumSize ? maxNumSize : '',
|
|
3103
|
-
autoComplete: autoComplete ? autoComplete :
|
|
3240
|
+
autoComplete: autoComplete ? autoComplete : merge.INPUT.autoComplete,
|
|
3104
3241
|
style: {
|
|
3105
3242
|
border: 'none',
|
|
3106
3243
|
outline: 'none',
|
|
3107
3244
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
3108
|
-
width: width
|
|
3109
|
-
fontSize: size
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3245
|
+
width: width ?? merge.INPUT.width,
|
|
3246
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3247
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3248
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3249
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3250
|
+
height: height ?? merge.INPUT.height,
|
|
3251
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3252
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3253
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3254
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3255
|
+
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3116
3256
|
}
|
|
3117
3257
|
})), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
3118
3258
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
@@ -3121,34 +3261,41 @@ const Input = ({
|
|
|
3121
3261
|
alignItems: 'center',
|
|
3122
3262
|
justifyContent: 'center',
|
|
3123
3263
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
3124
|
-
height: height
|
|
3125
|
-
padding: padding
|
|
3126
|
-
width: iconWidth
|
|
3127
|
-
boxSizing: boxSizing
|
|
3128
|
-
borderTopRightRadius: radius
|
|
3129
|
-
borderBottomRightRadius: radius
|
|
3130
|
-
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor :
|
|
3264
|
+
height: height ?? merge.INPUT.height,
|
|
3265
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3266
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3267
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3268
|
+
borderTopRightRadius: radius ?? merge.INPUT.radius,
|
|
3269
|
+
borderBottomRightRadius: radius ?? merge.INPUT.radius,
|
|
3270
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3131
3271
|
}
|
|
3132
3272
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P, {
|
|
3133
|
-
errorAnimation: errorAnimation,
|
|
3273
|
+
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3134
3274
|
animation: animation,
|
|
3135
3275
|
style: {
|
|
3136
3276
|
margin: '0px',
|
|
3137
3277
|
position: 'absolute',
|
|
3138
|
-
width: width
|
|
3139
|
-
left: errorLeft
|
|
3140
|
-
color: errorColor
|
|
3141
|
-
fontSize: errorSize
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3278
|
+
width: width ?? merge.INPUT.width,
|
|
3279
|
+
left: errorLeft ?? merge.INPUT.error.left,
|
|
3280
|
+
color: errorColor ?? merge.INPUT.error.color,
|
|
3281
|
+
fontSize: errorSize ?? merge.INPUT.error.font.size,
|
|
3282
|
+
fontStyle: errorStyle ?? merge.INPUT.error.font.style,
|
|
3283
|
+
fontFamily: errorFamily ?? merge.INPUT.error.font.family,
|
|
3284
|
+
fontWeight: errorWeight ?? merge.INPUT.error.font.weight,
|
|
3285
|
+
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3286
|
+
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3287
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3288
|
+
transform: !errorAnimation && !merge.INPUT.error.animation ? 'scale3d(1,1,1)' : transform ? transform : merge.INPUT.error.transform
|
|
3146
3289
|
},
|
|
3147
|
-
className: errorClassName
|
|
3290
|
+
className: errorClassName ?? merge.INPUT.error.className
|
|
3148
3291
|
}, innerErrorMessage) : '');
|
|
3149
3292
|
};
|
|
3150
3293
|
Input.propTypes = {
|
|
3294
|
+
size: PropTypes.string,
|
|
3151
3295
|
name: PropTypes.string,
|
|
3296
|
+
style: PropTypes.string,
|
|
3297
|
+
weight: PropTypes.string,
|
|
3298
|
+
family: PropTypes.string,
|
|
3152
3299
|
change: PropTypes.func,
|
|
3153
3300
|
color: PropTypes.string,
|
|
3154
3301
|
width: PropTypes.string,
|
|
@@ -3158,10 +3305,8 @@ Input.propTypes = {
|
|
|
3158
3305
|
height: PropTypes.string,
|
|
3159
3306
|
radius: PropTypes.string,
|
|
3160
3307
|
padding: PropTypes.string,
|
|
3161
|
-
fontSize: PropTypes.string,
|
|
3162
3308
|
tooltip: PropTypes.element,
|
|
3163
3309
|
withoutDot: PropTypes.bool,
|
|
3164
|
-
marginTop: PropTypes.string,
|
|
3165
3310
|
transform: PropTypes.string,
|
|
3166
3311
|
className: PropTypes.string,
|
|
3167
3312
|
iconWidth: PropTypes.string,
|
|
@@ -3176,6 +3321,10 @@ Input.propTypes = {
|
|
|
3176
3321
|
maxNumSize: PropTypes.number,
|
|
3177
3322
|
errorColor: PropTypes.string,
|
|
3178
3323
|
labelColor: PropTypes.string,
|
|
3324
|
+
labelStyle: PropTypes.string,
|
|
3325
|
+
errorStyle: PropTypes.string,
|
|
3326
|
+
errorWeight: PropTypes.string,
|
|
3327
|
+
errorFamily: PropTypes.string,
|
|
3179
3328
|
borderRight: PropTypes.string,
|
|
3180
3329
|
placeholder: PropTypes.string,
|
|
3181
3330
|
errorZindex: PropTypes.string,
|
|
@@ -3186,22 +3335,24 @@ Input.propTypes = {
|
|
|
3186
3335
|
errorAnimation: PropTypes.bool,
|
|
3187
3336
|
labelDisplay: PropTypes.string,
|
|
3188
3337
|
errorPosition: PropTypes.string,
|
|
3338
|
+
errorMarginTop: PropTypes.string,
|
|
3189
3339
|
boxShadowHover: PropTypes.string,
|
|
3190
3340
|
errorClassName: PropTypes.string,
|
|
3191
3341
|
labelFontFamily: PropTypes.string,
|
|
3192
|
-
telErrorMessage: PropTypes.string,
|
|
3193
3342
|
backgroundColor: PropTypes.string,
|
|
3194
3343
|
phoneAlignItems: PropTypes.string,
|
|
3195
3344
|
errorLineHeight: PropTypes.string,
|
|
3196
3345
|
labelLineHeight: PropTypes.string,
|
|
3197
|
-
borderRightColor: PropTypes.string,
|
|
3198
3346
|
labelMarginBottom: PropTypes.string,
|
|
3199
3347
|
regexpErrorMessage: PropTypes.string,
|
|
3200
3348
|
regexp: PropTypes.instanceOf(RegExp),
|
|
3349
|
+
telBorderRightWidth: PropTypes.string,
|
|
3350
|
+
telBorderRightStyle: PropTypes.string,
|
|
3351
|
+
telBorderRightColor: PropTypes.string,
|
|
3201
3352
|
phoneJustifyContent: PropTypes.string,
|
|
3202
|
-
borderRightColorHover: PropTypes.string,
|
|
3203
3353
|
backgroundDisableColor: PropTypes.string,
|
|
3204
3354
|
errorAnimationDuration: PropTypes.string,
|
|
3355
|
+
telBorderRightColorHover: PropTypes.string,
|
|
3205
3356
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
3206
3357
|
rightIcon: PropTypes.arrayOf(PropTypes.element),
|
|
3207
3358
|
type: PropTypes.oneOf(Object.values(InputTypes)),
|
|
@@ -3228,6 +3379,7 @@ const Radio = ({
|
|
|
3228
3379
|
borderColor,
|
|
3229
3380
|
borderStyle,
|
|
3230
3381
|
labelFontSize,
|
|
3382
|
+
labelFontStyle,
|
|
3231
3383
|
labelFontFamily,
|
|
3232
3384
|
labelFontWeight,
|
|
3233
3385
|
labelLineHeight,
|
|
@@ -3236,8 +3388,7 @@ const Radio = ({
|
|
|
3236
3388
|
radioItemMarginRight,
|
|
3237
3389
|
radioItemMarginBottom
|
|
3238
3390
|
}) => {
|
|
3239
|
-
const
|
|
3240
|
-
const classProps = classnames(className ? className : configStyles.RADIO.className);
|
|
3391
|
+
const classProps = classnames(className ?? merge.RADIO.className);
|
|
3241
3392
|
const [innerData, setInnerData] = useState([]);
|
|
3242
3393
|
const [radioInnerSize, setRadioInnerSize] = useState('');
|
|
3243
3394
|
const [radioInnerFormat, setRadioInnerFormat] = useState('');
|
|
@@ -3249,11 +3400,11 @@ const Radio = ({
|
|
|
3249
3400
|
});
|
|
3250
3401
|
const handleMouseEnter = (id, elemID) => {
|
|
3251
3402
|
const elem = document.querySelector(`#${elemID}`);
|
|
3252
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3403
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color;
|
|
3253
3404
|
};
|
|
3254
3405
|
const handleMouseLeave = (id, elemID) => {
|
|
3255
3406
|
const elem = document.querySelector(`#${elemID}`);
|
|
3256
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3407
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent';
|
|
3257
3408
|
};
|
|
3258
3409
|
const handleChecked = selItem => {
|
|
3259
3410
|
setInnerSelectedData(selItem);
|
|
@@ -3269,7 +3420,7 @@ const Radio = ({
|
|
|
3269
3420
|
useEffect(() => {
|
|
3270
3421
|
let radioSize = '';
|
|
3271
3422
|
let radioSizeFormat = '';
|
|
3272
|
-
const checkSize = size ||
|
|
3423
|
+
const checkSize = size || merge.RADIO.size;
|
|
3273
3424
|
if (checkSize && typeof checkSize === 'string') {
|
|
3274
3425
|
if (checkSize.length > 0) {
|
|
3275
3426
|
checkSize.split('').map(item => {
|
|
@@ -3286,7 +3437,7 @@ const Radio = ({
|
|
|
3286
3437
|
}
|
|
3287
3438
|
setRadioInnerFormat(radioSizeFormat);
|
|
3288
3439
|
setRadioInnerSize(`${parseInt(radioSize) / 2}`);
|
|
3289
|
-
}, [size,
|
|
3440
|
+
}, [size, merge.RADIO.size]);
|
|
3290
3441
|
useEffect(() => {
|
|
3291
3442
|
if (typeof selected === 'object' && selected !== null && !Array.isArray(selected)) {
|
|
3292
3443
|
setInnerSelectedData(selected);
|
|
@@ -3316,8 +3467,8 @@ const Radio = ({
|
|
|
3316
3467
|
cursor: item[innerKeyNames.disabled] ? 'not-allowed' : 'pointer',
|
|
3317
3468
|
width: 'fit-content',
|
|
3318
3469
|
alignItems: 'center',
|
|
3319
|
-
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight :
|
|
3320
|
-
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom :
|
|
3470
|
+
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : merge.RADIO.item.marginRight : '0px',
|
|
3471
|
+
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : merge.RADIO.item.marginBottom : '0px'
|
|
3321
3472
|
},
|
|
3322
3473
|
onClick: item[innerKeyNames.disabled] ? _ => _ : () => handleChecked(item),
|
|
3323
3474
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
@@ -3328,11 +3479,11 @@ const Radio = ({
|
|
|
3328
3479
|
alignItems: 'center',
|
|
3329
3480
|
borderRadius: '100%',
|
|
3330
3481
|
justifyContent: 'center',
|
|
3331
|
-
width: size ? size :
|
|
3332
|
-
height: size ? size :
|
|
3333
|
-
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight :
|
|
3334
|
-
border: `${borderSize
|
|
3335
|
-
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3482
|
+
width: size ? size : merge.RADIO.size,
|
|
3483
|
+
height: size ? size : merge.RADIO.size,
|
|
3484
|
+
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight : merge.RADIO.marginRight : '0px',
|
|
3485
|
+
border: `${borderSize ?? merge.RADIO.border.width} ${borderStyle ? borderStyle : merge.RADIO.border.style}`,
|
|
3486
|
+
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color
|
|
3336
3487
|
}
|
|
3337
3488
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3338
3489
|
id: elemId,
|
|
@@ -3340,15 +3491,16 @@ const Radio = ({
|
|
|
3340
3491
|
borderRadius: '100%',
|
|
3341
3492
|
width: radioInnerSize + radioInnerFormat,
|
|
3342
3493
|
height: radioInnerSize + radioInnerFormat,
|
|
3343
|
-
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3494
|
+
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent'
|
|
3344
3495
|
}
|
|
3345
3496
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default.createElement("span", {
|
|
3346
3497
|
style: {
|
|
3347
|
-
color: labelColor
|
|
3348
|
-
fontSize: labelFontSize
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3498
|
+
color: labelColor ?? merge.RADIO.label.color,
|
|
3499
|
+
fontSize: labelFontSize ?? merge.RADIO.label.font.size,
|
|
3500
|
+
fontStyle: labelFontStyle ?? merge.RADIO.label.font.style,
|
|
3501
|
+
fontFamily: labelFontFamily ?? merge.RADIO.label.font.family,
|
|
3502
|
+
fontWeight: labelFontWeight ?? merge.RADIO.label.font.weight,
|
|
3503
|
+
lineHeight: labelLineHeight ?? merge.RADIO.label.lineHeight
|
|
3352
3504
|
},
|
|
3353
3505
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
3354
3506
|
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
@@ -3365,6 +3517,7 @@ Radio.propTypes = {
|
|
|
3365
3517
|
borderColor: PropTypes.string,
|
|
3366
3518
|
borderStyle: PropTypes.string,
|
|
3367
3519
|
labelFontSize: PropTypes.string,
|
|
3520
|
+
labelFontStyle: PropTypes.string,
|
|
3368
3521
|
labelFontFamily: PropTypes.string,
|
|
3369
3522
|
labelFontWeight: PropTypes.string,
|
|
3370
3523
|
labelLineHeight: PropTypes.string,
|
|
@@ -3426,6 +3579,7 @@ const Select = ({
|
|
|
3426
3579
|
labelWeight,
|
|
3427
3580
|
labelDisplay,
|
|
3428
3581
|
labelFontSize,
|
|
3582
|
+
labelFontStyle,
|
|
3429
3583
|
labelLineHeight,
|
|
3430
3584
|
labelFontFamily,
|
|
3431
3585
|
labelMarginBottom,
|
|
@@ -3433,12 +3587,17 @@ const Select = ({
|
|
|
3433
3587
|
cursor,
|
|
3434
3588
|
errorSize,
|
|
3435
3589
|
errorColor,
|
|
3590
|
+
errorStyle,
|
|
3591
|
+
errorFamily,
|
|
3592
|
+
errorWeight,
|
|
3436
3593
|
selectedColor,
|
|
3437
3594
|
selectedRadius,
|
|
3438
|
-
selectedMinHeight,
|
|
3439
3595
|
selectedPadding,
|
|
3440
3596
|
selectedFontSize,
|
|
3597
|
+
selectedFontStyle,
|
|
3441
3598
|
selectedBoxSizing,
|
|
3599
|
+
selectedMinHeight,
|
|
3600
|
+
selectedFontFamily,
|
|
3442
3601
|
selectedFontWeight,
|
|
3443
3602
|
selectedLineHeight,
|
|
3444
3603
|
selectedHoverColor,
|
|
@@ -3464,8 +3623,7 @@ const Select = ({
|
|
|
3464
3623
|
boxShadowHover
|
|
3465
3624
|
}) => {
|
|
3466
3625
|
const ref = useRef();
|
|
3467
|
-
const
|
|
3468
|
-
const classProps = classnames(className ? className : configStyles.SELECT.className);
|
|
3626
|
+
const classProps = classnames(className ? className : merge.SELECT.className);
|
|
3469
3627
|
const [opened, setOpened] = useState(false);
|
|
3470
3628
|
const [isHover, setIsHover] = useState(false);
|
|
3471
3629
|
const [newSelected, setNewSelected] = useState([]);
|
|
@@ -3518,12 +3676,12 @@ const Select = ({
|
|
|
3518
3676
|
setIsHover(false);
|
|
3519
3677
|
};
|
|
3520
3678
|
const handleMouseEnterOption = e => {
|
|
3521
|
-
e.target.style.color = optionItemColorHover ? optionItemColorHover :
|
|
3522
|
-
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover :
|
|
3679
|
+
e.target.style.color = optionItemColorHover ? optionItemColorHover : merge.SELECT.options.item.colors.hover;
|
|
3680
|
+
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover : merge.SELECT.options.item.colors.backgroudHover;
|
|
3523
3681
|
};
|
|
3524
3682
|
const handleMouseLeaveOption = e => {
|
|
3525
|
-
e.target.style.color = optionItemColor ? optionItemColor :
|
|
3526
|
-
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor :
|
|
3683
|
+
e.target.style.color = optionItemColor ? optionItemColor : merge.SELECT.options.item.color;
|
|
3684
|
+
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor : merge.SELECT.options.item.colors.backgroud;
|
|
3527
3685
|
};
|
|
3528
3686
|
const isObjectEmpty = obj => {
|
|
3529
3687
|
for (var key in obj) {
|
|
@@ -3579,14 +3737,15 @@ const Select = ({
|
|
|
3579
3737
|
}
|
|
3580
3738
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3581
3739
|
style: {
|
|
3582
|
-
color: labelColor
|
|
3583
|
-
fontWeight: labelWeight
|
|
3584
|
-
display: labelDisplay
|
|
3585
|
-
fontSize: labelFontSize
|
|
3586
|
-
|
|
3587
|
-
fontFamily: labelFontFamily
|
|
3588
|
-
|
|
3589
|
-
|
|
3740
|
+
color: labelColor ?? merge.SELECT.label.color,
|
|
3741
|
+
fontWeight: labelWeight ?? merge.SELECT.label.font.weight,
|
|
3742
|
+
display: labelDisplay ?? merge.SELECT.label.display,
|
|
3743
|
+
fontSize: labelFontSize ?? merge.SELECT.label.font.size,
|
|
3744
|
+
fontStyle: labelFontStyle ?? merge.SELECT.label.font.style,
|
|
3745
|
+
fontFamily: labelFontFamily ?? merge.SELECT.label.font.family,
|
|
3746
|
+
lineHeight: labelLineHeight ?? merge.SELECT.label.lineHeight,
|
|
3747
|
+
marginBottom: labelMarginBottom ?? merge.SELECT.label.marginBottom,
|
|
3748
|
+
textTransform: labelTextTransform ?? merge.SELECT.label.textTransform
|
|
3590
3749
|
}
|
|
3591
3750
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3592
3751
|
ref: ref
|
|
@@ -3594,17 +3753,19 @@ const Select = ({
|
|
|
3594
3753
|
className: styles$6['select-content']
|
|
3595
3754
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3596
3755
|
style: {
|
|
3597
|
-
cursor: disabled ? 'not-allowed' : cursor ? cursor :
|
|
3598
|
-
minHeight: selectedMinHeight
|
|
3599
|
-
padding: selectedPadding
|
|
3600
|
-
borderRadius: selectedRadius
|
|
3601
|
-
fontSize: selectedFontSize
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3756
|
+
cursor: disabled ? 'not-allowed' : cursor ? cursor : merge.SELECT.selected.cursor,
|
|
3757
|
+
minHeight: selectedMinHeight ?? merge.SELECT.selected.minHeight,
|
|
3758
|
+
padding: selectedPadding ?? merge.SELECT.selected.padding,
|
|
3759
|
+
borderRadius: selectedRadius ?? merge.SELECT.selected.radius,
|
|
3760
|
+
fontSize: selectedFontSize ?? merge.SELECT.selected.font.size,
|
|
3761
|
+
fontStyle: selectedFontStyle ?? merge.SELECT.selected.font.style,
|
|
3762
|
+
fontFamily: selectedFontFamily ?? merge.SELECT.selected.font.family,
|
|
3763
|
+
boxSizing: selectedBoxSizing ?? merge.SELECT.selected.box.sizing,
|
|
3764
|
+
fontWeight: selectedFontWeight ?? merge.SELECT.selected.font.weight,
|
|
3765
|
+
lineHeight: selectedLineHeight ?? merge.SELECT.selected.lineHeight,
|
|
3766
|
+
transition: selectedTransition ?? merge.SELECT.selected.transition,
|
|
3767
|
+
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : merge.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : merge.SELECT.selected.colors.background,
|
|
3768
|
+
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
|
|
3608
3769
|
},
|
|
3609
3770
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
3610
3771
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
@@ -3616,7 +3777,7 @@ const Select = ({
|
|
|
3616
3777
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
3617
3778
|
overflow: 'hidden',
|
|
3618
3779
|
textOverflow: 'ellipsis',
|
|
3619
|
-
color: errorMessage ? errorColor ? errorColor :
|
|
3780
|
+
color: errorMessage ? errorColor ? errorColor : merge.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
|
|
3620
3781
|
}
|
|
3621
3782
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
3622
3783
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -3628,23 +3789,23 @@ const Select = ({
|
|
|
3628
3789
|
}
|
|
3629
3790
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
3630
3791
|
className: `${styles$6['select-content-top-icon']}`
|
|
3631
|
-
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon :
|
|
3792
|
+
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : merge.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
3632
3793
|
className: `${styles$6['close-icon']}`,
|
|
3633
3794
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
3634
3795
|
style: {
|
|
3635
3796
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
3636
3797
|
}
|
|
3637
|
-
}, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3798
|
+
}, closeIcon ? closeIcon : merge.SELECT.closeIcon ? merge.SELECT.closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3638
3799
|
style: {
|
|
3639
3800
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
3640
3801
|
},
|
|
3641
3802
|
className: `${styles$6['arrow-icon']}`
|
|
3642
|
-
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3803
|
+
}, arrowIcon ? arrowIcon : merge.SELECT.arrowIcon ? merge.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3643
3804
|
style: {
|
|
3644
|
-
boxShadow: optionsBoxShadow
|
|
3645
|
-
borderRadius: optionsBorderRadius
|
|
3646
|
-
backgroundColor: optionsBackgroundColor
|
|
3647
|
-
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' :
|
|
3805
|
+
boxShadow: optionsBoxShadow ?? merge.SELECT.options.box.shadow,
|
|
3806
|
+
borderRadius: optionsBorderRadius ?? merge.SELECT.options.radius,
|
|
3807
|
+
backgroundColor: optionsBackgroundColor ?? merge.SELECT.options.colors.background,
|
|
3808
|
+
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'
|
|
3648
3809
|
},
|
|
3649
3810
|
className: `${styles$6['select-content-bottom']}`
|
|
3650
3811
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3657,19 +3818,19 @@ const Select = ({
|
|
|
3657
3818
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
3658
3819
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
3659
3820
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
3660
|
-
className: `${styles$6['select-content-bottom-row']} ${dots ||
|
|
3821
|
+
className: `${styles$6['select-content-bottom-row']} ${dots || merge.SELECT.dots ? styles$6['ellipsis'] : ''}`,
|
|
3661
3822
|
style: {
|
|
3662
|
-
overflowWrap: !dots && !
|
|
3663
|
-
color: optionItemColor
|
|
3664
|
-
cursor: optionItemCursor
|
|
3665
|
-
padding: optionItemPadding
|
|
3666
|
-
fontSize: optionItemFontSize
|
|
3667
|
-
boxSizing: optionItemBoxSizing
|
|
3668
|
-
minHeight: optionItemMinHeight
|
|
3669
|
-
fontWeight: optionItemFontWeight
|
|
3670
|
-
lineHeight: dots ||
|
|
3671
|
-
marginBottom: optionItemMarginBottom
|
|
3672
|
-
backgroundColor: optionItemBackgroudColor
|
|
3823
|
+
overflowWrap: !dots && !merge.SELECT.dots ? 'anywhere' : 'break-word',
|
|
3824
|
+
color: optionItemColor ?? merge.SELECT.options.item.color,
|
|
3825
|
+
cursor: optionItemCursor ?? merge.SELECT.options.item.cursor,
|
|
3826
|
+
padding: optionItemPadding ?? merge.SELECT.options.item.padding,
|
|
3827
|
+
fontSize: optionItemFontSize ?? merge.SELECT.options.item.font.size,
|
|
3828
|
+
boxSizing: optionItemBoxSizing ?? merge.SELECT.options.item.box.sizing,
|
|
3829
|
+
minHeight: optionItemMinHeight ?? merge.SELECT.options.item.minHeight,
|
|
3830
|
+
fontWeight: optionItemFontWeight ?? merge.SELECT.options.item.font.weight,
|
|
3831
|
+
lineHeight: dots || merge.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : merge.SELECT.options.item.lineHeight,
|
|
3832
|
+
marginBottom: optionItemMarginBottom ?? merge.SELECT.options.item.marginBottom,
|
|
3833
|
+
backgroundColor: optionItemBackgroudColor ?? merge.SELECT.options.item.colors.backgroud
|
|
3673
3834
|
}
|
|
3674
3835
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
3675
3836
|
checked: option.checked
|
|
@@ -3677,10 +3838,13 @@ const Select = ({
|
|
|
3677
3838
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
3678
3839
|
style: {
|
|
3679
3840
|
position: 'absolute',
|
|
3680
|
-
color: errorColor
|
|
3681
|
-
fontSize: errorSize
|
|
3682
|
-
|
|
3683
|
-
|
|
3841
|
+
color: errorColor ?? merge.SELECT.error.color,
|
|
3842
|
+
fontSize: errorSize ?? merge.SELECT.error.font.size,
|
|
3843
|
+
fontStyle: errorStyle ?? merge.SELECT.error.font.style,
|
|
3844
|
+
fontFamily: errorFamily ?? merge.SELECT.error.font.family,
|
|
3845
|
+
fontWeight: errorWeight ?? merge.SELECT.error.font.weight,
|
|
3846
|
+
zIndex: errorZindex ?? merge.SELECT.error.zIndex,
|
|
3847
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.SELECT.error.marginTop})`
|
|
3684
3848
|
}
|
|
3685
3849
|
}, errorMessage) : '');
|
|
3686
3850
|
};
|
|
@@ -3707,6 +3871,7 @@ Select.propTypes = {
|
|
|
3707
3871
|
labelWeight: PropTypes.string,
|
|
3708
3872
|
labelDisplay: PropTypes.string,
|
|
3709
3873
|
labelFontSize: PropTypes.string,
|
|
3874
|
+
labelFontStyle: PropTypes.string,
|
|
3710
3875
|
labelLineHeight: PropTypes.string,
|
|
3711
3876
|
labelFontFamily: PropTypes.string,
|
|
3712
3877
|
labelMarginBottom: PropTypes.string,
|
|
@@ -3719,7 +3884,9 @@ Select.propTypes = {
|
|
|
3719
3884
|
selectedMinHeight: PropTypes.string,
|
|
3720
3885
|
selectedPadding: PropTypes.string,
|
|
3721
3886
|
selectedFontSize: PropTypes.string,
|
|
3887
|
+
selectedFontStyle: PropTypes.string,
|
|
3722
3888
|
selectedBoxSizing: PropTypes.string,
|
|
3889
|
+
selectedFontFamily: PropTypes.string,
|
|
3723
3890
|
selectedHoverColor: PropTypes.string,
|
|
3724
3891
|
selectedFontWeight: PropTypes.string,
|
|
3725
3892
|
selectedLineHeight: PropTypes.string,
|
|
@@ -3751,16 +3918,22 @@ const SvgToasterInfo = ({
|
|
|
3751
3918
|
fillColor,
|
|
3752
3919
|
...props
|
|
3753
3920
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3754
|
-
width: "
|
|
3755
|
-
height: "
|
|
3756
|
-
viewBox: "0 0
|
|
3921
|
+
width: "60",
|
|
3922
|
+
height: "60",
|
|
3923
|
+
viewBox: "0 0 60 60",
|
|
3757
3924
|
fill: "none",
|
|
3758
3925
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3759
3926
|
"aria-labelledby": titleId
|
|
3760
3927
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3761
3928
|
id: titleId
|
|
3762
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3763
|
-
|
|
3929
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
3930
|
+
opacity: "0.05",
|
|
3931
|
+
cx: "30",
|
|
3932
|
+
cy: "30",
|
|
3933
|
+
r: "30",
|
|
3934
|
+
fill: fillColor ? fillColor : '#00236A'
|
|
3935
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3936
|
+
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",
|
|
3764
3937
|
fill: fillColor ? fillColor : '#00236A'
|
|
3765
3938
|
}));
|
|
3766
3939
|
|
|
@@ -3770,17 +3943,23 @@ const SvgToasterError = ({
|
|
|
3770
3943
|
fillColor,
|
|
3771
3944
|
...props
|
|
3772
3945
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3773
|
-
width: "
|
|
3774
|
-
height: "
|
|
3775
|
-
viewBox: "0 0
|
|
3946
|
+
width: "60",
|
|
3947
|
+
height: "60",
|
|
3948
|
+
viewBox: "0 0 60 60",
|
|
3776
3949
|
fill: "none",
|
|
3777
3950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3778
3951
|
"aria-labelledby": titleId
|
|
3779
3952
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3780
3953
|
id: titleId
|
|
3781
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3782
|
-
|
|
3783
|
-
|
|
3954
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
3955
|
+
opacity: "0.05",
|
|
3956
|
+
cx: "30",
|
|
3957
|
+
cy: "30",
|
|
3958
|
+
r: "30",
|
|
3959
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3960
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3961
|
+
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",
|
|
3962
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3784
3963
|
}));
|
|
3785
3964
|
|
|
3786
3965
|
const SvgToasterClose = ({
|
|
@@ -3808,16 +3987,22 @@ const SvgToasterWarning = ({
|
|
|
3808
3987
|
fillColor,
|
|
3809
3988
|
...props
|
|
3810
3989
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3811
|
-
width: "
|
|
3812
|
-
height: "
|
|
3813
|
-
viewBox: "0 0
|
|
3990
|
+
width: "60",
|
|
3991
|
+
height: "60",
|
|
3992
|
+
viewBox: "0 0 60 60",
|
|
3814
3993
|
fill: "none",
|
|
3815
3994
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3816
3995
|
"aria-labelledby": titleId
|
|
3817
3996
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3818
3997
|
id: titleId
|
|
3819
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3820
|
-
|
|
3998
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
3999
|
+
opacity: "0.05",
|
|
4000
|
+
cx: "30",
|
|
4001
|
+
cy: "30",
|
|
4002
|
+
r: "30",
|
|
4003
|
+
fill: fillColor ? fillColor : '#FF8A00'
|
|
4004
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4005
|
+
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",
|
|
3821
4006
|
fill: fillColor ? fillColor : '#FF8A00'
|
|
3822
4007
|
}));
|
|
3823
4008
|
|
|
@@ -3827,16 +4012,22 @@ const SvgToasterSuccess = ({
|
|
|
3827
4012
|
fillColor,
|
|
3828
4013
|
...props
|
|
3829
4014
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3830
|
-
width: "
|
|
3831
|
-
height: "
|
|
3832
|
-
viewBox: "0 0
|
|
4015
|
+
width: "60",
|
|
4016
|
+
height: "60",
|
|
4017
|
+
viewBox: "0 0 60 60",
|
|
3833
4018
|
fill: "none",
|
|
3834
4019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3835
4020
|
"aria-labelledby": titleId
|
|
3836
4021
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3837
4022
|
id: titleId
|
|
3838
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3839
|
-
|
|
4023
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
4024
|
+
opacity: "0.05",
|
|
4025
|
+
cx: "30",
|
|
4026
|
+
cy: "30",
|
|
4027
|
+
r: "30",
|
|
4028
|
+
fill: fillColor ? fillColor : '#0DA574'
|
|
4029
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4030
|
+
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",
|
|
3840
4031
|
fill: fillColor ? fillColor : '#0DA574'
|
|
3841
4032
|
}));
|
|
3842
4033
|
|
|
@@ -3861,9 +4052,11 @@ const ToasterPosition = {
|
|
|
3861
4052
|
};
|
|
3862
4053
|
const Toast = ({
|
|
3863
4054
|
type,
|
|
4055
|
+
icon,
|
|
3864
4056
|
title,
|
|
3865
4057
|
timer,
|
|
3866
4058
|
position,
|
|
4059
|
+
closeIcon,
|
|
3867
4060
|
removeToast,
|
|
3868
4061
|
description
|
|
3869
4062
|
}) => {
|
|
@@ -3918,10 +4111,9 @@ const Toast = ({
|
|
|
3918
4111
|
height: '60px',
|
|
3919
4112
|
borderRadius: '30px',
|
|
3920
4113
|
alignItems: 'center',
|
|
3921
|
-
justifyContent: 'center'
|
|
3922
|
-
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)' : ''
|
|
4114
|
+
justifyContent: 'center'
|
|
3923
4115
|
}
|
|
3924
|
-
}, type === 'info' ? /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
4116
|
+
}, type === 'info' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icon ? icon : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
3925
4117
|
style: {
|
|
3926
4118
|
height: '100%',
|
|
3927
4119
|
width: 'calc(100% - 90px)'
|
|
@@ -3954,7 +4146,7 @@ const Toast = ({
|
|
|
3954
4146
|
height: '18px',
|
|
3955
4147
|
cursor: 'pointer'
|
|
3956
4148
|
}
|
|
3957
|
-
}, /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
4149
|
+
}, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
3958
4150
|
};
|
|
3959
4151
|
Toast.propTypes = {
|
|
3960
4152
|
timer: PropTypes.number,
|
|
@@ -3985,9 +4177,11 @@ const removeToast = ref => {
|
|
|
3985
4177
|
};
|
|
3986
4178
|
const createToast = ({
|
|
3987
4179
|
type,
|
|
4180
|
+
icon,
|
|
3988
4181
|
timer,
|
|
3989
4182
|
title,
|
|
3990
4183
|
position,
|
|
4184
|
+
iconClose,
|
|
3991
4185
|
description
|
|
3992
4186
|
}) => {
|
|
3993
4187
|
let toastParentBlock;
|
|
@@ -4002,11 +4196,13 @@ const createToast = ({
|
|
|
4002
4196
|
toastBlock.style.marginBottom = '20px';
|
|
4003
4197
|
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
4004
4198
|
type,
|
|
4199
|
+
icon,
|
|
4005
4200
|
timer,
|
|
4006
4201
|
title,
|
|
4007
4202
|
position,
|
|
4008
|
-
|
|
4009
|
-
description
|
|
4203
|
+
iconClose,
|
|
4204
|
+
description,
|
|
4205
|
+
removeToast
|
|
4010
4206
|
});
|
|
4011
4207
|
ReactDOM.render(newElem, toastBlock);
|
|
4012
4208
|
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
@@ -4025,66 +4221,81 @@ const createToast = ({
|
|
|
4025
4221
|
const toast = {
|
|
4026
4222
|
success: (title, props) => {
|
|
4027
4223
|
const {
|
|
4224
|
+
icon,
|
|
4028
4225
|
timer,
|
|
4029
4226
|
position,
|
|
4227
|
+
iconClose,
|
|
4030
4228
|
description
|
|
4031
4229
|
} = props || {};
|
|
4032
4230
|
createToast({
|
|
4033
4231
|
title,
|
|
4034
4232
|
type: 'success',
|
|
4035
|
-
timer: timer
|
|
4036
|
-
position: position
|
|
4037
|
-
description: description
|
|
4233
|
+
timer: timer ?? 5000,
|
|
4234
|
+
position: position ?? 'top-right',
|
|
4235
|
+
description: description ?? '',
|
|
4236
|
+
icon: icon ?? merge.TOASTER.icon.success,
|
|
4237
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4038
4238
|
});
|
|
4039
4239
|
},
|
|
4040
4240
|
info: (title, props) => {
|
|
4041
4241
|
const {
|
|
4242
|
+
icon,
|
|
4042
4243
|
timer,
|
|
4043
4244
|
position,
|
|
4245
|
+
iconClose,
|
|
4044
4246
|
description
|
|
4045
4247
|
} = props || {};
|
|
4046
4248
|
createToast({
|
|
4047
4249
|
title,
|
|
4048
4250
|
type: 'info',
|
|
4049
|
-
timer: timer
|
|
4050
|
-
position: position
|
|
4051
|
-
description: description
|
|
4251
|
+
timer: timer ?? 5000,
|
|
4252
|
+
position: position ?? 'top-right',
|
|
4253
|
+
description: description ?? '',
|
|
4254
|
+
icon: icon ?? merge.TOASTER.icon.info,
|
|
4255
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4052
4256
|
});
|
|
4053
4257
|
},
|
|
4054
4258
|
warn: (title, props) => {
|
|
4055
4259
|
const {
|
|
4260
|
+
icon,
|
|
4056
4261
|
timer,
|
|
4057
4262
|
position,
|
|
4263
|
+
iconClose,
|
|
4058
4264
|
description
|
|
4059
4265
|
} = props || {};
|
|
4060
4266
|
createToast({
|
|
4061
4267
|
title,
|
|
4062
4268
|
type: 'warn',
|
|
4063
|
-
timer: timer
|
|
4064
|
-
position: position
|
|
4065
|
-
description: description
|
|
4269
|
+
timer: timer ?? 5000,
|
|
4270
|
+
position: position ?? 'top-right',
|
|
4271
|
+
description: description ?? '',
|
|
4272
|
+
icon: icon ?? merge.TOASTER.icon.warn,
|
|
4273
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4066
4274
|
});
|
|
4067
4275
|
},
|
|
4068
4276
|
error: (title, props) => {
|
|
4069
4277
|
const {
|
|
4278
|
+
icon,
|
|
4070
4279
|
timer,
|
|
4071
4280
|
position,
|
|
4281
|
+
iconClose,
|
|
4072
4282
|
description
|
|
4073
4283
|
} = props || {};
|
|
4074
4284
|
createToast({
|
|
4075
4285
|
title,
|
|
4076
4286
|
type: 'error',
|
|
4077
|
-
timer: timer
|
|
4078
|
-
position: position
|
|
4079
|
-
description: description
|
|
4287
|
+
timer: timer ?? 5000,
|
|
4288
|
+
position: position ?? 'top-right',
|
|
4289
|
+
description: description ?? '',
|
|
4290
|
+
icon: icon ?? merge.TOASTER.icon.error,
|
|
4291
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4080
4292
|
});
|
|
4081
4293
|
}
|
|
4082
4294
|
};
|
|
4083
4295
|
const Toaster = ({
|
|
4084
4296
|
className
|
|
4085
4297
|
}) => {
|
|
4086
|
-
const
|
|
4087
|
-
const classProps = classnames(className ? className : configStyles.TOASTER.className);
|
|
4298
|
+
const classProps = classnames(className ?? merge.TOASTER.className);
|
|
4088
4299
|
window.addEventListener('popstate', () => {
|
|
4089
4300
|
if (path !== window.location.href) {
|
|
4090
4301
|
if (!toastify) {
|
|
@@ -4138,7 +4349,9 @@ const Tooltip = ({
|
|
|
4138
4349
|
radius,
|
|
4139
4350
|
fontSize,
|
|
4140
4351
|
className,
|
|
4352
|
+
fontStyle,
|
|
4141
4353
|
fontFamily,
|
|
4354
|
+
fontWeight,
|
|
4142
4355
|
tooltipIcon,
|
|
4143
4356
|
tooltipWidth,
|
|
4144
4357
|
tooltipRadius,
|
|
@@ -4146,8 +4359,7 @@ const Tooltip = ({
|
|
|
4146
4359
|
tooltipBackgroundColor
|
|
4147
4360
|
}) => {
|
|
4148
4361
|
const tooltipRef = /*#__PURE__*/createRef(null);
|
|
4149
|
-
const
|
|
4150
|
-
const classProps = classnames(styles$4['tooltip-block'], className ? className : configStyles.TOOLTIP.className);
|
|
4362
|
+
const classProps = classnames(styles$4['tooltip-block'], className ?? merge.TOOLTIP.className);
|
|
4151
4363
|
const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
|
|
4152
4364
|
const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
|
|
4153
4365
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
@@ -4164,18 +4376,18 @@ const Tooltip = ({
|
|
|
4164
4376
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4165
4377
|
className: classProps,
|
|
4166
4378
|
style: {
|
|
4167
|
-
width: width
|
|
4168
|
-
height: height
|
|
4169
|
-
borderRadius: radius
|
|
4170
|
-
backgroundColor: backgroundColor
|
|
4379
|
+
width: width ?? merge.TOOLTIP.parent.width,
|
|
4380
|
+
height: height ?? merge.TOOLTIP.parent.height,
|
|
4381
|
+
borderRadius: radius ?? merge.TOOLTIP.parent.radius,
|
|
4382
|
+
backgroundColor: backgroundColor ?? merge.TOOLTIP.parent.colors.background
|
|
4171
4383
|
}
|
|
4172
4384
|
}, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
|
|
4173
4385
|
ref: tooltipRef,
|
|
4174
4386
|
className: `${styles$4['tooltip']}`,
|
|
4175
4387
|
style: {
|
|
4176
|
-
width: tooltipWidth
|
|
4177
|
-
borderRadius: tooltipRadius
|
|
4178
|
-
backgroundColor: tooltipBackgroundColor
|
|
4388
|
+
width: tooltipWidth ?? merge.TOOLTIP.width,
|
|
4389
|
+
borderRadius: tooltipRadius ?? merge.TOOLTIP.radius,
|
|
4390
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4179
4391
|
top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
|
|
4180
4392
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
4181
4393
|
}
|
|
@@ -4184,22 +4396,24 @@ const Tooltip = ({
|
|
|
4184
4396
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4185
4397
|
className: `${styles$4['tooltip-decor']}`,
|
|
4186
4398
|
style: {
|
|
4187
|
-
backgroundColor: tooltipBackgroundColor
|
|
4399
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4188
4400
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
4189
4401
|
top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
|
|
4190
4402
|
}
|
|
4191
4403
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
4192
4404
|
style: {
|
|
4193
|
-
color: color
|
|
4194
|
-
fontSize: fontSize
|
|
4195
|
-
|
|
4405
|
+
color: color ?? merge.TOOLTIP.color,
|
|
4406
|
+
fontSize: fontSize ?? merge.TOOLTIP.font.size,
|
|
4407
|
+
fontStyle: fontStyle ?? merge.TOOLTIP.font.style,
|
|
4408
|
+
fontFamily: fontFamily ?? merge.TOOLTIP.font.family,
|
|
4409
|
+
fontWeight: fontWeight ?? merge.TOOLTIP.font.weight
|
|
4196
4410
|
}
|
|
4197
4411
|
}, text))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
4198
4412
|
style: {
|
|
4199
4413
|
cursor: 'pointer'
|
|
4200
4414
|
},
|
|
4201
4415
|
onClick: handleShow
|
|
4202
|
-
}, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
4416
|
+
}, tooltipIcon ? tooltipIcon : merge.TOOLTIP.icon ? merge.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
4203
4417
|
};
|
|
4204
4418
|
Tooltip.propTypes = {
|
|
4205
4419
|
type: PropTypes.string,
|
|
@@ -4208,8 +4422,10 @@ Tooltip.propTypes = {
|
|
|
4208
4422
|
height: PropTypes.string,
|
|
4209
4423
|
radius: PropTypes.string,
|
|
4210
4424
|
fontSize: PropTypes.string,
|
|
4425
|
+
fontStyle: PropTypes.string,
|
|
4211
4426
|
className: PropTypes.string,
|
|
4212
4427
|
fontFamily: PropTypes.string,
|
|
4428
|
+
fontWeight: PropTypes.string,
|
|
4213
4429
|
tooltipWidth: PropTypes.string,
|
|
4214
4430
|
tooltipIcon: PropTypes.element,
|
|
4215
4431
|
tooltipRadius: PropTypes.string,
|
|
@@ -4264,17 +4480,19 @@ var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captc
|
|
|
4264
4480
|
styleInject(css_248z$5);
|
|
4265
4481
|
|
|
4266
4482
|
const Captcha = ({
|
|
4267
|
-
size,
|
|
4268
4483
|
color,
|
|
4269
4484
|
range,
|
|
4270
4485
|
label,
|
|
4486
|
+
getRange,
|
|
4271
4487
|
className,
|
|
4272
|
-
|
|
4488
|
+
fontSize,
|
|
4489
|
+
fontStyle,
|
|
4490
|
+
fontFamily,
|
|
4491
|
+
fontWeight
|
|
4273
4492
|
}) => {
|
|
4274
4493
|
const [rangeNumber, setRangeNumber] = useState(0);
|
|
4275
4494
|
const [rangeProgress, setRangeProgress] = useState(0);
|
|
4276
|
-
const
|
|
4277
|
-
const classProps = classnames(className ? className : configStyles.CAPTCHA.className);
|
|
4495
|
+
const classProps = classnames(className ?? merge.CAPTCHA.className);
|
|
4278
4496
|
const handleRange = e => {
|
|
4279
4497
|
const value = e.target.value;
|
|
4280
4498
|
getRange(value);
|
|
@@ -4300,8 +4518,11 @@ const Captcha = ({
|
|
|
4300
4518
|
className: classProps
|
|
4301
4519
|
}, label && /*#__PURE__*/React__default.createElement("p", {
|
|
4302
4520
|
style: {
|
|
4303
|
-
|
|
4304
|
-
|
|
4521
|
+
color: color ?? merge.CAPTCHA.label.color,
|
|
4522
|
+
fontSize: fontSize ?? merge.CAPTCHA.label.font.size,
|
|
4523
|
+
fontStyle: fontStyle ?? merge.CAPTCHA.label.font.style,
|
|
4524
|
+
fontFamily: fontFamily ?? merge.CAPTCHA.label.font.family,
|
|
4525
|
+
fontWeight: fontWeight ?? merge.CAPTCHA.label.font.weight
|
|
4305
4526
|
}
|
|
4306
4527
|
}, label), /*#__PURE__*/React__default.createElement("div", {
|
|
4307
4528
|
style: {
|
|
@@ -4394,9 +4615,8 @@ const Stepper = ({
|
|
|
4394
4615
|
activeSteps,
|
|
4395
4616
|
className
|
|
4396
4617
|
}) => {
|
|
4397
|
-
const configStyles = compereConfigs();
|
|
4398
4618
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4399
|
-
className: classnames(className
|
|
4619
|
+
className: classnames(className ?? merge.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`)
|
|
4400
4620
|
}, (() => {
|
|
4401
4621
|
let steppers = [];
|
|
4402
4622
|
for (let step = 1; step <= stepLength; step++) {
|
|
@@ -4427,13 +4647,14 @@ const Checkbox = ({
|
|
|
4427
4647
|
keyNames,
|
|
4428
4648
|
className,
|
|
4429
4649
|
direction,
|
|
4650
|
+
checkedColor,
|
|
4651
|
+
unCheckedColor,
|
|
4430
4652
|
checkedIcon,
|
|
4431
4653
|
unCheckedIcon,
|
|
4432
4654
|
labelMarginLeft,
|
|
4433
4655
|
checkBoxMarginBottom
|
|
4434
4656
|
}) => {
|
|
4435
|
-
const
|
|
4436
|
-
const classProps = classnames(className ? className : configStyles.CHECKBOX.className);
|
|
4657
|
+
const classProps = classnames(className ?? merge.CHECKBOX.className);
|
|
4437
4658
|
const [innerData, setInnerData] = useState([]);
|
|
4438
4659
|
const [innerKeyNames, setInnerKeyNames] = useState({
|
|
4439
4660
|
id: 'id',
|
|
@@ -4466,11 +4687,11 @@ const Checkbox = ({
|
|
|
4466
4687
|
useEffect(() => {
|
|
4467
4688
|
if (typeof keyNames === 'object' && keyNames !== null && !Array.isArray(keyNames)) {
|
|
4468
4689
|
setInnerKeyNames({
|
|
4469
|
-
id: keyNames.id
|
|
4470
|
-
label: keyNames.label
|
|
4471
|
-
checked: keyNames.checked
|
|
4472
|
-
disabled: keyNames.disabled
|
|
4473
|
-
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked
|
|
4690
|
+
id: keyNames.id ?? 'id',
|
|
4691
|
+
label: keyNames.label ?? 'label',
|
|
4692
|
+
checked: keyNames.checked ?? 'checked',
|
|
4693
|
+
disabled: keyNames.disabled ?? 'disabled',
|
|
4694
|
+
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked ?? 'ignoreDisabledForChecked'
|
|
4474
4695
|
});
|
|
4475
4696
|
}
|
|
4476
4697
|
}, [keyNames]);
|
|
@@ -4486,21 +4707,21 @@ const Checkbox = ({
|
|
|
4486
4707
|
key: `TUI_${index}_checkbox`,
|
|
4487
4708
|
style: {
|
|
4488
4709
|
width: 'fit-content',
|
|
4489
|
-
marginBottom: direction === 'vertical' ? checkBoxMarginBottom
|
|
4710
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ?? merge.CHECKBOX.marginBottom : '0px'
|
|
4490
4711
|
}
|
|
4491
4712
|
}, /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
4492
4713
|
data: item,
|
|
4493
4714
|
index: index,
|
|
4494
|
-
checkedColor: "#00236A",
|
|
4495
|
-
unCheckedColor: "#D1D1D1",
|
|
4496
|
-
checkedIcon: checkedIcon,
|
|
4497
|
-
unCheckedIcon: unCheckedIcon,
|
|
4498
4715
|
handleChecked: handleSendData,
|
|
4499
4716
|
label: item[innerKeyNames.label],
|
|
4500
4717
|
checked: item[innerKeyNames.checked],
|
|
4501
4718
|
disabled: item[innerKeyNames.disabled],
|
|
4502
4719
|
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
4503
|
-
labelMarginLeft: labelMarginLeft
|
|
4720
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.label.marginLeft,
|
|
4721
|
+
checkedColor: checkedColor ?? merge.CHECKBOX.colors.checked,
|
|
4722
|
+
unCheckedColor: unCheckedColor ?? merge.CHECKBOX.colors.unChecked,
|
|
4723
|
+
checkedIcon: checkedIcon ?? merge.CHECKBOX.checkedIcon,
|
|
4724
|
+
unCheckedIcon: unCheckedIcon ?? merge.CHECKBOX.unCheckedIcon
|
|
4504
4725
|
}));
|
|
4505
4726
|
}));
|
|
4506
4727
|
};
|
|
@@ -4510,6 +4731,8 @@ Checkbox.propTypes = {
|
|
|
4510
4731
|
checkedIcon: PropTypes.element,
|
|
4511
4732
|
unCheckedIcon: PropTypes.element,
|
|
4512
4733
|
labelMarginLeft: PropTypes.string,
|
|
4734
|
+
checkedColor: PropTypes.string,
|
|
4735
|
+
unCheckedColor: PropTypes.string,
|
|
4513
4736
|
checkBoxMarginBottom: PropTypes.string,
|
|
4514
4737
|
direction: PropTypes.oneOf(Object.values(DirectionMode)),
|
|
4515
4738
|
data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
@@ -4527,6 +4750,9 @@ const PositionSide = {
|
|
|
4527
4750
|
};
|
|
4528
4751
|
const Textarea = ({
|
|
4529
4752
|
size,
|
|
4753
|
+
style,
|
|
4754
|
+
family,
|
|
4755
|
+
weight,
|
|
4530
4756
|
label,
|
|
4531
4757
|
width,
|
|
4532
4758
|
value,
|
|
@@ -4546,6 +4772,9 @@ const Textarea = ({
|
|
|
4546
4772
|
maxLength,
|
|
4547
4773
|
labelSize,
|
|
4548
4774
|
errorSize,
|
|
4775
|
+
errorStyle,
|
|
4776
|
+
errorWeight,
|
|
4777
|
+
errorFamily,
|
|
4549
4778
|
marginTop,
|
|
4550
4779
|
className,
|
|
4551
4780
|
labelColor,
|
|
@@ -4562,8 +4791,7 @@ const Textarea = ({
|
|
|
4562
4791
|
showCharacterCount,
|
|
4563
4792
|
characterCountPosition
|
|
4564
4793
|
}) => {
|
|
4565
|
-
const
|
|
4566
|
-
const classProps = classnames(className ? className : configStyles.TEXTAREA.className);
|
|
4794
|
+
const classProps = classnames(className ?? merge.TEXTAREA.className);
|
|
4567
4795
|
const [error, setError] = useState('');
|
|
4568
4796
|
const [isHover, setIsHover] = useState(false);
|
|
4569
4797
|
const [isFocus, setIsFocus] = useState(false);
|
|
@@ -4588,31 +4816,30 @@ const Textarea = ({
|
|
|
4588
4816
|
onChange(value.substr(0, maxLength));
|
|
4589
4817
|
}
|
|
4590
4818
|
} else {
|
|
4591
|
-
if (value.length >
|
|
4592
|
-
onChange(value.substr(0,
|
|
4819
|
+
if (value.length > merge.TEXTAREA.maxLength) {
|
|
4820
|
+
onChange(value.substr(0, merge.TEXTAREA.maxLength));
|
|
4593
4821
|
}
|
|
4594
4822
|
}
|
|
4595
4823
|
};
|
|
4596
4824
|
useEffect(() => {
|
|
4597
|
-
if (value === undefined) {
|
|
4598
|
-
alert('Please add value prop on Textarea component');
|
|
4599
|
-
}
|
|
4600
4825
|
if (!onChange) {
|
|
4601
4826
|
alert('Please add onChange function on Textarea component');
|
|
4602
4827
|
}
|
|
4828
|
+
}, [onChange]);
|
|
4829
|
+
useEffect(() => {
|
|
4830
|
+
if (value === undefined) {
|
|
4831
|
+
alert('Please add value prop on Textarea component');
|
|
4832
|
+
}
|
|
4603
4833
|
if (errorMessage) {
|
|
4604
|
-
setError(errorMessage);
|
|
4834
|
+
value === '' ? setError(errorMessage) : setError('');
|
|
4605
4835
|
} else {
|
|
4606
4836
|
setError('');
|
|
4607
4837
|
}
|
|
4608
|
-
if (value === '') {
|
|
4609
|
-
setError('');
|
|
4610
|
-
}
|
|
4611
4838
|
setInnerValue(value);
|
|
4612
|
-
}, [value,
|
|
4839
|
+
}, [value, errorMessage]);
|
|
4613
4840
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4614
4841
|
style: {
|
|
4615
|
-
width: width
|
|
4842
|
+
width: width ?? merge.TEXTAREA.width
|
|
4616
4843
|
},
|
|
4617
4844
|
className: classProps
|
|
4618
4845
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4620,40 +4847,38 @@ const Textarea = ({
|
|
|
4620
4847
|
display: 'flex',
|
|
4621
4848
|
alignItems: 'center',
|
|
4622
4849
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
4623
|
-
|
|
4624
|
-
|
|
4850
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4851
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4852
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family,
|
|
4853
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4854
|
+
marginBottom: labelMarginBottom ?? merge.TEXTAREA.label.marginBottom
|
|
4625
4855
|
}
|
|
4626
4856
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
4627
4857
|
style: {
|
|
4628
|
-
|
|
4629
|
-
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
|
|
4630
|
-
display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
|
|
4631
|
-
fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
|
|
4632
|
-
}
|
|
4633
|
-
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", {
|
|
4634
|
-
style: {
|
|
4635
|
-
color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
|
|
4636
|
-
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize
|
|
4858
|
+
display: labelDisplay ?? merge.TEXTAREA.label.display
|
|
4637
4859
|
}
|
|
4638
|
-
}, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
4860
|
+
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", null, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
4639
4861
|
style: {
|
|
4640
4862
|
width: '100%',
|
|
4641
4863
|
border: 'none',
|
|
4642
4864
|
outline: 'none',
|
|
4643
4865
|
overflow: 'auto',
|
|
4644
4866
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4645
|
-
fontSize: size
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4867
|
+
fontSize: size ?? merge.TEXTAREA.font.size,
|
|
4868
|
+
fontStyle: style ?? merge.TEXTAREA.font.style,
|
|
4869
|
+
fontFamily: family ?? merge.TEXTAREA.font.family,
|
|
4870
|
+
fontWeight: weight ?? merge.TEXTAREA.font.weight,
|
|
4871
|
+
height: height ?? merge.TEXTAREA.height,
|
|
4872
|
+
padding: padding ?? merge.TEXTAREA.padding,
|
|
4873
|
+
borderRadius: radius ?? merge.TEXTAREA.radius,
|
|
4874
|
+
minWidth: minWidth ?? merge.TEXTAREA.minWidth,
|
|
4875
|
+
maxWidth: maxWidth ?? merge.TEXTAREA.maxWidth,
|
|
4876
|
+
minHeight: minHeight ?? merge.TEXTAREA.minHeight,
|
|
4877
|
+
maxHeight: maxHeight ?? merge.TEXTAREA.maxHeight,
|
|
4878
|
+
boxSizing: boxSizing ?? merge.TEXTAREA.box.sizing,
|
|
4879
|
+
backgroundColor: backgroundColor ?? merge.TEXTAREA.colors.background,
|
|
4880
|
+
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,
|
|
4881
|
+
resize: resize ? resize : merge.TEXTAREA.resize
|
|
4657
4882
|
},
|
|
4658
4883
|
value: innerValue,
|
|
4659
4884
|
disabled: disabled,
|
|
@@ -4669,26 +4894,34 @@ const Textarea = ({
|
|
|
4669
4894
|
}
|
|
4670
4895
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4671
4896
|
style: {
|
|
4672
|
-
color: labelColor
|
|
4673
|
-
fontSize: labelSize
|
|
4897
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4898
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4899
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4900
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family
|
|
4674
4901
|
}
|
|
4675
4902
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
4676
4903
|
style: {
|
|
4677
4904
|
clear: 'both',
|
|
4678
4905
|
wordBreak: 'break-all',
|
|
4679
|
-
maxWidth: width
|
|
4906
|
+
maxWidth: width ?? merge.TEXTAREA.width
|
|
4680
4907
|
}
|
|
4681
4908
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4682
4909
|
style: {
|
|
4683
4910
|
display: 'inline-block',
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4911
|
+
color: errorColor ?? merge.TEXTAREA.error.color,
|
|
4912
|
+
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4913
|
+
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4914
|
+
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
|
4915
|
+
fontFamily: errorFamily ?? merge.TEXTAREA.error.font.family,
|
|
4916
|
+
marginTop: marginTop ?? merge.TEXTAREA.error.marginTop
|
|
4687
4917
|
}
|
|
4688
4918
|
}, error)) : '');
|
|
4689
4919
|
};
|
|
4690
4920
|
Textarea.propTypes = {
|
|
4691
4921
|
size: PropTypes.string,
|
|
4922
|
+
style: PropTypes.string,
|
|
4923
|
+
family: PropTypes.string,
|
|
4924
|
+
weight: PropTypes.string,
|
|
4692
4925
|
label: PropTypes.string,
|
|
4693
4926
|
width: PropTypes.string,
|
|
4694
4927
|
height: PropTypes.string,
|
|
@@ -4707,6 +4940,9 @@ Textarea.propTypes = {
|
|
|
4707
4940
|
maxLength: PropTypes.number,
|
|
4708
4941
|
labelSize: PropTypes.string,
|
|
4709
4942
|
errorSize: PropTypes.string,
|
|
4943
|
+
errorStyle: PropTypes.string,
|
|
4944
|
+
errorWeight: PropTypes.string,
|
|
4945
|
+
errorFamily: PropTypes.string,
|
|
4710
4946
|
className: PropTypes.string,
|
|
4711
4947
|
labelColor: PropTypes.string,
|
|
4712
4948
|
errorColor: PropTypes.string,
|
|
@@ -4763,8 +4999,7 @@ const Typography = ({
|
|
|
4763
4999
|
backgroundColor,
|
|
4764
5000
|
...props
|
|
4765
5001
|
}) => {
|
|
4766
|
-
const
|
|
4767
|
-
const classProps = classnames(className ? className : configStyles.TYPOGRAPHY.className);
|
|
5002
|
+
const classProps = classnames(className ?? merge.TYPOGRAPHY.className);
|
|
4768
5003
|
const [isHover, setIsHover] = useState(false);
|
|
4769
5004
|
const [validVariant, setValidVariant] = useState(false);
|
|
4770
5005
|
const handleMouseEnter = () => {
|
|
@@ -4775,20 +5010,20 @@ const Typography = ({
|
|
|
4775
5010
|
};
|
|
4776
5011
|
const tagT = /*#__PURE__*/React__default.createElement(variant, {
|
|
4777
5012
|
style: {
|
|
4778
|
-
border: border
|
|
4779
|
-
cursor: cursor
|
|
4780
|
-
borderRadius: radius
|
|
4781
|
-
fontSize: size
|
|
4782
|
-
fontWeight: weight
|
|
4783
|
-
textShadow: textShadow
|
|
4784
|
-
textAlign: textAlign
|
|
4785
|
-
fontStyle: fontStyle
|
|
4786
|
-
lineHeight: lineHeight
|
|
4787
|
-
fontFamily: fontFamily
|
|
4788
|
-
textTransform: textTransform
|
|
4789
|
-
textDecoration: textDecoration
|
|
4790
|
-
backgroundColor: backgroundColor
|
|
4791
|
-
color: isHover ? colorHover ? colorHover : color ? color :
|
|
5013
|
+
border: border ?? merge.TYPOGRAPHY.border,
|
|
5014
|
+
cursor: cursor ?? merge.TYPOGRAPHY.cursor,
|
|
5015
|
+
borderRadius: radius ?? merge.TYPOGRAPHY.radius,
|
|
5016
|
+
fontSize: size ?? merge.TYPOGRAPHY.font['size' + variant],
|
|
5017
|
+
fontWeight: weight ?? merge.TYPOGRAPHY.font['weight' + variant],
|
|
5018
|
+
textShadow: textShadow ?? merge.TYPOGRAPHY.text['shadow' + variant],
|
|
5019
|
+
textAlign: textAlign ?? merge.TYPOGRAPHY.text['align' + variant],
|
|
5020
|
+
fontStyle: fontStyle ?? merge.TYPOGRAPHY.font['style' + variant],
|
|
5021
|
+
lineHeight: lineHeight ?? merge.TYPOGRAPHY.text['lineHeight' + variant],
|
|
5022
|
+
fontFamily: fontFamily ?? merge.TYPOGRAPHY.font['family' + variant],
|
|
5023
|
+
textTransform: textTransform ?? merge.TYPOGRAPHY.text['transform' + variant],
|
|
5024
|
+
textDecoration: textDecoration ?? merge.TYPOGRAPHY.text['decoration' + variant],
|
|
5025
|
+
backgroundColor: backgroundColor ?? merge.TYPOGRAPHY.colors['background' + variant],
|
|
5026
|
+
color: isHover ? colorHover ? colorHover : color ? color : merge.TYPOGRAPHY.colors[variant] : color ? color : merge.TYPOGRAPHY.colors[variant]
|
|
4792
5027
|
},
|
|
4793
5028
|
...props,
|
|
4794
5029
|
className: classProps,
|
|
@@ -4918,7 +5153,6 @@ const Pagination = ({
|
|
|
4918
5153
|
totalCount,
|
|
4919
5154
|
currentPage
|
|
4920
5155
|
}) => {
|
|
4921
|
-
const configStyles = compereConfigs();
|
|
4922
5156
|
const [inpVal, setInpVal] = useState('');
|
|
4923
5157
|
const [error, setError] = useState(false);
|
|
4924
5158
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
@@ -4947,7 +5181,7 @@ const Pagination = ({
|
|
|
4947
5181
|
}
|
|
4948
5182
|
const classProps = classnames(
|
|
4949
5183
|
// TODO: check and remove pagination-bar-rem class
|
|
4950
|
-
styles$1.list, className
|
|
5184
|
+
styles$1.list, className ?? merge.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`);
|
|
4951
5185
|
const onNext = () => {
|
|
4952
5186
|
onPageChange(currentPageNumber + 1);
|
|
4953
5187
|
};
|
|
@@ -5091,7 +5325,11 @@ const Autocomplete = ({
|
|
|
5091
5325
|
selected,
|
|
5092
5326
|
className,
|
|
5093
5327
|
errorSize,
|
|
5328
|
+
errorStyle,
|
|
5329
|
+
errorWeight,
|
|
5330
|
+
errorFamily,
|
|
5094
5331
|
labelSize,
|
|
5332
|
+
labelStyle,
|
|
5095
5333
|
marginTop,
|
|
5096
5334
|
errorColor,
|
|
5097
5335
|
labelColor,
|
|
@@ -5103,6 +5341,8 @@ const Autocomplete = ({
|
|
|
5103
5341
|
labelDisplay,
|
|
5104
5342
|
contentDisplay,
|
|
5105
5343
|
contentTopSize,
|
|
5344
|
+
contentTopStyle,
|
|
5345
|
+
contentTopFamily,
|
|
5106
5346
|
contentPosition,
|
|
5107
5347
|
contentTopColor,
|
|
5108
5348
|
labelLineHeight,
|
|
@@ -5165,15 +5405,14 @@ const Autocomplete = ({
|
|
|
5165
5405
|
const [innerError, setInnerError] = useState('');
|
|
5166
5406
|
const [innerValue, setInnerValue] = useState('');
|
|
5167
5407
|
const [innerOptions, setInnerOptions] = useState([]);
|
|
5168
|
-
const
|
|
5169
|
-
const classProps = classnames(className ? className : configStyles.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5408
|
+
const classProps = classnames(className ?? merge.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5170
5409
|
const showOption = keyframes`
|
|
5171
5410
|
100% {
|
|
5172
5411
|
max-height: 400px;
|
|
5173
5412
|
}
|
|
5174
5413
|
`;
|
|
5175
5414
|
const animation = () => css`
|
|
5176
|
-
${showOption} ${showOptionDuration
|
|
5415
|
+
${showOption} ${showOptionDuration ?? merge.AUTOCOMPLETE.showOptionDuration} linear forwards
|
|
5177
5416
|
`;
|
|
5178
5417
|
const handleMouseEnter = () => {
|
|
5179
5418
|
setIsHover(true);
|
|
@@ -5182,12 +5421,12 @@ const Autocomplete = ({
|
|
|
5182
5421
|
setIsHover(false);
|
|
5183
5422
|
};
|
|
5184
5423
|
const handleRowMouseEnter = e => {
|
|
5185
|
-
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor :
|
|
5186
|
-
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor :
|
|
5424
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : merge.AUTOCOMPLETE.contentBottom.row.colors.hover;
|
|
5425
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover;
|
|
5187
5426
|
};
|
|
5188
5427
|
const handleRowMouseLeave = e => {
|
|
5189
|
-
e.target.style.color = contentBottomRowColor ? contentBottomRowColor :
|
|
5190
|
-
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5428
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color;
|
|
5429
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background;
|
|
5191
5430
|
};
|
|
5192
5431
|
const handleFocus = () => {
|
|
5193
5432
|
setIsFocus(true);
|
|
@@ -5206,11 +5445,6 @@ const Autocomplete = ({
|
|
|
5206
5445
|
name: value,
|
|
5207
5446
|
id: currentId
|
|
5208
5447
|
});
|
|
5209
|
-
} else {
|
|
5210
|
-
change({
|
|
5211
|
-
name: '',
|
|
5212
|
-
id: ''
|
|
5213
|
-
});
|
|
5214
5448
|
}
|
|
5215
5449
|
};
|
|
5216
5450
|
const handleClick = selectedValue => {
|
|
@@ -5219,28 +5453,28 @@ const Autocomplete = ({
|
|
|
5219
5453
|
setInnerValue(selectedValue[keyNames.name]);
|
|
5220
5454
|
getItem(selectedValue);
|
|
5221
5455
|
};
|
|
5222
|
-
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
5456
|
+
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 && innerValue.length >= searchCount ? /*#__PURE__*/React__default.createElement("div", {
|
|
5223
5457
|
style: {
|
|
5224
|
-
left: contentBottomLeft
|
|
5225
|
-
width: contentBottomWidth
|
|
5226
|
-
zIndex: contentBottomZindex
|
|
5227
|
-
borderRadius: contentBottomRadius
|
|
5228
|
-
maxWidth: contentBottomMaxWidth
|
|
5229
|
-
overflow: contentBottomOverflow
|
|
5230
|
-
position: contentBottomPosition
|
|
5231
|
-
minHeight: contentBottomMinHeight
|
|
5232
|
-
boxShadow: contentBottomBoxShadow
|
|
5233
|
-
backgroundColor: contentBottomBackgroundColor
|
|
5234
|
-
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' :
|
|
5458
|
+
left: contentBottomLeft ?? merge.AUTOCOMPLETE.contentBottom.left,
|
|
5459
|
+
width: contentBottomWidth ?? merge.AUTOCOMPLETE.contentBottom.width,
|
|
5460
|
+
zIndex: contentBottomZindex ?? merge.AUTOCOMPLETE.contentBottom.zIndex,
|
|
5461
|
+
borderRadius: contentBottomRadius ?? merge.AUTOCOMPLETE.contentBottom.radius,
|
|
5462
|
+
maxWidth: contentBottomMaxWidth ?? merge.AUTOCOMPLETE.contentBottom.maxWidth,
|
|
5463
|
+
overflow: contentBottomOverflow ?? merge.AUTOCOMPLETE.contentBottom.overflow,
|
|
5464
|
+
position: contentBottomPosition ?? merge.AUTOCOMPLETE.contentBottom.position,
|
|
5465
|
+
minHeight: contentBottomMinHeight ?? merge.AUTOCOMPLETE.contentBottom.minHeight,
|
|
5466
|
+
boxShadow: contentBottomBoxShadow ?? merge.AUTOCOMPLETE.contentBottom.box.shadow,
|
|
5467
|
+
backgroundColor: contentBottomBackgroundColor ?? merge.AUTOCOMPLETE.contentBottom.colors.background,
|
|
5468
|
+
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',
|
|
5235
5469
|
animation
|
|
5236
5470
|
}
|
|
5237
5471
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5238
5472
|
style: {
|
|
5239
|
-
display: contentBottomInnerDisplay ? contentBottomInnerDisplay :
|
|
5240
|
-
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY :
|
|
5241
|
-
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX :
|
|
5242
|
-
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight :
|
|
5243
|
-
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection :
|
|
5473
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : merge.AUTOCOMPLETE.contentBottom.inner.display,
|
|
5474
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : merge.AUTOCOMPLETE.contentBottom.inner.overflowY,
|
|
5475
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : merge.AUTOCOMPLETE.contentBottom.inner.overflowX,
|
|
5476
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : merge.AUTOCOMPLETE.contentBottom.inner.maxHeight,
|
|
5477
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : merge.AUTOCOMPLETE.contentBottom.inner.direction
|
|
5244
5478
|
}
|
|
5245
5479
|
}, innerOptions.map(item => {
|
|
5246
5480
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -5250,34 +5484,37 @@ const Autocomplete = ({
|
|
|
5250
5484
|
onClick: () => handleClick(item),
|
|
5251
5485
|
style: {
|
|
5252
5486
|
flexShrink: 0,
|
|
5253
|
-
color: contentBottomRowColor ? contentBottomRowColor :
|
|
5254
|
-
height: contentBottomRowHeight ? contentBottomRowHeight :
|
|
5255
|
-
cursor: contentBottomRowCursor ? contentBottomRowCursor :
|
|
5256
|
-
display: contentBottomRowDisplay ? contentBottomRowDisplay :
|
|
5257
|
-
padding: contentBottomRowPadding ? contentBottomRowPadding :
|
|
5258
|
-
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize :
|
|
5259
|
-
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing :
|
|
5260
|
-
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight :
|
|
5261
|
-
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight :
|
|
5262
|
-
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems :
|
|
5263
|
-
transition: contentBottomRowTransition ? contentBottomRowTransition :
|
|
5264
|
-
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom :
|
|
5265
|
-
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5487
|
+
color: contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color,
|
|
5488
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5489
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : merge.AUTOCOMPLETE.contentBottom.row.cursor,
|
|
5490
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : merge.AUTOCOMPLETE.contentBottom.row.display,
|
|
5491
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : merge.AUTOCOMPLETE.contentBottom.row.padding,
|
|
5492
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : merge.AUTOCOMPLETE.contentBottom.row.font.size,
|
|
5493
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : merge.AUTOCOMPLETE.contentBottom.box.sizing,
|
|
5494
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : merge.AUTOCOMPLETE.contentBottom.row.font.weight,
|
|
5495
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5496
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : merge.AUTOCOMPLETE.contentBottom.row.alignItems,
|
|
5497
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : merge.AUTOCOMPLETE.contentBottom.row.transition,
|
|
5498
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : merge.AUTOCOMPLETE.contentBottom.row.marginBottom,
|
|
5499
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
5266
5500
|
}
|
|
5267
5501
|
}, item[keyNames.name]);
|
|
5268
|
-
}))) :
|
|
5502
|
+
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
5269
5503
|
style: {
|
|
5270
5504
|
position: 'absolute',
|
|
5271
5505
|
zIndex: '1',
|
|
5272
|
-
color: errorColor
|
|
5273
|
-
fontSize: errorSize
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5506
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5507
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5508
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5509
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5510
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5511
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5512
|
+
padding: innerErrorPadding ?? merge.AUTOCOMPLETE.innerError.padding,
|
|
5513
|
+
height: contentBottomRowHeight ?? merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5514
|
+
lineHeight: contentBottomRowLineHeight ?? merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5515
|
+
backgroundColor: innerErrorBackgroundColor ?? merge.AUTOCOMPLETE.innerError.colors.background
|
|
5516
|
+
}
|
|
5517
|
+
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
5281
5518
|
useEffect(() => {
|
|
5282
5519
|
if (options === undefined) {
|
|
5283
5520
|
alert('Please add options prop');
|
|
@@ -5313,22 +5550,23 @@ const Autocomplete = ({
|
|
|
5313
5550
|
className: classProps
|
|
5314
5551
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5315
5552
|
style: {
|
|
5316
|
-
color: labelColor
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5553
|
+
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
5554
|
+
display: labelDisplay ?? merge.AUTOCOMPLETE.label.display,
|
|
5555
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5556
|
+
fontSize: labelSize ?? merge.AUTOCOMPLETE.label.font.size,
|
|
5557
|
+
fontStyle: labelStyle ?? merge.AUTOCOMPLETE.label.font.style,
|
|
5558
|
+
fontWeight: labelWeight ?? merge.AUTOCOMPLETE.label.font.weight,
|
|
5559
|
+
fontFamily: labelFontFamily ?? merge.AUTOCOMPLETE.label.font.family,
|
|
5560
|
+
lineHeight: labelLineHeight ?? merge.AUTOCOMPLETE.label.lineHeight,
|
|
5561
|
+
marginBottom: labelMarginBottom ?? merge.AUTOCOMPLETE.label.marginBottom,
|
|
5562
|
+
textTransform: labelTextTransform ?? merge.AUTOCOMPLETE.label.textTransform
|
|
5325
5563
|
}
|
|
5326
5564
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
5327
5565
|
style: {
|
|
5328
|
-
display: contentDisplay
|
|
5329
|
-
position: contentPosition
|
|
5330
|
-
|
|
5331
|
-
|
|
5566
|
+
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5567
|
+
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5568
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5569
|
+
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5332
5570
|
}
|
|
5333
5571
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
5334
5572
|
id: id,
|
|
@@ -5340,35 +5578,40 @@ const Autocomplete = ({
|
|
|
5340
5578
|
onInput: handleChange,
|
|
5341
5579
|
onMouseEnter: handleMouseEnter,
|
|
5342
5580
|
onMouseLeave: handleMouseLeave,
|
|
5343
|
-
placeholder: placeHolder
|
|
5344
|
-
autoComplete: autoComplete
|
|
5581
|
+
placeholder: placeHolder ?? '',
|
|
5582
|
+
autoComplete: autoComplete ?? merge.AUTOCOMPLETE.autoComplete,
|
|
5345
5583
|
style: {
|
|
5346
5584
|
border: 'none',
|
|
5347
5585
|
outline: 'none',
|
|
5348
5586
|
maxWidth: '100%',
|
|
5349
5587
|
transition: 'all 240ms',
|
|
5350
5588
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5351
|
-
color: contentTopColor
|
|
5352
|
-
fontSize: contentTopSize
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5589
|
+
color: contentTopColor ?? merge.AUTOCOMPLETE.color,
|
|
5590
|
+
fontSize: contentTopSize ?? merge.AUTOCOMPLETE.font.size,
|
|
5591
|
+
fontStyle: contentTopStyle ?? merge.AUTOCOMPLETE.font.style,
|
|
5592
|
+
fontFamily: contentTopFamily ?? merge.AUTOCOMPLETE.font.family,
|
|
5593
|
+
fontWeight: contentTopWeight ?? merge.AUTOCOMPLETE.font.weight,
|
|
5594
|
+
backgroundColor: disabled && (backgroundDisableColor ?? merge.AUTOCOMPLETE.colors.backgroundDisable),
|
|
5595
|
+
height: contentTopHeight ?? merge.AUTOCOMPLETE.height,
|
|
5596
|
+
padding: contentTopPadding ?? merge.AUTOCOMPLETE.padding,
|
|
5597
|
+
display: contentTopDisplay ?? merge.AUTOCOMPLETE.display,
|
|
5598
|
+
borderRadius: contentTopRadius ?? merge.AUTOCOMPLETE.radius,
|
|
5599
|
+
boxSizing: contentTopBoxSizing ?? merge.AUTOCOMPLETE.box.sizing,
|
|
5600
|
+
lineHeight: contentTopLineHeight ?? merge.AUTOCOMPLETE.lineHeight,
|
|
5601
|
+
flexDirection: contentTopDirection ?? merge.AUTOCOMPLETE.direction,
|
|
5602
|
+
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
|
|
5363
5603
|
}
|
|
5364
5604
|
}, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
|
|
5365
5605
|
style: {
|
|
5366
5606
|
left: '0px',
|
|
5367
5607
|
position: 'absolute',
|
|
5368
|
-
color: errorColor
|
|
5369
|
-
fontSize: errorSize
|
|
5370
|
-
|
|
5371
|
-
|
|
5608
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5609
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5610
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5611
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5612
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5613
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5614
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5372
5615
|
}
|
|
5373
5616
|
}, innerError) : '', optionList));
|
|
5374
5617
|
};
|
|
@@ -5380,8 +5623,12 @@ Autocomplete.propTypes = {
|
|
|
5380
5623
|
selected: PropTypes.object,
|
|
5381
5624
|
className: PropTypes.string,
|
|
5382
5625
|
errorSize: PropTypes.string,
|
|
5626
|
+
errorStyle: PropTypes.string,
|
|
5627
|
+
errorWeight: PropTypes.string,
|
|
5628
|
+
errorFamily: PropTypes.string,
|
|
5383
5629
|
marginTop: PropTypes.string,
|
|
5384
5630
|
labelSize: PropTypes.string,
|
|
5631
|
+
labelStyle: PropTypes.string,
|
|
5385
5632
|
errorColor: PropTypes.string,
|
|
5386
5633
|
labelColor: PropTypes.string,
|
|
5387
5634
|
searchCount: PropTypes.number,
|
|
@@ -5392,6 +5639,8 @@ Autocomplete.propTypes = {
|
|
|
5392
5639
|
autoComplete: PropTypes.string,
|
|
5393
5640
|
contentDisplay: PropTypes.string,
|
|
5394
5641
|
contentTopSize: PropTypes.string,
|
|
5642
|
+
contentTopStyle: PropTypes.string,
|
|
5643
|
+
contentTopFamily: PropTypes.string,
|
|
5395
5644
|
contentPosition: PropTypes.string,
|
|
5396
5645
|
labelLineHeight: PropTypes.string,
|
|
5397
5646
|
contentTopColor: PropTypes.string,
|
|
@@ -5451,7 +5700,11 @@ Autocomplete.propTypes = {
|
|
|
5451
5700
|
};
|
|
5452
5701
|
Autocomplete.defaultProps = {
|
|
5453
5702
|
searchCount: 3,
|
|
5454
|
-
disabled: false
|
|
5703
|
+
disabled: false,
|
|
5704
|
+
keyNames: {
|
|
5705
|
+
name: 'name',
|
|
5706
|
+
id: 'id'
|
|
5707
|
+
}
|
|
5455
5708
|
};
|
|
5456
5709
|
|
|
5457
5710
|
export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|