@tamagui/toast 1.7.10 → 1.8.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.
Files changed (131) hide show
  1. package/dist/cjs/Toast.js +95 -543
  2. package/dist/cjs/Toast.js.map +3 -3
  3. package/dist/cjs/ToastAnnounce.js +93 -0
  4. package/dist/cjs/ToastAnnounce.js.map +7 -0
  5. package/dist/cjs/ToastImpl.js +354 -0
  6. package/dist/cjs/ToastImpl.js.map +7 -0
  7. package/dist/cjs/ToastProvider.js +109 -0
  8. package/dist/cjs/ToastProvider.js.map +7 -0
  9. package/dist/cjs/ToastViewport.js +307 -0
  10. package/dist/cjs/ToastViewport.js.map +7 -0
  11. package/dist/cjs/constants.js +29 -0
  12. package/dist/cjs/constants.js.map +7 -0
  13. package/dist/cjs/createNativeToast.js +49 -0
  14. package/dist/cjs/createNativeToast.js.map +7 -0
  15. package/dist/cjs/createNativeToast.native.js +37 -0
  16. package/dist/cjs/createNativeToast.native.js.map +7 -0
  17. package/dist/cjs/createToast.js +88 -0
  18. package/dist/cjs/createToast.js.map +7 -0
  19. package/dist/cjs/types.js +17 -0
  20. package/dist/cjs/types.js.map +7 -0
  21. package/dist/esm/Toast.js +101 -531
  22. package/dist/esm/Toast.js.map +3 -3
  23. package/dist/esm/Toast.mjs +101 -531
  24. package/dist/esm/Toast.mjs.map +3 -3
  25. package/dist/esm/ToastAnnounce.js +64 -0
  26. package/dist/esm/ToastAnnounce.js.map +7 -0
  27. package/dist/esm/ToastAnnounce.mjs +64 -0
  28. package/dist/esm/ToastAnnounce.mjs.map +7 -0
  29. package/dist/esm/ToastImpl.js +330 -0
  30. package/dist/esm/ToastImpl.js.map +7 -0
  31. package/dist/esm/ToastImpl.mjs +330 -0
  32. package/dist/esm/ToastImpl.mjs.map +7 -0
  33. package/dist/esm/ToastProvider.js +70 -0
  34. package/dist/esm/ToastProvider.js.map +7 -0
  35. package/dist/esm/ToastProvider.mjs +70 -0
  36. package/dist/esm/ToastProvider.mjs.map +7 -0
  37. package/dist/esm/ToastViewport.js +274 -0
  38. package/dist/esm/ToastViewport.js.map +7 -0
  39. package/dist/esm/ToastViewport.mjs +274 -0
  40. package/dist/esm/ToastViewport.mjs.map +7 -0
  41. package/dist/esm/constants.js +5 -0
  42. package/dist/esm/constants.js.map +7 -0
  43. package/dist/esm/constants.mjs +5 -0
  44. package/dist/esm/constants.mjs.map +7 -0
  45. package/dist/esm/createNativeToast.js +25 -0
  46. package/dist/esm/createNativeToast.js.map +7 -0
  47. package/dist/esm/createNativeToast.mjs +25 -0
  48. package/dist/esm/createNativeToast.mjs.map +7 -0
  49. package/dist/esm/createNativeToast.native.js +13 -0
  50. package/dist/esm/createNativeToast.native.js.map +7 -0
  51. package/dist/esm/createNativeToast.native.mjs +13 -0
  52. package/dist/esm/createNativeToast.native.mjs.map +7 -0
  53. package/dist/esm/createToast.js +54 -0
  54. package/dist/esm/createToast.js.map +7 -0
  55. package/dist/esm/createToast.mjs +54 -0
  56. package/dist/esm/createToast.mjs.map +7 -0
  57. package/dist/esm/types.js +1 -0
  58. package/dist/esm/types.js.map +7 -0
  59. package/dist/esm/types.mjs +1 -0
  60. package/dist/esm/types.mjs.map +7 -0
  61. package/dist/jsx/Toast.js +97 -509
  62. package/dist/jsx/Toast.js.map +3 -3
  63. package/dist/jsx/Toast.mjs +97 -509
  64. package/dist/jsx/Toast.mjs.map +3 -3
  65. package/dist/jsx/ToastAnnounce.js +60 -0
  66. package/dist/jsx/ToastAnnounce.js.map +7 -0
  67. package/dist/jsx/ToastAnnounce.mjs +60 -0
  68. package/dist/jsx/ToastAnnounce.mjs.map +7 -0
  69. package/dist/jsx/ToastImpl.js +309 -0
  70. package/dist/jsx/ToastImpl.js.map +7 -0
  71. package/dist/jsx/ToastImpl.mjs +309 -0
  72. package/dist/jsx/ToastImpl.mjs.map +7 -0
  73. package/dist/jsx/ToastProvider.js +65 -0
  74. package/dist/jsx/ToastProvider.js.map +7 -0
  75. package/dist/jsx/ToastProvider.mjs +65 -0
  76. package/dist/jsx/ToastProvider.mjs.map +7 -0
  77. package/dist/jsx/ToastViewport.js +254 -0
  78. package/dist/jsx/ToastViewport.js.map +7 -0
  79. package/dist/jsx/ToastViewport.mjs +254 -0
  80. package/dist/jsx/ToastViewport.mjs.map +7 -0
  81. package/dist/jsx/constants.js +5 -0
  82. package/dist/jsx/constants.js.map +7 -0
  83. package/dist/jsx/constants.mjs +5 -0
  84. package/dist/jsx/constants.mjs.map +7 -0
  85. package/dist/jsx/createNativeToast.js +25 -0
  86. package/dist/jsx/createNativeToast.js.map +7 -0
  87. package/dist/jsx/createNativeToast.mjs +25 -0
  88. package/dist/jsx/createNativeToast.mjs.map +7 -0
  89. package/dist/jsx/createNativeToast.native.js +13 -0
  90. package/dist/jsx/createNativeToast.native.js.map +7 -0
  91. package/dist/jsx/createNativeToast.native.mjs +13 -0
  92. package/dist/jsx/createNativeToast.native.mjs.map +7 -0
  93. package/dist/jsx/createToast.js +49 -0
  94. package/dist/jsx/createToast.js.map +7 -0
  95. package/dist/jsx/createToast.mjs +49 -0
  96. package/dist/jsx/createToast.mjs.map +7 -0
  97. package/dist/jsx/types.js +1 -0
  98. package/dist/jsx/types.js.map +7 -0
  99. package/dist/jsx/types.mjs +1 -0
  100. package/dist/jsx/types.mjs.map +7 -0
  101. package/package.json +14 -13
  102. package/src/Toast.tsx +139 -908
  103. package/src/ToastAnnounce.tsx +97 -0
  104. package/src/ToastImpl.tsx +439 -0
  105. package/src/ToastProvider.tsx +134 -0
  106. package/src/ToastViewport.tsx +354 -0
  107. package/src/constants.ts +1 -0
  108. package/src/createNativeToast.native.tsx +16 -0
  109. package/src/createNativeToast.tsx +25 -0
  110. package/src/createToast.tsx +93 -0
  111. package/src/types.ts +21 -0
  112. package/types/Toast.d.ts +429 -106
  113. package/types/Toast.d.ts.map +1 -1
  114. package/types/ToastAnnounce.d.ts +35 -0
  115. package/types/ToastAnnounce.d.ts.map +1 -0
  116. package/types/ToastImpl.d.ts +267 -0
  117. package/types/ToastImpl.d.ts.map +1 -0
  118. package/types/ToastProvider.d.ts +80 -0
  119. package/types/ToastProvider.d.ts.map +1 -0
  120. package/types/ToastViewport.d.ts +115 -0
  121. package/types/ToastViewport.d.ts.map +1 -0
  122. package/types/constants.d.ts +2 -0
  123. package/types/constants.d.ts.map +1 -0
  124. package/types/createNativeToast.d.ts +3 -0
  125. package/types/createNativeToast.d.ts.map +1 -0
  126. package/types/createNativeToast.native.d.ts +3 -0
  127. package/types/createNativeToast.native.d.ts.map +1 -0
  128. package/types/createToast.d.ts +42 -0
  129. package/types/createToast.d.ts.map +1 -0
  130. package/types/types.d.ts +17 -0
  131. package/types/types.d.ts.map +1 -0
@@ -0,0 +1,35 @@
1
+ import { GetProps, TamaguiElement } from '@tamagui/core';
2
+ import { VisuallyHidden } from '@tamagui/visually-hidden';
3
+ import * as React from 'react';
4
+ import { ScopedProps } from './ToastProvider';
5
+ declare const ToastAnnounceExcludeFrame: import("@tamagui/core").TamaguiComponent<(Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>> & import("@tamagui/core").MediaProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps) | (Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
6
+ [x: string]: undefined;
7
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
8
+ [x: string]: undefined;
9
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
10
+ [x: string]: undefined;
11
+ }>>), TamaguiElement, Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps, {} | {
12
+ [x: string]: undefined;
13
+ }>;
14
+ type ToastAnnounceExcludeFrameProps = GetProps<typeof ToastAnnounceExcludeFrame>;
15
+ type ToastAnnounceExcludeProps = ToastAnnounceExcludeFrameProps & {
16
+ altText?: string;
17
+ };
18
+ declare const ToastAnnounceExclude: React.ForwardRefExoticComponent<((Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>> & import("@tamagui/core").MediaProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core").PseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>>>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & {
19
+ altText?: string | undefined;
20
+ }) | Omit<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
21
+ [x: string]: undefined;
22
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
23
+ [x: string]: undefined;
24
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, string | number> & {
25
+ [x: string]: undefined;
26
+ }>> & {
27
+ altText?: string | undefined;
28
+ }, "ref">) & React.RefAttributes<TamaguiElement>>;
29
+ interface ToastAnnounceProps extends Omit<GetProps<typeof VisuallyHidden>, 'children'>, ScopedProps<{
30
+ children: string[];
31
+ }> {
32
+ }
33
+ declare const ToastAnnounce: React.FC<ToastAnnounceProps>;
34
+ export { ToastAnnounce, ToastAnnounceProps, ToastAnnounceExclude, ToastAnnounceExcludeProps, };
35
+ //# sourceMappingURL=ToastAnnounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastAnnounce.d.ts","sourceRoot":"","sources":["../src/ToastAnnounce.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,cAAc,EAKf,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,WAAW,EAA2B,MAAM,iBAAiB,CAAA;AAGtE,QAAA,MAAM,yBAAyB;;;;;;;;EAE7B,CAAA;AACF,KAAK,8BAA8B,GAAG,QAAQ,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAChF,KAAK,yBAAyB,GAAG,8BAA8B,GAAG;IAChE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,oBAAoB;;;;;;;;;;iDAazB,CAAA;AAID,UAAU,kBACR,SAAQ,IAAI,CAAC,QAAQ,CAAC,OAAO,cAAc,CAAC,EAAE,UAAU,CAAC,EACvD,WAAW,CAAC;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;CAAG;AAE1C,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4B/C,CAAA;AAkBD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAA"}
@@ -0,0 +1,267 @@
1
+ import { GetProps, TamaguiElement } from '@tamagui/core';
2
+ import { DismissableProps } from '@tamagui/dismissable';
3
+ import * as React from 'react';
4
+ import { GestureResponderEvent } from 'react-native';
5
+ declare const ToastImplFrame: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
6
+ readonly fullscreen?: boolean | undefined;
7
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
8
+ } & {
9
+ readonly backgrounded?: boolean | undefined;
10
+ readonly radiused?: boolean | undefined;
11
+ readonly hoverTheme?: boolean | undefined;
12
+ readonly pressTheme?: boolean | undefined;
13
+ readonly focusTheme?: boolean | undefined;
14
+ readonly circular?: boolean | undefined;
15
+ readonly padded?: boolean | undefined;
16
+ readonly elevate?: boolean | undefined;
17
+ readonly bordered?: number | boolean | undefined;
18
+ readonly transparent?: boolean | undefined;
19
+ readonly chromeless?: boolean | "all" | undefined;
20
+ }, "backgrounded" | "unstyled"> & {
21
+ backgrounded?: boolean | undefined;
22
+ unstyled?: boolean | undefined;
23
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
24
+ readonly fullscreen?: boolean | undefined;
25
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
26
+ } & {
27
+ readonly backgrounded?: boolean | undefined;
28
+ readonly radiused?: boolean | undefined;
29
+ readonly hoverTheme?: boolean | undefined;
30
+ readonly pressTheme?: boolean | undefined;
31
+ readonly focusTheme?: boolean | undefined;
32
+ readonly circular?: boolean | undefined;
33
+ readonly padded?: boolean | undefined;
34
+ readonly elevate?: boolean | undefined;
35
+ readonly bordered?: number | boolean | undefined;
36
+ readonly transparent?: boolean | undefined;
37
+ readonly chromeless?: boolean | "all" | undefined;
38
+ }, "backgrounded" | "unstyled"> & {
39
+ backgrounded?: boolean | undefined;
40
+ unstyled?: boolean | undefined;
41
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
42
+ readonly fullscreen?: boolean | undefined;
43
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
44
+ } & {
45
+ readonly backgrounded?: boolean | undefined;
46
+ readonly radiused?: boolean | undefined;
47
+ readonly hoverTheme?: boolean | undefined;
48
+ readonly pressTheme?: boolean | undefined;
49
+ readonly focusTheme?: boolean | undefined;
50
+ readonly circular?: boolean | undefined;
51
+ readonly padded?: boolean | undefined;
52
+ readonly elevate?: boolean | undefined;
53
+ readonly bordered?: number | boolean | undefined;
54
+ readonly transparent?: boolean | undefined;
55
+ readonly chromeless?: boolean | "all" | undefined;
56
+ }, "backgrounded" | "unstyled"> & {
57
+ backgrounded?: boolean | undefined;
58
+ unstyled?: boolean | undefined;
59
+ }>>, TamaguiElement, Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps, {
60
+ readonly fullscreen?: boolean | undefined;
61
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
62
+ } & {
63
+ readonly backgrounded?: boolean | undefined;
64
+ readonly radiused?: boolean | undefined;
65
+ readonly hoverTheme?: boolean | undefined;
66
+ readonly pressTheme?: boolean | undefined;
67
+ readonly focusTheme?: boolean | undefined;
68
+ readonly circular?: boolean | undefined;
69
+ readonly padded?: boolean | undefined;
70
+ readonly elevate?: boolean | undefined;
71
+ readonly bordered?: number | boolean | undefined;
72
+ readonly transparent?: boolean | undefined;
73
+ readonly chromeless?: boolean | "all" | undefined;
74
+ } & {
75
+ backgrounded?: boolean | undefined;
76
+ unstyled?: boolean | undefined;
77
+ }>;
78
+ interface ToastProps extends Omit<ToastImplProps, keyof ToastImplPrivateProps> {
79
+ /**
80
+ * The controlled open state of the dialog. Must be used in conjunction with `onOpenChange`.
81
+ */
82
+ open?: boolean;
83
+ /**
84
+ * The open state of the dialog when it is initially rendered. Use when you do not need to control its open state.
85
+ */
86
+ defaultOpen?: boolean;
87
+ /**
88
+ * Event handler called when the open state of the dialog changes.
89
+ */
90
+ onOpenChange?(open: boolean): void;
91
+ /**
92
+ * Used to force mounting when more control is needed. Useful when
93
+ * controlling animation with React animation libraries.
94
+ */
95
+ forceMount?: true;
96
+ }
97
+ type SwipeEvent = GestureResponderEvent;
98
+ declare const useToastInteractiveContext: (consumerName: string, scope: import("@tamagui/create-context").Scope<{
99
+ onClose(): void;
100
+ } | undefined>, options?: {
101
+ warn?: boolean | undefined;
102
+ fallback?: Partial<{
103
+ onClose(): void;
104
+ }> | undefined;
105
+ } | undefined) => {
106
+ onClose(): void;
107
+ };
108
+ type ToastImplPrivateProps = {
109
+ open: boolean;
110
+ onClose(): void;
111
+ };
112
+ type ToastImplFrameProps = GetProps<typeof ToastImplFrame>;
113
+ type ToastImplProps = ToastImplPrivateProps & ToastImplFrameProps & {
114
+ /**
115
+ * Control the sensitivity of the toast for accessibility purposes.
116
+ * For toasts that are the result of a user action, choose foreground. Toasts generated from background tasks should use background.
117
+ */
118
+ type?: 'foreground' | 'background';
119
+ /**
120
+ * Time in milliseconds that toast should remain visible for. Overrides value given to `ToastProvider`.
121
+ */
122
+ duration?: number;
123
+ /**
124
+ * Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`.
125
+ */
126
+ onEscapeKeyDown?: DismissableProps['onEscapeKeyDown'];
127
+ /**
128
+ * Event handler called when the dismiss timer is paused.
129
+ * On web, this occurs when the pointer is moved over the viewport, the viewport is focused or when the window is blurred.
130
+ * On mobile, this occurs when the toast is touched.
131
+ */
132
+ onPause?(): void;
133
+ /**
134
+ * Event handler called when the dismiss timer is resumed.
135
+ * On web, this occurs when the pointer is moved away from the viewport, the viewport is blurred or when the window is focused.
136
+ * On mobile, this occurs when the toast is released.
137
+ */
138
+ onResume?(): void;
139
+ /**
140
+ * Event handler called when starting a swipe interaction. It can be prevented by calling `event.preventDefault`.
141
+ */
142
+ onSwipeStart?(event: SwipeEvent): void;
143
+ /**
144
+ * Event handler called during a swipe interaction. It can be prevented by calling `event.preventDefault`.
145
+ */
146
+ onSwipeMove?(event: SwipeEvent): void;
147
+ /**
148
+ * Event handler called at the cancellation of a swipe interaction. It can be prevented by calling `event.preventDefault`.
149
+ */
150
+ onSwipeCancel?(event: SwipeEvent): void;
151
+ /**
152
+ * Event handler called at the end of a swipe interaction. It can be prevented by calling `event.preventDefault`.
153
+ */
154
+ onSwipeEnd?(event: SwipeEvent): void;
155
+ /**
156
+ * The viewport's name to send the toast to. Used when using multiple viewports and want to forward toasts to different ones.
157
+ *
158
+ * @default "default"
159
+ */
160
+ viewportName?: string;
161
+ };
162
+ declare const ToastImpl: React.ForwardRefExoticComponent<ToastImplPrivateProps & Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
163
+ readonly fullscreen?: boolean | undefined;
164
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
165
+ } & {
166
+ readonly backgrounded?: boolean | undefined;
167
+ readonly radiused?: boolean | undefined;
168
+ readonly hoverTheme?: boolean | undefined;
169
+ readonly pressTheme?: boolean | undefined;
170
+ readonly focusTheme?: boolean | undefined;
171
+ readonly circular?: boolean | undefined;
172
+ readonly padded?: boolean | undefined;
173
+ readonly elevate?: boolean | undefined;
174
+ readonly bordered?: number | boolean | undefined;
175
+ readonly transparent?: boolean | undefined;
176
+ readonly chromeless?: boolean | "all" | undefined;
177
+ }, "backgrounded" | "unstyled"> & {
178
+ backgrounded?: boolean | undefined;
179
+ unstyled?: boolean | undefined;
180
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
181
+ readonly fullscreen?: boolean | undefined;
182
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
183
+ } & {
184
+ readonly backgrounded?: boolean | undefined;
185
+ readonly radiused?: boolean | undefined;
186
+ readonly hoverTheme?: boolean | undefined;
187
+ readonly pressTheme?: boolean | undefined;
188
+ readonly focusTheme?: boolean | undefined;
189
+ readonly circular?: boolean | undefined;
190
+ readonly padded?: boolean | undefined;
191
+ readonly elevate?: boolean | undefined;
192
+ readonly bordered?: number | boolean | undefined;
193
+ readonly transparent?: boolean | undefined;
194
+ readonly chromeless?: boolean | "all" | undefined;
195
+ }, "backgrounded" | "unstyled"> & {
196
+ backgrounded?: boolean | undefined;
197
+ unstyled?: boolean | undefined;
198
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
199
+ readonly fullscreen?: boolean | undefined;
200
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
201
+ } & {
202
+ readonly backgrounded?: boolean | undefined;
203
+ readonly radiused?: boolean | undefined;
204
+ readonly hoverTheme?: boolean | undefined;
205
+ readonly pressTheme?: boolean | undefined;
206
+ readonly focusTheme?: boolean | undefined;
207
+ readonly circular?: boolean | undefined;
208
+ readonly padded?: boolean | undefined;
209
+ readonly elevate?: boolean | undefined;
210
+ readonly bordered?: number | boolean | undefined;
211
+ readonly transparent?: boolean | undefined;
212
+ readonly chromeless?: boolean | "all" | undefined;
213
+ }, "backgrounded" | "unstyled"> & {
214
+ backgrounded?: boolean | undefined;
215
+ unstyled?: boolean | undefined;
216
+ }>> & {
217
+ /**
218
+ * Control the sensitivity of the toast for accessibility purposes.
219
+ * For toasts that are the result of a user action, choose foreground. Toasts generated from background tasks should use background.
220
+ */
221
+ type?: "background" | "foreground" | undefined;
222
+ /**
223
+ * Time in milliseconds that toast should remain visible for. Overrides value given to `ToastProvider`.
224
+ */
225
+ duration?: number | undefined;
226
+ /**
227
+ * Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`.
228
+ */
229
+ onEscapeKeyDown?: DismissableProps['onEscapeKeyDown'];
230
+ /**
231
+ * Event handler called when the dismiss timer is paused.
232
+ * On web, this occurs when the pointer is moved over the viewport, the viewport is focused or when the window is blurred.
233
+ * On mobile, this occurs when the toast is touched.
234
+ */
235
+ onPause?(): void;
236
+ /**
237
+ * Event handler called when the dismiss timer is resumed.
238
+ * On web, this occurs when the pointer is moved away from the viewport, the viewport is blurred or when the window is focused.
239
+ * On mobile, this occurs when the toast is released.
240
+ */
241
+ onResume?(): void;
242
+ /**
243
+ * Event handler called when starting a swipe interaction. It can be prevented by calling `event.preventDefault`.
244
+ */
245
+ onSwipeStart?(event: SwipeEvent): void;
246
+ /**
247
+ * Event handler called during a swipe interaction. It can be prevented by calling `event.preventDefault`.
248
+ */
249
+ onSwipeMove?(event: SwipeEvent): void;
250
+ /**
251
+ * Event handler called at the cancellation of a swipe interaction. It can be prevented by calling `event.preventDefault`.
252
+ */
253
+ onSwipeCancel?(event: SwipeEvent): void;
254
+ /**
255
+ * Event handler called at the end of a swipe interaction. It can be prevented by calling `event.preventDefault`.
256
+ */
257
+ onSwipeEnd?(event: SwipeEvent): void;
258
+ /**
259
+ * The viewport's name to send the toast to. Used when using multiple viewports and want to forward toasts to different ones.
260
+ *
261
+ * @default "default"
262
+ */
263
+ viewportName?: string | undefined;
264
+ } & React.RefAttributes<TamaguiElement>>;
265
+ export { ToastImpl, ToastImplFrame, ToastImplProps, useToastInteractiveContext };
266
+ export type { ToastProps };
267
+ //# sourceMappingURL=ToastImpl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastImpl.d.ts","sourceRoot":"","sources":["../src/ToastImpl.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,cAAc,EAQf,MAAM,eAAe,CAAA;AACtB,OAAO,EAAe,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAY,qBAAqB,EAAgB,MAAM,cAAc,CAAA;AAa5E,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBlB,CAAA;AACF,UAAU,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,qBAAqB,CAAC;IAC5E;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;CAClB;AAED,KAAK,UAAU,GAAG,qBAAqB,CAAA;AAEvC,QAAA,MAAiC,0BAA0B;;;;;;;;;CAK1D,CAAA;AAED,KAAK,qBAAqB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,IAAI,IAAI,CAAA;CAAE,CAAA;AAC/D,KAAK,mBAAmB,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAC1D,KAAK,cAAc,GAAG,qBAAqB,GACzC,mBAAmB,GAAG;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,YAAY,CAAA;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IACrD;;;;OAIG;IACH,OAAO,CAAC,IAAI,IAAI,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,IAAI,CAAA;IACjB;;OAEG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACtC;;OAEG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACrC;;OAEG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACvC;;OAEG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAjDX;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;sBACe,gBAAgB,CAAC,iBAAiB,CAAC;IACrD;;;;OAIG;gBACS,IAAI;IAChB;;;;OAIG;iBACU,IAAI;IACjB;;OAEG;yBACkB,UAAU,GAAG,IAAI;IACtC;;OAEG;wBACiB,UAAU,GAAG,IAAI;IACrC;;OAEG;0BACmB,UAAU,GAAG,IAAI;IACvC;;OAEG;uBACgB,UAAU,GAAG,IAAI;IACpC;;;;OAIG;;wCAqPN,CAAA;AA6DD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,0BAA0B,EAAE,CAAA;AAChF,YAAY,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,80 @@
1
+ import { TamaguiElement } from '@tamagui/core';
2
+ import type { Scope } from '@tamagui/create-context';
3
+ import * as React from 'react';
4
+ declare const Collection: {
5
+ readonly Provider: React.FC<{
6
+ children?: React.ReactNode;
7
+ scope: any;
8
+ }>;
9
+ readonly Slot: React.ForwardRefExoticComponent<import("@tamagui/collection/types/Collection").CollectionProps & React.RefAttributes<TamaguiElement>>;
10
+ readonly ItemSlot: React.ForwardRefExoticComponent<{
11
+ children: React.ReactNode;
12
+ scope: any;
13
+ } & React.RefAttributes<TamaguiElement>>;
14
+ }, useCollection: (scope: any) => () => {
15
+ ref: React.RefObject<TamaguiElement>;
16
+ }[];
17
+ type SwipeDirection = 'vertical' | 'up' | 'down' | 'horizontal' | 'left' | 'right';
18
+ type ToastProviderContextValue = {
19
+ id: string;
20
+ label: string;
21
+ duration: number;
22
+ swipeDirection: SwipeDirection;
23
+ swipeThreshold: number;
24
+ toastCount: number;
25
+ viewport: TamaguiElement | null;
26
+ onViewportChange(viewport: TamaguiElement): void;
27
+ onToastAdd(): void;
28
+ onToastRemove(): void;
29
+ isFocusedToastEscapeKeyDownRef: React.MutableRefObject<boolean>;
30
+ isClosePausedRef: React.MutableRefObject<boolean>;
31
+ };
32
+ type ScopedProps<P> = P & {
33
+ __scopeToast?: Scope;
34
+ };
35
+ declare const createToastContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType | undefined) => readonly [{
36
+ (props: ContextValueType & {
37
+ scope: Scope<ContextValueType>;
38
+ children: React.ReactNode;
39
+ }): JSX.Element;
40
+ displayName: string;
41
+ }, (consumerName: string, scope: Scope<ContextValueType | undefined>, options?: {
42
+ warn?: boolean | undefined;
43
+ fallback?: Partial<ContextValueType> | undefined;
44
+ } | undefined) => ContextValueType], createToastScope: import("@tamagui/create-context").CreateScope;
45
+ declare const useToastProviderContext: (consumerName: string, scope: Scope<ToastProviderContextValue | undefined>, options?: {
46
+ warn?: boolean | undefined;
47
+ fallback?: Partial<ToastProviderContextValue> | undefined;
48
+ } | undefined) => ToastProviderContextValue;
49
+ interface ToastProviderProps {
50
+ children?: React.ReactNode;
51
+ /**
52
+ * An author-localized label for each toast. Used to help screen reader users
53
+ * associate the interruption with a toast.
54
+ * @defaultValue 'Notification'
55
+ */
56
+ label?: string;
57
+ /**
58
+ * Time in milliseconds that each toast should remain visible for.
59
+ * @defaultValue 5000
60
+ */
61
+ duration?: number;
62
+ /**
63
+ * Direction of pointer swipe that should close the toast.
64
+ * @defaultValue 'right'
65
+ */
66
+ swipeDirection?: SwipeDirection;
67
+ /**
68
+ * Distance in pixels that the swipe must pass before a close is triggered.
69
+ * @defaultValue 50
70
+ */
71
+ swipeThreshold?: number;
72
+ /**
73
+ * @defaultValue unique generated identifier
74
+ */
75
+ id?: string;
76
+ }
77
+ declare const ToastProvider: React.FC<ToastProviderProps>;
78
+ export { Collection, ToastProvider, createToastContext, createToastScope, useCollection, useToastProviderContext };
79
+ export type { ScopedProps, SwipeDirection, ToastProviderProps };
80
+ //# sourceMappingURL=ToastProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../src/ToastProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAS,MAAM,eAAe,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,QAAA,MAAO,UAAU;;;;;;;;;;GAAE,aAAa;;GACW,CAAA;AAE3C,KAAK,cAAc,GAAG,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAA;AAClF,KAAK,yBAAyB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,cAAc,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/B,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IAChD,UAAU,IAAI,IAAI,CAAA;IAClB,aAAa,IAAI,IAAI,CAAA;IACrB,8BAA8B,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC/D,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;CAClD,CAAA;AAED,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAClD,QAAA,MAAO,kBAAkB;;;;;;;;;qCAAE,gBAAgB,+CAEzC,CAAA;AACF,QAAA,MAA8B,uBAAuB;;;2CACS,CAAA;AAE9D,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6C/C,CAAA;AAcD,OAAO,EACL,UAAU,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,uBAAuB,EACxG,CAAA;AACD,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,115 @@
1
+ import { GetProps, TamaguiElement } from '@tamagui/core';
2
+ import * as React from 'react';
3
+ declare const VIEWPORT_DEFAULT_HOTKEY: string[];
4
+ declare const VIEWPORT_PAUSE = "toast.viewportPause";
5
+ declare const VIEWPORT_RESUME = "toast.viewportResume";
6
+ declare const ToastViewportFrame: import("@tamagui/core").TamaguiComponent<(Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
7
+ readonly fullscreen?: boolean | undefined;
8
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
9
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
10
+ readonly fullscreen?: boolean | undefined;
11
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
12
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
13
+ readonly fullscreen?: boolean | undefined;
14
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
15
+ }>>) | (Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
16
+ readonly fullscreen?: boolean | undefined;
17
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
18
+ }, string | number> & {
19
+ [x: string]: undefined;
20
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
21
+ readonly fullscreen?: boolean | undefined;
22
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
23
+ }, string | number> & {
24
+ [x: string]: undefined;
25
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
26
+ readonly fullscreen?: boolean | undefined;
27
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
28
+ }, string | number> & {
29
+ [x: string]: undefined;
30
+ }>>), TamaguiElement, Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps, {
31
+ readonly fullscreen?: boolean | undefined;
32
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
33
+ } | ({
34
+ readonly fullscreen?: boolean | undefined;
35
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
36
+ } & {
37
+ [x: string]: undefined;
38
+ })>;
39
+ type ToastViewportFrameProps = GetProps<typeof ToastViewportFrame>;
40
+ type ToastViewportProps = ToastViewportFrameProps & {
41
+ /**
42
+ * The keys to use as the keyboard shortcut that will move focus to the toast viewport.
43
+ * @defaultValue ['F8']
44
+ */
45
+ hotkey?: string[];
46
+ /**
47
+ * An author-localized label for the toast viewport to provide context for screen reader users
48
+ * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.
49
+ * @defaultValue 'Notifications ({hotkey})'
50
+ */
51
+ label?: string;
52
+ /**
53
+ * Used to reference the viewport if you want to have multiple viewports in the same provider.
54
+ */
55
+ name?: string;
56
+ };
57
+ declare const ToastViewport: React.ForwardRefExoticComponent<((Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
58
+ readonly fullscreen?: boolean | undefined;
59
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
60
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
61
+ readonly fullscreen?: boolean | undefined;
62
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
63
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
64
+ readonly fullscreen?: boolean | undefined;
65
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
66
+ }>> & {
67
+ /**
68
+ * The keys to use as the keyboard shortcut that will move focus to the toast viewport.
69
+ * @defaultValue ['F8']
70
+ */
71
+ hotkey?: string[] | undefined;
72
+ /**
73
+ * An author-localized label for the toast viewport to provide context for screen reader users
74
+ * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.
75
+ * @defaultValue 'Notifications ({hotkey})'
76
+ */
77
+ label?: string | undefined;
78
+ /**
79
+ * Used to reference the viewport if you want to have multiple viewports in the same provider.
80
+ */
81
+ name?: string | undefined;
82
+ }) | Omit<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
83
+ readonly fullscreen?: boolean | undefined;
84
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
85
+ }, string | number> & {
86
+ [x: string]: undefined;
87
+ } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
88
+ readonly fullscreen?: boolean | undefined;
89
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
90
+ }, string | number> & {
91
+ [x: string]: undefined;
92
+ }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{
93
+ readonly fullscreen?: boolean | undefined;
94
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
95
+ }, string | number> & {
96
+ [x: string]: undefined;
97
+ }>> & {
98
+ /**
99
+ * The keys to use as the keyboard shortcut that will move focus to the toast viewport.
100
+ * @defaultValue ['F8']
101
+ */
102
+ hotkey?: string[] | undefined;
103
+ /**
104
+ * An author-localized label for the toast viewport to provide context for screen reader users
105
+ * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.
106
+ * @defaultValue 'Notifications ({hotkey})'
107
+ */
108
+ label?: string | undefined;
109
+ /**
110
+ * Used to reference the viewport if you want to have multiple viewports in the same provider.
111
+ */
112
+ name?: string | undefined;
113
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
114
+ export { ToastViewport, ToastViewportProps, VIEWPORT_DEFAULT_HOTKEY, VIEWPORT_PAUSE, VIEWPORT_RESUME, };
115
+ //# sourceMappingURL=ToastViewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastViewport.d.ts","sourceRoot":"","sources":["../src/ToastViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAA;AAIvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,QAAA,MAAM,uBAAuB,UAAS,CAAA;AACtC,QAAA,MAAM,cAAc,wBAAwB,CAAA;AAC5C,QAAA,MAAM,eAAe,yBAAyB,CAAA;AAgB9C,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMtB,CAAA;AACF,KAAK,uBAAuB,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAClE,KAAK,kBAAkB,GAAG,uBAAuB,GAAG;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,QAAA,MAAM,aAAa;;;;;;;;;;IAjBjB;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;IAbH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;iDA8MJ,CAAA;AAqFD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,GAChB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const TOAST_NAME = "Toast";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { CreateNativeToastsOptionsFn } from './types';
2
+ export declare const createNativeToast: CreateNativeToastsOptionsFn;
3
+ //# sourceMappingURL=createNativeToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNativeToast.d.ts","sourceRoot":"","sources":["../src/createNativeToast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,iBAAiB,EAAE,2BAsB/B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { CreateNativeToastsOptionsFn } from './types';
2
+ export declare const createNativeToast: CreateNativeToastsOptionsFn;
3
+ //# sourceMappingURL=createNativeToast.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNativeToast.native.d.ts","sourceRoot":"","sources":["../src/createNativeToast.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAEhF,eAAO,MAAM,iBAAiB,EAAE,2BAa/B,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { Scope } from '@tamagui/create-context';
2
+ import React from 'react';
3
+ import { CreateNativeToastsOptions } from './types';
4
+ type NativeValue = boolean | 'web' | 'mobile';
5
+ interface CreateToastOptions {
6
+ /**
7
+ * Will show a native toast if is true or is set to the current platform. On iOS, it wraps `SPIndicator` and `SPAlert`. On Android, it wraps `ToastAndroid`. On web, it wraps Notification API. Mobile's native features are handled by `burnt`.
8
+ */
9
+ native?: NativeValue;
10
+ }
11
+ interface ToastOptions extends CreateNativeToastsOptions {
12
+ /**
13
+ * Used when need custom data
14
+ */
15
+ additionalInfo?: Record<string, any>;
16
+ /**
17
+ * Overrides the native option on `createToast()`
18
+ */
19
+ native?: NativeValue;
20
+ }
21
+ type ScopedProps<P> = P & {
22
+ __scopeToast?: Scope;
23
+ };
24
+ type ToastData = {
25
+ title: string;
26
+ id: string;
27
+ } & CreateNativeToastsOptions;
28
+ declare const createToast: (options?: CreateToastOptions) => {
29
+ ImperativeToastProvider: ({ __scopeToast, children, }: ScopedProps<{
30
+ children: React.ReactNode;
31
+ }>) => JSX.Element;
32
+ useToast: () => {
33
+ /**
34
+ * The toast to get and show if not using native
35
+ */
36
+ currentToast: ToastData | null;
37
+ show(title: string, showOptions?: ToastOptions): void;
38
+ };
39
+ };
40
+ export { createToast };
41
+ export type { CreateToastOptions };
42
+ //# sourceMappingURL=createToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createToast.d.ts","sourceRoot":"","sources":["../src/createToast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAsB,MAAM,yBAAyB,CAAA;AACnE,OAAO,KAAiB,MAAM,OAAO,CAAA;AAGrC,OAAO,EAAE,yBAAyB,EAA+B,MAAM,SAAS,CAAA;AAEhF,KAAK,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC7C,UAAU,kBAAkB;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AACD,UAAU,YAAa,SAAQ,yBAAyB;IACtD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AACD,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAElD,KAAK,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,yBAAyB,CAAA;AAa1E,QAAA,MAAM,WAAW;;kBAKc,MAAM,SAAS;;;QA0BtC;;WAEG;;oBAES,MAAM,gBAAgB,YAAY;;CAerD,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,kBAAkB,EAAE,CAAA"}