demio-ui 2.5.68 → 2.5.70

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.
@@ -8,7 +8,7 @@ export interface IToast {
8
8
  message?: ReactNode;
9
9
  onClose?: (id: number) => void;
10
10
  style?: CSSProperties;
11
- type?: 'error' | 'info' | 'success';
11
+ type?: 'error' | 'info' | 'success' | 'warning';
12
12
  }
13
13
  declare const Toast: FC<IToast>;
14
14
  export default Toast;
@@ -2,15 +2,20 @@ import React from 'react';
2
2
  import { IToast } from '../../components/Toast/Toast';
3
3
  declare class ToastManager {
4
4
  private setToastList;
5
+ private toastQueue;
6
+ private timerId;
5
7
  constructor();
6
8
  render: () => void;
7
9
  updateSetter(setToastList: React.Dispatch<React.SetStateAction<IToast[]>>): void;
8
10
  remove: (id: number) => void;
9
11
  private getUIToastListAmount;
10
12
  private add;
11
- info: (options: IToast) => Promise<void>;
12
- success: (options: IToast) => Promise<void>;
13
- error: (options: IToast) => Promise<void>;
13
+ private processQueue;
14
+ private addToQueue;
15
+ error: (options: IToast) => void;
16
+ info: (options: IToast) => void;
17
+ success: (options: IToast) => void;
18
+ warning: (options: IToast) => void;
14
19
  }
15
20
  export declare const toast: ToastManager;
16
21
  export {};
package/dist/types.d.ts CHANGED
@@ -464,7 +464,7 @@ interface IToast {
464
464
  message?: ReactNode;
465
465
  onClose?: (id: number) => void;
466
466
  style?: CSSProperties;
467
- type?: 'error' | 'info' | 'success';
467
+ type?: 'error' | 'info' | 'success' | 'warning';
468
468
  }
469
469
  declare const Toast: FC<IToast>;
470
470
 
@@ -2420,15 +2420,20 @@ declare const getCroppedImageURL: (imageSrc: string, pixelCrop: Area, rotation?:
2420
2420
 
2421
2421
  declare class ToastManager {
2422
2422
  private setToastList;
2423
+ private toastQueue;
2424
+ private timerId;
2423
2425
  constructor();
2424
2426
  render: () => void;
2425
2427
  updateSetter(setToastList: React__default.Dispatch<React__default.SetStateAction<IToast[]>>): void;
2426
2428
  remove: (id: number) => void;
2427
2429
  private getUIToastListAmount;
2428
2430
  private add;
2429
- info: (options: IToast) => Promise<void>;
2430
- success: (options: IToast) => Promise<void>;
2431
- error: (options: IToast) => Promise<void>;
2431
+ private processQueue;
2432
+ private addToQueue;
2433
+ error: (options: IToast) => void;
2434
+ info: (options: IToast) => void;
2435
+ success: (options: IToast) => void;
2436
+ warning: (options: IToast) => void;
2432
2437
  }
2433
2438
  declare const toast: ToastManager;
2434
2439
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demio-ui",
3
- "version": "2.5.68",
3
+ "version": "2.5.70",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",