@xsolla/xui-toast 0.119.0 → 0.120.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-toast",
3
- "version": "0.119.0",
3
+ "version": "0.120.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -14,9 +14,9 @@
14
14
  "test:coverage": "vitest run --coverage"
15
15
  },
16
16
  "dependencies": {
17
- "@xsolla/xui-core": "0.119.0",
18
- "@xsolla/xui-icons": "0.119.0",
19
- "@xsolla/xui-primitives-core": "0.119.0"
17
+ "@xsolla/xui-core": "0.120.0",
18
+ "@xsolla/xui-icons": "0.120.0",
19
+ "@xsolla/xui-primitives-core": "0.120.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=16.8.0",
@@ -1,114 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.21.0
5
- * @flow
6
- */
7
-
8
- import * as React from "react";
9
- import React__default, { Node } from "react";
10
- declare type ToastVariant = "success" | "info" | "warning" | "error";
11
- declare type ToastPosition = "top" | "bottom";
12
- declare interface ToastData {
13
- id: string;
14
- variant: ToastVariant;
15
- message: string;
16
- icon?: Node;
17
- duration?: number;
18
- }
19
- declare interface ToastProps {
20
- id: string;
21
- variant?: ToastVariant;
22
- message: string;
23
- icon?: Node;
24
- onClose?: () => void;
25
- }
26
- declare interface ToastOptions {
27
- variant?: ToastVariant;
28
- message: string;
29
- icon?: Node;
30
- duration?: number;
31
- }
32
- declare interface ToastGroupProps {
33
- toasts: ToastData[];
34
- position?: ToastPosition;
35
- onDismiss: (id: string) => void;
36
- }
37
- declare interface ToastContextType {
38
- toasts: ToastData[];
39
- addToast: (options: ToastOptions) => string;
40
- dismissToast: (id: string) => void;
41
- dismissAllToasts: () => void;
42
- }
43
- declare interface ToastProviderProps {
44
- children: Node;
45
- position?: ToastPosition;
46
- defaultDuration?: number;
47
- }
48
- declare var Toast: React__default.FC<ToastProps>;
49
- declare var ToastGroup: React__default.MemoExoticComponent<
50
- (x: ToastGroupProps) => React__default.ReactPortal | null
51
- >;
52
- declare var ToastProvider: React__default.FC<ToastProviderProps>;
53
- declare var ToastContext: React.Context<ToastContextType | null>;
54
- declare interface UseToastReturn {
55
- /**
56
- * Show a toast with custom options
57
- */
58
- toast: (options: ToastOptions) => string;
59
-
60
- /**
61
- * Show a success toast
62
- */
63
- success: (
64
- message: string,
65
- options?: $Diff<ToastOptions, { message: any, variant: any }>
66
- ) => string;
67
-
68
- /**
69
- * Show an info toast
70
- */
71
- info: (
72
- message: string,
73
- options?: $Diff<ToastOptions, { message: any, variant: any }>
74
- ) => string;
75
-
76
- /**
77
- * Show a warning toast
78
- */
79
- warning: (
80
- message: string,
81
- options?: $Diff<ToastOptions, { message: any, variant: any }>
82
- ) => string;
83
-
84
- /**
85
- * Show an error toast
86
- */
87
- error: (
88
- message: string,
89
- options?: $Diff<ToastOptions, { message: any, variant: any }>
90
- ) => string;
91
-
92
- /**
93
- * Dismiss a specific toast by ID
94
- */
95
- dismiss: (id: string) => void;
96
-
97
- /**
98
- * Dismiss all toasts
99
- */
100
- dismissAll: () => void;
101
- }
102
- declare var useToast: () => UseToastReturn;
103
- export type {
104
- ToastContextType,
105
- ToastData,
106
- ToastGroupProps,
107
- ToastOptions,
108
- ToastPosition,
109
- ToastProps,
110
- ToastProviderProps,
111
- ToastVariant,
112
- UseToastReturn,
113
- };
114
- declare export { Toast, ToastContext, ToastGroup, ToastProvider, useToast };
package/web/index.js.flow DELETED
@@ -1,114 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.21.0
5
- * @flow
6
- */
7
-
8
- import * as React from "react";
9
- import React__default, { Node } from "react";
10
- declare type ToastVariant = "success" | "info" | "warning" | "error";
11
- declare type ToastPosition = "top" | "bottom";
12
- declare interface ToastData {
13
- id: string;
14
- variant: ToastVariant;
15
- message: string;
16
- icon?: Node;
17
- duration?: number;
18
- }
19
- declare interface ToastProps {
20
- id: string;
21
- variant?: ToastVariant;
22
- message: string;
23
- icon?: Node;
24
- onClose?: () => void;
25
- }
26
- declare interface ToastOptions {
27
- variant?: ToastVariant;
28
- message: string;
29
- icon?: Node;
30
- duration?: number;
31
- }
32
- declare interface ToastGroupProps {
33
- toasts: ToastData[];
34
- position?: ToastPosition;
35
- onDismiss: (id: string) => void;
36
- }
37
- declare interface ToastContextType {
38
- toasts: ToastData[];
39
- addToast: (options: ToastOptions) => string;
40
- dismissToast: (id: string) => void;
41
- dismissAllToasts: () => void;
42
- }
43
- declare interface ToastProviderProps {
44
- children: Node;
45
- position?: ToastPosition;
46
- defaultDuration?: number;
47
- }
48
- declare var Toast: React__default.FC<ToastProps>;
49
- declare var ToastGroup: React__default.MemoExoticComponent<
50
- (x: ToastGroupProps) => React__default.ReactPortal | null
51
- >;
52
- declare var ToastProvider: React__default.FC<ToastProviderProps>;
53
- declare var ToastContext: React.Context<ToastContextType | null>;
54
- declare interface UseToastReturn {
55
- /**
56
- * Show a toast with custom options
57
- */
58
- toast: (options: ToastOptions) => string;
59
-
60
- /**
61
- * Show a success toast
62
- */
63
- success: (
64
- message: string,
65
- options?: $Diff<ToastOptions, { message: any, variant: any }>
66
- ) => string;
67
-
68
- /**
69
- * Show an info toast
70
- */
71
- info: (
72
- message: string,
73
- options?: $Diff<ToastOptions, { message: any, variant: any }>
74
- ) => string;
75
-
76
- /**
77
- * Show a warning toast
78
- */
79
- warning: (
80
- message: string,
81
- options?: $Diff<ToastOptions, { message: any, variant: any }>
82
- ) => string;
83
-
84
- /**
85
- * Show an error toast
86
- */
87
- error: (
88
- message: string,
89
- options?: $Diff<ToastOptions, { message: any, variant: any }>
90
- ) => string;
91
-
92
- /**
93
- * Dismiss a specific toast by ID
94
- */
95
- dismiss: (id: string) => void;
96
-
97
- /**
98
- * Dismiss all toasts
99
- */
100
- dismissAll: () => void;
101
- }
102
- declare var useToast: () => UseToastReturn;
103
- export type {
104
- ToastContextType,
105
- ToastData,
106
- ToastGroupProps,
107
- ToastOptions,
108
- ToastPosition,
109
- ToastProps,
110
- ToastProviderProps,
111
- ToastVariant,
112
- UseToastReturn,
113
- };
114
- declare export { Toast, ToastContext, ToastGroup, ToastProvider, useToast };