@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.js
CHANGED
|
@@ -556,7 +556,6 @@ var packageResult = {
|
|
|
556
556
|
BUTTON: {
|
|
557
557
|
opacity: 1,
|
|
558
558
|
width: '100%',
|
|
559
|
-
radius: '6px',
|
|
560
559
|
className: '',
|
|
561
560
|
type: 'button',
|
|
562
561
|
height: '46px',
|
|
@@ -565,16 +564,16 @@ var packageResult = {
|
|
|
565
564
|
disabled: false,
|
|
566
565
|
cursor: 'pointer',
|
|
567
566
|
contentWidth: false,
|
|
567
|
+
borderRadius: '6px',
|
|
568
|
+
outlineWidth: '2px',
|
|
568
569
|
padding: '12px 20px',
|
|
570
|
+
disabledBorderWidth: '2px',
|
|
569
571
|
transition: 'background-color 240ms, color 240ms',
|
|
570
|
-
box: {
|
|
571
|
-
sizing: boxSizing
|
|
572
|
-
},
|
|
573
572
|
colors: {
|
|
574
573
|
background: 'rgba(0, 35, 106, 1)',
|
|
575
574
|
backgroundHover: '#CB3A3A',
|
|
576
575
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
577
|
-
|
|
576
|
+
disabledBorderColor: 'rgba(60, 57, 62, 1)',
|
|
578
577
|
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
579
578
|
withoutStyling: {
|
|
580
579
|
color: '#000000',
|
|
@@ -591,8 +590,7 @@ var packageResult = {
|
|
|
591
590
|
}
|
|
592
591
|
},
|
|
593
592
|
icon: {
|
|
594
|
-
|
|
595
|
-
marginRight: '10px'
|
|
593
|
+
gap: '10px'
|
|
596
594
|
},
|
|
597
595
|
withoutStyling: false
|
|
598
596
|
},
|
|
@@ -657,6 +655,7 @@ var packageResult = {
|
|
|
657
655
|
marginTop: '10px',
|
|
658
656
|
iconMargin: '10px',
|
|
659
657
|
lineHeight: '19px',
|
|
658
|
+
inContent: false,
|
|
660
659
|
box: {
|
|
661
660
|
shadow: '0 0 0 1px #F20918'
|
|
662
661
|
},
|
|
@@ -860,6 +859,7 @@ var packageResult = {
|
|
|
860
859
|
colors: {
|
|
861
860
|
hover: '#373538',
|
|
862
861
|
background: presetColors.extraLight,
|
|
862
|
+
placeholderDisable: presetColors.dark,
|
|
863
863
|
backgroundDisable: presetColors.secondary
|
|
864
864
|
},
|
|
865
865
|
font: {
|
|
@@ -898,6 +898,7 @@ var packageResult = {
|
|
|
898
898
|
color: 'rgb(238, 0, 0)',
|
|
899
899
|
marginTop: '10px',
|
|
900
900
|
zIndex: 10,
|
|
901
|
+
inContent: false,
|
|
901
902
|
box: {
|
|
902
903
|
shadow: `0 0 0 2px ${presetColors.danger}`
|
|
903
904
|
},
|
|
@@ -928,7 +929,8 @@ var packageResult = {
|
|
|
928
929
|
sizing: boxSizing,
|
|
929
930
|
shadow: `0 0 0 2px ${presetColors.secondary}`,
|
|
930
931
|
// like border
|
|
931
|
-
|
|
932
|
+
width: '2px',
|
|
933
|
+
// like border width
|
|
932
934
|
colors: {
|
|
933
935
|
hover: `0 0 0 2px ${presetColors.dark}`,
|
|
934
936
|
// like border color
|
|
@@ -1081,6 +1083,7 @@ var packageResult = {
|
|
|
1081
1083
|
error: {
|
|
1082
1084
|
color: presetColors.danger,
|
|
1083
1085
|
marginTop: '10px',
|
|
1086
|
+
inContent: false,
|
|
1084
1087
|
font: {
|
|
1085
1088
|
...fontObject
|
|
1086
1089
|
},
|
|
@@ -1116,10 +1119,9 @@ var packageResult = {
|
|
|
1116
1119
|
width: '27.8rem',
|
|
1117
1120
|
height: 'auto'
|
|
1118
1121
|
},
|
|
1119
|
-
or: 'կամ',
|
|
1120
1122
|
upload: 'Բեռնել',
|
|
1121
1123
|
uploadColor: presetColors.success,
|
|
1122
|
-
putFileHere: 'Տեղադրել ֆայլը այստեղ',
|
|
1124
|
+
putFileHere: 'Տեղադրել ֆայլը այստեղ կամ',
|
|
1123
1125
|
sizeText: 'Առավելագույնը',
|
|
1124
1126
|
timeForRemoveError: 4000,
|
|
1125
1127
|
extentionsRowMarginTop: '40px',
|
|
@@ -1143,6 +1145,7 @@ var packageResult = {
|
|
|
1143
1145
|
showLessText: 'Փակել',
|
|
1144
1146
|
showMoreText: 'Ավելին',
|
|
1145
1147
|
showMoreTextColor: '#2C46C1',
|
|
1148
|
+
marginBottom: '6px',
|
|
1146
1149
|
color: '#4A4A4D',
|
|
1147
1150
|
font: {
|
|
1148
1151
|
...fontObject
|
|
@@ -1162,11 +1165,13 @@ var packageResult = {
|
|
|
1162
1165
|
},
|
|
1163
1166
|
error: {
|
|
1164
1167
|
color: presetColors.danger,
|
|
1168
|
+
marginTop: '6px',
|
|
1165
1169
|
font: {
|
|
1166
1170
|
...fontObject
|
|
1167
1171
|
},
|
|
1168
1172
|
format: 'ֆայլի սխալ ֆորմատ',
|
|
1169
1173
|
maxSize: 'Առավելագույն ծավալ',
|
|
1174
|
+
formatValidate: 'Վնասված ֆայլ',
|
|
1170
1175
|
noChoosenFile: 'Ֆայլը ընտրված չէ'
|
|
1171
1176
|
},
|
|
1172
1177
|
progress: {
|
|
@@ -1234,10 +1239,9 @@ var packageResult = {
|
|
|
1234
1239
|
height: '',
|
|
1235
1240
|
maxWidth: '95%',
|
|
1236
1241
|
minWidth: '320px',
|
|
1237
|
-
maxHeight: '
|
|
1242
|
+
maxHeight: '95dvh',
|
|
1238
1243
|
minHeight: '200px',
|
|
1239
|
-
|
|
1240
|
-
noScroll: false,
|
|
1244
|
+
underScroll: false,
|
|
1241
1245
|
padding: '20px 20px 20px',
|
|
1242
1246
|
className: '',
|
|
1243
1247
|
alignItems: 'center',
|
|
@@ -1247,7 +1251,8 @@ var packageResult = {
|
|
|
1247
1251
|
border: {
|
|
1248
1252
|
width: '20px',
|
|
1249
1253
|
style: 'solid',
|
|
1250
|
-
color: transparent
|
|
1254
|
+
color: transparent,
|
|
1255
|
+
radius: '14px'
|
|
1251
1256
|
},
|
|
1252
1257
|
colors: {
|
|
1253
1258
|
background: 'white',
|
|
@@ -1291,8 +1296,8 @@ var packageResult = {
|
|
|
1291
1296
|
// default properties for <SwipeModal /> component
|
|
1292
1297
|
SWIPEMODAL: {
|
|
1293
1298
|
width: '300px',
|
|
1294
|
-
height: '
|
|
1295
|
-
|
|
1299
|
+
height: '100dvh',
|
|
1300
|
+
underScroll: false,
|
|
1296
1301
|
titleStyle: {
|
|
1297
1302
|
color: '#1C212D',
|
|
1298
1303
|
textAlign: 'left',
|
|
@@ -1304,7 +1309,7 @@ var packageResult = {
|
|
|
1304
1309
|
},
|
|
1305
1310
|
parent: {
|
|
1306
1311
|
width: '100%',
|
|
1307
|
-
height: '
|
|
1312
|
+
height: '100dvh',
|
|
1308
1313
|
colors: {
|
|
1309
1314
|
background: 'rgba(60, 61, 70, 0.2)'
|
|
1310
1315
|
}
|
|
@@ -1575,39 +1580,39 @@ var configStylesPromise = getProps();
|
|
|
1575
1580
|
|
|
1576
1581
|
const Button = ({
|
|
1577
1582
|
icon,
|
|
1578
|
-
size,
|
|
1579
|
-
style,
|
|
1580
1583
|
type,
|
|
1581
|
-
font,
|
|
1582
1584
|
color,
|
|
1583
|
-
|
|
1585
|
+
text,
|
|
1584
1586
|
width,
|
|
1585
1587
|
height,
|
|
1586
1588
|
cursor,
|
|
1587
|
-
weight,
|
|
1588
1589
|
border,
|
|
1589
|
-
radius,
|
|
1590
1590
|
outline,
|
|
1591
1591
|
padding,
|
|
1592
1592
|
opacity,
|
|
1593
1593
|
onClick,
|
|
1594
|
+
iconGap,
|
|
1594
1595
|
disabled,
|
|
1596
|
+
fontSize,
|
|
1595
1597
|
className,
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
+
iconHover,
|
|
1599
|
+
fontStyle,
|
|
1598
1600
|
hoverColor,
|
|
1599
1601
|
transition,
|
|
1602
|
+
fontWeight,
|
|
1603
|
+
fontFamily,
|
|
1604
|
+
outlineWidth,
|
|
1605
|
+
borderRadius,
|
|
1600
1606
|
contentWidth,
|
|
1601
|
-
iconRightSide,
|
|
1602
1607
|
disabledColor,
|
|
1603
1608
|
textTransform,
|
|
1604
1609
|
withoutStyling,
|
|
1605
1610
|
backgroundColor,
|
|
1606
|
-
disabledLineColor,
|
|
1607
|
-
btnIconMarginLeft,
|
|
1608
|
-
btnIconMarginRight,
|
|
1609
1611
|
withoutStylingColor,
|
|
1612
|
+
disabledBorderColor,
|
|
1613
|
+
disabledBorderWidth,
|
|
1610
1614
|
backgroundHoverColor,
|
|
1615
|
+
iconPosition = 'left',
|
|
1611
1616
|
disabledBackgroundColor,
|
|
1612
1617
|
withoutStylingHoverColor,
|
|
1613
1618
|
...props
|
|
@@ -1625,8 +1630,8 @@ const Button = ({
|
|
|
1625
1630
|
className && setClassProps(() => classnames__default["default"](className ?? configStyles.BUTTON.className));
|
|
1626
1631
|
}, [className]);
|
|
1627
1632
|
React.useEffect(() => {
|
|
1628
|
-
if (!
|
|
1629
|
-
alert('Add icon or
|
|
1633
|
+
if (!text && !icon) {
|
|
1634
|
+
alert('Add icon or text props on Button component');
|
|
1630
1635
|
}
|
|
1631
1636
|
configStylesPromise.then(data => {
|
|
1632
1637
|
setClassProps(() => classnames__default["default"](className ?? data.BUTTON.className));
|
|
@@ -1644,15 +1649,15 @@ const Button = ({
|
|
|
1644
1649
|
display: 'flex',
|
|
1645
1650
|
outline: 'none',
|
|
1646
1651
|
alignItems: 'center',
|
|
1652
|
+
boxSizing: 'border-box',
|
|
1647
1653
|
justifyContent: 'center',
|
|
1648
1654
|
height: height ?? configStyles.BUTTON.height,
|
|
1649
1655
|
padding: padding ?? configStyles.BUTTON.padding,
|
|
1650
|
-
fontSize:
|
|
1651
|
-
borderRadius:
|
|
1652
|
-
fontStyle:
|
|
1653
|
-
fontFamily:
|
|
1654
|
-
fontWeight:
|
|
1655
|
-
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1656
|
+
fontSize: fontSize ?? configStyles.BUTTON.font.size,
|
|
1657
|
+
borderRadius: borderRadius ?? configStyles.BUTTON.borderRadius,
|
|
1658
|
+
fontStyle: fontStyle ?? configStyles.BUTTON.font.style,
|
|
1659
|
+
fontFamily: fontFamily ?? configStyles.BUTTON.font.family,
|
|
1660
|
+
fontWeight: fontWeight ?? configStyles.BUTTON.font.weight,
|
|
1656
1661
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1657
1662
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1658
1663
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
@@ -1660,7 +1665,7 @@ const Button = ({
|
|
|
1660
1665
|
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1661
1666
|
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1662
1667
|
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,
|
|
1663
|
-
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0
|
|
1668
|
+
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',
|
|
1664
1669
|
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
|
|
1665
1670
|
},
|
|
1666
1671
|
type: type ?? configStyles.BUTTON.type,
|
|
@@ -1669,50 +1674,50 @@ const Button = ({
|
|
|
1669
1674
|
onMouseEnter: handleMouseEnter,
|
|
1670
1675
|
onMouseLeave: handleMouseLeave,
|
|
1671
1676
|
className: classProps
|
|
1672
|
-
}, props),
|
|
1677
|
+
}, props), iconPosition === 'left' ? isHover && iconHover ? iconHover : icon ?? null : ' ', ' ', text && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1673
1678
|
style: {
|
|
1674
|
-
marginLeft: icon &&
|
|
1675
|
-
marginRight: icon &&
|
|
1679
|
+
marginLeft: icon && iconPosition === 'left' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px',
|
|
1680
|
+
marginRight: icon && iconPosition === 'right' ? iconGap ?? configStyles.BUTTON.icon.gap : '0px'
|
|
1676
1681
|
}
|
|
1677
|
-
},
|
|
1682
|
+
}, text), ' ', iconPosition === 'right' ? isHover && iconHover ? iconHover : icon ?? null : ' ', !icon && !text && 'Add icon or text prop on Button component'));
|
|
1678
1683
|
};
|
|
1679
1684
|
Button.propTypes = {
|
|
1680
1685
|
type: PropTypes__default["default"].string,
|
|
1681
|
-
size: PropTypes__default["default"].string,
|
|
1682
|
-
style: PropTypes__default["default"].string,
|
|
1683
|
-
font: PropTypes__default["default"].string,
|
|
1684
1686
|
icon: PropTypes__default["default"].element,
|
|
1685
1687
|
color: PropTypes__default["default"].string,
|
|
1686
1688
|
width: PropTypes__default["default"].string,
|
|
1687
1689
|
outline: PropTypes__default["default"].bool,
|
|
1688
1690
|
onClick: PropTypes__default["default"].func,
|
|
1689
|
-
label: PropTypes__default["default"].string,
|
|
1690
|
-
weight: PropTypes__default["default"].string,
|
|
1691
1691
|
height: PropTypes__default["default"].string,
|
|
1692
1692
|
cursor: PropTypes__default["default"].string,
|
|
1693
1693
|
border: PropTypes__default["default"].string,
|
|
1694
1694
|
disabled: PropTypes__default["default"].bool,
|
|
1695
|
-
radius: PropTypes__default["default"].string,
|
|
1696
1695
|
padding: PropTypes__default["default"].string,
|
|
1697
1696
|
opacity: PropTypes__default["default"].number,
|
|
1698
|
-
boxSizing: PropTypes__default["default"].string,
|
|
1699
1697
|
className: PropTypes__default["default"].string,
|
|
1700
|
-
|
|
1698
|
+
iconHover: PropTypes__default["default"].element,
|
|
1701
1699
|
hoverColor: PropTypes__default["default"].string,
|
|
1702
1700
|
transition: PropTypes__default["default"].string,
|
|
1703
1701
|
contentWidth: PropTypes__default["default"].bool,
|
|
1704
|
-
|
|
1702
|
+
outlineWidth: PropTypes__default["default"].string,
|
|
1705
1703
|
withoutStyling: PropTypes__default["default"].bool,
|
|
1706
1704
|
textTransform: PropTypes__default["default"].string,
|
|
1707
1705
|
disabledColor: PropTypes__default["default"].string,
|
|
1708
1706
|
backgroundColor: PropTypes__default["default"].string,
|
|
1709
|
-
|
|
1710
|
-
btnIconMarginLeft: PropTypes__default["default"].string,
|
|
1711
|
-
btnIconMarginRight: PropTypes__default["default"].string,
|
|
1707
|
+
disabledBorderWidth: PropTypes__default["default"].string,
|
|
1712
1708
|
withoutStylingColor: PropTypes__default["default"].string,
|
|
1713
1709
|
backgroundHoverColor: PropTypes__default["default"].string,
|
|
1714
1710
|
disabledBackgroundColor: PropTypes__default["default"].string,
|
|
1715
|
-
withoutStylingHoverColor: PropTypes__default["default"].string
|
|
1711
|
+
withoutStylingHoverColor: PropTypes__default["default"].string,
|
|
1712
|
+
text: PropTypes__default["default"].string,
|
|
1713
|
+
fontFamily: PropTypes__default["default"].string,
|
|
1714
|
+
fontSize: PropTypes__default["default"].string,
|
|
1715
|
+
fontStyle: PropTypes__default["default"].string,
|
|
1716
|
+
fontWeight: PropTypes__default["default"].string,
|
|
1717
|
+
iconGap: PropTypes__default["default"].string,
|
|
1718
|
+
borderRadius: PropTypes__default["default"].string,
|
|
1719
|
+
disabledBorderColor: PropTypes__default["default"].string,
|
|
1720
|
+
iconPosition: PropTypes__default["default"].oneOf(['left', 'right'])
|
|
1716
1721
|
};
|
|
1717
1722
|
|
|
1718
1723
|
const SvgSvg = ({
|
|
@@ -1877,16 +1882,15 @@ styleInject(css_248z$d);
|
|
|
1877
1882
|
|
|
1878
1883
|
// eslint-disable-next-line react/display-name
|
|
1879
1884
|
const File = /*#__PURE__*/React.forwardRef(({
|
|
1880
|
-
or,
|
|
1881
|
-
size,
|
|
1882
1885
|
name,
|
|
1883
1886
|
color,
|
|
1884
|
-
style,
|
|
1885
|
-
weight,
|
|
1886
|
-
family,
|
|
1887
1887
|
height,
|
|
1888
|
-
radius,
|
|
1889
1888
|
change,
|
|
1889
|
+
fontSize,
|
|
1890
|
+
fontStyle,
|
|
1891
|
+
fontFamily,
|
|
1892
|
+
fontWeight,
|
|
1893
|
+
borderRadius,
|
|
1890
1894
|
borderWidth,
|
|
1891
1895
|
borderStyle,
|
|
1892
1896
|
borderColor,
|
|
@@ -1896,20 +1900,22 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1896
1900
|
multiple,
|
|
1897
1901
|
required,
|
|
1898
1902
|
className,
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
+
errorFontSize,
|
|
1904
|
+
errorFontStyle,
|
|
1905
|
+
errorFontWeight,
|
|
1906
|
+
errorFontFamily,
|
|
1907
|
+
errorMarginTop,
|
|
1903
1908
|
label,
|
|
1904
|
-
labelSize,
|
|
1905
1909
|
labelColor,
|
|
1906
|
-
labelStyle,
|
|
1907
|
-
labelWeight,
|
|
1908
|
-
labelFamily,
|
|
1909
1910
|
lableShowMore,
|
|
1911
|
+
labelFontSize,
|
|
1912
|
+
labelFontStyle,
|
|
1913
|
+
labelFontWeight,
|
|
1914
|
+
labelFontFamily,
|
|
1910
1915
|
labelShowLessText,
|
|
1911
1916
|
labelShowMoreText,
|
|
1912
1917
|
showMoreTextColor,
|
|
1918
|
+
labelMarginBottom,
|
|
1913
1919
|
useLabelTooltip,
|
|
1914
1920
|
labelTooltipColor,
|
|
1915
1921
|
labelTooltipPadding,
|
|
@@ -1927,6 +1933,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1927
1933
|
uploadColor,
|
|
1928
1934
|
defaultData,
|
|
1929
1935
|
formatError,
|
|
1936
|
+
formatValidateError,
|
|
1930
1937
|
errorIcon,
|
|
1931
1938
|
errorIconShow,
|
|
1932
1939
|
errorMessage,
|
|
@@ -2010,20 +2017,211 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2010
2017
|
const [tooltipElem, setTooltipElem] = React.useState(null);
|
|
2011
2018
|
const [choosenFileCount, setChoosenFileCount] = React.useState(0);
|
|
2012
2019
|
const [image, setImage] = React.useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url.startsWith('data:image/heif') || defaultData.url.startsWith('data:image/heic') || defaultData.url.startsWith('data:application/octet-stream') ? 'heic' : defaultData.url : 'pdf' : null : null);
|
|
2013
|
-
const
|
|
2020
|
+
const handleCheckFileFormat = async (file, type) => {
|
|
2014
2021
|
const buffer = await file.arrayBuffer();
|
|
2015
2022
|
const dataView = new DataView(buffer);
|
|
2016
|
-
if (
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2023
|
+
if (type === 'png') {
|
|
2024
|
+
if (dataView.byteLength < 8) {
|
|
2025
|
+
return Promise.reject();
|
|
2026
|
+
} else {
|
|
2027
|
+
if (dataView.getUint8(0) === 0x89 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x4E && dataView.getUint8(3) === 0x47 && dataView.getUint8(4) === 0x0D && dataView.getUint8(5) === 0x0A && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0x0A) {
|
|
2028
|
+
const end = dataView.byteLength - 12;
|
|
2029
|
+
if (dataView.getUint8(end) === 0x00 && dataView.getUint8(end + 1) === 0x00 && dataView.getUint8(end + 2) === 0x00 && dataView.getUint8(end + 3) === 0x00 && dataView.getUint8(end + 4) === 0x49 && dataView.getUint8(end + 5) === 0x45 && dataView.getUint8(end + 6) === 0x4E && dataView.getUint8(end + 7) === 0x44 && dataView.getUint8(end + 8) === 0xAE && dataView.getUint8(end + 9) === 0x42 && dataView.getUint8(end + 10) === 0x60 && dataView.getUint8(end + 11) === 0x82) {
|
|
2030
|
+
return Promise.resolve();
|
|
2031
|
+
} else {
|
|
2032
|
+
return Promise.reject();
|
|
2033
|
+
}
|
|
2034
|
+
} else {
|
|
2035
|
+
return Promise.reject();
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
} else if (type === 'jpg') {
|
|
2039
|
+
if (dataView.byteLength < 2) {
|
|
2040
|
+
return Promise.reject();
|
|
2041
|
+
} else {
|
|
2042
|
+
if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8 && dataView.getUint8(dataView.byteLength - 2) === 0xFF && dataView.getUint8(dataView.byteLength - 1) === 0xD9) {
|
|
2022
2043
|
return Promise.resolve();
|
|
2044
|
+
} else {
|
|
2045
|
+
return Promise.reject();
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
} else if (type === 'svg') {
|
|
2049
|
+
if (dataView.byteLength < 8) return Promise.reject();
|
|
2050
|
+
const len = dataView.byteLength;
|
|
2051
|
+
let start = 0;
|
|
2052
|
+
let end = len - 1;
|
|
2053
|
+
const isWS = b => b === 0x20 || b === 0x09 || b === 0x0A || b === 0x0D;
|
|
2054
|
+
while (start < len && isWS(dataView.getUint8(start))) start++;
|
|
2055
|
+
const scanLimit = Math.min(len, start + 4096);
|
|
2056
|
+
let foundSvgOpen = false;
|
|
2057
|
+
for (let i = start; i <= scanLimit - 4; i++) {
|
|
2058
|
+
if (dataView.getUint8(i) === 0x3C && (dataView.getUint8(i + 1) === 0x73 || dataView.getUint8(i + 1) === 0x53) && (dataView.getUint8(i + 2) === 0x76 || dataView.getUint8(i + 2) === 0x56) && (dataView.getUint8(i + 3) === 0x67 || dataView.getUint8(i + 3) === 0x47)) {
|
|
2059
|
+
foundSvgOpen = true;
|
|
2060
|
+
break;
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
if (!foundSvgOpen) return Promise.reject();
|
|
2064
|
+
while (end >= 0 && isWS(dataView.getUint8(end))) end--;
|
|
2065
|
+
if (end >= 5 && dataView.getUint8(end - 5) === 0x3C && dataView.getUint8(end - 4) === 0x2F && (dataView.getUint8(end - 3) === 0x73 || dataView.getUint8(end - 3) === 0x53) && (dataView.getUint8(end - 2) === 0x76 || dataView.getUint8(end - 2) === 0x56) && (dataView.getUint8(end - 1) === 0x67 || dataView.getUint8(end - 1) === 0x47) && dataView.getUint8(end) === 0x3E) {
|
|
2066
|
+
return Promise.resolve();
|
|
2067
|
+
} else {
|
|
2068
|
+
return Promise.reject();
|
|
2069
|
+
}
|
|
2070
|
+
} else if (type === 'docx') {
|
|
2071
|
+
const len = dataView.byteLength;
|
|
2072
|
+
if (len < 22) return Promise.reject();
|
|
2073
|
+
const isZipHeader = dataView.getUint8(0) === 0x50 && dataView.getUint8(1) === 0x4B && dataView.getUint8(2) === 0x03 && dataView.getUint8(3) === 0x04;
|
|
2074
|
+
if (!isZipHeader) return Promise.reject();
|
|
2075
|
+
const EOCD = [0x50, 0x4B, 0x05, 0x06];
|
|
2076
|
+
const maxBack = Math.min(len - 4, 0xFFFF + 22);
|
|
2077
|
+
let eocdIndex = -1;
|
|
2078
|
+
for (let i = len - 4; i >= len - 4 - maxBack; i--) {
|
|
2079
|
+
if (i < 0) break;
|
|
2080
|
+
if (dataView.getUint8(i) === EOCD[0] && dataView.getUint8(i + 1) === EOCD[1] && dataView.getUint8(i + 2) === EOCD[2] && dataView.getUint8(i + 3) === EOCD[3]) {
|
|
2081
|
+
eocdIndex = i;
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
if (eocdIndex === -1) return Promise.reject();
|
|
2086
|
+
const findAscii = needle => {
|
|
2087
|
+
const enc = new TextEncoder().encode(needle);
|
|
2088
|
+
for (let i = 0; i <= len - enc.length; i++) {
|
|
2089
|
+
let ok = true;
|
|
2090
|
+
for (let j = 0; j < enc.length; j++) {
|
|
2091
|
+
if (dataView.getUint8(i + j) !== enc[j]) {
|
|
2092
|
+
ok = false;
|
|
2093
|
+
break;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
if (ok) return true;
|
|
2097
|
+
}
|
|
2098
|
+
return false;
|
|
2099
|
+
};
|
|
2100
|
+
const hasContentTypes = findAscii('[Content_Types].xml');
|
|
2101
|
+
const hasRels = findAscii('_rels/.rels');
|
|
2102
|
+
const hasDocument = findAscii('word/document.xml');
|
|
2103
|
+
return hasContentTypes && hasRels && hasDocument ? Promise.resolve() : Promise.reject();
|
|
2104
|
+
} else if (type === 'doc') {
|
|
2105
|
+
const len = dataView.byteLength;
|
|
2106
|
+
if (len < 512) return Promise.reject();
|
|
2107
|
+
const FREESECT = 0xFFFFFFFF;
|
|
2108
|
+
const ENDOFCHAIN = 0xFFFFFFFE;
|
|
2109
|
+
const getU32 = off => dataView.getUint32(off, true);
|
|
2110
|
+
const getI32 = off => dataView.getInt32(off, true);
|
|
2111
|
+
const getU16 = off => dataView.getUint16(off, true);
|
|
2112
|
+
const sectorOffset = (sector, sectorSize) => (sector + 1) * sectorSize;
|
|
2113
|
+
const isOle = dataView.getUint8(0) === 0xD0 && dataView.getUint8(1) === 0xCF && dataView.getUint8(2) === 0x11 && dataView.getUint8(3) === 0xE0 && dataView.getUint8(4) === 0xA1 && dataView.getUint8(5) === 0xB1 && dataView.getUint8(6) === 0x1A && dataView.getUint8(7) === 0xE1;
|
|
2114
|
+
if (!isOle) return Promise.reject();
|
|
2115
|
+
if (dataView.getUint8(0x1C) !== 0xFE || dataView.getUint8(0x1D) !== 0xFF) {
|
|
2116
|
+
return Promise.reject();
|
|
2117
|
+
}
|
|
2118
|
+
const sectorShift = getU16(0x1E); // 9 => 512, 12 => 4096
|
|
2119
|
+
if (sectorShift !== 9 && sectorShift !== 12) return Promise.reject();
|
|
2120
|
+
const sectorSize = 1 << sectorShift;
|
|
2121
|
+
const firstDirSector = getI32(0x30);
|
|
2122
|
+
if (firstDirSector < 0) return Promise.reject();
|
|
2123
|
+
const dirStartOff = sectorOffset(firstDirSector, sectorSize);
|
|
2124
|
+
if (dirStartOff < 512 || dirStartOff + sectorSize > len) return Promise.reject();
|
|
2125
|
+
const numFATSectors = getU32(0x2C);
|
|
2126
|
+
let firstDIFATSector = getI32(0x44);
|
|
2127
|
+
let numDIFATSectors = getU32(0x48);
|
|
2128
|
+
const difat = [];
|
|
2129
|
+
for (let i = 0; i < 109; i++) {
|
|
2130
|
+
const sec = getU32(0x4C + i * 4);
|
|
2131
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2132
|
+
}
|
|
2133
|
+
const entriesPerDifatSector = sectorSize / 4 - 1;
|
|
2134
|
+
while (numDIFATSectors > 0 && firstDIFATSector !== -1 && firstDIFATSector !== ENDOFCHAIN) {
|
|
2135
|
+
const off = sectorOffset(firstDIFATSector, sectorSize);
|
|
2136
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2137
|
+
for (let i = 0; i < entriesPerDifatSector; i++) {
|
|
2138
|
+
const sec = dataView.getUint32(off + i * 4, true);
|
|
2139
|
+
if (sec !== FREESECT) difat.push(sec);
|
|
2140
|
+
}
|
|
2141
|
+
firstDIFATSector = dataView.getInt32(off + entriesPerDifatSector * 4, true); // next DIFAT
|
|
2142
|
+
numDIFATSectors--;
|
|
2143
|
+
}
|
|
2144
|
+
if (difat.length === 0 || numFATSectors === 0) return Promise.reject();
|
|
2145
|
+
const fat = [];
|
|
2146
|
+
for (let i = 0; i < difat.length; i++) {
|
|
2147
|
+
const fatSector = difat[i];
|
|
2148
|
+
const off = sectorOffset(fatSector, sectorSize);
|
|
2149
|
+
if (off < 512 || off + sectorSize > len) continue;
|
|
2150
|
+
for (let j = 0; j < sectorSize; j += 4) {
|
|
2151
|
+
fat.push(dataView.getUint32(off + j, true));
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
if (fat.length === 0) return Promise.reject();
|
|
2155
|
+
const nextSector = s => s >= 0 && s < fat.length ? fat[s] : ENDOFCHAIN;
|
|
2156
|
+
const names = new Set();
|
|
2157
|
+
const td = new TextDecoder("utf-16le");
|
|
2158
|
+
let dirSector = firstDirSector;
|
|
2159
|
+
let safety = 0;
|
|
2160
|
+
while (dirSector !== ENDOFCHAIN && dirSector !== FREESECT && safety++ < 10000) {
|
|
2161
|
+
const off = sectorOffset(dirSector, sectorSize);
|
|
2162
|
+
if (off < 512 || off + sectorSize > len) break;
|
|
2163
|
+
for (let pos = 0; pos < sectorSize; pos += 128) {
|
|
2164
|
+
const entryOff = off + pos;
|
|
2165
|
+
const nameLen = getU16(entryOff + 64);
|
|
2166
|
+
const objType = dataView.getUint8(entryOff + 66);
|
|
2167
|
+
if (objType === 0 || nameLen < 2 || nameLen > 64) continue;
|
|
2168
|
+
const nameBytes = new Uint8Array(dataView.buffer, dataView.byteOffset + entryOff, 64);
|
|
2169
|
+
const realLen = Math.max(0, nameLen - 2);
|
|
2170
|
+
const name = td.decode(nameBytes.slice(0, realLen)).replace(/\0/g, "");
|
|
2171
|
+
if (name) names.add(name);
|
|
2172
|
+
}
|
|
2173
|
+
dirSector = nextSector(dirSector);
|
|
2174
|
+
}
|
|
2175
|
+
const hasWordDocument = names.has("WordDocument");
|
|
2176
|
+
const hasTable = names.has("1Table") || names.has("0Table");
|
|
2177
|
+
return hasWordDocument && hasTable ? Promise.resolve() : Promise.reject();
|
|
2178
|
+
} else if (type === 'pdf') {
|
|
2179
|
+
if (dataView.byteLength < 8) {
|
|
2180
|
+
return Promise.reject();
|
|
2181
|
+
} else {
|
|
2182
|
+
if (dataView.getUint8(0) === 0x25 && dataView.getUint8(1) === 0x50 && dataView.getUint8(2) === 0x44 && dataView.getUint8(3) === 0x46) {
|
|
2183
|
+
const len = dataView.byteLength;
|
|
2184
|
+
let end = len - 1;
|
|
2185
|
+
while (end >= 0 && (dataView.getUint8(end) === 0x0A ||
|
|
2186
|
+
// \n
|
|
2187
|
+
dataView.getUint8(end) === 0x0D ||
|
|
2188
|
+
// \r
|
|
2189
|
+
dataView.getUint8(end) === 0x20 ||
|
|
2190
|
+
// space
|
|
2191
|
+
dataView.getUint8(end) === 0x09 // tab
|
|
2192
|
+
)) {
|
|
2193
|
+
end--;
|
|
2194
|
+
}
|
|
2195
|
+
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) {
|
|
2196
|
+
return Promise.resolve();
|
|
2197
|
+
} else {
|
|
2198
|
+
return Promise.reject();
|
|
2199
|
+
}
|
|
2200
|
+
} else {
|
|
2201
|
+
return Promise.reject();
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
} else if (type === 'heic') {
|
|
2205
|
+
if (dataView.byteLength < 12) {
|
|
2206
|
+
return Promise.reject();
|
|
2207
|
+
} else {
|
|
2208
|
+
if (dataView.getUint8(0) === 0x66 && dataView.getUint8(1) === 0x74 && dataView.getUint8(2) === 0x79 && dataView.getUint8(3) === 0x70) {
|
|
2209
|
+
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) {
|
|
2210
|
+
const majorBrand = String.fromCharCode(dataView.getUint8(4), dataView.getUint8(5), dataView.getUint8(6), dataView.getUint8(7));
|
|
2211
|
+
const heicIdentifiers = ['heic', 'heix', 'mif1', 'msf1', 'heif'];
|
|
2212
|
+
if (heicIdentifiers.includes(majorBrand)) {
|
|
2213
|
+
return Promise.resolve();
|
|
2214
|
+
} else {
|
|
2215
|
+
return Promise.reject();
|
|
2216
|
+
}
|
|
2217
|
+
} else {
|
|
2218
|
+
return Promise.reject();
|
|
2219
|
+
}
|
|
2023
2220
|
}
|
|
2024
2221
|
}
|
|
2222
|
+
} else {
|
|
2223
|
+
return Promise.reject();
|
|
2025
2224
|
}
|
|
2026
|
-
return Promise.reject();
|
|
2027
2225
|
};
|
|
2028
2226
|
const handleRemoveComponent = () => {
|
|
2029
2227
|
if (!multiple) {
|
|
@@ -2037,6 +2235,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2037
2235
|
setImage(null);
|
|
2038
2236
|
setSingleFile(null);
|
|
2039
2237
|
removeFile && removeFile(singleFile);
|
|
2238
|
+
error && setError('');
|
|
2040
2239
|
};
|
|
2041
2240
|
const handleUploadFiles = file => {
|
|
2042
2241
|
if (maxCHoosenLength && choosenFileCount > 0) {
|
|
@@ -2053,43 +2252,24 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2053
2252
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2054
2253
|
if (file[ix]) {
|
|
2055
2254
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2056
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2255
|
+
if (fileExtensions.includes(file[ix].name.split('.')[file[ix].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].type.split('/')[1] === 'heif' || file[ix].type.split('/')[1] === 'heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[ix].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[ix].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[ix].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[ix].type.split('/')[1] === 'jpeg')) {
|
|
2256
|
+
let typeOfFile = '';
|
|
2057
2257
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2058
|
-
|
|
2059
|
-
id: '',
|
|
2060
|
-
check: '',
|
|
2061
|
-
status: '',
|
|
2062
|
-
file: file[ix],
|
|
2063
|
-
uuid: v4()
|
|
2064
|
-
});
|
|
2065
|
-
setImage('docx');
|
|
2258
|
+
typeOfFile = 'docx';
|
|
2066
2259
|
} else if (file[ix].type === 'application/msword') {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2077
|
-
change({
|
|
2078
|
-
id: '',
|
|
2079
|
-
check: '',
|
|
2080
|
-
status: '',
|
|
2081
|
-
file: file[ix],
|
|
2082
|
-
uuid: v4()
|
|
2083
|
-
});
|
|
2084
|
-
setImage('heic');
|
|
2085
|
-
}).catch(() => {
|
|
2086
|
-
change({
|
|
2087
|
-
file: file[ix],
|
|
2088
|
-
uuid: v4(),
|
|
2089
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2090
|
-
});
|
|
2091
|
-
});
|
|
2260
|
+
typeOfFile = 'doc';
|
|
2261
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2262
|
+
typeOfFile = 'pdf';
|
|
2263
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2264
|
+
typeOfFile = 'heic';
|
|
2265
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2266
|
+
typeOfFile = 'jpg';
|
|
2267
|
+
} else if (file[ix].type === 'image/png') {
|
|
2268
|
+
typeOfFile = 'png';
|
|
2092
2269
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2270
|
+
typeOfFile = 'svg';
|
|
2271
|
+
}
|
|
2272
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2093
2273
|
change({
|
|
2094
2274
|
id: '',
|
|
2095
2275
|
check: '',
|
|
@@ -2097,16 +2277,14 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2097
2277
|
file: file[ix],
|
|
2098
2278
|
uuid: v4()
|
|
2099
2279
|
});
|
|
2100
|
-
setImage(
|
|
2101
|
-
}
|
|
2280
|
+
setImage(typeOfFile);
|
|
2281
|
+
}).catch(() => {
|
|
2102
2282
|
change({
|
|
2103
|
-
id: '',
|
|
2104
|
-
check: '',
|
|
2105
|
-
status: '',
|
|
2106
2283
|
file: file[ix],
|
|
2107
|
-
uuid: v4()
|
|
2284
|
+
uuid: v4(),
|
|
2285
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2108
2286
|
});
|
|
2109
|
-
}
|
|
2287
|
+
});
|
|
2110
2288
|
} else {
|
|
2111
2289
|
change({
|
|
2112
2290
|
file: file[ix],
|
|
@@ -2128,43 +2306,24 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2128
2306
|
for (let ix = 0; ix < file.length; ix++) {
|
|
2129
2307
|
if (file[ix]) {
|
|
2130
2308
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
2131
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') ||
|
|
2309
|
+
if (fileExtensions.includes(file[ix].name.split('.')[file[ix].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].type.split('/')[1] === 'heif' || file[ix].type.split('/')[1] === 'heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[ix].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[ix].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[ix].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[ix].type.split('/')[1] === 'jpeg')) {
|
|
2310
|
+
let typeOfFile = '';
|
|
2132
2311
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2133
|
-
|
|
2134
|
-
id: '',
|
|
2135
|
-
check: '',
|
|
2136
|
-
status: '',
|
|
2137
|
-
file: file[ix],
|
|
2138
|
-
uuid: v4()
|
|
2139
|
-
});
|
|
2140
|
-
setImage('docx');
|
|
2312
|
+
typeOfFile = 'docx';
|
|
2141
2313
|
} else if (file[ix].type === 'application/msword') {
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
handleCheckHeicFormat(file[ix]).then(() => {
|
|
2152
|
-
change({
|
|
2153
|
-
id: '',
|
|
2154
|
-
check: '',
|
|
2155
|
-
status: '',
|
|
2156
|
-
file: file[ix],
|
|
2157
|
-
uuid: v4()
|
|
2158
|
-
});
|
|
2159
|
-
setImage('heic');
|
|
2160
|
-
}).catch(() => {
|
|
2161
|
-
change({
|
|
2162
|
-
file: file[ix],
|
|
2163
|
-
uuid: v4(),
|
|
2164
|
-
check: formatError ?? configStyles.FILE.error.format
|
|
2165
|
-
});
|
|
2166
|
-
});
|
|
2314
|
+
typeOfFile = 'doc';
|
|
2315
|
+
} else if (file[ix].type === 'application/pdf') {
|
|
2316
|
+
typeOfFile = 'pdf';
|
|
2317
|
+
} else if (file[ix].type === 'image/heif' || file[ix].type === 'image/heic' || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
2318
|
+
typeOfFile = 'heic';
|
|
2319
|
+
} else if (file[ix].type === 'image/jpeg') {
|
|
2320
|
+
typeOfFile = 'jpg';
|
|
2321
|
+
} else if (file[ix].type === 'image/png') {
|
|
2322
|
+
typeOfFile = 'png';
|
|
2167
2323
|
} else if (file[ix].type === 'image/svg+xml') {
|
|
2324
|
+
typeOfFile = 'svg';
|
|
2325
|
+
}
|
|
2326
|
+
handleCheckFileFormat(file[ix], typeOfFile).then(() => {
|
|
2168
2327
|
change({
|
|
2169
2328
|
id: '',
|
|
2170
2329
|
check: '',
|
|
@@ -2172,16 +2331,14 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2172
2331
|
file: file[ix],
|
|
2173
2332
|
uuid: v4()
|
|
2174
2333
|
});
|
|
2175
|
-
setImage(
|
|
2176
|
-
}
|
|
2334
|
+
setImage(typeOfFile);
|
|
2335
|
+
}).catch(() => {
|
|
2177
2336
|
change({
|
|
2178
|
-
id: '',
|
|
2179
|
-
check: '',
|
|
2180
|
-
status: '',
|
|
2181
2337
|
file: file[ix],
|
|
2182
|
-
uuid: v4()
|
|
2338
|
+
uuid: v4(),
|
|
2339
|
+
check: formatValidateError ?? configStyles.FILE.error.formatValidate
|
|
2183
2340
|
});
|
|
2184
|
-
}
|
|
2341
|
+
});
|
|
2185
2342
|
} else {
|
|
2186
2343
|
change({
|
|
2187
2344
|
file: file[ix],
|
|
@@ -2212,34 +2369,36 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2212
2369
|
} else {
|
|
2213
2370
|
if (file[0]) {
|
|
2214
2371
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2215
|
-
if (fileExtensions.includes(file[0].
|
|
2372
|
+
if (fileExtensions.includes(file[0].name.split('.')[file[0].name.split('.').length - 1]) && ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type.split('/')[1] === 'heif' || file[0].type.split('/')[1] === 'heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || fileExtensions.includes('doc') && file[0].type.split('/')[1] === 'msword' || fileExtensions.includes('docx') && file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || fileExtensions.includes('svg') && file[0].type.split('/')[1] === 'svg+xml' || fileExtensions.includes('png') && file[0].type.split('/')[1] === 'png' || fileExtensions.includes('pdf') && file[0].type.split('/')[1] === 'pdf' || (fileExtensions.includes('jpg') || fileExtensions.includes('jpeg')) && file[0].type.split('/')[1] === 'jpeg')) {
|
|
2216
2373
|
setError('');
|
|
2374
|
+
let typeOfFile = '';
|
|
2217
2375
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2218
|
-
|
|
2219
|
-
change(file);
|
|
2220
|
-
setSingleFile(file);
|
|
2376
|
+
typeOfFile = 'docx';
|
|
2221
2377
|
} else if (file[0].type === 'application/msword') {
|
|
2222
|
-
|
|
2223
|
-
change(file);
|
|
2224
|
-
setSingleFile(file);
|
|
2378
|
+
typeOfFile = 'doc';
|
|
2225
2379
|
} else if (file[0].type === 'application/pdf') {
|
|
2226
|
-
|
|
2227
|
-
change(file);
|
|
2228
|
-
setSingleFile(file);
|
|
2380
|
+
typeOfFile = 'pdf';
|
|
2229
2381
|
} else if (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) {
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2382
|
+
typeOfFile = 'heic';
|
|
2383
|
+
} else if (file[0].type === 'image/jpeg') {
|
|
2384
|
+
typeOfFile = 'jpg';
|
|
2385
|
+
} else if (file[0].type === 'image/png') {
|
|
2386
|
+
typeOfFile = 'png';
|
|
2387
|
+
} else if (file[0].type === 'image/svg+xml') {
|
|
2388
|
+
typeOfFile = 'svg';
|
|
2389
|
+
}
|
|
2390
|
+
handleCheckFileFormat(file[0], typeOfFile).then(() => {
|
|
2391
|
+
if (typeOfFile === 'svg' || typeOfFile === 'png' || typeOfFile === 'jpg') {
|
|
2392
|
+
setImage(URL.createObjectURL(file[0]));
|
|
2393
|
+
} else {
|
|
2394
|
+
setImage(typeOfFile);
|
|
2395
|
+
}
|
|
2239
2396
|
change(file);
|
|
2240
2397
|
setSingleFile(file);
|
|
2241
|
-
|
|
2242
|
-
|
|
2398
|
+
}).catch(() => {
|
|
2399
|
+
setImage(null);
|
|
2400
|
+
setError(formatValidateError ?? configStyles.FILE.error.formatValidate);
|
|
2401
|
+
});
|
|
2243
2402
|
} else {
|
|
2244
2403
|
setImage(null);
|
|
2245
2404
|
setError(formatError ?? configStyles.FILE.error.format);
|
|
@@ -2478,9 +2637,9 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2478
2637
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2479
2638
|
style: {
|
|
2480
2639
|
display: 'flex',
|
|
2481
|
-
marginBottom: '6px',
|
|
2482
2640
|
alignItems: 'center',
|
|
2483
2641
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
2642
|
+
marginBottom: labelMarginBottom ?? configStyles.FILE.label.marginBottom,
|
|
2484
2643
|
width: deleteComponent && useLabelTooltip && handleCheckTextWidth() === 'more' ? 'calc(100% - 26px)' : '100%'
|
|
2485
2644
|
}
|
|
2486
2645
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2496,10 +2655,10 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2496
2655
|
style: {
|
|
2497
2656
|
width: '100%',
|
|
2498
2657
|
color: labelColor ?? configStyles.FILE.label.color,
|
|
2499
|
-
fontSize:
|
|
2500
|
-
fontStyle:
|
|
2501
|
-
fontWeight:
|
|
2502
|
-
fontFamily:
|
|
2658
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2659
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2660
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2661
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2503
2662
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
2504
2663
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
2505
2664
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.FILE.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.FILE.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -2510,20 +2669,20 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2510
2669
|
}, label, handleCheckTextWidth('label') === 'more' && showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2511
2670
|
className: styles$c['show-more-text'],
|
|
2512
2671
|
style: {
|
|
2513
|
-
fontSize:
|
|
2514
|
-
fontStyle:
|
|
2515
|
-
fontWeight:
|
|
2516
|
-
fontFamily:
|
|
2672
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2673
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2674
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2675
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2517
2676
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2518
2677
|
},
|
|
2519
2678
|
onClick: handleChangeShowMore
|
|
2520
2679
|
}, ' ', " ", labelShowLessText ?? configStyles.FILE.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth('label') === 'more' && !showMore && (lableShowMore || configStyles.FILE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2521
2680
|
className: styles$c['show-more-text'],
|
|
2522
2681
|
style: {
|
|
2523
|
-
fontSize:
|
|
2524
|
-
fontStyle:
|
|
2525
|
-
fontWeight:
|
|
2526
|
-
fontFamily:
|
|
2682
|
+
fontSize: labelFontSize ?? configStyles.FILE.label.font.size,
|
|
2683
|
+
fontStyle: labelFontStyle ?? configStyles.FILE.label.font.style,
|
|
2684
|
+
fontWeight: labelFontWeight ?? configStyles.FILE.label.font.weight,
|
|
2685
|
+
fontFamily: labelFontFamily ?? configStyles.FILE.label.font.family,
|
|
2527
2686
|
color: showMoreTextColor ?? configStyles.FILE.label.showMoreTextColor
|
|
2528
2687
|
},
|
|
2529
2688
|
onClick: handleChangeShowMore
|
|
@@ -2544,9 +2703,9 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2544
2703
|
height: height ?? configStyles.FILE.height,
|
|
2545
2704
|
borderWidth: borderWidth ?? configStyles.FILE.border.width,
|
|
2546
2705
|
borderStyle: borderStyle ?? configStyles.FILE.border.style,
|
|
2547
|
-
borderRadius:
|
|
2706
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2548
2707
|
backgroundColor: backgroundColor ?? configStyles.FILE.colors.background,
|
|
2549
|
-
borderColor: error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2708
|
+
borderColor: !multiple && error ? errorColor ? errorColor : configStyles.FILE.error.color : disabled ? borderColor ? borderColor : configStyles.FILE.border.color : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.border.colors.hover : borderColor ? borderColor : configStyles.FILE.border.color
|
|
2550
2709
|
},
|
|
2551
2710
|
onDrop: handleDrop,
|
|
2552
2711
|
onClick: handleClick,
|
|
@@ -2571,10 +2730,10 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2571
2730
|
flexDirection: 'column',
|
|
2572
2731
|
justifyContent: 'center',
|
|
2573
2732
|
color: color ?? configStyles.FILE.color,
|
|
2574
|
-
fontSize:
|
|
2575
|
-
fontStyle:
|
|
2576
|
-
fontFamily:
|
|
2577
|
-
fontWeight:
|
|
2733
|
+
fontSize: fontSize ?? configStyles.FILE.font.size,
|
|
2734
|
+
fontStyle: fontStyle ?? configStyles.FILE.font.style,
|
|
2735
|
+
fontFamily: fontFamily ?? configStyles.FILE.font.family,
|
|
2736
|
+
fontWeight: fontWeight ?? configStyles.FILE.font.weight
|
|
2578
2737
|
}
|
|
2579
2738
|
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2580
2739
|
src: image,
|
|
@@ -2591,7 +2750,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2591
2750
|
style: {
|
|
2592
2751
|
margin: '0px'
|
|
2593
2752
|
}
|
|
2594
|
-
}, putFileHere ?? configStyles.FILE.putFileHere,
|
|
2753
|
+
}, putFileHere ?? configStyles.FILE.putFileHere, ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2595
2754
|
style: {
|
|
2596
2755
|
color: uploadColor ?? configStyles.FILE.uploadColor
|
|
2597
2756
|
}
|
|
@@ -2626,11 +2785,11 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2626
2785
|
}, showPreviewIconInSmallComponent ? !image ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2627
2786
|
contentWidth: true,
|
|
2628
2787
|
onClick: _ => _,
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2788
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2789
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2790
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2791
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2792
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2634
2793
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2635
2794
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2636
2795
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2639,11 +2798,11 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2639
2798
|
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2640
2799
|
contentWidth: true,
|
|
2641
2800
|
onClick: _ => _,
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2801
|
+
fontFamily: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
2802
|
+
fontSize: uploadBtnSize ?? configStyles.FILE.uploadBtn.font.size,
|
|
2803
|
+
fontStyle: uploadBtnStyle ?? configStyles.FILE.uploadBtn.font.style,
|
|
2804
|
+
fontWeight: uploadBtnWeight ?? configStyles.FILE.uploadBtn.font.weight,
|
|
2805
|
+
text: uploadBtnLabel ?? configStyles.FILE.uploadBtn.label,
|
|
2647
2806
|
color: uploadBtnColor ?? configStyles.FILE.uploadBtn.color,
|
|
2648
2807
|
height: uploadBtnHeight ?? configStyles.FILE.uploadBtn.height,
|
|
2649
2808
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
@@ -2688,8 +2847,8 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2688
2847
|
boxSizing: 'border-box',
|
|
2689
2848
|
alignItems: 'flex-start',
|
|
2690
2849
|
justifyContent: 'flex-end',
|
|
2691
|
-
borderRadius:
|
|
2692
|
-
display: !multiple && !disabled && image &&
|
|
2850
|
+
borderRadius: borderRadius ?? configStyles.FILE.radius,
|
|
2851
|
+
display: !multiple && !disabled && image && isHover ? 'flex' : 'none',
|
|
2693
2852
|
backgroundColor: hiddenBackgroundColor ?? configStyles.FILE.colors.backgroundHidden
|
|
2694
2853
|
},
|
|
2695
2854
|
onClick: handleStopPropagation
|
|
@@ -2698,16 +2857,16 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2698
2857
|
cursor: 'pointer'
|
|
2699
2858
|
},
|
|
2700
2859
|
onClick: handleRemoveFile
|
|
2701
|
-
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2860
|
+
}, iconRemoveFile ? iconRemoveFile : configStyles.FILE.icon.removeFile ? configStyles.FILE.icon.removeFile : /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), !multiple && error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2702
2861
|
style: {
|
|
2703
|
-
marginTop: '6px',
|
|
2704
|
-
color: errorColor ?? configStyles.FILE.error.color,
|
|
2705
|
-
fontSize: errorSize ?? configStyles.FILE.error.font.size,
|
|
2706
|
-
fontStyle: errorStyle ?? configStyles.FILE.error.font.style,
|
|
2707
|
-
fontWeight: errorWeight ?? configStyles.FILE.error.font.weight,
|
|
2708
|
-
fontFamily: errorFamily ?? configStyles.FILE.error.font.family,
|
|
2709
|
-
alignItems: 'center',
|
|
2710
2862
|
columnGap: '5px',
|
|
2863
|
+
alignItems: 'center',
|
|
2864
|
+
color: errorColor ?? configStyles.FILE.error.color,
|
|
2865
|
+
fontSize: errorFontSize ?? configStyles.FILE.error.font.size,
|
|
2866
|
+
marginTop: errorMarginTop ?? configStyles.FILE.error.marginTop,
|
|
2867
|
+
fontStyle: errorFontStyle ?? configStyles.FILE.error.font.style,
|
|
2868
|
+
fontWeight: errorFontWeight ?? configStyles.FILE.error.font.weight,
|
|
2869
|
+
fontFamily: errorFontFamily ?? configStyles.FILE.error.font.family,
|
|
2711
2870
|
display: errorIconShow && (errorIcon || configStyles.FILE.error?.icon) ? 'inline-flex' : 'inline-block'
|
|
2712
2871
|
}
|
|
2713
2872
|
}, errorIconShow ? errorIcon ? errorIcon : configStyles.FILE.error?.icon ? configStyles.FILE.error?.icon : '' : '', error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
@@ -2730,7 +2889,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2730
2889
|
iconDelItem: iconDeleteItem ?? configStyles.FILE.icon.deleteItem,
|
|
2731
2890
|
timeForRemoveError: timeForRemoveError,
|
|
2732
2891
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2733
|
-
radius:
|
|
2892
|
+
radius: borderRadius ?? configStyles.FILE.radius,
|
|
2734
2893
|
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2735
2894
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2736
2895
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
@@ -2754,39 +2913,39 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2754
2913
|
}));
|
|
2755
2914
|
});
|
|
2756
2915
|
File.propTypes = {
|
|
2757
|
-
or: PropTypes__default["default"].string,
|
|
2758
|
-
size: PropTypes__default["default"].string,
|
|
2759
2916
|
preview: PropTypes__default["default"].bool,
|
|
2760
2917
|
label: PropTypes__default["default"].string,
|
|
2761
2918
|
color: PropTypes__default["default"].string,
|
|
2762
2919
|
height: PropTypes__default["default"].string,
|
|
2763
2920
|
disabled: PropTypes__default["default"].bool,
|
|
2764
|
-
|
|
2921
|
+
borderRadius: PropTypes__default["default"].string,
|
|
2765
2922
|
borderWidth: PropTypes__default["default"].string,
|
|
2766
2923
|
borderStyle: PropTypes__default["default"].string,
|
|
2767
2924
|
borderColor: PropTypes__default["default"].string,
|
|
2768
2925
|
required: PropTypes__default["default"].bool,
|
|
2769
2926
|
upload: PropTypes__default["default"].string,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2927
|
+
fontSize: PropTypes__default["default"].string,
|
|
2928
|
+
fontWeight: PropTypes__default["default"].number,
|
|
2929
|
+
fontStyle: PropTypes__default["default"].string,
|
|
2930
|
+
fontFamily: PropTypes__default["default"].string,
|
|
2773
2931
|
maxSize: PropTypes__default["default"].number,
|
|
2774
2932
|
maxWidth: PropTypes__default["default"].string,
|
|
2775
2933
|
removeFile: PropTypes__default["default"].func,
|
|
2776
2934
|
className: PropTypes__default["default"].string,
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2935
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
2936
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
2937
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
2938
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
2939
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
2940
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
2941
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
2942
|
+
labelFontFamily: PropTypes__default["default"].string,
|
|
2785
2943
|
labelColor: PropTypes__default["default"].string,
|
|
2786
2944
|
lableShowMore: PropTypes__default["default"].bool,
|
|
2787
2945
|
labelShowLessText: PropTypes__default["default"].string,
|
|
2788
2946
|
labelShowMoreText: PropTypes__default["default"].string,
|
|
2789
2947
|
showMoreTextColor: PropTypes__default["default"].string,
|
|
2948
|
+
labelMarginBottom: PropTypes__default["default"].string,
|
|
2790
2949
|
useLabelTooltip: PropTypes__default["default"].bool,
|
|
2791
2950
|
labelTooltipColor: PropTypes__default["default"].string,
|
|
2792
2951
|
labelTooltipPadding: PropTypes__default["default"].string,
|
|
@@ -2798,6 +2957,7 @@ File.propTypes = {
|
|
|
2798
2957
|
labelTooltipBackgroundColor: PropTypes__default["default"].string,
|
|
2799
2958
|
errorColor: PropTypes__default["default"].string,
|
|
2800
2959
|
formatError: PropTypes__default["default"].string,
|
|
2960
|
+
formatValidateError: PropTypes__default["default"].string,
|
|
2801
2961
|
putFileHere: PropTypes__default["default"].string,
|
|
2802
2962
|
uploadColor: PropTypes__default["default"].string,
|
|
2803
2963
|
defaultData: PropTypes__default["default"].object,
|
|
@@ -2805,6 +2965,7 @@ File.propTypes = {
|
|
|
2805
2965
|
maxSizeError: PropTypes__default["default"].string,
|
|
2806
2966
|
errorIcon: PropTypes__default["default"].element,
|
|
2807
2967
|
errorIconShow: PropTypes__default["default"].bool,
|
|
2968
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
2808
2969
|
errorMessage: PropTypes__default["default"].string,
|
|
2809
2970
|
fileSizeText: PropTypes__default["default"].string,
|
|
2810
2971
|
noChoosenFile: PropTypes__default["default"].string,
|
|
@@ -3218,6 +3379,7 @@ const TD = ({
|
|
|
3218
3379
|
orderFontSize,
|
|
3219
3380
|
tBodyFontSize,
|
|
3220
3381
|
openListColor,
|
|
3382
|
+
tBodyFontStyle,
|
|
3221
3383
|
orderFontStyle,
|
|
3222
3384
|
tBodyTextAlign,
|
|
3223
3385
|
orderFontFamily,
|
|
@@ -3311,6 +3473,7 @@ const TD = ({
|
|
|
3311
3473
|
padding: tBodyPadding,
|
|
3312
3474
|
fontSize: tBodyFontSize,
|
|
3313
3475
|
borderRight: borderRight,
|
|
3476
|
+
fontStyle: tBodyFontStyle,
|
|
3314
3477
|
textAlign: tBodyTextAlign,
|
|
3315
3478
|
fontFamily: tBodyFontFamily,
|
|
3316
3479
|
fontWeight: tBodyFontWeight,
|
|
@@ -3604,7 +3767,7 @@ const Table = ({
|
|
|
3604
3767
|
tableColumnMaxWidth,
|
|
3605
3768
|
tableColumnMinWidth,
|
|
3606
3769
|
tHeadColor,
|
|
3607
|
-
|
|
3770
|
+
tHeadFontFamily,
|
|
3608
3771
|
tHeadPadding,
|
|
3609
3772
|
tHeadFontSize,
|
|
3610
3773
|
tHeadFontStyle,
|
|
@@ -3615,6 +3778,7 @@ const Table = ({
|
|
|
3615
3778
|
tBodyColor,
|
|
3616
3779
|
tBodyPadding,
|
|
3617
3780
|
tBodyFontSize,
|
|
3781
|
+
tBodyFontStyle,
|
|
3618
3782
|
tBodyTextAlign,
|
|
3619
3783
|
tBodyRowBorder,
|
|
3620
3784
|
tBodyBoxShadow,
|
|
@@ -4401,7 +4565,7 @@ const Table = ({
|
|
|
4401
4565
|
handleCheckedHeader: handleCheckedHeader,
|
|
4402
4566
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
4403
4567
|
handleCheckArrowActionHeader: handleCheckArrowActionHeader,
|
|
4404
|
-
tHeadFamily:
|
|
4568
|
+
tHeadFamily: tHeadFontFamily ?? configStyles.TABLE.head.font.family,
|
|
4405
4569
|
tHeadPadding: tHeadPadding ?? configStyles.TABLE.head.padding,
|
|
4406
4570
|
tHeadFontSize: tHeadFontSize ?? configStyles.TABLE.head.font.size,
|
|
4407
4571
|
tHeadFontStyle: tHeadFontStyle ?? configStyles.TABLE.head.font.style,
|
|
@@ -4463,6 +4627,7 @@ const Table = ({
|
|
|
4463
4627
|
rowRadius: tableRowRadius ?? configStyles.TABLE.body.row.radius,
|
|
4464
4628
|
tBodyPadding: tBodyPadding ?? configStyles.TABLE.body.padding,
|
|
4465
4629
|
tBodyFontSize: tBodyFontSize ?? configStyles.TABLE.body.font.size,
|
|
4630
|
+
tBodyFontStyle: tBodyFontStyle ?? configStyles.TABLE.body.font.style,
|
|
4466
4631
|
tBodyTextAlign: tBodyTextAlign ?? configStyles.TABLE.textAlign,
|
|
4467
4632
|
tBodyFontFamily: tBodyFontFamily ?? configStyles.TABLE.body.font.family,
|
|
4468
4633
|
tBodyFontWeight: tBodyFontWeight ?? configStyles.TABLE.body.font.weight,
|
|
@@ -4539,7 +4704,7 @@ Table.propTypes = {
|
|
|
4539
4704
|
tableColumnMaxWidth: PropTypes__default["default"].string,
|
|
4540
4705
|
tableColumnMinWidth: PropTypes__default["default"].string,
|
|
4541
4706
|
tHeadColor: PropTypes__default["default"].string,
|
|
4542
|
-
|
|
4707
|
+
tHeadFontFamily: PropTypes__default["default"].string,
|
|
4543
4708
|
tHeadPadding: PropTypes__default["default"].string,
|
|
4544
4709
|
tHeadFontSize: PropTypes__default["default"].string,
|
|
4545
4710
|
tHeadFontStyle: PropTypes__default["default"].string,
|
|
@@ -4550,6 +4715,7 @@ Table.propTypes = {
|
|
|
4550
4715
|
tBodyColor: PropTypes__default["default"].string,
|
|
4551
4716
|
tBodyPadding: PropTypes__default["default"].string,
|
|
4552
4717
|
tBodyFontSize: PropTypes__default["default"].string,
|
|
4718
|
+
tBodyFontStyle: PropTypes__default["default"].string,
|
|
4553
4719
|
tBodyBoxShadow: PropTypes__default["default"].string,
|
|
4554
4720
|
tBodyTextAlign: PropTypes__default["default"].string,
|
|
4555
4721
|
tBodyFontWeight: PropTypes__default["default"].string,
|
|
@@ -4685,15 +4851,16 @@ const Modal = ({
|
|
|
4685
4851
|
data,
|
|
4686
4852
|
width,
|
|
4687
4853
|
loader,
|
|
4688
|
-
radius,
|
|
4689
4854
|
height,
|
|
4690
4855
|
padding,
|
|
4691
4856
|
setShow,
|
|
4857
|
+
underScroll,
|
|
4692
4858
|
zoomIcon,
|
|
4693
4859
|
prevIcon,
|
|
4694
4860
|
nextIcon,
|
|
4695
4861
|
closeIcon,
|
|
4696
4862
|
closeIconFix,
|
|
4863
|
+
borderRadius,
|
|
4697
4864
|
showCloseIcon,
|
|
4698
4865
|
closeIconClass,
|
|
4699
4866
|
closeSlideIcon,
|
|
@@ -4704,15 +4871,12 @@ const Modal = ({
|
|
|
4704
4871
|
minWidth,
|
|
4705
4872
|
minHeight,
|
|
4706
4873
|
className,
|
|
4707
|
-
|
|
4874
|
+
maxWidth,
|
|
4708
4875
|
alignItems,
|
|
4709
|
-
|
|
4876
|
+
maxHeight,
|
|
4710
4877
|
headerText,
|
|
4711
4878
|
imageWidth,
|
|
4712
|
-
headerSize,
|
|
4713
4879
|
headerIcon,
|
|
4714
|
-
headerStyle,
|
|
4715
|
-
headerFamily,
|
|
4716
4880
|
imageHeight,
|
|
4717
4881
|
headerColor,
|
|
4718
4882
|
borderStyle,
|
|
@@ -4721,13 +4885,16 @@ const Modal = ({
|
|
|
4721
4885
|
imageMargin,
|
|
4722
4886
|
showZoomIcon,
|
|
4723
4887
|
outsideClose,
|
|
4724
|
-
headerWeight,
|
|
4725
4888
|
headerHeight,
|
|
4726
4889
|
justifyContent,
|
|
4890
|
+
headerFontSize,
|
|
4727
4891
|
headerTextAlign,
|
|
4728
4892
|
backgroundColor,
|
|
4729
4893
|
imageWrapHeight,
|
|
4730
4894
|
grayDecorHeight,
|
|
4895
|
+
headerFontStyle,
|
|
4896
|
+
headerFontFamily,
|
|
4897
|
+
headerFontWeight,
|
|
4731
4898
|
headerIconMaxWidth,
|
|
4732
4899
|
headerIconMaxHeight,
|
|
4733
4900
|
layerBackgroundColor,
|
|
@@ -4835,7 +5002,17 @@ const Modal = ({
|
|
|
4835
5002
|
newConfigStyles = {
|
|
4836
5003
|
...data
|
|
4837
5004
|
};
|
|
4838
|
-
if (
|
|
5005
|
+
if (underScroll === undefined) {
|
|
5006
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5007
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
5008
|
+
document.head.appendChild(style);
|
|
5009
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
5010
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
5011
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
5012
|
+
passive: false
|
|
5013
|
+
});
|
|
5014
|
+
}
|
|
5015
|
+
} else if (underScroll === false) {
|
|
4839
5016
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
4840
5017
|
document.head.appendChild(style);
|
|
4841
5018
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -4856,7 +5033,17 @@ const Modal = ({
|
|
|
4856
5033
|
return () => {
|
|
4857
5034
|
setSelect(0);
|
|
4858
5035
|
setInnerData([]);
|
|
4859
|
-
if (
|
|
5036
|
+
if (underScroll === undefined) {
|
|
5037
|
+
if (newConfigStyles.MODAL && hasOwnerProperty(newConfigStyles.MODAL, 'underScroll') && newConfigStyles.MODAL.underScroll === false) {
|
|
5038
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
5039
|
+
if (noScrllable) {
|
|
5040
|
+
style.remove();
|
|
5041
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
5042
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
5043
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
5044
|
+
}
|
|
5045
|
+
}
|
|
5046
|
+
} else if (underScroll === false) {
|
|
4860
5047
|
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
4861
5048
|
if (noScrllable) {
|
|
4862
5049
|
style.remove();
|
|
@@ -4880,7 +5067,7 @@ const Modal = ({
|
|
|
4880
5067
|
left: '0px',
|
|
4881
5068
|
zIndex: 999,
|
|
4882
5069
|
width: '100%',
|
|
4883
|
-
height: '
|
|
5070
|
+
height: '100dvh',
|
|
4884
5071
|
position: 'fixed',
|
|
4885
5072
|
backgroundColor: layerBackgroundColor ?? configStyles.MODAL.colors.backgroundLayer
|
|
4886
5073
|
}
|
|
@@ -4889,7 +5076,7 @@ const Modal = ({
|
|
|
4889
5076
|
position: 'relative',
|
|
4890
5077
|
display: 'flex',
|
|
4891
5078
|
width: '100%',
|
|
4892
|
-
height: '
|
|
5079
|
+
height: '100dvh',
|
|
4893
5080
|
alignItems: alignItems ?? configStyles.MODAL.alignItems,
|
|
4894
5081
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4895
5082
|
}
|
|
@@ -4903,10 +5090,10 @@ const Modal = ({
|
|
|
4903
5090
|
height: height ?? configStyles.MODAL.height,
|
|
4904
5091
|
display: type === 'content' ? 'grid' : 'block',
|
|
4905
5092
|
overflow: type === 'content' ? 'auto' : 'hidden',
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
maxHeight: mMaxHeight ?? configStyles.MODAL.maxHeight,
|
|
5093
|
+
maxWidth: maxWidth ?? configStyles.MODAL.maxWidth,
|
|
5094
|
+
maxHeight: maxHeight ?? configStyles.MODAL.maxHeight,
|
|
4909
5095
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
5096
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
4910
5097
|
minWidth: type === 'content' ? minWidth ?? configStyles.MODAL.minWidth : '',
|
|
4911
5098
|
backgroundColor: backgroundColor ?? configStyles.MODAL.colors.background,
|
|
4912
5099
|
minHeight: type === 'content' ? minHeight ?? configStyles.MODAL.minHeight : ''
|
|
@@ -4943,11 +5130,11 @@ const Modal = ({
|
|
|
4943
5130
|
textOverflow: 'ellipsis',
|
|
4944
5131
|
margin: '0px 16px 0px 0px',
|
|
4945
5132
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4946
|
-
fontSize:
|
|
5133
|
+
fontSize: headerFontSize ?? configStyles.MODAL.header.font.size,
|
|
4947
5134
|
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4948
|
-
fontStyle:
|
|
4949
|
-
fontFamily:
|
|
4950
|
-
fontWeight:
|
|
5135
|
+
fontStyle: headerFontStyle ?? configStyles.MODAL.header.font.style,
|
|
5136
|
+
fontFamily: headerFontFamily ?? configStyles.MODAL.header.font.family,
|
|
5137
|
+
fontWeight: headerFontWeight ?? configStyles.MODAL.header.font.weight
|
|
4951
5138
|
}
|
|
4952
5139
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4953
5140
|
onClick: () => setShow(false),
|
|
@@ -5039,7 +5226,7 @@ const Modal = ({
|
|
|
5039
5226
|
display: 'block',
|
|
5040
5227
|
objectFit: 'contain',
|
|
5041
5228
|
margin: imageMargin ?? configStyles.MODAL.image.margin,
|
|
5042
|
-
borderRadius:
|
|
5229
|
+
borderRadius: borderRadius ?? configStyles.MODAL.border.radius,
|
|
5043
5230
|
width: imageWidth ?? configStyles.MODAL.image.width,
|
|
5044
5231
|
height: imageHeight ?? configStyles.MODAL.image.height
|
|
5045
5232
|
},
|
|
@@ -5102,12 +5289,12 @@ Modal.propTypes = {
|
|
|
5102
5289
|
type: PropTypes__default["default"].string,
|
|
5103
5290
|
setShow: PropTypes__default["default"].func,
|
|
5104
5291
|
width: PropTypes__default["default"].string,
|
|
5105
|
-
radius: PropTypes__default["default"].string,
|
|
5106
5292
|
height: PropTypes__default["default"].string,
|
|
5107
5293
|
padding: PropTypes__default["default"].string,
|
|
5108
5294
|
selected: PropTypes__default["default"].number,
|
|
5109
5295
|
minWidth: PropTypes__default["default"].string,
|
|
5110
|
-
|
|
5296
|
+
maxWidth: PropTypes__default["default"].string,
|
|
5297
|
+
underScroll: PropTypes__default["default"].bool,
|
|
5111
5298
|
minHeight: PropTypes__default["default"].string,
|
|
5112
5299
|
className: PropTypes__default["default"].string,
|
|
5113
5300
|
zoomIcon: PropTypes__default["default"].element,
|
|
@@ -5116,21 +5303,22 @@ Modal.propTypes = {
|
|
|
5116
5303
|
closeIcon: PropTypes__default["default"].element,
|
|
5117
5304
|
closeIconFix: PropTypes__default["default"].bool,
|
|
5118
5305
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
5306
|
+
borderRadius: PropTypes__default["default"].string,
|
|
5119
5307
|
closeIconClass: PropTypes__default["default"].string,
|
|
5120
5308
|
closeSlideIcon: PropTypes__default["default"].element,
|
|
5121
5309
|
closeIconTopPosition: PropTypes__default["default"].string,
|
|
5122
5310
|
closeIconRightPosition: PropTypes__default["default"].string,
|
|
5123
5311
|
headerText: PropTypes__default["default"].string,
|
|
5124
|
-
|
|
5125
|
-
|
|
5312
|
+
headerFontSize: PropTypes__default["default"].string,
|
|
5313
|
+
headerFontStyle: PropTypes__default["default"].string,
|
|
5126
5314
|
headerIcon: PropTypes__default["default"].element,
|
|
5127
|
-
|
|
5315
|
+
headerFontFamily: PropTypes__default["default"].string,
|
|
5128
5316
|
headerTextAlign: PropTypes__default["default"].string,
|
|
5129
5317
|
headerIconMaxWidth: PropTypes__default["default"].string,
|
|
5130
5318
|
headerIconMaxHeight: PropTypes__default["default"].string,
|
|
5131
5319
|
headerIconMarginRight: PropTypes__default["default"].string,
|
|
5132
5320
|
alignItems: PropTypes__default["default"].string,
|
|
5133
|
-
|
|
5321
|
+
maxHeight: PropTypes__default["default"].string,
|
|
5134
5322
|
imageWidth: PropTypes__default["default"].string,
|
|
5135
5323
|
outsideClose: PropTypes__default["default"].bool,
|
|
5136
5324
|
showZoomIcon: PropTypes__default["default"].bool,
|
|
@@ -5139,7 +5327,7 @@ Modal.propTypes = {
|
|
|
5139
5327
|
borderWidth: PropTypes__default["default"].string,
|
|
5140
5328
|
headerColor: PropTypes__default["default"].string,
|
|
5141
5329
|
imageHeight: PropTypes__default["default"].string,
|
|
5142
|
-
|
|
5330
|
+
headerFontWeight: PropTypes__default["default"].string,
|
|
5143
5331
|
headerHeight: PropTypes__default["default"].string,
|
|
5144
5332
|
justifyContent: PropTypes__default["default"].string,
|
|
5145
5333
|
backgroundColor: PropTypes__default["default"].string,
|
|
@@ -5477,7 +5665,7 @@ const NumberInput = ({
|
|
|
5477
5665
|
});
|
|
5478
5666
|
};
|
|
5479
5667
|
|
|
5480
|
-
var css_248z$a = ".input-module_input-wrap__NunrE{
|
|
5668
|
+
var css_248z$a = ".input-module_input-wrap__NunrE{width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}.input-module_show-more-text__PQC9x{align-self:self-end;cursor:pointer}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
|
|
5481
5669
|
var styles$9 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","show-more-text":"input-module_show-more-text__PQC9x","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
|
|
5482
5670
|
styleInject(css_248z$a);
|
|
5483
5671
|
|
|
@@ -5496,60 +5684,61 @@ const P = styled__default["default"].span`
|
|
|
5496
5684
|
`;
|
|
5497
5685
|
const Input = ({
|
|
5498
5686
|
ssn,
|
|
5499
|
-
size,
|
|
5500
5687
|
name,
|
|
5501
|
-
|
|
5688
|
+
fontSize,
|
|
5689
|
+
fontStyle,
|
|
5690
|
+
fontWeight,
|
|
5691
|
+
fontFamily,
|
|
5692
|
+
borderRadius,
|
|
5502
5693
|
color,
|
|
5503
5694
|
value,
|
|
5504
5695
|
width,
|
|
5505
5696
|
regexp,
|
|
5506
5697
|
height,
|
|
5507
|
-
radius,
|
|
5508
5698
|
change,
|
|
5509
|
-
weight,
|
|
5510
|
-
family,
|
|
5511
5699
|
padding,
|
|
5512
5700
|
telClass,
|
|
5513
5701
|
leftIcon,
|
|
5514
5702
|
required,
|
|
5515
5703
|
disabled,
|
|
5516
|
-
errorDots,
|
|
5517
|
-
errorIcon,
|
|
5518
5704
|
iconWidth,
|
|
5519
5705
|
rightIcon,
|
|
5520
5706
|
className,
|
|
5521
5707
|
boxSizing,
|
|
5522
5708
|
boxShadow,
|
|
5523
|
-
errorLeft,
|
|
5524
|
-
errorSize,
|
|
5525
5709
|
maxLength,
|
|
5526
5710
|
floatToFix,
|
|
5527
5711
|
minNumSize,
|
|
5528
5712
|
maxNumSize,
|
|
5529
|
-
errorColor,
|
|
5530
5713
|
withoutDot,
|
|
5531
|
-
errorStyle,
|
|
5532
5714
|
iconPadding,
|
|
5533
|
-
errorAction,
|
|
5534
5715
|
placeholder,
|
|
5535
|
-
errorZindex,
|
|
5536
|
-
errorWeight,
|
|
5537
|
-
errorFamily,
|
|
5538
5716
|
phoneDisplay,
|
|
5539
|
-
errorMessage,
|
|
5540
5717
|
autoComplete,
|
|
5541
5718
|
showLabelIcon,
|
|
5719
|
+
boxShadowHover,
|
|
5720
|
+
errorLeft,
|
|
5721
|
+
errorDots,
|
|
5722
|
+
errorIcon,
|
|
5723
|
+
errorColor,
|
|
5724
|
+
errorAction,
|
|
5725
|
+
errorZindex,
|
|
5726
|
+
errorMessage,
|
|
5542
5727
|
errorIconSide,
|
|
5543
5728
|
showErrorIcon,
|
|
5729
|
+
errorFontSize,
|
|
5544
5730
|
errorMarginTop,
|
|
5545
5731
|
errorBoxShadow,
|
|
5546
|
-
boxShadowHover,
|
|
5547
5732
|
errorClassName,
|
|
5548
|
-
|
|
5733
|
+
errorFontStyle,
|
|
5549
5734
|
errorLineHeight,
|
|
5735
|
+
errorIconMargin,
|
|
5736
|
+
errorFontWeight,
|
|
5737
|
+
errorFontFamily,
|
|
5738
|
+
errorInContent,
|
|
5739
|
+
phoneAlignItems,
|
|
5550
5740
|
numberMaxLength,
|
|
5551
5741
|
backgroundColor,
|
|
5552
|
-
errorIconMargin,
|
|
5553
5742
|
placeholderColor,
|
|
5554
5743
|
withZero = false,
|
|
5555
5744
|
regexpErrorMessage,
|
|
@@ -5561,19 +5750,19 @@ const Input = ({
|
|
|
5561
5750
|
backgroundDisableColor,
|
|
5562
5751
|
telBorderRightColorHover,
|
|
5563
5752
|
label,
|
|
5564
|
-
labelSize,
|
|
5565
5753
|
labelIcon,
|
|
5566
|
-
labelStyle,
|
|
5567
5754
|
labelColor,
|
|
5568
5755
|
labelAction,
|
|
5569
|
-
labelWeight,
|
|
5570
5756
|
labelDisplay,
|
|
5757
|
+
lableShowMore,
|
|
5571
5758
|
labelIconSide,
|
|
5759
|
+
labelFontSize,
|
|
5760
|
+
labelFontStyle,
|
|
5572
5761
|
labelIconMargin,
|
|
5762
|
+
labelFontWeight,
|
|
5573
5763
|
labelFontFamily,
|
|
5574
5764
|
labelLineHeight,
|
|
5575
5765
|
labelMarginBottom,
|
|
5576
|
-
lableShowMore,
|
|
5577
5766
|
labelShowLessText,
|
|
5578
5767
|
labelShowMoreText,
|
|
5579
5768
|
showMoreTextColor,
|
|
@@ -5610,10 +5799,10 @@ const Input = ({
|
|
|
5610
5799
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
5611
5800
|
height: height ?? configStyles.INPUT.height,
|
|
5612
5801
|
padding: padding ?? configStyles.INPUT.padding,
|
|
5613
|
-
fontSize:
|
|
5614
|
-
fontStyle:
|
|
5615
|
-
fontWeight:
|
|
5616
|
-
fontFamily:
|
|
5802
|
+
fontSize: fontSize ?? configStyles.INPUT.font.size,
|
|
5803
|
+
fontStyle: fontStyle ?? configStyles.INPUT.font.style,
|
|
5804
|
+
fontWeight: fontWeight ?? configStyles.INPUT.font.weight,
|
|
5805
|
+
fontFamily: fontFamily ?? configStyles.INPUT.font.family,
|
|
5617
5806
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5618
5807
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : configStyles.INPUT.color,
|
|
5619
5808
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -5793,7 +5982,10 @@ const Input = ({
|
|
|
5793
5982
|
}, []);
|
|
5794
5983
|
return configStyles.INPUT && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5795
5984
|
ref: parentRef,
|
|
5796
|
-
className: classProps
|
|
5985
|
+
className: classProps,
|
|
5986
|
+
style: {
|
|
5987
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'relative'
|
|
5988
|
+
}
|
|
5797
5989
|
}, /*#__PURE__*/React__default["default"].createElement("style", null, `.tui-color-placeholder::placeholder {
|
|
5798
5990
|
color: ${placeholderColor ?? configStyles.INPUT.colors.placeholder};
|
|
5799
5991
|
}`), label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -5818,13 +6010,13 @@ const Input = ({
|
|
|
5818
6010
|
ref: labelRef,
|
|
5819
6011
|
style: {
|
|
5820
6012
|
color: labelColor ?? configStyles.INPUT.label.color,
|
|
5821
|
-
fontSize: labelSize ?? configStyles.INPUT.label.font.size,
|
|
5822
|
-
fontStyle: labelStyle ?? configStyles.INPUT.label.font.style,
|
|
5823
6013
|
display: labelDisplay ?? configStyles.INPUT.label.display,
|
|
5824
|
-
|
|
6014
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6015
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
5825
6016
|
lineHeight: labelLineHeight ?? configStyles.INPUT.label.lineHeight,
|
|
5826
|
-
|
|
6017
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5827
6018
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
6019
|
+
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom,
|
|
5828
6020
|
whiteSpace: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'nowrap' : 'normal',
|
|
5829
6021
|
overflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'hidden' : 'visible',
|
|
5830
6022
|
textOverflow: (useLabelTooltip ? useLabelTooltip : (useLabelTooltip === null || useLabelTooltip === undefined) && configStyles.INPUT.label.useTooltip) || (lableShowMore ? lableShowMore : (lableShowMore === null || lableShowMore === undefined) && configStyles.INPUT.label.showMore) && !showMore ? 'ellipsis' : '',
|
|
@@ -5835,9 +6027,9 @@ const Input = ({
|
|
|
5835
6027
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5836
6028
|
className: styles$9['show-more-text'],
|
|
5837
6029
|
style: {
|
|
5838
|
-
fontSize:
|
|
5839
|
-
fontStyle:
|
|
5840
|
-
fontWeight:
|
|
6030
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6031
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6032
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5841
6033
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5842
6034
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor
|
|
5843
6035
|
},
|
|
@@ -5855,9 +6047,9 @@ const Input = ({
|
|
|
5855
6047
|
}) : '', handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.INPUT.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5856
6048
|
className: styles$9['show-more-text'],
|
|
5857
6049
|
style: {
|
|
5858
|
-
fontSize:
|
|
5859
|
-
fontStyle:
|
|
5860
|
-
fontWeight:
|
|
6050
|
+
fontSize: labelFontSize ?? configStyles.INPUT.label.font.size,
|
|
6051
|
+
fontStyle: labelFontStyle ?? configStyles.INPUT.label.font.style,
|
|
6052
|
+
fontWeight: labelFontWeight ?? configStyles.INPUT.label.font.weight,
|
|
5861
6053
|
fontFamily: labelFontFamily ?? configStyles.INPUT.label.font.family,
|
|
5862
6054
|
color: showMoreTextColor ?? configStyles.INPUT.label.showMoreTextColor,
|
|
5863
6055
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -5867,7 +6059,7 @@ const Input = ({
|
|
|
5867
6059
|
className: `${styles$9['input-content']}`,
|
|
5868
6060
|
style: {
|
|
5869
6061
|
width: width ?? configStyles.INPUT.width,
|
|
5870
|
-
borderRadius:
|
|
6062
|
+
borderRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5871
6063
|
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
5872
6064
|
},
|
|
5873
6065
|
onMouseEnter: handleMouseEnter,
|
|
@@ -5883,8 +6075,8 @@ const Input = ({
|
|
|
5883
6075
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5884
6076
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5885
6077
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5886
|
-
borderTopLeftRadius:
|
|
5887
|
-
borderBottomLeftRadius:
|
|
6078
|
+
borderTopLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6079
|
+
borderBottomLeftRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5888
6080
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5889
6081
|
}
|
|
5890
6082
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default["default"].createElement(TelInput, {
|
|
@@ -5895,7 +6087,7 @@ const Input = ({
|
|
|
5895
6087
|
disabled: disabled,
|
|
5896
6088
|
inpStyles: inpStyles,
|
|
5897
6089
|
inpAttributes: inpAttributes,
|
|
5898
|
-
radius:
|
|
6090
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5899
6091
|
telClass: telClass ?? configStyles.INPUT.tel.className,
|
|
5900
6092
|
phoneDisplay: phoneDisplay ?? configStyles.INPUT.tel.display,
|
|
5901
6093
|
phoneAlignItems: phoneAlignItems ?? configStyles.INPUT.tel.alignItems,
|
|
@@ -5920,7 +6112,7 @@ const Input = ({
|
|
|
5920
6112
|
minNumSize: minNumSize ? minNumSize : '',
|
|
5921
6113
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
5922
6114
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
5923
|
-
radius:
|
|
6115
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5924
6116
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5925
6117
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
5926
6118
|
}) : type === 'password' ? /*#__PURE__*/React__default["default"].createElement(PassInput, {
|
|
@@ -5931,7 +6123,7 @@ const Input = ({
|
|
|
5931
6123
|
inputChange: change,
|
|
5932
6124
|
inpStyles: inpStyles,
|
|
5933
6125
|
inpAttributes: inpAttributes,
|
|
5934
|
-
radius:
|
|
6126
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5935
6127
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5936
6128
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5937
6129
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5942,7 +6134,7 @@ const Input = ({
|
|
|
5942
6134
|
inputChange: change,
|
|
5943
6135
|
inpStyles: inpStyles,
|
|
5944
6136
|
inpAttributes: inpAttributes,
|
|
5945
|
-
radius:
|
|
6137
|
+
radius: borderRadius ?? configStyles.INPUT.radius,
|
|
5946
6138
|
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5947
6139
|
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5948
6140
|
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
@@ -5957,8 +6149,8 @@ const Input = ({
|
|
|
5957
6149
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
5958
6150
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5959
6151
|
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
5960
|
-
borderTopRightRadius:
|
|
5961
|
-
borderBottomRightRadius:
|
|
6152
|
+
borderTopRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
6153
|
+
borderBottomRightRadius: borderRadius ?? configStyles.INPUT.radius,
|
|
5962
6154
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
5963
6155
|
}
|
|
5964
6156
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P
|
|
@@ -5968,16 +6160,17 @@ const Input = ({
|
|
|
5968
6160
|
margin: '0px',
|
|
5969
6161
|
display: 'flex',
|
|
5970
6162
|
alignItems: 'center',
|
|
5971
|
-
position: 'absolute',
|
|
6163
|
+
position: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? 'static' : 'absolute',
|
|
5972
6164
|
width: width ?? configStyles.INPUT.width,
|
|
5973
6165
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
5974
6166
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5975
6167
|
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
5976
|
-
fontSize:
|
|
5977
|
-
fontStyle:
|
|
5978
|
-
fontFamily:
|
|
5979
|
-
fontWeight:
|
|
6168
|
+
fontSize: errorFontSize ?? configStyles.INPUT.error.font.size,
|
|
6169
|
+
fontStyle: errorFontStyle ?? configStyles.INPUT.error.font.style,
|
|
6170
|
+
fontFamily: errorFontFamily ?? configStyles.INPUT.error.font.family,
|
|
6171
|
+
fontWeight: errorFontWeight ?? configStyles.INPUT.error.font.weight,
|
|
5980
6172
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
6173
|
+
marginTop: (errorInContent ? errorInContent : configStyles.INPUT.error.inContent) ? errorMarginTop ?? configStyles.INPUT.error.marginTop : '0px',
|
|
5981
6174
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
5982
6175
|
transform: 'scale3d(1,1,1)'
|
|
5983
6176
|
},
|
|
@@ -6014,55 +6207,54 @@ const Input = ({
|
|
|
6014
6207
|
};
|
|
6015
6208
|
Input.propTypes = {
|
|
6016
6209
|
ssn: PropTypes__default["default"].bool,
|
|
6017
|
-
size: PropTypes__default["default"].string,
|
|
6018
6210
|
name: PropTypes__default["default"].string,
|
|
6019
6211
|
change: PropTypes__default["default"].func,
|
|
6020
|
-
|
|
6212
|
+
fontSize: PropTypes__default["default"].string,
|
|
6213
|
+
fontStyle: PropTypes__default["default"].string,
|
|
6214
|
+
fontWeight: PropTypes__default["default"].string,
|
|
6215
|
+
fontFamily: PropTypes__default["default"].string,
|
|
6021
6216
|
color: PropTypes__default["default"].string,
|
|
6022
6217
|
width: PropTypes__default["default"].string,
|
|
6023
6218
|
withZero: PropTypes__default["default"].bool,
|
|
6024
|
-
weight: PropTypes__default["default"].string,
|
|
6025
|
-
family: PropTypes__default["default"].string,
|
|
6026
6219
|
required: PropTypes__default["default"].bool,
|
|
6027
6220
|
disabled: PropTypes__default["default"].bool,
|
|
6028
6221
|
height: PropTypes__default["default"].string,
|
|
6029
|
-
radius: PropTypes__default["default"].string,
|
|
6030
6222
|
padding: PropTypes__default["default"].string,
|
|
6031
6223
|
cardNumber: PropTypes__default["default"].bool,
|
|
6032
6224
|
withoutDot: PropTypes__default["default"].bool,
|
|
6033
6225
|
className: PropTypes__default["default"].string,
|
|
6034
6226
|
iconWidth: PropTypes__default["default"].string,
|
|
6035
|
-
iconPadding: PropTypes__default["default"].string,
|
|
6036
6227
|
maxLength: PropTypes__default["default"].number,
|
|
6037
6228
|
floatToFix: PropTypes__default["default"].number,
|
|
6038
6229
|
minNumSize: PropTypes__default["default"].number,
|
|
6039
6230
|
maxNumSize: PropTypes__default["default"].number,
|
|
6040
|
-
|
|
6231
|
+
iconPadding: PropTypes__default["default"].string,
|
|
6041
6232
|
placeholder: PropTypes__default["default"].string,
|
|
6233
|
+
borderRadius: PropTypes__default["default"].string,
|
|
6042
6234
|
placeholderColor: PropTypes__default["default"].string,
|
|
6043
6235
|
phoneDisplay: PropTypes__default["default"].string,
|
|
6044
6236
|
autoComplete: PropTypes__default["default"].string,
|
|
6045
6237
|
errorDots: PropTypes__default["default"].bool,
|
|
6046
6238
|
errorLeft: PropTypes__default["default"].string,
|
|
6047
|
-
errorSize: PropTypes__default["default"].string,
|
|
6048
6239
|
errorIcon: PropTypes__default["default"].string,
|
|
6049
6240
|
errorAction: PropTypes__default["default"].func,
|
|
6050
6241
|
errorColor: PropTypes__default["default"].string,
|
|
6051
|
-
errorStyle: PropTypes__default["default"].string,
|
|
6052
6242
|
showErrorIcon: PropTypes__default["default"].bool,
|
|
6053
|
-
|
|
6054
|
-
|
|
6243
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
6244
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
6245
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
6246
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
6055
6247
|
errorZindex: PropTypes__default["default"].string,
|
|
6056
|
-
errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6057
6248
|
errorMessage: PropTypes__default["default"].string,
|
|
6058
|
-
|
|
6249
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
6059
6250
|
errorMarginTop: PropTypes__default["default"].string,
|
|
6060
6251
|
errorClassName: PropTypes__default["default"].string,
|
|
6252
|
+
errorBoxShadow: PropTypes__default["default"].string,
|
|
6061
6253
|
errorIconMargin: PropTypes__default["default"].string,
|
|
6062
6254
|
errorLineHeight: PropTypes__default["default"].string,
|
|
6255
|
+
errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6063
6256
|
boxSizing: PropTypes__default["default"].string,
|
|
6064
6257
|
boxShadow: PropTypes__default["default"].string,
|
|
6065
|
-
errorBoxShadow: PropTypes__default["default"].string,
|
|
6066
6258
|
boxShadowHover: PropTypes__default["default"].string,
|
|
6067
6259
|
phoneAlignItems: PropTypes__default["default"].string,
|
|
6068
6260
|
numberMaxLength: PropTypes__default["default"].number,
|
|
@@ -6085,14 +6277,14 @@ Input.propTypes = {
|
|
|
6085
6277
|
label: PropTypes__default["default"].string,
|
|
6086
6278
|
labelAction: PropTypes__default["default"].func,
|
|
6087
6279
|
labelIcon: PropTypes__default["default"].string,
|
|
6088
|
-
labelSize: PropTypes__default["default"].string,
|
|
6089
6280
|
labelColor: PropTypes__default["default"].string,
|
|
6090
|
-
labelStyle: PropTypes__default["default"].string,
|
|
6091
6281
|
showLabelIcon: PropTypes__default["default"].bool,
|
|
6092
|
-
labelWeight: PropTypes__default["default"].string,
|
|
6093
6282
|
labelDisplay: PropTypes__default["default"].string,
|
|
6094
6283
|
labelIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
6095
6284
|
labelLineHeight: PropTypes__default["default"].string,
|
|
6285
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
6286
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
6287
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
6096
6288
|
labelFontFamily: PropTypes__default["default"].string,
|
|
6097
6289
|
labelIconMargin: PropTypes__default["default"].string,
|
|
6098
6290
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -6335,23 +6527,20 @@ const Select = ({
|
|
|
6335
6527
|
keyNames,
|
|
6336
6528
|
selected,
|
|
6337
6529
|
className,
|
|
6338
|
-
marginTop,
|
|
6339
6530
|
arrowIcon,
|
|
6340
6531
|
closeIcon,
|
|
6341
|
-
errorZindex,
|
|
6342
|
-
errorMessage,
|
|
6343
6532
|
arrowNoRotate,
|
|
6344
6533
|
showCloseIcon,
|
|
6345
6534
|
defaultOption,
|
|
6346
6535
|
multipleCheckbox,
|
|
6347
6536
|
label,
|
|
6348
6537
|
labelColor,
|
|
6349
|
-
labelWeight,
|
|
6350
6538
|
labelDisplay,
|
|
6351
6539
|
labelFontSize,
|
|
6352
6540
|
labelFontStyle,
|
|
6353
6541
|
labelLineHeight,
|
|
6354
6542
|
labelFontFamily,
|
|
6543
|
+
labelFontWeight,
|
|
6355
6544
|
labelMarginBottom,
|
|
6356
6545
|
labelTextTransform,
|
|
6357
6546
|
lableShowMore,
|
|
@@ -6370,12 +6559,16 @@ const Select = ({
|
|
|
6370
6559
|
labelTooltipBackgroundColor,
|
|
6371
6560
|
cursor,
|
|
6372
6561
|
errorIcon,
|
|
6373
|
-
errorSize,
|
|
6374
6562
|
errorColor,
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
errorWeight,
|
|
6563
|
+
errorZindex,
|
|
6564
|
+
errorMessage,
|
|
6378
6565
|
showErrorIcon,
|
|
6566
|
+
errorFontSize,
|
|
6567
|
+
errorInContent,
|
|
6568
|
+
errorMarginTop,
|
|
6569
|
+
errorFontStyle,
|
|
6570
|
+
errorFontFamily,
|
|
6571
|
+
errorFontWeight,
|
|
6379
6572
|
selectedColor,
|
|
6380
6573
|
selectedRadius,
|
|
6381
6574
|
selectedPadding,
|
|
@@ -6390,6 +6583,7 @@ const Select = ({
|
|
|
6390
6583
|
selectedTransition,
|
|
6391
6584
|
selectedBackgroundColor,
|
|
6392
6585
|
selectedDisableBackgroundColor,
|
|
6586
|
+
selectedDisablePlaceholderColor,
|
|
6393
6587
|
optionsBoxShadow,
|
|
6394
6588
|
optionsBorderRadius,
|
|
6395
6589
|
optionsBackgroundColor,
|
|
@@ -6641,8 +6835,8 @@ const Select = ({
|
|
|
6641
6835
|
ref: parentRef,
|
|
6642
6836
|
className: classProps,
|
|
6643
6837
|
style: {
|
|
6644
|
-
|
|
6645
|
-
|
|
6838
|
+
width: '100%',
|
|
6839
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'relative'
|
|
6646
6840
|
}
|
|
6647
6841
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6648
6842
|
style: {
|
|
@@ -6656,7 +6850,7 @@ const Select = ({
|
|
|
6656
6850
|
ref: labelRef,
|
|
6657
6851
|
style: {
|
|
6658
6852
|
color: labelColor ?? configStyles.SELECT.label.color,
|
|
6659
|
-
fontWeight:
|
|
6853
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6660
6854
|
display: labelDisplay ?? configStyles.SELECT.label.display,
|
|
6661
6855
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6662
6856
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
@@ -6676,7 +6870,7 @@ const Select = ({
|
|
|
6676
6870
|
style: {
|
|
6677
6871
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6678
6872
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6679
|
-
fontWeight:
|
|
6873
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6680
6874
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6681
6875
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor
|
|
6682
6876
|
},
|
|
@@ -6686,7 +6880,7 @@ const Select = ({
|
|
|
6686
6880
|
style: {
|
|
6687
6881
|
fontSize: labelFontSize ?? configStyles.SELECT.label.font.size,
|
|
6688
6882
|
fontStyle: labelFontStyle ?? configStyles.SELECT.label.font.style,
|
|
6689
|
-
fontWeight:
|
|
6883
|
+
fontWeight: labelFontWeight ?? configStyles.SELECT.label.font.weight,
|
|
6690
6884
|
fontFamily: labelFontFamily ?? configStyles.SELECT.label.font.family,
|
|
6691
6885
|
color: showMoreTextColor ?? configStyles.SELECT.label.showMoreTextColor,
|
|
6692
6886
|
marginBottom: labelMarginBottom ?? configStyles.INPUT.label.marginBottom
|
|
@@ -6723,7 +6917,7 @@ const Select = ({
|
|
|
6723
6917
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
6724
6918
|
overflow: insidePagination ? 'visible' : 'hidden',
|
|
6725
6919
|
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
6726
|
-
color: placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6920
|
+
color: disabled ? selectedDisablePlaceholderColor ? selectedDisablePlaceholderColor : configStyles.SELECT.selected.colors.placeholderDisable : placeholderColor && !newSelected.length ? placeholderColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
6727
6921
|
}
|
|
6728
6922
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
6729
6923
|
if (newSelected[index][keyNames.name]) {
|
|
@@ -6790,16 +6984,17 @@ const Select = ({
|
|
|
6790
6984
|
}) : '', option[keyNames.name]);
|
|
6791
6985
|
}))) : null)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6792
6986
|
style: {
|
|
6793
|
-
position: 'absolute',
|
|
6987
|
+
position: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? 'static' : 'absolute',
|
|
6794
6988
|
columnGap: '4px',
|
|
6795
6989
|
color: errorColor ?? configStyles.SELECT.error.color,
|
|
6796
|
-
fontSize:
|
|
6797
|
-
fontStyle:
|
|
6798
|
-
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline',
|
|
6799
|
-
fontFamily:
|
|
6800
|
-
fontWeight:
|
|
6990
|
+
fontSize: errorFontSize ?? configStyles.SELECT.error.font.size,
|
|
6991
|
+
fontStyle: errorFontStyle ?? configStyles.SELECT.error.font.style,
|
|
6992
|
+
display: errorIcon && showErrorIcon ? 'inline-flex' : 'inline-block',
|
|
6993
|
+
fontFamily: errorFontFamily ?? configStyles.SELECT.error.font.family,
|
|
6994
|
+
fontWeight: errorFontWeight ?? configStyles.SELECT.error.font.weight,
|
|
6801
6995
|
zIndex: errorZindex ?? configStyles.SELECT.error.zIndex,
|
|
6802
|
-
|
|
6996
|
+
marginTop: (errorInContent ? errorInContent : configStyles.SELECT.error.inContent) ? errorMarginTop ?? configStyles.SELECT.error.marginTop : '0px',
|
|
6997
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.SELECT.error.marginTop})`
|
|
6803
6998
|
}
|
|
6804
6999
|
}, showErrorIcon ? errorIcon ? errorIcon : configStyles.SELECT.error?.icon ? configStyles.SELECT.error?.icon : '' : '', errorMessage) : '');
|
|
6805
7000
|
};
|
|
@@ -6813,24 +7008,21 @@ Select.propTypes = {
|
|
|
6813
7008
|
disabled: PropTypes__default["default"].bool,
|
|
6814
7009
|
selected: PropTypes__default["default"].array,
|
|
6815
7010
|
keyNames: PropTypes__default["default"].object,
|
|
6816
|
-
marginTop: PropTypes__default["default"].string,
|
|
6817
7011
|
className: PropTypes__default["default"].string,
|
|
6818
7012
|
arrowIcon: PropTypes__default["default"].element,
|
|
6819
7013
|
closeIcon: PropTypes__default["default"].element,
|
|
6820
7014
|
arrowNoRotate: PropTypes__default["default"].bool,
|
|
6821
7015
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
6822
|
-
errorZindex: PropTypes__default["default"].number,
|
|
6823
|
-
errorMessage: PropTypes__default["default"].string,
|
|
6824
7016
|
defaultOption: PropTypes__default["default"].string,
|
|
6825
7017
|
multipleCheckbox: PropTypes__default["default"].bool,
|
|
6826
7018
|
label: PropTypes__default["default"].string,
|
|
6827
7019
|
labelColor: PropTypes__default["default"].string,
|
|
6828
|
-
labelWeight: PropTypes__default["default"].string,
|
|
6829
7020
|
labelDisplay: PropTypes__default["default"].string,
|
|
6830
7021
|
labelFontSize: PropTypes__default["default"].string,
|
|
6831
7022
|
labelFontStyle: PropTypes__default["default"].string,
|
|
6832
7023
|
labelLineHeight: PropTypes__default["default"].string,
|
|
6833
7024
|
labelFontFamily: PropTypes__default["default"].string,
|
|
7025
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
6834
7026
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
6835
7027
|
labelTextTransform: PropTypes__default["default"].string,
|
|
6836
7028
|
lableShowMore: PropTypes__default["default"].bool,
|
|
@@ -6838,10 +7030,17 @@ Select.propTypes = {
|
|
|
6838
7030
|
labelShowMoreText: PropTypes__default["default"].string,
|
|
6839
7031
|
showMoreTextColor: PropTypes__default["default"].string,
|
|
6840
7032
|
cursor: PropTypes__default["default"].string,
|
|
6841
|
-
errorSize: PropTypes__default["default"].string,
|
|
6842
7033
|
errorColor: PropTypes__default["default"].string,
|
|
6843
7034
|
errorIcon: PropTypes__default["default"].element,
|
|
6844
7035
|
showErrorIcon: PropTypes__default["default"].bool,
|
|
7036
|
+
errorZindex: PropTypes__default["default"].number,
|
|
7037
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
7038
|
+
errorMessage: PropTypes__default["default"].string,
|
|
7039
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
7040
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
7041
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
7042
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
7043
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
6845
7044
|
selectedColor: PropTypes__default["default"].string,
|
|
6846
7045
|
selectedRadius: PropTypes__default["default"].string,
|
|
6847
7046
|
selectedMinHeight: PropTypes__default["default"].string,
|
|
@@ -6856,6 +7055,7 @@ Select.propTypes = {
|
|
|
6856
7055
|
selectedTransition: PropTypes__default["default"].string,
|
|
6857
7056
|
selectedBackgroundColor: PropTypes__default["default"].string,
|
|
6858
7057
|
selectedDisableBackgroundColor: PropTypes__default["default"].string,
|
|
7058
|
+
selectedDisablePlaceholderColor: PropTypes__default["default"].string,
|
|
6859
7059
|
optionsBoxShadow: PropTypes__default["default"].string,
|
|
6860
7060
|
optionsBorderRadius: PropTypes__default["default"].string,
|
|
6861
7061
|
optionsBackgroundColor: PropTypes__default["default"].string,
|
|
@@ -7186,9 +7386,9 @@ Toast.propTypes = {
|
|
|
7186
7386
|
type: PropTypes__default["default"].oneOf(Object.values(ToasterType)).isRequired
|
|
7187
7387
|
};
|
|
7188
7388
|
|
|
7189
|
-
let toastify = document.getElementById('toastify');
|
|
7190
7389
|
let path = window.location.href;
|
|
7191
7390
|
const removeToast = ref => {
|
|
7391
|
+
let toastify = document.getElementById('toastify');
|
|
7192
7392
|
if (ref.current) {
|
|
7193
7393
|
const node = ref.current;
|
|
7194
7394
|
const removeElem = node.parentNode;
|
|
@@ -7262,6 +7462,7 @@ const createToast = ({
|
|
|
7262
7462
|
styleProps,
|
|
7263
7463
|
description
|
|
7264
7464
|
}) => {
|
|
7465
|
+
let toastify = document.getElementById('toastify');
|
|
7265
7466
|
let innerConfigStyles = {};
|
|
7266
7467
|
let toastParentBlock;
|
|
7267
7468
|
if (!toastify) {
|
|
@@ -7361,6 +7562,7 @@ const Toaster = () => {
|
|
|
7361
7562
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
7362
7563
|
window.addEventListener('popstate', () => {
|
|
7363
7564
|
if (path !== window.location.href) {
|
|
7565
|
+
let toastify = document.getElementById('toastify');
|
|
7364
7566
|
if (!toastify) {
|
|
7365
7567
|
toastify = document.createElement('div');
|
|
7366
7568
|
toastify.setAttribute('id', 'toastify');
|
|
@@ -7433,7 +7635,6 @@ const Tooltip = ({
|
|
|
7433
7635
|
width,
|
|
7434
7636
|
color,
|
|
7435
7637
|
height,
|
|
7436
|
-
radius,
|
|
7437
7638
|
fontSize,
|
|
7438
7639
|
hoverOpen,
|
|
7439
7640
|
className,
|
|
@@ -7441,9 +7642,10 @@ const Tooltip = ({
|
|
|
7441
7642
|
fontFamily,
|
|
7442
7643
|
fontWeight,
|
|
7443
7644
|
tooltipIcon,
|
|
7645
|
+
borderRadius,
|
|
7444
7646
|
tooltipWidth,
|
|
7445
|
-
tooltipRadius,
|
|
7446
7647
|
backgroundColor,
|
|
7648
|
+
tooltipBorderRadius,
|
|
7447
7649
|
tooltipBackgroundColor,
|
|
7448
7650
|
direction = 'top'
|
|
7449
7651
|
}) => {
|
|
@@ -7516,7 +7718,7 @@ const Tooltip = ({
|
|
|
7516
7718
|
style: {
|
|
7517
7719
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
7518
7720
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
7519
|
-
borderRadius:
|
|
7721
|
+
borderRadius: borderRadius ?? configStyles.TOOLTIP.parent.radius,
|
|
7520
7722
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
7521
7723
|
},
|
|
7522
7724
|
onClick: e => e.stopPropagation()
|
|
@@ -7525,7 +7727,7 @@ const Tooltip = ({
|
|
|
7525
7727
|
className: `${styles$6['tooltip']}`,
|
|
7526
7728
|
style: {
|
|
7527
7729
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
7528
|
-
borderRadius:
|
|
7730
|
+
borderRadius: tooltipBorderRadius ?? configStyles.TOOLTIP.radius,
|
|
7529
7731
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
7530
7732
|
top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? `calc(-${checkTooltipHeight + 7}px)` : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? 'calc(100% + 7px)' : direction === 'left' || direction === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : direction === 'left-top' || direction === 'right-top' ? '0px' : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(-${checkTooltipHeight - tooltipIconParentHeight}px)` : '0px',
|
|
7531
7733
|
left: direction === 'top' || direction === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? `-${checkTooltipWidth + 7}px` : direction === 'top-left' || direction === 'bottom-left' ? `0px` : direction === 'top-right' || direction === 'bottom-right' ? `-${checkTooltipWidth - tooltipIconParentWidth}px` : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? 'calc(100% + 7px)' : '0px'
|
|
@@ -7562,16 +7764,16 @@ Tooltip.propTypes = {
|
|
|
7562
7764
|
width: PropTypes__default["default"].string,
|
|
7563
7765
|
color: PropTypes__default["default"].string,
|
|
7564
7766
|
height: PropTypes__default["default"].string,
|
|
7565
|
-
radius: PropTypes__default["default"].string,
|
|
7566
7767
|
hoverOpen: PropTypes__default["default"].bool,
|
|
7567
7768
|
fontSize: PropTypes__default["default"].string,
|
|
7568
7769
|
fontStyle: PropTypes__default["default"].string,
|
|
7569
7770
|
className: PropTypes__default["default"].string,
|
|
7570
7771
|
fontFamily: PropTypes__default["default"].string,
|
|
7571
7772
|
fontWeight: PropTypes__default["default"].string,
|
|
7773
|
+
borderRadius: PropTypes__default["default"].string,
|
|
7572
7774
|
tooltipWidth: PropTypes__default["default"].string,
|
|
7573
7775
|
tooltipIcon: PropTypes__default["default"].element,
|
|
7574
|
-
|
|
7776
|
+
tooltipBorderRadius: PropTypes__default["default"].string,
|
|
7575
7777
|
text: PropTypes__default["default"].string.isRequired,
|
|
7576
7778
|
backgroundColor: PropTypes__default["default"].string,
|
|
7577
7779
|
tooltipBackgroundColor: PropTypes__default["default"].string,
|
|
@@ -7937,16 +8139,11 @@ const PositionSide = {
|
|
|
7937
8139
|
BOTTOM: 'bottom'
|
|
7938
8140
|
};
|
|
7939
8141
|
const Textarea = ({
|
|
7940
|
-
size,
|
|
7941
8142
|
name,
|
|
7942
|
-
style,
|
|
7943
|
-
family,
|
|
7944
|
-
weight,
|
|
7945
8143
|
width,
|
|
7946
8144
|
value,
|
|
7947
8145
|
height,
|
|
7948
8146
|
resize,
|
|
7949
|
-
radius,
|
|
7950
8147
|
padding,
|
|
7951
8148
|
disabled,
|
|
7952
8149
|
required,
|
|
@@ -7958,25 +8155,31 @@ const Textarea = ({
|
|
|
7958
8155
|
maxHeight,
|
|
7959
8156
|
boxSizing,
|
|
7960
8157
|
maxLength,
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
8158
|
+
fontSize,
|
|
8159
|
+
fontStyle,
|
|
8160
|
+
fontFamily,
|
|
8161
|
+
fontWeight,
|
|
8162
|
+
placeholder,
|
|
8163
|
+
borderRadius,
|
|
8164
|
+
errorMarginTop,
|
|
7966
8165
|
className,
|
|
7967
8166
|
errorColor,
|
|
7968
|
-
placeholder,
|
|
7969
8167
|
errorMessage,
|
|
8168
|
+
errorFontSize,
|
|
8169
|
+
errorFontStyle,
|
|
8170
|
+
errorFontWeight,
|
|
8171
|
+
errorFontFamily,
|
|
8172
|
+
borderWidth,
|
|
7970
8173
|
backgroundColor,
|
|
7971
8174
|
borderFocusColor,
|
|
7972
8175
|
borderHoverColor,
|
|
7973
8176
|
showCharacterCount,
|
|
7974
8177
|
label,
|
|
7975
|
-
labelSize,
|
|
7976
8178
|
labelColor,
|
|
7977
|
-
labelStyle,
|
|
7978
|
-
labelWeight,
|
|
7979
8179
|
labelDisplay,
|
|
8180
|
+
labelFontSize,
|
|
8181
|
+
labelFontStyle,
|
|
8182
|
+
labelFontWeight,
|
|
7980
8183
|
labelFontFamily,
|
|
7981
8184
|
labelMarginBottom,
|
|
7982
8185
|
lableShowMore,
|
|
@@ -8175,9 +8378,10 @@ const Textarea = ({
|
|
|
8175
8378
|
alignItems: 'center',
|
|
8176
8379
|
justifyContent: label ? 'space-between' : 'flex-end',
|
|
8177
8380
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8178
|
-
fontSize:
|
|
8381
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8382
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8179
8383
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8180
|
-
fontWeight:
|
|
8384
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8181
8385
|
marginBottom: labelMarginBottom ?? configStyles.TEXTAREA.label.marginBottom
|
|
8182
8386
|
}
|
|
8183
8387
|
}, label && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -8202,9 +8406,9 @@ const Textarea = ({
|
|
|
8202
8406
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8203
8407
|
className: styles$3['show-more-text'],
|
|
8204
8408
|
style: {
|
|
8205
|
-
fontSize:
|
|
8206
|
-
fontStyle:
|
|
8207
|
-
fontWeight:
|
|
8409
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8410
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8411
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8208
8412
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8209
8413
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8210
8414
|
},
|
|
@@ -8212,9 +8416,9 @@ const Textarea = ({
|
|
|
8212
8416
|
}, ' ', " ", labelShowLessText ?? configStyles.TEXTAREA.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.TEXTAREA.icon.required ? configStyles.TEXTAREA.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.TEXTAREA.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8213
8417
|
className: styles$3['show-more-text'],
|
|
8214
8418
|
style: {
|
|
8215
|
-
fontSize:
|
|
8216
|
-
fontStyle:
|
|
8217
|
-
fontWeight:
|
|
8419
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8420
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8421
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8218
8422
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family,
|
|
8219
8423
|
color: showMoreTextColor ?? configStyles.TEXTAREA.label.showMoreTextColor
|
|
8220
8424
|
},
|
|
@@ -8231,20 +8435,20 @@ const Textarea = ({
|
|
|
8231
8435
|
outline: 'none',
|
|
8232
8436
|
overflow: 'auto',
|
|
8233
8437
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
8234
|
-
fontSize: size ?? configStyles.TEXTAREA.font.size,
|
|
8235
|
-
fontStyle: style ?? configStyles.TEXTAREA.font.style,
|
|
8236
|
-
fontFamily: family ?? configStyles.TEXTAREA.font.family,
|
|
8237
|
-
fontWeight: weight ?? configStyles.TEXTAREA.font.weight,
|
|
8238
8438
|
height: height ?? configStyles.TEXTAREA.height,
|
|
8239
8439
|
padding: padding ?? configStyles.TEXTAREA.padding,
|
|
8240
|
-
borderRadius: radius ?? configStyles.TEXTAREA.radius,
|
|
8241
8440
|
minWidth: minWidth ?? configStyles.TEXTAREA.minWidth,
|
|
8242
8441
|
maxWidth: maxWidth ?? configStyles.TEXTAREA.maxWidth,
|
|
8442
|
+
fontSize: fontSize ?? configStyles.TEXTAREA.font.size,
|
|
8243
8443
|
minHeight: minHeight ?? configStyles.TEXTAREA.minHeight,
|
|
8244
8444
|
maxHeight: maxHeight ?? configStyles.TEXTAREA.maxHeight,
|
|
8245
8445
|
boxSizing: boxSizing ?? configStyles.TEXTAREA.box.sizing,
|
|
8446
|
+
fontStyle: fontStyle ?? configStyles.TEXTAREA.font.style,
|
|
8447
|
+
borderRadius: borderRadius ?? configStyles.TEXTAREA.radius,
|
|
8448
|
+
fontFamily: fontFamily ?? configStyles.TEXTAREA.font.family,
|
|
8449
|
+
fontWeight: fontWeight ?? configStyles.TEXTAREA.font.weight,
|
|
8246
8450
|
backgroundColor: backgroundColor ?? configStyles.TEXTAREA.colors.background,
|
|
8247
|
-
boxShadow: error ? errorColor ? `0 0 0
|
|
8451
|
+
boxShadow: error ? errorColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${errorColor}` : configStyles.TEXTAREA.error.box.shadow : isFocus ? borderFocusColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${borderFocusColor}` : configStyles.TEXTAREA.box.colors.focus : isHover ? borderHoverColor ? `0 0 0 ${borderWidth ? borderWidth : configStyles.TEXTAREA.box.width} ${borderHoverColor}` : configStyles.TEXTAREA.box.colors.hover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow,
|
|
8248
8452
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
8249
8453
|
},
|
|
8250
8454
|
name: name,
|
|
@@ -8263,8 +8467,9 @@ const Textarea = ({
|
|
|
8263
8467
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
8264
8468
|
style: {
|
|
8265
8469
|
color: labelColor ?? configStyles.TEXTAREA.label.color,
|
|
8266
|
-
fontSize:
|
|
8267
|
-
|
|
8470
|
+
fontSize: labelFontSize ?? configStyles.TEXTAREA.label.font.size,
|
|
8471
|
+
fontStyle: labelFontStyle ?? configStyles.TEXTAREA.label.font.style,
|
|
8472
|
+
fontWeight: labelFontWeight ?? configStyles.TEXTAREA.label.font.weight,
|
|
8268
8473
|
fontFamily: labelFontFamily ?? configStyles.TEXTAREA.label.font.family
|
|
8269
8474
|
}
|
|
8270
8475
|
}, maxLength - value.length, " \u0576\u056B\u0577")), error ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -8277,11 +8482,11 @@ const Textarea = ({
|
|
|
8277
8482
|
style: {
|
|
8278
8483
|
display: 'inline-block',
|
|
8279
8484
|
color: errorColor ?? configStyles.TEXTAREA.error.color,
|
|
8280
|
-
fontSize:
|
|
8281
|
-
fontStyle:
|
|
8282
|
-
fontWeight:
|
|
8283
|
-
fontFamily:
|
|
8284
|
-
marginTop:
|
|
8485
|
+
fontSize: errorFontSize ?? configStyles.TEXTAREA.error.font.size,
|
|
8486
|
+
fontStyle: errorFontStyle ?? configStyles.TEXTAREA.error.font.style,
|
|
8487
|
+
fontWeight: errorFontWeight ?? configStyles.TEXTAREA.error.font.weight,
|
|
8488
|
+
fontFamily: errorFontFamily ?? configStyles.TEXTAREA.error.font.family,
|
|
8489
|
+
marginTop: errorMarginTop ?? configStyles.TEXTAREA.error.marginTop
|
|
8285
8490
|
}
|
|
8286
8491
|
}, error)) : '');
|
|
8287
8492
|
};
|
|
@@ -8302,15 +8507,15 @@ Textarea.propTypes = {
|
|
|
8302
8507
|
minWidth: PropTypes__default["default"].string,
|
|
8303
8508
|
maxWidth: PropTypes__default["default"].string,
|
|
8304
8509
|
boxShadow: PropTypes__default["default"].string,
|
|
8305
|
-
marginTop: PropTypes__default["default"].string,
|
|
8306
8510
|
boxSizing: PropTypes__default["default"].string,
|
|
8307
8511
|
minHeight: PropTypes__default["default"].string,
|
|
8308
8512
|
maxHeight: PropTypes__default["default"].string,
|
|
8309
8513
|
maxLength: PropTypes__default["default"].number,
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8514
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
8515
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
8516
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
8517
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
8518
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
8314
8519
|
className: PropTypes__default["default"].string,
|
|
8315
8520
|
errorColor: PropTypes__default["default"].string,
|
|
8316
8521
|
placeholder: PropTypes__default["default"].string,
|
|
@@ -8321,10 +8526,10 @@ Textarea.propTypes = {
|
|
|
8321
8526
|
borderFocusColor: PropTypes__default["default"].string,
|
|
8322
8527
|
borderHoverColor: PropTypes__default["default"].string,
|
|
8323
8528
|
label: PropTypes__default["default"].string,
|
|
8324
|
-
|
|
8325
|
-
|
|
8529
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
8530
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
8326
8531
|
labelColor: PropTypes__default["default"].string,
|
|
8327
|
-
|
|
8532
|
+
labelFontWeight: PropTypes__default["default"].string,
|
|
8328
8533
|
labelDisplay: PropTypes__default["default"].string,
|
|
8329
8534
|
labelFontFamily: PropTypes__default["default"].string,
|
|
8330
8535
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
@@ -8673,7 +8878,7 @@ const Swipe = ({
|
|
|
8673
8878
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8674
8879
|
style: {
|
|
8675
8880
|
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
8676
|
-
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '
|
|
8881
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100dvh'
|
|
8677
8882
|
}
|
|
8678
8883
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8679
8884
|
style: {
|
|
@@ -8747,7 +8952,7 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
8747
8952
|
swipeBlock.style.zIndex = swipeCount;
|
|
8748
8953
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
8749
8954
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
8750
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8955
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100dvh';
|
|
8751
8956
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8752
8957
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
8753
8958
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -8789,10 +8994,10 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
8789
8994
|
swipable.style.left = '0px';
|
|
8790
8995
|
swipable.style.zIndex = 99999;
|
|
8791
8996
|
swipable.style.maxWidth = '100%';
|
|
8792
|
-
swipable.style.maxHeight = '
|
|
8997
|
+
swipable.style.maxHeight = '100dvh';
|
|
8793
8998
|
swipable.style.visibility = 'hidden';
|
|
8794
8999
|
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8795
|
-
swipable.style.height = widthParent ? '
|
|
9000
|
+
swipable.style.height = widthParent ? '100dvh' : '0px';
|
|
8796
9001
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8797
9002
|
swipable.classList.add(styles$2['visible']);
|
|
8798
9003
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
@@ -8848,7 +9053,17 @@ const swipe = {
|
|
|
8848
9053
|
return;
|
|
8849
9054
|
}
|
|
8850
9055
|
if (swipeCount === 0) {
|
|
8851
|
-
if (
|
|
9056
|
+
if (!hasOwnerProperty(props, 'underScroll')) {
|
|
9057
|
+
if (newConfigStyles.SWIPEMODAL && hasOwnerProperty(newConfigStyles.SWIPEMODAL, 'underScroll') && newConfigStyles.SWIPEMODAL.underScroll === false) {
|
|
9058
|
+
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
9059
|
+
document.head.appendChild(style);
|
|
9060
|
+
document.body.classList.add('tui-no-srcoll-class');
|
|
9061
|
+
document.documentElement.classList.add('tui-no-srcoll-class');
|
|
9062
|
+
document.documentElement.addEventListener('touchmove', ResetTouchRemove, {
|
|
9063
|
+
passive: false
|
|
9064
|
+
});
|
|
9065
|
+
}
|
|
9066
|
+
} else if (hasOwnerProperty(props, 'underScroll') && props.underScroll === false) {
|
|
8852
9067
|
style.textContent = `.tui-no-srcoll-class{overflow:hidden!important;}`;
|
|
8853
9068
|
document.head.appendChild(style);
|
|
8854
9069
|
document.body.classList.add('tui-no-srcoll-class');
|
|
@@ -8869,11 +9084,10 @@ const swipe = {
|
|
|
8869
9084
|
});
|
|
8870
9085
|
},
|
|
8871
9086
|
close: id => {
|
|
8872
|
-
let newConfigStyles = {};
|
|
8873
9087
|
configStylesPromise.then(data => {
|
|
8874
|
-
|
|
9088
|
+
({
|
|
8875
9089
|
...data
|
|
8876
|
-
};
|
|
9090
|
+
});
|
|
8877
9091
|
}, error => {
|
|
8878
9092
|
console.error(error);
|
|
8879
9093
|
});
|
|
@@ -8895,14 +9109,12 @@ const swipe = {
|
|
|
8895
9109
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8896
9110
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8897
9111
|
document.body.removeChild(swipable);
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8905
|
-
}
|
|
9112
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9113
|
+
if (noScrllable) {
|
|
9114
|
+
style.remove();
|
|
9115
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9116
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9117
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8906
9118
|
}
|
|
8907
9119
|
}
|
|
8908
9120
|
}, 200);
|
|
@@ -8912,14 +9124,12 @@ const swipe = {
|
|
|
8912
9124
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8913
9125
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8914
9126
|
document.body.removeChild(swipable);
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8922
|
-
}
|
|
9127
|
+
const noScrllable = document.getElementsByClassName('tui-no-srcoll-class');
|
|
9128
|
+
if (noScrllable) {
|
|
9129
|
+
style.remove();
|
|
9130
|
+
document.body.classList.remove('tui-no-srcoll-class');
|
|
9131
|
+
document.documentElement.classList.remove('tui-no-srcoll-class');
|
|
9132
|
+
document.documentElement.removeEventListener('touchmove', ResetTouchRemove);
|
|
8923
9133
|
}
|
|
8924
9134
|
}
|
|
8925
9135
|
}
|
|
@@ -8952,21 +9162,21 @@ const TypographyType = {
|
|
|
8952
9162
|
span: 'span'
|
|
8953
9163
|
};
|
|
8954
9164
|
const Typography = ({
|
|
8955
|
-
size,
|
|
8956
9165
|
color,
|
|
8957
|
-
weight,
|
|
8958
|
-
radius,
|
|
8959
9166
|
border,
|
|
8960
9167
|
cursor,
|
|
8961
9168
|
onClick,
|
|
8962
9169
|
children,
|
|
9170
|
+
fontSize,
|
|
8963
9171
|
textAlign,
|
|
8964
9172
|
fontStyle,
|
|
8965
9173
|
className,
|
|
8966
9174
|
textShadow,
|
|
8967
9175
|
lineHeight,
|
|
8968
9176
|
colorHover,
|
|
9177
|
+
fontWeight,
|
|
8969
9178
|
fontFamily,
|
|
9179
|
+
borderRadius,
|
|
8970
9180
|
textTransform,
|
|
8971
9181
|
textDecoration,
|
|
8972
9182
|
backgroundColor,
|
|
@@ -8987,9 +9197,9 @@ const Typography = ({
|
|
|
8987
9197
|
style: {
|
|
8988
9198
|
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
8989
9199
|
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
8990
|
-
borderRadius:
|
|
8991
|
-
fontSize:
|
|
8992
|
-
fontWeight:
|
|
9200
|
+
borderRadius: borderRadius ?? configStyles.TYPOGRAPHY.radius,
|
|
9201
|
+
fontSize: fontSize ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
9202
|
+
fontWeight: fontWeight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
8993
9203
|
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
8994
9204
|
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
8995
9205
|
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
@@ -9031,10 +9241,8 @@ const Typography = ({
|
|
|
9031
9241
|
Typography.propTypes = {
|
|
9032
9242
|
color: PropTypes__default["default"].string,
|
|
9033
9243
|
onClick: PropTypes__default["default"].func,
|
|
9034
|
-
weight: PropTypes__default["default"].string,
|
|
9035
9244
|
border: PropTypes__default["default"].string,
|
|
9036
9245
|
cursor: PropTypes__default["default"].string,
|
|
9037
|
-
radius: PropTypes__default["default"].string,
|
|
9038
9246
|
textAlign: PropTypes__default["default"].string,
|
|
9039
9247
|
className: PropTypes__default["default"].string,
|
|
9040
9248
|
fontStyle: PropTypes__default["default"].string,
|
|
@@ -9042,11 +9250,13 @@ Typography.propTypes = {
|
|
|
9042
9250
|
textShadow: PropTypes__default["default"].string,
|
|
9043
9251
|
fontFamily: PropTypes__default["default"].string,
|
|
9044
9252
|
colorHover: PropTypes__default["default"].string,
|
|
9253
|
+
fontWeight: PropTypes__default["default"].string,
|
|
9254
|
+
borderRadius: PropTypes__default["default"].string,
|
|
9045
9255
|
textTransform: PropTypes__default["default"].string,
|
|
9046
9256
|
textDecoration: PropTypes__default["default"].string,
|
|
9047
9257
|
backgroundColor: PropTypes__default["default"].string,
|
|
9048
9258
|
variant: PropTypes__default["default"].oneOf(Object.values(TypographyType)),
|
|
9049
|
-
|
|
9259
|
+
fontSize: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
|
|
9050
9260
|
};
|
|
9051
9261
|
|
|
9052
9262
|
const Dots = '...';
|
|
@@ -9510,12 +9720,13 @@ const Autocomplete = ({
|
|
|
9510
9720
|
required,
|
|
9511
9721
|
selected,
|
|
9512
9722
|
className,
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9723
|
+
errorFontSize,
|
|
9724
|
+
errorFontStyle,
|
|
9725
|
+
errorFontWeight,
|
|
9726
|
+
errorFontFamily,
|
|
9727
|
+
errorMarginTop,
|
|
9518
9728
|
errorColor,
|
|
9729
|
+
errorInContent,
|
|
9519
9730
|
placeHolder,
|
|
9520
9731
|
errorMessage,
|
|
9521
9732
|
autoComplete,
|
|
@@ -9573,11 +9784,11 @@ const Autocomplete = ({
|
|
|
9573
9784
|
contentBottomRowHoverBackgroundColor,
|
|
9574
9785
|
backgroundDisableColor,
|
|
9575
9786
|
label,
|
|
9576
|
-
labelSize,
|
|
9577
|
-
labelStyle,
|
|
9578
9787
|
labelColor,
|
|
9579
|
-
labelWeight,
|
|
9580
9788
|
labelDisplay,
|
|
9789
|
+
labelFontSize,
|
|
9790
|
+
labelFontStyle,
|
|
9791
|
+
labelFontWeight,
|
|
9581
9792
|
labelLineHeight,
|
|
9582
9793
|
labelFontFamily,
|
|
9583
9794
|
labelMarginBottom,
|
|
@@ -9717,14 +9928,15 @@ const Autocomplete = ({
|
|
|
9717
9928
|
}, item[keyNames.name]);
|
|
9718
9929
|
}))) : innerError ? '' : innerValue.length <= 0 ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9719
9930
|
style: {
|
|
9720
|
-
position: 'absolute',
|
|
9931
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9721
9932
|
zIndex: '1',
|
|
9722
9933
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9723
|
-
fontSize:
|
|
9724
|
-
fontStyle:
|
|
9725
|
-
fontWeight:
|
|
9726
|
-
fontFamily:
|
|
9727
|
-
|
|
9934
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
9935
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
9936
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
9937
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
9938
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
9939
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9728
9940
|
padding: innerErrorPadding ?? configStyles.AUTOCOMPLETE.innerError.padding,
|
|
9729
9941
|
height: contentBottomRowHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.height,
|
|
9730
9942
|
lineHeight: contentBottomRowLineHeight ?? configStyles.AUTOCOMPLETE.contentBottom.row.lineHeight,
|
|
@@ -9893,9 +10105,9 @@ const Autocomplete = ({
|
|
|
9893
10105
|
style: {
|
|
9894
10106
|
color: labelColor ?? configStyles.AUTOCOMPLETE.label.color,
|
|
9895
10107
|
display: labelDisplay ?? configStyles.AUTOCOMPLETE.label.display,
|
|
9896
|
-
fontSize:
|
|
9897
|
-
fontStyle:
|
|
9898
|
-
fontWeight:
|
|
10108
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10109
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10110
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9899
10111
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9900
10112
|
lineHeight: labelLineHeight ?? configStyles.AUTOCOMPLETE.label.lineHeight,
|
|
9901
10113
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom,
|
|
@@ -9910,9 +10122,9 @@ const Autocomplete = ({
|
|
|
9910
10122
|
}, label, handleCheckTextWidth() === 'more' && showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9911
10123
|
className: styles['show-more-text'],
|
|
9912
10124
|
style: {
|
|
9913
|
-
fontSize:
|
|
9914
|
-
fontStyle:
|
|
9915
|
-
fontWeight:
|
|
10125
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10126
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10127
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9916
10128
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9917
10129
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor
|
|
9918
10130
|
},
|
|
@@ -9920,9 +10132,9 @@ const Autocomplete = ({
|
|
|
9920
10132
|
}, ' ', " ", labelShowLessText ?? configStyles.AUTOCOMPLETE.label.showLessText) : ''), required && /*#__PURE__*/React__default["default"].createElement("sup", null, iconRequired ? iconRequired : configStyles.FILE.icon.required ? configStyles.FILE.icon.required : /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), handleCheckTextWidth() === 'more' && !showMore && (lableShowMore || configStyles.AUTOCOMPLETE.label.showMore) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9921
10133
|
className: styles['show-more-text'],
|
|
9922
10134
|
style: {
|
|
9923
|
-
fontSize:
|
|
9924
|
-
fontStyle:
|
|
9925
|
-
fontWeight:
|
|
10135
|
+
fontSize: labelFontSize ?? configStyles.AUTOCOMPLETE.label.font.size,
|
|
10136
|
+
fontStyle: labelFontStyle ?? configStyles.AUTOCOMPLETE.label.font.style,
|
|
10137
|
+
fontWeight: labelFontWeight ?? configStyles.AUTOCOMPLETE.label.font.weight,
|
|
9926
10138
|
fontFamily: labelFontFamily ?? configStyles.AUTOCOMPLETE.label.font.family,
|
|
9927
10139
|
color: showMoreTextColor ?? configStyles.AUTOCOMPLETE.label.showMoreTextColor,
|
|
9928
10140
|
marginBottom: labelMarginBottom ?? configStyles.AUTOCOMPLETE.label.marginBottom
|
|
@@ -9971,13 +10183,14 @@ const Autocomplete = ({
|
|
|
9971
10183
|
}, props)), innerError ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9972
10184
|
style: {
|
|
9973
10185
|
left: '0px',
|
|
9974
|
-
position: 'absolute',
|
|
10186
|
+
position: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? 'static' : 'absolute',
|
|
9975
10187
|
color: errorColor ?? configStyles.AUTOCOMPLETE.error.color,
|
|
9976
|
-
fontSize:
|
|
9977
|
-
fontStyle:
|
|
9978
|
-
fontWeight:
|
|
9979
|
-
fontFamily:
|
|
9980
|
-
|
|
10188
|
+
fontSize: errorFontSize ?? configStyles.AUTOCOMPLETE.error.font.size,
|
|
10189
|
+
fontStyle: errorFontStyle ?? configStyles.AUTOCOMPLETE.error.font.style,
|
|
10190
|
+
fontWeight: errorFontWeight ?? configStyles.AUTOCOMPLETE.error.font.weight,
|
|
10191
|
+
fontFamily: errorFontFamily ?? configStyles.AUTOCOMPLETE.error.font.family,
|
|
10192
|
+
marginTop: (errorInContent ? errorInContent : configStyles.AUTOCOMPLETE.error.inContent) ? errorMarginTop ?? configStyles.AUTOCOMPLETE.error.marginTop : '0px',
|
|
10193
|
+
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.AUTOCOMPLETE.error.marginTop})`,
|
|
9981
10194
|
maxWidth: contentTopMaxWidth ?? configStyles.AUTOCOMPLETE.maxWidth
|
|
9982
10195
|
}
|
|
9983
10196
|
}, innerError) : '', optionList));
|
|
@@ -9989,18 +10202,19 @@ Autocomplete.propTypes = {
|
|
|
9989
10202
|
keyNames: PropTypes__default["default"].object,
|
|
9990
10203
|
selected: PropTypes__default["default"].object,
|
|
9991
10204
|
className: PropTypes__default["default"].string,
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
labelSize: PropTypes__default["default"].string,
|
|
9998
|
-
labelStyle: PropTypes__default["default"].string,
|
|
10205
|
+
errorFontSize: PropTypes__default["default"].string,
|
|
10206
|
+
errorFontStyle: PropTypes__default["default"].string,
|
|
10207
|
+
errorFontWeight: PropTypes__default["default"].string,
|
|
10208
|
+
errorFontFamily: PropTypes__default["default"].string,
|
|
10209
|
+
errorMarginTop: PropTypes__default["default"].string,
|
|
9999
10210
|
errorColor: PropTypes__default["default"].string,
|
|
10000
10211
|
labelColor: PropTypes__default["default"].string,
|
|
10001
10212
|
searchCount: PropTypes__default["default"].number,
|
|
10002
10213
|
placeHolder: PropTypes__default["default"].string,
|
|
10003
|
-
|
|
10214
|
+
labelFontSize: PropTypes__default["default"].string,
|
|
10215
|
+
labelFontStyle: PropTypes__default["default"].string,
|
|
10216
|
+
labelFontWeight: PropTypes__default["default"].number,
|
|
10217
|
+
errorInContent: PropTypes__default["default"].bool,
|
|
10004
10218
|
errorMessage: PropTypes__default["default"].string,
|
|
10005
10219
|
labelDisplay: PropTypes__default["default"].string,
|
|
10006
10220
|
autoComplete: PropTypes__default["default"].string,
|