@xaypay/tui 0.3.0 → 0.3.2
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/CHANGELOG.md +47 -0
- package/dist/index.es.js +678 -434
- package/dist/index.js +678 -434
- package/package.json +1 -1
- package/tui.config.js +15 -11
package/dist/index.es.js
CHANGED
|
@@ -624,6 +624,7 @@ var packageResult = {
|
|
|
624
624
|
marginTop: '10px',
|
|
625
625
|
iconMargin: '10px',
|
|
626
626
|
lineHeight: '19px',
|
|
627
|
+
inContent: false,
|
|
627
628
|
box: {
|
|
628
629
|
shadow: '0 0 0 1px #F20918'
|
|
629
630
|
},
|
|
@@ -827,6 +828,7 @@ var packageResult = {
|
|
|
827
828
|
colors: {
|
|
828
829
|
hover: '#373538',
|
|
829
830
|
background: presetColors.extraLight,
|
|
831
|
+
placeholderDisable: presetColors.dark,
|
|
830
832
|
backgroundDisable: presetColors.secondary
|
|
831
833
|
},
|
|
832
834
|
font: {
|
|
@@ -865,6 +867,7 @@ var packageResult = {
|
|
|
865
867
|
color: 'rgb(238, 0, 0)',
|
|
866
868
|
marginTop: '10px',
|
|
867
869
|
zIndex: 10,
|
|
870
|
+
inContent: false,
|
|
868
871
|
box: {
|
|
869
872
|
shadow: `0 0 0 2px ${presetColors.danger}`
|
|
870
873
|
},
|
|
@@ -895,7 +898,8 @@ var packageResult = {
|
|
|
895
898
|
sizing: boxSizing,
|
|
896
899
|
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
897
900
|
// like border
|
|
898
|
-
|
|
901
|
+
width: '2px',
|
|
902
|
+
// like border width
|
|
899
903
|
colors: {
|
|
900
904
|
hover: `0 0 0 2px ${presetColors.dark}`,
|
|
901
905
|
// like border color
|
|
@@ -1048,6 +1052,7 @@ var packageResult = {
|
|
|
1048
1052
|
error: {
|
|
1049
1053
|
color: presetColors.danger,
|
|
1050
1054
|
marginTop: '10px',
|
|
1055
|
+
inContent: false,
|
|
1051
1056
|
font: {
|
|
1052
1057
|
...fontObject
|
|
1053
1058
|
},
|
|
@@ -1083,10 +1088,9 @@ var packageResult = {
|
|
|
1083
1088
|
width: '27.8rem',
|
|
1084
1089
|
height: 'auto'
|
|
1085
1090
|
},
|
|
1086
|
-
or: 'կամ',
|
|
1087
1091
|
upload: 'Բեռնել',
|
|
1088
1092
|
uploadColor: presetColors.success,
|
|
1089
|
-
putFileHere: 'Տեղադրել ֆայլը այստեղ',
|
|
1093
|
+
putFileHere: 'Տեղադրել ֆայլը այստեղ կամ',
|
|
1090
1094
|
sizeText: 'Առավելագույնը',
|
|
1091
1095
|
timeForRemoveError: 4000,
|
|
1092
1096
|
extentionsRowMarginTop: '40px',
|
|
@@ -1130,11 +1134,13 @@ var packageResult = {
|
|
|
1130
1134
|
},
|
|
1131
1135
|
error: {
|
|
1132
1136
|
color: presetColors.danger,
|
|
1137
|
+
marginTop: '6px',
|
|
1133
1138
|
font: {
|
|
1134
1139
|
...fontObject
|
|
1135
1140
|
},
|
|
1136
1141
|
format: 'ֆայլի սխալ ֆորմատ',
|
|
1137
1142
|
maxSize: 'Առավելագույն ծավալ',
|
|
1143
|
+
formatValidate: 'Վնասված ֆայլ',
|
|
1138
1144
|
noChoosenFile: 'Ֆայլը ընտրված չէ'
|
|
1139
1145
|
},
|
|
1140
1146
|
progress: {
|
|
@@ -1202,10 +1208,9 @@ var packageResult = {
|
|
|
1202
1208
|
height: '',
|
|
1203
1209
|
maxWidth: '95%',
|
|
1204
1210
|
minWidth: '320px',
|
|
1205
|
-
maxHeight: '
|
|
1211
|
+
maxHeight: '95dvh',
|
|
1206
1212
|
minHeight: '200px',
|
|
1207
|
-
|
|
1208
|
-
noScroll: false,
|
|
1213
|
+
underScroll: false,
|
|
1209
1214
|
padding: '20px 20px 20px',
|
|
1210
1215
|
className: '',
|
|
1211
1216
|
alignItems: 'center',
|
|
@@ -1215,7 +1220,8 @@ var packageResult = {
|
|
|
1215
1220
|
border: {
|
|
1216
1221
|
width: '20px',
|
|
1217
1222
|
style: 'solid',
|
|
1218
|
-
color: transparent
|
|
1223
|
+
color: transparent,
|
|
1224
|
+
radius: '14px'
|
|
1219
1225
|
},
|
|
1220
1226
|
colors: {
|
|
1221
1227
|
background: 'white',
|
|
@@ -1259,8 +1265,8 @@ var packageResult = {
|
|
|
1259
1265
|
// default properties for <SwipeModal /> component
|
|
1260
1266
|
SWIPEMODAL: {
|
|
1261
1267
|
width: '300px',
|
|
1262
|
-
height: '
|
|
1263
|
-
|
|
1268
|
+
height: '100dvh',
|
|
1269
|
+
underScroll: false,
|
|
1264
1270
|
titleStyle: {
|
|
1265
1271
|
color: '#1C212D',
|
|
1266
1272
|
textAlign: 'left',
|
|
@@ -1272,7 +1278,7 @@ var packageResult = {
|
|
|
1272
1278
|
},
|
|
1273
1279
|
parent: {
|
|
1274
1280
|
width: '100%',
|
|
1275
|
-
height: '
|
|
1281
|
+
height: '100dvh',
|
|
1276
1282
|
colors: {
|
|
1277
1283
|
background: 'rgba(60, 61, 70, 0.2)'
|
|
1278
1284
|
}
|
|
@@ -1845,16 +1851,15 @@ styleInject(css_248z$d);
|
|
|
1845
1851
|
|
|
1846
1852
|
// eslint-disable-next-line react/display-name
|
|
1847
1853
|
const File = /*#__PURE__*/forwardRef(({
|
|
1848
|
-
or,
|
|
1849
|
-
size,
|
|
1850
1854
|
name,
|
|
1851
1855
|
color,
|
|
1852
|
-
style,
|
|
1853
|
-
weight,
|
|
1854
|
-
family,
|
|
1855
1856
|
height,
|
|
1856
|
-
radius,
|
|
1857
1857
|
change,
|
|
1858
|
+
fontSize,
|
|
1859
|
+
fontStyle,
|
|
1860
|
+
fontFamily,
|
|
1861
|
+
fontWeight,
|
|
1862
|
+
borderRadius,
|
|
1858
1863
|
borderWidth,
|
|
1859
1864
|
borderStyle,
|
|
1860
1865
|
borderColor,
|
|
@@ -1864,17 +1869,18 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1864
1869
|
multiple,
|
|
1865
1870
|
required,
|
|
1866
1871
|
className,
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1872
|
+
errorFontSize,
|
|
1873
|
+
errorFontStyle,
|
|
1874
|
+
errorFontWeight,
|
|
1875
|
+
errorFontFamily,
|
|
1876
|
+
errorMarginTop,
|
|
1871
1877
|
label,
|
|
1872
|
-
labelSize,
|
|
1873
1878
|
labelColor,
|
|
1874
|
-
labelStyle,
|
|
1875
|
-
labelWeight,
|
|
1876
|
-
labelFamily,
|
|
1877
1879
|
lableShowMore,
|
|
1880
|
+
labelFontSize,
|
|
1881
|
+
labelFontStyle,
|
|
1882
|
+
labelFontWeight,
|
|
1883
|
+
labelFontFamily,
|
|
1878
1884
|
labelShowLessText,
|
|
1879
1885
|
labelShowMoreText,
|
|
1880
1886
|
showMoreTextColor,
|
|
@@ -1896,6 +1902,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1896
1902
|
uploadColor,
|
|
1897
1903
|
defaultData,
|
|
1898
1904
|
formatError,
|
|
1905
|
+
formatValidateError,
|
|
1899
1906
|
errorIcon,
|
|
1900
1907
|
errorIconShow,
|
|
1901
1908
|
errorMessage,
|
|
@@ -1979,20 +1986,242 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1979
1986
|
const [tooltipElem, setTooltipElem] = useState(null);
|
|
1980
1987
|
const [choosenFileCount, setChoosenFileCount] = useState(0);
|
|
1981
1988
|
const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url.startsWith('data:image/heif') || defaultData.url.startsWith('data:image/heic') || defaultData.url.startsWith('data:application/octet-stream') ? 'heic' : defaultData.url : 'pdf' : null : null);
|
|
1982
|
-
const
|
|
1989
|
+
const handleCheckFileFormat = async (file, type) => {
|
|
1983
1990
|
const buffer = await file.arrayBuffer();
|
|
1984
1991
|
const dataView = new DataView(buffer);
|
|
1985
|
-
if (
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1992
|
+
if (type === 'png') {
|
|
1993
|
+
if (dataView.byteLength < 8) {
|
|
1994
|
+
return Promise.reject();
|
|
1995
|
+
} else {
|
|
1996
|
+
if (dataView.getUint8(0) === 0x89 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x4E && dataView.getUint8(3) === 0x47 && dataView.getUint8(4) === 0x0D && dataView.getUint8(5) === 0x0A && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0x0A) {
|
|
1997
|
+
const end = dataView.byteLength - 12;
|
|
1998
|
+
if (dataView.getUint8(end) === 0x00 && dataView.getUint8(end + 1) === 0x00 && dataView.getUint8(end + 2) === 0x00 && dataView.getUint8(end + 3) === 0x00 && dataView.getUint8(end + 4) === 0x49 && dataView.getUint8(end + 5) === 0x45 && dataView.getUint8(end + 6) === 0x4E && dataView.getUint8(end + 7) === 0x44 && dataView.getUint8(end + 8) === 0xAE && dataView.getUint8(end + 9) === 0x42 && dataView.getUint8(end + 10) === 0x60 && dataView.getUint8(end + 11) === 0x82) {
|
|
1999
|
+
return Promise.resolve();
|
|
2000
|
+
} else {
|
|
2001
|
+
return Promise.reject();
|
|
2002
|
+
}
|
|
2003
|
+
} else {
|
|
2004
|
+
return Promise.reject();
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
} else if (type === 'jpg') {
|
|
2008
|
+
if (dataView.byteLength < 2) {
|
|
2009
|
+
return Promise.reject();
|
|
2010
|
+
} else {
|
|
2011
|
+
if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8 && dataView.getUint8(dataView.byteLength - 2) === 0xFF && dataView.getUint8(dataView.byteLength - 1) === 0xD9) {
|
|
1991
2012
|
return Promise.resolve();
|
|
2013
|
+
} else {
|
|
2014
|
+
return Promise.reject();
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
} else if (type === 'svg') {
|
|
2018
|
+
if (dataView.byteLength < 8) return Promise.reject();
|
|
2019
|
+
const len = dataView.byteLength;
|
|
2020
|
+
let start = 0;
|
|
2021
|
+
let end = len - 1;
|
|
2022
|
+
const isWS = b => b === 0x20 || b === 0x09 || b === 0x0A || b === 0x0D;
|
|
2023
|
+
while (start < len && isWS(dataView.getUint8(start))) start++;
|
|
2024
|
+
const scanLimit = Math.min(len, start + 4096);
|
|
2025
|
+
let foundSvgOpen = false;
|
|
2026
|
+
for (let i = start; i <= scanLimit - 4; i++) {
|
|
2027
|
+
if (dataView.getUint8(i) === 0x3C && (dataView.getUint8(i + 1) === 0x73 || dataView.getUint8(i + 1) === 0x53) && (dataView.getUint8(i + 2) === 0x76 || dataView.getUint8(i + 2) === 0x56) && (dataView.getUint8(i + 3) === 0x67 || dataView.getUint8(i + 3) === 0x47)) {
|
|
2028
|
+
foundSvgOpen = true;
|
|
2029
|
+
break;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
if (!foundSvgOpen) return Promise.reject();
|
|
2033
|
+
while (end >= 0 && isWS(dataView.getUint8(end))) end--;
|
|
2034
|
+
if (end >= 5 && dataView.getUint8(end - 5) === 0x3C && dataView.getUint8(end - 4) === 0x2F && (dataView.getUint8(end - 3) === 0x73 || dataView.getUint8(end - 3) === 0x53) && (dataView.getUint8(end - 2) === 0x76 || dataView.getUint8(end - 2) === 0x56) && (dataView.getUint8(end - 1) === 0x67 || dataView.getUint8(end - 1) === 0x47) && dataView.getUint8(end) === 0x3E) {
|
|
2035
|
+
return Promise.resolve();
|
|
2036
|
+
} else {
|
|
2037
|
+
return Promise.reject();
|
|
2038
|
+
}
|
|
2039
|
+
} else if (type === 'docx') {
|
|
2040
|
+
const len = dataView.byteLength;
|
|
2041
|
+
if (len < 22) return Promise.reject();
|
|
2042
|
+
const isZipHeader = dataView.getUint8(0) === 0x50 && dataView.getUint8(1) === 0x4B && dataView.getUint8(2) === 0x03 && dataView.getUint8(3) === 0x04;
|
|
2043
|
+
if (!isZipHeader) return Promise.reject();
|
|
2044
|
+
const EOCD = [0x50, 0x4B, 0x05, 0x06];
|
|
2045
|
+
const maxBack = Math.min(len - 4, 0xFFFF + 22);
|
|
2046
|
+
let eocdIndex = -1;
|
|
2047
|
+
for (let i = len - 4; i >= len - 4 - maxBack; i--) {
|
|
2048
|
+
if (i < 0) break;
|
|
2049
|
+
if (dataView.getUint8(i) === EOCD[0] && dataView.getUint8(i + 1) === EOCD[1] && dataView.getUint8(i + 2) === EOCD[2] && dataView.getUint8(i + 3) === EOCD[3]) {
|
|
2050
|
+
eocdIndex = i;
|
|
2051
|
+
break;
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
if (eocdIndex === -1) return Promise.reject();
|
|
2055
|
+
const findAscii = needle => {
|
|
2056
|
+
const enc = new TextEncoder().encode(needle);
|
|
2057
|
+
for (let i = 0; i <= len - enc.length; i++) {
|
|
2058
|
+
let ok = true;
|
|
2059
|
+
for (let j = 0; j < enc.length; j++) {
|
|
2060
|
+
if (dataView.getUint8(i + j) !== enc[j]) {
|
|
2061
|
+
ok = false;
|
|
2062
|
+
break;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
if (ok) return true;
|
|
2066
|
+
}
|
|
2067
|
+
return false;
|
|
2068
|
+
};
|
|
2069
|
+
const hasContentTypes = findAscii('[Content_Types].xml');
|
|
2070
|
+
const hasRels = findAscii('_rels/.rels');
|
|
2071
|
+
const hasDocument = findAscii('word/document.xml');
|
|
2072
|
+
return hasContentTypes && hasRels && hasDocument ? Promise.resolve() : Promise.reject();
|
|
2073
|
+
} else if (type === 'doc') {
|
|
2074
|
+
const len = dataView.byteLength;
|
|
2075
|
+
if (len < 512) return Promise.reject();
|
|
2076
|
+
const FREESECT = 0xFFFFFFFF;
|
|
2077
|
+
const ENDOFCHAIN = 0xFFFFFFFE;
|
|
2078
|
+
const getU32 = off => dataView.getUint32(off, true);
|
|
2079
|
+
const getI32 = off => dataView.getInt32(off, true);
|
|
2080
|
+
const getU16 = off => dataView.getUint16(off, true);
|
|
2081
|
+
const sectorOffset = (sector, sectorSize) => (sector + 1) * sectorSize;
|
|
2082
|
+
const isOle = dataView.getUint8(0) === 0xD0 && dataView.getUint8(1) === 0xCF && dataView.getUint8(2) === 0x11 && dataView.getUint8(3) === 0xE0 && dataView.getUint8(4) === 0xA1 && dataView.getUint8(5) === 0xB1 && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0xE1;
|
|
2083
|
+
if (!isOle) return Promise.reject();
|
|
2084
|
+
if (dataView.getUint8(0x1C) !== 0xFE || dataView.getUint8(0x1D) !== 0xFF) {
|
|
2085
|
+
return Promise.reject();
|
|
2086
|
+
}
|
|
2087
|
+
const sectorShift = getU16(0x1E); // 9 => 512, 12 => 4096
|
|
2088
|
+
if (sectorShift !== 9 && sectorShift !== 12) return Promise.reject();
|
|
2089
|
+
const sectorSize = 1 << sectorShift;
|
|
2090
|
+
const firstDirSector = getI32(0x30);
|
|
2091
|
+
if (firstDirSector < 0) return Promise.reject();
|
|
2092
|
+
const dirStartOff = sectorOffset(firstDirSector, sectorSize);
|
|
2093
|
+
if (dirStartOff < 512 || dirStartOff + sectorSize > len) return Promise.reject();
|
|
2094
|
+
const numFATSectors = getU32(0x2C);
|
|
2095
|
+
let firstDIFATSector = getI32(0x44);
|
|
2096
|
+
let numDIFATSectors = getU32(0x48);
|
|
2097
|
+
const difat = [];
|
|
2098
|
+
for (let i = 0; i < 109; i++) {
|
|
2099
|
+
const sec = getU32(0x4C + i * 4);
|
|
2100
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2101
|
+
}
|
|
2102
|
+
const entriesPerDifatSector = sectorSize / 4 - 1;
|
|
2103
|
+
while (numDIFATSectors > 0 && firstDIFATSector !== -1 && firstDIFATSector !== ENDOFCHAIN) {
|
|
2104
|
+
const off = sectorOffset(firstDIFATSector, sectorSize);
|
|
2105
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2106
|
+
for (let i = 0; i < entriesPerDifatSector; i++) {
|
|
2107
|
+
const sec = dataView.getUint32(off + i * 4, true);
|
|
2108
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2109
|
+
}
|
|
2110
|
+
firstDIFATSector = dataView.getInt32(off + entriesPerDifatSector * 4, true); // next DIFAT
|
|
2111
|
+
numDIFATSectors--;
|
|
2112
|
+
}
|
|
2113
|
+
if (difat.length === 0 || numFATSectors === 0) return Promise.reject();
|
|
2114
|
+
const fat = [];
|
|
2115
|
+
for (let i = 0; i < difat.length; i++) {
|
|
2116
|
+
const fatSector = difat[i];
|
|
2117
|
+
const off = sectorOffset(fatSector, sectorSize);
|
|
2118
|
+
if (off < 512 || off + sectorSize > len) continue;
|
|
2119
|
+
for (let j = 0; j < sectorSize; j += 4) {
|
|
2120
|
+
fat.push(dataView.getUint32(off + j, true));
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
if (fat.length === 0) return Promise.reject();
|
|
2124
|
+
const nextSector = s => s >= 0 && s < fat.length ? fat[s] : ENDOFCHAIN;
|
|
2125
|
+
const names = new Set();
|
|
2126
|
+
const td = new TextDecoder("utf-16le");
|
|
2127
|
+
let dirSector = firstDirSector;
|
|
2128
|
+
let safety = 0;
|
|
2129
|
+
while (dirSector !== ENDOFCHAIN && dirSector !== FREESECT && safety++ < 10000) {
|
|
2130
|
+
const off = sectorOffset(dirSector, sectorSize);
|
|
2131
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2132
|
+
for (let pos = 0; pos < sectorSize; pos += 128) {
|
|
2133
|
+
const entryOff = off + pos;
|
|
2134
|
+
const nameLen = getU16(entryOff + 64);
|
|
2135
|
+
const objType = dataView.getUint8(entryOff + 66);
|
|
2136
|
+
if (objType === 0 || nameLen < 2 || nameLen > 64) continue;
|
|
2137
|
+
const nameBytes = new Uint8Array(dataView.buffer, dataView.byteOffset + entryOff, 64);
|
|
2138
|
+
const realLen = Math.max(0, nameLen - 2);
|
|
2139
|
+
const name = td.decode(nameBytes.slice(0, realLen)).replace(/\0/g, "");
|
|
2140
|
+
if (name) names.add(name);
|
|
2141
|
+
}
|
|
2142
|
+
dirSector = nextSector(dirSector);
|
|
2143
|
+
}
|
|
2144
|
+
const hasWordDocument = names.has("WordDocument");
|
|
2145
|
+
const hasTable = names.has("1Table") || names.has("0Table");
|
|
2146
|
+
return hasWordDocument && hasTable ? Promise.resolve() : Promise.reject();
|
|
2147
|
+
} else if (type === 'pdf') {
|
|
2148
|
+
const text = new TextDecoder().decode(buffer);
|
|
2149
|
+
if (!text.includes("%%EOF")) return Promise.reject();
|
|
2150
|
+
if (!text.startsWith("%PDF-")) return Promise.reject();
|
|
2151
|
+
if (!text.includes("startxref")) return Promise.reject();
|
|
2152
|
+
if (dataView.byteLength < 8) {
|
|
2153
|
+
return Promise.reject();
|
|
2154
|
+
} else {
|
|
2155
|
+
if (dataView.getUint8(0) === 0x25 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x44 && dataView.getUint8(3) === 0x46) {
|
|
2156
|
+
const len = dataView.byteLength;
|
|
2157
|
+
let end = len - 1;
|
|
2158
|
+
while (end >= 0 && (dataView.getUint8(end) === 0x0A || dataView.getUint8(end) === 0x0D || dataView.getUint8(end) === 0x20 || dataView.getUint8(end) === 0x09)) {
|
|
2159
|
+
end--;
|
|
2160
|
+
}
|
|
2161
|
+
if (end >= 4 && dataView.getUint8(end - 4) === 0x25 && dataView.getUint8(end - 3) === 0x25 && dataView.getUint8(end - 2) === 0x45 && dataView.getUint8(end - 1) === 0x4F && dataView.getUint8(end) === 0x46) {
|
|
2162
|
+
return Promise.resolve();
|
|
2163
|
+
} else {
|
|
2164
|
+
return Promise.reject();
|
|
2165
|
+
}
|
|
2166
|
+
} else {
|
|
2167
|
+
return Promise.reject();
|
|
1992
2168
|
}
|
|
1993
2169
|
}
|
|
2170
|
+
} else if (type === 'heic') {
|
|
2171
|
+
const length = dataView.byteLength;
|
|
2172
|
+
if (length < 32) {
|
|
2173
|
+
return Promise.reject();
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
// --- Check 'ftyp' at offset 4 ---
|
|
2177
|
+
if (dataView.getUint8(4) !== 0x66 ||
|
|
2178
|
+
// f
|
|
2179
|
+
dataView.getUint8(5) !== 0x74 ||
|
|
2180
|
+
// t
|
|
2181
|
+
dataView.getUint8(6) !== 0x79 ||
|
|
2182
|
+
// y
|
|
2183
|
+
dataView.getUint8(7) !== 0x70 // p
|
|
2184
|
+
) {
|
|
2185
|
+
return Promise.reject();
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
// --- Check major brand ---
|
|
2189
|
+
const majorBrand = String.fromCharCode(dataView.getUint8(8), dataView.getUint8(9), dataView.getUint8(10), dataView.getUint8(11));
|
|
2190
|
+
const validBrands = ['heic', 'heix', 'hevc', 'hevx', 'mif1', 'msf1', 'heif'];
|
|
2191
|
+
if (!validBrands.includes(majorBrand)) {
|
|
2192
|
+
return Promise.reject();
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
// --- Scan boxes (basic ISO BMFF parsing) ---
|
|
2196
|
+
let offset = 0;
|
|
2197
|
+
let foundMeta = false;
|
|
2198
|
+
let foundMdat = false;
|
|
2199
|
+
while (offset + 8 <= length) {
|
|
2200
|
+
const size = dataView.getUint32(offset);
|
|
2201
|
+
const type = String.fromCharCode(dataView.getUint8(offset + 4), dataView.getUint8(offset + 5), dataView.getUint8(offset + 6), dataView.getUint8(offset + 7));
|
|
2202
|
+
|
|
2203
|
+
// Invalid size → corrupted file
|
|
2204
|
+
if (size < 8 || offset + size > length) {
|
|
2205
|
+
return Promise.reject();
|
|
2206
|
+
}
|
|
2207
|
+
if (type === "meta") foundMeta = true;
|
|
2208
|
+
if (type === "mdat") foundMdat = true;
|
|
2209
|
+
offset += size;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
// --- Require at least meta box ---
|
|
2213
|
+
if (!foundMeta) {
|
|
2214
|
+
return Promise.reject();
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
// Optional but recommended
|
|
2218
|
+
if (!foundMdat) {
|
|
2219
|
+
return Promise.reject();
|
|
2220
|
+
}
|
|
2221
|
+
return Promise.resolve();
|
|
2222
|
+
} else {
|
|
2223
|
+
return Promise.reject();
|
|
1994
2224
|
}
|
|
1995
|
-
return Promise.reject();
|
|
1996
2225
|
};
|
|
1997
2226
|
const handleRemoveComponent = () => {
|
|
1998
2227
|
if (!multiple) {
|
|
@@ -2006,6 +2235,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2006
2235
|
setImage(null);
|
|
2007
2236
|
setSingleFile(null);
|
|
2008
2237
|
removeFile && removeFile(singleFile);
|
|
2238
|
+
error && setError('');
|
|
2009
2239
|
};
|
|
2010
2240
|
const handleUploadFiles = file => {
|
|
2011
2241
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
@@ -2022,43 +2252,24 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2022
2252
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2023
2253
|
if (file[ix]) {
|
|
2024
2254
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2025
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2255
|
+
if (fileExtensions.includes(file[ix].name.split('.')[file[ix].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].type.split('/')[1] === 'heif' || file[ix].type.split('/')[1] === 'heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[ix].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[ix].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[ix].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[ix].type.split('/')[1] === 'jpeg')) {
|
|
2256
|
+
let typeOfFile = '';
|
|
2026
2257
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2027
|
-
|
|
2028
|
-
id: '',
|
|
2029
|
-
check: '',
|
|
2030
|
-
status: '',
|
|
2031
|
-
file: file[ix],
|
|
2032
|
-
uuid: v4()
|
|
2033
|
-
});
|
|
2034
|
-
setImage('docx');
|
|
2258
|
+
typeOfFile = 'docx';
|
|
2035
2259
|
} else if (file[ix].type === 'application/msword') {
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2046
|
-
change({
|
|
2047
|
-
id: '',
|
|
2048
|
-
check: '',
|
|
2049
|
-
status: '',
|
|
2050
|
-
file: file[ix],
|
|
2051
|
-
uuid: v4()
|
|
2052
|
-
});
|
|
2053
|
-
setImage('heic');
|
|
2054
|
-
}).catch(() => {
|
|
2055
|
-
change({
|
|
2056
|
-
file: file[ix],
|
|
2057
|
-
uuid: v4(),
|
|
2058
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2059
|
-
});
|
|
2060
|
-
});
|
|
2260
|
+
typeOfFile = 'doc';
|
|
2261
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2262
|
+
typeOfFile = 'pdf';
|
|
2263
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2264
|
+
typeOfFile = 'heic';
|
|
2265
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2266
|
+
typeOfFile = 'jpg';
|
|
2267
|
+
} else if (file[ix].type === 'image/png') {
|
|
2268
|
+
typeOfFile = 'png';
|
|
2061
2269
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2270
|
+
typeOfFile = 'svg';
|
|
2271
|
+
}
|
|
2272
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2062
2273
|
change({
|
|
2063
2274
|
id: '',
|
|
2064
2275
|
check: '',
|
|
@@ -2066,16 +2277,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2066
2277
|
file: file[ix],
|
|
2067
2278
|
uuid: v4()
|
|
2068
2279
|
});
|
|
2069
|
-
setImage(
|
|
2070
|
-
}
|
|
2280
|
+
setImage(typeOfFile);
|
|
2281
|
+
}).catch(() => {
|
|
2071
2282
|
change({
|
|
2072
|
-
id: '',
|
|
2073
|
-
check: '',
|
|
2074
|
-
status: '',
|
|
2075
2283
|
file: file[ix],
|
|
2076
|
-
uuid: v4()
|
|
2284
|
+
uuid: v4(),
|
|
2285
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2077
2286
|
});
|
|
2078
|
-
}
|
|
2287
|
+
});
|
|
2079
2288
|
} else {
|
|
2080
2289
|
change({
|
|
2081
2290
|
file: file[ix],
|
|
@@ -2097,43 +2306,24 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2097
2306
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2098
2307
|
if (file[ix]) {
|
|
2099
2308
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2100
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2309
|
+
if (fileExtensions.includes(file[ix].name.split('.')[file[ix].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].type.split('/')[1] === 'heif' || file[ix].type.split('/')[1] === 'heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[ix].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[ix].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[ix].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[ix].type.split('/')[1] === 'jpeg')) {
|
|
2310
|
+
let typeOfFile = '';
|
|
2101
2311
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2102
|
-
|
|
2103
|
-
id: '',
|
|
2104
|
-
check: '',
|
|
2105
|
-
status: '',
|
|
2106
|
-
file: file[ix],
|
|
2107
|
-
uuid: v4()
|
|
2108
|
-
});
|
|
2109
|
-
setImage('docx');
|
|
2312
|
+
typeOfFile = 'docx';
|
|
2110
2313
|
} else if (file[ix].type === 'application/msword') {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2121
|
-
change({
|
|
2122
|
-
id: '',
|
|
2123
|
-
check: '',
|
|
2124
|
-
status: '',
|
|
2125
|
-
file: file[ix],
|
|
2126
|
-
uuid: v4()
|
|
2127
|
-
});
|
|
2128
|
-
setImage('heic');
|
|
2129
|
-
}).catch(() => {
|
|
2130
|
-
change({
|
|
2131
|
-
file: file[ix],
|
|
2132
|
-
uuid: v4(),
|
|
2133
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2134
|
-
});
|
|
2135
|
-
});
|
|
2314
|
+
typeOfFile = 'doc';
|
|
2315
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2316
|
+
typeOfFile = 'pdf';
|
|
2317
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2318
|
+
typeOfFile = 'heic';
|
|
2319
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2320
|
+
typeOfFile = 'jpg';
|
|
2321
|
+
} else if (file[ix].type === 'image/png') {
|
|
2322
|
+
typeOfFile = 'png';
|
|
2136
2323
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2324
|
+
typeOfFile = 'svg';
|
|
2325
|
+
}
|
|
2326
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2137
2327
|
change({
|
|
2138
2328
|
id: '',
|
|
2139
2329
|
check: '',
|
|
@@ -2141,16 +2331,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2141
2331
|
file: file[ix],
|
|
2142
2332
|
uuid: v4()
|
|
2143
2333
|
});
|
|
2144
|
-
setImage(
|
|
2145
|
-
}
|
|
2334
|
+
setImage(typeOfFile);
|
|
2335
|
+
}).catch(() => {
|
|
2146
2336
|
change({
|
|
2147
|
-
id: '',
|
|
2148
|
-
check: '',
|
|
2149
|
-
status: '',
|
|
2150
2337
|
file: file[ix],
|
|
2151
|
-
uuid: v4()
|
|
2338
|
+
uuid: v4(),
|
|
2339
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2152
2340
|
});
|
|
2153
|
-
}
|
|
2341
|
+
});
|
|
2154
2342
|
} else {
|
|
2155
2343
|
change({
|
|
2156
2344
|
file: file[ix],
|
|
@@ -2181,34 +2369,36 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2181
2369
|
} else {
|
|
2182
2370
|
if (file[0]) {
|
|
2183
2371
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2184
|
-
if (fileExtensions.includes(file[0].
|
|
2372
|
+
if (fileExtensions.includes(file[0].name.split('.')[file[0].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type.split('/')[1] === 'heif' || file[0].type.split('/')[1] === 'heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[0].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[0].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[0].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[0].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[0].type.split('/')[1] === 'jpeg')) {
|
|
2185
2373
|
setError('');
|
|
2374
|
+
let typeOfFile = '';
|
|
2186
2375
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2187
|
-
|
|
2188
|
-
change(file);
|
|
2189
|
-
setSingleFile(file);
|
|
2376
|
+
typeOfFile = 'docx';
|
|
2190
2377
|
} else if (file[0].type === 'application/msword') {
|
|
2191
|
-
|
|
2192
|
-
change(file);
|
|
2193
|
-
setSingleFile(file);
|
|
2378
|
+
typeOfFile = 'doc';
|
|
2194
2379
|
} else if (file[0].type === 'application/pdf') {
|
|
2195
|
-
|
|
2196
|
-
change(file);
|
|
2197
|
-
setSingleFile(file);
|
|
2380
|
+
typeOfFile = 'pdf';
|
|
2198
2381
|
} else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2382
|
+
typeOfFile = 'heic';
|
|
2383
|
+
} else if (file[0].type === 'image/jpeg') {
|
|
2384
|
+
typeOfFile = 'jpg';
|
|
2385
|
+
} else if (file[0].type === 'image/png') {
|
|
2386
|
+
typeOfFile = 'png';
|
|
2387
|
+
} else if (file[0].type === 'image/svg+xml') {
|
|
2388
|
+
typeOfFile = 'svg';
|
|
2389
|
+
}
|
|
2390
|
+
handleCheckFileFormat(file[0], typeOfFile).then(() => {
|
|
2391
|
+
if (typeOfFile === 'svg' || typeOfFile === 'png' || typeOfFile === 'jpg') {
|
|
2392
|
+
setImage(URL.createObjectURL(file[0]));
|
|
2393
|
+
} else {
|
|
2394
|
+
setImage(typeOfFile);
|
|
2395
|
+
}
|
|
2208
2396
|
change(file);
|
|
2209
2397
|
setSingleFile(file);
|
|
2210
|
-
|
|
2211
|
-
|
|
2398
|
+
}).catch(() => {
|
|
2399
|
+
setImage(null);
|
|
2400
|
+
setError(formatValidateError ?? configStyles.FILE.error.formatValidate);
|
|
2401
|
+
});
|
|
2212
2402
|
} else {
|
|
2213
2403
|
setImage(null);
|
|
2214
2404
|
setError(formatError ?? configStyles.FILE.error.format);
|
|
@@ -2465,10 +2655,10 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2465
2655
|
style: {
|
|
2466
2656
|
width: '100%',
|
|
2467
2657
|
color: labelColor ?? configStyles.FILE.label.color,
|
|
2468
|
-
fontSize:
|
|
2469
|
-
fontStyle:
|
|
2470
|
-
fontWeight:
|
|
2471
|
-
fontFamily:
|
|
2658
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2659
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2660
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2661
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2472
2662
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
2473
2663
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
2474
2664
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -2479,20 +2669,20 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2479
2669
|
}, label, handleCheckTextWidth('label') === 'more' && showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
2480
2670
|
className: styles$c['show-more-text'],
|
|
2481
2671
|
style: {
|
|
2482
|
-
fontSize:
|
|
2483
|
-
fontStyle:
|
|
2484
|
-
fontWeight:
|
|
2485
|
-
fontFamily:
|
|
2672
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2673
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2674
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2675
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2486
2676
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2487
2677
|
},
|
|
2488
2678
|
onClick: handleChangeShowMore
|
|
2489
2679
|
}, ' ', " ", labelShowLessText ?? configStyles.FILE.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth('label') === 'more' && !showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
2490
2680
|
className: styles$c['show-more-text'],
|
|
2491
2681
|
style: {
|
|
2492
|
-
fontSize:
|
|
2493
|
-
fontStyle:
|
|
2494
|
-
fontWeight:
|
|
2495
|
-
fontFamily:
|
|
2682
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2683
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2684
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2685
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2496
2686
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2497
2687
|
},
|
|
2498
2688
|
onClick: handleChangeShowMore
|
|
@@ -2513,9 +2703,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2513
2703
|
height: height ?? configStyles.FILE.height,
|
|
2514
2704
|
borderWidth: borderWidth ?? configStyles.FILE.border.width,
|
|
2515
2705
|
borderStyle: borderStyle ?? configStyles.FILE.border.style,
|
|
2516
|
-
borderRadius:
|
|
2706
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2517
2707
|
backgroundColor: backgroundColor ?? configStyles.FILE.colors.background,
|
|
2518
|
-
borderColor: error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2708
|
+
borderColor: !multiple && error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2519
2709
|
},
|
|
2520
2710
|
onDrop: handleDrop,
|
|
2521
2711
|
onClick: handleClick,
|
|
@@ -2540,10 +2730,10 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2540
2730
|
flexDirection: 'column',
|
|
2541
2731
|
justifyContent: 'center',
|
|
2542
2732
|
color: color ?? configStyles.FILE.color,
|
|
2543
|
-
fontSize:
|
|
2544
|
-
fontStyle:
|
|
2545
|
-
fontFamily:
|
|
2546
|
-
fontWeight:
|
|
2733
|
+
fontSize: fontSize ?? configStyles.FILE.font.size,
|
|
2734
|
+
fontStyle: fontStyle ?? configStyles.FILE.font.style,
|
|
2735
|
+
fontFamily: fontFamily ?? configStyles.FILE.font.family,
|
|
2736
|
+
fontWeight: fontWeight ?? configStyles.FILE.font.weight
|
|
2547
2737
|
}
|
|
2548
2738
|
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
2549
2739
|
src: image,
|
|
@@ -2560,7 +2750,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2560
2750
|
style: {
|
|
2561
2751
|
margin: '0px'
|
|
2562
2752
|
}
|
|
2563
|
-
}, putFileHere ?? configStyles.FILE.putFileHere,
|
|
2753
|
+
}, putFileHere ?? configStyles.FILE.putFileHere, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
2564
2754
|
style: {
|
|
2565
2755
|
color: uploadColor ?? configStyles.FILE.uploadColor
|
|
2566
2756
|
}
|
|
@@ -2595,11 +2785,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2595
2785
|
}, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default.createElement(Button, {
|
|
2596
2786
|
contentWidth: true,
|
|
2597
2787
|
onClick: _ => _,
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2788
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2789
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2790
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2791
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2792
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2603
2793
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2604
2794
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2605
2795
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2608,11 +2798,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2608
2798
|
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default.createElement(Button, {
|
|
2609
2799
|
contentWidth: true,
|
|
2610
2800
|
onClick: _ => _,
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2801
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2802
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2803
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2804
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2805
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2616
2806
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2617
2807
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2618
2808
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2657,8 +2847,8 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2657
2847
|
boxSizing: 'border-box',
|
|
2658
2848
|
alignItems: 'flex-start',
|
|
2659
2849
|
justifyContent: 'flex-end',
|
|
2660
|
-
borderRadius:
|
|
2661
|
-
display: !multiple && !disabled && image &&
|
|
2850
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2851
|
+
display: !multiple && !disabled && image && isHover ? 'flex' : 'none',
|
|
2662
2852
|
backgroundColor: hiddenBackgroundColor ?? configStyles.FILE.colors.backgroundHidden
|
|
2663
2853
|
},
|
|
2664
2854
|
onClick: handleStopPropagation
|
|
@@ -2667,16 +2857,16 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2667
2857
|
cursor: 'pointer'
|
|
2668
2858
|
},
|
|
2669
2859
|
onClick: handleRemoveFile
|
|
2670
|
-
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default.createElement("span", {
|
|
2860
|
+
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), !multiple && error ? /*#__PURE__*/React__default.createElement("span", {
|
|
2671
2861
|
style: {
|
|
2672
|
-
marginTop: '6px',
|
|
2673
|
-
color: errorColor ?? configStyles.FILE.error.color,
|
|
2674
|
-
fontSize: errorSize ?? configStyles.FILE.error.font.size,
|
|
2675
|
-
fontStyle: errorStyle ?? configStyles.FILE.error.font.style,
|
|
2676
|
-
fontWeight: errorWeight ?? configStyles.FILE.error.font.weight,
|
|
2677
|
-
fontFamily: errorFamily ?? configStyles.FILE.error.font.family,
|
|
2678
|
-
alignItems: 'center',
|
|
2679
2862
|
columnGap: '5px',
|
|
2863
|
+
alignItems: 'center',
|
|
2864
|
+
color: errorColor ?? configStyles.FILE.error.color,
|
|
2865
|
+
fontSize: errorFontSize ?? configStyles.FILE.error.font.size,
|
|
2866
|
+
marginTop: errorMarginTop ?? configStyles.FILE.error.marginTop,
|
|
2867
|
+
fontStyle: errorFontStyle ?? configStyles.FILE.error.font.style,
|
|
2868
|
+
fontWeight: errorFontWeight ?? configStyles.FILE.error.font.weight,
|
|
2869
|
+
fontFamily: errorFontFamily ?? configStyles.FILE.error.font.family,
|
|
2680
2870
|
display: errorIconShow && (errorIcon || configStyles.FILE.error?.icon) ? 'inline-flex' : 'inline-block'
|
|
2681
2871
|
}
|
|
2682
2872
|
}, errorIconShow ? errorIcon ? errorIcon : configStyles.FILE.error?.icon ? configStyles.FILE.error?.icon : '' : '', error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
@@ -2699,7 +2889,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2699
2889
|
iconDelItem: iconDeleteItem ?? configStyles.FILE.icon.deleteItem,
|
|
2700
2890
|
timeForRemoveError: timeForRemoveError,
|
|
2701
2891
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2702
|
-
radius:
|
|
2892
|
+
radius: borderRadius ?? configStyles.FILE.radius,
|
|
2703
2893
|
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2704
2894
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2705
2895
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
@@ -2723,34 +2913,33 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2723
2913
|
}));
|
|
2724
2914
|
});
|
|
2725
2915
|
File.propTypes = {
|
|
2726
|
-
or: PropTypes.string,
|
|
2727
|
-
size: PropTypes.string,
|
|
2728
2916
|
preview: PropTypes.bool,
|
|
2729
2917
|
label: PropTypes.string,
|
|
2730
2918
|
color: PropTypes.string,
|
|
2731
2919
|
height: PropTypes.string,
|
|
2732
2920
|
disabled: PropTypes.bool,
|
|
2733
|
-
|
|
2921
|
+
borderRadius: PropTypes.string,
|
|
2734
2922
|
borderWidth: PropTypes.string,
|
|
2735
2923
|
borderStyle: PropTypes.string,
|
|
2736
2924
|
borderColor: PropTypes.string,
|
|
2737
2925
|
required: PropTypes.bool,
|
|
2738
2926
|
upload: PropTypes.string,
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2927
|
+
fontSize: PropTypes.string,
|
|
2928
|
+
fontWeight: PropTypes.number,
|
|
2929
|
+
fontStyle: PropTypes.string,
|
|
2930
|
+
fontFamily: PropTypes.string,
|
|
2742
2931
|
maxSize: PropTypes.number,
|
|
2743
2932
|
maxWidth: PropTypes.string,
|
|
2744
2933
|
removeFile: PropTypes.func,
|
|
2745
2934
|
className: PropTypes.string,
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2935
|
+
errorFontSize: PropTypes.string,
|
|
2936
|
+
errorFontStyle: PropTypes.string,
|
|
2937
|
+
errorFontWeight: PropTypes.string,
|
|
2938
|
+
errorFontFamily: PropTypes.string,
|
|
2939
|
+
labelFontSize: PropTypes.string,
|
|
2940
|
+
labelFontStyle: PropTypes.string,
|
|
2941
|
+
labelFontWeight: PropTypes.string,
|
|
2942
|
+
labelFontFamily: PropTypes.string,
|
|
2754
2943
|
labelColor: PropTypes.string,
|
|
2755
2944
|
lableShowMore: PropTypes.bool,
|
|
2756
2945
|
labelShowLessText: PropTypes.string,
|
|
@@ -2768,6 +2957,7 @@ File.propTypes = {
|
|
|
2768
2957
|
labelTooltipBackgroundColor: PropTypes.string,
|
|
2769
2958
|
errorColor: PropTypes.string,
|
|
2770
2959
|
formatError: PropTypes.string,
|
|
2960
|
+
formatValidateError: PropTypes.string,
|
|
2771
2961
|
putFileHere: PropTypes.string,
|
|
2772
2962
|
uploadColor: PropTypes.string,
|
|
2773
2963
|
defaultData: PropTypes.object,
|
|
@@ -2775,6 +2965,7 @@ File.propTypes = {
|
|
|
2775
2965
|
maxSizeError: PropTypes.string,
|
|
2776
2966
|
errorIcon: PropTypes.element,
|
|
2777
2967
|
errorIconShow: PropTypes.bool,
|
|
2968
|
+
errorMarginTop: PropTypes.string,
|
|
2778
2969
|
errorMessage: PropTypes.string,
|
|
2779
2970
|
fileSizeText: PropTypes.string,
|
|
2780
2971
|
noChoosenFile: PropTypes.string,
|
|
@@ -3188,6 +3379,7 @@ const TD = ({
|
|
|
3188
3379
|
orderFontSize,
|
|
3189
3380
|
tBodyFontSize,
|
|
3190
3381
|
openListColor,
|
|
3382
|
+
tBodyFontStyle,
|
|
3191
3383
|
orderFontStyle,
|
|
3192
3384
|
tBodyTextAlign,
|
|
3193
3385
|
orderFontFamily,
|
|
@@ -3281,6 +3473,7 @@ const TD = ({
|
|
|
3281
3473
|
padding: tBodyPadding,
|
|
3282
3474
|
fontSize: tBodyFontSize,
|
|
3283
3475
|
borderRight: borderRight,
|
|
3476
|
+
fontStyle: tBodyFontStyle,
|
|
3284
3477
|
textAlign: tBodyTextAlign,
|
|
3285
3478
|
fontFamily: tBodyFontFamily,
|
|
3286
3479
|
fontWeight: tBodyFontWeight,
|
|
@@ -3574,7 +3767,7 @@ const Table = ({
|
|
|
3574
3767
|
tableColumnMaxWidth,
|
|
3575
3768
|
tableColumnMinWidth,
|
|
3576
3769
|
tHeadColor,
|
|
3577
|
-
|
|
3770
|
+
tHeadFontFamily,
|
|
3578
3771
|
tHeadPadding,
|
|
3579
3772
|
tHeadFontSize,
|
|
3580
3773
|
tHeadFontStyle,
|
|
@@ -3585,6 +3778,7 @@ const Table = ({
|
|
|
3585
3778
|
tBodyColor,
|
|
3586
3779
|
tBodyPadding,
|
|
3587
3780
|
tBodyFontSize,
|
|
3781
|
+
tBodyFontStyle,
|
|
3588
3782
|
tBodyTextAlign,
|
|
3589
3783
|
tBodyRowBorder,
|
|
3590
3784
|
tBodyBoxShadow,
|
|
@@ -4371,7 +4565,7 @@ const Table = ({
|
|
|
4371
4565
|
handleCheckedHeader: handleCheckedHeader,
|
|
4372
4566
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
4373
4567
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
4374
|
-
tHeadFamily:
|
|
4568
|
+
tHeadFamily: tHeadFontFamily ?? configStyles.TABLE.head.font.family,
|
|
4375
4569
|
tHeadPadding: tHeadPadding ?? configStyles.TABLE.head.padding,
|
|
4376
4570
|
tHeadFontSize: tHeadFontSize ?? configStyles.TABLE.head.font.size,
|
|
4377
4571
|
tHeadFontStyle: tHeadFontStyle ?? configStyles.TABLE.head.font.style,
|
|
@@ -4433,6 +4627,7 @@ const Table = ({
|
|
|
4433
4627
|
rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
|
|
4434
4628
|
tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
|
|
4435
4629
|
tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
|
|
4630
|
+
tBodyFontStyle: tBodyFontStyle ?? configStyles.TABLE.body.font.style,
|
|
4436
4631
|
tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
|
|
4437
4632
|
tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
|
|
4438
4633
|
tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
|
|
@@ -4509,7 +4704,7 @@ Table.propTypes = {
|
|
|
4509
4704
|
tableColumnMaxWidth: PropTypes.string,
|
|
4510
4705
|
tableColumnMinWidth: PropTypes.string,
|
|
4511
4706
|
tHeadColor: PropTypes.string,
|
|
4512
|
-
|
|
4707
|
+
tHeadFontFamily: PropTypes.string,
|
|
4513
4708
|
tHeadPadding: PropTypes.string,
|
|
4514
4709
|
tHeadFontSize: PropTypes.string,
|
|
4515
4710
|
tHeadFontStyle: PropTypes.string,
|
|
@@ -4520,6 +4715,7 @@ Table.propTypes = {
|
|
|
4520
4715
|
tBodyColor: PropTypes.string,
|
|
4521
4716
|
tBodyPadding: PropTypes.string,
|
|
4522
4717
|
tBodyFontSize: PropTypes.string,
|
|
4718
|
+
tBodyFontStyle: PropTypes.string,
|
|
4523
4719
|
tBodyBoxShadow: PropTypes.string,
|
|
4524
4720
|
tBodyTextAlign: PropTypes.string,
|
|
4525
4721
|
tBodyFontWeight: PropTypes.string,
|
|
@@ -4655,15 +4851,16 @@ const Modal = ({
|
|
|
4655
4851
|
data,
|
|
4656
4852
|
width,
|
|
4657
4853
|
loader,
|
|
4658
|
-
radius,
|
|
4659
4854
|
height,
|
|
4660
4855
|
padding,
|
|
4661
4856
|
setShow,
|
|
4857
|
+
underScroll,
|
|
4662
4858
|
zoomIcon,
|
|
4663
4859
|
prevIcon,
|
|
4664
4860
|
nextIcon,
|
|
4665
4861
|
closeIcon,
|
|
4666
4862
|
closeIconFix,
|
|
4863
|
+
borderRadius,
|
|
4667
4864
|
showCloseIcon,
|
|
4668
4865
|
closeIconClass,
|
|
4669
4866
|
closeSlideIcon,
|
|
@@ -4674,15 +4871,12 @@ const Modal = ({
|
|
|
4674
4871
|
minWidth,
|
|
4675
4872
|
minHeight,
|
|
4676
4873
|
className,
|
|
4677
|
-
|
|
4874
|
+
maxWidth,
|
|
4678
4875
|
alignItems,
|
|
4679
|
-
|
|
4876
|
+
maxHeight,
|
|
4680
4877
|
headerText,
|
|
4681
4878
|
imageWidth,
|
|
4682
|
-
headerSize,
|
|
4683
4879
|
headerIcon,
|
|
4684
|
-
headerStyle,
|
|
4685
|
-
headerFamily,
|
|
4686
4880
|
imageHeight,
|
|
4687
4881
|
headerColor,
|
|
4688
4882
|
borderStyle,
|
|
@@ -4691,13 +4885,16 @@ const Modal = ({
|
|
|
4691
4885
|
imageMargin,
|
|
4692
4886
|
showZoomIcon,
|
|
4693
4887
|
outsideClose,
|
|
4694
|
-
headerWeight,
|
|
4695
4888
|
headerHeight,
|
|
4696
4889
|
justifyContent,
|
|
4890
|
+
headerFontSize,
|
|
4697
4891
|
headerTextAlign,
|
|
4698
4892
|
backgroundColor,
|
|
4699
4893
|
imageWrapHeight,
|
|
4700
4894
|
grayDecorHeight,
|
|
4895
|
+
headerFontStyle,
|
|
4896
|
+
headerFontFamily,
|
|
4897
|
+
headerFontWeight,
|
|
4701
4898
|
headerIconMaxWidth,
|
|
4702
4899
|
headerIconMaxHeight,
|
|
4703
4900
|
layerBackgroundColor,
|
|
@@ -4805,7 +5002,17 @@ const Modal = ({
|
|
|
4805
5002
|
newConfigStyles = {
|
|
4806
5003
|
...data
|
|
4807
5004
|
};
|
|
4808
|
-
if (
|
|
5005
|
+
if (underScroll === undefined) {
|
|
5006
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5007
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
5008
|
+
document.head.appendChild(style);
|
|
5009
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
5010
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
5011
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
5012
|
+
passive: false
|
|
5013
|
+
});
|
|
5014
|
+
}
|
|
5015
|
+
} else if (underScroll === false) {
|
|
4809
5016
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
4810
5017
|
document.head.appendChild(style);
|
|
4811
5018
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -4826,7 +5033,17 @@ const Modal = ({
|
|
|
4826
5033
|
return () => {
|
|
4827
5034
|
setSelect(0);
|
|
4828
5035
|
setInnerData([]);
|
|
4829
|
-
if (
|
|
5036
|
+
if (underScroll === undefined) {
|
|
5037
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5038
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
5039
|
+
if (noScrllable) {
|
|
5040
|
+
style.remove();
|
|
5041
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
5042
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
5043
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
5044
|
+
}
|
|
5045
|
+
}
|
|
5046
|
+
} else if (underScroll === false) {
|
|
4830
5047
|
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
4831
5048
|
if (noScrllable) {
|
|
4832
5049
|
style.remove();
|
|
@@ -4850,7 +5067,7 @@ const Modal = ({
|
|
|
4850
5067
|
left: '0px',
|
|
4851
5068
|
zIndex: 999,
|
|
4852
5069
|
width: '100%',
|
|
4853
|
-
height: '
|
|
5070
|
+
height: '100dvh',
|
|
4854
5071
|
position: 'fixed',
|
|
4855
5072
|
backgroundColor: layerBackgroundColor ?? configStyles.MODAL.colors.backgroundLayer
|
|
4856
5073
|
}
|
|
@@ -4859,7 +5076,7 @@ const Modal = ({
|
|
|
4859
5076
|
position: 'relative',
|
|
4860
5077
|
display: 'flex',
|
|
4861
5078
|
width: '100%',
|
|
4862
|
-
height: '
|
|
5079
|
+
height: '100dvh',
|
|
4863
5080
|
alignItems: alignItems ?? configStyles.MODAL.alignItems,
|
|
4864
5081
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4865
5082
|
}
|
|
@@ -4873,10 +5090,10 @@ const Modal = ({
|
|
|
4873
5090
|
height: height ?? configStyles.MODAL.height,
|
|
4874
5091
|
display: type === 'content' ? 'grid' : 'block',
|
|
4875
5092
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
|
|
5093
|
+
maxWidth: maxWidth ?? configStyles.MODAL.maxWidth,
|
|
5094
|
+
maxHeight: maxHeight ?? configStyles.MODAL.maxHeight,
|
|
4879
5095
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
5096
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
4880
5097
|
minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
|
|
4881
5098
|
backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
|
|
4882
5099
|
minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
|
|
@@ -4913,11 +5130,11 @@ const Modal = ({
|
|
|
4913
5130
|
textOverflow: 'ellipsis',
|
|
4914
5131
|
margin: '0px 16px 0px 0px',
|
|
4915
5132
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4916
|
-
fontSize:
|
|
5133
|
+
fontSize: headerFontSize ?? configStyles.MODAL.header.font.size,
|
|
4917
5134
|
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4918
|
-
fontStyle:
|
|
4919
|
-
fontFamily:
|
|
4920
|
-
fontWeight:
|
|
5135
|
+
fontStyle: headerFontStyle ?? configStyles.MODAL.header.font.style,
|
|
5136
|
+
fontFamily: headerFontFamily ?? configStyles.MODAL.header.font.family,
|
|
5137
|
+
fontWeight: headerFontWeight ?? configStyles.MODAL.header.font.weight
|
|
4921
5138
|
}
|
|
4922
5139
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
4923
5140
|
onClick: () => setShow(false),
|
|
@@ -5009,7 +5226,7 @@ const Modal = ({
|
|
|
5009
5226
|
display: 'block',
|
|
5010
5227
|
objectFit: 'contain',
|
|
5011
5228
|
margin: imageMargin ?? configStyles.MODAL.image.margin,
|
|
5012
|
-
borderRadius:
|
|
5229
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
5013
5230
|
width: imageWidth ?? configStyles.MODAL.image.width,
|
|
5014
5231
|
height: imageHeight ?? configStyles.MODAL.image.height
|
|
5015
5232
|
},
|
|
@@ -5072,12 +5289,12 @@ Modal.propTypes = {
|
|
|
5072
5289
|
type: PropTypes.string,
|
|
5073
5290
|
setShow: PropTypes.func,
|
|
5074
5291
|
width: PropTypes.string,
|
|
5075
|
-
radius: PropTypes.string,
|
|
5076
5292
|
height: PropTypes.string,
|
|
5077
5293
|
padding: PropTypes.string,
|
|
5078
5294
|
selected: PropTypes.number,
|
|
5079
5295
|
minWidth: PropTypes.string,
|
|
5080
|
-
|
|
5296
|
+
maxWidth: PropTypes.string,
|
|
5297
|
+
underScroll: PropTypes.bool,
|
|
5081
5298
|
minHeight: PropTypes.string,
|
|
5082
5299
|
className: PropTypes.string,
|
|
5083
5300
|
zoomIcon: PropTypes.element,
|
|
@@ -5086,21 +5303,22 @@ Modal.propTypes = {
|
|
|
5086
5303
|
closeIcon: PropTypes.element,
|
|
5087
5304
|
closeIconFix: PropTypes.bool,
|
|
5088
5305
|
showCloseIcon: PropTypes.bool,
|
|
5306
|
+
borderRadius: PropTypes.string,
|
|
5089
5307
|
closeIconClass: PropTypes.string,
|
|
5090
5308
|
closeSlideIcon: PropTypes.element,
|
|
5091
5309
|
closeIconTopPosition: PropTypes.string,
|
|
5092
5310
|
closeIconRightPosition: PropTypes.string,
|
|
5093
5311
|
headerText: PropTypes.string,
|
|
5094
|
-
|
|
5095
|
-
|
|
5312
|
+
headerFontSize: PropTypes.string,
|
|
5313
|
+
headerFontStyle: PropTypes.string,
|
|
5096
5314
|
headerIcon: PropTypes.element,
|
|
5097
|
-
|
|
5315
|
+
headerFontFamily: PropTypes.string,
|
|
5098
5316
|
headerTextAlign: PropTypes.string,
|
|
5099
5317
|
headerIconMaxWidth: PropTypes.string,
|
|
5100
5318
|
headerIconMaxHeight: PropTypes.string,
|
|
5101
5319
|
headerIconMarginRight: PropTypes.string,
|
|
5102
5320
|
alignItems: PropTypes.string,
|
|
5103
|
-
|
|
5321
|
+
maxHeight: PropTypes.string,
|
|
5104
5322
|
imageWidth: PropTypes.string,
|
|
5105
5323
|
outsideClose: PropTypes.bool,
|
|
5106
5324
|
showZoomIcon: PropTypes.bool,
|
|
@@ -5109,7 +5327,7 @@ Modal.propTypes = {
|
|
|
5109
5327
|
borderWidth: PropTypes.string,
|
|
5110
5328
|
headerColor: PropTypes.string,
|
|
5111
5329
|
imageHeight: PropTypes.string,
|
|
5112
|
-
|
|
5330
|
+
headerFontWeight: PropTypes.string,
|
|
5113
5331
|
headerHeight: PropTypes.string,
|
|
5114
5332
|
justifyContent: PropTypes.string,
|
|
5115
5333
|
backgroundColor: PropTypes.string,
|
|
@@ -5447,7 +5665,7 @@ const NumberInput = ({
|
|
|
5447
5665
|
});
|
|
5448
5666
|
};
|
|
5449
5667
|
|
|
5450
|
-
var css_248z$a = ".input-module_input-wrap__NunrE{
|
|
5668
|
+
var css_248z$a = ".input-module_input-wrap__NunrE{width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}.input-module_show-more-text__PQC9x{align-self:self-end;cursor:pointer}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)}}";
|
|
5451
5669
|
var styles$9 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","show-more-text":"input-module_show-more-text__PQC9x","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
|
|
5452
5670
|
styleInject(css_248z$a);
|
|
5453
5671
|
|
|
@@ -5466,60 +5684,61 @@ const P = styled.span`
|
|
|
5466
5684
|
`;
|
|
5467
5685
|
const Input = ({
|
|
5468
5686
|
ssn,
|
|
5469
|
-
size,
|
|
5470
5687
|
name,
|
|
5471
|
-
|
|
5688
|
+
fontSize,
|
|
5689
|
+
fontStyle,
|
|
5690
|
+
fontWeight,
|
|
5691
|
+
fontFamily,
|
|
5692
|
+
borderRadius,
|
|
5472
5693
|
color,
|
|
5473
5694
|
value,
|
|
5474
5695
|
width,
|
|
5475
5696
|
regexp,
|
|
5476
5697
|
height,
|
|
5477
|
-
radius,
|
|
5478
5698
|
change,
|
|
5479
|
-
weight,
|
|
5480
|
-
family,
|
|
5481
5699
|
padding,
|
|
5482
5700
|
telClass,
|
|
5483
5701
|
leftIcon,
|
|
5484
5702
|
required,
|
|
5485
5703
|
disabled,
|
|
5486
|
-
errorDots,
|
|
5487
|
-
errorIcon,
|
|
5488
5704
|
iconWidth,
|
|
5489
5705
|
rightIcon,
|
|
5490
5706
|
className,
|
|
5491
5707
|
boxSizing,
|
|
5492
5708
|
boxShadow,
|
|
5493
|
-
errorLeft,
|
|
5494
|
-
errorSize,
|
|
5495
5709
|
maxLength,
|
|
5496
5710
|
floatToFix,
|
|
5497
5711
|
minNumSize,
|
|
5498
5712
|
maxNumSize,
|
|
5499
|
-
errorColor,
|
|
5500
5713
|
withoutDot,
|
|
5501
|
-
errorStyle,
|
|
5502
5714
|
iconPadding,
|
|
5503
|
-
errorAction,
|
|
5504
5715
|
placeholder,
|
|
5505
|
-
errorZindex,
|
|
5506
|
-
errorWeight,
|
|
5507
|
-
errorFamily,
|
|
5508
5716
|
phoneDisplay,
|
|
5509
|
-
errorMessage,
|
|
5510
5717
|
autoComplete,
|
|
5511
5718
|
showLabelIcon,
|
|
5719
|
+
boxShadowHover,
|
|
5720
|
+
errorLeft,
|
|
5721
|
+
errorDots,
|
|
5722
|
+
errorIcon,
|
|
5723
|
+
errorColor,
|
|
5724
|
+
errorAction,
|
|
5725
|
+
errorZindex,
|
|
5726
|
+
errorMessage,
|
|
5512
5727
|
errorIconSide,
|
|
5513
5728
|
showErrorIcon,
|
|
5729
|
+
errorFontSize,
|
|
5514
5730
|
errorMarginTop,
|
|
5515
5731
|
errorBoxShadow,
|
|
5516
|
-
boxShadowHover,
|
|
5517
5732
|
errorClassName,
|
|
5518
|
-
|
|
5733
|
+
errorFontStyle,
|
|
5519
5734
|
errorLineHeight,
|
|
5735
|
+
errorIconMargin,
|
|
5736
|
+
errorFontWeight,
|
|
5737
|
+
errorFontFamily,
|
|
5738
|
+
errorInContent,
|
|
5739
|
+
phoneAlignItems,
|
|
5520
5740
|
numberMaxLength,
|
|
5521
5741
|
backgroundColor,
|
|
5522
|
-
errorIconMargin,
|
|
5523
5742
|
placeholderColor,
|
|
5524
5743
|
withZero = false,
|
|
5525
5744
|
regexpErrorMessage,
|
|
@@ -5531,19 +5750,19 @@ const Input = ({
|
|
|
5531
5750
|
backgroundDisableColor,
|
|
5532
5751
|
telBorderRightColorHover,
|
|
5533
5752
|
label,
|
|
5534
|
-
labelSize,
|
|
5535
5753
|
labelIcon,
|
|
5536
|
-
labelStyle,
|
|
5537
5754
|
labelColor,
|
|
5538
5755
|
labelAction,
|
|
5539
|
-
labelWeight,
|
|
5540
5756
|
labelDisplay,
|
|
5757
|
+
lableShowMore,
|
|
5541
5758
|
labelIconSide,
|
|
5759
|
+
labelFontSize,
|
|
5760
|
+
labelFontStyle,
|
|
5542
5761
|
labelIconMargin,
|
|
5762
|
+
labelFontWeight,
|
|
5543
5763
|
labelFontFamily,
|
|
5544
5764
|
labelLineHeight,
|
|
5545
5765
|
labelMarginBottom,
|
|
5546
|
-
lableShowMore,
|
|
5547
5766
|
labelShowLessText,
|
|
5548
5767
|
labelShowMoreText,
|
|
5549
5768
|
showMoreTextColor,
|
|
@@ -5580,10 +5799,10 @@ const Input = ({
|
|
|
5580
5799
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5581
5800
|
height: height ?? configStyles.INPUT.height,
|
|
5582
5801
|
padding: padding ?? configStyles.INPUT.padding,
|
|
5583
|
-
fontSize:
|
|
5584
|
-
fontStyle:
|
|
5585
|
-
fontWeight:
|
|
5586
|
-
fontFamily:
|
|
5802
|
+
fontSize: fontSize ?? configStyles.INPUT.font.size,
|
|
5803
|
+
fontStyle: fontStyle ?? configStyles.INPUT.font.style,
|
|
5804
|
+
fontWeight: fontWeight ?? configStyles.INPUT.font.weight,
|
|
5805
|
+
fontFamily: fontFamily ?? configStyles.INPUT.font.family,
|
|
5587
5806
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5588
5807
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : configStyles.INPUT.color,
|
|
5589
5808
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -5763,7 +5982,10 @@ const Input = ({
|
|
|
5763
5982
|
}, []);
|
|
5764
5983
|
return configStyles.INPUT && /*#__PURE__*/React__default.createElement("div", {
|
|
5765
5984
|
ref: parentRef,
|
|
5766
|
-
className: classProps
|
|
5985
|
+
className: classProps,
|
|
5986
|
+
style: {
|
|
5987
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'relative'
|
|
5988
|
+
}
|
|
5767
5989
|
}, /*#__PURE__*/React__default.createElement("style", null, `.tui-color-placeholder::placeholder {
|
|
5768
5990
|
color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
|
|
5769
5991
|
}`), label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5788,13 +6010,13 @@ const Input = ({
|
|
|
5788
6010
|
ref: labelRef,
|
|
5789
6011
|
style: {
|
|
5790
6012
|
color: labelColor ?? configStyles.INPUT.label.color,
|
|
5791
|
-
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
5792
|
-
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5793
6013
|
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
5794
|
-
|
|
6014
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6015
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
5795
6016
|
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5796
|
-
|
|
6017
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5797
6018
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
6019
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5798
6020
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
5799
6021
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
5800
6022
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -5805,9 +6027,9 @@ const Input = ({
|
|
|
5805
6027
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
5806
6028
|
className: styles$9['show-more-text'],
|
|
5807
6029
|
style: {
|
|
5808
|
-
fontSize:
|
|
5809
|
-
fontStyle:
|
|
5810
|
-
fontWeight:
|
|
6030
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6031
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6032
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5811
6033
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5812
6034
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5813
6035
|
},
|
|
@@ -5825,9 +6047,9 @@ const Input = ({
|
|
|
5825
6047
|
}) : '', handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
5826
6048
|
className: styles$9['show-more-text'],
|
|
5827
6049
|
style: {
|
|
5828
|
-
fontSize:
|
|
5829
|
-
fontStyle:
|
|
5830
|
-
fontWeight:
|
|
6050
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6051
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6052
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5831
6053
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5832
6054
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5833
6055
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -5837,7 +6059,7 @@ const Input = ({
|
|
|
5837
6059
|
className: `${styles$9['input-content']}`,
|
|
5838
6060
|
style: {
|
|
5839
6061
|
width: width ?? configStyles.INPUT.width,
|
|
5840
|
-
borderRadius:
|
|
6062
|
+
borderRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5841
6063
|
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
5842
6064
|
},
|
|
5843
6065
|
onMouseEnter: handleMouseEnter,
|
|
@@ -5853,8 +6075,8 @@ const Input = ({
|
|
|
5853
6075
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5854
6076
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5855
6077
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5856
|
-
borderTopLeftRadius:
|
|
5857
|
-
borderBottomLeftRadius:
|
|
6078
|
+
borderTopLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6079
|
+
borderBottomLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5858
6080
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5859
6081
|
}
|
|
5860
6082
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement(TelInput, {
|
|
@@ -5865,7 +6087,7 @@ const Input = ({
|
|
|
5865
6087
|
disabled: disabled,
|
|
5866
6088
|
inpStyles: inpStyles,
|
|
5867
6089
|
inpAttributes: inpAttributes,
|
|
5868
|
-
radius:
|
|
6090
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5869
6091
|
telClass: telClass ?? configStyles.INPUT.tel.className,
|
|
5870
6092
|
phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
|
|
5871
6093
|
phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
|
|
@@ -5890,7 +6112,7 @@ const Input = ({
|
|
|
5890
6112
|
minNumSize: minNumSize ? minNumSize : '',
|
|
5891
6113
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
5892
6114
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
5893
|
-
radius:
|
|
6115
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5894
6116
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5895
6117
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
5896
6118
|
}) : type === 'password' ? /*#__PURE__*/React__default.createElement(PassInput, {
|
|
@@ -5901,7 +6123,7 @@ const Input = ({
|
|
|
5901
6123
|
inputChange: change,
|
|
5902
6124
|
inpStyles: inpStyles,
|
|
5903
6125
|
inpAttributes: inpAttributes,
|
|
5904
|
-
radius:
|
|
6126
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5905
6127
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5906
6128
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5907
6129
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5912,7 +6134,7 @@ const Input = ({
|
|
|
5912
6134
|
inputChange: change,
|
|
5913
6135
|
inpStyles: inpStyles,
|
|
5914
6136
|
inpAttributes: inpAttributes,
|
|
5915
|
-
radius:
|
|
6137
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5916
6138
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5917
6139
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5918
6140
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5927,8 +6149,8 @@ const Input = ({
|
|
|
5927
6149
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5928
6150
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5929
6151
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5930
|
-
borderTopRightRadius:
|
|
5931
|
-
borderBottomRightRadius:
|
|
6152
|
+
borderTopRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6153
|
+
borderBottomRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5932
6154
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5933
6155
|
}
|
|
5934
6156
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
|
|
@@ -5938,16 +6160,17 @@ const Input = ({
|
|
|
5938
6160
|
margin: '0px',
|
|
5939
6161
|
display: 'flex',
|
|
5940
6162
|
alignItems: 'center',
|
|
5941
|
-
position: 'absolute',
|
|
6163
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'absolute',
|
|
5942
6164
|
width: width ?? configStyles.INPUT.width,
|
|
5943
6165
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
5944
6166
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5945
6167
|
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
5946
|
-
fontSize:
|
|
5947
|
-
fontStyle:
|
|
5948
|
-
fontFamily:
|
|
5949
|
-
fontWeight:
|
|
6168
|
+
fontSize: errorFontSize ?? configStyles.INPUT.error.font.size,
|
|
6169
|
+
fontStyle: errorFontStyle ?? configStyles.INPUT.error.font.style,
|
|
6170
|
+
fontFamily: errorFontFamily ?? configStyles.INPUT.error.font.family,
|
|
6171
|
+
fontWeight: errorFontWeight ?? configStyles.INPUT.error.font.weight,
|
|
5950
6172
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
6173
|
+
marginTop: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? errorMarginTop ?? configStyles.INPUT.error.marginTop : '0px',
|
|
5951
6174
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
5952
6175
|
transform: 'scale3d(1,1,1)'
|
|
5953
6176
|
},
|
|
@@ -5984,55 +6207,54 @@ const Input = ({
|
|
|
5984
6207
|
};
|
|
5985
6208
|
Input.propTypes = {
|
|
5986
6209
|
ssn: PropTypes.bool,
|
|
5987
|
-
size: PropTypes.string,
|
|
5988
6210
|
name: PropTypes.string,
|
|
5989
6211
|
change: PropTypes.func,
|
|
5990
|
-
|
|
6212
|
+
fontSize: PropTypes.string,
|
|
6213
|
+
fontStyle: PropTypes.string,
|
|
6214
|
+
fontWeight: PropTypes.string,
|
|
6215
|
+
fontFamily: PropTypes.string,
|
|
5991
6216
|
color: PropTypes.string,
|
|
5992
6217
|
width: PropTypes.string,
|
|
5993
6218
|
withZero: PropTypes.bool,
|
|
5994
|
-
weight: PropTypes.string,
|
|
5995
|
-
family: PropTypes.string,
|
|
5996
6219
|
required: PropTypes.bool,
|
|
5997
6220
|
disabled: PropTypes.bool,
|
|
5998
6221
|
height: PropTypes.string,
|
|
5999
|
-
radius: PropTypes.string,
|
|
6000
6222
|
padding: PropTypes.string,
|
|
6001
6223
|
cardNumber: PropTypes.bool,
|
|
6002
6224
|
withoutDot: PropTypes.bool,
|
|
6003
6225
|
className: PropTypes.string,
|
|
6004
6226
|
iconWidth: PropTypes.string,
|
|
6005
|
-
iconPadding: PropTypes.string,
|
|
6006
6227
|
maxLength: PropTypes.number,
|
|
6007
6228
|
floatToFix: PropTypes.number,
|
|
6008
6229
|
minNumSize: PropTypes.number,
|
|
6009
6230
|
maxNumSize: PropTypes.number,
|
|
6010
|
-
|
|
6231
|
+
iconPadding: PropTypes.string,
|
|
6011
6232
|
placeholder: PropTypes.string,
|
|
6233
|
+
borderRadius: PropTypes.string,
|
|
6012
6234
|
placeholderColor: PropTypes.string,
|
|
6013
6235
|
phoneDisplay: PropTypes.string,
|
|
6014
6236
|
autoComplete: PropTypes.string,
|
|
6015
6237
|
errorDots: PropTypes.bool,
|
|
6016
6238
|
errorLeft: PropTypes.string,
|
|
6017
|
-
errorSize: PropTypes.string,
|
|
6018
6239
|
errorIcon: PropTypes.string,
|
|
6019
6240
|
errorAction: PropTypes.func,
|
|
6020
6241
|
errorColor: PropTypes.string,
|
|
6021
|
-
errorStyle: PropTypes.string,
|
|
6022
6242
|
showErrorIcon: PropTypes.bool,
|
|
6023
|
-
|
|
6024
|
-
|
|
6243
|
+
errorFontSize: PropTypes.string,
|
|
6244
|
+
errorFontStyle: PropTypes.string,
|
|
6245
|
+
errorFontWeight: PropTypes.string,
|
|
6246
|
+
errorFontFamily: PropTypes.string,
|
|
6025
6247
|
errorZindex: PropTypes.string,
|
|
6026
|
-
errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6027
6248
|
errorMessage: PropTypes.string,
|
|
6028
|
-
|
|
6249
|
+
errorInContent: PropTypes.bool,
|
|
6029
6250
|
errorMarginTop: PropTypes.string,
|
|
6030
6251
|
errorClassName: PropTypes.string,
|
|
6252
|
+
errorBoxShadow: PropTypes.string,
|
|
6031
6253
|
errorIconMargin: PropTypes.string,
|
|
6032
6254
|
errorLineHeight: PropTypes.string,
|
|
6255
|
+
errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6033
6256
|
boxSizing: PropTypes.string,
|
|
6034
6257
|
boxShadow: PropTypes.string,
|
|
6035
|
-
errorBoxShadow: PropTypes.string,
|
|
6036
6258
|
boxShadowHover: PropTypes.string,
|
|
6037
6259
|
phoneAlignItems: PropTypes.string,
|
|
6038
6260
|
numberMaxLength: PropTypes.number,
|
|
@@ -6055,14 +6277,14 @@ Input.propTypes = {
|
|
|
6055
6277
|
label: PropTypes.string,
|
|
6056
6278
|
labelAction: PropTypes.func,
|
|
6057
6279
|
labelIcon: PropTypes.string,
|
|
6058
|
-
labelSize: PropTypes.string,
|
|
6059
6280
|
labelColor: PropTypes.string,
|
|
6060
|
-
labelStyle: PropTypes.string,
|
|
6061
6281
|
showLabelIcon: PropTypes.bool,
|
|
6062
|
-
labelWeight: PropTypes.string,
|
|
6063
6282
|
labelDisplay: PropTypes.string,
|
|
6064
6283
|
labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6065
6284
|
labelLineHeight: PropTypes.string,
|
|
6285
|
+
labelFontSize: PropTypes.string,
|
|
6286
|
+
labelFontStyle: PropTypes.string,
|
|
6287
|
+
labelFontWeight: PropTypes.string,
|
|
6066
6288
|
labelFontFamily: PropTypes.string,
|
|
6067
6289
|
labelIconMargin: PropTypes.string,
|
|
6068
6290
|
labelMarginBottom: PropTypes.string,
|
|
@@ -6305,23 +6527,20 @@ const Select = ({
|
|
|
6305
6527
|
keyNames,
|
|
6306
6528
|
selected,
|
|
6307
6529
|
className,
|
|
6308
|
-
marginTop,
|
|
6309
6530
|
arrowIcon,
|
|
6310
6531
|
closeIcon,
|
|
6311
|
-
errorZindex,
|
|
6312
|
-
errorMessage,
|
|
6313
6532
|
arrowNoRotate,
|
|
6314
6533
|
showCloseIcon,
|
|
6315
6534
|
defaultOption,
|
|
6316
6535
|
multipleCheckbox,
|
|
6317
6536
|
label,
|
|
6318
6537
|
labelColor,
|
|
6319
|
-
labelWeight,
|
|
6320
6538
|
labelDisplay,
|
|
6321
6539
|
labelFontSize,
|
|
6322
6540
|
labelFontStyle,
|
|
6323
6541
|
labelLineHeight,
|
|
6324
6542
|
labelFontFamily,
|
|
6543
|
+
labelFontWeight,
|
|
6325
6544
|
labelMarginBottom,
|
|
6326
6545
|
labelTextTransform,
|
|
6327
6546
|
lableShowMore,
|
|
@@ -6340,12 +6559,16 @@ const Select = ({
|
|
|
6340
6559
|
labelTooltipBackgroundColor,
|
|
6341
6560
|
cursor,
|
|
6342
6561
|
errorIcon,
|
|
6343
|
-
errorSize,
|
|
6344
6562
|
errorColor,
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
errorWeight,
|
|
6563
|
+
errorZindex,
|
|
6564
|
+
errorMessage,
|
|
6348
6565
|
showErrorIcon,
|
|
6566
|
+
errorFontSize,
|
|
6567
|
+
errorInContent,
|
|
6568
|
+
errorMarginTop,
|
|
6569
|
+
errorFontStyle,
|
|
6570
|
+
errorFontFamily,
|
|
6571
|
+
errorFontWeight,
|
|
6349
6572
|
selectedColor,
|
|
6350
6573
|
selectedRadius,
|
|
6351
6574
|
selectedPadding,
|
|
@@ -6360,6 +6583,7 @@ const Select = ({
|
|
|
6360
6583
|
selectedTransition,
|
|
6361
6584
|
selectedBackgroundColor,
|
|
6362
6585
|
selectedDisableBackgroundColor,
|
|
6586
|
+
selectedDisablePlaceholderColor,
|
|
6363
6587
|
optionsBoxShadow,
|
|
6364
6588
|
optionsBorderRadius,
|
|
6365
6589
|
optionsBackgroundColor,
|
|
@@ -6611,8 +6835,8 @@ const Select = ({
|
|
|
6611
6835
|
ref: parentRef,
|
|
6612
6836
|
className: classProps,
|
|
6613
6837
|
style: {
|
|
6614
|
-
|
|
6615
|
-
|
|
6838
|
+
width: '100%',
|
|
6839
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'relative'
|
|
6616
6840
|
}
|
|
6617
6841
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
6618
6842
|
style: {
|
|
@@ -6626,7 +6850,7 @@ const Select = ({
|
|
|
6626
6850
|
ref: labelRef,
|
|
6627
6851
|
style: {
|
|
6628
6852
|
color: labelColor ?? configStyles.SELECT.label.color,
|
|
6629
|
-
fontWeight:
|
|
6853
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6630
6854
|
display: labelDisplay ?? configStyles.SELECT.label.display,
|
|
6631
6855
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6632
6856
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
@@ -6646,7 +6870,7 @@ const Select = ({
|
|
|
6646
6870
|
style: {
|
|
6647
6871
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6648
6872
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6649
|
-
fontWeight:
|
|
6873
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6650
6874
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6651
6875
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6652
6876
|
},
|
|
@@ -6656,7 +6880,7 @@ const Select = ({
|
|
|
6656
6880
|
style: {
|
|
6657
6881
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6658
6882
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6659
|
-
fontWeight:
|
|
6883
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6660
6884
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6661
6885
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6662
6886
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -6693,7 +6917,7 @@ const Select = ({
|
|
|
6693
6917
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
6694
6918
|
overflow: insidePagination ? 'visible' : 'hidden',
|
|
6695
6919
|
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
6696
|
-
color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6920
|
+
color: disabled ? selectedDisablePlaceholderColor ? selectedDisablePlaceholderColor : configStyles.SELECT.selected.colors.placeholderDisable : placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6697
6921
|
}
|
|
6698
6922
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
6699
6923
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -6760,16 +6984,17 @@ const Select = ({
|
|
|
6760
6984
|
}) : '', option[keyNames.name]);
|
|
6761
6985
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
6762
6986
|
style: {
|
|
6763
|
-
position: 'absolute',
|
|
6987
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'absolute',
|
|
6764
6988
|
columnGap: '4px',
|
|
6765
6989
|
color: errorColor ?? configStyles.SELECT.error.color,
|
|
6766
|
-
fontSize:
|
|
6767
|
-
fontStyle:
|
|
6768
|
-
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline',
|
|
6769
|
-
fontFamily:
|
|
6770
|
-
fontWeight:
|
|
6990
|
+
fontSize: errorFontSize ?? configStyles.SELECT.error.font.size,
|
|
6991
|
+
fontStyle: errorFontStyle ?? configStyles.SELECT.error.font.style,
|
|
6992
|
+
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline-block',
|
|
6993
|
+
fontFamily: errorFontFamily ?? configStyles.SELECT.error.font.family,
|
|
6994
|
+
fontWeight: errorFontWeight ?? configStyles.SELECT.error.font.weight,
|
|
6771
6995
|
zIndex: errorZindex ?? configStyles.SELECT.error.zIndex,
|
|
6772
|
-
|
|
6996
|
+
marginTop: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? errorMarginTop ?? configStyles.SELECT.error.marginTop : '0px',
|
|
6997
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.SELECT.error.marginTop})`
|
|
6773
6998
|
}
|
|
6774
6999
|
}, showErrorIcon ? errorIcon ? errorIcon : configStyles.SELECT.error?.icon ? configStyles.SELECT.error?.icon : '' : '', errorMessage) : '');
|
|
6775
7000
|
};
|
|
@@ -6783,24 +7008,21 @@ Select.propTypes = {
|
|
|
6783
7008
|
disabled: PropTypes.bool,
|
|
6784
7009
|
selected: PropTypes.array,
|
|
6785
7010
|
keyNames: PropTypes.object,
|
|
6786
|
-
marginTop: PropTypes.string,
|
|
6787
7011
|
className: PropTypes.string,
|
|
6788
7012
|
arrowIcon: PropTypes.element,
|
|
6789
7013
|
closeIcon: PropTypes.element,
|
|
6790
7014
|
arrowNoRotate: PropTypes.bool,
|
|
6791
7015
|
showCloseIcon: PropTypes.bool,
|
|
6792
|
-
errorZindex: PropTypes.number,
|
|
6793
|
-
errorMessage: PropTypes.string,
|
|
6794
7016
|
defaultOption: PropTypes.string,
|
|
6795
7017
|
multipleCheckbox: PropTypes.bool,
|
|
6796
7018
|
label: PropTypes.string,
|
|
6797
7019
|
labelColor: PropTypes.string,
|
|
6798
|
-
labelWeight: PropTypes.string,
|
|
6799
7020
|
labelDisplay: PropTypes.string,
|
|
6800
7021
|
labelFontSize: PropTypes.string,
|
|
6801
7022
|
labelFontStyle: PropTypes.string,
|
|
6802
7023
|
labelLineHeight: PropTypes.string,
|
|
6803
7024
|
labelFontFamily: PropTypes.string,
|
|
7025
|
+
labelFontWeight: PropTypes.string,
|
|
6804
7026
|
labelMarginBottom: PropTypes.string,
|
|
6805
7027
|
labelTextTransform: PropTypes.string,
|
|
6806
7028
|
lableShowMore: PropTypes.bool,
|
|
@@ -6808,10 +7030,17 @@ Select.propTypes = {
|
|
|
6808
7030
|
labelShowMoreText: PropTypes.string,
|
|
6809
7031
|
showMoreTextColor: PropTypes.string,
|
|
6810
7032
|
cursor: PropTypes.string,
|
|
6811
|
-
errorSize: PropTypes.string,
|
|
6812
7033
|
errorColor: PropTypes.string,
|
|
6813
7034
|
errorIcon: PropTypes.element,
|
|
6814
7035
|
showErrorIcon: PropTypes.bool,
|
|
7036
|
+
errorZindex: PropTypes.number,
|
|
7037
|
+
errorInContent: PropTypes.bool,
|
|
7038
|
+
errorMessage: PropTypes.string,
|
|
7039
|
+
errorFontSize: PropTypes.string,
|
|
7040
|
+
errorMarginTop: PropTypes.string,
|
|
7041
|
+
errorFontStyle: PropTypes.string,
|
|
7042
|
+
errorFontFamily: PropTypes.string,
|
|
7043
|
+
errorFontWeight: PropTypes.string,
|
|
6815
7044
|
selectedColor: PropTypes.string,
|
|
6816
7045
|
selectedRadius: PropTypes.string,
|
|
6817
7046
|
selectedMinHeight: PropTypes.string,
|
|
@@ -6826,6 +7055,7 @@ Select.propTypes = {
|
|
|
6826
7055
|
selectedTransition: PropTypes.string,
|
|
6827
7056
|
selectedBackgroundColor: PropTypes.string,
|
|
6828
7057
|
selectedDisableBackgroundColor: PropTypes.string,
|
|
7058
|
+
selectedDisablePlaceholderColor: PropTypes.string,
|
|
6829
7059
|
optionsBoxShadow: PropTypes.string,
|
|
6830
7060
|
optionsBorderRadius: PropTypes.string,
|
|
6831
7061
|
optionsBackgroundColor: PropTypes.string,
|
|
@@ -7156,9 +7386,9 @@ Toast.propTypes = {
|
|
|
7156
7386
|
type: PropTypes.oneOf(Object.values(ToasterType)).isRequired
|
|
7157
7387
|
};
|
|
7158
7388
|
|
|
7159
|
-
let toastify = document.getElementById('toastify');
|
|
7160
7389
|
let path = window.location.href;
|
|
7161
7390
|
const removeToast = ref => {
|
|
7391
|
+
let toastify = document.getElementById('toastify');
|
|
7162
7392
|
if (ref.current) {
|
|
7163
7393
|
const node = ref.current;
|
|
7164
7394
|
const removeElem = node.parentNode;
|
|
@@ -7232,6 +7462,7 @@ const createToast = ({
|
|
|
7232
7462
|
styleProps,
|
|
7233
7463
|
description
|
|
7234
7464
|
}) => {
|
|
7465
|
+
let toastify = document.getElementById('toastify');
|
|
7235
7466
|
let innerConfigStyles = {};
|
|
7236
7467
|
let toastParentBlock;
|
|
7237
7468
|
if (!toastify) {
|
|
@@ -7331,6 +7562,7 @@ const Toaster = () => {
|
|
|
7331
7562
|
const [configStyles, setConfigStyles] = useState({});
|
|
7332
7563
|
window.addEventListener('popstate', () => {
|
|
7333
7564
|
if (path !== window.location.href) {
|
|
7565
|
+
let toastify = document.getElementById('toastify');
|
|
7334
7566
|
if (!toastify) {
|
|
7335
7567
|
toastify = document.createElement('div');
|
|
7336
7568
|
toastify.setAttribute('id', 'toastify');
|
|
@@ -7403,7 +7635,6 @@ const Tooltip = ({
|
|
|
7403
7635
|
width,
|
|
7404
7636
|
color,
|
|
7405
7637
|
height,
|
|
7406
|
-
radius,
|
|
7407
7638
|
fontSize,
|
|
7408
7639
|
hoverOpen,
|
|
7409
7640
|
className,
|
|
@@ -7411,9 +7642,10 @@ const Tooltip = ({
|
|
|
7411
7642
|
fontFamily,
|
|
7412
7643
|
fontWeight,
|
|
7413
7644
|
tooltipIcon,
|
|
7645
|
+
borderRadius,
|
|
7414
7646
|
tooltipWidth,
|
|
7415
|
-
tooltipRadius,
|
|
7416
7647
|
backgroundColor,
|
|
7648
|
+
tooltipBorderRadius,
|
|
7417
7649
|
tooltipBackgroundColor,
|
|
7418
7650
|
direction = 'top'
|
|
7419
7651
|
}) => {
|
|
@@ -7486,7 +7718,7 @@ const Tooltip = ({
|
|
|
7486
7718
|
style: {
|
|
7487
7719
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
7488
7720
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
7489
|
-
borderRadius:
|
|
7721
|
+
borderRadius: borderRadius ?? configStyles.TOOLTIP.parent.radius,
|
|
7490
7722
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
7491
7723
|
},
|
|
7492
7724
|
onClick: e => e.stopPropagation()
|
|
@@ -7495,7 +7727,7 @@ const Tooltip = ({
|
|
|
7495
7727
|
className: `${styles$6['tooltip']}`,
|
|
7496
7728
|
style: {
|
|
7497
7729
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
7498
|
-
borderRadius:
|
|
7730
|
+
borderRadius: tooltipBorderRadius ?? configStyles.TOOLTIP.radius,
|
|
7499
7731
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
7500
7732
|
top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? `calc(-${checkTooltipHeight + 7}px)` : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? 'calc(100% + 7px)' : direction === 'left' || direction === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : direction === 'left-top' || direction === 'right-top' ? '0px' : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(-${checkTooltipHeight - tooltipIconParentHeight}px)` : '0px',
|
|
7501
7733
|
left: direction === 'top' || direction === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? `-${checkTooltipWidth + 7}px` : direction === 'top-left' || direction === 'bottom-left' ? `0px` : direction === 'top-right' || direction === 'bottom-right' ? `-${checkTooltipWidth - tooltipIconParentWidth}px` : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? 'calc(100% + 7px)' : '0px'
|
|
@@ -7532,16 +7764,16 @@ Tooltip.propTypes = {
|
|
|
7532
7764
|
width: PropTypes.string,
|
|
7533
7765
|
color: PropTypes.string,
|
|
7534
7766
|
height: PropTypes.string,
|
|
7535
|
-
radius: PropTypes.string,
|
|
7536
7767
|
hoverOpen: PropTypes.bool,
|
|
7537
7768
|
fontSize: PropTypes.string,
|
|
7538
7769
|
fontStyle: PropTypes.string,
|
|
7539
7770
|
className: PropTypes.string,
|
|
7540
7771
|
fontFamily: PropTypes.string,
|
|
7541
7772
|
fontWeight: PropTypes.string,
|
|
7773
|
+
borderRadius: PropTypes.string,
|
|
7542
7774
|
tooltipWidth: PropTypes.string,
|
|
7543
7775
|
tooltipIcon: PropTypes.element,
|
|
7544
|
-
|
|
7776
|
+
tooltipBorderRadius: PropTypes.string,
|
|
7545
7777
|
text: PropTypes.string.isRequired,
|
|
7546
7778
|
backgroundColor: PropTypes.string,
|
|
7547
7779
|
tooltipBackgroundColor: PropTypes.string,
|
|
@@ -7907,16 +8139,11 @@ const PositionSide = {
|
|
|
7907
8139
|
BOTTOM: 'bottom'
|
|
7908
8140
|
};
|
|
7909
8141
|
const Textarea = ({
|
|
7910
|
-
size,
|
|
7911
8142
|
name,
|
|
7912
|
-
style,
|
|
7913
|
-
family,
|
|
7914
|
-
weight,
|
|
7915
8143
|
width,
|
|
7916
8144
|
value,
|
|
7917
8145
|
height,
|
|
7918
8146
|
resize,
|
|
7919
|
-
radius,
|
|
7920
8147
|
padding,
|
|
7921
8148
|
disabled,
|
|
7922
8149
|
required,
|
|
@@ -7928,25 +8155,31 @@ const Textarea = ({
|
|
|
7928
8155
|
maxHeight,
|
|
7929
8156
|
boxSizing,
|
|
7930
8157
|
maxLength,
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
8158
|
+
fontSize,
|
|
8159
|
+
fontStyle,
|
|
8160
|
+
fontFamily,
|
|
8161
|
+
fontWeight,
|
|
8162
|
+
placeholder,
|
|
8163
|
+
borderRadius,
|
|
8164
|
+
errorMarginTop,
|
|
7936
8165
|
className,
|
|
7937
8166
|
errorColor,
|
|
7938
|
-
placeholder,
|
|
7939
8167
|
errorMessage,
|
|
8168
|
+
errorFontSize,
|
|
8169
|
+
errorFontStyle,
|
|
8170
|
+
errorFontWeight,
|
|
8171
|
+
errorFontFamily,
|
|
8172
|
+
borderWidth,
|
|
7940
8173
|
backgroundColor,
|
|
7941
8174
|
borderFocusColor,
|
|
7942
8175
|
borderHoverColor,
|
|
7943
8176
|
showCharacterCount,
|
|
7944
8177
|
label,
|
|
7945
|
-
labelSize,
|
|
7946
8178
|
labelColor,
|
|
7947
|
-
labelStyle,
|
|
7948
|
-
labelWeight,
|
|
7949
8179
|
labelDisplay,
|
|
8180
|
+
labelFontSize,
|
|
8181
|
+
labelFontStyle,
|
|
8182
|
+
labelFontWeight,
|
|
7950
8183
|
labelFontFamily,
|
|
7951
8184
|
labelMarginBottom,
|
|
7952
8185
|
lableShowMore,
|
|
@@ -8145,9 +8378,10 @@ const Textarea = ({
|
|
|
8145
8378
|
alignItems: 'center',
|
|
8146
8379
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
8147
8380
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8148
|
-
fontSize:
|
|
8381
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8382
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8149
8383
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8150
|
-
fontWeight:
|
|
8384
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8151
8385
|
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
8152
8386
|
}
|
|
8153
8387
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8172,9 +8406,9 @@ const Textarea = ({
|
|
|
8172
8406
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
8173
8407
|
className: styles$3['show-more-text'],
|
|
8174
8408
|
style: {
|
|
8175
|
-
fontSize:
|
|
8176
|
-
fontStyle:
|
|
8177
|
-
fontWeight:
|
|
8409
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8410
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8411
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8178
8412
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8179
8413
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8180
8414
|
},
|
|
@@ -8182,9 +8416,9 @@ const Textarea = ({
|
|
|
8182
8416
|
}, ' ', " ", labelShowLessText ?? configStyles.TEXTAREA.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
8183
8417
|
className: styles$3['show-more-text'],
|
|
8184
8418
|
style: {
|
|
8185
|
-
fontSize:
|
|
8186
|
-
fontStyle:
|
|
8187
|
-
fontWeight:
|
|
8419
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8420
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8421
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8188
8422
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8189
8423
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8190
8424
|
},
|
|
@@ -8201,20 +8435,20 @@ const Textarea = ({
|
|
|
8201
8435
|
outline: 'none',
|
|
8202
8436
|
overflow: 'auto',
|
|
8203
8437
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
8204
|
-
fontSize: size ?? configStyles.TEXTAREA.font.size,
|
|
8205
|
-
fontStyle: style ?? configStyles.TEXTAREA.font.style,
|
|
8206
|
-
fontFamily: family ?? configStyles.TEXTAREA.font.family,
|
|
8207
|
-
fontWeight: weight ?? configStyles.TEXTAREA.font.weight,
|
|
8208
8438
|
height: height ?? configStyles.TEXTAREA.height,
|
|
8209
8439
|
padding: padding ?? configStyles.TEXTAREA.padding,
|
|
8210
|
-
borderRadius: radius ?? configStyles.TEXTAREA.radius,
|
|
8211
8440
|
minWidth: minWidth ?? configStyles.TEXTAREA.minWidth,
|
|
8212
8441
|
maxWidth: maxWidth ?? configStyles.TEXTAREA.maxWidth,
|
|
8442
|
+
fontSize: fontSize ?? configStyles.TEXTAREA.font.size,
|
|
8213
8443
|
minHeight: minHeight ?? configStyles.TEXTAREA.minHeight,
|
|
8214
8444
|
maxHeight: maxHeight ?? configStyles.TEXTAREA.maxHeight,
|
|
8215
8445
|
boxSizing: boxSizing ?? configStyles.TEXTAREA.box.sizing,
|
|
8446
|
+
fontStyle: fontStyle ?? configStyles.TEXTAREA.font.style,
|
|
8447
|
+
borderRadius: borderRadius ?? configStyles.TEXTAREA.radius,
|
|
8448
|
+
fontFamily: fontFamily ?? configStyles.TEXTAREA.font.family,
|
|
8449
|
+
fontWeight: fontWeight ?? configStyles.TEXTAREA.font.weight,
|
|
8216
8450
|
backgroundColor: backgroundColor ?? configStyles.TEXTAREA.colors.background,
|
|
8217
|
-
boxShadow: error ? errorColor ? `0 0 0
|
|
8451
|
+
boxShadow: error ? errorColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${errorColor}` : configStyles.TEXTAREA.error.box.shadow : isFocus ? borderFocusColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${borderFocusColor}` : configStyles.TEXTAREA.box.colors.focus : isHover ? borderHoverColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${borderHoverColor}` : configStyles.TEXTAREA.box.colors.hover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow,
|
|
8218
8452
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
8219
8453
|
},
|
|
8220
8454
|
name: name,
|
|
@@ -8233,8 +8467,9 @@ const Textarea = ({
|
|
|
8233
8467
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
8234
8468
|
style: {
|
|
8235
8469
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8236
|
-
fontSize:
|
|
8237
|
-
|
|
8470
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8471
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8472
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8238
8473
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family
|
|
8239
8474
|
}
|
|
8240
8475
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8247,11 +8482,11 @@ const Textarea = ({
|
|
|
8247
8482
|
style: {
|
|
8248
8483
|
display: 'inline-block',
|
|
8249
8484
|
color: errorColor ?? configStyles.TEXTAREA.error.color,
|
|
8250
|
-
fontSize:
|
|
8251
|
-
fontStyle:
|
|
8252
|
-
fontWeight:
|
|
8253
|
-
fontFamily:
|
|
8254
|
-
marginTop:
|
|
8485
|
+
fontSize: errorFontSize ?? configStyles.TEXTAREA.error.font.size,
|
|
8486
|
+
fontStyle: errorFontStyle ?? configStyles.TEXTAREA.error.font.style,
|
|
8487
|
+
fontWeight: errorFontWeight ?? configStyles.TEXTAREA.error.font.weight,
|
|
8488
|
+
fontFamily: errorFontFamily ?? configStyles.TEXTAREA.error.font.family,
|
|
8489
|
+
marginTop: errorMarginTop ?? configStyles.TEXTAREA.error.marginTop
|
|
8255
8490
|
}
|
|
8256
8491
|
}, error)) : '');
|
|
8257
8492
|
};
|
|
@@ -8272,15 +8507,15 @@ Textarea.propTypes = {
|
|
|
8272
8507
|
minWidth: PropTypes.string,
|
|
8273
8508
|
maxWidth: PropTypes.string,
|
|
8274
8509
|
boxShadow: PropTypes.string,
|
|
8275
|
-
marginTop: PropTypes.string,
|
|
8276
8510
|
boxSizing: PropTypes.string,
|
|
8277
8511
|
minHeight: PropTypes.string,
|
|
8278
8512
|
maxHeight: PropTypes.string,
|
|
8279
8513
|
maxLength: PropTypes.number,
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8514
|
+
errorFontSize: PropTypes.string,
|
|
8515
|
+
errorMarginTop: PropTypes.string,
|
|
8516
|
+
errorFontStyle: PropTypes.string,
|
|
8517
|
+
errorFontWeight: PropTypes.string,
|
|
8518
|
+
errorFontFamily: PropTypes.string,
|
|
8284
8519
|
className: PropTypes.string,
|
|
8285
8520
|
errorColor: PropTypes.string,
|
|
8286
8521
|
placeholder: PropTypes.string,
|
|
@@ -8291,10 +8526,10 @@ Textarea.propTypes = {
|
|
|
8291
8526
|
borderFocusColor: PropTypes.string,
|
|
8292
8527
|
borderHoverColor: PropTypes.string,
|
|
8293
8528
|
label: PropTypes.string,
|
|
8294
|
-
|
|
8295
|
-
|
|
8529
|
+
labelFontSize: PropTypes.string,
|
|
8530
|
+
labelFontStyle: PropTypes.string,
|
|
8296
8531
|
labelColor: PropTypes.string,
|
|
8297
|
-
|
|
8532
|
+
labelFontWeight: PropTypes.string,
|
|
8298
8533
|
labelDisplay: PropTypes.string,
|
|
8299
8534
|
labelFontFamily: PropTypes.string,
|
|
8300
8535
|
labelMarginBottom: PropTypes.string,
|
|
@@ -8643,7 +8878,7 @@ const Swipe = ({
|
|
|
8643
8878
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8644
8879
|
style: {
|
|
8645
8880
|
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
8646
|
-
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '
|
|
8881
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100dvh'
|
|
8647
8882
|
}
|
|
8648
8883
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
|
|
8649
8884
|
style: {
|
|
@@ -8717,7 +8952,7 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
8717
8952
|
swipeBlock.style.zIndex = swipeCount;
|
|
8718
8953
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
8719
8954
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
8720
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8955
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100dvh';
|
|
8721
8956
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8722
8957
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8723
8958
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -8759,10 +8994,10 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
8759
8994
|
swipable.style.left = '0px';
|
|
8760
8995
|
swipable.style.zIndex = 99999;
|
|
8761
8996
|
swipable.style.maxWidth = '100%';
|
|
8762
|
-
swipable.style.maxHeight = '
|
|
8997
|
+
swipable.style.maxHeight = '100dvh';
|
|
8763
8998
|
swipable.style.visibility = 'hidden';
|
|
8764
8999
|
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8765
|
-
swipable.style.height = widthParent ? '
|
|
9000
|
+
swipable.style.height = widthParent ? '100dvh' : '0px';
|
|
8766
9001
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8767
9002
|
swipable.classList.add(styles$2['visible']);
|
|
8768
9003
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
@@ -8818,7 +9053,17 @@ const swipe = {
|
|
|
8818
9053
|
return;
|
|
8819
9054
|
}
|
|
8820
9055
|
if (swipeCount === 0) {
|
|
8821
|
-
if (
|
|
9056
|
+
if (!hasOwnerProperty(props, 'underScroll')) {
|
|
9057
|
+
if (newConfigStyles.SWIPEMODAL && hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'underScroll') && newConfigStyles.SWIPEMODAL.underScroll === false) {
|
|
9058
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
9059
|
+
document.head.appendChild(style);
|
|
9060
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
9061
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
9062
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
9063
|
+
passive: false
|
|
9064
|
+
});
|
|
9065
|
+
}
|
|
9066
|
+
} else if (hasOwnerProperty(props, 'underScroll') && props.underScroll === false) {
|
|
8822
9067
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
8823
9068
|
document.head.appendChild(style);
|
|
8824
9069
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -8839,11 +9084,10 @@ const swipe = {
|
|
|
8839
9084
|
});
|
|
8840
9085
|
},
|
|
8841
9086
|
close: id => {
|
|
8842
|
-
let newConfigStyles = {};
|
|
8843
9087
|
configStylesPromise.then(data => {
|
|
8844
|
-
|
|
9088
|
+
({
|
|
8845
9089
|
...data
|
|
8846
|
-
};
|
|
9090
|
+
});
|
|
8847
9091
|
}, error => {
|
|
8848
9092
|
console.error(error);
|
|
8849
9093
|
});
|
|
@@ -8865,14 +9109,12 @@ const swipe = {
|
|
|
8865
9109
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8866
9110
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8867
9111
|
document.body.removeChild(swipable);
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8875
|
-
}
|
|
9112
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9113
|
+
if (noScrllable) {
|
|
9114
|
+
style.remove();
|
|
9115
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9116
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9117
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8876
9118
|
}
|
|
8877
9119
|
}
|
|
8878
9120
|
}, 200);
|
|
@@ -8882,14 +9124,12 @@ const swipe = {
|
|
|
8882
9124
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8883
9125
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8884
9126
|
document.body.removeChild(swipable);
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8892
|
-
}
|
|
9127
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9128
|
+
if (noScrllable) {
|
|
9129
|
+
style.remove();
|
|
9130
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9131
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9132
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8893
9133
|
}
|
|
8894
9134
|
}
|
|
8895
9135
|
}
|
|
@@ -8922,21 +9162,21 @@ const TypographyType = {
|
|
|
8922
9162
|
span: 'span'
|
|
8923
9163
|
};
|
|
8924
9164
|
const Typography = ({
|
|
8925
|
-
size,
|
|
8926
9165
|
color,
|
|
8927
|
-
weight,
|
|
8928
|
-
radius,
|
|
8929
9166
|
border,
|
|
8930
9167
|
cursor,
|
|
8931
9168
|
onClick,
|
|
8932
9169
|
children,
|
|
9170
|
+
fontSize,
|
|
8933
9171
|
textAlign,
|
|
8934
9172
|
fontStyle,
|
|
8935
9173
|
className,
|
|
8936
9174
|
textShadow,
|
|
8937
9175
|
lineHeight,
|
|
8938
9176
|
colorHover,
|
|
9177
|
+
fontWeight,
|
|
8939
9178
|
fontFamily,
|
|
9179
|
+
borderRadius,
|
|
8940
9180
|
textTransform,
|
|
8941
9181
|
textDecoration,
|
|
8942
9182
|
backgroundColor,
|
|
@@ -8957,9 +9197,9 @@ const Typography = ({
|
|
|
8957
9197
|
style: {
|
|
8958
9198
|
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
8959
9199
|
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
8960
|
-
borderRadius:
|
|
8961
|
-
fontSize:
|
|
8962
|
-
fontWeight:
|
|
9200
|
+
borderRadius: borderRadius ?? configStyles.TYPOGRAPHY.radius,
|
|
9201
|
+
fontSize: fontSize ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
9202
|
+
fontWeight: fontWeight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
8963
9203
|
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
8964
9204
|
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
8965
9205
|
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
@@ -9001,10 +9241,8 @@ const Typography = ({
|
|
|
9001
9241
|
Typography.propTypes = {
|
|
9002
9242
|
color: PropTypes.string,
|
|
9003
9243
|
onClick: PropTypes.func,
|
|
9004
|
-
weight: PropTypes.string,
|
|
9005
9244
|
border: PropTypes.string,
|
|
9006
9245
|
cursor: PropTypes.string,
|
|
9007
|
-
radius: PropTypes.string,
|
|
9008
9246
|
textAlign: PropTypes.string,
|
|
9009
9247
|
className: PropTypes.string,
|
|
9010
9248
|
fontStyle: PropTypes.string,
|
|
@@ -9012,11 +9250,13 @@ Typography.propTypes = {
|
|
|
9012
9250
|
textShadow: PropTypes.string,
|
|
9013
9251
|
fontFamily: PropTypes.string,
|
|
9014
9252
|
colorHover: PropTypes.string,
|
|
9253
|
+
fontWeight: PropTypes.string,
|
|
9254
|
+
borderRadius: PropTypes.string,
|
|
9015
9255
|
textTransform: PropTypes.string,
|
|
9016
9256
|
textDecoration: PropTypes.string,
|
|
9017
9257
|
backgroundColor: PropTypes.string,
|
|
9018
9258
|
variant: PropTypes.oneOf(Object.values(TypographyType)),
|
|
9019
|
-
|
|
9259
|
+
fontSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
9020
9260
|
};
|
|
9021
9261
|
|
|
9022
9262
|
const Dots = '...';
|
|
@@ -9480,12 +9720,13 @@ const Autocomplete = ({
|
|
|
9480
9720
|
required,
|
|
9481
9721
|
selected,
|
|
9482
9722
|
className,
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9723
|
+
errorFontSize,
|
|
9724
|
+
errorFontStyle,
|
|
9725
|
+
errorFontWeight,
|
|
9726
|
+
errorFontFamily,
|
|
9727
|
+
errorMarginTop,
|
|
9488
9728
|
errorColor,
|
|
9729
|
+
errorInContent,
|
|
9489
9730
|
placeHolder,
|
|
9490
9731
|
errorMessage,
|
|
9491
9732
|
autoComplete,
|
|
@@ -9543,11 +9784,11 @@ const Autocomplete = ({
|
|
|
9543
9784
|
contentBottomRowHoverBackgroundColor,
|
|
9544
9785
|
backgroundDisableColor,
|
|
9545
9786
|
label,
|
|
9546
|
-
labelSize,
|
|
9547
|
-
labelStyle,
|
|
9548
9787
|
labelColor,
|
|
9549
|
-
labelWeight,
|
|
9550
9788
|
labelDisplay,
|
|
9789
|
+
labelFontSize,
|
|
9790
|
+
labelFontStyle,
|
|
9791
|
+
labelFontWeight,
|
|
9551
9792
|
labelLineHeight,
|
|
9552
9793
|
labelFontFamily,
|
|
9553
9794
|
labelMarginBottom,
|
|
@@ -9687,14 +9928,15 @@ const Autocomplete = ({
|
|
|
9687
9928
|
}, item[keyNames.name]);
|
|
9688
9929
|
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
9689
9930
|
style: {
|
|
9690
|
-
position: 'absolute',
|
|
9931
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9691
9932
|
zIndex: '1',
|
|
9692
9933
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9693
|
-
fontSize:
|
|
9694
|
-
fontStyle:
|
|
9695
|
-
fontWeight:
|
|
9696
|
-
fontFamily:
|
|
9697
|
-
|
|
9934
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
9935
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
9936
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
9937
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
9938
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
9939
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9698
9940
|
padding: innerErrorPadding ?? configStyles.AUTOCOMPLETE.innerError.padding,
|
|
9699
9941
|
height: contentBottomRowHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
9700
9942
|
lineHeight: contentBottomRowLineHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
@@ -9863,9 +10105,9 @@ const Autocomplete = ({
|
|
|
9863
10105
|
style: {
|
|
9864
10106
|
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
9865
10107
|
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
9866
|
-
fontSize:
|
|
9867
|
-
fontStyle:
|
|
9868
|
-
fontWeight:
|
|
10108
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10109
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10110
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9869
10111
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9870
10112
|
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
9871
10113
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
@@ -9880,9 +10122,9 @@ const Autocomplete = ({
|
|
|
9880
10122
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
9881
10123
|
className: styles['show-more-text'],
|
|
9882
10124
|
style: {
|
|
9883
|
-
fontSize:
|
|
9884
|
-
fontStyle:
|
|
9885
|
-
fontWeight:
|
|
10125
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10126
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10127
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9886
10128
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9887
10129
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9888
10130
|
},
|
|
@@ -9890,9 +10132,9 @@ const Autocomplete = ({
|
|
|
9890
10132
|
}, ' ', " ", labelShowLessText ?? configStyles.AUTOCOMPLETE.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
9891
10133
|
className: styles['show-more-text'],
|
|
9892
10134
|
style: {
|
|
9893
|
-
fontSize:
|
|
9894
|
-
fontStyle:
|
|
9895
|
-
fontWeight:
|
|
10135
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10136
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10137
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9896
10138
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9897
10139
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9898
10140
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
@@ -9941,13 +10183,14 @@ const Autocomplete = ({
|
|
|
9941
10183
|
}, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
|
|
9942
10184
|
style: {
|
|
9943
10185
|
left: '0px',
|
|
9944
|
-
position: 'absolute',
|
|
10186
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9945
10187
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9946
|
-
fontSize:
|
|
9947
|
-
fontStyle:
|
|
9948
|
-
fontWeight:
|
|
9949
|
-
fontFamily:
|
|
9950
|
-
|
|
10188
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
10189
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
10190
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
10191
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
10192
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
10193
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9951
10194
|
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
9952
10195
|
}
|
|
9953
10196
|
}, innerError) : '', optionList));
|
|
@@ -9959,18 +10202,19 @@ Autocomplete.propTypes = {
|
|
|
9959
10202
|
keyNames: PropTypes.object,
|
|
9960
10203
|
selected: PropTypes.object,
|
|
9961
10204
|
className: PropTypes.string,
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
labelSize: PropTypes.string,
|
|
9968
|
-
labelStyle: PropTypes.string,
|
|
10205
|
+
errorFontSize: PropTypes.string,
|
|
10206
|
+
errorFontStyle: PropTypes.string,
|
|
10207
|
+
errorFontWeight: PropTypes.string,
|
|
10208
|
+
errorFontFamily: PropTypes.string,
|
|
10209
|
+
errorMarginTop: PropTypes.string,
|
|
9969
10210
|
errorColor: PropTypes.string,
|
|
9970
10211
|
labelColor: PropTypes.string,
|
|
9971
10212
|
searchCount: PropTypes.number,
|
|
9972
10213
|
placeHolder: PropTypes.string,
|
|
9973
|
-
|
|
10214
|
+
labelFontSize: PropTypes.string,
|
|
10215
|
+
labelFontStyle: PropTypes.string,
|
|
10216
|
+
labelFontWeight: PropTypes.number,
|
|
10217
|
+
errorInContent: PropTypes.bool,
|
|
9974
10218
|
errorMessage: PropTypes.string,
|
|
9975
10219
|
labelDisplay: PropTypes.string,
|
|
9976
10220
|
autoComplete: PropTypes.string,
|