@xaypay/tui 0.2.24 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +675 -169
- package/dist/index.js +1567 -1072
- package/package.json +1 -1
- package/tui.config.js +57 -5
package/dist/index.es.js
CHANGED
|
@@ -48,7 +48,7 @@ var native = {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
function v4(options, buf, offset) {
|
|
51
|
-
if (native.randomUUID &&
|
|
51
|
+
if (native.randomUUID && true && !options) {
|
|
52
52
|
return native.randomUUID();
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -58,16 +58,6 @@ function v4(options, buf, offset) {
|
|
|
58
58
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
59
59
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
60
60
|
|
|
61
|
-
if (buf) {
|
|
62
|
-
offset = offset || 0;
|
|
63
|
-
|
|
64
|
-
for (let i = 0; i < 16; ++i) {
|
|
65
|
-
buf[offset + i] = rnds[i];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return buf;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
61
|
return unsafeStringify(rnds);
|
|
72
62
|
}
|
|
73
63
|
|
|
@@ -497,19 +487,22 @@ var img$3 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16
|
|
|
497
487
|
var img$2 = "data:image/svg+xml,%3csvg width='16' height='2' viewBox='0 0 16 2' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1 1H15' stroke='%23009B8B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
498
488
|
|
|
499
489
|
// import React from 'react'
|
|
490
|
+
// import info from './src/assetsTMP/info.png';
|
|
491
|
+
// import error from './src/assetsTMP/error.png';
|
|
492
|
+
// import close from './src/assetsTMP/close.svg';
|
|
493
|
+
// import warn from './src/assetsTMP/warning.png';
|
|
494
|
+
// import success from './src/assetsTMP/success.png';
|
|
500
495
|
const boxSizing = 'border-box';
|
|
501
496
|
const fontStyle = 'normal';
|
|
502
497
|
const fontFamily = 'Arial';
|
|
503
498
|
const fontWeight = 500;
|
|
504
499
|
const transparent = 'transparent';
|
|
505
500
|
const presetColors = {
|
|
506
|
-
info: '#F24C4C',
|
|
507
501
|
dark: '#3C393E',
|
|
508
502
|
light: '#EEEEEE',
|
|
509
503
|
extraLight: '#FBFBFB',
|
|
510
504
|
danger: '#EE0000',
|
|
511
505
|
success: '#0DA574',
|
|
512
|
-
warning: '#FECD29',
|
|
513
506
|
secondary: '#D1D1D1',
|
|
514
507
|
primary: '#051942',
|
|
515
508
|
primarySecond: '#00236A'
|
|
@@ -595,7 +588,7 @@ var packageResult = {
|
|
|
595
588
|
...fontObject
|
|
596
589
|
},
|
|
597
590
|
label: {
|
|
598
|
-
|
|
591
|
+
useTooltip: false,
|
|
599
592
|
color: presetColors.dark,
|
|
600
593
|
display: 'block',
|
|
601
594
|
lineHeight: '22px',
|
|
@@ -603,6 +596,15 @@ var packageResult = {
|
|
|
603
596
|
marginBottom: '6px',
|
|
604
597
|
font: {
|
|
605
598
|
...fontObject
|
|
599
|
+
},
|
|
600
|
+
tooltip: {
|
|
601
|
+
color: '#fff',
|
|
602
|
+
padding: '12px',
|
|
603
|
+
borderRadius: '8px',
|
|
604
|
+
font: {
|
|
605
|
+
...fontObject
|
|
606
|
+
},
|
|
607
|
+
backgroundColor: '#000'
|
|
606
608
|
}
|
|
607
609
|
},
|
|
608
610
|
error: {
|
|
@@ -633,6 +635,10 @@ var packageResult = {
|
|
|
633
635
|
hover: presetColors.dark
|
|
634
636
|
}
|
|
635
637
|
}
|
|
638
|
+
},
|
|
639
|
+
icon: {
|
|
640
|
+
// comment here for example,
|
|
641
|
+
// required: React.createElement(SvgChecked, { fill: 'green' }),
|
|
636
642
|
}
|
|
637
643
|
},
|
|
638
644
|
// default properties for <Tooltip /> component
|
|
@@ -775,6 +781,7 @@ var packageResult = {
|
|
|
775
781
|
shadowHover: `0 0 0 2px ${presetColors.dark}` // like border
|
|
776
782
|
},
|
|
777
783
|
label: {
|
|
784
|
+
useTooltip: false,
|
|
778
785
|
color: presetColors.dark,
|
|
779
786
|
display: 'block',
|
|
780
787
|
lineHeight: '22px',
|
|
@@ -782,6 +789,15 @@ var packageResult = {
|
|
|
782
789
|
textTransform: 'none',
|
|
783
790
|
font: {
|
|
784
791
|
...fontObject
|
|
792
|
+
},
|
|
793
|
+
tooltip: {
|
|
794
|
+
color: '#fff',
|
|
795
|
+
padding: '12px',
|
|
796
|
+
borderRadius: '8px',
|
|
797
|
+
font: {
|
|
798
|
+
...fontObject
|
|
799
|
+
},
|
|
800
|
+
backgroundColor: '#000'
|
|
785
801
|
}
|
|
786
802
|
},
|
|
787
803
|
selected: {
|
|
@@ -842,6 +858,10 @@ var packageResult = {
|
|
|
842
858
|
font: {
|
|
843
859
|
...fontObject
|
|
844
860
|
}
|
|
861
|
+
},
|
|
862
|
+
icon: {
|
|
863
|
+
// comment here for example,
|
|
864
|
+
// required: React.createElement(SvgChecked, { fill: 'green' }),
|
|
845
865
|
}
|
|
846
866
|
},
|
|
847
867
|
// default properties for <Textarea /> component
|
|
@@ -873,11 +893,21 @@ var packageResult = {
|
|
|
873
893
|
background: 'white'
|
|
874
894
|
},
|
|
875
895
|
label: {
|
|
896
|
+
useTooltip: false,
|
|
876
897
|
color: presetColors.dark,
|
|
877
898
|
display: 'block',
|
|
878
899
|
marginBottom: '10px',
|
|
879
900
|
font: {
|
|
880
901
|
...fontObject
|
|
902
|
+
},
|
|
903
|
+
tooltip: {
|
|
904
|
+
color: '#fff',
|
|
905
|
+
padding: '12px',
|
|
906
|
+
borderRadius: '8px',
|
|
907
|
+
font: {
|
|
908
|
+
...fontObject
|
|
909
|
+
},
|
|
910
|
+
backgroundColor: '#000'
|
|
881
911
|
}
|
|
882
912
|
},
|
|
883
913
|
font: {
|
|
@@ -892,6 +922,10 @@ var packageResult = {
|
|
|
892
922
|
font: {
|
|
893
923
|
...fontObject
|
|
894
924
|
}
|
|
925
|
+
},
|
|
926
|
+
icon: {
|
|
927
|
+
// comment here for example,
|
|
928
|
+
// required: React.createElement(SvgChecked, { fill: 'green' }),
|
|
895
929
|
}
|
|
896
930
|
},
|
|
897
931
|
// default properties for <NewAutocomplete /> component
|
|
@@ -928,6 +962,7 @@ var packageResult = {
|
|
|
928
962
|
backgroundDisable: presetColors.secondary
|
|
929
963
|
},
|
|
930
964
|
label: {
|
|
965
|
+
useTooltip: false,
|
|
931
966
|
color: presetColors.dark,
|
|
932
967
|
display: 'block',
|
|
933
968
|
lineHeight: '22px',
|
|
@@ -935,6 +970,15 @@ var packageResult = {
|
|
|
935
970
|
textTransform: 'none',
|
|
936
971
|
font: {
|
|
937
972
|
...fontObject
|
|
973
|
+
},
|
|
974
|
+
tooltip: {
|
|
975
|
+
color: '#fff',
|
|
976
|
+
padding: '12px',
|
|
977
|
+
borderRadius: '8px',
|
|
978
|
+
font: {
|
|
979
|
+
...fontObject
|
|
980
|
+
},
|
|
981
|
+
backgroundColor: '#000'
|
|
938
982
|
}
|
|
939
983
|
},
|
|
940
984
|
contentBottom: {
|
|
@@ -1025,6 +1069,7 @@ var packageResult = {
|
|
|
1025
1069
|
sizeText: 'Առավելագույնը',
|
|
1026
1070
|
timeForRemoveError: 4000,
|
|
1027
1071
|
extentionsRowMarginTop: '40px',
|
|
1072
|
+
extentionsTextColor: 'black',
|
|
1028
1073
|
border: {
|
|
1029
1074
|
width: '2px',
|
|
1030
1075
|
style: 'dashed',
|
|
@@ -1038,6 +1083,7 @@ var packageResult = {
|
|
|
1038
1083
|
backgroundHidden: 'rgba(60, 57, 62, 0.4)'
|
|
1039
1084
|
},
|
|
1040
1085
|
label: {
|
|
1086
|
+
useTooltip: false,
|
|
1041
1087
|
color: '#4A4A4D',
|
|
1042
1088
|
font: {
|
|
1043
1089
|
...fontObject
|
|
@@ -1764,9 +1810,9 @@ function styleInject(css, ref) {
|
|
|
1764
1810
|
}
|
|
1765
1811
|
}
|
|
1766
1812
|
|
|
1767
|
-
var css_248z$
|
|
1768
|
-
var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW"
|
|
1769
|
-
styleInject(css_248z$
|
|
1813
|
+
var css_248z$c = ".file-module_small-file-component__nlpcW>svg{max-height:77%!important}";
|
|
1814
|
+
var styles$b = {"small-file-component":"file-module_small-file-component__nlpcW"};
|
|
1815
|
+
styleInject(css_248z$c);
|
|
1770
1816
|
|
|
1771
1817
|
// eslint-disable-next-line react/display-name
|
|
1772
1818
|
const File = /*#__PURE__*/forwardRef(({
|
|
@@ -1774,7 +1820,6 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1774
1820
|
size,
|
|
1775
1821
|
name,
|
|
1776
1822
|
color,
|
|
1777
|
-
label,
|
|
1778
1823
|
style,
|
|
1779
1824
|
weight,
|
|
1780
1825
|
family,
|
|
@@ -1794,10 +1839,13 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1794
1839
|
errorStyle,
|
|
1795
1840
|
errorWeight,
|
|
1796
1841
|
errorFamily,
|
|
1842
|
+
label,
|
|
1797
1843
|
labelSize,
|
|
1844
|
+
labelColor,
|
|
1798
1845
|
labelStyle,
|
|
1799
1846
|
labelWeight,
|
|
1800
1847
|
labelFamily,
|
|
1848
|
+
useLabelTooltip,
|
|
1801
1849
|
labelTooltipColor,
|
|
1802
1850
|
labelTooltipPadding,
|
|
1803
1851
|
labelTooltipFontSize,
|
|
@@ -1807,7 +1855,6 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1807
1855
|
labelTooltipBorderRadius,
|
|
1808
1856
|
labelTooltipBackgroundColor,
|
|
1809
1857
|
removeFile,
|
|
1810
|
-
labelColor,
|
|
1811
1858
|
errorColor,
|
|
1812
1859
|
filesArray,
|
|
1813
1860
|
componentId,
|
|
@@ -1876,6 +1923,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1876
1923
|
maxCHoosenLengthErrorHideTime,
|
|
1877
1924
|
textAlignLeftInSmallComponent,
|
|
1878
1925
|
showPreviewIconInSmallComponent,
|
|
1926
|
+
extentionsTextColor,
|
|
1879
1927
|
maxSize = 10,
|
|
1880
1928
|
preview = true,
|
|
1881
1929
|
timeForRemoveError = 5000,
|
|
@@ -1883,11 +1931,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1883
1931
|
}, ref) => {
|
|
1884
1932
|
const inpRef = useRef(null);
|
|
1885
1933
|
const labelRef = useRef(null);
|
|
1886
|
-
const
|
|
1934
|
+
const parentRef = useRef(null);
|
|
1887
1935
|
const memoizedItems = useMemo(() => filesArray, [filesArray]);
|
|
1888
1936
|
const [error, setError] = useState('');
|
|
1889
|
-
const [isHover, setIsHover] = useState(false);
|
|
1890
1937
|
const [removeID, setRemoveID] = useState('');
|
|
1938
|
+
const [isHover, setIsHover] = useState(false);
|
|
1891
1939
|
const [classProps, setClassProps] = useState({});
|
|
1892
1940
|
const [singleFile, setSingleFile] = useState(null);
|
|
1893
1941
|
const [configStyles, setConfigStyles] = useState({});
|
|
@@ -2182,7 +2230,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2182
2230
|
event.preventDefault();
|
|
2183
2231
|
setRemoveID(() => v4());
|
|
2184
2232
|
if (labelRef.current) {
|
|
2185
|
-
const parentElem =
|
|
2233
|
+
const parentElem = parentRef.current.getBoundingClientRect();
|
|
2186
2234
|
const rect = labelRef.current.getBoundingClientRect();
|
|
2187
2235
|
const top = rect.top;
|
|
2188
2236
|
const left = rect.left;
|
|
@@ -2315,9 +2363,8 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2315
2363
|
}
|
|
2316
2364
|
};
|
|
2317
2365
|
}, []);
|
|
2318
|
-
console.log(image, ' - - - -image');
|
|
2319
2366
|
return configStyles.FILE && /*#__PURE__*/React__default.createElement("div", {
|
|
2320
|
-
ref:
|
|
2367
|
+
ref: parentRef,
|
|
2321
2368
|
style: {
|
|
2322
2369
|
width: '100%',
|
|
2323
2370
|
maxWidth: maxWidth ?? configStyles.FILE.maxWidth
|
|
@@ -2340,17 +2387,19 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2340
2387
|
}
|
|
2341
2388
|
}, /*#__PURE__*/React__default.createElement("label", {
|
|
2342
2389
|
ref: labelRef,
|
|
2343
|
-
className: styles$b['file-label'],
|
|
2344
2390
|
style: {
|
|
2345
2391
|
width: '100%',
|
|
2346
2392
|
color: labelColor ?? configStyles.FILE.label.color,
|
|
2347
2393
|
fontSize: labelSize ?? configStyles.FILE.label.font.size,
|
|
2348
2394
|
fontStyle: labelStyle ?? configStyles.FILE.label.font.style,
|
|
2349
2395
|
fontWeight: labelWeight ?? configStyles.FILE.label.font.weight,
|
|
2350
|
-
fontFamily: labelFamily ?? configStyles.FILE.label.font.family
|
|
2396
|
+
fontFamily: labelFamily ?? configStyles.FILE.label.font.family,
|
|
2397
|
+
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) ? 'nowrap' : 'normal',
|
|
2398
|
+
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) ? 'hidden' : 'visible',
|
|
2399
|
+
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) ? 'ellipsis' : ''
|
|
2351
2400
|
},
|
|
2352
|
-
onMouseEnter: handleLabelMouseEnter,
|
|
2353
|
-
onMouseLeave: handleLabelMouseLeave
|
|
2401
|
+
onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) ? handleLabelMouseEnter : _ => _,
|
|
2402
|
+
onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) ? handleLabelMouseLeave : _ => _
|
|
2354
2403
|
}, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
|
|
2355
2404
|
style: {
|
|
2356
2405
|
cursor: 'pointer'
|
|
@@ -2426,7 +2475,8 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2426
2475
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2427
2476
|
style: {
|
|
2428
2477
|
margin: '0px',
|
|
2429
|
-
padding: '0px 10px'
|
|
2478
|
+
padding: '0px 10px',
|
|
2479
|
+
color: extentionsTextColor ?? configStyles.FILE.extentionsTextColor
|
|
2430
2480
|
}
|
|
2431
2481
|
}, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
2432
2482
|
className: styles$b['small-file-component'],
|
|
@@ -2467,12 +2517,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2467
2517
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
2468
2518
|
style: {
|
|
2469
2519
|
margin: '0px',
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
whiteSpace: 'nowrap',
|
|
2473
|
-
textOverflow: 'ellipsis'
|
|
2520
|
+
padding: '0px 10px',
|
|
2521
|
+
color: extentionsTextColor ?? configStyles.FILE.extentionsTextColor
|
|
2474
2522
|
}
|
|
2475
|
-
}, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default.createElement("span",
|
|
2523
|
+
}, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default.createElement("span", {
|
|
2524
|
+
style: {
|
|
2525
|
+
color: color ?? configStyles.FILE.color
|
|
2526
|
+
}
|
|
2527
|
+
}, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
2476
2528
|
style: {
|
|
2477
2529
|
position: 'absolute',
|
|
2478
2530
|
top: '0px',
|
|
@@ -2580,6 +2632,7 @@ File.propTypes = {
|
|
|
2580
2632
|
labelWeight: PropTypes.string,
|
|
2581
2633
|
labelFamily: PropTypes.string,
|
|
2582
2634
|
labelColor: PropTypes.string,
|
|
2635
|
+
useLabelTooltip: PropTypes.bool,
|
|
2583
2636
|
labelTooltipColor: PropTypes.string,
|
|
2584
2637
|
labelTooltipPadding: PropTypes.string,
|
|
2585
2638
|
labelTooltipFontSize: PropTypes.string,
|
|
@@ -2657,7 +2710,8 @@ File.propTypes = {
|
|
|
2657
2710
|
filesArray: PropTypes.arrayOf(PropTypes.object),
|
|
2658
2711
|
textAlignLeftInSmallComponent: PropTypes.bool,
|
|
2659
2712
|
showPreviewIconInSmallComponent: PropTypes.bool,
|
|
2660
|
-
fileExtensions: PropTypes.arrayOf(PropTypes.string)
|
|
2713
|
+
fileExtensions: PropTypes.arrayOf(PropTypes.string),
|
|
2714
|
+
extentionsTextColor: PropTypes.string
|
|
2661
2715
|
};
|
|
2662
2716
|
|
|
2663
2717
|
const hasOwnerProperty = (object, property) => {
|
|
@@ -2694,11 +2748,7 @@ const handleUtilsCheckTypeTel = (val, prevVal) => {
|
|
|
2694
2748
|
return val;
|
|
2695
2749
|
};
|
|
2696
2750
|
const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength, cardNumber) => {
|
|
2697
|
-
|
|
2698
|
-
if (val.length > maxLength) {
|
|
2699
|
-
val = val.substr(0, maxLength);
|
|
2700
|
-
}
|
|
2701
|
-
} else {
|
|
2751
|
+
{
|
|
2702
2752
|
const regNum = floatToFix && floatToFix >= 0 ? /^\d+(\.|\․|\.|\,)?(\d+)?$/ : /^\d+$/;
|
|
2703
2753
|
if (cardNumber) {
|
|
2704
2754
|
if (val.length > 19 && !val.includes('.')) {
|
|
@@ -2921,9 +2971,9 @@ SingleCheckbox.propTypes = {
|
|
|
2921
2971
|
ignoreDisabledForChecked: PropTypes.bool
|
|
2922
2972
|
};
|
|
2923
2973
|
|
|
2924
|
-
var css_248z$
|
|
2974
|
+
var css_248z$b = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
|
|
2925
2975
|
var styles$a = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO","no-tabel-data":"table-module_no-tabel-data__6xp3N"};
|
|
2926
|
-
styleInject(css_248z$
|
|
2976
|
+
styleInject(css_248z$b);
|
|
2927
2977
|
|
|
2928
2978
|
/* eslint-disable no-prototype-builtins */
|
|
2929
2979
|
const TH = ({
|
|
@@ -4361,9 +4411,9 @@ Table.propTypes = {
|
|
|
4361
4411
|
clickableRowColumnTd: PropTypes.bool
|
|
4362
4412
|
};
|
|
4363
4413
|
|
|
4364
|
-
var css_248z$
|
|
4365
|
-
var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48"
|
|
4366
|
-
styleInject(css_248z$
|
|
4414
|
+
var css_248z$a = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
|
|
4415
|
+
var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48"};
|
|
4416
|
+
styleInject(css_248z$a);
|
|
4367
4417
|
|
|
4368
4418
|
const SvgNext = ({
|
|
4369
4419
|
title,
|
|
@@ -5239,9 +5289,9 @@ const NumberInput = ({
|
|
|
5239
5289
|
});
|
|
5240
5290
|
};
|
|
5241
5291
|
|
|
5242
|
-
var css_248z$
|
|
5243
|
-
var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","
|
|
5244
|
-
styleInject(css_248z$
|
|
5292
|
+
var css_248z$9 = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
|
|
5293
|
+
var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","inp-num":"input-module_inp-num__vH7HL"};
|
|
5294
|
+
styleInject(css_248z$9);
|
|
5245
5295
|
|
|
5246
5296
|
const InputTypes = {
|
|
5247
5297
|
TEL: 'tel',
|
|
@@ -5262,7 +5312,6 @@ const Input = ({
|
|
|
5262
5312
|
name,
|
|
5263
5313
|
style,
|
|
5264
5314
|
color,
|
|
5265
|
-
label,
|
|
5266
5315
|
value,
|
|
5267
5316
|
width,
|
|
5268
5317
|
regexp,
|
|
@@ -5272,14 +5321,12 @@ const Input = ({
|
|
|
5272
5321
|
weight,
|
|
5273
5322
|
family,
|
|
5274
5323
|
padding,
|
|
5275
|
-
tooltip,
|
|
5276
5324
|
telClass,
|
|
5277
5325
|
leftIcon,
|
|
5278
5326
|
required,
|
|
5279
5327
|
disabled,
|
|
5280
5328
|
errorDots,
|
|
5281
5329
|
errorIcon,
|
|
5282
|
-
labelDots,
|
|
5283
5330
|
iconWidth,
|
|
5284
5331
|
rightIcon,
|
|
5285
5332
|
className,
|
|
@@ -5287,30 +5334,22 @@ const Input = ({
|
|
|
5287
5334
|
boxShadow,
|
|
5288
5335
|
errorLeft,
|
|
5289
5336
|
errorSize,
|
|
5290
|
-
labelSize,
|
|
5291
5337
|
maxLength,
|
|
5292
|
-
labelIcon,
|
|
5293
|
-
labelStyle,
|
|
5294
5338
|
floatToFix,
|
|
5295
5339
|
minNumSize,
|
|
5296
5340
|
maxNumSize,
|
|
5297
|
-
labelColor,
|
|
5298
5341
|
errorColor,
|
|
5299
5342
|
withoutDot,
|
|
5300
5343
|
errorStyle,
|
|
5301
5344
|
iconPadding,
|
|
5302
|
-
labelAction,
|
|
5303
5345
|
errorAction,
|
|
5304
5346
|
placeholder,
|
|
5305
5347
|
errorZindex,
|
|
5306
|
-
labelWeight,
|
|
5307
5348
|
errorWeight,
|
|
5308
5349
|
errorFamily,
|
|
5309
5350
|
phoneDisplay,
|
|
5310
5351
|
errorMessage,
|
|
5311
5352
|
autoComplete,
|
|
5312
|
-
labelDisplay,
|
|
5313
|
-
labelIconSide,
|
|
5314
5353
|
showLabelIcon,
|
|
5315
5354
|
errorIconSide,
|
|
5316
5355
|
showErrorIcon,
|
|
@@ -5318,17 +5357,13 @@ const Input = ({
|
|
|
5318
5357
|
errorBoxShadow,
|
|
5319
5358
|
boxShadowHover,
|
|
5320
5359
|
errorClassName,
|
|
5321
|
-
labelIconMargin,
|
|
5322
|
-
labelFontFamily,
|
|
5323
5360
|
phoneAlignItems,
|
|
5324
5361
|
errorLineHeight,
|
|
5325
|
-
labelLineHeight,
|
|
5326
5362
|
numberMaxLength,
|
|
5327
5363
|
backgroundColor,
|
|
5328
5364
|
errorIconMargin,
|
|
5329
5365
|
placeholderColor,
|
|
5330
5366
|
withZero = false,
|
|
5331
|
-
labelMarginBottom,
|
|
5332
5367
|
regexpErrorMessage,
|
|
5333
5368
|
phoneJustifyContent,
|
|
5334
5369
|
telBorderRightWidth,
|
|
@@ -5337,13 +5372,40 @@ const Input = ({
|
|
|
5337
5372
|
fireInputInsideError,
|
|
5338
5373
|
backgroundDisableColor,
|
|
5339
5374
|
telBorderRightColorHover,
|
|
5375
|
+
label,
|
|
5376
|
+
labelSize,
|
|
5377
|
+
labelIcon,
|
|
5378
|
+
labelStyle,
|
|
5379
|
+
labelColor,
|
|
5380
|
+
labelAction,
|
|
5381
|
+
labelWeight,
|
|
5382
|
+
labelDisplay,
|
|
5383
|
+
labelIconSide,
|
|
5384
|
+
labelIconMargin,
|
|
5385
|
+
labelFontFamily,
|
|
5386
|
+
labelLineHeight,
|
|
5387
|
+
labelMarginBottom,
|
|
5388
|
+
iconRequired,
|
|
5389
|
+
useLabelTooltip,
|
|
5390
|
+
labelTooltipColor,
|
|
5391
|
+
labelTooltipPadding,
|
|
5392
|
+
labelTooltipFontSize,
|
|
5393
|
+
labelTooltipFontStyle,
|
|
5394
|
+
labelTooltipFontFamily,
|
|
5395
|
+
labelTooltipFontWeight,
|
|
5396
|
+
labelTooltipBorderRadius,
|
|
5397
|
+
labelTooltipBackgroundColor,
|
|
5340
5398
|
cardNumber,
|
|
5341
5399
|
type = 'text'
|
|
5342
5400
|
}) => {
|
|
5401
|
+
const labelRef = useRef(null);
|
|
5402
|
+
const parentRef = useRef(null);
|
|
5343
5403
|
const [show, setShow] = useState(false);
|
|
5404
|
+
const [removeID, setRemoveID] = useState('');
|
|
5344
5405
|
const [isHover, setIsHover] = useState(false);
|
|
5345
5406
|
const [classProps, setClassProps] = useState({});
|
|
5346
5407
|
const [innerValue, setInnerValue] = useState('');
|
|
5408
|
+
const [tooltipElem, setTooltipElem] = useState(null);
|
|
5347
5409
|
const [configStyles, setConfigStyles] = useState({});
|
|
5348
5410
|
const [innerErrorIcon, setInnerErrorIcon] = useState('');
|
|
5349
5411
|
const [innerLabelIcon, setInnerLabelIcon] = useState('');
|
|
@@ -5394,6 +5456,79 @@ const Input = ({
|
|
|
5394
5456
|
const handleShowPass = () => {
|
|
5395
5457
|
setShow(!show);
|
|
5396
5458
|
};
|
|
5459
|
+
const getRenderedTextWidth = element => {
|
|
5460
|
+
const clone = element.cloneNode(true);
|
|
5461
|
+
clone.style.width = 'fit-content';
|
|
5462
|
+
document.body.appendChild(clone);
|
|
5463
|
+
const width = clone.offsetWidth;
|
|
5464
|
+
document.body.removeChild(clone);
|
|
5465
|
+
return width;
|
|
5466
|
+
};
|
|
5467
|
+
const handleLabelMouseEnter = event => {
|
|
5468
|
+
event.preventDefault();
|
|
5469
|
+
setRemoveID(() => v4());
|
|
5470
|
+
if (labelRef.current) {
|
|
5471
|
+
const parentElem = parentRef.current.getBoundingClientRect();
|
|
5472
|
+
const rect = labelRef.current.getBoundingClientRect();
|
|
5473
|
+
const top = rect.top;
|
|
5474
|
+
const left = rect.left;
|
|
5475
|
+
const height = rect.height;
|
|
5476
|
+
const elementWidth = rect.width;
|
|
5477
|
+
const x = event.clientX - rect.left;
|
|
5478
|
+
const parentWidth = parentElem.width;
|
|
5479
|
+
const textWidth = getRenderedTextWidth(labelRef.current);
|
|
5480
|
+
if (textWidth > Math.ceil(elementWidth)) {
|
|
5481
|
+
const newTooltipElem = document.createElement('div');
|
|
5482
|
+
newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
|
|
5483
|
+
const newTootltipTextElem = document.createElement('p');
|
|
5484
|
+
const newTooltipChildElem = document.createElement('div');
|
|
5485
|
+
const newTooltipDecorElem = document.createElement('div');
|
|
5486
|
+
newTooltipElem.style.position = 'fixed';
|
|
5487
|
+
newTooltipElem.style.left = showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? left - 14 - (labelIconMargin ? labelIconMargin : configStyles.INPUT.label.iconMargin) + 'px' : left + 'px';
|
|
5488
|
+
newTooltipElem.style.paddingTop = '20px';
|
|
5489
|
+
newTooltipElem.style.height = 'fit-content';
|
|
5490
|
+
newTooltipElem.style.boxSizing = 'border-box';
|
|
5491
|
+
newTooltipElem.style.top = top + height + 'px';
|
|
5492
|
+
newTooltipElem.style.width = parentWidth + 'px';
|
|
5493
|
+
newTooltipChildElem.style.width = '100%';
|
|
5494
|
+
newTooltipChildElem.style.position = 'relative';
|
|
5495
|
+
newTooltipChildElem.style.height = 'fit-content';
|
|
5496
|
+
newTooltipChildElem.style.boxSizing = 'border-box';
|
|
5497
|
+
newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.INPUT.label.tooltip.padding;
|
|
5498
|
+
newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.INPUT.label.tooltip.borderRadius;
|
|
5499
|
+
newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.INPUT.label.tooltip.backgroundColor;
|
|
5500
|
+
newTooltipDecorElem.style.zIndex = -1;
|
|
5501
|
+
newTooltipDecorElem.style.top = '-8px';
|
|
5502
|
+
newTooltipDecorElem.style.width = '18px';
|
|
5503
|
+
newTooltipDecorElem.style.height = '18px';
|
|
5504
|
+
newTooltipDecorElem.style.rotate = '45deg';
|
|
5505
|
+
newTooltipDecorElem.style.position = 'absolute';
|
|
5506
|
+
newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
|
|
5507
|
+
newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.INPUT.label.tooltip.backgroundColor;
|
|
5508
|
+
newTootltipTextElem.innerText = label;
|
|
5509
|
+
newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.INPUT.label.tooltip.color;
|
|
5510
|
+
newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.INPUT.label.tooltip.font.size;
|
|
5511
|
+
newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.INPUT.label.tooltip.font.style;
|
|
5512
|
+
newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.INPUT.label.tooltip.font.family;
|
|
5513
|
+
newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.INPUT.label.tooltip.font.weight;
|
|
5514
|
+
document.body.appendChild(newTooltipElem);
|
|
5515
|
+
newTooltipElem.appendChild(newTooltipChildElem);
|
|
5516
|
+
newTooltipChildElem.appendChild(newTooltipDecorElem);
|
|
5517
|
+
newTooltipChildElem.appendChild(newTootltipTextElem);
|
|
5518
|
+
setTooltipElem(() => newTooltipElem);
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5521
|
+
};
|
|
5522
|
+
const handleLabelMouseLeave = () => {
|
|
5523
|
+
const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
|
|
5524
|
+
if (removableElem) {
|
|
5525
|
+
document.body.removeChild(removableElem);
|
|
5526
|
+
}
|
|
5527
|
+
if (tooltipElem) {
|
|
5528
|
+
document.body.removeChild(tooltipElem);
|
|
5529
|
+
}
|
|
5530
|
+
setRemoveID(() => '');
|
|
5531
|
+
};
|
|
5397
5532
|
useEffect(() => {
|
|
5398
5533
|
if (errorMessage) {
|
|
5399
5534
|
setInnerErrorMessage(errorMessage);
|
|
@@ -5440,25 +5575,18 @@ const Input = ({
|
|
|
5440
5575
|
});
|
|
5441
5576
|
}, []);
|
|
5442
5577
|
return configStyles.INPUT && /*#__PURE__*/React__default.createElement("div", {
|
|
5578
|
+
ref: parentRef,
|
|
5443
5579
|
className: classProps
|
|
5444
5580
|
}, /*#__PURE__*/React__default.createElement("style", null, `.tui-color-placeholder::placeholder {
|
|
5445
5581
|
color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
|
|
5446
|
-
}`), label
|
|
5582
|
+
}`), label && /*#__PURE__*/React__default.createElement("div", {
|
|
5447
5583
|
style: {
|
|
5584
|
+
display: 'flex',
|
|
5448
5585
|
maxWidth: '100%',
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
|
|
5454
|
-
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5455
|
-
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5456
|
-
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5457
|
-
whiteSpace: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'nowrap' : 'normal',
|
|
5458
|
-
overflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'hidden' : 'visible',
|
|
5459
|
-
textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
|
|
5460
|
-
},
|
|
5461
|
-
title: label
|
|
5586
|
+
width: 'fit-content',
|
|
5587
|
+
columnGap: '4px',
|
|
5588
|
+
justifyContent: 'flex-start'
|
|
5589
|
+
}
|
|
5462
5590
|
}, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
|
|
5463
5591
|
alt: "label icon",
|
|
5464
5592
|
src: innerLabelIcon,
|
|
@@ -5469,7 +5597,24 @@ const Input = ({
|
|
|
5469
5597
|
marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5470
5598
|
},
|
|
5471
5599
|
onClick: labelAction ? () => labelAction() : _ => _
|
|
5472
|
-
}) : '',
|
|
5600
|
+
}) : '', /*#__PURE__*/React__default.createElement("label", {
|
|
5601
|
+
ref: labelRef,
|
|
5602
|
+
style: {
|
|
5603
|
+
color: labelColor ?? configStyles.INPUT.label.color,
|
|
5604
|
+
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
5605
|
+
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5606
|
+
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
5607
|
+
fontWeight: labelWeight ?? configStyles.INPUT.label.font.weight,
|
|
5608
|
+
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5609
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5610
|
+
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5611
|
+
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'nowrap' : 'normal',
|
|
5612
|
+
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'hidden' : 'visible',
|
|
5613
|
+
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? 'ellipsis' : ''
|
|
5614
|
+
},
|
|
5615
|
+
onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? handleLabelMouseEnter : _ => _,
|
|
5616
|
+
onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) ? handleLabelMouseLeave : _ => _
|
|
5617
|
+
}, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.INPUT.icon.required ? configStyles.INPUT.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
|
|
5473
5618
|
alt: "label icon",
|
|
5474
5619
|
src: innerLabelIcon,
|
|
5475
5620
|
style: {
|
|
@@ -5479,7 +5624,7 @@ const Input = ({
|
|
|
5479
5624
|
marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5480
5625
|
},
|
|
5481
5626
|
onClick: labelAction ? () => labelAction() : _ => _
|
|
5482
|
-
}) : '')
|
|
5627
|
+
}) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
5483
5628
|
className: `${styles$8['input-content']}`,
|
|
5484
5629
|
style: {
|
|
5485
5630
|
width: width ?? configStyles.INPUT.width,
|
|
@@ -5577,7 +5722,7 @@ const Input = ({
|
|
|
5577
5722
|
borderBottomRightRadius: radius ?? configStyles.INPUT.radius,
|
|
5578
5723
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5579
5724
|
}
|
|
5580
|
-
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''),
|
|
5725
|
+
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
|
|
5581
5726
|
// animation={animation}
|
|
5582
5727
|
, {
|
|
5583
5728
|
style: {
|
|
@@ -5645,7 +5790,6 @@ Input.propTypes = {
|
|
|
5645
5790
|
radius: PropTypes.string,
|
|
5646
5791
|
padding: PropTypes.string,
|
|
5647
5792
|
cardNumber: PropTypes.bool,
|
|
5648
|
-
tooltip: PropTypes.element,
|
|
5649
5793
|
withoutDot: PropTypes.bool,
|
|
5650
5794
|
className: PropTypes.string,
|
|
5651
5795
|
iconWidth: PropTypes.string,
|
|
@@ -5654,21 +5798,6 @@ Input.propTypes = {
|
|
|
5654
5798
|
floatToFix: PropTypes.number,
|
|
5655
5799
|
minNumSize: PropTypes.number,
|
|
5656
5800
|
maxNumSize: PropTypes.number,
|
|
5657
|
-
label: PropTypes.string,
|
|
5658
|
-
labelDots: PropTypes.bool,
|
|
5659
|
-
labelAction: PropTypes.func,
|
|
5660
|
-
labelIcon: PropTypes.string,
|
|
5661
|
-
labelSize: PropTypes.string,
|
|
5662
|
-
labelColor: PropTypes.string,
|
|
5663
|
-
labelStyle: PropTypes.string,
|
|
5664
|
-
showLabelIcon: PropTypes.bool,
|
|
5665
|
-
labelWeight: PropTypes.string,
|
|
5666
|
-
labelDisplay: PropTypes.string,
|
|
5667
|
-
labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
5668
|
-
labelLineHeight: PropTypes.string,
|
|
5669
|
-
labelFontFamily: PropTypes.string,
|
|
5670
|
-
labelIconMargin: PropTypes.string,
|
|
5671
|
-
labelMarginBottom: PropTypes.string,
|
|
5672
5801
|
borderRight: PropTypes.string,
|
|
5673
5802
|
placeholder: PropTypes.string,
|
|
5674
5803
|
placeholderColor: PropTypes.string,
|
|
@@ -5712,7 +5841,31 @@ Input.propTypes = {
|
|
|
5712
5841
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
5713
5842
|
rightIcon: PropTypes.arrayOf(PropTypes.element),
|
|
5714
5843
|
type: PropTypes.oneOf(Object.values(InputTypes)),
|
|
5715
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])
|
|
5844
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
|
|
5845
|
+
iconRequired: PropTypes.element,
|
|
5846
|
+
label: PropTypes.string,
|
|
5847
|
+
labelAction: PropTypes.func,
|
|
5848
|
+
labelIcon: PropTypes.string,
|
|
5849
|
+
labelSize: PropTypes.string,
|
|
5850
|
+
labelColor: PropTypes.string,
|
|
5851
|
+
labelStyle: PropTypes.string,
|
|
5852
|
+
showLabelIcon: PropTypes.bool,
|
|
5853
|
+
labelWeight: PropTypes.string,
|
|
5854
|
+
labelDisplay: PropTypes.string,
|
|
5855
|
+
labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
5856
|
+
labelLineHeight: PropTypes.string,
|
|
5857
|
+
labelFontFamily: PropTypes.string,
|
|
5858
|
+
labelIconMargin: PropTypes.string,
|
|
5859
|
+
labelMarginBottom: PropTypes.string,
|
|
5860
|
+
useLabelTooltip: PropTypes.bool,
|
|
5861
|
+
labelTooltipColor: PropTypes.string,
|
|
5862
|
+
labelTooltipPadding: PropTypes.string,
|
|
5863
|
+
labelTooltipFontSize: PropTypes.string,
|
|
5864
|
+
labelTooltipFontStyle: PropTypes.string,
|
|
5865
|
+
labelTooltipFontFamily: PropTypes.string,
|
|
5866
|
+
labelTooltipFontWeight: PropTypes.string,
|
|
5867
|
+
labelTooltipBorderRadius: PropTypes.string,
|
|
5868
|
+
labelTooltipBackgroundColor: PropTypes.string
|
|
5716
5869
|
};
|
|
5717
5870
|
|
|
5718
5871
|
const RadioDirectionMode = {
|
|
@@ -5924,9 +6077,9 @@ const SvgArrow = ({
|
|
|
5924
6077
|
fill: fillColor ? fillColor : '#3C393E'
|
|
5925
6078
|
}));
|
|
5926
6079
|
|
|
5927
|
-
var css_248z$
|
|
5928
|
-
var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-
|
|
5929
|
-
styleInject(css_248z$
|
|
6080
|
+
var css_248z$8 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:fit-content;justify-content:center;max-height:30px;max-width:30px;min-height:14px;min-width:14px;width:fit-content}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
|
|
6081
|
+
var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
|
|
6082
|
+
styleInject(css_248z$8);
|
|
5930
6083
|
|
|
5931
6084
|
const Select = ({
|
|
5932
6085
|
dots,
|
|
@@ -5958,6 +6111,16 @@ const Select = ({
|
|
|
5958
6111
|
labelFontFamily,
|
|
5959
6112
|
labelMarginBottom,
|
|
5960
6113
|
labelTextTransform,
|
|
6114
|
+
iconRequired,
|
|
6115
|
+
useLabelTooltip,
|
|
6116
|
+
labelTooltipColor,
|
|
6117
|
+
labelTooltipPadding,
|
|
6118
|
+
labelTooltipFontSize,
|
|
6119
|
+
labelTooltipFontStyle,
|
|
6120
|
+
labelTooltipFontFamily,
|
|
6121
|
+
labelTooltipFontWeight,
|
|
6122
|
+
labelTooltipBorderRadius,
|
|
6123
|
+
labelTooltipBackgroundColor,
|
|
5961
6124
|
cursor,
|
|
5962
6125
|
errorIcon,
|
|
5963
6126
|
errorSize,
|
|
@@ -5999,13 +6162,18 @@ const Select = ({
|
|
|
5999
6162
|
optionItemBackgroudColorHover,
|
|
6000
6163
|
boxShadow,
|
|
6001
6164
|
boxShadowHover,
|
|
6002
|
-
insidePagination
|
|
6165
|
+
insidePagination,
|
|
6166
|
+
placeholderColor
|
|
6003
6167
|
}) => {
|
|
6004
|
-
const ref = useRef();
|
|
6168
|
+
const ref = useRef(null);
|
|
6169
|
+
const labelRef = useRef(null);
|
|
6170
|
+
const parentRef = useRef(null);
|
|
6005
6171
|
const [opened, setOpened] = useState(false);
|
|
6172
|
+
const [removeID, setRemoveID] = useState('');
|
|
6006
6173
|
const [isHover, setIsHover] = useState(false);
|
|
6007
6174
|
const [classProps, setClassProps] = useState({});
|
|
6008
6175
|
const [newSelected, setNewSelected] = useState([]);
|
|
6176
|
+
const [tooltipElem, setTooltipElem] = useState(null);
|
|
6009
6177
|
const [existOptions, setExistOptions] = useState([]);
|
|
6010
6178
|
const [configStyles, setConfigStyles] = useState({});
|
|
6011
6179
|
const handleOpenClose = () => {
|
|
@@ -6071,20 +6239,93 @@ const Select = ({
|
|
|
6071
6239
|
}
|
|
6072
6240
|
return true;
|
|
6073
6241
|
};
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6242
|
+
const getRenderedTextWidth = element => {
|
|
6243
|
+
const clone = element.cloneNode(true);
|
|
6244
|
+
clone.style.width = 'fit-content';
|
|
6245
|
+
document.body.appendChild(clone);
|
|
6246
|
+
const width = clone.offsetWidth;
|
|
6247
|
+
document.body.removeChild(clone);
|
|
6248
|
+
return width;
|
|
6249
|
+
};
|
|
6250
|
+
const handleLabelMouseEnter = event => {
|
|
6251
|
+
event.preventDefault();
|
|
6252
|
+
setRemoveID(() => v4());
|
|
6253
|
+
if (labelRef.current) {
|
|
6254
|
+
const parentElem = parentRef.current.getBoundingClientRect();
|
|
6255
|
+
const rect = labelRef.current.getBoundingClientRect();
|
|
6256
|
+
const top = rect.top;
|
|
6257
|
+
const left = rect.left;
|
|
6258
|
+
const height = rect.height;
|
|
6259
|
+
const elementWidth = rect.width;
|
|
6260
|
+
const x = event.clientX - rect.left;
|
|
6261
|
+
const parentWidth = parentElem.width;
|
|
6262
|
+
const textWidth = getRenderedTextWidth(labelRef.current);
|
|
6263
|
+
if (textWidth > Math.ceil(elementWidth)) {
|
|
6264
|
+
const newTooltipElem = document.createElement('div');
|
|
6265
|
+
newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
|
|
6266
|
+
const newTootltipTextElem = document.createElement('p');
|
|
6267
|
+
const newTooltipChildElem = document.createElement('div');
|
|
6268
|
+
const newTooltipDecorElem = document.createElement('div');
|
|
6269
|
+
newTooltipElem.style.position = 'fixed';
|
|
6270
|
+
newTooltipElem.style.left = left + 'px';
|
|
6271
|
+
newTooltipElem.style.paddingTop = '20px';
|
|
6272
|
+
newTooltipElem.style.height = 'fit-content';
|
|
6273
|
+
newTooltipElem.style.boxSizing = 'border-box';
|
|
6274
|
+
newTooltipElem.style.top = top + height + 'px';
|
|
6275
|
+
newTooltipElem.style.width = parentWidth + 'px';
|
|
6276
|
+
newTooltipChildElem.style.width = '100%';
|
|
6277
|
+
newTooltipChildElem.style.position = 'relative';
|
|
6278
|
+
newTooltipChildElem.style.height = 'fit-content';
|
|
6279
|
+
newTooltipChildElem.style.boxSizing = 'border-box';
|
|
6280
|
+
newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.SELECT.label.tooltip.padding;
|
|
6281
|
+
newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.SELECT.label.tooltip.borderRadius;
|
|
6282
|
+
newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.SELECT.label.tooltip.backgroundColor;
|
|
6283
|
+
newTooltipDecorElem.style.zIndex = -1;
|
|
6284
|
+
newTooltipDecorElem.style.top = '-8px';
|
|
6285
|
+
newTooltipDecorElem.style.width = '18px';
|
|
6286
|
+
newTooltipDecorElem.style.height = '18px';
|
|
6287
|
+
newTooltipDecorElem.style.rotate = '45deg';
|
|
6288
|
+
newTooltipDecorElem.style.position = 'absolute';
|
|
6289
|
+
newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
|
|
6290
|
+
newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.SELECT.label.tooltip.backgroundColor;
|
|
6291
|
+
newTootltipTextElem.innerText = label;
|
|
6292
|
+
newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.SELECT.label.tooltip.color;
|
|
6293
|
+
newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.SELECT.label.tooltip.font.size;
|
|
6294
|
+
newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.SELECT.label.tooltip.font.style;
|
|
6295
|
+
newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.SELECT.label.tooltip.font.family;
|
|
6296
|
+
newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.SELECT.label.tooltip.font.weight;
|
|
6297
|
+
document.body.appendChild(newTooltipElem);
|
|
6298
|
+
newTooltipElem.appendChild(newTooltipChildElem);
|
|
6299
|
+
newTooltipChildElem.appendChild(newTooltipDecorElem);
|
|
6300
|
+
newTooltipChildElem.appendChild(newTootltipTextElem);
|
|
6301
|
+
setTooltipElem(() => newTooltipElem);
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6304
|
+
};
|
|
6305
|
+
const handleLabelMouseLeave = () => {
|
|
6306
|
+
const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
|
|
6307
|
+
if (removableElem) {
|
|
6308
|
+
document.body.removeChild(removableElem);
|
|
6309
|
+
}
|
|
6310
|
+
if (tooltipElem) {
|
|
6311
|
+
document.body.removeChild(tooltipElem);
|
|
6312
|
+
}
|
|
6313
|
+
setRemoveID(() => '');
|
|
6314
|
+
};
|
|
6315
|
+
useEffect(() => {
|
|
6316
|
+
if (opened) {
|
|
6317
|
+
const checkIfClickedOutside = e => {
|
|
6318
|
+
if (opened && ref.current && !ref.current.contains(e.target)) {
|
|
6319
|
+
setOpened(false);
|
|
6320
|
+
}
|
|
6321
|
+
};
|
|
6322
|
+
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
6323
|
+
return () => {
|
|
6324
|
+
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
6325
|
+
};
|
|
6326
|
+
}
|
|
6327
|
+
}, [opened]);
|
|
6328
|
+
useEffect(() => {
|
|
6088
6329
|
if (selected) {
|
|
6089
6330
|
if (selected.length > 0) {
|
|
6090
6331
|
setNewSelected(isObjectEmpty(selected[0]) ? [] : selected);
|
|
@@ -6125,12 +6366,22 @@ const Select = ({
|
|
|
6125
6366
|
});
|
|
6126
6367
|
}, []);
|
|
6127
6368
|
return configStyles.SELECT && /*#__PURE__*/React__default.createElement("div", {
|
|
6369
|
+
ref: parentRef,
|
|
6128
6370
|
className: classProps,
|
|
6129
6371
|
style: {
|
|
6130
6372
|
position: 'relative',
|
|
6131
6373
|
width: '100%'
|
|
6132
6374
|
}
|
|
6133
|
-
}, label
|
|
6375
|
+
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
6376
|
+
style: {
|
|
6377
|
+
display: 'flex',
|
|
6378
|
+
maxWidth: '100%',
|
|
6379
|
+
width: 'fit-content',
|
|
6380
|
+
columnGap: '4px',
|
|
6381
|
+
justifyContent: 'flex-start'
|
|
6382
|
+
}
|
|
6383
|
+
}, /*#__PURE__*/React__default.createElement("label", {
|
|
6384
|
+
ref: labelRef,
|
|
6134
6385
|
style: {
|
|
6135
6386
|
color: labelColor ?? configStyles.SELECT.label.color,
|
|
6136
6387
|
fontWeight: labelWeight ?? configStyles.SELECT.label.font.weight,
|
|
@@ -6140,9 +6391,14 @@ const Select = ({
|
|
|
6140
6391
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6141
6392
|
lineHeight: labelLineHeight ?? configStyles.SELECT.label.lineHeight,
|
|
6142
6393
|
marginBottom: labelMarginBottom ?? configStyles.SELECT.label.marginBottom,
|
|
6143
|
-
textTransform: labelTextTransform ?? configStyles.SELECT.label.textTransform
|
|
6144
|
-
|
|
6145
|
-
|
|
6394
|
+
textTransform: labelTextTransform ?? configStyles.SELECT.label.textTransform,
|
|
6395
|
+
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'nowrap' : 'normal',
|
|
6396
|
+
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'hidden' : 'visible',
|
|
6397
|
+
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? 'ellipsis' : ''
|
|
6398
|
+
},
|
|
6399
|
+
onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? handleLabelMouseEnter : _ => _,
|
|
6400
|
+
onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.SELECT.label.useTooltip) ? handleLabelMouseLeave : _ => _
|
|
6401
|
+
}, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.SELECT.icon.required ? configStyles.SELECT.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
6146
6402
|
ref: ref
|
|
6147
6403
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6148
6404
|
className: styles$7['select-content']
|
|
@@ -6168,12 +6424,12 @@ const Select = ({
|
|
|
6168
6424
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
6169
6425
|
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
|
|
6170
6426
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6171
|
-
className:
|
|
6427
|
+
className: "select-content-top-text",
|
|
6172
6428
|
style: {
|
|
6173
6429
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
6174
6430
|
overflow: insidePagination ? 'visible' : 'hidden',
|
|
6175
6431
|
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
6176
|
-
color: isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6432
|
+
color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6177
6433
|
}
|
|
6178
6434
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
6179
6435
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -6319,9 +6575,20 @@ Select.propTypes = {
|
|
|
6319
6575
|
optionItemMarginBottom: PropTypes.string,
|
|
6320
6576
|
optionItemBackgroudColor: PropTypes.string,
|
|
6321
6577
|
optionItemBackgroudColorHover: PropTypes.string,
|
|
6578
|
+
iconRequired: PropTypes.element,
|
|
6579
|
+
useLabelTooltip: PropTypes.bool,
|
|
6580
|
+
labelTooltipColor: PropTypes.string,
|
|
6581
|
+
labelTooltipPadding: PropTypes.string,
|
|
6582
|
+
labelTooltipFontSize: PropTypes.string,
|
|
6583
|
+
labelTooltipFontStyle: PropTypes.string,
|
|
6584
|
+
labelTooltipFontFamily: PropTypes.string,
|
|
6585
|
+
labelTooltipFontWeight: PropTypes.string,
|
|
6586
|
+
labelTooltipBorderRadius: PropTypes.string,
|
|
6587
|
+
labelTooltipBackgroundColor: PropTypes.string,
|
|
6322
6588
|
boxShadow: PropTypes.string,
|
|
6323
6589
|
boxShadowHover: PropTypes.string,
|
|
6324
|
-
insidePagination: PropTypes.bool
|
|
6590
|
+
insidePagination: PropTypes.bool,
|
|
6591
|
+
placeholderColor: PropTypes.string
|
|
6325
6592
|
};
|
|
6326
6593
|
|
|
6327
6594
|
const SvgToasterInfo = ({
|
|
@@ -6443,9 +6710,9 @@ const SvgToasterSuccess = ({
|
|
|
6443
6710
|
fill: fillColor ? fillColor : '#0DA574'
|
|
6444
6711
|
}));
|
|
6445
6712
|
|
|
6446
|
-
var css_248z$
|
|
6713
|
+
var css_248z$7 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceInLeftMobile__CA2dc{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:0}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}@media(max-width:480px){.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeftMobile__CA2dc;animation-name:toaster-module_bounceInLeftMobile__CA2dc}}";
|
|
6447
6714
|
var styles$6 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO","bounceInLeftMobile":"toaster-module_bounceInLeftMobile__CA2dc"};
|
|
6448
|
-
styleInject(css_248z$
|
|
6715
|
+
styleInject(css_248z$7);
|
|
6449
6716
|
|
|
6450
6717
|
const ToasterType = {
|
|
6451
6718
|
info: 'info',
|
|
@@ -6845,9 +7112,9 @@ const SvgTooltip = ({
|
|
|
6845
7112
|
fill: fillColor ? fillColor : '#D1D1D1'
|
|
6846
7113
|
}));
|
|
6847
7114
|
|
|
6848
|
-
var css_248z$
|
|
7115
|
+
var css_248z$6 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{box-sizing:border-box;padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
|
|
6849
7116
|
var styles$5 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
|
|
6850
|
-
styleInject(css_248z$
|
|
7117
|
+
styleInject(css_248z$6);
|
|
6851
7118
|
|
|
6852
7119
|
const TooltipDirections = {
|
|
6853
7120
|
TOP: 'top',
|
|
@@ -7051,9 +7318,9 @@ const SvgCaptchaArrowDown = ({
|
|
|
7051
7318
|
fill: fillColor ? fillColor : '#00236A'
|
|
7052
7319
|
}));
|
|
7053
7320
|
|
|
7054
|
-
var css_248z$
|
|
7321
|
+
var css_248z$5 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
|
|
7055
7322
|
var styles$4 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
|
|
7056
|
-
styleInject(css_248z$
|
|
7323
|
+
styleInject(css_248z$5);
|
|
7057
7324
|
|
|
7058
7325
|
const Captcha = ({
|
|
7059
7326
|
color,
|
|
@@ -7198,9 +7465,9 @@ Captcha.propTypes = {
|
|
|
7198
7465
|
getRange: PropTypes.func.isRequired
|
|
7199
7466
|
};
|
|
7200
7467
|
|
|
7201
|
-
var css_248z$
|
|
7468
|
+
var css_248z$4 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
|
|
7202
7469
|
var styles$3 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
|
|
7203
|
-
styleInject(css_248z$
|
|
7470
|
+
styleInject(css_248z$4);
|
|
7204
7471
|
|
|
7205
7472
|
const Stepper = ({
|
|
7206
7473
|
stepLength,
|
|
@@ -7363,9 +7630,6 @@ Checkbox.propTypes = {
|
|
|
7363
7630
|
data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
7364
7631
|
};
|
|
7365
7632
|
|
|
7366
|
-
var css_248z$4 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
|
|
7367
|
-
styleInject(css_248z$4);
|
|
7368
|
-
|
|
7369
7633
|
const PositionSide = {
|
|
7370
7634
|
TOP: 'top',
|
|
7371
7635
|
BOTTOM: 'bottom'
|
|
@@ -7376,7 +7640,6 @@ const Textarea = ({
|
|
|
7376
7640
|
style,
|
|
7377
7641
|
family,
|
|
7378
7642
|
weight,
|
|
7379
|
-
label,
|
|
7380
7643
|
width,
|
|
7381
7644
|
value,
|
|
7382
7645
|
height,
|
|
@@ -7393,32 +7656,47 @@ const Textarea = ({
|
|
|
7393
7656
|
maxHeight,
|
|
7394
7657
|
boxSizing,
|
|
7395
7658
|
maxLength,
|
|
7396
|
-
labelSize,
|
|
7397
7659
|
errorSize,
|
|
7398
7660
|
errorStyle,
|
|
7399
7661
|
errorWeight,
|
|
7400
7662
|
errorFamily,
|
|
7401
7663
|
marginTop,
|
|
7402
7664
|
className,
|
|
7403
|
-
labelColor,
|
|
7404
7665
|
errorColor,
|
|
7405
|
-
labelWeight,
|
|
7406
7666
|
placeholder,
|
|
7407
|
-
labelDisplay,
|
|
7408
7667
|
errorMessage,
|
|
7409
|
-
labelFontFamily,
|
|
7410
7668
|
backgroundColor,
|
|
7411
7669
|
borderFocusColor,
|
|
7412
7670
|
borderHoverColor,
|
|
7413
|
-
labelMarginBottom,
|
|
7414
7671
|
showCharacterCount,
|
|
7672
|
+
label,
|
|
7673
|
+
labelSize,
|
|
7674
|
+
labelColor,
|
|
7675
|
+
labelWeight,
|
|
7676
|
+
labelDisplay,
|
|
7677
|
+
labelFontFamily,
|
|
7678
|
+
labelMarginBottom,
|
|
7679
|
+
iconRequired,
|
|
7680
|
+
useLabelTooltip,
|
|
7681
|
+
labelTooltipColor,
|
|
7682
|
+
labelTooltipPadding,
|
|
7683
|
+
labelTooltipFontSize,
|
|
7684
|
+
labelTooltipFontStyle,
|
|
7685
|
+
labelTooltipFontFamily,
|
|
7686
|
+
labelTooltipFontWeight,
|
|
7687
|
+
labelTooltipBorderRadius,
|
|
7688
|
+
labelTooltipBackgroundColor,
|
|
7415
7689
|
characterCountPosition = 'top'
|
|
7416
7690
|
}) => {
|
|
7691
|
+
const labelRef = useRef(null);
|
|
7692
|
+
const parentRef = useRef(null);
|
|
7417
7693
|
const [error, setError] = useState('');
|
|
7694
|
+
const [removeID, setRemoveID] = useState('');
|
|
7418
7695
|
const [isHover, setIsHover] = useState(false);
|
|
7419
7696
|
const [isFocus, setIsFocus] = useState(false);
|
|
7420
7697
|
const [innerValue, setInnerValue] = useState('');
|
|
7421
7698
|
const [classProps, setClassProps] = useState({});
|
|
7699
|
+
const [tooltipElem, setTooltipElem] = useState(null);
|
|
7422
7700
|
const [configStyles, setConfigStyles] = useState({});
|
|
7423
7701
|
const handleMouseEnter = () => {
|
|
7424
7702
|
setIsHover(true);
|
|
@@ -7454,6 +7732,79 @@ const Textarea = ({
|
|
|
7454
7732
|
}
|
|
7455
7733
|
}
|
|
7456
7734
|
};
|
|
7735
|
+
const getRenderedTextWidth = element => {
|
|
7736
|
+
const clone = element.cloneNode(true);
|
|
7737
|
+
clone.style.width = 'fit-content';
|
|
7738
|
+
document.body.appendChild(clone);
|
|
7739
|
+
const width = clone.offsetWidth;
|
|
7740
|
+
document.body.removeChild(clone);
|
|
7741
|
+
return width;
|
|
7742
|
+
};
|
|
7743
|
+
const handleLabelMouseEnter = event => {
|
|
7744
|
+
event.preventDefault();
|
|
7745
|
+
setRemoveID(() => v4());
|
|
7746
|
+
if (labelRef.current) {
|
|
7747
|
+
const parentElem = parentRef.current.getBoundingClientRect();
|
|
7748
|
+
const rect = labelRef.current.getBoundingClientRect();
|
|
7749
|
+
const top = rect.top;
|
|
7750
|
+
const left = rect.left;
|
|
7751
|
+
const height = rect.height;
|
|
7752
|
+
const elementWidth = rect.width;
|
|
7753
|
+
const x = event.clientX - rect.left;
|
|
7754
|
+
const parentWidth = parentElem.width;
|
|
7755
|
+
const textWidth = getRenderedTextWidth(labelRef.current);
|
|
7756
|
+
if (textWidth > Math.ceil(elementWidth)) {
|
|
7757
|
+
const newTooltipElem = document.createElement('div');
|
|
7758
|
+
newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
|
|
7759
|
+
const newTootltipTextElem = document.createElement('p');
|
|
7760
|
+
const newTooltipChildElem = document.createElement('div');
|
|
7761
|
+
const newTooltipDecorElem = document.createElement('div');
|
|
7762
|
+
newTooltipElem.style.position = 'fixed';
|
|
7763
|
+
newTooltipElem.style.left = left + 'px';
|
|
7764
|
+
newTooltipElem.style.paddingTop = '20px';
|
|
7765
|
+
newTooltipElem.style.height = 'fit-content';
|
|
7766
|
+
newTooltipElem.style.boxSizing = 'border-box';
|
|
7767
|
+
newTooltipElem.style.top = top + height + 'px';
|
|
7768
|
+
newTooltipElem.style.width = parentWidth + 'px';
|
|
7769
|
+
newTooltipChildElem.style.width = '100%';
|
|
7770
|
+
newTooltipChildElem.style.position = 'relative';
|
|
7771
|
+
newTooltipChildElem.style.height = 'fit-content';
|
|
7772
|
+
newTooltipChildElem.style.boxSizing = 'border-box';
|
|
7773
|
+
newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.TEXTAREA.label.tooltip.padding;
|
|
7774
|
+
newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.TEXTAREA.label.tooltip.borderRadius;
|
|
7775
|
+
newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.TEXTAREA.label.tooltip.backgroundColor;
|
|
7776
|
+
newTooltipDecorElem.style.zIndex = -1;
|
|
7777
|
+
newTooltipDecorElem.style.top = '-8px';
|
|
7778
|
+
newTooltipDecorElem.style.width = '18px';
|
|
7779
|
+
newTooltipDecorElem.style.height = '18px';
|
|
7780
|
+
newTooltipDecorElem.style.rotate = '45deg';
|
|
7781
|
+
newTooltipDecorElem.style.position = 'absolute';
|
|
7782
|
+
newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
|
|
7783
|
+
newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.TEXTAREA.label.tooltip.backgroundColor;
|
|
7784
|
+
newTootltipTextElem.innerText = label;
|
|
7785
|
+
newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.TEXTAREA.label.tooltip.color;
|
|
7786
|
+
newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.TEXTAREA.label.tooltip.font.size;
|
|
7787
|
+
newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.TEXTAREA.label.tooltip.font.style;
|
|
7788
|
+
newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.TEXTAREA.label.tooltip.font.family;
|
|
7789
|
+
newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.TEXTAREA.label.tooltip.font.weight;
|
|
7790
|
+
document.body.appendChild(newTooltipElem);
|
|
7791
|
+
newTooltipElem.appendChild(newTooltipChildElem);
|
|
7792
|
+
newTooltipChildElem.appendChild(newTooltipDecorElem);
|
|
7793
|
+
newTooltipChildElem.appendChild(newTootltipTextElem);
|
|
7794
|
+
setTooltipElem(() => newTooltipElem);
|
|
7795
|
+
}
|
|
7796
|
+
}
|
|
7797
|
+
};
|
|
7798
|
+
const handleLabelMouseLeave = () => {
|
|
7799
|
+
const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
|
|
7800
|
+
if (removableElem) {
|
|
7801
|
+
document.body.removeChild(removableElem);
|
|
7802
|
+
}
|
|
7803
|
+
if (tooltipElem) {
|
|
7804
|
+
document.body.removeChild(tooltipElem);
|
|
7805
|
+
}
|
|
7806
|
+
setRemoveID(() => '');
|
|
7807
|
+
};
|
|
7457
7808
|
useEffect(() => {
|
|
7458
7809
|
if (value === undefined) {
|
|
7459
7810
|
alert('Please add value prop on Textarea component');
|
|
@@ -7481,6 +7832,7 @@ const Textarea = ({
|
|
|
7481
7832
|
});
|
|
7482
7833
|
}, []);
|
|
7483
7834
|
return configStyles.TEXTAREA && /*#__PURE__*/React__default.createElement("div", {
|
|
7835
|
+
ref: parentRef,
|
|
7484
7836
|
style: {
|
|
7485
7837
|
width: width ?? configStyles.TEXTAREA.width
|
|
7486
7838
|
},
|
|
@@ -7496,11 +7848,30 @@ const Textarea = ({
|
|
|
7496
7848
|
fontWeight: labelWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
7497
7849
|
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
7498
7850
|
}
|
|
7499
|
-
}, label
|
|
7851
|
+
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
7500
7852
|
style: {
|
|
7501
|
-
display:
|
|
7853
|
+
display: 'flex',
|
|
7854
|
+
maxWidth: '100%',
|
|
7855
|
+
columnGap: '4px',
|
|
7856
|
+
justifyContent: 'flex-start',
|
|
7857
|
+
width: showCharacterCount && maxLength && characterCountPosition === 'top' ? 'calc(100% - 80px)' : '100%'
|
|
7502
7858
|
}
|
|
7503
|
-
},
|
|
7859
|
+
}, /*#__PURE__*/React__default.createElement("label", {
|
|
7860
|
+
ref: labelRef,
|
|
7861
|
+
style: {
|
|
7862
|
+
display: labelDisplay ?? configStyles.TEXTAREA.label.display,
|
|
7863
|
+
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'nowrap' : 'normal',
|
|
7864
|
+
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'hidden' : 'visible',
|
|
7865
|
+
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? 'ellipsis' : ''
|
|
7866
|
+
},
|
|
7867
|
+
onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? handleLabelMouseEnter : _ => _,
|
|
7868
|
+
onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.TEXTAREA.label.useTooltip) ? handleLabelMouseLeave : _ => _
|
|
7869
|
+
}, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", {
|
|
7870
|
+
style: {
|
|
7871
|
+
width: 'fit-content',
|
|
7872
|
+
flexShrink: 0
|
|
7873
|
+
}
|
|
7874
|
+
}, maxLength - innerValue.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
7504
7875
|
style: {
|
|
7505
7876
|
width: '100%',
|
|
7506
7877
|
border: 'none',
|
|
@@ -7567,7 +7938,6 @@ Textarea.propTypes = {
|
|
|
7567
7938
|
style: PropTypes.string,
|
|
7568
7939
|
family: PropTypes.string,
|
|
7569
7940
|
weight: PropTypes.string,
|
|
7570
|
-
label: PropTypes.string,
|
|
7571
7941
|
width: PropTypes.string,
|
|
7572
7942
|
height: PropTypes.string,
|
|
7573
7943
|
resize: PropTypes.string,
|
|
@@ -7584,25 +7954,36 @@ Textarea.propTypes = {
|
|
|
7584
7954
|
minHeight: PropTypes.string,
|
|
7585
7955
|
maxHeight: PropTypes.string,
|
|
7586
7956
|
maxLength: PropTypes.number,
|
|
7587
|
-
labelSize: PropTypes.string,
|
|
7588
7957
|
errorSize: PropTypes.string,
|
|
7589
7958
|
errorStyle: PropTypes.string,
|
|
7590
7959
|
errorWeight: PropTypes.string,
|
|
7591
7960
|
errorFamily: PropTypes.string,
|
|
7592
7961
|
className: PropTypes.string,
|
|
7593
|
-
labelColor: PropTypes.string,
|
|
7594
7962
|
errorColor: PropTypes.string,
|
|
7595
|
-
labelWeight: PropTypes.string,
|
|
7596
7963
|
placeholder: PropTypes.string,
|
|
7597
7964
|
errorMessage: PropTypes.string,
|
|
7598
|
-
labelDisplay: PropTypes.string,
|
|
7599
|
-
labelFontFamily: PropTypes.string,
|
|
7600
7965
|
backgroundColor: PropTypes.string,
|
|
7601
7966
|
showCharacterCount: PropTypes.bool,
|
|
7602
7967
|
value: PropTypes.string.isRequired,
|
|
7603
7968
|
borderFocusColor: PropTypes.string,
|
|
7604
7969
|
borderHoverColor: PropTypes.string,
|
|
7970
|
+
label: PropTypes.string,
|
|
7971
|
+
labelSize: PropTypes.string,
|
|
7972
|
+
labelColor: PropTypes.string,
|
|
7973
|
+
labelWeight: PropTypes.string,
|
|
7974
|
+
labelDisplay: PropTypes.string,
|
|
7975
|
+
labelFontFamily: PropTypes.string,
|
|
7605
7976
|
labelMarginBottom: PropTypes.string,
|
|
7977
|
+
iconRequired: PropTypes.element,
|
|
7978
|
+
useLabelTooltip: PropTypes.bool,
|
|
7979
|
+
labelTooltipColor: PropTypes.string,
|
|
7980
|
+
labelTooltipPadding: PropTypes.string,
|
|
7981
|
+
labelTooltipFontSize: PropTypes.string,
|
|
7982
|
+
labelTooltipFontStyle: PropTypes.string,
|
|
7983
|
+
labelTooltipFontFamily: PropTypes.string,
|
|
7984
|
+
labelTooltipFontWeight: PropTypes.string,
|
|
7985
|
+
labelTooltipBorderRadius: PropTypes.string,
|
|
7986
|
+
labelTooltipBackgroundColor: PropTypes.string,
|
|
7606
7987
|
characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
|
|
7607
7988
|
};
|
|
7608
7989
|
|
|
@@ -7618,6 +7999,7 @@ const AccordionItem = ({
|
|
|
7618
7999
|
titleAlign,
|
|
7619
8000
|
multipleOpen,
|
|
7620
8001
|
openHoverIcon,
|
|
8002
|
+
closeHoverIcon,
|
|
7621
8003
|
color,
|
|
7622
8004
|
border,
|
|
7623
8005
|
padding,
|
|
@@ -7698,7 +8080,7 @@ const AccordionItem = ({
|
|
|
7698
8080
|
alignItems: 'center',
|
|
7699
8081
|
justifyContent: 'center'
|
|
7700
8082
|
}
|
|
7701
|
-
}, isOpen ? closeIcon : isHover ? openHoverIcon
|
|
8083
|
+
}, isOpen ? isHover ? closeHoverIcon : closeIcon : isHover ? openHoverIcon : openIcon)), /*#__PURE__*/React__default.createElement("div", {
|
|
7702
8084
|
style: {
|
|
7703
8085
|
overflow: 'hidden',
|
|
7704
8086
|
height: isOpen ? 'auto' : '0px'
|
|
@@ -7764,6 +8146,7 @@ const Accordion = ({
|
|
|
7764
8146
|
titleAlign,
|
|
7765
8147
|
multipleOpen,
|
|
7766
8148
|
openHoverIcon,
|
|
8149
|
+
closeHoverIcon,
|
|
7767
8150
|
borderTop,
|
|
7768
8151
|
borderLeft,
|
|
7769
8152
|
borderRight,
|
|
@@ -7844,6 +8227,13 @@ const Accordion = ({
|
|
|
7844
8227
|
src: configStyles.ACCORDION.icon.close,
|
|
7845
8228
|
alt: "close icon"
|
|
7846
8229
|
}) : /*#__PURE__*/React__default.createElement(SvgGreenminus, null),
|
|
8230
|
+
closeHoverIcon: closeHoverIcon ? /*#__PURE__*/React__default.createElement("img", {
|
|
8231
|
+
src: closeHoverIcon,
|
|
8232
|
+
alt: "close icon"
|
|
8233
|
+
}) : configStyles.ACCORDION.icon.closeHover ? /*#__PURE__*/React__default.createElement("img", {
|
|
8234
|
+
src: configStyles.ACCORDION.icon.closeHover,
|
|
8235
|
+
alt: "close icon"
|
|
8236
|
+
}) : /*#__PURE__*/React__default.createElement(SvgGreenminus, null),
|
|
7847
8237
|
className: classProps,
|
|
7848
8238
|
color: color ?? configStyles.ACCORDION.color,
|
|
7849
8239
|
padding: padding ?? configStyles.ACCORDION.padding,
|
|
@@ -7887,6 +8277,7 @@ Accordion.propTypes = {
|
|
|
7887
8277
|
closeIcon: PropTypes.string,
|
|
7888
8278
|
marginBottom: PropTypes.string,
|
|
7889
8279
|
openHoverIcon: PropTypes.string,
|
|
8280
|
+
closeHoverIcon: PropTypes.string,
|
|
7890
8281
|
borderTop: PropTypes.bool,
|
|
7891
8282
|
borderLeft: PropTypes.bool,
|
|
7892
8283
|
borderRight: PropTypes.bool,
|
|
@@ -7902,6 +8293,7 @@ Accordion.propTypes = {
|
|
|
7902
8293
|
};
|
|
7903
8294
|
|
|
7904
8295
|
// import React from 'react';
|
|
8296
|
+
|
|
7905
8297
|
const Swipe = ({
|
|
7906
8298
|
id,
|
|
7907
8299
|
title,
|
|
@@ -7980,10 +8372,13 @@ const Swipe = ({
|
|
|
7980
8372
|
};
|
|
7981
8373
|
|
|
7982
8374
|
var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kgLsE{right:0}.swipe-module_to-right__Xu3Ul{left:0}.swipe-module_to-bottom__94M7H{top:0}.swipe-module_visible__---aC{visibility:visible!important}.swipe-module_swipe-block__Yv1B3{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.swipe-module_move-top__m6t2O{-webkit-animation-name:swipe-module_slideTop__-Bbap;animation-name:swipe-module_slideTop__-Bbap}.swipe-module_move-left__4TDLs{-webkit-animation-name:swipe-module_slideLeft__i24cS;animation-name:swipe-module_slideLeft__i24cS}.swipe-module_move-right__FrYo0{-webkit-animation-name:swipe-module_slideRight__swgSY;animation-name:swipe-module_slideRight__swgSY}.swipe-module_move-bottom__eYDx6{-webkit-animation-name:swipe-module_slideBottom__TBoZo;animation-name:swipe-module_slideBottom__TBoZo}.swipe-module_back-top__gJZv0{-webkit-animation-name:swipe-module_backTop__32loc;animation-name:swipe-module_backTop__32loc}.swipe-module_back-left__Wd3aY{-webkit-animation-name:swipe-module_backLeft__q89ub;animation-name:swipe-module_backLeft__q89ub}.swipe-module_back-right__Lgwz7{-webkit-animation-name:swipe-module_backRight__8t5Dm;animation-name:swipe-module_backRight__8t5Dm}.swipe-module_back-bottom__JRN-7{-webkit-animation-name:swipe-module_backBottom__lwR8B;animation-name:swipe-module_backBottom__lwR8B}@keyframes swipe-module_slideTop__-Bbap{0%{bottom:-100%}to{bottom:0}}@keyframes swipe-module_slideLeft__i24cS{0%{right:-100%}to{right:0}}@keyframes swipe-module_slideRight__swgSY{0%{left:-100%}to{left:0}}@keyframes swipe-module_slideBottom__TBoZo{0%{top:-100%}to{top:0}}@keyframes swipe-module_backTop__32loc{0%{bottom:0}to{bottom:-100%}}@keyframes swipe-module_backLeft__q89ub{0%{right:0}to{right:-100%}}@keyframes swipe-module_backRight__8t5Dm{0%{left:0}to{left:-100%}}@keyframes swipe-module_backBottom__lwR8B{0%{top:0}to{top:-100%}}";
|
|
7983
|
-
var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","
|
|
8375
|
+
var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","move-left":"swipe-module_move-left__4TDLs","move-right":"swipe-module_move-right__FrYo0","move-bottom":"swipe-module_move-bottom__eYDx6","back-top":"swipe-module_back-top__gJZv0","back-left":"swipe-module_back-left__Wd3aY","back-right":"swipe-module_back-right__Lgwz7","back-bottom":"swipe-module_back-bottom__JRN-7"};
|
|
7984
8376
|
styleInject(css_248z$2);
|
|
7985
8377
|
|
|
7986
8378
|
// import React, { useEffect, useRef } from 'react';
|
|
8379
|
+
// import ReactDOM from 'react-dom/client';
|
|
8380
|
+
// import PropTypes from 'prop-types';
|
|
8381
|
+
|
|
7987
8382
|
let swipeCount = 0;
|
|
7988
8383
|
const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
7989
8384
|
const {
|
|
@@ -8321,7 +8716,7 @@ const SvgNextarrow = ({
|
|
|
8321
8716
|
}));
|
|
8322
8717
|
|
|
8323
8718
|
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;outline:none}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}.pagination-module_show-offset-block__ksPGm{height:34px;margin-left:10px!important;margin-right:4px!important;width:91px}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
|
|
8324
|
-
var styles$1 = {"
|
|
8719
|
+
var styles$1 = {"pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
8325
8720
|
styleInject(css_248z$1);
|
|
8326
8721
|
|
|
8327
8722
|
const Pagination = ({
|
|
@@ -8696,7 +9091,6 @@ var styles = {"auto-complete":"autocomplete-module_auto-complete__oUOv9"};
|
|
|
8696
9091
|
styleInject(css_248z);
|
|
8697
9092
|
|
|
8698
9093
|
const Autocomplete = ({
|
|
8699
|
-
label,
|
|
8700
9094
|
change,
|
|
8701
9095
|
options,
|
|
8702
9096
|
getItem,
|
|
@@ -8707,37 +9101,28 @@ const Autocomplete = ({
|
|
|
8707
9101
|
errorStyle,
|
|
8708
9102
|
errorWeight,
|
|
8709
9103
|
errorFamily,
|
|
8710
|
-
labelSize,
|
|
8711
|
-
labelStyle,
|
|
8712
9104
|
marginTop,
|
|
8713
9105
|
errorColor,
|
|
8714
|
-
labelColor,
|
|
8715
|
-
labelWeight,
|
|
8716
9106
|
placeHolder,
|
|
8717
9107
|
errorMessage,
|
|
8718
9108
|
autoComplete,
|
|
8719
|
-
labelDisplay,
|
|
8720
9109
|
contentDisplay,
|
|
8721
9110
|
contentTopSize,
|
|
8722
9111
|
contentTopStyle,
|
|
8723
9112
|
contentTopFamily,
|
|
8724
9113
|
contentPosition,
|
|
8725
9114
|
contentTopColor,
|
|
8726
|
-
labelLineHeight,
|
|
8727
|
-
labelFontFamily,
|
|
8728
9115
|
contentDirection,
|
|
8729
9116
|
contentTopWeight,
|
|
8730
9117
|
contentTopRadius,
|
|
8731
9118
|
contentTopHeight,
|
|
8732
9119
|
contentTopBorder,
|
|
8733
|
-
labelMarginBottom,
|
|
8734
9120
|
contentTopDisplay,
|
|
8735
9121
|
contentTopPadding,
|
|
8736
9122
|
contentBottomLeft,
|
|
8737
9123
|
innerErrorPadding,
|
|
8738
9124
|
showOptionDuration,
|
|
8739
9125
|
contentTopMaxWidth,
|
|
8740
|
-
labelTextTransform,
|
|
8741
9126
|
contentBottomWidth,
|
|
8742
9127
|
contentBottomZindex,
|
|
8743
9128
|
contentBottomRadius,
|
|
@@ -8774,6 +9159,26 @@ const Autocomplete = ({
|
|
|
8774
9159
|
contentBottomRowBackgroundColor,
|
|
8775
9160
|
contentBottomRowHoverBackgroundColor,
|
|
8776
9161
|
backgroundDisableColor,
|
|
9162
|
+
label,
|
|
9163
|
+
labelSize,
|
|
9164
|
+
labelStyle,
|
|
9165
|
+
labelColor,
|
|
9166
|
+
labelWeight,
|
|
9167
|
+
labelDisplay,
|
|
9168
|
+
labelLineHeight,
|
|
9169
|
+
labelFontFamily,
|
|
9170
|
+
labelMarginBottom,
|
|
9171
|
+
labelTextTransform,
|
|
9172
|
+
iconRequired,
|
|
9173
|
+
useLabelTooltip,
|
|
9174
|
+
labelTooltipColor,
|
|
9175
|
+
labelTooltipPadding,
|
|
9176
|
+
labelTooltipFontSize,
|
|
9177
|
+
labelTooltipFontStyle,
|
|
9178
|
+
labelTooltipFontFamily,
|
|
9179
|
+
labelTooltipFontWeight,
|
|
9180
|
+
labelTooltipBorderRadius,
|
|
9181
|
+
labelTooltipBackgroundColor,
|
|
8777
9182
|
searchCount = 3,
|
|
8778
9183
|
disabled = false,
|
|
8779
9184
|
keyNames = {
|
|
@@ -8782,14 +9187,18 @@ const Autocomplete = ({
|
|
|
8782
9187
|
},
|
|
8783
9188
|
...props
|
|
8784
9189
|
}) => {
|
|
9190
|
+
const labelRef = useRef(null);
|
|
9191
|
+
const parentRef = useRef(null);
|
|
8785
9192
|
const [id, setId] = useState('');
|
|
8786
9193
|
const [show, setShow] = useState(false);
|
|
9194
|
+
const [removeID, setRemoveID] = useState('');
|
|
8787
9195
|
const [isHover, setIsHover] = useState(false);
|
|
8788
9196
|
const [isFocus, setIsFocus] = useState(false);
|
|
8789
9197
|
const [innerError, setInnerError] = useState('');
|
|
8790
9198
|
const [innerValue, setInnerValue] = useState('');
|
|
8791
|
-
const [innerOptions, setInnerOptions] = useState([]);
|
|
8792
9199
|
const [classProps, setClassProps] = useState({});
|
|
9200
|
+
const [tooltipElem, setTooltipElem] = useState(null);
|
|
9201
|
+
const [innerOptions, setInnerOptions] = useState([]);
|
|
8793
9202
|
const [configStyles, setConfigStyles] = useState({});
|
|
8794
9203
|
const showOption = keyframes`
|
|
8795
9204
|
100% {
|
|
@@ -8904,6 +9313,79 @@ const Autocomplete = ({
|
|
|
8904
9313
|
backgroundColor: innerErrorBackgroundColor ?? configStyles.AUTOCOMPLETE.innerError.colors.background
|
|
8905
9314
|
}
|
|
8906
9315
|
}, innerValue.length >= searchCount ? 'Նման տվյալ առկա չէ' : `Լրացնել առնվազն ${searchCount} նիշ`) : '');
|
|
9316
|
+
const getRenderedTextWidth = element => {
|
|
9317
|
+
const clone = element.cloneNode(true);
|
|
9318
|
+
clone.style.width = 'fit-content';
|
|
9319
|
+
document.body.appendChild(clone);
|
|
9320
|
+
const width = clone.offsetWidth;
|
|
9321
|
+
document.body.removeChild(clone);
|
|
9322
|
+
return width;
|
|
9323
|
+
};
|
|
9324
|
+
const handleLabelMouseEnter = event => {
|
|
9325
|
+
event.preventDefault();
|
|
9326
|
+
setRemoveID(() => v4());
|
|
9327
|
+
if (labelRef.current) {
|
|
9328
|
+
const parentElem = parentRef.current.getBoundingClientRect();
|
|
9329
|
+
const rect = labelRef.current.getBoundingClientRect();
|
|
9330
|
+
const top = rect.top;
|
|
9331
|
+
const left = rect.left;
|
|
9332
|
+
const height = rect.height;
|
|
9333
|
+
const elementWidth = rect.width;
|
|
9334
|
+
const x = event.clientX - rect.left;
|
|
9335
|
+
const parentWidth = parentElem.width;
|
|
9336
|
+
const textWidth = getRenderedTextWidth(labelRef.current);
|
|
9337
|
+
if (textWidth > Math.ceil(elementWidth)) {
|
|
9338
|
+
const newTooltipElem = document.createElement('div');
|
|
9339
|
+
newTooltipElem.id = `fake_id_for_remove_dom${removeID}`;
|
|
9340
|
+
const newTootltipTextElem = document.createElement('p');
|
|
9341
|
+
const newTooltipChildElem = document.createElement('div');
|
|
9342
|
+
const newTooltipDecorElem = document.createElement('div');
|
|
9343
|
+
newTooltipElem.style.position = 'fixed';
|
|
9344
|
+
newTooltipElem.style.left = left + 'px';
|
|
9345
|
+
newTooltipElem.style.paddingTop = '20px';
|
|
9346
|
+
newTooltipElem.style.height = 'fit-content';
|
|
9347
|
+
newTooltipElem.style.boxSizing = 'border-box';
|
|
9348
|
+
newTooltipElem.style.top = top + height + 'px';
|
|
9349
|
+
newTooltipElem.style.width = parentWidth + 'px';
|
|
9350
|
+
newTooltipChildElem.style.width = '100%';
|
|
9351
|
+
newTooltipChildElem.style.position = 'relative';
|
|
9352
|
+
newTooltipChildElem.style.height = 'fit-content';
|
|
9353
|
+
newTooltipChildElem.style.boxSizing = 'border-box';
|
|
9354
|
+
newTooltipChildElem.style.padding = labelTooltipPadding ?? configStyles.FILE.label.tooltip.padding;
|
|
9355
|
+
newTooltipChildElem.style.borderRadius = labelTooltipBorderRadius ?? configStyles.FILE.label.tooltip.borderRadius;
|
|
9356
|
+
newTooltipChildElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.FILE.label.tooltip.backgroundColor;
|
|
9357
|
+
newTooltipDecorElem.style.zIndex = -1;
|
|
9358
|
+
newTooltipDecorElem.style.top = '-8px';
|
|
9359
|
+
newTooltipDecorElem.style.width = '18px';
|
|
9360
|
+
newTooltipDecorElem.style.height = '18px';
|
|
9361
|
+
newTooltipDecorElem.style.rotate = '45deg';
|
|
9362
|
+
newTooltipDecorElem.style.position = 'absolute';
|
|
9363
|
+
newTooltipDecorElem.style.left = x > elementWidth / 2 ? 'calc(100% - 40px)' : '23px';
|
|
9364
|
+
newTooltipDecorElem.style.backgroundColor = labelTooltipBackgroundColor ?? configStyles.FILE.label.tooltip.backgroundColor;
|
|
9365
|
+
newTootltipTextElem.innerText = label;
|
|
9366
|
+
newTootltipTextElem.style.color = labelTooltipColor ?? configStyles.FILE.label.tooltip.color;
|
|
9367
|
+
newTootltipTextElem.style.fontSize = labelTooltipFontSize ?? configStyles.FILE.label.tooltip.font.size;
|
|
9368
|
+
newTootltipTextElem.style.fontStyle = labelTooltipFontStyle ?? configStyles.FILE.label.tooltip.font.style;
|
|
9369
|
+
newTootltipTextElem.style.fontFamily = labelTooltipFontFamily ?? configStyles.FILE.label.tooltip.font.family;
|
|
9370
|
+
newTootltipTextElem.style.fontWeight = labelTooltipFontWeight ?? configStyles.FILE.label.tooltip.font.weight;
|
|
9371
|
+
document.body.appendChild(newTooltipElem);
|
|
9372
|
+
newTooltipElem.appendChild(newTooltipChildElem);
|
|
9373
|
+
newTooltipChildElem.appendChild(newTooltipDecorElem);
|
|
9374
|
+
newTooltipChildElem.appendChild(newTootltipTextElem);
|
|
9375
|
+
setTooltipElem(() => newTooltipElem);
|
|
9376
|
+
}
|
|
9377
|
+
}
|
|
9378
|
+
};
|
|
9379
|
+
const handleLabelMouseLeave = () => {
|
|
9380
|
+
const removableElem = document.getElementById(`fake_id_for_remove_dom${removeID}`);
|
|
9381
|
+
if (removableElem) {
|
|
9382
|
+
document.body.removeChild(removableElem);
|
|
9383
|
+
}
|
|
9384
|
+
if (tooltipElem) {
|
|
9385
|
+
document.body.removeChild(tooltipElem);
|
|
9386
|
+
}
|
|
9387
|
+
setRemoveID(() => '');
|
|
9388
|
+
};
|
|
8907
9389
|
useEffect(() => {
|
|
8908
9390
|
if (options === undefined) {
|
|
8909
9391
|
alert('Please add options prop');
|
|
@@ -8951,24 +9433,38 @@ const Autocomplete = ({
|
|
|
8951
9433
|
});
|
|
8952
9434
|
}, []);
|
|
8953
9435
|
return configStyles.AUTOCOMPLETE && /*#__PURE__*/React__default.createElement("div", {
|
|
9436
|
+
ref: parentRef,
|
|
8954
9437
|
className: classProps,
|
|
8955
9438
|
style: {
|
|
8956
9439
|
width: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
8957
9440
|
}
|
|
8958
|
-
}, label
|
|
9441
|
+
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
9442
|
+
style: {
|
|
9443
|
+
display: 'flex',
|
|
9444
|
+
maxWidth: '100%',
|
|
9445
|
+
width: 'fit-content',
|
|
9446
|
+
columnGap: '4px',
|
|
9447
|
+
justifyContent: 'flex-start'
|
|
9448
|
+
}
|
|
9449
|
+
}, /*#__PURE__*/React__default.createElement("label", {
|
|
9450
|
+
ref: labelRef,
|
|
8959
9451
|
style: {
|
|
8960
9452
|
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
8961
9453
|
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
8962
|
-
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth,
|
|
8963
9454
|
fontSize: labelSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
8964
9455
|
fontStyle: labelStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
8965
9456
|
fontWeight: labelWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
8966
9457
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
8967
9458
|
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
8968
9459
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
8969
|
-
textTransform: labelTextTransform ?? configStyles.AUTOCOMPLETE.label.textTransform
|
|
8970
|
-
|
|
8971
|
-
|
|
9460
|
+
textTransform: labelTextTransform ?? configStyles.AUTOCOMPLETE.label.textTransform,
|
|
9461
|
+
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'nowrap' : 'normal',
|
|
9462
|
+
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'hidden' : 'visible',
|
|
9463
|
+
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? 'ellipsis' : ''
|
|
9464
|
+
},
|
|
9465
|
+
onMouseEnter: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? handleLabelMouseEnter : _ => _,
|
|
9466
|
+
onMouseLeave: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.AUTOCOMPLETE.label.useTooltip) ? handleLabelMouseLeave : _ => _
|
|
9467
|
+
}, label), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
8972
9468
|
style: {
|
|
8973
9469
|
display: contentDisplay ?? configStyles.AUTOCOMPLETE.parent.display,
|
|
8974
9470
|
position: contentPosition ?? configStyles.AUTOCOMPLETE.parent.position,
|
|
@@ -9044,6 +9540,7 @@ Autocomplete.propTypes = {
|
|
|
9044
9540
|
errorMessage: PropTypes.string,
|
|
9045
9541
|
labelDisplay: PropTypes.string,
|
|
9046
9542
|
autoComplete: PropTypes.string,
|
|
9543
|
+
iconRequired: PropTypes.element,
|
|
9047
9544
|
contentDisplay: PropTypes.string,
|
|
9048
9545
|
contentTopSize: PropTypes.string,
|
|
9049
9546
|
contentTopStyle: PropTypes.string,
|
|
@@ -9103,6 +9600,15 @@ Autocomplete.propTypes = {
|
|
|
9103
9600
|
contentBottomBackgroundColor: PropTypes.string,
|
|
9104
9601
|
contentBottomRowBackgroundColor: PropTypes.string,
|
|
9105
9602
|
contentBottomRowHoverBackgroundColor: PropTypes.string,
|
|
9603
|
+
useLabelTooltip: PropTypes.bool,
|
|
9604
|
+
labelTooltipColor: PropTypes.string,
|
|
9605
|
+
labelTooltipPadding: PropTypes.string,
|
|
9606
|
+
labelTooltipFontSize: PropTypes.string,
|
|
9607
|
+
labelTooltipFontStyle: PropTypes.string,
|
|
9608
|
+
labelTooltipFontFamily: PropTypes.string,
|
|
9609
|
+
labelTooltipFontWeight: PropTypes.string,
|
|
9610
|
+
labelTooltipBorderRadius: PropTypes.string,
|
|
9611
|
+
labelTooltipBackgroundColor: PropTypes.string,
|
|
9106
9612
|
backgroundDisableColor: PropTypes.string
|
|
9107
9613
|
};
|
|
9108
9614
|
|