@xaypay/tui 0.0.106 → 0.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +21 -11
- package/dist/index.js +21 -11
- package/package.json +1 -1
- package/src/components/newFile/fileItem.js +2 -1
- package/src/components/newFile/index.js +4 -0
- package/src/components/select/index.js +2 -2
- package/src/components/toaster/Toast.js +7 -3
- package/src/components/toaster/index.js +2 -1
- package/src/components/toaster/toaster.module.css +13 -0
- package/src/components/toaster/toaster.stories.js +1 -1
- package/src/stories/configuration.stories.mdx +1 -0
- package/tui.config.js +2 -1
package/dist/index.es.js
CHANGED
|
@@ -1610,7 +1610,8 @@ const Select = ({
|
|
|
1610
1610
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1611
1611
|
className: classProps,
|
|
1612
1612
|
style: {
|
|
1613
|
-
position: 'relative'
|
|
1613
|
+
position: 'relative',
|
|
1614
|
+
width: '100%'
|
|
1614
1615
|
}
|
|
1615
1616
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
1616
1617
|
style: {
|
|
@@ -1651,7 +1652,7 @@ const Select = ({
|
|
|
1651
1652
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1652
1653
|
className: `${styles$8['select-content-top-text']}`,
|
|
1653
1654
|
style: {
|
|
1654
|
-
whiteSpace: 'nowrap',
|
|
1655
|
+
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
1655
1656
|
overflow: 'hidden',
|
|
1656
1657
|
textOverflow: 'ellipsis',
|
|
1657
1658
|
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
|
|
@@ -1877,10 +1878,11 @@ const SvgToasterSuccess = ({
|
|
|
1877
1878
|
fill: fillColor ? fillColor : '#0DA574'
|
|
1878
1879
|
}));
|
|
1879
1880
|
|
|
1880
|
-
var css_248z$9 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
1881
|
-
var styles$7 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
1881
|
+
var css_248z$9 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
1882
|
+
var styles$7 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
1882
1883
|
styleInject(css_248z$9);
|
|
1883
1884
|
|
|
1885
|
+
let wWidth$1 = window.innerWidth;
|
|
1884
1886
|
const ToasterType = {
|
|
1885
1887
|
info: 'info',
|
|
1886
1888
|
warn: 'warn',
|
|
@@ -1933,7 +1935,7 @@ const Toast = ({
|
|
|
1933
1935
|
style: {
|
|
1934
1936
|
position: 'absolute',
|
|
1935
1937
|
display: 'flex',
|
|
1936
|
-
width: '440px',
|
|
1938
|
+
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
1937
1939
|
height: '83px',
|
|
1938
1940
|
borderRadius: '40px',
|
|
1939
1941
|
alignItems: 'center',
|
|
@@ -1970,8 +1972,9 @@ const Toast = ({
|
|
|
1970
1972
|
fontSize: '16px',
|
|
1971
1973
|
lineHeight: '22px',
|
|
1972
1974
|
fontStyle: 'normal'
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
+
},
|
|
1976
|
+
className: styles$7['notify-title']
|
|
1977
|
+
}, title ? title : ''), /*#__PURE__*/React__default.createElement("span", {
|
|
1975
1978
|
style: {
|
|
1976
1979
|
fontWeight: 500,
|
|
1977
1980
|
color: '#3C393E',
|
|
@@ -1980,8 +1983,9 @@ const Toast = ({
|
|
|
1980
1983
|
fontStyle: 'normal',
|
|
1981
1984
|
fontFamily: '',
|
|
1982
1985
|
opacity: 0.8
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1986
|
+
},
|
|
1987
|
+
className: styles$7['notify-desc']
|
|
1988
|
+
}, description ? description : '')), /*#__PURE__*/React__default.createElement("div", {
|
|
1985
1989
|
onClick: () => handleCloseToaster(ref),
|
|
1986
1990
|
style: {
|
|
1987
1991
|
width: '18px',
|
|
@@ -2006,6 +2010,7 @@ Toast.defaultProps = {
|
|
|
2006
2010
|
|
|
2007
2011
|
let toastify;
|
|
2008
2012
|
let path = window.location.href;
|
|
2013
|
+
let wWidth = window.innerWidth;
|
|
2009
2014
|
const removeToast = ref => {
|
|
2010
2015
|
// eslint-disable-next-line react/no-find-dom-node
|
|
2011
2016
|
const node = ReactDOM.findDOMNode(ref.current);
|
|
@@ -2030,7 +2035,7 @@ const createToast = ({
|
|
|
2030
2035
|
const toastBlock = document.createElement('div');
|
|
2031
2036
|
toastBlock.style.position = 'relative';
|
|
2032
2037
|
toastBlock.style.flexShrink = 0;
|
|
2033
|
-
toastBlock.style.width = '440px';
|
|
2038
|
+
toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
|
|
2034
2039
|
toastBlock.style.height = '83px';
|
|
2035
2040
|
toastBlock.style.marginBottom = '20px';
|
|
2036
2041
|
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
@@ -2622,6 +2627,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
2622
2627
|
listItemPadding,
|
|
2623
2628
|
progressFontSize,
|
|
2624
2629
|
listItemErrorSize,
|
|
2630
|
+
timeForRemoveError,
|
|
2625
2631
|
listItemErrorColor,
|
|
2626
2632
|
progressTrackColor,
|
|
2627
2633
|
progressFailedColor,
|
|
@@ -2674,7 +2680,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
2674
2680
|
if (check !== '') {
|
|
2675
2681
|
setT(setTimeout(() => {
|
|
2676
2682
|
removeFile(uuid);
|
|
2677
|
-
},
|
|
2683
|
+
}, timeForRemoveError));
|
|
2678
2684
|
}
|
|
2679
2685
|
}, [check]);
|
|
2680
2686
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2881,6 +2887,7 @@ const NewFile = ({
|
|
|
2881
2887
|
fileAreaImageWidth,
|
|
2882
2888
|
listItemErrorColor,
|
|
2883
2889
|
labelRequiredColor,
|
|
2890
|
+
timeForRemoveError,
|
|
2884
2891
|
progressFailedColor,
|
|
2885
2892
|
fileAreaImageHeight,
|
|
2886
2893
|
progressSuccessColor,
|
|
@@ -3170,6 +3177,7 @@ const NewFile = ({
|
|
|
3170
3177
|
status: item.status,
|
|
3171
3178
|
size: item.file.size,
|
|
3172
3179
|
name: item.file.name,
|
|
3180
|
+
timeForRemoveError: timeForRemoveError,
|
|
3173
3181
|
removeFile: removeFile ? removeFile : _ => _,
|
|
3174
3182
|
radius: radius ? radius : configStyles.File.radius,
|
|
3175
3183
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
@@ -3225,6 +3233,7 @@ NewFile.propTypes = {
|
|
|
3225
3233
|
progressFontSize: PropTypes.string,
|
|
3226
3234
|
borderHoverColor: PropTypes.string,
|
|
3227
3235
|
listItemErrorSize: PropTypes.string,
|
|
3236
|
+
timeForRemoveError: PropTypes.number,
|
|
3228
3237
|
labelRequiredColor: PropTypes.string,
|
|
3229
3238
|
progressTrackColor: PropTypes.string,
|
|
3230
3239
|
fileAreaImageWidth: PropTypes.string,
|
|
@@ -3242,6 +3251,7 @@ NewFile.propTypes = {
|
|
|
3242
3251
|
};
|
|
3243
3252
|
NewFile.defaultProps = {
|
|
3244
3253
|
maxSize: 10,
|
|
3254
|
+
timeForRemoveError: 4000,
|
|
3245
3255
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
3246
3256
|
};
|
|
3247
3257
|
|
package/dist/index.js
CHANGED
|
@@ -1640,7 +1640,8 @@ const Select = ({
|
|
|
1640
1640
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1641
1641
|
className: classProps,
|
|
1642
1642
|
style: {
|
|
1643
|
-
position: 'relative'
|
|
1643
|
+
position: 'relative',
|
|
1644
|
+
width: '100%'
|
|
1644
1645
|
}
|
|
1645
1646
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
1646
1647
|
style: {
|
|
@@ -1681,7 +1682,7 @@ const Select = ({
|
|
|
1681
1682
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1682
1683
|
className: `${styles$8['select-content-top-text']}`,
|
|
1683
1684
|
style: {
|
|
1684
|
-
whiteSpace: 'nowrap',
|
|
1685
|
+
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
1685
1686
|
overflow: 'hidden',
|
|
1686
1687
|
textOverflow: 'ellipsis',
|
|
1687
1688
|
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
|
|
@@ -1907,10 +1908,11 @@ const SvgToasterSuccess = ({
|
|
|
1907
1908
|
fill: fillColor ? fillColor : '#0DA574'
|
|
1908
1909
|
}));
|
|
1909
1910
|
|
|
1910
|
-
var css_248z$9 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
1911
|
-
var styles$7 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
1911
|
+
var css_248z$9 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
1912
|
+
var styles$7 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
1912
1913
|
styleInject(css_248z$9);
|
|
1913
1914
|
|
|
1915
|
+
let wWidth$1 = window.innerWidth;
|
|
1914
1916
|
const ToasterType = {
|
|
1915
1917
|
info: 'info',
|
|
1916
1918
|
warn: 'warn',
|
|
@@ -1963,7 +1965,7 @@ const Toast = ({
|
|
|
1963
1965
|
style: {
|
|
1964
1966
|
position: 'absolute',
|
|
1965
1967
|
display: 'flex',
|
|
1966
|
-
width: '440px',
|
|
1968
|
+
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
1967
1969
|
height: '83px',
|
|
1968
1970
|
borderRadius: '40px',
|
|
1969
1971
|
alignItems: 'center',
|
|
@@ -2000,8 +2002,9 @@ const Toast = ({
|
|
|
2000
2002
|
fontSize: '16px',
|
|
2001
2003
|
lineHeight: '22px',
|
|
2002
2004
|
fontStyle: 'normal'
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
+
},
|
|
2006
|
+
className: styles$7['notify-title']
|
|
2007
|
+
}, title ? title : ''), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2005
2008
|
style: {
|
|
2006
2009
|
fontWeight: 500,
|
|
2007
2010
|
color: '#3C393E',
|
|
@@ -2010,8 +2013,9 @@ const Toast = ({
|
|
|
2010
2013
|
fontStyle: 'normal',
|
|
2011
2014
|
fontFamily: '',
|
|
2012
2015
|
opacity: 0.8
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2016
|
+
},
|
|
2017
|
+
className: styles$7['notify-desc']
|
|
2018
|
+
}, description ? description : '')), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2015
2019
|
onClick: () => handleCloseToaster(ref),
|
|
2016
2020
|
style: {
|
|
2017
2021
|
width: '18px',
|
|
@@ -2036,6 +2040,7 @@ Toast.defaultProps = {
|
|
|
2036
2040
|
|
|
2037
2041
|
let toastify;
|
|
2038
2042
|
let path = window.location.href;
|
|
2043
|
+
let wWidth = window.innerWidth;
|
|
2039
2044
|
const removeToast = ref => {
|
|
2040
2045
|
// eslint-disable-next-line react/no-find-dom-node
|
|
2041
2046
|
const node = ReactDOM__default["default"].findDOMNode(ref.current);
|
|
@@ -2060,7 +2065,7 @@ const createToast = ({
|
|
|
2060
2065
|
const toastBlock = document.createElement('div');
|
|
2061
2066
|
toastBlock.style.position = 'relative';
|
|
2062
2067
|
toastBlock.style.flexShrink = 0;
|
|
2063
|
-
toastBlock.style.width = '440px';
|
|
2068
|
+
toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
|
|
2064
2069
|
toastBlock.style.height = '83px';
|
|
2065
2070
|
toastBlock.style.marginBottom = '20px';
|
|
2066
2071
|
const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
|
|
@@ -2652,6 +2657,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
2652
2657
|
listItemPadding,
|
|
2653
2658
|
progressFontSize,
|
|
2654
2659
|
listItemErrorSize,
|
|
2660
|
+
timeForRemoveError,
|
|
2655
2661
|
listItemErrorColor,
|
|
2656
2662
|
progressTrackColor,
|
|
2657
2663
|
progressFailedColor,
|
|
@@ -2704,7 +2710,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
2704
2710
|
if (check !== '') {
|
|
2705
2711
|
setT(setTimeout(() => {
|
|
2706
2712
|
removeFile(uuid);
|
|
2707
|
-
},
|
|
2713
|
+
}, timeForRemoveError));
|
|
2708
2714
|
}
|
|
2709
2715
|
}, [check]);
|
|
2710
2716
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2911,6 +2917,7 @@ const NewFile = ({
|
|
|
2911
2917
|
fileAreaImageWidth,
|
|
2912
2918
|
listItemErrorColor,
|
|
2913
2919
|
labelRequiredColor,
|
|
2920
|
+
timeForRemoveError,
|
|
2914
2921
|
progressFailedColor,
|
|
2915
2922
|
fileAreaImageHeight,
|
|
2916
2923
|
progressSuccessColor,
|
|
@@ -3200,6 +3207,7 @@ const NewFile = ({
|
|
|
3200
3207
|
status: item.status,
|
|
3201
3208
|
size: item.file.size,
|
|
3202
3209
|
name: item.file.name,
|
|
3210
|
+
timeForRemoveError: timeForRemoveError,
|
|
3203
3211
|
removeFile: removeFile ? removeFile : _ => _,
|
|
3204
3212
|
radius: radius ? radius : configStyles.File.radius,
|
|
3205
3213
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
@@ -3255,6 +3263,7 @@ NewFile.propTypes = {
|
|
|
3255
3263
|
progressFontSize: PropTypes__default["default"].string,
|
|
3256
3264
|
borderHoverColor: PropTypes__default["default"].string,
|
|
3257
3265
|
listItemErrorSize: PropTypes__default["default"].string,
|
|
3266
|
+
timeForRemoveError: PropTypes__default["default"].number,
|
|
3258
3267
|
labelRequiredColor: PropTypes__default["default"].string,
|
|
3259
3268
|
progressTrackColor: PropTypes__default["default"].string,
|
|
3260
3269
|
fileAreaImageWidth: PropTypes__default["default"].string,
|
|
@@ -3272,6 +3281,7 @@ NewFile.propTypes = {
|
|
|
3272
3281
|
};
|
|
3273
3282
|
NewFile.defaultProps = {
|
|
3274
3283
|
maxSize: 10,
|
|
3284
|
+
timeForRemoveError: 4000,
|
|
3275
3285
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
3276
3286
|
};
|
|
3277
3287
|
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ const FileItem = React.memo(
|
|
|
22
22
|
listItemPadding,
|
|
23
23
|
progressFontSize,
|
|
24
24
|
listItemErrorSize,
|
|
25
|
+
timeForRemoveError,
|
|
25
26
|
listItemErrorColor,
|
|
26
27
|
progressTrackColor,
|
|
27
28
|
progressFailedColor,
|
|
@@ -89,7 +90,7 @@ const FileItem = React.memo(
|
|
|
89
90
|
setT(
|
|
90
91
|
setTimeout(() => {
|
|
91
92
|
removeFile(uuid)
|
|
92
|
-
},
|
|
93
|
+
}, timeForRemoveError)
|
|
93
94
|
)
|
|
94
95
|
}
|
|
95
96
|
}, [check])
|
|
@@ -57,6 +57,7 @@ export const NewFile = ({
|
|
|
57
57
|
fileAreaImageWidth,
|
|
58
58
|
listItemErrorColor,
|
|
59
59
|
labelRequiredColor,
|
|
60
|
+
timeForRemoveError,
|
|
60
61
|
progressFailedColor,
|
|
61
62
|
fileAreaImageHeight,
|
|
62
63
|
progressSuccessColor,
|
|
@@ -459,6 +460,7 @@ export const NewFile = ({
|
|
|
459
460
|
status={item.status}
|
|
460
461
|
size={item.file.size}
|
|
461
462
|
name={item.file.name}
|
|
463
|
+
timeForRemoveError={timeForRemoveError}
|
|
462
464
|
removeFile={removeFile ? removeFile : (_) => _}
|
|
463
465
|
radius={radius ? radius : configStyles.File.radius}
|
|
464
466
|
fileFormat={item.file.type.split('/')[1]?.toLowerCase()}
|
|
@@ -538,6 +540,7 @@ NewFile.propTypes = {
|
|
|
538
540
|
progressFontSize: PropTypes.string,
|
|
539
541
|
borderHoverColor: PropTypes.string,
|
|
540
542
|
listItemErrorSize: PropTypes.string,
|
|
543
|
+
timeForRemoveError: PropTypes.number,
|
|
541
544
|
labelRequiredColor: PropTypes.string,
|
|
542
545
|
progressTrackColor: PropTypes.string,
|
|
543
546
|
fileAreaImageWidth: PropTypes.string,
|
|
@@ -556,5 +559,6 @@ NewFile.propTypes = {
|
|
|
556
559
|
|
|
557
560
|
NewFile.defaultProps = {
|
|
558
561
|
maxSize: 10,
|
|
562
|
+
timeForRemoveError: 4000,
|
|
559
563
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf'],
|
|
560
564
|
}
|
|
@@ -204,7 +204,7 @@ export const Select = ({
|
|
|
204
204
|
}, [options, multiple, selected, selected?.length])
|
|
205
205
|
|
|
206
206
|
return (
|
|
207
|
-
<div className={classProps} style={{ position: 'relative' }}>
|
|
207
|
+
<div className={classProps} style={{ position: 'relative', width: '100%' }}>
|
|
208
208
|
{label ? (
|
|
209
209
|
<label
|
|
210
210
|
style={{
|
|
@@ -270,7 +270,7 @@ export const Select = ({
|
|
|
270
270
|
<div
|
|
271
271
|
className={`${styles['select-content-top-text']}`}
|
|
272
272
|
style={{
|
|
273
|
-
whiteSpace: 'nowrap',
|
|
273
|
+
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
274
274
|
overflow: 'hidden',
|
|
275
275
|
textOverflow: 'ellipsis',
|
|
276
276
|
color: errorMessage
|
|
@@ -9,6 +9,8 @@ import ToasterSuccess from '../icon/ToasterSuccess'
|
|
|
9
9
|
|
|
10
10
|
import styles from './toaster.module.css'
|
|
11
11
|
|
|
12
|
+
let wWidth = window.innerWidth
|
|
13
|
+
|
|
12
14
|
const ToasterType = {
|
|
13
15
|
info: 'info',
|
|
14
16
|
warn: 'warn',
|
|
@@ -62,7 +64,7 @@ export const Toast = ({ type, title, timer, position, removeToast, description }
|
|
|
62
64
|
style={{
|
|
63
65
|
position: 'absolute',
|
|
64
66
|
display: 'flex',
|
|
65
|
-
width: '440px',
|
|
67
|
+
width: wWidth > 480 ? '440px' : '300px',
|
|
66
68
|
height: '83px',
|
|
67
69
|
borderRadius: '40px',
|
|
68
70
|
alignItems: 'center',
|
|
@@ -151,8 +153,9 @@ export const Toast = ({ type, title, timer, position, removeToast, description }
|
|
|
151
153
|
lineHeight: '22px',
|
|
152
154
|
fontStyle: 'normal',
|
|
153
155
|
}}
|
|
156
|
+
className={styles['notify-title']}
|
|
154
157
|
>
|
|
155
|
-
{title ?
|
|
158
|
+
{title ? title : ''}
|
|
156
159
|
</p>
|
|
157
160
|
<span
|
|
158
161
|
style={{
|
|
@@ -164,8 +167,9 @@ export const Toast = ({ type, title, timer, position, removeToast, description }
|
|
|
164
167
|
fontFamily: '',
|
|
165
168
|
opacity: 0.8,
|
|
166
169
|
}}
|
|
170
|
+
className={styles['notify-desc']}
|
|
167
171
|
>
|
|
168
|
-
{description ?
|
|
172
|
+
{description ? description : ''}
|
|
169
173
|
</span>
|
|
170
174
|
</div>
|
|
171
175
|
|
|
@@ -7,6 +7,7 @@ import styles from './toaster.module.css'
|
|
|
7
7
|
|
|
8
8
|
let toastify
|
|
9
9
|
let path = window.location.href
|
|
10
|
+
let wWidth = window.innerWidth
|
|
10
11
|
|
|
11
12
|
const removeToast = (ref) => {
|
|
12
13
|
// eslint-disable-next-line react/no-find-dom-node
|
|
@@ -30,7 +31,7 @@ const createToast = ({ type, timer, title, position, description }) => {
|
|
|
30
31
|
const toastBlock = document.createElement('div')
|
|
31
32
|
toastBlock.style.position = 'relative'
|
|
32
33
|
toastBlock.style.flexShrink = 0
|
|
33
|
-
toastBlock.style.width = '440px'
|
|
34
|
+
toastBlock.style.width = wWidth > 480 ? '440px' : '300px'
|
|
34
35
|
toastBlock.style.height = '83px'
|
|
35
36
|
toastBlock.style.marginBottom = '20px'
|
|
36
37
|
const newElem = React.createElement(Toast, {
|
|
@@ -95,6 +95,19 @@
|
|
|
95
95
|
animation-name: bounceOutRight;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.notify-title {
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.notify-desc {
|
|
104
|
+
display: -webkit-box;
|
|
105
|
+
-webkit-box-orient: vertical;
|
|
106
|
+
-webkit-line-clamp: 2;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
text-overflow: ellipsis;
|
|
109
|
+
}
|
|
110
|
+
|
|
98
111
|
@keyframes bounceInRight {
|
|
99
112
|
from {
|
|
100
113
|
opacity: 0;
|
|
@@ -267,7 +267,7 @@ const Template = () => {
|
|
|
267
267
|
'info',
|
|
268
268
|
false,
|
|
269
269
|
'Տեղեկատվություն',
|
|
270
|
-
|
|
270
|
+
5000000000000,
|
|
271
271
|
'top-right',
|
|
272
272
|
'lorem ipsum bla bla bla, lorem ipsum bla bla bla, lorem ipsum bla bla bla, lorem ipsum bla bla bla, lorem ipsum bla bla bla'
|
|
273
273
|
)
|
|
@@ -556,6 +556,7 @@ import StackAlt from './assets/stackalt.svg';
|
|
|
556
556
|
borderColor: '#D1D1D1', // for file choose place border color
|
|
557
557
|
listItemHeight: '70px', // for file list item height
|
|
558
558
|
uploadColor: '#0DA574', // for file place upload text color
|
|
559
|
+
timeForRemoveError: 4000, // for file error hide time when format is wrong
|
|
559
560
|
progressColor: '#4A4A4D', // for file progress bar color
|
|
560
561
|
progressFontSize: '16px', // for file progress bar font size
|
|
561
562
|
listItemErrorSize: '16px', // for file multiple mode error font size
|
package/tui.config.js
CHANGED
|
@@ -350,7 +350,8 @@ module.exports = {
|
|
|
350
350
|
maxWidth: '440px', // for file width
|
|
351
351
|
labelSize: '16px', // for file font size
|
|
352
352
|
border: '2px dashed', // for file choose place border
|
|
353
|
-
labelColor: '#4A4A4D',
|
|
353
|
+
labelColor: '#4A4A4D', // for file color
|
|
354
|
+
timeForRemoveError: 4000, // for file error hide time when format is wrong
|
|
354
355
|
errorColor: '#ee0000', // for file place and error message error color
|
|
355
356
|
borderColor: '#D1D1D1', // for file choose place border color
|
|
356
357
|
listItemHeight: '70px', // for file list item height
|