@xaypay/tui 0.2.34 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/index.es.js +694 -480
- package/dist/index.js +694 -480
- package/package.json +1 -1
- package/tui.config.js +21 -19
package/dist/index.es.js
CHANGED
|
@@ -525,7 +525,6 @@ var packageResult = {
|
|
|
525
525
|
BUTTON: {
|
|
526
526
|
opacity: 1,
|
|
527
527
|
width: '100%',
|
|
528
|
-
radius: '6px',
|
|
529
528
|
className: '',
|
|
530
529
|
type: 'button',
|
|
531
530
|
height: '46px',
|
|
@@ -534,16 +533,16 @@ var packageResult = {
|
|
|
534
533
|
disabled: false,
|
|
535
534
|
cursor: 'pointer',
|
|
536
535
|
contentWidth: false,
|
|
536
|
+
borderRadius: '6px',
|
|
537
|
+
outlineWidth: '2px',
|
|
537
538
|
padding: '12px 20px',
|
|
539
|
+
disabledBorderWidth: '2px',
|
|
538
540
|
transition: 'background-color 240ms, color 240ms',
|
|
539
|
-
box: {
|
|
540
|
-
sizing: boxSizing
|
|
541
|
-
},
|
|
542
541
|
colors: {
|
|
543
542
|
background: 'rgba(0, 35, 106, 1)',
|
|
544
543
|
backgroundHover: '#CB3A3A',
|
|
545
544
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
546
|
-
|
|
545
|
+
disabledBorderColor: 'rgba(60, 57, 62, 1)',
|
|
547
546
|
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
548
547
|
withoutStyling: {
|
|
549
548
|
color: '#000000',
|
|
@@ -560,8 +559,7 @@ var packageResult = {
|
|
|
560
559
|
}
|
|
561
560
|
},
|
|
562
561
|
icon: {
|
|
563
|
-
|
|
564
|
-
marginRight: '10px'
|
|
562
|
+
gap: '10px'
|
|
565
563
|
},
|
|
566
564
|
withoutStyling: false
|
|
567
565
|
},
|
|
@@ -626,6 +624,7 @@ var packageResult = {
|
|
|
626
624
|
marginTop: '10px',
|
|
627
625
|
iconMargin: '10px',
|
|
628
626
|
lineHeight: '19px',
|
|
627
|
+
inContent: false,
|
|
629
628
|
box: {
|
|
630
629
|
shadow: '0 0 0 1px #F20918'
|
|
631
630
|
},
|
|
@@ -829,6 +828,7 @@ var packageResult = {
|
|
|
829
828
|
colors: {
|
|
830
829
|
hover: '#373538',
|
|
831
830
|
background: presetColors.extraLight,
|
|
831
|
+
placeholderDisable: presetColors.dark,
|
|
832
832
|
backgroundDisable: presetColors.secondary
|
|
833
833
|
},
|
|
834
834
|
font: {
|
|
@@ -867,6 +867,7 @@ var packageResult = {
|
|
|
867
867
|
color: 'rgb(238, 0, 0)',
|
|
868
868
|
marginTop: '10px',
|
|
869
869
|
zIndex: 10,
|
|
870
|
+
inContent: false,
|
|
870
871
|
box: {
|
|
871
872
|
shadow: `0 0 0 2px ${presetColors.danger}`
|
|
872
873
|
},
|
|
@@ -897,7 +898,8 @@ var packageResult = {
|
|
|
897
898
|
sizing: boxSizing,
|
|
898
899
|
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
899
900
|
// like border
|
|
900
|
-
|
|
901
|
+
width: '2px',
|
|
902
|
+
// like border width
|
|
901
903
|
colors: {
|
|
902
904
|
hover: `0 0 0 2px ${presetColors.dark}`,
|
|
903
905
|
// like border color
|
|
@@ -1050,6 +1052,7 @@ var packageResult = {
|
|
|
1050
1052
|
error: {
|
|
1051
1053
|
color: presetColors.danger,
|
|
1052
1054
|
marginTop: '10px',
|
|
1055
|
+
inContent: false,
|
|
1053
1056
|
font: {
|
|
1054
1057
|
...fontObject
|
|
1055
1058
|
},
|
|
@@ -1085,10 +1088,9 @@ var packageResult = {
|
|
|
1085
1088
|
width: '27.8rem',
|
|
1086
1089
|
height: 'auto'
|
|
1087
1090
|
},
|
|
1088
|
-
or: 'կամ',
|
|
1089
1091
|
upload: 'Բեռնել',
|
|
1090
1092
|
uploadColor: presetColors.success,
|
|
1091
|
-
putFileHere: 'Տեղադրել ֆայլը այստեղ',
|
|
1093
|
+
putFileHere: 'Տեղադրել ֆայլը այստեղ կամ',
|
|
1092
1094
|
sizeText: 'Առավելագույնը',
|
|
1093
1095
|
timeForRemoveError: 4000,
|
|
1094
1096
|
extentionsRowMarginTop: '40px',
|
|
@@ -1112,6 +1114,7 @@ var packageResult = {
|
|
|
1112
1114
|
showLessText: 'Փակել',
|
|
1113
1115
|
showMoreText: 'Ավելին',
|
|
1114
1116
|
showMoreTextColor: '#2C46C1',
|
|
1117
|
+
marginBottom: '6px',
|
|
1115
1118
|
color: '#4A4A4D',
|
|
1116
1119
|
font: {
|
|
1117
1120
|
...fontObject
|
|
@@ -1131,11 +1134,13 @@ var packageResult = {
|
|
|
1131
1134
|
},
|
|
1132
1135
|
error: {
|
|
1133
1136
|
color: presetColors.danger,
|
|
1137
|
+
marginTop: '6px',
|
|
1134
1138
|
font: {
|
|
1135
1139
|
...fontObject
|
|
1136
1140
|
},
|
|
1137
1141
|
format: 'ֆայլի սխալ ֆորմատ',
|
|
1138
1142
|
maxSize: 'Առավելագույն ծավալ',
|
|
1143
|
+
formatValidate: 'Վնասված ֆայլ',
|
|
1139
1144
|
noChoosenFile: 'Ֆայլը ընտրված չէ'
|
|
1140
1145
|
},
|
|
1141
1146
|
progress: {
|
|
@@ -1203,10 +1208,9 @@ var packageResult = {
|
|
|
1203
1208
|
height: '',
|
|
1204
1209
|
maxWidth: '95%',
|
|
1205
1210
|
minWidth: '320px',
|
|
1206
|
-
maxHeight: '
|
|
1211
|
+
maxHeight: '95dvh',
|
|
1207
1212
|
minHeight: '200px',
|
|
1208
|
-
|
|
1209
|
-
noScroll: false,
|
|
1213
|
+
underScroll: false,
|
|
1210
1214
|
padding: '20px 20px 20px',
|
|
1211
1215
|
className: '',
|
|
1212
1216
|
alignItems: 'center',
|
|
@@ -1216,7 +1220,8 @@ var packageResult = {
|
|
|
1216
1220
|
border: {
|
|
1217
1221
|
width: '20px',
|
|
1218
1222
|
style: 'solid',
|
|
1219
|
-
color: transparent
|
|
1223
|
+
color: transparent,
|
|
1224
|
+
radius: '14px'
|
|
1220
1225
|
},
|
|
1221
1226
|
colors: {
|
|
1222
1227
|
background: 'white',
|
|
@@ -1260,8 +1265,8 @@ var packageResult = {
|
|
|
1260
1265
|
// default properties for <SwipeModal /> component
|
|
1261
1266
|
SWIPEMODAL: {
|
|
1262
1267
|
width: '300px',
|
|
1263
|
-
height: '
|
|
1264
|
-
|
|
1268
|
+
height: '100dvh',
|
|
1269
|
+
underScroll: false,
|
|
1265
1270
|
titleStyle: {
|
|
1266
1271
|
color: '#1C212D',
|
|
1267
1272
|
textAlign: 'left',
|
|
@@ -1273,7 +1278,7 @@ var packageResult = {
|
|
|
1273
1278
|
},
|
|
1274
1279
|
parent: {
|
|
1275
1280
|
width: '100%',
|
|
1276
|
-
height: '
|
|
1281
|
+
height: '100dvh',
|
|
1277
1282
|
colors: {
|
|
1278
1283
|
background: 'rgba(60, 61, 70, 0.2)'
|
|
1279
1284
|
}
|
|
@@ -1544,39 +1549,39 @@ var configStylesPromise = getProps();
|
|
|
1544
1549
|
|
|
1545
1550
|
const Button = ({
|
|
1546
1551
|
icon,
|
|
1547
|
-
size,
|
|
1548
|
-
style,
|
|
1549
1552
|
type,
|
|
1550
|
-
font,
|
|
1551
1553
|
color,
|
|
1552
|
-
|
|
1554
|
+
text,
|
|
1553
1555
|
width,
|
|
1554
1556
|
height,
|
|
1555
1557
|
cursor,
|
|
1556
|
-
weight,
|
|
1557
1558
|
border,
|
|
1558
|
-
radius,
|
|
1559
1559
|
outline,
|
|
1560
1560
|
padding,
|
|
1561
1561
|
opacity,
|
|
1562
1562
|
onClick,
|
|
1563
|
+
iconGap,
|
|
1563
1564
|
disabled,
|
|
1565
|
+
fontSize,
|
|
1564
1566
|
className,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
+
iconHover,
|
|
1568
|
+
fontStyle,
|
|
1567
1569
|
hoverColor,
|
|
1568
1570
|
transition,
|
|
1571
|
+
fontWeight,
|
|
1572
|
+
fontFamily,
|
|
1573
|
+
outlineWidth,
|
|
1574
|
+
borderRadius,
|
|
1569
1575
|
contentWidth,
|
|
1570
|
-
iconRightSide,
|
|
1571
1576
|
disabledColor,
|
|
1572
1577
|
textTransform,
|
|
1573
1578
|
withoutStyling,
|
|
1574
1579
|
backgroundColor,
|
|
1575
|
-
disabledLineColor,
|
|
1576
|
-
btnIconMarginLeft,
|
|
1577
|
-
btnIconMarginRight,
|
|
1578
1580
|
withoutStylingColor,
|
|
1581
|
+
disabledBorderColor,
|
|
1582
|
+
disabledBorderWidth,
|
|
1579
1583
|
backgroundHoverColor,
|
|
1584
|
+
iconPosition = 'left',
|
|
1580
1585
|
disabledBackgroundColor,
|
|
1581
1586
|
withoutStylingHoverColor,
|
|
1582
1587
|
...props
|
|
@@ -1594,8 +1599,8 @@ const Button = ({
|
|
|
1594
1599
|
className && setClassProps(() => classnames(className ?? configStyles.BUTTON.className));
|
|
1595
1600
|
}, [className]);
|
|
1596
1601
|
useEffect(() => {
|
|
1597
|
-
if (!
|
|
1598
|
-
alert('Add icon or
|
|
1602
|
+
if (!text && !icon) {
|
|
1603
|
+
alert('Add icon or text props on Button component');
|
|
1599
1604
|
}
|
|
1600
1605
|
configStylesPromise.then(data => {
|
|
1601
1606
|
setClassProps(() => classnames(className ?? data.BUTTON.className));
|
|
@@ -1613,15 +1618,15 @@ const Button = ({
|
|
|
1613
1618
|
display: 'flex',
|
|
1614
1619
|
outline: 'none',
|
|
1615
1620
|
alignItems: 'center',
|
|
1621
|
+
boxSizing: 'border-box',
|
|
1616
1622
|
justifyContent: 'center',
|
|
1617
1623
|
height: height ?? configStyles.BUTTON.height,
|
|
1618
1624
|
padding: padding ?? configStyles.BUTTON.padding,
|
|
1619
|
-
fontSize:
|
|
1620
|
-
borderRadius:
|
|
1621
|
-
fontStyle:
|
|
1622
|
-
fontFamily:
|
|
1623
|
-
fontWeight:
|
|
1624
|
-
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1625
|
+
fontSize: fontSize ?? configStyles.BUTTON.font.size,
|
|
1626
|
+
borderRadius: borderRadius ?? configStyles.BUTTON.borderRadius,
|
|
1627
|
+
fontStyle: fontStyle ?? configStyles.BUTTON.font.style,
|
|
1628
|
+
fontFamily: fontFamily ?? configStyles.BUTTON.font.family,
|
|
1629
|
+
fontWeight: fontWeight ?? configStyles.BUTTON.font.weight,
|
|
1625
1630
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1626
1631
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1627
1632
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
@@ -1629,7 +1634,7 @@ const Button = ({
|
|
|
1629
1634
|
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1630
1635
|
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1631
1636
|
backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
|
|
1632
|
-
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0
|
|
1637
|
+
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 ${disabledBorderWidth ?? configStyles.BUTTON.disabledBorderWidth} ${disabledBorderColor ?? configStyles.BUTTON.colors.disabledBorderColor}` : `inset 0 0 0 ${outlineWidth ?? configStyles.BUTTON.outlineWidth} ${backgroundColor ?? configStyles.BUTTON.colors.background}` : 'none',
|
|
1633
1638
|
color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
|
|
1634
1639
|
},
|
|
1635
1640
|
type: type ?? configStyles.BUTTON.type,
|
|
@@ -1638,50 +1643,50 @@ const Button = ({
|
|
|
1638
1643
|
onMouseEnter: handleMouseEnter,
|
|
1639
1644
|
onMouseLeave: handleMouseLeave,
|
|
1640
1645
|
className: classProps
|
|
1641
|
-
}, props),
|
|
1646
|
+
}, props), iconPosition === 'left' ? isHover && iconHover ? iconHover : icon ?? null : ' ', ' ', text && /*#__PURE__*/React__default.createElement("span", {
|
|
1642
1647
|
style: {
|
|
1643
|
-
marginLeft: icon &&
|
|
1644
|
-
marginRight: icon &&
|
|
1648
|
+
marginLeft: icon && iconPosition === 'left' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px',
|
|
1649
|
+
marginRight: icon && iconPosition === 'right' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px'
|
|
1645
1650
|
}
|
|
1646
|
-
},
|
|
1651
|
+
}, text), ' ', iconPosition === 'right' ? isHover && iconHover ? iconHover : icon ?? null : ' ', !icon && !text && 'Add icon or text prop on Button component'));
|
|
1647
1652
|
};
|
|
1648
1653
|
Button.propTypes = {
|
|
1649
1654
|
type: PropTypes.string,
|
|
1650
|
-
size: PropTypes.string,
|
|
1651
|
-
style: PropTypes.string,
|
|
1652
|
-
font: PropTypes.string,
|
|
1653
1655
|
icon: PropTypes.element,
|
|
1654
1656
|
color: PropTypes.string,
|
|
1655
1657
|
width: PropTypes.string,
|
|
1656
1658
|
outline: PropTypes.bool,
|
|
1657
1659
|
onClick: PropTypes.func,
|
|
1658
|
-
label: PropTypes.string,
|
|
1659
|
-
weight: PropTypes.string,
|
|
1660
1660
|
height: PropTypes.string,
|
|
1661
1661
|
cursor: PropTypes.string,
|
|
1662
1662
|
border: PropTypes.string,
|
|
1663
1663
|
disabled: PropTypes.bool,
|
|
1664
|
-
radius: PropTypes.string,
|
|
1665
1664
|
padding: PropTypes.string,
|
|
1666
1665
|
opacity: PropTypes.number,
|
|
1667
|
-
boxSizing: PropTypes.string,
|
|
1668
1666
|
className: PropTypes.string,
|
|
1669
|
-
|
|
1667
|
+
iconHover: PropTypes.element,
|
|
1670
1668
|
hoverColor: PropTypes.string,
|
|
1671
1669
|
transition: PropTypes.string,
|
|
1672
1670
|
contentWidth: PropTypes.bool,
|
|
1673
|
-
|
|
1671
|
+
outlineWidth: PropTypes.string,
|
|
1674
1672
|
withoutStyling: PropTypes.bool,
|
|
1675
1673
|
textTransform: PropTypes.string,
|
|
1676
1674
|
disabledColor: PropTypes.string,
|
|
1677
1675
|
backgroundColor: PropTypes.string,
|
|
1678
|
-
|
|
1679
|
-
btnIconMarginLeft: PropTypes.string,
|
|
1680
|
-
btnIconMarginRight: PropTypes.string,
|
|
1676
|
+
disabledBorderWidth: PropTypes.string,
|
|
1681
1677
|
withoutStylingColor: PropTypes.string,
|
|
1682
1678
|
backgroundHoverColor: PropTypes.string,
|
|
1683
1679
|
disabledBackgroundColor: PropTypes.string,
|
|
1684
|
-
withoutStylingHoverColor: PropTypes.string
|
|
1680
|
+
withoutStylingHoverColor: PropTypes.string,
|
|
1681
|
+
text: PropTypes.string,
|
|
1682
|
+
fontFamily: PropTypes.string,
|
|
1683
|
+
fontSize: PropTypes.string,
|
|
1684
|
+
fontStyle: PropTypes.string,
|
|
1685
|
+
fontWeight: PropTypes.string,
|
|
1686
|
+
iconGap: PropTypes.string,
|
|
1687
|
+
borderRadius: PropTypes.string,
|
|
1688
|
+
disabledBorderColor: PropTypes.string,
|
|
1689
|
+
iconPosition: PropTypes.oneOf(['left', 'right'])
|
|
1685
1690
|
};
|
|
1686
1691
|
|
|
1687
1692
|
const SvgSvg = ({
|
|
@@ -1846,16 +1851,15 @@ styleInject(css_248z$d);
|
|
|
1846
1851
|
|
|
1847
1852
|
// eslint-disable-next-line react/display-name
|
|
1848
1853
|
const File = /*#__PURE__*/forwardRef(({
|
|
1849
|
-
or,
|
|
1850
|
-
size,
|
|
1851
1854
|
name,
|
|
1852
1855
|
color,
|
|
1853
|
-
style,
|
|
1854
|
-
weight,
|
|
1855
|
-
family,
|
|
1856
1856
|
height,
|
|
1857
|
-
radius,
|
|
1858
1857
|
change,
|
|
1858
|
+
fontSize,
|
|
1859
|
+
fontStyle,
|
|
1860
|
+
fontFamily,
|
|
1861
|
+
fontWeight,
|
|
1862
|
+
borderRadius,
|
|
1859
1863
|
borderWidth,
|
|
1860
1864
|
borderStyle,
|
|
1861
1865
|
borderColor,
|
|
@@ -1865,20 +1869,22 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1865
1869
|
multiple,
|
|
1866
1870
|
required,
|
|
1867
1871
|
className,
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
+
errorFontSize,
|
|
1873
|
+
errorFontStyle,
|
|
1874
|
+
errorFontWeight,
|
|
1875
|
+
errorFontFamily,
|
|
1876
|
+
errorMarginTop,
|
|
1872
1877
|
label,
|
|
1873
|
-
labelSize,
|
|
1874
1878
|
labelColor,
|
|
1875
|
-
labelStyle,
|
|
1876
|
-
labelWeight,
|
|
1877
|
-
labelFamily,
|
|
1878
1879
|
lableShowMore,
|
|
1880
|
+
labelFontSize,
|
|
1881
|
+
labelFontStyle,
|
|
1882
|
+
labelFontWeight,
|
|
1883
|
+
labelFontFamily,
|
|
1879
1884
|
labelShowLessText,
|
|
1880
1885
|
labelShowMoreText,
|
|
1881
1886
|
showMoreTextColor,
|
|
1887
|
+
labelMarginBottom,
|
|
1882
1888
|
useLabelTooltip,
|
|
1883
1889
|
labelTooltipColor,
|
|
1884
1890
|
labelTooltipPadding,
|
|
@@ -1896,6 +1902,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1896
1902
|
uploadColor,
|
|
1897
1903
|
defaultData,
|
|
1898
1904
|
formatError,
|
|
1905
|
+
formatValidateError,
|
|
1899
1906
|
errorIcon,
|
|
1900
1907
|
errorIconShow,
|
|
1901
1908
|
errorMessage,
|
|
@@ -1979,20 +1986,211 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1979
1986
|
const [tooltipElem, setTooltipElem] = useState(null);
|
|
1980
1987
|
const [choosenFileCount, setChoosenFileCount] = useState(0);
|
|
1981
1988
|
const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url.startsWith('data:image/heif') || defaultData.url.startsWith('data:image/heic') || defaultData.url.startsWith('data:application/octet-stream') ? 'heic' : defaultData.url : 'pdf' : null : null);
|
|
1982
|
-
const
|
|
1989
|
+
const handleCheckFileFormat = async (file, type) => {
|
|
1983
1990
|
const buffer = await file.arrayBuffer();
|
|
1984
1991
|
const dataView = new DataView(buffer);
|
|
1985
|
-
if (
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1992
|
+
if (type === 'png') {
|
|
1993
|
+
if (dataView.byteLength < 8) {
|
|
1994
|
+
return Promise.reject();
|
|
1995
|
+
} else {
|
|
1996
|
+
if (dataView.getUint8(0) === 0x89 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x4E && dataView.getUint8(3) === 0x47 && dataView.getUint8(4) === 0x0D && dataView.getUint8(5) === 0x0A && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0x0A) {
|
|
1997
|
+
const end = dataView.byteLength - 12;
|
|
1998
|
+
if (dataView.getUint8(end) === 0x00 && dataView.getUint8(end + 1) === 0x00 && dataView.getUint8(end + 2) === 0x00 && dataView.getUint8(end + 3) === 0x00 && dataView.getUint8(end + 4) === 0x49 && dataView.getUint8(end + 5) === 0x45 && dataView.getUint8(end + 6) === 0x4E && dataView.getUint8(end + 7) === 0x44 && dataView.getUint8(end + 8) === 0xAE && dataView.getUint8(end + 9) === 0x42 && dataView.getUint8(end + 10) === 0x60 && dataView.getUint8(end + 11) === 0x82) {
|
|
1999
|
+
return Promise.resolve();
|
|
2000
|
+
} else {
|
|
2001
|
+
return Promise.reject();
|
|
2002
|
+
}
|
|
2003
|
+
} else {
|
|
2004
|
+
return Promise.reject();
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
} else if (type === 'jpg') {
|
|
2008
|
+
if (dataView.byteLength < 2) {
|
|
2009
|
+
return Promise.reject();
|
|
2010
|
+
} else {
|
|
2011
|
+
if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8 && dataView.getUint8(dataView.byteLength - 2) === 0xFF && dataView.getUint8(dataView.byteLength - 1) === 0xD9) {
|
|
1991
2012
|
return Promise.resolve();
|
|
2013
|
+
} else {
|
|
2014
|
+
return Promise.reject();
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
} else if (type === 'svg') {
|
|
2018
|
+
if (dataView.byteLength < 8) return Promise.reject();
|
|
2019
|
+
const len = dataView.byteLength;
|
|
2020
|
+
let start = 0;
|
|
2021
|
+
let end = len - 1;
|
|
2022
|
+
const isWS = b => b === 0x20 || b === 0x09 || b === 0x0A || b === 0x0D;
|
|
2023
|
+
while (start < len && isWS(dataView.getUint8(start))) start++;
|
|
2024
|
+
const scanLimit = Math.min(len, start + 4096);
|
|
2025
|
+
let foundSvgOpen = false;
|
|
2026
|
+
for (let i = start; i <= scanLimit - 4; i++) {
|
|
2027
|
+
if (dataView.getUint8(i) === 0x3C && (dataView.getUint8(i + 1) === 0x73 || dataView.getUint8(i + 1) === 0x53) && (dataView.getUint8(i + 2) === 0x76 || dataView.getUint8(i + 2) === 0x56) && (dataView.getUint8(i + 3) === 0x67 || dataView.getUint8(i + 3) === 0x47)) {
|
|
2028
|
+
foundSvgOpen = true;
|
|
2029
|
+
break;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
if (!foundSvgOpen) return Promise.reject();
|
|
2033
|
+
while (end >= 0 && isWS(dataView.getUint8(end))) end--;
|
|
2034
|
+
if (end >= 5 && dataView.getUint8(end - 5) === 0x3C && dataView.getUint8(end - 4) === 0x2F && (dataView.getUint8(end - 3) === 0x73 || dataView.getUint8(end - 3) === 0x53) && (dataView.getUint8(end - 2) === 0x76 || dataView.getUint8(end - 2) === 0x56) && (dataView.getUint8(end - 1) === 0x67 || dataView.getUint8(end - 1) === 0x47) && dataView.getUint8(end) === 0x3E) {
|
|
2035
|
+
return Promise.resolve();
|
|
2036
|
+
} else {
|
|
2037
|
+
return Promise.reject();
|
|
2038
|
+
}
|
|
2039
|
+
} else if (type === 'docx') {
|
|
2040
|
+
const len = dataView.byteLength;
|
|
2041
|
+
if (len < 22) return Promise.reject();
|
|
2042
|
+
const isZipHeader = dataView.getUint8(0) === 0x50 && dataView.getUint8(1) === 0x4B && dataView.getUint8(2) === 0x03 && dataView.getUint8(3) === 0x04;
|
|
2043
|
+
if (!isZipHeader) return Promise.reject();
|
|
2044
|
+
const EOCD = [0x50, 0x4B, 0x05, 0x06];
|
|
2045
|
+
const maxBack = Math.min(len - 4, 0xFFFF + 22);
|
|
2046
|
+
let eocdIndex = -1;
|
|
2047
|
+
for (let i = len - 4; i >= len - 4 - maxBack; i--) {
|
|
2048
|
+
if (i < 0) break;
|
|
2049
|
+
if (dataView.getUint8(i) === EOCD[0] && dataView.getUint8(i + 1) === EOCD[1] && dataView.getUint8(i + 2) === EOCD[2] && dataView.getUint8(i + 3) === EOCD[3]) {
|
|
2050
|
+
eocdIndex = i;
|
|
2051
|
+
break;
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
if (eocdIndex === -1) return Promise.reject();
|
|
2055
|
+
const findAscii = needle => {
|
|
2056
|
+
const enc = new TextEncoder().encode(needle);
|
|
2057
|
+
for (let i = 0; i <= len - enc.length; i++) {
|
|
2058
|
+
let ok = true;
|
|
2059
|
+
for (let j = 0; j < enc.length; j++) {
|
|
2060
|
+
if (dataView.getUint8(i + j) !== enc[j]) {
|
|
2061
|
+
ok = false;
|
|
2062
|
+
break;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
if (ok) return true;
|
|
2066
|
+
}
|
|
2067
|
+
return false;
|
|
2068
|
+
};
|
|
2069
|
+
const hasContentTypes = findAscii('[Content_Types].xml');
|
|
2070
|
+
const hasRels = findAscii('_rels/.rels');
|
|
2071
|
+
const hasDocument = findAscii('word/document.xml');
|
|
2072
|
+
return hasContentTypes && hasRels && hasDocument ? Promise.resolve() : Promise.reject();
|
|
2073
|
+
} else if (type === 'doc') {
|
|
2074
|
+
const len = dataView.byteLength;
|
|
2075
|
+
if (len < 512) return Promise.reject();
|
|
2076
|
+
const FREESECT = 0xFFFFFFFF;
|
|
2077
|
+
const ENDOFCHAIN = 0xFFFFFFFE;
|
|
2078
|
+
const getU32 = off => dataView.getUint32(off, true);
|
|
2079
|
+
const getI32 = off => dataView.getInt32(off, true);
|
|
2080
|
+
const getU16 = off => dataView.getUint16(off, true);
|
|
2081
|
+
const sectorOffset = (sector, sectorSize) => (sector + 1) * sectorSize;
|
|
2082
|
+
const isOle = dataView.getUint8(0) === 0xD0 && dataView.getUint8(1) === 0xCF && dataView.getUint8(2) === 0x11 && dataView.getUint8(3) === 0xE0 && dataView.getUint8(4) === 0xA1 && dataView.getUint8(5) === 0xB1 && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0xE1;
|
|
2083
|
+
if (!isOle) return Promise.reject();
|
|
2084
|
+
if (dataView.getUint8(0x1C) !== 0xFE || dataView.getUint8(0x1D) !== 0xFF) {
|
|
2085
|
+
return Promise.reject();
|
|
2086
|
+
}
|
|
2087
|
+
const sectorShift = getU16(0x1E); // 9 => 512, 12 => 4096
|
|
2088
|
+
if (sectorShift !== 9 && sectorShift !== 12) return Promise.reject();
|
|
2089
|
+
const sectorSize = 1 << sectorShift;
|
|
2090
|
+
const firstDirSector = getI32(0x30);
|
|
2091
|
+
if (firstDirSector < 0) return Promise.reject();
|
|
2092
|
+
const dirStartOff = sectorOffset(firstDirSector, sectorSize);
|
|
2093
|
+
if (dirStartOff < 512 || dirStartOff + sectorSize > len) return Promise.reject();
|
|
2094
|
+
const numFATSectors = getU32(0x2C);
|
|
2095
|
+
let firstDIFATSector = getI32(0x44);
|
|
2096
|
+
let numDIFATSectors = getU32(0x48);
|
|
2097
|
+
const difat = [];
|
|
2098
|
+
for (let i = 0; i < 109; i++) {
|
|
2099
|
+
const sec = getU32(0x4C + i * 4);
|
|
2100
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2101
|
+
}
|
|
2102
|
+
const entriesPerDifatSector = sectorSize / 4 - 1;
|
|
2103
|
+
while (numDIFATSectors > 0 && firstDIFATSector !== -1 && firstDIFATSector !== ENDOFCHAIN) {
|
|
2104
|
+
const off = sectorOffset(firstDIFATSector, sectorSize);
|
|
2105
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2106
|
+
for (let i = 0; i < entriesPerDifatSector; i++) {
|
|
2107
|
+
const sec = dataView.getUint32(off + i * 4, true);
|
|
2108
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2109
|
+
}
|
|
2110
|
+
firstDIFATSector = dataView.getInt32(off + entriesPerDifatSector * 4, true); // next DIFAT
|
|
2111
|
+
numDIFATSectors--;
|
|
2112
|
+
}
|
|
2113
|
+
if (difat.length === 0 || numFATSectors === 0) return Promise.reject();
|
|
2114
|
+
const fat = [];
|
|
2115
|
+
for (let i = 0; i < difat.length; i++) {
|
|
2116
|
+
const fatSector = difat[i];
|
|
2117
|
+
const off = sectorOffset(fatSector, sectorSize);
|
|
2118
|
+
if (off < 512 || off + sectorSize > len) continue;
|
|
2119
|
+
for (let j = 0; j < sectorSize; j += 4) {
|
|
2120
|
+
fat.push(dataView.getUint32(off + j, true));
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
if (fat.length === 0) return Promise.reject();
|
|
2124
|
+
const nextSector = s => s >= 0 && s < fat.length ? fat[s] : ENDOFCHAIN;
|
|
2125
|
+
const names = new Set();
|
|
2126
|
+
const td = new TextDecoder("utf-16le");
|
|
2127
|
+
let dirSector = firstDirSector;
|
|
2128
|
+
let safety = 0;
|
|
2129
|
+
while (dirSector !== ENDOFCHAIN && dirSector !== FREESECT && safety++ < 10000) {
|
|
2130
|
+
const off = sectorOffset(dirSector, sectorSize);
|
|
2131
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2132
|
+
for (let pos = 0; pos < sectorSize; pos += 128) {
|
|
2133
|
+
const entryOff = off + pos;
|
|
2134
|
+
const nameLen = getU16(entryOff + 64);
|
|
2135
|
+
const objType = dataView.getUint8(entryOff + 66);
|
|
2136
|
+
if (objType === 0 || nameLen < 2 || nameLen > 64) continue;
|
|
2137
|
+
const nameBytes = new Uint8Array(dataView.buffer, dataView.byteOffset + entryOff, 64);
|
|
2138
|
+
const realLen = Math.max(0, nameLen - 2);
|
|
2139
|
+
const name = td.decode(nameBytes.slice(0, realLen)).replace(/\0/g, "");
|
|
2140
|
+
if (name) names.add(name);
|
|
2141
|
+
}
|
|
2142
|
+
dirSector = nextSector(dirSector);
|
|
2143
|
+
}
|
|
2144
|
+
const hasWordDocument = names.has("WordDocument");
|
|
2145
|
+
const hasTable = names.has("1Table") || names.has("0Table");
|
|
2146
|
+
return hasWordDocument && hasTable ? Promise.resolve() : Promise.reject();
|
|
2147
|
+
} else if (type === 'pdf') {
|
|
2148
|
+
if (dataView.byteLength < 8) {
|
|
2149
|
+
return Promise.reject();
|
|
2150
|
+
} else {
|
|
2151
|
+
if (dataView.getUint8(0) === 0x25 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x44 && dataView.getUint8(3) === 0x46) {
|
|
2152
|
+
const len = dataView.byteLength;
|
|
2153
|
+
let end = len - 1;
|
|
2154
|
+
while (end >= 0 && (dataView.getUint8(end) === 0x0A ||
|
|
2155
|
+
// \n
|
|
2156
|
+
dataView.getUint8(end) === 0x0D ||
|
|
2157
|
+
// \r
|
|
2158
|
+
dataView.getUint8(end) === 0x20 ||
|
|
2159
|
+
// space
|
|
2160
|
+
dataView.getUint8(end) === 0x09 // tab
|
|
2161
|
+
)) {
|
|
2162
|
+
end--;
|
|
2163
|
+
}
|
|
2164
|
+
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) {
|
|
2165
|
+
return Promise.resolve();
|
|
2166
|
+
} else {
|
|
2167
|
+
return Promise.reject();
|
|
2168
|
+
}
|
|
2169
|
+
} else {
|
|
2170
|
+
return Promise.reject();
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
} else if (type === 'heic') {
|
|
2174
|
+
if (dataView.byteLength < 12) {
|
|
2175
|
+
return Promise.reject();
|
|
2176
|
+
} else {
|
|
2177
|
+
if (dataView.getUint8(0) === 0x66 && dataView.getUint8(1) === 0x74 && dataView.getUint8(2) === 0x79 && dataView.getUint8(3) === 0x70) {
|
|
2178
|
+
if (dataView.getUint8(dataView.length - 4) === 0x6D && dataView.getUint8(dataView.length - 3) === 0x64 && dataView.getUint8(dataView.length - 2) === 0x61 && dataView.getUint8(dataView.length - 1) === 0x74) {
|
|
2179
|
+
const majorBrand = String.fromCharCode(dataView.getUint8(4), dataView.getUint8(5), dataView.getUint8(6), dataView.getUint8(7));
|
|
2180
|
+
const heicIdentifiers = ['heic', 'heix', 'mif1', 'msf1', 'heif'];
|
|
2181
|
+
if (heicIdentifiers.includes(majorBrand)) {
|
|
2182
|
+
return Promise.resolve();
|
|
2183
|
+
} else {
|
|
2184
|
+
return Promise.reject();
|
|
2185
|
+
}
|
|
2186
|
+
} else {
|
|
2187
|
+
return Promise.reject();
|
|
2188
|
+
}
|
|
1992
2189
|
}
|
|
1993
2190
|
}
|
|
2191
|
+
} else {
|
|
2192
|
+
return Promise.reject();
|
|
1994
2193
|
}
|
|
1995
|
-
return Promise.reject();
|
|
1996
2194
|
};
|
|
1997
2195
|
const handleRemoveComponent = () => {
|
|
1998
2196
|
if (!multiple) {
|
|
@@ -2006,6 +2204,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2006
2204
|
setImage(null);
|
|
2007
2205
|
setSingleFile(null);
|
|
2008
2206
|
removeFile && removeFile(singleFile);
|
|
2207
|
+
error && setError('');
|
|
2009
2208
|
};
|
|
2010
2209
|
const handleUploadFiles = file => {
|
|
2011
2210
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
@@ -2022,43 +2221,24 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2022
2221
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2023
2222
|
if (file[ix]) {
|
|
2024
2223
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2025
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2224
|
+
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')) {
|
|
2225
|
+
let typeOfFile = '';
|
|
2026
2226
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2027
|
-
|
|
2028
|
-
id: '',
|
|
2029
|
-
check: '',
|
|
2030
|
-
status: '',
|
|
2031
|
-
file: file[ix],
|
|
2032
|
-
uuid: v4()
|
|
2033
|
-
});
|
|
2034
|
-
setImage('docx');
|
|
2227
|
+
typeOfFile = 'docx';
|
|
2035
2228
|
} else if (file[ix].type === 'application/msword') {
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2046
|
-
change({
|
|
2047
|
-
id: '',
|
|
2048
|
-
check: '',
|
|
2049
|
-
status: '',
|
|
2050
|
-
file: file[ix],
|
|
2051
|
-
uuid: v4()
|
|
2052
|
-
});
|
|
2053
|
-
setImage('heic');
|
|
2054
|
-
}).catch(() => {
|
|
2055
|
-
change({
|
|
2056
|
-
file: file[ix],
|
|
2057
|
-
uuid: v4(),
|
|
2058
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2059
|
-
});
|
|
2060
|
-
});
|
|
2229
|
+
typeOfFile = 'doc';
|
|
2230
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2231
|
+
typeOfFile = 'pdf';
|
|
2232
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2233
|
+
typeOfFile = 'heic';
|
|
2234
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2235
|
+
typeOfFile = 'jpg';
|
|
2236
|
+
} else if (file[ix].type === 'image/png') {
|
|
2237
|
+
typeOfFile = 'png';
|
|
2061
2238
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2239
|
+
typeOfFile = 'svg';
|
|
2240
|
+
}
|
|
2241
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2062
2242
|
change({
|
|
2063
2243
|
id: '',
|
|
2064
2244
|
check: '',
|
|
@@ -2066,16 +2246,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2066
2246
|
file: file[ix],
|
|
2067
2247
|
uuid: v4()
|
|
2068
2248
|
});
|
|
2069
|
-
setImage(
|
|
2070
|
-
}
|
|
2249
|
+
setImage(typeOfFile);
|
|
2250
|
+
}).catch(() => {
|
|
2071
2251
|
change({
|
|
2072
|
-
id: '',
|
|
2073
|
-
check: '',
|
|
2074
|
-
status: '',
|
|
2075
2252
|
file: file[ix],
|
|
2076
|
-
uuid: v4()
|
|
2253
|
+
uuid: v4(),
|
|
2254
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2077
2255
|
});
|
|
2078
|
-
}
|
|
2256
|
+
});
|
|
2079
2257
|
} else {
|
|
2080
2258
|
change({
|
|
2081
2259
|
file: file[ix],
|
|
@@ -2097,43 +2275,24 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2097
2275
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2098
2276
|
if (file[ix]) {
|
|
2099
2277
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2100
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2278
|
+
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')) {
|
|
2279
|
+
let typeOfFile = '';
|
|
2101
2280
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2102
|
-
|
|
2103
|
-
id: '',
|
|
2104
|
-
check: '',
|
|
2105
|
-
status: '',
|
|
2106
|
-
file: file[ix],
|
|
2107
|
-
uuid: v4()
|
|
2108
|
-
});
|
|
2109
|
-
setImage('docx');
|
|
2281
|
+
typeOfFile = 'docx';
|
|
2110
2282
|
} else if (file[ix].type === 'application/msword') {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2121
|
-
change({
|
|
2122
|
-
id: '',
|
|
2123
|
-
check: '',
|
|
2124
|
-
status: '',
|
|
2125
|
-
file: file[ix],
|
|
2126
|
-
uuid: v4()
|
|
2127
|
-
});
|
|
2128
|
-
setImage('heic');
|
|
2129
|
-
}).catch(() => {
|
|
2130
|
-
change({
|
|
2131
|
-
file: file[ix],
|
|
2132
|
-
uuid: v4(),
|
|
2133
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2134
|
-
});
|
|
2135
|
-
});
|
|
2283
|
+
typeOfFile = 'doc';
|
|
2284
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2285
|
+
typeOfFile = 'pdf';
|
|
2286
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2287
|
+
typeOfFile = 'heic';
|
|
2288
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2289
|
+
typeOfFile = 'jpg';
|
|
2290
|
+
} else if (file[ix].type === 'image/png') {
|
|
2291
|
+
typeOfFile = 'png';
|
|
2136
2292
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2293
|
+
typeOfFile = 'svg';
|
|
2294
|
+
}
|
|
2295
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2137
2296
|
change({
|
|
2138
2297
|
id: '',
|
|
2139
2298
|
check: '',
|
|
@@ -2141,16 +2300,14 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2141
2300
|
file: file[ix],
|
|
2142
2301
|
uuid: v4()
|
|
2143
2302
|
});
|
|
2144
|
-
setImage(
|
|
2145
|
-
}
|
|
2303
|
+
setImage(typeOfFile);
|
|
2304
|
+
}).catch(() => {
|
|
2146
2305
|
change({
|
|
2147
|
-
id: '',
|
|
2148
|
-
check: '',
|
|
2149
|
-
status: '',
|
|
2150
2306
|
file: file[ix],
|
|
2151
|
-
uuid: v4()
|
|
2307
|
+
uuid: v4(),
|
|
2308
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2152
2309
|
});
|
|
2153
|
-
}
|
|
2310
|
+
});
|
|
2154
2311
|
} else {
|
|
2155
2312
|
change({
|
|
2156
2313
|
file: file[ix],
|
|
@@ -2181,34 +2338,36 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2181
2338
|
} else {
|
|
2182
2339
|
if (file[0]) {
|
|
2183
2340
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2184
|
-
if (fileExtensions.includes(file[0].
|
|
2341
|
+
if (fileExtensions.includes(file[0].name.split('.')[file[0].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type.split('/')[1] === 'heif' || file[0].type.split('/')[1] === 'heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[0].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[0].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[0].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[0].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[0].type.split('/')[1] === 'jpeg')) {
|
|
2185
2342
|
setError('');
|
|
2343
|
+
let typeOfFile = '';
|
|
2186
2344
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2187
|
-
|
|
2188
|
-
change(file);
|
|
2189
|
-
setSingleFile(file);
|
|
2345
|
+
typeOfFile = 'docx';
|
|
2190
2346
|
} else if (file[0].type === 'application/msword') {
|
|
2191
|
-
|
|
2192
|
-
change(file);
|
|
2193
|
-
setSingleFile(file);
|
|
2347
|
+
typeOfFile = 'doc';
|
|
2194
2348
|
} else if (file[0].type === 'application/pdf') {
|
|
2195
|
-
|
|
2196
|
-
change(file);
|
|
2197
|
-
setSingleFile(file);
|
|
2349
|
+
typeOfFile = 'pdf';
|
|
2198
2350
|
} else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2351
|
+
typeOfFile = 'heic';
|
|
2352
|
+
} else if (file[0].type === 'image/jpeg') {
|
|
2353
|
+
typeOfFile = 'jpg';
|
|
2354
|
+
} else if (file[0].type === 'image/png') {
|
|
2355
|
+
typeOfFile = 'png';
|
|
2356
|
+
} else if (file[0].type === 'image/svg+xml') {
|
|
2357
|
+
typeOfFile = 'svg';
|
|
2358
|
+
}
|
|
2359
|
+
handleCheckFileFormat(file[0], typeOfFile).then(() => {
|
|
2360
|
+
if (typeOfFile === 'svg' || typeOfFile === 'png' || typeOfFile === 'jpg') {
|
|
2361
|
+
setImage(URL.createObjectURL(file[0]));
|
|
2362
|
+
} else {
|
|
2363
|
+
setImage(typeOfFile);
|
|
2364
|
+
}
|
|
2208
2365
|
change(file);
|
|
2209
2366
|
setSingleFile(file);
|
|
2210
|
-
|
|
2211
|
-
|
|
2367
|
+
}).catch(() => {
|
|
2368
|
+
setImage(null);
|
|
2369
|
+
setError(formatValidateError ?? configStyles.FILE.error.formatValidate);
|
|
2370
|
+
});
|
|
2212
2371
|
} else {
|
|
2213
2372
|
setImage(null);
|
|
2214
2373
|
setError(formatError ?? configStyles.FILE.error.format);
|
|
@@ -2447,9 +2606,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2447
2606
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2448
2607
|
style: {
|
|
2449
2608
|
display: 'flex',
|
|
2450
|
-
marginBottom: '6px',
|
|
2451
2609
|
alignItems: 'center',
|
|
2452
2610
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
2611
|
+
marginBottom: labelMarginBottom ?? configStyles.FILE.label.marginBottom,
|
|
2453
2612
|
width: deleteComponent && useLabelTooltip && handleCheckTextWidth() === 'more' ? 'calc(100% - 26px)' : '100%'
|
|
2454
2613
|
}
|
|
2455
2614
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2465,10 +2624,10 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2465
2624
|
style: {
|
|
2466
2625
|
width: '100%',
|
|
2467
2626
|
color: labelColor ?? configStyles.FILE.label.color,
|
|
2468
|
-
fontSize:
|
|
2469
|
-
fontStyle:
|
|
2470
|
-
fontWeight:
|
|
2471
|
-
fontFamily:
|
|
2627
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2628
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2629
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2630
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2472
2631
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
2473
2632
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
2474
2633
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -2479,20 +2638,20 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2479
2638
|
}, label, handleCheckTextWidth('label') === 'more' && showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
2480
2639
|
className: styles$c['show-more-text'],
|
|
2481
2640
|
style: {
|
|
2482
|
-
fontSize:
|
|
2483
|
-
fontStyle:
|
|
2484
|
-
fontWeight:
|
|
2485
|
-
fontFamily:
|
|
2641
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2642
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2643
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2644
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2486
2645
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2487
2646
|
},
|
|
2488
2647
|
onClick: handleChangeShowMore
|
|
2489
2648
|
}, ' ', " ", labelShowLessText ?? configStyles.FILE.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth('label') === 'more' && !showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
2490
2649
|
className: styles$c['show-more-text'],
|
|
2491
2650
|
style: {
|
|
2492
|
-
fontSize:
|
|
2493
|
-
fontStyle:
|
|
2494
|
-
fontWeight:
|
|
2495
|
-
fontFamily:
|
|
2651
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2652
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2653
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2654
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2496
2655
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2497
2656
|
},
|
|
2498
2657
|
onClick: handleChangeShowMore
|
|
@@ -2513,9 +2672,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2513
2672
|
height: height ?? configStyles.FILE.height,
|
|
2514
2673
|
borderWidth: borderWidth ?? configStyles.FILE.border.width,
|
|
2515
2674
|
borderStyle: borderStyle ?? configStyles.FILE.border.style,
|
|
2516
|
-
borderRadius:
|
|
2675
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2517
2676
|
backgroundColor: backgroundColor ?? configStyles.FILE.colors.background,
|
|
2518
|
-
borderColor: error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2677
|
+
borderColor: !multiple && error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2519
2678
|
},
|
|
2520
2679
|
onDrop: handleDrop,
|
|
2521
2680
|
onClick: handleClick,
|
|
@@ -2540,10 +2699,10 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2540
2699
|
flexDirection: 'column',
|
|
2541
2700
|
justifyContent: 'center',
|
|
2542
2701
|
color: color ?? configStyles.FILE.color,
|
|
2543
|
-
fontSize:
|
|
2544
|
-
fontStyle:
|
|
2545
|
-
fontFamily:
|
|
2546
|
-
fontWeight:
|
|
2702
|
+
fontSize: fontSize ?? configStyles.FILE.font.size,
|
|
2703
|
+
fontStyle: fontStyle ?? configStyles.FILE.font.style,
|
|
2704
|
+
fontFamily: fontFamily ?? configStyles.FILE.font.family,
|
|
2705
|
+
fontWeight: fontWeight ?? configStyles.FILE.font.weight
|
|
2547
2706
|
}
|
|
2548
2707
|
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
2549
2708
|
src: image,
|
|
@@ -2560,7 +2719,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2560
2719
|
style: {
|
|
2561
2720
|
margin: '0px'
|
|
2562
2721
|
}
|
|
2563
|
-
}, putFileHere ?? configStyles.FILE.putFileHere,
|
|
2722
|
+
}, putFileHere ?? configStyles.FILE.putFileHere, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
2564
2723
|
style: {
|
|
2565
2724
|
color: uploadColor ?? configStyles.FILE.uploadColor
|
|
2566
2725
|
}
|
|
@@ -2595,11 +2754,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2595
2754
|
}, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default.createElement(Button, {
|
|
2596
2755
|
contentWidth: true,
|
|
2597
2756
|
onClick: _ => _,
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2757
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2758
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2759
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2760
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2761
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2603
2762
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2604
2763
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2605
2764
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2608,11 +2767,11 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2608
2767
|
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default.createElement(Button, {
|
|
2609
2768
|
contentWidth: true,
|
|
2610
2769
|
onClick: _ => _,
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2770
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2771
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2772
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2773
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2774
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2616
2775
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2617
2776
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2618
2777
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2657,8 +2816,8 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2657
2816
|
boxSizing: 'border-box',
|
|
2658
2817
|
alignItems: 'flex-start',
|
|
2659
2818
|
justifyContent: 'flex-end',
|
|
2660
|
-
borderRadius:
|
|
2661
|
-
display: !multiple && !disabled && image &&
|
|
2819
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2820
|
+
display: !multiple && !disabled && image && isHover ? 'flex' : 'none',
|
|
2662
2821
|
backgroundColor: hiddenBackgroundColor ?? configStyles.FILE.colors.backgroundHidden
|
|
2663
2822
|
},
|
|
2664
2823
|
onClick: handleStopPropagation
|
|
@@ -2667,16 +2826,16 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2667
2826
|
cursor: 'pointer'
|
|
2668
2827
|
},
|
|
2669
2828
|
onClick: handleRemoveFile
|
|
2670
|
-
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default.createElement("span", {
|
|
2829
|
+
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default.createElement(SvgRemoveFile, null)))), !multiple && error ? /*#__PURE__*/React__default.createElement("span", {
|
|
2671
2830
|
style: {
|
|
2672
|
-
marginTop: '6px',
|
|
2673
|
-
color: errorColor ?? configStyles.FILE.error.color,
|
|
2674
|
-
fontSize: errorSize ?? configStyles.FILE.error.font.size,
|
|
2675
|
-
fontStyle: errorStyle ?? configStyles.FILE.error.font.style,
|
|
2676
|
-
fontWeight: errorWeight ?? configStyles.FILE.error.font.weight,
|
|
2677
|
-
fontFamily: errorFamily ?? configStyles.FILE.error.font.family,
|
|
2678
|
-
alignItems: 'center',
|
|
2679
2831
|
columnGap: '5px',
|
|
2832
|
+
alignItems: 'center',
|
|
2833
|
+
color: errorColor ?? configStyles.FILE.error.color,
|
|
2834
|
+
fontSize: errorFontSize ?? configStyles.FILE.error.font.size,
|
|
2835
|
+
marginTop: errorMarginTop ?? configStyles.FILE.error.marginTop,
|
|
2836
|
+
fontStyle: errorFontStyle ?? configStyles.FILE.error.font.style,
|
|
2837
|
+
fontWeight: errorFontWeight ?? configStyles.FILE.error.font.weight,
|
|
2838
|
+
fontFamily: errorFontFamily ?? configStyles.FILE.error.font.family,
|
|
2680
2839
|
display: errorIconShow && (errorIcon || configStyles.FILE.error?.icon) ? 'inline-flex' : 'inline-block'
|
|
2681
2840
|
}
|
|
2682
2841
|
}, errorIconShow ? errorIcon ? errorIcon : configStyles.FILE.error?.icon ? configStyles.FILE.error?.icon : '' : '', error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
@@ -2699,7 +2858,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2699
2858
|
iconDelItem: iconDeleteItem ?? configStyles.FILE.icon.deleteItem,
|
|
2700
2859
|
timeForRemoveError: timeForRemoveError,
|
|
2701
2860
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2702
|
-
radius:
|
|
2861
|
+
radius: borderRadius ?? configStyles.FILE.radius,
|
|
2703
2862
|
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2704
2863
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2705
2864
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
@@ -2723,39 +2882,39 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2723
2882
|
}));
|
|
2724
2883
|
});
|
|
2725
2884
|
File.propTypes = {
|
|
2726
|
-
or: PropTypes.string,
|
|
2727
|
-
size: PropTypes.string,
|
|
2728
2885
|
preview: PropTypes.bool,
|
|
2729
2886
|
label: PropTypes.string,
|
|
2730
2887
|
color: PropTypes.string,
|
|
2731
2888
|
height: PropTypes.string,
|
|
2732
2889
|
disabled: PropTypes.bool,
|
|
2733
|
-
|
|
2890
|
+
borderRadius: PropTypes.string,
|
|
2734
2891
|
borderWidth: PropTypes.string,
|
|
2735
2892
|
borderStyle: PropTypes.string,
|
|
2736
2893
|
borderColor: PropTypes.string,
|
|
2737
2894
|
required: PropTypes.bool,
|
|
2738
2895
|
upload: PropTypes.string,
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2896
|
+
fontSize: PropTypes.string,
|
|
2897
|
+
fontWeight: PropTypes.number,
|
|
2898
|
+
fontStyle: PropTypes.string,
|
|
2899
|
+
fontFamily: PropTypes.string,
|
|
2742
2900
|
maxSize: PropTypes.number,
|
|
2743
2901
|
maxWidth: PropTypes.string,
|
|
2744
2902
|
removeFile: PropTypes.func,
|
|
2745
2903
|
className: PropTypes.string,
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2904
|
+
errorFontSize: PropTypes.string,
|
|
2905
|
+
errorFontStyle: PropTypes.string,
|
|
2906
|
+
errorFontWeight: PropTypes.string,
|
|
2907
|
+
errorFontFamily: PropTypes.string,
|
|
2908
|
+
labelFontSize: PropTypes.string,
|
|
2909
|
+
labelFontStyle: PropTypes.string,
|
|
2910
|
+
labelFontWeight: PropTypes.string,
|
|
2911
|
+
labelFontFamily: PropTypes.string,
|
|
2754
2912
|
labelColor: PropTypes.string,
|
|
2755
2913
|
lableShowMore: PropTypes.bool,
|
|
2756
2914
|
labelShowLessText: PropTypes.string,
|
|
2757
2915
|
labelShowMoreText: PropTypes.string,
|
|
2758
2916
|
showMoreTextColor: PropTypes.string,
|
|
2917
|
+
labelMarginBottom: PropTypes.string,
|
|
2759
2918
|
useLabelTooltip: PropTypes.bool,
|
|
2760
2919
|
labelTooltipColor: PropTypes.string,
|
|
2761
2920
|
labelTooltipPadding: PropTypes.string,
|
|
@@ -2767,6 +2926,7 @@ File.propTypes = {
|
|
|
2767
2926
|
labelTooltipBackgroundColor: PropTypes.string,
|
|
2768
2927
|
errorColor: PropTypes.string,
|
|
2769
2928
|
formatError: PropTypes.string,
|
|
2929
|
+
formatValidateError: PropTypes.string,
|
|
2770
2930
|
putFileHere: PropTypes.string,
|
|
2771
2931
|
uploadColor: PropTypes.string,
|
|
2772
2932
|
defaultData: PropTypes.object,
|
|
@@ -2774,6 +2934,7 @@ File.propTypes = {
|
|
|
2774
2934
|
maxSizeError: PropTypes.string,
|
|
2775
2935
|
errorIcon: PropTypes.element,
|
|
2776
2936
|
errorIconShow: PropTypes.bool,
|
|
2937
|
+
errorMarginTop: PropTypes.string,
|
|
2777
2938
|
errorMessage: PropTypes.string,
|
|
2778
2939
|
fileSizeText: PropTypes.string,
|
|
2779
2940
|
noChoosenFile: PropTypes.string,
|
|
@@ -3187,6 +3348,7 @@ const TD = ({
|
|
|
3187
3348
|
orderFontSize,
|
|
3188
3349
|
tBodyFontSize,
|
|
3189
3350
|
openListColor,
|
|
3351
|
+
tBodyFontStyle,
|
|
3190
3352
|
orderFontStyle,
|
|
3191
3353
|
tBodyTextAlign,
|
|
3192
3354
|
orderFontFamily,
|
|
@@ -3280,6 +3442,7 @@ const TD = ({
|
|
|
3280
3442
|
padding: tBodyPadding,
|
|
3281
3443
|
fontSize: tBodyFontSize,
|
|
3282
3444
|
borderRight: borderRight,
|
|
3445
|
+
fontStyle: tBodyFontStyle,
|
|
3283
3446
|
textAlign: tBodyTextAlign,
|
|
3284
3447
|
fontFamily: tBodyFontFamily,
|
|
3285
3448
|
fontWeight: tBodyFontWeight,
|
|
@@ -3573,7 +3736,7 @@ const Table = ({
|
|
|
3573
3736
|
tableColumnMaxWidth,
|
|
3574
3737
|
tableColumnMinWidth,
|
|
3575
3738
|
tHeadColor,
|
|
3576
|
-
|
|
3739
|
+
tHeadFontFamily,
|
|
3577
3740
|
tHeadPadding,
|
|
3578
3741
|
tHeadFontSize,
|
|
3579
3742
|
tHeadFontStyle,
|
|
@@ -3584,6 +3747,7 @@ const Table = ({
|
|
|
3584
3747
|
tBodyColor,
|
|
3585
3748
|
tBodyPadding,
|
|
3586
3749
|
tBodyFontSize,
|
|
3750
|
+
tBodyFontStyle,
|
|
3587
3751
|
tBodyTextAlign,
|
|
3588
3752
|
tBodyRowBorder,
|
|
3589
3753
|
tBodyBoxShadow,
|
|
@@ -4370,7 +4534,7 @@ const Table = ({
|
|
|
4370
4534
|
handleCheckedHeader: handleCheckedHeader,
|
|
4371
4535
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
4372
4536
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
4373
|
-
tHeadFamily:
|
|
4537
|
+
tHeadFamily: tHeadFontFamily ?? configStyles.TABLE.head.font.family,
|
|
4374
4538
|
tHeadPadding: tHeadPadding ?? configStyles.TABLE.head.padding,
|
|
4375
4539
|
tHeadFontSize: tHeadFontSize ?? configStyles.TABLE.head.font.size,
|
|
4376
4540
|
tHeadFontStyle: tHeadFontStyle ?? configStyles.TABLE.head.font.style,
|
|
@@ -4432,6 +4596,7 @@ const Table = ({
|
|
|
4432
4596
|
rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
|
|
4433
4597
|
tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
|
|
4434
4598
|
tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
|
|
4599
|
+
tBodyFontStyle: tBodyFontStyle ?? configStyles.TABLE.body.font.style,
|
|
4435
4600
|
tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
|
|
4436
4601
|
tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
|
|
4437
4602
|
tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
|
|
@@ -4508,7 +4673,7 @@ Table.propTypes = {
|
|
|
4508
4673
|
tableColumnMaxWidth: PropTypes.string,
|
|
4509
4674
|
tableColumnMinWidth: PropTypes.string,
|
|
4510
4675
|
tHeadColor: PropTypes.string,
|
|
4511
|
-
|
|
4676
|
+
tHeadFontFamily: PropTypes.string,
|
|
4512
4677
|
tHeadPadding: PropTypes.string,
|
|
4513
4678
|
tHeadFontSize: PropTypes.string,
|
|
4514
4679
|
tHeadFontStyle: PropTypes.string,
|
|
@@ -4519,6 +4684,7 @@ Table.propTypes = {
|
|
|
4519
4684
|
tBodyColor: PropTypes.string,
|
|
4520
4685
|
tBodyPadding: PropTypes.string,
|
|
4521
4686
|
tBodyFontSize: PropTypes.string,
|
|
4687
|
+
tBodyFontStyle: PropTypes.string,
|
|
4522
4688
|
tBodyBoxShadow: PropTypes.string,
|
|
4523
4689
|
tBodyTextAlign: PropTypes.string,
|
|
4524
4690
|
tBodyFontWeight: PropTypes.string,
|
|
@@ -4654,15 +4820,16 @@ const Modal = ({
|
|
|
4654
4820
|
data,
|
|
4655
4821
|
width,
|
|
4656
4822
|
loader,
|
|
4657
|
-
radius,
|
|
4658
4823
|
height,
|
|
4659
4824
|
padding,
|
|
4660
4825
|
setShow,
|
|
4826
|
+
underScroll,
|
|
4661
4827
|
zoomIcon,
|
|
4662
4828
|
prevIcon,
|
|
4663
4829
|
nextIcon,
|
|
4664
4830
|
closeIcon,
|
|
4665
4831
|
closeIconFix,
|
|
4832
|
+
borderRadius,
|
|
4666
4833
|
showCloseIcon,
|
|
4667
4834
|
closeIconClass,
|
|
4668
4835
|
closeSlideIcon,
|
|
@@ -4673,15 +4840,12 @@ const Modal = ({
|
|
|
4673
4840
|
minWidth,
|
|
4674
4841
|
minHeight,
|
|
4675
4842
|
className,
|
|
4676
|
-
|
|
4843
|
+
maxWidth,
|
|
4677
4844
|
alignItems,
|
|
4678
|
-
|
|
4845
|
+
maxHeight,
|
|
4679
4846
|
headerText,
|
|
4680
4847
|
imageWidth,
|
|
4681
|
-
headerSize,
|
|
4682
4848
|
headerIcon,
|
|
4683
|
-
headerStyle,
|
|
4684
|
-
headerFamily,
|
|
4685
4849
|
imageHeight,
|
|
4686
4850
|
headerColor,
|
|
4687
4851
|
borderStyle,
|
|
@@ -4690,13 +4854,16 @@ const Modal = ({
|
|
|
4690
4854
|
imageMargin,
|
|
4691
4855
|
showZoomIcon,
|
|
4692
4856
|
outsideClose,
|
|
4693
|
-
headerWeight,
|
|
4694
4857
|
headerHeight,
|
|
4695
4858
|
justifyContent,
|
|
4859
|
+
headerFontSize,
|
|
4696
4860
|
headerTextAlign,
|
|
4697
4861
|
backgroundColor,
|
|
4698
4862
|
imageWrapHeight,
|
|
4699
4863
|
grayDecorHeight,
|
|
4864
|
+
headerFontStyle,
|
|
4865
|
+
headerFontFamily,
|
|
4866
|
+
headerFontWeight,
|
|
4700
4867
|
headerIconMaxWidth,
|
|
4701
4868
|
headerIconMaxHeight,
|
|
4702
4869
|
layerBackgroundColor,
|
|
@@ -4804,7 +4971,17 @@ const Modal = ({
|
|
|
4804
4971
|
newConfigStyles = {
|
|
4805
4972
|
...data
|
|
4806
4973
|
};
|
|
4807
|
-
if (
|
|
4974
|
+
if (underScroll === undefined) {
|
|
4975
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
4976
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
4977
|
+
document.head.appendChild(style);
|
|
4978
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
4979
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
4980
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
4981
|
+
passive: false
|
|
4982
|
+
});
|
|
4983
|
+
}
|
|
4984
|
+
} else if (underScroll === false) {
|
|
4808
4985
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
4809
4986
|
document.head.appendChild(style);
|
|
4810
4987
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -4825,7 +5002,17 @@ const Modal = ({
|
|
|
4825
5002
|
return () => {
|
|
4826
5003
|
setSelect(0);
|
|
4827
5004
|
setInnerData([]);
|
|
4828
|
-
if (
|
|
5005
|
+
if (underScroll === undefined) {
|
|
5006
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5007
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
5008
|
+
if (noScrllable) {
|
|
5009
|
+
style.remove();
|
|
5010
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
5011
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
5012
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
} else if (underScroll === false) {
|
|
4829
5016
|
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
4830
5017
|
if (noScrllable) {
|
|
4831
5018
|
style.remove();
|
|
@@ -4849,7 +5036,7 @@ const Modal = ({
|
|
|
4849
5036
|
left: '0px',
|
|
4850
5037
|
zIndex: 999,
|
|
4851
5038
|
width: '100%',
|
|
4852
|
-
height: '
|
|
5039
|
+
height: '100dvh',
|
|
4853
5040
|
position: 'fixed',
|
|
4854
5041
|
backgroundColor: layerBackgroundColor ?? configStyles.MODAL.colors.backgroundLayer
|
|
4855
5042
|
}
|
|
@@ -4858,7 +5045,7 @@ const Modal = ({
|
|
|
4858
5045
|
position: 'relative',
|
|
4859
5046
|
display: 'flex',
|
|
4860
5047
|
width: '100%',
|
|
4861
|
-
height: '
|
|
5048
|
+
height: '100dvh',
|
|
4862
5049
|
alignItems: alignItems ?? configStyles.MODAL.alignItems,
|
|
4863
5050
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4864
5051
|
}
|
|
@@ -4872,10 +5059,10 @@ const Modal = ({
|
|
|
4872
5059
|
height: height ?? configStyles.MODAL.height,
|
|
4873
5060
|
display: type === 'content' ? 'grid' : 'block',
|
|
4874
5061
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
|
|
5062
|
+
maxWidth: maxWidth ?? configStyles.MODAL.maxWidth,
|
|
5063
|
+
maxHeight: maxHeight ?? configStyles.MODAL.maxHeight,
|
|
4878
5064
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
5065
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
4879
5066
|
minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
|
|
4880
5067
|
backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
|
|
4881
5068
|
minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
|
|
@@ -4912,11 +5099,11 @@ const Modal = ({
|
|
|
4912
5099
|
textOverflow: 'ellipsis',
|
|
4913
5100
|
margin: '0px 16px 0px 0px',
|
|
4914
5101
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4915
|
-
fontSize:
|
|
5102
|
+
fontSize: headerFontSize ?? configStyles.MODAL.header.font.size,
|
|
4916
5103
|
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4917
|
-
fontStyle:
|
|
4918
|
-
fontFamily:
|
|
4919
|
-
fontWeight:
|
|
5104
|
+
fontStyle: headerFontStyle ?? configStyles.MODAL.header.font.style,
|
|
5105
|
+
fontFamily: headerFontFamily ?? configStyles.MODAL.header.font.family,
|
|
5106
|
+
fontWeight: headerFontWeight ?? configStyles.MODAL.header.font.weight
|
|
4920
5107
|
}
|
|
4921
5108
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
4922
5109
|
onClick: () => setShow(false),
|
|
@@ -5008,7 +5195,7 @@ const Modal = ({
|
|
|
5008
5195
|
display: 'block',
|
|
5009
5196
|
objectFit: 'contain',
|
|
5010
5197
|
margin: imageMargin ?? configStyles.MODAL.image.margin,
|
|
5011
|
-
borderRadius:
|
|
5198
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
5012
5199
|
width: imageWidth ?? configStyles.MODAL.image.width,
|
|
5013
5200
|
height: imageHeight ?? configStyles.MODAL.image.height
|
|
5014
5201
|
},
|
|
@@ -5071,12 +5258,12 @@ Modal.propTypes = {
|
|
|
5071
5258
|
type: PropTypes.string,
|
|
5072
5259
|
setShow: PropTypes.func,
|
|
5073
5260
|
width: PropTypes.string,
|
|
5074
|
-
radius: PropTypes.string,
|
|
5075
5261
|
height: PropTypes.string,
|
|
5076
5262
|
padding: PropTypes.string,
|
|
5077
5263
|
selected: PropTypes.number,
|
|
5078
5264
|
minWidth: PropTypes.string,
|
|
5079
|
-
|
|
5265
|
+
maxWidth: PropTypes.string,
|
|
5266
|
+
underScroll: PropTypes.bool,
|
|
5080
5267
|
minHeight: PropTypes.string,
|
|
5081
5268
|
className: PropTypes.string,
|
|
5082
5269
|
zoomIcon: PropTypes.element,
|
|
@@ -5085,21 +5272,22 @@ Modal.propTypes = {
|
|
|
5085
5272
|
closeIcon: PropTypes.element,
|
|
5086
5273
|
closeIconFix: PropTypes.bool,
|
|
5087
5274
|
showCloseIcon: PropTypes.bool,
|
|
5275
|
+
borderRadius: PropTypes.string,
|
|
5088
5276
|
closeIconClass: PropTypes.string,
|
|
5089
5277
|
closeSlideIcon: PropTypes.element,
|
|
5090
5278
|
closeIconTopPosition: PropTypes.string,
|
|
5091
5279
|
closeIconRightPosition: PropTypes.string,
|
|
5092
5280
|
headerText: PropTypes.string,
|
|
5093
|
-
|
|
5094
|
-
|
|
5281
|
+
headerFontSize: PropTypes.string,
|
|
5282
|
+
headerFontStyle: PropTypes.string,
|
|
5095
5283
|
headerIcon: PropTypes.element,
|
|
5096
|
-
|
|
5284
|
+
headerFontFamily: PropTypes.string,
|
|
5097
5285
|
headerTextAlign: PropTypes.string,
|
|
5098
5286
|
headerIconMaxWidth: PropTypes.string,
|
|
5099
5287
|
headerIconMaxHeight: PropTypes.string,
|
|
5100
5288
|
headerIconMarginRight: PropTypes.string,
|
|
5101
5289
|
alignItems: PropTypes.string,
|
|
5102
|
-
|
|
5290
|
+
maxHeight: PropTypes.string,
|
|
5103
5291
|
imageWidth: PropTypes.string,
|
|
5104
5292
|
outsideClose: PropTypes.bool,
|
|
5105
5293
|
showZoomIcon: PropTypes.bool,
|
|
@@ -5108,7 +5296,7 @@ Modal.propTypes = {
|
|
|
5108
5296
|
borderWidth: PropTypes.string,
|
|
5109
5297
|
headerColor: PropTypes.string,
|
|
5110
5298
|
imageHeight: PropTypes.string,
|
|
5111
|
-
|
|
5299
|
+
headerFontWeight: PropTypes.string,
|
|
5112
5300
|
headerHeight: PropTypes.string,
|
|
5113
5301
|
justifyContent: PropTypes.string,
|
|
5114
5302
|
backgroundColor: PropTypes.string,
|
|
@@ -5446,7 +5634,7 @@ const NumberInput = ({
|
|
|
5446
5634
|
});
|
|
5447
5635
|
};
|
|
5448
5636
|
|
|
5449
|
-
var css_248z$a = ".input-module_input-wrap__NunrE{
|
|
5637
|
+
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)}}";
|
|
5450
5638
|
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"};
|
|
5451
5639
|
styleInject(css_248z$a);
|
|
5452
5640
|
|
|
@@ -5465,60 +5653,61 @@ const P = styled.span`
|
|
|
5465
5653
|
`;
|
|
5466
5654
|
const Input = ({
|
|
5467
5655
|
ssn,
|
|
5468
|
-
size,
|
|
5469
5656
|
name,
|
|
5470
|
-
|
|
5657
|
+
fontSize,
|
|
5658
|
+
fontStyle,
|
|
5659
|
+
fontWeight,
|
|
5660
|
+
fontFamily,
|
|
5661
|
+
borderRadius,
|
|
5471
5662
|
color,
|
|
5472
5663
|
value,
|
|
5473
5664
|
width,
|
|
5474
5665
|
regexp,
|
|
5475
5666
|
height,
|
|
5476
|
-
radius,
|
|
5477
5667
|
change,
|
|
5478
|
-
weight,
|
|
5479
|
-
family,
|
|
5480
5668
|
padding,
|
|
5481
5669
|
telClass,
|
|
5482
5670
|
leftIcon,
|
|
5483
5671
|
required,
|
|
5484
5672
|
disabled,
|
|
5485
|
-
errorDots,
|
|
5486
|
-
errorIcon,
|
|
5487
5673
|
iconWidth,
|
|
5488
5674
|
rightIcon,
|
|
5489
5675
|
className,
|
|
5490
5676
|
boxSizing,
|
|
5491
5677
|
boxShadow,
|
|
5492
|
-
errorLeft,
|
|
5493
|
-
errorSize,
|
|
5494
5678
|
maxLength,
|
|
5495
5679
|
floatToFix,
|
|
5496
5680
|
minNumSize,
|
|
5497
5681
|
maxNumSize,
|
|
5498
|
-
errorColor,
|
|
5499
5682
|
withoutDot,
|
|
5500
|
-
errorStyle,
|
|
5501
5683
|
iconPadding,
|
|
5502
|
-
errorAction,
|
|
5503
5684
|
placeholder,
|
|
5504
|
-
errorZindex,
|
|
5505
|
-
errorWeight,
|
|
5506
|
-
errorFamily,
|
|
5507
5685
|
phoneDisplay,
|
|
5508
|
-
errorMessage,
|
|
5509
5686
|
autoComplete,
|
|
5510
5687
|
showLabelIcon,
|
|
5688
|
+
boxShadowHover,
|
|
5689
|
+
errorLeft,
|
|
5690
|
+
errorDots,
|
|
5691
|
+
errorIcon,
|
|
5692
|
+
errorColor,
|
|
5693
|
+
errorAction,
|
|
5694
|
+
errorZindex,
|
|
5695
|
+
errorMessage,
|
|
5511
5696
|
errorIconSide,
|
|
5512
5697
|
showErrorIcon,
|
|
5698
|
+
errorFontSize,
|
|
5513
5699
|
errorMarginTop,
|
|
5514
5700
|
errorBoxShadow,
|
|
5515
|
-
boxShadowHover,
|
|
5516
5701
|
errorClassName,
|
|
5517
|
-
|
|
5702
|
+
errorFontStyle,
|
|
5518
5703
|
errorLineHeight,
|
|
5704
|
+
errorIconMargin,
|
|
5705
|
+
errorFontWeight,
|
|
5706
|
+
errorFontFamily,
|
|
5707
|
+
errorInContent,
|
|
5708
|
+
phoneAlignItems,
|
|
5519
5709
|
numberMaxLength,
|
|
5520
5710
|
backgroundColor,
|
|
5521
|
-
errorIconMargin,
|
|
5522
5711
|
placeholderColor,
|
|
5523
5712
|
withZero = false,
|
|
5524
5713
|
regexpErrorMessage,
|
|
@@ -5530,19 +5719,19 @@ const Input = ({
|
|
|
5530
5719
|
backgroundDisableColor,
|
|
5531
5720
|
telBorderRightColorHover,
|
|
5532
5721
|
label,
|
|
5533
|
-
labelSize,
|
|
5534
5722
|
labelIcon,
|
|
5535
|
-
labelStyle,
|
|
5536
5723
|
labelColor,
|
|
5537
5724
|
labelAction,
|
|
5538
|
-
labelWeight,
|
|
5539
5725
|
labelDisplay,
|
|
5726
|
+
lableShowMore,
|
|
5540
5727
|
labelIconSide,
|
|
5728
|
+
labelFontSize,
|
|
5729
|
+
labelFontStyle,
|
|
5541
5730
|
labelIconMargin,
|
|
5731
|
+
labelFontWeight,
|
|
5542
5732
|
labelFontFamily,
|
|
5543
5733
|
labelLineHeight,
|
|
5544
5734
|
labelMarginBottom,
|
|
5545
|
-
lableShowMore,
|
|
5546
5735
|
labelShowLessText,
|
|
5547
5736
|
labelShowMoreText,
|
|
5548
5737
|
showMoreTextColor,
|
|
@@ -5579,10 +5768,10 @@ const Input = ({
|
|
|
5579
5768
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5580
5769
|
height: height ?? configStyles.INPUT.height,
|
|
5581
5770
|
padding: padding ?? configStyles.INPUT.padding,
|
|
5582
|
-
fontSize:
|
|
5583
|
-
fontStyle:
|
|
5584
|
-
fontWeight:
|
|
5585
|
-
fontFamily:
|
|
5771
|
+
fontSize: fontSize ?? configStyles.INPUT.font.size,
|
|
5772
|
+
fontStyle: fontStyle ?? configStyles.INPUT.font.style,
|
|
5773
|
+
fontWeight: fontWeight ?? configStyles.INPUT.font.weight,
|
|
5774
|
+
fontFamily: fontFamily ?? configStyles.INPUT.font.family,
|
|
5586
5775
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5587
5776
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : configStyles.INPUT.color,
|
|
5588
5777
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -5762,7 +5951,10 @@ const Input = ({
|
|
|
5762
5951
|
}, []);
|
|
5763
5952
|
return configStyles.INPUT && /*#__PURE__*/React__default.createElement("div", {
|
|
5764
5953
|
ref: parentRef,
|
|
5765
|
-
className: classProps
|
|
5954
|
+
className: classProps,
|
|
5955
|
+
style: {
|
|
5956
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'relative'
|
|
5957
|
+
}
|
|
5766
5958
|
}, /*#__PURE__*/React__default.createElement("style", null, `.tui-color-placeholder::placeholder {
|
|
5767
5959
|
color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
|
|
5768
5960
|
}`), label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5787,13 +5979,13 @@ const Input = ({
|
|
|
5787
5979
|
ref: labelRef,
|
|
5788
5980
|
style: {
|
|
5789
5981
|
color: labelColor ?? configStyles.INPUT.label.color,
|
|
5790
|
-
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
5791
|
-
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5792
5982
|
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
5793
|
-
|
|
5983
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
5984
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
5794
5985
|
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5795
|
-
|
|
5986
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5796
5987
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5988
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5797
5989
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
5798
5990
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
5799
5991
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -5804,9 +5996,9 @@ const Input = ({
|
|
|
5804
5996
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
5805
5997
|
className: styles$9['show-more-text'],
|
|
5806
5998
|
style: {
|
|
5807
|
-
fontSize:
|
|
5808
|
-
fontStyle:
|
|
5809
|
-
fontWeight:
|
|
5999
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6000
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6001
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5810
6002
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5811
6003
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5812
6004
|
},
|
|
@@ -5824,9 +6016,9 @@ const Input = ({
|
|
|
5824
6016
|
}) : '', handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
5825
6017
|
className: styles$9['show-more-text'],
|
|
5826
6018
|
style: {
|
|
5827
|
-
fontSize:
|
|
5828
|
-
fontStyle:
|
|
5829
|
-
fontWeight:
|
|
6019
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6020
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6021
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5830
6022
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5831
6023
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5832
6024
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -5836,7 +6028,7 @@ const Input = ({
|
|
|
5836
6028
|
className: `${styles$9['input-content']}`,
|
|
5837
6029
|
style: {
|
|
5838
6030
|
width: width ?? configStyles.INPUT.width,
|
|
5839
|
-
borderRadius:
|
|
6031
|
+
borderRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5840
6032
|
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
5841
6033
|
},
|
|
5842
6034
|
onMouseEnter: handleMouseEnter,
|
|
@@ -5852,8 +6044,8 @@ const Input = ({
|
|
|
5852
6044
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5853
6045
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5854
6046
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5855
|
-
borderTopLeftRadius:
|
|
5856
|
-
borderBottomLeftRadius:
|
|
6047
|
+
borderTopLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6048
|
+
borderBottomLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5857
6049
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5858
6050
|
}
|
|
5859
6051
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement(TelInput, {
|
|
@@ -5864,7 +6056,7 @@ const Input = ({
|
|
|
5864
6056
|
disabled: disabled,
|
|
5865
6057
|
inpStyles: inpStyles,
|
|
5866
6058
|
inpAttributes: inpAttributes,
|
|
5867
|
-
radius:
|
|
6059
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5868
6060
|
telClass: telClass ?? configStyles.INPUT.tel.className,
|
|
5869
6061
|
phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
|
|
5870
6062
|
phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
|
|
@@ -5889,7 +6081,7 @@ const Input = ({
|
|
|
5889
6081
|
minNumSize: minNumSize ? minNumSize : '',
|
|
5890
6082
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
5891
6083
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
5892
|
-
radius:
|
|
6084
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5893
6085
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5894
6086
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
5895
6087
|
}) : type === 'password' ? /*#__PURE__*/React__default.createElement(PassInput, {
|
|
@@ -5900,7 +6092,7 @@ const Input = ({
|
|
|
5900
6092
|
inputChange: change,
|
|
5901
6093
|
inpStyles: inpStyles,
|
|
5902
6094
|
inpAttributes: inpAttributes,
|
|
5903
|
-
radius:
|
|
6095
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5904
6096
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5905
6097
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5906
6098
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5911,7 +6103,7 @@ const Input = ({
|
|
|
5911
6103
|
inputChange: change,
|
|
5912
6104
|
inpStyles: inpStyles,
|
|
5913
6105
|
inpAttributes: inpAttributes,
|
|
5914
|
-
radius:
|
|
6106
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5915
6107
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5916
6108
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5917
6109
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5926,8 +6118,8 @@ const Input = ({
|
|
|
5926
6118
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5927
6119
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5928
6120
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5929
|
-
borderTopRightRadius:
|
|
5930
|
-
borderBottomRightRadius:
|
|
6121
|
+
borderTopRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6122
|
+
borderBottomRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5931
6123
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5932
6124
|
}
|
|
5933
6125
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
|
|
@@ -5937,16 +6129,17 @@ const Input = ({
|
|
|
5937
6129
|
margin: '0px',
|
|
5938
6130
|
display: 'flex',
|
|
5939
6131
|
alignItems: 'center',
|
|
5940
|
-
position: 'absolute',
|
|
6132
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'absolute',
|
|
5941
6133
|
width: width ?? configStyles.INPUT.width,
|
|
5942
6134
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
5943
6135
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5944
6136
|
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
5945
|
-
fontSize:
|
|
5946
|
-
fontStyle:
|
|
5947
|
-
fontFamily:
|
|
5948
|
-
fontWeight:
|
|
6137
|
+
fontSize: errorFontSize ?? configStyles.INPUT.error.font.size,
|
|
6138
|
+
fontStyle: errorFontStyle ?? configStyles.INPUT.error.font.style,
|
|
6139
|
+
fontFamily: errorFontFamily ?? configStyles.INPUT.error.font.family,
|
|
6140
|
+
fontWeight: errorFontWeight ?? configStyles.INPUT.error.font.weight,
|
|
5949
6141
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
6142
|
+
marginTop: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? errorMarginTop ?? configStyles.INPUT.error.marginTop : '0px',
|
|
5950
6143
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
5951
6144
|
transform: 'scale3d(1,1,1)'
|
|
5952
6145
|
},
|
|
@@ -5983,55 +6176,54 @@ const Input = ({
|
|
|
5983
6176
|
};
|
|
5984
6177
|
Input.propTypes = {
|
|
5985
6178
|
ssn: PropTypes.bool,
|
|
5986
|
-
size: PropTypes.string,
|
|
5987
6179
|
name: PropTypes.string,
|
|
5988
6180
|
change: PropTypes.func,
|
|
5989
|
-
|
|
6181
|
+
fontSize: PropTypes.string,
|
|
6182
|
+
fontStyle: PropTypes.string,
|
|
6183
|
+
fontWeight: PropTypes.string,
|
|
6184
|
+
fontFamily: PropTypes.string,
|
|
5990
6185
|
color: PropTypes.string,
|
|
5991
6186
|
width: PropTypes.string,
|
|
5992
6187
|
withZero: PropTypes.bool,
|
|
5993
|
-
weight: PropTypes.string,
|
|
5994
|
-
family: PropTypes.string,
|
|
5995
6188
|
required: PropTypes.bool,
|
|
5996
6189
|
disabled: PropTypes.bool,
|
|
5997
6190
|
height: PropTypes.string,
|
|
5998
|
-
radius: PropTypes.string,
|
|
5999
6191
|
padding: PropTypes.string,
|
|
6000
6192
|
cardNumber: PropTypes.bool,
|
|
6001
6193
|
withoutDot: PropTypes.bool,
|
|
6002
6194
|
className: PropTypes.string,
|
|
6003
6195
|
iconWidth: PropTypes.string,
|
|
6004
|
-
iconPadding: PropTypes.string,
|
|
6005
6196
|
maxLength: PropTypes.number,
|
|
6006
6197
|
floatToFix: PropTypes.number,
|
|
6007
6198
|
minNumSize: PropTypes.number,
|
|
6008
6199
|
maxNumSize: PropTypes.number,
|
|
6009
|
-
|
|
6200
|
+
iconPadding: PropTypes.string,
|
|
6010
6201
|
placeholder: PropTypes.string,
|
|
6202
|
+
borderRadius: PropTypes.string,
|
|
6011
6203
|
placeholderColor: PropTypes.string,
|
|
6012
6204
|
phoneDisplay: PropTypes.string,
|
|
6013
6205
|
autoComplete: PropTypes.string,
|
|
6014
6206
|
errorDots: PropTypes.bool,
|
|
6015
6207
|
errorLeft: PropTypes.string,
|
|
6016
|
-
errorSize: PropTypes.string,
|
|
6017
6208
|
errorIcon: PropTypes.string,
|
|
6018
6209
|
errorAction: PropTypes.func,
|
|
6019
6210
|
errorColor: PropTypes.string,
|
|
6020
|
-
errorStyle: PropTypes.string,
|
|
6021
6211
|
showErrorIcon: PropTypes.bool,
|
|
6022
|
-
|
|
6023
|
-
|
|
6212
|
+
errorFontSize: PropTypes.string,
|
|
6213
|
+
errorFontStyle: PropTypes.string,
|
|
6214
|
+
errorFontWeight: PropTypes.string,
|
|
6215
|
+
errorFontFamily: PropTypes.string,
|
|
6024
6216
|
errorZindex: PropTypes.string,
|
|
6025
|
-
errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6026
6217
|
errorMessage: PropTypes.string,
|
|
6027
|
-
|
|
6218
|
+
errorInContent: PropTypes.bool,
|
|
6028
6219
|
errorMarginTop: PropTypes.string,
|
|
6029
6220
|
errorClassName: PropTypes.string,
|
|
6221
|
+
errorBoxShadow: PropTypes.string,
|
|
6030
6222
|
errorIconMargin: PropTypes.string,
|
|
6031
6223
|
errorLineHeight: PropTypes.string,
|
|
6224
|
+
errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6032
6225
|
boxSizing: PropTypes.string,
|
|
6033
6226
|
boxShadow: PropTypes.string,
|
|
6034
|
-
errorBoxShadow: PropTypes.string,
|
|
6035
6227
|
boxShadowHover: PropTypes.string,
|
|
6036
6228
|
phoneAlignItems: PropTypes.string,
|
|
6037
6229
|
numberMaxLength: PropTypes.number,
|
|
@@ -6054,14 +6246,14 @@ Input.propTypes = {
|
|
|
6054
6246
|
label: PropTypes.string,
|
|
6055
6247
|
labelAction: PropTypes.func,
|
|
6056
6248
|
labelIcon: PropTypes.string,
|
|
6057
|
-
labelSize: PropTypes.string,
|
|
6058
6249
|
labelColor: PropTypes.string,
|
|
6059
|
-
labelStyle: PropTypes.string,
|
|
6060
6250
|
showLabelIcon: PropTypes.bool,
|
|
6061
|
-
labelWeight: PropTypes.string,
|
|
6062
6251
|
labelDisplay: PropTypes.string,
|
|
6063
6252
|
labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
6064
6253
|
labelLineHeight: PropTypes.string,
|
|
6254
|
+
labelFontSize: PropTypes.string,
|
|
6255
|
+
labelFontStyle: PropTypes.string,
|
|
6256
|
+
labelFontWeight: PropTypes.string,
|
|
6065
6257
|
labelFontFamily: PropTypes.string,
|
|
6066
6258
|
labelIconMargin: PropTypes.string,
|
|
6067
6259
|
labelMarginBottom: PropTypes.string,
|
|
@@ -6304,23 +6496,20 @@ const Select = ({
|
|
|
6304
6496
|
keyNames,
|
|
6305
6497
|
selected,
|
|
6306
6498
|
className,
|
|
6307
|
-
marginTop,
|
|
6308
6499
|
arrowIcon,
|
|
6309
6500
|
closeIcon,
|
|
6310
|
-
errorZindex,
|
|
6311
|
-
errorMessage,
|
|
6312
6501
|
arrowNoRotate,
|
|
6313
6502
|
showCloseIcon,
|
|
6314
6503
|
defaultOption,
|
|
6315
6504
|
multipleCheckbox,
|
|
6316
6505
|
label,
|
|
6317
6506
|
labelColor,
|
|
6318
|
-
labelWeight,
|
|
6319
6507
|
labelDisplay,
|
|
6320
6508
|
labelFontSize,
|
|
6321
6509
|
labelFontStyle,
|
|
6322
6510
|
labelLineHeight,
|
|
6323
6511
|
labelFontFamily,
|
|
6512
|
+
labelFontWeight,
|
|
6324
6513
|
labelMarginBottom,
|
|
6325
6514
|
labelTextTransform,
|
|
6326
6515
|
lableShowMore,
|
|
@@ -6339,12 +6528,16 @@ const Select = ({
|
|
|
6339
6528
|
labelTooltipBackgroundColor,
|
|
6340
6529
|
cursor,
|
|
6341
6530
|
errorIcon,
|
|
6342
|
-
errorSize,
|
|
6343
6531
|
errorColor,
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
errorWeight,
|
|
6532
|
+
errorZindex,
|
|
6533
|
+
errorMessage,
|
|
6347
6534
|
showErrorIcon,
|
|
6535
|
+
errorFontSize,
|
|
6536
|
+
errorInContent,
|
|
6537
|
+
errorMarginTop,
|
|
6538
|
+
errorFontStyle,
|
|
6539
|
+
errorFontFamily,
|
|
6540
|
+
errorFontWeight,
|
|
6348
6541
|
selectedColor,
|
|
6349
6542
|
selectedRadius,
|
|
6350
6543
|
selectedPadding,
|
|
@@ -6359,6 +6552,7 @@ const Select = ({
|
|
|
6359
6552
|
selectedTransition,
|
|
6360
6553
|
selectedBackgroundColor,
|
|
6361
6554
|
selectedDisableBackgroundColor,
|
|
6555
|
+
selectedDisablePlaceholderColor,
|
|
6362
6556
|
optionsBoxShadow,
|
|
6363
6557
|
optionsBorderRadius,
|
|
6364
6558
|
optionsBackgroundColor,
|
|
@@ -6610,8 +6804,8 @@ const Select = ({
|
|
|
6610
6804
|
ref: parentRef,
|
|
6611
6805
|
className: classProps,
|
|
6612
6806
|
style: {
|
|
6613
|
-
|
|
6614
|
-
|
|
6807
|
+
width: '100%',
|
|
6808
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'relative'
|
|
6615
6809
|
}
|
|
6616
6810
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
6617
6811
|
style: {
|
|
@@ -6625,7 +6819,7 @@ const Select = ({
|
|
|
6625
6819
|
ref: labelRef,
|
|
6626
6820
|
style: {
|
|
6627
6821
|
color: labelColor ?? configStyles.SELECT.label.color,
|
|
6628
|
-
fontWeight:
|
|
6822
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6629
6823
|
display: labelDisplay ?? configStyles.SELECT.label.display,
|
|
6630
6824
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6631
6825
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
@@ -6645,7 +6839,7 @@ const Select = ({
|
|
|
6645
6839
|
style: {
|
|
6646
6840
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6647
6841
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6648
|
-
fontWeight:
|
|
6842
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6649
6843
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6650
6844
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6651
6845
|
},
|
|
@@ -6655,7 +6849,7 @@ const Select = ({
|
|
|
6655
6849
|
style: {
|
|
6656
6850
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6657
6851
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6658
|
-
fontWeight:
|
|
6852
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6659
6853
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6660
6854
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6661
6855
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -6692,7 +6886,7 @@ const Select = ({
|
|
|
6692
6886
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
6693
6887
|
overflow: insidePagination ? 'visible' : 'hidden',
|
|
6694
6888
|
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
6695
|
-
color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6889
|
+
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
|
|
6696
6890
|
}
|
|
6697
6891
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
6698
6892
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -6759,16 +6953,17 @@ const Select = ({
|
|
|
6759
6953
|
}) : '', option[keyNames.name]);
|
|
6760
6954
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
6761
6955
|
style: {
|
|
6762
|
-
position: 'absolute',
|
|
6956
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'absolute',
|
|
6763
6957
|
columnGap: '4px',
|
|
6764
6958
|
color: errorColor ?? configStyles.SELECT.error.color,
|
|
6765
|
-
fontSize:
|
|
6766
|
-
fontStyle:
|
|
6767
|
-
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline',
|
|
6768
|
-
fontFamily:
|
|
6769
|
-
fontWeight:
|
|
6959
|
+
fontSize: errorFontSize ?? configStyles.SELECT.error.font.size,
|
|
6960
|
+
fontStyle: errorFontStyle ?? configStyles.SELECT.error.font.style,
|
|
6961
|
+
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline-block',
|
|
6962
|
+
fontFamily: errorFontFamily ?? configStyles.SELECT.error.font.family,
|
|
6963
|
+
fontWeight: errorFontWeight ?? configStyles.SELECT.error.font.weight,
|
|
6770
6964
|
zIndex: errorZindex ?? configStyles.SELECT.error.zIndex,
|
|
6771
|
-
|
|
6965
|
+
marginTop: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? errorMarginTop ?? configStyles.SELECT.error.marginTop : '0px',
|
|
6966
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.SELECT.error.marginTop})`
|
|
6772
6967
|
}
|
|
6773
6968
|
}, showErrorIcon ? errorIcon ? errorIcon : configStyles.SELECT.error?.icon ? configStyles.SELECT.error?.icon : '' : '', errorMessage) : '');
|
|
6774
6969
|
};
|
|
@@ -6782,24 +6977,21 @@ Select.propTypes = {
|
|
|
6782
6977
|
disabled: PropTypes.bool,
|
|
6783
6978
|
selected: PropTypes.array,
|
|
6784
6979
|
keyNames: PropTypes.object,
|
|
6785
|
-
marginTop: PropTypes.string,
|
|
6786
6980
|
className: PropTypes.string,
|
|
6787
6981
|
arrowIcon: PropTypes.element,
|
|
6788
6982
|
closeIcon: PropTypes.element,
|
|
6789
6983
|
arrowNoRotate: PropTypes.bool,
|
|
6790
6984
|
showCloseIcon: PropTypes.bool,
|
|
6791
|
-
errorZindex: PropTypes.number,
|
|
6792
|
-
errorMessage: PropTypes.string,
|
|
6793
6985
|
defaultOption: PropTypes.string,
|
|
6794
6986
|
multipleCheckbox: PropTypes.bool,
|
|
6795
6987
|
label: PropTypes.string,
|
|
6796
6988
|
labelColor: PropTypes.string,
|
|
6797
|
-
labelWeight: PropTypes.string,
|
|
6798
6989
|
labelDisplay: PropTypes.string,
|
|
6799
6990
|
labelFontSize: PropTypes.string,
|
|
6800
6991
|
labelFontStyle: PropTypes.string,
|
|
6801
6992
|
labelLineHeight: PropTypes.string,
|
|
6802
6993
|
labelFontFamily: PropTypes.string,
|
|
6994
|
+
labelFontWeight: PropTypes.string,
|
|
6803
6995
|
labelMarginBottom: PropTypes.string,
|
|
6804
6996
|
labelTextTransform: PropTypes.string,
|
|
6805
6997
|
lableShowMore: PropTypes.bool,
|
|
@@ -6807,10 +6999,17 @@ Select.propTypes = {
|
|
|
6807
6999
|
labelShowMoreText: PropTypes.string,
|
|
6808
7000
|
showMoreTextColor: PropTypes.string,
|
|
6809
7001
|
cursor: PropTypes.string,
|
|
6810
|
-
errorSize: PropTypes.string,
|
|
6811
7002
|
errorColor: PropTypes.string,
|
|
6812
7003
|
errorIcon: PropTypes.element,
|
|
6813
7004
|
showErrorIcon: PropTypes.bool,
|
|
7005
|
+
errorZindex: PropTypes.number,
|
|
7006
|
+
errorInContent: PropTypes.bool,
|
|
7007
|
+
errorMessage: PropTypes.string,
|
|
7008
|
+
errorFontSize: PropTypes.string,
|
|
7009
|
+
errorMarginTop: PropTypes.string,
|
|
7010
|
+
errorFontStyle: PropTypes.string,
|
|
7011
|
+
errorFontFamily: PropTypes.string,
|
|
7012
|
+
errorFontWeight: PropTypes.string,
|
|
6814
7013
|
selectedColor: PropTypes.string,
|
|
6815
7014
|
selectedRadius: PropTypes.string,
|
|
6816
7015
|
selectedMinHeight: PropTypes.string,
|
|
@@ -6825,6 +7024,7 @@ Select.propTypes = {
|
|
|
6825
7024
|
selectedTransition: PropTypes.string,
|
|
6826
7025
|
selectedBackgroundColor: PropTypes.string,
|
|
6827
7026
|
selectedDisableBackgroundColor: PropTypes.string,
|
|
7027
|
+
selectedDisablePlaceholderColor: PropTypes.string,
|
|
6828
7028
|
optionsBoxShadow: PropTypes.string,
|
|
6829
7029
|
optionsBorderRadius: PropTypes.string,
|
|
6830
7030
|
optionsBackgroundColor: PropTypes.string,
|
|
@@ -7155,9 +7355,9 @@ Toast.propTypes = {
|
|
|
7155
7355
|
type: PropTypes.oneOf(Object.values(ToasterType)).isRequired
|
|
7156
7356
|
};
|
|
7157
7357
|
|
|
7158
|
-
let toastify = document.getElementById('toastify');
|
|
7159
7358
|
let path = window.location.href;
|
|
7160
7359
|
const removeToast = ref => {
|
|
7360
|
+
let toastify = document.getElementById('toastify');
|
|
7161
7361
|
if (ref.current) {
|
|
7162
7362
|
const node = ref.current;
|
|
7163
7363
|
const removeElem = node.parentNode;
|
|
@@ -7231,6 +7431,7 @@ const createToast = ({
|
|
|
7231
7431
|
styleProps,
|
|
7232
7432
|
description
|
|
7233
7433
|
}) => {
|
|
7434
|
+
let toastify = document.getElementById('toastify');
|
|
7234
7435
|
let innerConfigStyles = {};
|
|
7235
7436
|
let toastParentBlock;
|
|
7236
7437
|
if (!toastify) {
|
|
@@ -7330,6 +7531,7 @@ const Toaster = () => {
|
|
|
7330
7531
|
const [configStyles, setConfigStyles] = useState({});
|
|
7331
7532
|
window.addEventListener('popstate', () => {
|
|
7332
7533
|
if (path !== window.location.href) {
|
|
7534
|
+
let toastify = document.getElementById('toastify');
|
|
7333
7535
|
if (!toastify) {
|
|
7334
7536
|
toastify = document.createElement('div');
|
|
7335
7537
|
toastify.setAttribute('id', 'toastify');
|
|
@@ -7402,7 +7604,6 @@ const Tooltip = ({
|
|
|
7402
7604
|
width,
|
|
7403
7605
|
color,
|
|
7404
7606
|
height,
|
|
7405
|
-
radius,
|
|
7406
7607
|
fontSize,
|
|
7407
7608
|
hoverOpen,
|
|
7408
7609
|
className,
|
|
@@ -7410,9 +7611,10 @@ const Tooltip = ({
|
|
|
7410
7611
|
fontFamily,
|
|
7411
7612
|
fontWeight,
|
|
7412
7613
|
tooltipIcon,
|
|
7614
|
+
borderRadius,
|
|
7413
7615
|
tooltipWidth,
|
|
7414
|
-
tooltipRadius,
|
|
7415
7616
|
backgroundColor,
|
|
7617
|
+
tooltipBorderRadius,
|
|
7416
7618
|
tooltipBackgroundColor,
|
|
7417
7619
|
direction = 'top'
|
|
7418
7620
|
}) => {
|
|
@@ -7485,7 +7687,7 @@ const Tooltip = ({
|
|
|
7485
7687
|
style: {
|
|
7486
7688
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
7487
7689
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
7488
|
-
borderRadius:
|
|
7690
|
+
borderRadius: borderRadius ?? configStyles.TOOLTIP.parent.radius,
|
|
7489
7691
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
7490
7692
|
},
|
|
7491
7693
|
onClick: e => e.stopPropagation()
|
|
@@ -7494,7 +7696,7 @@ const Tooltip = ({
|
|
|
7494
7696
|
className: `${styles$6['tooltip']}`,
|
|
7495
7697
|
style: {
|
|
7496
7698
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
7497
|
-
borderRadius:
|
|
7699
|
+
borderRadius: tooltipBorderRadius ?? configStyles.TOOLTIP.radius,
|
|
7498
7700
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
7499
7701
|
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',
|
|
7500
7702
|
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'
|
|
@@ -7531,16 +7733,16 @@ Tooltip.propTypes = {
|
|
|
7531
7733
|
width: PropTypes.string,
|
|
7532
7734
|
color: PropTypes.string,
|
|
7533
7735
|
height: PropTypes.string,
|
|
7534
|
-
radius: PropTypes.string,
|
|
7535
7736
|
hoverOpen: PropTypes.bool,
|
|
7536
7737
|
fontSize: PropTypes.string,
|
|
7537
7738
|
fontStyle: PropTypes.string,
|
|
7538
7739
|
className: PropTypes.string,
|
|
7539
7740
|
fontFamily: PropTypes.string,
|
|
7540
7741
|
fontWeight: PropTypes.string,
|
|
7742
|
+
borderRadius: PropTypes.string,
|
|
7541
7743
|
tooltipWidth: PropTypes.string,
|
|
7542
7744
|
tooltipIcon: PropTypes.element,
|
|
7543
|
-
|
|
7745
|
+
tooltipBorderRadius: PropTypes.string,
|
|
7544
7746
|
text: PropTypes.string.isRequired,
|
|
7545
7747
|
backgroundColor: PropTypes.string,
|
|
7546
7748
|
tooltipBackgroundColor: PropTypes.string,
|
|
@@ -7906,16 +8108,11 @@ const PositionSide = {
|
|
|
7906
8108
|
BOTTOM: 'bottom'
|
|
7907
8109
|
};
|
|
7908
8110
|
const Textarea = ({
|
|
7909
|
-
size,
|
|
7910
8111
|
name,
|
|
7911
|
-
style,
|
|
7912
|
-
family,
|
|
7913
|
-
weight,
|
|
7914
8112
|
width,
|
|
7915
8113
|
value,
|
|
7916
8114
|
height,
|
|
7917
8115
|
resize,
|
|
7918
|
-
radius,
|
|
7919
8116
|
padding,
|
|
7920
8117
|
disabled,
|
|
7921
8118
|
required,
|
|
@@ -7927,25 +8124,31 @@ const Textarea = ({
|
|
|
7927
8124
|
maxHeight,
|
|
7928
8125
|
boxSizing,
|
|
7929
8126
|
maxLength,
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
8127
|
+
fontSize,
|
|
8128
|
+
fontStyle,
|
|
8129
|
+
fontFamily,
|
|
8130
|
+
fontWeight,
|
|
8131
|
+
placeholder,
|
|
8132
|
+
borderRadius,
|
|
8133
|
+
errorMarginTop,
|
|
7935
8134
|
className,
|
|
7936
8135
|
errorColor,
|
|
7937
|
-
placeholder,
|
|
7938
8136
|
errorMessage,
|
|
8137
|
+
errorFontSize,
|
|
8138
|
+
errorFontStyle,
|
|
8139
|
+
errorFontWeight,
|
|
8140
|
+
errorFontFamily,
|
|
8141
|
+
borderWidth,
|
|
7939
8142
|
backgroundColor,
|
|
7940
8143
|
borderFocusColor,
|
|
7941
8144
|
borderHoverColor,
|
|
7942
8145
|
showCharacterCount,
|
|
7943
8146
|
label,
|
|
7944
|
-
labelSize,
|
|
7945
8147
|
labelColor,
|
|
7946
|
-
labelStyle,
|
|
7947
|
-
labelWeight,
|
|
7948
8148
|
labelDisplay,
|
|
8149
|
+
labelFontSize,
|
|
8150
|
+
labelFontStyle,
|
|
8151
|
+
labelFontWeight,
|
|
7949
8152
|
labelFontFamily,
|
|
7950
8153
|
labelMarginBottom,
|
|
7951
8154
|
lableShowMore,
|
|
@@ -8144,9 +8347,10 @@ const Textarea = ({
|
|
|
8144
8347
|
alignItems: 'center',
|
|
8145
8348
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
8146
8349
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8147
|
-
fontSize:
|
|
8350
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8351
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8148
8352
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8149
|
-
fontWeight:
|
|
8353
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8150
8354
|
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
8151
8355
|
}
|
|
8152
8356
|
}, label && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8171,9 +8375,9 @@ const Textarea = ({
|
|
|
8171
8375
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
8172
8376
|
className: styles$3['show-more-text'],
|
|
8173
8377
|
style: {
|
|
8174
|
-
fontSize:
|
|
8175
|
-
fontStyle:
|
|
8176
|
-
fontWeight:
|
|
8378
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8379
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8380
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8177
8381
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8178
8382
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8179
8383
|
},
|
|
@@ -8181,9 +8385,9 @@ const Textarea = ({
|
|
|
8181
8385
|
}, ' ', " ", labelShowLessText ?? configStyles.TEXTAREA.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
8182
8386
|
className: styles$3['show-more-text'],
|
|
8183
8387
|
style: {
|
|
8184
|
-
fontSize:
|
|
8185
|
-
fontStyle:
|
|
8186
|
-
fontWeight:
|
|
8388
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8389
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8390
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8187
8391
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8188
8392
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8189
8393
|
},
|
|
@@ -8200,20 +8404,20 @@ const Textarea = ({
|
|
|
8200
8404
|
outline: 'none',
|
|
8201
8405
|
overflow: 'auto',
|
|
8202
8406
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
8203
|
-
fontSize: size ?? configStyles.TEXTAREA.font.size,
|
|
8204
|
-
fontStyle: style ?? configStyles.TEXTAREA.font.style,
|
|
8205
|
-
fontFamily: family ?? configStyles.TEXTAREA.font.family,
|
|
8206
|
-
fontWeight: weight ?? configStyles.TEXTAREA.font.weight,
|
|
8207
8407
|
height: height ?? configStyles.TEXTAREA.height,
|
|
8208
8408
|
padding: padding ?? configStyles.TEXTAREA.padding,
|
|
8209
|
-
borderRadius: radius ?? configStyles.TEXTAREA.radius,
|
|
8210
8409
|
minWidth: minWidth ?? configStyles.TEXTAREA.minWidth,
|
|
8211
8410
|
maxWidth: maxWidth ?? configStyles.TEXTAREA.maxWidth,
|
|
8411
|
+
fontSize: fontSize ?? configStyles.TEXTAREA.font.size,
|
|
8212
8412
|
minHeight: minHeight ?? configStyles.TEXTAREA.minHeight,
|
|
8213
8413
|
maxHeight: maxHeight ?? configStyles.TEXTAREA.maxHeight,
|
|
8214
8414
|
boxSizing: boxSizing ?? configStyles.TEXTAREA.box.sizing,
|
|
8415
|
+
fontStyle: fontStyle ?? configStyles.TEXTAREA.font.style,
|
|
8416
|
+
borderRadius: borderRadius ?? configStyles.TEXTAREA.radius,
|
|
8417
|
+
fontFamily: fontFamily ?? configStyles.TEXTAREA.font.family,
|
|
8418
|
+
fontWeight: fontWeight ?? configStyles.TEXTAREA.font.weight,
|
|
8215
8419
|
backgroundColor: backgroundColor ?? configStyles.TEXTAREA.colors.background,
|
|
8216
|
-
boxShadow: error ? errorColor ? `0 0 0
|
|
8420
|
+
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,
|
|
8217
8421
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
8218
8422
|
},
|
|
8219
8423
|
name: name,
|
|
@@ -8232,8 +8436,9 @@ const Textarea = ({
|
|
|
8232
8436
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
8233
8437
|
style: {
|
|
8234
8438
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8235
|
-
fontSize:
|
|
8236
|
-
|
|
8439
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8440
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8441
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8237
8442
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family
|
|
8238
8443
|
}
|
|
8239
8444
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8246,11 +8451,11 @@ const Textarea = ({
|
|
|
8246
8451
|
style: {
|
|
8247
8452
|
display: 'inline-block',
|
|
8248
8453
|
color: errorColor ?? configStyles.TEXTAREA.error.color,
|
|
8249
|
-
fontSize:
|
|
8250
|
-
fontStyle:
|
|
8251
|
-
fontWeight:
|
|
8252
|
-
fontFamily:
|
|
8253
|
-
marginTop:
|
|
8454
|
+
fontSize: errorFontSize ?? configStyles.TEXTAREA.error.font.size,
|
|
8455
|
+
fontStyle: errorFontStyle ?? configStyles.TEXTAREA.error.font.style,
|
|
8456
|
+
fontWeight: errorFontWeight ?? configStyles.TEXTAREA.error.font.weight,
|
|
8457
|
+
fontFamily: errorFontFamily ?? configStyles.TEXTAREA.error.font.family,
|
|
8458
|
+
marginTop: errorMarginTop ?? configStyles.TEXTAREA.error.marginTop
|
|
8254
8459
|
}
|
|
8255
8460
|
}, error)) : '');
|
|
8256
8461
|
};
|
|
@@ -8271,15 +8476,15 @@ Textarea.propTypes = {
|
|
|
8271
8476
|
minWidth: PropTypes.string,
|
|
8272
8477
|
maxWidth: PropTypes.string,
|
|
8273
8478
|
boxShadow: PropTypes.string,
|
|
8274
|
-
marginTop: PropTypes.string,
|
|
8275
8479
|
boxSizing: PropTypes.string,
|
|
8276
8480
|
minHeight: PropTypes.string,
|
|
8277
8481
|
maxHeight: PropTypes.string,
|
|
8278
8482
|
maxLength: PropTypes.number,
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8483
|
+
errorFontSize: PropTypes.string,
|
|
8484
|
+
errorMarginTop: PropTypes.string,
|
|
8485
|
+
errorFontStyle: PropTypes.string,
|
|
8486
|
+
errorFontWeight: PropTypes.string,
|
|
8487
|
+
errorFontFamily: PropTypes.string,
|
|
8283
8488
|
className: PropTypes.string,
|
|
8284
8489
|
errorColor: PropTypes.string,
|
|
8285
8490
|
placeholder: PropTypes.string,
|
|
@@ -8290,10 +8495,10 @@ Textarea.propTypes = {
|
|
|
8290
8495
|
borderFocusColor: PropTypes.string,
|
|
8291
8496
|
borderHoverColor: PropTypes.string,
|
|
8292
8497
|
label: PropTypes.string,
|
|
8293
|
-
|
|
8294
|
-
|
|
8498
|
+
labelFontSize: PropTypes.string,
|
|
8499
|
+
labelFontStyle: PropTypes.string,
|
|
8295
8500
|
labelColor: PropTypes.string,
|
|
8296
|
-
|
|
8501
|
+
labelFontWeight: PropTypes.string,
|
|
8297
8502
|
labelDisplay: PropTypes.string,
|
|
8298
8503
|
labelFontFamily: PropTypes.string,
|
|
8299
8504
|
labelMarginBottom: PropTypes.string,
|
|
@@ -8642,7 +8847,7 @@ const Swipe = ({
|
|
|
8642
8847
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8643
8848
|
style: {
|
|
8644
8849
|
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
8645
|
-
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '
|
|
8850
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100dvh'
|
|
8646
8851
|
}
|
|
8647
8852
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
|
|
8648
8853
|
style: {
|
|
@@ -8716,7 +8921,7 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
8716
8921
|
swipeBlock.style.zIndex = swipeCount;
|
|
8717
8922
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
8718
8923
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
8719
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8924
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100dvh';
|
|
8720
8925
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8721
8926
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8722
8927
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -8758,10 +8963,10 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
8758
8963
|
swipable.style.left = '0px';
|
|
8759
8964
|
swipable.style.zIndex = 99999;
|
|
8760
8965
|
swipable.style.maxWidth = '100%';
|
|
8761
|
-
swipable.style.maxHeight = '
|
|
8966
|
+
swipable.style.maxHeight = '100dvh';
|
|
8762
8967
|
swipable.style.visibility = 'hidden';
|
|
8763
8968
|
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8764
|
-
swipable.style.height = widthParent ? '
|
|
8969
|
+
swipable.style.height = widthParent ? '100dvh' : '0px';
|
|
8765
8970
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8766
8971
|
swipable.classList.add(styles$2['visible']);
|
|
8767
8972
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
@@ -8817,7 +9022,17 @@ const swipe = {
|
|
|
8817
9022
|
return;
|
|
8818
9023
|
}
|
|
8819
9024
|
if (swipeCount === 0) {
|
|
8820
|
-
if (
|
|
9025
|
+
if (!hasOwnerProperty(props, 'underScroll')) {
|
|
9026
|
+
if (newConfigStyles.SWIPEMODAL && hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'underScroll') && newConfigStyles.SWIPEMODAL.underScroll === false) {
|
|
9027
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
9028
|
+
document.head.appendChild(style);
|
|
9029
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
9030
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
9031
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
9032
|
+
passive: false
|
|
9033
|
+
});
|
|
9034
|
+
}
|
|
9035
|
+
} else if (hasOwnerProperty(props, 'underScroll') && props.underScroll === false) {
|
|
8821
9036
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
8822
9037
|
document.head.appendChild(style);
|
|
8823
9038
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -8838,11 +9053,10 @@ const swipe = {
|
|
|
8838
9053
|
});
|
|
8839
9054
|
},
|
|
8840
9055
|
close: id => {
|
|
8841
|
-
let newConfigStyles = {};
|
|
8842
9056
|
configStylesPromise.then(data => {
|
|
8843
|
-
|
|
9057
|
+
({
|
|
8844
9058
|
...data
|
|
8845
|
-
};
|
|
9059
|
+
});
|
|
8846
9060
|
}, error => {
|
|
8847
9061
|
console.error(error);
|
|
8848
9062
|
});
|
|
@@ -8864,14 +9078,12 @@ const swipe = {
|
|
|
8864
9078
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8865
9079
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8866
9080
|
document.body.removeChild(swipable);
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8874
|
-
}
|
|
9081
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9082
|
+
if (noScrllable) {
|
|
9083
|
+
style.remove();
|
|
9084
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9085
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9086
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8875
9087
|
}
|
|
8876
9088
|
}
|
|
8877
9089
|
}, 200);
|
|
@@ -8881,14 +9093,12 @@ const swipe = {
|
|
|
8881
9093
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8882
9094
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8883
9095
|
document.body.removeChild(swipable);
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8891
|
-
}
|
|
9096
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9097
|
+
if (noScrllable) {
|
|
9098
|
+
style.remove();
|
|
9099
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9100
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9101
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8892
9102
|
}
|
|
8893
9103
|
}
|
|
8894
9104
|
}
|
|
@@ -8921,21 +9131,21 @@ const TypographyType = {
|
|
|
8921
9131
|
span: 'span'
|
|
8922
9132
|
};
|
|
8923
9133
|
const Typography = ({
|
|
8924
|
-
size,
|
|
8925
9134
|
color,
|
|
8926
|
-
weight,
|
|
8927
|
-
radius,
|
|
8928
9135
|
border,
|
|
8929
9136
|
cursor,
|
|
8930
9137
|
onClick,
|
|
8931
9138
|
children,
|
|
9139
|
+
fontSize,
|
|
8932
9140
|
textAlign,
|
|
8933
9141
|
fontStyle,
|
|
8934
9142
|
className,
|
|
8935
9143
|
textShadow,
|
|
8936
9144
|
lineHeight,
|
|
8937
9145
|
colorHover,
|
|
9146
|
+
fontWeight,
|
|
8938
9147
|
fontFamily,
|
|
9148
|
+
borderRadius,
|
|
8939
9149
|
textTransform,
|
|
8940
9150
|
textDecoration,
|
|
8941
9151
|
backgroundColor,
|
|
@@ -8956,9 +9166,9 @@ const Typography = ({
|
|
|
8956
9166
|
style: {
|
|
8957
9167
|
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
8958
9168
|
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
8959
|
-
borderRadius:
|
|
8960
|
-
fontSize:
|
|
8961
|
-
fontWeight:
|
|
9169
|
+
borderRadius: borderRadius ?? configStyles.TYPOGRAPHY.radius,
|
|
9170
|
+
fontSize: fontSize ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
9171
|
+
fontWeight: fontWeight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
8962
9172
|
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
8963
9173
|
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
8964
9174
|
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
@@ -9000,10 +9210,8 @@ const Typography = ({
|
|
|
9000
9210
|
Typography.propTypes = {
|
|
9001
9211
|
color: PropTypes.string,
|
|
9002
9212
|
onClick: PropTypes.func,
|
|
9003
|
-
weight: PropTypes.string,
|
|
9004
9213
|
border: PropTypes.string,
|
|
9005
9214
|
cursor: PropTypes.string,
|
|
9006
|
-
radius: PropTypes.string,
|
|
9007
9215
|
textAlign: PropTypes.string,
|
|
9008
9216
|
className: PropTypes.string,
|
|
9009
9217
|
fontStyle: PropTypes.string,
|
|
@@ -9011,11 +9219,13 @@ Typography.propTypes = {
|
|
|
9011
9219
|
textShadow: PropTypes.string,
|
|
9012
9220
|
fontFamily: PropTypes.string,
|
|
9013
9221
|
colorHover: PropTypes.string,
|
|
9222
|
+
fontWeight: PropTypes.string,
|
|
9223
|
+
borderRadius: PropTypes.string,
|
|
9014
9224
|
textTransform: PropTypes.string,
|
|
9015
9225
|
textDecoration: PropTypes.string,
|
|
9016
9226
|
backgroundColor: PropTypes.string,
|
|
9017
9227
|
variant: PropTypes.oneOf(Object.values(TypographyType)),
|
|
9018
|
-
|
|
9228
|
+
fontSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
9019
9229
|
};
|
|
9020
9230
|
|
|
9021
9231
|
const Dots = '...';
|
|
@@ -9479,12 +9689,13 @@ const Autocomplete = ({
|
|
|
9479
9689
|
required,
|
|
9480
9690
|
selected,
|
|
9481
9691
|
className,
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9692
|
+
errorFontSize,
|
|
9693
|
+
errorFontStyle,
|
|
9694
|
+
errorFontWeight,
|
|
9695
|
+
errorFontFamily,
|
|
9696
|
+
errorMarginTop,
|
|
9487
9697
|
errorColor,
|
|
9698
|
+
errorInContent,
|
|
9488
9699
|
placeHolder,
|
|
9489
9700
|
errorMessage,
|
|
9490
9701
|
autoComplete,
|
|
@@ -9542,11 +9753,11 @@ const Autocomplete = ({
|
|
|
9542
9753
|
contentBottomRowHoverBackgroundColor,
|
|
9543
9754
|
backgroundDisableColor,
|
|
9544
9755
|
label,
|
|
9545
|
-
labelSize,
|
|
9546
|
-
labelStyle,
|
|
9547
9756
|
labelColor,
|
|
9548
|
-
labelWeight,
|
|
9549
9757
|
labelDisplay,
|
|
9758
|
+
labelFontSize,
|
|
9759
|
+
labelFontStyle,
|
|
9760
|
+
labelFontWeight,
|
|
9550
9761
|
labelLineHeight,
|
|
9551
9762
|
labelFontFamily,
|
|
9552
9763
|
labelMarginBottom,
|
|
@@ -9686,14 +9897,15 @@ const Autocomplete = ({
|
|
|
9686
9897
|
}, item[keyNames.name]);
|
|
9687
9898
|
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
9688
9899
|
style: {
|
|
9689
|
-
position: 'absolute',
|
|
9900
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9690
9901
|
zIndex: '1',
|
|
9691
9902
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9692
|
-
fontSize:
|
|
9693
|
-
fontStyle:
|
|
9694
|
-
fontWeight:
|
|
9695
|
-
fontFamily:
|
|
9696
|
-
|
|
9903
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
9904
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
9905
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
9906
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
9907
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
9908
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9697
9909
|
padding: innerErrorPadding ?? configStyles.AUTOCOMPLETE.innerError.padding,
|
|
9698
9910
|
height: contentBottomRowHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
9699
9911
|
lineHeight: contentBottomRowLineHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
@@ -9862,9 +10074,9 @@ const Autocomplete = ({
|
|
|
9862
10074
|
style: {
|
|
9863
10075
|
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
9864
10076
|
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
9865
|
-
fontSize:
|
|
9866
|
-
fontStyle:
|
|
9867
|
-
fontWeight:
|
|
10077
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10078
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10079
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9868
10080
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9869
10081
|
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
9870
10082
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
@@ -9879,9 +10091,9 @@ const Autocomplete = ({
|
|
|
9879
10091
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
9880
10092
|
className: styles['show-more-text'],
|
|
9881
10093
|
style: {
|
|
9882
|
-
fontSize:
|
|
9883
|
-
fontStyle:
|
|
9884
|
-
fontWeight:
|
|
10094
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10095
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10096
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9885
10097
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9886
10098
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9887
10099
|
},
|
|
@@ -9889,9 +10101,9 @@ const Autocomplete = ({
|
|
|
9889
10101
|
}, ' ', " ", labelShowLessText ?? configStyles.AUTOCOMPLETE.label.showLessText) : ''), required && /*#__PURE__*/React__default.createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default.createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default.createElement("span", {
|
|
9890
10102
|
className: styles['show-more-text'],
|
|
9891
10103
|
style: {
|
|
9892
|
-
fontSize:
|
|
9893
|
-
fontStyle:
|
|
9894
|
-
fontWeight:
|
|
10104
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10105
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10106
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9895
10107
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9896
10108
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9897
10109
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
@@ -9940,13 +10152,14 @@ const Autocomplete = ({
|
|
|
9940
10152
|
}, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
|
|
9941
10153
|
style: {
|
|
9942
10154
|
left: '0px',
|
|
9943
|
-
position: 'absolute',
|
|
10155
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9944
10156
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9945
|
-
fontSize:
|
|
9946
|
-
fontStyle:
|
|
9947
|
-
fontWeight:
|
|
9948
|
-
fontFamily:
|
|
9949
|
-
|
|
10157
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
10158
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
10159
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
10160
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
10161
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
10162
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9950
10163
|
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
9951
10164
|
}
|
|
9952
10165
|
}, innerError) : '', optionList));
|
|
@@ -9958,18 +10171,19 @@ Autocomplete.propTypes = {
|
|
|
9958
10171
|
keyNames: PropTypes.object,
|
|
9959
10172
|
selected: PropTypes.object,
|
|
9960
10173
|
className: PropTypes.string,
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
labelSize: PropTypes.string,
|
|
9967
|
-
labelStyle: PropTypes.string,
|
|
10174
|
+
errorFontSize: PropTypes.string,
|
|
10175
|
+
errorFontStyle: PropTypes.string,
|
|
10176
|
+
errorFontWeight: PropTypes.string,
|
|
10177
|
+
errorFontFamily: PropTypes.string,
|
|
10178
|
+
errorMarginTop: PropTypes.string,
|
|
9968
10179
|
errorColor: PropTypes.string,
|
|
9969
10180
|
labelColor: PropTypes.string,
|
|
9970
10181
|
searchCount: PropTypes.number,
|
|
9971
10182
|
placeHolder: PropTypes.string,
|
|
9972
|
-
|
|
10183
|
+
labelFontSize: PropTypes.string,
|
|
10184
|
+
labelFontStyle: PropTypes.string,
|
|
10185
|
+
labelFontWeight: PropTypes.number,
|
|
10186
|
+
errorInContent: PropTypes.bool,
|
|
9973
10187
|
errorMessage: PropTypes.string,
|
|
9974
10188
|
labelDisplay: PropTypes.string,
|
|
9975
10189
|
autoComplete: PropTypes.string,
|