@xaypay/tui 0.0.105 → 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.
Files changed (93) hide show
  1. package/.eslintrc.js +30 -0
  2. package/.husky/pre-commit +4 -0
  3. package/.prettierrc +10 -0
  4. package/.storybook/main.js +42 -45
  5. package/.storybook/preview.js +7 -7
  6. package/cli-command.js +1 -1
  7. package/dist/index.es.js +105 -94
  8. package/dist/index.js +105 -94
  9. package/package.json +16 -4
  10. package/rollup.config.js +11 -11
  11. package/src/assets_old/icons/demo-files/demo.js +16 -18
  12. package/src/components/autocomplate/autocomplate.stories.js +30 -28
  13. package/src/components/autocomplate/index.js +145 -127
  14. package/src/components/button/button.stories.js +6 -6
  15. package/src/components/button/index.js +176 -126
  16. package/src/components/captcha/captcha.stories.js +12 -8
  17. package/src/components/captcha/index.js +47 -50
  18. package/src/components/checkbox/checkbox.stories.js +7 -7
  19. package/src/components/checkbox/index.js +77 -93
  20. package/src/components/file/file.stories.js +15 -15
  21. package/src/components/file/index.js +114 -116
  22. package/src/components/icon/Arrow.js +18 -18
  23. package/src/components/icon/CaptchaArrowDown.js +18 -18
  24. package/src/components/icon/CaptchaArrowUp.js +18 -18
  25. package/src/components/icon/CheckboxChecked.js +20 -20
  26. package/src/components/icon/CheckboxUnchecked.js +20 -20
  27. package/src/components/icon/Close.js +18 -18
  28. package/src/components/icon/CloseIcon.js +18 -18
  29. package/src/components/icon/CloseSlide.js +18 -18
  30. package/src/components/icon/DeleteComponent.js +19 -19
  31. package/src/components/icon/Dots.js +18 -18
  32. package/src/components/icon/HeartFilled.js +22 -23
  33. package/src/components/icon/HeartOutline.js +22 -22
  34. package/src/components/icon/Icon.js +3 -5
  35. package/src/components/icon/ListItemDelete.js +18 -18
  36. package/src/components/icon/ListItemJpeg.js +20 -20
  37. package/src/components/icon/ListItemJpg.js +20 -20
  38. package/src/components/icon/ListItemPdf.js +20 -20
  39. package/src/components/icon/ListItemPng.js +20 -20
  40. package/src/components/icon/Next.js +19 -19
  41. package/src/components/icon/Nextarrow.js +18 -18
  42. package/src/components/icon/PDF.js +18 -18
  43. package/src/components/icon/Prev.js +19 -19
  44. package/src/components/icon/RangeArrowDefault.js +41 -52
  45. package/src/components/icon/RangeArrowError.js +41 -52
  46. package/src/components/icon/RangeArrowSuccess.js +41 -52
  47. package/src/components/icon/RemoveFile.js +19 -19
  48. package/src/components/icon/ToasterClose.js +18 -18
  49. package/src/components/icon/ToasterError.js +18 -18
  50. package/src/components/icon/ToasterInfo.js +18 -18
  51. package/src/components/icon/ToasterSuccess.js +18 -18
  52. package/src/components/icon/ToasterWarning.js +18 -18
  53. package/src/components/icon/Tooltip.js +18 -18
  54. package/src/components/icon/Upload.js +24 -24
  55. package/src/components/input/index.js +267 -224
  56. package/src/components/input/input.stories.js +20 -21
  57. package/src/components/modal/index.js +172 -159
  58. package/src/components/modal/modal.stories.js +79 -78
  59. package/src/components/newAutocomplete/NewAutocomplete.stories.js +93 -51
  60. package/src/components/newAutocomplete/index.js +342 -216
  61. package/src/components/newFile/fileItem.js +214 -191
  62. package/src/components/newFile/index.js +235 -173
  63. package/src/components/newFile/newFile.stories.js +32 -35
  64. package/src/components/pagination/index.js +97 -122
  65. package/src/components/pagination/pagination.stories.js +362 -362
  66. package/src/components/pagination/paginationRange.js +42 -53
  67. package/src/components/radio/index.js +49 -62
  68. package/src/components/radio/radio.stories.js +7 -7
  69. package/src/components/select/index.js +318 -223
  70. package/src/components/select/select.stories.js +25 -14
  71. package/src/components/singleCheckbox/Checkbox.js +31 -34
  72. package/src/components/singleCheckbox/index.js +36 -45
  73. package/src/components/singleCheckbox/singleCheckbox.stories.js +16 -16
  74. package/src/components/stepper/index.js +35 -30
  75. package/src/components/stepper/stepper.stories.js +11 -11
  76. package/src/components/table/index.js +280 -148
  77. package/src/components/table/table.stories.js +105 -217
  78. package/src/components/table/td.js +80 -72
  79. package/src/components/table/th.js +19 -16
  80. package/src/components/textarea/index.js +86 -62
  81. package/src/components/textarea/textarea.stories.js +10 -13
  82. package/src/components/toaster/Toast.js +180 -158
  83. package/src/components/toaster/index.js +108 -111
  84. package/src/components/toaster/toaster.module.css +13 -0
  85. package/src/components/toaster/toaster.stories.js +582 -367
  86. package/src/components/tooltip/index.js +79 -46
  87. package/src/components/tooltip/tooltip.stories.js +9 -10
  88. package/src/components/typography/index.js +108 -101
  89. package/src/components/typography/typography.stories.js +16 -19
  90. package/src/index.js +20 -20
  91. package/src/stories/configuration.stories.mdx +1 -0
  92. package/src/utils/index.js +11 -11
  93. package/tui.config.js +343 -340
@@ -1,181 +1,203 @@
1
- import React, { useEffect, useState, useRef } from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React, { useEffect, useState, useRef } from 'react'
2
+ import PropTypes from 'prop-types'
3
3
 
4
- import ToasterInfo from '../icon/ToasterInfo';
5
- import ToasterError from '../icon/ToasterError';
6
- import ToasterClose from '../icon/ToasterClose';
7
- import ToasterWarn from '../icon/ToasterWarning';
8
- import ToasterSuccess from '../icon/ToasterSuccess';
4
+ import ToasterInfo from '../icon/ToasterInfo'
5
+ import ToasterError from '../icon/ToasterError'
6
+ import ToasterClose from '../icon/ToasterClose'
7
+ import ToasterWarn from '../icon/ToasterWarning'
8
+ import ToasterSuccess from '../icon/ToasterSuccess'
9
9
 
10
+ import styles from './toaster.module.css'
10
11
 
11
- import styles from './toaster.module.css';
12
+ let wWidth = window.innerWidth
12
13
 
13
14
  const ToasterType = {
14
- info: 'info',
15
- warn: 'warn',
16
- error: 'error',
17
- success: 'success'
18
- };
15
+ info: 'info',
16
+ warn: 'warn',
17
+ error: 'error',
18
+ success: 'success',
19
+ }
19
20
 
20
21
  const ToasterPosition = {
21
- topLeft: 'top-left',
22
- topRight: 'top-right',
23
- topCenter: 'top-center',
24
- bottomLeft: 'bottom-left',
25
- bottomRight: 'bottom-right',
26
- bottomCenter: 'bottom-center'
27
- };
22
+ topLeft: 'top-left',
23
+ topRight: 'top-right',
24
+ topCenter: 'top-center',
25
+ bottomLeft: 'bottom-left',
26
+ bottomRight: 'bottom-right',
27
+ bottomCenter: 'bottom-center',
28
+ }
28
29
 
29
- export const Toast = ({
30
- type,
31
- title,
32
- timer,
33
- position,
34
- removeToast,
35
- description,
36
- }) => {
37
- let timeoutCall;
38
- let timeoutClick;
30
+ export const Toast = ({ type, title, timer, position, removeToast, description }) => {
31
+ let timeoutCall
32
+ let timeoutClick
39
33
 
40
- const ref = useRef(null);
41
- const [showToaster, setShowToaster] = useState(true);
34
+ const ref = useRef(null)
35
+ const [showToaster, setShowToaster] = useState(true)
42
36
 
43
- const handleToasterClick = (e) => {
44
- e.stopPropagation();
45
- };
46
-
47
- const handleCloseToaster = (ref) => {
48
- setShowToaster(false);
49
- timeoutClick = setTimeout(() => {
50
- removeToast(ref, position);
51
- }, 300);
52
- clearTimeout(timeoutCall);
53
- };
37
+ const handleToasterClick = (e) => {
38
+ e.stopPropagation()
39
+ }
54
40
 
55
- useEffect(() => {
56
- timeoutCall = setTimeout(() => {
57
- handleCloseToaster(ref);
58
- }, timer);
59
- return () => {
60
- setShowToaster(true);
61
- clearTimeout(timeoutCall);
62
- clearTimeout(timeoutClick);
41
+ const handleCloseToaster = (ref) => {
42
+ setShowToaster(false)
43
+ timeoutClick = setTimeout(() => {
44
+ removeToast(ref, position)
45
+ }, 300)
46
+ clearTimeout(timeoutCall)
63
47
  }
64
- }, []);
65
48
 
66
- return (
67
- <div
68
- ref={ref}
69
- onClick={handleToasterClick}
70
- style={{
71
- position: 'absolute',
72
- display: 'flex',
73
- width: '440px',
74
- height: '83px',
75
- borderRadius: '40px',
76
- alignItems: 'center',
77
- boxSizing: 'border-box',
78
- backgroundColor: '#FFFFFF',
79
- border: '2px solid #EEEEEE',
80
- padding: '14px 29px 14px 12px',
81
- justifyContent: 'space-between'
82
- }}
83
- className={`
49
+ useEffect(() => {
50
+ timeoutCall = setTimeout(() => {
51
+ handleCloseToaster(ref)
52
+ }, timer)
53
+ return () => {
54
+ setShowToaster(true)
55
+ clearTimeout(timeoutCall)
56
+ clearTimeout(timeoutClick)
57
+ }
58
+ }, [])
59
+
60
+ return (
61
+ <div
62
+ ref={ref}
63
+ onClick={handleToasterClick}
64
+ style={{
65
+ position: 'absolute',
66
+ display: 'flex',
67
+ width: wWidth > 480 ? '440px' : '300px',
68
+ height: '83px',
69
+ borderRadius: '40px',
70
+ alignItems: 'center',
71
+ boxSizing: 'border-box',
72
+ backgroundColor: '#FFFFFF',
73
+ border: '2px solid #EEEEEE',
74
+ padding: '14px 29px 14px 12px',
75
+ justifyContent: 'space-between',
76
+ }}
77
+ className={`
84
78
  ${styles['notify-block']}
85
79
  ${
86
- position === 'top-left' ? showToaster ? styles['bounce-in-left'] : styles['bounce-out-left']
87
- : position === 'top-right' ? showToaster ? styles['bounce-in-right'] : styles['bounce-out-right']
88
- : position === 'top-center' ? showToaster ? styles['bounce-in-left'] : styles['bounce-out-left']
89
- : position === 'bottom-left' ? showToaster ? styles['bounce-in-left'] : styles['bounce-out-left']
90
- : position === 'bottom-right' ? showToaster ? styles['bounce-in-right'] : styles['bounce-out-right']
91
- : position === 'bottom-center' ? showToaster ? styles['bounce-in-left'] : styles['bounce-out-left']
92
- : ''
80
+ position === 'top-left'
81
+ ? showToaster
82
+ ? styles['bounce-in-left']
83
+ : styles['bounce-out-left']
84
+ : position === 'top-right'
85
+ ? showToaster
86
+ ? styles['bounce-in-right']
87
+ : styles['bounce-out-right']
88
+ : position === 'top-center'
89
+ ? showToaster
90
+ ? styles['bounce-in-left']
91
+ : styles['bounce-out-left']
92
+ : position === 'bottom-left'
93
+ ? showToaster
94
+ ? styles['bounce-in-left']
95
+ : styles['bounce-out-left']
96
+ : position === 'bottom-right'
97
+ ? showToaster
98
+ ? styles['bounce-in-right']
99
+ : styles['bounce-out-right']
100
+ : position === 'bottom-center'
101
+ ? showToaster
102
+ ? styles['bounce-in-left']
103
+ : styles['bounce-out-left']
104
+ : ''
93
105
  }
94
106
  `}
95
- >
96
- <div
97
- style={{
98
- display: 'flex',
99
- width: '60px',
100
- height: '60px',
101
- borderRadius: '30px',
102
- alignItems: 'center',
103
- justifyContent: 'center',
104
- backgroundColor:
105
- type === 'info' ? 'rgba(0, 35, 106, 0.05)'
106
- : type === 'warn' ? 'rgba(255, 138, 0, 0.05)'
107
- : type === 'error' ? 'rgba(238, 0, 0, 0.05)'
108
- : type === 'success' ? 'rgba(13, 165, 116, 0.05)'
109
- : ''
110
- }}
111
- >
112
- {
113
- type === 'info' ? <ToasterInfo />
114
- : type === 'warn' ? <ToasterWarn />
115
- : type === 'error' ? <ToasterError />
116
- : type === 'success' ? <ToasterSuccess />
117
- : ''
118
- }
119
- </div>
120
-
121
- <div
122
- style={{
123
- height: '100%',
124
- width: 'calc(100% - 90px)'
125
- }}
126
- >
127
- <p
128
- style={{
129
- margin: '0px',
130
- fontWeight: 600,
131
- color: '#3C393E',
132
- fontSize: '16px',
133
- lineHeight: '22px',
134
- fontStyle: 'normal',
135
- }}
136
- >
137
- {title ? title.length > 25 ? title.substr(0, 25) + '...' : title : ''}
138
- </p>
139
- <span
140
- style={{
141
- fontWeight: 500,
142
- color: '#3C393E',
143
- fontSize: '12px',
144
- lineHeight: '16px',
145
- fontStyle: 'normal',
146
- fontFamily: '',
147
- opacity: 0.8
148
- }}
149
107
  >
150
- {description ? description.length > 120 ? description.substr(0, 120) + '...' : description : ''}
151
- </span>
152
- </div>
108
+ <div
109
+ style={{
110
+ display: 'flex',
111
+ width: '60px',
112
+ height: '60px',
113
+ borderRadius: '30px',
114
+ alignItems: 'center',
115
+ justifyContent: 'center',
116
+ backgroundColor:
117
+ type === 'info'
118
+ ? 'rgba(0, 35, 106, 0.05)'
119
+ : type === 'warn'
120
+ ? 'rgba(255, 138, 0, 0.05)'
121
+ : type === 'error'
122
+ ? 'rgba(238, 0, 0, 0.05)'
123
+ : type === 'success'
124
+ ? 'rgba(13, 165, 116, 0.05)'
125
+ : '',
126
+ }}
127
+ >
128
+ {type === 'info' ? (
129
+ <ToasterInfo />
130
+ ) : type === 'warn' ? (
131
+ <ToasterWarn />
132
+ ) : type === 'error' ? (
133
+ <ToasterError />
134
+ ) : type === 'success' ? (
135
+ <ToasterSuccess />
136
+ ) : (
137
+ ''
138
+ )}
139
+ </div>
140
+
141
+ <div
142
+ style={{
143
+ height: '100%',
144
+ width: 'calc(100% - 90px)',
145
+ }}
146
+ >
147
+ <p
148
+ style={{
149
+ margin: '0px',
150
+ fontWeight: 600,
151
+ color: '#3C393E',
152
+ fontSize: '16px',
153
+ lineHeight: '22px',
154
+ fontStyle: 'normal',
155
+ }}
156
+ className={styles['notify-title']}
157
+ >
158
+ {title ? title : ''}
159
+ </p>
160
+ <span
161
+ style={{
162
+ fontWeight: 500,
163
+ color: '#3C393E',
164
+ fontSize: '12px',
165
+ lineHeight: '16px',
166
+ fontStyle: 'normal',
167
+ fontFamily: '',
168
+ opacity: 0.8,
169
+ }}
170
+ className={styles['notify-desc']}
171
+ >
172
+ {description ? description : ''}
173
+ </span>
174
+ </div>
153
175
 
154
- <div
155
- onClick={() => handleCloseToaster(ref)}
156
- style={{
157
- width: '18px',
158
- height: '18px',
159
- cursor: 'pointer'
160
- }}
161
- >
162
- <ToasterClose />
163
- </div>
164
- </div>
165
- )
166
- };
176
+ <div
177
+ onClick={() => handleCloseToaster(ref)}
178
+ style={{
179
+ width: '18px',
180
+ height: '18px',
181
+ cursor: 'pointer',
182
+ }}
183
+ >
184
+ <ToasterClose />
185
+ </div>
186
+ </div>
187
+ )
188
+ }
167
189
 
168
190
  Toast.propTypes = {
169
- timer: PropTypes.number,
170
- title: PropTypes.string,
171
- description: PropTypes.string,
172
- removeToast: PropTypes.func.isRequired,
173
- position: PropTypes.oneOf(Object.values(ToasterPosition)),
174
- type: PropTypes.oneOf(Object.values(ToasterType)).isRequired,
175
- };
191
+ timer: PropTypes.number,
192
+ title: PropTypes.string,
193
+ description: PropTypes.string,
194
+ removeToast: PropTypes.func.isRequired,
195
+ position: PropTypes.oneOf(Object.values(ToasterPosition)),
196
+ type: PropTypes.oneOf(Object.values(ToasterType)).isRequired,
197
+ }
176
198
 
177
199
  Toast.defaultProps = {
178
- timer: 5000,
179
- position: 'top-right',
180
- title: 'toaster title'
181
- };
200
+ timer: 5000,
201
+ position: 'top-right',
202
+ title: 'toaster title',
203
+ }
@@ -1,129 +1,126 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom'
3
3
 
4
- import { Toast } from './Toast';
4
+ import { Toast } from './Toast'
5
5
 
6
- import styles from './toaster.module.css';
6
+ import styles from './toaster.module.css'
7
7
 
8
- let toastify;
9
- let path = window.location.href;
8
+ let toastify
9
+ let path = window.location.href
10
+ let wWidth = window.innerWidth
10
11
 
11
12
  const removeToast = (ref) => {
12
- const node = ReactDOM.findDOMNode(ref.current);
13
- const removeElem = node.parentNode;
14
- const parent = removeElem.parentNode;
13
+ // eslint-disable-next-line react/no-find-dom-node
14
+ const node = ReactDOM.findDOMNode(ref.current)
15
+ const removeElem = node.parentNode
16
+ const parent = removeElem.parentNode
15
17
 
16
- parent.removeChild(removeElem);
18
+ parent.removeChild(removeElem)
17
19
 
18
- if (!parent.hasChildNodes()) {
19
- toastify.removeChild(parent);
20
- }
21
- };
20
+ if (!parent.hasChildNodes()) {
21
+ toastify.removeChild(parent)
22
+ }
23
+ }
22
24
 
23
- const createToast = ({
24
- type,
25
- timer,
26
- title,
27
- position,
28
- description,
29
- }) => {
30
- let toastParentBlock;
31
- if (!toastify) {
32
- toastify = document.getElementById('toastify');
33
- }
25
+ const createToast = ({ type, timer, title, position, description }) => {
26
+ let toastParentBlock
27
+ if (!toastify) {
28
+ toastify = document.getElementById('toastify')
29
+ }
34
30
 
35
- const toastBlock = document.createElement('div');
36
- toastBlock.style.position = 'relative';
37
- toastBlock.style.flexShrink = 0;
38
- toastBlock.style.width = '440px';
39
- toastBlock.style.height = '83px';
40
- toastBlock.style.marginBottom = '20px';
41
- const newElem = React.createElement(Toast, {
42
- type,
43
- timer,
44
- title,
45
- position,
46
- removeToast,
47
- description
48
- });
49
- ReactDOM.render(newElem, toastBlock);
31
+ const toastBlock = document.createElement('div')
32
+ toastBlock.style.position = 'relative'
33
+ toastBlock.style.flexShrink = 0
34
+ toastBlock.style.width = wWidth > 480 ? '440px' : '300px'
35
+ toastBlock.style.height = '83px'
36
+ toastBlock.style.marginBottom = '20px'
37
+ const newElem = React.createElement(Toast, {
38
+ type,
39
+ timer,
40
+ title,
41
+ position,
42
+ removeToast,
43
+ description,
44
+ })
45
+ ReactDOM.render(newElem, toastBlock)
50
46
 
51
- if (!document.getElementById(styles[position]) || document.getElementById(styles[position]) == null) {
52
- toastParentBlock = document.createElement('div');
53
- toastParentBlock.style.position = 'fixed';
54
- toastParentBlock.style.display = 'flex';
55
- toastParentBlock.style.zIndex = 999999999999;
56
- toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
57
- toastParentBlock.setAttribute('id', styles[position]);
58
- toastParentBlock.appendChild(toastBlock);
59
- toastify.appendChild(toastParentBlock);
60
- } else {
61
- document.getElementById(styles[position]).appendChild(toastBlock);
62
- }
63
- };
47
+ if (!document.getElementById(styles[position]) || document.getElementById(styles[position]) == null) {
48
+ toastParentBlock = document.createElement('div')
49
+ toastParentBlock.style.position = 'fixed'
50
+ toastParentBlock.style.display = 'flex'
51
+ toastParentBlock.style.zIndex = 999999999999
52
+ toastParentBlock.style.flexDirection =
53
+ position === 'top-left' || position === 'top-right' || position === 'top-center'
54
+ ? 'column-reverse'
55
+ : 'column'
56
+ toastParentBlock.setAttribute('id', styles[position])
57
+ toastParentBlock.appendChild(toastBlock)
58
+ toastify.appendChild(toastParentBlock)
59
+ } else {
60
+ document.getElementById(styles[position]).appendChild(toastBlock)
61
+ }
62
+ }
64
63
 
65
64
  export const toast = {
66
- success: (title, props) => {
67
- const { timer, position, description } = props || {};
68
- createToast({
69
- title,
70
- type: 'success',
71
- timer: timer ? timer : 5000,
72
- position: position ? position : 'top-right',
73
- description: description ? description : ''
74
- });
75
- },
76
- info: (title, props) => {
77
- const { timer, position, description } = props || {};
78
- createToast({
79
- title,
80
- type: 'info',
81
- timer: timer ? timer : 5000,
82
- position: position ? position : 'top-right',
83
- description: description ? description : ''
84
- });
85
- },
86
- warn: (title, props) => {
87
- const { timer, position, description } = props || {};
88
- createToast({
89
- title,
90
- type: 'warn',
91
- timer: timer ? timer : 5000,
92
- position: position ? position : 'top-right',
93
- description: description ? description : ''
94
- });
95
- },
96
- error: (title, props) => {
97
- const { timer, position, description } = props || {};
98
- createToast({
99
- title,
100
- type: 'error',
101
- timer: timer ? timer : 5000,
102
- position: position ? position : 'top-right',
103
- description: description ? description : ''
104
- });
105
- }
106
- };
65
+ success: (title, props) => {
66
+ const { timer, position, description } = props || {}
67
+ createToast({
68
+ title,
69
+ type: 'success',
70
+ timer: timer ? timer : 5000,
71
+ position: position ? position : 'top-right',
72
+ description: description ? description : '',
73
+ })
74
+ },
75
+ info: (title, props) => {
76
+ const { timer, position, description } = props || {}
77
+ createToast({
78
+ title,
79
+ type: 'info',
80
+ timer: timer ? timer : 5000,
81
+ position: position ? position : 'top-right',
82
+ description: description ? description : '',
83
+ })
84
+ },
85
+ warn: (title, props) => {
86
+ const { timer, position, description } = props || {}
87
+ createToast({
88
+ title,
89
+ type: 'warn',
90
+ timer: timer ? timer : 5000,
91
+ position: position ? position : 'top-right',
92
+ description: description ? description : '',
93
+ })
94
+ },
95
+ error: (title, props) => {
96
+ const { timer, position, description } = props || {}
97
+ createToast({
98
+ title,
99
+ type: 'error',
100
+ timer: timer ? timer : 5000,
101
+ position: position ? position : 'top-right',
102
+ description: description ? description : '',
103
+ })
104
+ },
105
+ }
107
106
 
108
107
  export const Toaster = () => {
109
- window.addEventListener('popstate', () => {
110
- if (path !== window.location.href) {
111
- if (!toastify) {
112
- toastify = document.getElementById('toastify');
113
- }
108
+ window.addEventListener('popstate', () => {
109
+ if (path !== window.location.href) {
110
+ if (!toastify) {
111
+ toastify = document.getElementById('toastify')
112
+ }
114
113
 
115
- if (toastify.hasChildNodes()) {
116
- toastify.innerHTML = '';
117
- }
114
+ if (toastify.hasChildNodes()) {
115
+ toastify.innerHTML = ''
116
+ }
118
117
 
119
- path = window.location.href;
118
+ path = window.location.href
119
+ }
120
+ })
121
+ const handleToasterClick = (e) => {
122
+ e.stopPropagation()
120
123
  }
121
- });
122
- const handleToasterClick = (e) => {
123
- e.stopPropagation();
124
- };
125
124
 
126
- return (
127
- <div onClick={handleToasterClick} id="toastify"></div>
128
- );
129
- };
125
+ return <div onClick={handleToasterClick} id="toastify"></div>
126
+ }
@@ -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;