@antoniobenincasa/ui 0.10.0 → 0.11.1

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
@@ -19,6 +19,10 @@ import { Slot } from '@radix-ui/react-slot';
19
19
  import * as TabsPrimitive from '@radix-ui/react-tabs';
20
20
  import { VariantProps } from 'class-variance-authority';
21
21
 
22
+ export declare function Alert({ title, message, variant, context, dismissible, exiting, onDismiss, className, ...props }: AlertProps): JSX.Element;
23
+
24
+ export declare type AlertContext = "inline" | "notification";
25
+
22
26
  export declare function AlertDialog({ ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Root>): JSX.Element;
23
27
 
24
28
  export declare function AlertDialogAction({ className, variant, size, ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React_2.ComponentProps<typeof Button>, "variant" | "size">): JSX.Element;
@@ -45,6 +49,18 @@ export declare function AlertDialogTitle({ className, ...props }: React_2.Compon
45
49
 
46
50
  export declare function AlertDialogTrigger({ ...props }: React_2.ComponentProps<typeof AlertDialogPrimitive.Trigger>): JSX.Element;
47
51
 
52
+ export declare interface AlertProps extends React_2.ComponentProps<"div"> {
53
+ title?: string;
54
+ message: string;
55
+ variant: AlertVariant;
56
+ context?: AlertContext;
57
+ dismissible?: boolean;
58
+ exiting?: boolean;
59
+ onDismiss?: () => void;
60
+ }
61
+
62
+ export declare type AlertVariant = "success" | "info" | "warning" | "danger";
63
+
48
64
  export declare const Autocomplete: (props: AutocompleteProps) => JSX.Element;
49
65
 
50
66
  declare type AutocompleteProps = {
@@ -67,7 +83,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
67
83
  }): JSX.Element;
68
84
 
69
85
  export declare const buttonVariants: (props?: ({
70
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
86
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
71
87
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
72
88
  } & ClassProp) | undefined) => string;
73
89
 
@@ -250,6 +266,35 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
250
266
 
251
267
  export declare function NavigationMenuViewport({ className, ...props }: React_2.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): JSX.Element;
252
268
 
269
+ declare function Notification_2({ id, title, message, variant, duration, onDismiss, exiting, className, }: NotificationProps): JSX.Element;
270
+ export { Notification_2 as Notification }
271
+
272
+ export declare interface NotificationContextValue {
273
+ notify: (opts: Omit<NotificationData, "id">) => string;
274
+ dismiss: (id: string) => void;
275
+ dismissAll: () => void;
276
+ }
277
+
278
+ export declare interface NotificationData {
279
+ id: string;
280
+ title?: string;
281
+ message: string;
282
+ variant: NotificationVariant;
283
+ duration?: number;
284
+ }
285
+
286
+ declare interface NotificationProps extends NotificationData {
287
+ onDismiss: (id: string) => void;
288
+ exiting?: boolean;
289
+ className?: string;
290
+ }
291
+
292
+ export declare function NotificationProvider({ children }: {
293
+ children: React_2.ReactNode;
294
+ }): JSX.Element;
295
+
296
+ export declare type NotificationVariant = "success" | "info" | "warning" | "danger";
297
+
253
298
  export declare function Popover({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Root>): JSX.Element;
254
299
 
255
300
  export declare function PopoverAnchor({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Anchor>): JSX.Element;
@@ -312,4 +357,6 @@ export declare const useFormField: () => {
312
357
  formMessageId: string;
313
358
  };
314
359
 
360
+ export declare function useNotification(): NotificationContextValue;
361
+
315
362
  export { }