funda-ui 1.0.295 → 1.0.312

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.
@@ -33,9 +33,9 @@
33
33
  }
34
34
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar {
35
35
  display: grid;
36
- gap: var(--custom-scrollbar-arrow-gap) 0;
36
+ gap: 0 0;
37
37
  grid-auto-flow: row;
38
- grid-template: auto 1fr auto/1fr;
38
+ grid-template: calc(var(--custom-scrollbar-arrow-gap) * 1.5) 1fr calc(var(--custom-scrollbar-arrow-gap) / 2) 1rem/1fr;
39
39
  padding: 0;
40
40
  place-items: center;
41
41
  grid-area: right;
@@ -53,19 +53,23 @@
53
53
  box-shadow: none;
54
54
  border: none;
55
55
  cursor: pointer;
56
+ transition: 0.1s ease-in-out;
56
57
  }
57
58
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button.disabled {
58
59
  opacity: 0;
59
60
  pointer-events: none;
60
61
  }
61
62
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button svg path {
62
- stroke: var(--custom-scrollbars-thumb-bg);
63
+ fill: var(--custom-scrollbars-thumb-bg);
63
64
  }
64
65
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button i {
65
66
  color: var(--custom-scrollbars-thumb-bg);
66
67
  }
68
+ .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button:hover {
69
+ transform: scale(1.3);
70
+ }
67
71
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button:hover svg path {
68
- stroke: var(--custom-scrollbars-thumb-hover-bg);
72
+ fill: var(--custom-scrollbars-thumb-hover-bg);
69
73
  }
70
74
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar .custom-scrollbars__button:hover i {
71
75
  color: var(--custom-scrollbars-thumb-hover-bg);
@@ -97,9 +101,9 @@
97
101
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal {
98
102
  display: grid;
99
103
  grid-area: left2;
100
- gap: 0 var(--custom-scrollbar-arrow-gap);
104
+ gap: 0 0;
101
105
  grid-auto-flow: row;
102
- grid-template: auto 1fr auto/1rem 1fr 1rem;
106
+ grid-template: 1rem/var(--custom-scrollbar-arrow-gap) 1fr var(--custom-scrollbar-arrow-gap);
103
107
  padding: 0;
104
108
  place-items: center;
105
109
  }
@@ -116,19 +120,23 @@
116
120
  box-shadow: none;
117
121
  border: none;
118
122
  cursor: pointer;
123
+ transition: 0.1s ease-in-out;
119
124
  }
120
125
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button.disabled {
121
126
  opacity: 0;
122
127
  pointer-events: none;
123
128
  }
124
129
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button svg path {
125
- stroke: var(--custom-scrollbars-thumb-bg);
130
+ fill: var(--custom-scrollbars-thumb-bg);
126
131
  }
127
132
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button i {
128
133
  color: var(--custom-scrollbars-thumb-bg);
129
134
  }
135
+ .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button:hover {
136
+ transform: scale(1.3);
137
+ }
130
138
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button:hover svg path {
131
- stroke: var(--custom-scrollbars-thumb-hover-bg);
139
+ fill: var(--custom-scrollbars-thumb-hover-bg);
132
140
  }
133
141
  .custom-scrollbars__wrapper .custom-scrollbars__scrollbar-horizontal .custom-scrollbars__button:hover i {
134
142
  color: var(--custom-scrollbars-thumb-hover-bg);
@@ -160,7 +168,7 @@
160
168
  }
161
169
  .custom-scrollbars__wrapper.arrow-disabled .custom-scrollbars__scrollbar {
162
170
  gap: 0 0 var(--custom-scrollbar-arrow-gap) 0;
163
- grid-template: 0 1fr 0/1fr;
171
+ grid-template: 0 1fr 1rem/1fr;
164
172
  }
165
173
  .custom-scrollbars__wrapper.arrow-disabled .custom-scrollbars__scrollbar-horizontal {
166
174
  gap: 0;
@@ -174,47 +174,35 @@ var Scrollbar = function Scrollbar(props) {
174
174
  var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
175
175
  var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
176
176
  var icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
177
- width: "16px",
178
- height: "16px",
177
+ width: "10px",
178
+ height: "10px",
179
179
  viewBox: "0 0 24 24",
180
180
  fill: "none"
181
181
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
182
- d: "M12 5V19M12 5L6 11M12 5L18 11",
183
- strokeWidth: "2",
184
- strokeLinecap: "round",
185
- strokeLinejoin: "round"
182
+ d: "M18.2929 15.2893C18.6834 14.8988 18.6834 14.2656 18.2929 13.8751L13.4007 8.98766C12.6195 8.20726 11.3537 8.20757 10.5729 8.98835L5.68257 13.8787C5.29205 14.2692 5.29205 14.9024 5.68257 15.2929C6.0731 15.6835 6.70626 15.6835 7.09679 15.2929L11.2824 11.1073C11.673 10.7168 12.3061 10.7168 12.6966 11.1073L16.8787 15.2893C17.2692 15.6798 17.9024 15.6798 18.2929 15.2893Z"
186
183
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
187
- width: "16px",
188
- height: "16px",
184
+ width: "10px",
185
+ height: "10px",
189
186
  viewBox: "0 0 24 24",
190
187
  fill: "none"
191
188
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
192
- d: "M12 6V18M12 18L7 13M12 18L17 13",
193
- strokeWidth: "2",
194
- strokeLinecap: "round",
195
- strokeLinejoin: "round"
189
+ d: "M5.70711 9.71069C5.31658 10.1012 5.31658 10.7344 5.70711 11.1249L10.5993 16.0123C11.3805 16.7927 12.6463 16.7924 13.4271 16.0117L18.3174 11.1213C18.708 10.7308 18.708 10.0976 18.3174 9.70708C17.9269 9.31655 17.2937 9.31655 16.9032 9.70708L12.7176 13.8927C12.3271 14.2833 11.6939 14.2832 11.3034 13.8927L7.12132 9.71069C6.7308 9.32016 6.09763 9.32016 5.70711 9.71069Z"
196
190
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
197
- width: "16px",
198
- height: "16px",
191
+ width: "10px",
192
+ height: "10px",
199
193
  viewBox: "0 0 24 24",
200
194
  fill: "none",
201
195
  transform: "translate(0 -2)"
202
196
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
203
- d: "M6 12H18M6 12L11 7M6 12L11 17",
204
- strokeWidth: "2",
205
- strokeLinecap: "round",
206
- strokeLinejoin: "round"
197
+ d: "M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z"
207
198
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
208
- width: "16px",
209
- height: "16px",
199
+ width: "10px",
200
+ height: "10px",
210
201
  viewBox: "0 0 24 24",
211
202
  fill: "none",
212
203
  transform: "translate(0 -2)"
213
204
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
214
- d: "M6 12H18M18 12L13 7M18 12L13 17",
215
- strokeWidth: "2",
216
- strokeLinecap: "round",
217
- strokeLinejoin: "round"
205
+ d: "M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z"
218
206
  }), " "))] : arrowIcons;
219
207
  var contentAreaScrollUpdate = (0,_utils_performance__WEBPACK_IMPORTED_MODULE_1__.throttle)(handleScrollEvent, 5);
220
208
 
package/Toast/index.css CHANGED
@@ -3,39 +3,45 @@
3
3
  /* ====================================================== */
4
4
  .toasts__wrapper {
5
5
  --bs-toast-zindex: 1090;
6
- width: 350px;
6
+ --toasts-offset-top: 35px;
7
+ --toasts-offset-bottom: 15px;
8
+ --toasts-offset-bothsides: 15px;
9
+ --toasts-container-gap: 0.5rem;
10
+ --toasts-container-width: 350px;
11
+ width: var(--toasts-container-width);
7
12
  position: fixed;
8
13
  left: 50%;
9
14
  bottom: 0;
10
15
  z-index: var(--bs-toast-zindex);
11
16
  pointer-events: none;
12
17
  transition: 0.1s ease-in-out;
18
+ /* cascading divs */
13
19
  }
14
20
  .toasts__wrapper--bottom-left {
15
- left: 15px;
21
+ left: var(--toasts-offset-bothsides);
16
22
  }
17
23
  .toasts__wrapper--bottom-right {
18
24
  left: auto;
19
- right: 15px;
25
+ right: var(--toasts-offset-bothsides);
20
26
  }
21
27
  .toasts__wrapper--bottom-center {
22
28
  left: 50%;
23
29
  transform: translateX(-50%);
24
30
  }
25
31
  .toasts__wrapper--top-left {
26
- left: 15px;
32
+ left: var(--toasts-offset-bothsides);
27
33
  bottom: auto;
28
- top: 35px;
34
+ top: var(--toasts-offset-top);
29
35
  }
30
36
  .toasts__wrapper--top-right {
31
37
  left: auto;
32
- right: 15px;
33
- top: 35px;
38
+ right: var(--toasts-offset-bothsides);
39
+ top: var(--toasts-offset-top);
34
40
  }
35
41
  .toasts__wrapper--top-center {
36
42
  left: 50%;
37
43
  transform: translateX(-50%);
38
- top: 35px;
44
+ top: var(--toasts-offset-top);
39
45
  }
40
46
  .toasts__wrapper--vertical-center {
41
47
  left: 50%;
@@ -46,7 +52,7 @@
46
52
  .toasts__wrapper .toasts {
47
53
  position: relative;
48
54
  width: 100%;
49
- bottom: 15px;
55
+ bottom: var(--toasts-offset-bottom);
50
56
  display: flex;
51
57
  flex-flow: column-reverse nowrap;
52
58
  }
@@ -60,7 +66,13 @@
60
66
  background-color: transparent;
61
67
  pointer-events: none;
62
68
  }
63
- .toasts__wrapper .toasts:hover .toast-container {
69
+ .toasts__wrapper .toast-container {
70
+ margin-bottom: var(--toasts-container-gap);
71
+ }
72
+ .toasts__wrapper.toasts__wrapper--cascading .toast-container {
73
+ margin-bottom: 0;
74
+ }
75
+ .toasts__wrapper.toasts__wrapper--cascading .toasts:hover .toast-container {
64
76
  transform: perspective(100px) translateZ(0) !important;
65
77
  }
66
78
 
package/Toast/index.d.ts CHANGED
@@ -19,6 +19,8 @@ declare type ToastProps = {
19
19
  autoCloseReverse?: boolean;
20
20
  /** You can not close pop-win when it is enabled */
21
21
  lock?: boolean;
22
+ /** Whether to use cascading styles */
23
+ cascading?: boolean;
22
24
  /** Self-defined class name for body*/
23
25
  schemeBody?: string;
24
26
  /** Self-defined class name for header */
@@ -29,7 +31,7 @@ declare type ToastProps = {
29
31
  closeDisabled?: boolean;
30
32
  /** -- */
31
33
  id?: string;
32
- onClose?: (e: any, data: any[]) => void;
34
+ onClose?: (e: HTMLDivElement, currentIndex: number, data: HTMLDivElement[]) => void;
33
35
  };
34
36
  declare const Toast: (props: ToastProps) => JSX.Element;
35
37
  export default Toast;
package/Toast/index.js CHANGED
@@ -111,17 +111,19 @@ var Item = function Item(props) {
111
111
  message = props.message,
112
112
  depth = props.depth,
113
113
  lock = props.lock,
114
+ cascading = props.cascading,
114
115
  schemeBody = props.schemeBody,
115
116
  schemeHeader = props.schemeHeader,
116
117
  closeBtnColor = props.closeBtnColor,
117
- closeDisabled = props.closeDisabled,
118
- closeEv = props.closeEv;
118
+ closeDisabled = props.closeDisabled;
119
119
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
120
120
  className: "toast-container",
121
121
  "data-index": index,
122
- style: {
122
+ style: cascading ? {
123
123
  transform: "perspective(100px) translateZ(-".concat(2 * index, "px) translateY(").concat(35 * index, "px)"),
124
124
  zIndex: depth
125
+ } : {
126
+ zIndex: depth
125
127
  }
126
128
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
127
129
  className: "toast fade show ".concat(schemeBody ? schemeBody : ''),
@@ -174,6 +176,7 @@ var Toast = function Toast(props) {
174
176
  autoCloseTime = props.autoCloseTime,
175
177
  autoCloseReverse = props.autoCloseReverse,
176
178
  lock = props.lock,
179
+ cascading = props.cascading,
177
180
  data = props.data,
178
181
  schemeBody = props.schemeBody,
179
182
  schemeHeader = props.schemeHeader,
@@ -185,6 +188,7 @@ var Toast = function Toast(props) {
185
188
  var idRes = id || uniqueID;
186
189
  var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
187
190
  var depth = data.length + 1;
191
+ var cascadingEnabled = typeof cascading === 'undefined' ? true : cascading;
188
192
  function init() {
189
193
  // Move HTML templates to tag end body </body>
190
194
  // render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
@@ -195,7 +199,8 @@ var Toast = function Toast(props) {
195
199
  [].slice.call(rootRef.current.querySelectorAll('[data-close]')).forEach(function (node) {
196
200
  node.addEventListener('pointerdown', function (e) {
197
201
  var index = node.dataset.index;
198
- handleClose(index);
202
+ var currentItem = node.closest('.toast-container');
203
+ handleClose(index, currentItem);
199
204
  });
200
205
  });
201
206
  }
@@ -205,11 +210,11 @@ var Toast = function Toast(props) {
205
210
  var $toast = document.querySelector("#".concat(rootRef.current.id));
206
211
  if ($toast !== null) {
207
212
  if ($toast.dataset.async == 'true') {
208
- var _list = rootRef.current.querySelectorAll('.toast-container');
209
- [].slice.call(_list).forEach(function (node, i) {
213
+ var _list = [].slice.call(rootRef.current.querySelectorAll('.toast-container'));
214
+ _list.forEach(function (node, i) {
210
215
  node.classList.remove('hide-end');
211
216
  // rearrange
212
- node.style.transform = "perspective(100px) translateZ(-".concat(2 * i, "px) translateY(").concat(35 * i, "px)");
217
+ if (cascadingEnabled) node.style.transform = "perspective(100px) translateZ(-".concat(2 * i, "px) translateY(").concat(35 * i, "px)");
213
218
  });
214
219
  }
215
220
  }
@@ -222,45 +227,42 @@ var Toast = function Toast(props) {
222
227
  autoClose(0, items, _autoCloseTime);
223
228
  }
224
229
  }
225
- function handleClose(index) {
226
- var items = JSON.parse(JSON.stringify(data));
227
- if (items[index] !== undefined) {
228
- var _list = rootRef.current.querySelectorAll('.toast-container');
229
- _list[index].classList.add('hide-start');
230
+ function handleClose(index, currentItem) {
231
+ var _list = [].slice.call(rootRef.current.querySelectorAll('.toast-container'));
232
+ currentItem.classList.add('hide-start');
230
233
 
231
- //Let the removed animation show
232
- setTimeout(function () {
233
- [].slice.call(_list).forEach(function (node, i) {
234
- node.classList.remove('hide-start');
235
- });
234
+ //Let the removed animation show
235
+ setTimeout(function () {
236
+ _list.forEach(function (node, i) {
237
+ node.classList.remove('hide-start');
238
+ });
236
239
 
237
- // remove current
238
- _list[index].classList.add('hide-end');
240
+ // remove current
241
+ currentItem.classList.add('hide-end');
239
242
 
240
- // rearrange
241
- [].slice.call(_list).filter(function (node) {
243
+ // rearrange
244
+ if (cascadingEnabled) {
245
+ _list.filter(function (node) {
242
246
  return !node.classList.contains('hide-end');
243
247
  }).forEach(function (node, index) {
244
248
  node.style.transform = "perspective(100px) translateZ(-".concat(2 * index, "px) translateY(").concat(35 * index, "px)");
245
249
  });
250
+ }
246
251
 
247
- //
248
- onClose === null || onClose === void 0 ? void 0 : onClose(rootRef.current, items);
249
- }, 300);
250
- }
252
+ //
253
+ onClose === null || onClose === void 0 ? void 0 : onClose(rootRef.current, Number(index), _list.filter(function (node) {
254
+ return !node.classList.contains('hide-end');
255
+ }));
256
+ }, 300);
251
257
  }
252
258
  function autoClose(index, items) {
253
259
  var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3000;
254
260
  if (items.length === index) {
255
- //
256
- onClose === null || onClose === void 0 ? void 0 : onClose(rootRef.current, items);
257
-
258
- //
259
261
  clearTimeout(window.setCloseToast);
260
262
  return;
261
263
  }
262
264
  window.setCloseToast = setTimeout(function () {
263
- var _list = rootRef.current.querySelectorAll('.toast-container');
265
+ var _list = [].slice.call(rootRef.current.querySelectorAll('.toast-container'));
264
266
  if (autoCloseReverse) {
265
267
  _list[items.length - index].classList.add('hide-start');
266
268
  } else {
@@ -269,26 +271,39 @@ var Toast = function Toast(props) {
269
271
 
270
272
  //Let the removed animation show
271
273
  setTimeout(function () {
272
- [].slice.call(_list).forEach(function (node) {
274
+ _list.forEach(function (node) {
273
275
  node.classList.remove('hide-start');
274
276
  });
275
277
 
276
278
  // remove current
277
279
  if (autoCloseReverse) {
278
280
  _list[items.length - index].classList.add('hide-end');
281
+
282
+ //
283
+ onClose === null || onClose === void 0 ? void 0 : onClose(rootRef.current, Number(items.length - index), _list.filter(function (node) {
284
+ return !node.classList.contains('hide-end');
285
+ }));
279
286
  } else {
280
287
  _list[index - 1].classList.add('hide-end');
288
+ //
289
+ onClose === null || onClose === void 0 ? void 0 : onClose(rootRef.current, Number(index - 1), _list.filter(function (node) {
290
+ return !node.classList.contains('hide-end');
291
+ }));
281
292
  }
282
293
 
283
294
  // rearrange
284
- [].slice.call(_list).filter(function (node) {
285
- return !node.classList.contains('hide-end');
286
- }).forEach(function (node, i) {
287
- node.style.transform = "perspective(100px) translateZ(-".concat(2 * i, "px) translateY(").concat(35 * i, "px)");
288
- });
295
+ if (cascadingEnabled) {
296
+ _list.filter(function (node) {
297
+ return !node.classList.contains('hide-end');
298
+ }).forEach(function (node, i) {
299
+ node.style.transform = "perspective(100px) translateZ(-".concat(2 * i, "px) translateY(").concat(35 * i, "px)");
300
+ });
301
+ }
302
+
303
+ //
289
304
  autoClose(index, items, delay);
290
305
  }, 300);
291
- }, delay * (index + 1));
306
+ }, delay);
292
307
  index++;
293
308
  }
294
309
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
@@ -305,12 +320,17 @@ var Toast = function Toast(props) {
305
320
  // Remove all toasts
306
321
  var _el = document.querySelector("#toasts__wrapper-".concat(idRes));
307
322
  if (_el !== null) _el.remove();
323
+
324
+ // remove all events
325
+ [].slice.call(rootRef.current.querySelectorAll('[data-close]')).forEach(function (node) {
326
+ node.replaceWith(node.cloneNode(true));
327
+ });
308
328
  };
309
329
  }, [data]);
310
330
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
311
331
  id: "toasts__wrapper-".concat(idRes),
312
332
  "data-async": async ? async : false,
313
- className: "toasts__wrapper toasts__wrapper--".concat(direction ? direction : 'bottom-center'),
333
+ className: "toasts__wrapper toasts__wrapper--".concat(direction ? direction : 'bottom-center', " ").concat(cascadingEnabled ? 'toasts__wrapper--cascading' : ''),
314
334
  ref: rootRef
315
335
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
316
336
  className: "toasts"
@@ -322,12 +342,12 @@ var Toast = function Toast(props) {
322
342
  title: item.title,
323
343
  note: item.note,
324
344
  lock: lock,
345
+ cascading: cascadingEnabled,
325
346
  schemeBody: schemeBody,
326
347
  schemeHeader: schemeHeader,
327
348
  closeBtnColor: closeBtnColor,
328
349
  closeDisabled: closeDisabled,
329
- message: item.message,
330
- closeEv: handleClose
350
+ message: item.message
331
351
  });
332
352
  }))));
333
353
  };
@@ -174,47 +174,35 @@ var Scrollbar = function Scrollbar(props) {
174
174
  var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
175
175
  var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
176
176
  var icons = typeof arrowIcons === 'undefined' || !arrowIcons ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
177
- width: "16px",
178
- height: "16px",
177
+ width: "10px",
178
+ height: "10px",
179
179
  viewBox: "0 0 24 24",
180
180
  fill: "none"
181
181
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
182
- d: "M12 5V19M12 5L6 11M12 5L18 11",
183
- strokeWidth: "2",
184
- strokeLinecap: "round",
185
- strokeLinejoin: "round"
182
+ d: "M18.2929 15.2893C18.6834 14.8988 18.6834 14.2656 18.2929 13.8751L13.4007 8.98766C12.6195 8.20726 11.3537 8.20757 10.5729 8.98835L5.68257 13.8787C5.29205 14.2692 5.29205 14.9024 5.68257 15.2929C6.0731 15.6835 6.70626 15.6835 7.09679 15.2929L11.2824 11.1073C11.673 10.7168 12.3061 10.7168 12.6966 11.1073L16.8787 15.2893C17.2692 15.6798 17.9024 15.6798 18.2929 15.2893Z"
186
183
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
187
- width: "16px",
188
- height: "16px",
184
+ width: "10px",
185
+ height: "10px",
189
186
  viewBox: "0 0 24 24",
190
187
  fill: "none"
191
188
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
192
- d: "M12 6V18M12 18L7 13M12 18L17 13",
193
- strokeWidth: "2",
194
- strokeLinecap: "round",
195
- strokeLinejoin: "round"
189
+ d: "M5.70711 9.71069C5.31658 10.1012 5.31658 10.7344 5.70711 11.1249L10.5993 16.0123C11.3805 16.7927 12.6463 16.7924 13.4271 16.0117L18.3174 11.1213C18.708 10.7308 18.708 10.0976 18.3174 9.70708C17.9269 9.31655 17.2937 9.31655 16.9032 9.70708L12.7176 13.8927C12.3271 14.2833 11.6939 14.2832 11.3034 13.8927L7.12132 9.71069C6.7308 9.32016 6.09763 9.32016 5.70711 9.71069Z"
196
190
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
197
- width: "16px",
198
- height: "16px",
191
+ width: "10px",
192
+ height: "10px",
199
193
  viewBox: "0 0 24 24",
200
194
  fill: "none",
201
195
  transform: "translate(0 -2)"
202
196
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
203
- d: "M6 12H18M6 12L11 7M6 12L11 17",
204
- strokeWidth: "2",
205
- strokeLinecap: "round",
206
- strokeLinejoin: "round"
197
+ d: "M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z"
207
198
  }), " ")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
208
- width: "16px",
209
- height: "16px",
199
+ width: "10px",
200
+ height: "10px",
210
201
  viewBox: "0 0 24 24",
211
202
  fill: "none",
212
203
  transform: "translate(0 -2)"
213
204
  }, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
214
- d: "M6 12H18M18 12L13 7M18 12L13 17",
215
- strokeWidth: "2",
216
- strokeLinecap: "round",
217
- strokeLinejoin: "round"
205
+ d: "M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z"
218
206
  }), " "))] : arrowIcons;
219
207
  var contentAreaScrollUpdate = (0,_utils_performance__WEBPACK_IMPORTED_MODULE_1__.throttle)(handleScrollEvent, 5);
220
208
 
@@ -19,6 +19,8 @@ declare type ToastProps = {
19
19
  autoCloseReverse?: boolean;
20
20
  /** You can not close pop-win when it is enabled */
21
21
  lock?: boolean;
22
+ /** Whether to use cascading styles */
23
+ cascading?: boolean;
22
24
  /** Self-defined class name for body*/
23
25
  schemeBody?: string;
24
26
  /** Self-defined class name for header */
@@ -29,7 +31,7 @@ declare type ToastProps = {
29
31
  closeDisabled?: boolean;
30
32
  /** -- */
31
33
  id?: string;
32
- onClose?: (e: any, data: any[]) => void;
34
+ onClose?: (e: HTMLDivElement, currentIndex: number, data: HTMLDivElement[]) => void;
33
35
  };
34
36
  declare const Toast: (props: ToastProps) => JSX.Element;
35
37
  export default Toast;