@tamagui/toast 1.0.1-beta.139

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/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Toast'
@@ -0,0 +1,75 @@
1
+ import { TamaguiElement } from '@tamagui/core';
2
+ import * as React from 'react';
3
+ declare type SwipeDirection = 'up' | 'down' | 'left' | 'right';
4
+ interface ToastProviderProps {
5
+ children?: React.ReactNode;
6
+ label?: string;
7
+ duration?: number;
8
+ swipeDirection?: SwipeDirection;
9
+ swipeThreshold?: number;
10
+ }
11
+ declare const ToastProvider: React.FC<ToastProviderProps>;
12
+ declare type PrimitiveOrderedListProps = any;
13
+ interface ToastViewportProps extends PrimitiveOrderedListProps {
14
+ hotkey?: string[];
15
+ label?: string;
16
+ }
17
+ declare const ToastViewport: React.ForwardRefExoticComponent<Pick<ToastViewportProps, keyof ToastViewportProps> & React.RefAttributes<TamaguiElement>>;
18
+ declare type ToastElement = ToastImplElement;
19
+ interface ToastProps extends Omit<ToastImplProps, keyof ToastImplPrivateProps> {
20
+ open?: boolean;
21
+ defaultOpen?: boolean;
22
+ onOpenChange?(open: boolean): void;
23
+ forceMount?: true;
24
+ }
25
+ declare const Toast: React.ForwardRefExoticComponent<Pick<ToastProps, keyof ToastProps> & React.RefAttributes<TamaguiElement>>;
26
+ declare type SwipeEvent = {
27
+ currentTarget: EventTarget & ToastElement;
28
+ } & Omit<CustomEvent<{
29
+ originalEvent: React.PointerEvent;
30
+ delta: {
31
+ x: number;
32
+ y: number;
33
+ };
34
+ }>, 'currentTarget'>;
35
+ declare type ToastImplElement = TamaguiElement;
36
+ declare type DismissableLayerProps = any;
37
+ declare type ToastImplPrivateProps = {
38
+ open: boolean;
39
+ onClose(): void;
40
+ };
41
+ declare type PrimitiveListItemProps = any;
42
+ interface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps {
43
+ type?: 'foreground' | 'background';
44
+ duration?: number;
45
+ onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
46
+ onSwipeStart?(event: SwipeEvent): void;
47
+ onSwipeMove?(event: SwipeEvent): void;
48
+ onSwipeCancel?(event: SwipeEvent): void;
49
+ onSwipeEnd?(event: SwipeEvent): void;
50
+ }
51
+ declare type PrimitiveDivProps = any;
52
+ interface ToastTitleProps extends PrimitiveDivProps {
53
+ }
54
+ declare const ToastTitle: React.ForwardRefExoticComponent<Pick<ToastTitleProps, string | number> & React.RefAttributes<TamaguiElement>>;
55
+ interface ToastDescriptionProps extends PrimitiveDivProps {
56
+ }
57
+ declare const ToastDescription: React.ForwardRefExoticComponent<Pick<ToastDescriptionProps, string | number> & React.RefAttributes<any>>;
58
+ interface ToastActionProps extends ToastCloseProps {
59
+ altText: string;
60
+ }
61
+ declare const ToastAction: React.ForwardRefExoticComponent<Pick<ToastActionProps, keyof ToastActionProps> & React.RefAttributes<TamaguiElement>>;
62
+ declare type PrimitiveButtonProps = any;
63
+ interface ToastCloseProps extends PrimitiveButtonProps {
64
+ }
65
+ declare const ToastClose: React.ForwardRefExoticComponent<Pick<ToastCloseProps, string | number> & React.RefAttributes<TamaguiElement>>;
66
+ declare const Provider: React.FC<ToastProviderProps>;
67
+ declare const Viewport: React.ForwardRefExoticComponent<Pick<ToastViewportProps, keyof ToastViewportProps> & React.RefAttributes<TamaguiElement>>;
68
+ declare const Root: React.ForwardRefExoticComponent<Pick<ToastProps, keyof ToastProps> & React.RefAttributes<TamaguiElement>>;
69
+ declare const Title: React.ForwardRefExoticComponent<Pick<ToastTitleProps, string | number> & React.RefAttributes<TamaguiElement>>;
70
+ declare const Description: React.ForwardRefExoticComponent<Pick<ToastDescriptionProps, string | number> & React.RefAttributes<any>>;
71
+ declare const Action: React.ForwardRefExoticComponent<Pick<ToastActionProps, keyof ToastActionProps> & React.RefAttributes<TamaguiElement>>;
72
+ declare const Close: React.ForwardRefExoticComponent<Pick<ToastCloseProps, string | number> & React.RefAttributes<TamaguiElement>>;
73
+ export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastAction, ToastClose, Provider, Viewport, Root, Title, Description, Action, Close, };
74
+ export type { ToastProviderProps, ToastViewportProps, ToastProps, ToastTitleProps, ToastDescriptionProps, ToastActionProps, ToastCloseProps, };
75
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './Toast';
2
+ //# sourceMappingURL=index.d.ts.map