@tamagui/select 1.41.0 → 1.42.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.
- package/package.json +18 -18
- package/types/Select.d.ts +346 -88
- package/types/Select.d.ts.map +1 -1
- package/types/SelectTrigger.d.ts +25 -3
- package/types/SelectTrigger.d.ts.map +1 -1
- package/types/SelectViewport.d.ts +90 -13
- package/types/SelectViewport.d.ts.map +1 -1
- package/dist/cjs/useSelectItemContext.js +0 -180
- package/dist/cjs/useSelectItemContext.js.map +0 -6
- package/dist/esm/useSelectItemContext.js +0 -146
- package/dist/esm/useSelectItemContext.js.map +0 -6
- package/dist/jsx/useSelectItemContext.js +0 -137
- package/dist/jsx/useSelectItemContext.js.map +0 -6
- package/dist/jsx/useSelectItemContext.mjs +0 -137
- package/dist/jsx/useSelectItemContext.mjs.map +0 -6
- package/types/useSelectItemContext.d.ts +0 -145
- package/types/useSelectItemContext.d.ts.map +0 -1
package/types/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAOnB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAO5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,OAAO,EAAE,WAAW,EAAmB,WAAW,EAAE,MAAM,SAAS,CAAA;AAYnE,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAOnB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAO5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,OAAO,EAAE,WAAW,EAAmB,WAAW,EAAE,MAAM,SAAS,CAAA;AAYnE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpB,CAAA;AAEF,KAAK,gBAAgB,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,GAAG;IAC1D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B,CAAA;AAkDD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrB,CAAA;AAQF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe9B,CAAA;AAkGF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAA;AAuGF,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAA;AAgC5C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAA;AAoCF,eAAO,MAAM,MAAM,WACT,YAAY,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8HjC,CAAA"}
|
package/types/SelectTrigger.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<import(
|
|
|
24
24
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
25
25
|
readonly active?: boolean | undefined;
|
|
26
26
|
readonly disabled?: boolean | undefined;
|
|
27
|
-
} & import("@tamagui/core").
|
|
27
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
28
28
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
29
29
|
} & 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<{
|
|
30
30
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -46,7 +46,7 @@ export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<import(
|
|
|
46
46
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
47
47
|
readonly active?: boolean | undefined;
|
|
48
48
|
readonly disabled?: boolean | undefined;
|
|
49
|
-
}>> & import("@tamagui/core").
|
|
49
|
+
}>> & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
50
50
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
51
51
|
} & 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<{
|
|
52
52
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -68,7 +68,29 @@ export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<import(
|
|
|
68
68
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
69
69
|
readonly active?: boolean | undefined;
|
|
70
70
|
readonly disabled?: boolean | undefined;
|
|
71
|
-
}
|
|
71
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
72
|
+
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
73
|
+
} & 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<{
|
|
74
|
+
readonly fullscreen?: boolean | undefined;
|
|
75
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
76
|
+
} & {
|
|
77
|
+
readonly backgrounded?: boolean | undefined;
|
|
78
|
+
readonly radiused?: boolean | undefined;
|
|
79
|
+
readonly hoverTheme?: boolean | undefined;
|
|
80
|
+
readonly pressTheme?: boolean | undefined;
|
|
81
|
+
readonly focusTheme?: boolean | undefined;
|
|
82
|
+
readonly circular?: boolean | undefined;
|
|
83
|
+
readonly padded?: boolean | undefined;
|
|
84
|
+
readonly elevate?: boolean | undefined;
|
|
85
|
+
readonly bordered?: number | boolean | undefined;
|
|
86
|
+
readonly transparent?: boolean | undefined;
|
|
87
|
+
readonly chromeless?: boolean | "all" | undefined;
|
|
88
|
+
}, "disabled" | "size" | "unstyled" | "active"> & {
|
|
89
|
+
readonly unstyled?: boolean | undefined;
|
|
90
|
+
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
91
|
+
readonly active?: boolean | undefined;
|
|
92
|
+
readonly disabled?: boolean | undefined;
|
|
93
|
+
}>>>> & import("@tamagui/core").ThemeableProps & {
|
|
72
94
|
icon?: (JSX.Element | React.FunctionComponent<{
|
|
73
95
|
color?: string | undefined;
|
|
74
96
|
size?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTrigger.d.ts","sourceRoot":"","sources":["../src/SelectTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAA;AAE9C,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"SelectTrigger.d.ts","sourceRoot":"","sources":["../src/SelectTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0DzB,CAAA"}
|
|
@@ -20,7 +20,7 @@ export declare const SelectViewportFrame: import("@tamagui/core").TamaguiCompone
|
|
|
20
20
|
}, "size" | "unstyled"> & {
|
|
21
21
|
readonly unstyled?: boolean | undefined;
|
|
22
22
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
23
|
-
} & import("@tamagui/core").
|
|
23
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
24
24
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
25
25
|
} & 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
26
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -40,7 +40,7 @@ export declare const SelectViewportFrame: import("@tamagui/core").TamaguiCompone
|
|
|
40
40
|
}, "size" | "unstyled"> & {
|
|
41
41
|
readonly unstyled?: boolean | undefined;
|
|
42
42
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
43
|
-
}>> & import("@tamagui/core").
|
|
43
|
+
}>> & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
44
44
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
45
45
|
} & 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<{
|
|
46
46
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -60,7 +60,27 @@ export declare const SelectViewportFrame: import("@tamagui/core").TamaguiCompone
|
|
|
60
60
|
}, "size" | "unstyled"> & {
|
|
61
61
|
readonly unstyled?: boolean | undefined;
|
|
62
62
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
63
|
-
}
|
|
63
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
64
|
+
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
65
|
+
} & 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<{
|
|
66
|
+
readonly fullscreen?: boolean | undefined;
|
|
67
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
68
|
+
} & {
|
|
69
|
+
readonly backgrounded?: boolean | undefined;
|
|
70
|
+
readonly radiused?: boolean | undefined;
|
|
71
|
+
readonly hoverTheme?: boolean | undefined;
|
|
72
|
+
readonly pressTheme?: boolean | undefined;
|
|
73
|
+
readonly focusTheme?: boolean | undefined;
|
|
74
|
+
readonly circular?: boolean | undefined;
|
|
75
|
+
readonly padded?: boolean | undefined;
|
|
76
|
+
readonly elevate?: boolean | undefined;
|
|
77
|
+
readonly bordered?: number | boolean | undefined;
|
|
78
|
+
readonly transparent?: boolean | undefined;
|
|
79
|
+
readonly chromeless?: boolean | "all" | undefined;
|
|
80
|
+
}, "size" | "unstyled"> & {
|
|
81
|
+
readonly unstyled?: boolean | undefined;
|
|
82
|
+
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
83
|
+
}>>>>, TamaguiElement, Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
64
84
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
65
85
|
} & 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, {
|
|
66
86
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -124,7 +144,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
124
144
|
readonly bordered?: number | boolean | undefined;
|
|
125
145
|
readonly transparent?: boolean | undefined;
|
|
126
146
|
readonly chromeless?: boolean | "all" | undefined;
|
|
127
|
-
} & import("@tamagui/core").
|
|
147
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
128
148
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
129
149
|
} & 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<{
|
|
130
150
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -141,7 +161,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
141
161
|
readonly bordered?: number | boolean | undefined;
|
|
142
162
|
readonly transparent?: boolean | undefined;
|
|
143
163
|
readonly chromeless?: boolean | "all" | undefined;
|
|
144
|
-
}>> & import("@tamagui/core").
|
|
164
|
+
}>> & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
145
165
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
146
166
|
} & 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<{
|
|
147
167
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -158,7 +178,24 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
158
178
|
readonly bordered?: number | boolean | undefined;
|
|
159
179
|
readonly transparent?: boolean | undefined;
|
|
160
180
|
readonly chromeless?: boolean | "all" | undefined;
|
|
161
|
-
}
|
|
181
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
182
|
+
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
183
|
+
} & 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<{
|
|
184
|
+
readonly fullscreen?: boolean | undefined;
|
|
185
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
186
|
+
}, "transparent" | "circular" | "hoverTheme" | "pressTheme" | "focusTheme" | "elevate" | "bordered" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
|
|
187
|
+
readonly backgrounded?: boolean | undefined;
|
|
188
|
+
readonly radiused?: boolean | undefined;
|
|
189
|
+
readonly hoverTheme?: boolean | undefined;
|
|
190
|
+
readonly pressTheme?: boolean | undefined;
|
|
191
|
+
readonly focusTheme?: boolean | undefined;
|
|
192
|
+
readonly circular?: boolean | undefined;
|
|
193
|
+
readonly padded?: boolean | undefined;
|
|
194
|
+
readonly elevate?: boolean | undefined;
|
|
195
|
+
readonly bordered?: number | boolean | undefined;
|
|
196
|
+
readonly transparent?: boolean | undefined;
|
|
197
|
+
readonly chromeless?: boolean | "all" | undefined;
|
|
198
|
+
}>>>> & {
|
|
162
199
|
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
163
200
|
disableScroll?: boolean | undefined;
|
|
164
201
|
unstyled?: boolean | undefined;
|
|
@@ -182,7 +219,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
182
219
|
}, "size" | "unstyled"> & {
|
|
183
220
|
readonly unstyled?: boolean | undefined;
|
|
184
221
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
185
|
-
} & import("@tamagui/core").
|
|
222
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
186
223
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
187
224
|
} & 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<{
|
|
188
225
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -202,7 +239,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
202
239
|
}, "size" | "unstyled"> & {
|
|
203
240
|
readonly unstyled?: boolean | undefined;
|
|
204
241
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
205
|
-
}>> & import("@tamagui/core").
|
|
242
|
+
}>> & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
206
243
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
207
244
|
} & 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<{
|
|
208
245
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -222,7 +259,27 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
222
259
|
}, "size" | "unstyled"> & {
|
|
223
260
|
readonly unstyled?: boolean | undefined;
|
|
224
261
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
225
|
-
}
|
|
262
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
263
|
+
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
264
|
+
} & 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<{
|
|
265
|
+
readonly fullscreen?: boolean | undefined;
|
|
266
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
267
|
+
} & {
|
|
268
|
+
readonly backgrounded?: boolean | undefined;
|
|
269
|
+
readonly radiused?: boolean | undefined;
|
|
270
|
+
readonly hoverTheme?: boolean | undefined;
|
|
271
|
+
readonly pressTheme?: boolean | undefined;
|
|
272
|
+
readonly focusTheme?: boolean | undefined;
|
|
273
|
+
readonly circular?: boolean | undefined;
|
|
274
|
+
readonly padded?: boolean | undefined;
|
|
275
|
+
readonly elevate?: boolean | undefined;
|
|
276
|
+
readonly bordered?: number | boolean | undefined;
|
|
277
|
+
readonly transparent?: boolean | undefined;
|
|
278
|
+
readonly chromeless?: boolean | "all" | undefined;
|
|
279
|
+
}, "size" | "unstyled"> & {
|
|
280
|
+
readonly unstyled?: boolean | undefined;
|
|
281
|
+
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
282
|
+
}>>>>, "style" | "size" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-hidden" | "aria-label" | "aria-labelledby" | "aria-live" | "aria-modal" | "aria-selected" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onTouchCancel" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchStart" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "zIndex" | `$${string}` | `$${number}` | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "importantForAccessibility" | "accessibilityLiveRegion" | "accessibilityLabelledBy" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "elevation" | keyof {
|
|
226
283
|
columnGap?: import("@tamagui/core").SpaceValue | undefined;
|
|
227
284
|
contain?: import("csstype").Property.Contain | undefined;
|
|
228
285
|
cursor?: import("csstype").Property.Cursor | undefined;
|
|
@@ -240,7 +297,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
240
297
|
animation?: import("@tamagui/core").AnimationProp | null | undefined;
|
|
241
298
|
animateOnly?: string[] | undefined;
|
|
242
299
|
userSelect?: import("csstype").Property.UserSelect | undefined;
|
|
243
|
-
} | "backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderColor" | "borderCurve" | "borderEndColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderLeftColor" | "borderRadius" | "borderRightColor" | "borderStartColor" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTopColor" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "opacity" | "alignContent" | "alignItems" | "alignSelf" | "aspectRatio" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "borderWidth" | "bottom" | "end" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "left" | "margin" | "marginBottom" | "marginEnd" | "marginHorizontal" | "marginLeft" | "marginRight" | "marginStart" | "marginTop" | "marginVertical" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "overflow" | "padding" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "position" | "right" | "start" | "top" | "width" | "direction" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformMatrix" | "rotation" | "translateX" | "translateY" | "transparent" | "circular" | "hoverTheme" | "pressTheme" | "focusTheme" | "elevate" | "bordered" | "backgrounded" | "radiused" | "padded" | "chromeless" | "fullscreen" | keyof import("@tamagui/core").TransformStyleProps | keyof import("@tamagui/core").TamaguiComponentPropsBase | keyof import("@tamagui/core/types/reactNativeTypes").RNViewProps | keyof import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
300
|
+
} | "backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockStartColor" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderColor" | "borderCurve" | "borderEndColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderLeftColor" | "borderRadius" | "borderRightColor" | "borderStartColor" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTopColor" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "opacity" | "alignContent" | "alignItems" | "alignSelf" | "aspectRatio" | "borderBottomWidth" | "borderEndWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStartWidth" | "borderTopWidth" | "borderWidth" | "bottom" | "end" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "left" | "margin" | "marginBottom" | "marginEnd" | "marginHorizontal" | "marginLeft" | "marginRight" | "marginStart" | "marginTop" | "marginVertical" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "overflow" | "padding" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "position" | "right" | "start" | "top" | "width" | "direction" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformMatrix" | "rotation" | "translateX" | "translateY" | "transparent" | "circular" | "hoverTheme" | "pressTheme" | "focusTheme" | "elevate" | "bordered" | "backgrounded" | "radiused" | "padded" | "chromeless" | "fullscreen" | keyof import("@tamagui/core").TransformStyleProps | `$theme-${string}` | `$theme-${number}` | keyof import("@tamagui/core").TamaguiComponentPropsBase | keyof import("@tamagui/core/types/reactNativeTypes").RNViewProps | keyof import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
244
301
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
245
302
|
} & 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<{
|
|
246
303
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -279,7 +336,27 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
279
336
|
}, "size" | "unstyled"> & {
|
|
280
337
|
readonly unstyled?: boolean | undefined;
|
|
281
338
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
282
|
-
} & import("@tamagui/core").
|
|
339
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
340
|
+
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
341
|
+
} & 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<{
|
|
342
|
+
readonly fullscreen?: boolean | undefined;
|
|
343
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
344
|
+
} & {
|
|
345
|
+
readonly backgrounded?: boolean | undefined;
|
|
346
|
+
readonly radiused?: boolean | undefined;
|
|
347
|
+
readonly hoverTheme?: boolean | undefined;
|
|
348
|
+
readonly pressTheme?: boolean | undefined;
|
|
349
|
+
readonly focusTheme?: boolean | undefined;
|
|
350
|
+
readonly circular?: boolean | undefined;
|
|
351
|
+
readonly padded?: boolean | undefined;
|
|
352
|
+
readonly elevate?: boolean | undefined;
|
|
353
|
+
readonly bordered?: number | boolean | undefined;
|
|
354
|
+
readonly transparent?: boolean | undefined;
|
|
355
|
+
readonly chromeless?: boolean | "all" | undefined;
|
|
356
|
+
}, "size" | "unstyled"> & {
|
|
357
|
+
readonly unstyled?: boolean | undefined;
|
|
358
|
+
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
359
|
+
}>> & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
283
360
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
284
361
|
} & 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<{
|
|
285
362
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -299,7 +376,7 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
299
376
|
}, "size" | "unstyled"> & {
|
|
300
377
|
readonly unstyled?: boolean | undefined;
|
|
301
378
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
302
|
-
}
|
|
379
|
+
} & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "style" | "children" | "display" | "onLayout" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
303
380
|
style?: import("@tamagui/core").StyleProp<React.CSSProperties | import("react-native").ViewStyle | (React.CSSProperties & import("react-native").ViewStyle)>;
|
|
304
381
|
} & 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<{
|
|
305
382
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -319,6 +396,6 @@ export declare const SelectViewport: import("@tamagui/core").ReactComponentWithR
|
|
|
319
396
|
}, "size" | "unstyled"> & {
|
|
320
397
|
readonly unstyled?: boolean | undefined;
|
|
321
398
|
readonly size?: import("@tamagui/core").SizeTokens | undefined;
|
|
322
|
-
}
|
|
399
|
+
}>>>>, TamaguiElement>;
|
|
323
400
|
};
|
|
324
401
|
//# sourceMappingURL=SelectViewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2B9B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsE1B,CAAA"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var useSelectItemContext_exports = {};
|
|
30
|
-
__export(useSelectItemContext_exports, {
|
|
31
|
-
SelectItem: () => SelectItem
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(useSelectItemContext_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_compose_refs = require("@tamagui/compose-refs");
|
|
36
|
-
var import_core = require("@tamagui/core");
|
|
37
|
-
var import_list_item = require("@tamagui/list-item");
|
|
38
|
-
var React = __toESM(require("react"));
|
|
39
|
-
var import_context = require("./context");
|
|
40
|
-
const ITEM_NAME = "SelectItem";
|
|
41
|
-
const [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME);
|
|
42
|
-
const SelectItem = import_list_item.ListItem.styleable(
|
|
43
|
-
(props, forwardedRef) => {
|
|
44
|
-
const {
|
|
45
|
-
__scopeSelect,
|
|
46
|
-
value,
|
|
47
|
-
disabled = false,
|
|
48
|
-
textValue: textValueProp,
|
|
49
|
-
index,
|
|
50
|
-
...itemProps
|
|
51
|
-
} = props;
|
|
52
|
-
const context = (0, import_context.useSelectContext)(ITEM_NAME, __scopeSelect);
|
|
53
|
-
const isSelected = context.value === value;
|
|
54
|
-
const textId = React.useId();
|
|
55
|
-
const {
|
|
56
|
-
selectedIndex,
|
|
57
|
-
setSelectedIndex,
|
|
58
|
-
listRef,
|
|
59
|
-
open,
|
|
60
|
-
setOpen,
|
|
61
|
-
onChange,
|
|
62
|
-
activeIndex,
|
|
63
|
-
allowMouseUpRef,
|
|
64
|
-
allowSelectRef,
|
|
65
|
-
setValueAtIndex,
|
|
66
|
-
selectTimeoutRef,
|
|
67
|
-
dataRef
|
|
68
|
-
} = context;
|
|
69
|
-
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => {
|
|
70
|
-
if (!import_core.isWeb)
|
|
71
|
-
return;
|
|
72
|
-
if (node instanceof HTMLElement) {
|
|
73
|
-
if (listRef) {
|
|
74
|
-
listRef.current[index] = node;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
79
|
-
setValueAtIndex(index, value);
|
|
80
|
-
}, [index, setValueAtIndex, value]);
|
|
81
|
-
function handleSelect() {
|
|
82
|
-
setSelectedIndex(index);
|
|
83
|
-
onChange(value);
|
|
84
|
-
setOpen(false);
|
|
85
|
-
}
|
|
86
|
-
const selectItemProps = context.interactions ? context.interactions.getItemProps({
|
|
87
|
-
...import_core.isWebTouchable ? {
|
|
88
|
-
onTouchStart() {
|
|
89
|
-
allowSelectRef.current = true;
|
|
90
|
-
allowMouseUpRef.current = false;
|
|
91
|
-
}
|
|
92
|
-
} : {
|
|
93
|
-
onTouchMove() {
|
|
94
|
-
allowSelectRef.current = true;
|
|
95
|
-
allowMouseUpRef.current = false;
|
|
96
|
-
},
|
|
97
|
-
onTouchEnd() {
|
|
98
|
-
allowSelectRef.current = false;
|
|
99
|
-
allowMouseUpRef.current = true;
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
onKeyDown(event) {
|
|
103
|
-
if (event.key === "Enter" || event.key === " " && !(dataRef == null ? void 0 : dataRef.current.typing)) {
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
handleSelect();
|
|
106
|
-
} else {
|
|
107
|
-
allowSelectRef.current = true;
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
onClick() {
|
|
111
|
-
if (allowSelectRef.current) {
|
|
112
|
-
setSelectedIndex(index);
|
|
113
|
-
setOpen(false);
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
onMouseUp() {
|
|
117
|
-
if (!allowMouseUpRef.current) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (allowSelectRef.current) {
|
|
121
|
-
handleSelect();
|
|
122
|
-
}
|
|
123
|
-
clearTimeout(selectTimeoutRef.current);
|
|
124
|
-
selectTimeoutRef.current = setTimeout(() => {
|
|
125
|
-
allowSelectRef.current = true;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}) : {
|
|
129
|
-
onPress: handleSelect
|
|
130
|
-
};
|
|
131
|
-
const isActive = activeIndex === index;
|
|
132
|
-
React.useEffect(() => {
|
|
133
|
-
var _a;
|
|
134
|
-
if (isActive) {
|
|
135
|
-
(_a = listRef == null ? void 0 : listRef.current[index]) == null ? void 0 : _a.focus();
|
|
136
|
-
}
|
|
137
|
-
}, [isActive]);
|
|
138
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
-
SelectItemContextProvider,
|
|
140
|
-
{
|
|
141
|
-
scope: __scopeSelect,
|
|
142
|
-
value,
|
|
143
|
-
textId: textId || "",
|
|
144
|
-
isSelected,
|
|
145
|
-
children: context.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value, children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
146
|
-
import_list_item.ListItem,
|
|
147
|
-
{
|
|
148
|
-
tag: "div",
|
|
149
|
-
componentName: ITEM_NAME,
|
|
150
|
-
backgrounded: true,
|
|
151
|
-
pressTheme: true,
|
|
152
|
-
hoverTheme: true,
|
|
153
|
-
focusTheme: true,
|
|
154
|
-
cursor: "default",
|
|
155
|
-
outlineWidth: 0,
|
|
156
|
-
ref: composedRefs,
|
|
157
|
-
"aria-labelledby": textId,
|
|
158
|
-
"aria-selected": isSelected,
|
|
159
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
160
|
-
"aria-disabled": disabled || void 0,
|
|
161
|
-
"data-disabled": disabled ? "" : void 0,
|
|
162
|
-
tabIndex: disabled ? void 0 : -1,
|
|
163
|
-
size: context.size,
|
|
164
|
-
...itemProps,
|
|
165
|
-
...selectItemProps,
|
|
166
|
-
...isActive && {
|
|
167
|
-
theme: "active"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
);
|
|
175
|
-
SelectItem.displayName = ITEM_NAME;
|
|
176
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
177
|
-
0 && (module.exports = {
|
|
178
|
-
SelectItem
|
|
179
|
-
});
|
|
180
|
-
//# sourceMappingURL=useSelectItemContext.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useSelectItemContext.tsx"],
|
|
4
|
-
"mappings": "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",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
|
-
import { isWeb, isWebTouchable, useIsomorphicLayoutEffect } from "@tamagui/core";
|
|
4
|
-
import { ListItem } from "@tamagui/list-item";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { createSelectContext, useSelectContext } from "./context";
|
|
7
|
-
const ITEM_NAME = "SelectItem";
|
|
8
|
-
const [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
9
|
-
const SelectItem = ListItem.styleable(
|
|
10
|
-
(props, forwardedRef) => {
|
|
11
|
-
const {
|
|
12
|
-
__scopeSelect,
|
|
13
|
-
value,
|
|
14
|
-
disabled = false,
|
|
15
|
-
textValue: textValueProp,
|
|
16
|
-
index,
|
|
17
|
-
...itemProps
|
|
18
|
-
} = props;
|
|
19
|
-
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
20
|
-
const isSelected = context.value === value;
|
|
21
|
-
const textId = React.useId();
|
|
22
|
-
const {
|
|
23
|
-
selectedIndex,
|
|
24
|
-
setSelectedIndex,
|
|
25
|
-
listRef,
|
|
26
|
-
open,
|
|
27
|
-
setOpen,
|
|
28
|
-
onChange,
|
|
29
|
-
activeIndex,
|
|
30
|
-
allowMouseUpRef,
|
|
31
|
-
allowSelectRef,
|
|
32
|
-
setValueAtIndex,
|
|
33
|
-
selectTimeoutRef,
|
|
34
|
-
dataRef
|
|
35
|
-
} = context;
|
|
36
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => {
|
|
37
|
-
if (!isWeb)
|
|
38
|
-
return;
|
|
39
|
-
if (node instanceof HTMLElement) {
|
|
40
|
-
if (listRef) {
|
|
41
|
-
listRef.current[index] = node;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
useIsomorphicLayoutEffect(() => {
|
|
46
|
-
setValueAtIndex(index, value);
|
|
47
|
-
}, [index, setValueAtIndex, value]);
|
|
48
|
-
function handleSelect() {
|
|
49
|
-
setSelectedIndex(index);
|
|
50
|
-
onChange(value);
|
|
51
|
-
setOpen(false);
|
|
52
|
-
}
|
|
53
|
-
const selectItemProps = context.interactions ? context.interactions.getItemProps({
|
|
54
|
-
...isWebTouchable ? {
|
|
55
|
-
onTouchStart() {
|
|
56
|
-
allowSelectRef.current = true;
|
|
57
|
-
allowMouseUpRef.current = false;
|
|
58
|
-
}
|
|
59
|
-
} : {
|
|
60
|
-
onTouchMove() {
|
|
61
|
-
allowSelectRef.current = true;
|
|
62
|
-
allowMouseUpRef.current = false;
|
|
63
|
-
},
|
|
64
|
-
onTouchEnd() {
|
|
65
|
-
allowSelectRef.current = false;
|
|
66
|
-
allowMouseUpRef.current = true;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
onKeyDown(event) {
|
|
70
|
-
if (event.key === "Enter" || event.key === " " && !(dataRef == null ? void 0 : dataRef.current.typing)) {
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
handleSelect();
|
|
73
|
-
} else {
|
|
74
|
-
allowSelectRef.current = true;
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
onClick() {
|
|
78
|
-
if (allowSelectRef.current) {
|
|
79
|
-
setSelectedIndex(index);
|
|
80
|
-
setOpen(false);
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
onMouseUp() {
|
|
84
|
-
if (!allowMouseUpRef.current) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
if (allowSelectRef.current) {
|
|
88
|
-
handleSelect();
|
|
89
|
-
}
|
|
90
|
-
clearTimeout(selectTimeoutRef.current);
|
|
91
|
-
selectTimeoutRef.current = setTimeout(() => {
|
|
92
|
-
allowSelectRef.current = true;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}) : {
|
|
96
|
-
onPress: handleSelect
|
|
97
|
-
};
|
|
98
|
-
const isActive = activeIndex === index;
|
|
99
|
-
React.useEffect(() => {
|
|
100
|
-
var _a;
|
|
101
|
-
if (isActive) {
|
|
102
|
-
(_a = listRef == null ? void 0 : listRef.current[index]) == null ? void 0 : _a.focus();
|
|
103
|
-
}
|
|
104
|
-
}, [isActive]);
|
|
105
|
-
return /* @__PURE__ */ jsx(
|
|
106
|
-
SelectItemContextProvider,
|
|
107
|
-
{
|
|
108
|
-
scope: __scopeSelect,
|
|
109
|
-
value,
|
|
110
|
-
textId: textId || "",
|
|
111
|
-
isSelected,
|
|
112
|
-
children: context.shouldRenderWebNative ? /* @__PURE__ */ jsx("option", { value, children: props.children }) : /* @__PURE__ */ jsx(
|
|
113
|
-
ListItem,
|
|
114
|
-
{
|
|
115
|
-
tag: "div",
|
|
116
|
-
componentName: ITEM_NAME,
|
|
117
|
-
backgrounded: true,
|
|
118
|
-
pressTheme: true,
|
|
119
|
-
hoverTheme: true,
|
|
120
|
-
focusTheme: true,
|
|
121
|
-
cursor: "default",
|
|
122
|
-
outlineWidth: 0,
|
|
123
|
-
ref: composedRefs,
|
|
124
|
-
"aria-labelledby": textId,
|
|
125
|
-
"aria-selected": isSelected,
|
|
126
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
127
|
-
"aria-disabled": disabled || void 0,
|
|
128
|
-
"data-disabled": disabled ? "" : void 0,
|
|
129
|
-
tabIndex: disabled ? void 0 : -1,
|
|
130
|
-
size: context.size,
|
|
131
|
-
...itemProps,
|
|
132
|
-
...selectItemProps,
|
|
133
|
-
...isActive && {
|
|
134
|
-
theme: "active"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
SelectItem.displayName = ITEM_NAME;
|
|
143
|
-
export {
|
|
144
|
-
SelectItem
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=useSelectItemContext.js.map
|