@vacano/ui 1.5.0 → 1.6.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/dist/index.d.ts CHANGED
@@ -443,6 +443,37 @@ export declare type MultiSelectProps = VacanoComponentProps<HTMLDivElement, Mult
443
443
 
444
444
  export declare type MultiSelectVariant = 'normal' | 'error';
445
445
 
446
+ declare type Notification_2 = {
447
+ id: string;
448
+ message: string;
449
+ variant: NotificationVariant;
450
+ duration: number;
451
+ };
452
+ export { Notification_2 as Notification }
453
+
454
+ export declare type NotificationAction = {
455
+ type: 'ADD_NOTIFICATION';
456
+ payload: Notification_2;
457
+ } | {
458
+ type: 'REMOVE_CURRENT';
459
+ } | {
460
+ type: 'SHOW_NEXT';
461
+ };
462
+
463
+ export declare type NotificationContextValue = {
464
+ show: (message: string, variant?: NotificationVariant, duration?: number) => void;
465
+ hide: () => void;
466
+ };
467
+
468
+ export declare const NotificationProvider: ({ children }: PropsWithChildren) => JSX.Element;
469
+
470
+ export declare type NotificationState = {
471
+ current: Notification_2 | null;
472
+ queue: Notification_2[];
473
+ };
474
+
475
+ export declare type NotificationVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
476
+
446
477
  export declare const OtpCode: ({ autoFocus, className, classnames, disabled, label, length, onChange, ref, size, value, variant, ...rest }: OtpCodeProps) => JSX.Element;
447
478
 
448
479
  export declare type OtpCodeClassNames = {
@@ -799,6 +830,8 @@ export declare type UseImageCropperReturn = {
799
830
  open: () => void;
800
831
  };
801
832
 
833
+ export declare const useNotification: () => NotificationContextValue;
834
+
802
835
  export declare const useSaveProgress: () => SaveProgressContextValue;
803
836
 
804
837
  export declare const useToast: () => ToastContextValue;