@televet/kibble-ui 1.17.2 → 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) => (options?: UseToastOptions | undefined) => ToastId | undefined;
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) => (options?: UseToastOptions | undefined) => ToastId | undefined;
90
+ export declare const useToast: (options?: UseToastOptions | undefined) => Toaster;
84
91
  export default useToast;
@@ -1,5 +1,6 @@
1
- export * as BetaPopover from './popover.component';
1
+ export * from './popover.component';
2
2
  export * from './popover.config';
3
+ export * from './popover.types';
3
4
  export * from './components/PopoverBody/popoverBody.component';
4
5
  export * from './components/PopoverFooter/popoverFooter.component';
5
6
  export * from './components/PopoverCloseButton/popoverCloseButton.component';
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,
@@ -21673,11 +21674,6 @@ var Popover = function (_a) {
21673
21674
  React__default["default"].createElement(Text, { size: "sm" }, children)), !!darkMode)));
21674
21675
  };
21675
21676
 
21676
- var popover_component = /*#__PURE__*/Object.freeze({
21677
- __proto__: null,
21678
- Popover: Popover
21679
- });
21680
-
21681
21677
  var PopoverConfig = {
21682
21678
  xs: { width: 160 },
21683
21679
  sm: { width: 200 },
@@ -24587,7 +24583,6 @@ exports.AvatarConfig = AvatarConfig;
24587
24583
  exports.AvatarGroup = AvatarGroup;
24588
24584
  exports.BetaMenu = BetaMenu;
24589
24585
  exports.BetaModal = modal_component;
24590
- exports.BetaPopover = popover_component;
24591
24586
  exports.Button = Button;
24592
24587
  exports.ButtonSizeConfig = ButtonSizeConfig;
24593
24588
  exports.ButtonVariantConfig = ButtonVariantConfig;
@@ -24611,6 +24606,7 @@ exports.ModalFooter = ModalFooter;
24611
24606
  exports.ModalFooterButtons = ModalFooterButtons;
24612
24607
  exports.ModalHeader = ModalHeader;
24613
24608
  exports.NotificationCounter = NotificationCounter;
24609
+ exports.Popover = Popover;
24614
24610
  exports.PopoverBody = PopoverBody;
24615
24611
  exports.PopoverCloseButton = PopoverCloseButton;
24616
24612
  exports.PopoverConfig = PopoverConfig;