@televet/kibble-ui 1.17.3 → 1.17.4
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.
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ColorMode, useChakra } from '@chakra-ui/system';
|
|
3
|
-
import { ToastOptions, ToastPositionWithLogical } from '@chakra-ui/react';
|
|
3
|
+
import { CloseAllToastsOptions, ToastOptions, ToastPositionWithLogical } from '@chakra-ui/react';
|
|
4
4
|
import { ToastId } from '@chakra-ui/toast/dist/declarations/src/toast.types';
|
|
5
5
|
import { Status } from '../feedback.types';
|
|
6
|
+
interface Toaster {
|
|
7
|
+
(options?: UseToastOptions | undefined): string | number | undefined;
|
|
8
|
+
close: (id: React.ReactText) => void;
|
|
9
|
+
closeAll: (options?: CloseAllToastsOptions | undefined) => void;
|
|
10
|
+
update(id: ToastId, options: Omit<UseToastOptions, 'id'>): void;
|
|
11
|
+
isActive: (id: React.ReactText) => boolean | undefined;
|
|
12
|
+
}
|
|
6
13
|
export interface UseToastOptions {
|
|
7
14
|
/**
|
|
8
15
|
* The placement of the toast
|
|
@@ -75,10 +82,10 @@ export declare const defaultStandaloneParam: Required<CreateStandAloneToastParam
|
|
|
75
82
|
/**
|
|
76
83
|
* Create a toast from outside of React Components
|
|
77
84
|
*/
|
|
78
|
-
export declare const createStandaloneToast: ({ theme, defaultOptions, }?: CreateStandAloneToastParam) =>
|
|
85
|
+
export declare const createStandaloneToast: ({ theme, defaultOptions, }?: CreateStandAloneToastParam) => Toaster;
|
|
79
86
|
/**
|
|
80
87
|
* React hook used to create a function that can be used
|
|
81
88
|
* to show toasts in an application.
|
|
82
89
|
*/
|
|
83
|
-
export declare const useToast: (options?: UseToastOptions | undefined) =>
|
|
90
|
+
export declare const useToast: (options?: UseToastOptions | undefined) => Toaster;
|
|
84
91
|
export default useToast;
|
package/build/index.js
CHANGED
|
@@ -14244,6 +14244,7 @@ var defaults = {
|
|
|
14244
14244
|
title: '',
|
|
14245
14245
|
duration: 5000,
|
|
14246
14246
|
position: 'top',
|
|
14247
|
+
isClosable: true,
|
|
14247
14248
|
};
|
|
14248
14249
|
var defaultStandaloneParam = {
|
|
14249
14250
|
theme: theme$1,
|