@tamagui/select 1.0.1-beta.103 → 1.0.1-beta.106
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/Select.js +185 -81
- package/dist/cjs/Select.js.map +2 -2
- package/dist/esm/Select.js +174 -70
- package/dist/esm/Select.js.map +2 -2
- package/dist/jsx/Select.js +137 -62
- package/dist/jsx/Select.js.map +2 -2
- package/package.json +12 -11
- package/src/Select.tsx +717 -585
- package/types/Select.d.ts +89 -20
- package/types/Select.d.ts.map +1 -1
package/types/Select.d.ts
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import { GetProps, SizeTokens } from '@tamagui/core';
|
|
1
|
+
import { GetProps, MediaPropKeys, SizeTokens, TamaguiElement } from '@tamagui/core';
|
|
2
2
|
import type { Scope } from '@tamagui/create-context';
|
|
3
3
|
import { ListItemProps } from '@tamagui/list-item';
|
|
4
4
|
import { YStackProps } from '@tamagui/stacks';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
value?: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onValueChange?(value: string): void;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
onOpenChange?(open: boolean): void;
|
|
15
|
+
dir?: Direction;
|
|
16
|
+
name?: string;
|
|
17
|
+
autoComplete?: string;
|
|
18
|
+
size?: SizeTokens;
|
|
19
|
+
sheetBreakpoint?: MediaPropKeys | false;
|
|
20
|
+
}
|
|
8
21
|
declare type ScopedProps<P> = P & {
|
|
9
22
|
__scopeSelect?: Scope;
|
|
10
23
|
};
|
|
11
24
|
declare const createSelectScope: import("@tamagui/create-context").CreateScope;
|
|
12
|
-
declare type GenericElement = HTMLElement | View;
|
|
13
25
|
declare type Direction = 'ltr' | 'rtl';
|
|
14
26
|
export declare type SelectTriggerProps = ListItemProps;
|
|
15
27
|
export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<import("@tamagui/helpers-tamagui").TextParentStyles, "TextComponent"> & Omit<import("react-native").ViewProps, "display" | "children"> & 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<{
|
|
@@ -86,7 +98,7 @@ export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<import(
|
|
|
86
98
|
scaleSpace?: number | undefined;
|
|
87
99
|
title?: React.ReactNode;
|
|
88
100
|
subTitle?: React.ReactNode;
|
|
89
|
-
} & React.RefAttributes<
|
|
101
|
+
} & React.RefAttributes<TamaguiElement>>;
|
|
90
102
|
export declare const SelectIcon: import("@tamagui/core").TamaguiComponent<(Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
91
103
|
readonly fullscreen?: boolean | undefined;
|
|
92
104
|
readonly elevation?: SizeTokens | undefined;
|
|
@@ -379,20 +391,10 @@ export declare const SelectSeparator: import("@tamagui/core").TamaguiComponent<(
|
|
|
379
391
|
} & ({} | {
|
|
380
392
|
[x: string]: undefined;
|
|
381
393
|
})>;
|
|
382
|
-
export
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
defaultValue?: string;
|
|
387
|
-
onValueChange?(value: string): void;
|
|
388
|
-
open?: boolean;
|
|
389
|
-
defaultOpen?: boolean;
|
|
390
|
-
onOpenChange?(open: boolean): void;
|
|
391
|
-
dir?: Direction;
|
|
392
|
-
name?: string;
|
|
393
|
-
autoComplete?: string;
|
|
394
|
-
size?: SizeTokens;
|
|
395
|
-
}
|
|
394
|
+
export declare const SelectSheetContents: {
|
|
395
|
+
({ __scopeSelect }: ScopedProps<{}>): JSX.Element;
|
|
396
|
+
displayName: string;
|
|
397
|
+
};
|
|
396
398
|
export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element) & {
|
|
397
399
|
Content: ({ children, __scopeSelect }: ScopedProps<SelectContentProps>) => JSX.Element;
|
|
398
400
|
Group: React.ForwardRefExoticComponent<((Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
@@ -682,7 +684,7 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
|
|
|
682
684
|
scaleSpace?: number | undefined;
|
|
683
685
|
title?: React.ReactNode;
|
|
684
686
|
subTitle?: React.ReactNode;
|
|
685
|
-
} & React.RefAttributes<
|
|
687
|
+
} & React.RefAttributes<TamaguiElement>>;
|
|
686
688
|
Value: React.ForwardRefExoticComponent<((Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{}, "size"> & {
|
|
687
689
|
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
688
690
|
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{}, "size"> & {
|
|
@@ -801,6 +803,73 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
|
|
|
801
803
|
}, "size"> & {
|
|
802
804
|
size?: SizeTokens | undefined;
|
|
803
805
|
}>> & React.RefAttributes<TamaguiElement>>;
|
|
806
|
+
SheetContents: {
|
|
807
|
+
({ __scopeSelect }: ScopedProps<{}>): JSX.Element;
|
|
808
|
+
displayName: string;
|
|
809
|
+
};
|
|
810
|
+
Sheet: ((props: Omit<{
|
|
811
|
+
open?: boolean | undefined;
|
|
812
|
+
defaultOpen?: boolean | undefined;
|
|
813
|
+
onChangeOpen?: (React.Dispatch<React.SetStateAction<boolean>> | ((open: boolean) => void)) | undefined;
|
|
814
|
+
position?: number | undefined;
|
|
815
|
+
defaultPosition?: number | undefined;
|
|
816
|
+
snapPoints?: number[] | undefined;
|
|
817
|
+
onChangePosition?: (React.Dispatch<React.SetStateAction<number>> | ((position: number) => void)) | undefined;
|
|
818
|
+
children?: React.ReactNode;
|
|
819
|
+
dismissOnOverlayPress?: boolean | undefined;
|
|
820
|
+
animationConfig?: import("react-native").Animated.SpringAnimationConfig | undefined;
|
|
821
|
+
disableDrag?: boolean | undefined;
|
|
822
|
+
modal?: boolean | undefined;
|
|
823
|
+
allowPinchZoom?: boolean | undefined;
|
|
824
|
+
} & {
|
|
825
|
+
__scopeSheet?: Scope<any>;
|
|
826
|
+
} & React.RefAttributes<import("react-native").View>, "theme" | "themeInverse"> & {
|
|
827
|
+
theme?: import("@tamagui/core").ThemeName | null | undefined;
|
|
828
|
+
themeInverse?: boolean | undefined;
|
|
829
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null) & {
|
|
830
|
+
Handle: ({ __scopeSheet, ...props }: Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
831
|
+
readonly fullscreen?: boolean | undefined;
|
|
832
|
+
readonly elevation?: SizeTokens | undefined;
|
|
833
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
834
|
+
readonly fullscreen?: boolean | undefined;
|
|
835
|
+
readonly elevation?: SizeTokens | undefined;
|
|
836
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
837
|
+
readonly fullscreen?: boolean | undefined;
|
|
838
|
+
readonly elevation?: SizeTokens | undefined;
|
|
839
|
+
}>> & {
|
|
840
|
+
__scopeSheet?: Scope<any>;
|
|
841
|
+
}) => JSX.Element | null;
|
|
842
|
+
Frame: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
843
|
+
readonly fullscreen?: boolean | undefined;
|
|
844
|
+
readonly elevation?: SizeTokens | undefined;
|
|
845
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
846
|
+
readonly fullscreen?: boolean | undefined;
|
|
847
|
+
readonly elevation?: SizeTokens | undefined;
|
|
848
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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"> & {
|
|
849
|
+
readonly fullscreen?: boolean | undefined;
|
|
850
|
+
readonly elevation?: SizeTokens | undefined;
|
|
851
|
+
}>> & {
|
|
852
|
+
__scopeSheet?: Scope<any>;
|
|
853
|
+
} & React.RefAttributes<unknown>>;
|
|
854
|
+
Overlay: ({ __scopeSheet, ...props }: Omit<import("react-native").ViewProps, "display" | "children"> & 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<{
|
|
855
|
+
readonly fullscreen?: boolean | undefined;
|
|
856
|
+
readonly elevation?: SizeTokens | undefined;
|
|
857
|
+
}, "closed"> & {
|
|
858
|
+
closed?: boolean | undefined;
|
|
859
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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<{
|
|
860
|
+
readonly fullscreen?: boolean | undefined;
|
|
861
|
+
readonly elevation?: SizeTokens | undefined;
|
|
862
|
+
}, "closed"> & {
|
|
863
|
+
closed?: boolean | undefined;
|
|
864
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & 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<{
|
|
865
|
+
readonly fullscreen?: boolean | undefined;
|
|
866
|
+
readonly elevation?: SizeTokens | undefined;
|
|
867
|
+
}, "closed"> & {
|
|
868
|
+
closed?: boolean | undefined;
|
|
869
|
+
}>> & {
|
|
870
|
+
__scopeSheet?: Scope<any>;
|
|
871
|
+
}) => JSX.Element;
|
|
872
|
+
};
|
|
804
873
|
};
|
|
805
874
|
export { createSelectScope };
|
|
806
875
|
//# sourceMappingURL=Select.d.ts.map
|
package/types/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAsBA,OAAO,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAmB,MAAM,eAAe,CAAA;AAWpG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAY,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