@tamagui/sheet 1.0.1-beta.166 → 1.0.1-beta.168
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/cjs/Sheet.js +21 -17
- package/dist/cjs/Sheet.js.map +2 -2
- package/dist/cjs/SheetScrollView.js +4 -10
- package/dist/cjs/SheetScrollView.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/Sheet.js +20 -17
- package/dist/esm/Sheet.js.map +2 -2
- package/dist/esm/SheetScrollView.js +3 -9
- package/dist/esm/SheetScrollView.js.map +2 -2
- package/dist/jsx/Sheet.js +20 -17
- package/dist/jsx/Sheet.js.map +2 -2
- package/dist/jsx/SheetScrollView.js +3 -9
- package/dist/jsx/SheetScrollView.js.map +2 -2
- package/package.json +10 -9
- package/src/Sheet.tsx +27 -18
- package/src/SheetScrollView.tsx +5 -10
- package/src/types.tsx +2 -2
- package/types/Sheet.d.ts +35 -6
- package/types/SheetScrollView.d.ts +9 -3
- package/types/types.d.ts +2 -2
package/types/Sheet.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { GetProps, TamaguiElement } from '@tamagui/core';
|
|
|
2
2
|
import { XStackProps } from '@tamagui/stacks';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import { SheetScopedProps } from './types';
|
|
5
|
+
import { SheetProps, SheetScopedProps } from './types';
|
|
6
6
|
export { createSheetScope } from './SheetContext';
|
|
7
7
|
export declare const SheetHandleFrame: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
|
|
8
8
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -97,11 +97,11 @@ export declare const SheetFrame: React.ForwardRefExoticComponent<Omit<import("re
|
|
|
97
97
|
export declare const Sheet: ((props: Omit<{
|
|
98
98
|
open?: boolean | undefined;
|
|
99
99
|
defaultOpen?: boolean | undefined;
|
|
100
|
-
|
|
100
|
+
onOpenChange?: (((open: boolean) => void) | React.Dispatch<React.SetStateAction<boolean>>) | undefined;
|
|
101
101
|
position?: number | undefined;
|
|
102
102
|
defaultPosition?: number | undefined;
|
|
103
103
|
snapPoints?: number[] | undefined;
|
|
104
|
-
|
|
104
|
+
onPositionChange?: import("./types").PositionChangeHandler | undefined;
|
|
105
105
|
children?: React.ReactNode;
|
|
106
106
|
dismissOnOverlayPress?: boolean | undefined;
|
|
107
107
|
dismissOnSnapToBottom?: boolean | undefined;
|
|
@@ -130,15 +130,44 @@ export declare const Sheet: ((props: Omit<{
|
|
|
130
130
|
__scopeSheet?: import("@tamagui/create-context").Scope<any>;
|
|
131
131
|
} & React.RefAttributes<unknown>>;
|
|
132
132
|
Overlay: ({ __scopeSheet, ...props }: SheetScopedProps<SheetOverlayProps>) => JSX.Element;
|
|
133
|
-
ScrollView: React.ForwardRefExoticComponent<import("react-native").ScrollViewProps &
|
|
133
|
+
ScrollView: React.ForwardRefExoticComponent<((import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps>) | Pick<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
134
|
+
[x: string]: undefined;
|
|
135
|
+
} & import("@tamagui/core").MediaProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
136
|
+
[x: string]: undefined;
|
|
137
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
138
|
+
[x: string]: undefined;
|
|
139
|
+
}>>, string | number>) & React.RefAttributes<TamaguiElement>>;
|
|
140
|
+
};
|
|
141
|
+
export declare const ControlledSheet: React.FunctionComponent<Omit<SheetProps, "open" | "onOpenChange"> & React.RefAttributes<View>> & {
|
|
142
|
+
Handle: ({ __scopeSheet, ...props }: SheetScopedProps<XStackProps>) => JSX.Element;
|
|
143
|
+
Frame: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
144
|
+
readonly fullscreen?: boolean | undefined;
|
|
145
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
146
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
147
|
+
readonly fullscreen?: boolean | undefined;
|
|
148
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
149
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
150
|
+
readonly fullscreen?: boolean | undefined;
|
|
151
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
152
|
+
}>> & {
|
|
153
|
+
__scopeSheet?: import("@tamagui/create-context").Scope<any>;
|
|
154
|
+
} & React.RefAttributes<unknown>>;
|
|
155
|
+
Overlay: ({ __scopeSheet, ...props }: SheetScopedProps<SheetOverlayProps>) => JSX.Element;
|
|
156
|
+
ScrollView: React.ForwardRefExoticComponent<((import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps>) | Pick<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
157
|
+
[x: string]: undefined;
|
|
158
|
+
} & import("@tamagui/core").MediaProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
159
|
+
[x: string]: undefined;
|
|
160
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
161
|
+
[x: string]: undefined;
|
|
162
|
+
}>>, string | number>) & React.RefAttributes<TamaguiElement>>;
|
|
134
163
|
};
|
|
135
164
|
declare type SheetControllerContextValue = {
|
|
136
165
|
disableDrag?: boolean;
|
|
137
166
|
open?: boolean;
|
|
138
167
|
hidden?: boolean;
|
|
139
|
-
|
|
168
|
+
onOpenChange?: React.Dispatch<React.SetStateAction<boolean>> | ((val: boolean) => void);
|
|
140
169
|
};
|
|
141
|
-
export declare const SheetController: ({ children,
|
|
170
|
+
export declare const SheetController: ({ children, onOpenChange, ...value }: Partial<SheetControllerContextValue> & {
|
|
142
171
|
children?: React.ReactNode;
|
|
143
172
|
}) => JSX.Element;
|
|
144
173
|
//# sourceMappingURL=Sheet.d.ts.map
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
export declare const SheetScrollView:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TamaguiElement } from '@tamagui/core';
|
|
3
|
+
export declare const SheetScrollView: import("react").ForwardRefExoticComponent<((import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps>) | Pick<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
4
|
+
[x: string]: undefined;
|
|
5
|
+
} & import("@tamagui/core").MediaProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
6
|
+
[x: string]: undefined;
|
|
7
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<import("react-native").ScrollViewProps & Omit<import("@tamagui/core").StackProps, keyof import("react-native").ScrollViewProps> & Omit<{}, string | number> & {
|
|
8
|
+
[x: string]: undefined;
|
|
9
|
+
}>>, string | number>) & import("react").RefAttributes<TamaguiElement>>;
|
|
4
10
|
//# sourceMappingURL=SheetScrollView.d.ts.map
|
package/types/types.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import React, { ReactNode } from 'react';
|
|
|
5
5
|
export declare type SheetProps = ScopedProps<{
|
|
6
6
|
open?: boolean;
|
|
7
7
|
defaultOpen?: boolean;
|
|
8
|
-
|
|
8
|
+
onOpenChange?: OpenChangeHandler;
|
|
9
9
|
position?: number;
|
|
10
10
|
defaultPosition?: number;
|
|
11
11
|
snapPoints?: number[];
|
|
12
|
-
|
|
12
|
+
onPositionChange?: PositionChangeHandler;
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
dismissOnOverlayPress?: boolean;
|
|
15
15
|
dismissOnSnapToBottom?: boolean;
|