@xaypay/tui 0.0.123 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -75
- package/dist/index.es.js +797 -541
- package/dist/index.js +797 -541
- package/package.json +1 -1
- package/tui.config.js +771 -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.mMaxWidth,
|
|
2731
|
+
maxHeight: mMaxHeight ?? merge.MODAL.mMaxHeight,
|
|
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,
|
|
@@ -2864,13 +2994,15 @@ const Input = ({
|
|
|
2864
2994
|
labelLineHeight,
|
|
2865
2995
|
backgroundColor,
|
|
2866
2996
|
telErrorMessage,
|
|
2867
|
-
borderRightColor,
|
|
2868
2997
|
labelMarginBottom,
|
|
2869
2998
|
regexpErrorMessage,
|
|
2870
2999
|
phoneJustifyContent,
|
|
2871
|
-
|
|
3000
|
+
telBorderRightWidth,
|
|
3001
|
+
telBorderRightStyle,
|
|
3002
|
+
telBorderRightColor,
|
|
2872
3003
|
backgroundDisableColor,
|
|
2873
3004
|
errorAnimationDuration,
|
|
3005
|
+
telBorderRightColorHover,
|
|
2874
3006
|
...props
|
|
2875
3007
|
}) => {
|
|
2876
3008
|
const phoneNumberRegex = /^\d+$/;
|
|
@@ -2880,8 +3012,7 @@ const Input = ({
|
|
|
2880
3012
|
const [innerMinNumSize, setInnerMinNumSize] = useState(0);
|
|
2881
3013
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
2882
3014
|
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']);
|
|
3015
|
+
const classProps = classnames(className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
2885
3016
|
const errorShow = keyframes`
|
|
2886
3017
|
100% {
|
|
2887
3018
|
bottom: '-20px';
|
|
@@ -2893,7 +3024,7 @@ const Input = ({
|
|
|
2893
3024
|
}
|
|
2894
3025
|
`;
|
|
2895
3026
|
const animation = () => css`
|
|
2896
|
-
${errorShow} ${errorAnimationDuration ? errorAnimationDuration :
|
|
3027
|
+
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : merge.INPUT.error.animationDuration} forwards
|
|
2897
3028
|
`;
|
|
2898
3029
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
2899
3030
|
if (type === 'tel') {
|
|
@@ -2901,7 +3032,7 @@ const Input = ({
|
|
|
2901
3032
|
if (val === '') {
|
|
2902
3033
|
setInnerErrorMessage('');
|
|
2903
3034
|
} else {
|
|
2904
|
-
telErrorMessage ? setInnerErrorMessage(telErrorMessage) : setInnerErrorMessage(
|
|
3035
|
+
telErrorMessage ? setInnerErrorMessage(telErrorMessage) : setInnerErrorMessage(merge.INPUT.error.telMessage);
|
|
2905
3036
|
val = prevVal;
|
|
2906
3037
|
}
|
|
2907
3038
|
} else {
|
|
@@ -2979,7 +3110,7 @@ const Input = ({
|
|
|
2979
3110
|
const handleChange = event => {
|
|
2980
3111
|
let prevValue = innerValue;
|
|
2981
3112
|
let currentValue = event.target.value;
|
|
2982
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3113
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
2983
3114
|
currentValue = handleCheckTypeTel(currentValue, prevValue);
|
|
2984
3115
|
currentValue = handleCheckTypeNumber(currentValue, prevValue);
|
|
2985
3116
|
if (max && currentValue.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3025,7 +3156,7 @@ const Input = ({
|
|
|
3025
3156
|
if (value === null) {
|
|
3026
3157
|
newValue = '';
|
|
3027
3158
|
} else {
|
|
3028
|
-
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength :
|
|
3159
|
+
const max = type === 'number' ? maxLength ? maxLength : null : maxLength ? maxLength : merge.INPUT.maxLength;
|
|
3029
3160
|
newValue = handleCheckTypeTel(value, newValue);
|
|
3030
3161
|
newValue = handleCheckTypeNumber(value, newValue);
|
|
3031
3162
|
if (max && value.length > max && type !== 'tel' && type !== 'number') {
|
|
@@ -3042,20 +3173,21 @@ const Input = ({
|
|
|
3042
3173
|
className: classProps
|
|
3043
3174
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3044
3175
|
style: {
|
|
3045
|
-
color: labelColor
|
|
3046
|
-
fontSize: labelSize
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3176
|
+
color: labelColor ?? merge.INPUT.label.color,
|
|
3177
|
+
fontSize: labelSize ?? merge.INPUT.label.font.size,
|
|
3178
|
+
fontStyle: labelStyle ?? merge.INPUT.label.font.style,
|
|
3179
|
+
display: labelDisplay ?? merge.INPUT.label.display,
|
|
3180
|
+
fontWeight: labelWeight ?? merge.INPUT.label.font.weight,
|
|
3181
|
+
lineHeight: labelLineHeight ?? merge.INPUT.label.lineHeight,
|
|
3182
|
+
marginBottom: labelMarginBottom ?? merge.INPUT.label.marginBottom,
|
|
3183
|
+
fontFamily: labelFontFamily ?? merge.INPUT.label.font.family
|
|
3052
3184
|
}
|
|
3053
3185
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3054
3186
|
className: `${styles$7['input-content']}`,
|
|
3055
3187
|
style: {
|
|
3056
|
-
width: width
|
|
3057
|
-
borderRadius: radius
|
|
3058
|
-
boxShadow: innerErrorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${
|
|
3188
|
+
width: width ?? merge.INPUT.width,
|
|
3189
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3190
|
+
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
3191
|
},
|
|
3060
3192
|
onMouseEnter: handleMouseEnter,
|
|
3061
3193
|
onMouseLeave: handleMouseLeave
|
|
@@ -3066,30 +3198,36 @@ const Input = ({
|
|
|
3066
3198
|
alignItems: 'center',
|
|
3067
3199
|
justifyContent: 'center',
|
|
3068
3200
|
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 :
|
|
3201
|
+
height: height ?? merge.INPUT.height,
|
|
3202
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3203
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3204
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3205
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3206
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3207
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3076
3208
|
}
|
|
3077
3209
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement("div", {
|
|
3078
3210
|
style: {
|
|
3211
|
+
// border: 'none',
|
|
3079
3212
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
3080
|
-
fontSize: size
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3213
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3214
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3215
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3216
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3217
|
+
height: height ?? merge.INPUT.height,
|
|
3218
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3219
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3220
|
+
borderTopLeftRadius: radius ?? merge.INPUT.radius,
|
|
3221
|
+
borderBottomLeftRadius: radius ?? merge.INPUT.radius,
|
|
3222
|
+
display: phoneDisplay ?? merge.INPUT.tel.display,
|
|
3223
|
+
borderRight: `
|
|
3224
|
+
${telBorderRightWidth ?? merge.INPUT.tel.borderRight.width}
|
|
3225
|
+
${telBorderRightStyle ?? merge.INPUT.tel.borderRight.style}`,
|
|
3226
|
+
alignItems: phoneAlignItems ?? merge.INPUT.tel.alignItems,
|
|
3227
|
+
borderColor: innerErrorMessage ? errorColor ? errorColor : merge.INPUT.error.color : isHover ? telBorderRightColorHover ? telBorderRightColorHover : merge.INPUT.tel.borderRight.colors.hover : telBorderRightColor ? telBorderRightColor : merge.INPUT.tel.borderRight.color,
|
|
3228
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3229
|
+
justifyContent: phoneJustifyContent ?? merge.INPUT.tel.justifyContent,
|
|
3230
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3093
3231
|
}
|
|
3094
3232
|
}, "+374") : '', /*#__PURE__*/React__default.createElement("input", _extends({}, props, {
|
|
3095
3233
|
value: innerValue,
|
|
@@ -3100,19 +3238,22 @@ const Input = ({
|
|
|
3100
3238
|
type: show || type === 'number' ? 'text' : type,
|
|
3101
3239
|
min: type === 'number' && minNumSize ? minNumSize : '',
|
|
3102
3240
|
max: type === 'number' && maxNumSize ? maxNumSize : '',
|
|
3103
|
-
autoComplete: autoComplete ? autoComplete :
|
|
3241
|
+
autoComplete: autoComplete ? autoComplete : merge.INPUT.autoComplete,
|
|
3104
3242
|
style: {
|
|
3105
3243
|
border: 'none',
|
|
3106
3244
|
outline: 'none',
|
|
3107
3245
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
3108
|
-
width: width
|
|
3109
|
-
fontSize: size
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3246
|
+
width: width ?? merge.INPUT.width,
|
|
3247
|
+
fontSize: size ?? merge.INPUT.font.size,
|
|
3248
|
+
fontStyle: style ?? merge.INPUT.font.style,
|
|
3249
|
+
fontWeight: weight ?? merge.INPUT.font.weight,
|
|
3250
|
+
fontFamily: family ?? merge.INPUT.font.family,
|
|
3251
|
+
height: height ?? merge.INPUT.height,
|
|
3252
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3253
|
+
borderRadius: radius ?? merge.INPUT.radius,
|
|
3254
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3255
|
+
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3256
|
+
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3116
3257
|
}
|
|
3117
3258
|
})), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
3118
3259
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
@@ -3121,34 +3262,41 @@ const Input = ({
|
|
|
3121
3262
|
alignItems: 'center',
|
|
3122
3263
|
justifyContent: 'center',
|
|
3123
3264
|
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 :
|
|
3265
|
+
height: height ?? merge.INPUT.height,
|
|
3266
|
+
padding: padding ?? merge.INPUT.padding,
|
|
3267
|
+
width: iconWidth ?? merge.INPUT.iconWidth,
|
|
3268
|
+
boxSizing: boxSizing ?? merge.INPUT.box.sizing,
|
|
3269
|
+
borderTopRightRadius: radius ?? merge.INPUT.radius,
|
|
3270
|
+
borderBottomRightRadius: radius ?? merge.INPUT.radius,
|
|
3271
|
+
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3131
3272
|
}
|
|
3132
3273
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P, {
|
|
3133
|
-
errorAnimation: errorAnimation,
|
|
3274
|
+
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3134
3275
|
animation: animation,
|
|
3135
3276
|
style: {
|
|
3136
3277
|
margin: '0px',
|
|
3137
3278
|
position: 'absolute',
|
|
3138
|
-
width: width
|
|
3139
|
-
left: errorLeft
|
|
3140
|
-
color: errorColor
|
|
3141
|
-
fontSize: errorSize
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3279
|
+
width: width ?? merge.INPUT.width,
|
|
3280
|
+
left: errorLeft ?? merge.INPUT.error.left,
|
|
3281
|
+
color: errorColor ?? merge.INPUT.error.color,
|
|
3282
|
+
fontSize: errorSize ?? merge.INPUT.error.font.size,
|
|
3283
|
+
fontStyle: errorStyle ?? merge.INPUT.error.font.style,
|
|
3284
|
+
fontFamily: errorFamily ?? merge.INPUT.error.font.family,
|
|
3285
|
+
fontWeight: errorWeight ?? merge.INPUT.error.font.weight,
|
|
3286
|
+
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3287
|
+
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3288
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3289
|
+
transform: !errorAnimation && !merge.INPUT.error.animation ? 'scale3d(1,1,1)' : transform ? transform : merge.INPUT.error.transform
|
|
3146
3290
|
},
|
|
3147
|
-
className: errorClassName
|
|
3291
|
+
className: errorClassName ?? merge.INPUT.error.className
|
|
3148
3292
|
}, innerErrorMessage) : '');
|
|
3149
3293
|
};
|
|
3150
3294
|
Input.propTypes = {
|
|
3295
|
+
size: PropTypes.string,
|
|
3151
3296
|
name: PropTypes.string,
|
|
3297
|
+
style: PropTypes.string,
|
|
3298
|
+
weight: PropTypes.string,
|
|
3299
|
+
family: PropTypes.string,
|
|
3152
3300
|
change: PropTypes.func,
|
|
3153
3301
|
color: PropTypes.string,
|
|
3154
3302
|
width: PropTypes.string,
|
|
@@ -3158,10 +3306,8 @@ Input.propTypes = {
|
|
|
3158
3306
|
height: PropTypes.string,
|
|
3159
3307
|
radius: PropTypes.string,
|
|
3160
3308
|
padding: PropTypes.string,
|
|
3161
|
-
fontSize: PropTypes.string,
|
|
3162
3309
|
tooltip: PropTypes.element,
|
|
3163
3310
|
withoutDot: PropTypes.bool,
|
|
3164
|
-
marginTop: PropTypes.string,
|
|
3165
3311
|
transform: PropTypes.string,
|
|
3166
3312
|
className: PropTypes.string,
|
|
3167
3313
|
iconWidth: PropTypes.string,
|
|
@@ -3176,6 +3322,10 @@ Input.propTypes = {
|
|
|
3176
3322
|
maxNumSize: PropTypes.number,
|
|
3177
3323
|
errorColor: PropTypes.string,
|
|
3178
3324
|
labelColor: PropTypes.string,
|
|
3325
|
+
labelStyle: PropTypes.string,
|
|
3326
|
+
errorStyle: PropTypes.string,
|
|
3327
|
+
errorWeight: PropTypes.string,
|
|
3328
|
+
errorFamily: PropTypes.string,
|
|
3179
3329
|
borderRight: PropTypes.string,
|
|
3180
3330
|
placeholder: PropTypes.string,
|
|
3181
3331
|
errorZindex: PropTypes.string,
|
|
@@ -3186,6 +3336,7 @@ Input.propTypes = {
|
|
|
3186
3336
|
errorAnimation: PropTypes.bool,
|
|
3187
3337
|
labelDisplay: PropTypes.string,
|
|
3188
3338
|
errorPosition: PropTypes.string,
|
|
3339
|
+
errorMarginTop: PropTypes.string,
|
|
3189
3340
|
boxShadowHover: PropTypes.string,
|
|
3190
3341
|
errorClassName: PropTypes.string,
|
|
3191
3342
|
labelFontFamily: PropTypes.string,
|
|
@@ -3194,14 +3345,16 @@ Input.propTypes = {
|
|
|
3194
3345
|
phoneAlignItems: PropTypes.string,
|
|
3195
3346
|
errorLineHeight: PropTypes.string,
|
|
3196
3347
|
labelLineHeight: PropTypes.string,
|
|
3197
|
-
borderRightColor: PropTypes.string,
|
|
3198
3348
|
labelMarginBottom: PropTypes.string,
|
|
3199
3349
|
regexpErrorMessage: PropTypes.string,
|
|
3200
3350
|
regexp: PropTypes.instanceOf(RegExp),
|
|
3351
|
+
telBorderRightWidth: PropTypes.string,
|
|
3352
|
+
telBorderRightStyle: PropTypes.string,
|
|
3353
|
+
telBorderRightColor: PropTypes.string,
|
|
3201
3354
|
phoneJustifyContent: PropTypes.string,
|
|
3202
|
-
borderRightColorHover: PropTypes.string,
|
|
3203
3355
|
backgroundDisableColor: PropTypes.string,
|
|
3204
3356
|
errorAnimationDuration: PropTypes.string,
|
|
3357
|
+
telBorderRightColorHover: PropTypes.string,
|
|
3205
3358
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
3206
3359
|
rightIcon: PropTypes.arrayOf(PropTypes.element),
|
|
3207
3360
|
type: PropTypes.oneOf(Object.values(InputTypes)),
|
|
@@ -3228,6 +3381,7 @@ const Radio = ({
|
|
|
3228
3381
|
borderColor,
|
|
3229
3382
|
borderStyle,
|
|
3230
3383
|
labelFontSize,
|
|
3384
|
+
labelFontStyle,
|
|
3231
3385
|
labelFontFamily,
|
|
3232
3386
|
labelFontWeight,
|
|
3233
3387
|
labelLineHeight,
|
|
@@ -3236,8 +3390,7 @@ const Radio = ({
|
|
|
3236
3390
|
radioItemMarginRight,
|
|
3237
3391
|
radioItemMarginBottom
|
|
3238
3392
|
}) => {
|
|
3239
|
-
const
|
|
3240
|
-
const classProps = classnames(className ? className : configStyles.RADIO.className);
|
|
3393
|
+
const classProps = classnames(className ?? merge.RADIO.className);
|
|
3241
3394
|
const [innerData, setInnerData] = useState([]);
|
|
3242
3395
|
const [radioInnerSize, setRadioInnerSize] = useState('');
|
|
3243
3396
|
const [radioInnerFormat, setRadioInnerFormat] = useState('');
|
|
@@ -3249,11 +3402,11 @@ const Radio = ({
|
|
|
3249
3402
|
});
|
|
3250
3403
|
const handleMouseEnter = (id, elemID) => {
|
|
3251
3404
|
const elem = document.querySelector(`#${elemID}`);
|
|
3252
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3405
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color;
|
|
3253
3406
|
};
|
|
3254
3407
|
const handleMouseLeave = (id, elemID) => {
|
|
3255
3408
|
const elem = document.querySelector(`#${elemID}`);
|
|
3256
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor :
|
|
3409
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent';
|
|
3257
3410
|
};
|
|
3258
3411
|
const handleChecked = selItem => {
|
|
3259
3412
|
setInnerSelectedData(selItem);
|
|
@@ -3269,7 +3422,7 @@ const Radio = ({
|
|
|
3269
3422
|
useEffect(() => {
|
|
3270
3423
|
let radioSize = '';
|
|
3271
3424
|
let radioSizeFormat = '';
|
|
3272
|
-
const checkSize = size ||
|
|
3425
|
+
const checkSize = size || merge.RADIO.size;
|
|
3273
3426
|
if (checkSize && typeof checkSize === 'string') {
|
|
3274
3427
|
if (checkSize.length > 0) {
|
|
3275
3428
|
checkSize.split('').map(item => {
|
|
@@ -3286,7 +3439,7 @@ const Radio = ({
|
|
|
3286
3439
|
}
|
|
3287
3440
|
setRadioInnerFormat(radioSizeFormat);
|
|
3288
3441
|
setRadioInnerSize(`${parseInt(radioSize) / 2}`);
|
|
3289
|
-
}, [size,
|
|
3442
|
+
}, [size, merge.RADIO.size]);
|
|
3290
3443
|
useEffect(() => {
|
|
3291
3444
|
if (typeof selected === 'object' && selected !== null && !Array.isArray(selected)) {
|
|
3292
3445
|
setInnerSelectedData(selected);
|
|
@@ -3316,8 +3469,8 @@ const Radio = ({
|
|
|
3316
3469
|
cursor: item[innerKeyNames.disabled] ? 'not-allowed' : 'pointer',
|
|
3317
3470
|
width: 'fit-content',
|
|
3318
3471
|
alignItems: 'center',
|
|
3319
|
-
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight :
|
|
3320
|
-
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom :
|
|
3472
|
+
marginRight: diraction === 'horizontal' ? radioItemMarginRight ? radioItemMarginRight : merge.RADIO.item.marginRight : '0px',
|
|
3473
|
+
marginBottom: diraction === 'vertical' ? radioItemMarginBottom ? radioItemMarginBottom : merge.RADIO.item.marginBottom : '0px'
|
|
3321
3474
|
},
|
|
3322
3475
|
onClick: item[innerKeyNames.disabled] ? _ => _ : () => handleChecked(item),
|
|
3323
3476
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
@@ -3328,11 +3481,11 @@ const Radio = ({
|
|
|
3328
3481
|
alignItems: 'center',
|
|
3329
3482
|
borderRadius: '100%',
|
|
3330
3483
|
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 :
|
|
3484
|
+
width: size ? size : merge.RADIO.size,
|
|
3485
|
+
height: size ? size : merge.RADIO.size,
|
|
3486
|
+
marginRight: item[innerKeyNames.label] ? radioMarginRight ? radioMarginRight : merge.RADIO.marginRight : '0px',
|
|
3487
|
+
border: `${borderSize ?? merge.RADIO.border.width} ${borderStyle ? borderStyle : merge.RADIO.border.style}`,
|
|
3488
|
+
borderColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : borderColor ? borderColor : merge.RADIO.border.color
|
|
3336
3489
|
}
|
|
3337
3490
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3338
3491
|
id: elemId,
|
|
@@ -3340,15 +3493,16 @@ const Radio = ({
|
|
|
3340
3493
|
borderRadius: '100%',
|
|
3341
3494
|
width: radioInnerSize + radioInnerFormat,
|
|
3342
3495
|
height: radioInnerSize + radioInnerFormat,
|
|
3343
|
-
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor :
|
|
3496
|
+
backgroundColor: item[innerKeyNames.id] === innerSelectedData.id ? borderActiveColor ? borderActiveColor : merge.RADIO.border.activeColor : 'transparent'
|
|
3344
3497
|
}
|
|
3345
3498
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default.createElement("span", {
|
|
3346
3499
|
style: {
|
|
3347
|
-
color: labelColor
|
|
3348
|
-
fontSize: labelFontSize
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3500
|
+
color: labelColor ?? merge.RADIO.label.color,
|
|
3501
|
+
fontSize: labelFontSize ?? merge.RADIO.label.font.size,
|
|
3502
|
+
fontStyle: labelFontStyle ?? merge.RADIO.label.font.style,
|
|
3503
|
+
fontFamily: labelFontFamily ?? merge.RADIO.label.font.family,
|
|
3504
|
+
fontWeight: labelFontWeight ?? merge.RADIO.label.font.weight,
|
|
3505
|
+
lineHeight: labelLineHeight ?? merge.RADIO.label.lineHeight
|
|
3352
3506
|
},
|
|
3353
3507
|
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
3354
3508
|
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
@@ -3365,6 +3519,7 @@ Radio.propTypes = {
|
|
|
3365
3519
|
borderColor: PropTypes.string,
|
|
3366
3520
|
borderStyle: PropTypes.string,
|
|
3367
3521
|
labelFontSize: PropTypes.string,
|
|
3522
|
+
labelFontStyle: PropTypes.string,
|
|
3368
3523
|
labelFontFamily: PropTypes.string,
|
|
3369
3524
|
labelFontWeight: PropTypes.string,
|
|
3370
3525
|
labelLineHeight: PropTypes.string,
|
|
@@ -3426,6 +3581,7 @@ const Select = ({
|
|
|
3426
3581
|
labelWeight,
|
|
3427
3582
|
labelDisplay,
|
|
3428
3583
|
labelFontSize,
|
|
3584
|
+
labelFontStyle,
|
|
3429
3585
|
labelLineHeight,
|
|
3430
3586
|
labelFontFamily,
|
|
3431
3587
|
labelMarginBottom,
|
|
@@ -3433,12 +3589,17 @@ const Select = ({
|
|
|
3433
3589
|
cursor,
|
|
3434
3590
|
errorSize,
|
|
3435
3591
|
errorColor,
|
|
3592
|
+
errorStyle,
|
|
3593
|
+
errorFamily,
|
|
3594
|
+
errorWeight,
|
|
3436
3595
|
selectedColor,
|
|
3437
3596
|
selectedRadius,
|
|
3438
|
-
selectedMinHeight,
|
|
3439
3597
|
selectedPadding,
|
|
3440
3598
|
selectedFontSize,
|
|
3599
|
+
selectedFontStyle,
|
|
3441
3600
|
selectedBoxSizing,
|
|
3601
|
+
selectedMinHeight,
|
|
3602
|
+
selectedFontFamily,
|
|
3442
3603
|
selectedFontWeight,
|
|
3443
3604
|
selectedLineHeight,
|
|
3444
3605
|
selectedHoverColor,
|
|
@@ -3464,8 +3625,7 @@ const Select = ({
|
|
|
3464
3625
|
boxShadowHover
|
|
3465
3626
|
}) => {
|
|
3466
3627
|
const ref = useRef();
|
|
3467
|
-
const
|
|
3468
|
-
const classProps = classnames(className ? className : configStyles.SELECT.className);
|
|
3628
|
+
const classProps = classnames(className ? className : merge.SELECT.className);
|
|
3469
3629
|
const [opened, setOpened] = useState(false);
|
|
3470
3630
|
const [isHover, setIsHover] = useState(false);
|
|
3471
3631
|
const [newSelected, setNewSelected] = useState([]);
|
|
@@ -3518,12 +3678,12 @@ const Select = ({
|
|
|
3518
3678
|
setIsHover(false);
|
|
3519
3679
|
};
|
|
3520
3680
|
const handleMouseEnterOption = e => {
|
|
3521
|
-
e.target.style.color = optionItemColorHover ? optionItemColorHover :
|
|
3522
|
-
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover :
|
|
3681
|
+
e.target.style.color = optionItemColorHover ? optionItemColorHover : merge.SELECT.options.item.colors.hover;
|
|
3682
|
+
e.target.style.backgroundColor = optionItemBackgroudColorHover ? optionItemBackgroudColorHover : merge.SELECT.options.item.colors.backgroudHover;
|
|
3523
3683
|
};
|
|
3524
3684
|
const handleMouseLeaveOption = e => {
|
|
3525
|
-
e.target.style.color = optionItemColor ? optionItemColor :
|
|
3526
|
-
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor :
|
|
3685
|
+
e.target.style.color = optionItemColor ? optionItemColor : merge.SELECT.options.item.color;
|
|
3686
|
+
e.target.style.backgroundColor = optionItemBackgroudColor ? optionItemBackgroudColor : merge.SELECT.options.item.colors.backgroud;
|
|
3527
3687
|
};
|
|
3528
3688
|
const isObjectEmpty = obj => {
|
|
3529
3689
|
for (var key in obj) {
|
|
@@ -3579,14 +3739,15 @@ const Select = ({
|
|
|
3579
3739
|
}
|
|
3580
3740
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
3581
3741
|
style: {
|
|
3582
|
-
color: labelColor
|
|
3583
|
-
fontWeight: labelWeight
|
|
3584
|
-
display: labelDisplay
|
|
3585
|
-
fontSize: labelFontSize
|
|
3586
|
-
|
|
3587
|
-
fontFamily: labelFontFamily
|
|
3588
|
-
|
|
3589
|
-
|
|
3742
|
+
color: labelColor ?? merge.SELECT.label.color,
|
|
3743
|
+
fontWeight: labelWeight ?? merge.SELECT.label.font.weight,
|
|
3744
|
+
display: labelDisplay ?? merge.SELECT.label.display,
|
|
3745
|
+
fontSize: labelFontSize ?? merge.SELECT.label.font.size,
|
|
3746
|
+
fontStyle: labelFontStyle ?? merge.SELECT.label.font.style,
|
|
3747
|
+
fontFamily: labelFontFamily ?? merge.SELECT.label.font.family,
|
|
3748
|
+
lineHeight: labelLineHeight ?? merge.SELECT.label.lineHeight,
|
|
3749
|
+
marginBottom: labelMarginBottom ?? merge.SELECT.label.marginBottom,
|
|
3750
|
+
textTransform: labelTextTransform ?? merge.SELECT.label.textTransform
|
|
3590
3751
|
}
|
|
3591
3752
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3592
3753
|
ref: ref
|
|
@@ -3594,17 +3755,19 @@ const Select = ({
|
|
|
3594
3755
|
className: styles$6['select-content']
|
|
3595
3756
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3596
3757
|
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
|
-
|
|
3758
|
+
cursor: disabled ? 'not-allowed' : cursor ? cursor : merge.SELECT.selected.cursor,
|
|
3759
|
+
minHeight: selectedMinHeight ?? merge.SELECT.selected.minHeight,
|
|
3760
|
+
padding: selectedPadding ?? merge.SELECT.selected.padding,
|
|
3761
|
+
borderRadius: selectedRadius ?? merge.SELECT.selected.radius,
|
|
3762
|
+
fontSize: selectedFontSize ?? merge.SELECT.selected.font.size,
|
|
3763
|
+
fontStyle: selectedFontStyle ?? merge.SELECT.selected.font.style,
|
|
3764
|
+
fontFamily: selectedFontFamily ?? merge.SELECT.selected.font.family,
|
|
3765
|
+
boxSizing: selectedBoxSizing ?? merge.SELECT.selected.box.sizing,
|
|
3766
|
+
fontWeight: selectedFontWeight ?? merge.SELECT.selected.font.weight,
|
|
3767
|
+
lineHeight: selectedLineHeight ?? merge.SELECT.selected.lineHeight,
|
|
3768
|
+
transition: selectedTransition ?? merge.SELECT.selected.transition,
|
|
3769
|
+
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : merge.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : merge.SELECT.selected.colors.background,
|
|
3770
|
+
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
3771
|
},
|
|
3609
3772
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
3610
3773
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
@@ -3616,7 +3779,7 @@ const Select = ({
|
|
|
3616
3779
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
3617
3780
|
overflow: 'hidden',
|
|
3618
3781
|
textOverflow: 'ellipsis',
|
|
3619
|
-
color: errorMessage ? errorColor ? errorColor :
|
|
3782
|
+
color: errorMessage ? errorColor ? errorColor : merge.SELECT.error.color : isHover ? selectedHoverColor ? selectedHoverColor : merge.SELECT.selected.colors.hover : selectedColor ? selectedColor : merge.SELECT.selected.color
|
|
3620
3783
|
}
|
|
3621
3784
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
3622
3785
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -3628,23 +3791,23 @@ const Select = ({
|
|
|
3628
3791
|
}
|
|
3629
3792
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
3630
3793
|
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 :
|
|
3794
|
+
}, !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
3795
|
className: `${styles$6['close-icon']}`,
|
|
3633
3796
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
3634
3797
|
style: {
|
|
3635
3798
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
3636
3799
|
}
|
|
3637
|
-
}, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3800
|
+
}, closeIcon ? closeIcon : merge.SELECT.closeIcon ? merge.SELECT.closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3638
3801
|
style: {
|
|
3639
3802
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
3640
3803
|
},
|
|
3641
3804
|
className: `${styles$6['arrow-icon']}`
|
|
3642
|
-
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3805
|
+
}, arrowIcon ? arrowIcon : merge.SELECT.arrowIcon ? merge.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
3643
3806
|
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' :
|
|
3807
|
+
boxShadow: optionsBoxShadow ?? merge.SELECT.options.box.shadow,
|
|
3808
|
+
borderRadius: optionsBorderRadius ?? merge.SELECT.options.radius,
|
|
3809
|
+
backgroundColor: optionsBackgroundColor ?? merge.SELECT.options.colors.background,
|
|
3810
|
+
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
3811
|
},
|
|
3649
3812
|
className: `${styles$6['select-content-bottom']}`
|
|
3650
3813
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3657,19 +3820,19 @@ const Select = ({
|
|
|
3657
3820
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
3658
3821
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
3659
3822
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
3660
|
-
className: `${styles$6['select-content-bottom-row']} ${dots ||
|
|
3823
|
+
className: `${styles$6['select-content-bottom-row']} ${dots || merge.SELECT.dots ? styles$6['ellipsis'] : ''}`,
|
|
3661
3824
|
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
|
|
3825
|
+
overflowWrap: !dots && !merge.SELECT.dots ? 'anywhere' : 'break-word',
|
|
3826
|
+
color: optionItemColor ?? merge.SELECT.options.item.color,
|
|
3827
|
+
cursor: optionItemCursor ?? merge.SELECT.options.item.cursor,
|
|
3828
|
+
padding: optionItemPadding ?? merge.SELECT.options.item.padding,
|
|
3829
|
+
fontSize: optionItemFontSize ?? merge.SELECT.options.item.font.size,
|
|
3830
|
+
boxSizing: optionItemBoxSizing ?? merge.SELECT.options.item.box.sizing,
|
|
3831
|
+
minHeight: optionItemMinHeight ?? merge.SELECT.options.item.minHeight,
|
|
3832
|
+
fontWeight: optionItemFontWeight ?? merge.SELECT.options.item.font.weight,
|
|
3833
|
+
lineHeight: dots || merge.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : merge.SELECT.options.item.lineHeight,
|
|
3834
|
+
marginBottom: optionItemMarginBottom ?? merge.SELECT.options.item.marginBottom,
|
|
3835
|
+
backgroundColor: optionItemBackgroudColor ?? merge.SELECT.options.item.colors.backgroud
|
|
3673
3836
|
}
|
|
3674
3837
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
3675
3838
|
checked: option.checked
|
|
@@ -3677,10 +3840,13 @@ const Select = ({
|
|
|
3677
3840
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
3678
3841
|
style: {
|
|
3679
3842
|
position: 'absolute',
|
|
3680
|
-
color: errorColor
|
|
3681
|
-
fontSize: errorSize
|
|
3682
|
-
|
|
3683
|
-
|
|
3843
|
+
color: errorColor ?? merge.SELECT.error.color,
|
|
3844
|
+
fontSize: errorSize ?? merge.SELECT.error.font.size,
|
|
3845
|
+
fontStyle: errorStyle ?? merge.SELECT.error.font.style,
|
|
3846
|
+
fontFamily: errorFamily ?? merge.SELECT.error.font.family,
|
|
3847
|
+
fontWeight: errorWeight ?? merge.SELECT.error.font.weight,
|
|
3848
|
+
zIndex: errorZindex ?? merge.SELECT.error.zIndex,
|
|
3849
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.SELECT.error.marginTop})`
|
|
3684
3850
|
}
|
|
3685
3851
|
}, errorMessage) : '');
|
|
3686
3852
|
};
|
|
@@ -3707,6 +3873,7 @@ Select.propTypes = {
|
|
|
3707
3873
|
labelWeight: PropTypes.string,
|
|
3708
3874
|
labelDisplay: PropTypes.string,
|
|
3709
3875
|
labelFontSize: PropTypes.string,
|
|
3876
|
+
labelFontStyle: PropTypes.string,
|
|
3710
3877
|
labelLineHeight: PropTypes.string,
|
|
3711
3878
|
labelFontFamily: PropTypes.string,
|
|
3712
3879
|
labelMarginBottom: PropTypes.string,
|
|
@@ -3719,7 +3886,9 @@ Select.propTypes = {
|
|
|
3719
3886
|
selectedMinHeight: PropTypes.string,
|
|
3720
3887
|
selectedPadding: PropTypes.string,
|
|
3721
3888
|
selectedFontSize: PropTypes.string,
|
|
3889
|
+
selectedFontStyle: PropTypes.string,
|
|
3722
3890
|
selectedBoxSizing: PropTypes.string,
|
|
3891
|
+
selectedFontFamily: PropTypes.string,
|
|
3723
3892
|
selectedHoverColor: PropTypes.string,
|
|
3724
3893
|
selectedFontWeight: PropTypes.string,
|
|
3725
3894
|
selectedLineHeight: PropTypes.string,
|
|
@@ -3751,16 +3920,22 @@ const SvgToasterInfo = ({
|
|
|
3751
3920
|
fillColor,
|
|
3752
3921
|
...props
|
|
3753
3922
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3754
|
-
width: "
|
|
3755
|
-
height: "
|
|
3756
|
-
viewBox: "0 0
|
|
3923
|
+
width: "60",
|
|
3924
|
+
height: "60",
|
|
3925
|
+
viewBox: "0 0 60 60",
|
|
3757
3926
|
fill: "none",
|
|
3758
3927
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3759
3928
|
"aria-labelledby": titleId
|
|
3760
3929
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3761
3930
|
id: titleId
|
|
3762
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3763
|
-
|
|
3931
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
3932
|
+
opacity: "0.05",
|
|
3933
|
+
cx: "30",
|
|
3934
|
+
cy: "30",
|
|
3935
|
+
r: "30",
|
|
3936
|
+
fill: fillColor ? fillColor : '#00236A'
|
|
3937
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3938
|
+
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
3939
|
fill: fillColor ? fillColor : '#00236A'
|
|
3765
3940
|
}));
|
|
3766
3941
|
|
|
@@ -3770,17 +3945,23 @@ const SvgToasterError = ({
|
|
|
3770
3945
|
fillColor,
|
|
3771
3946
|
...props
|
|
3772
3947
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3773
|
-
width: "
|
|
3774
|
-
height: "
|
|
3775
|
-
viewBox: "0 0
|
|
3948
|
+
width: "60",
|
|
3949
|
+
height: "60",
|
|
3950
|
+
viewBox: "0 0 60 60",
|
|
3776
3951
|
fill: "none",
|
|
3777
3952
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3778
3953
|
"aria-labelledby": titleId
|
|
3779
3954
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3780
3955
|
id: titleId
|
|
3781
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3782
|
-
|
|
3783
|
-
|
|
3956
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
3957
|
+
opacity: "0.05",
|
|
3958
|
+
cx: "30",
|
|
3959
|
+
cy: "30",
|
|
3960
|
+
r: "30",
|
|
3961
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3962
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
3963
|
+
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",
|
|
3964
|
+
fill: fillColor ? fillColor : '#EE0000'
|
|
3784
3965
|
}));
|
|
3785
3966
|
|
|
3786
3967
|
const SvgToasterClose = ({
|
|
@@ -3808,16 +3989,22 @@ const SvgToasterWarning = ({
|
|
|
3808
3989
|
fillColor,
|
|
3809
3990
|
...props
|
|
3810
3991
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3811
|
-
width: "
|
|
3812
|
-
height: "
|
|
3813
|
-
viewBox: "0 0
|
|
3992
|
+
width: "60",
|
|
3993
|
+
height: "60",
|
|
3994
|
+
viewBox: "0 0 60 60",
|
|
3814
3995
|
fill: "none",
|
|
3815
3996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3816
3997
|
"aria-labelledby": titleId
|
|
3817
3998
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3818
3999
|
id: titleId
|
|
3819
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3820
|
-
|
|
4000
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
4001
|
+
opacity: "0.05",
|
|
4002
|
+
cx: "30",
|
|
4003
|
+
cy: "30",
|
|
4004
|
+
r: "30",
|
|
4005
|
+
fill: fillColor ? fillColor : '#FF8A00'
|
|
4006
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4007
|
+
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
4008
|
fill: fillColor ? fillColor : '#FF8A00'
|
|
3822
4009
|
}));
|
|
3823
4010
|
|
|
@@ -3827,16 +4014,22 @@ const SvgToasterSuccess = ({
|
|
|
3827
4014
|
fillColor,
|
|
3828
4015
|
...props
|
|
3829
4016
|
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
3830
|
-
width: "
|
|
3831
|
-
height: "
|
|
3832
|
-
viewBox: "0 0
|
|
4017
|
+
width: "60",
|
|
4018
|
+
height: "60",
|
|
4019
|
+
viewBox: "0 0 60 60",
|
|
3833
4020
|
fill: "none",
|
|
3834
4021
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3835
4022
|
"aria-labelledby": titleId
|
|
3836
4023
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
3837
4024
|
id: titleId
|
|
3838
|
-
}, title) : null, /*#__PURE__*/React.createElement("
|
|
3839
|
-
|
|
4025
|
+
}, title) : null, /*#__PURE__*/React.createElement("circle", {
|
|
4026
|
+
opacity: "0.05",
|
|
4027
|
+
cx: "30",
|
|
4028
|
+
cy: "30",
|
|
4029
|
+
r: "30",
|
|
4030
|
+
fill: fillColor ? fillColor : '#0DA574'
|
|
4031
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4032
|
+
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
4033
|
fill: fillColor ? fillColor : '#0DA574'
|
|
3841
4034
|
}));
|
|
3842
4035
|
|
|
@@ -3861,9 +4054,11 @@ const ToasterPosition = {
|
|
|
3861
4054
|
};
|
|
3862
4055
|
const Toast = ({
|
|
3863
4056
|
type,
|
|
4057
|
+
icon,
|
|
3864
4058
|
title,
|
|
3865
4059
|
timer,
|
|
3866
4060
|
position,
|
|
4061
|
+
closeIcon,
|
|
3867
4062
|
removeToast,
|
|
3868
4063
|
description
|
|
3869
4064
|
}) => {
|
|
@@ -3918,10 +4113,9 @@ const Toast = ({
|
|
|
3918
4113
|
height: '60px',
|
|
3919
4114
|
borderRadius: '30px',
|
|
3920
4115
|
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)' : ''
|
|
4116
|
+
justifyContent: 'center'
|
|
3923
4117
|
}
|
|
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", {
|
|
4118
|
+
}, 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
4119
|
style: {
|
|
3926
4120
|
height: '100%',
|
|
3927
4121
|
width: 'calc(100% - 90px)'
|
|
@@ -3954,7 +4148,7 @@ const Toast = ({
|
|
|
3954
4148
|
height: '18px',
|
|
3955
4149
|
cursor: 'pointer'
|
|
3956
4150
|
}
|
|
3957
|
-
}, /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
4151
|
+
}, closeIcon ? closeIcon : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
3958
4152
|
};
|
|
3959
4153
|
Toast.propTypes = {
|
|
3960
4154
|
timer: PropTypes.number,
|
|
@@ -3985,9 +4179,11 @@ const removeToast = ref => {
|
|
|
3985
4179
|
};
|
|
3986
4180
|
const createToast = ({
|
|
3987
4181
|
type,
|
|
4182
|
+
icon,
|
|
3988
4183
|
timer,
|
|
3989
4184
|
title,
|
|
3990
4185
|
position,
|
|
4186
|
+
iconClose,
|
|
3991
4187
|
description
|
|
3992
4188
|
}) => {
|
|
3993
4189
|
let toastParentBlock;
|
|
@@ -4002,11 +4198,13 @@ const createToast = ({
|
|
|
4002
4198
|
toastBlock.style.marginBottom = '20px';
|
|
4003
4199
|
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
4004
4200
|
type,
|
|
4201
|
+
icon,
|
|
4005
4202
|
timer,
|
|
4006
4203
|
title,
|
|
4007
4204
|
position,
|
|
4008
|
-
|
|
4009
|
-
description
|
|
4205
|
+
iconClose,
|
|
4206
|
+
description,
|
|
4207
|
+
removeToast
|
|
4010
4208
|
});
|
|
4011
4209
|
ReactDOM.render(newElem, toastBlock);
|
|
4012
4210
|
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
@@ -4025,66 +4223,81 @@ const createToast = ({
|
|
|
4025
4223
|
const toast = {
|
|
4026
4224
|
success: (title, props) => {
|
|
4027
4225
|
const {
|
|
4226
|
+
icon,
|
|
4028
4227
|
timer,
|
|
4029
4228
|
position,
|
|
4229
|
+
iconClose,
|
|
4030
4230
|
description
|
|
4031
4231
|
} = props || {};
|
|
4032
4232
|
createToast({
|
|
4033
4233
|
title,
|
|
4034
4234
|
type: 'success',
|
|
4035
|
-
timer: timer
|
|
4036
|
-
position: position
|
|
4037
|
-
description: description
|
|
4235
|
+
timer: timer ?? 5000,
|
|
4236
|
+
position: position ?? 'top-right',
|
|
4237
|
+
description: description ?? '',
|
|
4238
|
+
icon: icon ?? merge.TOASTER.icon.success,
|
|
4239
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4038
4240
|
});
|
|
4039
4241
|
},
|
|
4040
4242
|
info: (title, props) => {
|
|
4041
4243
|
const {
|
|
4244
|
+
icon,
|
|
4042
4245
|
timer,
|
|
4043
4246
|
position,
|
|
4247
|
+
iconClose,
|
|
4044
4248
|
description
|
|
4045
4249
|
} = props || {};
|
|
4046
4250
|
createToast({
|
|
4047
4251
|
title,
|
|
4048
4252
|
type: 'info',
|
|
4049
|
-
timer: timer
|
|
4050
|
-
position: position
|
|
4051
|
-
description: description
|
|
4253
|
+
timer: timer ?? 5000,
|
|
4254
|
+
position: position ?? 'top-right',
|
|
4255
|
+
description: description ?? '',
|
|
4256
|
+
icon: icon ?? merge.TOASTER.icon.info,
|
|
4257
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4052
4258
|
});
|
|
4053
4259
|
},
|
|
4054
4260
|
warn: (title, props) => {
|
|
4055
4261
|
const {
|
|
4262
|
+
icon,
|
|
4056
4263
|
timer,
|
|
4057
4264
|
position,
|
|
4265
|
+
iconClose,
|
|
4058
4266
|
description
|
|
4059
4267
|
} = props || {};
|
|
4060
4268
|
createToast({
|
|
4061
4269
|
title,
|
|
4062
4270
|
type: 'warn',
|
|
4063
|
-
timer: timer
|
|
4064
|
-
position: position
|
|
4065
|
-
description: description
|
|
4271
|
+
timer: timer ?? 5000,
|
|
4272
|
+
position: position ?? 'top-right',
|
|
4273
|
+
description: description ?? '',
|
|
4274
|
+
icon: icon ?? merge.TOASTER.icon.warn,
|
|
4275
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4066
4276
|
});
|
|
4067
4277
|
},
|
|
4068
4278
|
error: (title, props) => {
|
|
4069
4279
|
const {
|
|
4280
|
+
icon,
|
|
4070
4281
|
timer,
|
|
4071
4282
|
position,
|
|
4283
|
+
iconClose,
|
|
4072
4284
|
description
|
|
4073
4285
|
} = props || {};
|
|
4074
4286
|
createToast({
|
|
4075
4287
|
title,
|
|
4076
4288
|
type: 'error',
|
|
4077
|
-
timer: timer
|
|
4078
|
-
position: position
|
|
4079
|
-
description: description
|
|
4289
|
+
timer: timer ?? 5000,
|
|
4290
|
+
position: position ?? 'top-right',
|
|
4291
|
+
description: description ?? '',
|
|
4292
|
+
icon: icon ?? merge.TOASTER.icon.error,
|
|
4293
|
+
iconClose: iconClose ?? merge.TOASTER.icon.close
|
|
4080
4294
|
});
|
|
4081
4295
|
}
|
|
4082
4296
|
};
|
|
4083
4297
|
const Toaster = ({
|
|
4084
4298
|
className
|
|
4085
4299
|
}) => {
|
|
4086
|
-
const
|
|
4087
|
-
const classProps = classnames(className ? className : configStyles.TOASTER.className);
|
|
4300
|
+
const classProps = classnames(className ?? merge.TOASTER.className);
|
|
4088
4301
|
window.addEventListener('popstate', () => {
|
|
4089
4302
|
if (path !== window.location.href) {
|
|
4090
4303
|
if (!toastify) {
|
|
@@ -4138,7 +4351,9 @@ const Tooltip = ({
|
|
|
4138
4351
|
radius,
|
|
4139
4352
|
fontSize,
|
|
4140
4353
|
className,
|
|
4354
|
+
fontStyle,
|
|
4141
4355
|
fontFamily,
|
|
4356
|
+
fontWeight,
|
|
4142
4357
|
tooltipIcon,
|
|
4143
4358
|
tooltipWidth,
|
|
4144
4359
|
tooltipRadius,
|
|
@@ -4146,8 +4361,7 @@ const Tooltip = ({
|
|
|
4146
4361
|
tooltipBackgroundColor
|
|
4147
4362
|
}) => {
|
|
4148
4363
|
const tooltipRef = /*#__PURE__*/createRef(null);
|
|
4149
|
-
const
|
|
4150
|
-
const classProps = classnames(styles$4['tooltip-block'], className ? className : configStyles.TOOLTIP.className);
|
|
4364
|
+
const classProps = classnames(styles$4['tooltip-block'], className ?? merge.TOOLTIP.className);
|
|
4151
4365
|
const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
|
|
4152
4366
|
const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
|
|
4153
4367
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
@@ -4164,18 +4378,18 @@ const Tooltip = ({
|
|
|
4164
4378
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4165
4379
|
className: classProps,
|
|
4166
4380
|
style: {
|
|
4167
|
-
width: width
|
|
4168
|
-
height: height
|
|
4169
|
-
borderRadius: radius
|
|
4170
|
-
backgroundColor: backgroundColor
|
|
4381
|
+
width: width ?? merge.TOOLTIP.parent.width,
|
|
4382
|
+
height: height ?? merge.TOOLTIP.parent.height,
|
|
4383
|
+
borderRadius: radius ?? merge.TOOLTIP.parent.radius,
|
|
4384
|
+
backgroundColor: backgroundColor ?? merge.TOOLTIP.parent.colors.background
|
|
4171
4385
|
}
|
|
4172
4386
|
}, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
|
|
4173
4387
|
ref: tooltipRef,
|
|
4174
4388
|
className: `${styles$4['tooltip']}`,
|
|
4175
4389
|
style: {
|
|
4176
|
-
width: tooltipWidth
|
|
4177
|
-
borderRadius: tooltipRadius
|
|
4178
|
-
backgroundColor: tooltipBackgroundColor
|
|
4390
|
+
width: tooltipWidth ?? merge.TOOLTIP.width,
|
|
4391
|
+
borderRadius: tooltipRadius ?? merge.TOOLTIP.radius,
|
|
4392
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4179
4393
|
top: type === 'top' ? `calc(-${checkTooltipHeight + 7}px)` : type === 'bottom' ? 'calc(100% + 7px)' : type === 'left' || type === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : '0px',
|
|
4180
4394
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
4181
4395
|
}
|
|
@@ -4184,22 +4398,24 @@ const Tooltip = ({
|
|
|
4184
4398
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4185
4399
|
className: `${styles$4['tooltip-decor']}`,
|
|
4186
4400
|
style: {
|
|
4187
|
-
backgroundColor: tooltipBackgroundColor
|
|
4401
|
+
backgroundColor: tooltipBackgroundColor ?? merge.TOOLTIP.colors.background,
|
|
4188
4402
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
4189
4403
|
top: type === 'top' ? 'calc(100% + 5px)' : type === 'bottom' ? '-15px' : type === 'right' || type === 'left' ? 'calc(50% - 5px)' : '0px'
|
|
4190
4404
|
}
|
|
4191
4405
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
4192
4406
|
style: {
|
|
4193
|
-
color: color
|
|
4194
|
-
fontSize: fontSize
|
|
4195
|
-
|
|
4407
|
+
color: color ?? merge.TOOLTIP.color,
|
|
4408
|
+
fontSize: fontSize ?? merge.TOOLTIP.font.size,
|
|
4409
|
+
fontStyle: fontStyle ?? merge.TOOLTIP.font.style,
|
|
4410
|
+
fontFamily: fontFamily ?? merge.TOOLTIP.font.family,
|
|
4411
|
+
fontWeight: fontWeight ?? merge.TOOLTIP.font.weight
|
|
4196
4412
|
}
|
|
4197
4413
|
}, text))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
4198
4414
|
style: {
|
|
4199
4415
|
cursor: 'pointer'
|
|
4200
4416
|
},
|
|
4201
4417
|
onClick: handleShow
|
|
4202
|
-
}, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
4418
|
+
}, tooltipIcon ? tooltipIcon : merge.TOOLTIP.icon ? merge.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
4203
4419
|
};
|
|
4204
4420
|
Tooltip.propTypes = {
|
|
4205
4421
|
type: PropTypes.string,
|
|
@@ -4208,8 +4424,10 @@ Tooltip.propTypes = {
|
|
|
4208
4424
|
height: PropTypes.string,
|
|
4209
4425
|
radius: PropTypes.string,
|
|
4210
4426
|
fontSize: PropTypes.string,
|
|
4427
|
+
fontStyle: PropTypes.string,
|
|
4211
4428
|
className: PropTypes.string,
|
|
4212
4429
|
fontFamily: PropTypes.string,
|
|
4430
|
+
fontWeight: PropTypes.string,
|
|
4213
4431
|
tooltipWidth: PropTypes.string,
|
|
4214
4432
|
tooltipIcon: PropTypes.element,
|
|
4215
4433
|
tooltipRadius: PropTypes.string,
|
|
@@ -4264,17 +4482,19 @@ var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captc
|
|
|
4264
4482
|
styleInject(css_248z$5);
|
|
4265
4483
|
|
|
4266
4484
|
const Captcha = ({
|
|
4267
|
-
size,
|
|
4268
4485
|
color,
|
|
4269
4486
|
range,
|
|
4270
4487
|
label,
|
|
4488
|
+
getRange,
|
|
4271
4489
|
className,
|
|
4272
|
-
|
|
4490
|
+
fontSize,
|
|
4491
|
+
fontStyle,
|
|
4492
|
+
fontFamily,
|
|
4493
|
+
fontWeight
|
|
4273
4494
|
}) => {
|
|
4274
4495
|
const [rangeNumber, setRangeNumber] = useState(0);
|
|
4275
4496
|
const [rangeProgress, setRangeProgress] = useState(0);
|
|
4276
|
-
const
|
|
4277
|
-
const classProps = classnames(className ? className : configStyles.CAPTCHA.className);
|
|
4497
|
+
const classProps = classnames(className ?? merge.CAPTCHA.className);
|
|
4278
4498
|
const handleRange = e => {
|
|
4279
4499
|
const value = e.target.value;
|
|
4280
4500
|
getRange(value);
|
|
@@ -4300,8 +4520,11 @@ const Captcha = ({
|
|
|
4300
4520
|
className: classProps
|
|
4301
4521
|
}, label && /*#__PURE__*/React__default.createElement("p", {
|
|
4302
4522
|
style: {
|
|
4303
|
-
|
|
4304
|
-
|
|
4523
|
+
color: color ?? merge.CAPTCHA.label.color,
|
|
4524
|
+
fontSize: fontSize ?? merge.CAPTCHA.label.font.size,
|
|
4525
|
+
fontStyle: fontStyle ?? merge.CAPTCHA.label.font.style,
|
|
4526
|
+
fontFamily: fontFamily ?? merge.CAPTCHA.label.font.family,
|
|
4527
|
+
fontWeight: fontWeight ?? merge.CAPTCHA.label.font.weight
|
|
4305
4528
|
}
|
|
4306
4529
|
}, label), /*#__PURE__*/React__default.createElement("div", {
|
|
4307
4530
|
style: {
|
|
@@ -4394,9 +4617,8 @@ const Stepper = ({
|
|
|
4394
4617
|
activeSteps,
|
|
4395
4618
|
className
|
|
4396
4619
|
}) => {
|
|
4397
|
-
const configStyles = compereConfigs();
|
|
4398
4620
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4399
|
-
className: classnames(className
|
|
4621
|
+
className: classnames(className ?? merge.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`)
|
|
4400
4622
|
}, (() => {
|
|
4401
4623
|
let steppers = [];
|
|
4402
4624
|
for (let step = 1; step <= stepLength; step++) {
|
|
@@ -4427,13 +4649,14 @@ const Checkbox = ({
|
|
|
4427
4649
|
keyNames,
|
|
4428
4650
|
className,
|
|
4429
4651
|
direction,
|
|
4652
|
+
checkedColor,
|
|
4653
|
+
unCheckedColor,
|
|
4430
4654
|
checkedIcon,
|
|
4431
4655
|
unCheckedIcon,
|
|
4432
4656
|
labelMarginLeft,
|
|
4433
4657
|
checkBoxMarginBottom
|
|
4434
4658
|
}) => {
|
|
4435
|
-
const
|
|
4436
|
-
const classProps = classnames(className ? className : configStyles.CHECKBOX.className);
|
|
4659
|
+
const classProps = classnames(className ?? merge.CHECKBOX.className);
|
|
4437
4660
|
const [innerData, setInnerData] = useState([]);
|
|
4438
4661
|
const [innerKeyNames, setInnerKeyNames] = useState({
|
|
4439
4662
|
id: 'id',
|
|
@@ -4466,11 +4689,11 @@ const Checkbox = ({
|
|
|
4466
4689
|
useEffect(() => {
|
|
4467
4690
|
if (typeof keyNames === 'object' && keyNames !== null && !Array.isArray(keyNames)) {
|
|
4468
4691
|
setInnerKeyNames({
|
|
4469
|
-
id: keyNames.id
|
|
4470
|
-
label: keyNames.label
|
|
4471
|
-
checked: keyNames.checked
|
|
4472
|
-
disabled: keyNames.disabled
|
|
4473
|
-
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked
|
|
4692
|
+
id: keyNames.id ?? 'id',
|
|
4693
|
+
label: keyNames.label ?? 'label',
|
|
4694
|
+
checked: keyNames.checked ?? 'checked',
|
|
4695
|
+
disabled: keyNames.disabled ?? 'disabled',
|
|
4696
|
+
ignoreDisabledForChecked: keyNames.ignoreDisabledForChecked ?? 'ignoreDisabledForChecked'
|
|
4474
4697
|
});
|
|
4475
4698
|
}
|
|
4476
4699
|
}, [keyNames]);
|
|
@@ -4486,21 +4709,21 @@ const Checkbox = ({
|
|
|
4486
4709
|
key: `TUI_${index}_checkbox`,
|
|
4487
4710
|
style: {
|
|
4488
4711
|
width: 'fit-content',
|
|
4489
|
-
marginBottom: direction === 'vertical' ? checkBoxMarginBottom
|
|
4712
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ?? merge.CHECKBOX.marginBottom : '0px'
|
|
4490
4713
|
}
|
|
4491
4714
|
}, /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
4492
4715
|
data: item,
|
|
4493
4716
|
index: index,
|
|
4494
|
-
checkedColor: "#00236A",
|
|
4495
|
-
unCheckedColor: "#D1D1D1",
|
|
4496
|
-
checkedIcon: checkedIcon,
|
|
4497
|
-
unCheckedIcon: unCheckedIcon,
|
|
4498
4717
|
handleChecked: handleSendData,
|
|
4499
4718
|
label: item[innerKeyNames.label],
|
|
4500
4719
|
checked: item[innerKeyNames.checked],
|
|
4501
4720
|
disabled: item[innerKeyNames.disabled],
|
|
4502
4721
|
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
4503
|
-
labelMarginLeft: labelMarginLeft
|
|
4722
|
+
labelMarginLeft: labelMarginLeft ?? merge.CHECKBOX.label.marginLeft,
|
|
4723
|
+
checkedColor: checkedColor ?? merge.CHECKBOX.colors.checked,
|
|
4724
|
+
unCheckedColor: unCheckedColor ?? merge.CHECKBOX.colors.unChecked,
|
|
4725
|
+
checkedIcon: checkedIcon ?? merge.CHECKBOX.checkedIcon,
|
|
4726
|
+
unCheckedIcon: unCheckedIcon ?? merge.CHECKBOX.unCheckedIcon
|
|
4504
4727
|
}));
|
|
4505
4728
|
}));
|
|
4506
4729
|
};
|
|
@@ -4510,6 +4733,8 @@ Checkbox.propTypes = {
|
|
|
4510
4733
|
checkedIcon: PropTypes.element,
|
|
4511
4734
|
unCheckedIcon: PropTypes.element,
|
|
4512
4735
|
labelMarginLeft: PropTypes.string,
|
|
4736
|
+
checkedColor: PropTypes.string,
|
|
4737
|
+
unCheckedColor: PropTypes.string,
|
|
4513
4738
|
checkBoxMarginBottom: PropTypes.string,
|
|
4514
4739
|
direction: PropTypes.oneOf(Object.values(DirectionMode)),
|
|
4515
4740
|
data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
@@ -4527,6 +4752,9 @@ const PositionSide = {
|
|
|
4527
4752
|
};
|
|
4528
4753
|
const Textarea = ({
|
|
4529
4754
|
size,
|
|
4755
|
+
style,
|
|
4756
|
+
family,
|
|
4757
|
+
weight,
|
|
4530
4758
|
label,
|
|
4531
4759
|
width,
|
|
4532
4760
|
value,
|
|
@@ -4546,6 +4774,9 @@ const Textarea = ({
|
|
|
4546
4774
|
maxLength,
|
|
4547
4775
|
labelSize,
|
|
4548
4776
|
errorSize,
|
|
4777
|
+
errorStyle,
|
|
4778
|
+
errorWeight,
|
|
4779
|
+
errorFamily,
|
|
4549
4780
|
marginTop,
|
|
4550
4781
|
className,
|
|
4551
4782
|
labelColor,
|
|
@@ -4562,8 +4793,7 @@ const Textarea = ({
|
|
|
4562
4793
|
showCharacterCount,
|
|
4563
4794
|
characterCountPosition
|
|
4564
4795
|
}) => {
|
|
4565
|
-
const
|
|
4566
|
-
const classProps = classnames(className ? className : configStyles.TEXTAREA.className);
|
|
4796
|
+
const classProps = classnames(className ?? merge.TEXTAREA.className);
|
|
4567
4797
|
const [error, setError] = useState('');
|
|
4568
4798
|
const [isHover, setIsHover] = useState(false);
|
|
4569
4799
|
const [isFocus, setIsFocus] = useState(false);
|
|
@@ -4588,8 +4818,8 @@ const Textarea = ({
|
|
|
4588
4818
|
onChange(value.substr(0, maxLength));
|
|
4589
4819
|
}
|
|
4590
4820
|
} else {
|
|
4591
|
-
if (value.length >
|
|
4592
|
-
onChange(value.substr(0,
|
|
4821
|
+
if (value.length > merge.TEXTAREA.maxLength) {
|
|
4822
|
+
onChange(value.substr(0, merge.TEXTAREA.maxLength));
|
|
4593
4823
|
}
|
|
4594
4824
|
}
|
|
4595
4825
|
};
|
|
@@ -4612,7 +4842,7 @@ const Textarea = ({
|
|
|
4612
4842
|
}, [value, onChange, errorMessage]);
|
|
4613
4843
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4614
4844
|
style: {
|
|
4615
|
-
width: width
|
|
4845
|
+
width: width ?? merge.TEXTAREA.width
|
|
4616
4846
|
},
|
|
4617
4847
|
className: classProps
|
|
4618
4848
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4620,40 +4850,38 @@ const Textarea = ({
|
|
|
4620
4850
|
display: 'flex',
|
|
4621
4851
|
alignItems: 'center',
|
|
4622
4852
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
4623
|
-
|
|
4624
|
-
|
|
4853
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4854
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4855
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family,
|
|
4856
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4857
|
+
marginBottom: labelMarginBottom ?? merge.TEXTAREA.label.marginBottom
|
|
4625
4858
|
}
|
|
4626
4859
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
4627
4860
|
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
|
|
4861
|
+
display: labelDisplay ?? merge.TEXTAREA.label.display
|
|
4637
4862
|
}
|
|
4638
|
-
}, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
4863
|
+
}, 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
4864
|
style: {
|
|
4640
4865
|
width: '100%',
|
|
4641
4866
|
border: 'none',
|
|
4642
4867
|
outline: 'none',
|
|
4643
4868
|
overflow: 'auto',
|
|
4644
4869
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4645
|
-
fontSize: size
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4870
|
+
fontSize: size ?? merge.TEXTAREA.font.size,
|
|
4871
|
+
fontStyle: style ?? merge.TEXTAREA.font.style,
|
|
4872
|
+
fontFamily: family ?? merge.TEXTAREA.font.family,
|
|
4873
|
+
fontWeight: weight ?? merge.TEXTAREA.font.weight,
|
|
4874
|
+
height: height ?? merge.TEXTAREA.height,
|
|
4875
|
+
padding: padding ?? merge.TEXTAREA.padding,
|
|
4876
|
+
borderRadius: radius ?? merge.TEXTAREA.radius,
|
|
4877
|
+
minWidth: minWidth ?? merge.TEXTAREA.minWidth,
|
|
4878
|
+
maxWidth: maxWidth ?? merge.TEXTAREA.maxWidth,
|
|
4879
|
+
minHeight: minHeight ?? merge.TEXTAREA.minHeight,
|
|
4880
|
+
maxHeight: maxHeight ?? merge.TEXTAREA.maxHeight,
|
|
4881
|
+
boxSizing: boxSizing ?? merge.TEXTAREA.box.sizing,
|
|
4882
|
+
backgroundColor: backgroundColor ?? merge.TEXTAREA.colors.background,
|
|
4883
|
+
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,
|
|
4884
|
+
resize: resize ? resize : merge.TEXTAREA.resize
|
|
4657
4885
|
},
|
|
4658
4886
|
value: innerValue,
|
|
4659
4887
|
disabled: disabled,
|
|
@@ -4669,26 +4897,34 @@ const Textarea = ({
|
|
|
4669
4897
|
}
|
|
4670
4898
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4671
4899
|
style: {
|
|
4672
|
-
color: labelColor
|
|
4673
|
-
fontSize: labelSize
|
|
4900
|
+
color: labelColor ?? merge.TEXTAREA.label.color,
|
|
4901
|
+
fontSize: labelSize ?? merge.TEXTAREA.label.font.size,
|
|
4902
|
+
fontWeight: labelWeight ?? merge.TEXTAREA.label.font.weight,
|
|
4903
|
+
fontFamily: labelFontFamily ?? merge.TEXTAREA.label.font.family
|
|
4674
4904
|
}
|
|
4675
4905
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
4676
4906
|
style: {
|
|
4677
4907
|
clear: 'both',
|
|
4678
4908
|
wordBreak: 'break-all',
|
|
4679
|
-
maxWidth: width
|
|
4909
|
+
maxWidth: width ?? merge.TEXTAREA.width
|
|
4680
4910
|
}
|
|
4681
4911
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4682
4912
|
style: {
|
|
4683
4913
|
display: 'inline-block',
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4914
|
+
color: errorColor ?? merge.TEXTAREA.error.font.color,
|
|
4915
|
+
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4916
|
+
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4917
|
+
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
|
4918
|
+
fontFamily: errorFamily ?? merge.TEXTAREA.error.font.family,
|
|
4919
|
+
marginTop: marginTop ?? merge.TEXTAREA.error.marginTop
|
|
4687
4920
|
}
|
|
4688
4921
|
}, error)) : '');
|
|
4689
4922
|
};
|
|
4690
4923
|
Textarea.propTypes = {
|
|
4691
4924
|
size: PropTypes.string,
|
|
4925
|
+
style: PropTypes.string,
|
|
4926
|
+
family: PropTypes.string,
|
|
4927
|
+
weight: PropTypes.string,
|
|
4692
4928
|
label: PropTypes.string,
|
|
4693
4929
|
width: PropTypes.string,
|
|
4694
4930
|
height: PropTypes.string,
|
|
@@ -4707,6 +4943,9 @@ Textarea.propTypes = {
|
|
|
4707
4943
|
maxLength: PropTypes.number,
|
|
4708
4944
|
labelSize: PropTypes.string,
|
|
4709
4945
|
errorSize: PropTypes.string,
|
|
4946
|
+
errorStyle: PropTypes.string,
|
|
4947
|
+
errorWeight: PropTypes.string,
|
|
4948
|
+
errorFamily: PropTypes.string,
|
|
4710
4949
|
className: PropTypes.string,
|
|
4711
4950
|
labelColor: PropTypes.string,
|
|
4712
4951
|
errorColor: PropTypes.string,
|
|
@@ -4763,8 +5002,7 @@ const Typography = ({
|
|
|
4763
5002
|
backgroundColor,
|
|
4764
5003
|
...props
|
|
4765
5004
|
}) => {
|
|
4766
|
-
const
|
|
4767
|
-
const classProps = classnames(className ? className : configStyles.TYPOGRAPHY.className);
|
|
5005
|
+
const classProps = classnames(className ?? merge.TYPOGRAPHY.className);
|
|
4768
5006
|
const [isHover, setIsHover] = useState(false);
|
|
4769
5007
|
const [validVariant, setValidVariant] = useState(false);
|
|
4770
5008
|
const handleMouseEnter = () => {
|
|
@@ -4775,20 +5013,20 @@ const Typography = ({
|
|
|
4775
5013
|
};
|
|
4776
5014
|
const tagT = /*#__PURE__*/React__default.createElement(variant, {
|
|
4777
5015
|
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 :
|
|
5016
|
+
border: border ?? merge.TYPOGRAPHY.border,
|
|
5017
|
+
cursor: cursor ?? merge.TYPOGRAPHY.cursor,
|
|
5018
|
+
borderRadius: radius ?? merge.TYPOGRAPHY.radius,
|
|
5019
|
+
fontSize: size ?? merge.TYPOGRAPHY.font['size' + variant],
|
|
5020
|
+
fontWeight: weight ?? merge.TYPOGRAPHY.font['weight' + variant],
|
|
5021
|
+
textShadow: textShadow ?? merge.TYPOGRAPHY.text['shadow' + variant],
|
|
5022
|
+
textAlign: textAlign ?? merge.TYPOGRAPHY.text['align' + variant],
|
|
5023
|
+
fontStyle: fontStyle ?? merge.TYPOGRAPHY.font['style' + variant],
|
|
5024
|
+
lineHeight: lineHeight ?? merge.TYPOGRAPHY.text['lineHeight' + variant],
|
|
5025
|
+
fontFamily: fontFamily ?? merge.TYPOGRAPHY.font['family' + variant],
|
|
5026
|
+
textTransform: textTransform ?? merge.TYPOGRAPHY.text['transform' + variant],
|
|
5027
|
+
textDecoration: textDecoration ?? merge.TYPOGRAPHY.text['decoration' + variant],
|
|
5028
|
+
backgroundColor: backgroundColor ?? merge.TYPOGRAPHY.colors['background' + variant],
|
|
5029
|
+
color: isHover ? colorHover ? colorHover : color ? color : merge.TYPOGRAPHY.colors[variant] : color ? color : merge.TYPOGRAPHY.colors[variant]
|
|
4792
5030
|
},
|
|
4793
5031
|
...props,
|
|
4794
5032
|
className: classProps,
|
|
@@ -4918,7 +5156,6 @@ const Pagination = ({
|
|
|
4918
5156
|
totalCount,
|
|
4919
5157
|
currentPage
|
|
4920
5158
|
}) => {
|
|
4921
|
-
const configStyles = compereConfigs();
|
|
4922
5159
|
const [inpVal, setInpVal] = useState('');
|
|
4923
5160
|
const [error, setError] = useState(false);
|
|
4924
5161
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
@@ -4947,7 +5184,7 @@ const Pagination = ({
|
|
|
4947
5184
|
}
|
|
4948
5185
|
const classProps = classnames(
|
|
4949
5186
|
// TODO: check and remove pagination-bar-rem class
|
|
4950
|
-
styles$1.list, className
|
|
5187
|
+
styles$1.list, className ?? merge.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`);
|
|
4951
5188
|
const onNext = () => {
|
|
4952
5189
|
onPageChange(currentPageNumber + 1);
|
|
4953
5190
|
};
|
|
@@ -5091,7 +5328,11 @@ const Autocomplete = ({
|
|
|
5091
5328
|
selected,
|
|
5092
5329
|
className,
|
|
5093
5330
|
errorSize,
|
|
5331
|
+
errorStyle,
|
|
5332
|
+
errorWeight,
|
|
5333
|
+
errorFamily,
|
|
5094
5334
|
labelSize,
|
|
5335
|
+
labelStyle,
|
|
5095
5336
|
marginTop,
|
|
5096
5337
|
errorColor,
|
|
5097
5338
|
labelColor,
|
|
@@ -5103,6 +5344,8 @@ const Autocomplete = ({
|
|
|
5103
5344
|
labelDisplay,
|
|
5104
5345
|
contentDisplay,
|
|
5105
5346
|
contentTopSize,
|
|
5347
|
+
contentTopStyle,
|
|
5348
|
+
contentTopFamily,
|
|
5106
5349
|
contentPosition,
|
|
5107
5350
|
contentTopColor,
|
|
5108
5351
|
labelLineHeight,
|
|
@@ -5165,15 +5408,14 @@ const Autocomplete = ({
|
|
|
5165
5408
|
const [innerError, setInnerError] = useState('');
|
|
5166
5409
|
const [innerValue, setInnerValue] = useState('');
|
|
5167
5410
|
const [innerOptions, setInnerOptions] = useState([]);
|
|
5168
|
-
const
|
|
5169
|
-
const classProps = classnames(className ? className : configStyles.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5411
|
+
const classProps = classnames(className ?? merge.AUTOCOMPLETE.className, styles['auto-complete']);
|
|
5170
5412
|
const showOption = keyframes`
|
|
5171
5413
|
100% {
|
|
5172
5414
|
max-height: 400px;
|
|
5173
5415
|
}
|
|
5174
5416
|
`;
|
|
5175
5417
|
const animation = () => css`
|
|
5176
|
-
${showOption} ${showOptionDuration
|
|
5418
|
+
${showOption} ${showOptionDuration ?? merge.AUTOCOMPLETE.showOptionDuration} linear forwards
|
|
5177
5419
|
`;
|
|
5178
5420
|
const handleMouseEnter = () => {
|
|
5179
5421
|
setIsHover(true);
|
|
@@ -5182,12 +5424,12 @@ const Autocomplete = ({
|
|
|
5182
5424
|
setIsHover(false);
|
|
5183
5425
|
};
|
|
5184
5426
|
const handleRowMouseEnter = e => {
|
|
5185
|
-
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor :
|
|
5186
|
-
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor :
|
|
5427
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : merge.AUTOCOMPLETE.contentBottom.row.colors.hover;
|
|
5428
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover;
|
|
5187
5429
|
};
|
|
5188
5430
|
const handleRowMouseLeave = e => {
|
|
5189
|
-
e.target.style.color = contentBottomRowColor ? contentBottomRowColor :
|
|
5190
|
-
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor :
|
|
5431
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color;
|
|
5432
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background;
|
|
5191
5433
|
};
|
|
5192
5434
|
const handleFocus = () => {
|
|
5193
5435
|
setIsFocus(true);
|
|
@@ -5206,11 +5448,6 @@ const Autocomplete = ({
|
|
|
5206
5448
|
name: value,
|
|
5207
5449
|
id: currentId
|
|
5208
5450
|
});
|
|
5209
|
-
} else {
|
|
5210
|
-
change({
|
|
5211
|
-
name: '',
|
|
5212
|
-
id: ''
|
|
5213
|
-
});
|
|
5214
5451
|
}
|
|
5215
5452
|
};
|
|
5216
5453
|
const handleClick = selectedValue => {
|
|
@@ -5219,28 +5456,28 @@ const Autocomplete = ({
|
|
|
5219
5456
|
setInnerValue(selectedValue[keyNames.name]);
|
|
5220
5457
|
getItem(selectedValue);
|
|
5221
5458
|
};
|
|
5222
|
-
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
5459
|
+
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 && innerValue.length >= searchCount ? /*#__PURE__*/React__default.createElement("div", {
|
|
5223
5460
|
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' :
|
|
5461
|
+
left: contentBottomLeft ?? merge.AUTOCOMPLETE.contentBottom.left,
|
|
5462
|
+
width: contentBottomWidth ?? merge.AUTOCOMPLETE.contentBottom.width,
|
|
5463
|
+
zIndex: contentBottomZindex ?? merge.AUTOCOMPLETE.contentBottom.zIndex,
|
|
5464
|
+
borderRadius: contentBottomRadius ?? merge.AUTOCOMPLETE.contentBottom.radius,
|
|
5465
|
+
maxWidth: contentBottomMaxWidth ?? merge.AUTOCOMPLETE.contentBottom.maxWidth,
|
|
5466
|
+
overflow: contentBottomOverflow ?? merge.AUTOCOMPLETE.contentBottom.overflow,
|
|
5467
|
+
position: contentBottomPosition ?? merge.AUTOCOMPLETE.contentBottom.position,
|
|
5468
|
+
minHeight: contentBottomMinHeight ?? merge.AUTOCOMPLETE.contentBottom.minHeight,
|
|
5469
|
+
boxShadow: contentBottomBoxShadow ?? merge.AUTOCOMPLETE.contentBottom.box.shadow,
|
|
5470
|
+
backgroundColor: contentBottomBackgroundColor ?? merge.AUTOCOMPLETE.contentBottom.colors.background,
|
|
5471
|
+
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
5472
|
animation
|
|
5236
5473
|
}
|
|
5237
5474
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5238
5475
|
style: {
|
|
5239
|
-
display: contentBottomInnerDisplay ? contentBottomInnerDisplay :
|
|
5240
|
-
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY :
|
|
5241
|
-
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX :
|
|
5242
|
-
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight :
|
|
5243
|
-
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection :
|
|
5476
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : merge.AUTOCOMPLETE.contentBottom.inner.display,
|
|
5477
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : merge.AUTOCOMPLETE.contentBottom.inner.overflowY,
|
|
5478
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : merge.AUTOCOMPLETE.contentBottom.inner.overflowX,
|
|
5479
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : merge.AUTOCOMPLETE.contentBottom.inner.maxHeight,
|
|
5480
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : merge.AUTOCOMPLETE.contentBottom.inner.direction
|
|
5244
5481
|
}
|
|
5245
5482
|
}, innerOptions.map(item => {
|
|
5246
5483
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -5250,34 +5487,37 @@ const Autocomplete = ({
|
|
|
5250
5487
|
onClick: () => handleClick(item),
|
|
5251
5488
|
style: {
|
|
5252
5489
|
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 :
|
|
5490
|
+
color: contentBottomRowColor ? contentBottomRowColor : merge.AUTOCOMPLETE.contentBottom.row.color,
|
|
5491
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5492
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : merge.AUTOCOMPLETE.contentBottom.row.cursor,
|
|
5493
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : merge.AUTOCOMPLETE.contentBottom.row.display,
|
|
5494
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : merge.AUTOCOMPLETE.contentBottom.row.padding,
|
|
5495
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : merge.AUTOCOMPLETE.contentBottom.row.font.size,
|
|
5496
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : merge.AUTOCOMPLETE.contentBottom.box.sizing,
|
|
5497
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : merge.AUTOCOMPLETE.contentBottom.row.font.weight,
|
|
5498
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5499
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : merge.AUTOCOMPLETE.contentBottom.row.alignItems,
|
|
5500
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : merge.AUTOCOMPLETE.contentBottom.row.transition,
|
|
5501
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : merge.AUTOCOMPLETE.contentBottom.row.marginBottom,
|
|
5502
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : merge.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
5266
5503
|
}
|
|
5267
5504
|
}, item[keyNames.name]);
|
|
5268
|
-
}))) :
|
|
5505
|
+
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
5269
5506
|
style: {
|
|
5270
5507
|
position: 'absolute',
|
|
5271
5508
|
zIndex: '1',
|
|
5272
|
-
color: errorColor
|
|
5273
|
-
fontSize: errorSize
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5509
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5510
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5511
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5512
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5513
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5514
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5515
|
+
padding: innerErrorPadding ?? merge.AUTOCOMPLETE.innerError.padding,
|
|
5516
|
+
height: contentBottomRowHeight ?? merge.AUTOCOMPLETE.contentBottom.row.height,
|
|
5517
|
+
lineHeight: contentBottomRowLineHeight ?? merge.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
5518
|
+
backgroundColor: innerErrorBackgroundColor ?? merge.AUTOCOMPLETE.innerError.colors.background
|
|
5519
|
+
}
|
|
5520
|
+
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
5281
5521
|
useEffect(() => {
|
|
5282
5522
|
if (options === undefined) {
|
|
5283
5523
|
alert('Please add options prop');
|
|
@@ -5313,22 +5553,23 @@ const Autocomplete = ({
|
|
|
5313
5553
|
className: classProps
|
|
5314
5554
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5315
5555
|
style: {
|
|
5316
|
-
color: labelColor
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5556
|
+
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
5557
|
+
display: labelDisplay ?? merge.AUTOCOMPLETE.label.display,
|
|
5558
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5559
|
+
fontSize: labelSize ?? merge.AUTOCOMPLETE.label.font.size,
|
|
5560
|
+
fontStyle: labelStyle ?? merge.AUTOCOMPLETE.label.font.style,
|
|
5561
|
+
fontWeight: labelWeight ?? merge.AUTOCOMPLETE.label.font.weight,
|
|
5562
|
+
fontFamily: labelFontFamily ?? merge.AUTOCOMPLETE.label.font.family,
|
|
5563
|
+
lineHeight: labelLineHeight ?? merge.AUTOCOMPLETE.label.lineHeight,
|
|
5564
|
+
marginBottom: labelMarginBottom ?? merge.AUTOCOMPLETE.label.marginBottom,
|
|
5565
|
+
textTransform: labelTextTransform ?? merge.AUTOCOMPLETE.label.textTransform
|
|
5325
5566
|
}
|
|
5326
5567
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
5327
5568
|
style: {
|
|
5328
|
-
display: contentDisplay
|
|
5329
|
-
position: contentPosition
|
|
5330
|
-
|
|
5331
|
-
|
|
5569
|
+
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5570
|
+
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5571
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth,
|
|
5572
|
+
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5332
5573
|
}
|
|
5333
5574
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
5334
5575
|
id: id,
|
|
@@ -5340,35 +5581,40 @@ const Autocomplete = ({
|
|
|
5340
5581
|
onInput: handleChange,
|
|
5341
5582
|
onMouseEnter: handleMouseEnter,
|
|
5342
5583
|
onMouseLeave: handleMouseLeave,
|
|
5343
|
-
placeholder: placeHolder
|
|
5344
|
-
autoComplete: autoComplete
|
|
5584
|
+
placeholder: placeHolder ?? '',
|
|
5585
|
+
autoComplete: autoComplete ?? merge.AUTOCOMPLETE.autoComplete,
|
|
5345
5586
|
style: {
|
|
5346
5587
|
border: 'none',
|
|
5347
5588
|
outline: 'none',
|
|
5348
5589
|
maxWidth: '100%',
|
|
5349
5590
|
transition: 'all 240ms',
|
|
5350
5591
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5351
|
-
color: contentTopColor
|
|
5352
|
-
fontSize: contentTopSize
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5592
|
+
color: contentTopColor ?? merge.AUTOCOMPLETE.color,
|
|
5593
|
+
fontSize: contentTopSize ?? merge.AUTOCOMPLETE.font.size,
|
|
5594
|
+
fontStyle: contentTopStyle ?? merge.AUTOCOMPLETE.font.style,
|
|
5595
|
+
fontFamily: contentTopFamily ?? merge.AUTOCOMPLETE.font.family,
|
|
5596
|
+
fontWeight: contentTopWeight ?? merge.AUTOCOMPLETE.font.weight,
|
|
5597
|
+
backgroundColor: disabled && (backgroundDisableColor ?? merge.AUTOCOMPLETE.colors.backgroundDisable),
|
|
5598
|
+
height: contentTopHeight ?? merge.AUTOCOMPLETE.height,
|
|
5599
|
+
padding: contentTopPadding ?? merge.AUTOCOMPLETE.padding,
|
|
5600
|
+
display: contentTopDisplay ?? merge.AUTOCOMPLETE.display,
|
|
5601
|
+
borderRadius: contentTopRadius ?? merge.AUTOCOMPLETE.radius,
|
|
5602
|
+
boxSizing: contentTopBoxSizing ?? merge.AUTOCOMPLETE.box.sizing,
|
|
5603
|
+
lineHeight: contentTopLineHeight ?? merge.AUTOCOMPLETE.lineHeight,
|
|
5604
|
+
flexDirection: contentTopDirection ?? merge.AUTOCOMPLETE.direction,
|
|
5605
|
+
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
5606
|
}
|
|
5364
5607
|
}, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
|
|
5365
5608
|
style: {
|
|
5366
5609
|
left: '0px',
|
|
5367
5610
|
position: 'absolute',
|
|
5368
|
-
color: errorColor
|
|
5369
|
-
fontSize: errorSize
|
|
5370
|
-
|
|
5371
|
-
|
|
5611
|
+
color: errorColor ?? merge.AUTOCOMPLETE.error.color,
|
|
5612
|
+
fontSize: errorSize ?? merge.AUTOCOMPLETE.error.font.size,
|
|
5613
|
+
fontStyle: errorStyle ?? merge.AUTOCOMPLETE.error.font.style,
|
|
5614
|
+
fontWeight: errorWeight ?? merge.AUTOCOMPLETE.error.font.weight,
|
|
5615
|
+
fontFamily: errorFamily ?? merge.AUTOCOMPLETE.error.font.family,
|
|
5616
|
+
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${merge.AUTOCOMPLETE.error.marginTop})`,
|
|
5617
|
+
maxWidth: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5372
5618
|
}
|
|
5373
5619
|
}, innerError) : '', optionList));
|
|
5374
5620
|
};
|
|
@@ -5380,8 +5626,12 @@ Autocomplete.propTypes = {
|
|
|
5380
5626
|
selected: PropTypes.object,
|
|
5381
5627
|
className: PropTypes.string,
|
|
5382
5628
|
errorSize: PropTypes.string,
|
|
5629
|
+
errorStyle: PropTypes.string,
|
|
5630
|
+
errorWeight: PropTypes.string,
|
|
5631
|
+
errorFamily: PropTypes.string,
|
|
5383
5632
|
marginTop: PropTypes.string,
|
|
5384
5633
|
labelSize: PropTypes.string,
|
|
5634
|
+
labelStyle: PropTypes.string,
|
|
5385
5635
|
errorColor: PropTypes.string,
|
|
5386
5636
|
labelColor: PropTypes.string,
|
|
5387
5637
|
searchCount: PropTypes.number,
|
|
@@ -5392,6 +5642,8 @@ Autocomplete.propTypes = {
|
|
|
5392
5642
|
autoComplete: PropTypes.string,
|
|
5393
5643
|
contentDisplay: PropTypes.string,
|
|
5394
5644
|
contentTopSize: PropTypes.string,
|
|
5645
|
+
contentTopStyle: PropTypes.string,
|
|
5646
|
+
contentTopFamily: PropTypes.string,
|
|
5395
5647
|
contentPosition: PropTypes.string,
|
|
5396
5648
|
labelLineHeight: PropTypes.string,
|
|
5397
5649
|
contentTopColor: PropTypes.string,
|
|
@@ -5451,7 +5703,11 @@ Autocomplete.propTypes = {
|
|
|
5451
5703
|
};
|
|
5452
5704
|
Autocomplete.defaultProps = {
|
|
5453
5705
|
searchCount: 3,
|
|
5454
|
-
disabled: false
|
|
5706
|
+
disabled: false,
|
|
5707
|
+
keyNames: {
|
|
5708
|
+
name: 'name',
|
|
5709
|
+
id: 'id'
|
|
5710
|
+
}
|
|
5455
5711
|
};
|
|
5456
5712
|
|
|
5457
5713
|
export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|