@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.js
CHANGED
|
@@ -655,6 +655,7 @@ var packageResult = {
|
|
|
655
655
|
marginTop: '10px',
|
|
656
656
|
iconMargin: '10px',
|
|
657
657
|
lineHeight: '19px',
|
|
658
|
+
inContent: false,
|
|
658
659
|
box: {
|
|
659
660
|
shadow: '0 0 0 1px #F20918'
|
|
660
661
|
},
|
|
@@ -858,6 +859,7 @@ var packageResult = {
|
|
|
858
859
|
colors: {
|
|
859
860
|
hover: '#373538',
|
|
860
861
|
background: presetColors.extraLight,
|
|
862
|
+
placeholderDisable: presetColors.dark,
|
|
861
863
|
backgroundDisable: presetColors.secondary
|
|
862
864
|
},
|
|
863
865
|
font: {
|
|
@@ -896,6 +898,7 @@ var packageResult = {
|
|
|
896
898
|
color: 'rgb(238, 0, 0)',
|
|
897
899
|
marginTop: '10px',
|
|
898
900
|
zIndex: 10,
|
|
901
|
+
inContent: false,
|
|
899
902
|
box: {
|
|
900
903
|
shadow: `0 0 0 2px ${presetColors.danger}`
|
|
901
904
|
},
|
|
@@ -926,7 +929,8 @@ var packageResult = {
|
|
|
926
929
|
sizing: boxSizing,
|
|
927
930
|
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
928
931
|
// like border
|
|
929
|
-
|
|
932
|
+
width: '2px',
|
|
933
|
+
// like border width
|
|
930
934
|
colors: {
|
|
931
935
|
hover: `0 0 0 2px ${presetColors.dark}`,
|
|
932
936
|
// like border color
|
|
@@ -1079,6 +1083,7 @@ var packageResult = {
|
|
|
1079
1083
|
error: {
|
|
1080
1084
|
color: presetColors.danger,
|
|
1081
1085
|
marginTop: '10px',
|
|
1086
|
+
inContent: false,
|
|
1082
1087
|
font: {
|
|
1083
1088
|
...fontObject
|
|
1084
1089
|
},
|
|
@@ -1114,10 +1119,9 @@ var packageResult = {
|
|
|
1114
1119
|
width: '27.8rem',
|
|
1115
1120
|
height: 'auto'
|
|
1116
1121
|
},
|
|
1117
|
-
or: 'կամ',
|
|
1118
1122
|
upload: 'Բեռնել',
|
|
1119
1123
|
uploadColor: presetColors.success,
|
|
1120
|
-
putFileHere: 'Տեղադրել ֆայլը այստեղ',
|
|
1124
|
+
putFileHere: 'Տեղադրել ֆայլը այստեղ կամ',
|
|
1121
1125
|
sizeText: 'Առավելագույնը',
|
|
1122
1126
|
timeForRemoveError: 4000,
|
|
1123
1127
|
extentionsRowMarginTop: '40px',
|
|
@@ -1161,11 +1165,13 @@ var packageResult = {
|
|
|
1161
1165
|
},
|
|
1162
1166
|
error: {
|
|
1163
1167
|
color: presetColors.danger,
|
|
1168
|
+
marginTop: '6px',
|
|
1164
1169
|
font: {
|
|
1165
1170
|
...fontObject
|
|
1166
1171
|
},
|
|
1167
1172
|
format: 'ֆայլի սխալ ֆորմատ',
|
|
1168
1173
|
maxSize: 'Առավելագույն ծավալ',
|
|
1174
|
+
formatValidate: 'Վնասված ֆայլ',
|
|
1169
1175
|
noChoosenFile: 'Ֆայլը ընտրված չէ'
|
|
1170
1176
|
},
|
|
1171
1177
|
progress: {
|
|
@@ -1233,10 +1239,9 @@ var packageResult = {
|
|
|
1233
1239
|
height: '',
|
|
1234
1240
|
maxWidth: '95%',
|
|
1235
1241
|
minWidth: '320px',
|
|
1236
|
-
maxHeight: '
|
|
1242
|
+
maxHeight: '95dvh',
|
|
1237
1243
|
minHeight: '200px',
|
|
1238
|
-
|
|
1239
|
-
noScroll: false,
|
|
1244
|
+
underScroll: false,
|
|
1240
1245
|
padding: '20px 20px 20px',
|
|
1241
1246
|
className: '',
|
|
1242
1247
|
alignItems: 'center',
|
|
@@ -1246,7 +1251,8 @@ var packageResult = {
|
|
|
1246
1251
|
border: {
|
|
1247
1252
|
width: '20px',
|
|
1248
1253
|
style: 'solid',
|
|
1249
|
-
color: transparent
|
|
1254
|
+
color: transparent,
|
|
1255
|
+
radius: '14px'
|
|
1250
1256
|
},
|
|
1251
1257
|
colors: {
|
|
1252
1258
|
background: 'white',
|
|
@@ -1290,8 +1296,8 @@ var packageResult = {
|
|
|
1290
1296
|
// default properties for <SwipeModal /> component
|
|
1291
1297
|
SWIPEMODAL: {
|
|
1292
1298
|
width: '300px',
|
|
1293
|
-
height: '
|
|
1294
|
-
|
|
1299
|
+
height: '100dvh',
|
|
1300
|
+
underScroll: false,
|
|
1295
1301
|
titleStyle: {
|
|
1296
1302
|
color: '#1C212D',
|
|
1297
1303
|
textAlign: 'left',
|
|
@@ -1303,7 +1309,7 @@ var packageResult = {
|
|
|
1303
1309
|
},
|
|
1304
1310
|
parent: {
|
|
1305
1311
|
width: '100%',
|
|
1306
|
-
height: '
|
|
1312
|
+
height: '100dvh',
|
|
1307
1313
|
colors: {
|
|
1308
1314
|
background: 'rgba(60, 61, 70, 0.2)'
|
|
1309
1315
|
}
|
|
@@ -1876,16 +1882,15 @@ styleInject(css_248z$d);
|
|
|
1876
1882
|
|
|
1877
1883
|
// eslint-disable-next-line react/display-name
|
|
1878
1884
|
const File = /*#__PURE__*/React.forwardRef(({
|
|
1879
|
-
or,
|
|
1880
|
-
size,
|
|
1881
1885
|
name,
|
|
1882
1886
|
color,
|
|
1883
|
-
style,
|
|
1884
|
-
weight,
|
|
1885
|
-
family,
|
|
1886
1887
|
height,
|
|
1887
|
-
radius,
|
|
1888
1888
|
change,
|
|
1889
|
+
fontSize,
|
|
1890
|
+
fontStyle,
|
|
1891
|
+
fontFamily,
|
|
1892
|
+
fontWeight,
|
|
1893
|
+
borderRadius,
|
|
1889
1894
|
borderWidth,
|
|
1890
1895
|
borderStyle,
|
|
1891
1896
|
borderColor,
|
|
@@ -1895,17 +1900,18 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1895
1900
|
multiple,
|
|
1896
1901
|
required,
|
|
1897
1902
|
className,
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1903
|
+
errorFontSize,
|
|
1904
|
+
errorFontStyle,
|
|
1905
|
+
errorFontWeight,
|
|
1906
|
+
errorFontFamily,
|
|
1907
|
+
errorMarginTop,
|
|
1902
1908
|
label,
|
|
1903
|
-
labelSize,
|
|
1904
1909
|
labelColor,
|
|
1905
|
-
labelStyle,
|
|
1906
|
-
labelWeight,
|
|
1907
|
-
labelFamily,
|
|
1908
1910
|
lableShowMore,
|
|
1911
|
+
labelFontSize,
|
|
1912
|
+
labelFontStyle,
|
|
1913
|
+
labelFontWeight,
|
|
1914
|
+
labelFontFamily,
|
|
1909
1915
|
labelShowLessText,
|
|
1910
1916
|
labelShowMoreText,
|
|
1911
1917
|
showMoreTextColor,
|
|
@@ -1927,6 +1933,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1927
1933
|
uploadColor,
|
|
1928
1934
|
defaultData,
|
|
1929
1935
|
formatError,
|
|
1936
|
+
formatValidateError,
|
|
1930
1937
|
errorIcon,
|
|
1931
1938
|
errorIconShow,
|
|
1932
1939
|
errorMessage,
|
|
@@ -2010,20 +2017,242 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2010
2017
|
const [tooltipElem, setTooltipElem] = React.useState(null);
|
|
2011
2018
|
const [choosenFileCount, setChoosenFileCount] = React.useState(0);
|
|
2012
2019
|
const [image, setImage] = React.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);
|
|
2013
|
-
const
|
|
2020
|
+
const handleCheckFileFormat = async (file, type) => {
|
|
2014
2021
|
const buffer = await file.arrayBuffer();
|
|
2015
2022
|
const dataView = new DataView(buffer);
|
|
2016
|
-
if (
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2023
|
+
if (type === 'png') {
|
|
2024
|
+
if (dataView.byteLength < 8) {
|
|
2025
|
+
return Promise.reject();
|
|
2026
|
+
} else {
|
|
2027
|
+
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) {
|
|
2028
|
+
const end = dataView.byteLength - 12;
|
|
2029
|
+
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) {
|
|
2030
|
+
return Promise.resolve();
|
|
2031
|
+
} else {
|
|
2032
|
+
return Promise.reject();
|
|
2033
|
+
}
|
|
2034
|
+
} else {
|
|
2035
|
+
return Promise.reject();
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
} else if (type === 'jpg') {
|
|
2039
|
+
if (dataView.byteLength < 2) {
|
|
2040
|
+
return Promise.reject();
|
|
2041
|
+
} else {
|
|
2042
|
+
if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8 && dataView.getUint8(dataView.byteLength - 2) === 0xFF && dataView.getUint8(dataView.byteLength - 1) === 0xD9) {
|
|
2022
2043
|
return Promise.resolve();
|
|
2044
|
+
} else {
|
|
2045
|
+
return Promise.reject();
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
} else if (type === 'svg') {
|
|
2049
|
+
if (dataView.byteLength < 8) return Promise.reject();
|
|
2050
|
+
const len = dataView.byteLength;
|
|
2051
|
+
let start = 0;
|
|
2052
|
+
let end = len - 1;
|
|
2053
|
+
const isWS = b => b === 0x20 || b === 0x09 || b === 0x0A || b === 0x0D;
|
|
2054
|
+
while (start < len && isWS(dataView.getUint8(start))) start++;
|
|
2055
|
+
const scanLimit = Math.min(len, start + 4096);
|
|
2056
|
+
let foundSvgOpen = false;
|
|
2057
|
+
for (let i = start; i <= scanLimit - 4; i++) {
|
|
2058
|
+
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)) {
|
|
2059
|
+
foundSvgOpen = true;
|
|
2060
|
+
break;
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
if (!foundSvgOpen) return Promise.reject();
|
|
2064
|
+
while (end >= 0 && isWS(dataView.getUint8(end))) end--;
|
|
2065
|
+
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) {
|
|
2066
|
+
return Promise.resolve();
|
|
2067
|
+
} else {
|
|
2068
|
+
return Promise.reject();
|
|
2069
|
+
}
|
|
2070
|
+
} else if (type === 'docx') {
|
|
2071
|
+
const len = dataView.byteLength;
|
|
2072
|
+
if (len < 22) return Promise.reject();
|
|
2073
|
+
const isZipHeader = dataView.getUint8(0) === 0x50 && dataView.getUint8(1) === 0x4B && dataView.getUint8(2) === 0x03 && dataView.getUint8(3) === 0x04;
|
|
2074
|
+
if (!isZipHeader) return Promise.reject();
|
|
2075
|
+
const EOCD = [0x50, 0x4B, 0x05, 0x06];
|
|
2076
|
+
const maxBack = Math.min(len - 4, 0xFFFF + 22);
|
|
2077
|
+
let eocdIndex = -1;
|
|
2078
|
+
for (let i = len - 4; i >= len - 4 - maxBack; i--) {
|
|
2079
|
+
if (i < 0) break;
|
|
2080
|
+
if (dataView.getUint8(i) === EOCD[0] && dataView.getUint8(i + 1) === EOCD[1] && dataView.getUint8(i + 2) === EOCD[2] && dataView.getUint8(i + 3) === EOCD[3]) {
|
|
2081
|
+
eocdIndex = i;
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
if (eocdIndex === -1) return Promise.reject();
|
|
2086
|
+
const findAscii = needle => {
|
|
2087
|
+
const enc = new TextEncoder().encode(needle);
|
|
2088
|
+
for (let i = 0; i <= len - enc.length; i++) {
|
|
2089
|
+
let ok = true;
|
|
2090
|
+
for (let j = 0; j < enc.length; j++) {
|
|
2091
|
+
if (dataView.getUint8(i + j) !== enc[j]) {
|
|
2092
|
+
ok = false;
|
|
2093
|
+
break;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
if (ok) return true;
|
|
2097
|
+
}
|
|
2098
|
+
return false;
|
|
2099
|
+
};
|
|
2100
|
+
const hasContentTypes = findAscii('[Content_Types].xml');
|
|
2101
|
+
const hasRels = findAscii('_rels/.rels');
|
|
2102
|
+
const hasDocument = findAscii('word/document.xml');
|
|
2103
|
+
return hasContentTypes && hasRels && hasDocument ? Promise.resolve() : Promise.reject();
|
|
2104
|
+
} else if (type === 'doc') {
|
|
2105
|
+
const len = dataView.byteLength;
|
|
2106
|
+
if (len < 512) return Promise.reject();
|
|
2107
|
+
const FREESECT = 0xFFFFFFFF;
|
|
2108
|
+
const ENDOFCHAIN = 0xFFFFFFFE;
|
|
2109
|
+
const getU32 = off => dataView.getUint32(off, true);
|
|
2110
|
+
const getI32 = off => dataView.getInt32(off, true);
|
|
2111
|
+
const getU16 = off => dataView.getUint16(off, true);
|
|
2112
|
+
const sectorOffset = (sector, sectorSize) => (sector + 1) * sectorSize;
|
|
2113
|
+
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;
|
|
2114
|
+
if (!isOle) return Promise.reject();
|
|
2115
|
+
if (dataView.getUint8(0x1C) !== 0xFE || dataView.getUint8(0x1D) !== 0xFF) {
|
|
2116
|
+
return Promise.reject();
|
|
2117
|
+
}
|
|
2118
|
+
const sectorShift = getU16(0x1E); // 9 => 512, 12 => 4096
|
|
2119
|
+
if (sectorShift !== 9 && sectorShift !== 12) return Promise.reject();
|
|
2120
|
+
const sectorSize = 1 << sectorShift;
|
|
2121
|
+
const firstDirSector = getI32(0x30);
|
|
2122
|
+
if (firstDirSector < 0) return Promise.reject();
|
|
2123
|
+
const dirStartOff = sectorOffset(firstDirSector, sectorSize);
|
|
2124
|
+
if (dirStartOff < 512 || dirStartOff + sectorSize > len) return Promise.reject();
|
|
2125
|
+
const numFATSectors = getU32(0x2C);
|
|
2126
|
+
let firstDIFATSector = getI32(0x44);
|
|
2127
|
+
let numDIFATSectors = getU32(0x48);
|
|
2128
|
+
const difat = [];
|
|
2129
|
+
for (let i = 0; i < 109; i++) {
|
|
2130
|
+
const sec = getU32(0x4C + i * 4);
|
|
2131
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2132
|
+
}
|
|
2133
|
+
const entriesPerDifatSector = sectorSize / 4 - 1;
|
|
2134
|
+
while (numDIFATSectors > 0 && firstDIFATSector !== -1 && firstDIFATSector !== ENDOFCHAIN) {
|
|
2135
|
+
const off = sectorOffset(firstDIFATSector, sectorSize);
|
|
2136
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2137
|
+
for (let i = 0; i < entriesPerDifatSector; i++) {
|
|
2138
|
+
const sec = dataView.getUint32(off + i * 4, true);
|
|
2139
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2140
|
+
}
|
|
2141
|
+
firstDIFATSector = dataView.getInt32(off + entriesPerDifatSector * 4, true); // next DIFAT
|
|
2142
|
+
numDIFATSectors--;
|
|
2143
|
+
}
|
|
2144
|
+
if (difat.length === 0 || numFATSectors === 0) return Promise.reject();
|
|
2145
|
+
const fat = [];
|
|
2146
|
+
for (let i = 0; i < difat.length; i++) {
|
|
2147
|
+
const fatSector = difat[i];
|
|
2148
|
+
const off = sectorOffset(fatSector, sectorSize);
|
|
2149
|
+
if (off < 512 || off + sectorSize > len) continue;
|
|
2150
|
+
for (let j = 0; j < sectorSize; j += 4) {
|
|
2151
|
+
fat.push(dataView.getUint32(off + j, true));
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
if (fat.length === 0) return Promise.reject();
|
|
2155
|
+
const nextSector = s => s >= 0 && s < fat.length ? fat[s] : ENDOFCHAIN;
|
|
2156
|
+
const names = new Set();
|
|
2157
|
+
const td = new TextDecoder("utf-16le");
|
|
2158
|
+
let dirSector = firstDirSector;
|
|
2159
|
+
let safety = 0;
|
|
2160
|
+
while (dirSector !== ENDOFCHAIN && dirSector !== FREESECT && safety++ < 10000) {
|
|
2161
|
+
const off = sectorOffset(dirSector, sectorSize);
|
|
2162
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2163
|
+
for (let pos = 0; pos < sectorSize; pos += 128) {
|
|
2164
|
+
const entryOff = off + pos;
|
|
2165
|
+
const nameLen = getU16(entryOff + 64);
|
|
2166
|
+
const objType = dataView.getUint8(entryOff + 66);
|
|
2167
|
+
if (objType === 0 || nameLen < 2 || nameLen > 64) continue;
|
|
2168
|
+
const nameBytes = new Uint8Array(dataView.buffer, dataView.byteOffset + entryOff, 64);
|
|
2169
|
+
const realLen = Math.max(0, nameLen - 2);
|
|
2170
|
+
const name = td.decode(nameBytes.slice(0, realLen)).replace(/\0/g, "");
|
|
2171
|
+
if (name) names.add(name);
|
|
2172
|
+
}
|
|
2173
|
+
dirSector = nextSector(dirSector);
|
|
2174
|
+
}
|
|
2175
|
+
const hasWordDocument = names.has("WordDocument");
|
|
2176
|
+
const hasTable = names.has("1Table") || names.has("0Table");
|
|
2177
|
+
return hasWordDocument && hasTable ? Promise.resolve() : Promise.reject();
|
|
2178
|
+
} else if (type === 'pdf') {
|
|
2179
|
+
const text = new TextDecoder().decode(buffer);
|
|
2180
|
+
if (!text.includes("%%EOF")) return Promise.reject();
|
|
2181
|
+
if (!text.startsWith("%PDF-")) return Promise.reject();
|
|
2182
|
+
if (!text.includes("startxref")) return Promise.reject();
|
|
2183
|
+
if (dataView.byteLength < 8) {
|
|
2184
|
+
return Promise.reject();
|
|
2185
|
+
} else {
|
|
2186
|
+
if (dataView.getUint8(0) === 0x25 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x44 && dataView.getUint8(3) === 0x46) {
|
|
2187
|
+
const len = dataView.byteLength;
|
|
2188
|
+
let end = len - 1;
|
|
2189
|
+
while (end >= 0 && (dataView.getUint8(end) === 0x0A || dataView.getUint8(end) === 0x0D || dataView.getUint8(end) === 0x20 || dataView.getUint8(end) === 0x09)) {
|
|
2190
|
+
end--;
|
|
2191
|
+
}
|
|
2192
|
+
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) {
|
|
2193
|
+
return Promise.resolve();
|
|
2194
|
+
} else {
|
|
2195
|
+
return Promise.reject();
|
|
2196
|
+
}
|
|
2197
|
+
} else {
|
|
2198
|
+
return Promise.reject();
|
|
2023
2199
|
}
|
|
2024
2200
|
}
|
|
2201
|
+
} else if (type === 'heic') {
|
|
2202
|
+
const length = dataView.byteLength;
|
|
2203
|
+
if (length < 32) {
|
|
2204
|
+
return Promise.reject();
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
// --- Check 'ftyp' at offset 4 ---
|
|
2208
|
+
if (dataView.getUint8(4) !== 0x66 ||
|
|
2209
|
+
// f
|
|
2210
|
+
dataView.getUint8(5) !== 0x74 ||
|
|
2211
|
+
// t
|
|
2212
|
+
dataView.getUint8(6) !== 0x79 ||
|
|
2213
|
+
// y
|
|
2214
|
+
dataView.getUint8(7) !== 0x70 // p
|
|
2215
|
+
) {
|
|
2216
|
+
return Promise.reject();
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
// --- Check major brand ---
|
|
2220
|
+
const majorBrand = String.fromCharCode(dataView.getUint8(8), dataView.getUint8(9), dataView.getUint8(10), dataView.getUint8(11));
|
|
2221
|
+
const validBrands = ['heic', 'heix', 'hevc', 'hevx', 'mif1', 'msf1', 'heif'];
|
|
2222
|
+
if (!validBrands.includes(majorBrand)) {
|
|
2223
|
+
return Promise.reject();
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
// --- Scan boxes (basic ISO BMFF parsing) ---
|
|
2227
|
+
let offset = 0;
|
|
2228
|
+
let foundMeta = false;
|
|
2229
|
+
let foundMdat = false;
|
|
2230
|
+
while (offset + 8 <= length) {
|
|
2231
|
+
const size = dataView.getUint32(offset);
|
|
2232
|
+
const type = String.fromCharCode(dataView.getUint8(offset + 4), dataView.getUint8(offset + 5), dataView.getUint8(offset + 6), dataView.getUint8(offset + 7));
|
|
2233
|
+
|
|
2234
|
+
// Invalid size → corrupted file
|
|
2235
|
+
if (size < 8 || offset + size > length) {
|
|
2236
|
+
return Promise.reject();
|
|
2237
|
+
}
|
|
2238
|
+
if (type === "meta") foundMeta = true;
|
|
2239
|
+
if (type === "mdat") foundMdat = true;
|
|
2240
|
+
offset += size;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
// --- Require at least meta box ---
|
|
2244
|
+
if (!foundMeta) {
|
|
2245
|
+
return Promise.reject();
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
// Optional but recommended
|
|
2249
|
+
if (!foundMdat) {
|
|
2250
|
+
return Promise.reject();
|
|
2251
|
+
}
|
|
2252
|
+
return Promise.resolve();
|
|
2253
|
+
} else {
|
|
2254
|
+
return Promise.reject();
|
|
2025
2255
|
}
|
|
2026
|
-
return Promise.reject();
|
|
2027
2256
|
};
|
|
2028
2257
|
const handleRemoveComponent = () => {
|
|
2029
2258
|
if (!multiple) {
|
|
@@ -2037,6 +2266,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2037
2266
|
setImage(null);
|
|
2038
2267
|
setSingleFile(null);
|
|
2039
2268
|
removeFile && removeFile(singleFile);
|
|
2269
|
+
error && setError('');
|
|
2040
2270
|
};
|
|
2041
2271
|
const handleUploadFiles = file => {
|
|
2042
2272
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
@@ -2053,43 +2283,24 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2053
2283
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2054
2284
|
if (file[ix]) {
|
|
2055
2285
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2056
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2286
|
+
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')) {
|
|
2287
|
+
let typeOfFile = '';
|
|
2057
2288
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2058
|
-
|
|
2059
|
-
id: '',
|
|
2060
|
-
check: '',
|
|
2061
|
-
status: '',
|
|
2062
|
-
file: file[ix],
|
|
2063
|
-
uuid: v4()
|
|
2064
|
-
});
|
|
2065
|
-
setImage('docx');
|
|
2289
|
+
typeOfFile = 'docx';
|
|
2066
2290
|
} else if (file[ix].type === 'application/msword') {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2077
|
-
change({
|
|
2078
|
-
id: '',
|
|
2079
|
-
check: '',
|
|
2080
|
-
status: '',
|
|
2081
|
-
file: file[ix],
|
|
2082
|
-
uuid: v4()
|
|
2083
|
-
});
|
|
2084
|
-
setImage('heic');
|
|
2085
|
-
}).catch(() => {
|
|
2086
|
-
change({
|
|
2087
|
-
file: file[ix],
|
|
2088
|
-
uuid: v4(),
|
|
2089
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2090
|
-
});
|
|
2091
|
-
});
|
|
2291
|
+
typeOfFile = 'doc';
|
|
2292
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2293
|
+
typeOfFile = 'pdf';
|
|
2294
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2295
|
+
typeOfFile = 'heic';
|
|
2296
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2297
|
+
typeOfFile = 'jpg';
|
|
2298
|
+
} else if (file[ix].type === 'image/png') {
|
|
2299
|
+
typeOfFile = 'png';
|
|
2092
2300
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2301
|
+
typeOfFile = 'svg';
|
|
2302
|
+
}
|
|
2303
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2093
2304
|
change({
|
|
2094
2305
|
id: '',
|
|
2095
2306
|
check: '',
|
|
@@ -2097,16 +2308,14 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2097
2308
|
file: file[ix],
|
|
2098
2309
|
uuid: v4()
|
|
2099
2310
|
});
|
|
2100
|
-
setImage(
|
|
2101
|
-
}
|
|
2311
|
+
setImage(typeOfFile);
|
|
2312
|
+
}).catch(() => {
|
|
2102
2313
|
change({
|
|
2103
|
-
id: '',
|
|
2104
|
-
check: '',
|
|
2105
|
-
status: '',
|
|
2106
2314
|
file: file[ix],
|
|
2107
|
-
uuid: v4()
|
|
2315
|
+
uuid: v4(),
|
|
2316
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2108
2317
|
});
|
|
2109
|
-
}
|
|
2318
|
+
});
|
|
2110
2319
|
} else {
|
|
2111
2320
|
change({
|
|
2112
2321
|
file: file[ix],
|
|
@@ -2128,43 +2337,24 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2128
2337
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2129
2338
|
if (file[ix]) {
|
|
2130
2339
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2131
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2340
|
+
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')) {
|
|
2341
|
+
let typeOfFile = '';
|
|
2132
2342
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2133
|
-
|
|
2134
|
-
id: '',
|
|
2135
|
-
check: '',
|
|
2136
|
-
status: '',
|
|
2137
|
-
file: file[ix],
|
|
2138
|
-
uuid: v4()
|
|
2139
|
-
});
|
|
2140
|
-
setImage('docx');
|
|
2343
|
+
typeOfFile = 'docx';
|
|
2141
2344
|
} else if (file[ix].type === 'application/msword') {
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2152
|
-
change({
|
|
2153
|
-
id: '',
|
|
2154
|
-
check: '',
|
|
2155
|
-
status: '',
|
|
2156
|
-
file: file[ix],
|
|
2157
|
-
uuid: v4()
|
|
2158
|
-
});
|
|
2159
|
-
setImage('heic');
|
|
2160
|
-
}).catch(() => {
|
|
2161
|
-
change({
|
|
2162
|
-
file: file[ix],
|
|
2163
|
-
uuid: v4(),
|
|
2164
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2165
|
-
});
|
|
2166
|
-
});
|
|
2345
|
+
typeOfFile = 'doc';
|
|
2346
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2347
|
+
typeOfFile = 'pdf';
|
|
2348
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2349
|
+
typeOfFile = 'heic';
|
|
2350
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2351
|
+
typeOfFile = 'jpg';
|
|
2352
|
+
} else if (file[ix].type === 'image/png') {
|
|
2353
|
+
typeOfFile = 'png';
|
|
2167
2354
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2355
|
+
typeOfFile = 'svg';
|
|
2356
|
+
}
|
|
2357
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2168
2358
|
change({
|
|
2169
2359
|
id: '',
|
|
2170
2360
|
check: '',
|
|
@@ -2172,16 +2362,14 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2172
2362
|
file: file[ix],
|
|
2173
2363
|
uuid: v4()
|
|
2174
2364
|
});
|
|
2175
|
-
setImage(
|
|
2176
|
-
}
|
|
2365
|
+
setImage(typeOfFile);
|
|
2366
|
+
}).catch(() => {
|
|
2177
2367
|
change({
|
|
2178
|
-
id: '',
|
|
2179
|
-
check: '',
|
|
2180
|
-
status: '',
|
|
2181
2368
|
file: file[ix],
|
|
2182
|
-
uuid: v4()
|
|
2369
|
+
uuid: v4(),
|
|
2370
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2183
2371
|
});
|
|
2184
|
-
}
|
|
2372
|
+
});
|
|
2185
2373
|
} else {
|
|
2186
2374
|
change({
|
|
2187
2375
|
file: file[ix],
|
|
@@ -2212,34 +2400,36 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2212
2400
|
} else {
|
|
2213
2401
|
if (file[0]) {
|
|
2214
2402
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2215
|
-
if (fileExtensions.includes(file[0].
|
|
2403
|
+
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')) {
|
|
2216
2404
|
setError('');
|
|
2405
|
+
let typeOfFile = '';
|
|
2217
2406
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2218
|
-
|
|
2219
|
-
change(file);
|
|
2220
|
-
setSingleFile(file);
|
|
2407
|
+
typeOfFile = 'docx';
|
|
2221
2408
|
} else if (file[0].type === 'application/msword') {
|
|
2222
|
-
|
|
2223
|
-
change(file);
|
|
2224
|
-
setSingleFile(file);
|
|
2409
|
+
typeOfFile = 'doc';
|
|
2225
2410
|
} else if (file[0].type === 'application/pdf') {
|
|
2226
|
-
|
|
2227
|
-
change(file);
|
|
2228
|
-
setSingleFile(file);
|
|
2411
|
+
typeOfFile = 'pdf';
|
|
2229
2412
|
} else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2413
|
+
typeOfFile = 'heic';
|
|
2414
|
+
} else if (file[0].type === 'image/jpeg') {
|
|
2415
|
+
typeOfFile = 'jpg';
|
|
2416
|
+
} else if (file[0].type === 'image/png') {
|
|
2417
|
+
typeOfFile = 'png';
|
|
2418
|
+
} else if (file[0].type === 'image/svg+xml') {
|
|
2419
|
+
typeOfFile = 'svg';
|
|
2420
|
+
}
|
|
2421
|
+
handleCheckFileFormat(file[0], typeOfFile).then(() => {
|
|
2422
|
+
if (typeOfFile === 'svg' || typeOfFile === 'png' || typeOfFile === 'jpg') {
|
|
2423
|
+
setImage(URL.createObjectURL(file[0]));
|
|
2424
|
+
} else {
|
|
2425
|
+
setImage(typeOfFile);
|
|
2426
|
+
}
|
|
2239
2427
|
change(file);
|
|
2240
2428
|
setSingleFile(file);
|
|
2241
|
-
|
|
2242
|
-
|
|
2429
|
+
}).catch(() => {
|
|
2430
|
+
setImage(null);
|
|
2431
|
+
setError(formatValidateError ?? configStyles.FILE.error.formatValidate);
|
|
2432
|
+
});
|
|
2243
2433
|
} else {
|
|
2244
2434
|
setImage(null);
|
|
2245
2435
|
setError(formatError ?? configStyles.FILE.error.format);
|
|
@@ -2496,10 +2686,10 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2496
2686
|
style: {
|
|
2497
2687
|
width: '100%',
|
|
2498
2688
|
color: labelColor ?? configStyles.FILE.label.color,
|
|
2499
|
-
fontSize:
|
|
2500
|
-
fontStyle:
|
|
2501
|
-
fontWeight:
|
|
2502
|
-
fontFamily:
|
|
2689
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2690
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2691
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2692
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2503
2693
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
2504
2694
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
2505
2695
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -2510,20 +2700,20 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2510
2700
|
}, label, handleCheckTextWidth('label') === 'more' && showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2511
2701
|
className: styles$c['show-more-text'],
|
|
2512
2702
|
style: {
|
|
2513
|
-
fontSize:
|
|
2514
|
-
fontStyle:
|
|
2515
|
-
fontWeight:
|
|
2516
|
-
fontFamily:
|
|
2703
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2704
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2705
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2706
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2517
2707
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2518
2708
|
},
|
|
2519
2709
|
onClick: handleChangeShowMore
|
|
2520
2710
|
}, ' ', " ", labelShowLessText ?? configStyles.FILE.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth('label') === 'more' && !showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2521
2711
|
className: styles$c['show-more-text'],
|
|
2522
2712
|
style: {
|
|
2523
|
-
fontSize:
|
|
2524
|
-
fontStyle:
|
|
2525
|
-
fontWeight:
|
|
2526
|
-
fontFamily:
|
|
2713
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2714
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2715
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2716
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2527
2717
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2528
2718
|
},
|
|
2529
2719
|
onClick: handleChangeShowMore
|
|
@@ -2544,9 +2734,9 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2544
2734
|
height: height ?? configStyles.FILE.height,
|
|
2545
2735
|
borderWidth: borderWidth ?? configStyles.FILE.border.width,
|
|
2546
2736
|
borderStyle: borderStyle ?? configStyles.FILE.border.style,
|
|
2547
|
-
borderRadius:
|
|
2737
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2548
2738
|
backgroundColor: backgroundColor ?? configStyles.FILE.colors.background,
|
|
2549
|
-
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
|
|
2739
|
+
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
|
|
2550
2740
|
},
|
|
2551
2741
|
onDrop: handleDrop,
|
|
2552
2742
|
onClick: handleClick,
|
|
@@ -2571,10 +2761,10 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2571
2761
|
flexDirection: 'column',
|
|
2572
2762
|
justifyContent: 'center',
|
|
2573
2763
|
color: color ?? configStyles.FILE.color,
|
|
2574
|
-
fontSize:
|
|
2575
|
-
fontStyle:
|
|
2576
|
-
fontFamily:
|
|
2577
|
-
fontWeight:
|
|
2764
|
+
fontSize: fontSize ?? configStyles.FILE.font.size,
|
|
2765
|
+
fontStyle: fontStyle ?? configStyles.FILE.font.style,
|
|
2766
|
+
fontFamily: fontFamily ?? configStyles.FILE.font.family,
|
|
2767
|
+
fontWeight: fontWeight ?? configStyles.FILE.font.weight
|
|
2578
2768
|
}
|
|
2579
2769
|
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2580
2770
|
src: image,
|
|
@@ -2591,7 +2781,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2591
2781
|
style: {
|
|
2592
2782
|
margin: '0px'
|
|
2593
2783
|
}
|
|
2594
|
-
}, putFileHere ?? configStyles.FILE.putFileHere,
|
|
2784
|
+
}, putFileHere ?? configStyles.FILE.putFileHere, ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2595
2785
|
style: {
|
|
2596
2786
|
color: uploadColor ?? configStyles.FILE.uploadColor
|
|
2597
2787
|
}
|
|
@@ -2626,11 +2816,11 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2626
2816
|
}, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2627
2817
|
contentWidth: true,
|
|
2628
2818
|
onClick: _ => _,
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2819
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2820
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2821
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2822
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2823
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2634
2824
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2635
2825
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2636
2826
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2639,11 +2829,11 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2639
2829
|
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2640
2830
|
contentWidth: true,
|
|
2641
2831
|
onClick: _ => _,
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2832
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2833
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2834
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2835
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2836
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2647
2837
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2648
2838
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2649
2839
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2688,8 +2878,8 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2688
2878
|
boxSizing: 'border-box',
|
|
2689
2879
|
alignItems: 'flex-start',
|
|
2690
2880
|
justifyContent: 'flex-end',
|
|
2691
|
-
borderRadius:
|
|
2692
|
-
display: !multiple && !disabled && image &&
|
|
2881
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2882
|
+
display: !multiple && !disabled && image && isHover ? 'flex' : 'none',
|
|
2693
2883
|
backgroundColor: hiddenBackgroundColor ?? configStyles.FILE.colors.backgroundHidden
|
|
2694
2884
|
},
|
|
2695
2885
|
onClick: handleStopPropagation
|
|
@@ -2698,16 +2888,16 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2698
2888
|
cursor: 'pointer'
|
|
2699
2889
|
},
|
|
2700
2890
|
onClick: handleRemoveFile
|
|
2701
|
-
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2891
|
+
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), !multiple && error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2702
2892
|
style: {
|
|
2703
|
-
marginTop: '6px',
|
|
2704
|
-
color: errorColor ?? configStyles.FILE.error.color,
|
|
2705
|
-
fontSize: errorSize ?? configStyles.FILE.error.font.size,
|
|
2706
|
-
fontStyle: errorStyle ?? configStyles.FILE.error.font.style,
|
|
2707
|
-
fontWeight: errorWeight ?? configStyles.FILE.error.font.weight,
|
|
2708
|
-
fontFamily: errorFamily ?? configStyles.FILE.error.font.family,
|
|
2709
|
-
alignItems: 'center',
|
|
2710
2893
|
columnGap: '5px',
|
|
2894
|
+
alignItems: 'center',
|
|
2895
|
+
color: errorColor ?? configStyles.FILE.error.color,
|
|
2896
|
+
fontSize: errorFontSize ?? configStyles.FILE.error.font.size,
|
|
2897
|
+
marginTop: errorMarginTop ?? configStyles.FILE.error.marginTop,
|
|
2898
|
+
fontStyle: errorFontStyle ?? configStyles.FILE.error.font.style,
|
|
2899
|
+
fontWeight: errorFontWeight ?? configStyles.FILE.error.font.weight,
|
|
2900
|
+
fontFamily: errorFontFamily ?? configStyles.FILE.error.font.family,
|
|
2711
2901
|
display: errorIconShow && (errorIcon || configStyles.FILE.error?.icon) ? 'inline-flex' : 'inline-block'
|
|
2712
2902
|
}
|
|
2713
2903
|
}, errorIconShow ? errorIcon ? errorIcon : configStyles.FILE.error?.icon ? configStyles.FILE.error?.icon : '' : '', error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
@@ -2730,7 +2920,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2730
2920
|
iconDelItem: iconDeleteItem ?? configStyles.FILE.icon.deleteItem,
|
|
2731
2921
|
timeForRemoveError: timeForRemoveError,
|
|
2732
2922
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2733
|
-
radius:
|
|
2923
|
+
radius: borderRadius ?? configStyles.FILE.radius,
|
|
2734
2924
|
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2735
2925
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2736
2926
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
@@ -2754,34 +2944,33 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2754
2944
|
}));
|
|
2755
2945
|
});
|
|
2756
2946
|
File.propTypes = {
|
|
2757
|
-
or: PropTypes__default["default"].string,
|
|
2758
|
-
size: PropTypes__default["default"].string,
|
|
2759
2947
|
preview: PropTypes__default["default"].bool,
|
|
2760
2948
|
label: PropTypes__default["default"].string,
|
|
2761
2949
|
color: PropTypes__default["default"].string,
|
|
2762
2950
|
height: PropTypes__default["default"].string,
|
|
2763
2951
|
disabled: PropTypes__default["default"].bool,
|
|
2764
|
-
|
|
2952
|
+
borderRadius: PropTypes__default["default"].string,
|
|
2765
2953
|
borderWidth: PropTypes__default["default"].string,
|
|
2766
2954
|
borderStyle: PropTypes__default["default"].string,
|
|
2767
2955
|
borderColor: PropTypes__default["default"].string,
|
|
2768
2956
|
required: PropTypes__default["default"].bool,
|
|
2769
2957
|
upload: PropTypes__default["default"].string,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2958
|
+
fontSize: PropTypes__default["default"].string,
|
|
2959
|
+
fontWeight: PropTypes__default["default"].number,
|
|
2960
|
+
fontStyle: PropTypes__default["default"].string,
|
|
2961
|
+
fontFamily: PropTypes__default["default"].string,
|
|
2773
2962
|
maxSize: PropTypes__default["default"].number,
|
|
2774
2963
|
maxWidth: PropTypes__default["default"].string,
|
|
2775
2964
|
removeFile: PropTypes__default["default"].func,
|
|
2776
2965
|
className: PropTypes__default["default"].string,
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2966
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
2967
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
2968
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
2969
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
2970
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
2971
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
2972
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
2973
|
+
labelFontFamily: PropTypes__default["default"].string,
|
|
2785
2974
|
labelColor: PropTypes__default["default"].string,
|
|
2786
2975
|
lableShowMore: PropTypes__default["default"].bool,
|
|
2787
2976
|
labelShowLessText: PropTypes__default["default"].string,
|
|
@@ -2799,6 +2988,7 @@ File.propTypes = {
|
|
|
2799
2988
|
labelTooltipBackgroundColor: PropTypes__default["default"].string,
|
|
2800
2989
|
errorColor: PropTypes__default["default"].string,
|
|
2801
2990
|
formatError: PropTypes__default["default"].string,
|
|
2991
|
+
formatValidateError: PropTypes__default["default"].string,
|
|
2802
2992
|
putFileHere: PropTypes__default["default"].string,
|
|
2803
2993
|
uploadColor: PropTypes__default["default"].string,
|
|
2804
2994
|
defaultData: PropTypes__default["default"].object,
|
|
@@ -2806,6 +2996,7 @@ File.propTypes = {
|
|
|
2806
2996
|
maxSizeError: PropTypes__default["default"].string,
|
|
2807
2997
|
errorIcon: PropTypes__default["default"].element,
|
|
2808
2998
|
errorIconShow: PropTypes__default["default"].bool,
|
|
2999
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
2809
3000
|
errorMessage: PropTypes__default["default"].string,
|
|
2810
3001
|
fileSizeText: PropTypes__default["default"].string,
|
|
2811
3002
|
noChoosenFile: PropTypes__default["default"].string,
|
|
@@ -3219,6 +3410,7 @@ const TD = ({
|
|
|
3219
3410
|
orderFontSize,
|
|
3220
3411
|
tBodyFontSize,
|
|
3221
3412
|
openListColor,
|
|
3413
|
+
tBodyFontStyle,
|
|
3222
3414
|
orderFontStyle,
|
|
3223
3415
|
tBodyTextAlign,
|
|
3224
3416
|
orderFontFamily,
|
|
@@ -3312,6 +3504,7 @@ const TD = ({
|
|
|
3312
3504
|
padding: tBodyPadding,
|
|
3313
3505
|
fontSize: tBodyFontSize,
|
|
3314
3506
|
borderRight: borderRight,
|
|
3507
|
+
fontStyle: tBodyFontStyle,
|
|
3315
3508
|
textAlign: tBodyTextAlign,
|
|
3316
3509
|
fontFamily: tBodyFontFamily,
|
|
3317
3510
|
fontWeight: tBodyFontWeight,
|
|
@@ -3605,7 +3798,7 @@ const Table = ({
|
|
|
3605
3798
|
tableColumnMaxWidth,
|
|
3606
3799
|
tableColumnMinWidth,
|
|
3607
3800
|
tHeadColor,
|
|
3608
|
-
|
|
3801
|
+
tHeadFontFamily,
|
|
3609
3802
|
tHeadPadding,
|
|
3610
3803
|
tHeadFontSize,
|
|
3611
3804
|
tHeadFontStyle,
|
|
@@ -3616,6 +3809,7 @@ const Table = ({
|
|
|
3616
3809
|
tBodyColor,
|
|
3617
3810
|
tBodyPadding,
|
|
3618
3811
|
tBodyFontSize,
|
|
3812
|
+
tBodyFontStyle,
|
|
3619
3813
|
tBodyTextAlign,
|
|
3620
3814
|
tBodyRowBorder,
|
|
3621
3815
|
tBodyBoxShadow,
|
|
@@ -4402,7 +4596,7 @@ const Table = ({
|
|
|
4402
4596
|
handleCheckedHeader: handleCheckedHeader,
|
|
4403
4597
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
4404
4598
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
4405
|
-
tHeadFamily:
|
|
4599
|
+
tHeadFamily: tHeadFontFamily ?? configStyles.TABLE.head.font.family,
|
|
4406
4600
|
tHeadPadding: tHeadPadding ?? configStyles.TABLE.head.padding,
|
|
4407
4601
|
tHeadFontSize: tHeadFontSize ?? configStyles.TABLE.head.font.size,
|
|
4408
4602
|
tHeadFontStyle: tHeadFontStyle ?? configStyles.TABLE.head.font.style,
|
|
@@ -4464,6 +4658,7 @@ const Table = ({
|
|
|
4464
4658
|
rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
|
|
4465
4659
|
tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
|
|
4466
4660
|
tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
|
|
4661
|
+
tBodyFontStyle: tBodyFontStyle ?? configStyles.TABLE.body.font.style,
|
|
4467
4662
|
tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
|
|
4468
4663
|
tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
|
|
4469
4664
|
tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
|
|
@@ -4540,7 +4735,7 @@ Table.propTypes = {
|
|
|
4540
4735
|
tableColumnMaxWidth: PropTypes__default["default"].string,
|
|
4541
4736
|
tableColumnMinWidth: PropTypes__default["default"].string,
|
|
4542
4737
|
tHeadColor: PropTypes__default["default"].string,
|
|
4543
|
-
|
|
4738
|
+
tHeadFontFamily: PropTypes__default["default"].string,
|
|
4544
4739
|
tHeadPadding: PropTypes__default["default"].string,
|
|
4545
4740
|
tHeadFontSize: PropTypes__default["default"].string,
|
|
4546
4741
|
tHeadFontStyle: PropTypes__default["default"].string,
|
|
@@ -4551,6 +4746,7 @@ Table.propTypes = {
|
|
|
4551
4746
|
tBodyColor: PropTypes__default["default"].string,
|
|
4552
4747
|
tBodyPadding: PropTypes__default["default"].string,
|
|
4553
4748
|
tBodyFontSize: PropTypes__default["default"].string,
|
|
4749
|
+
tBodyFontStyle: PropTypes__default["default"].string,
|
|
4554
4750
|
tBodyBoxShadow: PropTypes__default["default"].string,
|
|
4555
4751
|
tBodyTextAlign: PropTypes__default["default"].string,
|
|
4556
4752
|
tBodyFontWeight: PropTypes__default["default"].string,
|
|
@@ -4686,15 +4882,16 @@ const Modal = ({
|
|
|
4686
4882
|
data,
|
|
4687
4883
|
width,
|
|
4688
4884
|
loader,
|
|
4689
|
-
radius,
|
|
4690
4885
|
height,
|
|
4691
4886
|
padding,
|
|
4692
4887
|
setShow,
|
|
4888
|
+
underScroll,
|
|
4693
4889
|
zoomIcon,
|
|
4694
4890
|
prevIcon,
|
|
4695
4891
|
nextIcon,
|
|
4696
4892
|
closeIcon,
|
|
4697
4893
|
closeIconFix,
|
|
4894
|
+
borderRadius,
|
|
4698
4895
|
showCloseIcon,
|
|
4699
4896
|
closeIconClass,
|
|
4700
4897
|
closeSlideIcon,
|
|
@@ -4705,15 +4902,12 @@ const Modal = ({
|
|
|
4705
4902
|
minWidth,
|
|
4706
4903
|
minHeight,
|
|
4707
4904
|
className,
|
|
4708
|
-
|
|
4905
|
+
maxWidth,
|
|
4709
4906
|
alignItems,
|
|
4710
|
-
|
|
4907
|
+
maxHeight,
|
|
4711
4908
|
headerText,
|
|
4712
4909
|
imageWidth,
|
|
4713
|
-
headerSize,
|
|
4714
4910
|
headerIcon,
|
|
4715
|
-
headerStyle,
|
|
4716
|
-
headerFamily,
|
|
4717
4911
|
imageHeight,
|
|
4718
4912
|
headerColor,
|
|
4719
4913
|
borderStyle,
|
|
@@ -4722,13 +4916,16 @@ const Modal = ({
|
|
|
4722
4916
|
imageMargin,
|
|
4723
4917
|
showZoomIcon,
|
|
4724
4918
|
outsideClose,
|
|
4725
|
-
headerWeight,
|
|
4726
4919
|
headerHeight,
|
|
4727
4920
|
justifyContent,
|
|
4921
|
+
headerFontSize,
|
|
4728
4922
|
headerTextAlign,
|
|
4729
4923
|
backgroundColor,
|
|
4730
4924
|
imageWrapHeight,
|
|
4731
4925
|
grayDecorHeight,
|
|
4926
|
+
headerFontStyle,
|
|
4927
|
+
headerFontFamily,
|
|
4928
|
+
headerFontWeight,
|
|
4732
4929
|
headerIconMaxWidth,
|
|
4733
4930
|
headerIconMaxHeight,
|
|
4734
4931
|
layerBackgroundColor,
|
|
@@ -4836,7 +5033,17 @@ const Modal = ({
|
|
|
4836
5033
|
newConfigStyles = {
|
|
4837
5034
|
...data
|
|
4838
5035
|
};
|
|
4839
|
-
if (
|
|
5036
|
+
if (underScroll === undefined) {
|
|
5037
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5038
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
5039
|
+
document.head.appendChild(style);
|
|
5040
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
5041
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
5042
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
5043
|
+
passive: false
|
|
5044
|
+
});
|
|
5045
|
+
}
|
|
5046
|
+
} else if (underScroll === false) {
|
|
4840
5047
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
4841
5048
|
document.head.appendChild(style);
|
|
4842
5049
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -4857,7 +5064,17 @@ const Modal = ({
|
|
|
4857
5064
|
return () => {
|
|
4858
5065
|
setSelect(0);
|
|
4859
5066
|
setInnerData([]);
|
|
4860
|
-
if (
|
|
5067
|
+
if (underScroll === undefined) {
|
|
5068
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5069
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
5070
|
+
if (noScrllable) {
|
|
5071
|
+
style.remove();
|
|
5072
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
5073
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
5074
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
5075
|
+
}
|
|
5076
|
+
}
|
|
5077
|
+
} else if (underScroll === false) {
|
|
4861
5078
|
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
4862
5079
|
if (noScrllable) {
|
|
4863
5080
|
style.remove();
|
|
@@ -4881,7 +5098,7 @@ const Modal = ({
|
|
|
4881
5098
|
left: '0px',
|
|
4882
5099
|
zIndex: 999,
|
|
4883
5100
|
width: '100%',
|
|
4884
|
-
height: '
|
|
5101
|
+
height: '100dvh',
|
|
4885
5102
|
position: 'fixed',
|
|
4886
5103
|
backgroundColor: layerBackgroundColor ?? configStyles.MODAL.colors.backgroundLayer
|
|
4887
5104
|
}
|
|
@@ -4890,7 +5107,7 @@ const Modal = ({
|
|
|
4890
5107
|
position: 'relative',
|
|
4891
5108
|
display: 'flex',
|
|
4892
5109
|
width: '100%',
|
|
4893
|
-
height: '
|
|
5110
|
+
height: '100dvh',
|
|
4894
5111
|
alignItems: alignItems ?? configStyles.MODAL.alignItems,
|
|
4895
5112
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4896
5113
|
}
|
|
@@ -4904,10 +5121,10 @@ const Modal = ({
|
|
|
4904
5121
|
height: height ?? configStyles.MODAL.height,
|
|
4905
5122
|
display: type === 'content' ? 'grid' : 'block',
|
|
4906
5123
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
|
|
5124
|
+
maxWidth: maxWidth ?? configStyles.MODAL.maxWidth,
|
|
5125
|
+
maxHeight: maxHeight ?? configStyles.MODAL.maxHeight,
|
|
4910
5126
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
5127
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
4911
5128
|
minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
|
|
4912
5129
|
backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
|
|
4913
5130
|
minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
|
|
@@ -4944,11 +5161,11 @@ const Modal = ({
|
|
|
4944
5161
|
textOverflow: 'ellipsis',
|
|
4945
5162
|
margin: '0px 16px 0px 0px',
|
|
4946
5163
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4947
|
-
fontSize:
|
|
5164
|
+
fontSize: headerFontSize ?? configStyles.MODAL.header.font.size,
|
|
4948
5165
|
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4949
|
-
fontStyle:
|
|
4950
|
-
fontFamily:
|
|
4951
|
-
fontWeight:
|
|
5166
|
+
fontStyle: headerFontStyle ?? configStyles.MODAL.header.font.style,
|
|
5167
|
+
fontFamily: headerFontFamily ?? configStyles.MODAL.header.font.family,
|
|
5168
|
+
fontWeight: headerFontWeight ?? configStyles.MODAL.header.font.weight
|
|
4952
5169
|
}
|
|
4953
5170
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4954
5171
|
onClick: () => setShow(false),
|
|
@@ -5040,7 +5257,7 @@ const Modal = ({
|
|
|
5040
5257
|
display: 'block',
|
|
5041
5258
|
objectFit: 'contain',
|
|
5042
5259
|
margin: imageMargin ?? configStyles.MODAL.image.margin,
|
|
5043
|
-
borderRadius:
|
|
5260
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
5044
5261
|
width: imageWidth ?? configStyles.MODAL.image.width,
|
|
5045
5262
|
height: imageHeight ?? configStyles.MODAL.image.height
|
|
5046
5263
|
},
|
|
@@ -5103,12 +5320,12 @@ Modal.propTypes = {
|
|
|
5103
5320
|
type: PropTypes__default["default"].string,
|
|
5104
5321
|
setShow: PropTypes__default["default"].func,
|
|
5105
5322
|
width: PropTypes__default["default"].string,
|
|
5106
|
-
radius: PropTypes__default["default"].string,
|
|
5107
5323
|
height: PropTypes__default["default"].string,
|
|
5108
5324
|
padding: PropTypes__default["default"].string,
|
|
5109
5325
|
selected: PropTypes__default["default"].number,
|
|
5110
5326
|
minWidth: PropTypes__default["default"].string,
|
|
5111
|
-
|
|
5327
|
+
maxWidth: PropTypes__default["default"].string,
|
|
5328
|
+
underScroll: PropTypes__default["default"].bool,
|
|
5112
5329
|
minHeight: PropTypes__default["default"].string,
|
|
5113
5330
|
className: PropTypes__default["default"].string,
|
|
5114
5331
|
zoomIcon: PropTypes__default["default"].element,
|
|
@@ -5117,21 +5334,22 @@ Modal.propTypes = {
|
|
|
5117
5334
|
closeIcon: PropTypes__default["default"].element,
|
|
5118
5335
|
closeIconFix: PropTypes__default["default"].bool,
|
|
5119
5336
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
5337
|
+
borderRadius: PropTypes__default["default"].string,
|
|
5120
5338
|
closeIconClass: PropTypes__default["default"].string,
|
|
5121
5339
|
closeSlideIcon: PropTypes__default["default"].element,
|
|
5122
5340
|
closeIconTopPosition: PropTypes__default["default"].string,
|
|
5123
5341
|
closeIconRightPosition: PropTypes__default["default"].string,
|
|
5124
5342
|
headerText: PropTypes__default["default"].string,
|
|
5125
|
-
|
|
5126
|
-
|
|
5343
|
+
headerFontSize: PropTypes__default["default"].string,
|
|
5344
|
+
headerFontStyle: PropTypes__default["default"].string,
|
|
5127
5345
|
headerIcon: PropTypes__default["default"].element,
|
|
5128
|
-
|
|
5346
|
+
headerFontFamily: PropTypes__default["default"].string,
|
|
5129
5347
|
headerTextAlign: PropTypes__default["default"].string,
|
|
5130
5348
|
headerIconMaxWidth: PropTypes__default["default"].string,
|
|
5131
5349
|
headerIconMaxHeight: PropTypes__default["default"].string,
|
|
5132
5350
|
headerIconMarginRight: PropTypes__default["default"].string,
|
|
5133
5351
|
alignItems: PropTypes__default["default"].string,
|
|
5134
|
-
|
|
5352
|
+
maxHeight: PropTypes__default["default"].string,
|
|
5135
5353
|
imageWidth: PropTypes__default["default"].string,
|
|
5136
5354
|
outsideClose: PropTypes__default["default"].bool,
|
|
5137
5355
|
showZoomIcon: PropTypes__default["default"].bool,
|
|
@@ -5140,7 +5358,7 @@ Modal.propTypes = {
|
|
|
5140
5358
|
borderWidth: PropTypes__default["default"].string,
|
|
5141
5359
|
headerColor: PropTypes__default["default"].string,
|
|
5142
5360
|
imageHeight: PropTypes__default["default"].string,
|
|
5143
|
-
|
|
5361
|
+
headerFontWeight: PropTypes__default["default"].string,
|
|
5144
5362
|
headerHeight: PropTypes__default["default"].string,
|
|
5145
5363
|
justifyContent: PropTypes__default["default"].string,
|
|
5146
5364
|
backgroundColor: PropTypes__default["default"].string,
|
|
@@ -5478,7 +5696,7 @@ const NumberInput = ({
|
|
|
5478
5696
|
});
|
|
5479
5697
|
};
|
|
5480
5698
|
|
|
5481
|
-
var css_248z$a = ".input-module_input-wrap__NunrE{
|
|
5699
|
+
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)}}";
|
|
5482
5700
|
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"};
|
|
5483
5701
|
styleInject(css_248z$a);
|
|
5484
5702
|
|
|
@@ -5497,60 +5715,61 @@ const P = styled__default["default"].span`
|
|
|
5497
5715
|
`;
|
|
5498
5716
|
const Input = ({
|
|
5499
5717
|
ssn,
|
|
5500
|
-
size,
|
|
5501
5718
|
name,
|
|
5502
|
-
|
|
5719
|
+
fontSize,
|
|
5720
|
+
fontStyle,
|
|
5721
|
+
fontWeight,
|
|
5722
|
+
fontFamily,
|
|
5723
|
+
borderRadius,
|
|
5503
5724
|
color,
|
|
5504
5725
|
value,
|
|
5505
5726
|
width,
|
|
5506
5727
|
regexp,
|
|
5507
5728
|
height,
|
|
5508
|
-
radius,
|
|
5509
5729
|
change,
|
|
5510
|
-
weight,
|
|
5511
|
-
family,
|
|
5512
5730
|
padding,
|
|
5513
5731
|
telClass,
|
|
5514
5732
|
leftIcon,
|
|
5515
5733
|
required,
|
|
5516
5734
|
disabled,
|
|
5517
|
-
errorDots,
|
|
5518
|
-
errorIcon,
|
|
5519
5735
|
iconWidth,
|
|
5520
5736
|
rightIcon,
|
|
5521
5737
|
className,
|
|
5522
5738
|
boxSizing,
|
|
5523
5739
|
boxShadow,
|
|
5524
|
-
errorLeft,
|
|
5525
|
-
errorSize,
|
|
5526
5740
|
maxLength,
|
|
5527
5741
|
floatToFix,
|
|
5528
5742
|
minNumSize,
|
|
5529
5743
|
maxNumSize,
|
|
5530
|
-
errorColor,
|
|
5531
5744
|
withoutDot,
|
|
5532
|
-
errorStyle,
|
|
5533
5745
|
iconPadding,
|
|
5534
|
-
errorAction,
|
|
5535
5746
|
placeholder,
|
|
5536
|
-
errorZindex,
|
|
5537
|
-
errorWeight,
|
|
5538
|
-
errorFamily,
|
|
5539
5747
|
phoneDisplay,
|
|
5540
|
-
errorMessage,
|
|
5541
5748
|
autoComplete,
|
|
5542
5749
|
showLabelIcon,
|
|
5750
|
+
boxShadowHover,
|
|
5751
|
+
errorLeft,
|
|
5752
|
+
errorDots,
|
|
5753
|
+
errorIcon,
|
|
5754
|
+
errorColor,
|
|
5755
|
+
errorAction,
|
|
5756
|
+
errorZindex,
|
|
5757
|
+
errorMessage,
|
|
5543
5758
|
errorIconSide,
|
|
5544
5759
|
showErrorIcon,
|
|
5760
|
+
errorFontSize,
|
|
5545
5761
|
errorMarginTop,
|
|
5546
5762
|
errorBoxShadow,
|
|
5547
|
-
boxShadowHover,
|
|
5548
5763
|
errorClassName,
|
|
5549
|
-
|
|
5764
|
+
errorFontStyle,
|
|
5550
5765
|
errorLineHeight,
|
|
5766
|
+
errorIconMargin,
|
|
5767
|
+
errorFontWeight,
|
|
5768
|
+
errorFontFamily,
|
|
5769
|
+
errorInContent,
|
|
5770
|
+
phoneAlignItems,
|
|
5551
5771
|
numberMaxLength,
|
|
5552
5772
|
backgroundColor,
|
|
5553
|
-
errorIconMargin,
|
|
5554
5773
|
placeholderColor,
|
|
5555
5774
|
withZero = false,
|
|
5556
5775
|
regexpErrorMessage,
|
|
@@ -5562,19 +5781,19 @@ const Input = ({
|
|
|
5562
5781
|
backgroundDisableColor,
|
|
5563
5782
|
telBorderRightColorHover,
|
|
5564
5783
|
label,
|
|
5565
|
-
labelSize,
|
|
5566
5784
|
labelIcon,
|
|
5567
|
-
labelStyle,
|
|
5568
5785
|
labelColor,
|
|
5569
5786
|
labelAction,
|
|
5570
|
-
labelWeight,
|
|
5571
5787
|
labelDisplay,
|
|
5788
|
+
lableShowMore,
|
|
5572
5789
|
labelIconSide,
|
|
5790
|
+
labelFontSize,
|
|
5791
|
+
labelFontStyle,
|
|
5573
5792
|
labelIconMargin,
|
|
5793
|
+
labelFontWeight,
|
|
5574
5794
|
labelFontFamily,
|
|
5575
5795
|
labelLineHeight,
|
|
5576
5796
|
labelMarginBottom,
|
|
5577
|
-
lableShowMore,
|
|
5578
5797
|
labelShowLessText,
|
|
5579
5798
|
labelShowMoreText,
|
|
5580
5799
|
showMoreTextColor,
|
|
@@ -5611,10 +5830,10 @@ const Input = ({
|
|
|
5611
5830
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5612
5831
|
height: height ?? configStyles.INPUT.height,
|
|
5613
5832
|
padding: padding ?? configStyles.INPUT.padding,
|
|
5614
|
-
fontSize:
|
|
5615
|
-
fontStyle:
|
|
5616
|
-
fontWeight:
|
|
5617
|
-
fontFamily:
|
|
5833
|
+
fontSize: fontSize ?? configStyles.INPUT.font.size,
|
|
5834
|
+
fontStyle: fontStyle ?? configStyles.INPUT.font.style,
|
|
5835
|
+
fontWeight: fontWeight ?? configStyles.INPUT.font.weight,
|
|
5836
|
+
fontFamily: fontFamily ?? configStyles.INPUT.font.family,
|
|
5618
5837
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5619
5838
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : configStyles.INPUT.color,
|
|
5620
5839
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -5794,7 +6013,10 @@ const Input = ({
|
|
|
5794
6013
|
}, []);
|
|
5795
6014
|
return configStyles.INPUT && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5796
6015
|
ref: parentRef,
|
|
5797
|
-
className: classProps
|
|
6016
|
+
className: classProps,
|
|
6017
|
+
style: {
|
|
6018
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'relative'
|
|
6019
|
+
}
|
|
5798
6020
|
}, /*#__PURE__*/React__default["default"].createElement("style", null, `.tui-color-placeholder::placeholder {
|
|
5799
6021
|
color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
|
|
5800
6022
|
}`), label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -5819,13 +6041,13 @@ const Input = ({
|
|
|
5819
6041
|
ref: labelRef,
|
|
5820
6042
|
style: {
|
|
5821
6043
|
color: labelColor ?? configStyles.INPUT.label.color,
|
|
5822
|
-
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
5823
|
-
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5824
6044
|
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
5825
|
-
|
|
6045
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6046
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
5826
6047
|
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5827
|
-
|
|
6048
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5828
6049
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
6050
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5829
6051
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
5830
6052
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
5831
6053
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -5836,9 +6058,9 @@ const Input = ({
|
|
|
5836
6058
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5837
6059
|
className: styles$9['show-more-text'],
|
|
5838
6060
|
style: {
|
|
5839
|
-
fontSize:
|
|
5840
|
-
fontStyle:
|
|
5841
|
-
fontWeight:
|
|
6061
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6062
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6063
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5842
6064
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5843
6065
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5844
6066
|
},
|
|
@@ -5856,9 +6078,9 @@ const Input = ({
|
|
|
5856
6078
|
}) : '', handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5857
6079
|
className: styles$9['show-more-text'],
|
|
5858
6080
|
style: {
|
|
5859
|
-
fontSize:
|
|
5860
|
-
fontStyle:
|
|
5861
|
-
fontWeight:
|
|
6081
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6082
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6083
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5862
6084
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5863
6085
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5864
6086
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -5868,7 +6090,7 @@ const Input = ({
|
|
|
5868
6090
|
className: `${styles$9['input-content']}`,
|
|
5869
6091
|
style: {
|
|
5870
6092
|
width: width ?? configStyles.INPUT.width,
|
|
5871
|
-
borderRadius:
|
|
6093
|
+
borderRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5872
6094
|
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
5873
6095
|
},
|
|
5874
6096
|
onMouseEnter: handleMouseEnter,
|
|
@@ -5884,8 +6106,8 @@ const Input = ({
|
|
|
5884
6106
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5885
6107
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5886
6108
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5887
|
-
borderTopLeftRadius:
|
|
5888
|
-
borderBottomLeftRadius:
|
|
6109
|
+
borderTopLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6110
|
+
borderBottomLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5889
6111
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5890
6112
|
}
|
|
5891
6113
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default["default"].createElement(TelInput, {
|
|
@@ -5896,7 +6118,7 @@ const Input = ({
|
|
|
5896
6118
|
disabled: disabled,
|
|
5897
6119
|
inpStyles: inpStyles,
|
|
5898
6120
|
inpAttributes: inpAttributes,
|
|
5899
|
-
radius:
|
|
6121
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5900
6122
|
telClass: telClass ?? configStyles.INPUT.tel.className,
|
|
5901
6123
|
phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
|
|
5902
6124
|
phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
|
|
@@ -5921,7 +6143,7 @@ const Input = ({
|
|
|
5921
6143
|
minNumSize: minNumSize ? minNumSize : '',
|
|
5922
6144
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
5923
6145
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
5924
|
-
radius:
|
|
6146
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5925
6147
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5926
6148
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
5927
6149
|
}) : type === 'password' ? /*#__PURE__*/React__default["default"].createElement(PassInput, {
|
|
@@ -5932,7 +6154,7 @@ const Input = ({
|
|
|
5932
6154
|
inputChange: change,
|
|
5933
6155
|
inpStyles: inpStyles,
|
|
5934
6156
|
inpAttributes: inpAttributes,
|
|
5935
|
-
radius:
|
|
6157
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5936
6158
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5937
6159
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5938
6160
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5943,7 +6165,7 @@ const Input = ({
|
|
|
5943
6165
|
inputChange: change,
|
|
5944
6166
|
inpStyles: inpStyles,
|
|
5945
6167
|
inpAttributes: inpAttributes,
|
|
5946
|
-
radius:
|
|
6168
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5947
6169
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5948
6170
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5949
6171
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5958,8 +6180,8 @@ const Input = ({
|
|
|
5958
6180
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5959
6181
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5960
6182
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5961
|
-
borderTopRightRadius:
|
|
5962
|
-
borderBottomRightRadius:
|
|
6183
|
+
borderTopRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6184
|
+
borderBottomRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5963
6185
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5964
6186
|
}
|
|
5965
6187
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P
|
|
@@ -5969,16 +6191,17 @@ const Input = ({
|
|
|
5969
6191
|
margin: '0px',
|
|
5970
6192
|
display: 'flex',
|
|
5971
6193
|
alignItems: 'center',
|
|
5972
|
-
position: 'absolute',
|
|
6194
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'absolute',
|
|
5973
6195
|
width: width ?? configStyles.INPUT.width,
|
|
5974
6196
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
5975
6197
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5976
6198
|
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
5977
|
-
fontSize:
|
|
5978
|
-
fontStyle:
|
|
5979
|
-
fontFamily:
|
|
5980
|
-
fontWeight:
|
|
6199
|
+
fontSize: errorFontSize ?? configStyles.INPUT.error.font.size,
|
|
6200
|
+
fontStyle: errorFontStyle ?? configStyles.INPUT.error.font.style,
|
|
6201
|
+
fontFamily: errorFontFamily ?? configStyles.INPUT.error.font.family,
|
|
6202
|
+
fontWeight: errorFontWeight ?? configStyles.INPUT.error.font.weight,
|
|
5981
6203
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
6204
|
+
marginTop: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? errorMarginTop ?? configStyles.INPUT.error.marginTop : '0px',
|
|
5982
6205
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
5983
6206
|
transform: 'scale3d(1,1,1)'
|
|
5984
6207
|
},
|
|
@@ -6015,55 +6238,54 @@ const Input = ({
|
|
|
6015
6238
|
};
|
|
6016
6239
|
Input.propTypes = {
|
|
6017
6240
|
ssn: PropTypes__default["default"].bool,
|
|
6018
|
-
size: PropTypes__default["default"].string,
|
|
6019
6241
|
name: PropTypes__default["default"].string,
|
|
6020
6242
|
change: PropTypes__default["default"].func,
|
|
6021
|
-
|
|
6243
|
+
fontSize: PropTypes__default["default"].string,
|
|
6244
|
+
fontStyle: PropTypes__default["default"].string,
|
|
6245
|
+
fontWeight: PropTypes__default["default"].string,
|
|
6246
|
+
fontFamily: PropTypes__default["default"].string,
|
|
6022
6247
|
color: PropTypes__default["default"].string,
|
|
6023
6248
|
width: PropTypes__default["default"].string,
|
|
6024
6249
|
withZero: PropTypes__default["default"].bool,
|
|
6025
|
-
weight: PropTypes__default["default"].string,
|
|
6026
|
-
family: PropTypes__default["default"].string,
|
|
6027
6250
|
required: PropTypes__default["default"].bool,
|
|
6028
6251
|
disabled: PropTypes__default["default"].bool,
|
|
6029
6252
|
height: PropTypes__default["default"].string,
|
|
6030
|
-
radius: PropTypes__default["default"].string,
|
|
6031
6253
|
padding: PropTypes__default["default"].string,
|
|
6032
6254
|
cardNumber: PropTypes__default["default"].bool,
|
|
6033
6255
|
withoutDot: PropTypes__default["default"].bool,
|
|
6034
6256
|
className: PropTypes__default["default"].string,
|
|
6035
6257
|
iconWidth: PropTypes__default["default"].string,
|
|
6036
|
-
iconPadding: PropTypes__default["default"].string,
|
|
6037
6258
|
maxLength: PropTypes__default["default"].number,
|
|
6038
6259
|
floatToFix: PropTypes__default["default"].number,
|
|
6039
6260
|
minNumSize: PropTypes__default["default"].number,
|
|
6040
6261
|
maxNumSize: PropTypes__default["default"].number,
|
|
6041
|
-
|
|
6262
|
+
iconPadding: PropTypes__default["default"].string,
|
|
6042
6263
|
placeholder: PropTypes__default["default"].string,
|
|
6264
|
+
borderRadius: PropTypes__default["default"].string,
|
|
6043
6265
|
placeholderColor: PropTypes__default["default"].string,
|
|
6044
6266
|
phoneDisplay: PropTypes__default["default"].string,
|
|
6045
6267
|
autoComplete: PropTypes__default["default"].string,
|
|
6046
6268
|
errorDots: PropTypes__default["default"].bool,
|
|
6047
6269
|
errorLeft: PropTypes__default["default"].string,
|
|
6048
|
-
errorSize: PropTypes__default["default"].string,
|
|
6049
6270
|
errorIcon: PropTypes__default["default"].string,
|
|
6050
6271
|
errorAction: PropTypes__default["default"].func,
|
|
6051
6272
|
errorColor: PropTypes__default["default"].string,
|
|
6052
|
-
errorStyle: PropTypes__default["default"].string,
|
|
6053
6273
|
showErrorIcon: PropTypes__default["default"].bool,
|
|
6054
|
-
|
|
6055
|
-
|
|
6274
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
6275
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
6276
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
6277
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
6056
6278
|
errorZindex: PropTypes__default["default"].string,
|
|
6057
|
-
errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6058
6279
|
errorMessage: PropTypes__default["default"].string,
|
|
6059
|
-
|
|
6280
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
6060
6281
|
errorMarginTop: PropTypes__default["default"].string,
|
|
6061
6282
|
errorClassName: PropTypes__default["default"].string,
|
|
6283
|
+
errorBoxShadow: PropTypes__default["default"].string,
|
|
6062
6284
|
errorIconMargin: PropTypes__default["default"].string,
|
|
6063
6285
|
errorLineHeight: PropTypes__default["default"].string,
|
|
6286
|
+
errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6064
6287
|
boxSizing: PropTypes__default["default"].string,
|
|
6065
6288
|
boxShadow: PropTypes__default["default"].string,
|
|
6066
|
-
errorBoxShadow: PropTypes__default["default"].string,
|
|
6067
6289
|
boxShadowHover: PropTypes__default["default"].string,
|
|
6068
6290
|
phoneAlignItems: PropTypes__default["default"].string,
|
|
6069
6291
|
numberMaxLength: PropTypes__default["default"].number,
|
|
@@ -6086,14 +6308,14 @@ Input.propTypes = {
|
|
|
6086
6308
|
label: PropTypes__default["default"].string,
|
|
6087
6309
|
labelAction: PropTypes__default["default"].func,
|
|
6088
6310
|
labelIcon: PropTypes__default["default"].string,
|
|
6089
|
-
labelSize: PropTypes__default["default"].string,
|
|
6090
6311
|
labelColor: PropTypes__default["default"].string,
|
|
6091
|
-
labelStyle: PropTypes__default["default"].string,
|
|
6092
6312
|
showLabelIcon: PropTypes__default["default"].bool,
|
|
6093
|
-
labelWeight: PropTypes__default["default"].string,
|
|
6094
6313
|
labelDisplay: PropTypes__default["default"].string,
|
|
6095
6314
|
labelIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6096
6315
|
labelLineHeight: PropTypes__default["default"].string,
|
|
6316
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
6317
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
6318
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
6097
6319
|
labelFontFamily: PropTypes__default["default"].string,
|
|
6098
6320
|
labelIconMargin: PropTypes__default["default"].string,
|
|
6099
6321
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -6336,23 +6558,20 @@ const Select = ({
|
|
|
6336
6558
|
keyNames,
|
|
6337
6559
|
selected,
|
|
6338
6560
|
className,
|
|
6339
|
-
marginTop,
|
|
6340
6561
|
arrowIcon,
|
|
6341
6562
|
closeIcon,
|
|
6342
|
-
errorZindex,
|
|
6343
|
-
errorMessage,
|
|
6344
6563
|
arrowNoRotate,
|
|
6345
6564
|
showCloseIcon,
|
|
6346
6565
|
defaultOption,
|
|
6347
6566
|
multipleCheckbox,
|
|
6348
6567
|
label,
|
|
6349
6568
|
labelColor,
|
|
6350
|
-
labelWeight,
|
|
6351
6569
|
labelDisplay,
|
|
6352
6570
|
labelFontSize,
|
|
6353
6571
|
labelFontStyle,
|
|
6354
6572
|
labelLineHeight,
|
|
6355
6573
|
labelFontFamily,
|
|
6574
|
+
labelFontWeight,
|
|
6356
6575
|
labelMarginBottom,
|
|
6357
6576
|
labelTextTransform,
|
|
6358
6577
|
lableShowMore,
|
|
@@ -6371,12 +6590,16 @@ const Select = ({
|
|
|
6371
6590
|
labelTooltipBackgroundColor,
|
|
6372
6591
|
cursor,
|
|
6373
6592
|
errorIcon,
|
|
6374
|
-
errorSize,
|
|
6375
6593
|
errorColor,
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
errorWeight,
|
|
6594
|
+
errorZindex,
|
|
6595
|
+
errorMessage,
|
|
6379
6596
|
showErrorIcon,
|
|
6597
|
+
errorFontSize,
|
|
6598
|
+
errorInContent,
|
|
6599
|
+
errorMarginTop,
|
|
6600
|
+
errorFontStyle,
|
|
6601
|
+
errorFontFamily,
|
|
6602
|
+
errorFontWeight,
|
|
6380
6603
|
selectedColor,
|
|
6381
6604
|
selectedRadius,
|
|
6382
6605
|
selectedPadding,
|
|
@@ -6391,6 +6614,7 @@ const Select = ({
|
|
|
6391
6614
|
selectedTransition,
|
|
6392
6615
|
selectedBackgroundColor,
|
|
6393
6616
|
selectedDisableBackgroundColor,
|
|
6617
|
+
selectedDisablePlaceholderColor,
|
|
6394
6618
|
optionsBoxShadow,
|
|
6395
6619
|
optionsBorderRadius,
|
|
6396
6620
|
optionsBackgroundColor,
|
|
@@ -6642,8 +6866,8 @@ const Select = ({
|
|
|
6642
6866
|
ref: parentRef,
|
|
6643
6867
|
className: classProps,
|
|
6644
6868
|
style: {
|
|
6645
|
-
|
|
6646
|
-
|
|
6869
|
+
width: '100%',
|
|
6870
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'relative'
|
|
6647
6871
|
}
|
|
6648
6872
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6649
6873
|
style: {
|
|
@@ -6657,7 +6881,7 @@ const Select = ({
|
|
|
6657
6881
|
ref: labelRef,
|
|
6658
6882
|
style: {
|
|
6659
6883
|
color: labelColor ?? configStyles.SELECT.label.color,
|
|
6660
|
-
fontWeight:
|
|
6884
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6661
6885
|
display: labelDisplay ?? configStyles.SELECT.label.display,
|
|
6662
6886
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6663
6887
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
@@ -6677,7 +6901,7 @@ const Select = ({
|
|
|
6677
6901
|
style: {
|
|
6678
6902
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6679
6903
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6680
|
-
fontWeight:
|
|
6904
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6681
6905
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6682
6906
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6683
6907
|
},
|
|
@@ -6687,7 +6911,7 @@ const Select = ({
|
|
|
6687
6911
|
style: {
|
|
6688
6912
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6689
6913
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6690
|
-
fontWeight:
|
|
6914
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6691
6915
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6692
6916
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6693
6917
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -6724,7 +6948,7 @@ const Select = ({
|
|
|
6724
6948
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
6725
6949
|
overflow: insidePagination ? 'visible' : 'hidden',
|
|
6726
6950
|
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
6727
|
-
color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6951
|
+
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
|
|
6728
6952
|
}
|
|
6729
6953
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
6730
6954
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -6791,16 +7015,17 @@ const Select = ({
|
|
|
6791
7015
|
}) : '', option[keyNames.name]);
|
|
6792
7016
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6793
7017
|
style: {
|
|
6794
|
-
position: 'absolute',
|
|
7018
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'absolute',
|
|
6795
7019
|
columnGap: '4px',
|
|
6796
7020
|
color: errorColor ?? configStyles.SELECT.error.color,
|
|
6797
|
-
fontSize:
|
|
6798
|
-
fontStyle:
|
|
6799
|
-
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline',
|
|
6800
|
-
fontFamily:
|
|
6801
|
-
fontWeight:
|
|
7021
|
+
fontSize: errorFontSize ?? configStyles.SELECT.error.font.size,
|
|
7022
|
+
fontStyle: errorFontStyle ?? configStyles.SELECT.error.font.style,
|
|
7023
|
+
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline-block',
|
|
7024
|
+
fontFamily: errorFontFamily ?? configStyles.SELECT.error.font.family,
|
|
7025
|
+
fontWeight: errorFontWeight ?? configStyles.SELECT.error.font.weight,
|
|
6802
7026
|
zIndex: errorZindex ?? configStyles.SELECT.error.zIndex,
|
|
6803
|
-
|
|
7027
|
+
marginTop: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? errorMarginTop ?? configStyles.SELECT.error.marginTop : '0px',
|
|
7028
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.SELECT.error.marginTop})`
|
|
6804
7029
|
}
|
|
6805
7030
|
}, showErrorIcon ? errorIcon ? errorIcon : configStyles.SELECT.error?.icon ? configStyles.SELECT.error?.icon : '' : '', errorMessage) : '');
|
|
6806
7031
|
};
|
|
@@ -6814,24 +7039,21 @@ Select.propTypes = {
|
|
|
6814
7039
|
disabled: PropTypes__default["default"].bool,
|
|
6815
7040
|
selected: PropTypes__default["default"].array,
|
|
6816
7041
|
keyNames: PropTypes__default["default"].object,
|
|
6817
|
-
marginTop: PropTypes__default["default"].string,
|
|
6818
7042
|
className: PropTypes__default["default"].string,
|
|
6819
7043
|
arrowIcon: PropTypes__default["default"].element,
|
|
6820
7044
|
closeIcon: PropTypes__default["default"].element,
|
|
6821
7045
|
arrowNoRotate: PropTypes__default["default"].bool,
|
|
6822
7046
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
6823
|
-
errorZindex: PropTypes__default["default"].number,
|
|
6824
|
-
errorMessage: PropTypes__default["default"].string,
|
|
6825
7047
|
defaultOption: PropTypes__default["default"].string,
|
|
6826
7048
|
multipleCheckbox: PropTypes__default["default"].bool,
|
|
6827
7049
|
label: PropTypes__default["default"].string,
|
|
6828
7050
|
labelColor: PropTypes__default["default"].string,
|
|
6829
|
-
labelWeight: PropTypes__default["default"].string,
|
|
6830
7051
|
labelDisplay: PropTypes__default["default"].string,
|
|
6831
7052
|
labelFontSize: PropTypes__default["default"].string,
|
|
6832
7053
|
labelFontStyle: PropTypes__default["default"].string,
|
|
6833
7054
|
labelLineHeight: PropTypes__default["default"].string,
|
|
6834
7055
|
labelFontFamily: PropTypes__default["default"].string,
|
|
7056
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
6835
7057
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
6836
7058
|
labelTextTransform: PropTypes__default["default"].string,
|
|
6837
7059
|
lableShowMore: PropTypes__default["default"].bool,
|
|
@@ -6839,10 +7061,17 @@ Select.propTypes = {
|
|
|
6839
7061
|
labelShowMoreText: PropTypes__default["default"].string,
|
|
6840
7062
|
showMoreTextColor: PropTypes__default["default"].string,
|
|
6841
7063
|
cursor: PropTypes__default["default"].string,
|
|
6842
|
-
errorSize: PropTypes__default["default"].string,
|
|
6843
7064
|
errorColor: PropTypes__default["default"].string,
|
|
6844
7065
|
errorIcon: PropTypes__default["default"].element,
|
|
6845
7066
|
showErrorIcon: PropTypes__default["default"].bool,
|
|
7067
|
+
errorZindex: PropTypes__default["default"].number,
|
|
7068
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
7069
|
+
errorMessage: PropTypes__default["default"].string,
|
|
7070
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
7071
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
7072
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
7073
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
7074
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
6846
7075
|
selectedColor: PropTypes__default["default"].string,
|
|
6847
7076
|
selectedRadius: PropTypes__default["default"].string,
|
|
6848
7077
|
selectedMinHeight: PropTypes__default["default"].string,
|
|
@@ -6857,6 +7086,7 @@ Select.propTypes = {
|
|
|
6857
7086
|
selectedTransition: PropTypes__default["default"].string,
|
|
6858
7087
|
selectedBackgroundColor: PropTypes__default["default"].string,
|
|
6859
7088
|
selectedDisableBackgroundColor: PropTypes__default["default"].string,
|
|
7089
|
+
selectedDisablePlaceholderColor: PropTypes__default["default"].string,
|
|
6860
7090
|
optionsBoxShadow: PropTypes__default["default"].string,
|
|
6861
7091
|
optionsBorderRadius: PropTypes__default["default"].string,
|
|
6862
7092
|
optionsBackgroundColor: PropTypes__default["default"].string,
|
|
@@ -7187,9 +7417,9 @@ Toast.propTypes = {
|
|
|
7187
7417
|
type: PropTypes__default["default"].oneOf(Object.values(ToasterType)).isRequired
|
|
7188
7418
|
};
|
|
7189
7419
|
|
|
7190
|
-
let toastify = document.getElementById('toastify');
|
|
7191
7420
|
let path = window.location.href;
|
|
7192
7421
|
const removeToast = ref => {
|
|
7422
|
+
let toastify = document.getElementById('toastify');
|
|
7193
7423
|
if (ref.current) {
|
|
7194
7424
|
const node = ref.current;
|
|
7195
7425
|
const removeElem = node.parentNode;
|
|
@@ -7263,6 +7493,7 @@ const createToast = ({
|
|
|
7263
7493
|
styleProps,
|
|
7264
7494
|
description
|
|
7265
7495
|
}) => {
|
|
7496
|
+
let toastify = document.getElementById('toastify');
|
|
7266
7497
|
let innerConfigStyles = {};
|
|
7267
7498
|
let toastParentBlock;
|
|
7268
7499
|
if (!toastify) {
|
|
@@ -7362,6 +7593,7 @@ const Toaster = () => {
|
|
|
7362
7593
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
7363
7594
|
window.addEventListener('popstate', () => {
|
|
7364
7595
|
if (path !== window.location.href) {
|
|
7596
|
+
let toastify = document.getElementById('toastify');
|
|
7365
7597
|
if (!toastify) {
|
|
7366
7598
|
toastify = document.createElement('div');
|
|
7367
7599
|
toastify.setAttribute('id', 'toastify');
|
|
@@ -7434,7 +7666,6 @@ const Tooltip = ({
|
|
|
7434
7666
|
width,
|
|
7435
7667
|
color,
|
|
7436
7668
|
height,
|
|
7437
|
-
radius,
|
|
7438
7669
|
fontSize,
|
|
7439
7670
|
hoverOpen,
|
|
7440
7671
|
className,
|
|
@@ -7442,9 +7673,10 @@ const Tooltip = ({
|
|
|
7442
7673
|
fontFamily,
|
|
7443
7674
|
fontWeight,
|
|
7444
7675
|
tooltipIcon,
|
|
7676
|
+
borderRadius,
|
|
7445
7677
|
tooltipWidth,
|
|
7446
|
-
tooltipRadius,
|
|
7447
7678
|
backgroundColor,
|
|
7679
|
+
tooltipBorderRadius,
|
|
7448
7680
|
tooltipBackgroundColor,
|
|
7449
7681
|
direction = 'top'
|
|
7450
7682
|
}) => {
|
|
@@ -7517,7 +7749,7 @@ const Tooltip = ({
|
|
|
7517
7749
|
style: {
|
|
7518
7750
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
7519
7751
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
7520
|
-
borderRadius:
|
|
7752
|
+
borderRadius: borderRadius ?? configStyles.TOOLTIP.parent.radius,
|
|
7521
7753
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
7522
7754
|
},
|
|
7523
7755
|
onClick: e => e.stopPropagation()
|
|
@@ -7526,7 +7758,7 @@ const Tooltip = ({
|
|
|
7526
7758
|
className: `${styles$6['tooltip']}`,
|
|
7527
7759
|
style: {
|
|
7528
7760
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
7529
|
-
borderRadius:
|
|
7761
|
+
borderRadius: tooltipBorderRadius ?? configStyles.TOOLTIP.radius,
|
|
7530
7762
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
7531
7763
|
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',
|
|
7532
7764
|
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'
|
|
@@ -7563,16 +7795,16 @@ Tooltip.propTypes = {
|
|
|
7563
7795
|
width: PropTypes__default["default"].string,
|
|
7564
7796
|
color: PropTypes__default["default"].string,
|
|
7565
7797
|
height: PropTypes__default["default"].string,
|
|
7566
|
-
radius: PropTypes__default["default"].string,
|
|
7567
7798
|
hoverOpen: PropTypes__default["default"].bool,
|
|
7568
7799
|
fontSize: PropTypes__default["default"].string,
|
|
7569
7800
|
fontStyle: PropTypes__default["default"].string,
|
|
7570
7801
|
className: PropTypes__default["default"].string,
|
|
7571
7802
|
fontFamily: PropTypes__default["default"].string,
|
|
7572
7803
|
fontWeight: PropTypes__default["default"].string,
|
|
7804
|
+
borderRadius: PropTypes__default["default"].string,
|
|
7573
7805
|
tooltipWidth: PropTypes__default["default"].string,
|
|
7574
7806
|
tooltipIcon: PropTypes__default["default"].element,
|
|
7575
|
-
|
|
7807
|
+
tooltipBorderRadius: PropTypes__default["default"].string,
|
|
7576
7808
|
text: PropTypes__default["default"].string.isRequired,
|
|
7577
7809
|
backgroundColor: PropTypes__default["default"].string,
|
|
7578
7810
|
tooltipBackgroundColor: PropTypes__default["default"].string,
|
|
@@ -7938,16 +8170,11 @@ const PositionSide = {
|
|
|
7938
8170
|
BOTTOM: 'bottom'
|
|
7939
8171
|
};
|
|
7940
8172
|
const Textarea = ({
|
|
7941
|
-
size,
|
|
7942
8173
|
name,
|
|
7943
|
-
style,
|
|
7944
|
-
family,
|
|
7945
|
-
weight,
|
|
7946
8174
|
width,
|
|
7947
8175
|
value,
|
|
7948
8176
|
height,
|
|
7949
8177
|
resize,
|
|
7950
|
-
radius,
|
|
7951
8178
|
padding,
|
|
7952
8179
|
disabled,
|
|
7953
8180
|
required,
|
|
@@ -7959,25 +8186,31 @@ const Textarea = ({
|
|
|
7959
8186
|
maxHeight,
|
|
7960
8187
|
boxSizing,
|
|
7961
8188
|
maxLength,
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
8189
|
+
fontSize,
|
|
8190
|
+
fontStyle,
|
|
8191
|
+
fontFamily,
|
|
8192
|
+
fontWeight,
|
|
8193
|
+
placeholder,
|
|
8194
|
+
borderRadius,
|
|
8195
|
+
errorMarginTop,
|
|
7967
8196
|
className,
|
|
7968
8197
|
errorColor,
|
|
7969
|
-
placeholder,
|
|
7970
8198
|
errorMessage,
|
|
8199
|
+
errorFontSize,
|
|
8200
|
+
errorFontStyle,
|
|
8201
|
+
errorFontWeight,
|
|
8202
|
+
errorFontFamily,
|
|
8203
|
+
borderWidth,
|
|
7971
8204
|
backgroundColor,
|
|
7972
8205
|
borderFocusColor,
|
|
7973
8206
|
borderHoverColor,
|
|
7974
8207
|
showCharacterCount,
|
|
7975
8208
|
label,
|
|
7976
|
-
labelSize,
|
|
7977
8209
|
labelColor,
|
|
7978
|
-
labelStyle,
|
|
7979
|
-
labelWeight,
|
|
7980
8210
|
labelDisplay,
|
|
8211
|
+
labelFontSize,
|
|
8212
|
+
labelFontStyle,
|
|
8213
|
+
labelFontWeight,
|
|
7981
8214
|
labelFontFamily,
|
|
7982
8215
|
labelMarginBottom,
|
|
7983
8216
|
lableShowMore,
|
|
@@ -8176,9 +8409,10 @@ const Textarea = ({
|
|
|
8176
8409
|
alignItems: 'center',
|
|
8177
8410
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
8178
8411
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8179
|
-
fontSize:
|
|
8412
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8413
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8180
8414
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8181
|
-
fontWeight:
|
|
8415
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8182
8416
|
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
8183
8417
|
}
|
|
8184
8418
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -8203,9 +8437,9 @@ const Textarea = ({
|
|
|
8203
8437
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8204
8438
|
className: styles$3['show-more-text'],
|
|
8205
8439
|
style: {
|
|
8206
|
-
fontSize:
|
|
8207
|
-
fontStyle:
|
|
8208
|
-
fontWeight:
|
|
8440
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8441
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8442
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8209
8443
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8210
8444
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8211
8445
|
},
|
|
@@ -8213,9 +8447,9 @@ const Textarea = ({
|
|
|
8213
8447
|
}, ' ', " ", labelShowLessText ?? configStyles.TEXTAREA.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8214
8448
|
className: styles$3['show-more-text'],
|
|
8215
8449
|
style: {
|
|
8216
|
-
fontSize:
|
|
8217
|
-
fontStyle:
|
|
8218
|
-
fontWeight:
|
|
8450
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8451
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8452
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8219
8453
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8220
8454
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8221
8455
|
},
|
|
@@ -8232,20 +8466,20 @@ const Textarea = ({
|
|
|
8232
8466
|
outline: 'none',
|
|
8233
8467
|
overflow: 'auto',
|
|
8234
8468
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
8235
|
-
fontSize: size ?? configStyles.TEXTAREA.font.size,
|
|
8236
|
-
fontStyle: style ?? configStyles.TEXTAREA.font.style,
|
|
8237
|
-
fontFamily: family ?? configStyles.TEXTAREA.font.family,
|
|
8238
|
-
fontWeight: weight ?? configStyles.TEXTAREA.font.weight,
|
|
8239
8469
|
height: height ?? configStyles.TEXTAREA.height,
|
|
8240
8470
|
padding: padding ?? configStyles.TEXTAREA.padding,
|
|
8241
|
-
borderRadius: radius ?? configStyles.TEXTAREA.radius,
|
|
8242
8471
|
minWidth: minWidth ?? configStyles.TEXTAREA.minWidth,
|
|
8243
8472
|
maxWidth: maxWidth ?? configStyles.TEXTAREA.maxWidth,
|
|
8473
|
+
fontSize: fontSize ?? configStyles.TEXTAREA.font.size,
|
|
8244
8474
|
minHeight: minHeight ?? configStyles.TEXTAREA.minHeight,
|
|
8245
8475
|
maxHeight: maxHeight ?? configStyles.TEXTAREA.maxHeight,
|
|
8246
8476
|
boxSizing: boxSizing ?? configStyles.TEXTAREA.box.sizing,
|
|
8477
|
+
fontStyle: fontStyle ?? configStyles.TEXTAREA.font.style,
|
|
8478
|
+
borderRadius: borderRadius ?? configStyles.TEXTAREA.radius,
|
|
8479
|
+
fontFamily: fontFamily ?? configStyles.TEXTAREA.font.family,
|
|
8480
|
+
fontWeight: fontWeight ?? configStyles.TEXTAREA.font.weight,
|
|
8247
8481
|
backgroundColor: backgroundColor ?? configStyles.TEXTAREA.colors.background,
|
|
8248
|
-
boxShadow: error ? errorColor ? `0 0 0
|
|
8482
|
+
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,
|
|
8249
8483
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
8250
8484
|
},
|
|
8251
8485
|
name: name,
|
|
@@ -8264,8 +8498,9 @@ const Textarea = ({
|
|
|
8264
8498
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8265
8499
|
style: {
|
|
8266
8500
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8267
|
-
fontSize:
|
|
8268
|
-
|
|
8501
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8502
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8503
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8269
8504
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family
|
|
8270
8505
|
}
|
|
8271
8506
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -8278,11 +8513,11 @@ const Textarea = ({
|
|
|
8278
8513
|
style: {
|
|
8279
8514
|
display: 'inline-block',
|
|
8280
8515
|
color: errorColor ?? configStyles.TEXTAREA.error.color,
|
|
8281
|
-
fontSize:
|
|
8282
|
-
fontStyle:
|
|
8283
|
-
fontWeight:
|
|
8284
|
-
fontFamily:
|
|
8285
|
-
marginTop:
|
|
8516
|
+
fontSize: errorFontSize ?? configStyles.TEXTAREA.error.font.size,
|
|
8517
|
+
fontStyle: errorFontStyle ?? configStyles.TEXTAREA.error.font.style,
|
|
8518
|
+
fontWeight: errorFontWeight ?? configStyles.TEXTAREA.error.font.weight,
|
|
8519
|
+
fontFamily: errorFontFamily ?? configStyles.TEXTAREA.error.font.family,
|
|
8520
|
+
marginTop: errorMarginTop ?? configStyles.TEXTAREA.error.marginTop
|
|
8286
8521
|
}
|
|
8287
8522
|
}, error)) : '');
|
|
8288
8523
|
};
|
|
@@ -8303,15 +8538,15 @@ Textarea.propTypes = {
|
|
|
8303
8538
|
minWidth: PropTypes__default["default"].string,
|
|
8304
8539
|
maxWidth: PropTypes__default["default"].string,
|
|
8305
8540
|
boxShadow: PropTypes__default["default"].string,
|
|
8306
|
-
marginTop: PropTypes__default["default"].string,
|
|
8307
8541
|
boxSizing: PropTypes__default["default"].string,
|
|
8308
8542
|
minHeight: PropTypes__default["default"].string,
|
|
8309
8543
|
maxHeight: PropTypes__default["default"].string,
|
|
8310
8544
|
maxLength: PropTypes__default["default"].number,
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8545
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
8546
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
8547
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
8548
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
8549
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
8315
8550
|
className: PropTypes__default["default"].string,
|
|
8316
8551
|
errorColor: PropTypes__default["default"].string,
|
|
8317
8552
|
placeholder: PropTypes__default["default"].string,
|
|
@@ -8322,10 +8557,10 @@ Textarea.propTypes = {
|
|
|
8322
8557
|
borderFocusColor: PropTypes__default["default"].string,
|
|
8323
8558
|
borderHoverColor: PropTypes__default["default"].string,
|
|
8324
8559
|
label: PropTypes__default["default"].string,
|
|
8325
|
-
|
|
8326
|
-
|
|
8560
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
8561
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
8327
8562
|
labelColor: PropTypes__default["default"].string,
|
|
8328
|
-
|
|
8563
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
8329
8564
|
labelDisplay: PropTypes__default["default"].string,
|
|
8330
8565
|
labelFontFamily: PropTypes__default["default"].string,
|
|
8331
8566
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -8674,7 +8909,7 @@ const Swipe = ({
|
|
|
8674
8909
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8675
8910
|
style: {
|
|
8676
8911
|
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
8677
|
-
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '
|
|
8912
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100dvh'
|
|
8678
8913
|
}
|
|
8679
8914
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8680
8915
|
style: {
|
|
@@ -8748,7 +8983,7 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
8748
8983
|
swipeBlock.style.zIndex = swipeCount;
|
|
8749
8984
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
8750
8985
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
8751
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8986
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100dvh';
|
|
8752
8987
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8753
8988
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8754
8989
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -8790,10 +9025,10 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
8790
9025
|
swipable.style.left = '0px';
|
|
8791
9026
|
swipable.style.zIndex = 99999;
|
|
8792
9027
|
swipable.style.maxWidth = '100%';
|
|
8793
|
-
swipable.style.maxHeight = '
|
|
9028
|
+
swipable.style.maxHeight = '100dvh';
|
|
8794
9029
|
swipable.style.visibility = 'hidden';
|
|
8795
9030
|
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8796
|
-
swipable.style.height = widthParent ? '
|
|
9031
|
+
swipable.style.height = widthParent ? '100dvh' : '0px';
|
|
8797
9032
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8798
9033
|
swipable.classList.add(styles$2['visible']);
|
|
8799
9034
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
@@ -8849,7 +9084,17 @@ const swipe = {
|
|
|
8849
9084
|
return;
|
|
8850
9085
|
}
|
|
8851
9086
|
if (swipeCount === 0) {
|
|
8852
|
-
if (
|
|
9087
|
+
if (!hasOwnerProperty(props, 'underScroll')) {
|
|
9088
|
+
if (newConfigStyles.SWIPEMODAL && hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'underScroll') && newConfigStyles.SWIPEMODAL.underScroll === false) {
|
|
9089
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
9090
|
+
document.head.appendChild(style);
|
|
9091
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
9092
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
9093
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
9094
|
+
passive: false
|
|
9095
|
+
});
|
|
9096
|
+
}
|
|
9097
|
+
} else if (hasOwnerProperty(props, 'underScroll') && props.underScroll === false) {
|
|
8853
9098
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
8854
9099
|
document.head.appendChild(style);
|
|
8855
9100
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -8870,11 +9115,10 @@ const swipe = {
|
|
|
8870
9115
|
});
|
|
8871
9116
|
},
|
|
8872
9117
|
close: id => {
|
|
8873
|
-
let newConfigStyles = {};
|
|
8874
9118
|
configStylesPromise.then(data => {
|
|
8875
|
-
|
|
9119
|
+
({
|
|
8876
9120
|
...data
|
|
8877
|
-
};
|
|
9121
|
+
});
|
|
8878
9122
|
}, error => {
|
|
8879
9123
|
console.error(error);
|
|
8880
9124
|
});
|
|
@@ -8896,14 +9140,12 @@ const swipe = {
|
|
|
8896
9140
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8897
9141
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8898
9142
|
document.body.removeChild(swipable);
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8906
|
-
}
|
|
9143
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9144
|
+
if (noScrllable) {
|
|
9145
|
+
style.remove();
|
|
9146
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9147
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9148
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8907
9149
|
}
|
|
8908
9150
|
}
|
|
8909
9151
|
}, 200);
|
|
@@ -8913,14 +9155,12 @@ const swipe = {
|
|
|
8913
9155
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8914
9156
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8915
9157
|
document.body.removeChild(swipable);
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8923
|
-
}
|
|
9158
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9159
|
+
if (noScrllable) {
|
|
9160
|
+
style.remove();
|
|
9161
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9162
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9163
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8924
9164
|
}
|
|
8925
9165
|
}
|
|
8926
9166
|
}
|
|
@@ -8953,21 +9193,21 @@ const TypographyType = {
|
|
|
8953
9193
|
span: 'span'
|
|
8954
9194
|
};
|
|
8955
9195
|
const Typography = ({
|
|
8956
|
-
size,
|
|
8957
9196
|
color,
|
|
8958
|
-
weight,
|
|
8959
|
-
radius,
|
|
8960
9197
|
border,
|
|
8961
9198
|
cursor,
|
|
8962
9199
|
onClick,
|
|
8963
9200
|
children,
|
|
9201
|
+
fontSize,
|
|
8964
9202
|
textAlign,
|
|
8965
9203
|
fontStyle,
|
|
8966
9204
|
className,
|
|
8967
9205
|
textShadow,
|
|
8968
9206
|
lineHeight,
|
|
8969
9207
|
colorHover,
|
|
9208
|
+
fontWeight,
|
|
8970
9209
|
fontFamily,
|
|
9210
|
+
borderRadius,
|
|
8971
9211
|
textTransform,
|
|
8972
9212
|
textDecoration,
|
|
8973
9213
|
backgroundColor,
|
|
@@ -8988,9 +9228,9 @@ const Typography = ({
|
|
|
8988
9228
|
style: {
|
|
8989
9229
|
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
8990
9230
|
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
8991
|
-
borderRadius:
|
|
8992
|
-
fontSize:
|
|
8993
|
-
fontWeight:
|
|
9231
|
+
borderRadius: borderRadius ?? configStyles.TYPOGRAPHY.radius,
|
|
9232
|
+
fontSize: fontSize ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
9233
|
+
fontWeight: fontWeight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
8994
9234
|
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
8995
9235
|
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
8996
9236
|
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
@@ -9032,10 +9272,8 @@ const Typography = ({
|
|
|
9032
9272
|
Typography.propTypes = {
|
|
9033
9273
|
color: PropTypes__default["default"].string,
|
|
9034
9274
|
onClick: PropTypes__default["default"].func,
|
|
9035
|
-
weight: PropTypes__default["default"].string,
|
|
9036
9275
|
border: PropTypes__default["default"].string,
|
|
9037
9276
|
cursor: PropTypes__default["default"].string,
|
|
9038
|
-
radius: PropTypes__default["default"].string,
|
|
9039
9277
|
textAlign: PropTypes__default["default"].string,
|
|
9040
9278
|
className: PropTypes__default["default"].string,
|
|
9041
9279
|
fontStyle: PropTypes__default["default"].string,
|
|
@@ -9043,11 +9281,13 @@ Typography.propTypes = {
|
|
|
9043
9281
|
textShadow: PropTypes__default["default"].string,
|
|
9044
9282
|
fontFamily: PropTypes__default["default"].string,
|
|
9045
9283
|
colorHover: PropTypes__default["default"].string,
|
|
9284
|
+
fontWeight: PropTypes__default["default"].string,
|
|
9285
|
+
borderRadius: PropTypes__default["default"].string,
|
|
9046
9286
|
textTransform: PropTypes__default["default"].string,
|
|
9047
9287
|
textDecoration: PropTypes__default["default"].string,
|
|
9048
9288
|
backgroundColor: PropTypes__default["default"].string,
|
|
9049
9289
|
variant: PropTypes__default["default"].oneOf(Object.values(TypographyType)),
|
|
9050
|
-
|
|
9290
|
+
fontSize: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
|
|
9051
9291
|
};
|
|
9052
9292
|
|
|
9053
9293
|
const Dots = '...';
|
|
@@ -9511,12 +9751,13 @@ const Autocomplete = ({
|
|
|
9511
9751
|
required,
|
|
9512
9752
|
selected,
|
|
9513
9753
|
className,
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9754
|
+
errorFontSize,
|
|
9755
|
+
errorFontStyle,
|
|
9756
|
+
errorFontWeight,
|
|
9757
|
+
errorFontFamily,
|
|
9758
|
+
errorMarginTop,
|
|
9519
9759
|
errorColor,
|
|
9760
|
+
errorInContent,
|
|
9520
9761
|
placeHolder,
|
|
9521
9762
|
errorMessage,
|
|
9522
9763
|
autoComplete,
|
|
@@ -9574,11 +9815,11 @@ const Autocomplete = ({
|
|
|
9574
9815
|
contentBottomRowHoverBackgroundColor,
|
|
9575
9816
|
backgroundDisableColor,
|
|
9576
9817
|
label,
|
|
9577
|
-
labelSize,
|
|
9578
|
-
labelStyle,
|
|
9579
9818
|
labelColor,
|
|
9580
|
-
labelWeight,
|
|
9581
9819
|
labelDisplay,
|
|
9820
|
+
labelFontSize,
|
|
9821
|
+
labelFontStyle,
|
|
9822
|
+
labelFontWeight,
|
|
9582
9823
|
labelLineHeight,
|
|
9583
9824
|
labelFontFamily,
|
|
9584
9825
|
labelMarginBottom,
|
|
@@ -9718,14 +9959,15 @@ const Autocomplete = ({
|
|
|
9718
9959
|
}, item[keyNames.name]);
|
|
9719
9960
|
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9720
9961
|
style: {
|
|
9721
|
-
position: 'absolute',
|
|
9962
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9722
9963
|
zIndex: '1',
|
|
9723
9964
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9724
|
-
fontSize:
|
|
9725
|
-
fontStyle:
|
|
9726
|
-
fontWeight:
|
|
9727
|
-
fontFamily:
|
|
9728
|
-
|
|
9965
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
9966
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
9967
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
9968
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
9969
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
9970
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9729
9971
|
padding: innerErrorPadding ?? configStyles.AUTOCOMPLETE.innerError.padding,
|
|
9730
9972
|
height: contentBottomRowHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
9731
9973
|
lineHeight: contentBottomRowLineHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
@@ -9894,9 +10136,9 @@ const Autocomplete = ({
|
|
|
9894
10136
|
style: {
|
|
9895
10137
|
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
9896
10138
|
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
9897
|
-
fontSize:
|
|
9898
|
-
fontStyle:
|
|
9899
|
-
fontWeight:
|
|
10139
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10140
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10141
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9900
10142
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9901
10143
|
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
9902
10144
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
@@ -9911,9 +10153,9 @@ const Autocomplete = ({
|
|
|
9911
10153
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9912
10154
|
className: styles['show-more-text'],
|
|
9913
10155
|
style: {
|
|
9914
|
-
fontSize:
|
|
9915
|
-
fontStyle:
|
|
9916
|
-
fontWeight:
|
|
10156
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10157
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10158
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9917
10159
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9918
10160
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9919
10161
|
},
|
|
@@ -9921,9 +10163,9 @@ const Autocomplete = ({
|
|
|
9921
10163
|
}, ' ', " ", labelShowLessText ?? configStyles.AUTOCOMPLETE.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9922
10164
|
className: styles['show-more-text'],
|
|
9923
10165
|
style: {
|
|
9924
|
-
fontSize:
|
|
9925
|
-
fontStyle:
|
|
9926
|
-
fontWeight:
|
|
10166
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10167
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10168
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9927
10169
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9928
10170
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9929
10171
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
@@ -9972,13 +10214,14 @@ const Autocomplete = ({
|
|
|
9972
10214
|
}, props)), innerError ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9973
10215
|
style: {
|
|
9974
10216
|
left: '0px',
|
|
9975
|
-
position: 'absolute',
|
|
10217
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9976
10218
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9977
|
-
fontSize:
|
|
9978
|
-
fontStyle:
|
|
9979
|
-
fontWeight:
|
|
9980
|
-
fontFamily:
|
|
9981
|
-
|
|
10219
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
10220
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
10221
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
10222
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
10223
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
10224
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9982
10225
|
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
9983
10226
|
}
|
|
9984
10227
|
}, innerError) : '', optionList));
|
|
@@ -9990,18 +10233,19 @@ Autocomplete.propTypes = {
|
|
|
9990
10233
|
keyNames: PropTypes__default["default"].object,
|
|
9991
10234
|
selected: PropTypes__default["default"].object,
|
|
9992
10235
|
className: PropTypes__default["default"].string,
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
labelSize: PropTypes__default["default"].string,
|
|
9999
|
-
labelStyle: PropTypes__default["default"].string,
|
|
10236
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
10237
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
10238
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
10239
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
10240
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
10000
10241
|
errorColor: PropTypes__default["default"].string,
|
|
10001
10242
|
labelColor: PropTypes__default["default"].string,
|
|
10002
10243
|
searchCount: PropTypes__default["default"].number,
|
|
10003
10244
|
placeHolder: PropTypes__default["default"].string,
|
|
10004
|
-
|
|
10245
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
10246
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
10247
|
+
labelFontWeight: PropTypes__default["default"].number,
|
|
10248
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
10005
10249
|
errorMessage: PropTypes__default["default"].string,
|
|
10006
10250
|
labelDisplay: PropTypes__default["default"].string,
|
|
10007
10251
|
autoComplete: PropTypes__default["default"].string,
|